@innofulfill/hubops-shipment-tracking 0.1.99 → 0.1.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -56,4 +56,4 @@
|
|
|
56
56
|
}
|
|
57
57
|
`,es=s=>{const{csp:t,prefixCls:n,layer:a}=C.useContext(it);let o=$t;n&&(o=o.replace(/anticon/g,n)),a&&(o=`@layer ${a} {
|
|
58
58
|
${o}
|
|
59
|
-
}`),C.useEffect(()=>{const l=s.current,p=Gt(l);Wt(o,"@ant-design-icons",{prepend:!a,csp:t,attachTo:p})},[])},ie={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function ts({primaryColor:s,secondaryColor:t}){ie.primaryColor=s,ie.secondaryColor=t||gt(s),ie.calculated=!!t}function ss(){return{...ie}}const J=s=>{const{icon:t,className:n,onClick:a,style:o,primaryColor:l,secondaryColor:p,...m}=s,x=E.useRef(null);let d=ie;if(l&&(d={primaryColor:l,secondaryColor:p||gt(l)}),es(x),Xt(et(t),`icon should be icon definiton, but got ${t}`),!et(t))return null;let j=t;return j&&typeof j.icon=="function"&&(j={...j,icon:j.icon(d.primaryColor,d.secondaryColor)}),Ee(j.icon,`svg-${j.name}`,{className:n,onClick:a,style:o,"data-icon":j.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...m,ref:x})};J.displayName="IconReact";J.getTwoToneColors=ss;J.setTwoToneColors=ts;function xt(s){const[t,n]=mt(s);return J.setTwoToneColors({primaryColor:t,secondaryColor:n})}function ns(){const s=J.getTwoToneColors();return s.calculated?[s.primaryColor,s.secondaryColor]:s.primaryColor}var as={};function _e(){return _e=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},_e.apply(this,arguments)}xt(Te.primary);const P=E.forwardRef((s,t)=>{const{className:n,icon:a,spin:o,rotate:l,tabIndex:p,onClick:m,twoToneColor:x,...d}=s,{prefixCls:j="anticon",rootClassName:I}=E.useContext(it),O=Tt(I,j,{[`${j}-${a.name}`]:!!a.name,[`${j}-spin`]:!!o||a.name==="loading"},n);let B=p;B===void 0&&m&&(B=-1);const L=l?{msTransform:`rotate(${l}deg)`,transform:`rotate(${l}deg)`}:void 0,[X,$]=mt(x);return E.createElement("span",_e({role:"img","aria-label":a.name},d,{ref:t,tabIndex:B,onClick:m,className:O}),E.createElement(J,{icon:a,primaryColor:X,secondaryColor:$,style:L}))});P.getTwoToneColor=ns;P.setTwoToneColor=xt;as.NODE_ENV!=="production"&&(P.displayName="AntdIcon");var is={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},os={};function Oe(){return Oe=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Oe.apply(this,arguments)}const rs=(s,t)=>E.createElement(P,Oe({},s,{ref:t,icon:is})),ft=E.forwardRef(rs);os.NODE_ENV!=="production"&&(ft.displayName="ArrowLeftOutlined");var ls={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},cs={};function Fe(){return Fe=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Fe.apply(this,arguments)}const ds=(s,t)=>E.createElement(P,Fe({},s,{ref:t,icon:ls})),Ct=E.forwardRef(ds);cs.NODE_ENV!=="production"&&(Ct.displayName="CalendarOutlined");var hs={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},us={};function Be(){return Be=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Be.apply(this,arguments)}const ps=(s,t)=>E.createElement(P,Be({},s,{ref:t,icon:hs})),bt=E.forwardRef(ps);us.NODE_ENV!=="production"&&(bt.displayName="FileTextOutlined");var gs={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},ms={};function Le(){return Le=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Le.apply(this,arguments)}const xs=(s,t)=>E.createElement(P,Le({},s,{ref:t,icon:gs})),He=E.forwardRef(xs);ms.NODE_ENV!=="production"&&(He.displayName="InfoCircleOutlined");var fs={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},Cs={};function Ue(){return Ue=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Ue.apply(this,arguments)}const bs=(s,t)=>E.createElement(P,Ue({},s,{ref:t,icon:fs})),jt=E.forwardRef(bs);Cs.NODE_ENV!=="production"&&(jt.displayName="UserOutlined");const ze="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%202C20.1647%202%2022%203.81484%2022%206.01659C22%208.25341%2020.1348%209.82312%2018.412%2010.8905C18.2864%2010.9623%2018.1445%2011%2018%2011C17.8555%2011%2017.7136%2010.9623%2017.588%2010.8905C15.8684%209.8127%2014%208.26115%2014%206.01659C14%203.81484%2015.8353%202%2018%202Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M18%206H18.009'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5%2022C6.65685%2022%208%2020.6569%208%2019C8%2017.3431%206.65685%2016%205%2016C3.34315%2016%202%2017.3431%202%2019C2%2020.6569%203.34315%2022%205%2022Z'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11%207H9.5C7.567%207%206%208.34315%206%2010C6%2011.6569%207.567%2013%209.5%2013H12.5C14.433%2013%2016%2014.3431%2016%2016C16%2017.6569%2014.433%2019%2012.5%2019H11'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",oe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.1667%2016.6668C15.0871%2016.6668%2015.8333%2015.9206%2015.8333%2015.0002C15.8333%2014.0797%2015.0871%2013.3335%2014.1667%2013.3335C13.2462%2013.3335%2012.5%2014.0797%2012.5%2015.0002C12.5%2015.9206%2013.2462%2016.6668%2014.1667%2016.6668Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M5.83464%2016.6663C6.75511%2016.6663%207.5013%2015.9201%207.5013%2014.9997C7.5013%2014.0792%206.75511%2013.333%205.83464%2013.333C4.91416%2013.333%204.16797%2014.0792%204.16797%2014.9997C4.16797%2015.9201%204.91416%2016.6663%205.83464%2016.6663Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M4.16797%2014.9767C3.25404%2014.9312%202.68389%2014.7952%202.27816%2014.3895C1.87244%2013.9838%201.73649%2013.4136%201.69093%2012.4997M7.5013%2014.9997H12.5013M15.8346%2014.9767C16.7485%2014.9312%2017.3187%2014.7952%2017.7245%2014.3895C18.3346%2013.7793%2018.3346%2012.7972%2018.3346%2010.833V9.16634H14.418C13.7975%209.16634%2013.4873%209.16634%2013.2363%209.08476C12.7289%208.91992%2012.3311%208.52209%2012.1662%208.0147C12.0846%207.76365%2012.0846%207.45343%2012.0846%206.83301C12.0846%205.90237%2012.0846%205.43705%2011.9623%205.06047C11.715%204.29937%2011.1183%203.70266%2010.3572%203.45537C9.98063%203.33301%209.5153%203.33301%208.58463%203.33301H1.66797'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1.66797%206.66699H6.66797'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1.66797%209.16699H5.0013'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.082%205H13.5997C14.8125%205%2015.4189%205%2015.9124%205.29476C16.4059%205.58952%2016.6934%206.12343%2017.2684%207.19125L18.332%209.16667'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",re="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='%23F8FAFC'/%3e%3cpath%20d='M23.5%2011.8335V16.0002M8.5%2011.8335C8.5%2014.3872%208.5%2019.9787%208.5%2020.3012C8.5%2021.4533%2010.1214%2022.1382%2013.3641%2023.5081C14.6668%2024.0583%2015.3182%2024.3335%2016%2024.3335V15.4625'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.5%2021.8333C18.5%2021.8333%2019.2292%2021.8333%2019.9583%2023.5C19.9583%2023.5%2022.2745%2019.3333%2024.3333%2018.5'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.9383%2014.076L10.5039%2012.898C9.16797%2012.2516%208.5%2011.9284%208.5%2011.4165C8.5%2010.9046%209.16797%2010.5814%2010.5039%209.93496L12.9383%208.75702C14.4407%208.03001%2015.1919%207.6665%2016%207.6665C16.8081%207.6665%2017.5593%208.03%2019.0617%208.75702L21.4961%209.93496C22.832%2010.5814%2023.5%2010.9046%2023.5%2011.4165C23.5%2011.9284%2022.832%2012.2516%2021.4961%2012.898L19.0617%2014.076C17.5593%2014.803%2016.8081%2015.1665%2016%2015.1665C15.1919%2015.1665%2014.4407%2014.803%2012.9383%2014.076Z'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11%2016L12.6667%2016.8333'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M20.1654%209.33301L11.832%2013.4997'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Nt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17%2021C18.1046%2021%2019%2020.1046%2019%2019C19%2017.8954%2018.1046%2017%2017%2017C15.8954%2017%2015%2017.8954%2015%2019C15%2020.1046%2015.8954%2021%2017%2021Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M7%2021C8.10457%2021%209%2020.1046%209%2019C9%2017.8954%208.10457%2017%207%2017C5.89543%2017%205%2017.8954%205%2019C5%2020.1046%205.89543%2021%207%2021Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M2%209V13.947C2%2016.329%202%2017.52%202.73223%2018.26C3.2191%2018.7521%203.90328%2018.9169%205%2018.9722M12.4271%205C13.3404%205.2999%2014.0564%206.02354%2014.3532%206.94654C14.5%207.40322%2014.5%207.96753%2014.5%209.09613C14.5%209.84853%2014.5%2010.2248%2014.5979%2010.5292C14.7957%2011.1445%2015.2731%2011.627%2015.882%2011.8269C16.1832%2011.9258%2016.5555%2011.9258%2017.3%2011.9258H22V13.947C22%2016.329%2022%2017.52%2021.2678%2018.26C20.7809%2018.7521%2020.0967%2018.9169%2019%2018.9722M9%2019H15'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.5%207H16.3212C17.7766%207%2018.5042%207%2019.0964%207.35371C19.6886%207.70742%2020.0336%208.34812%2020.7236%209.6295L22%2012'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.32653%208L8.81309%206.82583C9.60436%206.20083%2010%205.88833%2010%205.5M10%205.5C10%205.11168%209.60436%204.79918%208.81309%204.17418L7.32653%203M10%205.5H2'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",yt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%2022H6C4.11438%2022%203.17157%2022%202.58579%2021.4142C2%2020.8284%202%2019.8856%202%2018V16C2%2014.1144%202%2013.1716%202.58579%2012.5858C3.17157%2012%204.11438%2012%206%2012H8C9.88562%2012%2010.8284%2012%2011.4142%2012.5858C12%2013.1716%2012%2014.1144%2012%2016V18C12%2019.8856%2012%2020.8284%2011.4142%2021.4142C10.8284%2022%209.88562%2022%208%2022Z'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6%2015H8'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18%202C15.7909%202%2014%203.80892%2014%206.04033C14%207.31626%2014.5%208.30834%2015.5%209.1945C16.2049%209.81911%2017.0588%2010.8566%2017.5714%2011.6975C17.8173%2012.1008%2018.165%2012.1008%2018.4286%2011.6975C18.9672%2010.8733%2019.7951%209.81911%2020.5%209.1945C21.5%208.30834%2022%207.31626%2022%206.04033C22%203.80892%2020.2091%202%2018%202Z'%20stroke='%23003371'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3cpath%20d='M18%2015V18C18%2019.8856%2018%2020.8284%2017.5314%2021.4142C17.0839%2021.9735%2016.3761%2021.9988%2015%2021.9999'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.007%206H17.998'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",st="data:image/svg+xml,%3csvg%20width='19'%20height='19'%20viewBox='0%200%2019%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.875%207.9165C11.875%206.60483%2010.8117%205.5415%209.5%205.5415C8.18829%205.5415%207.125%206.60483%207.125%207.9165C7.125%209.22822%208.18829%2010.2915%209.5%2010.2915C10.8117%2010.2915%2011.875%209.22822%2011.875%207.9165Z'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.4577%2014.2503C13.4577%2012.0642%2011.6855%2010.292%209.49935%2010.292C7.31322%2010.292%205.54102%2012.0642%205.54102%2014.2503'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.625%2010.2917V8.70833C16.625%205.72277%2016.625%204.22999%2015.6975%203.30249C14.77%202.375%2013.2772%202.375%2010.2917%202.375H8.70833C5.72277%202.375%204.22999%202.375%203.30249%203.30249C2.375%204.22999%202.375%205.72277%202.375%208.70833V10.2917C2.375%2013.2772%202.375%2014.77%203.30249%2015.6975C4.22999%2016.625%205.72277%2016.625%208.70833%2016.625H10.2917C13.2772%2016.625%2014.77%2016.625%2015.6975%2015.6975C16.625%2014.77%2016.625%2013.2772%2016.625%2010.2917Z'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='square'%20stroke-linejoin='round'/%3e%3c/svg%3e",nt="data:image/svg+xml,%3csvg%20width='19'%20height='19'%20viewBox='0%200%2019%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.98047%205.9375V10.6875C1.98047%2013.673%201.98047%2015.1659%202.90796%2016.0933C3.83546%2017.0208%205.32824%2017.0208%208.3138%2017.0208H9.5013M17.0221%209.89583V5.9375'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M3.06433%204.20772L1.98047%205.93783H17.0221L16.0308%204.28564C15.355%203.15924%2015.0171%202.59604%2014.4726%202.28777C13.9281%201.97949%2013.2713%201.97949%2011.9578%201.97949H7.08966C5.8042%201.97949%205.16148%201.97949%204.62474%202.2766C4.088%202.57372%203.74678%203.11839%203.06433%204.20772Z'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M9.5%205.93734V1.979'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.91797%208.3125H11.0846'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.4805%2015.4372C11.4805%2015.4372%2012.2721%2015.4372%2013.0638%2017.0205C13.0638%2017.0205%2014.7869%2013.0622%2017.0221%2012.2705'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",js="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.6673%2010.0002V12.5928C12.6673%2014.076%2012.1769%2014.6668%2010.5933%2014.6668H5.40806C3.92476%2014.6668%203.33398%2014.1764%203.33398%2012.5928V10.0002C3.33398%207.42283%205.42332%205.3335%208.00065%205.3335C10.578%205.3335%2012.6673%207.42283%2012.6673%2010.0002Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.6673%2010.0002C10.6673%208.52743%209.47338%207.3335%208.00065%207.3335C6.52789%207.3335%205.33398%208.52743%205.33398%2010.0002'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M8%2011.3333L8.66667%2010'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.8743%203.3335H5.12439C4.53532%203.3335%204.24079%203.3335%203.98162%203.23214C3.89554%203.19847%203.81319%203.15682%203.73579%203.10782C3.50277%202.96028%203.3394%202.72872%203.01264%202.2656C2.75798%201.90466%202.63066%201.72419%202.67455%201.57663C2.68844%201.52994%202.71294%201.48668%202.74635%201.44986C2.85194%201.3335%203.08148%201.3335%203.54058%201.3335H12.4581C12.9172%201.3335%2013.1467%201.3335%2013.2523%201.44986C13.2857%201.48668%2013.3103%201.52994%2013.3241%201.57663C13.368%201.72419%2013.2407%201.90466%2012.9861%202.2656C12.6593%202.72872%2012.4959%202.96029%2012.2629%203.10782C12.1855%203.15682%2012.1031%203.19847%2012.0171%203.23214C11.7579%203.3335%2011.4634%203.3335%2010.8743%203.3335Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M9.33268%205.3335V3.3335M6.66602%205.3335V3.3335'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3c/svg%3e",Ns="data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.19033%202.28511C7.10013%201.37531%207.55507%200.9204%208.06253%200.7102C8.73913%200.429933%209.4994%200.429933%2010.1761%200.7102C10.6835%200.9204%2011.1384%201.37531%2012.0482%202.28511C12.958%203.19492%2013.4129%203.64983%2013.6231%204.15729C13.9034%204.83392%2013.9034%205.59417%2013.6231%206.2708C13.4129%206.77827%2012.958%207.2332%2012.0482%208.143L8.143%2012.0482C7.2332%2012.958%206.77827%2013.4129%206.2708%2013.6231C5.59417%2013.9034%204.83392%2013.9034%204.15729%2013.6231C3.64983%2013.4129%203.19492%2012.958%202.28511%2012.0482C1.37531%2011.1384%200.9204%2010.6835%200.7102%2010.1761C0.429933%209.4994%200.429933%208.73913%200.7102%208.06253C0.9204%207.55507%201.37531%207.10013%202.28511%206.19033L6.19033%202.28511Z'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ys="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%2014.6665C7.45453%2014.6665%206.93347%2014.4464%205.89129%2014.0062C3.29709%2012.9103%202%2012.3624%202%2011.4407C2%2011.1826%202%206.7095%202%204.6665M8%2014.6665C8.54547%2014.6665%209.06653%2014.4464%2010.1087%2014.0062C12.7029%2012.9103%2014%2012.3624%2014%2011.4407V4.6665M8%2014.6665V7.5697'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.55061%206.46108L3.60315%205.51873C2.53438%205.00156%202%204.74298%202%204.3335C2%203.92401%202.53438%203.66543%203.60315%203.14826L5.55061%202.20591C6.75253%201.6243%207.35353%201.3335%208%201.3335C8.64647%201.3335%209.24747%201.6243%2010.4494%202.20591L12.3969%203.14826C13.4656%203.66543%2014%203.92401%2014%204.3335C14%204.74298%2013.4656%205.00156%2012.3969%205.51873L10.4494%206.46108C9.24747%207.0427%208.64647%207.3335%208%207.3335C7.35353%207.3335%206.75253%207.0427%205.55061%206.46108Z'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4%208L5.33333%208.66667'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.3327%202.6665L4.66602%205.99984'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",As="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.0026%201.33398C11.6845%201.33398%2014.6693%204.31875%2014.6693%208.00064C14.6693%2011.6826%2011.6845%2014.6673%208.0026%2014.6673C4.3207%2014.6673%201.33594%2011.6826%201.33594%208.00064M5.94194%201.65856C5.26927%201.87697%204.6435%202.19942%204.08362%202.60692M2.60889%204.08165C2.20131%204.64164%201.87882%205.26753%201.6604%205.94033'%20stroke='%23175EB6'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.0026%205.33398V10.6673M10.6693%208.00064H5.33594'%20stroke='%23175EB6'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";var vs={};function ne(s){if(!s||s==="-"||s==="—")return"--";const t=new Date(s);return isNaN(t.getTime())?"--":t.toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}function N(s){return s==null?s:String(s).replace(/[_-]+/g," ").replace(/\s+/g," ").trim().toLowerCase().replace(/\b\w/g,n=>n.toUpperCase())}function ae({label:s,value:t}){return e.jsxs("div",{className:"ho-kv",children:[e.jsx("span",{className:"ho-kv__label",children:s}),e.jsx("span",{className:"ho-kv__value",children:t})]})}function W(s){if(!s)return"—";const t=new Date(s);if(isNaN(t.getTime()))return"—";const n=a=>String(a).padStart(2,"0");return n(t.getDate())+"-"+n(t.getMonth()+1)+"-"+t.getFullYear()+" "+n(t.getHours())+":"+n(t.getMinutes())+":"+n(t.getSeconds())}function Ie({icon:s,label:t,value:n,isAudit:a=!1}){return e.jsxs("div",{className:"ho-kv ho-kv--withTag",children:[e.jsxs("span",{className:"ho-kv__label_audit",style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",fontWeight:500,fontFamily:"Roboto"},children:[s&&e.jsx("img",{src:s,alt:"",className:"ho-kv__icon"}),t]}),e.jsx("span",{className:a?"ho-kv__tag_audit":"ho-kv__tag",children:n})]})}function At({endpoint:s,awbNumber:t,data:n}){const[a,o]=C.useState(!1),[l,p]=C.useState(!1),[m,x]=C.useState(null),[d,j]=C.useState(n||null),[I,O]=C.useState(!1),B=fe.useLocation(),L=fe.useNavigate(),[X,$]=C.useState(!1),[le,je]=C.useState(!1),[Ne,Y]=C.useState(!1),[G,D]=C.useState(!1),R=C.useRef(null),[Q,ce]=C.useState(!1),de=new URLSearchParams(B.search).get("endpoint"),H=s||de||vs.REACT_APP_TRACKING_ENDPOINT||"/api/v1/shipment-tracking/search",U=C.useMemo(()=>{if(t)return t;const i=new URLSearchParams(B.search);return i.get("awb")||i.get("awbNumber")||""},[t,B.search]);C.useEffect(()=>{if(n){j(n);return}let i=!1;return(async()=>{try{if(O(!0),!U){i||j(null);return}const y=`${H}?awbNumber=${encodeURIComponent(U)}`,w=await fetch(y);if(!w.ok)throw new Error("Request failed");const b=await w.json();i||j(b)}catch{i||j(null)}finally{i||O(!1)}})(),()=>{i=!0}},[H,U,n]);const ye=d?.shipmentTracking?.isRTO===!0,g=d?.shipmentTracking?.bookingInfoDto,he=d?.shipmentTracking?.nextLocation,S=d?.shipmentTracking?.auditInfo||[],c=d?.shipmentTracking?.latestOperation,f=d?.shipmentTracking?.supportTicketInfo,v=d?.tatInfo,u={sourceCity:g?.sourceCity||"—",destinationCity:g?.destinationCity||"—",bookingTime:g?.bookingDate||"—",shipmentNumber:g?.awbNumber||"—",isRTO:ye,isMCN:g?.mcn,bagId:g?.bagId||"—",fromPincode:g?.fromPincode||"—",senderPincode:g?.senderPincode||"—",receiverPincode:g?.receiverPincode||"—",estimatedDeliveryDate:g?.estimatedDeliveryDate||null,revisedEstimatedDeliveryDate:g?.revisedEstimatedDeliveryDate||null,actualDeliveryDate:g?.actualDeliveryDate||"—",sourceHubName:g?.sourceHubName||"—",destinationHubName:g?.destinationHubName||"—",source:{city:g?.senderName||"—",pincode:g?.fromPincode||"—"},destination:{city:g?.receiverName||"—",pincode:g?.receiverPincode||"—"},bookingType:g?.bookingType||"—",shipmentType:g?.shipmentType?`${g.shipmentType?.toUpperCase()} | ${g.travelType?.toUpperCase()}`:"—",serviceType:g?.serviceType||"—",awb:g?.tplAwbNumber||"",partner:g?.partnerCode||"",eway:(()=>{const i=d?.shipmentTracking?.ewayInfo?.[0];return i?{id:i.eway_bill_id,no:i.ewaybill_no,created:i.eway_bill_crt_date,expiry:i.ewb_bill_exp_date}:{id:"—",no:"—",created:"—",expiry:"—"}})(),sender:{name:g?.senderName||"—",address:g?.booking_cp_address||"—"},receiver:{name:g?.receiverName||"—",address:g?.recipient_cp_address||"—"},pkg:{weight:g?.weight&&`${g.weight} Kg`||"—",dimensions:g?.length||g?.width||g?.height?`${g.length} x ${g.width} x ${g.height} cm`:"—",volumetric:g?.volumetricWeight||"—"},status:g?.status||"—",parentAwbNumber:g?.parentAwbNumber||""},_=C.useMemo(()=>{const i=d?.shipmentTracking?.travelDtos||[];if(!i.length)return null;const r=i[i.length-1],y=(r?.status||"").toUpperCase();return(y==="HUB-OUTSCAN"||y==="IN-BAG-OUTSCAN")&&(r?.toPremisename||r?.toPremiseName)||null},[d]),T=(()=>{const i=d?.shipmentTracking?.travelDtos||[],r=b=>{if(!b)return"";try{const A=b.split(" ")[0]?.split("-");return A?.length===3?`${A[2]}-${A[1]}-${A[0]}`:b}catch{return b}},y=b=>{const A=(b||"").toLowerCase(),F=i.find(z=>(z?.premiseName||"").toLowerCase().includes(A)||A.includes((z?.premiseName||"").toLowerCase())||(z?.toPremisename||z?.topremisename||"").toLowerCase().includes(A)||A.includes((z?.toPremisename||z?.topremisename||"").toLowerCase()))||null;return r(F?.date)},w=d?.shipmentTracking?.route_info;return Array.isArray(w)&&w.length?w.map((b,A,F)=>({hub:b,date:y(b),type:A===0?"source":A===F.length-1?"to":"transit"})):[]})();C.useEffect(()=>{if(!R.current||T.length<=5){ce(!1);return}const i=R.current,r=()=>{const y=Array.from(i.querySelectorAll(".ho-route__row"));if(y.length===0)return!1;let w=0;return y.forEach(b=>{w+=b.offsetHeight+24}),w>i.clientHeight};requestAnimationFrame(()=>{const y=r();ce(y)})},[T.length]),C.useMemo(()=>T.find(r=>r.type==="source")?.hub||"—",[T,u.source.city]),C.useMemo(()=>T.find(r=>r.type==="to")?.hub||"—",[T,u.destination.city]);const ue=d?.shipmentTracking?.travelDtos?.map((i,r)=>({key:r,time:i.date,location:(i.status||"").toUpperCase()==="RETURN_INITIATED"&&i.driverName&&i.driverName.trim()!==""?i.toPremisename||i.toPremiseName||"—":["FORCE_BAG_ATTEMPTED","RETURN_INITIATED","RETURN_REVOKED","IN_BAG_OUTSCAN_TO_CP","OUT_SCAN_TO_CP","BAGGED","INSCANNED","IN-BAG-OUTSCAN","IN-BAG-INSCAN","INSCANNED_AT_TRANSIT","ATTEMPTED","HUB-OUTSCAN","HUB-IN-SCANNED","REMOVED_FROM_BAG","SCHEDULED_FOR_TRIP","FORCE_BAG","MIS_ROUTED","REROUTED","PINCODE_AUDITED","FORCE_HUB_OUTSCAN","EXCESS_INSCAN","MODE_AUDITED","REMOVED_FROM_LCR","OUT_SCAN_TO_3PL","LOST","DAMAGED"].includes((i.status||"").toUpperCase())?i.premiseName||"—":i.toPremisename||i.toPremiseName||"—",locationPremiseName:["IN_BAG_OUTSCAN_TO_CP","OUT_SCAN_TO_CP"].includes((i.status||"").toUpperCase())?i.toPremisename||i.toPremiseName:"-",process:i.status,bag:i.bagBarCode,user:(i.status||"").toUpperCase()==="RETURN_INITIATED"&&i.driverName?.trim()||["ATTEMPTED","OUT_FOR_DELIVERY","DELIVERED","RTO_OUT_FOR_DELIVERY","RETURN_REVOKED","RTO_DELIVERED","INSCANNED_AT_CP","UNDELIVERED","RTO_UNDELIVERED","OUTSCANNED_BY_CP"].includes((i.status||"").toUpperCase())&&i.driverName?.trim()?i.driverName:i.user?.trim()||"_",exception:i.exception||(i.isException,"-"),remark:(()=>{const y=(i.status||"").toString().toUpperCase();if(!["SCHEDULED_FOR_TRIP","IN-BAG-OUTSCAN"].includes(y))return i.remarks||"-";const b=i.lcrnum||i.lcrNum||i.lcr_no||i.lcrNo||"",F=`${y==="SCHEDULED_FOR_TRIP"?"Scheduled Outscan":"Outscan"} from ${N(i.premiseName||"")} to ${N(i.toPremisename||i.topremisename||"")}`;return b?`${F} — LCR No: ${b}`:F})(),coLoader:i.coLoader||i.co_loader||i.coLoaderName||i.co_loader_name||i.coLoader_code||"—",transportType:i.travelBy||i.transportType||i.transport_type||i.mode||"—",flightName:i.flightName||i.flight_no||i.flight||i.flightNum||"",vehicleNo:i.vehicleNo||i.vehicleNum||i.vehicle_no||i.truckNo||i.truck_no||"—",driverName:i.driverName||i.driver_name||"—"}))||[],pe=C.useMemo(()=>[{title:"Date and Time",dataIndex:"time",key:"time",render:i=>e.jsx("span",{className:"ho-nowrap",children:W(i)})},{title:"Location",dataIndex:"location",key:"location",render:i=>i?N(i):"—"},{title:"Process",dataIndex:"process",key:"process",render:(i,r)=>{const y=(i||"").toString().toUpperCase(),b=["REMOVED_FROM_BAG","REMOVED_FROM_LCR","ATTEMPTED","MIS_ROUTED","UNDELIVERED"].includes(y),A=b?{color:"#e14949",borderColor:"#ffd5d5",background:"#ffecec"}:{color:"#1f7a48",borderColor:"#cfeede",background:"#e9fff1"},F=`ho-tag ${b?"ho-tag--danger":"ho-tag--success"}`,Ae=y==="OUT_SCAN_TO_CP"||y==="IN_BAG_OUTSCAN_TO_CP"?`${i} (${N(r?.locationPremiseName||"")})`:i;return e.jsx(h.Tag,{style:A,className:F,children:Ae})}},{title:"Bag No",dataIndex:"bag",key:"bag",render:i=>i?e.jsx("a",{className:"ho-link",onClick:()=>L(`/bag-details-ui?awb=${encodeURIComponent(i)}`),children:i}):"-"},{title:"User",dataIndex:"user",key:"user"},{title:"Exception",dataIndex:"exception",key:"exception",render:i=>i||"-"},{title:"Remark",dataIndex:"remark",key:"remark",render:(i,r)=>{if(!i)return"-";if((r?.process||"").toUpperCase()==="MIS_ROUTED"){const V=String(i),Z=V.length>40?`${V.slice(0,40)}…`:V;return e.jsx(h.Tooltip,{title:V,children:e.jsx("span",{className:"ho-remark-ellipsis",children:Z})})}const w=["SCHEDULED_FOR_TRIP","IN-BAG-OUTSCAN"].includes((r?.process||r?.status||"").toString().toUpperCase()),b=i.indexOf("LCR No:"),A=b>=0,F=A?i.slice(0,b):i,z=A?i.slice(b):"",me=A?(z.replace(/^[^:]*:\s*/i,"")||"").trim():"",Ae=V=>{const Z=[],ee=String(V||""),Ge=/(https?:\/\/[^\s]+|www\.[^\s]+)/gi;let te=0,ve,we=0;for(;(ve=Ge.exec(ee))!==null;){const qe=ve.index,Mt=Ge.lastIndex;qe>te&&Z.push(e.jsx("span",{children:ee.slice(te,qe)},`rmk-t-${we++}`));const ke=ve[0],It=ke.startsWith("http")?ke:`https://${ke}`;Z.push(e.jsx("a",{className:"ho-link",href:It,target:"_blank",rel:"noreferrer",children:"View"},`rmk-a-${we++}`)),te=Mt}return te<ee.length&&Z.push(e.jsx("span",{children:ee.slice(te)},`rmk-t-${we++}`)),Z.length?Z:ee||"-"};return e.jsxs("span",{children:[Ae(F),A&&e.jsxs(e.Fragment,{children:[e.jsx("strong",{className:"ho-remark-strong",children:"LCR No: "}),me&&e.jsx("a",{className:"ho-link",onClick:()=>{sessionStorage.setItem("LCR_REPORT_RECORD",JSON.stringify({vehicle_lcr_id:me})),window.open(window.location.origin+"/lcr-report","_blank")},children:me})]}),w&&e.jsx(h.Tooltip,{placement:"top",title:e.jsxs("div",{children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Co-loader:"})," ",N(r.coLoader||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Transport type:"})," ",N(r.transportType||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Flight Name:"})," ",r.flightName||"N/A"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Vehicle No:"})," ",r.vehicleNo||"—"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Driver Name:"})," ",N(r.driverName||"—")]})]}),children:e.jsx("span",{className:"ho-alert-dot"})})]})}}],[L]);C.useMemo(()=>(d?.shipmentTracking?.ewayInfo||[]).map(r=>r?.ewaybill_no).filter(r=>!!r),[d]),C.useMemo(()=>S.length?[{key:"audit-master",label:`Audit (${S.length})`,children:S.map((i,r)=>({key:`audit-${r}`,title:`Audit ${r+1} - ${i.auditType||"WEIGHT"}`,auditData:i}))}]:[],[S]);const ge=C.useRef(!1);C.useEffect(()=>{!ge.current&&S.length>0&&(x("audit-master"),ge.current=!0)},[S]),C.useMemo(()=>{if(m&&m.startsWith("audit-")){const i=parseInt(m.split("-")[1]),r=S[i];if(!r)return null;const y={auditedBy:r.auditMethod||"—",hub:r.auditedHubName||r.sourceHubName||"—",date:u.bookingTime},w={actual:r.bookedWeight??"—",volumetric:r.volumetricBookedValue??"—",lwh:`${r.bookedLength??"—"},${r.bookedWidth??"—"},${r.bookedHeight??"—"}`},b={actual:r.auditedWeight??"—",volumetric:r.volumetricAuditedValue??"—",lwh:`${r.auditedLength??"—"},${r.auditedWidth??"—"},${r.auditedHeight??"—"}`},A=r.weightDiff!=null?`Audited actual weight is ${r.weightDiff>=0?"higher":"lower"} by ${Math.abs(r.weightDiff)}%.`:"";return{header:y,bookingValue:w,auditedValue:b,note:A,index:i+1}}return null},[m,S,u.bookingTime]),C.useMemo(()=>{const i=d?.shipmentTracking?.travelDtos||[];for(let r=i.length-1;r>=0;r--){const y=(i[r]?.status||"").toUpperCase();if(y.includes("IN-BAG-INSCAN"))return"Bag In";if(y.includes("BAGGED"))return"Bagged"}return null},[d]);const wt=!!(d?.shipmentTracking&&(d?.shipmentTracking?.bookingInfoDto||Array.isArray(d?.shipmentTracking?.route_info)&&d?.shipmentTracking?.route_info.length||Array.isArray(d?.shipmentTracking?.travelDtos)&&d?.shipmentTracking?.travelDtos.length)),q=!!f,kt=()=>{const i=sessionStorage.getItem("token")||localStorage.getItem("token")||"",r=sessionStorage.getItem("email")||localStorage.getItem("email")||"",y=sessionStorage.getItem("userId")||localStorage.getItem("userId")||"",w=sessionStorage.getItem("premiseId")||sessionStorage.getItem("smcs-premise-id")||"",b=new URLSearchParams;b.append("source","HUBOPS"),i&&b.append("token",i),r&&b.append("email",r),y&&b.append("userId",y),w&&b.append("premiseId",w);const F=window.location.hostname.includes("qa")?"https://qasupport.innofulfill.com":"https://support.innofulfill.com";window.open(`${F}?${b.toString()}`,"_blank")};return I&&wt?e.jsx(h.Spin,{spinning:I&&!d,indicator:e.jsx("img",{src:Ce,style:{height:"100px",width:"100px"}}),children:e.jsx("div",{className:"shipment-details-page",children:e.jsx("div",{className:"bag-empty",children:e.jsxs(h.Card,{className:"ho-card bag-empty__card",children:[e.jsx("div",{className:"ho-section-title bag-empty__title",children:e.jsx("span",{className:"ho-title",children:"Details Not Found"})}),e.jsxs("div",{className:"bag-empty__text",children:["No details found for the provided AWB number ",U,". Please check the AWB number and try again."]})]})})})}):e.jsx(h.Spin,{spinning:I&&!d,indicator:e.jsx("img",{src:Ce,style:{height:"100px",width:"100px"}}),children:e.jsx("div",{className:"shipment-details-page",children:e.jsxs(h.Row,{gutter:[16,16],className:"ho-row-equal",children:[e.jsx(h.Col,{xs:24,lg:10,children:e.jsxs(h.Card,{className:"ho-card ho-card--equal",style:{height:"644px"},bodyStyle:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",padding:"12px"},children:[e.jsxs("div",{className:"ho-section-title",style:{marginTop:"10px"},children:[e.jsxs("div",{className:"ho-title-left",children:[u.parentAwbNumber?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",background:"#ECFDF3",padding:"6px 12px",borderRadius:"8px",cursor:"pointer",color:"#027A48",fontWeight:500,fontSize:"14px"},onClick:()=>L(`/shipment-details-ui?awb=${encodeURIComponent(u.parentAwbNumber)}&endpoint=${encodeURIComponent(H)}`),children:[e.jsx(ft,{}),u.parentAwbNumber]}):e.jsxs(e.Fragment,{children:[e.jsx("img",{src:yt,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Shipment Info"})]}),u.bagId!=="—"&&e.jsx(h.Badge,{status:"processing",text:e.jsx("span",{className:"ho-badge-text",children:u.bagId})})]}),e.jsxs("div",{className:"ho-title-right",children:[e.jsxs("div",{className:"ho-chip",children:[e.jsx("span",{className:"ho-chip__label",children:"Booked At:"}),e.jsx("span",{className:"ho-chip__value",children:W(u.bookingTime)})]}),e.jsxs("div",{className:"ho-chip ho-chip--ticket",onClick:kt,style:{cursor:"pointer"},children:[e.jsx("img",{src:As,alt:""}),e.jsx("span",{className:"ho-chip__label",children:"Raise Ticket"})]})]})]}),e.jsxs("div",{className:"ho-scrollable-content",children:[e.jsx("div",{className:"ho-subheader",children:e.jsx("div",{className:"ho-subheader-left-row",style:{width:"100%"},children:(()=>{const i=c&&e.jsx(h.Tag,{className:"ho-badge",style:{...c?.replace(/_/g," ")?.toUpperCase()==="DELIVERED"?{background:"#e9fff1",color:"#027A48",border:"1px solid #cfeede",fontWeight:600,fontFamily:"Roboto"}:c?.replace(/_/g," ")?.toUpperCase()==="UNDELIVERED"?{background:"#ffecec",color:"#d64545",border:"1px solid #ffd5d5",fontWeight:600,fontFamily:"Roboto"}:{},flexShrink:0},children:c?.replace(/_/g," ")?.toUpperCase()}),r=e.jsx(h.Tag,{className:"ho-badge",style:{...u.isRTO?{background:"#e3250b",color:"#f7f3f2",border:"1px solid #cfeede",fontWeight:600,fontFamily:"Roboto"}:u.status.toUpperCase()==="UNDELIVERED"?{background:"#ffecec",color:"#d64545",border:"1px solid #ffd5d5",fontWeight:600,fontFamily:"Roboto"}:{},flexShrink:0},children:u.isRTO?"RETURN":"FORWARD"}),y=u.isMCN?e.jsx(h.Tag,{color:"#FFD32C",className:"ho-chip",style:{color:"#FFFFFF",fontWeight:600,flexShrink:0},children:"3PL"}):null,w=u?.shipmentType&&u.shipmentType!=="—"?e.jsx(h.Tag,{color:"#E9F2FF",className:"ho-chip",style:{flexShrink:0,marginLeft:"auto"},children:N(u.shipmentType)}):null,b={display:"flex",alignItems:"center",flexWrap:"nowrap",whiteSpace:"nowrap",width:"100%",gap:"1px"};return u.parentAwbNumber?e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px",width:"100%"},children:[e.jsx("span",{style:{fontSize:"16px",color:"#667085",fontWeight:400},children:"Child Shipment number"}),e.jsxs("div",{style:b,children:[e.jsx("span",{className:"ho-eway-value-bold",style:{fontSize:"18px",flex:"0 0 auto",marginRight:"8px"},children:u.shipmentNumber}),i,r,y,w]})]}):e.jsxs("div",{style:b,children:[e.jsx("span",{className:"ho-eway-value-bold",style:{flex:"0 0 auto",marginRight:"8px"},children:u.shipmentNumber}),i,r,y,w]})})()})}),(he||_)&&e.jsxs("div",{style:{marginTop:"12px",marginBottom:"16px",padding:"8px 16px",background:"#FFFFFF",border:"1px solid #EAECF0",borderRadius:"10px",boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.05)",display:"inline-flex",alignItems:"center",gap:"8px",width:"fit-content"},children:[e.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",background:"#0F8A41",animation:"pulse 2s infinite"}}),e.jsx("span",{style:{fontSize:"14px",color:"#667085",fontWeight:500},children:"Next Location :"}),e.jsx("span",{style:{fontSize:"15px",color:"#101828",fontWeight:600},children:N(he||_)})]}),e.jsxs("div",{className:"ho-subheader__route",children:[e.jsxs("span",{className:"ho-kv-stack ho-route-dest",children:[e.jsx("span",{className:"ho-stat__label",children:"Source"}),e.jsx("span",{className:"ho-stat__value",children:N(u.sourceHubName)+","+N(u.sourceCity)})]}),e.jsxs("span",{className:"ho-kv-stack ho-route-dest",children:[e.jsx("span",{className:"ho-stat__label",children:"Destination"}),e.jsx("span",{className:"ho-stat__value",children:N(u.destinationHubName)+","+N(u.destinationCity)})]})]}),e.jsxs("div",{style:{marginTop:"16px",padding:"16px",background:"#F8F9FA",borderRadius:"12px",display:"flex",alignItems:"center",width:"100%"},children:[e.jsxs("div",{style:{flex:1,textAlign:"center"},children:[e.jsxs(h.Tag,{color:"#DFF5E1",style:{padding:"4px 12px",borderRadius:"8px",color:"#0F8A41",fontWeight:600,display:"inline-flex",alignItems:"center",gap:"6px"},children:["● Planned EDD",e.jsx(h.Tooltip,{overlayInnerStyle:{background:"#101828",borderRadius:"8px",padding:"8px 12px"},title:e.jsxs("div",{style:{fontSize:"12px",color:"#fff",lineHeight:"1.6",fontFamily:"'SF Pro Rounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontWeight:500,letterSpacing:"0%"},children:[e.jsxs("div",{children:["First Mile : ",v?.plannedFm??"—"]}),e.jsxs("div",{style:{marginTop:"2px"},children:["Middle Mile : ",v?.plannedMm??"—"]}),e.jsxs("div",{style:{marginTop:"2px"},children:["Last Mile : ",v?.plannedLm??"—"]})]}),children:e.jsx(He,{style:{fontSize:"14px",cursor:"pointer"}})})]}),e.jsx("div",{style:{marginTop:"6px",fontSize:"14px",color:"#555"},children:v?.plannedEdd?ne(v?.plannedEdd):ne(u.estimatedDeliveryDate)})]}),e.jsx("div",{style:{height:"40px",width:"1px",background:"#DDD"}}),e.jsxs("div",{style:{flex:1,textAlign:"center"},children:[e.jsxs(h.Tag,{color:"#FFE8D6",style:{padding:"4px 12px",borderRadius:"8px",color:"#D96A1B",fontWeight:600,display:"inline-flex",alignItems:"center",gap:"6px"},children:["● Revised EDD",e.jsx(h.Tooltip,{overlayInnerStyle:{background:"#101828",borderRadius:"8px",padding:"8px 12px"},title:e.jsxs("div",{style:{fontSize:"12px",color:"#fff",lineHeight:"1.6",fontFamily:"'SF Pro Rounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontWeight:500,letterSpacing:"0%"},children:[e.jsxs("div",{children:["First Mile : ",v?.revisedFm??"—"]}),e.jsxs("div",{style:{marginTop:"2px"},children:["Middle Mile : ",v?.revisedMm??"—"]}),e.jsxs("div",{style:{marginTop:"2px"},children:["Last Mile : ",v?.revisedLm??"—"]})]}),children:e.jsx(He,{style:{fontSize:"14px",cursor:"pointer"}})})]}),e.jsx("div",{style:{marginTop:"6px",fontSize:"14px",color:"#555"},children:v?.revisedEdd?ne(v?.revisedEdd):ne(u.revisedEstimatedDeliveryDate)})]}),e.jsx("div",{style:{height:"40px",width:"1px",background:"#DDD"}}),e.jsxs("div",{style:{flex:1,textAlign:"center"},children:[e.jsx(h.Tag,{color:"#E8F2FF",style:{padding:"4px 12px",borderRadius:"8px",color:"#1A6FDB",fontWeight:600},children:"● Delivered Date"}),e.jsx("div",{style:{marginTop:"6px",fontSize:"14px",color:"#555"},children:ne(u.actualDeliveryDate)})]})]}),e.jsx("div",{style:{height:"10px"}}),e.jsx("div",{className:"ho-box ho-box--flush",children:e.jsxs("div",{className:"ho-stats",children:[e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Booking Type"}),e.jsx("div",{className:"ho-stat__value",children:N(u.bookingType)})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Service Type"}),e.jsx("div",{className:"ho-stat__value",children:N(u.serviceType)})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"From PinCode"}),e.jsx("div",{className:"ho-stat__value",children:`${u.fromPincode}`})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"To PinCode"}),e.jsx("div",{className:"ho-stat__value",children:`${u.receiverPincode}`})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"3PL / Partner"}),e.jsx("div",{className:"ho-stat__value",children:`${u.awb?u.awb:" "} — ${u.partner?N(u.partner):" "}`})]})]})}),d?.shipmentTracking?.childInfoDto&&d?.shipmentTracking?.childInfoDto.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ho-box ho-box--flush",style:{paddingTop:"0px"},children:[e.jsxs("div",{className:"ho-subtitle ho-subtitle--primary",style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"4px",marginBottom:"0px"},children:[e.jsxs("span",{className:"ho-title-left",children:[e.jsx("img",{src:nt,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"Child Shipment Info"})]}),e.jsxs(h.Tag,{color:"#F0F9FF",className:"ho-chip",style:{display:"flex",cursor:"pointer",alignItems:"center",gap:"4px",paddingTop:"0px"},onClick:()=>D(!0),children:[d?.shipmentTracking?.childInfoDto.length+" Child Shipments",e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:"rotate(180deg)"},children:e.jsx("path",{d:"M14.9987 6.00071H3.13972L6.76939 1.64111C6.93912 1.43691 7.02077 1.17365 6.99639 0.909247C6.97202 0.644844 6.8436 0.400955 6.63941 0.231232C6.43521 0.0615082 6.17195 -0.0201464 5.90755 0.00423112C5.64314 0.0286087 5.39925 0.157022 5.22953 0.36122L0.229979 6.36068C0.196343 6.4084 0.166264 6.45853 0.139987 6.51067C0.139987 6.56066 0.139988 6.59066 0.0699939 6.64066C0.0246714 6.75531 0.000941037 6.87735 0 7.00063C0.000941037 7.1239 0.0246714 7.24594 0.0699939 7.36059C0.0699939 7.41059 0.0699936 7.44059 0.139987 7.49058C0.166264 7.54272 0.196343 7.59285 0.229979 7.64057L5.22953 13.64C5.32354 13.7529 5.44127 13.8437 5.57435 13.9059C5.70742 13.9681 5.85256 14.0002 5.99946 14C6.23309 14.0005 6.45951 13.9191 6.63941 13.77C6.74065 13.6861 6.82435 13.583 6.88569 13.4666C6.94704 13.3503 6.98483 13.223 6.99691 13.0921C7.00898 12.9611 6.9951 12.829 6.95606 12.7034C6.91702 12.5778 6.85359 12.4612 6.76939 12.3601L3.13972 8.00054H14.9987C15.2638 8.00054 15.5182 7.89519 15.7057 7.70767C15.8932 7.52015 15.9986 7.26582 15.9986 7.00063C15.9986 6.73543 15.8932 6.4811 15.7057 6.29358C15.5182 6.10606 15.2638 6.00071 14.9987 6.00071Z",fill:"#026AA2"})})]})]}),e.jsx("div",{className:"ho-table-responsive-wrapper",children:e.jsxs("table",{className:"ho-eway-table",style:{borderCollapse:"collapse",borderSpacing:"0",marginTop:"0px",width:"100%"},children:[e.jsx("thead",{style:{borderBottom:"none",padding:"0",margin:"0"},children:e.jsxs("tr",{style:{border:"none",padding:"0",margin:"0"},children:[e.jsx("th",{style:{width:"33.33%",border:"none",padding:"8px 0 8px 10px",textAlign:"left"},children:"AWB Number"}),e.jsx("th",{style:{width:"33.33%",border:"none",padding:"8px 0",textAlign:"left"},children:"Current Hub"}),e.jsx("th",{style:{width:"33.33%",border:"none",padding:"8px 0",textAlign:"left"},children:"Status"})]})}),e.jsx("tbody",{style:{padding:"0",margin:"0"},children:(X?d?.shipmentTracking?.childInfoDto:d?.shipmentTracking?.childInfoDto.slice(0,1))?.map((i,r)=>e.jsxs("tr",{style:{padding:"0",margin:"0"},children:[e.jsx("td",{style:{padding:"8px 0 8px 10px",margin:"0"},className:"ho-table-value",children:e.jsx("span",{className:"ho-link-underline",onClick:()=>L(`/shipment-details-ui?awb=${encodeURIComponent(i.awbNumber)}`,{replace:!0,state:{parentAwb:U}}),children:i.awbNumber})}),e.jsx("td",{className:"ho-table-value",style:{padding:"8px 0",margin:"0",paddingRight:"20px"},children:N(i.currentHub||"—")}),e.jsx("td",{className:"ho-table-value",style:{padding:"8px 0",margin:"0"},children:e.jsx(h.Tag,{className:"ho-badge ho-badge--blue ho-table-value",children:N(i.status||"—")})})]},r))})]})})]}),e.jsx("div",{style:{marginBottom:"16px"}})]}),e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsxs("div",{className:"ho-subtitle ho-subtitle--primary",style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"4px",marginBottom:"0px"},children:[e.jsxs("span",{className:"ho-title-left",style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("img",{src:st,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"E-way Bill Info"})]}),d?.shipmentTracking?.ewayInfo?.length>0&&e.jsxs(h.Tag,{color:"#F0F9FF",className:"ho-chip",style:{display:"flex",cursor:"pointer",alignItems:"center",gap:"4px",paddingTop:"0px"},onClick:()=>je(!0),children:[d?.shipmentTracking?.ewayInfo?.length+" E-way Bills",e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:"rotate(180deg)"},children:e.jsx("path",{d:"M14.9987 6.00071H3.13972L6.76939 1.64111C6.93912 1.43691 7.02077 1.17365 6.99639 0.909247C6.97202 0.644844 6.8436 0.400955 6.63941 0.231232C6.43521 0.0615082 6.17195 -0.0201464 5.90755 0.00423112C5.64314 0.0286087 5.39925 0.157022 5.22953 0.36122L0.229979 6.36068C0.196343 6.4084 0.166264 6.45853 0.139987 6.51067C0.139987 6.56066 0.139988 6.59066 0.0699939 6.64066C0.0246714 6.75531 0.000941037 6.87735 0 7.00063C0.000941037 7.1239 0.0246714 7.24594 0.0699939 7.36059C0.0699939 7.41059 0.0699936 7.44059 0.139987 7.49058C0.166264 7.54272 0.196343 7.59285 0.229979 7.64057L5.22953 13.64C5.32354 13.7529 5.44127 13.8437 5.57435 13.9059C5.70742 13.9681 5.85256 14.0002 5.99946 14C6.23309 14.0005 6.45951 13.9191 6.63941 13.77C6.74065 13.6861 6.82435 13.583 6.88569 13.4666C6.94704 13.3503 6.98483 13.223 6.99691 13.0921C7.00898 12.9611 6.9951 12.829 6.95606 12.7034C6.91702 12.5778 6.85359 12.4612 6.76939 12.3601L3.13972 8.00054H14.9987C15.2638 8.00054 15.5182 7.89519 15.7057 7.70767C15.8932 7.52015 15.9986 7.26582 15.9986 7.00063C15.9986 6.73543 15.8932 6.4811 15.7057 6.29358C15.5182 6.10606 15.2638 6.00071 14.9987 6.00071Z",fill:"#026AA2"})})]})]}),(!d?.shipmentTracking?.ewayInfo||d?.shipmentTracking?.ewayInfo.length===0)&&e.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"80px",fontFamily:"Roboto",fontSize:"14px",color:"#6B7280",width:"100%"},children:"No E-Way Bill Data Available"}),d?.shipmentTracking?.ewayInfo?.length>0&&e.jsx(e.Fragment,{children:e.jsx("div",{className:"ho-table-responsive-wrapper",children:e.jsxs("table",{className:"ho-eway-table",style:{borderCollapse:"collapse",width:"100%"},children:[e.jsx("thead",{style:{borderBottom:"none"},children:e.jsxs("tr",{style:{border:"none"},children:[e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0 8px 10px"},children:"E-Way Bill No"}),e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0"},children:"Created"}),e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0"},children:"Updated"}),e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0"},children:"Expiry Date"})]})}),e.jsx("tbody",{children:d?.shipmentTracking?.ewayInfo?.slice(0,1)?.map((i,r)=>e.jsxs("tr",{children:[e.jsx("td",{className:"ho-stat__value",style:{padding:"8px 0 8px 10px"},children:i.ewaybill_no||"—"}),e.jsx("td",{className:"ho-stat__value",children:W(i.eway_bill_crt_date)||"—"}),e.jsx("td",{className:"ho-stat__value",children:W(i.update_date||"-")}),e.jsx("td",{className:"ho-stat__value",children:W(i.ewb_bill_exp_date)||"—"})]},r))})]})})})]}),e.jsx(h.Modal,{title:e.jsx("span",{style:{fontFamily:"Roboto",fontWeight:500,fontSize:"16px",color:"#003371"},children:"Child Shipments"}),open:G,footer:null,onCancel:()=>D(!1),width:800,children:e.jsxs("table",{className:"ho-eway-table",style:{width:"100%"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"AWB Number"}),e.jsx("th",{children:"Current Hub"}),e.jsx("th",{children:"Status"})]})}),e.jsx("tbody",{children:d?.shipmentTracking?.childInfoDto?.map((i,r)=>e.jsxs("tr",{children:[e.jsx("td",{className:"ho-table-value",children:e.jsx("span",{className:"ho-link-underline",onClick:()=>{L(`/shipment-details-ui?awb=${encodeURIComponent(i.awbNumber)}`,{replace:!0,state:{parentAwb:U}}),D(!1)},style:{cursor:"pointer"},children:i.awbNumber})}),e.jsx("td",{className:"ho-table-value",children:N(i.currentHub||"—")}),e.jsx("td",{className:"ho-table-value",children:e.jsx(h.Tag,{className:"ho-badge ho-badge--blue",children:N(i.status||"—")})})]},r))})]})}),e.jsx(h.Modal,{title:e.jsx("span",{style:{fontFamily:"Roboto",fontWeight:500,fontSize:"16px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:"Route"}),open:Ne,onCancel:()=>Y(!1),footer:null,width:450,children:e.jsx("div",{className:"ho-route",style:{maxHeight:"70vh",overflowY:"auto",paddingRight:"10px"},children:T.length===0?e.jsx("div",{className:"ho-route__empty",children:"Route not available"}):T.map((i,r)=>e.jsxs("div",{className:"ho-route__row",children:[e.jsx("div",{className:`ho-route__node ho-route__node--${i.type}`,children:r===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:oe,alt:""})}):i.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",r]})}),e.jsx("div",{className:"ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-table-value",children:N(i.hub)}),i.type==="source"&&e.jsx("span",{className:"ho-pill ho-pill--source",children:"Source Hub"}),i.type==="to"&&e.jsx("span",{className:"ho-pill ho-pill--to",children:"To Hub"})]})})]},r))})}),e.jsx(h.Modal,{title:e.jsx("span",{style:{fontFamily:"Roboto",fontWeight:500,fontSize:"16px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:"E-way Bill Info"}),open:le,footer:null,onCancel:()=>je(!1),width:900,children:e.jsxs("table",{className:"ho-eway-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"E-Way Bill No"}),e.jsx("th",{children:"Created"}),e.jsx("th",{children:"Updated"}),e.jsx("th",{children:"Expiry Date"})]})}),e.jsx("tbody",{children:d?.shipmentTracking?.ewayInfo?.map((i,r)=>e.jsxs("tr",{children:[e.jsx("td",{className:"ho-stat__value",children:i.ewaybill_no||"—"}),e.jsx("td",{className:"ho-stat__value",children:W(i.eway_bill_crt_date)||"—"}),e.jsx("td",{className:"ho-stat__value",children:W(i.update_date||"-")}),e.jsx("td",{className:"ho-stat__value",children:W(i.ewb_bill_exp_date)||"—"})]},r))})]})}),e.jsxs("div",{className:"ho-grid ho-grid--2",children:[e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsx("div",{className:"ho-subtitle ho-subtitle--primary",children:e.jsxs("span",{className:"ho-title-left",children:[e.jsx("img",{src:st,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"Sender / Receiver Info"})]})}),e.jsxs("div",{className:"ho-grid",children:[e.jsx(ae,{label:"S - Name :",value:N(u.sender.name)}),e.jsx(ae,{label:"R - Name :",value:N(u.receiver.name)})]})]}),e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsx("div",{className:"ho-subtitle ho-subtitle--primary",children:e.jsxs("span",{className:"ho-title-left",children:[e.jsx("img",{src:nt,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"Package Information"})]})}),e.jsxs("div",{className:"ho-grid",children:[e.jsx(ae,{label:"Weight :",value:u.pkg.weight}),e.jsx(ae,{label:"Dimensions:",value:u.pkg.dimensions}),e.jsx(ae,{label:"Volumetric Wt(Kg) :",value:u.pkg.volumetric})]})]})]})]})]})}),e.jsx(h.Col,{xs:24,lg:14,children:e.jsxs(h.Row,{gutter:[16,16],children:[e.jsx(h.Col,{xs:24,lg:12,children:e.jsxs(h.Card,{className:"ho-card ho-card--equal",style:{height:q?"484px":"644px"},children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:ze,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Route"})]})}),e.jsx("div",{ref:R,className:`ho-route ${T.length===0?"ho-route--empty":""}`,style:T.length===0?{display:"flex",alignItems:"center",justifyContent:"center",minHeight:q?"400px":"560px",textAlign:"center"}:{maxHeight:q?"420px":"580px",overflow:"hidden",position:"relative"},children:T.length===0?e.jsx("span",{style:{color:"#6B7280",fontSize:"14px",fontFamily:"Roboto"},children:"Route not available"}):e.jsxs(e.Fragment,{children:[Q?T.slice(0,5).map((i,r)=>e.jsxs("div",{className:"ho-route__row",children:[e.jsx("div",{className:`ho-route__node ho-route__node--${i.type}`,children:r===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:oe,alt:"",className:"ho-route__truck"})}):i.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",r]})}),e.jsx("div",{className:"ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-table-value",children:N(i.hub)}),i.type==="source"&&e.jsx("span",{className:"ho-pill ho-pill--source",children:"Source Hub"}),i.type==="to"&&e.jsx("span",{className:"ho-pill ho-pill--to",children:"To Hub"})]})})]},r)):T.map((i,r)=>e.jsxs("div",{className:"ho-route__row",children:[e.jsx("div",{className:`ho-route__node ho-route__node--${i.type}`,children:r===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:oe,alt:"",className:"ho-route__truck"})}):i.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",r]})}),e.jsx("div",{className:"ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-table-value",children:N(i.hub)}),i.type==="source"&&e.jsx("span",{className:"ho-pill ho-pill--source",children:"Source Hub"}),i.type==="to"&&e.jsx("span",{className:"ho-pill ho-pill--to",children:"To Hub"})]})})]},r)),Q&&e.jsxs("div",{className:"ho-route__more",onClick:()=>Y(!0),children:[e.jsx("span",{className:"ho-route__more-text",children:"View More"}),e.jsx("span",{className:"ho-route__more-caret",children:"▾"})]})]})})]})}),e.jsx(h.Col,{xs:24,lg:12,children:e.jsxs(h.Card,{className:"ho-card ho-card--equal ho-audit-outer",style:{height:q?"484px":"644px"},bodyStyle:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[e.jsxs("div",{className:"ho-section-title",children:[e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:ze,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Audit Info"})]}),S.length>0&&e.jsxs(h.Tag,{color:"#E9F2FF",className:"ho-chip",children:[S.length," Audit",S.length!==1?"s":""]})]}),e.jsxs("div",{className:"ho-list",style:{flex:1,display:"flex",flexDirection:"column",gap:"12px",overflow:"hidden"},children:[!S.length&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"auto",textAlign:"center",width:"100%",fontFamily:"Roboto",fontSize:"14px",color:"#6B7280"},children:"No audit info available"}),S.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"ho-list__item",onClick:()=>x(m==="audit-master"?null:"audit-master"),children:[e.jsxs("span",{className:"ho-strong",children:["Weight(",S.length,")"]}),e.jsx("span",{className:`ho-list__chevron ${m==="audit-master"?"ho-open":""}`,children:"▾"})]}),m==="audit-master"&&e.jsx("div",{className:"ho-expand-block",style:{flex:1,overflowY:"auto",maxHeight:"none",display:"flex",flexDirection:"column",gap:"10px"},children:S.map((i,r)=>e.jsxs(h.Card,{className:"ho-subcard ho-mt-10 ho-audit-inner",children:[e.jsxs("div",{className:"ho-audit-header-grid",children:[e.jsxs("div",{className:"ho-kv-stack",children:[e.jsx("span",{className:"ho-stat__label",children:"Audited By"}),e.jsx(h.Tooltip,{title:N(i.auditMethod||"—"),children:e.jsx("span",{className:"ho-stat__value--audit",children:N(i.auditMethod||"—")})})]}),e.jsxs("div",{className:"ho-kv-stack",children:[e.jsx("span",{className:"ho-stat__label",children:"Hub Name"}),e.jsx(h.Tooltip,{title:N(i.auditedHubName||"—"),children:e.jsx("span",{className:"ho-stat__value--audit",children:i.auditedHubName&&i.auditedHubName.length>7?N(i.auditedHubName).substring(0,7)+"...":N(i.auditedHubName||"—")})})]}),e.jsxs("div",{className:"ho-kv-stack",children:[e.jsx("span",{className:"ho-stat__label",children:"Audited Date"}),e.jsx("span",{className:"ho-stat__value--audit",children:i.auditTimestamp?i.auditTimestamp.replace(" "," | "):"—"})]})]}),e.jsx("div",{style:{height:"12px"}}),e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsx("div",{className:"ho-subtitle-audit",children:"Audited Value"}),e.jsxs("div",{className:"ho-grid",children:[e.jsx(Ie,{label:"Actual",value:i.auditedWeight||"—",isAudit:!0,icon:js},`ah-${r}`),e.jsx(Ie,{label:"Volumetric",value:i.volumetricAuditedValue||"—",isAudit:!0,icon:ys},`sh-${r}`),e.jsx(Ie,{label:"LWH(cm)",value:i.auditedLength+","+i.auditedWidth+","+i.auditedHeight||"—",icon:Ns},`sh-${r}`)]})]}),e.jsxs("div",{className:"ho-note",children:[e.jsx("span",{style:{color:"#000",fontWeight:600},children:"Note:"})," ","Audited actual weight is"," ",i.weightDiff!=null?`${i.weightDiff>=0?"higher":"lower"} by ${Math.abs(i.weightDiff).toFixed(2)} %.`:"—"]})]},`audit-card-${r}`))})]})]})]})}),q&&e.jsx(h.Col,{xs:24,lg:24,children:e.jsxs(h.Card,{className:"ho-card ho-card--equal",style:{height:"136px",borderRadius:"24px",width:"100%"},children:[q&&e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"18px",fontWeight:700,color:"#003371"},children:f?.ticketNumber||"N/A"}),e.jsxs("div",{style:{marginTop:"8px",fontSize:"14px",color:"#344054"},children:[e.jsx("span",{style:{color:"#667085"},children:"Title : "}),e.jsx("span",{style:{fontWeight:600,color:"#003371"},children:f?.title||"—"})]})]}),e.jsxs(h.Tag,{color:"#FFF8EB",style:{color:"#B54708",border:"1px solid #FEDF89",borderRadius:"16px",padding:"4px 12px",fontWeight:600,display:"flex",alignItems:"center",gap:"6px",fontSize:"12px"},children:[e.jsx("span",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:"#F79009"}}),f?.status?.name||"In Progress"]})]}),q&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{margin:"12px 0",borderBottom:"1px dashed #D0D5DD"}}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px",alignItems:"center",color:"#667085",fontSize:"13px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsx(jt,{})," Reported By ",N(f?.reportedBy||"—")]}),f?.reportedDate&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#D0D5DD"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsx(Ct,{})," ",f.reportedDate]})]}),e.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#D0D5DD"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsx(bt,{})," Assigned To ",f?.assignedTo?N(f.assignedTo):"—"]})]})]})]})})]})}),e.jsx(h.Col,{span:24,children:e.jsxs(h.Card,{className:"ho-card",children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:Nt,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Travel Info"})]})}),e.jsx(h.Table,{className:"ho-table",columns:pe,dataSource:ue,pagination:!1,scroll:{x:1e3}})]})})]})})})}const at="data:image/svg+xml,%3csvg%20width='16'%20height='14'%20viewBox='0%200%2016%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.9987%206.00071H3.13972L6.76939%201.64111C6.93912%201.43691%207.02077%201.17365%206.99639%200.909247C6.97202%200.644844%206.8436%200.400955%206.63941%200.231232C6.43521%200.0615082%206.17195%20-0.0201464%205.90755%200.00423112C5.64314%200.0286087%205.39925%200.157022%205.22953%200.36122L0.229979%206.36068C0.196343%206.4084%200.166264%206.45853%200.139987%206.51067C0.139987%206.56066%200.139988%206.59066%200.0699939%206.64066C0.0246714%206.75531%200.000941037%206.87735%200%207.00063C0.000941037%207.1239%200.0246714%207.24594%200.0699939%207.36059C0.0699939%207.41059%200.0699936%207.44059%200.139987%207.49058C0.166264%207.54272%200.196343%207.59285%200.229979%207.64057L5.22953%2013.64C5.32354%2013.7529%205.44127%2013.8437%205.57435%2013.9059C5.70742%2013.9681%205.85256%2014.0002%205.99946%2014C6.23309%2014.0005%206.45951%2013.9191%206.63941%2013.77C6.74065%2013.6861%206.82435%2013.583%206.88569%2013.4666C6.94704%2013.3503%206.98483%2013.223%206.99691%2013.0921C7.00898%2012.9611%206.9951%2012.829%206.95606%2012.7034C6.91702%2012.5778%206.85359%2012.4612%206.76939%2012.3601L3.13972%208.00054H14.9987C15.2638%208.00054%2015.5182%207.89519%2015.7057%207.70767C15.8932%207.52015%2015.9986%207.26582%2015.9986%207.00063C15.9986%206.73543%2015.8932%206.4811%2015.7057%206.29358C15.5182%206.10606%2015.2638%206.00071%2014.9987%206.00071Z'%20fill='%23231F20'/%3e%3c/svg%3e",ws="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.6654%209.99967V12.5923C12.6654%2014.0755%2012.175%2014.6663%2010.5913%2014.6663H5.4061C3.92281%2014.6663%203.33203%2014.1759%203.33203%2012.5923V9.99967C3.33203%207.42234%205.42137%205.33301%207.9987%205.33301C10.576%205.33301%2012.6654%207.42234%2012.6654%209.99967Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.6654%209.99967C10.6654%208.52694%209.47143%207.33301%207.9987%207.33301C6.52594%207.33301%205.33203%208.52694%205.33203%209.99967'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M8%2011.3333L8.66667%2010'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.8762%203.33301H5.12634C4.53728%203.33301%204.24274%203.33301%203.98358%203.23165C3.89749%203.19798%203.81514%203.15633%203.73774%203.10733C3.50472%202.95979%203.34135%202.72823%203.0146%202.26511C2.75994%201.90417%202.63261%201.7237%202.6765%201.57614C2.6904%201.52945%202.7149%201.48619%202.7483%201.44937C2.8539%201.33301%203.08344%201.33301%203.54253%201.33301H12.4601C12.9192%201.33301%2013.1487%201.33301%2013.2543%201.44937C13.2877%201.48619%2013.3122%201.52945%2013.3261%201.57614C13.37%201.7237%2013.2426%201.90417%2012.988%202.26511C12.6612%202.72823%2012.4979%202.9598%2012.2648%203.10733C12.1874%203.15633%2012.1051%203.19798%2012.019%203.23165C11.7598%203.33301%2011.4653%203.33301%2010.8762%203.33301Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M9.33464%205.33301V3.33301M6.66797%205.33301V3.33301'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3c/svg%3e",ks="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.66699%205.33333L8.00033%202.66667L13.3337%205.33333V10.6667L8.00033%2013.3333L2.66699%2010.6667V5.33333Z'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8%206V10'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.667%207.33333V9.33333'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M5.33301%207.33301V9.33301'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3c/svg%3e";var Se={};function M(s){if(s==null)return"";const t=String(s).replace(/[_-]+/g," ").replace(/\s+/g," ").trim().toLowerCase();return t?t.replace(/\b\w/g,n=>n.toUpperCase()):""}function vt(s){if(!s)return"—";const t=new Date(s);if(isNaN(t.getTime()))return"—";const n=a=>String(a).padStart(2,"0");return n(t.getDate())+"-"+n(t.getMonth()+1)+"-"+t.getFullYear()+" "+n(t.getHours())+":"+n(t.getMinutes())+":"+n(t.getSeconds())}const Ms=[{title:"Date and Time",dataIndex:"time",key:"time",render:s=>e.jsx("span",{className:"ho-nowrap",children:s?vt(s):"—"})},{title:"Location",dataIndex:"location",key:"location",render:s=>s?M(s):"—"},{title:"Process",dataIndex:"process",key:"process",render:(s,t)=>{const n=(s||"").toString().toUpperCase(),o=["REMOVED_FROM_BAG","REMOVED_FROM_LCR","ATTEMPTED","MIS_ROUTED","UNDELIVERED"].includes(n),l=n==="OUT_SCAN_TO_CP"||n==="IN_BAG_OUT_CP",p=t?.toPremisename&&t.toPremisename!=="-"?M(t.toPremisename):"",m=l?`${M(s)} → ${p}`:M(s),x=o?{color:"#e14949",borderColor:"#ffd5d5",background:"#ffecec"}:{color:"#1f7a48",borderColor:"#cfeede",background:"#e9fff1"},d=`ho-tag ${o?"ho-tag--danger":"ho-tag--success"}`;return e.jsx(h.Tag,{style:x,className:d,children:m})}},{title:"User",dataIndex:"user",key:"user"},{title:"Exception",dataIndex:"exception",key:"exception",render:s=>s||"-"},{title:"Remark",dataIndex:"remark",key:"remark",render:(s,t)=>{if(!s)return"-";const n=(t?.process||"").toString().toUpperCase(),a=n.includes("OUTSCAN")&&n!=="HUB-OUTSCAN"||n==="SCHEDULED_FOR_TRIP",o=s.indexOf("LCR No:"),l=o>=0,p=l?s.slice(0,o):s,m=l?s.slice(o):"",x=l?(m.replace(/^[^:]*:\s*/i,"")||"").trim():"";return e.jsxs("span",{children:[p,l?e.jsxs(e.Fragment,{children:[e.jsx("strong",{className:"ho-remark-strong",children:"LCR No: "}),e.jsx("a",{className:"ho-link",onClick:()=>{sessionStorage.setItem("LCR_REPORT_RECORD",JSON.stringify({vehicle_lcr_id:x})),window.open(window.location.origin+"/lcr-report","_blank")},children:x})]}):null,a?e.jsx(h.Tooltip,{placement:"top",title:e.jsxs("div",{children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Co-loader:"})," ",M(t.coLoader||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Transport type:"})," ",M(t.transportType||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Flight Name:"})," ",t.flightName?M(t.flightName):"N/A"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Vehicle No:"})," ",t.vehicleNo||"—"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Driver Name:"})," ",M(t.driverName||"—")]})]}),children:e.jsx("span",{className:"ho-alert-dot"})}):null]})}}];function Is({endpoint:s,awbNumber:t,showBackArrow:n=!1,allowShipmentFallback:a=!0}){const o=fe.useNavigate(),l=fe.useLocation(),[p,m]=C.useState(null),[x,d]=C.useState(!1),[j,I]=C.useState(!1),[O,B]=C.useState(!1),L=C.useRef(Se.NODE_ENV==="development"),[X,$]=C.useState(!1),le=()=>{window.history.length<=1?window.close():o(-1)},Ne=new URLSearchParams(l.search).get("endpoint"),Y=s||Ne||Se.REACT_APP_TRACKING_ENDPOINT,G=C.useMemo(()=>{if(t)return t;const c=new URLSearchParams(l.search);return c.get("awb")||c.get("awbNumber")||""},[t,l.search]);C.useEffect(()=>{let c=!1;return Se.NODE_ENV==="development"&&L.current?(L.current=!1,()=>{c=!0}):((async()=>{try{if(d(!0),!G){m(null);return}const v=`${Y}?awbNumber=${encodeURIComponent(G)}`,u=await fetch(v);if(!u.ok)throw new Error("Request failed");const _=await u.json();c||m(_)}catch{c||m(null)}finally{c||d(!1)}})(),()=>{c=!0})},[Y,G]);const D=p?.baggingTracking,R=D?.baggingInfo,Q=D?.travelInfoDto||p?.shipmentTracking?.travelDtos||[],ce=R?.bag_barcode||Q.find(c=>(c?.bagBarCode||c?.bagbarcode)&&(c?.bagBarCode||c?.bagbarcode)!=="-")?.bagBarCode||"—",de=C.useMemo(()=>{try{return(Q||[]).filter(f=>(f?.status||"").toUpperCase()==="BAG_CREATED").map(f=>f?.date).filter(Boolean).sort()[0]||null}catch{return null}},[Q]),H=(()=>{const c=D?.route_info||p?.shipmentTracking?.route_info;if(!c)return[];const f=Array.isArray(c)?c.filter(u=>u&&u!=="null"&&u!==""):[];if(f.length===0)return[];const v=u=>{if(!u)return"";try{const _=u.split(" ")[0].split("-");return`${_[2]}-${_[1]}-${_[0]}`}catch{return u}};return f.map((u,_,T)=>({hub:u,date:v(D?.travelInfoDto?.[_]?.date),type:_===0?"source":_===T.length-1?"to":"transit"}))})(),U=c=>{const f=he[c];return f?f.bagIn&&!f.bagOut?"bag-chip--in":!f.bagIn&&f.bagOut?"bag-chip--out":"ho-badge--blue":"ho-badge--blue"},ye=(Array.isArray(Q)?Q:[]).map((c,f)=>{const v=c?.status||c?.process||c?.event||"-",u=(v||"").toUpperCase(),_=c?.premisename||c?.location||"",T=c?.topremisename||c?.toPremisename||c?.toPremiseName||"",ue=`Scheduled Outscan from ${M(_)} to ${M(T)}`,pe=c.lcrnum||c.lcrNum||c.lcr_no||c.lcrNo||"",ge=pe?`${ue} — LCR No: ${pe}`:ue;return{key:f,time:c?.date||"-",location:c?.premisename||c?.location||"-",toPremisename:c?.topremisename||c?.toPremiseName||"-",process:v,bag:c?.bagBarCode||"-",user:c?.user||"-",exception:c.exception||(c.isException,"-"),remark:u==="SCHEDULED_FOR_TRIP"?ge:c?.remarks||"-",coLoader:c?.coloader||"—",transportType:c?.travelby||"—",flightName:c?.flightnum||"N/A",vehicleNo:c?.vehiclenum||"—",driverName:c?.drivername||"—"}}),g=D?.bagShipmentNo||p?.shipmentTracking?.children?.map(c=>c.awbNumber)||[],he=C.useMemo(()=>{const c=D?.bagShipmentDetails||[],f={};return c.forEach(v=>{f[v.barcode]={bagIn:v.bagIn,bagOut:v.bagOut}}),f},[D]),S=!!(D&&(R||Array.isArray(D?.travelInfoDto)&&D.travelInfoDto.length||Array.isArray(D?.bagShipmentNo)&&D.bagShipmentNo.length));return p?.shipmentTracking&&p?.shipmentTracking?.bookingInfoDto,!x&&p?.baggingTracking===null&&a?e.jsx(At,{awbNumber:G,endpoint:Y,data:p}):!x&&!S?e.jsx(h.Spin,{spinning:x&&!p,indicator:e.jsx("img",{src:Ce,style:{height:"100px",width:"100px"}}),children:e.jsxs("div",{className:"bag-details-page",children:[e.jsxs("p",{className:"master-title-head",style:{marginBottom:"5px"},children:[n&&e.jsx("img",{src:at,onClick:le,className:"pointer"}),e.jsx("span",{children:"Bag Details"})]}),e.jsx("div",{className:"bag-empty",children:e.jsxs(h.Card,{className:"ho-card bag-empty__card",children:[e.jsx("div",{className:"ho-section-title bag-empty__title",children:e.jsx("span",{className:"ho-title",children:"Details Not Found"})}),e.jsxs("div",{className:"bag-empty__text",children:["No details found for the provided Bag number:",e.jsxs("strong",{children:[" ",G?.replace(/\+/g,"/")," "]}),e.jsx("br",{}),"Please check the Bag number and try again."]})]})})]})}):e.jsx(h.Spin,{spinning:x&&!p,indicator:e.jsx("img",{src:Ce,style:{height:"100px",width:"100px"}}),children:e.jsxs("div",{className:"bag-details-page",children:[e.jsxs("p",{className:"master-title-head",style:{marginBottom:"5px",marginTop:"6px"},children:[n&&e.jsx("img",{src:at,onClick:le,className:"pointer"}),e.jsx("span",{children:"Bag Details"})]}),e.jsxs(h.Row,{gutter:[16,16],children:[e.jsx(h.Col,{xs:24,lg:12,children:e.jsxs(h.Card,{className:"ho-card ho-card--equal",children:[e.jsxs("div",{className:"ho-section-title",children:[e.jsxs("div",{className:"ho-subheader__value",children:[e.jsxs("span",{className:"ho-kv-stack",children:[e.jsx("span",{className:"ho-muted",children:"Bag number"}),e.jsx("span",{className:"ho-strong",children:ce})]}),e.jsx(h.Tag,{className:"ho-badge ho-badge--blue",children:"Bag Created"})]}),e.jsx("div",{className:"ho-chip",children:e.jsxs("span",{className:"ho-chip__value",style:{display:"flex",gap:6,whiteSpace:"nowrap"},children:[e.jsx("span",{style:{color:"#344054"},children:"Bag Created:"}),e.jsx("span",{children:de?vt(de):"—"})]})})]}),e.jsx("div",{className:"ho-box ho-box--flush",children:e.jsxs("div",{className:"ho-stats",children:[e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Content Type"}),e.jsx("div",{className:"ho-stat__value",children:M(R?.contentType||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Type"}),e.jsx("div",{className:"ho-stat__value",children:M(R?.bagType||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Mode"}),e.jsx("div",{className:"ho-stat__value",children:M(R?.mode||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Product"}),e.jsx("div",{className:"ho-stat__value",children:M(R?.product||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:R?.cpId?"Destination CP":"Destination Hub"}),e.jsx("div",{className:"ho-stat__value",children:R?.cpId?M(R?.cpName||"—"):M(R?.destinationHubName||"—")})]})]})}),e.jsx("div",{className:"ho-box",children:e.jsxs("div",{className:"ho-grid",children:[e.jsxs("div",{className:"ho-metric",style:{display:"flex",justifyContent:"space-between"},children:[e.jsxs("span",{className:"ho-kv__label",children:[e.jsx("img",{src:ws,className:"ho-kv-icon",alt:""}),"Bag Weight :"]}),e.jsx("span",{className:"ho-kv__value",style:{color:"#027A48",fontWeight:600},children:R?.bagWeight??"—"})]}),e.jsxs("div",{className:"ho-metric",style:{display:"flex",justifyContent:"space-between"},children:[e.jsxs("span",{className:"ho-kv__label",children:[e.jsx("img",{src:ks,className:"ho-kv-icon",alt:""}),"Total Volumetric Weight :"]}),e.jsx("span",{className:"ho-kv__value",style:{color:"#027A48",fontWeight:600},children:R?.totalWeight??"—"})]})]})})]})}),e.jsx(h.Col,{xs:24,lg:12,children:e.jsxs(h.Row,{gutter:[16,16],children:[e.jsx(h.Col,{span:24,children:e.jsxs(h.Card,{className:"ho-card ho-card--equal",children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:ze,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Bag Route"})]})}),e.jsx("div",{className:`ho-route ${H.length===0?"ho-route--empty":""}`,children:H.length===0?e.jsx("div",{className:"ho-route__empty",children:"Bag Route not available"}):e.jsxs(e.Fragment,{children:[H.slice(0,4).map((c,f)=>e.jsxs("div",{className:`ho-route__row ${c.type==="to"?"ho-route__row--to":""}`,children:[e.jsx("div",{children:f===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--transit",children:e.jsx("img",{src:oe,alt:"",className:"ho-route__truck"})}):c.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",f]})}),e.jsx("div",{className:"ho-route__content",children:e.jsx("span",{className:"ho-route__title",children:M(c.hub)})})]},f)),H.length>4&&e.jsxs("div",{className:"ho-route__more",onClick:()=>B(!0),children:[e.jsx("span",{className:"ho-route__more-text",children:"View More"}),e.jsx("span",{className:"ho-route__more-caret",children:"▾"})]})]})}),e.jsx(h.Modal,{open:O,title:"Bag Route",footer:null,onCancel:()=>B(!1),width:420,children:e.jsx("div",{className:"shipment-route-modal",children:H.map((c,f)=>e.jsxs("div",{className:"shipment-route-item",children:[e.jsxs("div",{className:"shipment-route-timeline",children:[e.jsx("div",{className:`route-dot route-dot--circle ${c.type}`,children:c.type==="source"?e.jsx("img",{src:oe,alt:"Source Hub"}):c.type==="to"?e.jsx("img",{src:re,alt:"To Hub"}):e.jsxs("span",{className:"ho-route__tag--transit",children:["T",f]})}),f!==H.length-1&&e.jsx("div",{className:"route-line"})]}),e.jsx("div",{className:"shipment-route-content ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-route__title",children:M(c.hub)}),c.type==="source"&&e.jsx("span",{className:"route-badge route-badge--source",children:"Source Hub"}),c.type==="to"&&e.jsx("span",{className:"route-badge route-badge--to",children:"To Hub"})]})})]},f))})})]})}),e.jsx(h.Col,{span:24,children:e.jsxs(h.Card,{className:"ho-card ho-card--equal",children:[e.jsxs("div",{className:"ho-section-title",children:[e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:Nt,className:"ho-title-icon",alt:""}),e.jsxs("span",{style:{fontFamily:"Roboto",fontWeight:700,fontSize:"20px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:["Shipments ",g.length>0&&`(${g.length})`]})]}),g.length>0&&e.jsxs("div",{className:"ho-inline",children:[e.jsx("span",{className:"ho-chip bag-chip bag-chip--in",children:"Bag In"}),e.jsx("span",{className:"ho-chip bag-chip bag-chip--out",children:"Bag Out"})]})]}),e.jsx("div",{className:"ho-inline",style:{flexWrap:"wrap",gap:8,width:"100%",display:"flex",justifyContent:"center",alignItems:"center",minHeight:"40px"},children:g.length===0?e.jsx("div",{style:{textAlign:"center",color:"#667085",fontSize:"14px",fontWeight:400},children:"Shipment not available"}):e.jsxs(e.Fragment,{children:[g.slice(0,5).map((c,f)=>e.jsx(h.Tag,{className:`ho-badge pointer ${U(c)}`,style:{marginBottom:8,textDecoration:"underline"},onClick:()=>o(`/shipment-tracker?awb=${c}`),children:c},f)),g.length>5&&e.jsx("span",{onClick:()=>$(!0),style:{cursor:"pointer",color:"#0066CC",textDecoration:"underline",marginLeft:10,fontWeight:600},children:"View More ▾"})]})})]})}),e.jsx(h.Modal,{open:X,title:e.jsxs("div",{style:{fontFamily:"Roboto",fontWeight:700,fontSize:"20px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:["Shipments ",g.length>0&&`(${g.length})`]}),footer:null,onCancel:()=>$(!1),width:450,children:e.jsx("div",{style:{maxHeight:"400px",overflowY:"auto",padding:"10px 5px"},children:g.map((c,f)=>e.jsx(h.Tag,{className:`ho-badge pointer ${U(c)}`,style:{marginBottom:8,display:"inline-block",textDecoration:"underline"},onClick:()=>o(`/shipment-tracker?awb=${c}`),children:c},f))})})]})}),e.jsx(h.Col,{span:24,children:e.jsxs(h.Card,{className:"ho-card",children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:yt,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Travel Info"})]})}),e.jsx(h.Table,{className:"ho-table",columns:Ms,dataSource:ye,rowKey:"key",pagination:!1})]})})]})]})})}exports.BagDetailsUI=Is;exports.ShipmentDetailsUI=At;
|
|
59
|
+
}`),C.useEffect(()=>{const l=s.current,p=Gt(l);Wt(o,"@ant-design-icons",{prepend:!a,csp:t,attachTo:p})},[])},ie={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function ts({primaryColor:s,secondaryColor:t}){ie.primaryColor=s,ie.secondaryColor=t||gt(s),ie.calculated=!!t}function ss(){return{...ie}}const J=s=>{const{icon:t,className:n,onClick:a,style:o,primaryColor:l,secondaryColor:p,...m}=s,x=E.useRef(null);let d=ie;if(l&&(d={primaryColor:l,secondaryColor:p||gt(l)}),es(x),Xt(et(t),`icon should be icon definiton, but got ${t}`),!et(t))return null;let j=t;return j&&typeof j.icon=="function"&&(j={...j,icon:j.icon(d.primaryColor,d.secondaryColor)}),Ee(j.icon,`svg-${j.name}`,{className:n,onClick:a,style:o,"data-icon":j.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...m,ref:x})};J.displayName="IconReact";J.getTwoToneColors=ss;J.setTwoToneColors=ts;function xt(s){const[t,n]=mt(s);return J.setTwoToneColors({primaryColor:t,secondaryColor:n})}function ns(){const s=J.getTwoToneColors();return s.calculated?[s.primaryColor,s.secondaryColor]:s.primaryColor}var as={};function _e(){return _e=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},_e.apply(this,arguments)}xt(Te.primary);const P=E.forwardRef((s,t)=>{const{className:n,icon:a,spin:o,rotate:l,tabIndex:p,onClick:m,twoToneColor:x,...d}=s,{prefixCls:j="anticon",rootClassName:I}=E.useContext(it),O=Tt(I,j,{[`${j}-${a.name}`]:!!a.name,[`${j}-spin`]:!!o||a.name==="loading"},n);let B=p;B===void 0&&m&&(B=-1);const L=l?{msTransform:`rotate(${l}deg)`,transform:`rotate(${l}deg)`}:void 0,[X,$]=mt(x);return E.createElement("span",_e({role:"img","aria-label":a.name},d,{ref:t,tabIndex:B,onClick:m,className:O}),E.createElement(J,{icon:a,primaryColor:X,secondaryColor:$,style:L}))});P.getTwoToneColor=ns;P.setTwoToneColor=xt;as.NODE_ENV!=="production"&&(P.displayName="AntdIcon");var is={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},os={};function Oe(){return Oe=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Oe.apply(this,arguments)}const rs=(s,t)=>E.createElement(P,Oe({},s,{ref:t,icon:is})),ft=E.forwardRef(rs);os.NODE_ENV!=="production"&&(ft.displayName="ArrowLeftOutlined");var ls={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},cs={};function Fe(){return Fe=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Fe.apply(this,arguments)}const ds=(s,t)=>E.createElement(P,Fe({},s,{ref:t,icon:ls})),Ct=E.forwardRef(ds);cs.NODE_ENV!=="production"&&(Ct.displayName="CalendarOutlined");var hs={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},us={};function Be(){return Be=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Be.apply(this,arguments)}const ps=(s,t)=>E.createElement(P,Be({},s,{ref:t,icon:hs})),bt=E.forwardRef(ps);us.NODE_ENV!=="production"&&(bt.displayName="FileTextOutlined");var gs={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},ms={};function Le(){return Le=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Le.apply(this,arguments)}const xs=(s,t)=>E.createElement(P,Le({},s,{ref:t,icon:gs})),He=E.forwardRef(xs);ms.NODE_ENV!=="production"&&(He.displayName="InfoCircleOutlined");var fs={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},Cs={};function Ue(){return Ue=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Ue.apply(this,arguments)}const bs=(s,t)=>E.createElement(P,Ue({},s,{ref:t,icon:fs})),jt=E.forwardRef(bs);Cs.NODE_ENV!=="production"&&(jt.displayName="UserOutlined");const ze="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%202C20.1647%202%2022%203.81484%2022%206.01659C22%208.25341%2020.1348%209.82312%2018.412%2010.8905C18.2864%2010.9623%2018.1445%2011%2018%2011C17.8555%2011%2017.7136%2010.9623%2017.588%2010.8905C15.8684%209.8127%2014%208.26115%2014%206.01659C14%203.81484%2015.8353%202%2018%202Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M18%206H18.009'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5%2022C6.65685%2022%208%2020.6569%208%2019C8%2017.3431%206.65685%2016%205%2016C3.34315%2016%202%2017.3431%202%2019C2%2020.6569%203.34315%2022%205%2022Z'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11%207H9.5C7.567%207%206%208.34315%206%2010C6%2011.6569%207.567%2013%209.5%2013H12.5C14.433%2013%2016%2014.3431%2016%2016C16%2017.6569%2014.433%2019%2012.5%2019H11'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",oe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.1667%2016.6668C15.0871%2016.6668%2015.8333%2015.9206%2015.8333%2015.0002C15.8333%2014.0797%2015.0871%2013.3335%2014.1667%2013.3335C13.2462%2013.3335%2012.5%2014.0797%2012.5%2015.0002C12.5%2015.9206%2013.2462%2016.6668%2014.1667%2016.6668Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M5.83464%2016.6663C6.75511%2016.6663%207.5013%2015.9201%207.5013%2014.9997C7.5013%2014.0792%206.75511%2013.333%205.83464%2013.333C4.91416%2013.333%204.16797%2014.0792%204.16797%2014.9997C4.16797%2015.9201%204.91416%2016.6663%205.83464%2016.6663Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M4.16797%2014.9767C3.25404%2014.9312%202.68389%2014.7952%202.27816%2014.3895C1.87244%2013.9838%201.73649%2013.4136%201.69093%2012.4997M7.5013%2014.9997H12.5013M15.8346%2014.9767C16.7485%2014.9312%2017.3187%2014.7952%2017.7245%2014.3895C18.3346%2013.7793%2018.3346%2012.7972%2018.3346%2010.833V9.16634H14.418C13.7975%209.16634%2013.4873%209.16634%2013.2363%209.08476C12.7289%208.91992%2012.3311%208.52209%2012.1662%208.0147C12.0846%207.76365%2012.0846%207.45343%2012.0846%206.83301C12.0846%205.90237%2012.0846%205.43705%2011.9623%205.06047C11.715%204.29937%2011.1183%203.70266%2010.3572%203.45537C9.98063%203.33301%209.5153%203.33301%208.58463%203.33301H1.66797'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1.66797%206.66699H6.66797'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1.66797%209.16699H5.0013'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.082%205H13.5997C14.8125%205%2015.4189%205%2015.9124%205.29476C16.4059%205.58952%2016.6934%206.12343%2017.2684%207.19125L18.332%209.16667'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",re="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='%23F8FAFC'/%3e%3cpath%20d='M23.5%2011.8335V16.0002M8.5%2011.8335C8.5%2014.3872%208.5%2019.9787%208.5%2020.3012C8.5%2021.4533%2010.1214%2022.1382%2013.3641%2023.5081C14.6668%2024.0583%2015.3182%2024.3335%2016%2024.3335V15.4625'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.5%2021.8333C18.5%2021.8333%2019.2292%2021.8333%2019.9583%2023.5C19.9583%2023.5%2022.2745%2019.3333%2024.3333%2018.5'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.9383%2014.076L10.5039%2012.898C9.16797%2012.2516%208.5%2011.9284%208.5%2011.4165C8.5%2010.9046%209.16797%2010.5814%2010.5039%209.93496L12.9383%208.75702C14.4407%208.03001%2015.1919%207.6665%2016%207.6665C16.8081%207.6665%2017.5593%208.03%2019.0617%208.75702L21.4961%209.93496C22.832%2010.5814%2023.5%2010.9046%2023.5%2011.4165C23.5%2011.9284%2022.832%2012.2516%2021.4961%2012.898L19.0617%2014.076C17.5593%2014.803%2016.8081%2015.1665%2016%2015.1665C15.1919%2015.1665%2014.4407%2014.803%2012.9383%2014.076Z'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11%2016L12.6667%2016.8333'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M20.1654%209.33301L11.832%2013.4997'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Nt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17%2021C18.1046%2021%2019%2020.1046%2019%2019C19%2017.8954%2018.1046%2017%2017%2017C15.8954%2017%2015%2017.8954%2015%2019C15%2020.1046%2015.8954%2021%2017%2021Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M7%2021C8.10457%2021%209%2020.1046%209%2019C9%2017.8954%208.10457%2017%207%2017C5.89543%2017%205%2017.8954%205%2019C5%2020.1046%205.89543%2021%207%2021Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M2%209V13.947C2%2016.329%202%2017.52%202.73223%2018.26C3.2191%2018.7521%203.90328%2018.9169%205%2018.9722M12.4271%205C13.3404%205.2999%2014.0564%206.02354%2014.3532%206.94654C14.5%207.40322%2014.5%207.96753%2014.5%209.09613C14.5%209.84853%2014.5%2010.2248%2014.5979%2010.5292C14.7957%2011.1445%2015.2731%2011.627%2015.882%2011.8269C16.1832%2011.9258%2016.5555%2011.9258%2017.3%2011.9258H22V13.947C22%2016.329%2022%2017.52%2021.2678%2018.26C20.7809%2018.7521%2020.0967%2018.9169%2019%2018.9722M9%2019H15'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.5%207H16.3212C17.7766%207%2018.5042%207%2019.0964%207.35371C19.6886%207.70742%2020.0336%208.34812%2020.7236%209.6295L22%2012'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.32653%208L8.81309%206.82583C9.60436%206.20083%2010%205.88833%2010%205.5M10%205.5C10%205.11168%209.60436%204.79918%208.81309%204.17418L7.32653%203M10%205.5H2'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",yt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%2022H6C4.11438%2022%203.17157%2022%202.58579%2021.4142C2%2020.8284%202%2019.8856%202%2018V16C2%2014.1144%202%2013.1716%202.58579%2012.5858C3.17157%2012%204.11438%2012%206%2012H8C9.88562%2012%2010.8284%2012%2011.4142%2012.5858C12%2013.1716%2012%2014.1144%2012%2016V18C12%2019.8856%2012%2020.8284%2011.4142%2021.4142C10.8284%2022%209.88562%2022%208%2022Z'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6%2015H8'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18%202C15.7909%202%2014%203.80892%2014%206.04033C14%207.31626%2014.5%208.30834%2015.5%209.1945C16.2049%209.81911%2017.0588%2010.8566%2017.5714%2011.6975C17.8173%2012.1008%2018.165%2012.1008%2018.4286%2011.6975C18.9672%2010.8733%2019.7951%209.81911%2020.5%209.1945C21.5%208.30834%2022%207.31626%2022%206.04033C22%203.80892%2020.2091%202%2018%202Z'%20stroke='%23003371'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3cpath%20d='M18%2015V18C18%2019.8856%2018%2020.8284%2017.5314%2021.4142C17.0839%2021.9735%2016.3761%2021.9988%2015%2021.9999'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.007%206H17.998'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",st="data:image/svg+xml,%3csvg%20width='19'%20height='19'%20viewBox='0%200%2019%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.875%207.9165C11.875%206.60483%2010.8117%205.5415%209.5%205.5415C8.18829%205.5415%207.125%206.60483%207.125%207.9165C7.125%209.22822%208.18829%2010.2915%209.5%2010.2915C10.8117%2010.2915%2011.875%209.22822%2011.875%207.9165Z'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.4577%2014.2503C13.4577%2012.0642%2011.6855%2010.292%209.49935%2010.292C7.31322%2010.292%205.54102%2012.0642%205.54102%2014.2503'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.625%2010.2917V8.70833C16.625%205.72277%2016.625%204.22999%2015.6975%203.30249C14.77%202.375%2013.2772%202.375%2010.2917%202.375H8.70833C5.72277%202.375%204.22999%202.375%203.30249%203.30249C2.375%204.22999%202.375%205.72277%202.375%208.70833V10.2917C2.375%2013.2772%202.375%2014.77%203.30249%2015.6975C4.22999%2016.625%205.72277%2016.625%208.70833%2016.625H10.2917C13.2772%2016.625%2014.77%2016.625%2015.6975%2015.6975C16.625%2014.77%2016.625%2013.2772%2016.625%2010.2917Z'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='square'%20stroke-linejoin='round'/%3e%3c/svg%3e",nt="data:image/svg+xml,%3csvg%20width='19'%20height='19'%20viewBox='0%200%2019%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.98047%205.9375V10.6875C1.98047%2013.673%201.98047%2015.1659%202.90796%2016.0933C3.83546%2017.0208%205.32824%2017.0208%208.3138%2017.0208H9.5013M17.0221%209.89583V5.9375'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M3.06433%204.20772L1.98047%205.93783H17.0221L16.0308%204.28564C15.355%203.15924%2015.0171%202.59604%2014.4726%202.28777C13.9281%201.97949%2013.2713%201.97949%2011.9578%201.97949H7.08966C5.8042%201.97949%205.16148%201.97949%204.62474%202.2766C4.088%202.57372%203.74678%203.11839%203.06433%204.20772Z'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M9.5%205.93734V1.979'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.91797%208.3125H11.0846'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.4805%2015.4372C11.4805%2015.4372%2012.2721%2015.4372%2013.0638%2017.0205C13.0638%2017.0205%2014.7869%2013.0622%2017.0221%2012.2705'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",js="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.6673%2010.0002V12.5928C12.6673%2014.076%2012.1769%2014.6668%2010.5933%2014.6668H5.40806C3.92476%2014.6668%203.33398%2014.1764%203.33398%2012.5928V10.0002C3.33398%207.42283%205.42332%205.3335%208.00065%205.3335C10.578%205.3335%2012.6673%207.42283%2012.6673%2010.0002Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.6673%2010.0002C10.6673%208.52743%209.47338%207.3335%208.00065%207.3335C6.52789%207.3335%205.33398%208.52743%205.33398%2010.0002'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M8%2011.3333L8.66667%2010'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.8743%203.3335H5.12439C4.53532%203.3335%204.24079%203.3335%203.98162%203.23214C3.89554%203.19847%203.81319%203.15682%203.73579%203.10782C3.50277%202.96028%203.3394%202.72872%203.01264%202.2656C2.75798%201.90466%202.63066%201.72419%202.67455%201.57663C2.68844%201.52994%202.71294%201.48668%202.74635%201.44986C2.85194%201.3335%203.08148%201.3335%203.54058%201.3335H12.4581C12.9172%201.3335%2013.1467%201.3335%2013.2523%201.44986C13.2857%201.48668%2013.3103%201.52994%2013.3241%201.57663C13.368%201.72419%2013.2407%201.90466%2012.9861%202.2656C12.6593%202.72872%2012.4959%202.96029%2012.2629%203.10782C12.1855%203.15682%2012.1031%203.19847%2012.0171%203.23214C11.7579%203.3335%2011.4634%203.3335%2010.8743%203.3335Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M9.33268%205.3335V3.3335M6.66602%205.3335V3.3335'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3c/svg%3e",Ns="data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.19033%202.28511C7.10013%201.37531%207.55507%200.9204%208.06253%200.7102C8.73913%200.429933%209.4994%200.429933%2010.1761%200.7102C10.6835%200.9204%2011.1384%201.37531%2012.0482%202.28511C12.958%203.19492%2013.4129%203.64983%2013.6231%204.15729C13.9034%204.83392%2013.9034%205.59417%2013.6231%206.2708C13.4129%206.77827%2012.958%207.2332%2012.0482%208.143L8.143%2012.0482C7.2332%2012.958%206.77827%2013.4129%206.2708%2013.6231C5.59417%2013.9034%204.83392%2013.9034%204.15729%2013.6231C3.64983%2013.4129%203.19492%2012.958%202.28511%2012.0482C1.37531%2011.1384%200.9204%2010.6835%200.7102%2010.1761C0.429933%209.4994%200.429933%208.73913%200.7102%208.06253C0.9204%207.55507%201.37531%207.10013%202.28511%206.19033L6.19033%202.28511Z'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ys="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%2014.6665C7.45453%2014.6665%206.93347%2014.4464%205.89129%2014.0062C3.29709%2012.9103%202%2012.3624%202%2011.4407C2%2011.1826%202%206.7095%202%204.6665M8%2014.6665C8.54547%2014.6665%209.06653%2014.4464%2010.1087%2014.0062C12.7029%2012.9103%2014%2012.3624%2014%2011.4407V4.6665M8%2014.6665V7.5697'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.55061%206.46108L3.60315%205.51873C2.53438%205.00156%202%204.74298%202%204.3335C2%203.92401%202.53438%203.66543%203.60315%203.14826L5.55061%202.20591C6.75253%201.6243%207.35353%201.3335%208%201.3335C8.64647%201.3335%209.24747%201.6243%2010.4494%202.20591L12.3969%203.14826C13.4656%203.66543%2014%203.92401%2014%204.3335C14%204.74298%2013.4656%205.00156%2012.3969%205.51873L10.4494%206.46108C9.24747%207.0427%208.64647%207.3335%208%207.3335C7.35353%207.3335%206.75253%207.0427%205.55061%206.46108Z'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4%208L5.33333%208.66667'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.3327%202.6665L4.66602%205.99984'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",As="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.0026%201.33398C11.6845%201.33398%2014.6693%204.31875%2014.6693%208.00064C14.6693%2011.6826%2011.6845%2014.6673%208.0026%2014.6673C4.3207%2014.6673%201.33594%2011.6826%201.33594%208.00064M5.94194%201.65856C5.26927%201.87697%204.6435%202.19942%204.08362%202.60692M2.60889%204.08165C2.20131%204.64164%201.87882%205.26753%201.6604%205.94033'%20stroke='%23175EB6'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.0026%205.33398V10.6673M10.6693%208.00064H5.33594'%20stroke='%23175EB6'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";var vs={};function ne(s){if(!s||s==="-"||s==="—")return"--";const t=new Date(s);return isNaN(t.getTime())?"--":t.toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}function N(s){return s==null?s:String(s).replace(/[_-]+/g," ").replace(/\s+/g," ").trim().toLowerCase().replace(/\b\w/g,n=>n.toUpperCase())}function ae({label:s,value:t}){return e.jsxs("div",{className:"ho-kv",children:[e.jsx("span",{className:"ho-kv__label",children:s}),e.jsx("span",{className:"ho-kv__value",children:t})]})}function W(s){if(!s)return"—";const t=new Date(s);if(isNaN(t.getTime()))return"—";const n=a=>String(a).padStart(2,"0");return n(t.getDate())+"-"+n(t.getMonth()+1)+"-"+t.getFullYear()+" "+n(t.getHours())+":"+n(t.getMinutes())+":"+n(t.getSeconds())}function Ie({icon:s,label:t,value:n,isAudit:a=!1}){return e.jsxs("div",{className:"ho-kv ho-kv--withTag",children:[e.jsxs("span",{className:"ho-kv__label_audit",style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",fontWeight:500,fontFamily:"Roboto"},children:[s&&e.jsx("img",{src:s,alt:"",className:"ho-kv__icon"}),t]}),e.jsx("span",{className:a?"ho-kv__tag_audit":"ho-kv__tag",children:n})]})}function At({endpoint:s,awbNumber:t,data:n}){const[a,o]=C.useState(!1),[l,p]=C.useState(!1),[m,x]=C.useState(null),[d,j]=C.useState(n||null),[I,O]=C.useState(!1),B=fe.useLocation(),L=fe.useNavigate(),[X,$]=C.useState(!1),[le,je]=C.useState(!1),[Ne,Y]=C.useState(!1),[G,D]=C.useState(!1),R=C.useRef(null),[Q,ce]=C.useState(!1),de=new URLSearchParams(B.search).get("endpoint"),H=s||de||vs.REACT_APP_TRACKING_ENDPOINT||"/api/v1/shipment-tracking/search",U=C.useMemo(()=>{if(t)return t;const i=new URLSearchParams(B.search);return i.get("awb")||i.get("awbNumber")||""},[t,B.search]);C.useEffect(()=>{if(n){j(n);return}let i=!1;return(async()=>{try{if(O(!0),!U){i||j(null);return}const y=`${H}?awbNumber=${encodeURIComponent(U)}`,w=await fetch(y);if(!w.ok)throw new Error("Request failed");const b=await w.json();i||j(b)}catch{i||j(null)}finally{i||O(!1)}})(),()=>{i=!0}},[H,U,n]);const ye=d?.shipmentTracking?.isRTO===!0,g=d?.shipmentTracking?.bookingInfoDto,he=d?.shipmentTracking?.nextLocation,S=d?.shipmentTracking?.auditInfo||[],c=d?.shipmentTracking?.latestOperation,f=d?.shipmentTracking?.supportTicketInfo,v=d?.tatInfo,u={sourceCity:g?.sourceCity||"—",destinationCity:g?.destinationCity||"—",bookingTime:g?.bookingDate||"—",shipmentNumber:g?.awbNumber||"—",isRTO:ye,isMCN:g?.mcn,bagId:g?.bagId||"—",fromPincode:g?.fromPincode||"—",senderPincode:g?.senderPincode||"—",receiverPincode:g?.receiverPincode||"—",estimatedDeliveryDate:g?.estimatedDeliveryDate||null,revisedEstimatedDeliveryDate:g?.revisedEstimatedDeliveryDate||null,actualDeliveryDate:g?.actualDeliveryDate||"—",sourceHubName:g?.sourceHubName||"—",destinationHubName:g?.destinationHubName||"—",source:{city:g?.senderName||"—",pincode:g?.fromPincode||"—"},destination:{city:g?.receiverName||"—",pincode:g?.receiverPincode||"—"},bookingType:g?.bookingType||"—",shipmentType:g?.shipmentType?`${g.shipmentType?.toUpperCase()} | ${g.travelType?.toUpperCase()}`:"—",serviceType:g?.serviceType||"—",awb:g?.tplAwbNumber||"",partner:g?.partnerCode||"",eway:(()=>{const i=d?.shipmentTracking?.ewayInfo?.[0];return i?{id:i.eway_bill_id,no:i.ewaybill_no,created:i.eway_bill_crt_date,expiry:i.ewb_bill_exp_date}:{id:"—",no:"—",created:"—",expiry:"—"}})(),sender:{name:g?.senderName||"—",address:g?.booking_cp_address||"—"},receiver:{name:g?.receiverName||"—",address:g?.recipient_cp_address||"—"},pkg:{weight:g?.weight&&`${g.weight} Kg`||"—",dimensions:g?.length||g?.width||g?.height?`${g.length} x ${g.width} x ${g.height} cm`:"—",volumetric:g?.volumetricWeight||"—"},status:g?.status||"—",parentAwbNumber:g?.parentAwbNumber||""},_=C.useMemo(()=>{const i=d?.shipmentTracking?.travelDtos||[];if(!i.length)return null;const r=i[i.length-1],y=(r?.status||"").toUpperCase();return(y==="HUB-OUTSCAN"||y==="IN-BAG-OUTSCAN")&&(r?.toPremisename||r?.toPremiseName)||null},[d]),T=(()=>{const i=d?.shipmentTracking?.travelDtos||[],r=b=>{if(!b)return"";try{const A=b.split(" ")[0]?.split("-");return A?.length===3?`${A[2]}-${A[1]}-${A[0]}`:b}catch{return b}},y=b=>{const A=(b||"").toLowerCase(),F=i.find(z=>(z?.premiseName||"").toLowerCase().includes(A)||A.includes((z?.premiseName||"").toLowerCase())||(z?.toPremisename||z?.topremisename||"").toLowerCase().includes(A)||A.includes((z?.toPremisename||z?.topremisename||"").toLowerCase()))||null;return r(F?.date)},w=d?.shipmentTracking?.route_info;return Array.isArray(w)&&w.length?w.map((b,A,F)=>({hub:b,date:y(b),type:A===0?"source":A===F.length-1?"to":"transit"})):[]})();C.useEffect(()=>{if(!R.current||T.length<=5){ce(!1);return}const i=R.current,r=()=>{const y=Array.from(i.querySelectorAll(".ho-route__row"));if(y.length===0)return!1;let w=0;return y.forEach(b=>{w+=b.offsetHeight+24}),w>i.clientHeight};requestAnimationFrame(()=>{const y=r();ce(y)})},[T.length]),C.useMemo(()=>T.find(r=>r.type==="source")?.hub||"—",[T,u.source.city]),C.useMemo(()=>T.find(r=>r.type==="to")?.hub||"—",[T,u.destination.city]);const ue=d?.shipmentTracking?.travelDtos?.map((i,r)=>({key:r,time:i.date,location:(i.status||"").toUpperCase()==="RETURN_INITIATED"&&i.driverName&&i.driverName.trim()!==""?i.toPremisename||i.toPremiseName||"—":["FORCE_BAG_ATTEMPTED","RETURN_INITIATED","RETURN_REVOKED","IN_BAG_OUTSCAN_TO_CP","OUT_SCAN_TO_CP","BAGGED","INSCANNED","IN-BAG-OUTSCAN","IN-BAG-INSCAN","INSCANNED_AT_TRANSIT","ATTEMPTED","HUB-OUTSCAN","HUB-IN-SCANNED","REMOVED_FROM_BAG","SCHEDULED_FOR_TRIP","FORCE_BAG","MIS_ROUTED","REROUTED","PINCODE_AUDITED","FORCE_HUB_OUTSCAN","EXCESS_INSCAN","MODE_AUDITED","REMOVED_FROM_LCR","OUT_SCAN_TO_3PL","LOST","DAMAGED","SHORTAGE"].includes((i.status||"").toUpperCase())?i.premiseName||"—":i.toPremisename||i.toPremiseName||"—",locationPremiseName:["IN_BAG_OUTSCAN_TO_CP","OUT_SCAN_TO_CP"].includes((i.status||"").toUpperCase())?i.toPremisename||i.toPremiseName:"-",process:i.status,bag:i.bagBarCode,user:(i.status||"").toUpperCase()==="RETURN_INITIATED"&&i.driverName?.trim()||["ATTEMPTED","OUT_FOR_DELIVERY","DELIVERED","RTO_OUT_FOR_DELIVERY","RETURN_REVOKED","RTO_DELIVERED","INSCANNED_AT_CP","UNDELIVERED","RTO_UNDELIVERED","OUTSCANNED_BY_CP"].includes((i.status||"").toUpperCase())&&i.driverName?.trim()?i.driverName:i.user?.trim()||"_",exception:i.exception||(i.isException,"-"),remark:(()=>{const y=(i.status||"").toString().toUpperCase();if(!["SCHEDULED_FOR_TRIP","IN-BAG-OUTSCAN"].includes(y))return i.remarks||"-";const b=i.lcrnum||i.lcrNum||i.lcr_no||i.lcrNo||"",F=`${y==="SCHEDULED_FOR_TRIP"?"Scheduled Outscan":"Outscan"} from ${N(i.premiseName||"")} to ${N(i.toPremisename||i.topremisename||"")}`;return b?`${F} — LCR No: ${b}`:F})(),coLoader:i.coLoader||i.co_loader||i.coLoaderName||i.co_loader_name||i.coLoader_code||"—",transportType:i.travelBy||i.transportType||i.transport_type||i.mode||"—",flightName:i.flightName||i.flight_no||i.flight||i.flightNum||"",vehicleNo:i.vehicleNo||i.vehicleNum||i.vehicle_no||i.truckNo||i.truck_no||"—",driverName:i.driverName||i.driver_name||"—"}))||[],pe=C.useMemo(()=>[{title:"Date and Time",dataIndex:"time",key:"time",render:i=>e.jsx("span",{className:"ho-nowrap",children:W(i)})},{title:"Location",dataIndex:"location",key:"location",render:i=>i?N(i):"—"},{title:"Process",dataIndex:"process",key:"process",render:(i,r)=>{const y=(i||"").toString().toUpperCase(),b=["REMOVED_FROM_BAG","REMOVED_FROM_LCR","ATTEMPTED","MIS_ROUTED","UNDELIVERED"].includes(y),A=b?{color:"#e14949",borderColor:"#ffd5d5",background:"#ffecec"}:{color:"#1f7a48",borderColor:"#cfeede",background:"#e9fff1"},F=`ho-tag ${b?"ho-tag--danger":"ho-tag--success"}`,Ae=y==="OUT_SCAN_TO_CP"||y==="IN_BAG_OUTSCAN_TO_CP"?`${i} (${N(r?.locationPremiseName||"")})`:i;return e.jsx(h.Tag,{style:A,className:F,children:Ae})}},{title:"Bag No",dataIndex:"bag",key:"bag",render:i=>i?e.jsx("a",{className:"ho-link",onClick:()=>L(`/bag-details-ui?awb=${encodeURIComponent(i)}`),children:i}):"-"},{title:"User",dataIndex:"user",key:"user"},{title:"Exception",dataIndex:"exception",key:"exception",render:i=>i||"-"},{title:"Remark",dataIndex:"remark",key:"remark",render:(i,r)=>{if(!i)return"-";if((r?.process||"").toUpperCase()==="MIS_ROUTED"){const V=String(i),Z=V.length>40?`${V.slice(0,40)}…`:V;return e.jsx(h.Tooltip,{title:V,children:e.jsx("span",{className:"ho-remark-ellipsis",children:Z})})}const w=["SCHEDULED_FOR_TRIP","IN-BAG-OUTSCAN"].includes((r?.process||r?.status||"").toString().toUpperCase()),b=i.indexOf("LCR No:"),A=b>=0,F=A?i.slice(0,b):i,z=A?i.slice(b):"",me=A?(z.replace(/^[^:]*:\s*/i,"")||"").trim():"",Ae=V=>{const Z=[],ee=String(V||""),Ge=/(https?:\/\/[^\s]+|www\.[^\s]+)/gi;let te=0,ve,we=0;for(;(ve=Ge.exec(ee))!==null;){const qe=ve.index,Mt=Ge.lastIndex;qe>te&&Z.push(e.jsx("span",{children:ee.slice(te,qe)},`rmk-t-${we++}`));const ke=ve[0],It=ke.startsWith("http")?ke:`https://${ke}`;Z.push(e.jsx("a",{className:"ho-link",href:It,target:"_blank",rel:"noreferrer",children:"View"},`rmk-a-${we++}`)),te=Mt}return te<ee.length&&Z.push(e.jsx("span",{children:ee.slice(te)},`rmk-t-${we++}`)),Z.length?Z:ee||"-"};return e.jsxs("span",{children:[Ae(F),A&&e.jsxs(e.Fragment,{children:[e.jsx("strong",{className:"ho-remark-strong",children:"LCR No: "}),me&&e.jsx("a",{className:"ho-link",onClick:()=>{sessionStorage.setItem("LCR_REPORT_RECORD",JSON.stringify({vehicle_lcr_id:me})),window.open(window.location.origin+"/lcr-report","_blank")},children:me})]}),w&&e.jsx(h.Tooltip,{placement:"top",title:e.jsxs("div",{children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Co-loader:"})," ",N(r.coLoader||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Transport type:"})," ",N(r.transportType||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Flight Name:"})," ",r.flightName||"N/A"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Vehicle No:"})," ",r.vehicleNo||"—"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Driver Name:"})," ",N(r.driverName||"—")]})]}),children:e.jsx("span",{className:"ho-alert-dot"})})]})}}],[L]);C.useMemo(()=>(d?.shipmentTracking?.ewayInfo||[]).map(r=>r?.ewaybill_no).filter(r=>!!r),[d]),C.useMemo(()=>S.length?[{key:"audit-master",label:`Audit (${S.length})`,children:S.map((i,r)=>({key:`audit-${r}`,title:`Audit ${r+1} - ${i.auditType||"WEIGHT"}`,auditData:i}))}]:[],[S]);const ge=C.useRef(!1);C.useEffect(()=>{!ge.current&&S.length>0&&(x("audit-master"),ge.current=!0)},[S]),C.useMemo(()=>{if(m&&m.startsWith("audit-")){const i=parseInt(m.split("-")[1]),r=S[i];if(!r)return null;const y={auditedBy:r.auditMethod||"—",hub:r.auditedHubName||r.sourceHubName||"—",date:u.bookingTime},w={actual:r.bookedWeight??"—",volumetric:r.volumetricBookedValue??"—",lwh:`${r.bookedLength??"—"},${r.bookedWidth??"—"},${r.bookedHeight??"—"}`},b={actual:r.auditedWeight??"—",volumetric:r.volumetricAuditedValue??"—",lwh:`${r.auditedLength??"—"},${r.auditedWidth??"—"},${r.auditedHeight??"—"}`},A=r.weightDiff!=null?`Audited actual weight is ${r.weightDiff>=0?"higher":"lower"} by ${Math.abs(r.weightDiff)}%.`:"";return{header:y,bookingValue:w,auditedValue:b,note:A,index:i+1}}return null},[m,S,u.bookingTime]),C.useMemo(()=>{const i=d?.shipmentTracking?.travelDtos||[];for(let r=i.length-1;r>=0;r--){const y=(i[r]?.status||"").toUpperCase();if(y.includes("IN-BAG-INSCAN"))return"Bag In";if(y.includes("BAGGED"))return"Bagged"}return null},[d]);const wt=!!(d?.shipmentTracking&&(d?.shipmentTracking?.bookingInfoDto||Array.isArray(d?.shipmentTracking?.route_info)&&d?.shipmentTracking?.route_info.length||Array.isArray(d?.shipmentTracking?.travelDtos)&&d?.shipmentTracking?.travelDtos.length)),q=!!f,kt=()=>{const i=sessionStorage.getItem("token")||localStorage.getItem("token")||"",r=sessionStorage.getItem("email")||localStorage.getItem("email")||"",y=sessionStorage.getItem("userId")||localStorage.getItem("userId")||"",w=sessionStorage.getItem("premiseId")||sessionStorage.getItem("smcs-premise-id")||"",b=new URLSearchParams;b.append("source","HUBOPS"),i&&b.append("token",i),r&&b.append("email",r),y&&b.append("userId",y),w&&b.append("premiseId",w);const F=window.location.hostname.includes("qa")?"https://qasupport.innofulfill.com":"https://support.innofulfill.com";window.open(`${F}?${b.toString()}`,"_blank")};return I&&wt?e.jsx(h.Spin,{spinning:I&&!d,indicator:e.jsx("img",{src:Ce,style:{height:"100px",width:"100px"}}),children:e.jsx("div",{className:"shipment-details-page",children:e.jsx("div",{className:"bag-empty",children:e.jsxs(h.Card,{className:"ho-card bag-empty__card",children:[e.jsx("div",{className:"ho-section-title bag-empty__title",children:e.jsx("span",{className:"ho-title",children:"Details Not Found"})}),e.jsxs("div",{className:"bag-empty__text",children:["No details found for the provided AWB number ",U,". Please check the AWB number and try again."]})]})})})}):e.jsx(h.Spin,{spinning:I&&!d,indicator:e.jsx("img",{src:Ce,style:{height:"100px",width:"100px"}}),children:e.jsx("div",{className:"shipment-details-page",children:e.jsxs(h.Row,{gutter:[16,16],className:"ho-row-equal",children:[e.jsx(h.Col,{xs:24,lg:10,children:e.jsxs(h.Card,{className:"ho-card ho-card--equal",style:{height:"644px"},bodyStyle:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",padding:"12px"},children:[e.jsxs("div",{className:"ho-section-title",style:{marginTop:"10px"},children:[e.jsxs("div",{className:"ho-title-left",children:[u.parentAwbNumber?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",background:"#ECFDF3",padding:"6px 12px",borderRadius:"8px",cursor:"pointer",color:"#027A48",fontWeight:500,fontSize:"14px"},onClick:()=>L(`/shipment-details-ui?awb=${encodeURIComponent(u.parentAwbNumber)}&endpoint=${encodeURIComponent(H)}`),children:[e.jsx(ft,{}),u.parentAwbNumber]}):e.jsxs(e.Fragment,{children:[e.jsx("img",{src:yt,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Shipment Info"})]}),u.bagId!=="—"&&e.jsx(h.Badge,{status:"processing",text:e.jsx("span",{className:"ho-badge-text",children:u.bagId})})]}),e.jsxs("div",{className:"ho-title-right",children:[e.jsxs("div",{className:"ho-chip",children:[e.jsx("span",{className:"ho-chip__label",children:"Booked At:"}),e.jsx("span",{className:"ho-chip__value",children:W(u.bookingTime)})]}),e.jsxs("div",{className:"ho-chip ho-chip--ticket",onClick:kt,style:{cursor:"pointer"},children:[e.jsx("img",{src:As,alt:""}),e.jsx("span",{className:"ho-chip__label",children:"Raise Ticket"})]})]})]}),e.jsxs("div",{className:"ho-scrollable-content",children:[e.jsx("div",{className:"ho-subheader",children:e.jsx("div",{className:"ho-subheader-left-row",style:{width:"100%"},children:(()=>{const i=c&&e.jsx(h.Tag,{className:"ho-badge",style:{...c?.replace(/_/g," ")?.toUpperCase()==="DELIVERED"?{background:"#e9fff1",color:"#027A48",border:"1px solid #cfeede",fontWeight:600,fontFamily:"Roboto"}:c?.replace(/_/g," ")?.toUpperCase()==="UNDELIVERED"?{background:"#ffecec",color:"#d64545",border:"1px solid #ffd5d5",fontWeight:600,fontFamily:"Roboto"}:{},flexShrink:0},children:c?.replace(/_/g," ")?.toUpperCase()}),r=e.jsx(h.Tag,{className:"ho-badge",style:{...u.isRTO?{background:"#e3250b",color:"#f7f3f2",border:"1px solid #cfeede",fontWeight:600,fontFamily:"Roboto"}:u.status.toUpperCase()==="UNDELIVERED"?{background:"#ffecec",color:"#d64545",border:"1px solid #ffd5d5",fontWeight:600,fontFamily:"Roboto"}:{},flexShrink:0},children:u.isRTO?"RETURN":"FORWARD"}),y=u.isMCN?e.jsx(h.Tag,{color:"#FFD32C",className:"ho-chip",style:{color:"#FFFFFF",fontWeight:600,flexShrink:0},children:"3PL"}):null,w=u?.shipmentType&&u.shipmentType!=="—"?e.jsx(h.Tag,{color:"#E9F2FF",className:"ho-chip",style:{flexShrink:0,marginLeft:"auto"},children:N(u.shipmentType)}):null,b={display:"flex",alignItems:"center",flexWrap:"nowrap",whiteSpace:"nowrap",width:"100%",gap:"1px"};return u.parentAwbNumber?e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px",width:"100%"},children:[e.jsx("span",{style:{fontSize:"16px",color:"#667085",fontWeight:400},children:"Child Shipment number"}),e.jsxs("div",{style:b,children:[e.jsx("span",{className:"ho-eway-value-bold",style:{fontSize:"18px",flex:"0 0 auto",marginRight:"8px"},children:u.shipmentNumber}),i,r,y,w]})]}):e.jsxs("div",{style:b,children:[e.jsx("span",{className:"ho-eway-value-bold",style:{flex:"0 0 auto",marginRight:"8px"},children:u.shipmentNumber}),i,r,y,w]})})()})}),(he||_)&&e.jsxs("div",{style:{marginTop:"12px",marginBottom:"16px",padding:"8px 16px",background:"#FFFFFF",border:"1px solid #EAECF0",borderRadius:"10px",boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.05)",display:"inline-flex",alignItems:"center",gap:"8px",width:"fit-content"},children:[e.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",background:"#0F8A41",animation:"pulse 2s infinite"}}),e.jsx("span",{style:{fontSize:"14px",color:"#667085",fontWeight:500},children:"Next Location :"}),e.jsx("span",{style:{fontSize:"15px",color:"#101828",fontWeight:600},children:N(he||_)})]}),e.jsxs("div",{className:"ho-subheader__route",children:[e.jsxs("span",{className:"ho-kv-stack ho-route-dest",children:[e.jsx("span",{className:"ho-stat__label",children:"Source"}),e.jsx("span",{className:"ho-stat__value",children:N(u.sourceHubName)+","+N(u.sourceCity)})]}),e.jsxs("span",{className:"ho-kv-stack ho-route-dest",children:[e.jsx("span",{className:"ho-stat__label",children:"Destination"}),e.jsx("span",{className:"ho-stat__value",children:N(u.destinationHubName)+","+N(u.destinationCity)})]})]}),e.jsxs("div",{style:{marginTop:"16px",padding:"16px",background:"#F8F9FA",borderRadius:"12px",display:"flex",alignItems:"center",width:"100%"},children:[e.jsxs("div",{style:{flex:1,textAlign:"center"},children:[e.jsxs(h.Tag,{color:"#DFF5E1",style:{padding:"4px 12px",borderRadius:"8px",color:"#0F8A41",fontWeight:600,display:"inline-flex",alignItems:"center",gap:"6px"},children:["● Planned EDD",e.jsx(h.Tooltip,{overlayInnerStyle:{background:"#101828",borderRadius:"8px",padding:"8px 12px"},title:e.jsxs("div",{style:{fontSize:"12px",color:"#fff",lineHeight:"1.6",fontFamily:"'SF Pro Rounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontWeight:500,letterSpacing:"0%"},children:[e.jsxs("div",{children:["First Mile : ",v?.plannedFm??"—"]}),e.jsxs("div",{style:{marginTop:"2px"},children:["Middle Mile : ",v?.plannedMm??"—"]}),e.jsxs("div",{style:{marginTop:"2px"},children:["Last Mile : ",v?.plannedLm??"—"]})]}),children:e.jsx(He,{style:{fontSize:"14px",cursor:"pointer"}})})]}),e.jsx("div",{style:{marginTop:"6px",fontSize:"14px",color:"#555"},children:v?.plannedEdd?ne(v?.plannedEdd):ne(u.estimatedDeliveryDate)})]}),e.jsx("div",{style:{height:"40px",width:"1px",background:"#DDD"}}),e.jsxs("div",{style:{flex:1,textAlign:"center"},children:[e.jsxs(h.Tag,{color:"#FFE8D6",style:{padding:"4px 12px",borderRadius:"8px",color:"#D96A1B",fontWeight:600,display:"inline-flex",alignItems:"center",gap:"6px"},children:["● Revised EDD",e.jsx(h.Tooltip,{overlayInnerStyle:{background:"#101828",borderRadius:"8px",padding:"8px 12px"},title:e.jsxs("div",{style:{fontSize:"12px",color:"#fff",lineHeight:"1.6",fontFamily:"'SF Pro Rounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontWeight:500,letterSpacing:"0%"},children:[e.jsxs("div",{children:["First Mile : ",v?.revisedFm??"—"]}),e.jsxs("div",{style:{marginTop:"2px"},children:["Middle Mile : ",v?.revisedMm??"—"]}),e.jsxs("div",{style:{marginTop:"2px"},children:["Last Mile : ",v?.revisedLm??"—"]})]}),children:e.jsx(He,{style:{fontSize:"14px",cursor:"pointer"}})})]}),e.jsx("div",{style:{marginTop:"6px",fontSize:"14px",color:"#555"},children:v?.revisedEdd?ne(v?.revisedEdd):ne(u.revisedEstimatedDeliveryDate)})]}),e.jsx("div",{style:{height:"40px",width:"1px",background:"#DDD"}}),e.jsxs("div",{style:{flex:1,textAlign:"center"},children:[e.jsx(h.Tag,{color:"#E8F2FF",style:{padding:"4px 12px",borderRadius:"8px",color:"#1A6FDB",fontWeight:600},children:"● Delivered Date"}),e.jsx("div",{style:{marginTop:"6px",fontSize:"14px",color:"#555"},children:ne(u.actualDeliveryDate)})]})]}),e.jsx("div",{style:{height:"10px"}}),e.jsx("div",{className:"ho-box ho-box--flush",children:e.jsxs("div",{className:"ho-stats",children:[e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Booking Type"}),e.jsx("div",{className:"ho-stat__value",children:N(u.bookingType)})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Service Type"}),e.jsx("div",{className:"ho-stat__value",children:N(u.serviceType)})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"From PinCode"}),e.jsx("div",{className:"ho-stat__value",children:`${u.fromPincode}`})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"To PinCode"}),e.jsx("div",{className:"ho-stat__value",children:`${u.receiverPincode}`})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"3PL / Partner"}),e.jsx("div",{className:"ho-stat__value",children:`${u.awb?u.awb:" "} — ${u.partner?N(u.partner):" "}`})]})]})}),d?.shipmentTracking?.childInfoDto&&d?.shipmentTracking?.childInfoDto.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ho-box ho-box--flush",style:{paddingTop:"0px"},children:[e.jsxs("div",{className:"ho-subtitle ho-subtitle--primary",style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"4px",marginBottom:"0px"},children:[e.jsxs("span",{className:"ho-title-left",children:[e.jsx("img",{src:nt,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"Child Shipment Info"})]}),e.jsxs(h.Tag,{color:"#F0F9FF",className:"ho-chip",style:{display:"flex",cursor:"pointer",alignItems:"center",gap:"4px",paddingTop:"0px"},onClick:()=>D(!0),children:[d?.shipmentTracking?.childInfoDto.length+" Child Shipments",e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:"rotate(180deg)"},children:e.jsx("path",{d:"M14.9987 6.00071H3.13972L6.76939 1.64111C6.93912 1.43691 7.02077 1.17365 6.99639 0.909247C6.97202 0.644844 6.8436 0.400955 6.63941 0.231232C6.43521 0.0615082 6.17195 -0.0201464 5.90755 0.00423112C5.64314 0.0286087 5.39925 0.157022 5.22953 0.36122L0.229979 6.36068C0.196343 6.4084 0.166264 6.45853 0.139987 6.51067C0.139987 6.56066 0.139988 6.59066 0.0699939 6.64066C0.0246714 6.75531 0.000941037 6.87735 0 7.00063C0.000941037 7.1239 0.0246714 7.24594 0.0699939 7.36059C0.0699939 7.41059 0.0699936 7.44059 0.139987 7.49058C0.166264 7.54272 0.196343 7.59285 0.229979 7.64057L5.22953 13.64C5.32354 13.7529 5.44127 13.8437 5.57435 13.9059C5.70742 13.9681 5.85256 14.0002 5.99946 14C6.23309 14.0005 6.45951 13.9191 6.63941 13.77C6.74065 13.6861 6.82435 13.583 6.88569 13.4666C6.94704 13.3503 6.98483 13.223 6.99691 13.0921C7.00898 12.9611 6.9951 12.829 6.95606 12.7034C6.91702 12.5778 6.85359 12.4612 6.76939 12.3601L3.13972 8.00054H14.9987C15.2638 8.00054 15.5182 7.89519 15.7057 7.70767C15.8932 7.52015 15.9986 7.26582 15.9986 7.00063C15.9986 6.73543 15.8932 6.4811 15.7057 6.29358C15.5182 6.10606 15.2638 6.00071 14.9987 6.00071Z",fill:"#026AA2"})})]})]}),e.jsx("div",{className:"ho-table-responsive-wrapper",children:e.jsxs("table",{className:"ho-eway-table",style:{borderCollapse:"collapse",borderSpacing:"0",marginTop:"0px",width:"100%"},children:[e.jsx("thead",{style:{borderBottom:"none",padding:"0",margin:"0"},children:e.jsxs("tr",{style:{border:"none",padding:"0",margin:"0"},children:[e.jsx("th",{style:{width:"33.33%",border:"none",padding:"8px 0 8px 10px",textAlign:"left"},children:"AWB Number"}),e.jsx("th",{style:{width:"33.33%",border:"none",padding:"8px 0",textAlign:"left"},children:"Current Hub"}),e.jsx("th",{style:{width:"33.33%",border:"none",padding:"8px 0",textAlign:"left"},children:"Status"})]})}),e.jsx("tbody",{style:{padding:"0",margin:"0"},children:(X?d?.shipmentTracking?.childInfoDto:d?.shipmentTracking?.childInfoDto.slice(0,1))?.map((i,r)=>e.jsxs("tr",{style:{padding:"0",margin:"0"},children:[e.jsx("td",{style:{padding:"8px 0 8px 10px",margin:"0"},className:"ho-table-value",children:e.jsx("span",{className:"ho-link-underline",onClick:()=>L(`/shipment-details-ui?awb=${encodeURIComponent(i.awbNumber)}`,{replace:!0,state:{parentAwb:U}}),children:i.awbNumber})}),e.jsx("td",{className:"ho-table-value",style:{padding:"8px 0",margin:"0",paddingRight:"20px"},children:N(i.currentHub||"—")}),e.jsx("td",{className:"ho-table-value",style:{padding:"8px 0",margin:"0"},children:e.jsx(h.Tag,{className:"ho-badge ho-badge--blue ho-table-value",children:N(i.status||"—")})})]},r))})]})})]}),e.jsx("div",{style:{marginBottom:"16px"}})]}),e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsxs("div",{className:"ho-subtitle ho-subtitle--primary",style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"4px",marginBottom:"0px"},children:[e.jsxs("span",{className:"ho-title-left",style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("img",{src:st,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"E-way Bill Info"})]}),d?.shipmentTracking?.ewayInfo?.length>0&&e.jsxs(h.Tag,{color:"#F0F9FF",className:"ho-chip",style:{display:"flex",cursor:"pointer",alignItems:"center",gap:"4px",paddingTop:"0px"},onClick:()=>je(!0),children:[d?.shipmentTracking?.ewayInfo?.length+" E-way Bills",e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:"rotate(180deg)"},children:e.jsx("path",{d:"M14.9987 6.00071H3.13972L6.76939 1.64111C6.93912 1.43691 7.02077 1.17365 6.99639 0.909247C6.97202 0.644844 6.8436 0.400955 6.63941 0.231232C6.43521 0.0615082 6.17195 -0.0201464 5.90755 0.00423112C5.64314 0.0286087 5.39925 0.157022 5.22953 0.36122L0.229979 6.36068C0.196343 6.4084 0.166264 6.45853 0.139987 6.51067C0.139987 6.56066 0.139988 6.59066 0.0699939 6.64066C0.0246714 6.75531 0.000941037 6.87735 0 7.00063C0.000941037 7.1239 0.0246714 7.24594 0.0699939 7.36059C0.0699939 7.41059 0.0699936 7.44059 0.139987 7.49058C0.166264 7.54272 0.196343 7.59285 0.229979 7.64057L5.22953 13.64C5.32354 13.7529 5.44127 13.8437 5.57435 13.9059C5.70742 13.9681 5.85256 14.0002 5.99946 14C6.23309 14.0005 6.45951 13.9191 6.63941 13.77C6.74065 13.6861 6.82435 13.583 6.88569 13.4666C6.94704 13.3503 6.98483 13.223 6.99691 13.0921C7.00898 12.9611 6.9951 12.829 6.95606 12.7034C6.91702 12.5778 6.85359 12.4612 6.76939 12.3601L3.13972 8.00054H14.9987C15.2638 8.00054 15.5182 7.89519 15.7057 7.70767C15.8932 7.52015 15.9986 7.26582 15.9986 7.00063C15.9986 6.73543 15.8932 6.4811 15.7057 6.29358C15.5182 6.10606 15.2638 6.00071 14.9987 6.00071Z",fill:"#026AA2"})})]})]}),(!d?.shipmentTracking?.ewayInfo||d?.shipmentTracking?.ewayInfo.length===0)&&e.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"80px",fontFamily:"Roboto",fontSize:"14px",color:"#6B7280",width:"100%"},children:"No E-Way Bill Data Available"}),d?.shipmentTracking?.ewayInfo?.length>0&&e.jsx(e.Fragment,{children:e.jsx("div",{className:"ho-table-responsive-wrapper",children:e.jsxs("table",{className:"ho-eway-table",style:{borderCollapse:"collapse",width:"100%"},children:[e.jsx("thead",{style:{borderBottom:"none"},children:e.jsxs("tr",{style:{border:"none"},children:[e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0 8px 10px"},children:"E-Way Bill No"}),e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0"},children:"Created"}),e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0"},children:"Updated"}),e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0"},children:"Expiry Date"})]})}),e.jsx("tbody",{children:d?.shipmentTracking?.ewayInfo?.slice(0,1)?.map((i,r)=>e.jsxs("tr",{children:[e.jsx("td",{className:"ho-stat__value",style:{padding:"8px 0 8px 10px"},children:i.ewaybill_no||"—"}),e.jsx("td",{className:"ho-stat__value",children:W(i.eway_bill_crt_date)||"—"}),e.jsx("td",{className:"ho-stat__value",children:W(i.update_date||"-")}),e.jsx("td",{className:"ho-stat__value",children:W(i.ewb_bill_exp_date)||"—"})]},r))})]})})})]}),e.jsx(h.Modal,{title:e.jsx("span",{style:{fontFamily:"Roboto",fontWeight:500,fontSize:"16px",color:"#003371"},children:"Child Shipments"}),open:G,footer:null,onCancel:()=>D(!1),width:800,children:e.jsxs("table",{className:"ho-eway-table",style:{width:"100%"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"AWB Number"}),e.jsx("th",{children:"Current Hub"}),e.jsx("th",{children:"Status"})]})}),e.jsx("tbody",{children:d?.shipmentTracking?.childInfoDto?.map((i,r)=>e.jsxs("tr",{children:[e.jsx("td",{className:"ho-table-value",children:e.jsx("span",{className:"ho-link-underline",onClick:()=>{L(`/shipment-details-ui?awb=${encodeURIComponent(i.awbNumber)}`,{replace:!0,state:{parentAwb:U}}),D(!1)},style:{cursor:"pointer"},children:i.awbNumber})}),e.jsx("td",{className:"ho-table-value",children:N(i.currentHub||"—")}),e.jsx("td",{className:"ho-table-value",children:e.jsx(h.Tag,{className:"ho-badge ho-badge--blue",children:N(i.status||"—")})})]},r))})]})}),e.jsx(h.Modal,{title:e.jsx("span",{style:{fontFamily:"Roboto",fontWeight:500,fontSize:"16px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:"Route"}),open:Ne,onCancel:()=>Y(!1),footer:null,width:450,children:e.jsx("div",{className:"ho-route",style:{maxHeight:"70vh",overflowY:"auto",paddingRight:"10px"},children:T.length===0?e.jsx("div",{className:"ho-route__empty",children:"Route not available"}):T.map((i,r)=>e.jsxs("div",{className:"ho-route__row",children:[e.jsx("div",{className:`ho-route__node ho-route__node--${i.type}`,children:r===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:oe,alt:""})}):i.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",r]})}),e.jsx("div",{className:"ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-table-value",children:N(i.hub)}),i.type==="source"&&e.jsx("span",{className:"ho-pill ho-pill--source",children:"Source Hub"}),i.type==="to"&&e.jsx("span",{className:"ho-pill ho-pill--to",children:"To Hub"})]})})]},r))})}),e.jsx(h.Modal,{title:e.jsx("span",{style:{fontFamily:"Roboto",fontWeight:500,fontSize:"16px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:"E-way Bill Info"}),open:le,footer:null,onCancel:()=>je(!1),width:900,children:e.jsxs("table",{className:"ho-eway-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"E-Way Bill No"}),e.jsx("th",{children:"Created"}),e.jsx("th",{children:"Updated"}),e.jsx("th",{children:"Expiry Date"})]})}),e.jsx("tbody",{children:d?.shipmentTracking?.ewayInfo?.map((i,r)=>e.jsxs("tr",{children:[e.jsx("td",{className:"ho-stat__value",children:i.ewaybill_no||"—"}),e.jsx("td",{className:"ho-stat__value",children:W(i.eway_bill_crt_date)||"—"}),e.jsx("td",{className:"ho-stat__value",children:W(i.update_date||"-")}),e.jsx("td",{className:"ho-stat__value",children:W(i.ewb_bill_exp_date)||"—"})]},r))})]})}),e.jsxs("div",{className:"ho-grid ho-grid--2",children:[e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsx("div",{className:"ho-subtitle ho-subtitle--primary",children:e.jsxs("span",{className:"ho-title-left",children:[e.jsx("img",{src:st,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"Sender / Receiver Info"})]})}),e.jsxs("div",{className:"ho-grid",children:[e.jsx(ae,{label:"S - Name :",value:N(u.sender.name)}),e.jsx(ae,{label:"R - Name :",value:N(u.receiver.name)})]})]}),e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsx("div",{className:"ho-subtitle ho-subtitle--primary",children:e.jsxs("span",{className:"ho-title-left",children:[e.jsx("img",{src:nt,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"Package Information"})]})}),e.jsxs("div",{className:"ho-grid",children:[e.jsx(ae,{label:"Weight :",value:u.pkg.weight}),e.jsx(ae,{label:"Dimensions:",value:u.pkg.dimensions}),e.jsx(ae,{label:"Volumetric Wt(Kg) :",value:u.pkg.volumetric})]})]})]})]})]})}),e.jsx(h.Col,{xs:24,lg:14,children:e.jsxs(h.Row,{gutter:[16,16],children:[e.jsx(h.Col,{xs:24,lg:12,children:e.jsxs(h.Card,{className:"ho-card ho-card--equal",style:{height:q?"484px":"644px"},children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:ze,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Route"})]})}),e.jsx("div",{ref:R,className:`ho-route ${T.length===0?"ho-route--empty":""}`,style:T.length===0?{display:"flex",alignItems:"center",justifyContent:"center",minHeight:q?"400px":"560px",textAlign:"center"}:{maxHeight:q?"420px":"580px",overflow:"hidden",position:"relative"},children:T.length===0?e.jsx("span",{style:{color:"#6B7280",fontSize:"14px",fontFamily:"Roboto"},children:"Route not available"}):e.jsxs(e.Fragment,{children:[Q?T.slice(0,5).map((i,r)=>e.jsxs("div",{className:"ho-route__row",children:[e.jsx("div",{className:`ho-route__node ho-route__node--${i.type}`,children:r===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:oe,alt:"",className:"ho-route__truck"})}):i.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",r]})}),e.jsx("div",{className:"ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-table-value",children:N(i.hub)}),i.type==="source"&&e.jsx("span",{className:"ho-pill ho-pill--source",children:"Source Hub"}),i.type==="to"&&e.jsx("span",{className:"ho-pill ho-pill--to",children:"To Hub"})]})})]},r)):T.map((i,r)=>e.jsxs("div",{className:"ho-route__row",children:[e.jsx("div",{className:`ho-route__node ho-route__node--${i.type}`,children:r===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:oe,alt:"",className:"ho-route__truck"})}):i.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",r]})}),e.jsx("div",{className:"ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-table-value",children:N(i.hub)}),i.type==="source"&&e.jsx("span",{className:"ho-pill ho-pill--source",children:"Source Hub"}),i.type==="to"&&e.jsx("span",{className:"ho-pill ho-pill--to",children:"To Hub"})]})})]},r)),Q&&e.jsxs("div",{className:"ho-route__more",onClick:()=>Y(!0),children:[e.jsx("span",{className:"ho-route__more-text",children:"View More"}),e.jsx("span",{className:"ho-route__more-caret",children:"▾"})]})]})})]})}),e.jsx(h.Col,{xs:24,lg:12,children:e.jsxs(h.Card,{className:"ho-card ho-card--equal ho-audit-outer",style:{height:q?"484px":"644px"},bodyStyle:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[e.jsxs("div",{className:"ho-section-title",children:[e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:ze,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Audit Info"})]}),S.length>0&&e.jsxs(h.Tag,{color:"#E9F2FF",className:"ho-chip",children:[S.length," Audit",S.length!==1?"s":""]})]}),e.jsxs("div",{className:"ho-list",style:{flex:1,display:"flex",flexDirection:"column",gap:"12px",overflow:"hidden"},children:[!S.length&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"auto",textAlign:"center",width:"100%",fontFamily:"Roboto",fontSize:"14px",color:"#6B7280"},children:"No audit info available"}),S.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"ho-list__item",onClick:()=>x(m==="audit-master"?null:"audit-master"),children:[e.jsxs("span",{className:"ho-strong",children:["Weight(",S.length,")"]}),e.jsx("span",{className:`ho-list__chevron ${m==="audit-master"?"ho-open":""}`,children:"▾"})]}),m==="audit-master"&&e.jsx("div",{className:"ho-expand-block",style:{flex:1,overflowY:"auto",maxHeight:"none",display:"flex",flexDirection:"column",gap:"10px"},children:S.map((i,r)=>e.jsxs(h.Card,{className:"ho-subcard ho-mt-10 ho-audit-inner",children:[e.jsxs("div",{className:"ho-audit-header-grid",children:[e.jsxs("div",{className:"ho-kv-stack",children:[e.jsx("span",{className:"ho-stat__label",children:"Audited By"}),e.jsx(h.Tooltip,{title:N(i.auditMethod||"—"),children:e.jsx("span",{className:"ho-stat__value--audit",children:N(i.auditMethod||"—")})})]}),e.jsxs("div",{className:"ho-kv-stack",children:[e.jsx("span",{className:"ho-stat__label",children:"Hub Name"}),e.jsx(h.Tooltip,{title:N(i.auditedHubName||"—"),children:e.jsx("span",{className:"ho-stat__value--audit",children:i.auditedHubName&&i.auditedHubName.length>7?N(i.auditedHubName).substring(0,7)+"...":N(i.auditedHubName||"—")})})]}),e.jsxs("div",{className:"ho-kv-stack",children:[e.jsx("span",{className:"ho-stat__label",children:"Audited Date"}),e.jsx("span",{className:"ho-stat__value--audit",children:i.auditTimestamp?i.auditTimestamp.replace(" "," | "):"—"})]})]}),e.jsx("div",{style:{height:"12px"}}),e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsx("div",{className:"ho-subtitle-audit",children:"Audited Value"}),e.jsxs("div",{className:"ho-grid",children:[e.jsx(Ie,{label:"Actual",value:i.auditedWeight||"—",isAudit:!0,icon:js},`ah-${r}`),e.jsx(Ie,{label:"Volumetric",value:i.volumetricAuditedValue||"—",isAudit:!0,icon:ys},`sh-${r}`),e.jsx(Ie,{label:"LWH(cm)",value:i.auditedLength+","+i.auditedWidth+","+i.auditedHeight||"—",icon:Ns},`sh-${r}`)]})]}),e.jsxs("div",{className:"ho-note",children:[e.jsx("span",{style:{color:"#000",fontWeight:600},children:"Note:"})," ","Audited actual weight is"," ",i.weightDiff!=null?`${i.weightDiff>=0?"higher":"lower"} by ${Math.abs(i.weightDiff).toFixed(2)} %.`:"—"]})]},`audit-card-${r}`))})]})]})]})}),q&&e.jsx(h.Col,{xs:24,lg:24,children:e.jsxs(h.Card,{className:"ho-card ho-card--equal",style:{height:"136px",borderRadius:"24px",width:"100%"},children:[q&&e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"18px",fontWeight:700,color:"#003371"},children:f?.ticketNumber||"N/A"}),e.jsxs("div",{style:{marginTop:"8px",fontSize:"14px",color:"#344054"},children:[e.jsx("span",{style:{color:"#667085"},children:"Title : "}),e.jsx("span",{style:{fontWeight:600,color:"#003371"},children:f?.title||"—"})]})]}),e.jsxs(h.Tag,{color:"#FFF8EB",style:{color:"#B54708",border:"1px solid #FEDF89",borderRadius:"16px",padding:"4px 12px",fontWeight:600,display:"flex",alignItems:"center",gap:"6px",fontSize:"12px"},children:[e.jsx("span",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:"#F79009"}}),f?.status?.name||"In Progress"]})]}),q&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{margin:"12px 0",borderBottom:"1px dashed #D0D5DD"}}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px",alignItems:"center",color:"#667085",fontSize:"13px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsx(jt,{})," Reported By ",N(f?.reportedBy||"—")]}),f?.reportedDate&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#D0D5DD"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsx(Ct,{})," ",f.reportedDate]})]}),e.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#D0D5DD"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsx(bt,{})," Assigned To ",f?.assignedTo?N(f.assignedTo):"—"]})]})]})]})})]})}),e.jsx(h.Col,{span:24,children:e.jsxs(h.Card,{className:"ho-card",children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:Nt,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Travel Info"})]})}),e.jsx(h.Table,{className:"ho-table",columns:pe,dataSource:ue,pagination:!1,scroll:{x:1e3}})]})})]})})})}const at="data:image/svg+xml,%3csvg%20width='16'%20height='14'%20viewBox='0%200%2016%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.9987%206.00071H3.13972L6.76939%201.64111C6.93912%201.43691%207.02077%201.17365%206.99639%200.909247C6.97202%200.644844%206.8436%200.400955%206.63941%200.231232C6.43521%200.0615082%206.17195%20-0.0201464%205.90755%200.00423112C5.64314%200.0286087%205.39925%200.157022%205.22953%200.36122L0.229979%206.36068C0.196343%206.4084%200.166264%206.45853%200.139987%206.51067C0.139987%206.56066%200.139988%206.59066%200.0699939%206.64066C0.0246714%206.75531%200.000941037%206.87735%200%207.00063C0.000941037%207.1239%200.0246714%207.24594%200.0699939%207.36059C0.0699939%207.41059%200.0699936%207.44059%200.139987%207.49058C0.166264%207.54272%200.196343%207.59285%200.229979%207.64057L5.22953%2013.64C5.32354%2013.7529%205.44127%2013.8437%205.57435%2013.9059C5.70742%2013.9681%205.85256%2014.0002%205.99946%2014C6.23309%2014.0005%206.45951%2013.9191%206.63941%2013.77C6.74065%2013.6861%206.82435%2013.583%206.88569%2013.4666C6.94704%2013.3503%206.98483%2013.223%206.99691%2013.0921C7.00898%2012.9611%206.9951%2012.829%206.95606%2012.7034C6.91702%2012.5778%206.85359%2012.4612%206.76939%2012.3601L3.13972%208.00054H14.9987C15.2638%208.00054%2015.5182%207.89519%2015.7057%207.70767C15.8932%207.52015%2015.9986%207.26582%2015.9986%207.00063C15.9986%206.73543%2015.8932%206.4811%2015.7057%206.29358C15.5182%206.10606%2015.2638%206.00071%2014.9987%206.00071Z'%20fill='%23231F20'/%3e%3c/svg%3e",ws="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.6654%209.99967V12.5923C12.6654%2014.0755%2012.175%2014.6663%2010.5913%2014.6663H5.4061C3.92281%2014.6663%203.33203%2014.1759%203.33203%2012.5923V9.99967C3.33203%207.42234%205.42137%205.33301%207.9987%205.33301C10.576%205.33301%2012.6654%207.42234%2012.6654%209.99967Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.6654%209.99967C10.6654%208.52694%209.47143%207.33301%207.9987%207.33301C6.52594%207.33301%205.33203%208.52694%205.33203%209.99967'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M8%2011.3333L8.66667%2010'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.8762%203.33301H5.12634C4.53728%203.33301%204.24274%203.33301%203.98358%203.23165C3.89749%203.19798%203.81514%203.15633%203.73774%203.10733C3.50472%202.95979%203.34135%202.72823%203.0146%202.26511C2.75994%201.90417%202.63261%201.7237%202.6765%201.57614C2.6904%201.52945%202.7149%201.48619%202.7483%201.44937C2.8539%201.33301%203.08344%201.33301%203.54253%201.33301H12.4601C12.9192%201.33301%2013.1487%201.33301%2013.2543%201.44937C13.2877%201.48619%2013.3122%201.52945%2013.3261%201.57614C13.37%201.7237%2013.2426%201.90417%2012.988%202.26511C12.6612%202.72823%2012.4979%202.9598%2012.2648%203.10733C12.1874%203.15633%2012.1051%203.19798%2012.019%203.23165C11.7598%203.33301%2011.4653%203.33301%2010.8762%203.33301Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M9.33464%205.33301V3.33301M6.66797%205.33301V3.33301'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3c/svg%3e",ks="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.66699%205.33333L8.00033%202.66667L13.3337%205.33333V10.6667L8.00033%2013.3333L2.66699%2010.6667V5.33333Z'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8%206V10'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.667%207.33333V9.33333'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M5.33301%207.33301V9.33301'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3c/svg%3e";var Se={};function M(s){if(s==null)return"";const t=String(s).replace(/[_-]+/g," ").replace(/\s+/g," ").trim().toLowerCase();return t?t.replace(/\b\w/g,n=>n.toUpperCase()):""}function vt(s){if(!s)return"—";const t=new Date(s);if(isNaN(t.getTime()))return"—";const n=a=>String(a).padStart(2,"0");return n(t.getDate())+"-"+n(t.getMonth()+1)+"-"+t.getFullYear()+" "+n(t.getHours())+":"+n(t.getMinutes())+":"+n(t.getSeconds())}const Ms=[{title:"Date and Time",dataIndex:"time",key:"time",render:s=>e.jsx("span",{className:"ho-nowrap",children:s?vt(s):"—"})},{title:"Location",dataIndex:"location",key:"location",render:s=>s?M(s):"—"},{title:"Process",dataIndex:"process",key:"process",render:(s,t)=>{const n=(s||"").toString().toUpperCase(),o=["REMOVED_FROM_BAG","REMOVED_FROM_LCR","ATTEMPTED","MIS_ROUTED","UNDELIVERED"].includes(n),l=n==="OUT_SCAN_TO_CP"||n==="IN_BAG_OUT_CP",p=t?.toPremisename&&t.toPremisename!=="-"?M(t.toPremisename):"",m=l?`${M(s)} → ${p}`:M(s),x=o?{color:"#e14949",borderColor:"#ffd5d5",background:"#ffecec"}:{color:"#1f7a48",borderColor:"#cfeede",background:"#e9fff1"},d=`ho-tag ${o?"ho-tag--danger":"ho-tag--success"}`;return e.jsx(h.Tag,{style:x,className:d,children:m})}},{title:"User",dataIndex:"user",key:"user"},{title:"Exception",dataIndex:"exception",key:"exception",render:s=>s||"-"},{title:"Remark",dataIndex:"remark",key:"remark",render:(s,t)=>{if(!s)return"-";const n=(t?.process||"").toString().toUpperCase(),a=n.includes("OUTSCAN")&&n!=="HUB-OUTSCAN"||n==="SCHEDULED_FOR_TRIP",o=s.indexOf("LCR No:"),l=o>=0,p=l?s.slice(0,o):s,m=l?s.slice(o):"",x=l?(m.replace(/^[^:]*:\s*/i,"")||"").trim():"";return e.jsxs("span",{children:[p,l?e.jsxs(e.Fragment,{children:[e.jsx("strong",{className:"ho-remark-strong",children:"LCR No: "}),e.jsx("a",{className:"ho-link",onClick:()=>{sessionStorage.setItem("LCR_REPORT_RECORD",JSON.stringify({vehicle_lcr_id:x})),window.open(window.location.origin+"/lcr-report","_blank")},children:x})]}):null,a?e.jsx(h.Tooltip,{placement:"top",title:e.jsxs("div",{children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Co-loader:"})," ",M(t.coLoader||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Transport type:"})," ",M(t.transportType||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Flight Name:"})," ",t.flightName?M(t.flightName):"N/A"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Vehicle No:"})," ",t.vehicleNo||"—"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Driver Name:"})," ",M(t.driverName||"—")]})]}),children:e.jsx("span",{className:"ho-alert-dot"})}):null]})}}];function Is({endpoint:s,awbNumber:t,showBackArrow:n=!1,allowShipmentFallback:a=!0}){const o=fe.useNavigate(),l=fe.useLocation(),[p,m]=C.useState(null),[x,d]=C.useState(!1),[j,I]=C.useState(!1),[O,B]=C.useState(!1),L=C.useRef(Se.NODE_ENV==="development"),[X,$]=C.useState(!1),le=()=>{window.history.length<=1?window.close():o(-1)},Ne=new URLSearchParams(l.search).get("endpoint"),Y=s||Ne||Se.REACT_APP_TRACKING_ENDPOINT,G=C.useMemo(()=>{if(t)return t;const c=new URLSearchParams(l.search);return c.get("awb")||c.get("awbNumber")||""},[t,l.search]);C.useEffect(()=>{let c=!1;return Se.NODE_ENV==="development"&&L.current?(L.current=!1,()=>{c=!0}):((async()=>{try{if(d(!0),!G){m(null);return}const v=`${Y}?awbNumber=${encodeURIComponent(G)}`,u=await fetch(v);if(!u.ok)throw new Error("Request failed");const _=await u.json();c||m(_)}catch{c||m(null)}finally{c||d(!1)}})(),()=>{c=!0})},[Y,G]);const D=p?.baggingTracking,R=D?.baggingInfo,Q=D?.travelInfoDto||p?.shipmentTracking?.travelDtos||[],ce=R?.bag_barcode||Q.find(c=>(c?.bagBarCode||c?.bagbarcode)&&(c?.bagBarCode||c?.bagbarcode)!=="-")?.bagBarCode||"—",de=C.useMemo(()=>{try{return(Q||[]).filter(f=>(f?.status||"").toUpperCase()==="BAG_CREATED").map(f=>f?.date).filter(Boolean).sort()[0]||null}catch{return null}},[Q]),H=(()=>{const c=D?.route_info||p?.shipmentTracking?.route_info;if(!c)return[];const f=Array.isArray(c)?c.filter(u=>u&&u!=="null"&&u!==""):[];if(f.length===0)return[];const v=u=>{if(!u)return"";try{const _=u.split(" ")[0].split("-");return`${_[2]}-${_[1]}-${_[0]}`}catch{return u}};return f.map((u,_,T)=>({hub:u,date:v(D?.travelInfoDto?.[_]?.date),type:_===0?"source":_===T.length-1?"to":"transit"}))})(),U=c=>{const f=he[c];return f?f.bagIn&&!f.bagOut?"bag-chip--in":!f.bagIn&&f.bagOut?"bag-chip--out":"ho-badge--blue":"ho-badge--blue"},ye=(Array.isArray(Q)?Q:[]).map((c,f)=>{const v=c?.status||c?.process||c?.event||"-",u=(v||"").toUpperCase(),_=c?.premisename||c?.location||"",T=c?.topremisename||c?.toPremisename||c?.toPremiseName||"",ue=`Scheduled Outscan from ${M(_)} to ${M(T)}`,pe=c.lcrnum||c.lcrNum||c.lcr_no||c.lcrNo||"",ge=pe?`${ue} — LCR No: ${pe}`:ue;return{key:f,time:c?.date||"-",location:c?.premisename||c?.location||"-",toPremisename:c?.topremisename||c?.toPremiseName||"-",process:v,bag:c?.bagBarCode||"-",user:c?.user||"-",exception:c.exception||(c.isException,"-"),remark:u==="SCHEDULED_FOR_TRIP"?ge:c?.remarks||"-",coLoader:c?.coloader||"—",transportType:c?.travelby||"—",flightName:c?.flightnum||"N/A",vehicleNo:c?.vehiclenum||"—",driverName:c?.drivername||"—"}}),g=D?.bagShipmentNo||p?.shipmentTracking?.children?.map(c=>c.awbNumber)||[],he=C.useMemo(()=>{const c=D?.bagShipmentDetails||[],f={};return c.forEach(v=>{f[v.barcode]={bagIn:v.bagIn,bagOut:v.bagOut}}),f},[D]),S=!!(D&&(R||Array.isArray(D?.travelInfoDto)&&D.travelInfoDto.length||Array.isArray(D?.bagShipmentNo)&&D.bagShipmentNo.length));return p?.shipmentTracking&&p?.shipmentTracking?.bookingInfoDto,!x&&p?.baggingTracking===null&&a?e.jsx(At,{awbNumber:G,endpoint:Y,data:p}):!x&&!S?e.jsx(h.Spin,{spinning:x&&!p,indicator:e.jsx("img",{src:Ce,style:{height:"100px",width:"100px"}}),children:e.jsxs("div",{className:"bag-details-page",children:[e.jsxs("p",{className:"master-title-head",style:{marginBottom:"5px"},children:[n&&e.jsx("img",{src:at,onClick:le,className:"pointer"}),e.jsx("span",{children:"Bag Details"})]}),e.jsx("div",{className:"bag-empty",children:e.jsxs(h.Card,{className:"ho-card bag-empty__card",children:[e.jsx("div",{className:"ho-section-title bag-empty__title",children:e.jsx("span",{className:"ho-title",children:"Details Not Found"})}),e.jsxs("div",{className:"bag-empty__text",children:["No details found for the provided Bag number:",e.jsxs("strong",{children:[" ",G?.replace(/\+/g,"/")," "]}),e.jsx("br",{}),"Please check the Bag number and try again."]})]})})]})}):e.jsx(h.Spin,{spinning:x&&!p,indicator:e.jsx("img",{src:Ce,style:{height:"100px",width:"100px"}}),children:e.jsxs("div",{className:"bag-details-page",children:[e.jsxs("p",{className:"master-title-head",style:{marginBottom:"5px",marginTop:"6px"},children:[n&&e.jsx("img",{src:at,onClick:le,className:"pointer"}),e.jsx("span",{children:"Bag Details"})]}),e.jsxs(h.Row,{gutter:[16,16],children:[e.jsx(h.Col,{xs:24,lg:12,children:e.jsxs(h.Card,{className:"ho-card ho-card--equal",children:[e.jsxs("div",{className:"ho-section-title",children:[e.jsxs("div",{className:"ho-subheader__value",children:[e.jsxs("span",{className:"ho-kv-stack",children:[e.jsx("span",{className:"ho-muted",children:"Bag number"}),e.jsx("span",{className:"ho-strong",children:ce})]}),e.jsx(h.Tag,{className:"ho-badge ho-badge--blue",children:"Bag Created"})]}),e.jsx("div",{className:"ho-chip",children:e.jsxs("span",{className:"ho-chip__value",style:{display:"flex",gap:6,whiteSpace:"nowrap"},children:[e.jsx("span",{style:{color:"#344054"},children:"Bag Created:"}),e.jsx("span",{children:de?vt(de):"—"})]})})]}),e.jsx("div",{className:"ho-box ho-box--flush",children:e.jsxs("div",{className:"ho-stats",children:[e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Content Type"}),e.jsx("div",{className:"ho-stat__value",children:M(R?.contentType||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Type"}),e.jsx("div",{className:"ho-stat__value",children:M(R?.bagType||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Mode"}),e.jsx("div",{className:"ho-stat__value",children:M(R?.mode||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Product"}),e.jsx("div",{className:"ho-stat__value",children:M(R?.product||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:R?.cpId?"Destination CP":"Destination Hub"}),e.jsx("div",{className:"ho-stat__value",children:R?.cpId?M(R?.cpName||"—"):M(R?.destinationHubName||"—")})]})]})}),e.jsx("div",{className:"ho-box",children:e.jsxs("div",{className:"ho-grid",children:[e.jsxs("div",{className:"ho-metric",style:{display:"flex",justifyContent:"space-between"},children:[e.jsxs("span",{className:"ho-kv__label",children:[e.jsx("img",{src:ws,className:"ho-kv-icon",alt:""}),"Bag Weight :"]}),e.jsx("span",{className:"ho-kv__value",style:{color:"#027A48",fontWeight:600},children:R?.bagWeight??"—"})]}),e.jsxs("div",{className:"ho-metric",style:{display:"flex",justifyContent:"space-between"},children:[e.jsxs("span",{className:"ho-kv__label",children:[e.jsx("img",{src:ks,className:"ho-kv-icon",alt:""}),"Total Volumetric Weight :"]}),e.jsx("span",{className:"ho-kv__value",style:{color:"#027A48",fontWeight:600},children:R?.totalWeight??"—"})]})]})})]})}),e.jsx(h.Col,{xs:24,lg:12,children:e.jsxs(h.Row,{gutter:[16,16],children:[e.jsx(h.Col,{span:24,children:e.jsxs(h.Card,{className:"ho-card ho-card--equal",children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:ze,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Bag Route"})]})}),e.jsx("div",{className:`ho-route ${H.length===0?"ho-route--empty":""}`,children:H.length===0?e.jsx("div",{className:"ho-route__empty",children:"Bag Route not available"}):e.jsxs(e.Fragment,{children:[H.slice(0,4).map((c,f)=>e.jsxs("div",{className:`ho-route__row ${c.type==="to"?"ho-route__row--to":""}`,children:[e.jsx("div",{children:f===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--transit",children:e.jsx("img",{src:oe,alt:"",className:"ho-route__truck"})}):c.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",f]})}),e.jsx("div",{className:"ho-route__content",children:e.jsx("span",{className:"ho-route__title",children:M(c.hub)})})]},f)),H.length>4&&e.jsxs("div",{className:"ho-route__more",onClick:()=>B(!0),children:[e.jsx("span",{className:"ho-route__more-text",children:"View More"}),e.jsx("span",{className:"ho-route__more-caret",children:"▾"})]})]})}),e.jsx(h.Modal,{open:O,title:"Bag Route",footer:null,onCancel:()=>B(!1),width:420,children:e.jsx("div",{className:"shipment-route-modal",children:H.map((c,f)=>e.jsxs("div",{className:"shipment-route-item",children:[e.jsxs("div",{className:"shipment-route-timeline",children:[e.jsx("div",{className:`route-dot route-dot--circle ${c.type}`,children:c.type==="source"?e.jsx("img",{src:oe,alt:"Source Hub"}):c.type==="to"?e.jsx("img",{src:re,alt:"To Hub"}):e.jsxs("span",{className:"ho-route__tag--transit",children:["T",f]})}),f!==H.length-1&&e.jsx("div",{className:"route-line"})]}),e.jsx("div",{className:"shipment-route-content ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-route__title",children:M(c.hub)}),c.type==="source"&&e.jsx("span",{className:"route-badge route-badge--source",children:"Source Hub"}),c.type==="to"&&e.jsx("span",{className:"route-badge route-badge--to",children:"To Hub"})]})})]},f))})})]})}),e.jsx(h.Col,{span:24,children:e.jsxs(h.Card,{className:"ho-card ho-card--equal",children:[e.jsxs("div",{className:"ho-section-title",children:[e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:Nt,className:"ho-title-icon",alt:""}),e.jsxs("span",{style:{fontFamily:"Roboto",fontWeight:700,fontSize:"20px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:["Shipments ",g.length>0&&`(${g.length})`]})]}),g.length>0&&e.jsxs("div",{className:"ho-inline",children:[e.jsx("span",{className:"ho-chip bag-chip bag-chip--in",children:"Bag In"}),e.jsx("span",{className:"ho-chip bag-chip bag-chip--out",children:"Bag Out"})]})]}),e.jsx("div",{className:"ho-inline",style:{flexWrap:"wrap",gap:8,width:"100%",display:"flex",justifyContent:"center",alignItems:"center",minHeight:"40px"},children:g.length===0?e.jsx("div",{style:{textAlign:"center",color:"#667085",fontSize:"14px",fontWeight:400},children:"Shipment not available"}):e.jsxs(e.Fragment,{children:[g.slice(0,5).map((c,f)=>e.jsx(h.Tag,{className:`ho-badge pointer ${U(c)}`,style:{marginBottom:8,textDecoration:"underline"},onClick:()=>o(`/shipment-tracker?awb=${c}`),children:c},f)),g.length>5&&e.jsx("span",{onClick:()=>$(!0),style:{cursor:"pointer",color:"#0066CC",textDecoration:"underline",marginLeft:10,fontWeight:600},children:"View More ▾"})]})})]})}),e.jsx(h.Modal,{open:X,title:e.jsxs("div",{style:{fontFamily:"Roboto",fontWeight:700,fontSize:"20px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:["Shipments ",g.length>0&&`(${g.length})`]}),footer:null,onCancel:()=>$(!1),width:450,children:e.jsx("div",{style:{maxHeight:"400px",overflowY:"auto",padding:"10px 5px"},children:g.map((c,f)=>e.jsx(h.Tag,{className:`ho-badge pointer ${U(c)}`,style:{marginBottom:8,display:"inline-block",textDecoration:"underline"},onClick:()=>o(`/shipment-tracker?awb=${c}`),children:c},f))})})]})}),e.jsx(h.Col,{span:24,children:e.jsxs(h.Card,{className:"ho-card",children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:yt,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Travel Info"})]})}),e.jsx(h.Table,{className:"ho-table",columns:Ms,dataSource:ye,rowKey:"key",pagination:!1})]})})]})]})})}exports.BagDetailsUI=Is;exports.ShipmentDetailsUI=At;
|
|
@@ -1234,7 +1234,8 @@ function zn({ endpoint: n, awbNumber: t, data: a }) {
|
|
|
1234
1234
|
"REMOVED_FROM_LCR",
|
|
1235
1235
|
"OUT_SCAN_TO_3PL",
|
|
1236
1236
|
"LOST",
|
|
1237
|
-
"DAMAGED"
|
|
1237
|
+
"DAMAGED",
|
|
1238
|
+
"SHORTAGE"
|
|
1238
1239
|
].includes((o.status || "").toUpperCase()) ? o.premiseName || "—" : o.toPremisename || o.toPremiseName || "—",
|
|
1239
1240
|
locationPremiseName: ["IN_BAG_OUTSCAN_TO_CP", "OUT_SCAN_TO_CP"].includes(
|
|
1240
1241
|
(o.status || "").toUpperCase()
|