From 1e6cc64ac7ac79527778b9276d79694779226c18 Mon Sep 17 00:00:00 2001 From: dharaneesh-r Date: Fri, 12 Jun 2026 10:55:34 +0530 Subject: [PATCH] updates on the build for the design --- build/asset-manifest.json | 38 +++++++++---------- build/index.html | 2 +- ...3c11.chunk.css => 6509.ab611cf0.chunk.css} | 2 +- ...b83b.chunk.css => 6666.5a41aae9.chunk.css} | 2 +- build/static/js/1148.1f747cf9.chunk.js | 1 + build/static/js/1148.ffa93df1.chunk.js | 1 - build/static/js/1222.8e2c3312.chunk.js | 1 - build/static/js/1222.c89bcf10.chunk.js | 1 + build/static/js/1504.61c5a37b.chunk.js | 1 - build/static/js/1504.c6771267.chunk.js | 1 + build/static/js/181.03ad68d3.chunk.js | 1 + build/static/js/181.d5552073.chunk.js | 1 - build/static/js/2533.ca2d198d.chunk.js | 1 + build/static/js/2533.ef2d33a7.chunk.js | 1 - build/static/js/2851.3a0ed207.chunk.js | 1 + build/static/js/2851.b582cabe.chunk.js | 1 - build/static/js/3723.8624a149.chunk.js | 1 + build/static/js/3723.f0610be4.chunk.js | 1 - build/static/js/4793.84e511ac.chunk.js | 1 - build/static/js/4793.a677f2ac.chunk.js | 1 + build/static/js/4947.a675ba1a.chunk.js | 1 + build/static/js/4947.c561ede9.chunk.js | 1 - build/static/js/6165.266ba693.chunk.js | 1 + build/static/js/6165.733094c1.chunk.js | 1 - ...8d718f.chunk.js => 6666.2278dc7d.chunk.js} | 2 +- build/static/js/6849.2250b254.chunk.js | 1 + build/static/js/6849.9b9d612c.chunk.js | 1 - build/static/js/7157.5fea29d8.chunk.js | 1 - build/static/js/7157.99d280ab.chunk.js | 1 + build/static/js/8846.23c0ba58.chunk.js | 1 - build/static/js/8846.90c19cd6.chunk.js | 1 + build/static/js/9521.15393fd8.chunk.js | 1 - build/static/js/9521.f9f30508.chunk.js | 1 + .../js/{main.27e2deb8.js => main.144619ee.js} | 4 +- ...CENSE.txt => main.144619ee.js.LICENSE.txt} | 0 35 files changed, 39 insertions(+), 39 deletions(-) rename build/static/css/{6509.04ba3c11.chunk.css => 6509.ab611cf0.chunk.css} (99%) rename build/static/css/{6666.a79ab83b.chunk.css => 6666.5a41aae9.chunk.css} (90%) create mode 100644 build/static/js/1148.1f747cf9.chunk.js delete mode 100644 build/static/js/1148.ffa93df1.chunk.js delete mode 100644 build/static/js/1222.8e2c3312.chunk.js create mode 100644 build/static/js/1222.c89bcf10.chunk.js delete mode 100644 build/static/js/1504.61c5a37b.chunk.js create mode 100644 build/static/js/1504.c6771267.chunk.js create mode 100644 build/static/js/181.03ad68d3.chunk.js delete mode 100644 build/static/js/181.d5552073.chunk.js create mode 100644 build/static/js/2533.ca2d198d.chunk.js delete mode 100644 build/static/js/2533.ef2d33a7.chunk.js create mode 100644 build/static/js/2851.3a0ed207.chunk.js delete mode 100644 build/static/js/2851.b582cabe.chunk.js create mode 100644 build/static/js/3723.8624a149.chunk.js delete mode 100644 build/static/js/3723.f0610be4.chunk.js delete mode 100644 build/static/js/4793.84e511ac.chunk.js create mode 100644 build/static/js/4793.a677f2ac.chunk.js create mode 100644 build/static/js/4947.a675ba1a.chunk.js delete mode 100644 build/static/js/4947.c561ede9.chunk.js create mode 100644 build/static/js/6165.266ba693.chunk.js delete mode 100644 build/static/js/6165.733094c1.chunk.js rename build/static/js/{6666.d98d718f.chunk.js => 6666.2278dc7d.chunk.js} (62%) create mode 100644 build/static/js/6849.2250b254.chunk.js delete mode 100644 build/static/js/6849.9b9d612c.chunk.js delete mode 100644 build/static/js/7157.5fea29d8.chunk.js create mode 100644 build/static/js/7157.99d280ab.chunk.js delete mode 100644 build/static/js/8846.23c0ba58.chunk.js create mode 100644 build/static/js/8846.90c19cd6.chunk.js delete mode 100644 build/static/js/9521.15393fd8.chunk.js create mode 100644 build/static/js/9521.f9f30508.chunk.js rename build/static/js/{main.27e2deb8.js => main.144619ee.js} (72%) rename build/static/js/{main.27e2deb8.js.LICENSE.txt => main.144619ee.js.LICENSE.txt} (100%) diff --git a/build/asset-manifest.json b/build/asset-manifest.json index ea3603d..71eef06 100644 --- a/build/asset-manifest.json +++ b/build/asset-manifest.json @@ -1,8 +1,8 @@ { "files": { "main.css": "/static/css/main.b85b0dd8.css", - "main.js": "/static/js/main.27e2deb8.js", - "static/js/3723.f0610be4.chunk.js": "/static/js/3723.f0610be4.chunk.js", + "main.js": "/static/js/main.144619ee.js", + "static/js/3723.8624a149.chunk.js": "/static/js/3723.8624a149.chunk.js", "static/js/2898.3b8c86cc.chunk.js": "/static/js/2898.3b8c86cc.chunk.js", "static/js/6390.ca813cc4.chunk.js": "/static/js/6390.ca813cc4.chunk.js", "static/js/3176.69a86f42.chunk.js": "/static/js/3176.69a86f42.chunk.js", @@ -10,28 +10,28 @@ "static/js/5770.335ad879.chunk.js": "/static/js/5770.335ad879.chunk.js", "static/js/2142.8437472d.chunk.js": "/static/js/2142.8437472d.chunk.js", "static/js/4612.9e7024f7.chunk.js": "/static/js/4612.9e7024f7.chunk.js", - "static/js/1504.61c5a37b.chunk.js": "/static/js/1504.61c5a37b.chunk.js", - "static/js/7157.5fea29d8.chunk.js": "/static/js/7157.5fea29d8.chunk.js", - "static/js/4947.c561ede9.chunk.js": "/static/js/4947.c561ede9.chunk.js", + "static/js/1504.c6771267.chunk.js": "/static/js/1504.c6771267.chunk.js", + "static/js/7157.99d280ab.chunk.js": "/static/js/7157.99d280ab.chunk.js", + "static/js/4947.a675ba1a.chunk.js": "/static/js/4947.a675ba1a.chunk.js", "static/js/7221.434a49d6.chunk.js": "/static/js/7221.434a49d6.chunk.js", - "static/js/2851.b582cabe.chunk.js": "/static/js/2851.b582cabe.chunk.js", - "static/js/9521.15393fd8.chunk.js": "/static/js/9521.15393fd8.chunk.js", - "static/js/6165.733094c1.chunk.js": "/static/js/6165.733094c1.chunk.js", + "static/js/2851.3a0ed207.chunk.js": "/static/js/2851.3a0ed207.chunk.js", + "static/js/9521.f9f30508.chunk.js": "/static/js/9521.f9f30508.chunk.js", + "static/js/6165.266ba693.chunk.js": "/static/js/6165.266ba693.chunk.js", "static/js/9912.a8585d14.chunk.js": "/static/js/9912.a8585d14.chunk.js", "static/js/6248.d7ba49cb.chunk.js": "/static/js/6248.d7ba49cb.chunk.js", - "static/js/1148.ffa93df1.chunk.js": "/static/js/1148.ffa93df1.chunk.js", + "static/js/1148.1f747cf9.chunk.js": "/static/js/1148.1f747cf9.chunk.js", "static/css/9592.d6bfd15f.chunk.css": "/static/css/9592.d6bfd15f.chunk.css", "static/js/9592.bfbbd05d.chunk.js": "/static/js/9592.bfbbd05d.chunk.js", "static/js/54.5a2100fd.chunk.js": "/static/js/54.5a2100fd.chunk.js", "static/js/2638.bc119b66.chunk.js": "/static/js/2638.bc119b66.chunk.js", - "static/js/4793.84e511ac.chunk.js": "/static/js/4793.84e511ac.chunk.js", + "static/js/4793.a677f2ac.chunk.js": "/static/js/4793.a677f2ac.chunk.js", "static/js/7875.9e6056f7.chunk.js": "/static/js/7875.9e6056f7.chunk.js", - "static/js/6849.9b9d612c.chunk.js": "/static/js/6849.9b9d612c.chunk.js", + "static/js/6849.2250b254.chunk.js": "/static/js/6849.2250b254.chunk.js", "static/css/8846.d6bfd15f.chunk.css": "/static/css/8846.d6bfd15f.chunk.css", - "static/js/8846.23c0ba58.chunk.js": "/static/js/8846.23c0ba58.chunk.js", - "static/js/181.d5552073.chunk.js": "/static/js/181.d5552073.chunk.js", + "static/js/8846.90c19cd6.chunk.js": "/static/js/8846.90c19cd6.chunk.js", + "static/js/181.03ad68d3.chunk.js": "/static/js/181.03ad68d3.chunk.js", "static/js/4263.640b9077.chunk.js": "/static/js/4263.640b9077.chunk.js", - "static/js/2533.ef2d33a7.chunk.js": "/static/js/2533.ef2d33a7.chunk.js", + "static/js/2533.ca2d198d.chunk.js": "/static/js/2533.ca2d198d.chunk.js", "static/js/238.33695a38.chunk.js": "/static/js/238.33695a38.chunk.js", "static/js/8954.4813af23.chunk.js": "/static/js/8954.4813af23.chunk.js", "static/js/2548.501e5a58.chunk.js": "/static/js/2548.501e5a58.chunk.js", @@ -41,8 +41,8 @@ "static/js/2660.8ec125e1.chunk.js": "/static/js/2660.8ec125e1.chunk.js", "static/js/6.25ff8786.chunk.js": "/static/js/6.25ff8786.chunk.js", "static/js/9925.4a94ad25.chunk.js": "/static/js/9925.4a94ad25.chunk.js", + "static/js/1222.c89bcf10.chunk.js": "/static/js/1222.c89bcf10.chunk.js", "static/js/7922.5b607201.chunk.js": "/static/js/7922.5b607201.chunk.js", - "static/js/1222.8e2c3312.chunk.js": "/static/js/1222.8e2c3312.chunk.js", "static/js/3999.847bb360.chunk.js": "/static/js/3999.847bb360.chunk.js", "static/js/6150.41b0a8b5.chunk.js": "/static/js/6150.41b0a8b5.chunk.js", "static/js/7980.893651c1.chunk.js": "/static/js/7980.893651c1.chunk.js", @@ -79,10 +79,10 @@ "static/js/7099.f09d5814.chunk.js": "/static/js/7099.f09d5814.chunk.js", "static/js/7537.36826a6b.chunk.js": "/static/js/7537.36826a6b.chunk.js", "static/js/1425.51f16953.chunk.js": "/static/js/1425.51f16953.chunk.js", - "static/css/6666.a79ab83b.chunk.css": "/static/css/6666.a79ab83b.chunk.css", - "static/js/6666.d98d718f.chunk.js": "/static/js/6666.d98d718f.chunk.js", + "static/css/6666.5a41aae9.chunk.css": "/static/css/6666.5a41aae9.chunk.css", + "static/js/6666.2278dc7d.chunk.js": "/static/js/6666.2278dc7d.chunk.js", "static/js/23.16c886f8.chunk.js": "/static/js/23.16c886f8.chunk.js", - "static/css/6509.04ba3c11.chunk.css": "/static/css/6509.04ba3c11.chunk.css", + "static/css/6509.ab611cf0.chunk.css": "/static/css/6509.ab611cf0.chunk.css", "static/media/aiImage.png": "/static/media/aiImage.89c2ccb91a41d85031e3.png", "static/media/coming-soon.png": "/static/media/coming-soon.69b99428ab9e22eca0ba.png", "static/media/Error404.png": "/static/media/Error404.fe9de1c8a87d552fa643.png", @@ -98,6 +98,6 @@ }, "entrypoints": [ "static/css/main.b85b0dd8.css", - "static/js/main.27e2deb8.js" + "static/js/main.144619ee.js" ] } \ No newline at end of file diff --git a/build/index.html b/build/index.html index 26ec969..2133a0c 100644 --- a/build/index.html +++ b/build/index.html @@ -1 +1 @@ -Nearle Console
\ No newline at end of file +Nearle Console
\ No newline at end of file diff --git a/build/static/css/6509.04ba3c11.chunk.css b/build/static/css/6509.ab611cf0.chunk.css similarity index 99% rename from build/static/css/6509.04ba3c11.chunk.css rename to build/static/css/6509.ab611cf0.chunk.css index 8c57849..0ac1f84 100644 --- a/build/static/css/6509.04ba3c11.chunk.css +++ b/build/static/css/6509.ab611cf0.chunk.css @@ -1 +1 @@ -.location-panel{background:linear-gradient(180deg,#fff,#fbfcff);border:1px solid #eef2f6;border-radius:12px;height:100%;padding:12px 14px;position:relative;transition:box-shadow .3s ease,transform .3s ease}.location-panel:hover{box-shadow:0 10px 30px -10px #3e49541a}.location-panel:before{border-radius:0 4px 4px 0;bottom:22px;content:"";left:0;position:absolute;top:22px;width:4px}.pickup-panel:before{background:linear-gradient(180deg,#1890ff,#096dd9)}.drop-panel:before{background:linear-gradient(180deg,#a855f7,#65387a)}.lp-header{border-bottom:1px dashed #e2e8f0;display:flex;gap:10px;justify-content:space-between;margin-bottom:12px;padding-bottom:10px}.lp-header,.lp-header-actions{align-items:center;flex-wrap:wrap}.lp-header-actions{display:inline-flex;gap:8px}.lp-completion-pill{align-items:center;background:#94a3b824;border:1px solid #94a3b840;border-radius:999px;color:#64748b;display:inline-flex;font-size:11.5px;font-weight:700;letter-spacing:.5px;line-height:1;padding:4px 11px;text-transform:uppercase}.lp-completion-pill--ok{background:#22c55e1f;border-color:#22c55e4d;color:#15803d}.lp-completion-pill--ok:before{content:"✓";font-weight:900;margin-right:4px}.lp-distance-pill{align-items:center;background:linear-gradient(135deg,#1890ff1a,#a855f71a);border:1px solid #65387a33;border-radius:999px;color:#1e293b;display:inline-flex;font-size:11.5px;font-weight:700;gap:4px;letter-spacing:.3px;line-height:1;padding:4px 10px;white-space:nowrap}.lp-distance-pill .lp-distance-arrow{color:#94a3b8;font-weight:600}.pickup-panel .lp-distance-pill{border-color:#1890ff40}.drop-panel .lp-distance-pill{border-color:#65387a40}.lp-swap-btn{background:#fff!important;border:1px solid #e2e8f0!important;border-radius:10px!important;color:#475569!important;height:32px!important;transition:all .2s ease;width:32px!important}.lp-swap-btn:hover{background:#f8fafc!important;border-color:#cbd5e1!important;color:#1e293b!important;transform:rotate(180deg)}.pickup-panel .lp-swap-btn:hover{border-color:#1890ff59!important;color:#1890ff!important}.drop-panel .lp-swap-btn:hover{border-color:#65387a59!important;color:#65387a!important}.lp-swap-btn.Mui-disabled{background:#f8fafc!important;border-color:#eef2f6!important;color:#cbd5e1!important}.lp-header-title{gap:12px}.lp-badge,.lp-header-title{align-items:center;display:flex}.lp-badge{border-radius:10px;box-shadow:0 4px 10px #0000001a;color:#fff;flex-shrink:0;font-size:15px;height:34px;justify-content:center;width:34px}.pickup-panel .lp-badge{background:linear-gradient(135deg,#1890ff,#096dd9);box-shadow:0 6px 14px #1890ff4d}.drop-panel .lp-badge{background:linear-gradient(135deg,#a855f7,#65387a);box-shadow:0 6px 14px #65387a4d}.lp-title{color:#1e293b;font-size:15px;font-weight:700;line-height:1.2}.lp-subtitle{color:#94a3b8;font-size:11.5px;margin-top:1px}.lp-action-btn{border-radius:8px!important;font-size:12px!important;font-weight:600!important;letter-spacing:.2px!important;min-height:30px!important;padding:5px 11px!important;text-transform:none!important}.pickup-panel .lp-action-btn{background:#1890ff14!important;color:#1890ff!important}.pickup-panel .lp-action-btn:hover{background:#1890ff29!important}.drop-panel .lp-action-btn{background:#a855f71a!important;color:#65387a!important}.drop-panel .lp-action-btn:hover{background:#a855f72e!important}.lp-action-btn.Mui-disabled{background:#f8fafc!important;color:#cbd5e1!important}.lp-action-btn--ghost{background:#0000!important;border:1px dashed #cbd5e1!important;color:#475569!important}.lp-action-btn--ghost:hover{background:#f8fafc!important;border-color:#94a3b8!important;color:#1e293b!important}.lp-action-btn--ghost.Mui-disabled{background:#0000!important;border-color:#e2e8f0!important;color:#cbd5e1!important}.address-search-helper{align-items:center!important;display:flex!important;font-size:13px!important;font-weight:500!important;gap:6px!important;margin-left:2px!important;margin-top:6px!important}.address-search-helper.pickup-helper{color:#1890ff!important}.address-search-helper.drop-helper{color:#65387a!important}.field-group-caption{align-items:center;color:#64748b;display:flex;font-size:10.5px;font-weight:700;gap:8px;letter-spacing:.7px;margin-bottom:8px;text-transform:uppercase}.field-group-caption:after{background:linear-gradient(90deg,#e2e8f0,#0000);content:"";flex:1 1;height:1px}.field-group-dot{border-radius:50%;display:inline-block;height:7px;width:7px}.pickup-panel .field-group-dot{background:#1890ff}.drop-panel .field-group-dot{background:#65387a}.address-search-block{background:#1890ff0a;border:1px solid #1890ff1f;border-radius:12px;padding:16px;transition:border-color .2s ease}.drop-panel .address-search-block{background:#a855f70a;border:1px solid #65387a1f}.address-search-block:focus-within{border-color:#1890ff66}.drop-panel .address-search-block:focus-within{border-color:#65387a66}.address-search-hint{align-items:center;color:#64748b;display:flex;font-size:11.5px;font-weight:500;gap:6px;margin-bottom:12px}.save-later-pill{align-items:center;background:linear-gradient(135deg,#22c55e1a,#22c55e0a);border:1px dashed #86efac;border-radius:999px;display:inline-flex;gap:6px;margin-top:4px;padding:4px 12px 4px 8px}.save-later-pill .MuiFormControlLabel-root{margin:0}.save-later-pill .MuiCheckbox-root{color:#22c55e;padding:4px}.save-later-pill .MuiTypography-root{color:#15803d;font-size:13.5px;font-weight:600}.route-flow{display:flex;flex-direction:column;gap:18px}.route-flow-link{align-items:center;display:flex;gap:18px;justify-content:flex-start;min-height:80px;padding:22px 0 22px 31px;position:relative}.route-flow-link:before{background:repeating-linear-gradient(180deg,#cbd5e1,#cbd5e1 4px,#0000 0,#0000 8px);bottom:0;content:"";left:46px;position:absolute;top:0;width:2px;z-index:1}.route-flow-arrow{align-items:center;background:#fff;border:2px solid #cbd5e1;border-radius:50%;box-shadow:0 2px 6px #0000000a;color:#64748b;display:inline-flex;height:32px;justify-content:center;position:relative;transition:all .25s ease;width:32px;z-index:2}.route-flow-arrow:hover{background:linear-gradient(135deg,#1890ff,#65387a);border-color:#0000;color:#fff;transform:scale(1.05)}.route-flow-distance{align-items:center;background:linear-gradient(135deg,#1890ff14,#a855f714);border:1px dashed #65387a40;border-radius:999px;color:#475569;display:inline-flex;font-size:14px;font-weight:600;gap:8px;padding:6px 16px}.route-flow-distance .dist-value{color:#1890ff;font-size:14.5px;font-weight:700}.route-flow-distance .dist-label{color:#64748b;font-size:13.5px;font-weight:500}.route-flow-distance .dist-route{align-items:center;display:inline-flex;gap:5px;margin-right:2px}.route-flow-distance .dist-dot{border-radius:50%;display:inline-block;height:7px;width:7px}.route-flow-distance .dist-dot--pick{background:#1890ff;box-shadow:0 0 0 2px #1890ff2e}.route-flow-distance .dist-dot--drop{background:#65387a;box-shadow:0 0 0 2px #65387a2e}.route-flow-distance .dist-arrow{color:#94a3b8;font-size:11px;line-height:1}.route-flow-distance .dist-placeholder{color:#94a3b8;font-size:13.5px;font-style:italic;font-weight:500}.route-flow-swap{align-items:center!important;background:#fff!important;border:1px solid #e2e8f0!important;border-radius:999px!important;box-shadow:0 1px 2px #0000000a;color:#475569!important;display:inline-flex!important;font-size:13.5px!important;font-weight:600!important;gap:6px!important;letter-spacing:.2px!important;margin-left:auto!important;min-width:0!important;padding:6px 14px!important;text-transform:none!important;transition:all .2s ease}.route-flow-swap:hover{background:#f8fafc!important;border-color:#cbd5e1!important;box-shadow:0 4px 10px -2px #00000014;color:#1e293b!important;transform:translateY(-1px)}.route-flow-swap.Mui-disabled{background:#fff!important;border-color:#eef2f6!important;box-shadow:none;color:#cbd5e1!important}.orders-workspace-bg{background:linear-gradient(135deg,#f8fafc,#edf2f7)!important}.dashboard-scroll-col{scrollbar-color:#94a3b866 #0000;scrollbar-width:thin}.dashboard-scroll-col::-webkit-scrollbar{width:8px}.dashboard-scroll-col::-webkit-scrollbar-track{background:#0000}.dashboard-scroll-col::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#94a3b859;border:2px solid #0000;border-radius:999px}.dashboard-scroll-col:hover::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#64748b8c}.section-title-bar{align-items:center;display:flex;gap:12px;margin-bottom:20px}.section-title-bar:before{background:linear-gradient(180deg,#1890ff,#096dd9);border-radius:4px;content:"";flex-shrink:0;height:22px;width:4px}.section-title-bar--accent:before{background:linear-gradient(180deg,#a855f7,#65387a)}.section-title-bar .MuiTypography-root{line-height:1.2;margin-bottom:0!important}.service-config-bar{backdrop-filter:blur(16px)!important;-webkit-backdrop-filter:blur(16px)!important;background:#ffffffbf!important;border:1px solid #fff9!important;border-radius:12px!important;box-shadow:0 4px 20px -5px #94a3b81a!important;flex-shrink:0;margin-bottom:12px!important;padding:12px 20px!important}.console-dashboard-layout{display:flex;flex:1 1;gap:16px;overflow:hidden}.console-left-pane{flex:1.7 1;flex-direction:column}.console-left-pane,.console-right-pane{display:flex;gap:12px;overflow-y:auto;padding-right:4px}.console-right-pane{flex:1 1;flex-direction:column}.console-left-pane::-webkit-scrollbar,.console-right-pane::-webkit-scrollbar{width:4px}.console-left-pane::-webkit-scrollbar-track,.console-right-pane::-webkit-scrollbar-track{background:#0000}.console-left-pane::-webkit-scrollbar-thumb,.console-right-pane::-webkit-scrollbar-thumb{background:#94a3b84d;border-radius:99px}.console-left-pane::-webkit-scrollbar-thumb:hover,.console-right-pane::-webkit-scrollbar-thumb:hover{background:#94a3b880}.glass-card{backdrop-filter:blur(12px)!important;-webkit-backdrop-filter:blur(12px)!important;background:#fffc!important;border:1px solid #ffffff80!important;border-radius:12px!important;box-shadow:0 10px 25px -5px #3e49540a,0 4px 12px -2px #3e495405!important;transition:all .3s cubic-bezier(.4,0,.2,1)!important}.glass-card:hover{border-color:#fffc!important;box-shadow:0 16px 35px -8px #3e495412,0 6px 16px -3px #3e495408!important}.pickup-panel .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:#0ea5e9!important;box-shadow:0 0 0 3px #0ea5e91f}.drop-panel .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:#a855f7!important;box-shadow:0 0 0 3px #a855f71f}.weight-card-btn.active.weight-light{background:#0ea5e90a!important;border-color:#0ea5e9!important;box-shadow:0 6px 16px #0ea5e926!important}.weight-card-btn.active.weight-light:before{background:#0ea5e9;content:"";height:3px;left:0;position:absolute;right:0;top:0}.weight-card-btn.active.weight-medium{background:#a855f70a!important;border-color:#a855f7!important;box-shadow:0 6px 16px #a855f726!important}.weight-card-btn.active.weight-medium:before{background:#a855f7;content:"";height:3px;left:0;position:absolute;right:0;top:0}.weight-card-btn.active.weight-heavy{background:#6366f10a!important;border-color:#6366f1!important;box-shadow:0 6px 16px #6366f126!important}.weight-card-btn.active.weight-heavy:before{background:#6366f1;content:"";height:3px;left:0;position:absolute;right:0;top:0}.orders-card{background:#fff!important;border:1px solid #eef2f6!important;border-radius:12px!important;box-shadow:0 10px 25px -5px #3e49540a,0 4px 12px -2px #3e495405!important;overflow:hidden;transition:all .3s cubic-bezier(.4,0,.2,1)!important}.location-panel .MuiOutlinedInput-root,.orders-card .MuiOutlinedInput-root{border-radius:10px!important;font-size:13px!important}.location-panel .MuiOutlinedInput-input,.orders-card .MuiOutlinedInput-input{font-size:13px!important;padding-bottom:9px!important;padding-top:9px!important}.location-panel .MuiInputLabel-root,.orders-card .MuiInputLabel-root{font-size:13px!important}.location-panel .MuiInputLabel-root.MuiInputLabel-shrink,.orders-card .MuiInputLabel-root.MuiInputLabel-shrink{font-size:11.5px!important}.location-panel .MuiFormHelperText-root,.orders-card .MuiFormHelperText-root{font-size:11px!important;margin-top:3px!important}.MuiAutocomplete-popper .MuiAutocomplete-option{font-size:13px!important;min-height:34px!important;padding-bottom:6px!important;padding-top:6px!important}.orders-card .MuiTypography-h5{font-size:15px!important}.orders-card .MuiTypography-h6{font-size:13.5px!important}.orders-card:hover{box-shadow:0 16px 35px -8px #3e495414,0 6px 16px -3px #3e495408!important}.glass-panel{backdrop-filter:blur(12px)!important;-webkit-backdrop-filter:blur(12px)!important;background:#fffc!important;border:1px solid #ffffff80!important}.connector-line-wrapper{align-items:center;display:flex;height:100%;justify-content:center;position:relative}.connector-line{background:repeating-linear-gradient(180deg,#1890ff,#1890ff 6px,#0000 0,#0000 12px);bottom:15%;position:absolute;top:15%;width:2px;z-index:1}.connector-icon-wrapper{align-items:center;background:#fff;border:2px solid #1890ff;border-radius:50%;box-shadow:0 4px 10px #1890ff26;display:flex;height:32px;justify-content:center;transition:all .3s ease;width:32px;z-index:2}.connector-line-wrapper:hover .connector-icon-wrapper{box-shadow:0 6px 14px #1890ff40;transform:scale(1.15) rotate(15deg)}.weight-selector-grid{grid-gap:10px;display:grid;gap:10px;grid-template-columns:repeat(3,1fr);margin:8px 0;width:100%}.weight-card-btn{align-items:center;background:#fff;border:1.5px solid #eef2f6;border-radius:10px;cursor:pointer;display:flex;flex-direction:column;justify-content:center;overflow:hidden;padding:10px 8px;position:relative;text-align:center;transition:all .3s cubic-bezier(.4,0,.2,1);-webkit-user-select:none;user-select:none}.weight-card-btn:hover{background-color:#f8fafc;border-color:#cbd5e1;transform:translateY(-1.5px)}.weight-card-btn.active{background:#1890ff0a;border-color:#1890ff;box-shadow:0 4px 12px -2px #1890ff1f}.weight-card-btn.active:before{background:#1890ff;content:"";height:3px;left:0;position:absolute;right:0;top:0}.weight-card-icon{color:#64748b;font-size:18px;margin-bottom:4px;transition:all .3s ease}.weight-card-btn.active .weight-card-icon{color:#1890ff;transform:scale(1.08)}.weight-card-label{color:#334155;font-size:12.5px;font-weight:600;margin-bottom:2px}.weight-card-desc{color:#64748b;font-size:9.5px;line-height:1.2}.map-preview-wrapper{border:1px solid #eef2f6;border-radius:12px;box-shadow:0 4px 15px #0000000d;height:260px;min-height:260px;overflow:hidden;position:relative}.map-preview-wrapper .leaflet-container{height:100%!important;min-height:0!important}.map-preview-wrapper>div{min-height:0!important}.pricing-summary-card{background:linear-gradient(135deg,#fff,#fafbfc)!important;border:1px solid #eef2f6!important;border-radius:14px!important;padding:14px 16px!important}.pricing-header{align-items:baseline;border-bottom:1px solid #f1f5f9;display:flex;gap:12px;justify-content:space-between;margin-bottom:10px;padding-bottom:10px}.pricing-title{color:#1e293b!important;font-size:14px!important;font-weight:700!important;letter-spacing:-.01em}.pricing-subtitle{color:#94a3b8!important;font-size:11px!important;font-weight:500!important;letter-spacing:.6px;text-transform:uppercase}.price-metric-item{align-items:center;border-bottom:1px solid #f5f7fa;display:flex;justify-content:space-between;padding:7px 0}.price-metric-item:last-of-type{border-bottom:none;padding-bottom:4px}.price-metric-label{align-items:center;color:#475569;display:flex;font-size:12.5px;font-weight:500;gap:10px;min-width:0}.price-metric-icon{align-items:center;border-radius:8px;display:inline-flex;flex-shrink:0;font-size:12px;height:26px;justify-content:center;width:26px}.price-metric-icon.icon-distance{background:#1890ff1a;color:#1890ff}.price-metric-icon.icon-base{background:#22c55e1a;color:#16a34a}.price-metric-icon.icon-rate{background:#f59e0b1f;color:#d97706}.price-metric-sub{color:#94a3b8;font-size:11.5px;font-weight:500}.price-metric-value{align-items:baseline;color:#1e293b;display:inline-flex;font-size:13.5px;font-weight:700;gap:2px;white-space:nowrap}.price-metric-value.highlight{color:#1890ff}.price-metric-unit{color:#94a3b8;font-size:11px;font-weight:500;margin-left:2px}.total-charge-badge{align-items:center;background:linear-gradient(135deg,#1890ff14,#65387a1a);border:1px solid #65387a2e;border-radius:10px;display:flex;gap:12px;justify-content:space-between;margin-top:12px;padding:10px 14px}.total-charge-left{align-items:center;display:inline-flex;gap:8px;min-width:0}.total-charge-icon{color:#65387a;flex-shrink:0;font-size:13px}.total-charge-label{color:#65387a;font-size:11.5px;font-weight:700;letter-spacing:.6px;text-transform:uppercase}.total-charge-val{color:#65387a;font-size:20px;font-weight:800;letter-spacing:-.01em;line-height:1.1;white-space:nowrap}.gradient-btn-create{align-items:center!important;background:linear-gradient(135deg,#1890ff,#65387a)!important;border:none!important;border-radius:10px!important;box-shadow:0 4px 12px -3px #1890ff4d,0 2px 4px #65387a1a!important;color:#fff!important;display:inline-flex!important;font-size:13px!important;font-weight:600!important;gap:8px!important;justify-content:center!important;letter-spacing:.01em!important;min-height:38px!important;padding:8px 18px!important;text-transform:none!important;transition:all .22s cubic-bezier(.4,0,.2,1)!important}.gradient-btn-create .MuiButton-endIcon,.gradient-btn-create .MuiButton-startIcon{margin:0!important}.gradient-btn-create:hover{box-shadow:0 8px 18px -4px #1890ff66,0 3px 8px #65387a2e!important;filter:brightness(1.04)}.gradient-btn-create:active{filter:brightness(.98)}.gradient-btn-create.Mui-disabled,.gradient-btn-create:disabled{background:#e2e8f0!important;box-shadow:none!important;color:#94a3b8!important;cursor:not-allowed!important}.completion-checklist{list-style:none;margin:16px 0;padding:0}.completion-item{align-items:center;color:#64748b;display:flex;font-size:14.5px;gap:12px;line-height:1.4;margin-bottom:10px;transition:all .3s ease}.completion-item.completed{color:#0f172a;font-weight:600}.completion-bullet{background-color:#cbd5e1;border-radius:50%;flex-shrink:0;height:10px;transition:all .3s ease;width:10px}.completion-item.completed .completion-bullet{background-color:#10b981;box-shadow:0 0 8px #10b981}.address-card-btn{background:#fff!important;border:1.5px solid #eef2f6!important;border-radius:12px!important;margin-bottom:12px;padding:16px!important;text-transform:none!important;transition:all .2s ease!important;width:100%}.address-card-btn:hover{background-color:#1890ff05!important;border-color:#1890ff!important;box-shadow:0 4px 12px #00000008;transform:translateY(-2px)}.address-card-btn:disabled{background-color:#f8fafc!important;border-color:#e2e8f0!important;opacity:.7}.pulse-indicator{animation:pulse-green 2s infinite;background:#10b981;border-radius:50%;box-shadow:0 0 0 0 #10b981b3;height:8px;width:8px}@keyframes pulse-green{0%{box-shadow:0 0 0 0 #10b981b3;transform:scale(.95)}70%{box-shadow:0 0 0 6px #10b98100;transform:scale(1)}to{box-shadow:0 0 0 0 #10b98100;transform:scale(.95)}}.pulse-yellow{animation:pulse-yellow-anim 2s infinite;background:#f59e0b;box-shadow:0 0 0 0 #f59e0bb3}@keyframes pulse-yellow-anim{0%{box-shadow:0 0 0 0 #f59e0bb3;transform:scale(.95)}70%{box-shadow:0 0 0 6px #f59e0b00;transform:scale(1)}to{box-shadow:0 0 0 0 #f59e0b00;transform:scale(.95)}}@media (max-width:959px){.connector-line-wrapper{display:none}}@media (min-width:900px){.route-flow{align-items:stretch;flex-direction:row;gap:16px}.route-flow>.location-panel{flex:1 1;min-width:0}.route-flow>.location-panel .MuiGrid-container>.MuiGrid-item{flex-basis:100%!important;max-width:100%!important}.route-flow-link{align-items:center;flex-direction:column;flex-shrink:0;gap:14px;justify-content:center;min-height:0;min-width:92px;padding:8px 4px}.route-flow-link:before{display:none}.route-flow-arrow svg{transform:rotate(-90deg);transition:transform .25s ease}.route-flow-swap{margin-left:0!important;margin-top:0!important}.route-flow-distance{flex-direction:column;gap:4px;line-height:1.2;padding:8px 10px;text-align:center}.route-flow-distance .dist-label{display:none}.route-flow-distance .dist-placeholder{font-size:11px;line-height:1.3}}@media (min-width:1536px){.route-flow>.location-panel .MuiGrid-container>.MuiGrid-item.MuiGrid-grid-sm-6{flex-basis:50%!important;max-width:50%!important}}@media (max-width:1400px){.orders-card .MuiTypography-h5{font-size:17px!important}.orders-card .MuiTypography-h6{font-size:14.5px!important}.lp-title{font-size:15.5px}.lp-subtitle{font-size:12px;margin-top:1px}.lp-badge{border-radius:10px;font-size:15px;height:36px;width:36px}.lp-action-btn{font-size:12.5px!important;padding:5px 10px!important}.route-flow-link{min-height:60px;padding:16px 0 16px 26px}.route-flow-link:before{left:41px}.route-flow-arrow{height:28px;width:28px}.route-flow-distance{font-size:12.5px;padding:4px 12px}.route-flow-swap{font-size:12px!important;padding:4px 10px!important}.map-preview-wrapper{height:220px;min-height:220px}.weight-card-btn{padding:8px 6px}.weight-card-label{font-size:11.5px}.weight-card-desc{font-size:9px}.orders-card{padding:16px!important}.orders-card.page-header-row{padding:10px 16px!important}}@media (min-width:900px){.MuiContainer-root:has(.orders-workspace-bg){max-width:1600px!important;padding-left:16px!important;padding-right:16px!important}main:has(.orders-workspace-bg){padding:16px!important}}.header-compact-tf .MuiOutlinedInput-root{background:#fff;border-radius:10px!important;font-size:12.5px!important;height:40px!important;padding-left:10px!important}.header-compact-tf .MuiOutlinedInput-input{font-size:12.5px!important;padding-bottom:6px!important;padding-top:6px!important}.header-compact-tf .MuiInputLabel-root{color:#64748b!important;font-size:11.5px!important;font-weight:600;letter-spacing:.02em}.header-compact-tf .MuiInputLabel-shrink{background:#fff;padding:0 4px;transform:translate(12px,-7px) scale(.82)!important}.header-compact-tf .MuiOutlinedInput-notchedOutline{border-color:#e2e8f0}.header-compact-tf:hover .MuiOutlinedInput-notchedOutline{border-color:#cbd5e1}.header-compact-tf .Mui-focused .MuiOutlinedInput-notchedOutline{border-width:1.5px!important}.header-compact-input .MuiAutocomplete-endAdornment{align-items:center;display:inline-flex;gap:2px;height:auto;right:8px;top:50%;transform:translateY(-50%)}.header-compact-input .MuiAutocomplete-endAdornment .MuiSvgIcon-root{display:block;font-size:16px}.header-compact-input .MuiAutocomplete-clearIndicator,.header-compact-input .MuiAutocomplete-popupIndicator{align-items:center;color:#94a3b8!important;display:inline-flex;height:22px;justify-content:center;padding:3px!important;width:22px}.header-compact-input .MuiAutocomplete-clearIndicator:hover,.header-compact-input .MuiAutocomplete-popupIndicator:hover{background:#94a3b81f!important;color:#475569!important}.header-compact-input .MuiAutocomplete-popupIndicator{margin-right:0}.header-compact-input .MuiOutlinedInput-root{padding-bottom:0!important;padding-right:60px!important;padding-top:0!important}.header-compact-input .MuiAutocomplete-input{height:auto!important;padding:4px 4px 4px 0!important}.page-header-row{min-height:0!important}.delivery-prefs-card{background:linear-gradient(135deg,#fff,#fbfcff)!important;border:1px solid #eef2f6!important;border-radius:14px!important}.delivery-prefs-header{align-items:baseline;border-bottom:1px solid #f1f5f9;display:flex;gap:10px;justify-content:space-between;margin-bottom:10px;padding-bottom:10px}.delivery-prefs-title{color:#1e293b!important;font-size:14px!important;font-weight:700!important;letter-spacing:-.01em;line-height:1.2}.delivery-prefs-sub{color:#94a3b8!important;font-size:10.5px!important;font-weight:500!important;letter-spacing:.55px;line-height:1.2;text-align:right;text-transform:uppercase}.delivery-prefs-row{display:flex;flex-direction:column;gap:10px}.delivery-prefs-field{display:flex;flex-direction:column;gap:5px}.delivery-prefs-label{align-items:center;color:#64748b;display:inline-flex;font-size:10.5px;font-weight:700;gap:5px;letter-spacing:.55px;text-transform:uppercase}.sms-toggle-tile{align-items:center;background:#fafbfc;border:1px solid #eef2f6;border-radius:10px;cursor:pointer;display:flex;gap:10px;justify-content:space-between;padding:8px 12px;transition:border-color .2s ease,background .2s ease,box-shadow .2s ease;-webkit-user-select:none;user-select:none}.sms-toggle-tile:hover{background:#fff;border-color:#cbd5e1}.sms-toggle-tile.is-active{background:linear-gradient(135deg,#1890ff0f,#65387a0d);border-color:#1890ff47;box-shadow:0 3px 10px -3px #1890ff2e}.sms-toggle-left{gap:9px;min-width:0}.sms-toggle-icon,.sms-toggle-left{align-items:center;display:inline-flex}.sms-toggle-icon{background:#eef2f6;border-radius:8px;color:#94a3b8;flex-shrink:0;height:28px;justify-content:center;transition:all .2s ease;width:28px}.sms-toggle-tile.is-active .sms-toggle-icon{background:linear-gradient(135deg,#1890ff,#65387a);box-shadow:0 3px 10px #65387a38;color:#fff}.sms-toggle-title{color:#1e293b!important;font-size:12.5px!important;font-weight:700!important;letter-spacing:-.005em;line-height:1.2!important}.sms-toggle-sub{color:#94a3b8!important;font-size:10.5px!important;font-weight:500!important;line-height:1.2!important;margin-top:1px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sms-toggle-tile .MuiSwitch-root{flex-shrink:0}.route-stepper{align-items:stretch;background:linear-gradient(135deg,#f8fafc,#f1f5f9);border:1px solid #e2e8f0;border-radius:12px;display:flex;gap:0;margin-bottom:12px;padding:4px}.route-step{align-items:center;background:#0000;border-radius:9px;cursor:pointer;display:flex;flex:1 1;gap:10px;outline:none;padding:6px 10px;transition:background-color .22s ease,box-shadow .22s ease,transform .22s ease;-webkit-user-select:none;user-select:none}.route-step:hover{background:#fff9}.route-step.is-active{background:#fff;box-shadow:0 6px 18px -8px #0f172a1f,0 2px 6px -2px #0f172a0f;transform:translateY(-1px)}.route-step.is-locked{cursor:not-allowed;opacity:.6}.route-step.is-locked:hover{background:#0000}.route-step-index{align-items:center;background:#fff;border:1.5px solid #e2e8f0;border-radius:50%;color:#94a3b8;display:inline-flex;flex-shrink:0;font-size:12px;font-weight:700;height:26px;justify-content:center;transition:all .22s ease;width:26px}.step-pickup.is-active .route-step-index{background:linear-gradient(135deg,#1890ff,#096dd9);border-color:#0000;box-shadow:0 4px 12px #1890ff52;color:#fff}.step-drop.is-active .route-step-index{background:linear-gradient(135deg,#a855f7,#65387a);border-color:#0000;box-shadow:0 4px 12px #65387a52;color:#fff}.step-pickup.is-done:not(.is-active) .route-step-index{background:#22c55e1f;border-color:#22c55e59;color:#16a34a}.route-step-text{display:flex;flex-direction:column;line-height:1.2}.route-step-title{color:#1e293b!important;font-size:13px!important;font-weight:700!important;letter-spacing:-.01em}.route-step-sub,.route-step.is-locked .route-step-title{color:#94a3b8!important}.route-step-sub{font-size:10.5px!important;font-weight:500!important;margin-top:1px!important}.route-step-connector{align-items:center;display:flex;flex-shrink:0;justify-content:center;min-width:28px;padding:0 6px;position:relative}.route-step-line{background:#e2e8f0;border-radius:2px;height:2px;transition:background .3s ease;width:100%}.route-step-connector.is-done .route-step-line{background:linear-gradient(90deg,#1890ff,#a855f7)}.route-step-line-arrow{align-items:center;background:#fff;border:1.5px solid #e2e8f0;border-radius:50%;color:#cbd5e1;display:inline-flex;font-size:10px;height:22px;justify-content:center;position:absolute;transition:all .3s ease;width:22px}.route-step-connector.is-done .route-step-line-arrow{border-color:#a855f766;color:#a855f7}.step-nav{align-items:center;border-top:1px dashed #e2e8f0;display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;margin-top:12px;padding-top:10px}.step-nav-hint{color:#64748b!important;font-size:11.5px!important;font-weight:500!important}.step-nav-btn{border-radius:8px!important;font-size:12px!important;font-weight:600!important;letter-spacing:.01em!important;min-height:32px!important;padding:6px 14px!important;text-transform:none!important;transition:all .22s ease!important}.step-nav-next{background:linear-gradient(135deg,#1890ff,#65387a)!important;box-shadow:0 6px 18px -6px #65387a59!important;color:#fff!important}.step-nav-next:hover{box-shadow:0 10px 22px -8px #65387a73!important;filter:brightness(1.05);transform:translateY(-1px)}.step-nav-next.Mui-disabled{background:#e2e8f0!important;box-shadow:none!important;color:#94a3b8!important}.step-nav-back{background:#f1f5f9!important;border:1px solid #e2e8f0!important;color:#475569!important}.step-nav-back:hover{background:#e2e8f0!important;color:#1e293b!important}@media (max-width:599px){.route-step-sub{display:none!important}.route-step{gap:8px;padding:8px 10px}.route-step-index{font-size:13px;height:28px;width:28px}.step-nav{align-items:stretch;flex-direction:column-reverse}.step-nav-btn{width:100%}} \ No newline at end of file +.location-panel{background:linear-gradient(180deg,#fff,#fbfcff);border:1px solid #eef2f6;border-radius:12px;height:100%;padding:12px 14px;position:relative;transition:box-shadow .3s ease,transform .3s ease}.location-panel:hover{box-shadow:0 10px 30px -10px #3e49541a}.location-panel:before{border-radius:0 4px 4px 0;bottom:22px;content:"";left:0;position:absolute;top:22px;width:4px}.pickup-panel:before{background:linear-gradient(180deg,#1890ff,#096dd9)}.drop-panel:before{background:linear-gradient(180deg,#a855f7,#65387a)}.lp-header{border-bottom:1px dashed #e2e8f0;display:flex;gap:10px;justify-content:space-between;margin-bottom:12px;padding-bottom:10px}.lp-header,.lp-header-actions{align-items:center;flex-wrap:wrap}.lp-header-actions{display:inline-flex;gap:8px}.lp-completion-pill{align-items:center;background:#94a3b824;border:1px solid #94a3b840;border-radius:999px;color:#64748b;display:inline-flex;font-size:11.5px;font-weight:700;letter-spacing:.5px;line-height:1;padding:4px 11px;text-transform:uppercase}.lp-completion-pill--ok{background:#22c55e1f;border-color:#22c55e4d;color:#15803d}.lp-completion-pill--ok:before{content:"✓";font-weight:900;margin-right:4px}.lp-distance-pill{align-items:center;background:linear-gradient(135deg,#1890ff1a,#a855f71a);border:1px solid #65387a33;border-radius:999px;color:#1e293b;display:inline-flex;font-size:11.5px;font-weight:700;gap:4px;letter-spacing:.3px;line-height:1;padding:4px 10px;white-space:nowrap}.lp-distance-pill .lp-distance-arrow{color:#94a3b8;font-weight:600}.pickup-panel .lp-distance-pill{border-color:#1890ff40}.drop-panel .lp-distance-pill{border-color:#65387a40}.lp-swap-btn{background:#fff!important;border:1px solid #e2e8f0!important;border-radius:10px!important;color:#475569!important;height:32px!important;transition:all .2s ease;width:32px!important}.lp-swap-btn:hover{background:#f8fafc!important;border-color:#cbd5e1!important;color:#1e293b!important;transform:rotate(180deg)}.pickup-panel .lp-swap-btn:hover{border-color:#1890ff59!important;color:#1890ff!important}.drop-panel .lp-swap-btn:hover{border-color:#65387a59!important;color:#65387a!important}.lp-swap-btn.Mui-disabled{background:#f8fafc!important;border-color:#eef2f6!important;color:#cbd5e1!important}.lp-header-title{gap:12px}.lp-badge,.lp-header-title{align-items:center;display:flex}.lp-badge{border-radius:10px;box-shadow:0 4px 10px #0000001a;color:#fff;flex-shrink:0;font-size:15px;height:34px;justify-content:center;width:34px}.pickup-panel .lp-badge{background:linear-gradient(135deg,#1890ff,#096dd9);box-shadow:0 6px 14px #1890ff4d}.drop-panel .lp-badge{background:linear-gradient(135deg,#a855f7,#65387a);box-shadow:0 6px 14px #65387a4d}.lp-title{color:#1e293b;font-size:15px;font-weight:700;line-height:1.2}.lp-subtitle{color:#94a3b8;font-size:11.5px;margin-top:1px}.lp-action-btn{border-radius:8px!important;font-size:12px!important;font-weight:600!important;letter-spacing:.2px!important;min-height:30px!important;padding:5px 11px!important;text-transform:none!important}.pickup-panel .lp-action-btn{background:#1890ff14!important;color:#1890ff!important}.pickup-panel .lp-action-btn:hover{background:#1890ff29!important}.drop-panel .lp-action-btn{background:#a855f71a!important;color:#65387a!important}.drop-panel .lp-action-btn:hover{background:#a855f72e!important}.lp-action-btn.Mui-disabled{background:#f8fafc!important;color:#cbd5e1!important}.lp-action-btn--ghost{background:#0000!important;border:1px dashed #cbd5e1!important;color:#475569!important}.lp-action-btn--ghost:hover{background:#f8fafc!important;border-color:#94a3b8!important;color:#1e293b!important}.lp-action-btn--ghost.Mui-disabled{background:#0000!important;border-color:#e2e8f0!important;color:#cbd5e1!important}.address-search-helper{align-items:center!important;display:flex!important;font-size:13px!important;font-weight:500!important;gap:6px!important;margin-left:2px!important;margin-top:6px!important}.address-search-helper.pickup-helper{color:#1890ff!important}.address-search-helper.drop-helper{color:#65387a!important}.field-group-caption{align-items:center;color:#64748b;display:flex;font-size:10.5px;font-weight:700;gap:8px;letter-spacing:.7px;margin-bottom:8px;text-transform:uppercase}.field-group-caption:after{background:linear-gradient(90deg,#e2e8f0,#0000);content:"";flex:1 1;height:1px}.field-group-dot{border-radius:50%;display:inline-block;height:7px;width:7px}.pickup-panel .field-group-dot{background:#1890ff}.drop-panel .field-group-dot{background:#65387a}.address-search-block{background:#1890ff0a;border:1px solid #1890ff1f;border-radius:12px;padding:16px;transition:border-color .2s ease}.drop-panel .address-search-block{background:#a855f70a;border:1px solid #65387a1f}.address-search-block:focus-within{border-color:#1890ff66}.drop-panel .address-search-block:focus-within{border-color:#65387a66}.address-search-hint{align-items:center;color:#64748b;display:flex;font-size:11.5px;font-weight:500;gap:6px;margin-bottom:12px}.save-later-pill{align-items:center;background:linear-gradient(135deg,#22c55e1a,#22c55e0a);border:1px dashed #86efac;border-radius:999px;display:inline-flex;gap:6px;margin-top:4px;padding:4px 12px 4px 8px}.save-later-pill .MuiFormControlLabel-root{margin:0}.save-later-pill .MuiCheckbox-root{color:#22c55e;padding:4px}.save-later-pill .MuiTypography-root{color:#15803d;font-size:13.5px;font-weight:600}.route-flow{display:flex;flex-direction:column;gap:18px}.route-flow-link{align-items:center;display:flex;gap:18px;justify-content:flex-start;min-height:80px;padding:22px 0 22px 31px;position:relative}.route-flow-link:before{background:repeating-linear-gradient(180deg,#cbd5e1,#cbd5e1 4px,#0000 0,#0000 8px);bottom:0;content:"";left:46px;position:absolute;top:0;width:2px;z-index:1}.route-flow-arrow{align-items:center;background:#fff;border:2px solid #cbd5e1;border-radius:50%;box-shadow:0 2px 6px #0000000a;color:#64748b;display:inline-flex;height:32px;justify-content:center;position:relative;transition:all .25s ease;width:32px;z-index:2}.route-flow-arrow:hover{background:linear-gradient(135deg,#1890ff,#65387a);border-color:#0000;color:#fff;transform:scale(1.05)}.route-flow-distance{align-items:center;background:linear-gradient(135deg,#1890ff14,#a855f714);border:1px dashed #65387a40;border-radius:999px;color:#475569;display:inline-flex;font-size:14px;font-weight:600;gap:8px;padding:6px 16px}.route-flow-distance .dist-value{color:#1890ff;font-size:14.5px;font-weight:700}.route-flow-distance .dist-label{color:#64748b;font-size:13.5px;font-weight:500}.route-flow-distance .dist-route{align-items:center;display:inline-flex;gap:5px;margin-right:2px}.route-flow-distance .dist-dot{border-radius:50%;display:inline-block;height:7px;width:7px}.route-flow-distance .dist-dot--pick{background:#1890ff;box-shadow:0 0 0 2px #1890ff2e}.route-flow-distance .dist-dot--drop{background:#65387a;box-shadow:0 0 0 2px #65387a2e}.route-flow-distance .dist-arrow{color:#94a3b8;font-size:11px;line-height:1}.route-flow-distance .dist-placeholder{color:#94a3b8;font-size:13.5px;font-style:italic;font-weight:500}.route-flow-swap{align-items:center!important;background:#fff!important;border:1px solid #e2e8f0!important;border-radius:999px!important;box-shadow:0 1px 2px #0000000a;color:#475569!important;display:inline-flex!important;font-size:13.5px!important;font-weight:600!important;gap:6px!important;letter-spacing:.2px!important;margin-left:auto!important;min-width:0!important;padding:6px 14px!important;text-transform:none!important;transition:all .2s ease}.route-flow-swap:hover{background:#f8fafc!important;border-color:#cbd5e1!important;box-shadow:0 4px 10px -2px #00000014;color:#1e293b!important;transform:translateY(-1px)}.route-flow-swap.Mui-disabled{background:#fff!important;border-color:#eef2f6!important;box-shadow:none;color:#cbd5e1!important}.orders-workspace-bg{background:linear-gradient(135deg,#f8fafc,#edf2f7)!important}.dashboard-scroll-col{scrollbar-color:#94a3b866 #0000;scrollbar-width:thin}.dashboard-scroll-col::-webkit-scrollbar{width:8px}.dashboard-scroll-col::-webkit-scrollbar-track{background:#0000}.dashboard-scroll-col::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#94a3b859;border:2px solid #0000;border-radius:999px}.dashboard-scroll-col:hover::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#64748b8c}.section-title-bar{align-items:center;display:flex;gap:12px;margin-bottom:20px}.section-title-bar:before{background:linear-gradient(180deg,#1890ff,#096dd9);border-radius:4px;content:"";flex-shrink:0;height:22px;width:4px}.section-title-bar--accent:before{background:linear-gradient(180deg,#a855f7,#65387a)}.section-title-bar .MuiTypography-root{line-height:1.2;margin-bottom:0!important}.service-config-bar{backdrop-filter:blur(16px)!important;-webkit-backdrop-filter:blur(16px)!important;background:#ffffffbf!important;border:1px solid #fff9!important;border-radius:12px!important;box-shadow:0 4px 20px -5px #94a3b81a!important;flex-shrink:0;margin-bottom:12px!important;padding:12px 20px!important}.console-dashboard-layout{display:flex;flex:1 1;gap:16px;overflow:hidden}.console-left-pane{flex:1.7 1;flex-direction:column}.console-left-pane,.console-right-pane{display:flex;gap:12px;overflow-y:auto;padding-right:4px}.console-right-pane{flex:1 1;flex-direction:column}.console-left-pane::-webkit-scrollbar,.console-right-pane::-webkit-scrollbar{width:4px}.console-left-pane::-webkit-scrollbar-track,.console-right-pane::-webkit-scrollbar-track{background:#0000}.console-left-pane::-webkit-scrollbar-thumb,.console-right-pane::-webkit-scrollbar-thumb{background:#94a3b84d;border-radius:99px}.console-left-pane::-webkit-scrollbar-thumb:hover,.console-right-pane::-webkit-scrollbar-thumb:hover{background:#94a3b880}.glass-card{backdrop-filter:blur(12px)!important;-webkit-backdrop-filter:blur(12px)!important;background:#fffc!important;border:1px solid #ffffff80!important;border-radius:12px!important;box-shadow:0 10px 25px -5px #3e49540a,0 4px 12px -2px #3e495405!important;transition:all .3s cubic-bezier(.4,0,.2,1)!important}.glass-card:hover{border-color:#fffc!important;box-shadow:0 16px 35px -8px #3e495412,0 6px 16px -3px #3e495408!important}.pickup-panel .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:#0ea5e9!important;box-shadow:0 0 0 3px #0ea5e91f}.drop-panel .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:#a855f7!important;box-shadow:0 0 0 3px #a855f71f}.weight-card-btn.active.weight-light{background:#0ea5e90a!important;border-color:#0ea5e9!important;box-shadow:0 6px 16px #0ea5e926!important}.weight-card-btn.active.weight-light:before{background:#0ea5e9;content:"";height:3px;left:0;position:absolute;right:0;top:0}.weight-card-btn.active.weight-medium{background:#a855f70a!important;border-color:#a855f7!important;box-shadow:0 6px 16px #a855f726!important}.weight-card-btn.active.weight-medium:before{background:#a855f7;content:"";height:3px;left:0;position:absolute;right:0;top:0}.weight-card-btn.active.weight-heavy{background:#6366f10a!important;border-color:#662582!important;box-shadow:0 6px 16px #6366f126!important}.weight-card-btn.active.weight-heavy:before{background:#662582;content:"";height:3px;left:0;position:absolute;right:0;top:0}.orders-card{background:#fff!important;border:1px solid #eef2f6!important;border-radius:12px!important;box-shadow:0 10px 25px -5px #3e49540a,0 4px 12px -2px #3e495405!important;overflow:hidden;transition:all .3s cubic-bezier(.4,0,.2,1)!important}.location-panel .MuiOutlinedInput-root,.orders-card .MuiOutlinedInput-root{border-radius:10px!important;font-size:13px!important}.location-panel .MuiOutlinedInput-input,.orders-card .MuiOutlinedInput-input{font-size:13px!important;padding-bottom:9px!important;padding-top:9px!important}.location-panel .MuiInputLabel-root,.orders-card .MuiInputLabel-root{font-size:13px!important}.location-panel .MuiInputLabel-root.MuiInputLabel-shrink,.orders-card .MuiInputLabel-root.MuiInputLabel-shrink{font-size:11.5px!important}.location-panel .MuiFormHelperText-root,.orders-card .MuiFormHelperText-root{font-size:11px!important;margin-top:3px!important}.MuiAutocomplete-popper .MuiAutocomplete-option{font-size:13px!important;min-height:34px!important;padding-bottom:6px!important;padding-top:6px!important}.orders-card .MuiTypography-h5{font-size:15px!important}.orders-card .MuiTypography-h6{font-size:13.5px!important}.orders-card:hover{box-shadow:0 16px 35px -8px #3e495414,0 6px 16px -3px #3e495408!important}.glass-panel{backdrop-filter:blur(12px)!important;-webkit-backdrop-filter:blur(12px)!important;background:#fffc!important;border:1px solid #ffffff80!important}.connector-line-wrapper{align-items:center;display:flex;height:100%;justify-content:center;position:relative}.connector-line{background:repeating-linear-gradient(180deg,#1890ff,#1890ff 6px,#0000 0,#0000 12px);bottom:15%;position:absolute;top:15%;width:2px;z-index:1}.connector-icon-wrapper{align-items:center;background:#fff;border:2px solid #1890ff;border-radius:50%;box-shadow:0 4px 10px #1890ff26;display:flex;height:32px;justify-content:center;transition:all .3s ease;width:32px;z-index:2}.connector-line-wrapper:hover .connector-icon-wrapper{box-shadow:0 6px 14px #1890ff40;transform:scale(1.15) rotate(15deg)}.weight-selector-grid{grid-gap:10px;display:grid;gap:10px;grid-template-columns:repeat(3,1fr);margin:8px 0;width:100%}.weight-card-btn{align-items:center;background:#fff;border:1.5px solid #eef2f6;border-radius:10px;cursor:pointer;display:flex;flex-direction:column;justify-content:center;overflow:hidden;padding:10px 8px;position:relative;text-align:center;transition:all .3s cubic-bezier(.4,0,.2,1);-webkit-user-select:none;user-select:none}.weight-card-btn:hover{background-color:#f8fafc;border-color:#cbd5e1;transform:translateY(-1.5px)}.weight-card-btn.active{background:#1890ff0a;border-color:#1890ff;box-shadow:0 4px 12px -2px #1890ff1f}.weight-card-btn.active:before{background:#1890ff;content:"";height:3px;left:0;position:absolute;right:0;top:0}.weight-card-icon{color:#64748b;font-size:18px;margin-bottom:4px;transition:all .3s ease}.weight-card-btn.active .weight-card-icon{color:#1890ff;transform:scale(1.08)}.weight-card-label{color:#334155;font-size:12.5px;font-weight:600;margin-bottom:2px}.weight-card-desc{color:#64748b;font-size:9.5px;line-height:1.2}.map-preview-wrapper{border:1px solid #eef2f6;border-radius:12px;box-shadow:0 4px 15px #0000000d;height:260px;min-height:260px;overflow:hidden;position:relative}.map-preview-wrapper .leaflet-container{height:100%!important;min-height:0!important}.map-preview-wrapper>div{min-height:0!important}.pricing-summary-card{background:linear-gradient(135deg,#fff,#fafbfc)!important;border:1px solid #eef2f6!important;border-radius:14px!important;padding:14px 16px!important}.pricing-header{align-items:baseline;border-bottom:1px solid #f1f5f9;display:flex;gap:12px;justify-content:space-between;margin-bottom:10px;padding-bottom:10px}.pricing-title{color:#1e293b!important;font-size:14px!important;font-weight:700!important;letter-spacing:-.01em}.pricing-subtitle{color:#94a3b8!important;font-size:11px!important;font-weight:500!important;letter-spacing:.6px;text-transform:uppercase}.price-metric-item{align-items:center;border-bottom:1px solid #f5f7fa;display:flex;justify-content:space-between;padding:7px 0}.price-metric-item:last-of-type{border-bottom:none;padding-bottom:4px}.price-metric-label{align-items:center;color:#475569;display:flex;font-size:12.5px;font-weight:500;gap:10px;min-width:0}.price-metric-icon{align-items:center;border-radius:8px;display:inline-flex;flex-shrink:0;font-size:12px;height:26px;justify-content:center;width:26px}.price-metric-icon.icon-distance{background:#1890ff1a;color:#1890ff}.price-metric-icon.icon-base{background:#22c55e1a;color:#16a34a}.price-metric-icon.icon-rate{background:#f59e0b1f;color:#d97706}.price-metric-sub{color:#94a3b8;font-size:11.5px;font-weight:500}.price-metric-value{align-items:baseline;color:#1e293b;display:inline-flex;font-size:13.5px;font-weight:700;gap:2px;white-space:nowrap}.price-metric-value.highlight{color:#1890ff}.price-metric-unit{color:#94a3b8;font-size:11px;font-weight:500;margin-left:2px}.total-charge-badge{align-items:center;background:linear-gradient(135deg,#1890ff14,#65387a1a);border:1px solid #65387a2e;border-radius:10px;display:flex;gap:12px;justify-content:space-between;margin-top:12px;padding:10px 14px}.total-charge-left{align-items:center;display:inline-flex;gap:8px;min-width:0}.total-charge-icon{color:#65387a;flex-shrink:0;font-size:13px}.total-charge-label{color:#65387a;font-size:11.5px;font-weight:700;letter-spacing:.6px;text-transform:uppercase}.total-charge-val{color:#65387a;font-size:20px;font-weight:800;letter-spacing:-.01em;line-height:1.1;white-space:nowrap}.gradient-btn-create{align-items:center!important;background:linear-gradient(135deg,#1890ff,#65387a)!important;border:none!important;border-radius:10px!important;box-shadow:0 4px 12px -3px #1890ff4d,0 2px 4px #65387a1a!important;color:#fff!important;display:inline-flex!important;font-size:13px!important;font-weight:600!important;gap:8px!important;justify-content:center!important;letter-spacing:.01em!important;min-height:38px!important;padding:8px 18px!important;text-transform:none!important;transition:all .22s cubic-bezier(.4,0,.2,1)!important}.gradient-btn-create .MuiButton-endIcon,.gradient-btn-create .MuiButton-startIcon{margin:0!important}.gradient-btn-create:hover{box-shadow:0 8px 18px -4px #1890ff66,0 3px 8px #65387a2e!important;filter:brightness(1.04)}.gradient-btn-create:active{filter:brightness(.98)}.gradient-btn-create.Mui-disabled,.gradient-btn-create:disabled{background:#e2e8f0!important;box-shadow:none!important;color:#94a3b8!important;cursor:not-allowed!important}.completion-checklist{list-style:none;margin:16px 0;padding:0}.completion-item{align-items:center;color:#64748b;display:flex;font-size:14.5px;gap:12px;line-height:1.4;margin-bottom:10px;transition:all .3s ease}.completion-item.completed{color:#0f172a;font-weight:600}.completion-bullet{background-color:#cbd5e1;border-radius:50%;flex-shrink:0;height:10px;transition:all .3s ease;width:10px}.completion-item.completed .completion-bullet{background-color:#10b981;box-shadow:0 0 8px #10b981}.address-card-btn{background:#fff!important;border:1.5px solid #eef2f6!important;border-radius:12px!important;margin-bottom:12px;padding:16px!important;text-transform:none!important;transition:all .2s ease!important;width:100%}.address-card-btn:hover{background-color:#1890ff05!important;border-color:#1890ff!important;box-shadow:0 4px 12px #00000008;transform:translateY(-2px)}.address-card-btn:disabled{background-color:#f8fafc!important;border-color:#e2e8f0!important;opacity:.7}.pulse-indicator{animation:pulse-green 2s infinite;background:#10b981;border-radius:50%;box-shadow:0 0 0 0 #10b981b3;height:8px;width:8px}@keyframes pulse-green{0%{box-shadow:0 0 0 0 #10b981b3;transform:scale(.95)}70%{box-shadow:0 0 0 6px #10b98100;transform:scale(1)}to{box-shadow:0 0 0 0 #10b98100;transform:scale(.95)}}.pulse-yellow{animation:pulse-yellow-anim 2s infinite;background:#f59e0b;box-shadow:0 0 0 0 #f59e0bb3}@keyframes pulse-yellow-anim{0%{box-shadow:0 0 0 0 #f59e0bb3;transform:scale(.95)}70%{box-shadow:0 0 0 6px #f59e0b00;transform:scale(1)}to{box-shadow:0 0 0 0 #f59e0b00;transform:scale(.95)}}@media (max-width:959px){.connector-line-wrapper{display:none}}@media (min-width:900px){.route-flow{align-items:stretch;flex-direction:row;gap:16px}.route-flow>.location-panel{flex:1 1;min-width:0}.route-flow>.location-panel .MuiGrid-container>.MuiGrid-item{flex-basis:100%!important;max-width:100%!important}.route-flow-link{align-items:center;flex-direction:column;flex-shrink:0;gap:14px;justify-content:center;min-height:0;min-width:92px;padding:8px 4px}.route-flow-link:before{display:none}.route-flow-arrow svg{transform:rotate(-90deg);transition:transform .25s ease}.route-flow-swap{margin-left:0!important;margin-top:0!important}.route-flow-distance{flex-direction:column;gap:4px;line-height:1.2;padding:8px 10px;text-align:center}.route-flow-distance .dist-label{display:none}.route-flow-distance .dist-placeholder{font-size:11px;line-height:1.3}}@media (min-width:1536px){.route-flow>.location-panel .MuiGrid-container>.MuiGrid-item.MuiGrid-grid-sm-6{flex-basis:50%!important;max-width:50%!important}}@media (max-width:1400px){.orders-card .MuiTypography-h5{font-size:17px!important}.orders-card .MuiTypography-h6{font-size:14.5px!important}.lp-title{font-size:15.5px}.lp-subtitle{font-size:12px;margin-top:1px}.lp-badge{border-radius:10px;font-size:15px;height:36px;width:36px}.lp-action-btn{font-size:12.5px!important;padding:5px 10px!important}.route-flow-link{min-height:60px;padding:16px 0 16px 26px}.route-flow-link:before{left:41px}.route-flow-arrow{height:28px;width:28px}.route-flow-distance{font-size:12.5px;padding:4px 12px}.route-flow-swap{font-size:12px!important;padding:4px 10px!important}.map-preview-wrapper{height:220px;min-height:220px}.weight-card-btn{padding:8px 6px}.weight-card-label{font-size:11.5px}.weight-card-desc{font-size:9px}.orders-card{padding:16px!important}.orders-card.page-header-row{padding:10px 16px!important}}@media (min-width:900px){.MuiContainer-root:has(.orders-workspace-bg){max-width:1600px!important;padding-left:16px!important;padding-right:16px!important}main:has(.orders-workspace-bg){padding:16px!important}}.header-compact-tf .MuiOutlinedInput-root{background:#fff;border-radius:10px!important;font-size:12.5px!important;height:40px!important;padding-left:10px!important}.header-compact-tf .MuiOutlinedInput-input{font-size:12.5px!important;padding-bottom:6px!important;padding-top:6px!important}.header-compact-tf .MuiInputLabel-root{color:#64748b!important;font-size:11.5px!important;font-weight:600;letter-spacing:.02em}.header-compact-tf .MuiInputLabel-shrink{background:#fff;padding:0 4px;transform:translate(12px,-7px) scale(.82)!important}.header-compact-tf .MuiOutlinedInput-notchedOutline{border-color:#e2e8f0}.header-compact-tf:hover .MuiOutlinedInput-notchedOutline{border-color:#cbd5e1}.header-compact-tf .Mui-focused .MuiOutlinedInput-notchedOutline{border-width:1.5px!important}.header-compact-input .MuiAutocomplete-endAdornment{align-items:center;display:inline-flex;gap:2px;height:auto;right:8px;top:50%;transform:translateY(-50%)}.header-compact-input .MuiAutocomplete-endAdornment .MuiSvgIcon-root{display:block;font-size:16px}.header-compact-input .MuiAutocomplete-clearIndicator,.header-compact-input .MuiAutocomplete-popupIndicator{align-items:center;color:#94a3b8!important;display:inline-flex;height:22px;justify-content:center;padding:3px!important;width:22px}.header-compact-input .MuiAutocomplete-clearIndicator:hover,.header-compact-input .MuiAutocomplete-popupIndicator:hover{background:#94a3b81f!important;color:#475569!important}.header-compact-input .MuiAutocomplete-popupIndicator{margin-right:0}.header-compact-input .MuiOutlinedInput-root{padding-bottom:0!important;padding-right:60px!important;padding-top:0!important}.header-compact-input .MuiAutocomplete-input{height:auto!important;padding:4px 4px 4px 0!important}.page-header-row{min-height:0!important}.delivery-prefs-card{background:linear-gradient(135deg,#fff,#fbfcff)!important;border:1px solid #eef2f6!important;border-radius:14px!important}.delivery-prefs-header{align-items:baseline;border-bottom:1px solid #f1f5f9;display:flex;gap:10px;justify-content:space-between;margin-bottom:10px;padding-bottom:10px}.delivery-prefs-title{color:#1e293b!important;font-size:14px!important;font-weight:700!important;letter-spacing:-.01em;line-height:1.2}.delivery-prefs-sub{color:#94a3b8!important;font-size:10.5px!important;font-weight:500!important;letter-spacing:.55px;line-height:1.2;text-align:right;text-transform:uppercase}.delivery-prefs-row{display:flex;flex-direction:column;gap:10px}.delivery-prefs-field{display:flex;flex-direction:column;gap:5px}.delivery-prefs-label{align-items:center;color:#64748b;display:inline-flex;font-size:10.5px;font-weight:700;gap:5px;letter-spacing:.55px;text-transform:uppercase}.sms-toggle-tile{align-items:center;background:#fafbfc;border:1px solid #eef2f6;border-radius:10px;cursor:pointer;display:flex;gap:10px;justify-content:space-between;padding:8px 12px;transition:border-color .2s ease,background .2s ease,box-shadow .2s ease;-webkit-user-select:none;user-select:none}.sms-toggle-tile:hover{background:#fff;border-color:#cbd5e1}.sms-toggle-tile.is-active{background:linear-gradient(135deg,#1890ff0f,#65387a0d);border-color:#1890ff47;box-shadow:0 3px 10px -3px #1890ff2e}.sms-toggle-left{gap:9px;min-width:0}.sms-toggle-icon,.sms-toggle-left{align-items:center;display:inline-flex}.sms-toggle-icon{background:#eef2f6;border-radius:8px;color:#94a3b8;flex-shrink:0;height:28px;justify-content:center;transition:all .2s ease;width:28px}.sms-toggle-tile.is-active .sms-toggle-icon{background:linear-gradient(135deg,#1890ff,#65387a);box-shadow:0 3px 10px #65387a38;color:#fff}.sms-toggle-title{color:#1e293b!important;font-size:12.5px!important;font-weight:700!important;letter-spacing:-.005em;line-height:1.2!important}.sms-toggle-sub{color:#94a3b8!important;font-size:10.5px!important;font-weight:500!important;line-height:1.2!important;margin-top:1px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sms-toggle-tile .MuiSwitch-root{flex-shrink:0}.route-stepper{align-items:stretch;background:linear-gradient(135deg,#f8fafc,#f1f5f9);border:1px solid #e2e8f0;border-radius:12px;display:flex;gap:0;margin-bottom:12px;padding:4px}.route-step{align-items:center;background:#0000;border-radius:9px;cursor:pointer;display:flex;flex:1 1;gap:10px;outline:none;padding:6px 10px;transition:background-color .22s ease,box-shadow .22s ease,transform .22s ease;-webkit-user-select:none;user-select:none}.route-step:hover{background:#fff9}.route-step.is-active{background:#fff;box-shadow:0 6px 18px -8px #0f172a1f,0 2px 6px -2px #0f172a0f;transform:translateY(-1px)}.route-step.is-locked{cursor:not-allowed;opacity:.6}.route-step.is-locked:hover{background:#0000}.route-step-index{align-items:center;background:#fff;border:1.5px solid #e2e8f0;border-radius:50%;color:#94a3b8;display:inline-flex;flex-shrink:0;font-size:12px;font-weight:700;height:26px;justify-content:center;transition:all .22s ease;width:26px}.step-pickup.is-active .route-step-index{background:linear-gradient(135deg,#1890ff,#096dd9);border-color:#0000;box-shadow:0 4px 12px #1890ff52;color:#fff}.step-drop.is-active .route-step-index{background:linear-gradient(135deg,#a855f7,#65387a);border-color:#0000;box-shadow:0 4px 12px #65387a52;color:#fff}.step-pickup.is-done:not(.is-active) .route-step-index{background:#22c55e1f;border-color:#22c55e59;color:#16a34a}.route-step-text{display:flex;flex-direction:column;line-height:1.2}.route-step-title{color:#1e293b!important;font-size:13px!important;font-weight:700!important;letter-spacing:-.01em}.route-step-sub,.route-step.is-locked .route-step-title{color:#94a3b8!important}.route-step-sub{font-size:10.5px!important;font-weight:500!important;margin-top:1px!important}.route-step-connector{align-items:center;display:flex;flex-shrink:0;justify-content:center;min-width:28px;padding:0 6px;position:relative}.route-step-line{background:#e2e8f0;border-radius:2px;height:2px;transition:background .3s ease;width:100%}.route-step-connector.is-done .route-step-line{background:linear-gradient(90deg,#1890ff,#a855f7)}.route-step-line-arrow{align-items:center;background:#fff;border:1.5px solid #e2e8f0;border-radius:50%;color:#cbd5e1;display:inline-flex;font-size:10px;height:22px;justify-content:center;position:absolute;transition:all .3s ease;width:22px}.route-step-connector.is-done .route-step-line-arrow{border-color:#a855f766;color:#a855f7}.step-nav{align-items:center;border-top:1px dashed #e2e8f0;display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;margin-top:12px;padding-top:10px}.step-nav-hint{color:#64748b!important;font-size:11.5px!important;font-weight:500!important}.step-nav-btn{border-radius:8px!important;font-size:12px!important;font-weight:600!important;letter-spacing:.01em!important;min-height:32px!important;padding:6px 14px!important;text-transform:none!important;transition:all .22s ease!important}.step-nav-next{background:linear-gradient(135deg,#1890ff,#65387a)!important;box-shadow:0 6px 18px -6px #65387a59!important;color:#fff!important}.step-nav-next:hover{box-shadow:0 10px 22px -8px #65387a73!important;filter:brightness(1.05);transform:translateY(-1px)}.step-nav-next.Mui-disabled{background:#e2e8f0!important;box-shadow:none!important;color:#94a3b8!important}.step-nav-back{background:#f1f5f9!important;border:1px solid #e2e8f0!important;color:#475569!important}.step-nav-back:hover{background:#e2e8f0!important;color:#1e293b!important}@media (max-width:599px){.route-step-sub{display:none!important}.route-step{gap:8px;padding:8px 10px}.route-step-index{font-size:13px;height:28px;width:28px}.step-nav{align-items:stretch;flex-direction:column-reverse}.step-nav-btn{width:100%}} \ No newline at end of file diff --git a/build/static/css/6666.a79ab83b.chunk.css b/build/static/css/6666.5a41aae9.chunk.css similarity index 90% rename from build/static/css/6666.a79ab83b.chunk.css rename to build/static/css/6666.5a41aae9.chunk.css index c4e0fa1..2a75e4e 100644 --- a/build/static/css/6666.a79ab83b.chunk.css +++ b/build/static/css/6666.5a41aae9.chunk.css @@ -1 +1 @@ -.leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{left:0;position:absolute;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-drag:none;-webkit-user-select:none;user-select:none}.leaflet-tile::selection{background:#0000}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{height:1600px;-webkit-transform-origin:0 0;width:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-height:none!important;max-width:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-height:none!important;max-width:none!important;padding:0;width:auto}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{box-sizing:border-box;height:0;width:0;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{height:1px;width:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{pointer-events:visiblePainted;pointer-events:auto;position:relative;z-index:800}.leaflet-bottom,.leaflet-top{pointer-events:none;position:absolute;z-index:1000}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{clear:both;float:left}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{background:#ffffff80;border:2px dotted #38f}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px #000000a6}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;color:#000;display:block;height:26px;line-height:26px;text-align:center;text-decoration:none;width:26px}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:focus,.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.leaflet-bar a.leaflet-disabled{background-color:#f4f4f4;color:#bbb;cursor:default}.leaflet-touch .leaflet-bar a{height:30px;line-height:30px;width:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px #0006}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);height:36px;width:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{height:44px;width:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{background:#fff;color:#333;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{overflow-x:hidden;overflow-y:scroll;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;line-height:1.4;padding:0 5px}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:focus,.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;height:.6669em;vertical-align:initial!important;width:1em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{background:#fffc;border:2px solid #777;border-top:none;box-sizing:border-box;line-height:1.1;padding:2px 5px 1px;text-shadow:1px 1px #fff;white-space:nowrap}.leaflet-control-scale-line:not(:first-child){border-bottom:none;border-top:2px solid #777;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:2px solid #0003}.leaflet-popup{margin-bottom:20px;position:absolute;text-align:center}.leaflet-popup-content-wrapper{border-radius:12px;padding:1px;text-align:left}.leaflet-popup-content{font-size:13px;font-size:1.08333em;line-height:1.3;margin:13px 24px 13px 20px;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{height:20px;left:50%;margin-left:-20px;margin-top:-1px;overflow:hidden;pointer-events:none;position:absolute;width:40px}.leaflet-popup-tip{height:17px;margin:-10px auto 0;padding:1px;pointer-events:auto;transform:rotate(45deg);width:17px}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px #0006;color:#333}.leaflet-container a.leaflet-popup-close-button{background:#0000;border:none;color:#757575;font:16px/24px Tahoma,Verdana,sans-serif;height:24px;position:absolute;right:0;text-align:center;text-decoration:none;top:0;width:24px}.leaflet-container a.leaflet-popup-close-button:focus,.leaflet-container a.leaflet-popup-close-button:hover{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678,M12=0.70710678,M21=-0.70710678,M22=0.70710678);margin:0 auto;width:24px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{background-color:#fff;border:1px solid #fff;border-radius:3px;box-shadow:0 1px 3px #0006;color:#222;padding:6px;pointer-events:none;position:absolute;-webkit-user-select:none;user-select:none;white-space:nowrap}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{background:#0000;border:6px solid #0000;content:"";pointer-events:none;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{border-top-color:#fff;bottom:0;margin-bottom:-12px}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-left:-6px;margin-top:-12px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;left:0;margin-left:-12px}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}:root{--bg:#fff;--bg-sub:#f8fafc;--bg-card:#fff;--border:#e2e8f0;--border-active:#3b82f6;--text:#1e293b;--text-muted:#64748b;--accent:#3b82f6;--accent-soft:#3b82f614;--kitchen:#f59e0b;--kitchen-soft:#f59e0b1a;--success:#22c55e;--shadow:0 4px 12px #0000000d;--shadow-lg:0 10px 25px -5px #00000014}.dispatch-container{background:#fff;background:var(--bg);color:#1e293b;color:var(--text);display:flex;flex-direction:column;font-family:Inter,-apple-system,sans-serif;height:calc(100vh - 88px);margin:-24px;overflow:hidden;position:relative;width:calc(100% + 48px)}.dispatch-container.embedded{flex:1 1;height:100%;margin:0;min-height:0;width:100%}.dispatch-container *{box-sizing:border-box;margin:0;padding:0}.dispatch-container #hdr{align-items:center;background:#fff;background:var(--bg);border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border);display:flex;flex-shrink:0;height:56px;justify-content:space-between;padding:0 24px;z-index:1010}.dispatch-container .logo{align-items:center;display:flex;gap:12px}.dispatch-container .logo-badge{align-items:center;background:linear-gradient(135deg,#3b82f6,#2563eb);border-radius:8px;color:#fff;display:flex;font-size:14px;font-weight:800;height:32px;justify-content:center;width:32px}.dispatch-container .logo-name{color:#1e293b;color:var(--text);font-size:18px;font-weight:800;letter-spacing:-.02em}.dispatch-container .logo-name em{color:#3b82f6;color:var(--accent);font-style:normal;opacity:.8}.dispatch-container .logo-city-wrap{display:inline-block;position:relative}.dispatch-container .logo-city{align-items:center;background:#7b1fa214;border:1px solid #7b1fa240;border-radius:999px;color:#7b1fa2;cursor:pointer;display:inline-flex;font-family:inherit;font-size:11px;font-weight:700;gap:6px;letter-spacing:.02em;line-height:1;padding:4px 8px 4px 10px;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}.dispatch-container .logo-city:hover{background:#7b1fa224;border-color:#7b1fa273}.dispatch-container .logo-city.open{background:#7b1fa22e;border-color:#7b1fa28c;box-shadow:0 4px 12px #7b1fa22e}.dispatch-container .logo-city svg{flex-shrink:0;font-size:13px}.dispatch-container .logo-city-caret{font-size:15px;transition:transform .2s ease}.dispatch-container .logo-city.open .logo-city-caret{transform:rotate(180deg)}.dispatch-container .logo-city-text{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .logo-city-menu{animation:logo-city-menu-in .14s ease-out;background:#fff;border:1px solid #7b1fa22e;border-radius:12px;box-shadow:0 16px 36px #0f172a29;left:0;max-height:320px;min-width:200px;overflow-y:auto;padding:6px;position:absolute;top:calc(100% + 6px);z-index:1000}@keyframes logo-city-menu-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.dispatch-container .logo-city-menu::-webkit-scrollbar{width:6px}.dispatch-container .logo-city-menu::-webkit-scrollbar-thumb{background:#7b1fa24d;border-radius:999px}.dispatch-container .logo-city-option{align-items:center;background:#0000;border:0;border-radius:8px;color:#1e293b;cursor:pointer;display:flex;font-family:inherit;font-size:12px;font-weight:600;gap:8px;padding:8px 10px;text-align:left;transition:background .12s ease;width:100%}.dispatch-container .logo-city-option:hover{background:#7b1fa20f}.dispatch-container .logo-city-option.active{background:#7b1fa21a;color:#7b1fa2}.dispatch-container .logo-city-option-icon{color:#7b1fa2;flex-shrink:0;font-size:14px}.dispatch-container .logo-city-option span:not(.logo-city-option-check){flex:1 1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .logo-city-option-check{color:#7b1fa2;flex-shrink:0;font-weight:800}.dispatch-container .hdr-sep{background:#e2e8f0;background:var(--border);height:20px;margin:0 4px;width:1px}.dispatch-container .hdr-meta{color:#64748b;color:var(--text-muted);font-size:12px;font-weight:500}.dispatch-container #clock{background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:10px;color:#1e293b;color:var(--text);font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600;padding:7px 16px}.dispatch-container .hdr-stats{align-items:center;display:flex;flex-wrap:nowrap;gap:16px;margin-left:auto;margin-right:16px;min-width:0}.dispatch-container #strat-row{border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border);display:flex;flex-shrink:0;height:54px;padding:0 24px}.dispatch-container #strat-row,.dispatch-container .sbt{align-items:center;background:#fff;background:var(--bg);gap:8px}.dispatch-container .sbt{border:1px solid #0f172a14;border-radius:10px;color:#64748b;color:var(--text-muted);cursor:pointer;display:inline-flex;font-family:inherit;font-size:13px;font-weight:600;line-height:1;padding:8px 14px;transition:all .2s cubic-bezier(.4,0,.2,1)}.dispatch-container .sbt:hover{background:#f8fafc;background:var(--bg-sub);border-color:#64748b;border-color:var(--text-muted);color:#1e293b;color:var(--text)}.dispatch-container .sbt.active{background:#3b82f6;background:var(--accent);border-color:#3b82f6;border-color:var(--accent);box-shadow:0 4px 12px #3b82f640;color:#fff}.dispatch-container .sbt .sbt-icon{align-items:center;color:inherit;display:inline-flex;flex-shrink:0;font-size:18px;height:18px;justify-content:center;line-height:1;width:18px}.dispatch-container .sbt .sbt-icon svg{display:block;height:1em;vertical-align:middle;width:1em}.dispatch-container .strat-stats{align-items:center;border-left:1px solid #e2e8f0;border-left:1px solid var(--border);display:inline-flex;gap:8px;height:32px;margin-left:8px;padding-left:12px}.dispatch-container .strat-stats.strat-stats-right{border-left:none;margin-left:auto;padding-left:0}.dispatch-container .strat-stat{align-items:center;background:#fff;background:var(--bg);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:999px;color:#1e293b;color:var(--text);display:inline-flex;font-size:12px;font-weight:700;gap:8px;line-height:1;padding:7px 15px;transition:all .15s ease;white-space:nowrap}.dispatch-container .strat-stat-icon{font-size:13px;line-height:1}.dispatch-container .strat-stat-label{color:#64748b;color:var(--text-muted);font-size:10px;font-weight:700;letter-spacing:.05em;text-transform:uppercase}.dispatch-container .strat-stat-value{font-size:13px;font-weight:800}.dispatch-container .strat-stat-orders{background:#3b82f614;background:var(--accent-soft);border-color:#3b82f640}.dispatch-container .strat-stat-orders .strat-stat-value{color:#3b82f6;color:var(--accent)}.dispatch-container .strat-stat-profit{background:#22c55e1a;border-color:#22c55e4d}.dispatch-container .strat-stat-profit .strat-stat-label,.dispatch-container .strat-stat-profit .strat-stat-value{color:#22c55e;color:var(--success)}.dispatch-container .strat-stat-loss{background:#ef44441a;border-color:#ef444459}.dispatch-container .strat-stat-loss .strat-stat-label,.dispatch-container .strat-stat-loss .strat-stat-value{color:#dc2626}.dispatch-container .live-controls{align-items:center;display:flex;gap:12px;margin-left:auto}.dispatch-container .live-status{align-items:center;background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:999px;color:#64748b;color:var(--text-muted);display:inline-flex;font-size:12px;font-weight:600;gap:8px;padding:7px 15px}.dispatch-container .live-status-ready{color:#22c55e;color:var(--success)}.dispatch-container .live-status-error{color:#ef4444}.dispatch-container .live-status-sub{color:#64748b;color:var(--text-muted);font-size:11px;font-weight:500;opacity:.85}.dispatch-container .live-dot{animation:live-pulse 1.2s ease-in-out infinite;background:#3b82f6;background:var(--accent);border-radius:50%;height:8px;width:8px}.dispatch-container .live-dot.ready{animation:none;background:#22c55e;background:var(--success)}.dispatch-container .live-dot.error{animation:none;background:#ef4444}@keyframes live-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.85)}}.dispatch-container .date-chip{align-items:stretch;background:#fff;border:1px solid #0f172a14;border-radius:12px;box-shadow:0 1px 2px #0f172a0a,0 4px 12px #0f172a0f;display:inline-flex;gap:0;position:relative;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.dispatch-container .date-chip.is-open{border-color:#6366f1;box-shadow:0 0 0 3px #6366f133,0 12px 30px #6366f138}.dispatch-container .date-chip:hover{border-color:#6366f173;box-shadow:0 2px 4px #0f172a0f,0 8px 22px #6366f126;transform:translateY(-1px)}.dispatch-container .date-chip:focus-within{border-color:#6366f1;box-shadow:0 0 0 3px #6366f133,0 8px 22px #6366f138}.dispatch-container .date-chip-main{align-items:center;-webkit-appearance:none;appearance:none;background:#0000;border:0;color:inherit;cursor:pointer;display:inline-flex;font:inherit;gap:10px;min-width:0;padding:8px 18px;position:relative;text-align:left}.dispatch-container .date-chip-main:focus{outline:none}.dispatch-container .date-chip-main:hover{background:#6366f10a}.dispatch-container .date-chip-icon{align-items:center;background:linear-gradient(135deg,#eef2ff,#e0e7ff);border-radius:8px;color:#4338ca;display:inline-flex;flex-shrink:0;font-size:15px;height:28px;justify-content:center;width:28px}.dispatch-container .date-chip-text{align-items:flex-start;display:flex;flex-direction:column;gap:2px;line-height:1.1;min-width:0}.dispatch-container .date-chip-label{color:#94a3b8;font-size:10px;gap:6px;letter-spacing:.08em}.dispatch-container .date-chip-label,.dispatch-container .date-chip-today-pill{align-items:center;display:inline-flex;font-weight:800;text-transform:uppercase}.dispatch-container .date-chip-today-pill{background:linear-gradient(135deg,#6366f1,#3b82f6);border-radius:999px;box-shadow:0 2px 6px #6366f159;color:#fff;font-size:9px;letter-spacing:.06em;padding:1px 6px}.dispatch-container .date-chip-value{color:#0f172a;font-size:13px;font-weight:700;letter-spacing:.01em;white-space:nowrap}.dispatch-container .date-chip-chevron{align-items:center;color:#94a3b8;display:inline-flex;font-size:18px;justify-content:center;margin-left:2px;transition:color .18s ease,transform .18s ease}.dispatch-container .date-chip-main:hover .date-chip-chevron{color:#4338ca}.dispatch-container .date-chip-chevron.is-open{color:#4338ca;transform:rotate(180deg)}.dispatch-container .date-cal-popover{animation:date-cal-in .18s cubic-bezier(.4,0,.2,1);background:#fff;border:1px solid #0f172a14;border-radius:16px;box-shadow:0 18px 44px #0f172a2e,0 4px 12px #0f172a0f;padding:14px 14px 10px;position:absolute;right:0;top:calc(100% + 10px);width:304px;z-index:1000}.dispatch-container .date-cal-popover:after,.dispatch-container .date-cal-popover:before{border-left:8px solid #0000;border-right:8px solid #0000;bottom:100%;content:"";height:0;position:absolute;right:28px;width:0}.dispatch-container .date-cal-popover:before{border-bottom:8px solid #0f172a14}.dispatch-container .date-cal-popover:after{border-bottom:8px solid #fff;margin-bottom:-1px}@keyframes date-cal-in{0%{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.dispatch-container .date-cal-header{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:10px}.dispatch-container .date-cal-title{color:#0f172a;flex:1 1;font-size:14px;font-weight:800;letter-spacing:.01em;text-align:center}.dispatch-container .date-cal-nav{align-items:center;-webkit-appearance:none;appearance:none;background:#f8fafce6;border:0;border-radius:8px;color:#475569;cursor:pointer;display:inline-flex;font-size:18px;height:30px;justify-content:center;transition:background .15s ease,color .15s ease;width:30px}.dispatch-container .date-cal-nav:hover:not(:disabled){background:#6366f11a;color:#4338ca}.dispatch-container .date-cal-nav:disabled{cursor:not-allowed;opacity:.35}.dispatch-container .date-cal-grid,.dispatch-container .date-cal-weekdays{grid-gap:2px;display:grid;gap:2px;grid-template-columns:repeat(7,1fr)}.dispatch-container .date-cal-weekdays{margin-bottom:4px}.dispatch-container .date-cal-weekday{color:#94a3b8;font-size:10px;font-weight:800;letter-spacing:.06em;padding:4px 0;text-align:center;text-transform:uppercase}.dispatch-container .date-cal-day{align-items:center;-webkit-appearance:none;appearance:none;background:#0000;border:0;border-radius:9px;color:#0f172a;cursor:pointer;display:inline-flex;font-size:13px;font-weight:600;height:36px;justify-content:center;transition:background .12s ease,color .12s ease,box-shadow .18s ease,transform .12s ease}.dispatch-container .date-cal-day:hover:not(:disabled):not(.is-selected){background:#6366f11a;color:#4338ca}.dispatch-container .date-cal-day.is-other-month{color:#cbd5e1;font-weight:500}.dispatch-container .date-cal-day.is-today{box-shadow:inset 0 0 0 1.5px #6366f18c;color:#4338ca;font-weight:800}.dispatch-container .date-cal-day.is-selected{background:linear-gradient(135deg,#6366f1,#3b82f6);box-shadow:0 4px 12px #6366f159;color:#fff;font-weight:800}.dispatch-container .date-cal-day.is-selected.is-today{box-shadow:0 4px 12px #6366f159}.dispatch-container .date-cal-day.is-selected:hover{box-shadow:0 6px 16px #6366f173;transform:translateY(-1px)}.dispatch-container .date-cal-day.is-disabled{color:#e2e8f0;cursor:not-allowed;pointer-events:none}.dispatch-container .date-cal-day:focus-visible{outline:2px solid #6366f180;outline-offset:1px}.dispatch-container .date-cal-presets{border-top:1px solid #0f172a0f;display:flex;gap:6px;margin-top:10px;padding-top:10px}.dispatch-container .date-cal-preset{-webkit-appearance:none;appearance:none;background:#fff;border:1px solid #0f172a14;border-radius:9px;color:#475569;cursor:pointer;flex:1 1;font-size:11px;font-weight:700;letter-spacing:.02em;padding:7px 10px;transition:background .15s ease,border-color .15s ease,color .15s ease,transform .12s ease}.dispatch-container .date-cal-preset:hover{background:#6366f114;border-color:#6366f159;color:#4338ca;transform:translateY(-1px)}.dispatch-container .date-cal-preset:focus-visible{outline:2px solid #6366f180;outline-offset:1px}.dispatch-container .date-chip-nav{align-items:center;-webkit-appearance:none;appearance:none;background:#f8fafcb3;border:0;border-left:1px solid #0f172a0f;border-right:1px solid #0f172a0f;color:#64748b;cursor:pointer;display:inline-flex;font-size:18px;justify-content:center;transition:background .15s ease,color .15s ease;width:34px}.dispatch-container .date-chip-nav:first-child{border-left:0;border-radius:11px 0 0 11px;border-right:1px solid #0f172a0f}.dispatch-container .date-chip-nav:last-child{border-left:1px solid #0f172a0f;border-radius:0 11px 11px 0;border-right:0}.dispatch-container .date-chip-nav:hover:not(:disabled){background:#6366f114;color:#4338ca}.dispatch-container .date-chip-nav:disabled{cursor:not-allowed;opacity:.4}.dispatch-container .date-chip-nav:focus-visible{outline:2px solid #6366f180;outline-offset:-2px}.dispatch-container #batch-row{align-items:center;background:#f8fafc;background:var(--bg-sub);border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border);display:flex;flex-shrink:0;gap:12px;min-width:0;padding:12px 24px}.dispatch-container .batch-scroll{-webkit-overflow-scrolling:touch;align-items:center;display:flex;flex:1 1;gap:10px;min-width:0;overflow-x:auto;overflow-y:hidden;padding-bottom:2px;scroll-behavior:smooth;scrollbar-color:#64748b66 #0000;scrollbar-width:thin}.dispatch-container .batch-scroll::-webkit-scrollbar{height:6px}.dispatch-container .batch-scroll::-webkit-scrollbar-track{background:#0000}.dispatch-container .batch-scroll::-webkit-scrollbar-thumb{background:#64748b4d;border-radius:999px}.dispatch-container .batch-scroll::-webkit-scrollbar-thumb:hover{background:#64748b8c}.dispatch-container .batch-label{color:#64748b;color:var(--text-muted);flex-shrink:0;font-size:11px;font-weight:800;letter-spacing:.08em;margin-right:4px;text-transform:uppercase}.dispatch-container .time-field-wrap{display:inline-block;flex-shrink:0;margin-right:4px;position:relative}.dispatch-container .time-field-btn{align-items:center;background:#7b1fa214;border:1px solid #7b1fa240;border-radius:999px;color:#7b1fa2;cursor:pointer;display:inline-flex;font-family:inherit;font-size:12.5px;font-weight:700;gap:6px;letter-spacing:.02em;line-height:1;padding:7px 12px;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}.dispatch-container .time-field-btn:hover{background:#7b1fa224;border-color:#7b1fa273}.dispatch-container .time-field-btn.open{background:#7b1fa22e;border-color:#7b1fa28c;box-shadow:0 4px 12px #7b1fa22e}.dispatch-container .time-field-btn svg{flex-shrink:0;font-size:13px}.dispatch-container .time-field-caret{font-size:15px;transition:transform .2s ease}.dispatch-container .time-field-btn.open .time-field-caret{transform:rotate(180deg)}.dispatch-container .time-field-text{white-space:nowrap}.dispatch-container .time-field-menu{animation:logo-city-menu-in .14s ease-out;background:#fff;border:1px solid #7b1fa22e;border-radius:12px;box-shadow:0 16px 36px #0f172a29;left:0;min-width:180px;padding:6px;position:absolute;top:calc(100% + 6px);z-index:1000}.dispatch-container .time-field-option{align-items:center;background:#0000;border:0;border-radius:8px;color:#1e293b;cursor:pointer;display:flex;font-family:inherit;font-size:12px;font-weight:600;gap:8px;padding:8px 10px;text-align:left;transition:background .12s ease;width:100%}.dispatch-container .time-field-option:hover{background:#7b1fa20f}.dispatch-container .time-field-option.active{background:#7b1fa21a;color:#7b1fa2}.dispatch-container .time-field-option-icon{color:#7b1fa2;flex-shrink:0;font-size:14px}.dispatch-container .time-field-option-check{color:#7b1fa2;font-weight:800;margin-left:auto}.dispatch-container .slot-edit-wrap{display:inline-block;flex-shrink:0;margin-right:4px;position:relative}.dispatch-container .slot-edit-btn{align-items:center;background:#0f172a0a;border:1px dashed #0f172a2e;border-radius:999px;color:#475569;cursor:pointer;display:inline-flex;font-family:inherit;font-size:12.5px;font-weight:700;gap:6px;letter-spacing:.02em;line-height:1;padding:7px 12px}.dispatch-container .slot-edit-btn:hover{background:#0f172a14;border-color:#0f172a52;color:#0f172a}.dispatch-container .slot-edit-btn.open{background:#7b1fa21a;border-color:#7b1fa280;border-style:solid;color:#7b1fa2}.dispatch-container .slot-edit-btn svg{flex-shrink:0;font-size:13px}.dispatch-container .slot-edit-panel{animation:logo-city-menu-in .14s ease-out;background:#fff;border:1px solid #7b1fa22e;border-radius:14px;box-shadow:0 20px 44px #0f172a33;left:0;min-width:340px;padding:12px;position:absolute;top:calc(100% + 6px);z-index:1000}.dispatch-container .slot-edit-head{margin-bottom:10px}.dispatch-container .slot-edit-title{color:#0f172a;font-size:13px;font-weight:800}.dispatch-container .slot-edit-sub{color:#64748b;font-size:11px;margin-top:2px}.dispatch-container .slot-edit-list{display:flex;flex-direction:column;gap:8px;max-height:260px;overflow-y:auto;padding-right:2px}.dispatch-container .slot-edit-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:22px 70px 70px 1fr 28px}.dispatch-container .slot-edit-idx{align-items:center;background:#7b1fa21f;border-radius:6px;color:#7b1fa2;display:inline-flex;font-size:11px;font-weight:800;height:22px;justify-content:center;width:22px}.dispatch-container .slot-edit-field{display:flex;flex-direction:column;gap:2px}.dispatch-container .slot-edit-field-label{color:#94a3b8;font-size:9px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.dispatch-container .slot-edit-field input{background:#fff;border:1px solid #0f172a29;border-radius:8px;color:#0f172a;font-family:inherit;font-size:12px;font-weight:700;padding:5px 8px;width:100%}.dispatch-container .slot-edit-field input:focus{border-color:#7b1fa2;box-shadow:0 0 0 3px #7b1fa22e;outline:none}.dispatch-container .slot-edit-preview{color:#475569;font-size:11px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .slot-edit-remove{align-items:center;background:#dc26260f;border:1px solid #dc262652;border-radius:50%;color:#dc2626;cursor:pointer;display:inline-flex;font-size:16px;font-weight:800;height:26px;justify-content:center;line-height:1;padding:0;width:26px}.dispatch-container .slot-edit-remove:hover:not(:disabled){background:#dc262624;border-color:#dc26268c}.dispatch-container .slot-edit-remove:disabled{cursor:not-allowed;opacity:.4}.dispatch-container .slot-edit-actions{border-top:1px dashed #0f172a1a;display:flex;gap:8px;margin-top:12px;padding-top:10px}.dispatch-container .slot-edit-add,.dispatch-container .slot-edit-reset{border:1px solid #0000;border-radius:8px;cursor:pointer;flex:1 1;font-family:inherit;font-size:11px;font-weight:700;letter-spacing:.02em;padding:7px 10px}.dispatch-container .slot-edit-add{background:#7b1fa2;border-color:#7b1fa2;color:#fff}.dispatch-container .slot-edit-add:hover{background:#6a1591}.dispatch-container .slot-edit-reset{background:#fff;border-color:#0f172a29;color:#475569}.dispatch-container .slot-edit-reset:hover{background:#0f172a0a;color:#0f172a}.dispatch-container .batch-btn{align-items:center;background:#fff;background:var(--bg);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:999px;color:#64748b;color:var(--text-muted);cursor:pointer;display:inline-flex;flex-shrink:0;font-family:inherit;font-size:13.5px;font-weight:600;gap:8px;padding:8px 16px;transition:all .15s cubic-bezier(.4,0,.2,1);white-space:nowrap}.dispatch-container .batch-btn:hover{border-color:#64748b;border-color:var(--text-muted);color:#1e293b;color:var(--text)}.dispatch-container .batch-btn.active{border-color:#0000;box-shadow:0 4px 12px #0000001f;color:#fff}.dispatch-container .batch-btn.batch-slot.active{background:linear-gradient(135deg,#3b82f6,#6366f1)}.dispatch-container .batch-btn-icon{font-size:14px;line-height:1}.dispatch-container .batch-btn-label{letter-spacing:.01em}.dispatch-container .batch-btn-count{font-feature-settings:"tnum";align-items:center;background:#f8fafc;background:var(--bg-sub);border-radius:999px;color:#1e293b;color:var(--text);display:inline-flex;font-size:11px;font-variant-numeric:tabular-nums;font-weight:800;height:20px;justify-content:center;min-width:24px;padding:0 7px}.dispatch-container .batch-btn.active .batch-btn-count{background:#ffffff47;color:#fff}.dispatch-container .status-chip{border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.04em;padding:3px 8px;text-transform:uppercase}.dispatch-container .status-chip,.dispatch-container .step-flag{align-items:center;display:inline-flex;flex-shrink:0;margin-left:8px}.dispatch-container .step-flag{gap:5px}.dispatch-container .step-flag-svg{filter:drop-shadow(0 1px 1px rgba(0,0,0,.15));flex-shrink:0;height:18px;width:14px}.dispatch-container .step-flag-label{font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}.dispatch-container .cmark{display:block;height:100%;position:relative;width:100%}.dispatch-container .cmark.pulse{animation:cmark-pulse .8s ease-out infinite;z-index:1500!important}@keyframes cmark-pulse{0%{filter:drop-shadow(0 2px 4px rgba(59,130,246,.4));transform:scale(1)}50%{filter:drop-shadow(0 4px 8px rgba(59,130,246,.7));transform:scale(1.2)}to{filter:drop-shadow(0 2px 4px rgba(59,130,246,.4));transform:scale(1)}}.dispatch-container .cmark .cmark-flag{display:block;filter:drop-shadow(0 2px 4px rgba(0,0,0,.25));height:100%;pointer-events:none;width:100%}.dispatch-container .cmark.is-rider-focused{align-items:center;border:3px solid #fff;border-radius:50%;box-shadow:0 4px 12px #0006;color:#fff;display:flex;font-weight:800;justify-content:center;letter-spacing:.02em;position:relative}.dispatch-container .cmark.is-rider-focused .cmark-flag{filter:drop-shadow(0 1px 2px rgba(0,0,0,.35));height:22px;left:50%;pointer-events:none;position:absolute;top:-20px;transform:translateX(-2px);width:18px}.dispatch-container .cmark.is-rider-focused.pulse{animation:cmark-focused-pulse .8s ease-out infinite;z-index:1500!important}@keyframes cmark-focused-pulse{0%{box-shadow:0 0 0 0 #3b82f68c,0 4px 12px #0006;transform:scale(1)}70%{box-shadow:0 0 0 14px #3b82f600,0 4px 12px #0006;transform:scale(1.18)}to{box-shadow:0 0 0 0 #3b82f600,0 4px 12px #0006;transform:scale(1)}}.dispatch-container .live-rider-pin{--pin-color:#16a34a;height:41px;position:relative;width:24px}.dispatch-container .live-rider-pin-marker{background:var(--pin-color);border:3px solid #fff;border-radius:50% 50% 50% 0;box-shadow:0 4px 10px #0000004d;height:24px;left:0;position:absolute;top:0;transform:rotate(-45deg);width:24px}.dispatch-container .live-rider-pin-marker:after{background:#fff;border-radius:50%;content:"";inset:4px;position:absolute}.dispatch-container .live-rider-pin-label{background:var(--pin-color);border-radius:4px;box-shadow:0 2px 6px #00000040;color:#fff;font-size:11px;font-weight:700;left:30px;line-height:1.2;padding:3px 8px;position:absolute;top:2px;white-space:nowrap}.dispatch-container .live-rider-pin-label span{font-weight:500;margin-left:4px;opacity:.85}.dispatch-container #body{display:flex;flex:1 1;min-height:0;overflow:hidden;position:relative}.dispatch-container #sidebar{background:#f8fafc;background:var(--bg-sub);border-right:1px solid #e2e8f0;border-right:1px solid var(--border);display:flex;flex:0 0 400px;flex-direction:column;overflow:hidden;transition:width .32s cubic-bezier(.4,0,.2,1),flex-basis .32s cubic-bezier(.4,0,.2,1),border-right-color .2s ease;width:400px;z-index:5}.dispatch-container #body.sidebar-collapsed #sidebar{border-right-color:#0000;flex:0 0;width:0}.dispatch-container .sidebar-toggle-tab{align-items:center;background:#fff;border:1px solid #e2e8f0;border:1px solid var(--border,#0f172a1f);border-radius:10px;box-shadow:0 4px 12px #0f172a1f,0 1px 3px #0f172a0f;color:#1e293b;color:var(--text,#0f172a);cursor:pointer;display:inline-flex;font-size:18px;height:56px;justify-content:center;left:400px;line-height:1;padding:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:left .32s cubic-bezier(.4,0,.2,1),background .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease;width:22px;z-index:1200}.dispatch-container .sidebar-toggle-tab:hover{background:linear-gradient(135deg,#6366f1,#3b82f6);box-shadow:0 6px 16px #6366f159;color:#fff;transform:translate(-50%,-50%) scale(1.06)}.dispatch-container .sidebar-toggle-tab:focus-visible{outline:2px solid #3b82f6;outline:2px solid var(--accent,#3b82f6);outline-offset:2px}.dispatch-container .sidebar-toggle-tab.is-collapsed{border-left:none;border-radius:0 10px 10px 0;left:0;transform:translateY(-50%)}.dispatch-container .sidebar-toggle-tab.is-collapsed:hover{transform:translateY(-50%) scale(1.06)}.dispatch-container .sidebar-toggle-tab svg{display:block}.dispatch-container .sb-header{background:linear-gradient(180deg,#fff,#f8fafc);background:linear-gradient(180deg,#fff 0,var(--bg-sub) 100%);border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border);overflow:hidden;padding:18px 18px 16px;position:relative}.dispatch-container .sb-header:before{background:radial-gradient(circle at center,#3b82f614 0,#0000 70%);background:radial-gradient(circle at center,var(--accent-soft) 0,#0000 70%);border-radius:50%;content:"";height:160px;inset:-40px -40px auto auto;pointer-events:none;position:absolute;width:160px}.dispatch-container .sb-header>*{position:relative}.dispatch-container .sb-header-top{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:12px}.dispatch-container .sb-header-title{align-items:center;display:inline-flex;gap:8px}.dispatch-container .sb-title-bar{background:linear-gradient(180deg,#3b82f6,#6366f1);background:linear-gradient(180deg,var(--accent),#6366f1);border-radius:2px;display:inline-block;height:14px;width:3px}.dispatch-container .sb-title-text{color:#1e293b;color:var(--text);font-size:12px;font-weight:800;letter-spacing:.12em}.dispatch-container .sb-header-scope{align-items:center;background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:999px;color:#64748b;color:var(--text-muted);display:inline-flex;font-size:9px;font-weight:800;gap:5px;letter-spacing:.08em;max-width:60%;overflow:hidden;padding:3px 9px;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.dispatch-container .sb-scope-dot{background:#22c55e;background:var(--success);border-radius:50%;box-shadow:0 0 0 2px #22c55e2e;flex-shrink:0;height:6px;width:6px}.dispatch-container .sb-header-area{align-items:center;background:#3b82f614;background:var(--accent-soft);border:1px solid #3b82f638;border-radius:999px;color:#3b82f6;color:var(--accent);display:inline-flex;font-size:11px;font-weight:700;gap:6px;margin-bottom:14px;padding:4px 10px 4px 8px}.dispatch-container .sb-area-icon{align-items:center;display:inline-flex;font-size:14px;line-height:1}.dispatch-container .sb-header-tiles{grid-gap:10px;display:grid;gap:10px;grid-template-columns:1fr 1fr}.dispatch-container .sb-tile{align-items:center;background:#fff;border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:12px;box-shadow:0 2px 6px #0f172a0a;display:flex;gap:10px;padding:10px 12px;transition:transform .18s ease,box-shadow .18s ease}.dispatch-container .sb-tile:hover{box-shadow:0 6px 14px #0f172a0f;transform:translateY(-1px)}.dispatch-container .sb-tile-icon{align-items:center;border-radius:10px;display:inline-flex;flex-shrink:0;font-size:18px;height:32px;justify-content:center;width:32px}.dispatch-container .sb-tile-orders .sb-tile-icon{background:#3b82f614;background:var(--accent-soft);color:#3b82f6;color:var(--accent)}.dispatch-container .sb-tile-riders .sb-tile-icon{background:#f59e0b1f;color:#f59e0b;color:var(--kitchen)}.dispatch-container .sb-tile-body{line-height:1.1;min-width:0}.dispatch-container .sb-tile-value{font-feature-settings:"tnum";color:#1e293b;color:var(--text);font-size:22px;font-variant-numeric:tabular-nums;font-weight:800;letter-spacing:-.01em}.dispatch-container .sb-tile-label{color:#64748b;color:var(--text-muted);font-size:10px;font-weight:700;letter-spacing:.06em;margin-top:2px;text-transform:uppercase}.dispatch-container #stats-strip{grid-gap:12px;background:#fff;background:var(--bg);border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border);display:grid;gap:12px;grid-template-columns:repeat(2,1fr);padding:16px}.dispatch-container .sc{background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:12px;padding:12px}.dispatch-container .sc-lbl{color:#64748b;color:var(--text-muted);font-size:10px;font-weight:700;letter-spacing:.05em;margin-bottom:4px;text-transform:uppercase}.dispatch-container .sc-val{color:#1e293b;color:var(--text);font-size:22px;font-weight:800;line-height:1}.dispatch-container .sc-val.g{color:#22c55e;color:var(--success)}.dispatch-container .sc-sub{color:#64748b;color:var(--text-muted);font-size:11px;margin-top:4px}.dispatch-container #riders-panel{flex:1 1;overflow-y:auto;padding:16px}.dispatch-container .ph{align-items:center;color:#64748b;color:var(--text-muted);display:flex;font-size:11px;font-weight:700;gap:12px;letter-spacing:.05em;margin-bottom:16px;text-transform:uppercase}.dispatch-container .ph:after{background:#e2e8f0;background:var(--border);content:"";flex:1 1;height:1px}.dispatch-container .rcard{background:#fff;background:var(--bg-card);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:14px;box-shadow:0 4px 12px #0000000d;box-shadow:var(--shadow);cursor:pointer;margin-bottom:12px;padding:16px;transition:all .2s cubic-bezier(.4,0,.2,1)}.dispatch-container .rcard:hover{border-color:#3b82f6;border-color:var(--accent);box-shadow:0 10px 25px -5px #00000014;box-shadow:var(--shadow-lg);transform:translateY(-2px)}.dispatch-container .rcard-top{align-items:center;display:flex;gap:12px;margin-bottom:12px}.dispatch-container .kitchen-mark{box-shadow:0 0 20px #f59e0b99,0 0 40px #f59e0b4d;font-size:14px;font-weight:800;height:34px;width:34px}.dispatch-container .rcard-info{flex:1 1}.dispatch-container .rcard-emo{align-items:center;border:1.5px solid #e2e8f0;border:1.5px solid var(--border);border-radius:10px;display:flex;font-size:20px;height:40px;justify-content:center;width:40px}.dispatch-container .rcard-name{color:#1e293b;color:var(--text);font-size:15px;font-weight:700}.dispatch-container .rcard-zone{color:#64748b;color:var(--text-muted);font-size:12px;margin-top:2px}.dispatch-container .rcard-badge{font-feature-settings:"tnum","tnum";background:#f8fafc;background:var(--bg-sub);border-radius:8px;font-size:12px;font-variant-numeric:tabular-nums;font-weight:700;padding:4px 10px;white-space:nowrap}.dispatch-container .rcard-badge.is-done{background:#16a34a1f;color:#16a34a}.dispatch-container .bar-bg{background:#f8fafc;background:var(--bg-sub);border-radius:4px;height:5px;margin-bottom:12px;overflow:hidden}.dispatch-container .bar-fg{border-radius:4px;height:100%}.dispatch-container .rcard-meta{color:#64748b;color:var(--text-muted);display:flex;font-size:12px;font-weight:500;justify-content:space-between}.dispatch-container .step-ids{display:flex;flex-wrap:wrap;gap:4px;margin-top:10px}.dispatch-container .step-id{background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:4px;color:#64748b;color:var(--text-muted);font-size:10px;font-weight:700;padding:2px 6px}.dispatch-container .zone-order-change-rider{align-items:center;align-self:flex-start;background:#fff;border:1px solid #e2e8f0;border-radius:7px;color:#4f46e5;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:15px;height:26px;justify-content:center;margin-left:6px;transition:background .15s,color .15s,border-color .15s;width:26px}.dispatch-container .zone-order-change-rider:hover{background:#eef2ff;border-color:#c7d2fe;color:#4338ca}.dispatch-container #route-detail{background:#fff;background:var(--bg);flex:1 1;overflow-y:auto;padding:20px}.dispatch-container .rd-back{background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:10px;color:#1e293b;color:var(--text);cursor:pointer;font-size:12px;font-weight:600;margin-bottom:20px;padding:8px 16px;transition:all .2s}.dispatch-container .rd-back:hover{background:#e2e8f0;background:var(--border)}.dispatch-container .rd-rider-name{font-size:28px;font-weight:800;letter-spacing:-.02em;line-height:1.1;margin-bottom:6px}.dispatch-container .rd-rider-sub{color:#64748b;color:var(--text-muted);display:flex;font-size:13px;gap:16px;margin-bottom:24px}.dispatch-container .rd-stats-grid{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);margin:14px 0 22px}.dispatch-container .rd-stat{background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:12px;padding:14px 10px 12px;text-align:center;transition:transform .15s,box-shadow .15s}.dispatch-container .rd-stat:hover{box-shadow:0 4px 10px #0000000d;transform:translateY(-1px)}.dispatch-container .rd-stat-icon{font-size:18px;line-height:1;margin-bottom:6px;opacity:.9}.dispatch-container .rd-stat-value{font-feature-settings:"tnum";color:#1e293b;color:var(--text);font-size:22px;font-variant-numeric:tabular-nums;font-weight:800;letter-spacing:-.02em;line-height:1}.dispatch-container .rd-stat-unit{font-size:12px;font-weight:700;margin-left:3px;opacity:.7}.dispatch-container .rd-stat-label{color:#64748b;color:var(--text-muted);font-size:10px;font-weight:800;letter-spacing:.08em;margin-top:6px;text-transform:uppercase}.dispatch-container .rd-stat-orders{background:linear-gradient(135deg,#3b82f617,#6366f10a);border-color:#3b82f638}.dispatch-container .rd-stat-orders .rd-stat-value{color:#2563eb}.dispatch-container .rd-stat-distance{background:linear-gradient(135deg,#f59e0b1a,#f973160a);border-color:#f59e0b40}.dispatch-container .rd-stat-distance .rd-stat-value{color:#d97706}.dispatch-container .rd-stat-profit.is-gain{background:linear-gradient(135deg,#22c55e1f,#14b8a60a);border-color:#22c55e59}.dispatch-container .rd-stat-profit.is-gain .rd-stat-value{color:#16a34a}.dispatch-container .rd-stat-profit.is-gain .rd-stat-label{color:#16a34a;opacity:.75}.dispatch-container .rd-stat-profit.is-loss{background:linear-gradient(135deg,#ef44441f,#f43f5e0a);border-color:#ef444459}.dispatch-container .rd-stat-profit.is-loss .rd-stat-value{color:#dc2626}.dispatch-container .rd-stat-profit.is-loss .rd-stat-label{color:#dc2626;opacity:.75}.dispatch-container .trip-block{background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:16px;margin-bottom:24px;overflow:hidden}.dispatch-container .trip-header{align-items:center;background:#fff;border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border);display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-start;padding:10px 14px}.dispatch-container .th-badge{border-radius:6px;color:#fff;flex-shrink:0;font-size:11px;font-weight:800;letter-spacing:.02em;padding:4px 10px}.dispatch-container .trip-stats{color:#64748b;color:var(--text-muted);display:flex;flex-shrink:0;font-size:12px;font-weight:600;gap:10px}.dispatch-container .trip-sort-toggle{align-items:stretch;background:#f1f5f9;border-radius:10px;display:flex;flex-basis:100%;isolation:isolate;margin-left:0;padding:3px;position:relative;width:100%}.dispatch-container .trip-sort-pill{align-items:center;-webkit-appearance:none;appearance:none;background:#0000;border:0;border-radius:7px;color:#64748b;cursor:pointer;display:inline-flex;flex:1 1;font-size:11.5px;font-weight:600;gap:6px;justify-content:center;letter-spacing:.01em;line-height:1;min-height:28px;padding:6px 10px;transition:color .18s ease,background .18s ease,box-shadow .18s ease;white-space:nowrap}.dispatch-container .trip-sort-pill svg{color:#94a3b8;display:block;flex:0 0 auto;height:14px;transition:color .18s ease,transform .18s ease;width:14px}.dispatch-container .trip-sort-pill:hover:not(.is-active){color:#0f172a}.dispatch-container .trip-sort-pill:hover:not(.is-active) svg{color:#475569}.dispatch-container .trip-sort-pill:focus-visible{box-shadow:0 0 0 2px #6366f166;outline:none}.dispatch-container .trip-sort-pill.is-active{background:#fff;box-shadow:0 1px 2px #0f172a14,0 0 0 1px #0f172a0a,0 2px 6px #0f172a0f;color:#0f172a}.dispatch-container .trip-sort-toggle[data-mode=planned] .trip-sort-pill.is-active svg{color:#6366f1}.dispatch-container .trip-sort-toggle[data-mode=time] .trip-sort-pill.is-active svg{color:#10b981}.dispatch-container .zone-order-card.is-pending-time{opacity:.72}.dispatch-container .step-wrap{padding:16px}.dispatch-container .step-row{border-radius:8px;display:flex;gap:16px;padding-bottom:20px;position:relative;transition:background .15s ease,box-shadow .15s ease}.dispatch-container .step-row.clickable{cursor:pointer}.dispatch-container .step-row.clickable:hover{background:#6366f10f}.dispatch-container .step-row.clickable:focus-visible{outline:2px solid #3b82f6;outline:2px solid var(--accent);outline-offset:2px}.dispatch-container .step-row.active{background:#6366f11a;box-shadow:inset 3px 0 0 #6366f1;margin-left:-8px;padding-left:8px}.dispatch-container .step-row:not(:last-child):before{background:#e2e8f0;background:var(--border);bottom:0;content:"";left:15px;position:absolute;top:32px;width:2px}.dispatch-container .step-dot{align-items:center;border-radius:50%;display:flex;flex-shrink:0;font-size:14px;font-weight:800;height:32px;justify-content:center;width:32px;z-index:2}.dispatch-container .step-dot.kitchen{background:#f59e0b;background:var(--kitchen);color:#fff}.dispatch-container .step-dot.delivery{background:#fff;border:2px solid #e2e8f0;border:2px solid var(--border);color:#64748b;color:var(--text-muted)}.dispatch-container .step-label{font-size:15px;font-weight:700}.dispatch-container .step-label-row{align-items:flex-start;display:flex}.dispatch-container .step-customer{flex:1 1;line-height:1.35;min-width:0;overflow-wrap:anywhere;word-break:break-word}.dispatch-container .kitchen-tag{color:#f59e0b;color:var(--kitchen)}.dispatch-container .step-dest{color:#64748b;color:var(--text-muted);font-size:13px;margin-top:3px}.dispatch-container .step-detail{display:flex;flex-wrap:wrap;font-size:13px;font-weight:600;gap:10px;margin-top:6px}.dispatch-container .step-profit{color:#22c55e;color:var(--success)}.dispatch-container .step-profit.is-loss{color:#dc2626}.dispatch-container .step-location{font-weight:500}.dispatch-container .step-location,.dispatch-container .step-notes{color:#64748b;color:var(--text-muted);font-size:11px;margin-top:3px}.dispatch-container .step-notes{background:#f59e0b14;border-left:2px solid #f59e0b99;border-radius:4px;font-style:italic;max-width:100%;overflow:hidden;padding:4px 8px;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .step-charges{color:#0074e7;font-weight:600}.dispatch-container .step-type{border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.04em;padding:2px 7px;text-transform:uppercase}.dispatch-container .step-type.type-economy{background:#22c55e26;color:#16a34a}.dispatch-container .step-type.type-risky{background:#ef444426;color:#dc2626}.dispatch-container .step-type.type-express{background:#3b82f626;color:#2563eb}.dispatch-container .step-type:not(.type-economy):not(.type-risky):not(.type-express){background:#64748b26;color:#475569}.dispatch-container .rcard.zone-card{background:linear-gradient(180deg,#fff,#fafbff);overflow:hidden;padding:14px 14px 12px;position:relative}.dispatch-container .rcard.zone-card:before{background:linear-gradient(180deg,#3b82f6,#6366f1);content:"";height:100%;left:0;opacity:.55;position:absolute;top:0;transition:opacity .2s,width .2s;width:3px}.dispatch-container .rcard.zone-card:hover{background:linear-gradient(180deg,#fff,#f0f7ff);border-color:#3b82f680;box-shadow:0 8px 22px #3b82f61f}.dispatch-container .rcard.zone-card:hover:before{opacity:1;width:4px}.dispatch-container .zone-card-header{align-items:center;display:flex;gap:10px;margin-bottom:12px}.dispatch-container .zone-card-emoji{align-items:center;background:linear-gradient(135deg,#3b82f61f,#6366f124);border:1px solid #3b82f638;border-radius:10px;display:flex;flex-shrink:0;font-size:18px;height:36px;justify-content:center;width:36px}.dispatch-container .zone-card-titles{flex:1 1;min-width:0}.dispatch-container .zone-card-name{color:#1e293b;color:var(--text);font-size:15px;font-weight:800;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .zone-card-sub{color:#64748b;color:var(--text-muted);font-size:11px;font-weight:500;margin-top:2px}.dispatch-container .zone-card-arrow{color:#3b82f6;color:var(--accent);flex-shrink:0;font-size:18px;font-weight:800;opacity:.4;transition:transform .2s,opacity .2s}.dispatch-container .rcard.zone-card:hover .zone-card-arrow{opacity:1;transform:translateX(4px)}.dispatch-container .zone-progress-row{align-items:center;display:flex;gap:10px;margin:10px 0 4px}.dispatch-container .zone-progress-row .zone-status-bar{flex:1 1;height:6px;margin:0}.dispatch-container .zone-progress-label{font-feature-settings:"tnum";color:#64748b;color:var(--text-muted);font-size:10px;font-variant-numeric:tabular-nums;font-weight:800;letter-spacing:.02em;white-space:nowrap}.dispatch-container .zone-stat-pills{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}.dispatch-container .zone-stat-pill{align-items:center;background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:8px;display:inline-flex;font-size:11px;font-weight:600;gap:4px;padding:4px 9px;transition:all .15s}.dispatch-container .zone-stat-icon{font-size:12px;opacity:.85}.dispatch-container .zone-stat-value{font-feature-settings:"tnum";color:#1e293b;color:var(--text);font-variant-numeric:tabular-nums;font-weight:800}.dispatch-container .zone-stat-label{color:#64748b;color:var(--text-muted);font-size:10px;font-weight:600}.dispatch-container .zone-stat-pill.profit-positive{background:#22c55e14;border-color:#22c55e40}.dispatch-container .zone-stat-pill.profit-positive .zone-stat-value{color:#22c55e;color:var(--success)}.dispatch-container .zone-stat-pill.profit-negative{background:#ef444414;border-color:#ef444440}.dispatch-container .zone-stat-pill.profit-negative .zone-stat-value{color:#ef4444}.dispatch-container .zone-card-suburbs{align-items:center;border-top:1px dashed #e2e8f0;border-top:1px dashed var(--border);color:#64748b;color:var(--text-muted);display:flex;font-size:11px;gap:6px;line-height:1.4;margin-top:10px;padding-top:10px}.dispatch-container .zone-card-suburbs-text{flex:1 1;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .zone-card-suburbs-more{background:#3b82f614;background:var(--accent-soft);border-radius:999px;color:#3b82f6;color:var(--accent);flex-shrink:0;font-size:10px;font-weight:800;padding:1px 7px}.dispatch-container .zone-status-bar{background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:3px;display:flex;height:5px;margin-top:10px;overflow:hidden}.dispatch-container .zone-status-bar.tall{border-radius:4px;height:16px}.dispatch-container .zone-status-seg{align-items:center;display:flex;height:100%;justify-content:center;min-width:1px;transition:filter .2s}.dispatch-container .zone-status-bar.tall .zone-status-seg{color:#fff;font-size:10px;font-weight:800;text-shadow:0 1px 2px #0000004d}.dispatch-container .zone-status-seg:hover{filter:brightness(1.1)}.dispatch-container .zone-status-seg-label{padding:0 4px}.dispatch-container .zone-status-legend{color:#64748b;color:var(--text-muted);display:flex;flex-wrap:wrap;font-size:11px;gap:10px;margin-top:8px}.dispatch-container .legend-item{align-items:center;display:inline-flex;gap:5px}.dispatch-container .legend-item strong{color:#1e293b;color:var(--text);font-weight:700;margin-left:2px}.dispatch-container .legend-dot{border-radius:50%;flex-shrink:0;height:9px;width:9px}.dispatch-container .zone-detail-section{margin:18px 0}.dispatch-container .zone-section-label{align-items:center;color:#64748b;color:var(--text-muted);display:flex;font-size:10px;font-weight:800;gap:10px;letter-spacing:.06em;margin-bottom:10px;text-transform:uppercase}.dispatch-container .zone-section-label:after{background:#e2e8f0;background:var(--border);content:"";flex:1 1;height:1px}.dispatch-container .section-count{color:#3b82f6;color:var(--accent);font-weight:700}.dispatch-container .zone-chips{display:flex;flex-wrap:wrap;gap:6px}.dispatch-container .zone-chip{align-items:center;background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:999px;color:#1e293b;color:var(--text);display:inline-flex;font-size:11px;font-weight:600;gap:6px;padding:4px 4px 4px 10px;transition:all .15s}.dispatch-container .zone-chip:hover{background:#3b82f614;background:var(--accent-soft);border-color:#3b82f6;border-color:var(--accent)}.dispatch-container .zone-chip.kitchen{background:#f59e0b0f;border-color:#f59e0b40}.dispatch-container .zone-chip.kitchen:hover{background:#f59e0b1f;border-color:#f59e0b80}.dispatch-container .zone-chip-name{white-space:nowrap}.dispatch-container .zone-chip-count{align-items:center;background:#3b82f6;background:var(--accent);border-radius:999px;color:#fff;display:inline-flex;font-size:10px;font-weight:800;height:18px;justify-content:center;min-width:20px;padding:0 6px}.dispatch-container .zone-chip-count.kitchen{background:#f59e0b;background:var(--kitchen)}.dispatch-container .zone-chip.zone-chip-clickable{cursor:pointer;font-family:inherit}.dispatch-container .zone-chip.zone-chip-clickable.active{background:#3b82f6;background:var(--accent);border-color:#3b82f6;border-color:var(--accent);box-shadow:0 2px 8px #3b82f640;color:#fff}.dispatch-container .zone-chip.zone-chip-clickable.active .zone-chip-count{background:#ffffff40;color:#fff}.dispatch-container .zone-suburb-panel{animation:zone-suburb-panel-in .18s ease-out;background:#fff;border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:12px;margin-top:12px;overflow:hidden}@keyframes zone-suburb-panel-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.dispatch-container .zone-suburb-panel-head{align-items:center;background:#3b82f614;background:var(--accent-soft);border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border);display:flex;gap:8px;justify-content:space-between;padding:10px 14px}.dispatch-container .zone-suburb-panel-title{align-items:center;color:#1e293b;color:var(--text);display:inline-flex;font-size:13px;font-weight:800;gap:6px;letter-spacing:-.01em}.dispatch-container .zone-suburb-panel-count{background:#3b82f6;background:var(--accent);border-radius:999px;color:#fff;font-size:10px;font-weight:800;letter-spacing:.04em;margin-left:6px;padding:2px 8px}.dispatch-container .zone-suburb-panel-close{background:#0f172a0f;border:none;border-radius:50%;color:#64748b;color:var(--text-muted);cursor:pointer;font-size:18px;font-weight:700;height:24px;line-height:1;transition:all .15s;width:24px}.dispatch-container .zone-suburb-panel-close:hover{background:#ef444426;color:#dc2626}.dispatch-container .zone-suburb-panel-empty{color:#64748b;color:var(--text-muted);font-size:12px;padding:16px;text-align:center}.dispatch-container .zone-order-grid{display:flex;flex-direction:column;gap:10px;padding:4px 2px 12px}.dispatch-container .zone-order-card{background:#fff;border:1px solid #7b1fa224;border-radius:12px;box-shadow:0 1px 2px #0f172a0a;overflow:hidden;padding:12px 14px 12px 18px;position:relative;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}.dispatch-container .zone-order-card:before{background:#7b1fa2;content:"";height:100%;left:0;opacity:.85;position:absolute;top:0;transition:width .18s ease,opacity .18s ease;width:4px}.dispatch-container .zone-order-card.clickable{cursor:pointer}.dispatch-container .zone-order-card.clickable:hover{border-color:#7b1fa273;box-shadow:0 8px 20px #7b1fa229;transform:translateY(-1px)}.dispatch-container .zone-order-card.clickable:hover:before{opacity:1;width:5px}.dispatch-container .zone-order-card.active{background:linear-gradient(180deg,#fff,#f7eaff);border-color:#7b1fa2;box-shadow:0 10px 24px #7b1fa238}.dispatch-container .zone-order-card.active:before{opacity:1;width:6px}.dispatch-container .zone-order-card.going-on{background:linear-gradient(180deg,#fff,#ecfdf5);border-color:#22c55e66;box-shadow:0 6px 18px #22c55e26}.dispatch-container .zone-order-card.going-on:before{background:#16a34a;opacity:1}.dispatch-container .zone-order-card.going-on.active{background:linear-gradient(180deg,#fff,#d1fae5);border-color:#16a34a}.dispatch-container .zone-order-card-head{align-items:center;display:flex;gap:10px;margin-bottom:8px}.dispatch-container .zone-order-num{align-items:center;background:#7b1fa2;border:1px solid #7b1fa2;border-radius:8px;box-shadow:0 2px 6px #7b1fa238;color:#fff;display:flex;flex-shrink:0;font-size:13px;font-weight:800;height:28px;justify-content:center;width:28px}.dispatch-container .zone-order-id-block{flex:1 1;min-width:0}.dispatch-container .zone-order-id{color:#1e293b;color:var(--text);font-size:12px;font-weight:700;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .zone-order-rider{color:#7b1fa2;font-size:11px;font-weight:600;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .zone-order-status{border-radius:999px;flex-shrink:0;font-size:10px;font-weight:700;letter-spacing:.04em;padding:3px 8px;text-transform:uppercase}.dispatch-container .zone-order-status-stack{align-items:flex-end;display:flex;flex-direction:column;flex-shrink:0;gap:3px}.dispatch-container .zone-order-time{font-feature-settings:"tnum";align-items:center;color:#1e293b;display:inline-flex;font-size:12px;font-variant-numeric:tabular-nums;font-weight:700;gap:4px;letter-spacing:.01em;white-space:nowrap}.dispatch-container .zone-order-time svg{color:#7b1fa2;flex-shrink:0;font-size:14px}.dispatch-container .zone-order-time.is-expected{color:#64748b;font-weight:600}.dispatch-container .zone-order-time.is-expected svg{color:#94a3b8}.dispatch-container .zone-order-est-drop{font-feature-settings:"tnum";align-items:center;color:#475569;display:inline-flex;font-size:11px;font-variant-numeric:tabular-nums;font-weight:600;gap:4px;white-space:nowrap}.dispatch-container .zone-order-est-drop svg{color:#0ea5e9;flex-shrink:0;font-size:13px}.dispatch-container .zone-order-customer{color:#1e293b;color:var(--text);font-size:14px;font-weight:700;letter-spacing:-.01em;margin-bottom:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .zone-order-line{color:#64748b;color:var(--text-muted);font-size:12px;line-height:1.4;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .zone-order-notes{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:#475569;display:-webkit-box;font-style:italic;text-overflow:clip;white-space:normal}.dispatch-container .zone-order-stats{border-top:1px dashed #7b1fa224;display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;padding-top:10px}.dispatch-container .zone-order-chip{align-items:center;background:#7b1fa20f;border:1px solid #7b1fa224;border-radius:999px;color:#1e293b;color:var(--text);display:inline-flex;font-size:11px;font-weight:600;gap:4px;padding:4px 8px}.dispatch-container .zone-order-chip.is-profit{background:#22c55e1a;border-color:#22c55e40;color:#16a34a}.dispatch-container .zone-order-chip.is-loss{background:#ef44441a;border-color:#ef444440;color:#dc2626}.dispatch-container .zone-order-chip.zone-order-trip{background:#7b1fa21a;border-color:#7b1fa240;color:#7b1fa2}.dispatch-container .zone-order-type{letter-spacing:.05em;text-transform:uppercase}.dispatch-container .kitchen-transition{background:#f59e0b1a;background:var(--kitchen-soft);border:1px dashed #f59e0b;border:1px dashed var(--kitchen);border-radius:10px;font-size:12px;font-weight:600;margin:8px 0 20px 40px;padding:12px}.dispatch-container .zone-order-grid .kitchen-transition{margin:2px 0;padding:8px 12px}.dispatch-container #map-wrap{flex:1 1;position:relative;transition:flex .32s cubic-bezier(.4,0,.2,1)}.dispatch-container #map-wrap.compare-split{border-radius:0 14px 14px 0;border-right:0;box-shadow:0 0 0 1px #0f172a0f;flex-basis:calc(50% - 8px);flex-grow:1;flex-shrink:1;margin-right:16px;min-width:0;overflow:hidden}.dispatch-container .compare-planned-label{align-items:center;animation:compare-label-in .22s ease-out;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#fffffff2;border:1px solid #6366f14d;border-radius:999px;box-shadow:0 4px 14px #0f172a1a;color:#4338ca;display:inline-flex;font-size:10px;font-weight:800;gap:6px;left:12px;letter-spacing:.06em;padding:5px 12px 5px 9px;pointer-events:none;position:absolute;text-transform:uppercase;top:12px;z-index:1000}.dispatch-container .compare-planned-dot{background:linear-gradient(135deg,#6366f1,#4338ca);border-radius:50%;flex-shrink:0;height:7px;width:7px}.dispatch-container .compare-actual-label{align-items:center;animation:compare-label-in .22s ease-out;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#fffffff2;border:1px solid #0ea5e959;border-radius:999px;box-shadow:0 4px 14px #0f172a1a;color:#0369a1;display:inline-flex;font-size:10px;font-weight:800;gap:6px;left:12px;letter-spacing:.06em;padding:5px 12px 5px 9px;pointer-events:none;position:absolute;text-transform:uppercase;top:12px;z-index:1000}.dispatch-container .compare-actual-dot{animation:compare-actual-pulse 1.6s ease-in-out infinite;background:linear-gradient(135deg,#0ea5e9,#0369a1);border-radius:50%;box-shadow:0 0 0 2px #0ea5e926;flex-shrink:0;height:7px;width:7px}@keyframes compare-actual-pulse{0%,to{box-shadow:0 0 0 2px #0ea5e926}50%{box-shadow:0 0 0 4px #0ea5e90d}}@keyframes compare-label-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.dispatch-container #compare-map-wrap{animation:compare-slide-in .3s cubic-bezier(.4,0,.2,1);background:#fff;border-radius:14px 0 0 14px;box-shadow:0 0 0 1px #0f172a0f;display:flex;flex-basis:calc(50% - 8px);flex-direction:column;flex-grow:1;flex-shrink:1;min-width:0;overflow:hidden;position:relative}@keyframes compare-slide-in{0%{opacity:0;transform:translateX(18px)}to{opacity:1;transform:translateX(0)}}.dispatch-container #compare-map-wrap .leaflet-container{background:#f0f4f8!important;flex:1 1;min-height:0}.dispatch-container .compare-map-area{display:flex;flex:1 1;flex-direction:column;min-height:0;position:relative}.dispatch-container .compare-ov-br{bottom:12px;display:flex;gap:8px;position:absolute;right:12px;z-index:1000}.dispatch-container .compare-header{background:linear-gradient(180deg,#fff,#f8fafc);border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border,#0f172a14);flex-shrink:0;padding:10px 14px 8px}.dispatch-container .compare-header-top{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:7px}.dispatch-container .compare-title{align-items:center;color:#0f172a;display:inline-flex;font-size:12px;font-weight:800;gap:7px;letter-spacing:.01em;min-width:0}.dispatch-container .compare-title-dot{border-radius:50%;display:inline-block;flex-shrink:0;height:12px;width:12px}.dispatch-container .compare-title-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .compare-title-badge{align-items:center;background:#0ea5e91a;border:1px solid #0ea5e940;border-radius:999px;color:#0284c7;display:inline-flex;flex-shrink:0;font-size:11px;font-weight:800;letter-spacing:.07em;padding:3px 9px;text-transform:uppercase}.dispatch-container .compare-progress{align-items:center;display:flex;gap:8px}.dispatch-container .compare-progress-bar-wrap{background:#0f172a12;border-radius:999px;flex:1 1;height:3px;overflow:hidden}.dispatch-container .compare-progress-bar-fill{background:linear-gradient(90deg,#0ea5e9,#6366f1);border-radius:999px;height:100%;transition:width .45s cubic-bezier(.4,0,.2,1)}.dispatch-container .compare-progress-bar-fill.is-done{background:linear-gradient(90deg,#22c55e,#16a34a)}.dispatch-container .compare-progress-text{font-feature-settings:"tnum";color:#94a3b8;flex-shrink:0;font-size:12px;font-variant-numeric:tabular-nums;font-weight:700;white-space:nowrap}.dispatch-container .compare-track-legend{border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border,#0f172a12);flex-shrink:0;max-height:150px;overflow-y:auto;scrollbar-color:#64748b40 #0000;scrollbar-width:thin}.dispatch-container .compare-track-legend::-webkit-scrollbar{width:4px}.dispatch-container .compare-track-legend::-webkit-scrollbar-thumb{background:#64748b40;border-radius:999px}.dispatch-container .compare-track-item{align-items:center;border-bottom:1px solid #0f172a0a;display:flex;gap:9px;padding:5px 14px;transition:background .12s}.dispatch-container .compare-track-item:last-child{border-bottom:0}.dispatch-container .compare-track-item:hover{background:rgba(15,23,42,.025)}.dispatch-container .compare-track-num{align-items:center;border-radius:50%;box-shadow:0 2px 6px #0003;color:#fff;display:inline-flex;flex-shrink:0;font-size:9px;font-weight:800;height:20px;justify-content:center;width:20px}.dispatch-container .compare-track-info{flex:1 1;min-width:0}.dispatch-container .compare-track-customer{color:#1e293b;font-size:11px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .compare-track-meta{color:#94a3b8;font-size:10px;font-weight:600;margin-top:1px}.dispatch-container .compare-track-right{align-items:flex-end;display:flex;flex-direction:column;flex-shrink:0;gap:3px}.dispatch-container .compare-track-status{align-items:center;border-radius:999px;display:inline-flex;font-size:8px;font-weight:800;letter-spacing:.05em;padding:1px 6px;text-transform:uppercase}.dispatch-container .compare-track-kms{color:#64748b;font-size:10px;font-weight:700}.dispatch-container .compare-track-no-data{align-items:center;color:#cbd5e1;display:inline-flex;font-size:9px;font-weight:600;gap:4px}.dispatch-container .compare-track-spinner{animation:compare-spin .65s linear infinite;border:1.5px solid #64748b2e;border-radius:50%;border-top-color:#94a3b8;flex-shrink:0;height:9px;width:9px}@keyframes compare-spin{to{transform:rotate(1turn)}}.dispatch-container .compare-overall-card{background:linear-gradient(180deg,#fff,#f8fafc);border-top:1px solid #e2e8f0;border-top:1px solid var(--border,#0f172a12);flex-shrink:0;padding:10px 14px}.dispatch-container .compare-overall-head{align-items:center;display:flex;gap:8px;margin-bottom:9px}.dispatch-container .compare-overall-dot{border-radius:50%;flex-shrink:0;height:11px;width:11px}.dispatch-container .compare-overall-name{color:#0f172a;flex:1 1;font-size:12px;font-weight:800;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .compare-overall-rate{align-items:center;background:#22c55e1a;border:1px solid #22c55e38;border-radius:999px;color:#16a34a;display:inline-flex;flex-shrink:0;font-size:9px;font-weight:800;letter-spacing:.06em;padding:2px 8px;text-transform:uppercase}.dispatch-container .compare-overall-rate.is-partial{background:#f59e0b1a;border-color:#f59e0b40;color:#b45309}.dispatch-container .compare-overall-rate.is-zero{background:#64748b14;border-color:#64748b33;color:#64748b}.dispatch-container .compare-overall-stats{grid-gap:6px;display:grid;gap:6px;grid-template-columns:repeat(5,1fr)}.dispatch-container .compare-overall-stat{background:#0f172a08;border:1px solid #0f172a0f;border-radius:10px;padding:7px 6px 6px;text-align:center;transition:background .15s,transform .15s}.dispatch-container .compare-overall-stat:hover{background:rgba(15,23,42,.055);transform:translateY(-1px)}.dispatch-container .compare-overall-stat-icon{align-items:center;color:#94a3b8;display:flex;font-size:13px;justify-content:center;line-height:1;margin-bottom:3px}.dispatch-container .compare-overall-stat-value{color:#0f172a;font-size:14px;font-weight:800;line-height:1.1}.dispatch-container .compare-overall-stat-unit{color:#94a3b8;font-size:9px;font-weight:700;margin-left:2px}.dispatch-container .compare-overall-stat-label{color:#94a3b8;font-size:9px;font-weight:700;letter-spacing:.06em;margin-top:2px;text-transform:uppercase}.dispatch-container .compare-overall-stat.is-profit{background:#22c55e0f;border-color:#22c55e29}.dispatch-container .compare-overall-stat.is-profit .compare-overall-stat-value{color:#16a34a}.dispatch-container .compare-overall-stat.is-profit .compare-overall-stat-icon{color:#22c55e}.dispatch-container .compare-overall-stat.is-loss{background:#ef44440f;border-color:#ef444429}.dispatch-container .compare-overall-stat.is-loss .compare-overall-stat-value{color:#dc2626}.dispatch-container .compare-overall-stat.is-loss .compare-overall-stat-icon{color:#ef4444}.dispatch-container .compare-header-v2{background:linear-gradient(180deg,#fff,#f8fafc);border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border,#0f172a14);display:flex;flex-direction:column;flex-shrink:0;gap:10px;padding:12px 14px 10px}.dispatch-container .compare-header-row{align-items:center;display:flex;gap:10px;min-width:0}.dispatch-container .compare-header-row .compare-title{align-items:center;color:#0f172a;display:inline-flex;flex:1 1;font-size:16px;font-weight:800;gap:10px;min-width:0}.dispatch-container .compare-header-tools{align-items:center;display:inline-flex;flex-shrink:0;gap:6px}.dispatch-container .compare-overall-btn{align-items:center;background:linear-gradient(135deg,#6366f114,#3b82f614);border:1px solid #6366f147;border-radius:999px;color:#4338ca;cursor:pointer;display:inline-flex;font-size:12px;font-weight:800;gap:6px;letter-spacing:.04em;padding:6px 12px;text-transform:uppercase;transition:all .18s ease}.dispatch-container .compare-overall-btn:hover{background:linear-gradient(135deg,#6366f1,#3b82f6);border-color:#6366f1;box-shadow:0 4px 12px #6366f147;color:#fff;transform:translateY(-1px)}.dispatch-container .compare-overall-btn svg{font-size:15px}.dispatch-container .compare-sync-toggle{align-items:center;background:#fff;border:1px solid #e2e8f0;border:1px solid var(--border,#0f172a1f);border-radius:999px;color:#64748b;cursor:pointer;display:inline-flex;font-size:12px;font-weight:800;gap:6px;letter-spacing:.04em;padding:6px 12px;text-transform:uppercase;transition:all .18s ease}.dispatch-container .compare-sync-toggle:hover{border-color:#6366f166;color:#4338ca}.dispatch-container .compare-sync-toggle.is-on{background:linear-gradient(135deg,#22c55e,#16a34a);border-color:#16a34a;box-shadow:0 4px 10px #22c55e38;color:#fff}.dispatch-container .compare-sync-toggle svg{font-size:15px}.dispatch-container .compare-timeline-toggle{align-items:center;background:#fff;border:1px solid #e2e8f0;border:1px solid var(--border,#0f172a1f);border-radius:8px;color:#64748b;cursor:pointer;display:inline-flex;height:30px;justify-content:center;padding:0;transition:background .18s ease,color .18s ease,border-color .18s ease;width:30px}.dispatch-container .compare-timeline-toggle:hover{background:#6366f10f;border-color:#6366f166;color:#4338ca}.dispatch-container .compare-timeline-toggle svg{font-size:18px;transition:transform .22s cubic-bezier(.4,0,.2,1)}.dispatch-container .compare-timeline-toggle.is-open svg{color:#4338ca;transform:rotate(180deg)}.dispatch-container .compare-timeline-wrap{display:flex;flex-direction:column;gap:6px}.dispatch-container .compare-timeline-container{align-items:stretch;background:#0f172a05;border:1px solid #0f172a0f;border-radius:12px;box-shadow:inset 0 1px 2px #0f172a05;display:flex;gap:16px;padding:18px}.dispatch-container .compare-timeline-labels{border-right:1.5px dashed #0f172a14;display:flex;flex-direction:column;flex-shrink:0;gap:16px;justify-content:space-between;padding-right:14px}.dispatch-container .compare-timeline-label{align-items:center;color:#64748b;display:flex;font-size:11px;font-weight:800;height:32px;letter-spacing:.06em;text-transform:uppercase}.dispatch-container .compare-timeline-scrollable{display:flex;flex:1 1;flex-direction:column;gap:16px;overflow-x:auto;padding-bottom:2px;scrollbar-color:#64748b33 #0000;scrollbar-width:thin}.dispatch-container .compare-timeline-scrollable::-webkit-scrollbar{height:4px}.dispatch-container .compare-timeline-scrollable::-webkit-scrollbar-thumb{background:#64748b40;border-radius:999px}.dispatch-container .compare-timeline-track{align-items:center;display:flex;gap:0;position:relative}.dispatch-container .compare-timeline-track.is-actual .compare-step-spacer,.dispatch-container .compare-timeline-track.is-planned .compare-step-spacer{margin-bottom:22px}.dispatch-container .compare-step-spacer{background:linear-gradient(90deg,#94a3b800,#94a3b88c 30%,#94a3b88c 70%,#94a3b800);flex-shrink:0;height:2px;width:16px}.dispatch-container .compare-step{align-items:center;background:#0000;border:0;cursor:pointer;display:inline-flex;flex-direction:column;flex-shrink:0;gap:11px;padding:2px 2px 0;position:relative;transition:transform .18s ease}.dispatch-container .compare-step:hover{transform:translateY(-1px)}.dispatch-container .compare-step-circle{align-items:center;background:#94a3b8;background:var(--step-color,#94a3b8);border-radius:50%;box-shadow:0 2px 6px #0f172a24,0 0 0 1px #fff9;color:#fff;display:inline-flex;font-size:13px;font-weight:800;height:32px;justify-content:center;transition:transform .18s ease,box-shadow .18s ease,background .18s ease;width:32px}.dispatch-container .compare-step:hover .compare-step-circle{box-shadow:0 4px 10px #0f172a33,0 0 0 1px #fff9;transform:scale(1.08)}.dispatch-container .compare-step.is-focused .compare-step-circle{box-shadow:0 4px 10px #0f172a38,0 0 0 2px #fff,0 0 0 4px #6366f1;box-shadow:0 4px 10px #0f172a38,0 0 0 2px #fff,0 0 0 4px var(--step-color,#6366f1);transform:scale(1.18)}.dispatch-container .compare-step.is-focused .compare-step-tick{color:#4338ca;color:var(--step-color,#4338ca);font-weight:800}.dispatch-container .compare-step.is-pending .compare-step-circle{background:#fff;border:2px solid #cbd5e1;border:2px solid var(--step-color,#cbd5e1);box-shadow:0 1px 3px #0f172a14;color:#94a3b8;color:var(--step-color,#94a3b8)}.dispatch-container .compare-step.is-skipped .compare-step-circle{background:#cbd5e1;opacity:.42}.dispatch-container .compare-step.is-loading .compare-step-circle{background:#fff;border:2px solid #6366f173;color:#0000}.dispatch-container .compare-step.is-no-data .compare-step-circle{background:repeating-linear-gradient(45deg,#e2e8f0 0 4px,#f1f5f9 4px 8px);color:#94a3b8}.dispatch-container .compare-step-spin{animation:compare-step-spin .7s linear infinite;border:2px solid #6366f12e;border-radius:50%;border-top-color:#6366f1;height:14px;width:14px}@keyframes compare-step-spin{to{transform:rotate(1turn)}}.dispatch-container .compare-step-tick{font-feature-settings:"tnum";color:#64748b;font-size:11px;font-variant-numeric:tabular-nums;font-weight:700;letter-spacing:-.01em;line-height:1}.dispatch-container .compare-step-flag{background:#dc2626;border:1.5px solid #fff;border-radius:50%;box-shadow:0 2px 4px #dc262673;height:8px;position:absolute;right:-2px;top:-2px;width:8px}.dispatch-container .compare-progress-strip{align-items:center;display:flex;gap:8px}.dispatch-container .compare-legend{align-items:center;border-top:1px dashed #0f172a0f;display:flex;flex-wrap:wrap;gap:14px;padding-top:2px}.dispatch-container .compare-legend-item{align-items:center;color:#64748b;display:inline-flex;font-size:12px;font-weight:700;gap:7px;letter-spacing:.02em}.dispatch-container .compare-legend-swatch{border-radius:2px;flex-shrink:0;height:4px;width:22px}.dispatch-container .compare-legend-swatch.is-planned{background:repeating-linear-gradient(90deg,#6366f1 0 5px,#0000 5px 9px);height:3px}.dispatch-container .compare-legend-swatch.is-actual{background:linear-gradient(90deg,currentColor,currentColor);height:4px}.dispatch-container .compare-legend-swatch.is-step-color{border-radius:2px;height:4px}.dispatch-container .compare-legend-swatch.is-step-color.is-dashed{-webkit-mask-image:repeating-linear-gradient(90deg,#000 0 5px,#0000 5px 9px);mask-image:repeating-linear-gradient(90deg,#000 0 5px,#0000 5px 9px)}.dispatch-container .compare-legend-note{color:#94a3b8;font-size:11px;font-weight:700;letter-spacing:.04em;margin-left:auto;overflow:hidden;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.dispatch-container .compare-legend-swatch.is-transit{background:repeating-linear-gradient(90deg,#94a3b8 0 3px,#0000 3px 6px);height:2px}.dispatch-container .compare-delta{animation:compare-delta-in .22s cubic-bezier(.4,0,.2,1);background:linear-gradient(180deg,#fff,#f8fafc);border-top:1px solid #e2e8f0;border-top:1px solid var(--border,#0f172a12);display:flex;flex-direction:column;flex-shrink:0;gap:10px;padding:12px 14px 14px}.dispatch-container .compare-delta.is-anomaly{background:linear-gradient(180deg,#fff,#fef2f2);border-top-color:#dc262640}@keyframes compare-delta-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.dispatch-container .compare-delta-title{align-items:center;display:flex;gap:10px;min-width:0}.dispatch-container .compare-delta-step-badge{align-items:center;background:#6366f1;border-radius:50%;box-shadow:0 3px 10px #0f172a26,0 0 0 1px #ffffff80;color:#fff;display:inline-flex;flex-shrink:0;font-size:14px;font-weight:800;height:32px;justify-content:center;width:32px}.dispatch-container .compare-delta-step-badge svg{font-size:17px}.dispatch-container .compare-delta-title-text{flex:1 1;min-width:0}.dispatch-container .compare-delta-title-main{color:#0f172a;font-size:16px;font-weight:800;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .compare-delta-title-sub{color:#94a3b8;font-size:13px;font-weight:600;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .compare-delta-status{align-items:center;border-radius:999px;display:inline-flex;flex-shrink:0;font-size:11px;font-weight:800;letter-spacing:.07em;padding:4px 11px;text-transform:uppercase}.dispatch-container .compare-delta-grid{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr)}.dispatch-container .compare-delta-cell{background:#fff;border:1px solid #e2e8f0;border:1px solid var(--border,#0f172a14);border-radius:12px;display:flex;flex-direction:column;gap:4px;padding:11px 13px 10px;transition:transform .18s ease,box-shadow .18s ease}.dispatch-container .compare-delta-cell:hover{box-shadow:0 4px 12px #0f172a0f;transform:translateY(-1px)}.dispatch-container .compare-delta-cell.is-anomaly{background:linear-gradient(180deg,#fff,#fef2f2);border-color:#dc26266b;box-shadow:inset 0 0 0 1px #dc26262e}.dispatch-container .compare-delta-cell-label{color:#94a3b8;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.dispatch-container .compare-delta-cell-val{font-feature-settings:"tnum";color:#0f172a;font-size:22px;font-variant-numeric:tabular-nums;font-weight:800;line-height:1.15}.dispatch-container .compare-delta-cell-val.is-over{color:#dc2626}.dispatch-container .compare-delta-cell-val.is-under{color:#16a34a}.dispatch-container .compare-delta-cell-unit{color:#94a3b8;font-size:13px;font-weight:700;margin-left:2px}.dispatch-container .compare-delta-cell-sub{color:#64748b;font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .compare-step-pin{align-items:center;background:#475569;background:var(--pin-color,#475569);border:3px solid #fff;border-radius:50%;box-shadow:0 4px 12px #00000052,0 0 0 1px #ffffff2e;color:#fff;cursor:pointer;display:flex;font-size:13px;font-weight:800;height:34px;justify-content:center;position:relative;transition:transform .2s cubic-bezier(.4,0,.2,1),box-shadow .2s ease;width:34px}.dispatch-container .compare-step-pin:hover{transform:scale(1.08);z-index:1200}.dispatch-container .compare-step-pin-num{line-height:1;position:relative;z-index:1}.dispatch-container .compare-step-pin.is-skipped{filter:grayscale(.6);opacity:.45}.dispatch-container .compare-step-pin.is-focused{animation:compare-pin-pulse 1.6s ease-in-out infinite;box-shadow:0 8px 22px #0f172a61,0 0 0 3px #fff,0 0 0 5px #6366f1,0 0 18px 6px color-mix(in srgb,#6366f1 35%,#0000);box-shadow:0 8px 22px #0f172a61,0 0 0 3px #fff,0 0 0 5px var(--pin-color,#6366f1),0 0 18px 6px color-mix(in srgb,var(--pin-color,#6366f1) 35%,#0000);transform:scale(1.22);z-index:1300}.dispatch-container .compare-step-pin.is-focused:hover{transform:scale(1.3)}.dispatch-container .compare-step-pin.is-focused:before{animation:compare-pin-halo 1.6s ease-out infinite;border:2px solid #6366f1;border:2px solid var(--pin-color,#6366f1);border-radius:50%;content:"";inset:-6px;opacity:.65;pointer-events:none;position:absolute}@keyframes compare-pin-pulse{0%,to{box-shadow:0 8px 22px #0f172a61,0 0 0 3px #fff,0 0 0 5px #6366f1,0 0 18px 6px color-mix(in srgb,#6366f1 35%,#0000);box-shadow:0 8px 22px #0f172a61,0 0 0 3px #fff,0 0 0 5px var(--pin-color,#6366f1),0 0 18px 6px color-mix(in srgb,var(--pin-color,#6366f1) 35%,#0000)}50%{box-shadow:0 10px 28px #0f172a80,0 0 0 3px #fff,0 0 0 6px #6366f1,0 0 28px 10px color-mix(in srgb,#6366f1 55%,#0000);box-shadow:0 10px 28px #0f172a80,0 0 0 3px #fff,0 0 0 6px var(--pin-color,#6366f1),0 0 28px 10px color-mix(in srgb,var(--pin-color,#6366f1) 55%,#0000)}}@keyframes compare-pin-halo{0%{inset:-2px;opacity:.7}to{inset:-16px;opacity:0}}.dispatch-container .compare-step-pin.is-anomaly{box-shadow:0 4px 14px #dc262659,0 0 0 1px #ffffff2e,0 0 0 3px #fff,0 0 0 5px #dc2626}.dispatch-container .compare-step-pin.is-anomaly.is-focused{animation:compare-pin-pulse-anomaly 1.4s ease-in-out infinite;box-shadow:0 8px 22px #dc262680,0 0 0 3px #fff,0 0 0 5px #dc2626,0 0 22px 8px #dc262673}@keyframes compare-pin-pulse-anomaly{0%,to{box-shadow:0 8px 22px #dc262680,0 0 0 3px #fff,0 0 0 5px #dc2626,0 0 22px 8px #dc262673}50%{box-shadow:0 10px 28px #dc2626a6,0 0 0 3px #fff,0 0 0 6px #dc2626,0 0 32px 12px #dc26268c}}.dispatch-container .compare-step-pin-check{background:#16a34a;border:1.5px solid #fff;border-radius:50%;bottom:-3px;box-shadow:0 2px 5px #0f172a57;height:14px;padding:1px;position:absolute;right:-3px;width:14px;z-index:2}.dispatch-container .compare-start-pin{align-items:center;background:#fff;border:3px solid #475569;border:3px solid var(--pin-color,#475569);border-radius:50%;box-shadow:0 5px 14px #0f172a52,0 0 0 1px #fff9;color:#475569;color:var(--pin-color,#475569);cursor:pointer;display:flex;height:40px;justify-content:center;transition:transform .18s ease,box-shadow .18s ease;width:40px}.dispatch-container .compare-start-pin:hover{box-shadow:0 7px 20px #0f172a66,0 0 0 1px #ffffffb3;transform:scale(1.1);z-index:1100}.dispatch-container .compare-start-pin svg{display:block;height:22px;width:22px}.dispatch-container .compare-tooltip{-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#0f172af2;border:0;border-radius:12px;box-shadow:0 10px 30px #0f172a66,0 0 0 1px #ffffff0f;color:#f8fafc;font-family:inherit;padding:0;white-space:normal}.dispatch-container .compare-tooltip.leaflet-tooltip-top:before{border-top-color:#0f172af2}.dispatch-container .compare-tooltip.leaflet-tooltip-bottom:before{border-bottom-color:#0f172af2}.dispatch-container .compare-tooltip.leaflet-tooltip-left:before{border-left-color:#0f172af2}.dispatch-container .compare-tooltip.leaflet-tooltip-right:before{border-right-color:#0f172af2}.dispatch-container .cmp-tip{max-width:260px;min-width:200px;padding:9px 12px 8px}.dispatch-container .cmp-tip-header{align-items:center;display:flex;gap:9px;min-width:0}.dispatch-container .cmp-tip-step{align-items:center;background:#6366f1;border-radius:50%;box-shadow:0 2px 6px #0000004d;color:#fff;display:inline-flex;flex-shrink:0;font-size:11px;font-weight:800;height:24px;justify-content:center;width:24px}.dispatch-container .cmp-tip-step svg{font-size:14px}.dispatch-container .cmp-tip-title-stack{flex:1 1;min-width:0}.dispatch-container .cmp-tip-title{color:#f8fafc;font-size:12px;font-weight:800;letter-spacing:.01em;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cmp-tip-sub{color:#cbd5e1;font-size:10px;font-weight:600;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cmp-tip-tag{align-items:center;border-radius:999px;display:inline-flex;flex-shrink:0;font-size:8px;font-weight:800;letter-spacing:.08em;padding:2px 7px;text-transform:uppercase}.dispatch-container .cmp-tip-anomaly{background:#dc262629;border:1px solid #dc262652;border-radius:8px;color:#fecaca;font-size:10px;font-weight:700;letter-spacing:.02em;margin-top:7px;padding:5px 8px}.dispatch-container .cmp-tip-action{border-top:1px solid #ffffff1a;color:#94a3b8;font-size:9px;font-weight:700;letter-spacing:.08em;margin-top:7px;padding-top:6px;text-align:center;text-transform:uppercase}.dispatch-container .compare-popup .leaflet-popup-content-wrapper{background:#fff;border-radius:14px;box-shadow:0 12px 32px #0f172a38,0 0 0 1px #0f172a0f;overflow:hidden;padding:0}.dispatch-container .compare-popup .leaflet-popup-content{margin:0;min-width:240px;width:auto!important}.dispatch-container .compare-popup .leaflet-popup-tip{background:#fff;box-shadow:0 6px 18px #0f172a2e}.dispatch-container .compare-popup .leaflet-popup-close-button{color:#94a3b8;font-size:18px;font-weight:700;padding:4px 6px;right:6px;top:6px}.dispatch-container .compare-popup .leaflet-popup-close-button:hover{color:#0f172a}.dispatch-container .cmp-pop{color:#0f172a;font-family:Inter,-apple-system,sans-serif;line-height:1.35}.dispatch-container .cmp-pop-head{align-items:center;background:linear-gradient(180deg,#f8fafc,#fff);border-bottom:1px solid #0f172a0f;display:flex;gap:10px;padding:12px 32px 12px 14px}.dispatch-container .cmp-pop-pin{align-items:center;border:2.5px solid #fff;border-radius:50%;box-shadow:0 3px 10px #0003;color:#fff;display:flex;flex-shrink:0;font-size:13px;font-weight:800;height:30px;justify-content:center;width:30px}.dispatch-container .cmp-pop-titles{flex:1 1;min-width:0}.dispatch-container .cmp-pop-title{color:#0f172a;font-size:13px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cmp-pop-sub{color:#64748b;font-size:9.5px;font-weight:700;letter-spacing:.05em;margin-top:2px;text-transform:uppercase}.dispatch-container .cmp-pop-tag{background:#e0e7ff;border-radius:999px;color:#4338ca;flex-shrink:0;font-size:9px;font-weight:800;letter-spacing:.06em;padding:3px 8px;text-transform:uppercase;white-space:nowrap}.dispatch-container .cmp-pop-tag-start{background:#ecfeff;color:#0e7490}.dispatch-container .cmp-pop-rows{display:flex;flex-direction:column;padding:8px 14px 12px}.dispatch-container .cmp-pop-row{align-items:center;border-bottom:1px dashed #0f172a12;display:flex;font-size:12px;gap:12px;justify-content:space-between;padding:6px 0}.dispatch-container .cmp-pop-row:last-child{border-bottom:0}.dispatch-container .cmp-pop-k{color:#64748b;font-weight:600;white-space:nowrap}.dispatch-container .cmp-pop-v{font-feature-settings:"tnum";color:#0f172a;font-variant-numeric:tabular-nums;font-weight:700;text-align:right}.dispatch-container .cmp-pop-v.is-loss{color:#dc2626}.dispatch-container .cmp-pop-v.is-profit{color:#16a34a}.dispatch-container .cmp-pop-coord{color:#475569;font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10.5px;font-weight:600}.dispatch-container .leaflet-container{background:#f1f5f9!important}.dispatch-container #ov-tl{left:16px;position:absolute;top:16px;z-index:1000}.dispatch-container .ov-card{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#ffffffe6;border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:16px;box-shadow:0 10px 25px -5px #00000014;box-shadow:var(--shadow-lg);padding:16px 20px}.dispatch-container .ov-stats{display:flex;gap:24px}.dispatch-container .osv{font-size:24px;font-weight:800}.dispatch-container .osv.g{color:#22c55e;color:var(--success)}.dispatch-container .osl{color:#64748b;color:var(--text-muted);font-size:11px;font-weight:700;margin-top:2px;text-transform:uppercase}.dispatch-container #ov-tr{display:flex;flex-direction:column;gap:8px;position:absolute;right:16px;top:16px;width:200px;z-index:1000}.dispatch-container #body.compare-mode #ov-tr{display:none!important}.dispatch-container #ov-br{bottom:20px;position:absolute;right:80px;z-index:1000}.dispatch-container .rchip{align-items:center;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#ffffffe6;border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:10px;box-shadow:0 4px 12px #0000000d;box-shadow:var(--shadow);cursor:pointer;display:flex;font-size:12px;font-weight:600;gap:8px;padding:8px 12px;transition:all .2s}.dispatch-container .rchip.active{background:#fff;border-color:#3b82f6;border-color:var(--accent);box-shadow:0 4px 12px #3b82f626}.dispatch-container .rchip-dot{border-radius:50%;height:8px;width:8px}.dispatch-container .rchip-n{font-feature-settings:"tnum","tnum";color:#3b82f6;color:var(--accent);font-variant-numeric:tabular-nums;font-weight:800;margin-left:auto;white-space:nowrap}.dispatch-container .rchip-n.is-done{color:#16a34a}.dispatch-container .kitchen-mark{align-items:center;background:#f59e0b;background:var(--kitchen);border:3px solid #fff;border-radius:50%;box-shadow:0 0 20px #f59e0bcc,0 0 40px #f59e0b66;color:#fff;display:flex;font-size:18px;font-weight:900;height:46px;justify-content:center;width:46px}.dispatch-container .kitchen-mark.is-focused{animation:kitchen-mark-pulse 1.8s ease-in-out infinite;border-width:4px;font-size:22px;height:56px;width:56px}@keyframes kitchen-mark-pulse{0%,to{box-shadow:0 0 20px #f59e0be6,0 0 40px #f59e0b80,0 0 0 0 #f59e0b8c}50%{box-shadow:0 0 30px #f59e0b,0 0 60px #f59e0bb3,0 0 0 18px #f59e0b00}}.dispatch-container .leaflet-popup-content-wrapper{background:#fff;border-radius:12px;box-shadow:0 10px 25px -5px #00000026;color:#1e293b;padding:0}.dispatch-container .leaflet-popup-tip-container{bottom:-10px;height:10px;left:50%;margin-left:-10px;overflow:hidden;position:absolute;width:20px}.dispatch-container .leaflet-popup-tip{background:#fff;box-shadow:none;height:14px;margin:-10px auto 0;padding:0;transform:rotate(45deg);width:14px}.dispatch-container .pu-id{align-items:center;background:#f8fafc;border-bottom:1px solid #e2e8f0;border-radius:12px 12px 0 0;color:#64748b;display:flex;font-size:10px;font-weight:800;gap:6px;letter-spacing:.08em;padding:10px 14px}.dispatch-container .pu-live-dot{animation:pu-pulse 1.2s ease-in-out infinite;background:#22c55e;border-radius:50%;box-shadow:0 0 0 2px #22c55e33;height:6px;width:6px}@keyframes pu-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.2)}}.dispatch-container .pu-rider-wrap{align-items:center;display:flex;gap:8px;padding:14px 14px 8px}.dispatch-container .pu-rider-indicator{border-radius:50%;box-shadow:0 0 6px #00000026;flex-shrink:0;height:8px;width:8px}.dispatch-container .pu-rider-name{color:#0f172a;font-size:14.5px;font-weight:800;letter-spacing:-.01em}.dispatch-container .pu-body-content{display:flex;flex-direction:column;gap:6px;padding:0 14px 12px}.dispatch-container .pu-row{align-items:center;color:#64748b;display:flex;font-size:12px;justify-content:space-between;padding:2px 0}.dispatch-container .pu-row span:first-child{color:#64748b;flex-shrink:0;font-size:11px;font-weight:600;letter-spacing:.02em;margin-right:12px;text-transform:uppercase}.dispatch-container .pu-row span:last-child{color:#334155;font-weight:600;max-width:70%;overflow-wrap:anywhere;text-align:right;word-break:break-word}.dispatch-container .pu-status-tag{align-items:center;border-radius:6px;display:inline-flex;font-size:10.5px;font-weight:800;letter-spacing:.02em;padding:2px 8px;text-transform:uppercase}.dispatch-container .pu-status-tag.is-idle{background:#f1f5f9;color:#475569}.dispatch-container .pu-status-tag.is-active{background:#e0f2fe;color:#0284c7}.dispatch-container .pu-status-tag.is-delivered{background:#dcfce7;color:#16a34a}.dispatch-container .pu-status-tag.is-generic{background:#f1f5f9;color:#475569}.dispatch-container .pu-order-tag{background:#f5f3ff;border-radius:4px;color:#4f46e5!important;font-family:JetBrains Mono,monospace;font-size:11px;font-weight:700!important;padding:1px 6px}.dispatch-container .pu-phone-tag{color:#334155;font-family:JetBrains Mono,monospace;font-size:11.5px}.dispatch-container .pu-coord-tag{color:#64748b!important;font-family:JetBrains Mono,monospace;font-size:10.5px}.dispatch-container .live-rider-popup .leaflet-popup-content-wrapper{animation:dispatch-popup-in .18s cubic-bezier(.4,0,.2,1);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#fffffff2;border:1px solid #ffffffd9;border-radius:16px;box-shadow:0 20px 48px #0f172a38;max-width:280px;min-width:260px;overflow:hidden;padding:0}.dispatch-container .live-rider-popup .leaflet-popup-content{margin:0;min-width:260px}.dispatch-container .live-rider-popup .pu-hdr-live{align-items:center;background:#f8fafc;border-bottom:1px solid #e2e8f0;display:flex;justify-content:space-between;padding:10px 14px}.dispatch-container .live-rider-popup .pu-hdr-left{align-items:center;display:flex;gap:8px}.dispatch-container .live-rider-popup .pu-live-indicator{align-items:center;display:inline-flex;justify-content:center;position:relative}.dispatch-container .live-rider-popup .pu-live-dot{background-color:#dc2626;background-color:var(--pulse-color,#dc2626);border-radius:50%;height:7px;width:7px;z-index:2}.dispatch-container .live-rider-popup .pu-live-indicator:after{animation:pu-pulse-ring 1.8s cubic-bezier(.4,0,.2,1) infinite;border:2px solid #dc2626;border:2px solid var(--pulse-color,#dc2626);border-radius:50%;content:"";height:15px;opacity:0;position:absolute;width:15px;z-index:1}@keyframes pu-pulse-ring{0%{opacity:.8;transform:scale(.5)}to{opacity:0;transform:scale(1.6)}}.dispatch-container .live-rider-popup .pu-hdr-title{color:#64748b;font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}.dispatch-container .live-rider-popup .pu-status-badge{border-radius:999px;box-shadow:0 1px 3px #0000000d;font-size:9px;font-weight:800;letter-spacing:.04em;padding:2px 8px;text-transform:uppercase}.dispatch-container .live-rider-popup .pu-status-badge.active{background:#e0f2fe;color:#0369a1}.dispatch-container .live-rider-popup .pu-status-badge.idle{background:#f1f5f9;color:#475569}.dispatch-container .live-rider-popup .pu-rider-profile{align-items:center;background:linear-gradient(180deg,#f8fafc80,#fff0);display:flex;gap:12px;padding:14px 16px 10px}.dispatch-container .live-rider-popup .pu-avatar{align-items:center;border-radius:10px;box-shadow:inset 0 1px 2px #fff3;display:flex;font-size:20px;height:38px;justify-content:center;width:38px}.dispatch-container .live-rider-popup .pu-rider-info-text{display:flex;flex-direction:column;gap:2px}.dispatch-container .live-rider-popup .pu-rider-name{color:#0f172a;font-size:15px;font-weight:800;letter-spacing:-.01em;line-height:1.2}.dispatch-container .live-rider-popup .pu-rider-name-row{align-items:center;display:flex;flex-wrap:wrap;gap:8px}.dispatch-container .live-rider-popup .pu-rider-meta{color:#94a3b8;font-size:10px;font-weight:600;letter-spacing:.02em}.dispatch-container .live-rider-popup .pu-body-content{display:flex;flex-direction:column;gap:8px;padding:4px 16px 16px}.dispatch-container .live-rider-popup .pu-info-row{align-items:center;border-bottom:1px dashed #f1f5f9;display:flex;justify-content:space-between;padding:4px 0}.dispatch-container .live-rider-popup .pu-info-row:last-child{border-bottom:none;padding-bottom:0}.dispatch-container .live-rider-popup .pu-info-label{color:#94a3b8;font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.dispatch-container .live-rider-popup .pu-info-value{color:#334155;font-size:12px;font-weight:700;text-align:right}.dispatch-container .live-rider-popup .pu-order-badge{background:#f5f3ff;border:1px solid #4f46e51f;border-radius:6px;color:#4f46e5;font-family:JetBrains Mono,monospace;font-size:11px;font-weight:800;padding:2px 8px}.dispatch-container .live-rider-popup .pu-phone-link{color:#0284c7;font-family:JetBrains Mono,monospace;font-weight:700;text-decoration:none;transition:color .15s ease}.dispatch-container .live-rider-popup .pu-phone-link:hover{color:#0369a1;text-decoration:underline}.dispatch-container .live-rider-popup .pu-time-stamp{align-items:center;color:#475569;display:inline-flex;gap:4px}.dispatch-container .live-rider-popup .pu-time-stamp .inline-icon{color:#64748b;font-size:13px}.dispatch-container .live-rider-popup .pu-coordinates{background:#f8fafc;border:1px solid #e2e8f0;border-radius:4px;color:#64748b;font-family:JetBrains Mono,monospace;font-size:11px;padding:2px 6px}.dispatch-container .pu-section-label{border-bottom:1px solid #7b1fa22e;color:#7b1fa2;font-size:10px;font-weight:700;letter-spacing:.06em;margin:10px 14px 4px;padding-bottom:4px;text-transform:uppercase}.dispatch-container .pu-timeline{display:flex;flex-direction:column;gap:5px;padding:4px 14px 4px 16px;position:relative}.dispatch-container .pu-timeline:before{background:#7b1fa22e;bottom:8px;content:"";left:19px;position:absolute;top:8px;width:1px}.dispatch-container .pu-tl-row{align-items:center;display:flex;font-size:11px;gap:8px;position:relative;z-index:1}.dispatch-container .pu-tl-dot{background:#fff;border:2px solid #7b1fa273;border-radius:50%;box-sizing:border-box;flex-shrink:0;height:8px;width:8px}.dispatch-container .pu-tl-row.delivered .pu-tl-dot{background:#16a34a;border-color:#16a34a;box-shadow:0 0 0 3px #16a34a2e}.dispatch-container .pu-tl-label{color:#64748b;flex:1 1;font-weight:500}.dispatch-container .pu-tl-row.delivered .pu-tl-label{color:#16a34a;font-weight:700}.dispatch-container .pu-tl-time{font-feature-settings:"tnum","tnum";color:#1e293b;font-variant-numeric:tabular-nums;font-weight:700}.dispatch-container .dispatch-popup .leaflet-popup-content{margin:0;width:auto!important}.dispatch-container .dispatch-popup .leaflet-popup-content-wrapper{animation:dispatch-popup-in .18s cubic-bezier(.4,0,.2,1);border-radius:14px;box-shadow:0 18px 40px #0f172a2e;min-width:580px;overflow:hidden;padding:0}.dispatch-container .dispatch-popup .leaflet-popup-tip{animation:dispatch-popup-in .18s cubic-bezier(.4,0,.2,1)}@keyframes dispatch-popup-in{0%{opacity:0;transform:translateY(4px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.dispatch-container .dispatch-popup .leaflet-popup-content{min-width:580px}.dispatch-container .dispatch-popup-center{animation:dispatch-popup-in .18s cubic-bezier(.4,0,.2,1);display:flex;left:50%;max-height:calc(100vh - 32px);max-width:calc(100vw - 32px);pointer-events:auto;position:fixed;top:50%;transform:translate(-50%,-50%);z-index:1700}.dispatch-container .dispatch-popup-center .dispatch-popup-card{background:#fff;border-radius:14px;box-shadow:0 24px 60px #0f172a47;max-height:calc(100vh - 32px);max-width:680px;min-width:min(580px,calc(100vw - 32px));overflow-x:hidden;overflow-y:auto;position:relative}.dispatch-container .dispatch-popup-center-close{align-items:center;background:#fff3;border:0;border-radius:50%;color:#fff;cursor:pointer;display:flex;font-size:20px;font-weight:700;height:26px;justify-content:center;line-height:1;padding:0;position:absolute;right:8px;top:8px;transition:background .15s ease;width:26px;z-index:2}.dispatch-container .dispatch-popup-center-close:hover{background:#ffffff59}.dispatch-container .dispatch-popup-center .dispatch-popup .pu-header{padding-right:44px}.dispatch-container .dispatch-popup .pu-header{background:linear-gradient(135deg,#7b1fa2,#9c27b0 50%,#ab47bc);border-radius:12px 12px 0 0;color:#fff;padding:14px 16px 12px}.dispatch-container .dispatch-popup .pu-header-top{align-items:center;display:flex;gap:10px;justify-content:space-between;margin-bottom:8px}.dispatch-container .dispatch-popup .pu-id{background:#0000;border:0;border-radius:0;color:#fffffff2;font-size:12px;font-weight:800;letter-spacing:.06em;overflow:hidden;padding:0;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.dispatch-container .dispatch-popup .pu-status-chip{border-radius:999px;box-shadow:0 2px 6px #0000002e;flex-shrink:0;font-size:10px;font-weight:800;letter-spacing:.06em;padding:4px 10px;text-transform:uppercase;white-space:nowrap}.dispatch-container .dispatch-popup .pu-rider{align-items:center;color:#fff!important;display:flex;font-size:16px;font-weight:800;gap:6px;letter-spacing:-.01em;padding:0}.dispatch-container .dispatch-popup .pu-rider svg{font-size:18px;opacity:.9}.dispatch-container .dispatch-popup .pu-rider span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .dispatch-popup .pu-customer{align-items:center;color:#ffffffeb;display:flex;font-size:13px;font-weight:600;gap:6px;letter-spacing:-.005em;margin-top:4px;max-width:100%;padding:0}.dispatch-container .dispatch-popup .pu-customer svg{flex:0 0 auto;font-size:14px;opacity:.85}.dispatch-container .dispatch-popup .pu-customer span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .dispatch-popup .pu-delivery-id{color:#ffffffd9;font-size:11px;font-weight:600;letter-spacing:.04em;margin-top:6px}.dispatch-container .dispatch-popup .pu-body{padding:4px 16px 12px}.dispatch-container .dispatch-popup .pu-section{margin-top:8px}.dispatch-container .dispatch-popup .pu-section-label{border-bottom:1px solid #7b1fa22e;color:#7b1fa2;font-size:10px;font-weight:800;letter-spacing:.08em;margin:0 0 6px;padding-bottom:4px;text-transform:uppercase}.dispatch-container .dispatch-popup .pu-timeline{grid-column-gap:14px;grid-row-gap:4px;column-gap:14px;display:grid;grid-template-columns:1fr 1fr;padding:2px 0;position:relative;row-gap:4px}.dispatch-container .dispatch-popup .pu-timeline:before{display:none}.dispatch-container .dispatch-popup .pu-details-grid{grid-gap:8px;display:grid;gap:8px;grid-template-columns:1fr 1fr}.dispatch-container .dispatch-popup .pu-detail{align-items:flex-start;background:#7b1fa20d;border:1px solid #7b1fa21f;border-radius:10px;display:flex;gap:8px;min-width:0;padding:8px 10px}.dispatch-container .dispatch-popup .pu-detail-icon{align-items:center;background:#7b1fa21f;border-radius:7px;color:#7b1fa2;display:flex;flex-shrink:0;font-size:14px;height:26px;justify-content:center;width:26px}.dispatch-container .dispatch-popup .pu-detail-icon svg{font-size:15px}.dispatch-container .dispatch-popup .pu-detail-body{flex:1 1;min-width:0}.dispatch-container .dispatch-popup .pu-detail-label{color:#64748b;font-size:9px;font-weight:700;letter-spacing:.06em;margin-bottom:2px;text-transform:uppercase}.dispatch-container .dispatch-popup .pu-detail-value{color:#1e293b;font-size:12px;font-weight:700;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .dispatch-popup .pu-distance-row{border-top:1px dashed #7b1fa22e;display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;padding-top:8px}.dispatch-container .dispatch-popup .pu-distance-chip{align-items:center;background:linear-gradient(135deg,#7b1fa214,#9c27b00f);border:1px solid #7b1fa233;border-radius:999px;display:inline-flex;font-size:11px;font-weight:600;gap:5px;padding:5px 10px}.dispatch-container .dispatch-popup .pu-distance-icon{color:#7b1fa2;display:inline-flex}.dispatch-container .dispatch-popup .pu-distance-icon svg{font-size:14px}.dispatch-container .dispatch-popup .pu-distance-label{color:#64748b;font-size:10px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}.dispatch-container .dispatch-popup .pu-distance-value{font-feature-settings:"tnum";color:#1e293b;font-variant-numeric:tabular-nums;font-weight:800}.dispatch-container .kitchen-popup .kp-header{background:#f8fafc;border-bottom:1px solid #e2e8f0;border-radius:12px 12px 0 0;color:#64748b;font-size:10px;font-weight:800;letter-spacing:.1em;padding:8px 14px}.dispatch-container .kitchen-popup .kp-name{color:#f59e0b;color:var(--kitchen);font-size:16px;font-weight:800;padding:14px 14px 4px}.dispatch-container .kitchen-popup .kp-stat{display:flex;justify-content:space-between;padding:8px 14px 16px}.dispatch-container .kitchen-popup .kp-stat-lbl{color:#64748b;font-size:12px}.dispatch-container .kitchen-popup .kp-stat-val{color:#1e293b;font-size:16px;font-weight:800}.dispatch-container .empty-slot{align-items:center;display:flex;flex-direction:column;gap:10px;justify-content:center;padding:48px 24px;text-align:center}.dispatch-container .empty-slot-icon{color:#e2e8f0;color:var(--border);font-size:36px;line-height:1}.dispatch-container .empty-slot-title{color:#64748b;color:var(--text-muted);font-size:14px;font-weight:700}.dispatch-container .empty-slot-sub{color:#e2e8f0;color:var(--border);font-size:12px;font-weight:500;line-height:1.5;max-width:220px}.dispatch-container #desc{background:#fff;background:var(--bg);border-top:1px solid #e2e8f0;border-top:1px solid var(--border);color:#64748b;color:var(--text-muted);font-size:12px;font-weight:500;padding:16px 20px}@media (max-width:1280px){.dispatch-container #sidebar{flex-basis:360px;width:360px}.dispatch-container .sidebar-toggle-tab{left:360px}.dispatch-container .sidebar-toggle-tab.is-collapsed{left:0}}@media (max-width:1180px){.dispatch-container #sidebar{flex-basis:320px;width:320px}.dispatch-container .sidebar-toggle-tab{left:320px}.dispatch-container .sidebar-toggle-tab.is-collapsed{left:0}.dispatch-container .rd-rider-name{font-size:24px}.dispatch-container .rd-stat-value,.dispatch-container .sb-tile-value{font-size:20px}.dispatch-container #hdr{padding:0 16px}.dispatch-container #strat-row{gap:6px;padding:0 16px}.dispatch-container #batch-row{padding:8px 16px}.dispatch-container .sbt{font-size:12px;gap:6px;padding:7px 11px}}@media (max-width:1080px){.dispatch-container #sidebar{flex-basis:290px;width:290px}.dispatch-container .sidebar-toggle-tab{left:290px}.dispatch-container .sidebar-toggle-tab.is-collapsed{left:0}.dispatch-container .logo-city,.dispatch-container .logo-city-wrap{display:none}.dispatch-container .logo-name{font-size:16px}.dispatch-container #clock{font-size:12px;padding:5px 10px}.dispatch-container .hdr-stats{gap:6px;margin-right:8px}.dispatch-container .strat-stat{font-size:11px;gap:4px;padding:5px 9px}.dispatch-container .strat-stat-label{display:none}.dispatch-container .live-status{font-size:11px;padding:5px 8px}.dispatch-container .live-status-sub{display:none}.dispatch-container .sbt{font-size:12px;gap:5px;padding:7px 10px}.dispatch-container .sbt .sbt-icon{font-size:16px;height:16px;width:16px}.dispatch-container .batch-btn{font-size:11px;gap:4px;padding:5px 9px}.dispatch-container .batch-btn-count{font-size:9px;height:16px;min-width:18px;padding:0 4px}.dispatch-container .sb-header{padding:14px 14px 12px}.dispatch-container .sb-tile-value{font-size:18px}.dispatch-container .sb-tile{gap:8px;padding:8px 10px}.dispatch-container .sb-tile-icon{font-size:16px;height:28px;width:28px}.dispatch-container .rcard{padding:12px}.dispatch-container .rcard-name{font-size:13px}.dispatch-container .rcard-zone{font-size:11px}.dispatch-container .step-wrap{padding:12px}.dispatch-container #route-detail{padding:16px}.dispatch-container .rd-rider-name{font-size:20px}.dispatch-container .rd-stat-value{font-size:17px}.dispatch-container .rd-stat{padding:12px 8px 10px}.dispatch-container #ov-tr{width:160px}.dispatch-container .rchip{font-size:11px;padding:6px 8px}}@media (max-width:960px){.dispatch-container #sidebar{flex-basis:250px;width:250px}.dispatch-container .sidebar-toggle-tab{left:250px}.dispatch-container .sidebar-toggle-tab.is-collapsed{left:0}.dispatch-container #strat-row{-webkit-overflow-scrolling:touch;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.dispatch-container #strat-row::-webkit-scrollbar{display:none}.dispatch-container .sbt{flex-shrink:0;font-size:11px;padding:7px 9px}.dispatch-container .zone-stat-label{display:none}.dispatch-container .zone-stat-pill{gap:3px;padding:3px 7px}.dispatch-container .zone-stat-value{font-size:12px}.dispatch-container .rd-stats-grid{gap:6px}.dispatch-container .rd-stat{padding:10px 6px 8px}.dispatch-container .rd-stat-value{font-size:15px}.dispatch-container .rd-stat-label{font-size:9px}.dispatch-container .rd-stat-icon{font-size:15px}.dispatch-container #ov-tr{display:none}.dispatch-container .zone-card-name{font-size:13px}.dispatch-container .zone-card-sub{font-size:10px}.dispatch-container #riders-panel{padding:12px}.dispatch-container .trip-header{padding:10px 12px}}.dispatch-container .rider-info-mode{background:#fff;background:var(--bg);display:flex;flex:1 1;min-height:0;overflow:hidden}.dispatch-container .ri-sidebar{background:#f8fafc;background:var(--bg-sub,#f8fafc);border-right:1px solid #e2e8f0;border-right:1px solid var(--border,#0f172a14);display:flex;flex-direction:column;flex-shrink:0;min-width:280px;overflow:hidden;width:320px}.dispatch-container .ri-sb-head{border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border,#0f172a14);padding:16px 18px 12px}.dispatch-container .ri-sb-title{color:#1e293b;font-size:20px;font-weight:800;letter-spacing:-.01em}.dispatch-container .ri-sb-sub{color:#64748b;font-size:13px;font-weight:600;margin-top:4px}.dispatch-container .ri-main{background:#fff;flex:1 1;min-width:0;overflow-y:auto;padding:24px 28px}.dispatch-container .ri-main::-webkit-scrollbar{width:6px}.dispatch-container .ri-main::-webkit-scrollbar-thumb{background:#7b1fa240;border-radius:999px}.dispatch-container .ri-placeholder{align-items:center;color:#64748b;display:flex;flex-direction:column;height:100%;justify-content:center;padding:60px 20px;text-align:center}.dispatch-container .ri-placeholder-icon{align-items:center;background:#7b1fa214;border-radius:16px;color:#7b1fa2;display:flex;font-size:32px;height:64px;justify-content:center;margin-bottom:16px;width:64px}.dispatch-container .ri-placeholder-icon svg{font-size:36px}.dispatch-container .ri-placeholder-title{color:#1e293b;font-size:16px;font-weight:800;letter-spacing:-.01em}.dispatch-container .ri-placeholder-sub{font-size:12px;font-weight:500;line-height:1.5;margin-top:6px;max-width:320px}.dispatch-container .ri-search{padding:12px 14px 4px;position:relative}.dispatch-container .ri-search-icon{color:#94a3b8;font-size:18px;left:26px;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}.dispatch-container .ri-search-input{background:#f8fafc;border:1px solid #7b1fa22e;border-radius:10px;color:#1e293b;font-family:inherit;font-size:13px;font-weight:500;outline:none;padding:10px 12px 10px 38px;transition:border-color .15s ease,background .15s ease;width:100%}.dispatch-container .ri-search-input:focus{background:#fff;border-color:#7b1fa2}.dispatch-container .ri-rider-list{display:flex;flex:1 1;flex-direction:column;gap:6px;min-height:0;overflow-y:auto;padding:8px 14px 16px}.dispatch-container .ri-rider-list::-webkit-scrollbar{width:6px}.dispatch-container .ri-rider-list::-webkit-scrollbar-thumb{background:#7b1fa240;border-radius:999px}.dispatch-container .ri-rider-item{align-items:center;background:#fff;border:1px solid #7b1fa21f;border-radius:10px;cursor:pointer;display:flex;font-family:inherit;gap:12px;padding:12px 14px;text-align:left;transition:border-color .15s ease,background .15s ease,transform .15s ease;width:100%}.dispatch-container .ri-rider-item:hover{background:#7b1fa20a;border-color:#7b1fa266;transform:translateX(2px)}.dispatch-container .ri-rider-item.active{background:linear-gradient(180deg,#fbf3ff,#f0e0fa);border-color:#7b1fa2;box-shadow:0 4px 12px #7b1fa22e}.dispatch-container .ri-rider-item.active .ri-rider-name{color:#7b1fa2}.dispatch-container .ri-rider-item.active .ri-rider-arrow{opacity:1;transform:translateX(2px)}.dispatch-container .ri-rider-dot{border-radius:50%;box-shadow:0 0 0 2px #fff,0 0 0 3px #0f172a14;flex-shrink:0;height:14px;width:14px}.dispatch-container .ri-rider-info-block{display:flex;flex:1 1;flex-direction:column;gap:3px;min-width:0}.dispatch-container .ri-rider-name{color:#1e293b;font-size:15px;font-weight:700;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .ri-rider-meta{color:#64748b;font-size:13px;font-weight:600}.dispatch-container .ri-rider-arrow{color:#7b1fa2;font-size:18px;font-weight:800;opacity:.4;transition:opacity .15s ease,transform .15s ease}.dispatch-container .ri-rider-item:hover .ri-rider-arrow{opacity:1;transform:translateX(2px)}.dispatch-container .ri-empty{color:#64748b;font-size:12px;padding:32px 16px;text-align:center}.dispatch-container .ri-error,.dispatch-container .ri-loading{color:#64748b;font-size:13px;padding:32px 16px;text-align:center}.dispatch-container .ri-error{color:#dc2626}.dispatch-container .ri-snap-head{border-bottom:1px dashed #7b1fa22e;margin-bottom:20px;padding:6px 0 18px}.dispatch-container .ri-snap-name{color:#1e293b;font-size:18px;font-weight:800;letter-spacing:-.01em}.dispatch-container .ri-snap-meta{align-items:center;color:#64748b;display:flex;font-size:12px;font-weight:600;gap:8px;margin-top:4px}.dispatch-container .ri-status{background:#64748b2e;border-radius:999px;color:#475569;font-size:10px;font-weight:800;letter-spacing:.06em;padding:2px 10px;text-transform:uppercase}.dispatch-container .ri-status-idle{background:#f59e0b2e;color:#b45309}.dispatch-container .ri-status-active,.dispatch-container .ri-status-ongoing,.dispatch-container .ri-status-online{background:#22c55e2e;color:#15803d}.dispatch-container .ri-status-offline{background:#ef44442e;color:#b91c1c}.dispatch-container .ri-live{align-items:center;background:#22c55e1f;border-radius:999px;color:#15803d;display:inline-flex;font-size:10px;font-weight:800;gap:5px;letter-spacing:.06em;padding:2px 8px 2px 6px;text-transform:uppercase}.dispatch-container .ri-live.is-refetching{background:#7b1fa21f;color:#7b1fa2}.dispatch-container .ri-live-dot{animation:ri-live-pulse 1.6s ease-in-out infinite;background:#16a34a;border-radius:50%;box-shadow:0 0 0 0 #22c55e8c;height:6px;width:6px}.dispatch-container .ri-live.is-refetching .ri-live-dot{background:#7b1fa2;box-shadow:0 0 0 0 #7b1fa28c}@keyframes ri-live-pulse{0%,to{box-shadow:0 0 0 0 #22c55e8c}50%{box-shadow:0 0 0 5px #22c55e00}}.dispatch-container .ri-snap-time{font-feature-settings:"tnum";align-items:center;color:#64748b;display:inline-flex;font-size:11px;font-variant-numeric:tabular-nums;font-weight:500;gap:4px;margin-top:6px}.dispatch-container .ri-snap-time svg{font-size:13px}.dispatch-container .ri-snap-grid{grid-gap:8px;display:grid;gap:8px;grid-template-columns:1fr 1fr}.dispatch-container .ri-stat{align-items:center;background:#7b1fa20d;border:1px solid #7b1fa21f;border-radius:10px;display:flex;gap:10px;padding:10px 12px}.dispatch-container .ri-stat-warn{background:#ef44440f;border-color:#ef444438}.dispatch-container .ri-stat-icon{align-items:center;background:#7b1fa21f;border-radius:9px;color:#7b1fa2;display:flex;flex-shrink:0;font-size:16px;height:32px;justify-content:center;width:32px}.dispatch-container .ri-stat-warn .ri-stat-icon{background:#ef444429;color:#b91c1c}.dispatch-container .ri-stat-icon svg{font-size:18px}.dispatch-container .ri-stat-body{flex:1 1;min-width:0}.dispatch-container .ri-stat-label{color:#64748b;font-size:10px;font-weight:700;letter-spacing:.05em;margin-bottom:2px;text-transform:uppercase}.dispatch-container .ri-stat-value{align-items:center;color:#1e293b;display:flex;font-size:13px;font-weight:700;gap:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .ri-stat-tag{background:#22c55e2e;border-radius:999px;color:#15803d;font-size:9px;font-weight:800;letter-spacing:.04em;padding:2px 6px;text-transform:uppercase}.dispatch-container .ri-map-section{margin-top:14px}.dispatch-container .ri-coords-label{font-feature-settings:"tnum";align-items:center;background:linear-gradient(180deg,#fff,#fbf5ff);border:1px solid #7b1fa22e;border-bottom:0;border-radius:10px 10px 0 0;box-sizing:border-box;color:#1e293b;display:inline-flex;font-size:12px;font-variant-numeric:tabular-nums;font-weight:700;gap:4px;padding:8px 14px;width:100%}.dispatch-container .ri-coords-label svg{color:#7b1fa2;font-size:16px}.dispatch-container .ri-map{border:1px solid #7b1fa22e;border-radius:0 0 10px 10px;height:260px;overflow:hidden;position:relative;width:100%;z-index:0}.dispatch-container .ri-map .leaflet-container{font-family:inherit;height:100%;width:100%}.dispatch-container .ri-map .leaflet-tooltip.ri-area-banner{background:#7b1fa2;border:0;border-radius:8px;box-shadow:0 4px 10px #0f172a40;color:#fff;font-size:11px;font-weight:700;letter-spacing:.02em;padding:4px 10px;white-space:nowrap}.dispatch-container .ri-map .leaflet-tooltip.ri-area-banner:before{border-top-color:#7b1fa2}@media (max-width:600px){.dispatch-container .rider-info-mode{flex-direction:column}.dispatch-container .ri-sidebar{border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border,#0f172a14);border-right:0;max-height:40vh;min-width:0;width:100%}.dispatch-container .ri-main{padding:16px}.dispatch-container .ri-snap-grid{grid-template-columns:1fr}}@media (max-width:1366px){.dispatch-container #hdr{height:48px;padding:0 16px}.dispatch-container .logo-name{font-size:15px}.dispatch-container .logo-badge{border-radius:6px;font-size:13px;height:28px;width:28px}.dispatch-container .logo{gap:8px}.dispatch-container #clock{font-size:11px;padding:4px 10px}.dispatch-container .hdr-stats{gap:8px;margin-right:8px}.dispatch-container .strat-stat{font-size:11px;gap:4px;padding:4px 8px}.dispatch-container .strat-stat-label{display:none}.dispatch-container .live-status{font-size:11px;padding:4px 8px}.dispatch-container .date-chip-label,.dispatch-container .live-status-sub{display:none}.dispatch-container .date-chip-main{gap:8px;padding:6px 10px}.dispatch-container .date-chip-icon{font-size:13px;height:24px;width:24px}.dispatch-container .date-chip-value{font-size:12px}.dispatch-container .date-chip-nav{font-size:16px;width:28px}.dispatch-container #strat-row{gap:8px;height:48px;padding:0 16px}.dispatch-container .sbt{border:1px solid #0f172a14;border-radius:8px;font-size:12px;gap:6px;padding:6px 12px}.dispatch-container .sbt .sbt-icon{font-size:16px;height:16px;width:16px}.dispatch-container #batch-row{gap:6px;padding:6px 16px}.dispatch-container .batch-label{font-size:11px}.dispatch-container .batch-btn{font-size:11px;padding:4px 8px}.dispatch-container #sidebar{flex-basis:320px;width:320px}.dispatch-container .sidebar-toggle-tab{left:320px}.dispatch-container #body.compare-mode #sidebar{flex-basis:250px;width:250px}.dispatch-container #body.compare-mode .sidebar-toggle-tab{left:250px}.dispatch-container #body.compare-mode .sidebar-toggle-tab.is-collapsed{left:0}.dispatch-container .sb-header{padding:10px 12px}.dispatch-container .sb-tile{gap:6px;padding:6px 8px}.dispatch-container .sb-tile-value{font-size:16px}.dispatch-container .rcard{padding:10px}.dispatch-container .rcard-name{font-size:12px}.dispatch-container .rcard-zone{font-size:10px}.dispatch-container .step-wrap{padding:10px}.dispatch-container #route-detail{padding:12px}.dispatch-container .rd-rider-name{font-size:18px}.dispatch-container .rd-stats-grid{gap:4px}.dispatch-container .rd-stat{padding:8px 4px 6px}.dispatch-container .rd-stat-value{font-size:14px}.dispatch-container .rd-stat-label{font-size:9px}.dispatch-container .compare-header-v2{gap:6px;padding:8px 12px 6px}.dispatch-container .compare-header-row .compare-title{font-size:13px;gap:8px}.dispatch-container .compare-title-dot{height:8px;width:8px}.dispatch-container .compare-title-badge{font-size:9px;padding:2px 6px}.dispatch-container .compare-overall-btn,.dispatch-container .compare-sync-toggle{font-size:10px;gap:4px;padding:4px 8px}.dispatch-container .compare-overall-btn svg,.dispatch-container .compare-sync-toggle svg{font-size:12px}.dispatch-container .compare-timeline-wrap{gap:4px}.dispatch-container .compare-timeline-container{border-radius:8px;gap:12px;padding:12px}.dispatch-container .compare-timeline-labels{border-right-width:1px;gap:12px;padding-right:10px}.dispatch-container .compare-timeline-label{font-size:9px;height:24px}.dispatch-container .compare-timeline-scrollable{-ms-overflow-style:none;display:flex;flex:1 1;flex-direction:column;gap:12px;overflow-x:auto;scrollbar-width:none}.dispatch-container .compare-timeline-scrollable::-webkit-scrollbar{height:4px}.dispatch-container .compare-timeline-scrollable::-webkit-scrollbar-track{background:#0000}.dispatch-container .compare-timeline-scrollable::-webkit-scrollbar-thumb{background:#6366f140;border-radius:999px}.dispatch-container .compare-timeline-scrollable:hover::-webkit-scrollbar-thumb{background:#6366f180}.dispatch-container .compare-timeline-track.is-actual .compare-step-spacer,.dispatch-container .compare-timeline-track.is-planned .compare-step-spacer{margin-bottom:14px}.dispatch-container .compare-step{gap:4px}.dispatch-container .compare-step-circle{box-shadow:0 1px 4px #0f172a1a,0 0 0 1px #fff9;font-size:10px;height:24px;width:24px}.dispatch-container .compare-step.is-focused .compare-step-circle{box-shadow:0 2px 6px #0f172a26,0 0 0 2px #fff,0 0 0 3px #6366f1;box-shadow:0 2px 6px #0f172a26,0 0 0 2px #fff,0 0 0 3px var(--step-color,#6366f1);transform:scale(1.1)}.dispatch-container .compare-step-spacer{margin-bottom:14px;width:10px}.dispatch-container .compare-step-tick{font-size:9px}.dispatch-container .compare-step-flag{border-width:1px;height:8px;right:-3px;top:-3px;width:8px}.dispatch-container .compare-progress-strip{margin-top:2px}.dispatch-container .compare-progress-text{font-size:9px}.dispatch-container .compare-legend{gap:8px;margin-top:0;padding-top:2px}.dispatch-container .compare-legend-item{font-size:9px}.dispatch-container .compare-legend-swatch{height:10px;width:10px}.dispatch-container .compare-legend-note{display:none}.dispatch-container .compare-delta{gap:6px;padding:8px 12px}.dispatch-container .compare-delta-title{gap:8px;margin-bottom:4px}.dispatch-container .compare-delta-step-badge{font-size:11px;height:20px;width:20px}.dispatch-container .compare-delta-title-main{font-size:12px}.dispatch-container .compare-delta-title-sub{font-size:9px}.dispatch-container .compare-delta-status{font-size:9px;padding:2px 6px}.dispatch-container .compare-delta-grid{gap:6px}.dispatch-container .compare-delta-cell{border-radius:8px;padding:5px 8px 4px}.dispatch-container .compare-delta-cell-label{font-size:9px;margin-bottom:1px}.dispatch-container .compare-delta-cell-val{font-size:13px}.dispatch-container .compare-delta-cell-unit{font-size:8px}.dispatch-container .compare-delta-cell-sub{font-size:9px;margin-top:1px}}@media (max-height:750px){.dispatch-container #hdr,.dispatch-container #strat-row{height:42px}.dispatch-container #strat-row .sbt{border:1px solid #0f172a14;border-radius:6px;font-size:11px;padding:5px 10px}.dispatch-container #batch-row{padding:4px 16px}.dispatch-container .compare-header-v2{gap:6px;padding:8px 12px 6px}.dispatch-container .compare-header-row .compare-title{font-size:13px;gap:8px}.dispatch-container .compare-title-dot{height:8px;width:8px}.dispatch-container .compare-title-badge{font-size:9px;padding:2px 6px}.dispatch-container .compare-overall-btn,.dispatch-container .compare-sync-toggle{font-size:10px;gap:4px;padding:4px 8px}.dispatch-container .compare-overall-btn svg,.dispatch-container .compare-sync-toggle svg{font-size:12px}.dispatch-container .compare-timeline-wrap{gap:4px}.dispatch-container .compare-timeline-container{border-radius:8px;gap:12px;padding:12px}.dispatch-container .compare-timeline-labels{border-right-width:1px;gap:12px;padding-right:10px}.dispatch-container .compare-timeline-label{font-size:9px;height:24px}.dispatch-container .compare-timeline-scrollable{display:flex;flex:1 1;flex-direction:column;gap:12px;overflow-x:auto;padding-bottom:2px}.dispatch-container .compare-timeline-track.is-actual .compare-step-spacer,.dispatch-container .compare-timeline-track.is-planned .compare-step-spacer{margin-bottom:14px}.dispatch-container .compare-step{gap:4px}.dispatch-container .compare-step-circle{box-shadow:0 1px 4px #0f172a1a,0 0 0 1px #fff9;font-size:10px;height:24px;width:24px}.dispatch-container .compare-step.is-focused .compare-step-circle{box-shadow:0 2px 6px #0f172a26,0 0 0 2px #fff,0 0 0 3px #6366f1;box-shadow:0 2px 6px #0f172a26,0 0 0 2px #fff,0 0 0 3px var(--step-color,#6366f1);transform:scale(1.1)}.dispatch-container .compare-step-spacer{margin-bottom:14px;width:10px}.dispatch-container .compare-step-tick{font-size:9px}.dispatch-container .compare-progress-strip{margin-top:2px}.dispatch-container .compare-progress-text{font-size:9px}.dispatch-container .compare-legend{gap:8px;margin-top:0;padding-top:2px}.dispatch-container .compare-legend-item{font-size:9px}.dispatch-container .compare-legend-swatch{height:10px;width:10px}.dispatch-container .compare-legend-note{display:none}.dispatch-container .compare-delta{gap:6px;padding:8px 12px}.dispatch-container .compare-delta-title{gap:8px;margin-bottom:4px}.dispatch-container .compare-delta-step-badge{font-size:11px;height:20px;width:20px}.dispatch-container .compare-delta-title-main{font-size:12px}.dispatch-container .compare-delta-title-sub{font-size:9px}.dispatch-container .compare-delta-status{font-size:9px;padding:2px 6px}.dispatch-container .compare-delta-grid{gap:6px}.dispatch-container .compare-delta-cell{border-radius:8px;padding:5px 8px 4px}.dispatch-container .compare-delta-cell-label{font-size:9px;margin-bottom:1px}.dispatch-container .compare-delta-cell-val{font-size:13px}.dispatch-container .compare-delta-cell-unit{font-size:8px}.dispatch-container .compare-delta-cell-sub{font-size:9px;margin-top:1px}}.dispatch-container .compare-delta.is-collapsible.is-collapsed{padding-bottom:12px}.dispatch-container .compare-delta-toggle-icon{align-items:center;color:#64748b;color:var(--text-muted,#64748b);display:inline-flex;font-size:18px;justify-content:center;transition:transform .22s cubic-bezier(.4,0,.2,1),color .15s ease}.dispatch-container .compare-delta-title:hover .compare-delta-toggle-icon{color:#3b82f6;color:var(--accent,#6366f1)}@media (max-width:1366px){.dispatch-container .compare-delta.is-collapsible.is-collapsed{padding-bottom:8px}.dispatch-container .compare-delta-toggle-icon{font-size:15px}}@media (max-height:750px){.dispatch-container .compare-delta.is-collapsible.is-collapsed{padding-bottom:8px}.dispatch-container .compare-delta-toggle-icon{font-size:15px}}.dispatch-container #body.compare-mode{grid-gap:12px;background:linear-gradient(180deg,#f8fafc,#eef2ff);display:grid;gap:12px;grid-template-columns:minmax(0,1fr) minmax(360px,440px);grid-template-rows:auto minmax(0,1fr);padding:12px;position:relative;transition:grid-template-columns .32s cubic-bezier(.4,0,.2,1)}.dispatch-container #body.compare-mode #sidebar,.dispatch-container #body.compare-mode .sidebar-toggle-tab{display:none!important}.dispatch-container #body.compare-mode.compare-data-collapsed{gap:0;grid-template-columns:minmax(0,1fr) 0}.dispatch-container #body.compare-mode.compare-data-collapsed .compare-data-panel{opacity:0;pointer-events:none;transform:translateX(20px)}.dispatch-container .compare-data-panel{transition:opacity .24s ease,transform .32s cubic-bezier(.4,0,.2,1)}.dispatch-container .compare-data-toggle-tab{align-items:center;background:#fff;border:1px solid #e2e8f0;border:1px solid var(--border,#0f172a1f);border-radius:10px;box-shadow:0 4px 12px #0f172a1f,0 1px 3px #0f172a0f;color:#1e293b;color:var(--text,#0f172a);cursor:pointer;display:inline-flex;font-size:18px;height:56px;justify-content:center;line-height:1;padding:0;position:absolute;right:452px;top:50%;transform:translate(50%,-50%);transition:right .32s cubic-bezier(.4,0,.2,1),background .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease;width:22px;z-index:1200}.dispatch-container .compare-data-toggle-tab:hover{background:linear-gradient(135deg,#6366f1,#3b82f6);box-shadow:0 6px 16px #6366f159;color:#fff;transform:translate(50%,-50%) scale(1.06)}.dispatch-container .compare-data-toggle-tab:focus-visible{outline:2px solid #3b82f6;outline:2px solid var(--accent,#3b82f6);outline-offset:2px}.dispatch-container .compare-data-toggle-tab.is-collapsed{border-radius:10px 0 0 10px;border-right:none;right:0;transform:translateY(-50%)}.dispatch-container .compare-data-toggle-tab.is-collapsed:hover{transform:translateY(-50%) scale(1.06)}.dispatch-container .compare-data-toggle-tab svg{display:block}.dispatch-container #body.compare-mode #compare-map-wrap{animation:compare-slide-in .3s cubic-bezier(.4,0,.2,1);background:#fff;border-radius:14px;box-shadow:0 6px 24px #0f172a14,0 0 0 1px #0f172a0f;flex:none;grid-column:1;grid-row:1;margin:0;min-width:0;overflow:hidden}.dispatch-container #body.compare-mode #compare-map-wrap .compare-header-v2{background:#0000;border-bottom:0}.dispatch-container #body.compare-mode #map-wrap,.dispatch-container #body.compare-mode #map-wrap.compare-split{border-radius:14px;border-right:0;box-shadow:0 6px 24px #0f172a14,0 0 0 1px #0f172a0f;flex:none;grid-column:1;grid-row:2;margin:0;min-height:0;min-width:0;overflow:hidden}.dispatch-container .compare-view-switcher{align-items:stretch;animation:compare-label-in .22s ease-out;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#fffffffa;border-radius:10px;box-shadow:0 6px 20px #0f172a1f,0 0 0 1px #0f172a14;display:inline-flex;gap:2px;left:12px;padding:4px;position:absolute;top:12px;z-index:600}.dispatch-container .compare-view-switcher button{-webkit-appearance:none;appearance:none;background:#0000;border:0;border-radius:7px;color:#475569;cursor:pointer;font-size:11px;font-weight:700;letter-spacing:.04em;padding:6px 14px;text-transform:uppercase;transition:background .15s ease,color .15s ease,box-shadow .15s ease,transform .15s ease;white-space:nowrap}.dispatch-container .compare-view-switcher button:hover{background:#6366f114;color:#4338ca}.dispatch-container .compare-view-switcher button:focus-visible{outline:2px solid #6366f180;outline-offset:1px}.dispatch-container .compare-view-switcher button.is-active{background:linear-gradient(135deg,#6366f1,#3b82f6);box-shadow:0 2px 8px #6366f159;color:#fff}.dispatch-container .compare-view-switcher button.is-active:hover{color:#fff;transform:translateY(-.5px)}.dispatch-container .compare-data-panel{animation:compare-slide-in .3s cubic-bezier(.4,0,.2,1);background:#fff;border-radius:14px;box-shadow:0 6px 24px #0f172a14,0 0 0 1px #0f172a0f;display:flex;flex-direction:column;grid-column:2;grid-row:1/3;min-height:0;min-width:0;overflow:hidden}.dispatch-container .cdp-head{align-items:center;background:linear-gradient(135deg,#6366f1,#3b82f6);border-bottom:1px solid #0f172a14;color:#fff;display:flex;flex-shrink:0;gap:12px;padding:14px 16px}.dispatch-container .cdp-head-title{align-items:center;display:flex;flex:1 1;gap:10px;min-width:0}.dispatch-container .cdp-rider-dot{border-radius:50%;box-shadow:0 0 0 2px #fff6;flex-shrink:0;height:14px;width:14px}.dispatch-container .cdp-head-text{display:flex;flex-direction:column;min-width:0}.dispatch-container .cdp-rider-name{color:#fff;font-size:15px;font-weight:800;letter-spacing:.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cdp-head-badge{color:#ffffffd9;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.dispatch-container .cdp-close{align-items:center;background:#ffffff2e;border:0;border-radius:8px;color:#fff;cursor:pointer;display:inline-flex;font-size:18px;height:32px;justify-content:center;transition:background .15s ease,transform .15s ease;width:32px}.dispatch-container .cdp-close:hover{background:#ffffff52;transform:rotate(90deg)}.dispatch-container .cdp-scroll{display:flex;flex:1 1;flex-direction:column;gap:14px;min-height:0;overflow-y:auto;padding:14px 14px 18px}.dispatch-container .cdp-scroll::-webkit-scrollbar{width:8px}.dispatch-container .cdp-scroll::-webkit-scrollbar-track{background:#0000}.dispatch-container .cdp-scroll::-webkit-scrollbar-thumb{background:#0f172a24;border-radius:999px}.dispatch-container .cdp-section{background:#f8fafc;border:1px solid #0f172a0f;border-radius:12px;display:flex;flex-direction:column;gap:10px;padding:12px}.dispatch-container .cdp-section-head{align-items:center;color:#475569;display:flex;font-size:11px;font-weight:800;gap:8px;letter-spacing:.08em;text-transform:uppercase}.dispatch-container .cdp-section-icon{align-items:center;background:#6366f11f;border-radius:6px;color:#4338ca;display:inline-flex;font-size:14px;height:22px;justify-content:center;width:22px}.dispatch-container .cdp-section-icon.cdp-icon-warn{background:#ef44441f;color:#dc2626}.dispatch-container .cdp-section-title{flex:1 1;min-width:0}.dispatch-container .cdp-section-sub{color:#94a3b8;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:none}.dispatch-container .cdp-section-clear{background:#6366f11a;border:0;border-radius:999px;color:#4338ca;cursor:pointer;font-size:10px;font-weight:700;letter-spacing:.04em;padding:3px 9px;text-transform:none}.dispatch-container .cdp-section-clear:hover{background:#6366f133}.dispatch-container .cdp-tiles{grid-gap:8px;display:grid;gap:8px;grid-template-columns:1fr 1fr}.dispatch-container .cdp-tile{background:#fff;border:1px solid #0f172a12;border-radius:10px;display:flex;flex-direction:column;gap:4px;padding:10px 12px;transition:transform .15s ease,box-shadow .15s ease}.dispatch-container .cdp-tile:hover{box-shadow:0 4px 12px #0f172a0f;transform:translateY(-1px)}.dispatch-container .cdp-tile.is-warn{background:linear-gradient(180deg,#fff7ed,#fff);border-color:#f9731640}.dispatch-container .cdp-tile.is-loss{background:linear-gradient(180deg,#fef2f2,#fff);border-color:#ef444440}.dispatch-container .cdp-tile.is-gain{background:linear-gradient(180deg,#ecfdf5,#fff);border-color:#10b98140}.dispatch-container .cdp-tile-label{align-items:center;color:#64748b;display:flex;font-size:10px;font-weight:800;gap:5px;letter-spacing:.05em;text-transform:uppercase}.dispatch-container .cdp-tile-label svg{font-size:13px}.dispatch-container .cdp-tile-value{color:#0f172a;font-size:20px;font-weight:800;letter-spacing:-.01em;line-height:1.1}.dispatch-container .cdp-tile-value.is-over{color:#dc2626}.dispatch-container .cdp-tile-value.is-under{color:#16a34a}.dispatch-container .cdp-tile-unit{color:#94a3b8;font-size:12px;font-weight:700;margin-left:2px}.dispatch-container .cdp-tile-sub{color:#94a3b8;font-size:11px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cdp-dev-list,.dispatch-container .cdp-step-list{display:flex;flex-direction:column;gap:6px;list-style:none;margin:0;padding:0}.dispatch-container .cdp-dev-item{align-items:center;background:#fff;border:1px solid #ef444433;border-radius:10px;cursor:pointer;display:flex;gap:10px;padding:8px 10px;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}.dispatch-container .cdp-dev-item:hover{box-shadow:0 3px 10px #ef44441f;transform:translateX(2px)}.dispatch-container .cdp-dev-item.is-focused{background:#fef2f2;border-color:#ef444499}.dispatch-container .cdp-dev-num{align-items:center;border-radius:50%;box-shadow:0 0 0 2px #fff9,0 1px 3px #0f172a26;color:#fff;display:inline-flex;flex-shrink:0;font-size:14px;font-weight:800;height:30px;justify-content:center;width:30px}.dispatch-container .cdp-dev-body{display:flex;flex:1 1;flex-direction:column;gap:5px;min-width:0}.dispatch-container .cdp-dev-title{color:#0f172a;font-size:14px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cdp-dev-meta{display:flex;flex-wrap:wrap;gap:6px}.dispatch-container .cdp-dev-chip{align-items:center;background:#ef44441a;border-radius:999px;color:#dc2626;display:inline-flex;font-size:12px;font-weight:700;padding:3px 9px}.dispatch-container .cdp-dev-chip.is-over{background:#ef44441f;color:#dc2626}.dispatch-container .cdp-step{align-items:flex-start;background:#fff;border:1px solid #0f172a12;border-radius:10px;cursor:pointer;display:flex;gap:10px;padding:10px;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}.dispatch-container .cdp-step:hover{border-color:#6366f14d;box-shadow:0 4px 12px #0f172a14;transform:translateY(-1px)}.dispatch-container .cdp-step.is-focused{background:linear-gradient(180deg,#eef2ff,#fff);border-color:#6366f1a6;box-shadow:0 4px 14px #6366f12e}.dispatch-container .cdp-step.is-correct{border-color:#10b98140}.dispatch-container .cdp-step.is-anomaly{background:linear-gradient(180deg,#fef2f2,#fff);border-color:#ef444466}.dispatch-container .cdp-step.is-skipped{opacity:.65}.dispatch-container .cdp-step.is-loading{opacity:.7}.dispatch-container .cdp-step-num{align-items:center;border-radius:50%;box-shadow:0 0 0 2px #fff9,0 1px 3px #0f172a26;color:#fff;display:inline-flex;flex-shrink:0;font-size:15px;font-weight:800;height:34px;justify-content:center;position:relative;width:34px}.dispatch-container .cdp-step-check,.dispatch-container .cdp-step-flag{align-items:center;background:#fff;border-radius:50%;bottom:-3px;box-shadow:0 1px 3px #0f172a33;display:inline-flex;font-size:13px;height:16px;justify-content:center;position:absolute;right:-3px;width:16px}.dispatch-container .cdp-step-check{color:#16a34a}.dispatch-container .cdp-step-flag{color:#dc2626}.dispatch-container .cdp-step-body{display:flex;flex:1 1;flex-direction:column;gap:4px;min-width:0}.dispatch-container .cdp-step-title-row{align-items:center;display:flex;gap:6px;min-width:0}.dispatch-container .cdp-step-title{color:#0f172a;flex:1 1;font-size:15px;font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cdp-step-status{align-items:center;border-radius:999px;display:inline-flex;flex-shrink:0;font-size:11px;font-weight:800;letter-spacing:.05em;padding:3px 9px;text-transform:uppercase}.dispatch-container .cdp-step-sub{color:#94a3b8;font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cdp-step-deltas{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:3px}.dispatch-container .cdp-step-delta{align-items:center;color:#475569;display:inline-flex;font-size:13px;font-weight:700;gap:4px}.dispatch-container .cdp-step-delta svg{color:#94a3b8;font-size:15px}.dispatch-container .cdp-step-delta small{color:#94a3b8;font-size:12px;font-weight:700}.dispatch-container .cdp-step-delta small.is-over,.dispatch-container .cdp-step-delta.is-over,.dispatch-container .cdp-step-delta.is-over svg{color:#dc2626}.dispatch-container .cdp-step-delta.is-under,.dispatch-container .cdp-step-delta.is-under svg{color:#16a34a}@media (max-width:1100px){.dispatch-container #body.compare-mode{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(360px,1fr) auto}.dispatch-container #body.compare-mode #compare-map-wrap{grid-column:1;grid-row:1}.dispatch-container #body.compare-mode #map-wrap,.dispatch-container #body.compare-mode #map-wrap.compare-split{grid-column:1;grid-row:2}.dispatch-container .compare-data-panel{grid-column:1;grid-row:3;max-height:50vh}.dispatch-container .compare-data-toggle-tab{display:none}}.dispatch-container.compare-open #batch-row,.dispatch-container.compare-open #strat-row{display:none!important}.dispatch-container .cdp-score-section{background:linear-gradient(135deg,#f8fafc,#eef2ff);border-color:#6366f12e;padding:14px}.dispatch-container .cdp-score-wrap{align-items:center;display:flex;gap:16px}.dispatch-container .cdp-score-ring{align-items:center;border-radius:50%;box-shadow:0 4px 14px #0f172a1a;display:inline-flex;flex-shrink:0;height:84px;justify-content:center;transition:background .5s ease;width:84px}.dispatch-container .cdp-score-inner{align-items:center;background:#fff;border-radius:50%;display:flex;flex-direction:column;gap:1px;height:70px;justify-content:center;width:70px}.dispatch-container .cdp-score-value{font-size:26px;font-weight:900;letter-spacing:-.02em;line-height:1}.dispatch-container .cdp-score-unit{color:#94a3b8;font-size:10px;font-weight:700;letter-spacing:.05em}.dispatch-container .cdp-score-body{display:flex;flex:1 1;flex-direction:column;gap:2px;min-width:0}.dispatch-container .cdp-score-label{font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.dispatch-container .cdp-score-title{color:#0f172a;font-size:15px;font-weight:800;letter-spacing:-.01em}.dispatch-container .cdp-score-sub{color:#64748b;font-size:11px;font-weight:600}.dispatch-container .cdp-timing-section .cdp-section-head{align-items:center;display:flex;gap:8px}.dispatch-container .cdp-timing-active-tag{align-items:center;background:#10b9811a;border-radius:999px;color:#16a34a;display:inline-flex;font-size:9px;font-weight:800;gap:5px;letter-spacing:.06em;margin-left:auto;padding:2px 8px 2px 6px;text-transform:uppercase}.dispatch-container .cdp-timing-active-pulse{animation:cdp-timing-pulse 1.8s cubic-bezier(.4,0,.6,1) infinite;background:#10b981;border-radius:50%;box-shadow:0 0 0 0 #10b9818c;height:6px;width:6px}@keyframes cdp-timing-pulse{0%{box-shadow:0 0 0 0 #10b9818c}70%{box-shadow:0 0 0 8px #10b98100}to{box-shadow:0 0 0 0 #10b98100}}.dispatch-container .cdp-timing-clock{grid-gap:8px;align-items:center;background:radial-gradient(120% 80% at 50% 0,#6366f112 0,#0000 60%),linear-gradient(180deg,#fbfcff,#fff);border:1px solid #0f172a12;border-radius:14px;box-shadow:0 1px 2px #0f172a08;display:grid;gap:8px;grid-template-columns:1fr minmax(70px,1.3fr) 1fr;padding:18px 14px 16px;position:relative}.dispatch-container .cdp-clock-card{align-items:center;display:flex;flex-direction:column;gap:6px;min-width:0}.dispatch-container .cdp-clock-label{align-items:center;color:#64748b;display:inline-flex;font-size:10px;font-weight:800;gap:4px;letter-spacing:.07em;text-transform:uppercase}.dispatch-container .cdp-clock-label svg{font-size:13px}.dispatch-container .cdp-clock-card.is-start .cdp-clock-label svg{color:#10b981}.dispatch-container .cdp-clock-card.is-end .cdp-clock-label svg{color:#f59e0b}.dispatch-container .cdp-clock-face{align-items:baseline;background:linear-gradient(180deg,#1e293b,#0b1220);border-radius:12px;box-shadow:0 2px 4px #0f172a2e,0 8px 18px #0f172a1f,inset 0 1px 0 #ffffff12,inset 0 -1px 0 #0006;display:inline-flex;gap:5px;padding:10px 14px;position:relative}.dispatch-container .cdp-clock-face:after{background:linear-gradient(180deg,#ffffff0a,#0000 50%);border-radius:11px;content:"";inset:1px;pointer-events:none;position:absolute}.dispatch-container .cdp-clock-card.is-start .cdp-clock-face{border-top:1px solid #10b98166}.dispatch-container .cdp-clock-card.is-end .cdp-clock-face{border-top:1px solid #f59e0b66}.dispatch-container .cdp-clock-time{font-feature-settings:"tnum";color:#f1f5f9;font-family:SF Mono,Roboto Mono,Menlo,Consolas,monospace;font-size:24px;font-variant-numeric:tabular-nums;font-weight:700;letter-spacing:-.02em;line-height:1;text-shadow:0 0 12px #a7c3ff2e}.dispatch-container .cdp-clock-period{background:#ffffff14;border-radius:4px;color:#cbd5e1;font-size:10px;font-weight:800;letter-spacing:.1em;padding:1px 5px}.dispatch-container .cdp-clock-caption{color:#94a3b8;font-size:9px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.dispatch-container .cdp-clock-card.is-start .cdp-clock-caption{color:#16a34a}.dispatch-container .cdp-clock-card.is-end .cdp-clock-caption{color:#d97706}.dispatch-container .cdp-clock-track{align-items:center;display:flex;height:60px;justify-content:center;min-width:70px;position:relative}.dispatch-container .cdp-clock-track-line{background:linear-gradient(90deg,#10b981,#6366f1 50%,#f59e0b);border-radius:999px;box-shadow:0 1px 2px #6366f12e;height:4px;left:4px;position:absolute;right:4px;top:50%;transform:translateY(-50%)}.dispatch-container .cdp-clock-track-dot{border-radius:50%;height:11px;position:absolute;top:50%;transform:translateY(-50%);width:11px;z-index:1}.dispatch-container .cdp-clock-track-dot.is-start{background:#10b981;box-shadow:0 0 0 2px #fff,0 0 0 5px #10b98140;left:0}.dispatch-container .cdp-clock-track-dot.is-end{background:#f59e0b;box-shadow:0 0 0 2px #fff,0 0 0 5px #f59e0b40;right:0}.dispatch-container .cdp-clock-duration{align-items:center;background:#fff;border:1px solid #6366f133;border-radius:12px;box-shadow:0 4px 12px #0f172a14,0 1px 3px #6366f11f;display:inline-flex;flex-direction:column;gap:0;min-width:56px;padding:6px 10px 5px;position:relative;white-space:nowrap;z-index:2}.dispatch-container .cdp-clock-duration-icon{align-items:center;background:linear-gradient(135deg,#6366f1,#4338ca);border-radius:50%;box-shadow:0 2px 4px #6366f159;color:#fff;display:inline-flex;font-size:12px;height:20px;justify-content:center;margin-bottom:3px;width:20px}.dispatch-container .cdp-clock-duration-val{font-feature-settings:"tnum";color:#0f172a;font-size:14px;font-variant-numeric:tabular-nums;font-weight:800;letter-spacing:-.01em;line-height:1.1}.dispatch-container .cdp-clock-duration-sub{color:#94a3b8;font-size:8px;font-weight:800;letter-spacing:.1em;margin-top:1px;text-transform:uppercase}.dispatch-container .cdp-timing-stats{grid-gap:10px;display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));margin-top:12px}.dispatch-container .cdp-timing-stat{background:#fff;border:1px solid #0f172a12;border-radius:12px;display:flex;flex-direction:column;gap:10px;padding:12px;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.dispatch-container .cdp-timing-stat:hover{border-color:#6366f14d;box-shadow:0 4px 12px #6366f11a;transform:translateY(-1px)}.dispatch-container .cdp-timing-stat-head{align-items:center;display:flex;gap:10px}.dispatch-container .cdp-timing-stat-icon{align-items:center;background:linear-gradient(135deg,#6366f126,#4338ca1a);border-radius:10px;box-shadow:inset 0 0 0 1px #6366f11f;color:#4338ca;display:inline-flex;flex-shrink:0;font-size:20px;height:36px;justify-content:center;width:36px}.dispatch-container .cdp-timing-stat-body{display:flex;flex-direction:column;gap:1px;min-width:0}.dispatch-container .cdp-timing-stat-value{font-feature-settings:"tnum";color:#0f172a;font-size:18px;font-variant-numeric:tabular-nums;font-weight:800;letter-spacing:-.02em;line-height:1.1}.dispatch-container .cdp-timing-stat-unit{color:#94a3b8;font-size:11px;font-weight:700;margin-left:3px}.dispatch-container .cdp-timing-stat-label{color:#94a3b8;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.dispatch-container .cdp-timing-stat-viz{align-items:center;border-top:1px dashed #0f172a14;display:flex;gap:6px;padding-top:8px}.dispatch-container .cdp-timing-stat-viz-label{color:#94a3b8;font-size:10px;font-weight:700;margin-left:auto;white-space:nowrap}.dispatch-container .cdp-stops-dots{flex-wrap:wrap}.dispatch-container .cdp-stop-dot{background:linear-gradient(135deg,#6366f1,#4338ca);border-radius:50%;box-shadow:0 1px 2px #6366f14d;flex-shrink:0;height:6px;width:6px}.dispatch-container .cdp-speed-gauge{align-items:stretch;flex-direction:column;gap:4px}.dispatch-container .cdp-speed-gauge-track{background:#0f172a0f;border-radius:999px;height:6px;overflow:hidden;position:relative}.dispatch-container .cdp-speed-gauge-fill{background:linear-gradient(90deg,#10b981,#6366f1 60%,#f59e0b);border-radius:999px;box-shadow:0 1px 3px #6366f14d;height:100%;transition:width .4s cubic-bezier(.4,0,.2,1)}.dispatch-container .cdp-speed-gauge-scale{font-feature-settings:"tnum";color:#94a3b8;display:flex;font-size:9px;font-variant-numeric:tabular-nums;font-weight:700;justify-content:space-between;letter-spacing:.04em}.dispatch-container .cdp-highlights{display:flex;flex-direction:column;gap:10px}.dispatch-container .cdp-highlight{align-items:stretch;background:#fff;border:1px solid #0f172a12;border-radius:12px;cursor:pointer;display:flex;overflow:hidden;padding:0;position:relative;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}.dispatch-container .cdp-highlight:hover{box-shadow:0 6px 16px #0f172a14;transform:translateX(2px)}.dispatch-container .cdp-highlight-rail{align-self:stretch;flex-shrink:0;width:4px}.dispatch-container .cdp-highlight-content{display:flex;flex:1 1;flex-direction:column;gap:8px;min-width:0;padding:12px 14px}.dispatch-container .cdp-highlight.is-best{background:linear-gradient(90deg,#10b98112,#fff 65%);border-color:#10b98147}.dispatch-container .cdp-highlight.is-best:hover{border-color:#10b98180}.dispatch-container .cdp-highlight.is-best .cdp-highlight-rail{background:linear-gradient(180deg,#10b981,#16a34a)}.dispatch-container .cdp-highlight.is-worst{background:linear-gradient(90deg,#ef444412,#fff 65%);border-color:#ef444447}.dispatch-container .cdp-highlight.is-worst:hover{border-color:#ef444480}.dispatch-container .cdp-highlight.is-worst .cdp-highlight-rail{background:linear-gradient(180deg,#ef4444,#dc2626)}.dispatch-container .cdp-highlight-top{align-items:center;display:flex;gap:8px;justify-content:space-between}.dispatch-container .cdp-highlight-label{align-items:center;display:inline-flex;font-size:11px;font-weight:800;gap:6px;letter-spacing:.06em;min-width:0;text-transform:uppercase}.dispatch-container .cdp-highlight.is-best .cdp-highlight-label{color:#16a34a}.dispatch-container .cdp-highlight.is-worst .cdp-highlight-label{color:#dc2626}.dispatch-container .cdp-highlight-chip{align-items:center;border-radius:7px;color:#fff;display:inline-flex;flex-shrink:0;font-size:14px;height:22px;justify-content:center;width:22px}.dispatch-container .cdp-highlight.is-best .cdp-highlight-chip{background:linear-gradient(135deg,#10b981,#16a34a);box-shadow:0 1px 3px #10b98159}.dispatch-container .cdp-highlight.is-worst .cdp-highlight-chip{background:linear-gradient(135deg,#ef4444,#dc2626);box-shadow:0 1px 3px #ef444459}.dispatch-container .cdp-highlight-step-chip{align-items:center;border-radius:999px;box-shadow:0 1px 3px #0f172a26;color:#fff;display:inline-flex;flex-shrink:0;font-size:10px;font-weight:800;letter-spacing:.05em;padding:3px 9px;text-transform:uppercase}.dispatch-container .cdp-highlight-title{color:#0f172a;font-size:15px;font-weight:700;letter-spacing:-.01em;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cdp-highlight-meta{align-items:center;display:flex;flex-wrap:wrap;gap:6px}.dispatch-container .cdp-highlight-pill{font-feature-settings:"tnum";align-items:center;border-radius:999px;display:inline-flex;font-size:11px;font-variant-numeric:tabular-nums;font-weight:800;letter-spacing:.01em;padding:3px 9px}.dispatch-container .cdp-highlight-pill.is-bad{background:#ef44441f;color:#dc2626}.dispatch-container .cdp-highlight-pill.is-good{background:#10b9811f;color:#16a34a}.dispatch-container .cdp-trips{display:flex;flex-direction:column;gap:8px}.dispatch-container .cdp-trip{background:#fff;border:1px solid #0f172a12;border-left:3px solid #6366f199;border-radius:10px;display:flex;flex-direction:column;gap:6px;padding:10px 12px}.dispatch-container .cdp-trip-head{align-items:center;display:flex;gap:8px;justify-content:space-between}.dispatch-container .cdp-trip-badge{align-items:center;background:#6366f11f;border-radius:999px;color:#4338ca;display:inline-flex;font-size:10px;font-weight:800;letter-spacing:.05em;padding:2px 8px;text-transform:uppercase}.dispatch-container .cdp-trip-meta{color:#64748b;font-size:11px;font-weight:700}.dispatch-container .cdp-trip-stats{display:flex;flex-wrap:wrap;gap:6px 14px}.dispatch-container .cdp-trip-stats span{align-items:center;color:#475569;display:inline-flex;font-size:12px;font-weight:700;gap:4px}.dispatch-container .cdp-trip-stats span svg{color:#94a3b8;font-size:13px}.dispatch-container .cdp-trip-stats span small{color:#94a3b8;font-size:10px;font-weight:700}.dispatch-container .cdp-trip-stats span.is-over,.dispatch-container .cdp-trip-stats span.is-over svg{color:#dc2626}.dispatch-container .cdp-section-head-clickable{cursor:pointer;-webkit-user-select:none;user-select:none}.dispatch-container .cdp-section-head-clickable:hover .cdp-section-title{color:#4338ca}.dispatch-container .cdp-seq-status{border-radius:999px;flex-shrink:0;font-size:12px;font-weight:800;letter-spacing:.05em;padding:3px 10px;text-transform:uppercase}.dispatch-container .cdp-seq-status.is-good{background:#10b9811f;color:#16a34a}.dispatch-container .cdp-seq-status.is-warn{background:#ef44441f;color:#dc2626}.dispatch-container .cdp-seq-toggle{align-items:center;color:#94a3b8;display:inline-flex;font-size:18px;justify-content:center;transition:transform .22s cubic-bezier(.4,0,.2,1)}.dispatch-container .cdp-seq-toggle.is-open{color:#4338ca;transform:rotate(180deg)}.dispatch-container .cdp-seq{animation:cdp-seq-in .22s cubic-bezier(.4,0,.2,1);background:#fff;border:1px solid #0f172a12;border-radius:10px;display:flex;flex-direction:column;gap:10px;padding:12px}@keyframes cdp-seq-in{0%{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}.dispatch-container .cdp-seq-diffs{display:flex;flex-direction:column;gap:6px;list-style:none;margin:4px 0 0;padding:0}.dispatch-container .cdp-seq-diff{align-items:center;background:linear-gradient(180deg,#fef2f2,#fff);border:1px solid #ef444433;border-radius:8px;cursor:pointer;display:flex;gap:10px;padding:8px 10px;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}.dispatch-container .cdp-seq-diff:hover{box-shadow:0 3px 10px #ef44441f;transform:translateX(2px)}.dispatch-container .cdp-seq-diff.is-focused{border-color:#ef444499;box-shadow:0 3px 12px #ef444433}.dispatch-container .cdp-seq-diff-num{align-items:center;border-radius:50%;box-shadow:0 0 0 2px #ffffffb3,0 1px 3px #0f172a26;color:#fff;display:inline-flex;flex-shrink:0;font-size:14px;font-weight:800;height:30px;justify-content:center;width:30px}.dispatch-container .cdp-seq-diff-body{display:flex;flex:1 1;flex-direction:column;gap:2px;min-width:0}.dispatch-container .cdp-seq-diff-title{color:#0f172a;font-size:14px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cdp-seq-diff-sub{color:#64748b;font-size:13px;font-weight:600}.dispatch-container .cdp-seq-diff-tag{background:#ef44441f;border-radius:999px;color:#dc2626;flex-shrink:0;font-size:13px;font-weight:800;padding:3px 10px}.dispatch-container .cdp-seq-good{align-items:center;background:#10b98114;border-radius:8px;color:#16a34a;display:inline-flex;font-size:14px;font-weight:700;gap:6px;padding:6px 10px}.dispatch-container .cdp-seq-good svg{font-size:18px}.dispatch-container .cdp-seq-diff.is-group{background:linear-gradient(180deg,#eef2ff,#fff);border-color:#6366f14d;padding-right:40px;position:relative}.dispatch-container .cdp-seq-diff.is-group:hover{border-color:#6366f18c;box-shadow:0 3px 10px #6366f126}.dispatch-container .cdp-seq-diff.is-group.is-expanded{background:linear-gradient(180deg,#e0e7ff,#f5f7ff);border-bottom-left-radius:0;border-bottom-right-radius:0;border-color:#6366f199}.dispatch-container .cdp-seq-group-num{align-items:center;display:inline-flex;flex-shrink:0;height:30px;justify-content:center;position:relative;width:30px}.dispatch-container .cdp-seq-group-num-bg{border-radius:8px;box-shadow:0 0 0 2px #ffffffb3,0 1px 3px #0f172a26;inset:0;position:absolute}.dispatch-container .cdp-seq-group-num-label{color:#fff;font-size:13px;font-weight:800;letter-spacing:-.01em;position:relative;text-shadow:0 1px 2px #00000040}.dispatch-container .cdp-seq-group-delta{align-items:center;background:#6366f126;border-radius:999px;color:#4338ca;display:inline-flex;font-size:13px;font-weight:800;margin-left:4px;padding:2px 8px;vertical-align:1px}.dispatch-container .cdp-seq-group-toggle{align-items:center;background:#ffffffb3;border-radius:6px;color:#4338ca;display:inline-flex;font-size:18px;height:22px;justify-content:center;pointer-events:none;position:absolute;right:12px;top:50%;transform:translateY(-50%);transition:transform .22s cubic-bezier(.4,0,.2,1);width:22px}.dispatch-container .cdp-seq-group-toggle.is-open{background:#6366f12e;transform:translateY(-50%) rotate(180deg)}.dispatch-container .cdp-seq-group-children-wrap{animation:cdp-seq-group-in .22s cubic-bezier(.4,0,.2,1);background:#6366f10d;border-bottom:1px solid #6366f133;border-bottom-left-radius:10px;border-bottom-right-radius:10px;border-left:2px solid #6366f159;border-right:1px solid #6366f133;list-style:none;margin:-2px 0 0 4px;padding:0}@keyframes cdp-seq-group-in{0%{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}.dispatch-container .cdp-seq-group-children{display:flex;flex-direction:column;gap:4px;list-style:none;margin:0;padding:8px 8px 8px 14px}.dispatch-container .cdp-seq-diff.is-nested{background:#fff;border-color:#6366f126;border-radius:8px;padding:6px 8px}.dispatch-container .cdp-seq-diff.is-nested .cdp-seq-diff-num{font-size:13px;height:26px;width:26px}.dispatch-container .cdp-seq-diff.is-nested .cdp-seq-diff-title{font-size:13.5px}.dispatch-container .cdp-seq-diff.is-nested .cdp-seq-diff-sub{font-size:12.5px}.dispatch-container .cdp-seq-diff.is-nested .cdp-seq-diff-tag{font-size:12px;padding:2px 8px}.dispatch-container .compare-data-panel.cdp-is-mobile{border-radius:0}.dispatch-container .compare-data-panel.cdp-is-mobile .cdp-timing-clock{gap:14px;grid-template-columns:1fr}.dispatch-container .compare-data-panel.cdp-is-mobile .cdp-clock-track{height:48px;min-width:0}.dispatch-container .compare-data-panel.cdp-is-mobile .cdp-timing-stats{grid-template-columns:1fr}.dispatch-container .rcard-est-meters{align-items:center;background:#3b82f614;background:var(--accent-soft,#3b82f614);border-radius:6px;color:#3b82f6;color:var(--accent,#3b82f6);display:inline-flex;font-size:11px;font-weight:700;gap:3px;padding:2px 8px}.dispatch-container .zone-order-chip.est-meters-chip{background:#2563eb14;border-color:#2563eb33;color:#2563eb}.dispatch-container .pu-distance-chip.pu-est-meters{background:#2563eb14;border-color:#2563eb33}.dispatch-container .pu-distance-chip.pu-est-meters .pu-distance-icon{color:#2563eb}.dispatch-container .pu-distance-chip.pu-est-meters .pu-distance-value{color:#2563eb;font-weight:700}.dispatch-container #dispatch-top-tabs{align-items:center;background:#0000;display:inline-flex;flex-shrink:0;gap:4px;padding:0}.dispatch-container #dispatch-top-tabs.dtt-inline{margin-right:4px}.dispatch-container .dtt-tab{align-items:center;background:#fff;background:var(--bg);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:999px;color:#64748b;color:var(--text-muted);cursor:pointer;display:inline-flex;font-size:12px;font-weight:700;gap:6px;line-height:1;padding:6px 12px;transition:color .15s,background .15s,border-color .15s}.dispatch-container .dtt-tab:hover{background:#f8fafc;background:var(--bg-sub);color:#1e293b;color:var(--text)}.dispatch-container .dtt-tab.active{background:#3b82f6;background:var(--accent);border-color:#3b82f6;border-color:var(--accent);box-shadow:0 2px 6px #3b82f640;color:#fff}.dispatch-container .dtt-icon{align-items:center;display:inline-flex;font-size:14px}.dispatch-container #dispatch-analysis{background:#f8fafc;display:flex;flex:1 1;flex-direction:column;gap:18px;overflow:auto;padding:20px}.dispatch-container .da-intro-title{color:#1e293b;color:var(--text);font-size:16px;font-weight:700;margin-bottom:4px}.dispatch-container .da-intro-sub{color:#64748b;color:var(--text-muted);font-size:12.5px;line-height:1.5}.dispatch-container .da-code{background:#eef2ff;border-radius:4px;color:#4f46e5;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;margin:0 4px;padding:1px 6px}.dispatch-container .da-picker-row{grid-gap:12px;display:grid;gap:12px;grid-template-columns:repeat(3,minmax(0,1fr))}@media (max-width:720px){.dispatch-container .da-picker-row{grid-template-columns:1fr}}.dispatch-container .da-picker{background:#fff;border:1px solid #e2e8f0;border-radius:12px;cursor:pointer;font-family:inherit;padding:14px;text-align:left;transition:box-shadow .15s,transform .15s,border-color .15s}.dispatch-container .da-picker:hover:not(.is-loading){box-shadow:0 4px 14px -6px #0f172a26;transform:translateY(-1px)}.dispatch-container .da-picker.is-loading{cursor:wait;opacity:.7}.dispatch-container .da-picker-head{align-items:center;display:flex;gap:10px;margin-bottom:6px}.dispatch-container .da-picker-badge{align-items:center;border-radius:8px;display:inline-flex;font-size:13px;font-weight:800;height:32px;justify-content:center;width:32px}.dispatch-container .da-picker-meta{flex:1 1;min-width:0}.dispatch-container .da-picker-name{color:#1e293b;color:var(--text);font-size:14px;font-weight:700;line-height:1.2}.dispatch-container .da-picker-range{color:#64748b;color:var(--text-muted);font-size:11px}.dispatch-container .da-picker-status{border-radius:12px;flex-shrink:0;font-size:10.5px;font-weight:700;padding:4px 8px}.dispatch-container .da-picker-sub{color:#64748b;color:var(--text-muted);font-size:11.5px}.dispatch-container .da-empty{background:#fff;border:1px dashed #cbd5e1;border-radius:12px;color:#94a3b8;font-size:13px;padding:40px;text-align:center}.dispatch-container .da-result-row{grid-gap:14px;align-items:stretch;display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}.dispatch-container .da-result-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;border-top:4px solid #6366f1;display:flex;flex-direction:column;gap:12px;padding:16px}.dispatch-container .da-result-head{align-items:center;display:flex;justify-content:space-between}.dispatch-container .da-result-title{color:#1e293b;color:var(--text);font-size:15px;font-weight:700}.dispatch-container .da-result-sub{color:#64748b;color:var(--text-muted);font-size:11.5px}.dispatch-container .da-result-refresh{align-items:center;border:none;border-radius:8px;cursor:pointer;display:inline-flex;font-size:16px;height:30px;justify-content:center;transition:filter .15s;width:30px}.dispatch-container .da-result-refresh:hover{filter:brightness(.95)}.dispatch-container .da-result-refresh:disabled{cursor:wait;opacity:.5}.dispatch-container .da-detail-actions{align-items:center;display:inline-flex;gap:10px}.dispatch-container .da-live-tag{align-items:center;background:#ecfdf5;border:1px solid #a7f3d0;border-radius:999px;color:#166534;display:inline-flex;font-size:11px;font-weight:700;gap:6px;letter-spacing:.02em;padding:4px 9px 4px 8px;transition:background .15s,color .15s,border-color .15s;-webkit-user-select:none;user-select:none}.dispatch-container .da-live-tag.is-active{background:#fffbeb;border-color:#fde68a;color:#92400e}.dispatch-container .da-live-dot{animation:da-live-pulse 1.8s ease-in-out infinite;background:#10b981;border-radius:50%;box-shadow:0 0 0 2px #10b9812e;height:7px;width:7px}.dispatch-container .da-live-tag.is-active .da-live-dot{animation:da-live-pulse .9s ease-in-out infinite;background:#f59e0b;box-shadow:0 0 0 2px #f59e0b38}@keyframes da-live-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.85)}}.dispatch-container .da-metric-grid{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}.dispatch-container .da-metric{background:#f8fafc;border:1px solid #eef2f6;border-radius:8px;padding:8px 10px}.dispatch-container .da-metric-label{color:#94a3b8;font-size:10px;font-weight:700;letter-spacing:.4px;margin-bottom:2px;text-transform:uppercase}.dispatch-container .da-metric-value{color:#1e293b;color:var(--text);font-size:14px;font-weight:800;line-height:1.3}.dispatch-container .da-riders-label{color:#475569;font-size:11px;font-weight:700;letter-spacing:.4px;margin-bottom:6px;text-transform:uppercase}.dispatch-container .da-riders-list{display:flex;flex-direction:column;gap:4px}.dispatch-container .da-rider-row{align-items:center;background:#f8fafc;border:1px solid #eef2f6;border-radius:6px;display:flex;justify-content:space-between;padding:5px 10px}.dispatch-container .da-rider-name{align-items:center;color:#1e293b;color:var(--text);display:inline-flex;font-size:12px;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .da-rider-stat{color:#64748b;color:var(--text-muted);flex-shrink:0;font-size:11px}.dispatch-container .da-error{background:#fef2f2;border:1px solid #fecaca;border-radius:8px;color:#991b1b;display:flex;flex-direction:column;gap:4px;padding:12px}.dispatch-container .da-error-title{align-items:center;color:#b91c1c;display:inline-flex;font-size:12.5px;font-weight:800;gap:6px;letter-spacing:.3px;text-transform:uppercase}.dispatch-container .da-error-msg{color:#7f1d1d;font-size:13px;line-height:1.5}.dispatch-container .da-error-meta{color:#b45353;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px}.dispatch-container .da-detail{display:flex;flex-direction:column;gap:16px}.dispatch-container .da-detail-head{align-items:center;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;border-top:4px solid #6366f1;display:flex;justify-content:space-between;padding:14px 16px}.dispatch-container .da-detail-title{color:#1e293b;color:var(--text);font-size:16px;font-weight:800;text-transform:capitalize}.dispatch-container .da-detail-sub-inline{color:#64748b;color:var(--text-muted);font-size:12.5px;font-weight:600;margin-left:6px}.dispatch-container .da-detail-sub{color:#64748b;color:var(--text-muted);font-size:11.5px;margin-top:2px}.dispatch-container .da-section{background:#fff;border:1px solid #e2e8f0;border-radius:12px;display:flex;flex-direction:column;gap:10px;padding:14px}.dispatch-container .da-section-label{color:#475569;font-size:12px;font-weight:800;letter-spacing:.4px;text-transform:uppercase}.dispatch-container .da-section-count{color:#94a3b8;font-weight:700;margin-left:4px}.dispatch-container .da-metric-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}@media (max-width:720px){.dispatch-container .da-metric-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}}.dispatch-container .da-rec{background:linear-gradient(135deg,#eef2ff,#f0fdf4);border:1px solid #c7d2fe;border-radius:10px;display:flex;flex-direction:column;gap:8px;padding:12px 14px}.dispatch-container .da-rec.da-rec-empty{background:#f8fafc;border:1px dashed #e2e8f0;color:#64748b}.dispatch-container .da-rec.da-rec-empty .da-rec-action{color:#64748b;font-weight:500;letter-spacing:0;text-transform:none}.dispatch-container .da-rec-head{align-items:center;display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between}.dispatch-container .da-rec-action{align-items:center;color:#4338ca;display:inline-flex;font-size:13px;font-weight:800;gap:6px;text-transform:capitalize}.dispatch-container .da-rec-improve{border-radius:14px;font-size:11.5px;font-weight:700;padding:4px 10px}.dispatch-container .da-rec-line{color:#1e293b;color:var(--text);font-size:13px;line-height:1.5}.dispatch-container .da-rec-desc{color:#475569;font-size:12.5px;line-height:1.55}.dispatch-container .da-rec-desc,.dispatch-container .da-rec-rules{background:#fff;border:1px solid #e0e7ff;border-radius:8px;padding:8px 10px}.dispatch-container .da-rec-rules{display:flex;flex-direction:column;gap:4px}.dispatch-container .da-rec-rules-head{color:#475569;font-size:11px;font-weight:700;letter-spacing:.3px;margin-bottom:2px;text-transform:uppercase}.dispatch-container .da-rec-rule{color:#334155;font-size:12px}.dispatch-container .da-rec-rule code{background:#f1f5f9;border-radius:4px;color:#1e293b;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;padding:2px 6px}.dispatch-container .da-rec-rule-why{color:#64748b;color:var(--text-muted);font-size:11.5px}.dispatch-container .da-timeline-list{grid-gap:10px;display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.dispatch-container .da-timeline-card{background:#f8fafc;border:1px solid #eef2f6;border-radius:10px;display:flex;flex-direction:column;gap:8px;padding:10px 12px}.dispatch-container .da-timeline-top{align-items:center;display:flex;gap:8px;justify-content:space-between}.dispatch-container .da-timeline-name{align-items:center;color:#1e293b;color:var(--text);display:inline-flex;font-size:13px;font-weight:700;gap:6px;min-width:0}.dispatch-container .da-timeline-id{color:#64748b;color:var(--text-muted);font-size:10.5px;font-weight:600}.dispatch-container .da-pill{border-radius:12px;font-size:10.5px;font-weight:800;letter-spacing:.3px;padding:3px 9px;text-transform:uppercase}.dispatch-container .da-pill.is-active{background:#dcfce7;color:#166534}.dispatch-container .da-pill.is-idle{background:#fef3c7;color:#92400e}.dispatch-container .da-timeline-mid{display:flex;flex-wrap:wrap;gap:6px}.dispatch-container .da-chip{align-items:center;background:#fff;border:1px solid #e2e8f0;border-radius:12px;color:#334155;display:inline-flex;font-size:11px;font-weight:600;gap:4px;padding:3px 8px}.dispatch-container .da-chip.da-chip-link{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8;cursor:pointer;font-family:inherit;text-decoration:none;transition:background .15s ease,border-color .15s ease,color .15s ease,transform .1s ease}.dispatch-container .da-chip.da-chip-link:hover{background:#dbeafe;border-color:#93c5fd;color:#1e40af}.dispatch-container .da-chip.da-chip-link:active{transform:scale(.98)}.dispatch-container .da-chip.da-chip-link:focus-visible{outline:2px solid #3b82f6;outline-offset:1px}.dispatch-container .da-pos-modal-backdrop{align-items:center;animation:da-pos-fade .18s ease;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);background:#0f172a8c;display:flex;inset:0;justify-content:center;padding:24px;position:fixed;z-index:2000}@keyframes da-pos-fade{0%{opacity:0}to{opacity:1}}.dispatch-container .da-pos-modal-card{animation:da-pos-rise .22s cubic-bezier(.16,1,.3,1);background:#fff;border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 24px 60px #0f172a47,0 8px 24px #0f172a1f;display:flex;flex-direction:column;overflow:hidden;width:min(720px,100%)}@keyframes da-pos-rise{0%{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.dispatch-container .da-pos-modal-head{align-items:center;background:linear-gradient(135deg,#66258208,#9255ab14);border-bottom:1px solid #eef2f6;display:flex;flex:0 0 auto;gap:12px;justify-content:space-between;padding:14px 18px}.dispatch-container .da-pos-modal-title-wrap{align-items:center;display:flex;gap:12px;min-width:0}.dispatch-container .da-pos-modal-avatar{align-items:center;border-radius:12px;display:inline-flex;flex-shrink:0;font-size:22px;height:40px;justify-content:center;width:40px}.dispatch-container .da-pos-modal-title{color:#0f172a;font-size:15.5px;font-weight:800;letter-spacing:-.01em;line-height:1.2}.dispatch-container .da-pos-modal-sub{color:#64748b;font-size:11.5px;font-weight:600;letter-spacing:.01em;margin-top:2px}.dispatch-container .da-pos-modal-actions{align-items:center;display:inline-flex;flex-shrink:0;gap:8px}.dispatch-container .da-pos-modal-close{align-items:center;background:#fff;border:1px solid #e2e8f0;border-radius:10px;color:#475569;cursor:pointer;display:inline-flex;font-size:18px;height:32px;justify-content:center;transition:background .15s,color .15s,border-color .15s,transform .1s;width:32px}.dispatch-container .da-pos-modal-close:hover{background:#fef2f2;border-color:#fecaca;color:#b91c1c}.dispatch-container .da-pos-modal-close:active{transform:scale(.96)}.dispatch-container .da-pos-modal-map{background:#e2e8f0;flex:0 0 auto;height:420px;position:relative;width:100%}.dispatch-container .da-pos-modal-map .leaflet-container{background:#e2e8f0;height:100%!important;width:100%!important;z-index:1}.dispatch-container .da-pos-modal-foot{align-items:center;background:#f8fafc;border-top:1px solid #eef2f6;display:flex;flex:0 0 auto;gap:12px;justify-content:space-between;padding:12px 18px}.dispatch-container .da-pos-modal-coord{font-feature-settings:"tnum";align-items:center;color:#334155;display:inline-flex;font-size:12.5px;font-variant-numeric:tabular-nums;gap:8px}.dispatch-container .da-pos-modal-coord strong{color:#0f172a;font-weight:700}.dispatch-container .da-pos-modal-sep{color:#cbd5e1;margin:0 8px}.dispatch-container .da-pos-modal-copy{background:#662582;border:1px solid #662582;border-radius:999px;color:#fff;cursor:pointer;font-family:inherit;font-size:11.5px;font-weight:700;padding:6px 14px;transition:background .15s,border-color .15s,transform .1s}.dispatch-container .da-pos-modal-copy:hover{background:#4d1c61;border-color:#4d1c61}.dispatch-container .da-pos-modal-copy:active{transform:scale(.97)}.dispatch-container .da-sub-list{display:flex;flex-direction:column;gap:10px}.dispatch-container .da-sub-card{background:#fff;border:1px solid #e2e8f0;border-radius:10px;display:flex;flex-direction:column;gap:8px;padding:12px}.dispatch-container .da-sub-head{align-items:center;display:flex;flex-wrap:wrap;gap:6px;justify-content:space-between}.dispatch-container .da-sub-title{color:#1e293b;color:var(--text);font-size:13px;text-transform:capitalize}.dispatch-container .da-sub-improve{border-radius:12px;font-size:11.5px;font-weight:800;padding:3px 10px}.dispatch-container .da-sub-meta{display:flex;flex-wrap:wrap;gap:6px}.dispatch-container .da-sub-relieved{align-items:center;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;color:#166534;display:inline-flex;font-size:12px;gap:6px;padding:6px 10px}.dispatch-container .da-sub-transfers{background:#f8fafc;border:1px solid #eef2f6;border-radius:8px;display:flex;flex-direction:column;gap:4px;padding:8px 10px}.dispatch-container .da-sub-transfers-head{color:#475569;font-size:11px;font-weight:700;letter-spacing:.3px;margin-bottom:2px;text-transform:uppercase}.dispatch-container .da-transfer-row{grid-gap:8px;align-items:center;border-bottom:1px dashed #e2e8f0;color:#1e293b;color:var(--text);display:grid;font-size:11.5px;gap:8px;grid-template-columns:80px 1fr auto auto;padding:4px 0}.dispatch-container .da-transfer-row:last-child{border-bottom:none}.dispatch-container .da-transfer-id{color:#1e293b;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:800}.dispatch-container .da-transfer-from{color:#64748b;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .da-transfer-time{color:#334155;font-size:11px}.dispatch-container .da-transfer-imp{border-radius:10px;font-size:10.5px;font-weight:800;padding:2px 8px}.dispatch-container .da-hero-row{grid-gap:12px;display:grid;gap:12px;grid-template-columns:repeat(3,1fr)}@media (max-width:900px){.dispatch-container .da-hero-row{grid-template-columns:1fr}}.dispatch-container .da-hero-card{align-items:flex-start;background:#fff;border:1px solid #e2e8f0;border-radius:12px;border-top:3px solid #94a3b8;box-shadow:0 1px 2px #0f172a0a;display:flex;flex-direction:column;gap:4px;min-width:0;padding:18px 18px 16px;position:relative}.dispatch-container .da-hero-icon{align-items:center;border-radius:10px;display:inline-flex;font-size:20px;height:36px;justify-content:center;margin-bottom:4px;width:36px}.dispatch-container .da-hero-value{color:#0f172a;font-size:32px;font-weight:800;letter-spacing:-.02em;line-height:1.05}.dispatch-container .da-hero-unit{color:#64748b;font-size:16px;font-weight:600;margin-left:2px}.dispatch-container .da-hero-label{color:#64748b;font-size:11px;font-weight:700;letter-spacing:.06em;margin-top:2px;text-transform:uppercase}.dispatch-container .da-hero-sub{color:#94a3b8;font-size:12px;font-weight:500;margin-top:6px}.dispatch-container .da-health-row{grid-gap:12px;display:grid;gap:12px;grid-template-columns:1.2fr repeat(3,1fr)}@media (max-width:1100px){.dispatch-container .da-health-row{grid-template-columns:1fr 1fr}}@media (max-width:600px){.dispatch-container .da-health-row{grid-template-columns:1fr}}.dispatch-container .da-health-card{align-items:center;background:#fff;border:1px solid #e2e8f0;border-radius:12px;box-shadow:0 1px 2px #0f172a0a;display:flex;gap:14px;min-width:0;padding:14px 16px}.dispatch-container .da-health-card-stat{align-items:flex-start;flex-direction:column;gap:4px}.dispatch-container .da-health-value{color:#0f172a;font-size:24px;font-weight:800;letter-spacing:-.02em;line-height:1.1}.dispatch-container .da-health-unit{color:#64748b;font-size:13px;font-weight:600;margin-left:2px}.dispatch-container .da-health-label{color:#64748b;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.dispatch-container .da-health-sub{color:#94a3b8;font-size:11.5px;font-weight:500}.dispatch-container .da-health-meta{display:flex;flex-direction:column;gap:4px;min-width:0}.dispatch-container .da-ring{--ring-color:#10b981;--ring-pct:0;align-items:center;background:conic-gradient(var(--ring-color) calc(var(--ring-pct)*1%),#f1f5f9 0);border-radius:50%;display:inline-flex;flex-shrink:0;height:72px;justify-content:center;position:relative;width:72px}.dispatch-container .da-ring:after{background:#fff;border-radius:50%;content:"";inset:6px;position:absolute}.dispatch-container .da-ring-num{color:#0f172a;font-size:18px;font-weight:800;letter-spacing:-.02em;position:relative;z-index:1}.dispatch-container .da-ring-unit{color:#64748b;font-size:11px;font-weight:700;margin-left:1px}.dispatch-container .da-rec-banner{align-items:flex-start;border:1px solid;border-radius:12px;display:flex;gap:14px;padding:14px 16px}.dispatch-container .da-rec-banner.is-action{background:#eff6ff;border-color:#bfdbfe;color:#1e3a8a}.dispatch-container .da-rec-banner.is-warn{background:#fffbeb;border-color:#fde68a;color:#92400e}.dispatch-container .da-rec-banner.is-success{background:#f0fdf4;border-color:#bbf7d0;color:#166534}.dispatch-container .da-rec-banner.is-info{background:#f8fafc;border-color:#e2e8f0;color:#475569}.dispatch-container .da-rec-banner-icon{align-items:center;background:#ffffff8c;border-radius:8px;display:inline-flex;flex:0 0 auto;font-size:18px;height:32px;justify-content:center;width:32px}.dispatch-container .da-rec-banner-body{display:flex;flex:1 1 auto;flex-direction:column;gap:6px;min-width:0}.dispatch-container .da-rec-banner .da-rec-action{align-items:center;color:inherit;display:inline-flex;font-size:14px;font-weight:700;gap:6px;letter-spacing:-.005em;text-transform:capitalize}.dispatch-container .da-rec-banner .da-rec-desc,.dispatch-container .da-rec-banner .da-rec-line{color:inherit;font-size:12.5px;line-height:1.5;opacity:.9}.dispatch-container .da-rec-banner .da-rec-assess{background:#0f172a0a;border-radius:8px;color:inherit;font-size:12px;font-weight:500;line-height:1.55;margin-top:2px;opacity:.95;padding:8px 10px}.dispatch-container .da-section-hint{color:#94a3b8;font-size:11px;font-weight:500;letter-spacing:0;margin-left:10px;text-transform:none}.dispatch-container .da-gantt-axis{align-items:center;color:#64748b;display:flex;font-size:11px;font-weight:600;justify-content:space-between;padding:0 4px 6px}.dispatch-container .da-gantt-axis-mid{color:#94a3b8;font-style:italic;font-weight:500}.dispatch-container .da-gantt-row{align-items:center;display:flex;gap:10px;margin:8px 0 4px}.dispatch-container .da-gantt-track{background:#f1f5f9;border-radius:8px;flex:1 1;height:24px;overflow:hidden;position:relative}.dispatch-container .da-gantt-fill{align-items:center;border-radius:8px;bottom:0;box-shadow:0 1px 0 #0f172a14;color:#fff;display:flex;font-size:10.5px;font-weight:700;justify-content:space-between;letter-spacing:.01em;overflow:hidden;padding:0 8px;position:absolute;top:0;white-space:nowrap}.dispatch-container .da-gantt-fill-end,.dispatch-container .da-gantt-fill-start{flex-shrink:0;text-shadow:0 1px 1px #0f172a2e}.dispatch-container .da-gantt-idle{background-image:repeating-linear-gradient(135deg,#e2e8f0 0 6px,#f1f5f9 6px 12px);border-left:1px dashed #cbd5e1;bottom:0;position:absolute;top:0}.dispatch-container .da-gantt-util{border-radius:6px;flex:0 0 auto;font-size:11.5px;font-weight:800;letter-spacing:.01em;min-width:44px;padding:4px 8px;text-align:center}.dispatch-container .da-conf-dot{border-radius:50%;display:inline-block;flex-shrink:0;height:7px;margin-left:4px;width:7px}.dispatch-container .da-conf-dot.is-ok{background:#10b981;box-shadow:0 0 0 2px #10b9812e}.dispatch-container .da-conf-dot.is-low{background:#f59e0b;box-shadow:0 0 0 2px #f59e0b33}.dispatch-container .da-chip.da-chip-orders{align-items:center;display:inline-flex;gap:8px}.dispatch-container .da-orders-label{color:#0f172a;font-size:11.5px;font-weight:700}.dispatch-container .da-orders-bar{background:#e2e8f0;border-radius:4px;flex-shrink:0;height:6px;overflow:hidden;position:relative;width:56px}.dispatch-container .da-orders-bar-fill{background:linear-gradient(90deg,#10b981,#34d399);border-radius:4px;inset:0;position:absolute;transition:width .3s ease;width:0}.dispatch-container .da-orders-pending{color:#b45309;font-size:10.5px;font-weight:600}@media (max-width:768px){.dispatch-container{height:auto;min-height:calc(100vh - 88px);overflow-x:hidden;overflow-y:auto}.dispatch-container #body{flex-direction:column;overflow:visible}.dispatch-container #map-wrap,.dispatch-container #map-wrap.compare-split{border-radius:0;flex:0 0 auto;height:48vh;margin-right:0;min-height:320px;min-width:0;order:1;width:100%}.dispatch-container #body.sidebar-collapsed #sidebar,.dispatch-container #sidebar{-webkit-overflow-scrolling:touch;border-right:0;border-right-color:#e2e8f0;border-right-color:var(--border);border-top:1px solid #e2e8f0;border-top:1px solid var(--border);flex:1 1 auto;flex-basis:auto;max-height:none;min-width:0;order:2;overflow-y:auto;width:100%}.dispatch-container .sidebar-toggle-tab{display:none}.dispatch-container #hdr{flex-wrap:wrap;gap:8px;height:auto;min-height:42px;padding:8px 16px}.dispatch-container #dispatch-analysis{overflow-y:visible}} \ No newline at end of file +.leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{left:0;position:absolute;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-drag:none;-webkit-user-select:none;user-select:none}.leaflet-tile::selection{background:#0000}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{height:1600px;-webkit-transform-origin:0 0;width:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-height:none!important;max-width:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-height:none!important;max-width:none!important;padding:0;width:auto}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{box-sizing:border-box;height:0;width:0;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{height:1px;width:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{pointer-events:visiblePainted;pointer-events:auto;position:relative;z-index:800}.leaflet-bottom,.leaflet-top{pointer-events:none;position:absolute;z-index:1000}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{clear:both;float:left}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{background:#ffffff80;border:2px dotted #38f}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px #000000a6}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;color:#000;display:block;height:26px;line-height:26px;text-align:center;text-decoration:none;width:26px}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:focus,.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.leaflet-bar a.leaflet-disabled{background-color:#f4f4f4;color:#bbb;cursor:default}.leaflet-touch .leaflet-bar a{height:30px;line-height:30px;width:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px #0006}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);height:36px;width:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{height:44px;width:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{background:#fff;color:#333;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{overflow-x:hidden;overflow-y:scroll;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;line-height:1.4;padding:0 5px}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:focus,.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;height:.6669em;vertical-align:initial!important;width:1em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{background:#fffc;border:2px solid #777;border-top:none;box-sizing:border-box;line-height:1.1;padding:2px 5px 1px;text-shadow:1px 1px #fff;white-space:nowrap}.leaflet-control-scale-line:not(:first-child){border-bottom:none;border-top:2px solid #777;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:2px solid #0003}.leaflet-popup{margin-bottom:20px;position:absolute;text-align:center}.leaflet-popup-content-wrapper{border-radius:12px;padding:1px;text-align:left}.leaflet-popup-content{font-size:13px;font-size:1.08333em;line-height:1.3;margin:13px 24px 13px 20px;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{height:20px;left:50%;margin-left:-20px;margin-top:-1px;overflow:hidden;pointer-events:none;position:absolute;width:40px}.leaflet-popup-tip{height:17px;margin:-10px auto 0;padding:1px;pointer-events:auto;transform:rotate(45deg);width:17px}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px #0006;color:#333}.leaflet-container a.leaflet-popup-close-button{background:#0000;border:none;color:#757575;font:16px/24px Tahoma,Verdana,sans-serif;height:24px;position:absolute;right:0;text-align:center;text-decoration:none;top:0;width:24px}.leaflet-container a.leaflet-popup-close-button:focus,.leaflet-container a.leaflet-popup-close-button:hover{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678,M12=0.70710678,M21=-0.70710678,M22=0.70710678);margin:0 auto;width:24px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{background-color:#fff;border:1px solid #fff;border-radius:3px;box-shadow:0 1px 3px #0006;color:#222;padding:6px;pointer-events:none;position:absolute;-webkit-user-select:none;user-select:none;white-space:nowrap}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{background:#0000;border:6px solid #0000;content:"";pointer-events:none;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{border-top-color:#fff;bottom:0;margin-bottom:-12px}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-left:-6px;margin-top:-12px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;left:0;margin-left:-12px}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}:root{--bg:#fff;--bg-sub:#f8fafc;--bg-card:#fff;--border:#e2e8f0;--border-active:#9255ab;--text:#1e293b;--text-muted:#64748b;--accent:#9255ab;--accent-soft:#9255ab14;--kitchen:#f59e0b;--kitchen-soft:#f59e0b1a;--success:#22c55e;--shadow:0 4px 12px #0000000d;--shadow-lg:0 10px 25px -5px #00000014}.dispatch-container{background:#fff;background:var(--bg);color:#1e293b;color:var(--text);display:flex;flex-direction:column;font-family:Inter,-apple-system,sans-serif;height:calc(100vh - 88px);margin:-24px;overflow:hidden;position:relative;width:calc(100% + 48px)}.dispatch-container.embedded{flex:1 1;height:100%;margin:0;min-height:0;width:100%}.dispatch-container *{box-sizing:border-box;margin:0;padding:0}.dispatch-container #hdr{align-items:center;background:#fff;background:var(--bg);border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border);display:flex;flex-shrink:0;height:56px;justify-content:space-between;padding:0 24px;z-index:1010}.dispatch-container .logo{align-items:center;display:flex;gap:12px}.dispatch-container .logo-badge{align-items:center;background:linear-gradient(135deg,#9255ab,#2563eb);border-radius:8px;color:#fff;display:flex;font-size:14px;font-weight:800;height:32px;justify-content:center;width:32px}.dispatch-container .logo-name{color:#1e293b;color:var(--text);font-size:18px;font-weight:800;letter-spacing:-.02em}.dispatch-container .logo-name em{color:#9255ab;color:var(--accent);font-style:normal;opacity:.8}.dispatch-container .logo-city-wrap{display:inline-block;position:relative}.dispatch-container .logo-city{align-items:center;background:#7b1fa214;border:1px solid #7b1fa240;border-radius:999px;color:#7b1fa2;cursor:pointer;display:inline-flex;font-family:inherit;font-size:11px;font-weight:700;gap:6px;letter-spacing:.02em;line-height:1;padding:4px 8px 4px 10px;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}.dispatch-container .logo-city:hover{background:#7b1fa224;border-color:#7b1fa273}.dispatch-container .logo-city.open{background:#7b1fa22e;border-color:#7b1fa28c;box-shadow:0 4px 12px #7b1fa22e}.dispatch-container .logo-city svg{flex-shrink:0;font-size:13px}.dispatch-container .logo-city-caret{font-size:15px;transition:transform .2s ease}.dispatch-container .logo-city.open .logo-city-caret{transform:rotate(180deg)}.dispatch-container .logo-city-text{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .logo-city-menu{animation:logo-city-menu-in .14s ease-out;background:#fff;border:1px solid #7b1fa22e;border-radius:12px;box-shadow:0 16px 36px #0f172a29;left:0;max-height:320px;min-width:200px;overflow-y:auto;padding:6px;position:absolute;top:calc(100% + 6px);z-index:1000}@keyframes logo-city-menu-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.dispatch-container .logo-city-menu::-webkit-scrollbar{width:6px}.dispatch-container .logo-city-menu::-webkit-scrollbar-thumb{background:#7b1fa24d;border-radius:999px}.dispatch-container .logo-city-option{align-items:center;background:#0000;border:0;border-radius:8px;color:#1e293b;cursor:pointer;display:flex;font-family:inherit;font-size:12px;font-weight:600;gap:8px;padding:8px 10px;text-align:left;transition:background .12s ease;width:100%}.dispatch-container .logo-city-option:hover{background:#7b1fa20f}.dispatch-container .logo-city-option.active{background:#7b1fa21a;color:#7b1fa2}.dispatch-container .logo-city-option-icon{color:#7b1fa2;flex-shrink:0;font-size:14px}.dispatch-container .logo-city-option span:not(.logo-city-option-check){flex:1 1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .logo-city-option-check{color:#7b1fa2;flex-shrink:0;font-weight:800}.dispatch-container .hdr-sep{background:#e2e8f0;background:var(--border);height:20px;margin:0 4px;width:1px}.dispatch-container .hdr-meta{color:#64748b;color:var(--text-muted);font-size:12px;font-weight:500}.dispatch-container #clock{background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:10px;color:#1e293b;color:var(--text);font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600;padding:7px 16px}.dispatch-container .hdr-stats{align-items:center;display:flex;flex-wrap:nowrap;gap:16px;margin-left:auto;margin-right:16px;min-width:0}.dispatch-container #strat-row{border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border);display:flex;flex-shrink:0;height:54px;padding:0 24px}.dispatch-container #strat-row,.dispatch-container .sbt{align-items:center;background:#fff;background:var(--bg);gap:8px}.dispatch-container .sbt{border:1px solid #0f172a14;border-radius:10px;color:#64748b;color:var(--text-muted);cursor:pointer;display:inline-flex;font-family:inherit;font-size:13px;font-weight:600;line-height:1;padding:8px 14px;transition:all .2s cubic-bezier(.4,0,.2,1)}.dispatch-container .sbt:hover{background:#f8fafc;background:var(--bg-sub);border-color:#64748b;border-color:var(--text-muted);color:#1e293b;color:var(--text)}.dispatch-container .sbt.active{background:#9255ab;background:var(--accent);border-color:#9255ab;border-color:var(--accent);box-shadow:0 4px 12px #9255ab40;color:#fff}.dispatch-container .sbt .sbt-icon{align-items:center;color:inherit;display:inline-flex;flex-shrink:0;font-size:18px;height:18px;justify-content:center;line-height:1;width:18px}.dispatch-container .sbt .sbt-icon svg{display:block;height:1em;vertical-align:middle;width:1em}.dispatch-container .strat-stats{align-items:center;border-left:1px solid #e2e8f0;border-left:1px solid var(--border);display:inline-flex;gap:8px;height:32px;margin-left:8px;padding-left:12px}.dispatch-container .strat-stats.strat-stats-right{border-left:none;margin-left:auto;padding-left:0}.dispatch-container .strat-stat{align-items:center;background:#fff;background:var(--bg);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:999px;color:#1e293b;color:var(--text);display:inline-flex;font-size:12px;font-weight:700;gap:8px;line-height:1;padding:7px 15px;transition:all .15s ease;white-space:nowrap}.dispatch-container .strat-stat-icon{font-size:13px;line-height:1}.dispatch-container .strat-stat-label{color:#64748b;color:var(--text-muted);font-size:10px;font-weight:700;letter-spacing:.05em;text-transform:uppercase}.dispatch-container .strat-stat-value{font-size:13px;font-weight:800}.dispatch-container .strat-stat-orders{background:#9255ab14;background:var(--accent-soft);border-color:#9255ab40}.dispatch-container .strat-stat-orders .strat-stat-value{color:#9255ab;color:var(--accent)}.dispatch-container .strat-stat-profit{background:#22c55e1a;border-color:#22c55e4d}.dispatch-container .strat-stat-profit .strat-stat-label,.dispatch-container .strat-stat-profit .strat-stat-value{color:#22c55e;color:var(--success)}.dispatch-container .strat-stat-loss{background:#ef44441a;border-color:#ef444459}.dispatch-container .strat-stat-loss .strat-stat-label,.dispatch-container .strat-stat-loss .strat-stat-value{color:#dc2626}.dispatch-container .live-controls{align-items:center;display:flex;gap:12px;margin-left:auto}.dispatch-container .live-status{align-items:center;background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:999px;color:#64748b;color:var(--text-muted);display:inline-flex;font-size:12px;font-weight:600;gap:8px;padding:7px 15px}.dispatch-container .live-status-ready{color:#22c55e;color:var(--success)}.dispatch-container .live-status-error{color:#ef4444}.dispatch-container .live-status-sub{color:#64748b;color:var(--text-muted);font-size:11px;font-weight:500;opacity:.85}.dispatch-container .live-dot{animation:live-pulse 1.2s ease-in-out infinite;background:#9255ab;background:var(--accent);border-radius:50%;height:8px;width:8px}.dispatch-container .live-dot.ready{animation:none;background:#22c55e;background:var(--success)}.dispatch-container .live-dot.error{animation:none;background:#ef4444}@keyframes live-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.85)}}.dispatch-container .date-chip{align-items:stretch;background:#fff;border:1px solid #0f172a14;border-radius:12px;box-shadow:0 1px 2px #0f172a0a,0 4px 12px #0f172a0f;display:inline-flex;gap:0;position:relative;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.dispatch-container .date-chip.is-open{border-color:#662582;box-shadow:0 0 0 3px #66258233,0 12px 30px #66258238}.dispatch-container .date-chip:hover{border-color:#66258273;box-shadow:0 2px 4px #0f172a0f,0 8px 22px #66258226;transform:translateY(-1px)}.dispatch-container .date-chip:focus-within{border-color:#662582;box-shadow:0 0 0 3px #66258233,0 8px 22px #66258238}.dispatch-container .date-chip-main{align-items:center;-webkit-appearance:none;appearance:none;background:#0000;border:0;color:inherit;cursor:pointer;display:inline-flex;font:inherit;gap:10px;min-width:0;padding:8px 18px;position:relative;text-align:left}.dispatch-container .date-chip-main:focus{outline:none}.dispatch-container .date-chip-main:hover{background:#6625820a}.dispatch-container .date-chip-icon{align-items:center;background:linear-gradient(135deg,#eef2ff,#e0e7ff);border-radius:8px;color:#4d1c61;display:inline-flex;flex-shrink:0;font-size:15px;height:28px;justify-content:center;width:28px}.dispatch-container .date-chip-text{align-items:flex-start;display:flex;flex-direction:column;gap:2px;line-height:1.1;min-width:0}.dispatch-container .date-chip-label{color:#94a3b8;font-size:10px;gap:6px;letter-spacing:.08em}.dispatch-container .date-chip-label,.dispatch-container .date-chip-today-pill{align-items:center;display:inline-flex;font-weight:800;text-transform:uppercase}.dispatch-container .date-chip-today-pill{background:linear-gradient(135deg,#662582,#9255ab);border-radius:999px;box-shadow:0 2px 6px #66258259;color:#fff;font-size:9px;letter-spacing:.06em;padding:1px 6px}.dispatch-container .date-chip-value{color:#0f172a;font-size:13px;font-weight:700;letter-spacing:.01em;white-space:nowrap}.dispatch-container .date-chip-chevron{align-items:center;color:#94a3b8;display:inline-flex;font-size:18px;justify-content:center;margin-left:2px;transition:color .18s ease,transform .18s ease}.dispatch-container .date-chip-main:hover .date-chip-chevron{color:#4d1c61}.dispatch-container .date-chip-chevron.is-open{color:#4d1c61;transform:rotate(180deg)}.dispatch-container .date-cal-popover{animation:date-cal-in .18s cubic-bezier(.4,0,.2,1);background:#fff;border:1px solid #0f172a14;border-radius:16px;box-shadow:0 18px 44px #0f172a2e,0 4px 12px #0f172a0f;padding:14px 14px 10px;position:absolute;right:0;top:calc(100% + 10px);width:304px;z-index:1000}.dispatch-container .date-cal-popover:after,.dispatch-container .date-cal-popover:before{border-left:8px solid #0000;border-right:8px solid #0000;bottom:100%;content:"";height:0;position:absolute;right:28px;width:0}.dispatch-container .date-cal-popover:before{border-bottom:8px solid #0f172a14}.dispatch-container .date-cal-popover:after{border-bottom:8px solid #fff;margin-bottom:-1px}@keyframes date-cal-in{0%{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.dispatch-container .date-cal-header{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:10px}.dispatch-container .date-cal-title{color:#0f172a;flex:1 1;font-size:14px;font-weight:800;letter-spacing:.01em;text-align:center}.dispatch-container .date-cal-nav{align-items:center;-webkit-appearance:none;appearance:none;background:#f8fafce6;border:0;border-radius:8px;color:#475569;cursor:pointer;display:inline-flex;font-size:18px;height:30px;justify-content:center;transition:background .15s ease,color .15s ease;width:30px}.dispatch-container .date-cal-nav:hover:not(:disabled){background:#6625821a;color:#4d1c61}.dispatch-container .date-cal-nav:disabled{cursor:not-allowed;opacity:.35}.dispatch-container .date-cal-grid,.dispatch-container .date-cal-weekdays{grid-gap:2px;display:grid;gap:2px;grid-template-columns:repeat(7,1fr)}.dispatch-container .date-cal-weekdays{margin-bottom:4px}.dispatch-container .date-cal-weekday{color:#94a3b8;font-size:10px;font-weight:800;letter-spacing:.06em;padding:4px 0;text-align:center;text-transform:uppercase}.dispatch-container .date-cal-day{align-items:center;-webkit-appearance:none;appearance:none;background:#0000;border:0;border-radius:9px;color:#0f172a;cursor:pointer;display:inline-flex;font-size:13px;font-weight:600;height:36px;justify-content:center;transition:background .12s ease,color .12s ease,box-shadow .18s ease,transform .12s ease}.dispatch-container .date-cal-day:hover:not(:disabled):not(.is-selected){background:#6625821a;color:#4d1c61}.dispatch-container .date-cal-day.is-other-month{color:#cbd5e1;font-weight:500}.dispatch-container .date-cal-day.is-today{box-shadow:inset 0 0 0 1.5px #6625828c;color:#4d1c61;font-weight:800}.dispatch-container .date-cal-day.is-selected{background:linear-gradient(135deg,#662582,#9255ab);box-shadow:0 4px 12px #66258259;color:#fff;font-weight:800}.dispatch-container .date-cal-day.is-selected.is-today{box-shadow:0 4px 12px #66258259}.dispatch-container .date-cal-day.is-selected:hover{box-shadow:0 6px 16px #66258273;transform:translateY(-1px)}.dispatch-container .date-cal-day.is-disabled{color:#e2e8f0;cursor:not-allowed;pointer-events:none}.dispatch-container .date-cal-day:focus-visible{outline:2px solid #66258280;outline-offset:1px}.dispatch-container .date-cal-presets{border-top:1px solid #0f172a0f;display:flex;gap:6px;margin-top:10px;padding-top:10px}.dispatch-container .date-cal-preset{-webkit-appearance:none;appearance:none;background:#fff;border:1px solid #0f172a14;border-radius:9px;color:#475569;cursor:pointer;flex:1 1;font-size:11px;font-weight:700;letter-spacing:.02em;padding:7px 10px;transition:background .15s ease,border-color .15s ease,color .15s ease,transform .12s ease}.dispatch-container .date-cal-preset:hover{background:#66258214;border-color:#66258259;color:#4d1c61;transform:translateY(-1px)}.dispatch-container .date-cal-preset:focus-visible{outline:2px solid #66258280;outline-offset:1px}.dispatch-container .date-chip-nav{align-items:center;-webkit-appearance:none;appearance:none;background:#f8fafcb3;border:0;border-left:1px solid #0f172a0f;border-right:1px solid #0f172a0f;color:#64748b;cursor:pointer;display:inline-flex;font-size:18px;justify-content:center;transition:background .15s ease,color .15s ease;width:34px}.dispatch-container .date-chip-nav:first-child{border-left:0;border-radius:11px 0 0 11px;border-right:1px solid #0f172a0f}.dispatch-container .date-chip-nav:last-child{border-left:1px solid #0f172a0f;border-radius:0 11px 11px 0;border-right:0}.dispatch-container .date-chip-nav:hover:not(:disabled){background:#66258214;color:#4d1c61}.dispatch-container .date-chip-nav:disabled{cursor:not-allowed;opacity:.4}.dispatch-container .date-chip-nav:focus-visible{outline:2px solid #66258280;outline-offset:-2px}.dispatch-container #batch-row{align-items:center;background:#f8fafc;background:var(--bg-sub);border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border);display:flex;flex-shrink:0;gap:12px;min-width:0;padding:12px 24px}.dispatch-container .batch-scroll{-webkit-overflow-scrolling:touch;align-items:center;display:flex;flex:1 1;gap:10px;min-width:0;overflow-x:auto;overflow-y:hidden;padding-bottom:2px;scroll-behavior:smooth;scrollbar-color:#64748b66 #0000;scrollbar-width:thin}.dispatch-container .batch-scroll::-webkit-scrollbar{height:6px}.dispatch-container .batch-scroll::-webkit-scrollbar-track{background:#0000}.dispatch-container .batch-scroll::-webkit-scrollbar-thumb{background:#64748b4d;border-radius:999px}.dispatch-container .batch-scroll::-webkit-scrollbar-thumb:hover{background:#64748b8c}.dispatch-container .batch-label{color:#64748b;color:var(--text-muted);flex-shrink:0;font-size:11px;font-weight:800;letter-spacing:.08em;margin-right:4px;text-transform:uppercase}.dispatch-container .time-field-wrap{display:inline-block;flex-shrink:0;margin-right:4px;position:relative}.dispatch-container .time-field-btn{align-items:center;background:#7b1fa214;border:1px solid #7b1fa240;border-radius:999px;color:#7b1fa2;cursor:pointer;display:inline-flex;font-family:inherit;font-size:12.5px;font-weight:700;gap:6px;letter-spacing:.02em;line-height:1;padding:7px 12px;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}.dispatch-container .time-field-btn:hover{background:#7b1fa224;border-color:#7b1fa273}.dispatch-container .time-field-btn.open{background:#7b1fa22e;border-color:#7b1fa28c;box-shadow:0 4px 12px #7b1fa22e}.dispatch-container .time-field-btn svg{flex-shrink:0;font-size:13px}.dispatch-container .time-field-caret{font-size:15px;transition:transform .2s ease}.dispatch-container .time-field-btn.open .time-field-caret{transform:rotate(180deg)}.dispatch-container .time-field-text{white-space:nowrap}.dispatch-container .time-field-menu{animation:logo-city-menu-in .14s ease-out;background:#fff;border:1px solid #7b1fa22e;border-radius:12px;box-shadow:0 16px 36px #0f172a29;left:0;min-width:180px;padding:6px;position:absolute;top:calc(100% + 6px);z-index:1000}.dispatch-container .time-field-option{align-items:center;background:#0000;border:0;border-radius:8px;color:#1e293b;cursor:pointer;display:flex;font-family:inherit;font-size:12px;font-weight:600;gap:8px;padding:8px 10px;text-align:left;transition:background .12s ease;width:100%}.dispatch-container .time-field-option:hover{background:#7b1fa20f}.dispatch-container .time-field-option.active{background:#7b1fa21a;color:#7b1fa2}.dispatch-container .time-field-option-icon{color:#7b1fa2;flex-shrink:0;font-size:14px}.dispatch-container .time-field-option-check{color:#7b1fa2;font-weight:800;margin-left:auto}.dispatch-container .slot-edit-wrap{display:inline-block;flex-shrink:0;margin-right:4px;position:relative}.dispatch-container .slot-edit-btn{align-items:center;background:#0f172a0a;border:1px dashed #0f172a2e;border-radius:999px;color:#475569;cursor:pointer;display:inline-flex;font-family:inherit;font-size:12.5px;font-weight:700;gap:6px;letter-spacing:.02em;line-height:1;padding:7px 12px}.dispatch-container .slot-edit-btn:hover{background:#0f172a14;border-color:#0f172a52;color:#0f172a}.dispatch-container .slot-edit-btn.open{background:#7b1fa21a;border-color:#7b1fa280;border-style:solid;color:#7b1fa2}.dispatch-container .slot-edit-btn svg{flex-shrink:0;font-size:13px}.dispatch-container .slot-edit-panel{animation:logo-city-menu-in .14s ease-out;background:#fff;border:1px solid #7b1fa22e;border-radius:14px;box-shadow:0 20px 44px #0f172a33;left:0;min-width:340px;padding:12px;position:absolute;top:calc(100% + 6px);z-index:1000}.dispatch-container .slot-edit-head{margin-bottom:10px}.dispatch-container .slot-edit-title{color:#0f172a;font-size:13px;font-weight:800}.dispatch-container .slot-edit-sub{color:#64748b;font-size:11px;margin-top:2px}.dispatch-container .slot-edit-list{display:flex;flex-direction:column;gap:8px;max-height:260px;overflow-y:auto;padding-right:2px}.dispatch-container .slot-edit-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:22px 70px 70px 1fr 28px}.dispatch-container .slot-edit-idx{align-items:center;background:#7b1fa21f;border-radius:6px;color:#7b1fa2;display:inline-flex;font-size:11px;font-weight:800;height:22px;justify-content:center;width:22px}.dispatch-container .slot-edit-field{display:flex;flex-direction:column;gap:2px}.dispatch-container .slot-edit-field-label{color:#94a3b8;font-size:9px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.dispatch-container .slot-edit-field input{background:#fff;border:1px solid #0f172a29;border-radius:8px;color:#0f172a;font-family:inherit;font-size:12px;font-weight:700;padding:5px 8px;width:100%}.dispatch-container .slot-edit-field input:focus{border-color:#7b1fa2;box-shadow:0 0 0 3px #7b1fa22e;outline:none}.dispatch-container .slot-edit-preview{color:#475569;font-size:11px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .slot-edit-remove{align-items:center;background:#dc26260f;border:1px solid #dc262652;border-radius:50%;color:#dc2626;cursor:pointer;display:inline-flex;font-size:16px;font-weight:800;height:26px;justify-content:center;line-height:1;padding:0;width:26px}.dispatch-container .slot-edit-remove:hover:not(:disabled){background:#dc262624;border-color:#dc26268c}.dispatch-container .slot-edit-remove:disabled{cursor:not-allowed;opacity:.4}.dispatch-container .slot-edit-actions{border-top:1px dashed #0f172a1a;display:flex;gap:8px;margin-top:12px;padding-top:10px}.dispatch-container .slot-edit-add,.dispatch-container .slot-edit-reset{border:1px solid #0000;border-radius:8px;cursor:pointer;flex:1 1;font-family:inherit;font-size:11px;font-weight:700;letter-spacing:.02em;padding:7px 10px}.dispatch-container .slot-edit-add{background:#7b1fa2;border-color:#7b1fa2;color:#fff}.dispatch-container .slot-edit-add:hover{background:#6a1591}.dispatch-container .slot-edit-reset{background:#fff;border-color:#0f172a29;color:#475569}.dispatch-container .slot-edit-reset:hover{background:#0f172a0a;color:#0f172a}.dispatch-container .batch-btn{align-items:center;background:#fff;background:var(--bg);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:999px;color:#64748b;color:var(--text-muted);cursor:pointer;display:inline-flex;flex-shrink:0;font-family:inherit;font-size:13.5px;font-weight:600;gap:8px;padding:8px 16px;transition:all .15s cubic-bezier(.4,0,.2,1);white-space:nowrap}.dispatch-container .batch-btn:hover{border-color:#64748b;border-color:var(--text-muted);color:#1e293b;color:var(--text)}.dispatch-container .batch-btn.active{border-color:#0000;box-shadow:0 4px 12px #0000001f;color:#fff}.dispatch-container .batch-btn.batch-slot.active{background:linear-gradient(135deg,#9255ab,#662582)}.dispatch-container .batch-btn-icon{font-size:14px;line-height:1}.dispatch-container .batch-btn-label{letter-spacing:.01em}.dispatch-container .batch-btn-count{font-feature-settings:"tnum";align-items:center;background:#f8fafc;background:var(--bg-sub);border-radius:999px;color:#1e293b;color:var(--text);display:inline-flex;font-size:11px;font-variant-numeric:tabular-nums;font-weight:800;height:20px;justify-content:center;min-width:24px;padding:0 7px}.dispatch-container .batch-btn.active .batch-btn-count{background:#ffffff47;color:#fff}.dispatch-container .status-chip{border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.04em;padding:3px 8px;text-transform:uppercase}.dispatch-container .status-chip,.dispatch-container .step-flag{align-items:center;display:inline-flex;flex-shrink:0;margin-left:8px}.dispatch-container .step-flag{gap:5px}.dispatch-container .step-flag-svg{filter:drop-shadow(0 1px 1px rgba(0,0,0,.15));flex-shrink:0;height:18px;width:14px}.dispatch-container .step-flag-label{font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}.dispatch-container .cmark{display:block;height:100%;position:relative;width:100%}.dispatch-container .cmark.pulse{animation:cmark-pulse .8s ease-out infinite;z-index:1500!important}@keyframes cmark-pulse{0%{filter:drop-shadow(0 2px 4px rgba(146,85,171,.4));transform:scale(1)}50%{filter:drop-shadow(0 4px 8px rgba(146,85,171,.7));transform:scale(1.2)}to{filter:drop-shadow(0 2px 4px rgba(146,85,171,.4));transform:scale(1)}}.dispatch-container .cmark .cmark-flag{display:block;filter:drop-shadow(0 2px 4px rgba(0,0,0,.25));height:100%;pointer-events:none;width:100%}.dispatch-container .cmark.is-rider-focused{align-items:center;border:3px solid #fff;border-radius:50%;box-shadow:0 4px 12px #0006;color:#fff;display:flex;font-weight:800;justify-content:center;letter-spacing:.02em;position:relative}.dispatch-container .cmark.is-rider-focused .cmark-flag{filter:drop-shadow(0 1px 2px rgba(0,0,0,.35));height:22px;left:50%;pointer-events:none;position:absolute;top:-20px;transform:translateX(-2px);width:18px}.dispatch-container .cmark.is-rider-focused.pulse{animation:cmark-focused-pulse .8s ease-out infinite;z-index:1500!important}@keyframes cmark-focused-pulse{0%{box-shadow:0 0 0 0 #9255ab8c,0 4px 12px #0006;transform:scale(1)}70%{box-shadow:0 0 0 14px #9255ab00,0 4px 12px #0006;transform:scale(1.18)}to{box-shadow:0 0 0 0 #9255ab00,0 4px 12px #0006;transform:scale(1)}}.dispatch-container .live-rider-pin{--pin-color:#16a34a;height:41px;position:relative;width:24px}.dispatch-container .live-rider-pin-marker{background:var(--pin-color);border:3px solid #fff;border-radius:50% 50% 50% 0;box-shadow:0 4px 10px #0000004d;height:24px;left:0;position:absolute;top:0;transform:rotate(-45deg);width:24px}.dispatch-container .live-rider-pin-marker:after{background:#fff;border-radius:50%;content:"";inset:4px;position:absolute}.dispatch-container .live-rider-pin-label{background:var(--pin-color);border-radius:4px;box-shadow:0 2px 6px #00000040;color:#fff;font-size:11px;font-weight:700;left:30px;line-height:1.2;padding:3px 8px;position:absolute;top:2px;white-space:nowrap}.dispatch-container .live-rider-pin-label span{font-weight:500;margin-left:4px;opacity:.85}.dispatch-container #body{display:flex;flex:1 1;min-height:0;overflow:hidden;position:relative}.dispatch-container #sidebar{background:#f8fafc;background:var(--bg-sub);border-right:1px solid #e2e8f0;border-right:1px solid var(--border);display:flex;flex:0 0 400px;flex-direction:column;overflow:hidden;transition:width .32s cubic-bezier(.4,0,.2,1),flex-basis .32s cubic-bezier(.4,0,.2,1),border-right-color .2s ease;width:400px;z-index:5}.dispatch-container #body.sidebar-collapsed #sidebar{border-right-color:#0000;flex:0 0;width:0}.dispatch-container .sidebar-toggle-tab{align-items:center;background:#fff;border:1px solid #e2e8f0;border:1px solid var(--border,#0f172a1f);border-radius:10px;box-shadow:0 4px 12px #0f172a1f,0 1px 3px #0f172a0f;color:#1e293b;color:var(--text,#0f172a);cursor:pointer;display:inline-flex;font-size:18px;height:56px;justify-content:center;left:400px;line-height:1;padding:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:left .32s cubic-bezier(.4,0,.2,1),background .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease;width:22px;z-index:1200}.dispatch-container .sidebar-toggle-tab:hover{background:linear-gradient(135deg,#662582,#9255ab);box-shadow:0 6px 16px #66258259;color:#fff;transform:translate(-50%,-50%) scale(1.06)}.dispatch-container .sidebar-toggle-tab:focus-visible{outline:2px solid #9255ab;outline:2px solid var(--accent,#9255ab);outline-offset:2px}.dispatch-container .sidebar-toggle-tab.is-collapsed{border-left:none;border-radius:0 10px 10px 0;left:0;transform:translateY(-50%)}.dispatch-container .sidebar-toggle-tab.is-collapsed:hover{transform:translateY(-50%) scale(1.06)}.dispatch-container .sidebar-toggle-tab svg{display:block}.dispatch-container .sb-header{background:linear-gradient(180deg,#fff,#f8fafc);background:linear-gradient(180deg,#fff 0,var(--bg-sub) 100%);border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border);overflow:hidden;padding:18px 18px 16px;position:relative}.dispatch-container .sb-header:before{background:radial-gradient(circle at center,#9255ab14 0,#0000 70%);background:radial-gradient(circle at center,var(--accent-soft) 0,#0000 70%);border-radius:50%;content:"";height:160px;inset:-40px -40px auto auto;pointer-events:none;position:absolute;width:160px}.dispatch-container .sb-header>*{position:relative}.dispatch-container .sb-header-top{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:12px}.dispatch-container .sb-header-title{align-items:center;display:inline-flex;gap:8px}.dispatch-container .sb-title-bar{background:linear-gradient(180deg,#9255ab,#662582);background:linear-gradient(180deg,var(--accent),#662582);border-radius:2px;display:inline-block;height:14px;width:3px}.dispatch-container .sb-title-text{color:#1e293b;color:var(--text);font-size:12px;font-weight:800;letter-spacing:.12em}.dispatch-container .sb-header-scope{align-items:center;background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:999px;color:#64748b;color:var(--text-muted);display:inline-flex;font-size:9px;font-weight:800;gap:5px;letter-spacing:.08em;max-width:60%;overflow:hidden;padding:3px 9px;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.dispatch-container .sb-scope-dot{background:#22c55e;background:var(--success);border-radius:50%;box-shadow:0 0 0 2px #22c55e2e;flex-shrink:0;height:6px;width:6px}.dispatch-container .sb-header-area{align-items:center;background:#9255ab14;background:var(--accent-soft);border:1px solid #9255ab38;border-radius:999px;color:#9255ab;color:var(--accent);display:inline-flex;font-size:11px;font-weight:700;gap:6px;margin-bottom:14px;padding:4px 10px 4px 8px}.dispatch-container .sb-area-icon{align-items:center;display:inline-flex;font-size:14px;line-height:1}.dispatch-container .sb-header-tiles{grid-gap:10px;display:grid;gap:10px;grid-template-columns:1fr 1fr}.dispatch-container .sb-tile{align-items:center;background:#fff;border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:12px;box-shadow:0 2px 6px #0f172a0a;display:flex;gap:10px;padding:10px 12px;transition:transform .18s ease,box-shadow .18s ease}.dispatch-container .sb-tile:hover{box-shadow:0 6px 14px #0f172a0f;transform:translateY(-1px)}.dispatch-container .sb-tile-icon{align-items:center;border-radius:10px;display:inline-flex;flex-shrink:0;font-size:18px;height:32px;justify-content:center;width:32px}.dispatch-container .sb-tile-orders .sb-tile-icon{background:#9255ab14;background:var(--accent-soft);color:#9255ab;color:var(--accent)}.dispatch-container .sb-tile-riders .sb-tile-icon{background:#f59e0b1f;color:#f59e0b;color:var(--kitchen)}.dispatch-container .sb-tile-body{line-height:1.1;min-width:0}.dispatch-container .sb-tile-value{font-feature-settings:"tnum";color:#1e293b;color:var(--text);font-size:22px;font-variant-numeric:tabular-nums;font-weight:800;letter-spacing:-.01em}.dispatch-container .sb-tile-label{color:#64748b;color:var(--text-muted);font-size:10px;font-weight:700;letter-spacing:.06em;margin-top:2px;text-transform:uppercase}.dispatch-container #stats-strip{grid-gap:12px;background:#fff;background:var(--bg);border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border);display:grid;gap:12px;grid-template-columns:repeat(2,1fr);padding:16px}.dispatch-container .sc{background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:12px;padding:12px}.dispatch-container .sc-lbl{color:#64748b;color:var(--text-muted);font-size:10px;font-weight:700;letter-spacing:.05em;margin-bottom:4px;text-transform:uppercase}.dispatch-container .sc-val{color:#1e293b;color:var(--text);font-size:22px;font-weight:800;line-height:1}.dispatch-container .sc-val.g{color:#22c55e;color:var(--success)}.dispatch-container .sc-sub{color:#64748b;color:var(--text-muted);font-size:11px;margin-top:4px}.dispatch-container #riders-panel{flex:1 1;overflow-y:auto;padding:16px}.dispatch-container .ph{align-items:center;color:#64748b;color:var(--text-muted);display:flex;font-size:11px;font-weight:700;gap:12px;letter-spacing:.05em;margin-bottom:16px;text-transform:uppercase}.dispatch-container .ph:after{background:#e2e8f0;background:var(--border);content:"";flex:1 1;height:1px}.dispatch-container .rcard{background:#fff;background:var(--bg-card);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:14px;box-shadow:0 4px 12px #0000000d;box-shadow:var(--shadow);cursor:pointer;margin-bottom:12px;padding:16px;transition:all .2s cubic-bezier(.4,0,.2,1)}.dispatch-container .rcard:hover{border-color:#9255ab;border-color:var(--accent);box-shadow:0 10px 25px -5px #00000014;box-shadow:var(--shadow-lg);transform:translateY(-2px)}.dispatch-container .rcard-top{align-items:center;display:flex;gap:12px;margin-bottom:12px}.dispatch-container .kitchen-mark{box-shadow:0 0 20px #f59e0b99,0 0 40px #f59e0b4d;font-size:14px;font-weight:800;height:34px;width:34px}.dispatch-container .rcard-info{flex:1 1}.dispatch-container .rcard-emo{align-items:center;border:1.5px solid #e2e8f0;border:1.5px solid var(--border);border-radius:10px;display:flex;font-size:20px;height:40px;justify-content:center;width:40px}.dispatch-container .rcard-name{color:#1e293b;color:var(--text);font-size:15px;font-weight:700}.dispatch-container .rcard-zone{color:#64748b;color:var(--text-muted);font-size:12px;margin-top:2px}.dispatch-container .rcard-badge{font-feature-settings:"tnum","tnum";background:#f8fafc;background:var(--bg-sub);border-radius:8px;font-size:12px;font-variant-numeric:tabular-nums;font-weight:700;padding:4px 10px;white-space:nowrap}.dispatch-container .rcard-badge.is-done{background:#16a34a1f;color:#16a34a}.dispatch-container .bar-bg{background:#f8fafc;background:var(--bg-sub);border-radius:4px;height:5px;margin-bottom:12px;overflow:hidden}.dispatch-container .bar-fg{border-radius:4px;height:100%}.dispatch-container .rcard-meta{color:#64748b;color:var(--text-muted);display:flex;font-size:12px;font-weight:500;justify-content:space-between}.dispatch-container .step-ids{display:flex;flex-wrap:wrap;gap:4px;margin-top:10px}.dispatch-container .step-id{background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:4px;color:#64748b;color:var(--text-muted);font-size:10px;font-weight:700;padding:2px 6px}.dispatch-container .zone-order-change-rider{align-items:center;align-self:flex-start;background:#fff;border:1px solid #e2e8f0;border-radius:7px;color:#4f46e5;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:15px;height:26px;justify-content:center;margin-left:6px;transition:background .15s,color .15s,border-color .15s;width:26px}.dispatch-container .zone-order-change-rider:hover{background:#eef2ff;border-color:#c7d2fe;color:#4d1c61}.dispatch-container #route-detail{background:#fff;background:var(--bg);flex:1 1;overflow-y:auto;padding:20px}.dispatch-container .rd-back{background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:10px;color:#1e293b;color:var(--text);cursor:pointer;font-size:12px;font-weight:600;margin-bottom:20px;padding:8px 16px;transition:all .2s}.dispatch-container .rd-back:hover{background:#e2e8f0;background:var(--border)}.dispatch-container .rd-rider-name{font-size:28px;font-weight:800;letter-spacing:-.02em;line-height:1.1;margin-bottom:6px}.dispatch-container .rd-rider-sub{color:#64748b;color:var(--text-muted);display:flex;font-size:13px;gap:16px;margin-bottom:24px}.dispatch-container .rd-stats-grid{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);margin:14px 0 22px}.dispatch-container .rd-stat{background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:12px;padding:14px 10px 12px;text-align:center;transition:transform .15s,box-shadow .15s}.dispatch-container .rd-stat:hover{box-shadow:0 4px 10px #0000000d;transform:translateY(-1px)}.dispatch-container .rd-stat-icon{font-size:18px;line-height:1;margin-bottom:6px;opacity:.9}.dispatch-container .rd-stat-value{font-feature-settings:"tnum";color:#1e293b;color:var(--text);font-size:22px;font-variant-numeric:tabular-nums;font-weight:800;letter-spacing:-.02em;line-height:1}.dispatch-container .rd-stat-unit{font-size:12px;font-weight:700;margin-left:3px;opacity:.7}.dispatch-container .rd-stat-label{color:#64748b;color:var(--text-muted);font-size:10px;font-weight:800;letter-spacing:.08em;margin-top:6px;text-transform:uppercase}.dispatch-container .rd-stat-orders{background:linear-gradient(135deg,#9255ab17,#6625820a);border-color:#9255ab38}.dispatch-container .rd-stat-orders .rd-stat-value{color:#2563eb}.dispatch-container .rd-stat-distance{background:linear-gradient(135deg,#f59e0b1a,#f973160a);border-color:#f59e0b40}.dispatch-container .rd-stat-distance .rd-stat-value{color:#d97706}.dispatch-container .rd-stat-profit.is-gain{background:linear-gradient(135deg,#22c55e1f,#14b8a60a);border-color:#22c55e59}.dispatch-container .rd-stat-profit.is-gain .rd-stat-value{color:#16a34a}.dispatch-container .rd-stat-profit.is-gain .rd-stat-label{color:#16a34a;opacity:.75}.dispatch-container .rd-stat-profit.is-loss{background:linear-gradient(135deg,#ef44441f,#f43f5e0a);border-color:#ef444459}.dispatch-container .rd-stat-profit.is-loss .rd-stat-value{color:#dc2626}.dispatch-container .rd-stat-profit.is-loss .rd-stat-label{color:#dc2626;opacity:.75}.dispatch-container .trip-block{background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:16px;margin-bottom:24px;overflow:hidden}.dispatch-container .trip-header{align-items:center;background:#fff;border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border);display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-start;padding:10px 14px}.dispatch-container .th-badge{border-radius:6px;color:#fff;flex-shrink:0;font-size:11px;font-weight:800;letter-spacing:.02em;padding:4px 10px}.dispatch-container .trip-stats{color:#64748b;color:var(--text-muted);display:flex;flex-shrink:0;font-size:12px;font-weight:600;gap:10px}.dispatch-container .trip-sort-toggle{align-items:stretch;background:#f1f5f9;border-radius:10px;display:flex;flex-basis:100%;isolation:isolate;margin-left:0;padding:3px;position:relative;width:100%}.dispatch-container .trip-sort-pill{align-items:center;-webkit-appearance:none;appearance:none;background:#0000;border:0;border-radius:7px;color:#64748b;cursor:pointer;display:inline-flex;flex:1 1;font-size:11.5px;font-weight:600;gap:6px;justify-content:center;letter-spacing:.01em;line-height:1;min-height:28px;padding:6px 10px;transition:color .18s ease,background .18s ease,box-shadow .18s ease;white-space:nowrap}.dispatch-container .trip-sort-pill svg{color:#94a3b8;display:block;flex:0 0 auto;height:14px;transition:color .18s ease,transform .18s ease;width:14px}.dispatch-container .trip-sort-pill:hover:not(.is-active){color:#0f172a}.dispatch-container .trip-sort-pill:hover:not(.is-active) svg{color:#475569}.dispatch-container .trip-sort-pill:focus-visible{box-shadow:0 0 0 2px #66258266;outline:none}.dispatch-container .trip-sort-pill.is-active{background:#fff;box-shadow:0 1px 2px #0f172a14,0 0 0 1px #0f172a0a,0 2px 6px #0f172a0f;color:#0f172a}.dispatch-container .trip-sort-toggle[data-mode=planned] .trip-sort-pill.is-active svg{color:#662582}.dispatch-container .trip-sort-toggle[data-mode=time] .trip-sort-pill.is-active svg{color:#10b981}.dispatch-container .zone-order-card.is-pending-time{opacity:.72}.dispatch-container .step-wrap{padding:16px}.dispatch-container .step-row{border-radius:8px;display:flex;gap:16px;padding-bottom:20px;position:relative;transition:background .15s ease,box-shadow .15s ease}.dispatch-container .step-row.clickable{cursor:pointer}.dispatch-container .step-row.clickable:hover{background:#6625820f}.dispatch-container .step-row.clickable:focus-visible{outline:2px solid #9255ab;outline:2px solid var(--accent);outline-offset:2px}.dispatch-container .step-row.active{background:#6625821a;box-shadow:inset 3px 0 0 #662582;margin-left:-8px;padding-left:8px}.dispatch-container .step-row:not(:last-child):before{background:#e2e8f0;background:var(--border);bottom:0;content:"";left:15px;position:absolute;top:32px;width:2px}.dispatch-container .step-dot{align-items:center;border-radius:50%;display:flex;flex-shrink:0;font-size:14px;font-weight:800;height:32px;justify-content:center;width:32px;z-index:2}.dispatch-container .step-dot.kitchen{background:#f59e0b;background:var(--kitchen);color:#fff}.dispatch-container .step-dot.delivery{background:#fff;border:2px solid #e2e8f0;border:2px solid var(--border);color:#64748b;color:var(--text-muted)}.dispatch-container .step-label{font-size:15px;font-weight:700}.dispatch-container .step-label-row{align-items:flex-start;display:flex}.dispatch-container .step-customer{flex:1 1;line-height:1.35;min-width:0;overflow-wrap:anywhere;word-break:break-word}.dispatch-container .kitchen-tag{color:#f59e0b;color:var(--kitchen)}.dispatch-container .step-dest{color:#64748b;color:var(--text-muted);font-size:13px;margin-top:3px}.dispatch-container .step-detail{display:flex;flex-wrap:wrap;font-size:13px;font-weight:600;gap:10px;margin-top:6px}.dispatch-container .step-profit{color:#22c55e;color:var(--success)}.dispatch-container .step-profit.is-loss{color:#dc2626}.dispatch-container .step-location{font-weight:500}.dispatch-container .step-location,.dispatch-container .step-notes{color:#64748b;color:var(--text-muted);font-size:11px;margin-top:3px}.dispatch-container .step-notes{background:#f59e0b14;border-left:2px solid #f59e0b99;border-radius:4px;font-style:italic;max-width:100%;overflow:hidden;padding:4px 8px;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .step-charges{color:#0074e7;font-weight:600}.dispatch-container .step-type{border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.04em;padding:2px 7px;text-transform:uppercase}.dispatch-container .step-type.type-economy{background:#22c55e26;color:#16a34a}.dispatch-container .step-type.type-risky{background:#ef444426;color:#dc2626}.dispatch-container .step-type.type-express{background:#9255ab26;color:#2563eb}.dispatch-container .step-type:not(.type-economy):not(.type-risky):not(.type-express){background:#64748b26;color:#475569}.dispatch-container .rcard.zone-card{background:linear-gradient(180deg,#fff,#fafbff);overflow:hidden;padding:14px 14px 12px;position:relative}.dispatch-container .rcard.zone-card:before{background:linear-gradient(180deg,#9255ab,#662582);content:"";height:100%;left:0;opacity:.55;position:absolute;top:0;transition:opacity .2s,width .2s;width:3px}.dispatch-container .rcard.zone-card:hover{background:linear-gradient(180deg,#fff,#f0f7ff);border-color:#9255ab80;box-shadow:0 8px 22px #9255ab1f}.dispatch-container .rcard.zone-card:hover:before{opacity:1;width:4px}.dispatch-container .zone-card-header{align-items:center;display:flex;gap:10px;margin-bottom:12px}.dispatch-container .zone-card-emoji{align-items:center;background:linear-gradient(135deg,#9255ab1f,#66258224);border:1px solid #9255ab38;border-radius:10px;display:flex;flex-shrink:0;font-size:18px;height:36px;justify-content:center;width:36px}.dispatch-container .zone-card-titles{flex:1 1;min-width:0}.dispatch-container .zone-card-name{color:#1e293b;color:var(--text);font-size:15px;font-weight:800;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .zone-card-sub{color:#64748b;color:var(--text-muted);font-size:11px;font-weight:500;margin-top:2px}.dispatch-container .zone-card-arrow{color:#9255ab;color:var(--accent);flex-shrink:0;font-size:18px;font-weight:800;opacity:.4;transition:transform .2s,opacity .2s}.dispatch-container .rcard.zone-card:hover .zone-card-arrow{opacity:1;transform:translateX(4px)}.dispatch-container .zone-progress-row{align-items:center;display:flex;gap:10px;margin:10px 0 4px}.dispatch-container .zone-progress-row .zone-status-bar{flex:1 1;height:6px;margin:0}.dispatch-container .zone-progress-label{font-feature-settings:"tnum";color:#64748b;color:var(--text-muted);font-size:10px;font-variant-numeric:tabular-nums;font-weight:800;letter-spacing:.02em;white-space:nowrap}.dispatch-container .zone-stat-pills{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}.dispatch-container .zone-stat-pill{align-items:center;background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:8px;display:inline-flex;font-size:11px;font-weight:600;gap:4px;padding:4px 9px;transition:all .15s}.dispatch-container .zone-stat-icon{font-size:12px;opacity:.85}.dispatch-container .zone-stat-value{font-feature-settings:"tnum";color:#1e293b;color:var(--text);font-variant-numeric:tabular-nums;font-weight:800}.dispatch-container .zone-stat-label{color:#64748b;color:var(--text-muted);font-size:10px;font-weight:600}.dispatch-container .zone-stat-pill.profit-positive{background:#22c55e14;border-color:#22c55e40}.dispatch-container .zone-stat-pill.profit-positive .zone-stat-value{color:#22c55e;color:var(--success)}.dispatch-container .zone-stat-pill.profit-negative{background:#ef444414;border-color:#ef444440}.dispatch-container .zone-stat-pill.profit-negative .zone-stat-value{color:#ef4444}.dispatch-container .zone-card-suburbs{align-items:center;border-top:1px dashed #e2e8f0;border-top:1px dashed var(--border);color:#64748b;color:var(--text-muted);display:flex;font-size:11px;gap:6px;line-height:1.4;margin-top:10px;padding-top:10px}.dispatch-container .zone-card-suburbs-text{flex:1 1;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .zone-card-suburbs-more{background:#9255ab14;background:var(--accent-soft);border-radius:999px;color:#9255ab;color:var(--accent);flex-shrink:0;font-size:10px;font-weight:800;padding:1px 7px}.dispatch-container .zone-status-bar{background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:3px;display:flex;height:5px;margin-top:10px;overflow:hidden}.dispatch-container .zone-status-bar.tall{border-radius:4px;height:16px}.dispatch-container .zone-status-seg{align-items:center;display:flex;height:100%;justify-content:center;min-width:1px;transition:filter .2s}.dispatch-container .zone-status-bar.tall .zone-status-seg{color:#fff;font-size:10px;font-weight:800;text-shadow:0 1px 2px #0000004d}.dispatch-container .zone-status-seg:hover{filter:brightness(1.1)}.dispatch-container .zone-status-seg-label{padding:0 4px}.dispatch-container .zone-status-legend{color:#64748b;color:var(--text-muted);display:flex;flex-wrap:wrap;font-size:11px;gap:10px;margin-top:8px}.dispatch-container .legend-item{align-items:center;display:inline-flex;gap:5px}.dispatch-container .legend-item strong{color:#1e293b;color:var(--text);font-weight:700;margin-left:2px}.dispatch-container .legend-dot{border-radius:50%;flex-shrink:0;height:9px;width:9px}.dispatch-container .zone-detail-section{margin:18px 0}.dispatch-container .zone-section-label{align-items:center;color:#64748b;color:var(--text-muted);display:flex;font-size:10px;font-weight:800;gap:10px;letter-spacing:.06em;margin-bottom:10px;text-transform:uppercase}.dispatch-container .zone-section-label:after{background:#e2e8f0;background:var(--border);content:"";flex:1 1;height:1px}.dispatch-container .section-count{color:#9255ab;color:var(--accent);font-weight:700}.dispatch-container .zone-chips{display:flex;flex-wrap:wrap;gap:6px}.dispatch-container .zone-chip{align-items:center;background:#f8fafc;background:var(--bg-sub);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:999px;color:#1e293b;color:var(--text);display:inline-flex;font-size:11px;font-weight:600;gap:6px;padding:4px 4px 4px 10px;transition:all .15s}.dispatch-container .zone-chip:hover{background:#9255ab14;background:var(--accent-soft);border-color:#9255ab;border-color:var(--accent)}.dispatch-container .zone-chip.kitchen{background:#f59e0b0f;border-color:#f59e0b40}.dispatch-container .zone-chip.kitchen:hover{background:#f59e0b1f;border-color:#f59e0b80}.dispatch-container .zone-chip-name{white-space:nowrap}.dispatch-container .zone-chip-count{align-items:center;background:#9255ab;background:var(--accent);border-radius:999px;color:#fff;display:inline-flex;font-size:10px;font-weight:800;height:18px;justify-content:center;min-width:20px;padding:0 6px}.dispatch-container .zone-chip-count.kitchen{background:#f59e0b;background:var(--kitchen)}.dispatch-container .zone-chip.zone-chip-clickable{cursor:pointer;font-family:inherit}.dispatch-container .zone-chip.zone-chip-clickable.active{background:#9255ab;background:var(--accent);border-color:#9255ab;border-color:var(--accent);box-shadow:0 2px 8px #9255ab40;color:#fff}.dispatch-container .zone-chip.zone-chip-clickable.active .zone-chip-count{background:#ffffff40;color:#fff}.dispatch-container .zone-suburb-panel{animation:zone-suburb-panel-in .18s ease-out;background:#fff;border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:12px;margin-top:12px;overflow:hidden}@keyframes zone-suburb-panel-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.dispatch-container .zone-suburb-panel-head{align-items:center;background:#9255ab14;background:var(--accent-soft);border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border);display:flex;gap:8px;justify-content:space-between;padding:10px 14px}.dispatch-container .zone-suburb-panel-title{align-items:center;color:#1e293b;color:var(--text);display:inline-flex;font-size:13px;font-weight:800;gap:6px;letter-spacing:-.01em}.dispatch-container .zone-suburb-panel-count{background:#9255ab;background:var(--accent);border-radius:999px;color:#fff;font-size:10px;font-weight:800;letter-spacing:.04em;margin-left:6px;padding:2px 8px}.dispatch-container .zone-suburb-panel-close{background:#0f172a0f;border:none;border-radius:50%;color:#64748b;color:var(--text-muted);cursor:pointer;font-size:18px;font-weight:700;height:24px;line-height:1;transition:all .15s;width:24px}.dispatch-container .zone-suburb-panel-close:hover{background:#ef444426;color:#dc2626}.dispatch-container .zone-suburb-panel-empty{color:#64748b;color:var(--text-muted);font-size:12px;padding:16px;text-align:center}.dispatch-container .zone-order-grid{display:flex;flex-direction:column;gap:10px;padding:4px 2px 12px}.dispatch-container .zone-order-card{background:#fff;border:1px solid #7b1fa224;border-radius:12px;box-shadow:0 1px 2px #0f172a0a;overflow:hidden;padding:12px 14px 12px 18px;position:relative;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}.dispatch-container .zone-order-card:before{background:#7b1fa2;content:"";height:100%;left:0;opacity:.85;position:absolute;top:0;transition:width .18s ease,opacity .18s ease;width:4px}.dispatch-container .zone-order-card.clickable{cursor:pointer}.dispatch-container .zone-order-card.clickable:hover{border-color:#7b1fa273;box-shadow:0 8px 20px #7b1fa229;transform:translateY(-1px)}.dispatch-container .zone-order-card.clickable:hover:before{opacity:1;width:5px}.dispatch-container .zone-order-card.active{background:linear-gradient(180deg,#fff,#f7eaff);border-color:#7b1fa2;box-shadow:0 10px 24px #7b1fa238}.dispatch-container .zone-order-card.active:before{opacity:1;width:6px}.dispatch-container .zone-order-card.going-on{background:linear-gradient(180deg,#fff,#ecfdf5);border-color:#22c55e66;box-shadow:0 6px 18px #22c55e26}.dispatch-container .zone-order-card.going-on:before{background:#16a34a;opacity:1}.dispatch-container .zone-order-card.going-on.active{background:linear-gradient(180deg,#fff,#d1fae5);border-color:#16a34a}.dispatch-container .zone-order-card-head{align-items:center;display:flex;gap:10px;margin-bottom:8px}.dispatch-container .zone-order-num{align-items:center;background:#7b1fa2;border:1px solid #7b1fa2;border-radius:8px;box-shadow:0 2px 6px #7b1fa238;color:#fff;display:flex;flex-shrink:0;font-size:13px;font-weight:800;height:28px;justify-content:center;width:28px}.dispatch-container .zone-order-id-block{flex:1 1;min-width:0}.dispatch-container .zone-order-id{color:#1e293b;color:var(--text);font-size:12px;font-weight:700;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .zone-order-rider{color:#7b1fa2;font-size:11px;font-weight:600;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .zone-order-status{border-radius:999px;flex-shrink:0;font-size:10px;font-weight:700;letter-spacing:.04em;padding:3px 8px;text-transform:uppercase}.dispatch-container .zone-order-status-stack{align-items:flex-end;display:flex;flex-direction:column;flex-shrink:0;gap:3px}.dispatch-container .zone-order-time{font-feature-settings:"tnum";align-items:center;color:#1e293b;display:inline-flex;font-size:12px;font-variant-numeric:tabular-nums;font-weight:700;gap:4px;letter-spacing:.01em;white-space:nowrap}.dispatch-container .zone-order-time svg{color:#7b1fa2;flex-shrink:0;font-size:14px}.dispatch-container .zone-order-time.is-expected{color:#64748b;font-weight:600}.dispatch-container .zone-order-time.is-expected svg{color:#94a3b8}.dispatch-container .zone-order-est-drop{font-feature-settings:"tnum";align-items:center;color:#475569;display:inline-flex;font-size:11px;font-variant-numeric:tabular-nums;font-weight:600;gap:4px;white-space:nowrap}.dispatch-container .zone-order-est-drop svg{color:#0ea5e9;flex-shrink:0;font-size:13px}.dispatch-container .zone-order-customer{color:#1e293b;color:var(--text);font-size:14px;font-weight:700;letter-spacing:-.01em;margin-bottom:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .zone-order-line{color:#64748b;color:var(--text-muted);font-size:12px;line-height:1.4;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .zone-order-notes{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:#475569;display:-webkit-box;font-style:italic;text-overflow:clip;white-space:normal}.dispatch-container .zone-order-stats{border-top:1px dashed #7b1fa224;display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;padding-top:10px}.dispatch-container .zone-order-chip{align-items:center;background:#7b1fa20f;border:1px solid #7b1fa224;border-radius:999px;color:#1e293b;color:var(--text);display:inline-flex;font-size:11px;font-weight:600;gap:4px;padding:4px 8px}.dispatch-container .zone-order-chip.is-profit{background:#22c55e1a;border-color:#22c55e40;color:#16a34a}.dispatch-container .zone-order-chip.is-loss{background:#ef44441a;border-color:#ef444440;color:#dc2626}.dispatch-container .zone-order-chip.zone-order-trip{background:#7b1fa21a;border-color:#7b1fa240;color:#7b1fa2}.dispatch-container .zone-order-type{letter-spacing:.05em;text-transform:uppercase}.dispatch-container .kitchen-transition{background:#f59e0b1a;background:var(--kitchen-soft);border:1px dashed #f59e0b;border:1px dashed var(--kitchen);border-radius:10px;font-size:12px;font-weight:600;margin:8px 0 20px 40px;padding:12px}.dispatch-container .zone-order-grid .kitchen-transition{margin:2px 0;padding:8px 12px}.dispatch-container #map-wrap{flex:1 1;position:relative;transition:flex .32s cubic-bezier(.4,0,.2,1)}.dispatch-container #map-wrap.compare-split{border-radius:0 14px 14px 0;border-right:0;box-shadow:0 0 0 1px #0f172a0f;flex-basis:calc(50% - 8px);flex-grow:1;flex-shrink:1;margin-right:16px;min-width:0;overflow:hidden}.dispatch-container .compare-planned-label{align-items:center;animation:compare-label-in .22s ease-out;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#fffffff2;border:1px solid #6625824d;border-radius:999px;box-shadow:0 4px 14px #0f172a1a;color:#4d1c61;display:inline-flex;font-size:10px;font-weight:800;gap:6px;left:12px;letter-spacing:.06em;padding:5px 12px 5px 9px;pointer-events:none;position:absolute;text-transform:uppercase;top:12px;z-index:1000}.dispatch-container .compare-planned-dot{background:linear-gradient(135deg,#662582,#4d1c61);border-radius:50%;flex-shrink:0;height:7px;width:7px}.dispatch-container .compare-actual-label{align-items:center;animation:compare-label-in .22s ease-out;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#fffffff2;border:1px solid #0ea5e959;border-radius:999px;box-shadow:0 4px 14px #0f172a1a;color:#0369a1;display:inline-flex;font-size:10px;font-weight:800;gap:6px;left:12px;letter-spacing:.06em;padding:5px 12px 5px 9px;pointer-events:none;position:absolute;text-transform:uppercase;top:12px;z-index:1000}.dispatch-container .compare-actual-dot{animation:compare-actual-pulse 1.6s ease-in-out infinite;background:linear-gradient(135deg,#0ea5e9,#0369a1);border-radius:50%;box-shadow:0 0 0 2px #0ea5e926;flex-shrink:0;height:7px;width:7px}@keyframes compare-actual-pulse{0%,to{box-shadow:0 0 0 2px #0ea5e926}50%{box-shadow:0 0 0 4px #0ea5e90d}}@keyframes compare-label-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.dispatch-container #compare-map-wrap{animation:compare-slide-in .3s cubic-bezier(.4,0,.2,1);background:#fff;border-radius:14px 0 0 14px;box-shadow:0 0 0 1px #0f172a0f;display:flex;flex-basis:calc(50% - 8px);flex-direction:column;flex-grow:1;flex-shrink:1;min-width:0;overflow:hidden;position:relative}@keyframes compare-slide-in{0%{opacity:0;transform:translateX(18px)}to{opacity:1;transform:translateX(0)}}.dispatch-container #compare-map-wrap .leaflet-container{background:#f0f4f8!important;flex:1 1;min-height:0}.dispatch-container .compare-map-area{display:flex;flex:1 1;flex-direction:column;min-height:0;position:relative}.dispatch-container .compare-ov-br{bottom:12px;display:flex;gap:8px;position:absolute;right:12px;z-index:1000}.dispatch-container .compare-header{background:linear-gradient(180deg,#fff,#f8fafc);border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border,#0f172a14);flex-shrink:0;padding:10px 14px 8px}.dispatch-container .compare-header-top{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:7px}.dispatch-container .compare-title{align-items:center;color:#0f172a;display:inline-flex;font-size:12px;font-weight:800;gap:7px;letter-spacing:.01em;min-width:0}.dispatch-container .compare-title-dot{border-radius:50%;display:inline-block;flex-shrink:0;height:12px;width:12px}.dispatch-container .compare-title-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .compare-title-badge{align-items:center;background:#0ea5e91a;border:1px solid #0ea5e940;border-radius:999px;color:#0284c7;display:inline-flex;flex-shrink:0;font-size:11px;font-weight:800;letter-spacing:.07em;padding:3px 9px;text-transform:uppercase}.dispatch-container .compare-progress{align-items:center;display:flex;gap:8px}.dispatch-container .compare-progress-bar-wrap{background:#0f172a12;border-radius:999px;flex:1 1;height:3px;overflow:hidden}.dispatch-container .compare-progress-bar-fill{background:linear-gradient(90deg,#0ea5e9,#662582);border-radius:999px;height:100%;transition:width .45s cubic-bezier(.4,0,.2,1)}.dispatch-container .compare-progress-bar-fill.is-done{background:linear-gradient(90deg,#22c55e,#16a34a)}.dispatch-container .compare-progress-text{font-feature-settings:"tnum";color:#94a3b8;flex-shrink:0;font-size:12px;font-variant-numeric:tabular-nums;font-weight:700;white-space:nowrap}.dispatch-container .compare-track-legend{border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border,#0f172a12);flex-shrink:0;max-height:150px;overflow-y:auto;scrollbar-color:#64748b40 #0000;scrollbar-width:thin}.dispatch-container .compare-track-legend::-webkit-scrollbar{width:4px}.dispatch-container .compare-track-legend::-webkit-scrollbar-thumb{background:#64748b40;border-radius:999px}.dispatch-container .compare-track-item{align-items:center;border-bottom:1px solid #0f172a0a;display:flex;gap:9px;padding:5px 14px;transition:background .12s}.dispatch-container .compare-track-item:last-child{border-bottom:0}.dispatch-container .compare-track-item:hover{background:rgba(15,23,42,.025)}.dispatch-container .compare-track-num{align-items:center;border-radius:50%;box-shadow:0 2px 6px #0003;color:#fff;display:inline-flex;flex-shrink:0;font-size:9px;font-weight:800;height:20px;justify-content:center;width:20px}.dispatch-container .compare-track-info{flex:1 1;min-width:0}.dispatch-container .compare-track-customer{color:#1e293b;font-size:11px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .compare-track-meta{color:#94a3b8;font-size:10px;font-weight:600;margin-top:1px}.dispatch-container .compare-track-right{align-items:flex-end;display:flex;flex-direction:column;flex-shrink:0;gap:3px}.dispatch-container .compare-track-status{align-items:center;border-radius:999px;display:inline-flex;font-size:8px;font-weight:800;letter-spacing:.05em;padding:1px 6px;text-transform:uppercase}.dispatch-container .compare-track-kms{color:#64748b;font-size:10px;font-weight:700}.dispatch-container .compare-track-no-data{align-items:center;color:#cbd5e1;display:inline-flex;font-size:9px;font-weight:600;gap:4px}.dispatch-container .compare-track-spinner{animation:compare-spin .65s linear infinite;border:1.5px solid #64748b2e;border-radius:50%;border-top-color:#94a3b8;flex-shrink:0;height:9px;width:9px}@keyframes compare-spin{to{transform:rotate(1turn)}}.dispatch-container .compare-overall-card{background:linear-gradient(180deg,#fff,#f8fafc);border-top:1px solid #e2e8f0;border-top:1px solid var(--border,#0f172a12);flex-shrink:0;padding:10px 14px}.dispatch-container .compare-overall-head{align-items:center;display:flex;gap:8px;margin-bottom:9px}.dispatch-container .compare-overall-dot{border-radius:50%;flex-shrink:0;height:11px;width:11px}.dispatch-container .compare-overall-name{color:#0f172a;flex:1 1;font-size:12px;font-weight:800;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .compare-overall-rate{align-items:center;background:#22c55e1a;border:1px solid #22c55e38;border-radius:999px;color:#16a34a;display:inline-flex;flex-shrink:0;font-size:9px;font-weight:800;letter-spacing:.06em;padding:2px 8px;text-transform:uppercase}.dispatch-container .compare-overall-rate.is-partial{background:#f59e0b1a;border-color:#f59e0b40;color:#b45309}.dispatch-container .compare-overall-rate.is-zero{background:#64748b14;border-color:#64748b33;color:#64748b}.dispatch-container .compare-overall-stats{grid-gap:6px;display:grid;gap:6px;grid-template-columns:repeat(5,1fr)}.dispatch-container .compare-overall-stat{background:#0f172a08;border:1px solid #0f172a0f;border-radius:10px;padding:7px 6px 6px;text-align:center;transition:background .15s,transform .15s}.dispatch-container .compare-overall-stat:hover{background:rgba(15,23,42,.055);transform:translateY(-1px)}.dispatch-container .compare-overall-stat-icon{align-items:center;color:#94a3b8;display:flex;font-size:13px;justify-content:center;line-height:1;margin-bottom:3px}.dispatch-container .compare-overall-stat-value{color:#0f172a;font-size:14px;font-weight:800;line-height:1.1}.dispatch-container .compare-overall-stat-unit{color:#94a3b8;font-size:9px;font-weight:700;margin-left:2px}.dispatch-container .compare-overall-stat-label{color:#94a3b8;font-size:9px;font-weight:700;letter-spacing:.06em;margin-top:2px;text-transform:uppercase}.dispatch-container .compare-overall-stat.is-profit{background:#22c55e0f;border-color:#22c55e29}.dispatch-container .compare-overall-stat.is-profit .compare-overall-stat-value{color:#16a34a}.dispatch-container .compare-overall-stat.is-profit .compare-overall-stat-icon{color:#22c55e}.dispatch-container .compare-overall-stat.is-loss{background:#ef44440f;border-color:#ef444429}.dispatch-container .compare-overall-stat.is-loss .compare-overall-stat-value{color:#dc2626}.dispatch-container .compare-overall-stat.is-loss .compare-overall-stat-icon{color:#ef4444}.dispatch-container .compare-header-v2{background:linear-gradient(180deg,#fff,#f8fafc);border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border,#0f172a14);display:flex;flex-direction:column;flex-shrink:0;gap:10px;padding:12px 14px 10px}.dispatch-container .compare-header-row{align-items:center;display:flex;gap:10px;min-width:0}.dispatch-container .compare-header-row .compare-title{align-items:center;color:#0f172a;display:inline-flex;flex:1 1;font-size:16px;font-weight:800;gap:10px;min-width:0}.dispatch-container .compare-header-tools{align-items:center;display:inline-flex;flex-shrink:0;gap:6px}.dispatch-container .compare-overall-btn{align-items:center;background:linear-gradient(135deg,#66258214,#9255ab14);border:1px solid #66258247;border-radius:999px;color:#4d1c61;cursor:pointer;display:inline-flex;font-size:12px;font-weight:800;gap:6px;letter-spacing:.04em;padding:6px 12px;text-transform:uppercase;transition:all .18s ease}.dispatch-container .compare-overall-btn:hover{background:linear-gradient(135deg,#662582,#9255ab);border-color:#662582;box-shadow:0 4px 12px #66258247;color:#fff;transform:translateY(-1px)}.dispatch-container .compare-overall-btn svg{font-size:15px}.dispatch-container .compare-sync-toggle{align-items:center;background:#fff;border:1px solid #e2e8f0;border:1px solid var(--border,#0f172a1f);border-radius:999px;color:#64748b;cursor:pointer;display:inline-flex;font-size:12px;font-weight:800;gap:6px;letter-spacing:.04em;padding:6px 12px;text-transform:uppercase;transition:all .18s ease}.dispatch-container .compare-sync-toggle:hover{border-color:#66258266;color:#4d1c61}.dispatch-container .compare-sync-toggle.is-on{background:linear-gradient(135deg,#22c55e,#16a34a);border-color:#16a34a;box-shadow:0 4px 10px #22c55e38;color:#fff}.dispatch-container .compare-sync-toggle svg{font-size:15px}.dispatch-container .compare-timeline-toggle{align-items:center;background:#fff;border:1px solid #e2e8f0;border:1px solid var(--border,#0f172a1f);border-radius:8px;color:#64748b;cursor:pointer;display:inline-flex;height:30px;justify-content:center;padding:0;transition:background .18s ease,color .18s ease,border-color .18s ease;width:30px}.dispatch-container .compare-timeline-toggle:hover{background:#6625820f;border-color:#66258266;color:#4d1c61}.dispatch-container .compare-timeline-toggle svg{font-size:18px;transition:transform .22s cubic-bezier(.4,0,.2,1)}.dispatch-container .compare-timeline-toggle.is-open svg{color:#4d1c61;transform:rotate(180deg)}.dispatch-container .compare-timeline-wrap{display:flex;flex-direction:column;gap:6px}.dispatch-container .compare-timeline-container{align-items:stretch;background:#0f172a05;border:1px solid #0f172a0f;border-radius:12px;box-shadow:inset 0 1px 2px #0f172a05;display:flex;gap:16px;padding:18px}.dispatch-container .compare-timeline-labels{border-right:1.5px dashed #0f172a14;display:flex;flex-direction:column;flex-shrink:0;gap:16px;justify-content:space-between;padding-right:14px}.dispatch-container .compare-timeline-label{align-items:center;color:#64748b;display:flex;font-size:11px;font-weight:800;height:32px;letter-spacing:.06em;text-transform:uppercase}.dispatch-container .compare-timeline-scrollable{display:flex;flex:1 1;flex-direction:column;gap:16px;overflow-x:auto;padding-bottom:2px;scrollbar-color:#64748b33 #0000;scrollbar-width:thin}.dispatch-container .compare-timeline-scrollable::-webkit-scrollbar{height:4px}.dispatch-container .compare-timeline-scrollable::-webkit-scrollbar-thumb{background:#64748b40;border-radius:999px}.dispatch-container .compare-timeline-track{align-items:center;display:flex;gap:0;position:relative}.dispatch-container .compare-timeline-track.is-actual .compare-step-spacer,.dispatch-container .compare-timeline-track.is-planned .compare-step-spacer{margin-bottom:22px}.dispatch-container .compare-step-spacer{background:linear-gradient(90deg,#94a3b800,#94a3b88c 30%,#94a3b88c 70%,#94a3b800);flex-shrink:0;height:2px;width:16px}.dispatch-container .compare-step{align-items:center;background:#0000;border:0;cursor:pointer;display:inline-flex;flex-direction:column;flex-shrink:0;gap:11px;padding:2px 2px 0;position:relative;transition:transform .18s ease}.dispatch-container .compare-step:hover{transform:translateY(-1px)}.dispatch-container .compare-step-circle{align-items:center;background:#94a3b8;background:var(--step-color,#94a3b8);border-radius:50%;box-shadow:0 2px 6px #0f172a24,0 0 0 1px #fff9;color:#fff;display:inline-flex;font-size:13px;font-weight:800;height:32px;justify-content:center;transition:transform .18s ease,box-shadow .18s ease,background .18s ease;width:32px}.dispatch-container .compare-step:hover .compare-step-circle{box-shadow:0 4px 10px #0f172a33,0 0 0 1px #fff9;transform:scale(1.08)}.dispatch-container .compare-step.is-focused .compare-step-circle{box-shadow:0 4px 10px #0f172a38,0 0 0 2px #fff,0 0 0 4px #662582;box-shadow:0 4px 10px #0f172a38,0 0 0 2px #fff,0 0 0 4px var(--step-color,#662582);transform:scale(1.18)}.dispatch-container .compare-step.is-focused .compare-step-tick{color:#4d1c61;color:var(--step-color,#4d1c61);font-weight:800}.dispatch-container .compare-step.is-pending .compare-step-circle{background:#fff;border:2px solid #cbd5e1;border:2px solid var(--step-color,#cbd5e1);box-shadow:0 1px 3px #0f172a14;color:#94a3b8;color:var(--step-color,#94a3b8)}.dispatch-container .compare-step.is-skipped .compare-step-circle{background:#cbd5e1;opacity:.42}.dispatch-container .compare-step.is-loading .compare-step-circle{background:#fff;border:2px solid #66258273;color:#0000}.dispatch-container .compare-step.is-no-data .compare-step-circle{background:repeating-linear-gradient(45deg,#e2e8f0 0 4px,#f1f5f9 4px 8px);color:#94a3b8}.dispatch-container .compare-step-spin{animation:compare-step-spin .7s linear infinite;border:2px solid #6625822e;border-radius:50%;border-top-color:#662582;height:14px;width:14px}@keyframes compare-step-spin{to{transform:rotate(1turn)}}.dispatch-container .compare-step-tick{font-feature-settings:"tnum";color:#64748b;font-size:11px;font-variant-numeric:tabular-nums;font-weight:700;letter-spacing:-.01em;line-height:1}.dispatch-container .compare-step-flag{background:#dc2626;border:1.5px solid #fff;border-radius:50%;box-shadow:0 2px 4px #dc262673;height:8px;position:absolute;right:-2px;top:-2px;width:8px}.dispatch-container .compare-progress-strip{align-items:center;display:flex;gap:8px}.dispatch-container .compare-legend{align-items:center;border-top:1px dashed #0f172a0f;display:flex;flex-wrap:wrap;gap:14px;padding-top:2px}.dispatch-container .compare-legend-item{align-items:center;color:#64748b;display:inline-flex;font-size:12px;font-weight:700;gap:7px;letter-spacing:.02em}.dispatch-container .compare-legend-swatch{border-radius:2px;flex-shrink:0;height:4px;width:22px}.dispatch-container .compare-legend-swatch.is-planned{background:repeating-linear-gradient(90deg,#662582 0 5px,#0000 5px 9px);height:3px}.dispatch-container .compare-legend-swatch.is-actual{background:linear-gradient(90deg,currentColor,currentColor);height:4px}.dispatch-container .compare-legend-swatch.is-step-color{border-radius:2px;height:4px}.dispatch-container .compare-legend-swatch.is-step-color.is-dashed{-webkit-mask-image:repeating-linear-gradient(90deg,#000 0 5px,#0000 5px 9px);mask-image:repeating-linear-gradient(90deg,#000 0 5px,#0000 5px 9px)}.dispatch-container .compare-legend-note{color:#94a3b8;font-size:11px;font-weight:700;letter-spacing:.04em;margin-left:auto;overflow:hidden;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.dispatch-container .compare-legend-swatch.is-transit{background:repeating-linear-gradient(90deg,#94a3b8 0 3px,#0000 3px 6px);height:2px}.dispatch-container .compare-delta{animation:compare-delta-in .22s cubic-bezier(.4,0,.2,1);background:linear-gradient(180deg,#fff,#f8fafc);border-top:1px solid #e2e8f0;border-top:1px solid var(--border,#0f172a12);display:flex;flex-direction:column;flex-shrink:0;gap:10px;padding:12px 14px 14px}.dispatch-container .compare-delta.is-anomaly{background:linear-gradient(180deg,#fff,#fef2f2);border-top-color:#dc262640}@keyframes compare-delta-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.dispatch-container .compare-delta-title{align-items:center;display:flex;gap:10px;min-width:0}.dispatch-container .compare-delta-step-badge{align-items:center;background:#662582;border-radius:50%;box-shadow:0 3px 10px #0f172a26,0 0 0 1px #ffffff80;color:#fff;display:inline-flex;flex-shrink:0;font-size:14px;font-weight:800;height:32px;justify-content:center;width:32px}.dispatch-container .compare-delta-step-badge svg{font-size:17px}.dispatch-container .compare-delta-title-text{flex:1 1;min-width:0}.dispatch-container .compare-delta-title-main{color:#0f172a;font-size:16px;font-weight:800;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .compare-delta-title-sub{color:#94a3b8;font-size:13px;font-weight:600;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .compare-delta-status{align-items:center;border-radius:999px;display:inline-flex;flex-shrink:0;font-size:11px;font-weight:800;letter-spacing:.07em;padding:4px 11px;text-transform:uppercase}.dispatch-container .compare-delta-grid{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr)}.dispatch-container .compare-delta-cell{background:#fff;border:1px solid #e2e8f0;border:1px solid var(--border,#0f172a14);border-radius:12px;display:flex;flex-direction:column;gap:4px;padding:11px 13px 10px;transition:transform .18s ease,box-shadow .18s ease}.dispatch-container .compare-delta-cell:hover{box-shadow:0 4px 12px #0f172a0f;transform:translateY(-1px)}.dispatch-container .compare-delta-cell.is-anomaly{background:linear-gradient(180deg,#fff,#fef2f2);border-color:#dc26266b;box-shadow:inset 0 0 0 1px #dc26262e}.dispatch-container .compare-delta-cell-label{color:#94a3b8;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.dispatch-container .compare-delta-cell-val{font-feature-settings:"tnum";color:#0f172a;font-size:22px;font-variant-numeric:tabular-nums;font-weight:800;line-height:1.15}.dispatch-container .compare-delta-cell-val.is-over{color:#dc2626}.dispatch-container .compare-delta-cell-val.is-under{color:#16a34a}.dispatch-container .compare-delta-cell-unit{color:#94a3b8;font-size:13px;font-weight:700;margin-left:2px}.dispatch-container .compare-delta-cell-sub{color:#64748b;font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .compare-step-pin{align-items:center;background:#475569;background:var(--pin-color,#475569);border:3px solid #fff;border-radius:50%;box-shadow:0 4px 12px #00000052,0 0 0 1px #ffffff2e;color:#fff;cursor:pointer;display:flex;font-size:13px;font-weight:800;height:34px;justify-content:center;position:relative;transition:transform .2s cubic-bezier(.4,0,.2,1),box-shadow .2s ease;width:34px}.dispatch-container .compare-step-pin:hover{transform:scale(1.08);z-index:1200}.dispatch-container .compare-step-pin-num{line-height:1;position:relative;z-index:1}.dispatch-container .compare-step-pin.is-skipped{filter:grayscale(.6);opacity:.45}.dispatch-container .compare-step-pin.is-focused{animation:compare-pin-pulse 1.6s ease-in-out infinite;box-shadow:0 8px 22px #0f172a61,0 0 0 3px #fff,0 0 0 5px #662582,0 0 18px 6px color-mix(in srgb,#662582 35%,#0000);box-shadow:0 8px 22px #0f172a61,0 0 0 3px #fff,0 0 0 5px var(--pin-color,#662582),0 0 18px 6px color-mix(in srgb,var(--pin-color,#662582) 35%,#0000);transform:scale(1.22);z-index:1300}.dispatch-container .compare-step-pin.is-focused:hover{transform:scale(1.3)}.dispatch-container .compare-step-pin.is-focused:before{animation:compare-pin-halo 1.6s ease-out infinite;border:2px solid #662582;border:2px solid var(--pin-color,#662582);border-radius:50%;content:"";inset:-6px;opacity:.65;pointer-events:none;position:absolute}@keyframes compare-pin-pulse{0%,to{box-shadow:0 8px 22px #0f172a61,0 0 0 3px #fff,0 0 0 5px #662582,0 0 18px 6px color-mix(in srgb,#662582 35%,#0000);box-shadow:0 8px 22px #0f172a61,0 0 0 3px #fff,0 0 0 5px var(--pin-color,#662582),0 0 18px 6px color-mix(in srgb,var(--pin-color,#662582) 35%,#0000)}50%{box-shadow:0 10px 28px #0f172a80,0 0 0 3px #fff,0 0 0 6px #662582,0 0 28px 10px color-mix(in srgb,#662582 55%,#0000);box-shadow:0 10px 28px #0f172a80,0 0 0 3px #fff,0 0 0 6px var(--pin-color,#662582),0 0 28px 10px color-mix(in srgb,var(--pin-color,#662582) 55%,#0000)}}@keyframes compare-pin-halo{0%{inset:-2px;opacity:.7}to{inset:-16px;opacity:0}}.dispatch-container .compare-step-pin.is-anomaly{box-shadow:0 4px 14px #dc262659,0 0 0 1px #ffffff2e,0 0 0 3px #fff,0 0 0 5px #dc2626}.dispatch-container .compare-step-pin.is-anomaly.is-focused{animation:compare-pin-pulse-anomaly 1.4s ease-in-out infinite;box-shadow:0 8px 22px #dc262680,0 0 0 3px #fff,0 0 0 5px #dc2626,0 0 22px 8px #dc262673}@keyframes compare-pin-pulse-anomaly{0%,to{box-shadow:0 8px 22px #dc262680,0 0 0 3px #fff,0 0 0 5px #dc2626,0 0 22px 8px #dc262673}50%{box-shadow:0 10px 28px #dc2626a6,0 0 0 3px #fff,0 0 0 6px #dc2626,0 0 32px 12px #dc26268c}}.dispatch-container .compare-step-pin-check{background:#16a34a;border:1.5px solid #fff;border-radius:50%;bottom:-3px;box-shadow:0 2px 5px #0f172a57;height:14px;padding:1px;position:absolute;right:-3px;width:14px;z-index:2}.dispatch-container .compare-start-pin{align-items:center;background:#fff;border:3px solid #475569;border:3px solid var(--pin-color,#475569);border-radius:50%;box-shadow:0 5px 14px #0f172a52,0 0 0 1px #fff9;color:#475569;color:var(--pin-color,#475569);cursor:pointer;display:flex;height:40px;justify-content:center;transition:transform .18s ease,box-shadow .18s ease;width:40px}.dispatch-container .compare-start-pin:hover{box-shadow:0 7px 20px #0f172a66,0 0 0 1px #ffffffb3;transform:scale(1.1);z-index:1100}.dispatch-container .compare-start-pin svg{display:block;height:22px;width:22px}.dispatch-container .compare-tooltip{-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#0f172af2;border:0;border-radius:12px;box-shadow:0 10px 30px #0f172a66,0 0 0 1px #ffffff0f;color:#f8fafc;font-family:inherit;padding:0;white-space:normal}.dispatch-container .compare-tooltip.leaflet-tooltip-top:before{border-top-color:#0f172af2}.dispatch-container .compare-tooltip.leaflet-tooltip-bottom:before{border-bottom-color:#0f172af2}.dispatch-container .compare-tooltip.leaflet-tooltip-left:before{border-left-color:#0f172af2}.dispatch-container .compare-tooltip.leaflet-tooltip-right:before{border-right-color:#0f172af2}.dispatch-container .cmp-tip{max-width:260px;min-width:200px;padding:9px 12px 8px}.dispatch-container .cmp-tip-header{align-items:center;display:flex;gap:9px;min-width:0}.dispatch-container .cmp-tip-step{align-items:center;background:#662582;border-radius:50%;box-shadow:0 2px 6px #0000004d;color:#fff;display:inline-flex;flex-shrink:0;font-size:11px;font-weight:800;height:24px;justify-content:center;width:24px}.dispatch-container .cmp-tip-step svg{font-size:14px}.dispatch-container .cmp-tip-title-stack{flex:1 1;min-width:0}.dispatch-container .cmp-tip-title{color:#f8fafc;font-size:12px;font-weight:800;letter-spacing:.01em;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cmp-tip-sub{color:#cbd5e1;font-size:10px;font-weight:600;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cmp-tip-tag{align-items:center;border-radius:999px;display:inline-flex;flex-shrink:0;font-size:8px;font-weight:800;letter-spacing:.08em;padding:2px 7px;text-transform:uppercase}.dispatch-container .cmp-tip-anomaly{background:#dc262629;border:1px solid #dc262652;border-radius:8px;color:#fecaca;font-size:10px;font-weight:700;letter-spacing:.02em;margin-top:7px;padding:5px 8px}.dispatch-container .cmp-tip-action{border-top:1px solid #ffffff1a;color:#94a3b8;font-size:9px;font-weight:700;letter-spacing:.08em;margin-top:7px;padding-top:6px;text-align:center;text-transform:uppercase}.dispatch-container .compare-popup .leaflet-popup-content-wrapper{background:#fff;border-radius:14px;box-shadow:0 12px 32px #0f172a38,0 0 0 1px #0f172a0f;overflow:hidden;padding:0}.dispatch-container .compare-popup .leaflet-popup-content{margin:0;min-width:240px;width:auto!important}.dispatch-container .compare-popup .leaflet-popup-tip{background:#fff;box-shadow:0 6px 18px #0f172a2e}.dispatch-container .compare-popup .leaflet-popup-close-button{color:#94a3b8;font-size:18px;font-weight:700;padding:4px 6px;right:6px;top:6px}.dispatch-container .compare-popup .leaflet-popup-close-button:hover{color:#0f172a}.dispatch-container .cmp-pop{color:#0f172a;font-family:Inter,-apple-system,sans-serif;line-height:1.35}.dispatch-container .cmp-pop-head{align-items:center;background:linear-gradient(180deg,#f8fafc,#fff);border-bottom:1px solid #0f172a0f;display:flex;gap:10px;padding:12px 32px 12px 14px}.dispatch-container .cmp-pop-pin{align-items:center;border:2.5px solid #fff;border-radius:50%;box-shadow:0 3px 10px #0003;color:#fff;display:flex;flex-shrink:0;font-size:13px;font-weight:800;height:30px;justify-content:center;width:30px}.dispatch-container .cmp-pop-titles{flex:1 1;min-width:0}.dispatch-container .cmp-pop-title{color:#0f172a;font-size:13px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cmp-pop-sub{color:#64748b;font-size:9.5px;font-weight:700;letter-spacing:.05em;margin-top:2px;text-transform:uppercase}.dispatch-container .cmp-pop-tag{background:#e0e7ff;border-radius:999px;color:#4d1c61;flex-shrink:0;font-size:9px;font-weight:800;letter-spacing:.06em;padding:3px 8px;text-transform:uppercase;white-space:nowrap}.dispatch-container .cmp-pop-tag-start{background:#ecfeff;color:#0e7490}.dispatch-container .cmp-pop-rows{display:flex;flex-direction:column;padding:8px 14px 12px}.dispatch-container .cmp-pop-row{align-items:center;border-bottom:1px dashed #0f172a12;display:flex;font-size:12px;gap:12px;justify-content:space-between;padding:6px 0}.dispatch-container .cmp-pop-row:last-child{border-bottom:0}.dispatch-container .cmp-pop-k{color:#64748b;font-weight:600;white-space:nowrap}.dispatch-container .cmp-pop-v{font-feature-settings:"tnum";color:#0f172a;font-variant-numeric:tabular-nums;font-weight:700;text-align:right}.dispatch-container .cmp-pop-v.is-loss{color:#dc2626}.dispatch-container .cmp-pop-v.is-profit{color:#16a34a}.dispatch-container .cmp-pop-coord{color:#475569;font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10.5px;font-weight:600}.dispatch-container .leaflet-container{background:#f1f5f9!important}.dispatch-container #ov-tl{left:16px;position:absolute;top:16px;z-index:1000}.dispatch-container .ov-card{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#ffffffe6;border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:16px;box-shadow:0 10px 25px -5px #00000014;box-shadow:var(--shadow-lg);padding:16px 20px}.dispatch-container .ov-stats{display:flex;gap:24px}.dispatch-container .osv{font-size:24px;font-weight:800}.dispatch-container .osv.g{color:#22c55e;color:var(--success)}.dispatch-container .osl{color:#64748b;color:var(--text-muted);font-size:11px;font-weight:700;margin-top:2px;text-transform:uppercase}.dispatch-container #ov-tr{display:flex;flex-direction:column;gap:8px;position:absolute;right:16px;top:16px;width:200px;z-index:1000}.dispatch-container #body.compare-mode #ov-tr{display:none!important}.dispatch-container #ov-br{bottom:20px;position:absolute;right:80px;z-index:1000}.dispatch-container .rchip{align-items:center;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#ffffffe6;border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:10px;box-shadow:0 4px 12px #0000000d;box-shadow:var(--shadow);cursor:pointer;display:flex;font-size:12px;font-weight:600;gap:8px;padding:8px 12px;transition:all .2s}.dispatch-container .rchip.active{background:#fff;border-color:#9255ab;border-color:var(--accent);box-shadow:0 4px 12px #9255ab26}.dispatch-container .rchip-dot{border-radius:50%;height:8px;width:8px}.dispatch-container .rchip-n{font-feature-settings:"tnum","tnum";color:#9255ab;color:var(--accent);font-variant-numeric:tabular-nums;font-weight:800;margin-left:auto;white-space:nowrap}.dispatch-container .rchip-n.is-done{color:#16a34a}.dispatch-container .kitchen-mark{align-items:center;background:#f59e0b;background:var(--kitchen);border:3px solid #fff;border-radius:50%;box-shadow:0 0 20px #f59e0bcc,0 0 40px #f59e0b66;color:#fff;display:flex;font-size:18px;font-weight:900;height:46px;justify-content:center;width:46px}.dispatch-container .kitchen-mark.is-focused{animation:kitchen-mark-pulse 1.8s ease-in-out infinite;border-width:4px;font-size:22px;height:56px;width:56px}@keyframes kitchen-mark-pulse{0%,to{box-shadow:0 0 20px #f59e0be6,0 0 40px #f59e0b80,0 0 0 0 #f59e0b8c}50%{box-shadow:0 0 30px #f59e0b,0 0 60px #f59e0bb3,0 0 0 18px #f59e0b00}}.dispatch-container .leaflet-popup-content-wrapper{background:#fff;border-radius:12px;box-shadow:0 10px 25px -5px #00000026;color:#1e293b;padding:0}.dispatch-container .leaflet-popup-tip-container{bottom:-10px;height:10px;left:50%;margin-left:-10px;overflow:hidden;position:absolute;width:20px}.dispatch-container .leaflet-popup-tip{background:#fff;box-shadow:none;height:14px;margin:-10px auto 0;padding:0;transform:rotate(45deg);width:14px}.dispatch-container .pu-id{align-items:center;background:#f8fafc;border-bottom:1px solid #e2e8f0;border-radius:12px 12px 0 0;color:#64748b;display:flex;font-size:10px;font-weight:800;gap:6px;letter-spacing:.08em;padding:10px 14px}.dispatch-container .pu-live-dot{animation:pu-pulse 1.2s ease-in-out infinite;background:#22c55e;border-radius:50%;box-shadow:0 0 0 2px #22c55e33;height:6px;width:6px}@keyframes pu-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.2)}}.dispatch-container .pu-rider-wrap{align-items:center;display:flex;gap:8px;padding:14px 14px 8px}.dispatch-container .pu-rider-indicator{border-radius:50%;box-shadow:0 0 6px #00000026;flex-shrink:0;height:8px;width:8px}.dispatch-container .pu-rider-name{color:#0f172a;font-size:14.5px;font-weight:800;letter-spacing:-.01em}.dispatch-container .pu-body-content{display:flex;flex-direction:column;gap:6px;padding:0 14px 12px}.dispatch-container .pu-row{align-items:center;color:#64748b;display:flex;font-size:12px;justify-content:space-between;padding:2px 0}.dispatch-container .pu-row span:first-child{color:#64748b;flex-shrink:0;font-size:11px;font-weight:600;letter-spacing:.02em;margin-right:12px;text-transform:uppercase}.dispatch-container .pu-row span:last-child{color:#334155;font-weight:600;max-width:70%;overflow-wrap:anywhere;text-align:right;word-break:break-word}.dispatch-container .pu-status-tag{align-items:center;border-radius:6px;display:inline-flex;font-size:10.5px;font-weight:800;letter-spacing:.02em;padding:2px 8px;text-transform:uppercase}.dispatch-container .pu-status-tag.is-idle{background:#f1f5f9;color:#475569}.dispatch-container .pu-status-tag.is-active{background:#e0f2fe;color:#0284c7}.dispatch-container .pu-status-tag.is-delivered{background:#dcfce7;color:#16a34a}.dispatch-container .pu-status-tag.is-generic{background:#f1f5f9;color:#475569}.dispatch-container .pu-order-tag{background:#f5f3ff;border-radius:4px;color:#4f46e5!important;font-family:JetBrains Mono,monospace;font-size:11px;font-weight:700!important;padding:1px 6px}.dispatch-container .pu-phone-tag{color:#334155;font-family:JetBrains Mono,monospace;font-size:11.5px}.dispatch-container .pu-coord-tag{color:#64748b!important;font-family:JetBrains Mono,monospace;font-size:10.5px}.dispatch-container .live-rider-popup .leaflet-popup-content-wrapper{animation:dispatch-popup-in .18s cubic-bezier(.4,0,.2,1);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#fffffff2;border:1px solid #ffffffd9;border-radius:16px;box-shadow:0 20px 48px #0f172a38;max-width:280px;min-width:260px;overflow:hidden;padding:0}.dispatch-container .live-rider-popup .leaflet-popup-content{margin:0;min-width:260px}.dispatch-container .live-rider-popup .pu-hdr-live{align-items:center;background:#f8fafc;border-bottom:1px solid #e2e8f0;display:flex;justify-content:space-between;padding:10px 14px}.dispatch-container .live-rider-popup .pu-hdr-left{align-items:center;display:flex;gap:8px}.dispatch-container .live-rider-popup .pu-live-indicator{align-items:center;display:inline-flex;justify-content:center;position:relative}.dispatch-container .live-rider-popup .pu-live-dot{background-color:#dc2626;background-color:var(--pulse-color,#dc2626);border-radius:50%;height:7px;width:7px;z-index:2}.dispatch-container .live-rider-popup .pu-live-indicator:after{animation:pu-pulse-ring 1.8s cubic-bezier(.4,0,.2,1) infinite;border:2px solid #dc2626;border:2px solid var(--pulse-color,#dc2626);border-radius:50%;content:"";height:15px;opacity:0;position:absolute;width:15px;z-index:1}@keyframes pu-pulse-ring{0%{opacity:.8;transform:scale(.5)}to{opacity:0;transform:scale(1.6)}}.dispatch-container .live-rider-popup .pu-hdr-title{color:#64748b;font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}.dispatch-container .live-rider-popup .pu-status-badge{border-radius:999px;box-shadow:0 1px 3px #0000000d;font-size:9px;font-weight:800;letter-spacing:.04em;padding:2px 8px;text-transform:uppercase}.dispatch-container .live-rider-popup .pu-status-badge.active{background:#e0f2fe;color:#0369a1}.dispatch-container .live-rider-popup .pu-status-badge.idle{background:#f1f5f9;color:#475569}.dispatch-container .live-rider-popup .pu-rider-profile{align-items:center;background:linear-gradient(180deg,#f8fafc80,#fff0);display:flex;gap:12px;padding:14px 16px 10px}.dispatch-container .live-rider-popup .pu-avatar{align-items:center;border-radius:10px;box-shadow:inset 0 1px 2px #fff3;display:flex;font-size:20px;height:38px;justify-content:center;width:38px}.dispatch-container .live-rider-popup .pu-rider-info-text{display:flex;flex-direction:column;gap:2px}.dispatch-container .live-rider-popup .pu-rider-name{color:#0f172a;font-size:15px;font-weight:800;letter-spacing:-.01em;line-height:1.2}.dispatch-container .live-rider-popup .pu-rider-name-row{align-items:center;display:flex;flex-wrap:wrap;gap:8px}.dispatch-container .live-rider-popup .pu-rider-meta{color:#94a3b8;font-size:10px;font-weight:600;letter-spacing:.02em}.dispatch-container .live-rider-popup .pu-body-content{display:flex;flex-direction:column;gap:8px;padding:4px 16px 16px}.dispatch-container .live-rider-popup .pu-info-row{align-items:center;border-bottom:1px dashed #f1f5f9;display:flex;justify-content:space-between;padding:4px 0}.dispatch-container .live-rider-popup .pu-info-row:last-child{border-bottom:none;padding-bottom:0}.dispatch-container .live-rider-popup .pu-info-label{color:#94a3b8;font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.dispatch-container .live-rider-popup .pu-info-value{color:#334155;font-size:12px;font-weight:700;text-align:right}.dispatch-container .live-rider-popup .pu-order-badge{background:#f5f3ff;border:1px solid #4f46e51f;border-radius:6px;color:#4f46e5;font-family:JetBrains Mono,monospace;font-size:11px;font-weight:800;padding:2px 8px}.dispatch-container .live-rider-popup .pu-phone-link{color:#0284c7;font-family:JetBrains Mono,monospace;font-weight:700;text-decoration:none;transition:color .15s ease}.dispatch-container .live-rider-popup .pu-phone-link:hover{color:#0369a1;text-decoration:underline}.dispatch-container .live-rider-popup .pu-time-stamp{align-items:center;color:#475569;display:inline-flex;gap:4px}.dispatch-container .live-rider-popup .pu-time-stamp .inline-icon{color:#64748b;font-size:13px}.dispatch-container .live-rider-popup .pu-coordinates{background:#f8fafc;border:1px solid #e2e8f0;border-radius:4px;color:#64748b;font-family:JetBrains Mono,monospace;font-size:11px;padding:2px 6px}.dispatch-container .pu-section-label{border-bottom:1px solid #7b1fa22e;color:#7b1fa2;font-size:10px;font-weight:700;letter-spacing:.06em;margin:10px 14px 4px;padding-bottom:4px;text-transform:uppercase}.dispatch-container .pu-timeline{display:flex;flex-direction:column;gap:5px;padding:4px 14px 4px 16px;position:relative}.dispatch-container .pu-timeline:before{background:#7b1fa22e;bottom:8px;content:"";left:19px;position:absolute;top:8px;width:1px}.dispatch-container .pu-tl-row{align-items:center;display:flex;font-size:11px;gap:8px;position:relative;z-index:1}.dispatch-container .pu-tl-dot{background:#fff;border:2px solid #7b1fa273;border-radius:50%;box-sizing:border-box;flex-shrink:0;height:8px;width:8px}.dispatch-container .pu-tl-row.delivered .pu-tl-dot{background:#16a34a;border-color:#16a34a;box-shadow:0 0 0 3px #16a34a2e}.dispatch-container .pu-tl-label{color:#64748b;flex:1 1;font-weight:500}.dispatch-container .pu-tl-row.delivered .pu-tl-label{color:#16a34a;font-weight:700}.dispatch-container .pu-tl-time{font-feature-settings:"tnum","tnum";color:#1e293b;font-variant-numeric:tabular-nums;font-weight:700}.dispatch-container .dispatch-popup .leaflet-popup-content{margin:0;width:auto!important}.dispatch-container .dispatch-popup .leaflet-popup-content-wrapper{animation:dispatch-popup-in .18s cubic-bezier(.4,0,.2,1);border-radius:14px;box-shadow:0 18px 40px #0f172a2e;min-width:580px;overflow:hidden;padding:0}.dispatch-container .dispatch-popup .leaflet-popup-tip{animation:dispatch-popup-in .18s cubic-bezier(.4,0,.2,1)}@keyframes dispatch-popup-in{0%{opacity:0;transform:translateY(4px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.dispatch-container .dispatch-popup .leaflet-popup-content{min-width:580px}.dispatch-container .dispatch-popup-center{animation:dispatch-popup-in .18s cubic-bezier(.4,0,.2,1);display:flex;left:50%;max-height:calc(100vh - 32px);max-width:calc(100vw - 32px);pointer-events:auto;position:fixed;top:50%;transform:translate(-50%,-50%);z-index:1700}.dispatch-container .dispatch-popup-center .dispatch-popup-card{background:#fff;border-radius:14px;box-shadow:0 24px 60px #0f172a47;max-height:calc(100vh - 32px);max-width:680px;min-width:min(580px,calc(100vw - 32px));overflow-x:hidden;overflow-y:auto;position:relative}.dispatch-container .dispatch-popup-center-close{align-items:center;background:#fff3;border:0;border-radius:50%;color:#fff;cursor:pointer;display:flex;font-size:20px;font-weight:700;height:26px;justify-content:center;line-height:1;padding:0;position:absolute;right:8px;top:8px;transition:background .15s ease;width:26px;z-index:2}.dispatch-container .dispatch-popup-center-close:hover{background:#ffffff59}.dispatch-container .dispatch-popup-center .dispatch-popup .pu-header{padding-right:44px}.dispatch-container .dispatch-popup .pu-header{background:linear-gradient(135deg,#7b1fa2,#9c27b0 50%,#ab47bc);border-radius:12px 12px 0 0;color:#fff;padding:14px 16px 12px}.dispatch-container .dispatch-popup .pu-header-top{align-items:center;display:flex;gap:10px;justify-content:space-between;margin-bottom:8px}.dispatch-container .dispatch-popup .pu-id{background:#0000;border:0;border-radius:0;color:#fffffff2;font-size:12px;font-weight:800;letter-spacing:.06em;overflow:hidden;padding:0;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.dispatch-container .dispatch-popup .pu-status-chip{border-radius:999px;box-shadow:0 2px 6px #0000002e;flex-shrink:0;font-size:10px;font-weight:800;letter-spacing:.06em;padding:4px 10px;text-transform:uppercase;white-space:nowrap}.dispatch-container .dispatch-popup .pu-rider{align-items:center;color:#fff!important;display:flex;font-size:16px;font-weight:800;gap:6px;letter-spacing:-.01em;padding:0}.dispatch-container .dispatch-popup .pu-rider svg{font-size:18px;opacity:.9}.dispatch-container .dispatch-popup .pu-rider span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .dispatch-popup .pu-customer{align-items:center;color:#ffffffeb;display:flex;font-size:13px;font-weight:600;gap:6px;letter-spacing:-.005em;margin-top:4px;max-width:100%;padding:0}.dispatch-container .dispatch-popup .pu-customer svg{flex:0 0 auto;font-size:14px;opacity:.85}.dispatch-container .dispatch-popup .pu-customer span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .dispatch-popup .pu-delivery-id{color:#ffffffd9;font-size:11px;font-weight:600;letter-spacing:.04em;margin-top:6px}.dispatch-container .dispatch-popup .pu-body{padding:4px 16px 12px}.dispatch-container .dispatch-popup .pu-section{margin-top:8px}.dispatch-container .dispatch-popup .pu-section-label{border-bottom:1px solid #7b1fa22e;color:#7b1fa2;font-size:10px;font-weight:800;letter-spacing:.08em;margin:0 0 6px;padding-bottom:4px;text-transform:uppercase}.dispatch-container .dispatch-popup .pu-timeline{grid-column-gap:14px;grid-row-gap:4px;column-gap:14px;display:grid;grid-template-columns:1fr 1fr;padding:2px 0;position:relative;row-gap:4px}.dispatch-container .dispatch-popup .pu-timeline:before{display:none}.dispatch-container .dispatch-popup .pu-details-grid{grid-gap:8px;display:grid;gap:8px;grid-template-columns:1fr 1fr}.dispatch-container .dispatch-popup .pu-detail{align-items:flex-start;background:#7b1fa20d;border:1px solid #7b1fa21f;border-radius:10px;display:flex;gap:8px;min-width:0;padding:8px 10px}.dispatch-container .dispatch-popup .pu-detail-icon{align-items:center;background:#7b1fa21f;border-radius:7px;color:#7b1fa2;display:flex;flex-shrink:0;font-size:14px;height:26px;justify-content:center;width:26px}.dispatch-container .dispatch-popup .pu-detail-icon svg{font-size:15px}.dispatch-container .dispatch-popup .pu-detail-body{flex:1 1;min-width:0}.dispatch-container .dispatch-popup .pu-detail-label{color:#64748b;font-size:9px;font-weight:700;letter-spacing:.06em;margin-bottom:2px;text-transform:uppercase}.dispatch-container .dispatch-popup .pu-detail-value{color:#1e293b;font-size:12px;font-weight:700;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .dispatch-popup .pu-distance-row{border-top:1px dashed #7b1fa22e;display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;padding-top:8px}.dispatch-container .dispatch-popup .pu-distance-chip{align-items:center;background:linear-gradient(135deg,#7b1fa214,#9c27b00f);border:1px solid #7b1fa233;border-radius:999px;display:inline-flex;font-size:11px;font-weight:600;gap:5px;padding:5px 10px}.dispatch-container .dispatch-popup .pu-distance-icon{color:#7b1fa2;display:inline-flex}.dispatch-container .dispatch-popup .pu-distance-icon svg{font-size:14px}.dispatch-container .dispatch-popup .pu-distance-label{color:#64748b;font-size:10px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}.dispatch-container .dispatch-popup .pu-distance-value{font-feature-settings:"tnum";color:#1e293b;font-variant-numeric:tabular-nums;font-weight:800}.dispatch-container .kitchen-popup .kp-header{background:#f8fafc;border-bottom:1px solid #e2e8f0;border-radius:12px 12px 0 0;color:#64748b;font-size:10px;font-weight:800;letter-spacing:.1em;padding:8px 14px}.dispatch-container .kitchen-popup .kp-name{color:#f59e0b;color:var(--kitchen);font-size:16px;font-weight:800;padding:14px 14px 4px}.dispatch-container .kitchen-popup .kp-stat{display:flex;justify-content:space-between;padding:8px 14px 16px}.dispatch-container .kitchen-popup .kp-stat-lbl{color:#64748b;font-size:12px}.dispatch-container .kitchen-popup .kp-stat-val{color:#1e293b;font-size:16px;font-weight:800}.dispatch-container .empty-slot{align-items:center;display:flex;flex-direction:column;gap:10px;justify-content:center;padding:48px 24px;text-align:center}.dispatch-container .empty-slot-icon{color:#e2e8f0;color:var(--border);font-size:36px;line-height:1}.dispatch-container .empty-slot-title{color:#64748b;color:var(--text-muted);font-size:14px;font-weight:700}.dispatch-container .empty-slot-sub{color:#e2e8f0;color:var(--border);font-size:12px;font-weight:500;line-height:1.5;max-width:220px}.dispatch-container #desc{background:#fff;background:var(--bg);border-top:1px solid #e2e8f0;border-top:1px solid var(--border);color:#64748b;color:var(--text-muted);font-size:12px;font-weight:500;padding:16px 20px}@media (max-width:1280px){.dispatch-container #sidebar{flex-basis:360px;width:360px}.dispatch-container .sidebar-toggle-tab{left:360px}.dispatch-container .sidebar-toggle-tab.is-collapsed{left:0}}@media (max-width:1180px){.dispatch-container #sidebar{flex-basis:320px;width:320px}.dispatch-container .sidebar-toggle-tab{left:320px}.dispatch-container .sidebar-toggle-tab.is-collapsed{left:0}.dispatch-container .rd-rider-name{font-size:24px}.dispatch-container .rd-stat-value,.dispatch-container .sb-tile-value{font-size:20px}.dispatch-container #hdr{padding:0 16px}.dispatch-container #strat-row{gap:6px;padding:0 16px}.dispatch-container #batch-row{padding:8px 16px}.dispatch-container .sbt{font-size:12px;gap:6px;padding:7px 11px}}@media (max-width:1080px){.dispatch-container #sidebar{flex-basis:290px;width:290px}.dispatch-container .sidebar-toggle-tab{left:290px}.dispatch-container .sidebar-toggle-tab.is-collapsed{left:0}.dispatch-container .logo-city,.dispatch-container .logo-city-wrap{display:none}.dispatch-container .logo-name{font-size:16px}.dispatch-container #clock{font-size:12px;padding:5px 10px}.dispatch-container .hdr-stats{gap:6px;margin-right:8px}.dispatch-container .strat-stat{font-size:11px;gap:4px;padding:5px 9px}.dispatch-container .strat-stat-label{display:none}.dispatch-container .live-status{font-size:11px;padding:5px 8px}.dispatch-container .live-status-sub{display:none}.dispatch-container .sbt{font-size:12px;gap:5px;padding:7px 10px}.dispatch-container .sbt .sbt-icon{font-size:16px;height:16px;width:16px}.dispatch-container .batch-btn{font-size:11px;gap:4px;padding:5px 9px}.dispatch-container .batch-btn-count{font-size:9px;height:16px;min-width:18px;padding:0 4px}.dispatch-container .sb-header{padding:14px 14px 12px}.dispatch-container .sb-tile-value{font-size:18px}.dispatch-container .sb-tile{gap:8px;padding:8px 10px}.dispatch-container .sb-tile-icon{font-size:16px;height:28px;width:28px}.dispatch-container .rcard{padding:12px}.dispatch-container .rcard-name{font-size:13px}.dispatch-container .rcard-zone{font-size:11px}.dispatch-container .step-wrap{padding:12px}.dispatch-container #route-detail{padding:16px}.dispatch-container .rd-rider-name{font-size:20px}.dispatch-container .rd-stat-value{font-size:17px}.dispatch-container .rd-stat{padding:12px 8px 10px}.dispatch-container #ov-tr{width:160px}.dispatch-container .rchip{font-size:11px;padding:6px 8px}}@media (max-width:960px){.dispatch-container #sidebar{flex-basis:250px;width:250px}.dispatch-container .sidebar-toggle-tab{left:250px}.dispatch-container .sidebar-toggle-tab.is-collapsed{left:0}.dispatch-container #strat-row{-webkit-overflow-scrolling:touch;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.dispatch-container #strat-row::-webkit-scrollbar{display:none}.dispatch-container .sbt{flex-shrink:0;font-size:11px;padding:7px 9px}.dispatch-container .zone-stat-label{display:none}.dispatch-container .zone-stat-pill{gap:3px;padding:3px 7px}.dispatch-container .zone-stat-value{font-size:12px}.dispatch-container .rd-stats-grid{gap:6px}.dispatch-container .rd-stat{padding:10px 6px 8px}.dispatch-container .rd-stat-value{font-size:15px}.dispatch-container .rd-stat-label{font-size:9px}.dispatch-container .rd-stat-icon{font-size:15px}.dispatch-container #ov-tr{display:none}.dispatch-container .zone-card-name{font-size:13px}.dispatch-container .zone-card-sub{font-size:10px}.dispatch-container #riders-panel{padding:12px}.dispatch-container .trip-header{padding:10px 12px}}.dispatch-container .rider-info-mode{background:#fff;background:var(--bg);display:flex;flex:1 1;min-height:0;overflow:hidden}.dispatch-container .ri-sidebar{background:#f8fafc;background:var(--bg-sub,#f8fafc);border-right:1px solid #e2e8f0;border-right:1px solid var(--border,#0f172a14);display:flex;flex-direction:column;flex-shrink:0;min-width:280px;overflow:hidden;width:320px}.dispatch-container .ri-sb-head{border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border,#0f172a14);padding:16px 18px 12px}.dispatch-container .ri-sb-title{color:#1e293b;font-size:20px;font-weight:800;letter-spacing:-.01em}.dispatch-container .ri-sb-sub{color:#64748b;font-size:13px;font-weight:600;margin-top:4px}.dispatch-container .ri-main{background:#fff;flex:1 1;min-width:0;overflow-y:auto;padding:24px 28px}.dispatch-container .ri-main::-webkit-scrollbar{width:6px}.dispatch-container .ri-main::-webkit-scrollbar-thumb{background:#7b1fa240;border-radius:999px}.dispatch-container .ri-placeholder{align-items:center;color:#64748b;display:flex;flex-direction:column;height:100%;justify-content:center;padding:60px 20px;text-align:center}.dispatch-container .ri-placeholder-icon{align-items:center;background:#7b1fa214;border-radius:16px;color:#7b1fa2;display:flex;font-size:32px;height:64px;justify-content:center;margin-bottom:16px;width:64px}.dispatch-container .ri-placeholder-icon svg{font-size:36px}.dispatch-container .ri-placeholder-title{color:#1e293b;font-size:16px;font-weight:800;letter-spacing:-.01em}.dispatch-container .ri-placeholder-sub{font-size:12px;font-weight:500;line-height:1.5;margin-top:6px;max-width:320px}.dispatch-container .ri-search{padding:12px 14px 4px;position:relative}.dispatch-container .ri-search-icon{color:#94a3b8;font-size:18px;left:26px;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}.dispatch-container .ri-search-input{background:#f8fafc;border:1px solid #7b1fa22e;border-radius:10px;color:#1e293b;font-family:inherit;font-size:13px;font-weight:500;outline:none;padding:10px 12px 10px 38px;transition:border-color .15s ease,background .15s ease;width:100%}.dispatch-container .ri-search-input:focus{background:#fff;border-color:#7b1fa2}.dispatch-container .ri-rider-list{display:flex;flex:1 1;flex-direction:column;gap:6px;min-height:0;overflow-y:auto;padding:8px 14px 16px}.dispatch-container .ri-rider-list::-webkit-scrollbar{width:6px}.dispatch-container .ri-rider-list::-webkit-scrollbar-thumb{background:#7b1fa240;border-radius:999px}.dispatch-container .ri-rider-item{align-items:center;background:#fff;border:1px solid #7b1fa21f;border-radius:10px;cursor:pointer;display:flex;font-family:inherit;gap:12px;padding:12px 14px;text-align:left;transition:border-color .15s ease,background .15s ease,transform .15s ease;width:100%}.dispatch-container .ri-rider-item:hover{background:#7b1fa20a;border-color:#7b1fa266;transform:translateX(2px)}.dispatch-container .ri-rider-item.active{background:linear-gradient(180deg,#fbf3ff,#f0e0fa);border-color:#7b1fa2;box-shadow:0 4px 12px #7b1fa22e}.dispatch-container .ri-rider-item.active .ri-rider-name{color:#7b1fa2}.dispatch-container .ri-rider-item.active .ri-rider-arrow{opacity:1;transform:translateX(2px)}.dispatch-container .ri-rider-dot{border-radius:50%;box-shadow:0 0 0 2px #fff,0 0 0 3px #0f172a14;flex-shrink:0;height:14px;width:14px}.dispatch-container .ri-rider-info-block{display:flex;flex:1 1;flex-direction:column;gap:3px;min-width:0}.dispatch-container .ri-rider-name{color:#1e293b;font-size:15px;font-weight:700;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .ri-rider-meta{color:#64748b;font-size:13px;font-weight:600}.dispatch-container .ri-rider-arrow{color:#7b1fa2;font-size:18px;font-weight:800;opacity:.4;transition:opacity .15s ease,transform .15s ease}.dispatch-container .ri-rider-item:hover .ri-rider-arrow{opacity:1;transform:translateX(2px)}.dispatch-container .ri-empty{color:#64748b;font-size:12px;padding:32px 16px;text-align:center}.dispatch-container .ri-error,.dispatch-container .ri-loading{color:#64748b;font-size:13px;padding:32px 16px;text-align:center}.dispatch-container .ri-error{color:#dc2626}.dispatch-container .ri-snap-head{border-bottom:1px dashed #7b1fa22e;margin-bottom:20px;padding:6px 0 18px}.dispatch-container .ri-snap-name{color:#1e293b;font-size:18px;font-weight:800;letter-spacing:-.01em}.dispatch-container .ri-snap-meta{align-items:center;color:#64748b;display:flex;font-size:12px;font-weight:600;gap:8px;margin-top:4px}.dispatch-container .ri-status{background:#64748b2e;border-radius:999px;color:#475569;font-size:10px;font-weight:800;letter-spacing:.06em;padding:2px 10px;text-transform:uppercase}.dispatch-container .ri-status-idle{background:#f59e0b2e;color:#b45309}.dispatch-container .ri-status-active,.dispatch-container .ri-status-ongoing,.dispatch-container .ri-status-online{background:#22c55e2e;color:#15803d}.dispatch-container .ri-status-offline{background:#ef44442e;color:#b91c1c}.dispatch-container .ri-live{align-items:center;background:#22c55e1f;border-radius:999px;color:#15803d;display:inline-flex;font-size:10px;font-weight:800;gap:5px;letter-spacing:.06em;padding:2px 8px 2px 6px;text-transform:uppercase}.dispatch-container .ri-live.is-refetching{background:#7b1fa21f;color:#7b1fa2}.dispatch-container .ri-live-dot{animation:ri-live-pulse 1.6s ease-in-out infinite;background:#16a34a;border-radius:50%;box-shadow:0 0 0 0 #22c55e8c;height:6px;width:6px}.dispatch-container .ri-live.is-refetching .ri-live-dot{background:#7b1fa2;box-shadow:0 0 0 0 #7b1fa28c}@keyframes ri-live-pulse{0%,to{box-shadow:0 0 0 0 #22c55e8c}50%{box-shadow:0 0 0 5px #22c55e00}}.dispatch-container .ri-snap-time{font-feature-settings:"tnum";align-items:center;color:#64748b;display:inline-flex;font-size:11px;font-variant-numeric:tabular-nums;font-weight:500;gap:4px;margin-top:6px}.dispatch-container .ri-snap-time svg{font-size:13px}.dispatch-container .ri-snap-grid{grid-gap:8px;display:grid;gap:8px;grid-template-columns:1fr 1fr}.dispatch-container .ri-stat{align-items:center;background:#7b1fa20d;border:1px solid #7b1fa21f;border-radius:10px;display:flex;gap:10px;padding:10px 12px}.dispatch-container .ri-stat-warn{background:#ef44440f;border-color:#ef444438}.dispatch-container .ri-stat-icon{align-items:center;background:#7b1fa21f;border-radius:9px;color:#7b1fa2;display:flex;flex-shrink:0;font-size:16px;height:32px;justify-content:center;width:32px}.dispatch-container .ri-stat-warn .ri-stat-icon{background:#ef444429;color:#b91c1c}.dispatch-container .ri-stat-icon svg{font-size:18px}.dispatch-container .ri-stat-body{flex:1 1;min-width:0}.dispatch-container .ri-stat-label{color:#64748b;font-size:10px;font-weight:700;letter-spacing:.05em;margin-bottom:2px;text-transform:uppercase}.dispatch-container .ri-stat-value{align-items:center;color:#1e293b;display:flex;font-size:13px;font-weight:700;gap:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .ri-stat-tag{background:#22c55e2e;border-radius:999px;color:#15803d;font-size:9px;font-weight:800;letter-spacing:.04em;padding:2px 6px;text-transform:uppercase}.dispatch-container .ri-map-section{margin-top:14px}.dispatch-container .ri-coords-label{font-feature-settings:"tnum";align-items:center;background:linear-gradient(180deg,#fff,#fbf5ff);border:1px solid #7b1fa22e;border-bottom:0;border-radius:10px 10px 0 0;box-sizing:border-box;color:#1e293b;display:inline-flex;font-size:12px;font-variant-numeric:tabular-nums;font-weight:700;gap:4px;padding:8px 14px;width:100%}.dispatch-container .ri-coords-label svg{color:#7b1fa2;font-size:16px}.dispatch-container .ri-map{border:1px solid #7b1fa22e;border-radius:0 0 10px 10px;height:260px;overflow:hidden;position:relative;width:100%;z-index:0}.dispatch-container .ri-map .leaflet-container{font-family:inherit;height:100%;width:100%}.dispatch-container .ri-map .leaflet-tooltip.ri-area-banner{background:#7b1fa2;border:0;border-radius:8px;box-shadow:0 4px 10px #0f172a40;color:#fff;font-size:11px;font-weight:700;letter-spacing:.02em;padding:4px 10px;white-space:nowrap}.dispatch-container .ri-map .leaflet-tooltip.ri-area-banner:before{border-top-color:#7b1fa2}@media (max-width:600px){.dispatch-container .rider-info-mode{flex-direction:column}.dispatch-container .ri-sidebar{border-bottom:1px solid #e2e8f0;border-bottom:1px solid var(--border,#0f172a14);border-right:0;max-height:40vh;min-width:0;width:100%}.dispatch-container .ri-main{padding:16px}.dispatch-container .ri-snap-grid{grid-template-columns:1fr}}@media (max-width:1366px){.dispatch-container #hdr{height:48px;padding:0 16px}.dispatch-container .logo-name{font-size:15px}.dispatch-container .logo-badge{border-radius:6px;font-size:13px;height:28px;width:28px}.dispatch-container .logo{gap:8px}.dispatch-container #clock{font-size:11px;padding:4px 10px}.dispatch-container .hdr-stats{gap:8px;margin-right:8px}.dispatch-container .strat-stat{font-size:11px;gap:4px;padding:4px 8px}.dispatch-container .strat-stat-label{display:none}.dispatch-container .live-status{font-size:11px;padding:4px 8px}.dispatch-container .date-chip-label,.dispatch-container .live-status-sub{display:none}.dispatch-container .date-chip-main{gap:8px;padding:6px 10px}.dispatch-container .date-chip-icon{font-size:13px;height:24px;width:24px}.dispatch-container .date-chip-value{font-size:12px}.dispatch-container .date-chip-nav{font-size:16px;width:28px}.dispatch-container #strat-row{gap:8px;height:48px;padding:0 16px}.dispatch-container .sbt{border:1px solid #0f172a14;border-radius:8px;font-size:12px;gap:6px;padding:6px 12px}.dispatch-container .sbt .sbt-icon{font-size:16px;height:16px;width:16px}.dispatch-container #batch-row{gap:6px;padding:6px 16px}.dispatch-container .batch-label{font-size:11px}.dispatch-container .batch-btn{font-size:11px;padding:4px 8px}.dispatch-container #sidebar{flex-basis:320px;width:320px}.dispatch-container .sidebar-toggle-tab{left:320px}.dispatch-container #body.compare-mode #sidebar{flex-basis:250px;width:250px}.dispatch-container #body.compare-mode .sidebar-toggle-tab{left:250px}.dispatch-container #body.compare-mode .sidebar-toggle-tab.is-collapsed{left:0}.dispatch-container .sb-header{padding:10px 12px}.dispatch-container .sb-tile{gap:6px;padding:6px 8px}.dispatch-container .sb-tile-value{font-size:16px}.dispatch-container .rcard{padding:10px}.dispatch-container .rcard-name{font-size:12px}.dispatch-container .rcard-zone{font-size:10px}.dispatch-container .step-wrap{padding:10px}.dispatch-container #route-detail{padding:12px}.dispatch-container .rd-rider-name{font-size:18px}.dispatch-container .rd-stats-grid{gap:4px}.dispatch-container .rd-stat{padding:8px 4px 6px}.dispatch-container .rd-stat-value{font-size:14px}.dispatch-container .rd-stat-label{font-size:9px}.dispatch-container .compare-header-v2{gap:6px;padding:8px 12px 6px}.dispatch-container .compare-header-row .compare-title{font-size:13px;gap:8px}.dispatch-container .compare-title-dot{height:8px;width:8px}.dispatch-container .compare-title-badge{font-size:9px;padding:2px 6px}.dispatch-container .compare-overall-btn,.dispatch-container .compare-sync-toggle{font-size:10px;gap:4px;padding:4px 8px}.dispatch-container .compare-overall-btn svg,.dispatch-container .compare-sync-toggle svg{font-size:12px}.dispatch-container .compare-timeline-wrap{gap:4px}.dispatch-container .compare-timeline-container{border-radius:8px;gap:12px;padding:12px}.dispatch-container .compare-timeline-labels{border-right-width:1px;gap:12px;padding-right:10px}.dispatch-container .compare-timeline-label{font-size:9px;height:24px}.dispatch-container .compare-timeline-scrollable{-ms-overflow-style:none;display:flex;flex:1 1;flex-direction:column;gap:12px;overflow-x:auto;scrollbar-width:none}.dispatch-container .compare-timeline-scrollable::-webkit-scrollbar{height:4px}.dispatch-container .compare-timeline-scrollable::-webkit-scrollbar-track{background:#0000}.dispatch-container .compare-timeline-scrollable::-webkit-scrollbar-thumb{background:#66258240;border-radius:999px}.dispatch-container .compare-timeline-scrollable:hover::-webkit-scrollbar-thumb{background:#66258280}.dispatch-container .compare-timeline-track.is-actual .compare-step-spacer,.dispatch-container .compare-timeline-track.is-planned .compare-step-spacer{margin-bottom:14px}.dispatch-container .compare-step{gap:4px}.dispatch-container .compare-step-circle{box-shadow:0 1px 4px #0f172a1a,0 0 0 1px #fff9;font-size:10px;height:24px;width:24px}.dispatch-container .compare-step.is-focused .compare-step-circle{box-shadow:0 2px 6px #0f172a26,0 0 0 2px #fff,0 0 0 3px #662582;box-shadow:0 2px 6px #0f172a26,0 0 0 2px #fff,0 0 0 3px var(--step-color,#662582);transform:scale(1.1)}.dispatch-container .compare-step-spacer{margin-bottom:14px;width:10px}.dispatch-container .compare-step-tick{font-size:9px}.dispatch-container .compare-step-flag{border-width:1px;height:8px;right:-3px;top:-3px;width:8px}.dispatch-container .compare-progress-strip{margin-top:2px}.dispatch-container .compare-progress-text{font-size:9px}.dispatch-container .compare-legend{gap:8px;margin-top:0;padding-top:2px}.dispatch-container .compare-legend-item{font-size:9px}.dispatch-container .compare-legend-swatch{height:10px;width:10px}.dispatch-container .compare-legend-note{display:none}.dispatch-container .compare-delta{gap:6px;padding:8px 12px}.dispatch-container .compare-delta-title{gap:8px;margin-bottom:4px}.dispatch-container .compare-delta-step-badge{font-size:11px;height:20px;width:20px}.dispatch-container .compare-delta-title-main{font-size:12px}.dispatch-container .compare-delta-title-sub{font-size:9px}.dispatch-container .compare-delta-status{font-size:9px;padding:2px 6px}.dispatch-container .compare-delta-grid{gap:6px}.dispatch-container .compare-delta-cell{border-radius:8px;padding:5px 8px 4px}.dispatch-container .compare-delta-cell-label{font-size:9px;margin-bottom:1px}.dispatch-container .compare-delta-cell-val{font-size:13px}.dispatch-container .compare-delta-cell-unit{font-size:8px}.dispatch-container .compare-delta-cell-sub{font-size:9px;margin-top:1px}}@media (max-height:750px){.dispatch-container #hdr,.dispatch-container #strat-row{height:42px}.dispatch-container #strat-row .sbt{border:1px solid #0f172a14;border-radius:6px;font-size:11px;padding:5px 10px}.dispatch-container #batch-row{padding:4px 16px}.dispatch-container .compare-header-v2{gap:6px;padding:8px 12px 6px}.dispatch-container .compare-header-row .compare-title{font-size:13px;gap:8px}.dispatch-container .compare-title-dot{height:8px;width:8px}.dispatch-container .compare-title-badge{font-size:9px;padding:2px 6px}.dispatch-container .compare-overall-btn,.dispatch-container .compare-sync-toggle{font-size:10px;gap:4px;padding:4px 8px}.dispatch-container .compare-overall-btn svg,.dispatch-container .compare-sync-toggle svg{font-size:12px}.dispatch-container .compare-timeline-wrap{gap:4px}.dispatch-container .compare-timeline-container{border-radius:8px;gap:12px;padding:12px}.dispatch-container .compare-timeline-labels{border-right-width:1px;gap:12px;padding-right:10px}.dispatch-container .compare-timeline-label{font-size:9px;height:24px}.dispatch-container .compare-timeline-scrollable{display:flex;flex:1 1;flex-direction:column;gap:12px;overflow-x:auto;padding-bottom:2px}.dispatch-container .compare-timeline-track.is-actual .compare-step-spacer,.dispatch-container .compare-timeline-track.is-planned .compare-step-spacer{margin-bottom:14px}.dispatch-container .compare-step{gap:4px}.dispatch-container .compare-step-circle{box-shadow:0 1px 4px #0f172a1a,0 0 0 1px #fff9;font-size:10px;height:24px;width:24px}.dispatch-container .compare-step.is-focused .compare-step-circle{box-shadow:0 2px 6px #0f172a26,0 0 0 2px #fff,0 0 0 3px #662582;box-shadow:0 2px 6px #0f172a26,0 0 0 2px #fff,0 0 0 3px var(--step-color,#662582);transform:scale(1.1)}.dispatch-container .compare-step-spacer{margin-bottom:14px;width:10px}.dispatch-container .compare-step-tick{font-size:9px}.dispatch-container .compare-progress-strip{margin-top:2px}.dispatch-container .compare-progress-text{font-size:9px}.dispatch-container .compare-legend{gap:8px;margin-top:0;padding-top:2px}.dispatch-container .compare-legend-item{font-size:9px}.dispatch-container .compare-legend-swatch{height:10px;width:10px}.dispatch-container .compare-legend-note{display:none}.dispatch-container .compare-delta{gap:6px;padding:8px 12px}.dispatch-container .compare-delta-title{gap:8px;margin-bottom:4px}.dispatch-container .compare-delta-step-badge{font-size:11px;height:20px;width:20px}.dispatch-container .compare-delta-title-main{font-size:12px}.dispatch-container .compare-delta-title-sub{font-size:9px}.dispatch-container .compare-delta-status{font-size:9px;padding:2px 6px}.dispatch-container .compare-delta-grid{gap:6px}.dispatch-container .compare-delta-cell{border-radius:8px;padding:5px 8px 4px}.dispatch-container .compare-delta-cell-label{font-size:9px;margin-bottom:1px}.dispatch-container .compare-delta-cell-val{font-size:13px}.dispatch-container .compare-delta-cell-unit{font-size:8px}.dispatch-container .compare-delta-cell-sub{font-size:9px;margin-top:1px}}.dispatch-container .compare-delta.is-collapsible.is-collapsed{padding-bottom:12px}.dispatch-container .compare-delta-toggle-icon{align-items:center;color:#64748b;color:var(--text-muted,#64748b);display:inline-flex;font-size:18px;justify-content:center;transition:transform .22s cubic-bezier(.4,0,.2,1),color .15s ease}.dispatch-container .compare-delta-title:hover .compare-delta-toggle-icon{color:#9255ab;color:var(--accent,#662582)}@media (max-width:1366px){.dispatch-container .compare-delta.is-collapsible.is-collapsed{padding-bottom:8px}.dispatch-container .compare-delta-toggle-icon{font-size:15px}}@media (max-height:750px){.dispatch-container .compare-delta.is-collapsible.is-collapsed{padding-bottom:8px}.dispatch-container .compare-delta-toggle-icon{font-size:15px}}.dispatch-container #body.compare-mode{grid-gap:12px;background:linear-gradient(180deg,#f8fafc,#eef2ff);display:grid;gap:12px;grid-template-columns:minmax(0,1fr) minmax(360px,440px);grid-template-rows:auto minmax(0,1fr);padding:12px;position:relative;transition:grid-template-columns .32s cubic-bezier(.4,0,.2,1)}.dispatch-container #body.compare-mode #sidebar,.dispatch-container #body.compare-mode .sidebar-toggle-tab{display:none!important}.dispatch-container #body.compare-mode.compare-data-collapsed{gap:0;grid-template-columns:minmax(0,1fr) 0}.dispatch-container #body.compare-mode.compare-data-collapsed .compare-data-panel{opacity:0;pointer-events:none;transform:translateX(20px)}.dispatch-container .compare-data-panel{transition:opacity .24s ease,transform .32s cubic-bezier(.4,0,.2,1)}.dispatch-container .compare-data-toggle-tab{align-items:center;background:#fff;border:1px solid #e2e8f0;border:1px solid var(--border,#0f172a1f);border-radius:10px;box-shadow:0 4px 12px #0f172a1f,0 1px 3px #0f172a0f;color:#1e293b;color:var(--text,#0f172a);cursor:pointer;display:inline-flex;font-size:18px;height:56px;justify-content:center;line-height:1;padding:0;position:absolute;right:452px;top:50%;transform:translate(50%,-50%);transition:right .32s cubic-bezier(.4,0,.2,1),background .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease;width:22px;z-index:1200}.dispatch-container .compare-data-toggle-tab:hover{background:linear-gradient(135deg,#662582,#9255ab);box-shadow:0 6px 16px #66258259;color:#fff;transform:translate(50%,-50%) scale(1.06)}.dispatch-container .compare-data-toggle-tab:focus-visible{outline:2px solid #9255ab;outline:2px solid var(--accent,#9255ab);outline-offset:2px}.dispatch-container .compare-data-toggle-tab.is-collapsed{border-radius:10px 0 0 10px;border-right:none;right:0;transform:translateY(-50%)}.dispatch-container .compare-data-toggle-tab.is-collapsed:hover{transform:translateY(-50%) scale(1.06)}.dispatch-container .compare-data-toggle-tab svg{display:block}.dispatch-container #body.compare-mode #compare-map-wrap{animation:compare-slide-in .3s cubic-bezier(.4,0,.2,1);background:#fff;border-radius:14px;box-shadow:0 6px 24px #0f172a14,0 0 0 1px #0f172a0f;flex:none;grid-column:1;grid-row:1;margin:0;min-width:0;overflow:hidden}.dispatch-container #body.compare-mode #compare-map-wrap .compare-header-v2{background:#0000;border-bottom:0}.dispatch-container #body.compare-mode #map-wrap,.dispatch-container #body.compare-mode #map-wrap.compare-split{border-radius:14px;border-right:0;box-shadow:0 6px 24px #0f172a14,0 0 0 1px #0f172a0f;flex:none;grid-column:1;grid-row:2;margin:0;min-height:0;min-width:0;overflow:hidden}.dispatch-container .compare-view-switcher{align-items:stretch;animation:compare-label-in .22s ease-out;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#fffffffa;border-radius:10px;box-shadow:0 6px 20px #0f172a1f,0 0 0 1px #0f172a14;display:inline-flex;gap:2px;left:12px;padding:4px;position:absolute;top:12px;z-index:600}.dispatch-container .compare-view-switcher button{-webkit-appearance:none;appearance:none;background:#0000;border:0;border-radius:7px;color:#475569;cursor:pointer;font-size:11px;font-weight:700;letter-spacing:.04em;padding:6px 14px;text-transform:uppercase;transition:background .15s ease,color .15s ease,box-shadow .15s ease,transform .15s ease;white-space:nowrap}.dispatch-container .compare-view-switcher button:hover{background:#66258214;color:#4d1c61}.dispatch-container .compare-view-switcher button:focus-visible{outline:2px solid #66258280;outline-offset:1px}.dispatch-container .compare-view-switcher button.is-active{background:linear-gradient(135deg,#662582,#9255ab);box-shadow:0 2px 8px #66258259;color:#fff}.dispatch-container .compare-view-switcher button.is-active:hover{color:#fff;transform:translateY(-.5px)}.dispatch-container .compare-data-panel{animation:compare-slide-in .3s cubic-bezier(.4,0,.2,1);background:#fff;border-radius:14px;box-shadow:0 6px 24px #0f172a14,0 0 0 1px #0f172a0f;display:flex;flex-direction:column;grid-column:2;grid-row:1/3;min-height:0;min-width:0;overflow:hidden}.dispatch-container .cdp-head{align-items:center;background:linear-gradient(135deg,#662582,#9255ab);border-bottom:1px solid #0f172a14;color:#fff;display:flex;flex-shrink:0;gap:12px;padding:14px 16px}.dispatch-container .cdp-head-title{align-items:center;display:flex;flex:1 1;gap:10px;min-width:0}.dispatch-container .cdp-rider-dot{border-radius:50%;box-shadow:0 0 0 2px #fff6;flex-shrink:0;height:14px;width:14px}.dispatch-container .cdp-head-text{display:flex;flex-direction:column;min-width:0}.dispatch-container .cdp-rider-name{color:#fff;font-size:15px;font-weight:800;letter-spacing:.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cdp-head-badge{color:#ffffffd9;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.dispatch-container .cdp-close{align-items:center;background:#ffffff2e;border:0;border-radius:8px;color:#fff;cursor:pointer;display:inline-flex;font-size:18px;height:32px;justify-content:center;transition:background .15s ease,transform .15s ease;width:32px}.dispatch-container .cdp-close:hover{background:#ffffff52;transform:rotate(90deg)}.dispatch-container .cdp-scroll{display:flex;flex:1 1;flex-direction:column;gap:14px;min-height:0;overflow-y:auto;padding:14px 14px 18px}.dispatch-container .cdp-scroll::-webkit-scrollbar{width:8px}.dispatch-container .cdp-scroll::-webkit-scrollbar-track{background:#0000}.dispatch-container .cdp-scroll::-webkit-scrollbar-thumb{background:#0f172a24;border-radius:999px}.dispatch-container .cdp-section{background:#f8fafc;border:1px solid #0f172a0f;border-radius:12px;display:flex;flex-direction:column;gap:10px;padding:12px}.dispatch-container .cdp-section-head{align-items:center;color:#475569;display:flex;font-size:11px;font-weight:800;gap:8px;letter-spacing:.08em;text-transform:uppercase}.dispatch-container .cdp-section-icon{align-items:center;background:#6625821f;border-radius:6px;color:#4d1c61;display:inline-flex;font-size:14px;height:22px;justify-content:center;width:22px}.dispatch-container .cdp-section-icon.cdp-icon-warn{background:#ef44441f;color:#dc2626}.dispatch-container .cdp-section-title{flex:1 1;min-width:0}.dispatch-container .cdp-section-sub{color:#94a3b8;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:none}.dispatch-container .cdp-section-clear{background:#6625821a;border:0;border-radius:999px;color:#4d1c61;cursor:pointer;font-size:10px;font-weight:700;letter-spacing:.04em;padding:3px 9px;text-transform:none}.dispatch-container .cdp-section-clear:hover{background:#66258233}.dispatch-container .cdp-tiles{grid-gap:8px;display:grid;gap:8px;grid-template-columns:1fr 1fr}.dispatch-container .cdp-tile{background:#fff;border:1px solid #0f172a12;border-radius:10px;display:flex;flex-direction:column;gap:4px;padding:10px 12px;transition:transform .15s ease,box-shadow .15s ease}.dispatch-container .cdp-tile:hover{box-shadow:0 4px 12px #0f172a0f;transform:translateY(-1px)}.dispatch-container .cdp-tile.is-warn{background:linear-gradient(180deg,#fff7ed,#fff);border-color:#f9731640}.dispatch-container .cdp-tile.is-loss{background:linear-gradient(180deg,#fef2f2,#fff);border-color:#ef444440}.dispatch-container .cdp-tile.is-gain{background:linear-gradient(180deg,#ecfdf5,#fff);border-color:#10b98140}.dispatch-container .cdp-tile-label{align-items:center;color:#64748b;display:flex;font-size:10px;font-weight:800;gap:5px;letter-spacing:.05em;text-transform:uppercase}.dispatch-container .cdp-tile-label svg{font-size:13px}.dispatch-container .cdp-tile-value{color:#0f172a;font-size:20px;font-weight:800;letter-spacing:-.01em;line-height:1.1}.dispatch-container .cdp-tile-value.is-over{color:#dc2626}.dispatch-container .cdp-tile-value.is-under{color:#16a34a}.dispatch-container .cdp-tile-unit{color:#94a3b8;font-size:12px;font-weight:700;margin-left:2px}.dispatch-container .cdp-tile-sub{color:#94a3b8;font-size:11px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cdp-dev-list,.dispatch-container .cdp-step-list{display:flex;flex-direction:column;gap:6px;list-style:none;margin:0;padding:0}.dispatch-container .cdp-dev-item{align-items:center;background:#fff;border:1px solid #ef444433;border-radius:10px;cursor:pointer;display:flex;gap:10px;padding:8px 10px;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}.dispatch-container .cdp-dev-item:hover{box-shadow:0 3px 10px #ef44441f;transform:translateX(2px)}.dispatch-container .cdp-dev-item.is-focused{background:#fef2f2;border-color:#ef444499}.dispatch-container .cdp-dev-num{align-items:center;border-radius:50%;box-shadow:0 0 0 2px #fff9,0 1px 3px #0f172a26;color:#fff;display:inline-flex;flex-shrink:0;font-size:14px;font-weight:800;height:30px;justify-content:center;width:30px}.dispatch-container .cdp-dev-body{display:flex;flex:1 1;flex-direction:column;gap:5px;min-width:0}.dispatch-container .cdp-dev-title{color:#0f172a;font-size:14px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cdp-dev-meta{display:flex;flex-wrap:wrap;gap:6px}.dispatch-container .cdp-dev-chip{align-items:center;background:#ef44441a;border-radius:999px;color:#dc2626;display:inline-flex;font-size:12px;font-weight:700;padding:3px 9px}.dispatch-container .cdp-dev-chip.is-over{background:#ef44441f;color:#dc2626}.dispatch-container .cdp-step{align-items:flex-start;background:#fff;border:1px solid #0f172a12;border-radius:10px;cursor:pointer;display:flex;gap:10px;padding:10px;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}.dispatch-container .cdp-step:hover{border-color:#6625824d;box-shadow:0 4px 12px #0f172a14;transform:translateY(-1px)}.dispatch-container .cdp-step.is-focused{background:linear-gradient(180deg,#eef2ff,#fff);border-color:#662582a6;box-shadow:0 4px 14px #6625822e}.dispatch-container .cdp-step.is-correct{border-color:#10b98140}.dispatch-container .cdp-step.is-anomaly{background:linear-gradient(180deg,#fef2f2,#fff);border-color:#ef444466}.dispatch-container .cdp-step.is-skipped{opacity:.65}.dispatch-container .cdp-step.is-loading{opacity:.7}.dispatch-container .cdp-step-num{align-items:center;border-radius:50%;box-shadow:0 0 0 2px #fff9,0 1px 3px #0f172a26;color:#fff;display:inline-flex;flex-shrink:0;font-size:15px;font-weight:800;height:34px;justify-content:center;position:relative;width:34px}.dispatch-container .cdp-step-check,.dispatch-container .cdp-step-flag{align-items:center;background:#fff;border-radius:50%;bottom:-3px;box-shadow:0 1px 3px #0f172a33;display:inline-flex;font-size:13px;height:16px;justify-content:center;position:absolute;right:-3px;width:16px}.dispatch-container .cdp-step-check{color:#16a34a}.dispatch-container .cdp-step-flag{color:#dc2626}.dispatch-container .cdp-step-body{display:flex;flex:1 1;flex-direction:column;gap:4px;min-width:0}.dispatch-container .cdp-step-title-row{align-items:center;display:flex;gap:6px;min-width:0}.dispatch-container .cdp-step-title{color:#0f172a;flex:1 1;font-size:15px;font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cdp-step-status{align-items:center;border-radius:999px;display:inline-flex;flex-shrink:0;font-size:11px;font-weight:800;letter-spacing:.05em;padding:3px 9px;text-transform:uppercase}.dispatch-container .cdp-step-sub{color:#94a3b8;font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cdp-step-deltas{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:3px}.dispatch-container .cdp-step-delta{align-items:center;color:#475569;display:inline-flex;font-size:13px;font-weight:700;gap:4px}.dispatch-container .cdp-step-delta svg{color:#94a3b8;font-size:15px}.dispatch-container .cdp-step-delta small{color:#94a3b8;font-size:12px;font-weight:700}.dispatch-container .cdp-step-delta small.is-over,.dispatch-container .cdp-step-delta.is-over,.dispatch-container .cdp-step-delta.is-over svg{color:#dc2626}.dispatch-container .cdp-step-delta.is-under,.dispatch-container .cdp-step-delta.is-under svg{color:#16a34a}@media (max-width:1100px){.dispatch-container #body.compare-mode{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(360px,1fr) auto}.dispatch-container #body.compare-mode #compare-map-wrap{grid-column:1;grid-row:1}.dispatch-container #body.compare-mode #map-wrap,.dispatch-container #body.compare-mode #map-wrap.compare-split{grid-column:1;grid-row:2}.dispatch-container .compare-data-panel{grid-column:1;grid-row:3;max-height:50vh}.dispatch-container .compare-data-toggle-tab{display:none}}.dispatch-container.compare-open #batch-row,.dispatch-container.compare-open #strat-row{display:none!important}.dispatch-container .cdp-score-section{background:linear-gradient(135deg,#f8fafc,#eef2ff);border-color:#6625822e;padding:14px}.dispatch-container .cdp-score-wrap{align-items:center;display:flex;gap:16px}.dispatch-container .cdp-score-ring{align-items:center;border-radius:50%;box-shadow:0 4px 14px #0f172a1a;display:inline-flex;flex-shrink:0;height:84px;justify-content:center;transition:background .5s ease;width:84px}.dispatch-container .cdp-score-inner{align-items:center;background:#fff;border-radius:50%;display:flex;flex-direction:column;gap:1px;height:70px;justify-content:center;width:70px}.dispatch-container .cdp-score-value{font-size:26px;font-weight:900;letter-spacing:-.02em;line-height:1}.dispatch-container .cdp-score-unit{color:#94a3b8;font-size:10px;font-weight:700;letter-spacing:.05em}.dispatch-container .cdp-score-body{display:flex;flex:1 1;flex-direction:column;gap:2px;min-width:0}.dispatch-container .cdp-score-label{font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.dispatch-container .cdp-score-title{color:#0f172a;font-size:15px;font-weight:800;letter-spacing:-.01em}.dispatch-container .cdp-score-sub{color:#64748b;font-size:11px;font-weight:600}.dispatch-container .cdp-timing-section .cdp-section-head{align-items:center;display:flex;gap:8px}.dispatch-container .cdp-timing-active-tag{align-items:center;background:#10b9811a;border-radius:999px;color:#16a34a;display:inline-flex;font-size:9px;font-weight:800;gap:5px;letter-spacing:.06em;margin-left:auto;padding:2px 8px 2px 6px;text-transform:uppercase}.dispatch-container .cdp-timing-active-pulse{animation:cdp-timing-pulse 1.8s cubic-bezier(.4,0,.6,1) infinite;background:#10b981;border-radius:50%;box-shadow:0 0 0 0 #10b9818c;height:6px;width:6px}@keyframes cdp-timing-pulse{0%{box-shadow:0 0 0 0 #10b9818c}70%{box-shadow:0 0 0 8px #10b98100}to{box-shadow:0 0 0 0 #10b98100}}.dispatch-container .cdp-timing-clock{grid-gap:8px;align-items:center;background:radial-gradient(120% 80% at 50% 0,#66258212 0,#0000 60%),linear-gradient(180deg,#fbfcff,#fff);border:1px solid #0f172a12;border-radius:14px;box-shadow:0 1px 2px #0f172a08;display:grid;gap:8px;grid-template-columns:1fr minmax(70px,1.3fr) 1fr;padding:18px 14px 16px;position:relative}.dispatch-container .cdp-clock-card{align-items:center;display:flex;flex-direction:column;gap:6px;min-width:0}.dispatch-container .cdp-clock-label{align-items:center;color:#64748b;display:inline-flex;font-size:10px;font-weight:800;gap:4px;letter-spacing:.07em;text-transform:uppercase}.dispatch-container .cdp-clock-label svg{font-size:13px}.dispatch-container .cdp-clock-card.is-start .cdp-clock-label svg{color:#10b981}.dispatch-container .cdp-clock-card.is-end .cdp-clock-label svg{color:#f59e0b}.dispatch-container .cdp-clock-face{align-items:baseline;background:linear-gradient(180deg,#1e293b,#0b1220);border-radius:12px;box-shadow:0 2px 4px #0f172a2e,0 8px 18px #0f172a1f,inset 0 1px 0 #ffffff12,inset 0 -1px 0 #0006;display:inline-flex;gap:5px;padding:10px 14px;position:relative}.dispatch-container .cdp-clock-face:after{background:linear-gradient(180deg,#ffffff0a,#0000 50%);border-radius:11px;content:"";inset:1px;pointer-events:none;position:absolute}.dispatch-container .cdp-clock-card.is-start .cdp-clock-face{border-top:1px solid #10b98166}.dispatch-container .cdp-clock-card.is-end .cdp-clock-face{border-top:1px solid #f59e0b66}.dispatch-container .cdp-clock-time{font-feature-settings:"tnum";color:#f1f5f9;font-family:SF Mono,Roboto Mono,Menlo,Consolas,monospace;font-size:24px;font-variant-numeric:tabular-nums;font-weight:700;letter-spacing:-.02em;line-height:1;text-shadow:0 0 12px #a7c3ff2e}.dispatch-container .cdp-clock-period{background:#ffffff14;border-radius:4px;color:#cbd5e1;font-size:10px;font-weight:800;letter-spacing:.1em;padding:1px 5px}.dispatch-container .cdp-clock-caption{color:#94a3b8;font-size:9px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.dispatch-container .cdp-clock-card.is-start .cdp-clock-caption{color:#16a34a}.dispatch-container .cdp-clock-card.is-end .cdp-clock-caption{color:#d97706}.dispatch-container .cdp-clock-track{align-items:center;display:flex;height:60px;justify-content:center;min-width:70px;position:relative}.dispatch-container .cdp-clock-track-line{background:linear-gradient(90deg,#10b981,#662582 50%,#f59e0b);border-radius:999px;box-shadow:0 1px 2px #6625822e;height:4px;left:4px;position:absolute;right:4px;top:50%;transform:translateY(-50%)}.dispatch-container .cdp-clock-track-dot{border-radius:50%;height:11px;position:absolute;top:50%;transform:translateY(-50%);width:11px;z-index:1}.dispatch-container .cdp-clock-track-dot.is-start{background:#10b981;box-shadow:0 0 0 2px #fff,0 0 0 5px #10b98140;left:0}.dispatch-container .cdp-clock-track-dot.is-end{background:#f59e0b;box-shadow:0 0 0 2px #fff,0 0 0 5px #f59e0b40;right:0}.dispatch-container .cdp-clock-duration{align-items:center;background:#fff;border:1px solid #66258233;border-radius:12px;box-shadow:0 4px 12px #0f172a14,0 1px 3px #6625821f;display:inline-flex;flex-direction:column;gap:0;min-width:56px;padding:6px 10px 5px;position:relative;white-space:nowrap;z-index:2}.dispatch-container .cdp-clock-duration-icon{align-items:center;background:linear-gradient(135deg,#662582,#4d1c61);border-radius:50%;box-shadow:0 2px 4px #66258259;color:#fff;display:inline-flex;font-size:12px;height:20px;justify-content:center;margin-bottom:3px;width:20px}.dispatch-container .cdp-clock-duration-val{font-feature-settings:"tnum";color:#0f172a;font-size:14px;font-variant-numeric:tabular-nums;font-weight:800;letter-spacing:-.01em;line-height:1.1}.dispatch-container .cdp-clock-duration-sub{color:#94a3b8;font-size:8px;font-weight:800;letter-spacing:.1em;margin-top:1px;text-transform:uppercase}.dispatch-container .cdp-timing-stats{grid-gap:10px;display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));margin-top:12px}.dispatch-container .cdp-timing-stat{background:#fff;border:1px solid #0f172a12;border-radius:12px;display:flex;flex-direction:column;gap:10px;padding:12px;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.dispatch-container .cdp-timing-stat:hover{border-color:#6625824d;box-shadow:0 4px 12px #6625821a;transform:translateY(-1px)}.dispatch-container .cdp-timing-stat-head{align-items:center;display:flex;gap:10px}.dispatch-container .cdp-timing-stat-icon{align-items:center;background:linear-gradient(135deg,#66258226,#4338ca1a);border-radius:10px;box-shadow:inset 0 0 0 1px #6625821f;color:#4d1c61;display:inline-flex;flex-shrink:0;font-size:20px;height:36px;justify-content:center;width:36px}.dispatch-container .cdp-timing-stat-body{display:flex;flex-direction:column;gap:1px;min-width:0}.dispatch-container .cdp-timing-stat-value{font-feature-settings:"tnum";color:#0f172a;font-size:18px;font-variant-numeric:tabular-nums;font-weight:800;letter-spacing:-.02em;line-height:1.1}.dispatch-container .cdp-timing-stat-unit{color:#94a3b8;font-size:11px;font-weight:700;margin-left:3px}.dispatch-container .cdp-timing-stat-label{color:#94a3b8;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.dispatch-container .cdp-timing-stat-viz{align-items:center;border-top:1px dashed #0f172a14;display:flex;gap:6px;padding-top:8px}.dispatch-container .cdp-timing-stat-viz-label{color:#94a3b8;font-size:10px;font-weight:700;margin-left:auto;white-space:nowrap}.dispatch-container .cdp-stops-dots{flex-wrap:wrap}.dispatch-container .cdp-stop-dot{background:linear-gradient(135deg,#662582,#4d1c61);border-radius:50%;box-shadow:0 1px 2px #6625824d;flex-shrink:0;height:6px;width:6px}.dispatch-container .cdp-speed-gauge{align-items:stretch;flex-direction:column;gap:4px}.dispatch-container .cdp-speed-gauge-track{background:#0f172a0f;border-radius:999px;height:6px;overflow:hidden;position:relative}.dispatch-container .cdp-speed-gauge-fill{background:linear-gradient(90deg,#10b981,#662582 60%,#f59e0b);border-radius:999px;box-shadow:0 1px 3px #6625824d;height:100%;transition:width .4s cubic-bezier(.4,0,.2,1)}.dispatch-container .cdp-speed-gauge-scale{font-feature-settings:"tnum";color:#94a3b8;display:flex;font-size:9px;font-variant-numeric:tabular-nums;font-weight:700;justify-content:space-between;letter-spacing:.04em}.dispatch-container .cdp-highlights{display:flex;flex-direction:column;gap:10px}.dispatch-container .cdp-highlight{align-items:stretch;background:#fff;border:1px solid #0f172a12;border-radius:12px;cursor:pointer;display:flex;overflow:hidden;padding:0;position:relative;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}.dispatch-container .cdp-highlight:hover{box-shadow:0 6px 16px #0f172a14;transform:translateX(2px)}.dispatch-container .cdp-highlight-rail{align-self:stretch;flex-shrink:0;width:4px}.dispatch-container .cdp-highlight-content{display:flex;flex:1 1;flex-direction:column;gap:8px;min-width:0;padding:12px 14px}.dispatch-container .cdp-highlight.is-best{background:linear-gradient(90deg,#10b98112,#fff 65%);border-color:#10b98147}.dispatch-container .cdp-highlight.is-best:hover{border-color:#10b98180}.dispatch-container .cdp-highlight.is-best .cdp-highlight-rail{background:linear-gradient(180deg,#10b981,#16a34a)}.dispatch-container .cdp-highlight.is-worst{background:linear-gradient(90deg,#ef444412,#fff 65%);border-color:#ef444447}.dispatch-container .cdp-highlight.is-worst:hover{border-color:#ef444480}.dispatch-container .cdp-highlight.is-worst .cdp-highlight-rail{background:linear-gradient(180deg,#ef4444,#dc2626)}.dispatch-container .cdp-highlight-top{align-items:center;display:flex;gap:8px;justify-content:space-between}.dispatch-container .cdp-highlight-label{align-items:center;display:inline-flex;font-size:11px;font-weight:800;gap:6px;letter-spacing:.06em;min-width:0;text-transform:uppercase}.dispatch-container .cdp-highlight.is-best .cdp-highlight-label{color:#16a34a}.dispatch-container .cdp-highlight.is-worst .cdp-highlight-label{color:#dc2626}.dispatch-container .cdp-highlight-chip{align-items:center;border-radius:7px;color:#fff;display:inline-flex;flex-shrink:0;font-size:14px;height:22px;justify-content:center;width:22px}.dispatch-container .cdp-highlight.is-best .cdp-highlight-chip{background:linear-gradient(135deg,#10b981,#16a34a);box-shadow:0 1px 3px #10b98159}.dispatch-container .cdp-highlight.is-worst .cdp-highlight-chip{background:linear-gradient(135deg,#ef4444,#dc2626);box-shadow:0 1px 3px #ef444459}.dispatch-container .cdp-highlight-step-chip{align-items:center;border-radius:999px;box-shadow:0 1px 3px #0f172a26;color:#fff;display:inline-flex;flex-shrink:0;font-size:10px;font-weight:800;letter-spacing:.05em;padding:3px 9px;text-transform:uppercase}.dispatch-container .cdp-highlight-title{color:#0f172a;font-size:15px;font-weight:700;letter-spacing:-.01em;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cdp-highlight-meta{align-items:center;display:flex;flex-wrap:wrap;gap:6px}.dispatch-container .cdp-highlight-pill{font-feature-settings:"tnum";align-items:center;border-radius:999px;display:inline-flex;font-size:11px;font-variant-numeric:tabular-nums;font-weight:800;letter-spacing:.01em;padding:3px 9px}.dispatch-container .cdp-highlight-pill.is-bad{background:#ef44441f;color:#dc2626}.dispatch-container .cdp-highlight-pill.is-good{background:#10b9811f;color:#16a34a}.dispatch-container .cdp-trips{display:flex;flex-direction:column;gap:8px}.dispatch-container .cdp-trip{background:#fff;border:1px solid #0f172a12;border-left:3px solid #66258299;border-radius:10px;display:flex;flex-direction:column;gap:6px;padding:10px 12px}.dispatch-container .cdp-trip-head{align-items:center;display:flex;gap:8px;justify-content:space-between}.dispatch-container .cdp-trip-badge{align-items:center;background:#6625821f;border-radius:999px;color:#4d1c61;display:inline-flex;font-size:10px;font-weight:800;letter-spacing:.05em;padding:2px 8px;text-transform:uppercase}.dispatch-container .cdp-trip-meta{color:#64748b;font-size:11px;font-weight:700}.dispatch-container .cdp-trip-stats{display:flex;flex-wrap:wrap;gap:6px 14px}.dispatch-container .cdp-trip-stats span{align-items:center;color:#475569;display:inline-flex;font-size:12px;font-weight:700;gap:4px}.dispatch-container .cdp-trip-stats span svg{color:#94a3b8;font-size:13px}.dispatch-container .cdp-trip-stats span small{color:#94a3b8;font-size:10px;font-weight:700}.dispatch-container .cdp-trip-stats span.is-over,.dispatch-container .cdp-trip-stats span.is-over svg{color:#dc2626}.dispatch-container .cdp-section-head-clickable{cursor:pointer;-webkit-user-select:none;user-select:none}.dispatch-container .cdp-section-head-clickable:hover .cdp-section-title{color:#4d1c61}.dispatch-container .cdp-seq-status{border-radius:999px;flex-shrink:0;font-size:12px;font-weight:800;letter-spacing:.05em;padding:3px 10px;text-transform:uppercase}.dispatch-container .cdp-seq-status.is-good{background:#10b9811f;color:#16a34a}.dispatch-container .cdp-seq-status.is-warn{background:#ef44441f;color:#dc2626}.dispatch-container .cdp-seq-toggle{align-items:center;color:#94a3b8;display:inline-flex;font-size:18px;justify-content:center;transition:transform .22s cubic-bezier(.4,0,.2,1)}.dispatch-container .cdp-seq-toggle.is-open{color:#4d1c61;transform:rotate(180deg)}.dispatch-container .cdp-seq{animation:cdp-seq-in .22s cubic-bezier(.4,0,.2,1);background:#fff;border:1px solid #0f172a12;border-radius:10px;display:flex;flex-direction:column;gap:10px;padding:12px}@keyframes cdp-seq-in{0%{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}.dispatch-container .cdp-seq-diffs{display:flex;flex-direction:column;gap:6px;list-style:none;margin:4px 0 0;padding:0}.dispatch-container .cdp-seq-diff{align-items:center;background:linear-gradient(180deg,#fef2f2,#fff);border:1px solid #ef444433;border-radius:8px;cursor:pointer;display:flex;gap:10px;padding:8px 10px;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}.dispatch-container .cdp-seq-diff:hover{box-shadow:0 3px 10px #ef44441f;transform:translateX(2px)}.dispatch-container .cdp-seq-diff.is-focused{border-color:#ef444499;box-shadow:0 3px 12px #ef444433}.dispatch-container .cdp-seq-diff-num{align-items:center;border-radius:50%;box-shadow:0 0 0 2px #ffffffb3,0 1px 3px #0f172a26;color:#fff;display:inline-flex;flex-shrink:0;font-size:14px;font-weight:800;height:30px;justify-content:center;width:30px}.dispatch-container .cdp-seq-diff-body{display:flex;flex:1 1;flex-direction:column;gap:2px;min-width:0}.dispatch-container .cdp-seq-diff-title{color:#0f172a;font-size:14px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .cdp-seq-diff-sub{color:#64748b;font-size:13px;font-weight:600}.dispatch-container .cdp-seq-diff-tag{background:#ef44441f;border-radius:999px;color:#dc2626;flex-shrink:0;font-size:13px;font-weight:800;padding:3px 10px}.dispatch-container .cdp-seq-good{align-items:center;background:#10b98114;border-radius:8px;color:#16a34a;display:inline-flex;font-size:14px;font-weight:700;gap:6px;padding:6px 10px}.dispatch-container .cdp-seq-good svg{font-size:18px}.dispatch-container .cdp-seq-diff.is-group{background:linear-gradient(180deg,#eef2ff,#fff);border-color:#6625824d;padding-right:40px;position:relative}.dispatch-container .cdp-seq-diff.is-group:hover{border-color:#6625828c;box-shadow:0 3px 10px #66258226}.dispatch-container .cdp-seq-diff.is-group.is-expanded{background:linear-gradient(180deg,#e0e7ff,#f5f7ff);border-bottom-left-radius:0;border-bottom-right-radius:0;border-color:#66258299}.dispatch-container .cdp-seq-group-num{align-items:center;display:inline-flex;flex-shrink:0;height:30px;justify-content:center;position:relative;width:30px}.dispatch-container .cdp-seq-group-num-bg{border-radius:8px;box-shadow:0 0 0 2px #ffffffb3,0 1px 3px #0f172a26;inset:0;position:absolute}.dispatch-container .cdp-seq-group-num-label{color:#fff;font-size:13px;font-weight:800;letter-spacing:-.01em;position:relative;text-shadow:0 1px 2px #00000040}.dispatch-container .cdp-seq-group-delta{align-items:center;background:#66258226;border-radius:999px;color:#4d1c61;display:inline-flex;font-size:13px;font-weight:800;margin-left:4px;padding:2px 8px;vertical-align:1px}.dispatch-container .cdp-seq-group-toggle{align-items:center;background:#ffffffb3;border-radius:6px;color:#4d1c61;display:inline-flex;font-size:18px;height:22px;justify-content:center;pointer-events:none;position:absolute;right:12px;top:50%;transform:translateY(-50%);transition:transform .22s cubic-bezier(.4,0,.2,1);width:22px}.dispatch-container .cdp-seq-group-toggle.is-open{background:#6625822e;transform:translateY(-50%) rotate(180deg)}.dispatch-container .cdp-seq-group-children-wrap{animation:cdp-seq-group-in .22s cubic-bezier(.4,0,.2,1);background:#6625820d;border-bottom:1px solid #66258233;border-bottom-left-radius:10px;border-bottom-right-radius:10px;border-left:2px solid #66258259;border-right:1px solid #66258233;list-style:none;margin:-2px 0 0 4px;padding:0}@keyframes cdp-seq-group-in{0%{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}.dispatch-container .cdp-seq-group-children{display:flex;flex-direction:column;gap:4px;list-style:none;margin:0;padding:8px 8px 8px 14px}.dispatch-container .cdp-seq-diff.is-nested{background:#fff;border-color:#66258226;border-radius:8px;padding:6px 8px}.dispatch-container .cdp-seq-diff.is-nested .cdp-seq-diff-num{font-size:13px;height:26px;width:26px}.dispatch-container .cdp-seq-diff.is-nested .cdp-seq-diff-title{font-size:13.5px}.dispatch-container .cdp-seq-diff.is-nested .cdp-seq-diff-sub{font-size:12.5px}.dispatch-container .cdp-seq-diff.is-nested .cdp-seq-diff-tag{font-size:12px;padding:2px 8px}.dispatch-container .compare-data-panel.cdp-is-mobile{border-radius:0}.dispatch-container .compare-data-panel.cdp-is-mobile .cdp-timing-clock{gap:14px;grid-template-columns:1fr}.dispatch-container .compare-data-panel.cdp-is-mobile .cdp-clock-track{height:48px;min-width:0}.dispatch-container .compare-data-panel.cdp-is-mobile .cdp-timing-stats{grid-template-columns:1fr}.dispatch-container .rcard-est-meters{align-items:center;background:#9255ab14;background:var(--accent-soft,#9255ab14);border-radius:6px;color:#9255ab;color:var(--accent,#9255ab);display:inline-flex;font-size:11px;font-weight:700;gap:3px;padding:2px 8px}.dispatch-container .zone-order-chip.est-meters-chip{background:#2563eb14;border-color:#2563eb33;color:#2563eb}.dispatch-container .pu-distance-chip.pu-est-meters{background:#2563eb14;border-color:#2563eb33}.dispatch-container .pu-distance-chip.pu-est-meters .pu-distance-icon{color:#2563eb}.dispatch-container .pu-distance-chip.pu-est-meters .pu-distance-value{color:#2563eb;font-weight:700}.dispatch-container #dispatch-top-tabs{align-items:center;background:#0000;display:inline-flex;flex-shrink:0;gap:4px;padding:0}.dispatch-container #dispatch-top-tabs.dtt-inline{align-items:center;display:inline-flex;gap:8px;margin-left:10px;margin-right:4px}.dispatch-container .dtt-tab{align-items:center;background:#fff;background:var(--bg);border:1px solid #e2e8f0;border:1px solid var(--border);border-radius:999px;color:#64748b;color:var(--text-muted);cursor:pointer;display:inline-flex;font-size:12px;font-weight:700;gap:6px;line-height:1;padding:6px 12px;transition:color .15s,background .15s,border-color .15s}.dispatch-container .dtt-tab:hover{background:#f8fafc;background:var(--bg-sub);color:#1e293b;color:var(--text)}.dispatch-container .dtt-tab.active{background:#9255ab;background:var(--accent);border-color:#9255ab;border-color:var(--accent);box-shadow:0 2px 6px #9255ab40;color:#fff}.dispatch-container .dtt-icon{align-items:center;display:inline-flex;font-size:14px}.dispatch-container #dispatch-analysis{background:#f8fafc;display:flex;flex:1 1;flex-direction:column;gap:18px;overflow:auto;padding:20px}.dispatch-container .da-intro-title{color:#1e293b;color:var(--text);font-size:16px;font-weight:700;margin-bottom:4px}.dispatch-container .da-intro-sub{color:#64748b;color:var(--text-muted);font-size:12.5px;line-height:1.5}.dispatch-container .da-code{background:#eef2ff;border-radius:4px;color:#4f46e5;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;margin:0 4px;padding:1px 6px}.dispatch-container .da-picker-row{grid-gap:12px;display:grid;gap:12px;grid-template-columns:repeat(3,minmax(0,1fr))}@media (max-width:720px){.dispatch-container .da-picker-row{grid-template-columns:1fr}}.dispatch-container .da-picker{background:#fff;border:1px solid #e2e8f0;border-radius:12px;cursor:pointer;font-family:inherit;padding:14px;text-align:left;transition:box-shadow .15s,transform .15s,border-color .15s}.dispatch-container .da-picker:hover:not(.is-loading){box-shadow:0 4px 14px -6px #0f172a26;transform:translateY(-1px)}.dispatch-container .da-picker.is-loading{cursor:wait;opacity:.7}.dispatch-container .da-picker-head{align-items:center;display:flex;gap:10px;margin-bottom:6px}.dispatch-container .da-picker-badge{align-items:center;border-radius:8px;display:inline-flex;font-size:13px;font-weight:800;height:32px;justify-content:center;width:32px}.dispatch-container .da-picker-meta{flex:1 1;min-width:0}.dispatch-container .da-picker-name{color:#1e293b;color:var(--text);font-size:14px;font-weight:700;line-height:1.2}.dispatch-container .da-picker-range{color:#64748b;color:var(--text-muted);font-size:11px}.dispatch-container .da-picker-status{border-radius:12px;flex-shrink:0;font-size:10.5px;font-weight:700;padding:4px 8px}.dispatch-container .da-picker-sub{color:#64748b;color:var(--text-muted);font-size:11.5px}.dispatch-container .da-empty{background:#fff;border:1px dashed #cbd5e1;border-radius:12px;color:#94a3b8;font-size:13px;padding:40px;text-align:center}.dispatch-container .da-result-row{grid-gap:14px;align-items:stretch;display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}.dispatch-container .da-result-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;border-top:4px solid #662582;display:flex;flex-direction:column;gap:12px;padding:16px}.dispatch-container .da-result-head{align-items:center;display:flex;justify-content:space-between}.dispatch-container .da-result-title{color:#1e293b;color:var(--text);font-size:15px;font-weight:700}.dispatch-container .da-result-sub{color:#64748b;color:var(--text-muted);font-size:11.5px}.dispatch-container .da-result-refresh{align-items:center;border:none;border-radius:8px;cursor:pointer;display:inline-flex;font-size:16px;height:30px;justify-content:center;transition:filter .15s;width:30px}.dispatch-container .da-result-refresh:hover{filter:brightness(.95)}.dispatch-container .da-result-refresh:disabled{cursor:wait;opacity:.5}.dispatch-container .da-detail-actions{align-items:center;display:inline-flex;gap:10px}.dispatch-container .da-live-tag{align-items:center;background:#ecfdf5;border:1px solid #a7f3d0;border-radius:999px;color:#166534;display:inline-flex;font-size:11px;font-weight:700;gap:6px;letter-spacing:.02em;padding:4px 9px 4px 8px;transition:background .15s,color .15s,border-color .15s;-webkit-user-select:none;user-select:none}.dispatch-container .da-live-tag.is-active{background:#fffbeb;border-color:#fde68a;color:#92400e}.dispatch-container .da-live-dot{animation:da-live-pulse 1.8s ease-in-out infinite;background:#10b981;border-radius:50%;box-shadow:0 0 0 2px #10b9812e;height:7px;width:7px}.dispatch-container .da-live-tag.is-active .da-live-dot{animation:da-live-pulse .9s ease-in-out infinite;background:#f59e0b;box-shadow:0 0 0 2px #f59e0b38}@keyframes da-live-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.85)}}.dispatch-container .da-metric-grid{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}.dispatch-container .da-metric{background:#f8fafc;border:1px solid #eef2f6;border-radius:8px;padding:8px 10px}.dispatch-container .da-metric-label{color:#94a3b8;font-size:10px;font-weight:700;letter-spacing:.4px;margin-bottom:2px;text-transform:uppercase}.dispatch-container .da-metric-value{color:#1e293b;color:var(--text);font-size:14px;font-weight:800;line-height:1.3}.dispatch-container .da-riders-label{color:#475569;font-size:11px;font-weight:700;letter-spacing:.4px;margin-bottom:6px;text-transform:uppercase}.dispatch-container .da-riders-list{display:flex;flex-direction:column;gap:4px}.dispatch-container .da-rider-row{align-items:center;background:#f8fafc;border:1px solid #eef2f6;border-radius:6px;display:flex;justify-content:space-between;padding:5px 10px}.dispatch-container .da-rider-name{align-items:center;color:#1e293b;color:var(--text);display:inline-flex;font-size:12px;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .da-rider-stat{color:#64748b;color:var(--text-muted);flex-shrink:0;font-size:11px}.dispatch-container .da-error{background:#fef2f2;border:1px solid #fecaca;border-radius:8px;color:#991b1b;display:flex;flex-direction:column;gap:4px;padding:12px}.dispatch-container .da-error-title{align-items:center;color:#b91c1c;display:inline-flex;font-size:12.5px;font-weight:800;gap:6px;letter-spacing:.3px;text-transform:uppercase}.dispatch-container .da-error-msg{color:#7f1d1d;font-size:13px;line-height:1.5}.dispatch-container .da-error-meta{color:#b45353;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px}.dispatch-container .da-detail{display:flex;flex-direction:column;gap:16px}.dispatch-container .da-detail-head{align-items:center;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;border-top:4px solid #662582;display:flex;justify-content:space-between;padding:14px 16px}.dispatch-container .da-detail-title{color:#1e293b;color:var(--text);font-size:16px;font-weight:800;text-transform:capitalize}.dispatch-container .da-detail-sub-inline{color:#64748b;color:var(--text-muted);font-size:12.5px;font-weight:600;margin-left:6px}.dispatch-container .da-detail-sub{color:#64748b;color:var(--text-muted);font-size:11.5px;margin-top:2px}.dispatch-container .da-section{background:#fff;border:1px solid #e2e8f0;border-radius:12px;display:flex;flex-direction:column;gap:10px;padding:14px}.dispatch-container .da-section-label{color:#475569;font-size:12px;font-weight:800;letter-spacing:.4px;text-transform:uppercase}.dispatch-container .da-section-count{color:#94a3b8;font-weight:700;margin-left:4px}.dispatch-container .da-metric-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}@media (max-width:720px){.dispatch-container .da-metric-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}}.dispatch-container .da-rec{background:linear-gradient(135deg,#eef2ff,#f0fdf4);border:1px solid #c7d2fe;border-radius:10px;display:flex;flex-direction:column;gap:8px;padding:12px 14px}.dispatch-container .da-rec.da-rec-empty{background:#f8fafc;border:1px dashed #e2e8f0;color:#64748b}.dispatch-container .da-rec.da-rec-empty .da-rec-action{color:#64748b;font-weight:500;letter-spacing:0;text-transform:none}.dispatch-container .da-rec-head{align-items:center;display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between}.dispatch-container .da-rec-action{align-items:center;color:#4d1c61;display:inline-flex;font-size:13px;font-weight:800;gap:6px;text-transform:capitalize}.dispatch-container .da-rec-improve{border-radius:14px;font-size:11.5px;font-weight:700;padding:4px 10px}.dispatch-container .da-rec-line{color:#1e293b;color:var(--text);font-size:13px;line-height:1.5}.dispatch-container .da-rec-desc{color:#475569;font-size:12.5px;line-height:1.55}.dispatch-container .da-rec-desc,.dispatch-container .da-rec-rules{background:#fff;border:1px solid #e0e7ff;border-radius:8px;padding:8px 10px}.dispatch-container .da-rec-rules{display:flex;flex-direction:column;gap:4px}.dispatch-container .da-rec-rules-head{color:#475569;font-size:11px;font-weight:700;letter-spacing:.3px;margin-bottom:2px;text-transform:uppercase}.dispatch-container .da-rec-rule{color:#334155;font-size:12px}.dispatch-container .da-rec-rule code{background:#f1f5f9;border-radius:4px;color:#1e293b;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;padding:2px 6px}.dispatch-container .da-rec-rule-why{color:#64748b;color:var(--text-muted);font-size:11.5px}.dispatch-container .da-timeline-list{grid-gap:10px;display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.dispatch-container .da-timeline-card{background:#f8fafc;border:1px solid #eef2f6;border-radius:10px;display:flex;flex-direction:column;gap:8px;padding:10px 12px}.dispatch-container .da-timeline-top{align-items:center;display:flex;gap:8px;justify-content:space-between}.dispatch-container .da-timeline-name{align-items:center;color:#1e293b;color:var(--text);display:inline-flex;font-size:13px;font-weight:700;gap:6px;min-width:0}.dispatch-container .da-timeline-id{color:#64748b;color:var(--text-muted);font-size:10.5px;font-weight:600}.dispatch-container .da-pill{border-radius:12px;font-size:10.5px;font-weight:800;letter-spacing:.3px;padding:3px 9px;text-transform:uppercase}.dispatch-container .da-pill.is-active{background:#dcfce7;color:#166534}.dispatch-container .da-pill.is-idle{background:#fef3c7;color:#92400e}.dispatch-container .da-timeline-mid{display:flex;flex-wrap:wrap;gap:6px}.dispatch-container .da-chip{align-items:center;background:#fff;border:1px solid #e2e8f0;border-radius:12px;color:#334155;display:inline-flex;font-size:11px;font-weight:600;gap:4px;padding:3px 8px}.dispatch-container .da-chip.da-chip-link{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8;cursor:pointer;font-family:inherit;text-decoration:none;transition:background .15s ease,border-color .15s ease,color .15s ease,transform .1s ease}.dispatch-container .da-chip.da-chip-link:hover{background:#dbeafe;border-color:#93c5fd;color:#1e40af}.dispatch-container .da-chip.da-chip-link:active{transform:scale(.98)}.dispatch-container .da-chip.da-chip-link:focus-visible{outline:2px solid #9255ab;outline-offset:1px}.dispatch-container .da-pos-modal-backdrop{align-items:center;animation:da-pos-fade .18s ease;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);background:#0f172a8c;display:flex;inset:0;justify-content:center;padding:24px;position:fixed;z-index:2000}@keyframes da-pos-fade{0%{opacity:0}to{opacity:1}}.dispatch-container .da-pos-modal-card{animation:da-pos-rise .22s cubic-bezier(.16,1,.3,1);background:#fff;border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 24px 60px #0f172a47,0 8px 24px #0f172a1f;display:flex;flex-direction:column;overflow:hidden;width:min(720px,100%)}@keyframes da-pos-rise{0%{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.dispatch-container .da-pos-modal-head{align-items:center;background:linear-gradient(135deg,#66258208,#9255ab14);border-bottom:1px solid #eef2f6;display:flex;flex:0 0 auto;gap:12px;justify-content:space-between;padding:14px 18px}.dispatch-container .da-pos-modal-title-wrap{align-items:center;display:flex;gap:12px;min-width:0}.dispatch-container .da-pos-modal-avatar{align-items:center;border-radius:12px;display:inline-flex;flex-shrink:0;font-size:22px;height:40px;justify-content:center;width:40px}.dispatch-container .da-pos-modal-title{color:#0f172a;font-size:15.5px;font-weight:800;letter-spacing:-.01em;line-height:1.2}.dispatch-container .da-pos-modal-sub{color:#64748b;font-size:11.5px;font-weight:600;letter-spacing:.01em;margin-top:2px}.dispatch-container .da-pos-modal-actions{align-items:center;display:inline-flex;flex-shrink:0;gap:8px}.dispatch-container .da-pos-modal-close{align-items:center;background:#fff;border:1px solid #e2e8f0;border-radius:10px;color:#475569;cursor:pointer;display:inline-flex;font-size:18px;height:32px;justify-content:center;transition:background .15s,color .15s,border-color .15s,transform .1s;width:32px}.dispatch-container .da-pos-modal-close:hover{background:#fef2f2;border-color:#fecaca;color:#b91c1c}.dispatch-container .da-pos-modal-close:active{transform:scale(.96)}.dispatch-container .da-pos-modal-map{background:#e2e8f0;flex:0 0 auto;height:420px;position:relative;width:100%}.dispatch-container .da-pos-modal-map .leaflet-container{background:#e2e8f0;height:100%!important;width:100%!important;z-index:1}.dispatch-container .da-pos-modal-foot{align-items:center;background:#f8fafc;border-top:1px solid #eef2f6;display:flex;flex:0 0 auto;gap:12px;justify-content:space-between;padding:12px 18px}.dispatch-container .da-pos-modal-coord{font-feature-settings:"tnum";align-items:center;color:#334155;display:inline-flex;font-size:12.5px;font-variant-numeric:tabular-nums;gap:8px}.dispatch-container .da-pos-modal-coord strong{color:#0f172a;font-weight:700}.dispatch-container .da-pos-modal-sep{color:#cbd5e1;margin:0 8px}.dispatch-container .da-pos-modal-copy{background:#662582;border:1px solid #662582;border-radius:999px;color:#fff;cursor:pointer;font-family:inherit;font-size:11.5px;font-weight:700;padding:6px 14px;transition:background .15s,border-color .15s,transform .1s}.dispatch-container .da-pos-modal-copy:hover{background:#4d1c61;border-color:#4d1c61}.dispatch-container .da-pos-modal-copy:active{transform:scale(.97)}.dispatch-container .da-sub-list{display:flex;flex-direction:column;gap:10px}.dispatch-container .da-sub-card{background:#fff;border:1px solid #e2e8f0;border-radius:10px;display:flex;flex-direction:column;gap:8px;padding:12px}.dispatch-container .da-sub-head{align-items:center;display:flex;flex-wrap:wrap;gap:6px;justify-content:space-between}.dispatch-container .da-sub-title{color:#1e293b;color:var(--text);font-size:13px;text-transform:capitalize}.dispatch-container .da-sub-improve{border-radius:12px;font-size:11.5px;font-weight:800;padding:3px 10px}.dispatch-container .da-sub-meta{display:flex;flex-wrap:wrap;gap:6px}.dispatch-container .da-sub-relieved{align-items:center;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;color:#166534;display:inline-flex;font-size:12px;gap:6px;padding:6px 10px}.dispatch-container .da-sub-transfers{background:#f8fafc;border:1px solid #eef2f6;border-radius:8px;display:flex;flex-direction:column;gap:4px;padding:8px 10px}.dispatch-container .da-sub-transfers-head{color:#475569;font-size:11px;font-weight:700;letter-spacing:.3px;margin-bottom:2px;text-transform:uppercase}.dispatch-container .da-transfer-row{grid-gap:8px;align-items:center;border-bottom:1px dashed #e2e8f0;color:#1e293b;color:var(--text);display:grid;font-size:11.5px;gap:8px;grid-template-columns:80px 1fr auto auto;padding:4px 0}.dispatch-container .da-transfer-row:last-child{border-bottom:none}.dispatch-container .da-transfer-id{color:#1e293b;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:800}.dispatch-container .da-transfer-from{color:#64748b;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dispatch-container .da-transfer-time{color:#334155;font-size:11px}.dispatch-container .da-transfer-imp{border-radius:10px;font-size:10.5px;font-weight:800;padding:2px 8px}.dispatch-container .da-hero-row{grid-gap:12px;display:grid;gap:12px;grid-template-columns:repeat(3,1fr)}@media (max-width:900px){.dispatch-container .da-hero-row{grid-template-columns:1fr}}.dispatch-container .da-hero-card{align-items:flex-start;background:#fff;border:1px solid #e2e8f0;border-radius:12px;box-shadow:0 1px 2px #0f172a0a;display:flex;flex-direction:column;gap:4px;min-width:0;padding:18px 18px 16px;position:relative}.dispatch-container .da-hero-icon{align-items:center;border-radius:10px;display:inline-flex;font-size:20px;height:36px;justify-content:center;margin-bottom:4px;width:36px}.dispatch-container .da-hero-value{color:#0f172a;font-size:26px;font-weight:700;letter-spacing:-.02em;line-height:1.05}.dispatch-container .da-hero-unit{color:#64748b;font-size:16px;font-weight:600;margin-left:2px}.dispatch-container .da-hero-label{color:#64748b;font-size:11px;font-weight:700;letter-spacing:.06em;margin-top:2px;text-transform:uppercase}.dispatch-container .da-hero-sub{color:#94a3b8;font-size:12px;font-weight:500;margin-top:6px}.dispatch-container .da-health-row{grid-gap:12px;display:grid;gap:12px;grid-template-columns:1.2fr repeat(3,1fr)}@media (max-width:1100px){.dispatch-container .da-health-row{grid-template-columns:1fr 1fr}}@media (max-width:600px){.dispatch-container .da-health-row{grid-template-columns:1fr}}.dispatch-container .da-health-card{align-items:center;background:#fff;border:1px solid #e2e8f0;border-radius:12px;box-shadow:0 1px 2px #0f172a0a;display:flex;gap:14px;min-width:0;padding:14px 16px}.dispatch-container .da-health-card-stat{align-items:flex-start;flex-direction:column;gap:4px}.dispatch-container .da-health-value{color:#0f172a;font-size:22px;font-weight:700;letter-spacing:-.02em;line-height:1.1}.dispatch-container .da-health-unit{color:#64748b;font-size:13px;font-weight:600;margin-left:2px}.dispatch-container .da-health-label{color:#64748b;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.dispatch-container .da-health-sub{color:#94a3b8;font-size:11.5px;font-weight:500}.dispatch-container .da-health-meta{display:flex;flex-direction:column;gap:4px;min-width:0}.dispatch-container .da-ring{--ring-color:#10b981;--ring-pct:0;align-items:center;background:conic-gradient(var(--ring-color) calc(var(--ring-pct)*1%),#f1f5f9 0);border-radius:50%;display:inline-flex;flex-shrink:0;height:72px;justify-content:center;position:relative;width:72px}.dispatch-container .da-ring:after{background:#fff;border-radius:50%;content:"";inset:6px;position:absolute}.dispatch-container .da-ring-num{color:#0f172a;font-size:18px;font-weight:800;letter-spacing:-.02em;position:relative;z-index:1}.dispatch-container .da-ring-unit{color:#64748b;font-size:11px;font-weight:700;margin-left:1px}.dispatch-container .da-rec-banner{align-items:flex-start;border:1px solid;border-radius:12px;display:flex;gap:14px;padding:14px 16px}.dispatch-container .da-rec-banner.is-action{background:#eff6ff;border-color:#bfdbfe;color:#1e3a8a}.dispatch-container .da-rec-banner.is-warn{background:#fffbeb;border-color:#fde68a;color:#92400e}.dispatch-container .da-rec-banner.is-success{background:#f0fdf4;border-color:#bbf7d0;color:#166534}.dispatch-container .da-rec-banner.is-info{background:#f8fafc;border-color:#e2e8f0;color:#475569}.dispatch-container .da-rec-banner-icon{align-items:center;background:#ffffff8c;border-radius:8px;display:inline-flex;flex:0 0 auto;font-size:18px;height:32px;justify-content:center;width:32px}.dispatch-container .da-rec-banner-body{display:flex;flex:1 1 auto;flex-direction:column;gap:6px;min-width:0}.dispatch-container .da-rec-banner .da-rec-action{align-items:center;color:inherit;display:inline-flex;font-size:14px;font-weight:700;gap:6px;letter-spacing:-.005em;text-transform:capitalize}.dispatch-container .da-rec-banner .da-rec-desc,.dispatch-container .da-rec-banner .da-rec-line{color:inherit;font-size:12.5px;line-height:1.5;opacity:.9}.dispatch-container .da-rec-banner .da-rec-assess{background:#0f172a0a;border-radius:8px;color:inherit;font-size:12px;font-weight:500;line-height:1.55;margin-top:2px;opacity:.95;padding:8px 10px}.dispatch-container .da-section-hint{color:#94a3b8;font-size:11px;font-weight:500;letter-spacing:0;margin-left:10px;text-transform:none}.dispatch-container .da-gantt-axis{align-items:center;color:#64748b;display:flex;font-size:11px;font-weight:600;justify-content:space-between;padding:0 4px 6px}.dispatch-container .da-gantt-axis-mid{color:#94a3b8;font-style:italic;font-weight:500}.dispatch-container .da-gantt-row{align-items:center;display:flex;gap:10px;margin:8px 0 4px}.dispatch-container .da-gantt-track{background:#f1f5f9;border-radius:8px;flex:1 1;height:24px;overflow:hidden;position:relative}.dispatch-container .da-gantt-fill{align-items:center;border-radius:8px;bottom:0;box-shadow:0 1px 0 #0f172a14;color:#fff;display:flex;font-size:10.5px;font-weight:700;justify-content:space-between;letter-spacing:.01em;overflow:hidden;padding:0 8px;position:absolute;top:0;white-space:nowrap}.dispatch-container .da-gantt-fill-end,.dispatch-container .da-gantt-fill-start{flex-shrink:0;text-shadow:0 1px 1px #0f172a2e}.dispatch-container .da-gantt-idle{background-image:repeating-linear-gradient(135deg,#e2e8f0 0 6px,#f1f5f9 6px 12px);border-left:1px dashed #cbd5e1;bottom:0;position:absolute;top:0}.dispatch-container .da-gantt-util{border-radius:6px;flex:0 0 auto;font-size:11.5px;font-weight:800;letter-spacing:.01em;min-width:44px;padding:4px 8px;text-align:center}.dispatch-container .da-conf-dot{border-radius:50%;display:inline-block;flex-shrink:0;height:7px;margin-left:4px;width:7px}.dispatch-container .da-conf-dot.is-ok{background:#10b981;box-shadow:0 0 0 2px #10b9812e}.dispatch-container .da-conf-dot.is-low{background:#f59e0b;box-shadow:0 0 0 2px #f59e0b33}.dispatch-container .da-chip.da-chip-orders{align-items:center;display:inline-flex;gap:8px}.dispatch-container .da-orders-label{color:#0f172a;font-size:11.5px;font-weight:700}.dispatch-container .da-orders-bar{background:#e2e8f0;border-radius:4px;flex-shrink:0;height:6px;overflow:hidden;position:relative;width:56px}.dispatch-container .da-orders-bar-fill{background:linear-gradient(90deg,#10b981,#34d399);border-radius:4px;inset:0;position:absolute;transition:width .3s ease;width:0}.dispatch-container .da-orders-pending{color:#b45309;font-size:10.5px;font-weight:600}@media (max-width:768px){.dispatch-container{height:auto;min-height:calc(100vh - 88px);overflow-x:hidden;overflow-y:auto}.dispatch-container #body{flex-direction:column;overflow:visible}.dispatch-container #map-wrap,.dispatch-container #map-wrap.compare-split{border-radius:0;flex:0 0 auto;height:48vh;margin-right:0;min-height:320px;min-width:0;order:1;width:100%}.dispatch-container #body.sidebar-collapsed #sidebar,.dispatch-container #sidebar{-webkit-overflow-scrolling:touch;border-right:0;border-right-color:#e2e8f0;border-right-color:var(--border);border-top:1px solid #e2e8f0;border-top:1px solid var(--border);flex:1 1 auto;flex-basis:auto;max-height:none;min-width:0;order:2;overflow-y:auto;width:100%}.dispatch-container .sidebar-toggle-tab{display:none}.dispatch-container #hdr{flex-wrap:wrap;gap:8px;height:auto;min-height:42px;padding:8px 16px}.dispatch-container #dispatch-analysis{overflow-y:visible}} \ No newline at end of file diff --git a/build/static/js/1148.1f747cf9.chunk.js b/build/static/js/1148.1f747cf9.chunk.js new file mode 100644 index 0000000..a8c4303 --- /dev/null +++ b/build/static/js/1148.1f747cf9.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[1148],{11148:(e,i,l)=>{l.r(i),l.d(i,{default:()=>C});var n=l(93230),t=l(41413),s=l(16491),o=l(82053),c=l(2235),d=l(47223),r=l(25277),a=l(60899),x=l(14857),h=l(36150),m=l(31222),v=l(94826),A=l(52351),p=l(81425),j=l(44414);const u=16,g="0 14px 40px rgba(15, 23, 42, 0.10)",f="#0f172a",b="#64748b",S="#94a3b8",W="#e2e8f0",k="#f1f5f9",Y="#f8fafc",J="#662582",w=e=>"".concat(e,"08"),R=e=>"".concat(e,"18"),y=e=>{let{icon:i,label:l,value:c,accent:d=J}=e;return(0,j.jsxs)(n.A,{direction:"row",spacing:1.5,alignItems:"flex-start",sx:{minWidth:0},children:[(0,j.jsx)(t.A,{sx:{width:36,height:36,bgcolor:R(d),color:d,flexShrink:0},children:(0,j.jsx)(i,{size:18})}),(0,j.jsxs)(s.A,{sx:{minWidth:0},children:[(0,j.jsx)(o.A,{variant:"overline",sx:{display:"block",color:S,lineHeight:1.6,letterSpacing:"0.06em"},children:l}),(0,j.jsx)(o.A,{variant:"body1",sx:{fontWeight:600,color:f,wordBreak:"break-word"},title:c||"",children:c||"\u2014"})]})]})},T=e=>{let{title:i,icon:l,children:d}=e;return(0,j.jsxs)(c.A,{elevation:0,sx:{borderRadius:u+"px",border:"1px solid ".concat(W),boxShadow:g,overflow:"hidden",height:"100%"},children:[(0,j.jsxs)(n.A,{direction:"row",alignItems:"center",spacing:1.25,sx:{px:2.5,py:1.75,borderBottom:"1px solid ".concat(k),bgcolor:Y},children:[(0,j.jsx)(t.A,{sx:{width:28,height:28,bgcolor:R(J),color:J},children:(0,j.jsx)(l,{size:16})}),(0,j.jsx)(o.A,{variant:"subtitle1",sx:{fontWeight:700,color:f},children:i})]}),(0,j.jsx)(s.A,{sx:{p:2.5},children:d})]})},C=()=>{const e=(0,x.A)(),i=(0,d.A)(e.breakpoints.down("md")),{data:l,isLoading:S}=(0,h.I)({queryKey:["getuser"],queryFn:p.ts}),k=(null===l||void 0===l?void 0:l.fullname)||(null===l||void 0===l?void 0:l.firstname)||"User Profile";return(0,j.jsxs)(j.Fragment,{children:[S&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(A.A,{}),(0,j.jsx)(v.A,{})]}),(0,j.jsxs)(s.A,{sx:{p:{xs:1.5,md:0}},children:[(0,j.jsx)(c.A,{elevation:0,sx:{borderRadius:u+"px",border:"1px solid ".concat(W),background:"linear-gradient(135deg, ".concat(w(J)," 0%, ").concat(w("#9255AB")," 100%)"),boxShadow:g,p:{xs:2.5,md:3.5},mb:{xs:2.5,md:3}},children:(0,j.jsxs)(n.A,{direction:{xs:"column",sm:"row"},spacing:{xs:2,sm:3},alignItems:{xs:"flex-start",sm:"center"},children:[(0,j.jsx)(t.A,{sx:{width:{xs:64,md:76},height:{xs:64,md:76},bgcolor:J,color:"#fff",fontSize:{xs:24,md:28},fontWeight:700,boxShadow:"0 10px 24px rgba(102, 37, 130, 0.35)"},children:(Y=k,(Y||"").trim().split(/\s+/).slice(0,2).map((e=>e[0])).join("").toUpperCase()||"\u2013")}),(0,j.jsxs)(s.A,{sx:{minWidth:0},children:[(0,j.jsx)(o.A,{variant:"h3",sx:{color:f,fontWeight:700,mb:.5},children:k}),(0,j.jsxs)(n.A,{direction:"row",spacing:1,flexWrap:"wrap",useFlexGap:!0,alignItems:"center",children:[(null===l||void 0===l?void 0:l.authname)&&(0,j.jsx)(r.A,{size:"small",icon:(0,j.jsx)(m.AI8,{size:14,style:{color:J}}),label:l.authname,sx:{bgcolor:R(J),color:J,fontWeight:700,border:"1px solid ".concat(J,"40"),"& .MuiChip-icon":{ml:"6px"}}}),null!=(null===l||void 0===l?void 0:l.userid)&&""!==(null===l||void 0===l?void 0:l.userid)&&(0,j.jsxs)(o.A,{variant:"body2",sx:{color:b,fontWeight:600},children:["ID\xa0#",l.userid]}),(null===l||void 0===l?void 0:l.applocation)&&(0,j.jsxs)(n.A,{direction:"row",spacing:.5,alignItems:"center",sx:{color:b},children:[(0,j.jsx)(m.gwi,{size:15}),(0,j.jsx)(o.A,{variant:"body2",sx:{fontWeight:600},children:l.applocation})]})]})]})]})}),(0,j.jsxs)(a.Ay,{container:!0,spacing:{xs:2.5,md:3},children:[(0,j.jsx)(a.Ay,{item:!0,xs:12,md:6,children:(0,j.jsx)(T,{title:"Account",icon:m.tpc,children:(0,j.jsxs)(n.A,{spacing:2.5,children:[(0,j.jsx)(y,{icon:m.LTk,label:"User Name",value:null===l||void 0===l?void 0:l.fullname}),(0,j.jsx)(y,{icon:m.tpc,label:"User ID",value:null===l||void 0===l?void 0:l.userid}),(0,j.jsx)(y,{icon:m.AI8,label:"Auth Name",value:null===l||void 0===l?void 0:l.authname}),(0,j.jsx)(y,{icon:m.gwi,label:"App Location",value:null===l||void 0===l?void 0:l.applocation})]})})}),(0,j.jsx)(a.Ay,{item:!0,xs:12,md:6,children:(0,j.jsx)(T,{title:"Contact",icon:m.tfO,children:(0,j.jsxs)(n.A,{spacing:2.5,children:[(0,j.jsx)(y,{icon:m.EZw,label:"Contact No",value:null===l||void 0===l?void 0:l.contactno,accent:"#0ea5e9"}),(0,j.jsx)(y,{icon:m.tfO,label:"E-Mail",value:null===l||void 0===l?void 0:l.email,accent:"#0ea5e9"}),(0,j.jsx)(y,{icon:m.JFD,label:"Address",value:null===l||void 0===l?void 0:l.address,accent:"#0ea5e9"})]})})}),(0,j.jsx)(a.Ay,{item:!0,xs:12,children:(0,j.jsx)(T,{title:"Location",icon:m.Cd7,children:(0,j.jsxs)(a.Ay,{container:!0,spacing:i?2.5:3,children:[(0,j.jsx)(a.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,j.jsx)(y,{icon:m.HPi,label:"Suburb",value:null===l||void 0===l?void 0:l.suburb,accent:"#14b8a6"})}),(0,j.jsx)(a.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,j.jsx)(y,{icon:m.qod,label:"City",value:null===l||void 0===l?void 0:l.city,accent:"#14b8a6"})}),(0,j.jsx)(a.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,j.jsx)(y,{icon:m.Cd7,label:"State",value:null===l||void 0===l?void 0:l.state,accent:"#14b8a6"})}),(0,j.jsx)(a.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,j.jsx)(y,{icon:m.u9F,label:"Postcode",value:null===l||void 0===l?void 0:l.postcode,accent:"#14b8a6"})})]})})})]})]})]});var Y}},62217:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAPnUlEQVR4AdVae3AU9R3/7d4jdyGQQKAhECBAJBSmEAtFSQUjqPgAHGlhRm0lDkWY6Tg+O9qiErR26h8WR8ZWqTMN1ur4qMpDrTyjtDwDJloeCYiBvAgkaZ53l7vb3X4/v9vfZS/Zu9uFwLSfmb3d293f7u/z+z5/399K7CphdW5JrupgBZosZ0ialmu8pklSjUOTamRJbvvjqTUV7CpAYlcIj+SWZHQ55WJZlm7UNK2IXpRhpZ3GWJskSWXUZrPD4Sp77eSva9gVwIATXz35+SJNYWs1phWxAYDEpDKVaZv+fOrZUjaAGDDiK695rpgetpYOc82upw72sMycdJbz/SzmHeKl/ynRay31bbS1s7rjTczXGYj3ihrShnUDNQCXTXzlNS8UyExdbybhSdeNYwXz81nBzflE2pKms7oT51ntiSa276NKVn3wrNktNcGQelNpTUkNuwxcFvFV+S88rKnKy8ZzkOz84uvYvOJZ/PhyAE3Y/+HXbN+HFVwjjJAlR8lr1WueY9wt2MclEYfj8rnkj+nwRnHOLuGWhnbmpfuMKh/3Xn0Atm74IuY8OcGPFYk99kbVM98xm7BFnDyttHLyb3MlRdsjSWycOA+VLv79YpY5Ork6V5efY59s/JJVHznH/+dMymLz7v0Rm71oWtK2GIDSJ7ew6kMxJlCjytI8u+Qddm4+93bPBIfqiiG96KG5RPouljokuZT3b/2avf7EB6ylsZ1dM2MsG5OfxU7RAFSWVbMAObUphRMTtsc7CpdMh6c3kqe8gN117Yh5W4627GljFmGZ+C/ynx/flzSkDPW2Aqj2+lV/Y5mj0tljG3/GFhQXspkLpnBJVx85yyq/OGWJPAANgzkd2/utOMXJzxp965vlF3YFrPRHZtYgSZq6vi/p2TT6VrF+1Vt8/yiRhnoLiIHAftc7h0kDzlp6HgYcfTAgVwmEPmIWzTeZxPEQaeWkkhJJk1eJk8vWLGBz75nBrAIqfmDrN2zhqjlsetGkftddKU6WQ2qPe6AZVuwdGPP9kWw4+ZWKnVXiVO6M4UXtR1rKDiZrm4g4J70871cTnMzzd3ESNn3bgz9mdgC7hmoufeKWuB4/c1QGV3nYfP7Msfy/FYB8rM1LC6YNm72lonXv+UTtEqr60qVLJTcbvEv8h20tfOhGZgeQtpBiZnZ6wnuhEUDFnlPMDhaSMCbNilohc0kp61mEW1y1j0u8hLR78Ff5xX3t2i5AHLjegvqOIdtHXK/8oorZRfGLiw3aJM1dkVeynA5kCsGm98cjLhNxh4O5nxEnoOJW4rQRkDRUF3adTNoAEprRRB7tfJ09zA7Qt3mGCCMz+dmioiLKcSRTjvGISw/kPbNcSDtzdLotDy6A+AyYObR4KCjK53ur3t2I+ct7s0b0Pfds4U04RuLV914z4rjJ4ZSc94sTSBrsShvYv62S76frZKwAYQ2orWpidoEExyh1tzPl6SlTpjhJ6v3u7Utcgm0vHf/wePKUc8TJS5E21LWu6gKbRBmalXwcgHp70yISg8QR3oTWWAWk3gtpbp6/cCiLRK8Y9k7jHzgCGh3n8om/ibpueHKr0vZT5lVZFvHItVWRaALVQ4pqxcYfL3opeoxcvlr3D4BVc4HU4eFFeMt0ZsHJvUzcFKPkY4gvW7YMGiC7ZfcicW723dalXUsS3lSyNeZcBUmsmaS/5p0Vlp4BVccADsvOYP6uAM/yKsqq7PkJmv8L4k7mmEu7DcRNIfIqkedu3qjq0pkzZ/DfITE5quZjp2Qxu0Dnha1iX1fdxD55fW/CNjANYN49s7jKI5O788E5kfY0oHZQcEuvT5GY8wbaye+//36MqsfY+JEjR6QlY1cX0CHvNdQmZ/JIZhUtjW3RzkNqsG90Hti2cS8fgGSoqz7Pp6loi/uH6wNnJ7zBNA0ZYvrdY1aMZ6hdGHQ9RuL473KmDBUnUB+zAyE1dP6me2fxpMUYljat3Zb0GfvJodWRRz9Aic/utw+Ts/NG1L/L0qQrCoRggVTXUGRPMULmNo44h0CflZXlcGiuXLPGdoDOo7Pw0EYpC5W/c9Wcfm3EoAGiSAF4h0QiQmtDmyUHKZAzZSSrPam/W5MgzJgUlo+CrgFSU1OT5GTOseKi7UytsT2GiJlqW1X5aB+IrJfCYXNDO7MDYwh1yA4kYvKMGTNkkcxw4ghjdJLfQ9ntJRcgWxqsFUCsqDzg1e0U5FtsEvfGVIQ4J9nv90fNXEhcgmPLyEAh49KJW4WZlzezYSE172BvjDbZhc5JPn78eH/nlpubK7e1tcWQtjtRaDXpnLHaYkRflTdbSEhN65V4a4Plclo/IC/TDyV9ixCnNJWFw2EpPT2dBcKBBtHA3+FndmCmjsueuJnIf8/0/mQq79UlDkdpV+LGOnxQ7aljOmFwBTjxY8eOSXV1day9vV1SlFCHaFB3wroT8sdZ+kE4QuXFDMkSG7+ucZmUxdmdqrbU9WpIINQuiPO5CM5x4pTVYMdTucbgt8ejjeutj3K8Tg0jaU2aMY4nJWYQKm+mLT7d7kUW2GrDwRmFFpD8Xax3xSUmZcUfPhL7L2yvp9XJTv7ijgAv4ltBPK8rHNRCPf00QzKVRzs8p7Y6YRktCqy99foMrWN73bsnWJ/ZmTGbUVlkADRFDUarlIYKZkKYeWUjUYSm+0sWmraFxHdTaTkRhtnI2bHwKBBUA3iwSv6LcxPnjV4dI6J5vV61W+04JM5X7LBG3Mwr9820oPLxZln+zsQpac6kkdG5QDLs+7AyetwRat0FTvqsLEpeJDBaTU2NQocqBXl1f9PnH4uGmN5ZcSpmqu41KSUvffwWy4UJIzCIxlQ2bj/ILxnX1mq6Tx0EJwrVKlVjNFF8NKasbMSIEeqgQYOUWl91W0gNlIvGu0oPJH2h31Ti/VNeqP8dJrm6KQnDYIp5erKwZpR2j9JTfrRldy1x4mZMCYwWk7mxiPjVixcvqt3d3WpKSopS6z/9J/GA3ZsOJZW6mRp640h2Pk1bsWhoBzAToLo8fhES0t4fo+YXoblhWZbDtOcaLa5FbZziGyc/ZMgQpaenJ7yz4b1DqhpuxDV492RSNxuYeF4cWF6yiNmB8OyJ1B3SFlFI1ZSGj2o3grjS2dnJSescYyswa9eu5cQ7OjpwE0YodLGn/jVxHVJPFNfNc21PQiKiSJEIxgGFZ49XfETfthk+HGiO9B08wsOHD8deNd4fJa7rPi6G09LSeINPm97cHFT9R3gHSOqlT25m8WCWXCRzYvMpqUmkFYBxQOHZYedmNXdj36Cp6LvOJdTc3KzS4oKqC5cjSlz3dvhRurq6Qh6PJ0SDETrefvQP4h54y76fYwhg+ffRjfeRCi/kkrx+0Q9oVSRx2SpRbI8S7+iVuAiP+KrCiK0bvozx5Idat68KBoMhCmNBcKFQrYC4KDQC0SqrfhIS56oeCASC5ORCh5o/Pz7aO279CE/Oo7hvG70EBYrCPrX26CzM+uoxh0hnUWYyJd4VmSihWvvJxkheX2uY1e0qPRij4q09TW98/Z8D59B3CmNBUnMFoVpMTgT6LigI44eqB2kwMNxBchJvk8ofFTdtempLTNi4XCCdjWcWqLwgrH3w0g4eCaBVq1/6Kb+GPrz3u+3Re31K95cfnHv1dfSZPDn6HoKq06qvqvVZPey3Po6RKSsr49cwVWWRwXE2+M7tyxs87VZZktNwsZJSWVRhJxTksMsFPgyY85MZbGrhBJqDe5kzxRGd20MjOlq6qNqawSOBWDcHaQhAQCG7Pty66+l29WKz0+n0k8ZCVQITJ04M7dy5U1m3bl0M8XjVFgyIizYP2ckgUpnBdJw6OeOHuYWZC191ys6o8WJtepHNNXMrgDeHE0MuALLG9Bc2bVTvsBo+v6/ls1+ebDv8Ham4j8IxZmPdtMEzhljvPCSKeMT5wmF2dra7sbExlY4H0QZJe4n82L7ksWRT/OJdl1yVtQqELHhvoyMjSZ//V4T0WbfbHSCnxklTxdhPxdMgaXjY6NSMBPtBX0ODikPqbto4eXpwKj0Y5MfMHHbzI6mOtJhADOkXLikY8AGA9JFA7S49FDMZCij+ih31bz3V2FPbqpOGlLH5aION94vfAnELi3qtHddBHJ7Hy3Sp0+YhO3Ivzl65Yrgn+wFjO3j82UumDcgAxCMMNPnPbdhc98a7LpcLThikYdOQNrdtcmhhKrD0U3GBZBVVieKfg5wdJJ+Smprq9fl8kH4qvdATCoVc+ekFo28YvvgVh0H1BWACWGLGBzpjLK7KoGSEGgC2Pl8wckDK/247+MrR1t2YL8N+IVmfThh7YdcKS/Cda1LiqFHRJufk5LioLuch8h6dvJfIpxB5aITzjtE/v32kZ/wDTpMBAJC+YkkKWmD8ktlHCQqKmrUnL7BWIh3vs23YcmPgu798Wv/Xz0CM3h2mdwd0wnwjn9QzatSoEJXKw1pEZeMTYxagq73w9FB7Suw8XlVVvaRi+A/yuO64bfR9t2eljL09xeEtYAOAQNhfcabrm9J/XtyGPIKn1Lp6B3X19tN6gJ/m29ymSUgKUlMzh2aEncUDmdRe1tXeaPce/dilbxgAOT99evbEQdOuHebJvsHrSC2gpec0Ky/RmNrlV3wVneHWrw427/hHc7C+k/IJEFZ1KSOjDFDIEtLmSRb1LUR94/dZeY+tVROoPDaQo1TQTS9PoSlfik4cA0B9c7mpc1z6GAByghISoZkjivI8MuVRjqEjU52DRuossXir+UJdFHcCXfW+b09VtR9tMnReoefxNJqeCbsF6R7KygL03B56N8/OWK/3tkTaNnHWa/M8zrNIru8iOik0GeADQGHFTabh0q85qL/8Kwu0xSBgTwPB6BiLGMZn83SZzmuQMAhTWz5voEeGoNcgTtWUHiqW8OO8vLww+R5lz5494UT2PBDEY9rSQqOTHAmP91TFdNGChJsyPTdlelztqcMu6i+XvNiIkBQRHlcPHGv6sUbHIKzo56J1AZBkvR5cSFhUVBR2CbD69bIpysvLecdoAHqINOytm0ijJt9J3r+TVBLHXfrGkwsiJRIMLF1i76MBEue7qE0XqTPadYiNnFen3j6Ad5HGYSDwTcslkQYGamVULLrLpH7y6dOnuY1TGctFFR0hcYfhvujinQ6eaNBgYc6sEHm+0WAKqatEWJkwYYI6depUjYhbtuWrBW775GGd1FEXFQA8FFsR8+HRMdFBKocgPrTvRkgnh4l70ijPxtwAzpLnCLpDvSztvFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg=="},94826:(e,i,l)=>{l.d(i,{A:()=>r});var n=l(59254),t=l(46639),s=l(62217),o=l(44414);const c=(0,n.Ay)("div")((()=>({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}))),d=(0,n.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),r=()=>(0,o.jsxs)(c,{children:[(0,o.jsx)(t.A,{color:"primary",size:80,thickness:6}),(0,o.jsx)(d,{children:(0,o.jsx)("img",{src:s,alt:"Logo",style:{width:"100%",height:"100%"}})})]})}}]); \ No newline at end of file diff --git a/build/static/js/1148.ffa93df1.chunk.js b/build/static/js/1148.ffa93df1.chunk.js deleted file mode 100644 index bb02fa9..0000000 --- a/build/static/js/1148.ffa93df1.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[1148],{11148:(d,l,e)=>{e.r(l),e.d(l,{default:()=>v});var t=e(47223),a=e(82053),i=e(60899),n=e(29925),s=e(14857),r=e(36150),o=e(94826),c=e(52351),m=e(50027),h=e(81425),u=e(44414);const v=()=>{const d=(0,s.A)(),l=(0,t.A)(d.breakpoints.down("md")),{data:e,isLoading:v}=(0,r.I)({queryKey:["getuser"],queryFn:h.ts});return(0,u.jsxs)(u.Fragment,{children:[v&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c.A,{}),(0,u.jsx)(o.A,{})]}),(0,u.jsx)(m.A,{contentSX:{p:l?2:3},title:(0,u.jsx)(a.A,{variant:"h3",sx:{m:{xs:1.5,md:3}},children:"User Profile"}),children:(0,u.jsxs)(i.Ay,{container:!0,spacing:{xs:2.5,md:4},children:[(0,u.jsx)(i.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,u.jsx)(n.A,{fullWidth:!0,label:"User ID",value:(null===e||void 0===e?void 0:e.userid)||"",InputProps:{readOnly:!0},variant:"standard"})}),(0,u.jsx)(i.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,u.jsx)(n.A,{fullWidth:!0,label:"User Name",value:(null===e||void 0===e?void 0:e.fullname)||"",InputProps:{readOnly:!0},variant:"standard"})}),(0,u.jsx)(i.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,u.jsx)(n.A,{fullWidth:!0,label:"App Location ",value:(null===e||void 0===e?void 0:e.applocation)||"",InputProps:{readOnly:!0},variant:"standard"})}),(0,u.jsx)(i.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,u.jsx)(n.A,{fullWidth:!0,label:"Auth Name",value:(null===e||void 0===e?void 0:e.authname)||"",InputProps:{readOnly:!0},variant:"standard"})}),(0,u.jsx)(i.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,u.jsx)(n.A,{fullWidth:!0,label:"Contact No",value:(null===e||void 0===e?void 0:e.contactno)||"",InputProps:{readOnly:!0},variant:"standard"})}),(0,u.jsx)(i.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,u.jsx)(n.A,{fullWidth:!0,label:"E-Mail",value:(null===e||void 0===e?void 0:e.email)||"",InputProps:{readOnly:!0},variant:"standard"})}),(0,u.jsx)(i.Ay,{item:!0,xs:12,children:(0,u.jsx)(n.A,{fullWidth:!0,label:"Address",value:(null===e||void 0===e?void 0:e.address)||"",InputProps:{readOnly:!0},variant:"standard"})}),(0,u.jsx)(i.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,u.jsx)(n.A,{fullWidth:!0,label:"Location",value:(null===e||void 0===e?void 0:e.suburb)||"",InputProps:{readOnly:!0},variant:"standard"})}),(0,u.jsx)(i.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,u.jsx)(n.A,{fullWidth:!0,label:"City",value:(null===e||void 0===e?void 0:e.city)||"",InputProps:{readOnly:!0},variant:"standard"})}),(0,u.jsx)(i.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,u.jsx)(n.A,{fullWidth:!0,label:"State",value:(null===e||void 0===e?void 0:e.state)||"",InputProps:{readOnly:!0},variant:"standard"})}),(0,u.jsx)(i.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,u.jsx)(n.A,{fullWidth:!0,label:"Postcode",value:(null===e||void 0===e?void 0:e.postcode)||"",InputProps:{readOnly:!0},variant:"standard"})})]})})]})}},62217:d=>{d.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAPnUlEQVR4AdVae3AU9R3/7d4jdyGQQKAhECBAJBSmEAtFSQUjqPgAHGlhRm0lDkWY6Tg+O9qiErR26h8WR8ZWqTMN1ur4qMpDrTyjtDwDJloeCYiBvAgkaZ53l7vb3X4/v9vfZS/Zu9uFwLSfmb3d293f7u/z+z5/399K7CphdW5JrupgBZosZ0ialmu8pklSjUOTamRJbvvjqTUV7CpAYlcIj+SWZHQ55WJZlm7UNK2IXpRhpZ3GWJskSWXUZrPD4Sp77eSva9gVwIATXz35+SJNYWs1phWxAYDEpDKVaZv+fOrZUjaAGDDiK695rpgetpYOc82upw72sMycdJbz/SzmHeKl/ynRay31bbS1s7rjTczXGYj3ihrShnUDNQCXTXzlNS8UyExdbybhSdeNYwXz81nBzflE2pKms7oT51ntiSa276NKVn3wrNktNcGQelNpTUkNuwxcFvFV+S88rKnKy8ZzkOz84uvYvOJZ/PhyAE3Y/+HXbN+HFVwjjJAlR8lr1WueY9wt2MclEYfj8rnkj+nwRnHOLuGWhnbmpfuMKh/3Xn0Atm74IuY8OcGPFYk99kbVM98xm7BFnDyttHLyb3MlRdsjSWycOA+VLv79YpY5Ork6V5efY59s/JJVHznH/+dMymLz7v0Rm71oWtK2GIDSJ7ew6kMxJlCjytI8u+Qddm4+93bPBIfqiiG96KG5RPouljokuZT3b/2avf7EB6ylsZ1dM2MsG5OfxU7RAFSWVbMAObUphRMTtsc7CpdMh6c3kqe8gN117Yh5W4627GljFmGZ+C/ynx/flzSkDPW2Aqj2+lV/Y5mj0tljG3/GFhQXspkLpnBJVx85yyq/OGWJPAANgzkd2/utOMXJzxp965vlF3YFrPRHZtYgSZq6vi/p2TT6VrF+1Vt8/yiRhnoLiIHAftc7h0kDzlp6HgYcfTAgVwmEPmIWzTeZxPEQaeWkkhJJk1eJk8vWLGBz75nBrAIqfmDrN2zhqjlsetGkftddKU6WQ2qPe6AZVuwdGPP9kWw4+ZWKnVXiVO6M4UXtR1rKDiZrm4g4J70871cTnMzzd3ESNn3bgz9mdgC7hmoufeKWuB4/c1QGV3nYfP7Msfy/FYB8rM1LC6YNm72lonXv+UTtEqr60qVLJTcbvEv8h20tfOhGZgeQtpBiZnZ6wnuhEUDFnlPMDhaSMCbNilohc0kp61mEW1y1j0u8hLR78Ff5xX3t2i5AHLjegvqOIdtHXK/8oorZRfGLiw3aJM1dkVeynA5kCsGm98cjLhNxh4O5nxEnoOJW4rQRkDRUF3adTNoAEprRRB7tfJ09zA7Qt3mGCCMz+dmioiLKcSRTjvGISw/kPbNcSDtzdLotDy6A+AyYObR4KCjK53ur3t2I+ct7s0b0Pfds4U04RuLV914z4rjJ4ZSc94sTSBrsShvYv62S76frZKwAYQ2orWpidoEExyh1tzPl6SlTpjhJ6v3u7Utcgm0vHf/wePKUc8TJS5E21LWu6gKbRBmalXwcgHp70yISg8QR3oTWWAWk3gtpbp6/cCiLRK8Y9k7jHzgCGh3n8om/ibpueHKr0vZT5lVZFvHItVWRaALVQ4pqxcYfL3opeoxcvlr3D4BVc4HU4eFFeMt0ZsHJvUzcFKPkY4gvW7YMGiC7ZfcicW723dalXUsS3lSyNeZcBUmsmaS/5p0Vlp4BVccADsvOYP6uAM/yKsqq7PkJmv8L4k7mmEu7DcRNIfIqkedu3qjq0pkzZ/DfITE5quZjp2Qxu0Dnha1iX1fdxD55fW/CNjANYN49s7jKI5O788E5kfY0oHZQcEuvT5GY8wbaye+//36MqsfY+JEjR6QlY1cX0CHvNdQmZ/JIZhUtjW3RzkNqsG90Hti2cS8fgGSoqz7Pp6loi/uH6wNnJ7zBNA0ZYvrdY1aMZ6hdGHQ9RuL473KmDBUnUB+zAyE1dP6me2fxpMUYljat3Zb0GfvJodWRRz9Aic/utw+Ts/NG1L/L0qQrCoRggVTXUGRPMULmNo44h0CflZXlcGiuXLPGdoDOo7Pw0EYpC5W/c9Wcfm3EoAGiSAF4h0QiQmtDmyUHKZAzZSSrPam/W5MgzJgUlo+CrgFSU1OT5GTOseKi7UytsT2GiJlqW1X5aB+IrJfCYXNDO7MDYwh1yA4kYvKMGTNkkcxw4ghjdJLfQ9ntJRcgWxqsFUCsqDzg1e0U5FtsEvfGVIQ4J9nv90fNXEhcgmPLyEAh49KJW4WZlzezYSE172BvjDbZhc5JPn78eH/nlpubK7e1tcWQtjtRaDXpnLHaYkRflTdbSEhN65V4a4Plclo/IC/TDyV9ixCnNJWFw2EpPT2dBcKBBtHA3+FndmCmjsueuJnIf8/0/mQq79UlDkdpV+LGOnxQ7aljOmFwBTjxY8eOSXV1day9vV1SlFCHaFB3wroT8sdZ+kE4QuXFDMkSG7+ucZmUxdmdqrbU9WpIINQuiPO5CM5x4pTVYMdTucbgt8ejjeutj3K8Tg0jaU2aMY4nJWYQKm+mLT7d7kUW2GrDwRmFFpD8Xax3xSUmZcUfPhL7L2yvp9XJTv7ijgAv4ltBPK8rHNRCPf00QzKVRzs8p7Y6YRktCqy99foMrWN73bsnWJ/ZmTGbUVlkADRFDUarlIYKZkKYeWUjUYSm+0sWmraFxHdTaTkRhtnI2bHwKBBUA3iwSv6LcxPnjV4dI6J5vV61W+04JM5X7LBG3Mwr9820oPLxZln+zsQpac6kkdG5QDLs+7AyetwRat0FTvqsLEpeJDBaTU2NQocqBXl1f9PnH4uGmN5ZcSpmqu41KSUvffwWy4UJIzCIxlQ2bj/ILxnX1mq6Tx0EJwrVKlVjNFF8NKasbMSIEeqgQYOUWl91W0gNlIvGu0oPJH2h31Ti/VNeqP8dJrm6KQnDYIp5erKwZpR2j9JTfrRldy1x4mZMCYwWk7mxiPjVixcvqt3d3WpKSopS6z/9J/GA3ZsOJZW6mRp640h2Pk1bsWhoBzAToLo8fhES0t4fo+YXoblhWZbDtOcaLa5FbZziGyc/ZMgQpaenJ7yz4b1DqhpuxDV492RSNxuYeF4cWF6yiNmB8OyJ1B3SFlFI1ZSGj2o3grjS2dnJSescYyswa9eu5cQ7OjpwE0YodLGn/jVxHVJPFNfNc21PQiKiSJEIxgGFZ49XfETfthk+HGiO9B08wsOHD8deNd4fJa7rPi6G09LSeINPm97cHFT9R3gHSOqlT25m8WCWXCRzYvMpqUmkFYBxQOHZYedmNXdj36Cp6LvOJdTc3KzS4oKqC5cjSlz3dvhRurq6Qh6PJ0SDETrefvQP4h54y76fYwhg+ffRjfeRCi/kkrx+0Q9oVSRx2SpRbI8S7+iVuAiP+KrCiK0bvozx5Idat68KBoMhCmNBcKFQrYC4KDQC0SqrfhIS56oeCASC5ORCh5o/Pz7aO279CE/Oo7hvG70EBYrCPrX26CzM+uoxh0hnUWYyJd4VmSihWvvJxkheX2uY1e0qPRij4q09TW98/Z8D59B3CmNBUnMFoVpMTgT6LigI44eqB2kwMNxBchJvk8ofFTdtempLTNi4XCCdjWcWqLwgrH3w0g4eCaBVq1/6Kb+GPrz3u+3Re31K95cfnHv1dfSZPDn6HoKq06qvqvVZPey3Po6RKSsr49cwVWWRwXE2+M7tyxs87VZZktNwsZJSWVRhJxTksMsFPgyY85MZbGrhBJqDe5kzxRGd20MjOlq6qNqawSOBWDcHaQhAQCG7Pty66+l29WKz0+n0k8ZCVQITJ04M7dy5U1m3bl0M8XjVFgyIizYP2ckgUpnBdJw6OeOHuYWZC191ys6o8WJtepHNNXMrgDeHE0MuALLG9Bc2bVTvsBo+v6/ls1+ebDv8Ham4j8IxZmPdtMEzhljvPCSKeMT5wmF2dra7sbExlY4H0QZJe4n82L7ksWRT/OJdl1yVtQqELHhvoyMjSZ//V4T0WbfbHSCnxklTxdhPxdMgaXjY6NSMBPtBX0ODikPqbto4eXpwKj0Y5MfMHHbzI6mOtJhADOkXLikY8AGA9JFA7S49FDMZCij+ih31bz3V2FPbqpOGlLH5aION94vfAnELi3qtHddBHJ7Hy3Sp0+YhO3Ivzl65Yrgn+wFjO3j82UumDcgAxCMMNPnPbdhc98a7LpcLThikYdOQNrdtcmhhKrD0U3GBZBVVieKfg5wdJJ+Smprq9fl8kH4qvdATCoVc+ekFo28YvvgVh0H1BWACWGLGBzpjLK7KoGSEGgC2Pl8wckDK/247+MrR1t2YL8N+IVmfThh7YdcKS/Cda1LiqFHRJufk5LioLuch8h6dvJfIpxB5aITzjtE/v32kZ/wDTpMBAJC+YkkKWmD8ktlHCQqKmrUnL7BWIh3vs23YcmPgu798Wv/Xz0CM3h2mdwd0wnwjn9QzatSoEJXKw1pEZeMTYxagq73w9FB7Suw8XlVVvaRi+A/yuO64bfR9t2eljL09xeEtYAOAQNhfcabrm9J/XtyGPIKn1Lp6B3X19tN6gJ/m29ymSUgKUlMzh2aEncUDmdRe1tXeaPce/dilbxgAOT99evbEQdOuHebJvsHrSC2gpec0Ky/RmNrlV3wVneHWrw427/hHc7C+k/IJEFZ1KSOjDFDIEtLmSRb1LUR94/dZeY+tVROoPDaQo1TQTS9PoSlfik4cA0B9c7mpc1z6GAByghISoZkjivI8MuVRjqEjU52DRuossXir+UJdFHcCXfW+b09VtR9tMnReoefxNJqeCbsF6R7KygL03B56N8/OWK/3tkTaNnHWa/M8zrNIru8iOik0GeADQGHFTabh0q85qL/8Kwu0xSBgTwPB6BiLGMZn83SZzmuQMAhTWz5voEeGoNcgTtWUHiqW8OO8vLww+R5lz5494UT2PBDEY9rSQqOTHAmP91TFdNGChJsyPTdlelztqcMu6i+XvNiIkBQRHlcPHGv6sUbHIKzo56J1AZBkvR5cSFhUVBR2CbD69bIpysvLecdoAHqINOytm0ijJt9J3r+TVBLHXfrGkwsiJRIMLF1i76MBEue7qE0XqTPadYiNnFen3j6Ad5HGYSDwTcslkQYGamVULLrLpH7y6dOnuY1TGctFFR0hcYfhvujinQ6eaNBgYc6sEHm+0WAKqatEWJkwYYI6depUjYhbtuWrBW775GGd1FEXFQA8FFsR8+HRMdFBKocgPrTvRkgnh4l70ijPxtwAzpLnCLpDvSztvFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg=="},94826:(d,l,e)=>{e.d(l,{A:()=>o});var t=e(59254),a=e(46639),i=e(62217),n=e(44414);const s=(0,t.Ay)("div")((()=>({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}))),r=(0,t.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),o=()=>(0,n.jsxs)(s,{children:[(0,n.jsx)(a.A,{color:"primary",size:80,thickness:6}),(0,n.jsx)(r,{children:(0,n.jsx)("img",{src:i,alt:"Logo",style:{width:"100%",height:"100%"}})})]})}}]); \ No newline at end of file diff --git a/build/static/js/1222.8e2c3312.chunk.js b/build/static/js/1222.8e2c3312.chunk.js deleted file mode 100644 index e60b6f2..0000000 --- a/build/static/js/1222.8e2c3312.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[1222],{31222:(t,a,h)=>{h.d(a,{$G1:()=>V,Azs:()=>gt,BJM:()=>C,Cd7:()=>ct,CtR:()=>Pt,DX0:()=>_,DZH:()=>A,EZw:()=>b,E_E:()=>pt,E_J:()=>I,EgJ:()=>K,F6S:()=>nt,GdF:()=>$,H4F:()=>j,HPi:()=>it,Im6:()=>p,ItP:()=>x,Itr:()=>Ct,JFD:()=>zt,JL6:()=>lt,Ki0:()=>n,LTk:()=>Zt,MiI:()=>at,N3N:()=>Y,NpB:()=>D,NtI:()=>et,Rod:()=>m,S3Y:()=>q,SeC:()=>Ft,U3x:()=>w,Uhn:()=>g,VP9:()=>J,WVj:()=>E,WnU:()=>G,Wux:()=>L,Xbk:()=>st,Xh5:()=>W,YBc:()=>M,YHz:()=>Q,Yvo:()=>T,Z2J:()=>l,Zs6:()=>_t,_pN:()=>bt,aSE:()=>ht,aVM:()=>ot,auT:()=>wt,bfP:()=>e,bmp:()=>N,bqQ:()=>z,bsz:()=>vt,dDC:()=>c,dKO:()=>U,g9_:()=>Ht,gZ7:()=>f,giK:()=>At,gl1:()=>Bt,gsJ:()=>F,gwi:()=>S,ihY:()=>Et,imn:()=>k,ivF:()=>B,j1Q:()=>Vt,joZ:()=>mt,k4P:()=>o,kci:()=>X,lB9:()=>Lt,lbm:()=>Z,m6K:()=>ft,mU9:()=>i,nZo:()=>s,o8z:()=>R,ohY:()=>r,pSF:()=>xt,pWE:()=>tt,pk7:()=>dt,q53:()=>St,rAP:()=>O,tMO:()=>u,tX0:()=>d,tjE:()=>Jt,u9F:()=>H,uDv:()=>Mt,vbW:()=>kt,wZm:()=>P,xI$:()=>y,xVu:()=>ut,zPd:()=>rt});var v=h(99230);function r(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 18v1c0 1.1-.9 2-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h14c1.1 0 2 .9 2 2v1h-9a2 2 0 00-2 2v8a2 2 0 002 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"}}]})(t)}function l(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"}}]})(t)}function n(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20a2 2 0 002 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zM9 14H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-8 4H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2z"}}]})(t)}function c(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"}}]})(t)}function i(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}}]})(t)}function g(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}}]})(t)}function z(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1c.61 0 1.1-.49 1.1-1.1s-.49-1.1-1.1-1.1zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm2.19 12.19L6 18l3.81-8.19L18 6l-3.81 8.19z"}}]})(t)}function e(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.1 19.37l1 1.74c-.96.44-2.01.73-3.1.84v-2.02c.74-.09 1.44-.28 2.1-.56zM4.07 13H2.05c.11 1.1.4 2.14.84 3.1l1.74-1c-.28-.66-.47-1.36-.56-2.1zM15.1 4.63l1-1.74c-.96-.44-2-.73-3.1-.84v2.02c.74.09 1.44.28 2.1.56zM19.93 11h2.02c-.11-1.1-.4-2.14-.84-3.1l-1.74 1c.28.66.47 1.36.56 2.1zM8.9 19.37l-1 1.74c.96.44 2.01.73 3.1.84v-2.02c-.74-.09-1.44-.28-2.1-.56zM11 4.07V2.05c-1.1.11-2.14.4-3.1.84l1 1.74c.66-.28 1.36-.47 2.1-.56zm7.36 3.1l1.74-1.01c-.63-.87-1.4-1.64-2.27-2.27l-1.01 1.74c.59.45 1.1.96 1.54 1.54zM4.63 8.9l-1.74-1c-.44.96-.73 2-.84 3.1h2.02c.09-.74.28-1.44.56-2.1zm15.3 4.1c-.09.74-.28 1.44-.56 2.1l1.74 1c.44-.96.73-2.01.84-3.1h-2.02zm-3.1 5.36l1.01 1.74c.87-.63 1.64-1.4 2.27-2.27l-1.74-1.01c-.45.59-.96 1.1-1.54 1.54zM7.17 5.64l-1-1.75c-.88.64-1.64 1.4-2.27 2.28l1.74 1.01a7.7 7.7 0 011.53-1.54zM5.64 16.83l-1.74 1c.63.87 1.4 1.64 2.27 2.27l1.01-1.74a7.7 7.7 0 01-1.54-1.53zM13 7h-2v5.41l4.29 4.29 1.41-1.41-3.7-3.7V7z"}}]})(t)}function d(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5l-4-4V4h8v3.5l-4 4z"}}]})(t)}function o(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11 7h2v2h-2V7zm0 4h2v6h-2v-6zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}}]})(t)}function M(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"}}]})(t)}function H(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M-618-3000H782V600H-618zM0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 6H10v6H8V4h6V0H6v6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2z"}}]})(t)}function p(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 3h-2v10h2V3zm4.83 2.17l-1.42 1.42A6.92 6.92 0 0119 12c0 3.87-3.13 7-7 7A6.995 6.995 0 017.58 6.58L6.17 5.17A8.932 8.932 0 003 12a9 9 0 0018 0c0-2.74-1.23-5.18-3.17-6.83z"}}]})(t)}function u(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}}]})(t)}function f(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}}]})(t)}function s(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"}}]})(t)}function V(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z"}}]})(t)}function m(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 18l2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"}}]})(t)}function k(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"}}]})(t)}function w(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}}]})(t)}function x(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}}]})(t)}function L(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}}]})(t)}function B(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z"}}]})(t)}function C(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20.38 8.57l-1.23 1.85a8 8 0 01-.22 7.58H5.07A8 8 0 0115.58 6.85l1.85-1.23A10 10 0 003.35 19a2 2 0 001.72 1h13.85a2 2 0 001.74-1 10 10 0 00-.27-10.44zm-9.79 6.84a2 2 0 002.83 0l5.66-8.49-8.49 5.66a2 2 0 000 2.83z"}}]})(t)}function A(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 22l-.01-6L14 12l3.99-4.01L18 2H6v6l4 4-4 3.99V22h12zM8 7.5V4h8v3.5l-4 4-4-4z"}}]})(t)}function S(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 010-5 2.5 2.5 0 010 5z"}}]})(t)}function b(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"}}]})(t)}function E(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"}}]})(t)}function Z(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"g",attr:{fillRule:"evenodd"},child:[{tag:"path",attr:{d:"M9 17l3-2.94a9.34 9.34 0 00-1-.06c-2.67 0-8 1.34-8 4v2h9l-3-3zm2-5c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4M15.47 20.5L12 17l1.4-1.41 2.07 2.08 5.13-5.17 1.4 1.41z"}}]}]})(t)}function _(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 8c-1.45 0-2.26 1.44-1.93 2.51l-3.55 3.56c-.3-.09-.74-.09-1.04 0l-2.55-2.55C12.27 10.45 11.46 9 10 9c-1.45 0-2.27 1.44-1.93 2.52l-4.56 4.55C2.44 15.74 1 16.55 1 18c0 1.1.9 2 2 2 1.45 0 2.26-1.44 1.93-2.51l4.55-4.56c.3.09.74.09 1.04 0l2.55 2.55C12.73 16.55 13.54 18 15 18c1.45 0 2.27-1.44 1.93-2.52l3.56-3.55c1.07.33 2.51-.48 2.51-1.93 0-1.1-.9-2-2-2z"}},{tag:"path",attr:{d:"M15 9l.94-2.07L18 6l-2.06-.93L15 3l-.92 2.07L12 6l2.08.93zM3.5 11L4 9l2-.5L4 8l-.5-2L3 8l-2 .5L3 9z"}}]})(t)}function F(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-5 12H9v-2h6v2zm5-7H4V4h16v3z"}}]})(t)}function J(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}},{tag:"path",attr:{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"}}]})(t)}function P(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"}}]})(t)}function I(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"}}]})(t)}function R(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0013 3.06V1h-2v2.06A8.994 8.994 0 003.06 11H1v2h2.06A8.994 8.994 0 0011 20.94V23h2v-2.06A8.994 8.994 0 0020.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"}}]})(t)}function Y(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 00-1.41 0 .996.996 0 000 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 00-1.41 0 .996.996 0 000 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 000-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 000-1.41.996.996 0 00-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 000-1.41.996.996 0 00-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"}}]})(t)}function D(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7-.25c.41 0 .75.34.75.75s-.34.75-.75.75-.75-.34-.75-.75.34-.75.75-.75zM9.1 17H7v-2.14l5.96-5.96 2.12 2.12L9.1 17zm7.75-7.73l-1.06 1.06-2.12-2.12 1.06-1.06c.2-.2.51-.2.71 0l1.41 1.41c.2.2.2.51 0 .71z"}}]})(t)}function N(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 13V9c0-.55-.45-1-1-1H7V6h5V4H9.5V3h-2v1H6c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h4v2H5v2h2.5v1h2v-1H11c.55 0 1-.45 1-1zM19.59 12.52l-5.66 5.65-2.83-2.83-1.41 1.42L13.93 21 21 13.93z"}}]})(t)}function W(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 4h3v16h-3zM5 14h3v6H5zm6-5h3v11h-3z"}}]})(t)}function j(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"}}]})(t)}function K(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"}}]})(t)}function U(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M3 18h12v-2H3v2zM3 6v2h18V6H3zm0 7h18v-2H3v2z"}}]})(t)}function X(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20.5 10l.5-2h-4l1-4h-2l-1 4h-4l1-4h-2L9 8H5l-.5 2h4l-1 4h-4L3 16h4l-1 4h2l1-4h4l-1 4h2l1-4h4l.5-2h-4l1-4h4zm-7 4h-4l1-4h4l-1 4z"}}]})(t)}function q(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}}]})(t)}function G(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}}]})(t)}function O(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"}}]})(t)}function Q(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13.66 7c-.56-1.18-1.76-2-3.16-2H6V3h12v2h-3.26c.48.58.84 1.26 1.05 2H18v2h-2.02c-.25 2.8-2.61 5-5.48 5h-.73l6.73 7h-2.77L7 14v-2h3.5c1.76 0 3.22-1.3 3.46-3H6V7h7.66z"}}]})(t)}function T(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 000-1.41l-2.34-2.34a.996.996 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}}]})(t)}function $(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.5 3.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2v14H3v3c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V2l-1.5 1.5zM19 19c0 .55-.45 1-1 1s-1-.45-1-1v-3H8V5h11v14z"}},{tag:"path",attr:{d:"M9 7h6v2H9zM16 7h2v2h-2zM9 10h6v2H9zM16 10h2v2h-2z"}}]})(t)}function y(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z"}}]})(t)}function tt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9 1h6v2H9zM19.03 7.39l1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42A8.962 8.962 0 0012 4a9 9 0 00-9 9c0 4.97 4.02 9 9 9a8.994 8.994 0 007.03-14.61zM13 14h-2V8h2v6z"}}]})(t)}function at(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"}}]})(t)}function ht(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"}}]})(t)}function vt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5zm5.8-10l2.4-2.4.8.8c1.3 1.3 3 2.1 5.1 2.1V9c-1.5 0-2.7-.6-3.6-1.5l-1.9-1.9c-.5-.4-1-.6-1.6-.6s-1.1.2-1.4.6L7.8 8.4c-.4.4-.6.9-.6 1.4 0 .6.2 1.1.6 1.4L11 14v5h2v-6.2l-2.2-2.3zM19 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5z"}}]})(t)}function rt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 6h-2c0-2.76-2.24-5-5-5S7 3.24 7 6H5c-1.1 0-1.99.9-1.99 2L3 20c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-7-3c1.66 0 3 1.34 3 3H9c0-1.66 1.34-3 3-3zm0 10c-2.76 0-5-2.24-5-5h2c0 1.66 1.34 3 3 3s3-1.34 3-3h2c0 2.76-2.24 5-5 5z"}}]})(t)}function lt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"}}]})(t)}function nt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zM6 18.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm13.5-9l1.96 2.5H17V9.5h2.5zm-1.5 9c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"}}]})(t)}function ct(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"}}]})(t)}function it(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0013 3.06V1h-2v2.06A8.994 8.994 0 003.06 11H1v2h2.06A8.994 8.994 0 0011 20.94V23h2v-2.06A8.994 8.994 0 0020.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"}}]})(t)}function gt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2a9 9 0 00-9 9c0 4.17 2.84 7.67 6.69 8.69L12 22l2.31-2.31C18.16 18.67 21 15.17 21 11a9 9 0 00-9-9zm0 2c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.3a7.2 7.2 0 01-6-3.22c.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08a7.2 7.2 0 01-6 3.22z"}}]})(t)}function zt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 010-5 2.5 2.5 0 010 5z"}}]})(t)}function et(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 9H9V2H7v7H5V2H3v7c0 2.12 1.66 3.84 3.75 3.97V22h2.5v-9.03C11.34 12.84 13 11.12 13 9V2h-2v7zm5-3v8h2.5v8H21V2c-2.76 0-5 2.24-5 4z"}}]})(t)}function dt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 15.18V7c0-2.21-1.79-4-4-4s-4 1.79-4 4v10c0 1.1-.9 2-2 2s-2-.9-2-2V8.82C8.16 8.4 9 7.3 9 6c0-1.66-1.34-3-3-3S3 4.34 3 6c0 1.3.84 2.4 2 2.82V17c0 2.21 1.79 4 4 4s4-1.79 4-4V7c0-1.1.9-2 2-2s2 .9 2 2v8.18A2.996 2.996 0 0018 21c1.66 0 3-1.34 3-3 0-1.3-.84-2.4-2-2.82z"}}]})(t)}function ot(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 11c-.18 0-.36.03-.53.05L17.41 9H20V6l-3.72 1.86L13.41 5H9v2h3.59l2 2H11l-4 2-2-2H0v2h4c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4l2 2h3l3.49-6.1 1.01 1.01c-.91.73-1.5 1.84-1.5 3.09 0 2.21 1.79 4 4 4s4-1.79 4-4-1.79-4-4-4zM4 17c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm16 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}}]})(t)}function Mt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(t)}function Ht(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}}]})(t)}function pt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}}]})(t)}function ut(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}}]})(t)}function ft(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}}]})(t)}function st(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}}]})(t)}function Vt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}}]})(t)}function mt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0012 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0112 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}}]})(t)}function kt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.31 17l2.44-2.44L14.19 17l1.06-1.06-2.44-2.44 2.44-2.44L14.19 10l-2.44 2.44L9.31 10l-1.06 1.06 2.44 2.44-2.44 2.44L9.31 17zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 002 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z"}}]})(t)}function wt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 10H7v2h10v-2zm2-7h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 002 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zm-5-5H7v2h7v-2z"}}]})(t)}function xt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.01 7L16 3h-2v4h-4V3H8v4h-.01C7 6.99 6 7.99 6 8.99v5.49L9.5 18v3h5v-3l3.5-3.51v-5.5c0-1-1-2-1.99-1.99z"}}]})(t)}function Lt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M18.6 6.62c-1.44 0-2.8.56-3.77 1.53L12 10.66 10.48 12h.01L7.8 14.39c-.64.64-1.49.99-2.4.99-1.87 0-3.39-1.51-3.39-3.38S3.53 8.62 5.4 8.62c.91 0 1.76.35 2.44 1.03l1.13 1 1.51-1.34L9.22 8.2A5.37 5.37 0 005.4 6.62C2.42 6.62 0 9.04 0 12s2.42 5.38 5.4 5.38c1.44 0 2.8-.56 3.77-1.53l2.83-2.5.01.01L13.52 12h-.01l2.69-2.39c.64-.64 1.49-.99 2.4-.99 1.87 0 3.39 1.51 3.39 3.38s-1.52 3.38-3.39 3.38c-.9 0-1.76-.35-2.44-1.03l-1.14-1.01-1.51 1.34 1.27 1.12a5.386 5.386 0 003.82 1.57c2.98 0 5.4-2.41 5.4-5.38s-2.42-5.37-5.4-5.37z"}}]})(t)}function Bt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.9 8.89l-1.05-4.37c-.22-.9-1-1.52-1.91-1.52H5.05c-.9 0-1.69.63-1.9 1.52L2.1 8.89c-.24 1.02-.02 2.06.62 2.88.08.11.19.19.28.29V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6.94c.09-.09.2-.18.28-.28.64-.82.87-1.87.62-2.89zm-2.99-3.9l1.05 4.37c.1.42.01.84-.25 1.17-.14.18-.44.47-.94.47-.61 0-1.14-.49-1.21-1.14L16.98 5l1.93-.01zM13 5h1.96l.54 4.52c.05.39-.07.78-.33 1.07-.22.26-.54.41-.95.41-.67 0-1.22-.59-1.22-1.31V5zM8.49 9.52L9.04 5H11v4.69c0 .72-.55 1.31-1.29 1.31-.34 0-.65-.15-.89-.41a1.42 1.42 0 01-.33-1.07zm-4.45-.16L5.05 5h1.97l-.58 4.86c-.08.65-.6 1.14-1.21 1.14-.49 0-.8-.29-.93-.47-.27-.32-.36-.75-.26-1.17zM5 19v-6.03c.08.01.15.03.23.03.87 0 1.66-.36 2.24-.95.6.6 1.4.95 2.31.95.87 0 1.65-.36 2.23-.93.59.57 1.39.93 2.29.93.84 0 1.64-.35 2.24-.95.58.59 1.37.95 2.24.95.08 0 .15-.02.23-.03V19H5z"}}]})(t)}function Ct(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 12.75c1.63 0 3.07.39 4.24.9 1.08.48 1.76 1.56 1.76 2.73V18H6v-1.61c0-1.18.68-2.26 1.76-2.73 1.17-.52 2.61-.91 4.24-.91zM4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58A2.01 2.01 0 000 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29zM20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85A6.95 6.95 0 0020 14c-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57zM12 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z"}}]})(t)}function At(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.1 12.08c-2.33-4.51-.5-8.48.53-10.07C6.27 2.2 1.98 6.59 1.98 12c0 .14.02.28.02.42.62-.27 1.29-.42 2-.42 1.66 0 3.18.83 4.1 2.15A4.01 4.01 0 0111 18c0 1.52-.87 2.83-2.12 3.51.98.32 2.03.5 3.11.5 3.5 0 6.58-1.8 8.37-4.52-2.36.23-6.98-.97-9.26-5.41z"}},{tag:"path",attr:{d:"M7 16h-.18C6.4 14.84 5.3 14 4 14c-1.66 0-3 1.34-3 3s1.34 3 3 3h3c1.1 0 2-.9 2-2s-.9-2-2-2z"}}]})(t)}function St(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7.58 4.08L6.15 2.65C3.75 4.48 2.17 7.3 2.03 10.5h2a8.445 8.445 0 013.55-6.42zm12.39 6.42h2c-.15-3.2-1.73-6.02-4.12-7.85l-1.42 1.43a8.495 8.495 0 013.54 6.42zM18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2v-5zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18.1-.24.15-.5.15-.78h-4c.01 1.1.9 2 2.01 2z"}}]})(t)}function bt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fillRule:"evenodd",d:"M16.67 13.13C18.04 14.06 19 15.32 19 17v3h4v-3c0-2.18-3.57-3.47-6.33-3.87z"}},{tag:"circle",attr:{cx:"9",cy:"8",r:"4",fillRule:"evenodd"}},{tag:"path",attr:{fillRule:"evenodd",d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4c-.47 0-.91.1-1.33.24a5.98 5.98 0 010 7.52c.42.14.86.24 1.33.24zM9 13c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"}}]})(t)}function Et(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8.65 5.82a3.999 3.999 0 115.53 5.53L8.65 5.82zM20 17.17c-.02-1.1-.63-2.11-1.61-2.62-.54-.28-1.13-.54-1.77-.76L20 17.17zm1.19 4.02L2.81 2.81 1.39 4.22l8.89 8.89c-1.81.23-3.39.79-4.67 1.45A2.97 2.97 0 004 17.22V20h13.17l2.61 2.61 1.41-1.42z"}}]})(t)}function Zt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}}]})(t)}function _t(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"}}]})(t)}function Ft(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}}]})(t)}function Jt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M7 11h2v2H7v-2zm14-5v14c0 1.1-.9 2-2 2H5a2 2 0 01-2-2l.01-14c0-1.1.88-2 1.99-2h1V2h2v2h8V2h2v2h1c1.1 0 2 .9 2 2zM5 8h14V6H5v2zm14 12V10H5v10h14zm-4-7h2v-2h-2v2zm-4 0h2v-2h-2v2z"}}]})(t)}function Pt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}}]})(t)}}}]); \ No newline at end of file diff --git a/build/static/js/1222.c89bcf10.chunk.js b/build/static/js/1222.c89bcf10.chunk.js new file mode 100644 index 0000000..8ec2954 --- /dev/null +++ b/build/static/js/1222.c89bcf10.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[1222],{31222:(t,a,h)=>{h.d(a,{$G1:()=>V,$Nl:()=>Dt,AI8:()=>x,AYP:()=>yt,AdO:()=>qt,Azs:()=>dt,BJM:()=>A,Cd7:()=>zt,CtR:()=>Wt,DX0:()=>X,DZH:()=>S,EZw:()=>P,E_E:()=>ut,E_J:()=>Y,EgJ:()=>j,F6S:()=>it,G6c:()=>_t,GQB:()=>Tt,GdF:()=>R,H4F:()=>W,HPi:()=>gt,HU2:()=>Ot,Im6:()=>p,ItP:()=>w,Itr:()=>St,JFD:()=>et,JL6:()=>lt,Ki0:()=>n,LTk:()=>Zt,MiI:()=>ht,N3N:()=>D,NpB:()=>G,NtI:()=>ot,Rod:()=>m,S3Y:()=>O,S75:()=>jt,SeC:()=>It,U3x:()=>L,Uhn:()=>z,VP9:()=>I,WVj:()=>b,WnU:()=>Q,Wux:()=>B,X3k:()=>Ut,XT0:()=>Nt,XXh:()=>Qt,Xbk:()=>mt,Xh5:()=>U,YBc:()=>M,YHz:()=>$,Yvo:()=>y,Z2J:()=>r,Zs6:()=>Ft,aEx:()=>Gt,aSE:()=>vt,aVM:()=>Ht,auT:()=>wt,bfP:()=>d,bmp:()=>N,bqQ:()=>g,bsz:()=>rt,cAP:()=>Jt,dDC:()=>l,dKO:()=>q,g9_:()=>st,gZ7:()=>u,giK:()=>Pt,gl1:()=>At,gsJ:()=>Z,gwi:()=>E,ihY:()=>Xt,imn:()=>k,ivF:()=>C,j1Q:()=>kt,joZ:()=>xt,k4P:()=>o,kci:()=>K,lB9:()=>Ct,m6K:()=>Vt,mU9:()=>i,nZo:()=>f,o8z:()=>_,ohY:()=>c,pSF:()=>Bt,pWE:()=>at,pk7:()=>Mt,q53:()=>bt,qiG:()=>$t,qod:()=>Et,rAP:()=>T,tMO:()=>s,tX0:()=>e,tfO:()=>F,tjE:()=>Yt,tpc:()=>ct,u9F:()=>H,uDv:()=>pt,vbW:()=>Lt,wZm:()=>J,x2E:()=>Kt,xI$:()=>tt,xVu:()=>ft,zPd:()=>nt});var v=h(99230);function c(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 18v1c0 1.1-.9 2-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h14c1.1 0 2 .9 2 2v1h-9a2 2 0 00-2 2v8a2 2 0 002 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"}}]})(t)}function r(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"}}]})(t)}function n(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20a2 2 0 002 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zM9 14H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-8 4H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2z"}}]})(t)}function l(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"}}]})(t)}function i(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}}]})(t)}function z(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}}]})(t)}function g(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1c.61 0 1.1-.49 1.1-1.1s-.49-1.1-1.1-1.1zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm2.19 12.19L6 18l3.81-8.19L18 6l-3.81 8.19z"}}]})(t)}function d(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.1 19.37l1 1.74c-.96.44-2.01.73-3.1.84v-2.02c.74-.09 1.44-.28 2.1-.56zM4.07 13H2.05c.11 1.1.4 2.14.84 3.1l1.74-1c-.28-.66-.47-1.36-.56-2.1zM15.1 4.63l1-1.74c-.96-.44-2-.73-3.1-.84v2.02c.74.09 1.44.28 2.1.56zM19.93 11h2.02c-.11-1.1-.4-2.14-.84-3.1l-1.74 1c.28.66.47 1.36.56 2.1zM8.9 19.37l-1 1.74c.96.44 2.01.73 3.1.84v-2.02c-.74-.09-1.44-.28-2.1-.56zM11 4.07V2.05c-1.1.11-2.14.4-3.1.84l1 1.74c.66-.28 1.36-.47 2.1-.56zm7.36 3.1l1.74-1.01c-.63-.87-1.4-1.64-2.27-2.27l-1.01 1.74c.59.45 1.1.96 1.54 1.54zM4.63 8.9l-1.74-1c-.44.96-.73 2-.84 3.1h2.02c.09-.74.28-1.44.56-2.1zm15.3 4.1c-.09.74-.28 1.44-.56 2.1l1.74 1c.44-.96.73-2.01.84-3.1h-2.02zm-3.1 5.36l1.01 1.74c.87-.63 1.64-1.4 2.27-2.27l-1.74-1.01c-.45.59-.96 1.1-1.54 1.54zM7.17 5.64l-1-1.75c-.88.64-1.64 1.4-2.27 2.28l1.74 1.01a7.7 7.7 0 011.53-1.54zM5.64 16.83l-1.74 1c.63.87 1.4 1.64 2.27 2.27l1.01-1.74a7.7 7.7 0 01-1.54-1.53zM13 7h-2v5.41l4.29 4.29 1.41-1.41-3.7-3.7V7z"}}]})(t)}function e(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5l-4-4V4h8v3.5l-4 4z"}}]})(t)}function o(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11 7h2v2h-2V7zm0 4h2v6h-2v-6zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}}]})(t)}function M(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"}}]})(t)}function H(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M-618-3000H782V600H-618zM0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 6H10v6H8V4h6V0H6v6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2z"}}]})(t)}function p(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 3h-2v10h2V3zm4.83 2.17l-1.42 1.42A6.92 6.92 0 0119 12c0 3.87-3.13 7-7 7A6.995 6.995 0 017.58 6.58L6.17 5.17A8.932 8.932 0 003 12a9 9 0 0018 0c0-2.74-1.23-5.18-3.17-6.83z"}}]})(t)}function s(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}}]})(t)}function u(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}}]})(t)}function f(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"}}]})(t)}function V(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z"}}]})(t)}function m(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 18l2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"}}]})(t)}function k(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"}}]})(t)}function x(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"}}]})(t)}function L(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}}]})(t)}function w(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}}]})(t)}function B(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}}]})(t)}function C(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z"}}]})(t)}function A(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20.38 8.57l-1.23 1.85a8 8 0 01-.22 7.58H5.07A8 8 0 0115.58 6.85l1.85-1.23A10 10 0 003.35 19a2 2 0 001.72 1h13.85a2 2 0 001.74-1 10 10 0 00-.27-10.44zm-9.79 6.84a2 2 0 002.83 0l5.66-8.49-8.49 5.66a2 2 0 000 2.83z"}}]})(t)}function S(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18 22l-.01-6L14 12l3.99-4.01L18 2H6v6l4 4-4 3.99V22h12zM8 7.5V4h8v3.5l-4 4-4-4z"}}]})(t)}function E(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 010-5 2.5 2.5 0 010 5z"}}]})(t)}function P(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"}}]})(t)}function b(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"}}]})(t)}function X(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 8c-1.45 0-2.26 1.44-1.93 2.51l-3.55 3.56c-.3-.09-.74-.09-1.04 0l-2.55-2.55C12.27 10.45 11.46 9 10 9c-1.45 0-2.27 1.44-1.93 2.52l-4.56 4.55C2.44 15.74 1 16.55 1 18c0 1.1.9 2 2 2 1.45 0 2.26-1.44 1.93-2.51l4.55-4.56c.3.09.74.09 1.04 0l2.55 2.55C12.73 16.55 13.54 18 15 18c1.45 0 2.27-1.44 1.93-2.52l3.56-3.55c1.07.33 2.51-.48 2.51-1.93 0-1.1-.9-2-2-2z"}},{tag:"path",attr:{d:"M15 9l.94-2.07L18 6l-2.06-.93L15 3l-.92 2.07L12 6l2.08.93zM3.5 11L4 9l2-.5L4 8l-.5-2L3 8l-2 .5L3 9z"}}]})(t)}function Z(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-5 12H9v-2h6v2zm5-7H4V4h16v3z"}}]})(t)}function F(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"}}]})(t)}function I(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}},{tag:"path",attr:{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"}}]})(t)}function J(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"}}]})(t)}function Y(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"}}]})(t)}function _(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0013 3.06V1h-2v2.06A8.994 8.994 0 003.06 11H1v2h2.06A8.994 8.994 0 0011 20.94V23h2v-2.06A8.994 8.994 0 0020.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"}}]})(t)}function D(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 00-1.41 0 .996.996 0 000 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 00-1.41 0 .996.996 0 000 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 000-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 000-1.41.996.996 0 00-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 000-1.41.996.996 0 00-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"}}]})(t)}function G(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7-.25c.41 0 .75.34.75.75s-.34.75-.75.75-.75-.34-.75-.75.34-.75.75-.75zM9.1 17H7v-2.14l5.96-5.96 2.12 2.12L9.1 17zm7.75-7.73l-1.06 1.06-2.12-2.12 1.06-1.06c.2-.2.51-.2.71 0l1.41 1.41c.2.2.2.51 0 .71z"}}]})(t)}function N(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 13V9c0-.55-.45-1-1-1H7V6h5V4H9.5V3h-2v1H6c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h4v2H5v2h2.5v1h2v-1H11c.55 0 1-.45 1-1zM19.59 12.52l-5.66 5.65-2.83-2.83-1.41 1.42L13.93 21 21 13.93z"}}]})(t)}function U(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 4h3v16h-3zM5 14h3v6H5zm6-5h3v11h-3z"}}]})(t)}function W(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"}}]})(t)}function j(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"}}]})(t)}function q(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M3 18h12v-2H3v2zM3 6v2h18V6H3zm0 7h18v-2H3v2z"}}]})(t)}function K(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20.5 10l.5-2h-4l1-4h-2l-1 4h-4l1-4h-2L9 8H5l-.5 2h4l-1 4h-4L3 16h4l-1 4h2l1-4h4l-1 4h2l1-4h4l.5-2h-4l1-4h4zm-7 4h-4l1-4h4l-1 4z"}}]})(t)}function O(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}}]})(t)}function Q(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}}]})(t)}function T(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"}}]})(t)}function $(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13.66 7c-.56-1.18-1.76-2-3.16-2H6V3h12v2h-3.26c.48.58.84 1.26 1.05 2H18v2h-2.02c-.25 2.8-2.61 5-5.48 5h-.73l6.73 7h-2.77L7 14v-2h3.5c1.76 0 3.22-1.3 3.46-3H6V7h7.66z"}}]})(t)}function y(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 000-1.41l-2.34-2.34a.996.996 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}}]})(t)}function R(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.5 3.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2v14H3v3c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V2l-1.5 1.5zM19 19c0 .55-.45 1-1 1s-1-.45-1-1v-3H8V5h11v14z"}},{tag:"path",attr:{d:"M9 7h6v2H9zM16 7h2v2h-2zM9 10h6v2H9zM16 10h2v2h-2z"}}]})(t)}function tt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z"}}]})(t)}function at(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9 1h6v2H9zM19.03 7.39l1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42A8.962 8.962 0 0012 4a9 9 0 00-9 9c0 4.97 4.02 9 9 9a8.994 8.994 0 007.03-14.61zM13 14h-2V8h2v6z"}}]})(t)}function ht(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"}}]})(t)}function vt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"}}]})(t)}function ct(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 7h-5V4c0-1.1-.9-2-2-2h-2c-1.1 0-2 .9-2 2v3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zM9 12c.83 0 1.5.67 1.5 1.5S9.83 15 9 15s-1.5-.67-1.5-1.5S8.17 12 9 12zm3 6H6v-.75c0-1 2-1.5 3-1.5s3 .5 3 1.5V18zm1-9h-2V4h2v5zm5 7.5h-4V15h4v1.5zm0-3h-4V12h4v1.5z"}}]})(t)}function rt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5zm5.8-10l2.4-2.4.8.8c1.3 1.3 3 2.1 5.1 2.1V9c-1.5 0-2.7-.6-3.6-1.5l-1.9-1.9c-.5-.4-1-.6-1.6-.6s-1.1.2-1.4.6L7.8 8.4c-.4.4-.6.9-.6 1.4 0 .6.2 1.1.6 1.4L11 14v5h2v-6.2l-2.2-2.3zM19 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5z"}}]})(t)}function nt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 6h-2c0-2.76-2.24-5-5-5S7 3.24 7 6H5c-1.1 0-1.99.9-1.99 2L3 20c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-7-3c1.66 0 3 1.34 3 3H9c0-1.66 1.34-3 3-3zm0 10c-2.76 0-5-2.24-5-5h2c0 1.66 1.34 3 3 3s3-1.34 3-3h2c0 2.76-2.24 5-5 5z"}}]})(t)}function lt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"}}]})(t)}function it(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zM6 18.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm13.5-9l1.96 2.5H17V9.5h2.5zm-1.5 9c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"}}]})(t)}function zt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"}}]})(t)}function gt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0013 3.06V1h-2v2.06A8.994 8.994 0 003.06 11H1v2h2.06A8.994 8.994 0 0011 20.94V23h2v-2.06A8.994 8.994 0 0020.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"}}]})(t)}function dt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2a9 9 0 00-9 9c0 4.17 2.84 7.67 6.69 8.69L12 22l2.31-2.31C18.16 18.67 21 15.17 21 11a9 9 0 00-9-9zm0 2c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.3a7.2 7.2 0 01-6-3.22c.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08a7.2 7.2 0 01-6 3.22z"}}]})(t)}function et(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 010-5 2.5 2.5 0 010 5z"}}]})(t)}function ot(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11 9H9V2H7v7H5V2H3v7c0 2.12 1.66 3.84 3.75 3.97V22h2.5v-9.03C11.34 12.84 13 11.12 13 9V2h-2v7zm5-3v8h2.5v8H21V2c-2.76 0-5 2.24-5 4z"}}]})(t)}function Mt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 15.18V7c0-2.21-1.79-4-4-4s-4 1.79-4 4v10c0 1.1-.9 2-2 2s-2-.9-2-2V8.82C8.16 8.4 9 7.3 9 6c0-1.66-1.34-3-3-3S3 4.34 3 6c0 1.3.84 2.4 2 2.82V17c0 2.21 1.79 4 4 4s4-1.79 4-4V7c0-1.1.9-2 2-2s2 .9 2 2v8.18A2.996 2.996 0 0018 21c1.66 0 3-1.34 3-3 0-1.3-.84-2.4-2-2.82z"}}]})(t)}function Ht(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 11c-.18 0-.36.03-.53.05L17.41 9H20V6l-3.72 1.86L13.41 5H9v2h3.59l2 2H11l-4 2-2-2H0v2h4c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4l2 2h3l3.49-6.1 1.01 1.01c-.91.73-1.5 1.84-1.5 3.09 0 2.21 1.79 4 4 4s4-1.79 4-4-1.79-4-4-4zM4 17c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm16 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}}]})(t)}function pt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(t)}function st(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}}]})(t)}function ut(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}}]})(t)}function ft(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}}]})(t)}function Vt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}}]})(t)}function mt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}}]})(t)}function kt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}}]})(t)}function xt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0012 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0112 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}}]})(t)}function Lt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.31 17l2.44-2.44L14.19 17l1.06-1.06-2.44-2.44 2.44-2.44L14.19 10l-2.44 2.44L9.31 10l-1.06 1.06 2.44 2.44-2.44 2.44L9.31 17zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 002 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z"}}]})(t)}function wt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 10H7v2h10v-2zm2-7h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 002 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zm-5-5H7v2h7v-2z"}}]})(t)}function Bt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.01 7L16 3h-2v4h-4V3H8v4h-.01C7 6.99 6 7.99 6 8.99v5.49L9.5 18v3h5v-3l3.5-3.51v-5.5c0-1-1-2-1.99-1.99z"}}]})(t)}function Ct(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M18.6 6.62c-1.44 0-2.8.56-3.77 1.53L12 10.66 10.48 12h.01L7.8 14.39c-.64.64-1.49.99-2.4.99-1.87 0-3.39-1.51-3.39-3.38S3.53 8.62 5.4 8.62c.91 0 1.76.35 2.44 1.03l1.13 1 1.51-1.34L9.22 8.2A5.37 5.37 0 005.4 6.62C2.42 6.62 0 9.04 0 12s2.42 5.38 5.4 5.38c1.44 0 2.8-.56 3.77-1.53l2.83-2.5.01.01L13.52 12h-.01l2.69-2.39c.64-.64 1.49-.99 2.4-.99 1.87 0 3.39 1.51 3.39 3.38s-1.52 3.38-3.39 3.38c-.9 0-1.76-.35-2.44-1.03l-1.14-1.01-1.51 1.34 1.27 1.12a5.386 5.386 0 003.82 1.57c2.98 0 5.4-2.41 5.4-5.38s-2.42-5.37-5.4-5.37z"}}]})(t)}function At(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21.9 8.89l-1.05-4.37c-.22-.9-1-1.52-1.91-1.52H5.05c-.9 0-1.69.63-1.9 1.52L2.1 8.89c-.24 1.02-.02 2.06.62 2.88.08.11.19.19.28.29V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6.94c.09-.09.2-.18.28-.28.64-.82.87-1.87.62-2.89zm-2.99-3.9l1.05 4.37c.1.42.01.84-.25 1.17-.14.18-.44.47-.94.47-.61 0-1.14-.49-1.21-1.14L16.98 5l1.93-.01zM13 5h1.96l.54 4.52c.05.39-.07.78-.33 1.07-.22.26-.54.41-.95.41-.67 0-1.22-.59-1.22-1.31V5zM8.49 9.52L9.04 5H11v4.69c0 .72-.55 1.31-1.29 1.31-.34 0-.65-.15-.89-.41a1.42 1.42 0 01-.33-1.07zm-4.45-.16L5.05 5h1.97l-.58 4.86c-.08.65-.6 1.14-1.21 1.14-.49 0-.8-.29-.93-.47-.27-.32-.36-.75-.26-1.17zM5 19v-6.03c.08.01.15.03.23.03.87 0 1.66-.36 2.24-.95.6.6 1.4.95 2.31.95.87 0 1.65-.36 2.23-.93.59.57 1.39.93 2.29.93.84 0 1.64-.35 2.24-.95.58.59 1.37.95 2.24.95.08 0 .15-.02.23-.03V19H5z"}}]})(t)}function St(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 12.75c1.63 0 3.07.39 4.24.9 1.08.48 1.76 1.56 1.76 2.73V18H6v-1.61c0-1.18.68-2.26 1.76-2.73 1.17-.52 2.61-.91 4.24-.91zM4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58A2.01 2.01 0 000 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29zM20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85A6.95 6.95 0 0020 14c-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57zM12 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z"}}]})(t)}function Et(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 11V5l-3-3-3 3v2H3v14h18V11h-6zm-8 8H5v-2h2v2zm0-4H5v-2h2v2zm0-4H5V9h2v2zm6 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V9h2v2zm0-4h-2V5h2v2zm6 12h-2v-2h2v2zm0-4h-2v-2h2v2z"}}]})(t)}function Pt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M11.1 12.08c-2.33-4.51-.5-8.48.53-10.07C6.27 2.2 1.98 6.59 1.98 12c0 .14.02.28.02.42.62-.27 1.29-.42 2-.42 1.66 0 3.18.83 4.1 2.15A4.01 4.01 0 0111 18c0 1.52-.87 2.83-2.12 3.51.98.32 2.03.5 3.11.5 3.5 0 6.58-1.8 8.37-4.52-2.36.23-6.98-.97-9.26-5.41z"}},{tag:"path",attr:{d:"M7 16h-.18C6.4 14.84 5.3 14 4 14c-1.66 0-3 1.34-3 3s1.34 3 3 3h3c1.1 0 2-.9 2-2s-.9-2-2-2z"}}]})(t)}function bt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7.58 4.08L6.15 2.65C3.75 4.48 2.17 7.3 2.03 10.5h2a8.445 8.445 0 013.55-6.42zm12.39 6.42h2c-.15-3.2-1.73-6.02-4.12-7.85l-1.42 1.43a8.495 8.495 0 013.54 6.42zM18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2v-5zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18.1-.24.15-.5.15-.78h-4c.01 1.1.9 2 2.01 2z"}}]})(t)}function Xt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8.65 5.82a3.999 3.999 0 115.53 5.53L8.65 5.82zM20 17.17c-.02-1.1-.63-2.11-1.61-2.62-.54-.28-1.13-.54-1.77-.76L20 17.17zm1.19 4.02L2.81 2.81 1.39 4.22l8.89 8.89c-1.81.23-3.39.79-4.67 1.45A2.97 2.97 0 004 17.22V20h13.17l2.61 2.61 1.41-1.42z"}}]})(t)}function Zt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}}]})(t)}function Ft(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"}}]})(t)}function It(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}}]})(t)}function Jt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"}}]})(t)}function Yt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M7 11h2v2H7v-2zm14-5v14c0 1.1-.9 2-2 2H5a2 2 0 01-2-2l.01-14c0-1.1.88-2 1.99-2h1V2h2v2h8V2h2v2h1c1.1 0 2 .9 2 2zM5 8h14V6H5v2zm14 12V10H5v10h14zm-4-7h2v-2h-2v2zm-4 0h2v-2h-2v2z"}}]})(t)}function _t(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 12c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm1.65 7.35L16.5 17.2V14h1v2.79l1.85 1.85-.7.71zM18 3h-3.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H6c-1.1 0-2 .9-2 2v15c0 1.1.9 2 2 2h6.11a6.743 6.743 0 01-1.42-2H6V5h2v3h8V5h2v5.08c.71.1 1.38.31 2 .6V5c0-1.1-.9-2-2-2zm-6 2c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"}}]})(t)}function Dt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zM5 18c.2-.63 2.57-1.68 4.96-1.94l2.04-2a9.34 9.34 0 00-1-.06c-2.67 0-8 1.34-8 4v2h9l-2-2H5zm15.6-5.5l-5.13 5.17-2.07-2.08L12 17l3.47 3.5L22 13.91z"}}]})(t)}function Gt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2zm-1 18H5V9h14v11zm1-13H4V4h16v3z"}},{tag:"path",attr:{d:"M9 12h6v2H9z"}}]})(t)}function Nt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"}}]})(t)}function Ut(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"}}]})(t)}function Wt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}}]})(t)}function jt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13.66 7c-.56-1.18-1.76-2-3.16-2H6V3h12v2h-3.26c.48.58.84 1.26 1.05 2H18v2h-2.02c-.25 2.8-2.61 5-5.48 5h-.73l6.73 7h-2.77L7 14v-2h3.5c1.76 0 3.22-1.3 3.46-3H6V7h7.66z"}}]})(t)}function qt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.5 3.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2v14H3v3c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V2l-1.5 1.5zM15 20H6c-.55 0-1-.45-1-1v-1h10v2zm4-1c0 .55-.45 1-1 1s-1-.45-1-1v-3H8V5h11v14z"}},{tag:"path",attr:{d:"M9 7h6v2H9zM16 7h2v2h-2zM9 10h6v2H9zM16 10h2v2h-2z"}}]})(t)}function Kt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01L4 11V4h7v-.01l9 9-7 7.02z"}},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"}}]})(t)}function Ot(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zm-.5 1.5l1.96 2.5H17V9.5h2.5zM6 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2.22-3c-.55-.61-1.33-1-2.22-1s-1.67.39-2.22 1H3V6h12v9H8.22zM18 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"}}]})(t)}function Qt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14zM12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2z"}}]})(t)}function Tt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4.17 11H4h.17m9.24-6H9v2h3.59l2 2H11l-4 2-2-2H0v2h4c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4l2 2h3l3.49-6.1 1.01 1.01c-.91.73-1.5 1.84-1.5 3.09 0 2.21 1.79 4 4 4s4-1.79 4-4-1.79-4-4-4c-.18 0-.36.03-.53.05L17.41 9H20V6l-3.72 1.86L13.41 5zM20 17c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM4 17c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}}]})(t)}function $t(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z",opacity:".87"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}}]})(t)}function yt(t){return(0,v.k5)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58A2.01 2.01 0 000 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29zM20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85A6.95 6.95 0 0020 14c-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57zm-7.76-2.78c-1.17-.52-2.61-.9-4.24-.9-1.63 0-3.07.39-4.24.9A2.988 2.988 0 006 16.39V18h12v-1.61c0-1.18-.68-2.26-1.76-2.74zM8.07 16c.09-.23.13-.39.91-.69.97-.38 1.99-.56 3.02-.56s2.05.18 3.02.56c.77.3.81.46.91.69H8.07zM12 8c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m0-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}}]})(t)}}}]); \ No newline at end of file diff --git a/build/static/js/1504.61c5a37b.chunk.js b/build/static/js/1504.61c5a37b.chunk.js deleted file mode 100644 index e8aa813..0000000 --- a/build/static/js/1504.61c5a37b.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[1504],{23787:(e,t,i)=>{i.d(t,{FG:()=>p,nV:()=>x,pY:()=>g,pg:()=>h});var n=i(89379),o=i(80045),s=i(93230),r=i(2235),l=i(16491),a=i(82053),c=i(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:i=!1,onScroll:r,sx:l}=e,a=(0,o.A)(e,d);return(0,c.jsx)(s.A,(0,n.A)((0,n.A)({spacing:1.25,onScroll:r,sx:(0,n.A)((0,n.A)({p:1.5},i&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:t}))},h=e=>{let{accent:t="#662582",header:i,footer:o,selected:s=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(r.A,{elevation:0,onClick:a,sx:(0,n.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:s?t:"#e2e8f0",background:s?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[i,d,o]})]})},p=e=>{let{children:t,columns:i=2,sx:o}=e;return(0,c.jsx)(l.A,{sx:(0,n.A)({display:"grid",gridTemplateColumns:"repeat(".concat(i,", minmax(0, 1fr))"),gap:1,mt:1.25},o),children:t})},g=e=>{let{label:t,value:i,children:n,full:o=!1,align:s="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:o?"1 / -1":"auto",minWidth:0,textAlign:s},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==n?n:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==i&&void 0!==i?i:"\u2014"})})]})}},56311:(e,t,i)=>{i.d(t,{A:()=>p});var n=i(89379),o=i(9950),s=i(2660),r=i(2046),l=i(83274),a=i(25333),c=i(97125),d=i(7762),x=i(52097),h=i(44414);const p=e=>{let{value:t,onChange:i,onDebouncedChange:p,debounceTime:g=500,placeholder:u="Search (ctrl+k)",sx:A}=e;const m=(0,o.useRef)(null),[f]=(0,x.d7)(t,g);return(0,o.useEffect)((()=>{p&&p(f)}),[f,p]),(0,o.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=m.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===m.current&&m.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(s.A,{sx:(0,n.A)({},A),inputRef:m,placeholder:u,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>i(e.target.value),startAdornment:(0,h.jsx)(r.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(l.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>i(""),children:(0,h.jsx)(d.A,{})})})})}},59212:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(89379),o=i(9950),s=i(93230),r=i(41413),l=i(77922),a=i(29925),c=i(26910),d=i(31222),x=i(44414);const h=(0,o.forwardRef)(((e,t)=>{let{setAppId:i,setLocoName:h,setPage:p,sx:g,textfeildSx:u,textfieldSx:A,pill:m=!1,accentColor:f="#6366f1",icon:j,placeholder:b="Select Zone",paperComponent:v}=e;const[y,S]=(0,o.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,o.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const w=e=>"".concat(f).concat(e),C=w("08"),z=w("26"),k=w("55"),W=w("18"),I=m?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"999px",bgcolor:C,fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s, background-color 0.2s","& fieldset":{borderColor:k,borderWidth:1.5},"&:hover fieldset":{borderColor:f},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(z)},"&.Mui-focused fieldset":{borderColor:f,borderWidth:2}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:f}}:{},P=m&&(0,x.jsx)(s.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(r.A,{sx:{width:24,height:24,bgcolor:W,color:f,transition:"background-color 0.15s, color 0.15s"},children:j||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:v,sx:(0,n.A)({},g),onChange:(e,t,n)=>{"clear"===n?(null===i||void 0===i||i(0),null===h||void 0===h||h(""),null===p||void 0===p||p(0)):t&&(null===i||void 0===i||i(t.applocationid),null===h||void 0===h||h(t.locationname),null===p||void 0===p||p(0))},renderInput:e=>m?(0,x.jsx)(a.A,(0,n.A)((0,n.A)({},e),{},{inputRef:t,placeholder:b,InputProps:(0,n.A)((0,n.A)({},e.InputProps),{},{startAdornment:P}),sx:(0,n.A)((0,n.A)({},I),A||u||{})})):(0,x.jsx)(a.A,(0,n.A)((0,n.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,n.A)({},A||u||{})}))})}))},71504:(e,t,i)=>{i.r(t),i.d(t,{default:()=>_e});var n=i(89379),o=i(9950),s=i(50027),r=i(26910),l=i(14857),a=i(52351),c=i(13838),d=i(4159),x=i.n(d),h=i(8881),p=i(99459),g=i(28217),u=i(55471),A=i.n(u),m=i(21209),f=i(2235),j=i(41413),b=i(47223),v=i(93230),y=i(82053),S=i(16491),w=i(60899),C=i(82917),z=i(1320),k=i(15769),W=i(69780),I=i(9213),P=i(21671),M=i(34075),R=i(83274),Y=i(25333),K=i(33738),L=i(48159),_=i(84142),E=i(48089),T=i(82223),D=i(50704),O=i(29925),H=i(77922),B=i(25713),F=i(74745),N=i(6258),V=i(96583),q=i(40033),X=i(28170),J=i(29277),U=i(79739),Z=i(23787),G=i(9083),Q=i(8203),$=i(4729),ee=i(12678),te=i(94118),ie=i(24513),ne=i(37476),oe=i(54826),se=i(63057),re=i(85527),le=i(74930),ae=i(31222),ce=i(21636),de=i(39174),xe=i(59212),he=i(56311),pe=i(36150),ge=i(81425),ue=i(96646),Ae=i(44414);const me=16,fe="0 8px 24px rgba(15, 23, 42, 0.08)",je="0 18px 50px rgba(15, 23, 42, 0.18)",be="#0f172a",ve="#64748b",ye="#94a3b8",Se="#e2e8f0",we="#f1f5f9",Ce="#f8fafc",ze=(e,t)=>"".concat(e).concat(t),ke=e=>ze(e,"08"),We=e=>ze(e,"18"),Ie=e=>ze(e,"26"),Pe=e=>ze(e,"55"),Me={active:{label:"Active",color:"#10b981",icon:ae.mU9,statusKey:"active"},pending:{label:"Pending",color:"#f59e0b",icon:ae.tX0,statusKey:"pending"},inactive:{label:"Inactive",color:"#ef4444",icon:ae.uDv,statusKey:"inactive"}},Re=[{status:"active",countKey:"active",tabStatus:"Active"},{status:"pending",countKey:"pending",tabStatus:"Pending"},{status:"inactive",countKey:"inactive",tabStatus:"InActive"}],Ye=[{key:"active",label:"Active Tenants",color:"#10b981",icon:ae.mU9,countKey:"active"},{key:"pending",label:"Pending Approval",color:"#f59e0b",icon:ae.tX0,countKey:"pending"},{key:"inactive",label:"Inactive Tenants",color:"#ef4444",icon:ae.uDv,countKey:"inactive"}],Ke=e=>(0,Ae.jsx)(f.A,(0,n.A)((0,n.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:je,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),Le=e=>{let{color:t,selected:i,size:n=24,children:o}=e;return(0,Ae.jsx)(j.A,{sx:{width:n,height:n,bgcolor:i?t:We(t),color:i?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:o})},_e=()=>{var e;const t=(0,o.useRef)(null),[i,d]=(0,o.useState)(""),[u,je]=(0,o.useState)(""),[ze,_e]=o.useState(10),Ee=(0,l.A)(),Te=(0,b.A)(Ee.breakpoints.down("md")),[De,Oe]=(0,o.useState)(!1),[He,Be]=(0,o.useState)(0),[Fe,Ne]=(0,o.useState)(""),[Ve]=(0,o.useState)("All"),[qe,Xe]=o.useState(null),[Je,Ue]=(0,o.useState)(0),[Ze,Ge]=(0,o.useState)(0),[Qe,$e]=(0,o.useState)(0),[et,tt]=(0,o.useState)(null),[it,nt]=(0,o.useState)([]),[ot,st]=(0,o.useState)("active"),[rt,lt]=(0,o.useState)({}),[at,ct]=(0,o.useState)(!1),[dt,xt]=(0,o.useState)([]),[ht,pt]=(0,o.useState)({}),[gt,ut]=(0,o.useState)(!0),[At,mt]=(0,o.useState)(""),[ft,jt]=(0,o.useState)(""),[bt,vt]=(0,o.useState)(""),[yt,St]=(0,o.useState)({}),[wt,Ct]=(0,o.useState)({}),[zt,kt]=(0,o.useState)(0),[Wt,It]=(0,o.useState)("Active"),Pt=()=>{ct(!1)},Mt=(e,t)=>{It(0==t?"Active":1==t?"Pending":"InActive"),Ue(t),d(""),kt(0)},Rt=(e,t)=>{console.log("newValue1",t),Ge(t)},Yt=(e,t)=>{console.log("newValue2",t),$e(t)},[Kt,Lt]=(0,o.useState)(null),[_t,Et]=(0,o.useState)(null),Tt=e=>{Lt((t=>t===e?null:e))};(0,o.useEffect)((()=>{console.log("selectedCustomer",rt)}),[rt]),(0,o.useEffect)((()=>{Lt(-1),Et(-1)}),[Je]);const Dt=(e,t,i)=>{(0,h.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:i})};const Ot={current:null},[Ht,Bt]=(0,o.useState)(""),[Ft,Nt]=(0,o.useState)([]),Vt=(0,o.useRef)(!1);"undefined"===typeof window||Vt.current||(document.querySelector("#google-maps")||function(e,t,i){if(!t)return;const n=document.createElement("script");n.setAttribute("async",""),n.setAttribute("id",i),n.src=e,t.appendChild(n)}("https://maps.googleapis.com/maps/api/js?key=".concat("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8","&libraries=places"),document.querySelector("head"),"google-maps"),Vt.current=!0);const qt=(0,o.useMemo)((()=>(0,m.A)(((e,t)=>{Ot.current.getPlacePredictions(e,t)}),400)),[]);(0,o.useEffect)((()=>{let e=!0;if(!Ot.current&&window.google&&(Ot.current=new window.google.maps.places.AutocompleteService),Ot.current){if(""!==Ht)return qt({input:Ht},(t=>{if(e){let e=[];qe&&(e=[qe]),t&&(e=[...e,...t]),Nt(e)}})),()=>{e=!1};Nt(qe?[qe]:[])}}),[qe,Ht,qt]),p.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8"),(0,o.useEffect)((()=>{try{console.log("selected address =>",At),p.A.fromAddress(At).then((e=>{if(console.log("lat long response =>",e.results[0]),"OK"==e.status){const{lat:t,lng:i}=e.results[0].geometry.location;if(St({lat:t,lng:i}),Ct((0,n.A)((0,n.A)({},wt),{},{latitude:t.toString(),longitude:i.toString()})),e.results[0].address_components){let t,i,o,s,r=e.results[0];for(let e=0;e{console.log(e)}))}catch(e){console.log(e)}}),[At]),(0,o.useEffect)((()=>{rt&&St({lat:rt.latitude,lng:rt.longitude})}),[rt]),(0,o.useEffect)((()=>{const e=e=>{"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),t.current.focus()),"Escape"===e.key&&document.activeElement===t.current&&t.current.blur()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[]);const{data:Xt,isLoading:Jt,refetch:Ut}=(0,pe.I)({queryKey:["tenantList",He,u,ot,zt,ze],queryFn:ge.ry}),{data:Zt=[],isLoading:Gt,refetch:Qt}=(0,pe.I)({queryKey:["gettenantsummary",He,ot],queryFn:ge.bd}),$t=async()=>{await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/getpricinglist/?tenantid=").concat(et)).then((e=>{console.log("getpricinglist",e),e.data.status&&nt(e.data.details)})).catch((e=>{console.log(e)}))};(0,o.useEffect)((()=>{et&&$t()}),[et]);(0,o.useEffect)((()=>{et&&(async e=>{try{let t=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantpricing/?tenantid=").concat(e));console.log("tenantPricing",t.data.details),setTenanatPricing(t.data.details)}catch(t){console.log("fetchTenanatPricing",t)}})(et)}),[et]);const ei=async e=>{let t;Oe(!0),t=-1==e?{tenantid:et,approved:1}:{tenantid:e,status:"active"===ot?"InActive":"Active"},await r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/update"),t).then((e=>{e.data.status&&(Dt(0==Je?"Inactivated Successfully":1==Je?"Approved Successfully":"Activate Successfully","success",2e3),Ut(),Qt(),Oe(!1))})).catch((e=>{console.log(e),Dt(e.message,"error",1500),Oe(!1)}))},ti=async e=>{console.log("id",e);try{let t=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapppricing/?applocationid=").concat(e));console.log("appPricingRes",t.data.details),xt(t.data.details)}catch(t){console.log("appPricingRes",t)}},ii=async()=>{Oe(!0),await r.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/createpricing"),{tenantpricingid:0,applocationid:He,pricingid:ht.pricingid,tenantid:et,pricingdate:x()().format("YYYY-MM-DD HH:mm:ss"),configid:ht.configid,pricingtypeid:ht.pricingtypeid,slab:ht.slab,baseprice:+ht.baseprice,priceperkm:+ht.priceperkm,minkm:+ht.minkm,maxkm:+ht.maxkm,orders:+ht.minorder,othercharges:0}).then((e=>{e.data.status&&((0,h.M8)("Price Created Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),Pt(),pt({}),ei(-1),$t())})).catch((e=>{console.log(e)}))},ni=Me[null===(e=Re[Je])||void 0===e?void 0:e.status]||Me.active;return(0,Ae.jsxs)(Ae.Fragment,{children:[(Jt||Gt||De)&&(0,Ae.jsx)(a.A,{}),(0,Ae.jsx)(f.A,{elevation:0,sx:{mb:{xs:1.5,md:2},p:{xs:1.5,sm:2,md:2.5},borderRadius:me/8,border:"1px solid",borderColor:Se,background:"linear-gradient(135deg, ".concat(ke("#6366f1")," 0%, ").concat(ke("#0ea5e9")," 100%)"),boxShadow:fe},children:(0,Ae.jsxs)(v.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",spacing:{xs:1.5,sm:2},children:[(0,Ae.jsxs)(v.A,{direction:"row",alignItems:"center",spacing:{xs:1.25,sm:1.75},children:[(0,Ae.jsx)(j.A,{sx:{width:{xs:40,sm:48},height:{xs:40,sm:48},bgcolor:"#6366f1",color:"#fff",boxShadow:"0 6px 18px rgba(99,102,241,0.32)"},children:(0,Ae.jsx)(ae.Itr,{size:22})}),(0,Ae.jsxs)(v.A,{children:[(0,Ae.jsx)(y.A,{variant:"h3",sx:{fontWeight:800,color:be,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"}},children:"Tenants"}),(0,Ae.jsxs)(v.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[(0,Ae.jsx)(S.A,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:"#10b981",boxShadow:"0 0 0 4px rgba(16,185,129,0.18)"}}),(0,Ae.jsxs)(y.A,{variant:"caption",sx:{color:ve,fontWeight:600},children:["Live \xb7 ",Fe||"All Zones"]})]})]})]}),(0,Ae.jsx)(xe.A,{locations:Ve,locaName:Fe,setAppId:Be,setLocoName:Ne,setPage:kt,pill:!0,accentColor:"#6366f1",icon:(0,Ae.jsx)(ae.HPi,{size:14}),placeholder:"Select Zone",paperComponent:Ke,sx:{width:{xs:"100%",sm:280},zIndex:100}})]})}),(0,Ae.jsx)(w.Ay,{container:!0,spacing:{xs:1.25,sm:1.5,md:2},sx:{mt:"1px"},children:Ye.map((e=>{var t;const i=e.icon,n=null!==(t=null===Zt||void 0===Zt?void 0:Zt[e.countKey])&&void 0!==t?t:0;return(0,Ae.jsx)(w.Ay,{item:!0,xs:12,sm:4,children:(0,Ae.jsxs)(f.A,{elevation:0,sx:{position:"relative",overflow:"hidden",p:{xs:1.25,sm:1.75,md:2.25},borderRadius:me/8,border:"1px solid",borderColor:Se,background:"#fff",transition:"transform 0.2s, box-shadow 0.2s, border-color 0.2s",cursor:"pointer","&:hover":{transform:"translateY(-3px)",boxShadow:fe,borderColor:Pe(e.color)}},onClick:()=>{const t=Re.findIndex((t=>t.countKey===e.countKey));t>=0&&Mt(0,t)},children:[(0,Ae.jsx)(S.A,{sx:{position:"absolute",top:0,left:0,right:0,height:3,background:"linear-gradient(90deg, ".concat(e.color," 0%, ").concat(We(e.color)," 100%)")}}),(0,Ae.jsxs)(v.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,Ae.jsxs)(v.A,{spacing:.5,sx:{minWidth:0,flex:1},children:[(0,Ae.jsx)(y.A,{variant:"caption",sx:{color:ve,fontWeight:700,letterSpacing:.4,textTransform:"uppercase",fontSize:{xs:10,sm:11},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.label}),Gt?(0,Ae.jsx)(C.A,{sx:{width:70,height:{xs:28,md:36}},animation:"wave"}):(0,Ae.jsx)(y.A,{sx:{fontWeight:800,color:be,lineHeight:1.1,fontSize:{xs:"1.5rem",sm:"1.75rem",md:"2rem"}},children:n})]}),(0,Ae.jsx)(j.A,{sx:{width:{xs:36,sm:42,md:48},height:{xs:36,sm:42,md:48},bgcolor:We(e.color),color:e.color,boxShadow:"inset 0 0 0 1px ".concat(Pe(e.color)),flexShrink:0},children:(0,Ae.jsx)(i,{size:20})})]})]})},e.key)}))}),(0,Ae.jsx)(f.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:me/8,borderTopRightRadius:me/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:Se,borderBottom:0,background:"#fff"},children:(0,Ae.jsxs)(v.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,Ae.jsx)(v.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:Se,borderRadius:4}},children:Re.map(((e,t)=>{var i;const n=Me[e.status],o=n.icon,s=Je===t,r=null!==(i=null===Zt||void 0===Zt?void 0:Zt[e.countKey])&&void 0!==i?i:0;return(0,Ae.jsxs)(S.A,{onClick:()=>{st(e.status),Mt(0,t)},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:999,border:"1.5px solid ".concat(s?n.color:Pe(n.color)),bgcolor:s?n.color:ke(n.color),color:s?"#fff":n.color,fontWeight:700,boxShadow:s?"0 6px 18px ".concat(Ie(n.color)):"none",transition:"all 0.18s","&:hover":{borderColor:n.color,boxShadow:s?"0 6px 18px ".concat(Ie(n.color)):"0 0 0 3px ".concat(Ie(n.color))}},children:[(0,Ae.jsx)(j.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:s?"rgba(255,255,255,0.22)":We(n.color),color:s?"#fff":n.color},children:(0,Ae.jsx)(o,{size:13})}),(0,Ae.jsx)(y.A,{variant:"caption",sx:{fontWeight:800,fontSize:{xs:11.5,md:13},lineHeight:1},children:n.label}),(0,Ae.jsx)(S.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:800,bgcolor:s?"rgba(255,255,255,0.22)":"#fff",color:s?"#fff":n.color,border:s?"none":"1px solid ".concat(Pe(n.color))},children:Gt?(0,Ae.jsx)(C.A,{variant:"text",width:14,height:10}):r})]},e.status)}))}),(0,Ae.jsx)(S.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,Ae.jsx)(he.A,{value:i,onChange:d,onDebouncedChange:je,sx:{m:0,width:"100%",borderRadius:999,bgcolor:ke("#6366f1"),"& fieldset":{borderColor:Pe("#6366f1"),borderWidth:1.5},"&:hover fieldset":{borderColor:"#6366f1"},"&.Mui-focused fieldset":{borderColor:"#6366f1",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(Ie("#6366f1"))}}})})]})}),(0,Ae.jsxs)(f.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:me/8,borderBottomRightRadius:me/8,border:"1px solid",borderColor:Se,overflow:"hidden",background:"#fff"},children:[(0,Ae.jsx)(z.A,{sx:{display:{xs:"none",md:"block"},maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:"10px",height:"10px"},"&::-webkit-scrollbar-thumb":{backgroundColor:Pe("#6366f1"),borderRadius:"8px","&:hover":{backgroundColor:"#6366f1"}},"&::-webkit-scrollbar-track":{backgroundColor:Ce}},children:(0,Ae.jsxs)(k.A,{stickyHeader:!0,sx:{minWidth:{xs:720,md:960}},children:[(0,Ae.jsx)(W.A,{children:(0,Ae.jsxs)(I.A,{sx:{"& th":{backgroundColor:Ce,color:ve,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(Se),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,Ae.jsx)(P.A,{children:"#"}),(0,Ae.jsx)(P.A,{children:"Status"}),(0,Ae.jsx)(P.A,{children:"Client"}),(0,Ae.jsx)(P.A,{children:"Contact"}),(0,Ae.jsx)(P.A,{children:"Address"}),(0,Ae.jsx)(P.A,{align:"right",children:"Actions"})]})}),(0,Ae.jsxs)(M.A,{children:[Jt&&(0,Ae.jsx)(ue.r,{}),0!=(null===Xt||void 0===Xt?void 0:Xt.length)||De?null===Xt||void 0===Xt?void 0:Xt.map(((e,t)=>{var i;const l=Me[0===Je?"active":1===Je?"pending":"inactive"],a=l.icon;return(0,Ae.jsxs)(o.Fragment,{children:[(0,Ae.jsxs)(I.A,{sx:{cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(we),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:Ce}},children:[(0,Ae.jsx)(P.A,{children:(0,Ae.jsx)(y.A,{variant:"caption",sx:{fontWeight:700,color:ye},children:String(t+1+zt*ze).padStart(2,"0")})}),(0,Ae.jsx)(P.A,{children:(0,Ae.jsxs)(v.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:ke(l.color),border:"1px solid ".concat(Pe(l.color)),color:l.color},children:[(0,Ae.jsx)(Le,{color:l.color,size:20,children:(0,Ae.jsx)(a,{size:12})}),(0,Ae.jsx)(y.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:l.label})]})}),(0,Ae.jsx)(P.A,{children:(0,Ae.jsxs)(v.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,Ae.jsx)(Le,{color:"#6366f1",size:32,children:(0,Ae.jsx)(ae.Azs,{size:16})}),(0,Ae.jsxs)(v.A,{children:[(0,Ae.jsx)(y.A,{variant:"subtitle2",sx:{fontWeight:700,color:be,whiteSpace:"nowrap"},children:e.tenantname}),(0,Ae.jsxs)(y.A,{variant:"caption",sx:{color:ve},children:["ID #",e.tenantid]})]})]})}),(0,Ae.jsx)(P.A,{children:(0,Ae.jsxs)(v.A,{children:[(0,Ae.jsx)(y.A,{variant:"subtitle2",sx:{fontWeight:700,color:be,whiteSpace:"nowrap"},children:e.primarycontact||"\u2014"}),(0,Ae.jsx)(y.A,{variant:"caption",sx:{color:ve},children:e.primaryemail||"\u2014"})]})}),(0,Ae.jsx)(P.A,{sx:{maxWidth:280},children:(0,Ae.jsx)(R.A,{title:e.address||"",placement:"top",children:(0,Ae.jsx)(y.A,{variant:"caption",sx:{color:ve,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.address||"\u2014"})})}),(0,Ae.jsx)(P.A,{align:"right",children:(0,Ae.jsxs)(v.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[0==Je&&(0,Ae.jsx)(R.A,{title:"Inactivate",placement:"top",children:(0,Ae.jsx)(Y.A,{size:"small",sx:{bgcolor:We("#ef4444"),color:"#ef4444",border:"1px solid ".concat(Pe("#ef4444")),"&:hover":{bgcolor:"#ef4444",color:"#fff"}},onClick:()=>{lt(e),tt(e.tenantid),Be(e.applocationid),setTimeout((()=>{ei(e.tenantid)}),100)},children:(0,Ae.jsx)(G.A,{style:{fontSize:14}})})}),1==Je&&(0,Ae.jsx)(R.A,{title:"Approve",placement:"top",children:(0,Ae.jsx)(Y.A,{size:"small",sx:{bgcolor:We("#f59e0b"),color:"#f59e0b",border:"1px solid ".concat(Pe("#f59e0b")),"&:hover":{bgcolor:"#f59e0b",color:"#fff"}},onClick:()=>{lt(e),ct(!0),tt(e.tenantid),Be(e.applocationid),ti(e.applolcationid)},children:(0,Ae.jsx)(Q.A,{style:{fontSize:14}})})}),2==Je&&(0,Ae.jsx)(R.A,{title:"Activate",placement:"top",children:(0,Ae.jsx)(Y.A,{size:"small",sx:{bgcolor:We("#10b981"),color:"#10b981",border:"1px solid ".concat(Pe("#10b981")),"&:hover":{bgcolor:"#10b981",color:"#fff"}},onClick:()=>{lt(e),tt(e.tenantid),Be(e.applocationid),setTimeout((()=>{ei(e.tenantid)}),100)},children:(0,Ae.jsx)(oe.yjt,{style:{fontSize:14}})})}),(0,Ae.jsx)(R.A,{title:Kt===t?"Hide details":"View details",placement:"top",children:(0,Ae.jsx)(Y.A,{size:"small",sx:{bgcolor:Kt===t?"#6366f1":We("#6366f1"),color:Kt===t?"#fff":"#6366f1",border:"1px solid ".concat(Pe("#6366f1")),"&:hover":{bgcolor:"#6366f1",color:"#fff"}},onClick:()=>{lt(e),Tt(t),Et(-1),tt(e.tenantid)},children:Kt===t?(0,Ae.jsx)($.A,{style:{fontSize:14}}):(0,Ae.jsx)(ee.A,{style:{fontSize:14}})})}),1!==Je&&(0,Ae.jsx)(R.A,{title:_t===t?"Close":"Edit",placement:"top",children:(0,Ae.jsx)(Y.A,{size:"small",sx:{bgcolor:_t===t?"#8b5cf6":We("#8b5cf6"),color:_t===t?"#fff":"#8b5cf6",border:"1px solid ".concat(Pe("#8b5cf6")),"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},onClick:()=>{var i;lt(e),i=t,Et((e=>e===i?null:i)),Lt(-1),tt(e.tenantid),Be(e.applocationid)},children:_t===t?(0,Ae.jsx)(te.A,{style:{fontSize:14}}):(0,Ae.jsx)(ie.A,{style:{fontSize:14}})})})]})})]}),Kt===t&&(0,Ae.jsx)(I.A,{children:(0,Ae.jsx)(P.A,{sx:{"&:hover":{backgroundColor:"white !important"}},colSpan:15,children:(0,Ae.jsx)(K.A,{in:open,timeout:800,easing:"ease-in-out",mountOnEnter:!0,unmountOnExit:!1,sx:{"& .MuiCollapse-wrapperInner":{transition:"transform 800ms ease, opacity 800ms ease"}},children:(0,Ae.jsxs)(s.A,{content:!1,sx:{transform:open?"translateY(0)":"translateY(-8px)",opacity:open?1:0},title:(0,Ae.jsxs)(L.A,{sx:{bgcolor:"primary.lighter"},value:Ze,onChange:Rt,"aria-label":"basic tabs example",children:[(0,Ae.jsx)(_.A,{label:" Details",icon:(0,Ae.jsx)(se.gA5,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"}}),(0,Ae.jsx)(_.A,{label:"Pricing",icon:(0,Ae.jsx)(re.FA6,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"}})]}),children:[0==Ze&&(0,Ae.jsxs)(w.Ay,{container:!0,sx:{m:1},spacing:2.5,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,xs:6,children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(le.JXP,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsxs)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,Ae.jsx)(y.A,{align:"left",children:e.tenantname}),(0,Ae.jsx)(y.A,{align:"left",variant:"caption",color:"secondary",children:"Tenant"})]})]})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:6,children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(le.JXP,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsxs)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,Ae.jsx)(y.A,{align:"left",children:e.firstname}),(0,Ae.jsx)(y.A,{align:"left",variant:"caption",color:"secondary",children:"Contact Person"})]})]})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:6,children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(le.wnV,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsxs)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,Ae.jsx)(y.A,{align:"left",children:e.primarycontact}),(0,Ae.jsx)(y.A,{align:"left",variant:"caption",color:"secondary",children:"Phone"})]})]})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:6,children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(ce.h2r,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsxs)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,Ae.jsx)(y.A,{align:"left",children:e.primaryemail}),(0,Ae.jsx)(y.A,{align:"left",variant:"caption",color:"secondary",children:"E-Mail"})]})]})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:12,children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(oe.Y9o,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsxs)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,Ae.jsx)(y.A,{align:"left",children:e.address}),(0,Ae.jsx)(y.A,{align:"left",variant:"caption",color:"secondary",children:"Address"})]})]})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:12,children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(re.BUW,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsxs)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,Ae.jsx)(y.A,{align:"left",children:e.city}),(0,Ae.jsx)(y.A,{align:"left",variant:"caption",color:"secondary",children:"City"})]}),(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(ae.kci,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsxs)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,Ae.jsx)(y.A,{align:"left",variant:"subtitle1",children:e.postcode}),(0,Ae.jsx)(y.A,{align:"left",variant:"caption",color:"secondary",children:"PostCode"})]})]})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:12,children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(se.J0X,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsxs)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,Ae.jsx)(y.A,{align:"left",children:e.latitude}),(0,Ae.jsx)(y.A,{align:"left",variant:"caption",color:"secondary",children:"Latitude"})]}),(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(se.u3h,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsxs)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,Ae.jsx)(y.A,{align:"left",variant:"subtitle1",children:e.longitude}),(0,Ae.jsx)(y.A,{align:"left",variant:"caption",color:"secondary",children:"Longitude"})]})]})})]}),1==Ze&&(0,Ae.jsx)(E.A,{variant:"outlined",sx:{},children:(0,Ae.jsx)(z.A,{children:(0,Ae.jsxs)(k.A,{children:[(0,Ae.jsx)(W.A,{children:(0,Ae.jsxs)(I.A,{children:[(0,Ae.jsx)(P.A,{children:"#"}),(0,Ae.jsx)(P.A,{children:"Date"}),(0,Ae.jsx)(P.A,{children:"Slab"}),(0,Ae.jsx)(P.A,{children:"Base Price"}),(0,Ae.jsx)(P.A,{children:"Min Kms"}),(0,Ae.jsx)(P.A,{children:"Price/Km"}),(0,Ae.jsx)(P.A,{children:"Other Charges"})]})}),(0,Ae.jsx)(M.A,{children:0===(null===it||void 0===it?void 0:it.length)?(0,Ae.jsx)(I.A,{children:(0,Ae.jsx)(P.A,{colSpan:7,align:"center",children:(0,Ae.jsx)(c.A,{description:"No Pricing List"})})}):it.map(((e,t)=>(0,Ae.jsxs)(I.A,{sx:{bgcolor:"white"},children:[(0,Ae.jsx)(P.A,{children:t+1}),(0,Ae.jsx)(P.A,{children:x()(e.pricingdate).format("DD-MM-YYYY")}),(0,Ae.jsx)(P.A,{children:e.slab}),(0,Ae.jsx)(P.A,{children:e.baseprice}),(0,Ae.jsx)(P.A,{children:e.minkm}),(0,Ae.jsx)(P.A,{children:e.priceperkm}),(0,Ae.jsx)(P.A,{children:e.othercharges})]},e.id||t)))})]})})},"left - card")]})})})}),_t===t&&(0,Ae.jsx)(I.A,{children:(0,Ae.jsx)(P.A,{sx:{backgroundColor:"white!important","&:hover":{backgroundColor:"white!important"}},colSpan:15,children:(0,Ae.jsxs)(s.A,{content:!1,title:(0,Ae.jsxs)(S.A,{sx:{bgcolor:"primary.lighter",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,Ae.jsxs)(L.A,{value:Qe,onChange:Yt,"aria-label":"basic tabs example",children:[(0,Ae.jsx)(_.A,{label:"Edit Details",icon:(0,Ae.jsx)(se.gA5,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"}}),1!==Je&&(0,Ae.jsx)(_.A,{label:"Edit Pricing",icon:(0,Ae.jsx)(re.FA6,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"},onClick:()=>{ti(rt.applolcationid)}})]}),1==Qe&&(0,Ae.jsx)(T.A,{variant:"contained",color:"error",size:"smaller",startIcon:(0,Ae.jsx)(ie.A,{size:"small"}),sx:{mr:1.8,height:"30px"},onClick:()=>{ct(!0)},children:"Add Pricing"})]}),children:[0==Qe&&(0,Ae.jsx)(E.A,{variant:"outlined",sx:{m:2},children:(0,Ae.jsx)(w.Ay,{container:!0,spacing:0,children:(0,Ae.jsx)(w.Ay,{item:!0,xs:12,children:(0,Ae.jsxs)(E.A,{variant:"outlined",children:[(0,Ae.jsx)(D.A,{children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:2.5,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,xs:6,children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(de.PY8,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,Ae.jsx)(O.A,{fullWidth:!0,id:"outlined-basic",label:"Tenant Name",defaultValue:rt.tenantname,variant:"outlined",onChange:e=>{Ct((0,n.A)((0,n.A)({},wt),{},{tenantname:e.target.value}))},sx:{mt:2}})})]})})," ",(0,Ae.jsx)(w.Ay,{item:!0,xs:6,children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(le.JXP,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,Ae.jsx)(O.A,{fullWidth:!0,id:"outlined-basic",label:"Contact Person",defaultValue:e.firstname,variant:"outlined",onChange:e=>{Ct((0,n.A)((0,n.A)({},wt),{},{firstname:e.target.value}))},sx:{mt:2}})})]})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:6,children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(le.wnV,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,Ae.jsx)(O.A,{inputProps:{maxLength:10},fullWidth:!0,id:"outlined-basic",label:"Contact Number",defaultValue:rt.primarycontact,variant:"outlined",onChange:e=>{Ct((0,n.A)((0,n.A)({},wt),{},{primarycontact:e.target.value}))},sx:{mt:2}})})]})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:6,children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(ce.h2r,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,Ae.jsx)(O.A,{fullWidth:!0,id:"outlined-basic",label:"E-Mail",defaultValue:rt.primaryemail,variant:"outlined",onChange:e=>{Ct((0,n.A)((0,n.A)({},wt),{},{primaryemail:e.target.value}))},sx:{mt:2}})})]})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:12,children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(oe.Y9o,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,Ae.jsx)(H.A,{id:"google-map-demo",sx:{},fullWidth:!0,label:"Address",getOptionLabel:e=>"string"===typeof e?e:e.description,filterOptions:e=>e,options:Ft,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,defaultValue:rt.address,noOptionsText:"No locations",onChange:(e,t)=>{Nt(t?[t,...Ft]:Ft),Xe(t||""),console.log("newValue",t),mt((null===t||void 0===t?void 0:t.description)||""),Ct((0,n.A)((0,n.A)({},wt),{},{address:(null===t||void 0===t?void 0:t.description)||""}))},onInputChange:(e,t)=>{Bt(t)},renderInput:e=>(0,Ae.jsx)(O.A,(0,n.A)((0,n.A)({},e),{},{fullWidth:!0,label:"Address",variant:"outlined"})),renderOption:(e,t)=>{const i=t.structured_formatting.main_text_matched_substrings||[],o=A()(t.structured_formatting.main_text,i.map((e=>[e.offset,e.offset+e.length])));return(0,Ae.jsx)("li",(0,n.A)((0,n.A)({},e),{},{children:(0,Ae.jsxs)(w.Ay,{container:!0,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,sx:{display:"flex",width:44},children:(0,Ae.jsx)(g.A,{sx:{color:"text.secondary"}})}),(0,Ae.jsxs)(w.Ay,{item:!0,sx:{width:"calc(100% - 44px)",wordWrap:"break-word"},children:[o.map(((e,t)=>(0,Ae.jsx)(S.A,{component:"span",sx:{fontWeight:e.highlight?"bold":"regular"},children:e.text},t))),(0,Ae.jsx)(y.A,{variant:"body2",color:"text.secondary",children:t.structured_formatting.secondary_text})]})]})}))}})})]})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:12,children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(re.BUW,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,Ae.jsx)(O.A,{fullWidth:!0,required:!0,id:"outlined-required",label:"City",onChange:e=>{Ct((0,n.A)((0,n.A)({},wt),{},{city:e.target.value}))},value:""==ft?rt.city:ft})}),(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(ae.kci,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,Ae.jsx)(O.A,{fullWidth:!0,required:!0,label:" PostCode",id:"outlined-required",onChange:e=>{Ct((0,n.A)((0,n.A)({},wt),{},{postcode:e.target.value}))},value:""==bt?rt.postcode:bt})})]})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:12,children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(se.J0X,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,Ae.jsx)(O.A,{variant:"outlined",readonly:!0,label:"Latitude",fullWidth:!0,value:yt.lat,sx:{cursor:"not-allowed"}})}),(0,Ae.jsx)(w.Ay,{item:!0,children:(0,Ae.jsx)(se.u3h,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,Ae.jsx)(w.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,Ae.jsx)(O.A,{label:"Longitude",readonly:!0,variant:"outlined",fullWidth:!0,value:yt.lng})})]})})]})}),(0,Ae.jsx)(B.A,{sx:{display:"flex",justifyContent:"end",mr:3,mb:2},children:(0,Ae.jsx)(T.A,{variant:"contained",size:"medium",onClick:()=>{(async()=>{try{const e=(0,n.A)((0,n.A)({},wt),{},{tenantid:et});console.log("updateClient",e);const t=await r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/update"),e);console.log("updateClient",t.data.message),t.data.status&&Dt(t.data.message,"success",1500),Ut(),Qt()}catch(e){console.log("updateClient",e)}})()},children:"Update Client"})})]})})})},"left - card"),1==Qe&&(0,Ae.jsx)(E.A,{variant:"outlined",sx:{},children:(0,Ae.jsx)(z.A,{children:(0,Ae.jsxs)(k.A,{children:[(0,Ae.jsx)(W.A,{children:(0,Ae.jsxs)(I.A,{children:[(0,Ae.jsx)(P.A,{children:"#"}),(0,Ae.jsx)(P.A,{children:"Date"}),(0,Ae.jsx)(P.A,{children:"Slab"}),(0,Ae.jsx)(P.A,{children:"Base Price"}),(0,Ae.jsx)(P.A,{children:"Min Kms"}),(0,Ae.jsx)(P.A,{children:"Price/Km"}),(0,Ae.jsx)(P.A,{children:"Other Charges"})]})}),(0,Ae.jsx)(M.A,{children:0===(null===it||void 0===it?void 0:it.length)?(0,Ae.jsx)(I.A,{children:(0,Ae.jsx)(P.A,{colSpan:7,align:"center",children:(0,Ae.jsx)(c.A,{})})}):it.map(((e,t)=>(0,Ae.jsxs)(I.A,{sx:{bgcolor:"white"},children:[(0,Ae.jsx)(P.A,{children:t+1}),(0,Ae.jsx)(P.A,{children:x()(e.pricingdate).format("DD-MM-YYYY")}),(0,Ae.jsx)(P.A,{children:e.slab}),(0,Ae.jsx)(P.A,{children:e.baseprice}),(0,Ae.jsx)(P.A,{children:e.minkm}),(0,Ae.jsx)(P.A,{children:e.priceperkm}),(0,Ae.jsx)(P.A,{children:e.othercharges})]},e.id||t)))})]})})},"left - card")]})})})]},null!==(i=e.tenantid)&&void 0!==i?i:t)})):(0,Ae.jsx)(I.A,{children:(0,Ae.jsx)(P.A,{colSpan:6,sx:{py:6},children:(0,Ae.jsxs)(v.A,{alignItems:"center",spacing:1.5,children:[(0,Ae.jsx)(j.A,{sx:{width:64,height:64,bgcolor:We("#94a3b8"),color:ye},children:(0,Ae.jsx)(ae.Itr,{size:28})}),(0,Ae.jsx)(y.A,{variant:"subtitle1",sx:{fontWeight:700,color:be},children:"No tenants to show"}),(0,Ae.jsx)(y.A,{variant:"caption",sx:{color:ve},children:"No ".concat(ni.label.toLowerCase()," tenants for this filter.")})]})})})]})]})}),Te&&(0,Ae.jsxs)(Z.nV,{scroll:!0,sx:{display:{xs:"flex",md:"none"}},children:[Jt&&(0,Ae.jsxs)(v.A,{alignItems:"center",sx:{py:4},children:[(0,Ae.jsx)(C.A,{variant:"rounded",width:"100%",height:96,animation:"wave"}),(0,Ae.jsx)(C.A,{variant:"rounded",width:"100%",height:96,animation:"wave",sx:{mt:1.25}})]}),0!=(null===Xt||void 0===Xt?void 0:Xt.length)||De?null===Xt||void 0===Xt?void 0:Xt.map(((e,t)=>{var i;const n=Me[0===Je?"active":1===Je?"pending":"inactive"],o=n.icon,s=Kt===t;return(0,Ae.jsxs)(Z.pg,{accent:n.color,header:(0,Ae.jsxs)(v.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,Ae.jsxs)(v.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,Ae.jsx)(Le,{color:"#6366f1",size:36,children:(0,Ae.jsx)(ae.Azs,{size:18})}),(0,Ae.jsxs)(v.A,{sx:{minWidth:0},children:[(0,Ae.jsx)(y.A,{variant:"subtitle2",sx:{fontWeight:800,color:be},noWrap:!0,children:e.tenantname}),(0,Ae.jsxs)(v.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",mt:.25,pl:.25,pr:.875,py:.125,borderRadius:999,bgcolor:ke(n.color),border:"1px solid ".concat(Pe(n.color)),color:n.color,alignSelf:"flex-start"},children:[(0,Ae.jsx)(Le,{color:n.color,size:16,children:(0,Ae.jsx)(o,{size:10})}),(0,Ae.jsx)(y.A,{sx:{fontWeight:800,fontSize:10,lineHeight:1},children:n.label})]})]})]}),(0,Ae.jsxs)(v.A,{direction:"row",spacing:.5,sx:{flexShrink:0},children:[0==Je&&(0,Ae.jsx)(Y.A,{size:"small",sx:{bgcolor:We("#ef4444"),color:"#ef4444",border:"1px solid ".concat(Pe("#ef4444")),"&:hover":{bgcolor:"#ef4444",color:"#fff"}},onClick:()=>{lt(e),tt(e.tenantid),Be(e.applocationid),setTimeout((()=>{ei(e.tenantid)}),100)},children:(0,Ae.jsx)(G.A,{style:{fontSize:14}})}),1==Je&&(0,Ae.jsx)(Y.A,{size:"small",sx:{bgcolor:We("#f59e0b"),color:"#f59e0b",border:"1px solid ".concat(Pe("#f59e0b")),"&:hover":{bgcolor:"#f59e0b",color:"#fff"}},onClick:()=>{lt(e),ct(!0),tt(e.tenantid),Be(e.applocationid),ti(e.applolcationid)},children:(0,Ae.jsx)(Q.A,{style:{fontSize:14}})}),2==Je&&(0,Ae.jsx)(Y.A,{size:"small",sx:{bgcolor:We("#10b981"),color:"#10b981",border:"1px solid ".concat(Pe("#10b981")),"&:hover":{bgcolor:"#10b981",color:"#fff"}},onClick:()=>{lt(e),tt(e.tenantid),Be(e.applocationid),setTimeout((()=>{ei(e.tenantid)}),100)},children:(0,Ae.jsx)(oe.yjt,{style:{fontSize:14}})}),(0,Ae.jsx)(Y.A,{size:"small",sx:{bgcolor:s?"#6366f1":We("#6366f1"),color:s?"#fff":"#6366f1",border:"1px solid ".concat(Pe("#6366f1")),"&:hover":{bgcolor:"#6366f1",color:"#fff"}},onClick:()=>{lt(e),Tt(t),Et(-1),tt(e.tenantid)},children:s?(0,Ae.jsx)($.A,{style:{fontSize:14}}):(0,Ae.jsx)(ee.A,{style:{fontSize:14}})}),1!==Je&&(0,Ae.jsx)(Y.A,{size:"small",sx:{bgcolor:We("#8b5cf6"),color:"#8b5cf6",border:"1px solid ".concat(Pe("#8b5cf6")),"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},onClick:()=>{lt(e),tt(e.tenantid),Be(e.applocationid),ti(e.applolcationid),ct(!0)},children:(0,Ae.jsx)(ie.A,{style:{fontSize:14}})})]})]}),children:[(0,Ae.jsxs)(Z.FG,{children:[(0,Ae.jsx)(Z.pY,{label:"Tenant ID",value:"#".concat(e.tenantid)}),(0,Ae.jsx)(Z.pY,{label:"Contact",value:e.primarycontact||"\u2014"}),(0,Ae.jsx)(Z.pY,{label:"Email",value:e.primaryemail||"\u2014",full:!0}),(0,Ae.jsx)(Z.pY,{label:"Address",full:!0,children:(0,Ae.jsx)(y.A,{sx:{fontSize:13,fontWeight:600,color:be},children:e.address||"\u2014"})})]}),s&&(0,Ae.jsx)(S.A,{sx:{mt:1.25,pt:1.25,borderTop:"1px solid ".concat(we)},children:(0,Ae.jsxs)(Z.FG,{children:[(0,Ae.jsx)(Z.pY,{label:"Contact Person",value:e.firstname||"\u2014"}),(0,Ae.jsx)(Z.pY,{label:"City",value:e.city||"\u2014"}),(0,Ae.jsx)(Z.pY,{label:"Postcode",value:e.postcode||"\u2014"}),(0,Ae.jsx)(Z.pY,{label:"Latitude",value:e.latitude||"\u2014"}),(0,Ae.jsx)(Z.pY,{label:"Longitude",value:e.longitude||"\u2014"})]})})]},null!==(i=e.tenantid)&&void 0!==i?i:t)})):(0,Ae.jsxs)(v.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,Ae.jsx)(j.A,{sx:{width:64,height:64,bgcolor:We("#94a3b8"),color:ye},children:(0,Ae.jsx)(ae.Itr,{size:28})}),(0,Ae.jsx)(y.A,{variant:"subtitle1",sx:{fontWeight:700,color:be},children:"No tenants to show"}),(0,Ae.jsx)(y.A,{variant:"caption",sx:{color:ve,textAlign:"center"},children:"No ".concat(ni.label.toLowerCase()," tenants for this filter.")})]})]}),!i&&(null===Xt||void 0===Xt?void 0:Xt.length)>0&&(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)(F.A,{sx:{borderColor:Se}}),(0,Ae.jsx)(N.A,{rowsPerPageOptions:[5,10,25,50,100],component:"div",count:0==Je?null===Zt||void 0===Zt?void 0:Zt.active:1==Je?null===Zt||void 0===Zt?void 0:Zt.pending:2==Je?null===Zt||void 0===Zt?void 0:Zt.inactive:0,rowsPerPage:ze,page:zt,onPageChange:(e,t)=>{kt(t)},onRowsPerPageChange:e=>{_e(parseInt(e.target.value,10)),kt(0)}})]})]}),(0,Ae.jsxs)(V.A,{fullWidth:!0,fullScreen:Te,open:at,onClose:Pt,scroll:"paper",maxWidth:"sm",TransitionComponent:ne.s,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},children:[(0,Ae.jsx)(q.A,{sx:{bgcolor:"#662582",color:"#fff",fontSize:"20px"},children:"Client Pricing - (".concat(rt.tenantname,")")}),(0,Ae.jsx)(X.A,{dividers:!0,children:(0,Ae.jsx)(s.A,{sx:{height:"100%"},children:(0,Ae.jsxs)(w.Ay,{container:!0,spacing:2.5,alignItems:"center",children:[(0,Ae.jsxs)(w.Ay,{item:!0,xs:12,sm:6,children:[(0,Ae.jsx)(J.A,{children:"Select Slab"}),(0,Ae.jsx)(H.A,{disablePortal:!0,id:"combo-box-demo",options:dt,getOptionLabel:e=>"".concat(e.slab),fullWidth:!0,selectOnFocus:!0,renderInput:e=>(0,Ae.jsx)(O.A,(0,n.A)((0,n.A)({},e),{},{label:"Slab"})),onChange:(e,t,i)=>{pt(t),console.log("pricing",t),ut(!1),"clear"===i&&ut(!0)}})]}),(0,Ae.jsxs)(w.Ay,{item:!0,xs:12,sm:6,children:[(0,Ae.jsx)(J.A,{children:"Base Price"}),(0,Ae.jsx)(O.A,{type:"number",fullWidth:!0,value:gt?0:ht.baseprice,onChange:e=>{pt((0,n.A)((0,n.A)({},ht),{},{baseprice:e.target.value}))}})]}),(0,Ae.jsxs)(w.Ay,{item:!0,xs:12,sm:6,children:[(0,Ae.jsx)(J.A,{children:"Price/Km"}),(0,Ae.jsx)(O.A,{type:"number",fullWidth:!0,value:gt?0:ht.priceperkm,onChange:e=>{pt((0,n.A)((0,n.A)({},ht),{},{priceperkm:e.target.value}))}})]}),(0,Ae.jsxs)(w.Ay,{item:!0,xs:12,sm:6,children:[(0,Ae.jsx)(J.A,{children:"Min Kms"}),(0,Ae.jsx)(O.A,{type:"number",fullWidth:!0,value:gt?0:ht.minkm,onChange:e=>{pt((0,n.A)((0,n.A)({},ht),{},{minkm:e.target.value}))}})]}),(0,Ae.jsxs)(w.Ay,{item:!0,xs:12,sm:6,children:[(0,Ae.jsx)(J.A,{children:"Max Kms"}),(0,Ae.jsx)(O.A,{type:"number",fullWidth:!0,value:gt?0:ht.maxkm,onChange:e=>{pt((0,n.A)((0,n.A)({},ht),{},{maxkm:e.target.value}))}})]}),(0,Ae.jsxs)(w.Ay,{item:!0,xs:12,sm:6,children:[(0,Ae.jsx)(J.A,{children:"Min Orders"}),(0,Ae.jsx)(O.A,{type:"number",fullWidth:!0,value:gt?0:ht.minorder,onChange:e=>{pt((0,n.A)((0,n.A)({},ht),{},{minorder:e.target.value}))}})]})]})})}),(0,Ae.jsx)(U.A,{children:(0,Ae.jsx)(w.Ay,{container:!0,children:(0,Ae.jsx)(w.Ay,{item:!0,xs:12,children:(0,Ae.jsxs)(v.A,{direction:"row",justifyContent:"flex-end",spacing:2,sx:{p:2},children:[1==Qe&&(0,Ae.jsx)(T.A,{disabled:gt,variant:"contained",onClick:()=>{ii()},children:"Update Pricing"}),1==Je&&(0,Ae.jsx)(T.A,{disabled:gt,variant:"contained",onClick:()=>{ii()},children:"Save"}),(0,Ae.jsx)(T.A,{variant:"contained",onClick:()=>{ut(!0),setTimeout((()=>{Pt()}),100),pt({})},color:"error",children:"Cancel"})]})})})})]})]})}},96646:(e,t,i)=>{i.d(t,{r:()=>a});var n=i(9213),o=i(21671),s=i(82917),r=i(93230),l=i(44414);const a=e=>{let{rowsPerPage:t=5,col:i=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,l.jsxs)(n.A,{children:[(0,l.jsx)(o.A,{children:(0,l.jsx)(s.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(o.A,{children:(0,l.jsx)(s.A,{variant:"text",width:30})}),Array.from({length:i}).map(((e,t)=>(0,l.jsx)(o.A,{children:(0,l.jsxs)(r.A,{spacing:.5,children:[(0,l.jsx)(s.A,{variant:"text",width:100}),(0,l.jsx)(s.A,{variant:"text",width:80})]})},t))),(0,l.jsx)(o.A,{children:(0,l.jsx)(s.A,{variant:"text",width:150})}),(0,l.jsx)(o.A,{children:(0,l.jsx)(s.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(o.A,{align:"center",children:(0,l.jsxs)(r.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(s.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(s.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file diff --git a/build/static/js/1504.c6771267.chunk.js b/build/static/js/1504.c6771267.chunk.js new file mode 100644 index 0000000..6a5f8dc --- /dev/null +++ b/build/static/js/1504.c6771267.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[1504],{23787:(e,t,i)=>{i.d(t,{FG:()=>p,nV:()=>x,pY:()=>g,pg:()=>h});var n=i(89379),s=i(80045),o=i(93230),r=i(2235),l=i(16491),a=i(82053),c=i(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:i=!1,onScroll:r,sx:l}=e,a=(0,s.A)(e,d);return(0,c.jsx)(o.A,(0,n.A)((0,n.A)({spacing:1.25,onScroll:r,sx:(0,n.A)((0,n.A)({p:1.5},i&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:t}))},h=e=>{let{accent:t="#662582",header:i,footer:s,selected:o=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(r.A,{elevation:0,onClick:a,sx:(0,n.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:o?t:"#e2e8f0",background:o?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[i,d,s]})]})},p=e=>{let{children:t,columns:i=2,sx:s}=e;return(0,c.jsx)(l.A,{sx:(0,n.A)({display:"grid",gridTemplateColumns:"repeat(".concat(i,", minmax(0, 1fr))"),gap:1,mt:1.25},s),children:t})},g=e=>{let{label:t,value:i,children:n,full:s=!1,align:o="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:s?"1 / -1":"auto",minWidth:0,textAlign:o},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==n?n:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==i&&void 0!==i?i:"\u2014"})})]})}},27001:(e,t,i)=>{i.d(t,{A:()=>l});var n=i(93230),s=i(16491),o=i(82053),r=i(44414);function l(e){let{title:t,subtitle:i,live:l=!1,action:a}=e;return(0,r.jsxs)(n.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,r.jsxs)(s.A,{sx:{minWidth:0},children:[(0,r.jsx)(o.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),i&&(0,r.jsxs)(n.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[l&&(0,r.jsx)(s.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,r.jsx)(o.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:i})]})]}),a&&(0,r.jsx)(s.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},36803:(e,t,i)=>{i.d(t,{A:()=>x});var n=i(48089),s=i(50704),o=i(93230),r=i(16491),l=i(82053),a=i(82917),c=i(41413),d=i(44414);function x(e){let{title:t,value:i,icon:x,color:h="#662582",caption:p,loading:g=!1}=e;return(0,d.jsx)(n.A,{sx:{height:"100%"},children:(0,d.jsx)(s.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(o.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(r.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(l.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),g?(0,d.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(l.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:i}),p&&(0,d.jsx)(l.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:p})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},56311:(e,t,i)=>{i.d(t,{A:()=>p});var n=i(89379),s=i(9950),o=i(2660),r=i(2046),l=i(83274),a=i(25333),c=i(97125),d=i(7762),x=i(52097),h=i(44414);const p=e=>{let{value:t,onChange:i,onDebouncedChange:p,debounceTime:g=500,placeholder:u="Search (ctrl+k)",sx:A}=e;const j=(0,s.useRef)(null),[m]=(0,x.d7)(t,g);return(0,s.useEffect)((()=>{p&&p(m)}),[m,p]),(0,s.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=j.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===j.current&&j.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(o.A,{sx:(0,n.A)({},A),inputRef:j,placeholder:u,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>i(e.target.value),startAdornment:(0,h.jsx)(r.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(l.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>i(""),children:(0,h.jsx)(d.A,{})})})})}},59212:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(89379),s=i(9950),o=i(93230),r=i(41413),l=i(77922),a=i(29925),c=i(26910),d=i(31222),x=i(44414);const h=(0,s.forwardRef)(((e,t)=>{let{setAppId:i,setLocoName:h,setPage:p,sx:g,textfeildSx:u,textfieldSx:A,pill:j=!1,accentColor:m="#6366f1",icon:f,placeholder:b="Select Zone",paperComponent:v}=e;const[y,S]=(0,s.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,s.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const w=e=>"".concat(m).concat(e),C=w("26"),k=w("18"),z=j?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(C)},"&.Mui-focused fieldset":{borderColor:m,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},W=j&&(0,x.jsx)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(r.A,{sx:{width:24,height:24,bgcolor:k,color:m,transition:"background-color 0.15s, color 0.15s"},children:f||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:v,sx:(0,n.A)({},g),onChange:(e,t,n)=>{"clear"===n?(null===i||void 0===i||i(0),null===h||void 0===h||h(""),null===p||void 0===p||p(0)):t&&(null===i||void 0===i||i(t.applocationid),null===h||void 0===h||h(t.locationname),null===p||void 0===p||p(0))},renderInput:e=>j?(0,x.jsx)(a.A,(0,n.A)((0,n.A)({},e),{},{inputRef:t,placeholder:b,InputProps:(0,n.A)((0,n.A)({},e.InputProps),{},{startAdornment:W}),sx:(0,n.A)((0,n.A)({},z),A||u||{})})):(0,x.jsx)(a.A,(0,n.A)((0,n.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,n.A)({},A||u||{})}))})}))},71504:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ke});var n=i(89379),s=i(9950),o=i(50027),r=i(26910),l=i(14857),a=i(52351),c=i(13838),d=i(4159),x=i.n(d),h=i(8881),p=i(99459),g=i(28217),u=i(55471),A=i.n(u),j=i(21209),m=i(2235),f=i(41413),b=i(47223),v=i(60899),y=i(16491),S=i(93230),w=i(82053),C=i(82917),k=i(1320),z=i(15769),W=i(69780),I=i(9213),P=i(21671),M=i(34075),R=i(83274),Y=i(25333),L=i(33738),_=i(48159),E=i(84142),K=i(48089),T=i(82223),D=i(50704),O=i(29925),H=i(77922),B=i(25713),F=i(74745),q=i(6258),N=i(96583),V=i(40033),X=i(28170),J=i(29277),G=i(79739),U=i(23787),Z=i(9083),Q=i(8203),$=i(4729),ee=i(12678),te=i(94118),ie=i(24513),ne=i(37476),se=i(54826),oe=i(63057),re=i(85527),le=i(74930),ae=i(31222),ce=i(21636),de=i(39174),xe=i(59212),he=i(56311),pe=i(27001),ge=i(36803),ue=i(36150),Ae=i(81425),je=i(96646),me=i(44414);const fe=14,be="0 12px 32px rgba(15, 23, 42, 0.12)",ve="#0f172a",ye="#64748b",Se="#94a3b8",we="#e2e8f0",Ce="#f1f5f9",ke="#f8fafc",ze=(e,t)=>"".concat(e).concat(t),We=e=>ze(e,"08"),Ie=e=>ze(e,"18"),Pe=e=>ze(e,"26"),Me=e=>ze(e,"55"),Re={active:{label:"Active",color:"#10b981",icon:ae.mU9,statusKey:"active"},pending:{label:"Pending",color:"#f59e0b",icon:ae.tX0,statusKey:"pending"},inactive:{label:"Inactive",color:"#ef4444",icon:ae.uDv,statusKey:"inactive"}},Ye=[{status:"active",countKey:"active",tabStatus:"Active"},{status:"pending",countKey:"pending",tabStatus:"Pending"},{status:"inactive",countKey:"inactive",tabStatus:"InActive"}],Le=[{key:"active",label:"Active Tenants",color:"#10b981",icon:ae.cAP,countKey:"active"},{key:"pending",label:"Pending Approval",color:"#f59e0b",icon:ae.G6c,countKey:"pending"},{key:"inactive",label:"Inactive Tenants",color:"#ef4444",icon:ae.qiG,countKey:"inactive"}],_e=e=>(0,me.jsx)(m.A,(0,n.A)((0,n.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:be,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),Ee=e=>{let{color:t,selected:i,size:n=24,children:s}=e;return(0,me.jsx)(f.A,{sx:{width:n,height:n,bgcolor:i?t:Ie(t),color:i?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:s})},Ke=()=>{var e;const t=(0,s.useRef)(null),[i,d]=(0,s.useState)(""),[u,be]=(0,s.useState)(""),[ze,Ke]=s.useState(10),Te=(0,l.A)(),De=(0,b.A)(Te.breakpoints.down("md")),[Oe,He]=(0,s.useState)(!1),[Be,Fe]=(0,s.useState)(0),[qe,Ne]=(0,s.useState)(""),[Ve]=(0,s.useState)("All"),[Xe,Je]=s.useState(null),[Ge,Ue]=(0,s.useState)(0),[Ze,Qe]=(0,s.useState)(0),[$e,et]=(0,s.useState)(0),[tt,it]=(0,s.useState)(null),[nt,st]=(0,s.useState)([]),[ot,rt]=(0,s.useState)("active"),[lt,at]=(0,s.useState)({}),[ct,dt]=(0,s.useState)(!1),[xt,ht]=(0,s.useState)([]),[pt,gt]=(0,s.useState)({}),[ut,At]=(0,s.useState)(!0),[jt,mt]=(0,s.useState)(""),[ft,bt]=(0,s.useState)(""),[vt,yt]=(0,s.useState)(""),[St,wt]=(0,s.useState)({}),[Ct,kt]=(0,s.useState)({}),[zt,Wt]=(0,s.useState)(0),[It,Pt]=(0,s.useState)("Active"),Mt=()=>{dt(!1)},Rt=(e,t)=>{Pt(0==t?"Active":1==t?"Pending":"InActive"),Ue(t),d(""),Wt(0)},Yt=(e,t)=>{console.log("newValue1",t),Qe(t)},Lt=(e,t)=>{console.log("newValue2",t),et(t)},[_t,Et]=(0,s.useState)(null),[Kt,Tt]=(0,s.useState)(null),Dt=e=>{Et((t=>t===e?null:e))};(0,s.useEffect)((()=>{console.log("selectedCustomer",lt)}),[lt]),(0,s.useEffect)((()=>{Et(-1),Tt(-1)}),[Ge]);const Ot=(e,t,i)=>{(0,h.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:i})};const Ht={current:null},[Bt,Ft]=(0,s.useState)(""),[qt,Nt]=(0,s.useState)([]),Vt=(0,s.useRef)(!1);"undefined"===typeof window||Vt.current||(document.querySelector("#google-maps")||function(e,t,i){if(!t)return;const n=document.createElement("script");n.setAttribute("async",""),n.setAttribute("id",i),n.src=e,t.appendChild(n)}("https://maps.googleapis.com/maps/api/js?key=".concat("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8","&libraries=places"),document.querySelector("head"),"google-maps"),Vt.current=!0);const Xt=(0,s.useMemo)((()=>(0,j.A)(((e,t)=>{Ht.current.getPlacePredictions(e,t)}),400)),[]);(0,s.useEffect)((()=>{let e=!0;if(!Ht.current&&window.google&&(Ht.current=new window.google.maps.places.AutocompleteService),Ht.current){if(""!==Bt)return Xt({input:Bt},(t=>{if(e){let e=[];Xe&&(e=[Xe]),t&&(e=[...e,...t]),Nt(e)}})),()=>{e=!1};Nt(Xe?[Xe]:[])}}),[Xe,Bt,Xt]),p.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8"),(0,s.useEffect)((()=>{try{console.log("selected address =>",jt),p.A.fromAddress(jt).then((e=>{if(console.log("lat long response =>",e.results[0]),"OK"==e.status){const{lat:t,lng:i}=e.results[0].geometry.location;if(wt({lat:t,lng:i}),kt((0,n.A)((0,n.A)({},Ct),{},{latitude:t.toString(),longitude:i.toString()})),e.results[0].address_components){let t,i,s,o,r=e.results[0];for(let e=0;e{console.log(e)}))}catch(e){console.log(e)}}),[jt]),(0,s.useEffect)((()=>{lt&&wt({lat:lt.latitude,lng:lt.longitude})}),[lt]),(0,s.useEffect)((()=>{const e=e=>{"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),t.current.focus()),"Escape"===e.key&&document.activeElement===t.current&&t.current.blur()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[]);const{data:Jt,isLoading:Gt,refetch:Ut}=(0,ue.I)({queryKey:["tenantList",Be,u,ot,zt,ze],queryFn:Ae.ry}),{data:Zt=[],isLoading:Qt,refetch:$t}=(0,ue.I)({queryKey:["gettenantsummary",Be,ot],queryFn:Ae.bd}),ei=async()=>{await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/getpricinglist/?tenantid=").concat(tt)).then((e=>{console.log("getpricinglist",e),e.data.status&&st(e.data.details)})).catch((e=>{console.log(e)}))};(0,s.useEffect)((()=>{tt&&ei()}),[tt]);(0,s.useEffect)((()=>{tt&&(async e=>{try{let t=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantpricing/?tenantid=").concat(e));console.log("tenantPricing",t.data.details),setTenanatPricing(t.data.details)}catch(t){console.log("fetchTenanatPricing",t)}})(tt)}),[tt]);const ti=async e=>{let t;He(!0),t=-1==e?{tenantid:tt,approved:1}:{tenantid:e,status:"active"===ot?"InActive":"Active"},await r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/update"),t).then((e=>{e.data.status&&(Ot(0==Ge?"Inactivated Successfully":1==Ge?"Approved Successfully":"Activate Successfully","success",2e3),Ut(),$t(),He(!1))})).catch((e=>{console.log(e),Ot(e.message,"error",1500),He(!1)}))},ii=async e=>{console.log("id",e);try{let t=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapppricing/?applocationid=").concat(e));console.log("appPricingRes",t.data.details),ht(t.data.details)}catch(t){console.log("appPricingRes",t)}},ni=async()=>{He(!0),await r.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/createpricing"),{tenantpricingid:0,applocationid:Be,pricingid:pt.pricingid,tenantid:tt,pricingdate:x()().format("YYYY-MM-DD HH:mm:ss"),configid:pt.configid,pricingtypeid:pt.pricingtypeid,slab:pt.slab,baseprice:+pt.baseprice,priceperkm:+pt.priceperkm,minkm:+pt.minkm,maxkm:+pt.maxkm,orders:+pt.minorder,othercharges:0}).then((e=>{e.data.status&&((0,h.M8)("Price Created Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),Mt(),gt({}),ti(-1),ei())})).catch((e=>{console.log(e)}))},si=Re[null===(e=Ye[Ge])||void 0===e?void 0:e.status]||Re.active;return(0,me.jsxs)(me.Fragment,{children:[(Gt||Qt||Oe)&&(0,me.jsx)(a.A,{}),(0,me.jsx)(pe.A,{title:"Tenants",subtitle:"Live \xb7 ".concat(qe||"All Zones"),live:!0,action:(0,me.jsx)(xe.A,{locations:Ve,locaName:qe,setAppId:Fe,setLocoName:Ne,setPage:Wt,pill:!0,accentColor:"#662582",icon:(0,me.jsx)(ae.HPi,{size:14}),placeholder:"Select Zone",paperComponent:_e,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,me.jsx)(v.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:Le.map(((e,t)=>{var i;const n=e.icon,s=null!==(i=null===Zt||void 0===Zt?void 0:Zt[e.countKey])&&void 0!==i?i:0;return(0,me.jsx)(v.Ay,{item:!0,xs:12,sm:4,children:(0,me.jsx)(y.A,{onClick:()=>{t>=0&&Rt(0,t)},sx:{cursor:"pointer",height:"100%"},children:(0,me.jsx)(ge.A,{title:e.label,value:null!==s&&void 0!==s?s:0,icon:(0,me.jsx)(n,{size:20}),color:0===t?"#662582":e.color,loading:Qt})})},e.key)}))}),(0,me.jsx)(m.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:fe/8,borderTopRightRadius:fe/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:we,borderBottom:0,background:"#fff"},children:(0,me.jsxs)(S.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,me.jsx)(S.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:we,borderRadius:4}},children:Ye.map(((e,t)=>{var i;const n=Re[e.status],s=n.icon,o=Ge===t,r=null!==(i=null===Zt||void 0===Zt?void 0:Zt[e.countKey])&&void 0!==i?i:0;return(0,me.jsxs)(y.A,{onClick:()=>{rt(e.status),Rt(0,t)},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:"10px",border:"1px solid ".concat(o?n.color:"#e2e8f0"),bgcolor:o?n.color:"#fff",color:o?"#fff":"#64748b",fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:o?n.color:"#cbd5e1",bgcolor:o?n.color:"#f8fafc"}},children:[(0,me.jsx)(f.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:o?"rgba(255,255,255,0.22)":Ie(n.color),color:o?"#fff":n.color},children:(0,me.jsx)(s,{size:13})}),(0,me.jsx)(w.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:n.label}),(0,me.jsx)(y.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:o?"rgba(255,255,255,0.22)":"#f8fafc",color:o?"#fff":"#64748b",border:"none"},children:Qt?(0,me.jsx)(C.A,{variant:"text",width:14,height:10}):r})]},e.status)}))}),(0,me.jsx)(y.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,me.jsx)(he.A,{value:i,onChange:d,onDebouncedChange:be,sx:{m:0,width:"100%",borderRadius:999,bgcolor:We("#662582"),"& fieldset":{borderColor:Me("#662582"),borderWidth:1.5},"&:hover fieldset":{borderColor:"#662582"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(Pe("#662582"))}}})})]})}),(0,me.jsxs)(m.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:fe/8,borderBottomRightRadius:fe/8,border:"1px solid",borderColor:we,overflow:"hidden",background:"#fff"},children:[(0,me.jsx)(k.A,{sx:{display:{xs:"none",md:"block"},maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:"10px",height:"10px"},"&::-webkit-scrollbar-thumb":{backgroundColor:Me("#662582"),borderRadius:"8px","&:hover":{backgroundColor:"#662582"}},"&::-webkit-scrollbar-track":{backgroundColor:ke}},children:(0,me.jsxs)(z.A,{stickyHeader:!0,sx:{minWidth:{xs:720,md:960}},children:[(0,me.jsx)(W.A,{children:(0,me.jsxs)(I.A,{sx:{"& th":{backgroundColor:ke,color:ye,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(we),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,me.jsx)(P.A,{children:"#"}),(0,me.jsx)(P.A,{children:"Status"}),(0,me.jsx)(P.A,{children:"Client"}),(0,me.jsx)(P.A,{children:"Contact"}),(0,me.jsx)(P.A,{children:"Address"}),(0,me.jsx)(P.A,{align:"right",children:"Actions"})]})}),(0,me.jsxs)(M.A,{children:[Gt&&(0,me.jsx)(je.r,{}),0!=(null===Jt||void 0===Jt?void 0:Jt.length)||Oe?null===Jt||void 0===Jt?void 0:Jt.map(((e,t)=>{var i;const l=Re[0===Ge?"active":1===Ge?"pending":"inactive"],a=l.icon;return(0,me.jsxs)(s.Fragment,{children:[(0,me.jsxs)(I.A,{sx:{cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(Ce),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:ke}},children:[(0,me.jsx)(P.A,{children:(0,me.jsx)(w.A,{variant:"caption",sx:{fontWeight:700,color:Se},children:String(t+1+zt*ze).padStart(2,"0")})}),(0,me.jsx)(P.A,{children:(0,me.jsxs)(S.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:We(l.color),border:"1px solid ".concat(Me(l.color)),color:l.color},children:[(0,me.jsx)(Ee,{color:l.color,size:20,children:(0,me.jsx)(a,{size:12})}),(0,me.jsx)(w.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:l.label})]})}),(0,me.jsx)(P.A,{children:(0,me.jsxs)(S.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,me.jsx)(Ee,{color:"#662582",size:32,children:(0,me.jsx)(ae.Azs,{size:16})}),(0,me.jsxs)(S.A,{children:[(0,me.jsx)(w.A,{variant:"subtitle2",sx:{fontWeight:700,color:ve,whiteSpace:"nowrap"},children:e.tenantname}),(0,me.jsxs)(w.A,{variant:"caption",sx:{color:ye},children:["ID #",e.tenantid]})]})]})}),(0,me.jsx)(P.A,{children:(0,me.jsxs)(S.A,{children:[(0,me.jsx)(w.A,{variant:"subtitle2",sx:{fontWeight:700,color:ve,whiteSpace:"nowrap"},children:e.primarycontact||"\u2014"}),(0,me.jsx)(w.A,{variant:"caption",sx:{color:ye},children:e.primaryemail||"\u2014"})]})}),(0,me.jsx)(P.A,{sx:{maxWidth:280},children:(0,me.jsx)(R.A,{title:e.address||"",placement:"top",children:(0,me.jsx)(w.A,{variant:"caption",sx:{color:ye,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.address||"\u2014"})})}),(0,me.jsx)(P.A,{align:"right",children:(0,me.jsxs)(S.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[0==Ge&&(0,me.jsx)(R.A,{title:"Inactivate",placement:"top",children:(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#ef4444"),color:"#ef4444",border:"1px solid ".concat(Me("#ef4444")),"&:hover":{bgcolor:"#ef4444",color:"#fff"}},onClick:()=>{at(e),it(e.tenantid),Fe(e.applocationid),setTimeout((()=>{ti(e.tenantid)}),100)},children:(0,me.jsx)(Z.A,{style:{fontSize:14}})})}),1==Ge&&(0,me.jsx)(R.A,{title:"Approve",placement:"top",children:(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#f59e0b"),color:"#f59e0b",border:"1px solid ".concat(Me("#f59e0b")),"&:hover":{bgcolor:"#f59e0b",color:"#fff"}},onClick:()=>{at(e),dt(!0),it(e.tenantid),Fe(e.applocationid),ii(e.applolcationid)},children:(0,me.jsx)(Q.A,{style:{fontSize:14}})})}),2==Ge&&(0,me.jsx)(R.A,{title:"Activate",placement:"top",children:(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#10b981"),color:"#10b981",border:"1px solid ".concat(Me("#10b981")),"&:hover":{bgcolor:"#10b981",color:"#fff"}},onClick:()=>{at(e),it(e.tenantid),Fe(e.applocationid),setTimeout((()=>{ti(e.tenantid)}),100)},children:(0,me.jsx)(se.yjt,{style:{fontSize:14}})})}),(0,me.jsx)(R.A,{title:_t===t?"Hide details":"View details",placement:"top",children:(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:_t===t?"#662582":Ie("#662582"),color:_t===t?"#fff":"#662582",border:"1px solid ".concat(Me("#662582")),"&:hover":{bgcolor:"#662582",color:"#fff"}},onClick:()=>{at(e),Dt(t),Tt(-1),it(e.tenantid)},children:_t===t?(0,me.jsx)($.A,{style:{fontSize:14}}):(0,me.jsx)(ee.A,{style:{fontSize:14}})})}),1!==Ge&&(0,me.jsx)(R.A,{title:Kt===t?"Close":"Edit",placement:"top",children:(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Kt===t?"#8b5cf6":Ie("#8b5cf6"),color:Kt===t?"#fff":"#8b5cf6",border:"1px solid ".concat(Me("#8b5cf6")),"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},onClick:()=>{var i;at(e),i=t,Tt((e=>e===i?null:i)),Et(-1),it(e.tenantid),Fe(e.applocationid)},children:Kt===t?(0,me.jsx)(te.A,{style:{fontSize:14}}):(0,me.jsx)(ie.A,{style:{fontSize:14}})})})]})})]}),_t===t&&(0,me.jsx)(I.A,{children:(0,me.jsx)(P.A,{sx:{"&:hover":{backgroundColor:"white !important"}},colSpan:15,children:(0,me.jsx)(L.A,{in:open,timeout:800,easing:"ease-in-out",mountOnEnter:!0,unmountOnExit:!1,sx:{"& .MuiCollapse-wrapperInner":{transition:"transform 800ms ease, opacity 800ms ease"}},children:(0,me.jsxs)(o.A,{content:!1,sx:{transform:open?"translateY(0)":"translateY(-8px)",opacity:open?1:0},title:(0,me.jsxs)(_.A,{sx:{bgcolor:"primary.lighter"},value:Ze,onChange:Yt,"aria-label":"basic tabs example",children:[(0,me.jsx)(E.A,{label:" Details",icon:(0,me.jsx)(oe.gA5,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"}}),(0,me.jsx)(E.A,{label:"Pricing",icon:(0,me.jsx)(re.FA6,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"}})]}),children:[0==Ze&&(0,me.jsxs)(v.Ay,{container:!0,sx:{m:1},spacing:2.5,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(le.JXP,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.tenantname}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Tenant"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(le.JXP,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.firstname}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Contact Person"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(le.wnV,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.primarycontact}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Phone"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(ce.h2r,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.primaryemail}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"E-Mail"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(se.Y9o,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.address}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Address"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(re.BUW,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.city}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"City"})]}),(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(ae.kci,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",variant:"subtitle1",children:e.postcode}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"PostCode"})]})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(oe.J0X,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",children:e.latitude}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Latitude"})]}),(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(oe.u3h,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsxs)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:[(0,me.jsx)(w.A,{align:"left",variant:"subtitle1",children:e.longitude}),(0,me.jsx)(w.A,{align:"left",variant:"caption",color:"secondary",children:"Longitude"})]})]})})]}),1==Ze&&(0,me.jsx)(K.A,{variant:"outlined",sx:{},children:(0,me.jsx)(k.A,{children:(0,me.jsxs)(z.A,{children:[(0,me.jsx)(W.A,{children:(0,me.jsxs)(I.A,{children:[(0,me.jsx)(P.A,{children:"#"}),(0,me.jsx)(P.A,{children:"Date"}),(0,me.jsx)(P.A,{children:"Slab"}),(0,me.jsx)(P.A,{children:"Base Price"}),(0,me.jsx)(P.A,{children:"Min Kms"}),(0,me.jsx)(P.A,{children:"Price/Km"}),(0,me.jsx)(P.A,{children:"Other Charges"})]})}),(0,me.jsx)(M.A,{children:0===(null===nt||void 0===nt?void 0:nt.length)?(0,me.jsx)(I.A,{children:(0,me.jsx)(P.A,{colSpan:7,align:"center",children:(0,me.jsx)(c.A,{description:"No Pricing List"})})}):nt.map(((e,t)=>(0,me.jsxs)(I.A,{sx:{bgcolor:"white"},children:[(0,me.jsx)(P.A,{children:t+1}),(0,me.jsx)(P.A,{children:x()(e.pricingdate).format("DD-MM-YYYY")}),(0,me.jsx)(P.A,{children:e.slab}),(0,me.jsx)(P.A,{children:e.baseprice}),(0,me.jsx)(P.A,{children:e.minkm}),(0,me.jsx)(P.A,{children:e.priceperkm}),(0,me.jsx)(P.A,{children:e.othercharges})]},e.id||t)))})]})})},"left - card")]})})})}),Kt===t&&(0,me.jsx)(I.A,{children:(0,me.jsx)(P.A,{sx:{backgroundColor:"white!important","&:hover":{backgroundColor:"white!important"}},colSpan:15,children:(0,me.jsxs)(o.A,{content:!1,title:(0,me.jsxs)(y.A,{sx:{bgcolor:"primary.lighter",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,me.jsxs)(_.A,{value:$e,onChange:Lt,"aria-label":"basic tabs example",children:[(0,me.jsx)(E.A,{label:"Edit Details",icon:(0,me.jsx)(oe.gA5,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"}}),1!==Ge&&(0,me.jsx)(E.A,{label:"Edit Pricing",icon:(0,me.jsx)(re.FA6,{style:{marginRight:5,fontSize:"20px",marginBottom:-1}}),sx:{alignItems:"center",flexDirection:"row"},onClick:()=>{ii(lt.applolcationid)}})]}),1==$e&&(0,me.jsx)(T.A,{variant:"contained",color:"error",size:"smaller",startIcon:(0,me.jsx)(ie.A,{size:"small"}),sx:{mr:1.8,height:"30px"},onClick:()=>{dt(!0)},children:"Add Pricing"})]}),children:[0==$e&&(0,me.jsx)(K.A,{variant:"outlined",sx:{m:2},children:(0,me.jsx)(v.Ay,{container:!0,spacing:0,children:(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(K.A,{variant:"outlined",children:[(0,me.jsx)(D.A,{children:(0,me.jsxs)(v.Ay,{container:!0,spacing:2.5,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(de.PY8,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{fullWidth:!0,id:"outlined-basic",label:"Tenant Name",defaultValue:lt.tenantname,variant:"outlined",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{tenantname:e.target.value}))},sx:{mt:2}})})]})})," ",(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(le.JXP,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{fullWidth:!0,id:"outlined-basic",label:"Contact Person",defaultValue:e.firstname,variant:"outlined",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{firstname:e.target.value}))},sx:{mt:2}})})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(le.wnV,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{inputProps:{maxLength:10},fullWidth:!0,id:"outlined-basic",label:"Contact Number",defaultValue:lt.primarycontact,variant:"outlined",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{primarycontact:e.target.value}))},sx:{mt:2}})})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:6,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(ce.h2r,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{fullWidth:!0,id:"outlined-basic",label:"E-Mail",defaultValue:lt.primaryemail,variant:"outlined",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{primaryemail:e.target.value}))},sx:{mt:2}})})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(se.Y9o,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(H.A,{id:"google-map-demo",sx:{},fullWidth:!0,label:"Address",getOptionLabel:e=>"string"===typeof e?e:e.description,filterOptions:e=>e,options:qt,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,defaultValue:lt.address,noOptionsText:"No locations",onChange:(e,t)=>{Nt(t?[t,...qt]:qt),Je(t||""),console.log("newValue",t),mt((null===t||void 0===t?void 0:t.description)||""),kt((0,n.A)((0,n.A)({},Ct),{},{address:(null===t||void 0===t?void 0:t.description)||""}))},onInputChange:(e,t)=>{Ft(t)},renderInput:e=>(0,me.jsx)(O.A,(0,n.A)((0,n.A)({},e),{},{fullWidth:!0,label:"Address",variant:"outlined"})),renderOption:(e,t)=>{const i=t.structured_formatting.main_text_matched_substrings||[],s=A()(t.structured_formatting.main_text,i.map((e=>[e.offset,e.offset+e.length])));return(0,me.jsx)("li",(0,n.A)((0,n.A)({},e),{},{children:(0,me.jsxs)(v.Ay,{container:!0,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,sx:{display:"flex",width:44},children:(0,me.jsx)(g.A,{sx:{color:"text.secondary"}})}),(0,me.jsxs)(v.Ay,{item:!0,sx:{width:"calc(100% - 44px)",wordWrap:"break-word"},children:[s.map(((e,t)=>(0,me.jsx)(y.A,{component:"span",sx:{fontWeight:e.highlight?"bold":"regular"},children:e.text},t))),(0,me.jsx)(w.A,{variant:"body2",color:"text.secondary",children:t.structured_formatting.secondary_text})]})]})}))}})})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(re.BUW,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{fullWidth:!0,required:!0,id:"outlined-required",label:"City",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{city:e.target.value}))},value:""==ft?lt.city:ft})}),(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(ae.kci,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{fullWidth:!0,required:!0,label:" PostCode",id:"outlined-required",onChange:e=>{kt((0,n.A)((0,n.A)({},Ct),{},{postcode:e.target.value}))},value:""==vt?lt.postcode:vt})})]})}),(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(v.Ay,{container:!0,spacing:4,alignItems:"center",children:[(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(oe.J0X,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{variant:"outlined",readonly:!0,label:"Latitude",fullWidth:!0,value:St.lat,sx:{cursor:"not-allowed"}})}),(0,me.jsx)(v.Ay,{item:!0,children:(0,me.jsx)(oe.u3h,{style:{fontSize:"20px",fontWeight:"lighter"}})}),(0,me.jsx)(v.Ay,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,me.jsx)(O.A,{label:"Longitude",readonly:!0,variant:"outlined",fullWidth:!0,value:St.lng})})]})})]})}),(0,me.jsx)(B.A,{sx:{display:"flex",justifyContent:"end",mr:3,mb:2},children:(0,me.jsx)(T.A,{variant:"contained",size:"medium",onClick:()=>{(async()=>{try{const e=(0,n.A)((0,n.A)({},Ct),{},{tenantid:tt});console.log("updateClient",e);const t=await r.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/update"),e);console.log("updateClient",t.data.message),t.data.status&&Ot(t.data.message,"success",1500),Ut(),$t()}catch(e){console.log("updateClient",e)}})()},children:"Update Client"})})]})})})},"left - card"),1==$e&&(0,me.jsx)(K.A,{variant:"outlined",sx:{},children:(0,me.jsx)(k.A,{children:(0,me.jsxs)(z.A,{children:[(0,me.jsx)(W.A,{children:(0,me.jsxs)(I.A,{children:[(0,me.jsx)(P.A,{children:"#"}),(0,me.jsx)(P.A,{children:"Date"}),(0,me.jsx)(P.A,{children:"Slab"}),(0,me.jsx)(P.A,{children:"Base Price"}),(0,me.jsx)(P.A,{children:"Min Kms"}),(0,me.jsx)(P.A,{children:"Price/Km"}),(0,me.jsx)(P.A,{children:"Other Charges"})]})}),(0,me.jsx)(M.A,{children:0===(null===nt||void 0===nt?void 0:nt.length)?(0,me.jsx)(I.A,{children:(0,me.jsx)(P.A,{colSpan:7,align:"center",children:(0,me.jsx)(c.A,{})})}):nt.map(((e,t)=>(0,me.jsxs)(I.A,{sx:{bgcolor:"white"},children:[(0,me.jsx)(P.A,{children:t+1}),(0,me.jsx)(P.A,{children:x()(e.pricingdate).format("DD-MM-YYYY")}),(0,me.jsx)(P.A,{children:e.slab}),(0,me.jsx)(P.A,{children:e.baseprice}),(0,me.jsx)(P.A,{children:e.minkm}),(0,me.jsx)(P.A,{children:e.priceperkm}),(0,me.jsx)(P.A,{children:e.othercharges})]},e.id||t)))})]})})},"left - card")]})})})]},null!==(i=e.tenantid)&&void 0!==i?i:t)})):(0,me.jsx)(I.A,{children:(0,me.jsx)(P.A,{colSpan:6,sx:{py:6},children:(0,me.jsxs)(S.A,{alignItems:"center",spacing:1.5,children:[(0,me.jsx)(f.A,{sx:{width:64,height:64,bgcolor:Ie("#94a3b8"),color:Se},children:(0,me.jsx)(ae.Itr,{size:28})}),(0,me.jsx)(w.A,{variant:"subtitle1",sx:{fontWeight:700,color:ve},children:"No tenants to show"}),(0,me.jsx)(w.A,{variant:"caption",sx:{color:ye},children:"No ".concat(si.label.toLowerCase()," tenants for this filter.")})]})})})]})]})}),De&&(0,me.jsxs)(U.nV,{scroll:!0,sx:{display:{xs:"flex",md:"none"}},children:[Gt&&(0,me.jsxs)(S.A,{alignItems:"center",sx:{py:4},children:[(0,me.jsx)(C.A,{variant:"rounded",width:"100%",height:96,animation:"wave"}),(0,me.jsx)(C.A,{variant:"rounded",width:"100%",height:96,animation:"wave",sx:{mt:1.25}})]}),0!=(null===Jt||void 0===Jt?void 0:Jt.length)||Oe?null===Jt||void 0===Jt?void 0:Jt.map(((e,t)=>{var i;const n=Re[0===Ge?"active":1===Ge?"pending":"inactive"],s=n.icon,o=_t===t;return(0,me.jsxs)(U.pg,{accent:n.color,header:(0,me.jsxs)(S.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,me.jsxs)(S.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,me.jsx)(Ee,{color:"#662582",size:36,children:(0,me.jsx)(ae.Azs,{size:18})}),(0,me.jsxs)(S.A,{sx:{minWidth:0},children:[(0,me.jsx)(w.A,{variant:"subtitle2",sx:{fontWeight:800,color:ve},noWrap:!0,children:e.tenantname}),(0,me.jsxs)(S.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",mt:.25,pl:.25,pr:.875,py:.125,borderRadius:999,bgcolor:We(n.color),border:"1px solid ".concat(Me(n.color)),color:n.color,alignSelf:"flex-start"},children:[(0,me.jsx)(Ee,{color:n.color,size:16,children:(0,me.jsx)(s,{size:10})}),(0,me.jsx)(w.A,{sx:{fontWeight:800,fontSize:10,lineHeight:1},children:n.label})]})]})]}),(0,me.jsxs)(S.A,{direction:"row",spacing:.5,sx:{flexShrink:0},children:[0==Ge&&(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#ef4444"),color:"#ef4444",border:"1px solid ".concat(Me("#ef4444")),"&:hover":{bgcolor:"#ef4444",color:"#fff"}},onClick:()=>{at(e),it(e.tenantid),Fe(e.applocationid),setTimeout((()=>{ti(e.tenantid)}),100)},children:(0,me.jsx)(Z.A,{style:{fontSize:14}})}),1==Ge&&(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#f59e0b"),color:"#f59e0b",border:"1px solid ".concat(Me("#f59e0b")),"&:hover":{bgcolor:"#f59e0b",color:"#fff"}},onClick:()=>{at(e),dt(!0),it(e.tenantid),Fe(e.applocationid),ii(e.applolcationid)},children:(0,me.jsx)(Q.A,{style:{fontSize:14}})}),2==Ge&&(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#10b981"),color:"#10b981",border:"1px solid ".concat(Me("#10b981")),"&:hover":{bgcolor:"#10b981",color:"#fff"}},onClick:()=>{at(e),it(e.tenantid),Fe(e.applocationid),setTimeout((()=>{ti(e.tenantid)}),100)},children:(0,me.jsx)(se.yjt,{style:{fontSize:14}})}),(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:o?"#662582":Ie("#662582"),color:o?"#fff":"#662582",border:"1px solid ".concat(Me("#662582")),"&:hover":{bgcolor:"#662582",color:"#fff"}},onClick:()=>{at(e),Dt(t),Tt(-1),it(e.tenantid)},children:o?(0,me.jsx)($.A,{style:{fontSize:14}}):(0,me.jsx)(ee.A,{style:{fontSize:14}})}),1!==Ge&&(0,me.jsx)(Y.A,{size:"small",sx:{bgcolor:Ie("#8b5cf6"),color:"#8b5cf6",border:"1px solid ".concat(Me("#8b5cf6")),"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},onClick:()=>{at(e),it(e.tenantid),Fe(e.applocationid),ii(e.applolcationid),dt(!0)},children:(0,me.jsx)(ie.A,{style:{fontSize:14}})})]})]}),children:[(0,me.jsxs)(U.FG,{children:[(0,me.jsx)(U.pY,{label:"Tenant ID",value:"#".concat(e.tenantid)}),(0,me.jsx)(U.pY,{label:"Contact",value:e.primarycontact||"\u2014"}),(0,me.jsx)(U.pY,{label:"Email",value:e.primaryemail||"\u2014",full:!0}),(0,me.jsx)(U.pY,{label:"Address",full:!0,children:(0,me.jsx)(w.A,{sx:{fontSize:13,fontWeight:600,color:ve},children:e.address||"\u2014"})})]}),o&&(0,me.jsx)(y.A,{sx:{mt:1.25,pt:1.25,borderTop:"1px solid ".concat(Ce)},children:(0,me.jsxs)(U.FG,{children:[(0,me.jsx)(U.pY,{label:"Contact Person",value:e.firstname||"\u2014"}),(0,me.jsx)(U.pY,{label:"City",value:e.city||"\u2014"}),(0,me.jsx)(U.pY,{label:"Postcode",value:e.postcode||"\u2014"}),(0,me.jsx)(U.pY,{label:"Latitude",value:e.latitude||"\u2014"}),(0,me.jsx)(U.pY,{label:"Longitude",value:e.longitude||"\u2014"})]})})]},null!==(i=e.tenantid)&&void 0!==i?i:t)})):(0,me.jsxs)(S.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,me.jsx)(f.A,{sx:{width:64,height:64,bgcolor:Ie("#94a3b8"),color:Se},children:(0,me.jsx)(ae.Itr,{size:28})}),(0,me.jsx)(w.A,{variant:"subtitle1",sx:{fontWeight:700,color:ve},children:"No tenants to show"}),(0,me.jsx)(w.A,{variant:"caption",sx:{color:ye,textAlign:"center"},children:"No ".concat(si.label.toLowerCase()," tenants for this filter.")})]})]}),!i&&(null===Jt||void 0===Jt?void 0:Jt.length)>0&&(0,me.jsxs)(me.Fragment,{children:[(0,me.jsx)(F.A,{sx:{borderColor:we}}),(0,me.jsx)(q.A,{rowsPerPageOptions:[5,10,25,50,100],component:"div",count:0==Ge?null===Zt||void 0===Zt?void 0:Zt.active:1==Ge?null===Zt||void 0===Zt?void 0:Zt.pending:2==Ge?null===Zt||void 0===Zt?void 0:Zt.inactive:0,rowsPerPage:ze,page:zt,onPageChange:(e,t)=>{Wt(t)},onRowsPerPageChange:e=>{Ke(parseInt(e.target.value,10)),Wt(0)}})]})]}),(0,me.jsxs)(N.A,{fullWidth:!0,fullScreen:De,open:ct,onClose:Mt,scroll:"paper",maxWidth:"sm",TransitionComponent:ne.s,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},children:[(0,me.jsx)(V.A,{sx:{bgcolor:"#662582",color:"#fff",fontSize:"20px"},children:"Client Pricing - (".concat(lt.tenantname,")")}),(0,me.jsx)(X.A,{dividers:!0,children:(0,me.jsx)(o.A,{sx:{height:"100%"},children:(0,me.jsxs)(v.Ay,{container:!0,spacing:2.5,alignItems:"center",children:[(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Select Slab"}),(0,me.jsx)(H.A,{disablePortal:!0,id:"combo-box-demo",options:xt,getOptionLabel:e=>"".concat(e.slab),fullWidth:!0,selectOnFocus:!0,renderInput:e=>(0,me.jsx)(O.A,(0,n.A)((0,n.A)({},e),{},{label:"Slab"})),onChange:(e,t,i)=>{gt(t),console.log("pricing",t),At(!1),"clear"===i&&At(!0)}})]}),(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Base Price"}),(0,me.jsx)(O.A,{type:"number",fullWidth:!0,value:ut?0:pt.baseprice,onChange:e=>{gt((0,n.A)((0,n.A)({},pt),{},{baseprice:e.target.value}))}})]}),(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Price/Km"}),(0,me.jsx)(O.A,{type:"number",fullWidth:!0,value:ut?0:pt.priceperkm,onChange:e=>{gt((0,n.A)((0,n.A)({},pt),{},{priceperkm:e.target.value}))}})]}),(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Min Kms"}),(0,me.jsx)(O.A,{type:"number",fullWidth:!0,value:ut?0:pt.minkm,onChange:e=>{gt((0,n.A)((0,n.A)({},pt),{},{minkm:e.target.value}))}})]}),(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Max Kms"}),(0,me.jsx)(O.A,{type:"number",fullWidth:!0,value:ut?0:pt.maxkm,onChange:e=>{gt((0,n.A)((0,n.A)({},pt),{},{maxkm:e.target.value}))}})]}),(0,me.jsxs)(v.Ay,{item:!0,xs:12,sm:6,children:[(0,me.jsx)(J.A,{children:"Min Orders"}),(0,me.jsx)(O.A,{type:"number",fullWidth:!0,value:ut?0:pt.minorder,onChange:e=>{gt((0,n.A)((0,n.A)({},pt),{},{minorder:e.target.value}))}})]})]})})}),(0,me.jsx)(G.A,{children:(0,me.jsx)(v.Ay,{container:!0,children:(0,me.jsx)(v.Ay,{item:!0,xs:12,children:(0,me.jsxs)(S.A,{direction:"row",justifyContent:"flex-end",spacing:2,sx:{p:2},children:[1==$e&&(0,me.jsx)(T.A,{disabled:ut,variant:"contained",onClick:()=>{ni()},children:"Update Pricing"}),1==Ge&&(0,me.jsx)(T.A,{disabled:ut,variant:"contained",onClick:()=>{ni()},children:"Save"}),(0,me.jsx)(T.A,{variant:"contained",onClick:()=>{At(!0),setTimeout((()=>{Mt()}),100),gt({})},color:"error",children:"Cancel"})]})})})})]})]})}},96646:(e,t,i)=>{i.d(t,{r:()=>a});var n=i(9213),s=i(21671),o=i(82917),r=i(93230),l=i(44414);const a=e=>{let{rowsPerPage:t=5,col:i=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,l.jsxs)(n.A,{children:[(0,l.jsx)(s.A,{children:(0,l.jsx)(o.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(s.A,{children:(0,l.jsx)(o.A,{variant:"text",width:30})}),Array.from({length:i}).map(((e,t)=>(0,l.jsx)(s.A,{children:(0,l.jsxs)(r.A,{spacing:.5,children:[(0,l.jsx)(o.A,{variant:"text",width:100}),(0,l.jsx)(o.A,{variant:"text",width:80})]})},t))),(0,l.jsx)(s.A,{children:(0,l.jsx)(o.A,{variant:"text",width:150})}),(0,l.jsx)(s.A,{children:(0,l.jsx)(o.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(s.A,{align:"center",children:(0,l.jsxs)(r.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(o.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(o.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file diff --git a/build/static/js/181.03ad68d3.chunk.js b/build/static/js/181.03ad68d3.chunk.js new file mode 100644 index 0000000..2504e74 --- /dev/null +++ b/build/static/js/181.03ad68d3.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[181],{10181:(e,t,r)=>{r.r(t),r.d(t,{default:()=>le});var o=r(89379),n=r(9950),i=r(26910),l=r(36150),s=r(2235),a=r(41413),c=r(83274),d=r(16491),x=r(82053),h=r(14857),u=r(47223),p=r(60899),m=r(93230),A=r(25333),f=r(33738),g=r(74745),j=r(1320),b=r(15769),v=r(69780),S=r(9213),w=r(21671),y=r(34075),k=r(25277),C=r(96583),z=r(28170),D=r(31222),P=r(4159),R=r.n(P),I=r(81425),_=r(52351),M=r(35678),T=r(59212),E=r(56311),W=r(27001),N=r(36803),L=r(96646),Y=r(10523),F=r(46639),O=r(44414);const K={width:"100%",height:"100%"};function B(e){let{details:t,loading:r,riderName:o,dateRange:i,onClose:l}=e;const s=(0,n.useRef)(null),[a,c]=(0,n.useState)(null),[h,u]=(0,n.useState)([]),[p,f]=(0,n.useState)(!1),{isLoaded:g}=(0,Y.KD)({googleMapsApiKey:{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_URL:"https://mock-data-api-nextjs.vercel.app/",REACT_APP_AUTH0_CLIENT_ID:"",REACT_APP_AUTH0_DOMAIN:"",REACT_APP_AWS_APP_CLIENT_ID:"",REACT_APP_AWS_POOL_ID:"",REACT_APP_FIREBASE_API_KEY:"",REACT_APP_FIREBASE_APP_ID:"",REACT_APP_FIREBASE_AUTH_DOMAIN:"",REACT_APP_FIREBASE_MEASUREMENT_ID:"",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"",REACT_APP_FIREBASE_PROJECT_ID:"",REACT_APP_FIREBASE_STORAGE_BUCKET:"",REACT_APP_GOOGLE_MAPS_API_KEY:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",REACT_APP_RIDER_ACCESS_ID:"AAAAILMpCEU:APA91bEavuOllBI6sFgYtxXAgNmAVwNA-MnCMHLGlR4_t7UqpLajAkdn3T0CZr_zaLBknLyim9ytFLMZgbeXmKqTad_PKCbqlYjHpaizVrLXtecxqyEy4UktIacK2UvHVUATHL-7VQQk",REACT_APP_STAFF_TOKEN:"",REACT_APP_URL:"https://jupiter.nearle.app/live/api/v1",REACT_APP_URL2:"https://jupiter.nearle.app/live/api/v2",REACT_APP_URL3:"https://jupiter.nearle.app/live/api/v3",REACT_APP_VERSION:"v2.1.0"}.REACT_APP_GOOGLE_MAPS_KEY}),j=(0,n.useMemo)((()=>(t||[]).map((e=>({lat:e.dropLat,lng:e.dropLng})))),[t]);(0,n.useEffect)((()=>{if(!g||!s.current||0===j.length)return;const e=new window.google.maps.LatLngBounds;j.forEach((t=>e.extend(t))),s.current.fitBounds(e,48)}),[g,j]),(0,n.useEffect)((()=>{if(!g||j.length<2)return void u([]);let e=!1;const t=new window.google.maps.DirectionsService,r=(e,r,o)=>new Promise(((n,i)=>{t.route({origin:e,destination:r,waypoints:o.map((e=>({location:e,stopover:!0}))),travelMode:window.google.maps.TravelMode.DRIVING},((e,t)=>{"OK"===t?n(e):i(new Error(t))}))}));return(async()=>{f(!0);try{const t=j,o=[];let n=0;for(;n({lat:e.lat(),lng:e.lng()})));o.length>0&&c.length>0&&c.shift(),o.push(...c),n+=i}e||u(o)}catch(t){e||u([])}finally{e||f(!1)}})(),()=>{e=!0}}),[g,j]);const b=(e,t)=>{const r=t?38:32,o=t?"#4D1C61":"#662582",n=encodeURIComponent('')+'')+''.concat(e,"")+"");return"data:image/svg+xml;charset=UTF-8,".concat(n)},v=(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1.5,sx:{px:2,py:1.25,borderBottom:"1px solid rgba(15, 23, 42, 0.08)",background:"linear-gradient(135deg, #662582 0%, #9255AB 100%)",color:"#fff",flexShrink:0},children:[(0,O.jsx)(D.pk7,{size:20}),(0,O.jsxs)(m.A,{sx:{flex:1,minWidth:0},children:[(0,O.jsxs)(x.A,{sx:{fontWeight:700,fontSize:15,lineHeight:1.2},children:["Planned route",o?" \u2014 ".concat(o):""]}),i&&(0,O.jsx)(x.A,{sx:{fontSize:12,opacity:.85},children:i})]}),t&&t.length>0&&(0,O.jsxs)(x.A,{sx:{fontSize:12,opacity:.9,fontWeight:600},children:[t.length," ",1===t.length?"stop":"stops",p?" \xb7 resolving route\u2026":""]}),l&&(0,O.jsx)(A.A,{size:"small",onClick:l,sx:{color:"#fff"},"aria-label":"Close",children:(0,O.jsx)(D.m6K,{})})]});return r||!g?(0,O.jsxs)(d.A,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[v,(0,O.jsxs)(m.A,{alignItems:"center",justifyContent:"center",sx:{flex:1,gap:1.5},children:[(0,O.jsx)(F.A,{size:32}),(0,O.jsx)(x.A,{sx:{color:"#64748b",fontSize:13},children:r?"Loading planned route\u2026":"Loading map\u2026"})]})]}):t&&0!==t.length?(0,O.jsxs)(d.A,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[v,(0,O.jsx)(d.A,{sx:{flex:1,minHeight:0},children:(0,O.jsxs)(Y.u6,{mapContainerStyle:K,onLoad:e=>s.current=e,center:j[0],zoom:14,options:{streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1},children:[h.length>0?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Y.Ro,{path:h,options:{strokeColor:"#662582",strokeOpacity:.25,strokeWeight:8}}),(0,O.jsx)(Y.Ro,{path:h,options:{strokeColor:"#662582",strokeOpacity:.95,strokeWeight:4}})]}):(0,O.jsx)(Y.Ro,{path:j,options:{strokeColor:"#662582",strokeOpacity:0,strokeWeight:0,icons:[{icon:{path:"M 0,-1 0,1",strokeOpacity:.6,strokeColor:"#662582",scale:3},offset:"0",repeat:"14px"}]}}),t.map(((e,t)=>{const r=e.step||t+1,o=a===e.deliveryid;return(0,O.jsx)(Y.pH,{position:{lat:e.dropLat,lng:e.dropLng},icon:{url:b(r,o)},onClick:()=>c(o?null:e.deliveryid),zIndex:o?1e3:r,children:o&&(0,O.jsx)(Y.Fu,{onCloseClick:()=>c(null),children:(0,O.jsxs)(d.A,{sx:{minWidth:180,fontFamily:"inherit"},children:[(0,O.jsxs)(x.A,{sx:{fontWeight:800,fontSize:13,color:"#0f172a"},children:["Step ",r," \xb7 ",e.customer]}),e.address&&(0,O.jsx)(x.A,{sx:{fontSize:12,color:"#475569",mt:.5},children:e.address}),e.expectedTime&&(0,O.jsxs)(x.A,{sx:{fontSize:12,color:"#64748b",mt:.5},children:["ETA ",String(e.expectedTime).slice(11,16)||e.expectedTime]}),e.orderid&&(0,O.jsxs)(x.A,{sx:{fontSize:11,color:"#94a3b8",mt:.5},children:["Order #",e.orderid]})]})})},"step-".concat(e.deliveryid||e.orderid||t))}))]})})]}):(0,O.jsxs)(d.A,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[v,(0,O.jsxs)(m.A,{alignItems:"center",justifyContent:"center",sx:{flex:1,gap:1,p:3},children:[(0,O.jsx)(x.A,{sx:{color:"#1e293b",fontWeight:700,fontSize:16},children:"No planned route for this rider"}),(0,O.jsx)(x.A,{sx:{color:"#64748b",fontSize:13,textAlign:"center",maxWidth:360},children:"There are no deliveries with drop coordinates assigned to this rider for the selected date range."})]})]})}var H=r(20466),U=r(23787),G=r(36220);R().extend(G);const V={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},X=(e,t)=>"".concat(e).concat(t),$=e=>X(e,"08"),q=e=>X(e,"18"),Z=e=>X(e,"26"),Q=e=>X(e,"55"),J="#662582",ee="#9255AB",te=e=>(0,O.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:V.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),re=e=>{let{color:t,selected:r,size:o=24,children:n}=e;return(0,O.jsx)(a.A,{sx:{width:o,height:o,bgcolor:r?t:q(t),color:r?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:n})},oe=e=>{let{color:t,icon:r,label:o,tooltip:n,minWidth:i=80}=e;return(0,O.jsx)(c.A,{title:n||"",placement:"top",children:(0,O.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(Q(t)),color:t,fontSize:11,fontWeight:800,minWidth:i,justifyContent:"center",whiteSpace:"nowrap"},children:[r,o]})})},ne=e=>{let{value:t,color:r="#ef4444",icon:o}=e;const n=Number(t)||0;return 0===n?(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textMuted,fontWeight:700},children:"0"}):(0,O.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.875,py:.25,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(Q(r)),color:r,fontSize:12,fontWeight:800,minWidth:36,justifyContent:"center"},children:[o,n]})};function ie(e){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(Number(e)||0)}function le(){const e=(0,h.A)(),t=(0,u.A)(e.breakpoints.down("md")),[r,o]=(0,n.useState)(R()().format("YYYY-MM-DD")),[P,Y]=(0,n.useState)(R()().format("YYYY-MM-DD")),[F,K]=(0,n.useState)("All"),[G,X]=(0,n.useState)(!1),[le,se]=(0,n.useState)("Today"),[ae,ce]=(0,n.useState)([]),[de,xe]=(0,n.useState)(null),[he,ue]=(0,n.useState)(0),[pe,me]=(0,n.useState)(!1),[Ae,fe]=(0,n.useState)(!1),[ge,je]=(0,n.useState)(null),[be,ve]=(0,n.useState)(null),[Se,we]=(0,n.useState)(!1),[ye,ke]=(0,n.useState)(""),[Ce,ze]=(0,n.useState)(""),{isLoading:De,data:Pe}=(0,l.I)({queryKey:["ridersummary",he,r,P],queryFn:I.KN}),Re=(0,n.useMemo)((()=>{if(!Pe)return[];if(!Ce)return Pe;const e=Ce.toLowerCase().trim();return Pe.filter((t=>["".concat(t.firstname||""," ").concat(t.lastname||""),String(t.userid)].filter(Boolean).some((t=>String(t).toLowerCase().includes(e)))))}),[Pe,Ce]),Ie=(0,n.useMemo)((()=>Pe&&0!==Pe.length?Pe.reduce(((e,t)=>(e.riders+=1,e.orders+=Number(t.totalorders)||0,e.delivered+=Number(t.delivered)||0,e.amount+=Math.max(Number(t.charges)||0,Number(t.deliveryamt)||0),e)),{riders:0,orders:0,delivered:0,amount:0}):{riders:0,orders:0,delivered:0,amount:0}),[Pe]),_e=async e=>{me(!0);try{const t=await i.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getreportsummary/?&fromdate=").concat(r,"&todate=").concat(P,"&userid=").concat(e));ce(t.data.details)}catch(t){console.log("tenantRes",t)}finally{me(!1)}},Me=async e=>{we(!0);try{var t;const o="undefined"!==typeof window&&localStorage.getItem("userid")||0,n=0===he?"appuserid=".concat(o):"applocationid=".concat(he),l="".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getdeliveries/")+"?".concat(n)+"&status=all"+"&fromdate=".concat(r)+"&todate=".concat(P)+"&pageno=1&pagesize=200&keyword=&tenantid=&locationid="+"&userid=".concat(e),s=await i.A.get(l),a=(null===s||void 0===s||null===(t=s.data)||void 0===t?void 0:t.details)||[],c=e=>{const t=Number(e);return Number.isFinite(t)?t:null},d=a.map((e=>{var t,r,o,n,i;const l=c(null!==(t=e.droplat)&&void 0!==t?t:e.deliverylat),s=c(null!==(r=e.droplon)&&void 0!==r?r:e.deliverylong),a=c(null!==(o=e.pickuplat)&&void 0!==o?o:e.pickuplatitude),d=c(null!==(n=null!==(i=e.pickuplon)&&void 0!==i?i:e.pickuplong)&&void 0!==n?n:e.picklongitude);return null==l||null==s?null:{step:Number(e.step)||0,orderid:e.orderid,deliveryid:e.deliveryid,customer:e.deliverycustomer||e.customername||"Order ".concat(e.orderid),address:e.deliveryaddress||e.deliverysuburb||"",dropLat:l,dropLng:s,pickLat:null!==a&&void 0!==a?a:null,pickLng:null!==d&&void 0!==d?d:null,expectedTime:e.expecteddeliverytime||null}})).filter(Boolean).sort(((e,t)=>e.step-t.step));je(d)}catch(o){(0,H.k)(null===o||void 0===o?void 0:o.message,"error",2e3),je([])}finally{we(!1)}},Te=(0,n.useMemo)((()=>Pe?Pe.reduce(((e,t)=>e+(Number(t.deliveryamt)||0)),0):0),[Pe]),Ee=[{key:"riders",label:"Active Riders",color:J,icon:D.bsz,value:Ie.riders},{key:"orders",label:"Total Orders",color:"#0ea5e9",icon:D.HU2,value:Ie.orders},{key:"delivered",label:"Delivered",color:"#10b981",icon:D.cAP,value:Ie.delivered},{key:"amount",label:"Total Amount",color:"#f59e0b",icon:D.S75,value:ie(Te)}];return(0,O.jsxs)(O.Fragment,{children:[(De||pe)&&(0,O.jsx)(_.A,{}),(0,O.jsx)(W.A,{title:"Riders Summary",subtitle:"Live \xb7 ".concat(F||"All Zones"," \xb7 ").concat(le),live:!0,action:(0,O.jsx)(T.A,{locaName:F,setAppId:ue,setLocoName:K,pill:!0,accentColor:J,icon:(0,O.jsx)(D.HPi,{size:14}),placeholder:"Select Zone",paperComponent:te,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,O.jsx)(p.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:Ee.map((e=>{var t;const r=e.icon;return(0,O.jsx)(p.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,O.jsx)(N.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,O.jsx)(r,{size:20}),color:e.color,loading:De})},e.key)}))}),(0,O.jsx)(s.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:V.radiusCard/8,borderTopRightRadius:V.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:V.borderSubtle,borderBottom:0,background:"#fff"},children:(0,O.jsxs)(m.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1.25,flexWrap:"wrap",children:[(0,O.jsx)(re,{color:J,size:32,children:(0,O.jsx)(D.bsz,{size:18})}),(0,O.jsxs)(m.A,{children:[(0,O.jsxs)(x.A,{variant:"caption",sx:{fontWeight:800,color:V.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:["Orders \xb7 ",le]}),(0,O.jsxs)(x.A,{variant:"body2",sx:{color:V.textPrimary,fontWeight:700},children:[Re.length," riders \xb7 ",Ie.orders," orders"]})]}),(0,O.jsx)(c.A,{title:"Date Filter",placement:"top",children:(0,O.jsxs)(d.A,{onClick:()=>X(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:$("#f59e0b"),border:"1.5px solid ".concat(Q("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,ml:1,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(Z("#f59e0b"))}},children:[(0,O.jsx)(D.Ki0,{size:14}),R()(r).format("DD/MM/YY")," \u2013 ",R()(P).format("DD/MM/YY")]})})]}),(0,O.jsx)(d.A,{sx:{width:{xs:"100%",sm:280,lg:340},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,O.jsx)(E.A,{value:ye,onChange:ke,onDebouncedChange:ze,placeholder:"Search riders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(Z(J))}}})})]})}),(0,O.jsxs)(s.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:V.radiusCard/8,borderBottomRightRadius:V.radiusCard/8,border:"1px solid",borderColor:V.borderSubtle,overflow:"hidden",background:"#fff"},children:[t?(0,O.jsxs)(U.nV,{scroll:!0,children:[De&&(0,O.jsx)(m.A,{alignItems:"center",sx:{py:4},children:(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textMuted,fontWeight:700},children:"Loading riders\u2026"})}),Re&&0!==Re.length||De?Re.map(((e,t)=>{const r=de===e.userid,o=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0),n="".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"\u2014";return(0,O.jsxs)(U.pg,{accent:J,selected:r,header:(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,O.jsx)(re,{color:J,size:36,children:(0,O.jsx)(D.LTk,{size:18})}),(0,O.jsxs)(m.A,{sx:{minWidth:0},children:[(0,O.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:V.textPrimary},noWrap:!0,children:n}),(0,O.jsxs)(x.A,{variant:"caption",sx:{color:V.textSecondary},children:["#",String(t+1).padStart(2,"0")," \xb7 ID #",e.userid]})]})]}),(0,O.jsxs)(m.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:[(0,O.jsx)(c.A,{title:"View planned route",placement:"top",children:(0,O.jsx)(A.A,{size:"small",onClick:()=>{ve({userid:null===e||void 0===e?void 0:e.userid,name:"".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"Rider ".concat(null===e||void 0===e?void 0:e.userid)}),je(null),fe(!0),Me(null===e||void 0===e?void 0:e.userid)},sx:{bgcolor:q("#0ea5e9"),color:"#0ea5e9",border:"1px solid ".concat(Q("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},children:(0,O.jsx)(D.Cd7,{size:14})})}),(0,O.jsx)(c.A,{title:r?"Collapse breakdown":"Expand breakdown",placement:"top",children:(0,O.jsx)(A.A,{size:"small",onClick:()=>{const t=!r;xe(t?e.userid:null),t&&_e(e.userid)},sx:{bgcolor:r?J:q(J),color:r?"#fff":J,border:"1px solid ".concat(Q(J)),"&:hover":{bgcolor:J,color:"#fff"}},children:r?(0,O.jsx)(D.Xbk,{size:16}):(0,O.jsx)(D.j1Q,{size:16})})})]})]}),children:[(0,O.jsxs)(U.FG,{columns:2,children:[(0,O.jsx)(U.pY,{label:"Orders",children:(0,O.jsx)(ne,{value:e.totalorders,color:J,icon:(0,O.jsx)(D.F6S,{size:11})})}),(0,O.jsx)(U.pY,{label:"Delivered",children:(0,O.jsx)(ne,{value:e.delivered,color:"#10b981",icon:(0,O.jsx)(D.mU9,{size:11})})}),(0,O.jsx)(U.pY,{label:"Pending",children:(0,O.jsx)(ne,{value:e.pending,color:"#f59e0b",icon:(0,O.jsx)(D.tX0,{size:11})})}),(0,O.jsx)(U.pY,{label:"Cancelled",children:(0,O.jsx)(ne,{value:e.cancelled,color:"#ef4444",icon:(0,O.jsx)(D.uDv,{size:11})})}),(0,O.jsx)(U.pY,{label:"KMS",children:(0,O.jsx)(oe,{color:"#ef4444",icon:(0,O.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,O.jsx)(U.pY,{label:"Actual KMS",children:(0,O.jsx)(oe,{color:"#10b981",icon:(0,O.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})}),(0,O.jsx)(U.pY,{label:"Amount",full:!0,children:(0,O.jsx)(oe,{color:J,icon:(0,O.jsx)(D.YHz,{size:11}),label:ie(o).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]}),r&&(0,O.jsx)(f.A,{in:r,timeout:"auto",unmountOnExit:!0,children:(0,O.jsxs)(s.A,{elevation:0,sx:{mt:1.25,borderRadius:V.radiusCard/8,border:"1px solid",borderColor:V.borderSubtle,overflow:"hidden",boxShadow:V.shadowSoft},children:[(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:1.5,py:1,background:"#ffffff",borderBottom:"1px solid ".concat(V.borderSubtle)},children:[(0,O.jsx)(re,{color:J,size:24,selected:!0,children:(0,O.jsx)(D.Itr,{size:12})}),(0,O.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:V.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:"Tenant Breakdown"})]}),(0,O.jsxs)(m.A,{divider:(0,O.jsx)(g.A,{}),children:[pe&&(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textMuted,textAlign:"center",py:2},children:"Loading\u2026"}),pe||ae&&0!==ae.length?null===ae||void 0===ae?void 0:ae.map(((e,t)=>(0,O.jsxs)(d.A,{sx:{p:1.5},children:[(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mb:1},children:[(0,O.jsx)(re,{color:"#0ea5e9",size:24,children:(0,O.jsx)(D.Itr,{size:12})}),(0,O.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:V.textPrimary},noWrap:!0,children:e.tenantname||"\u2014"})]}),(0,O.jsxs)(U.FG,{columns:2,children:[(0,O.jsx)(U.pY,{label:"All",children:(0,O.jsx)(ne,{value:e.totalorders,color:J,icon:(0,O.jsx)(D.F6S,{size:10})})}),(0,O.jsx)(U.pY,{label:"Completed",children:(0,O.jsx)(ne,{value:e.deliveriescompleted,color:"#10b981",icon:(0,O.jsx)(D.mU9,{size:10})})}),(0,O.jsx)(U.pY,{label:"Pending",children:(0,O.jsx)(ne,{value:e.deliveriespending,color:"#f59e0b",icon:(0,O.jsx)(D.tX0,{size:10})})}),(0,O.jsx)(U.pY,{label:"Cancelled",children:(0,O.jsx)(ne,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,O.jsx)(D.uDv,{size:10})})}),(0,O.jsx)(U.pY,{label:"KMS",children:(0,O.jsx)(oe,{color:"#ef4444",icon:(0,O.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,O.jsx)(U.pY,{label:"Actual KMS",children:(0,O.jsx)(oe,{color:"#10b981",icon:(0,O.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})}),(0,O.jsx)(U.pY,{label:"Amount",full:!0,children:(0,O.jsx)(oe,{color:J,icon:(0,O.jsx)(D.YHz,{size:10}),label:ie(Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0)).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]})]},"".concat(e.tenantname,"-").concat(t)))):(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textMuted,textAlign:"center",py:2},children:"No tenant breakdown available."})]})]})})]},e.userid||t)})):(0,O.jsxs)(m.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,O.jsx)(a.A,{sx:{width:64,height:64,bgcolor:q("#94a3b8"),color:V.textMuted},children:(0,O.jsx)(D.bsz,{size:28})}),(0,O.jsx)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:V.textPrimary},children:"No riders to show"}),(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textSecondary},children:ye?"Try a different keyword.":"Pick a zone or date range to load the summary."})]})]}):(0,O.jsx)(j.A,{sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:Q(J),borderRadius:8,"&:hover":{backgroundColor:J}},"&::-webkit-scrollbar-track":{backgroundColor:V.surfaceAlt}},children:(0,O.jsxs)(b.A,{stickyHeader:!0,sx:{minWidth:{xs:880,md:1080}},children:[(0,O.jsx)(v.A,{children:(0,O.jsxs)(S.A,{sx:{"& th":{backgroundColor:V.surfaceAlt,color:V.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(V.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,O.jsx)(w.A,{children:"#"}),(0,O.jsx)(w.A,{children:"Rider"}),(0,O.jsx)(w.A,{align:"center",children:"Orders"}),(0,O.jsx)(w.A,{align:"center",children:"Pending"}),(0,O.jsx)(w.A,{align:"center",children:"Cancelled"}),(0,O.jsx)(w.A,{align:"center",children:"Delivered"}),(0,O.jsx)(w.A,{align:"center",children:"KMS"}),(0,O.jsx)(w.A,{align:"center",children:"Amount"}),(0,O.jsx)(w.A,{align:"right",children:"Action"})]})}),(0,O.jsxs)(y.A,{children:[De&&(0,O.jsx)(L.r,{col:5}),Re&&0!==Re.length||De?Re.map(((e,t)=>{const r=de===e.userid,o=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,O.jsxs)(n.Fragment,{children:[(0,O.jsxs)(S.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:r?"none":"1px solid ".concat(V.divider),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:r?"#fff":V.surfaceAlt},bgcolor:r?$(J):"transparent"},children:[(0,O.jsx)(w.A,{children:(0,O.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:V.textMuted},children:String(t+1).padStart(2,"0")})}),(0,O.jsx)(w.A,{children:(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,O.jsx)(re,{color:J,size:36,children:(0,O.jsx)(D.LTk,{size:18})}),(0,O.jsxs)(m.A,{children:[(0,O.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:V.textPrimary,whiteSpace:"nowrap"},children:"".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"\u2014"}),(0,O.jsxs)(x.A,{variant:"caption",sx:{color:V.textSecondary},children:["ID #",e.userid]})]})]})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.totalorders,color:J,icon:(0,O.jsx)(D.F6S,{size:11})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.pending,color:"#f59e0b",icon:(0,O.jsx)(D.tX0,{size:11})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.cancelled,color:"#ef4444",icon:(0,O.jsx)(D.uDv,{size:11})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.delivered,color:"#10b981",icon:(0,O.jsx)(D.mU9,{size:11})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsxs)(m.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,O.jsx)(oe,{color:"#ef4444",icon:(0,O.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,O.jsx)(oe,{color:"#10b981",icon:(0,O.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(oe,{color:J,icon:(0,O.jsx)(D.YHz,{size:11}),label:ie(o).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})}),(0,O.jsx)(w.A,{align:"right",children:(0,O.jsxs)(m.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[(0,O.jsx)(c.A,{title:"View planned route",placement:"top",children:(0,O.jsx)(A.A,{size:"small",onClick:()=>{ve({userid:null===e||void 0===e?void 0:e.userid,name:"".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"Rider ".concat(null===e||void 0===e?void 0:e.userid)}),je(null),fe(!0),Me(null===e||void 0===e?void 0:e.userid)},sx:{bgcolor:q("#0ea5e9"),color:"#0ea5e9",border:"1px solid ".concat(Q("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},children:(0,O.jsx)(D.Cd7,{size:14})})}),(0,O.jsx)(c.A,{title:r?"Collapse breakdown":"Expand breakdown",placement:"top",children:(0,O.jsx)(A.A,{size:"small",onClick:()=>{const t=!r;xe(t?e.userid:null),t&&_e(e.userid)},sx:{bgcolor:r?J:q(J),color:r?"#fff":J,border:"1px solid ".concat(Q(J)),"&:hover":{bgcolor:J,color:"#fff"}},children:r?(0,O.jsx)(D.Xbk,{size:16}):(0,O.jsx)(D.j1Q,{size:16})})})]})})]}),r&&(0,O.jsx)(S.A,{children:(0,O.jsx)(w.A,{colSpan:9,sx:{p:0,borderBottom:"1px solid ".concat(V.divider),bgcolor:$(J)},children:(0,O.jsx)(f.A,{in:r,timeout:"auto",unmountOnExit:!0,children:(0,O.jsx)(d.A,{sx:{p:{xs:1,md:2}},children:(0,O.jsxs)(s.A,{elevation:0,sx:{borderRadius:V.radiusCard/8,border:"1px solid",borderColor:V.borderSubtle,overflow:"hidden",boxShadow:V.shadowSoft},children:[(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:2,py:1.25,background:"#ffffff",borderBottom:"1px solid ".concat(V.borderSubtle)},children:[(0,O.jsx)(re,{color:J,size:28,selected:!0,children:(0,O.jsx)(D.Itr,{size:14})}),(0,O.jsxs)(x.A,{variant:"caption",sx:{fontWeight:800,color:V.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:["Tenant Breakdown \xb7 ","".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()]})]}),(0,O.jsxs)(b.A,{size:"small",children:[(0,O.jsx)(v.A,{children:(0,O.jsxs)(S.A,{sx:{"& th":{backgroundColor:V.surfaceAlt,color:V.textSecondary,fontSize:10,fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(V.borderSubtle),py:1,px:1.5}},children:[(0,O.jsx)(w.A,{children:"#"}),(0,O.jsx)(w.A,{children:"Client"}),(0,O.jsx)(w.A,{align:"center",children:"All"}),(0,O.jsx)(w.A,{align:"center",children:"Pending"}),(0,O.jsx)(w.A,{align:"center",children:"Completed"}),(0,O.jsx)(w.A,{align:"center",children:"Cancelled"}),(0,O.jsx)(w.A,{align:"center",children:"KMS"}),(0,O.jsx)(w.A,{align:"center",children:"Amount"})]})}),(0,O.jsxs)(y.A,{children:[pe&&(0,O.jsx)(L.r,{col:4}),pe||ae&&0!==ae.length?null===ae||void 0===ae?void 0:ae.map(((e,t)=>(0,O.jsxs)(S.A,{sx:{"& td":{borderBottom:"1px solid ".concat(V.divider),py:1,px:1.5},"&:hover":{backgroundColor:V.surfaceAlt}},children:[(0,O.jsx)(w.A,{children:(0,O.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:V.textMuted},children:String(t+1).padStart(2,"0")})}),(0,O.jsx)(w.A,{children:(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,O.jsx)(re,{color:"#0ea5e9",size:24,children:(0,O.jsx)(D.Itr,{size:12})}),(0,O.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:V.textPrimary,whiteSpace:"nowrap"},children:e.tenantname||"\u2014"})]})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.totalorders,color:J,icon:(0,O.jsx)(D.F6S,{size:10})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.deliveriespending,color:"#f59e0b",icon:(0,O.jsx)(D.tX0,{size:10})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.deliveriescompleted,color:"#10b981",icon:(0,O.jsx)(D.mU9,{size:10})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(ne,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,O.jsx)(D.uDv,{size:10})})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsxs)(m.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,O.jsx)(oe,{color:"#ef4444",icon:(0,O.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,O.jsx)(oe,{color:"#10b981",icon:(0,O.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,O.jsx)(w.A,{align:"center",children:(0,O.jsx)(oe,{color:J,icon:(0,O.jsx)(D.YHz,{size:10}),label:ie(Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0)).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]},"".concat(e.tenantname,"-").concat(t)))):(0,O.jsx)(S.A,{children:(0,O.jsx)(w.A,{colSpan:8,sx:{py:3},children:(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textMuted,textAlign:"center",display:"block"},children:"No tenant breakdown available."})})})]})]})]})})})})})]},e.userid||t)})):(0,O.jsx)(S.A,{children:(0,O.jsx)(w.A,{colSpan:9,sx:{py:6},children:(0,O.jsxs)(m.A,{alignItems:"center",spacing:1.5,children:[(0,O.jsx)(a.A,{sx:{width:64,height:64,bgcolor:q("#94a3b8"),color:V.textMuted},children:(0,O.jsx)(D.bsz,{size:28})}),(0,O.jsx)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:V.textPrimary},children:"No riders to show"}),(0,O.jsx)(x.A,{variant:"caption",sx:{color:V.textSecondary},children:ye?"Try a different keyword.":"Pick a zone or date range to load the summary."})]})})})]})]})}),Re.length>0&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(g.A,{}),(0,O.jsxs)(m.A,{direction:"row",alignItems:"center",justifyContent:"flex-end",spacing:1.5,sx:{px:2,py:1.5,background:"#ffffff"},children:[(0,O.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:V.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:"Grand Total"}),(0,O.jsx)(k.A,{label:ie(Te),sx:{fontWeight:800,fontSize:13,color:"#fff",background:"linear-gradient(135deg, ".concat(J," 0%, ").concat(ee," 100%)"),boxShadow:"0 6px 16px ".concat(Z(J))}})]})]})]}),(0,O.jsx)(C.A,{maxWidth:"xl",fullScreen:!0,open:Ae,onClose:()=>{fe(!1),je(null),ve(null)},children:(0,O.jsx)(z.A,{sx:{p:0,height:"100vh"},children:(0,O.jsx)(B,{details:ge,loading:Se,riderName:null===be||void 0===be?void 0:be.name,dateRange:"".concat(R()(r).format("DD/MM/YY")," \u2013 ").concat(R()(P).format("DD/MM/YY")),onClose:()=>{fe(!1),je(null),ve(null)}})})}),(0,O.jsx)(M.A,{open:G,onClose:()=>X(!1),onSelect:e=>{o(e.startDate),Y(e.endDate),se(e.label)}})]})}},23787:(e,t,r)=>{r.d(t,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var o=r(89379),n=r(80045),i=r(93230),l=r(2235),s=r(16491),a=r(82053),c=r(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:r=!1,onScroll:l,sx:s}=e,a=(0,n.A)(e,d);return(0,c.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:l,sx:(0,o.A)((0,o.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},a),{},{children:t}))},h=e=>{let{accent:t="#662582",header:r,footer:n,selected:i=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:a,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[r,d,n]})]})},u=e=>{let{children:t,columns:r=2,sx:n}=e;return(0,c.jsx)(s.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},p=e=>{let{label:t,value:r,children:o,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(s.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},27001:(e,t,r)=>{r.d(t,{A:()=>s});var o=r(93230),n=r(16491),i=r(82053),l=r(44414);function s(e){let{title:t,subtitle:r,live:s=!1,action:a}=e;return(0,l.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(n.A,{sx:{minWidth:0},children:[(0,l.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),r&&(0,l.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[s&&(0,l.jsx)(n.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:r})]})]}),a&&(0,l.jsx)(n.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},35678:(e,t,r)=>{r.d(t,{A:()=>v});var o=r(9950),n=r(96583),i=r(40033),l=r(82053),s=r(28170),a=r(93230),c=r(82223),d=r(55916),x=r(4159),h=r.n(x),u=r(56712),p=r(81417),m=r(96600),A=r(53132),f=r(94289),g=r(57326),j=r(50624),b=r(44414);const v=e=>{let{open:t,onClose:r,onSelect:x}=e;const[v,S]=(0,o.useState)(null);return(0,b.jsxs)(n.A,{open:t,onClose:r,children:[(0,b.jsx)(i.A,{align:"left",children:(0,b.jsx)(l.A,{variant:"h4",children:"Select Filter Options"})}),(0,b.jsx)(s.A,{sx:{width:"100%"},className:"datedialog",children:(0,b.jsx)(d.U,{open:t,toggle:r,id:"daterange1",onChange:e=>{S({startDate:h()(e.startDate).format("YYYY-MM-DD"),endDate:h()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,u.A)(new Date,-1),endDate:(0,u.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,u.A)(new Date,1),endDate:(0,u.A)(new Date,1)},{label:"This Week",startDate:(0,p.A)(new Date),endDate:(0,m.A)(new Date)},{label:"Last Week",startDate:(0,p.A)((0,A.A)(new Date,-1)),endDate:(0,m.A)((0,A.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,A.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,f.A)(new Date),endDate:(0,g.A)(new Date)},{label:"Last Month",startDate:(0,f.A)((0,j.A)(new Date,-1)),endDate:(0,g.A)((0,j.A)(new Date,-1))}]})}),(0,b.jsx)(a.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,b.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{v?(x(v),r()):r()},children:"OK"})})]})}},36803:(e,t,r)=>{r.d(t,{A:()=>x});var o=r(48089),n=r(50704),i=r(93230),l=r(16491),s=r(82053),a=r(82917),c=r(41413),d=r(44414);function x(e){let{title:t,value:r,icon:x,color:h="#662582",caption:u,loading:p=!1}=e;return(0,d.jsx)(o.A,{sx:{height:"100%"},children:(0,d.jsx)(n.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(s.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),p?(0,d.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(s.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),u&&(0,d.jsx)(s.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},46639:(e,t,r)=>{r.d(t,{A:()=>_});var o=r(57528),n=r(98587),i=r(58168),l=r(9950),s=r(72004),a=r(3484),c=r(88283),d=r(89548),x=r(18463),h=r(59254),u=r(45558),p=r(1614);function m(e){return(0,p.Ay)("MuiCircularProgress",e)}(0,u.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var A,f,g,j,b=r(44414);const v=["className","color","disableShrink","size","style","thickness","value","variant"];let S,w,y,k;const C=44,z=(0,c.i7)(S||(S=A||(A=(0,o.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),D=(0,c.i7)(w||(w=f||(f=(0,o.A)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),P=(0,h.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t["color".concat((0,d.A)(r.color))]]}})((e=>{let{ownerState:t,theme:r}=e;return(0,i.A)({display:"inline-block"},"determinate"===t.variant&&{transition:r.transitions.create("transform")},"inherit"!==t.color&&{color:(r.vars||r).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,c.AH)(y||(y=g||(g=(0,o.A)(["\n animation: "," 1.4s linear infinite;\n "]))),z)})),R=(0,h.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),I=(0,h.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t["circle".concat((0,d.A)(r.variant))],r.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:r}=e;return(0,i.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,c.AH)(k||(k=j||(j=(0,o.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),D)})),_=l.forwardRef((function(e,t){const r=(0,x.b)({props:e,name:"MuiCircularProgress"}),{className:o,color:l="primary",disableShrink:c=!1,size:h=40,style:u,thickness:p=3.6,value:A=0,variant:f="indeterminate"}=r,g=(0,n.A)(r,v),j=(0,i.A)({},r,{color:l,disableShrink:c,size:h,thickness:p,value:A,variant:f}),S=(e=>{const{classes:t,variant:r,color:o,disableShrink:n}=e,i={root:["root",r,"color".concat((0,d.A)(o))],svg:["svg"],circle:["circle","circle".concat((0,d.A)(r)),n&&"circleDisableShrink"]};return(0,a.A)(i,m,t)})(j),w={},y={},k={};if("determinate"===f){const e=2*Math.PI*((C-p)/2);w.strokeDasharray=e.toFixed(3),k["aria-valuenow"]=Math.round(A),w.strokeDashoffset="".concat(((100-A)/100*e).toFixed(3),"px"),y.transform="rotate(-90deg)"}return(0,b.jsx)(P,(0,i.A)({className:(0,s.A)(S.root,o),style:(0,i.A)({width:h,height:h},y,u),ownerState:j,ref:t,role:"progressbar"},k,g,{children:(0,b.jsx)(R,{className:S.svg,ownerState:j,viewBox:"".concat(22," ").concat(22," ").concat(C," ").concat(C),children:(0,b.jsx)(I,{className:S.circle,style:w,ownerState:j,cx:C,cy:C,r:(C-p)/2,fill:"none",strokeWidth:p})})}))}))},56311:(e,t,r)=>{r.d(t,{A:()=>u});var o=r(89379),n=r(9950),i=r(2660),l=r(2046),s=r(83274),a=r(25333),c=r(97125),d=r(7762),x=r(52097),h=r(44414);const u=e=>{let{value:t,onChange:r,onDebouncedChange:u,debounceTime:p=500,placeholder:m="Search (ctrl+k)",sx:A}=e;const f=(0,n.useRef)(null),[g]=(0,x.d7)(t,p);return(0,n.useEffect)((()=>{u&&u(g)}),[g,u]),(0,n.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=f.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===f.current&&f.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(i.A,{sx:(0,o.A)({},A),inputRef:f,placeholder:m,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,h.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(s.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>r(""),children:(0,h.jsx)(d.A,{})})})})}},59212:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(89379),n=r(9950),i=r(93230),l=r(41413),s=r(77922),a=r(29925),c=r(26910),d=r(31222),x=r(44414);const h=(0,n.forwardRef)(((e,t)=>{let{setAppId:r,setLocoName:h,setPage:u,sx:p,textfeildSx:m,textfieldSx:A,pill:f=!1,accentColor:g="#6366f1",icon:j,placeholder:b="Select Zone",paperComponent:v}=e;const[S,w]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===S.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),w(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[S.length]);const y=e=>"".concat(g).concat(e),k=y("26"),C=y("18"),z=f?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(k)},"&.Mui-focused fieldset":{borderColor:g,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},D=f&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(l.A,{sx:{width:24,height:24,bgcolor:C,color:g,transition:"background-color 0.15s, color 0.15s"},children:j||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(s.A,{id:"location-autocomplete",options:S||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:v,sx:(0,o.A)({},p),onChange:(e,t,o)=>{"clear"===o?(null===r||void 0===r||r(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):t&&(null===r||void 0===r||r(t.applocationid),null===h||void 0===h||h(t.locationname),null===u||void 0===u||u(0))},renderInput:e=>f?(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:b,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:D}),sx:(0,o.A)((0,o.A)({},z),A||m||{})})):(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},A||m||{})}))})}))},96646:(e,t,r)=>{r.d(t,{r:()=>a});var o=r(9213),n=r(21671),i=r(82917),l=r(93230),s=r(44414);const a=e=>{let{rowsPerPage:t=5,col:r=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,s.jsxs)(o.A,{children:[(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:r}).map(((e,t)=>(0,s.jsx)(n.A,{children:(0,s.jsxs)(l.A,{spacing:.5,children:[(0,s.jsx)(i.A,{variant:"text",width:100}),(0,s.jsx)(i.A,{variant:"text",width:80})]})},t))),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"text",width:150})}),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(n.A,{align:"center",children:(0,s.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file diff --git a/build/static/js/181.d5552073.chunk.js b/build/static/js/181.d5552073.chunk.js deleted file mode 100644 index 697b033..0000000 --- a/build/static/js/181.d5552073.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[181],{10181:(e,r,t)=>{t.r(r),t.d(r,{default:()=>ne});var o=t(89379),n=t(9950),i=t(26910),s=t(36150),l=t(2235),a=t(41413),c=t(83274),d=t(16491),x=t(82053),h=t(14857),u=t(47223),p=t(93230),m=t(60899),A=t(25333),g=t(33738),j=t(74745),f=t(1320),b=t(15769),v=t(69780),S=t(9213),w=t(21671),y=t(34075),k=t(25277),C=t(96583),z=t(28170),D=t(31222),P=t(4159),R=t.n(P),I=t(81425),_=t(52351),M=t(35678),T=t(59212),E=t(56311),W=t(96646),N=t(10523),L=t(46639),Y=t(44414);const F={width:"100%",height:"100%"};function O(e){let{details:r,loading:t,riderName:o,dateRange:i,onClose:s}=e;const l=(0,n.useRef)(null),[a,c]=(0,n.useState)(null),[h,u]=(0,n.useState)([]),[m,g]=(0,n.useState)(!1),{isLoaded:j}=(0,N.KD)({googleMapsApiKey:{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_URL:"https://mock-data-api-nextjs.vercel.app/",REACT_APP_AUTH0_CLIENT_ID:"",REACT_APP_AUTH0_DOMAIN:"",REACT_APP_AWS_APP_CLIENT_ID:"",REACT_APP_AWS_POOL_ID:"",REACT_APP_FIREBASE_API_KEY:"",REACT_APP_FIREBASE_APP_ID:"",REACT_APP_FIREBASE_AUTH_DOMAIN:"",REACT_APP_FIREBASE_MEASUREMENT_ID:"",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"",REACT_APP_FIREBASE_PROJECT_ID:"",REACT_APP_FIREBASE_STORAGE_BUCKET:"",REACT_APP_GOOGLE_MAPS_API_KEY:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",REACT_APP_RIDER_ACCESS_ID:"AAAAILMpCEU:APA91bEavuOllBI6sFgYtxXAgNmAVwNA-MnCMHLGlR4_t7UqpLajAkdn3T0CZr_zaLBknLyim9ytFLMZgbeXmKqTad_PKCbqlYjHpaizVrLXtecxqyEy4UktIacK2UvHVUATHL-7VQQk",REACT_APP_STAFF_TOKEN:"",REACT_APP_URL:"https://jupiter.nearle.app/live/api/v1",REACT_APP_URL2:"https://jupiter.nearle.app/live/api/v2",REACT_APP_URL3:"https://jupiter.nearle.app/live/api/v3",REACT_APP_VERSION:"v2.1.0"}.REACT_APP_GOOGLE_MAPS_KEY}),f=(0,n.useMemo)((()=>(r||[]).map((e=>({lat:e.dropLat,lng:e.dropLng})))),[r]);(0,n.useEffect)((()=>{if(!j||!l.current||0===f.length)return;const e=new window.google.maps.LatLngBounds;f.forEach((r=>e.extend(r))),l.current.fitBounds(e,48)}),[j,f]),(0,n.useEffect)((()=>{if(!j||f.length<2)return void u([]);let e=!1;const r=new window.google.maps.DirectionsService,t=(e,t,o)=>new Promise(((n,i)=>{r.route({origin:e,destination:t,waypoints:o.map((e=>({location:e,stopover:!0}))),travelMode:window.google.maps.TravelMode.DRIVING},((e,r)=>{"OK"===r?n(e):i(new Error(r))}))}));return(async()=>{g(!0);try{const r=f,o=[];let n=0;for(;n({lat:e.lat(),lng:e.lng()})));o.length>0&&c.length>0&&c.shift(),o.push(...c),n+=i}e||u(o)}catch(r){e||u([])}finally{e||g(!1)}})(),()=>{e=!0}}),[j,f]);const b=(e,r)=>{const t=r?38:32,o=r?"#4338ca":"#6366f1",n=encodeURIComponent('')+'')+''.concat(e,"")+"");return"data:image/svg+xml;charset=UTF-8,".concat(n)},v=(0,Y.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:1.5,sx:{px:2,py:1.25,borderBottom:"1px solid rgba(15, 23, 42, 0.08)",background:"linear-gradient(135deg, #6366f1 0%, #3b82f6 100%)",color:"#fff",flexShrink:0},children:[(0,Y.jsx)(D.pk7,{size:20}),(0,Y.jsxs)(p.A,{sx:{flex:1,minWidth:0},children:[(0,Y.jsxs)(x.A,{sx:{fontWeight:700,fontSize:15,lineHeight:1.2},children:["Planned route",o?" \u2014 ".concat(o):""]}),i&&(0,Y.jsx)(x.A,{sx:{fontSize:12,opacity:.85},children:i})]}),r&&r.length>0&&(0,Y.jsxs)(x.A,{sx:{fontSize:12,opacity:.9,fontWeight:600},children:[r.length," ",1===r.length?"stop":"stops",m?" \xb7 resolving route\u2026":""]}),s&&(0,Y.jsx)(A.A,{size:"small",onClick:s,sx:{color:"#fff"},"aria-label":"Close",children:(0,Y.jsx)(D.m6K,{})})]});return t||!j?(0,Y.jsxs)(d.A,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[v,(0,Y.jsxs)(p.A,{alignItems:"center",justifyContent:"center",sx:{flex:1,gap:1.5},children:[(0,Y.jsx)(L.A,{size:32}),(0,Y.jsx)(x.A,{sx:{color:"#64748b",fontSize:13},children:t?"Loading planned route\u2026":"Loading map\u2026"})]})]}):r&&0!==r.length?(0,Y.jsxs)(d.A,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[v,(0,Y.jsx)(d.A,{sx:{flex:1,minHeight:0},children:(0,Y.jsxs)(N.u6,{mapContainerStyle:F,onLoad:e=>l.current=e,center:f[0],zoom:14,options:{streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1},children:[h.length>0?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(N.Ro,{path:h,options:{strokeColor:"#6366f1",strokeOpacity:.25,strokeWeight:8}}),(0,Y.jsx)(N.Ro,{path:h,options:{strokeColor:"#6366f1",strokeOpacity:.95,strokeWeight:4}})]}):(0,Y.jsx)(N.Ro,{path:f,options:{strokeColor:"#6366f1",strokeOpacity:0,strokeWeight:0,icons:[{icon:{path:"M 0,-1 0,1",strokeOpacity:.6,strokeColor:"#6366f1",scale:3},offset:"0",repeat:"14px"}]}}),r.map(((e,r)=>{const t=e.step||r+1,o=a===e.deliveryid;return(0,Y.jsx)(N.pH,{position:{lat:e.dropLat,lng:e.dropLng},icon:{url:b(t,o)},onClick:()=>c(o?null:e.deliveryid),zIndex:o?1e3:t,children:o&&(0,Y.jsx)(N.Fu,{onCloseClick:()=>c(null),children:(0,Y.jsxs)(d.A,{sx:{minWidth:180,fontFamily:"inherit"},children:[(0,Y.jsxs)(x.A,{sx:{fontWeight:800,fontSize:13,color:"#0f172a"},children:["Step ",t," \xb7 ",e.customer]}),e.address&&(0,Y.jsx)(x.A,{sx:{fontSize:12,color:"#475569",mt:.5},children:e.address}),e.expectedTime&&(0,Y.jsxs)(x.A,{sx:{fontSize:12,color:"#64748b",mt:.5},children:["ETA ",String(e.expectedTime).slice(11,16)||e.expectedTime]}),e.orderid&&(0,Y.jsxs)(x.A,{sx:{fontSize:11,color:"#94a3b8",mt:.5},children:["Order #",e.orderid]})]})})},"step-".concat(e.deliveryid||e.orderid||r))}))]})})]}):(0,Y.jsxs)(d.A,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[v,(0,Y.jsxs)(p.A,{alignItems:"center",justifyContent:"center",sx:{flex:1,gap:1,p:3},children:[(0,Y.jsx)(x.A,{sx:{color:"#1e293b",fontWeight:700,fontSize:16},children:"No planned route for this rider"}),(0,Y.jsx)(x.A,{sx:{color:"#64748b",fontSize:13,textAlign:"center",maxWidth:360},children:"There are no deliveries with drop coordinates assigned to this rider for the selected date range."})]})]})}var K=t(20466),B=t(23787),H=t(36220);R().extend(H);const U={radiusPill:999,radiusCard:16,shadowSoft:"0 14px 40px rgba(15, 23, 42, 0.10)",shadowMd:"0 8px 24px rgba(15, 23, 42, 0.08)",shadowPop:"0 18px 50px rgba(15, 23, 42, 0.18)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},G=(e,r)=>"".concat(e).concat(r),V=e=>G(e,"08"),X=e=>G(e,"18"),$=e=>G(e,"26"),q=e=>G(e,"55"),Z="#662582",Q="#9255AB",J=e=>(0,Y.jsx)(l.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:U.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),ee=e=>{let{color:r,selected:t,size:o=24,children:n}=e;return(0,Y.jsx)(a.A,{sx:{width:o,height:o,bgcolor:t?r:X(r),color:t?"#fff":r,transition:"background-color 0.15s, color 0.15s"},children:n})},re=e=>{let{color:r,icon:t,label:o,tooltip:n,minWidth:i=80}=e;return(0,Y.jsx)(c.A,{title:n||"",placement:"top",children:(0,Y.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:V(r),border:"1px solid ".concat(q(r)),color:r,fontSize:11,fontWeight:800,minWidth:i,justifyContent:"center",whiteSpace:"nowrap"},children:[t,o]})})},te=e=>{let{value:r,color:t="#ef4444",icon:o}=e;const n=Number(r)||0;return 0===n?(0,Y.jsx)(x.A,{variant:"caption",sx:{color:U.textMuted,fontWeight:700},children:"0"}):(0,Y.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.875,py:.25,borderRadius:999,bgcolor:V(t),border:"1px solid ".concat(q(t)),color:t,fontSize:12,fontWeight:800,minWidth:36,justifyContent:"center"},children:[o,n]})};function oe(e){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(Number(e)||0)}function ne(){const e=(0,h.A)(),r=(0,u.A)(e.breakpoints.down("md")),[t,o]=(0,n.useState)(R()().format("YYYY-MM-DD")),[P,N]=(0,n.useState)(R()().format("YYYY-MM-DD")),[L,F]=(0,n.useState)("All"),[H,G]=(0,n.useState)(!1),[ne,ie]=(0,n.useState)("Today"),[se,le]=(0,n.useState)([]),[ae,ce]=(0,n.useState)(null),[de,xe]=(0,n.useState)(0),[he,ue]=(0,n.useState)(!1),[pe,me]=(0,n.useState)(!1),[Ae,ge]=(0,n.useState)(null),[je,fe]=(0,n.useState)(null),[be,ve]=(0,n.useState)(!1),[Se,we]=(0,n.useState)(""),[ye,ke]=(0,n.useState)(""),{isLoading:Ce,data:ze}=(0,s.I)({queryKey:["ridersummary",de,t,P],queryFn:I.KN}),De=(0,n.useMemo)((()=>{if(!ze)return[];if(!ye)return ze;const e=ye.toLowerCase().trim();return ze.filter((r=>["".concat(r.firstname||""," ").concat(r.lastname||""),String(r.userid)].filter(Boolean).some((r=>String(r).toLowerCase().includes(e)))))}),[ze,ye]),Pe=(0,n.useMemo)((()=>ze&&0!==ze.length?ze.reduce(((e,r)=>(e.riders+=1,e.orders+=Number(r.totalorders)||0,e.delivered+=Number(r.delivered)||0,e.amount+=Math.max(Number(r.charges)||0,Number(r.deliveryamt)||0),e)),{riders:0,orders:0,delivered:0,amount:0}):{riders:0,orders:0,delivered:0,amount:0}),[ze]),Re=async e=>{ue(!0);try{const r=await i.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getreportsummary/?&fromdate=").concat(t,"&todate=").concat(P,"&userid=").concat(e));le(r.data.details)}catch(r){console.log("tenantRes",r)}finally{ue(!1)}},Ie=async e=>{ve(!0);try{var r;const o="undefined"!==typeof window&&localStorage.getItem("userid")||0,n=0===de?"appuserid=".concat(o):"applocationid=".concat(de),s="".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getdeliveries/")+"?".concat(n)+"&status=all"+"&fromdate=".concat(t)+"&todate=".concat(P)+"&pageno=1&pagesize=200&keyword=&tenantid=&locationid="+"&userid=".concat(e),l=await i.A.get(s),a=(null===l||void 0===l||null===(r=l.data)||void 0===r?void 0:r.details)||[],c=e=>{const r=Number(e);return Number.isFinite(r)?r:null},d=a.map((e=>{var r,t,o,n,i;const s=c(null!==(r=e.droplat)&&void 0!==r?r:e.deliverylat),l=c(null!==(t=e.droplon)&&void 0!==t?t:e.deliverylong),a=c(null!==(o=e.pickuplat)&&void 0!==o?o:e.pickuplatitude),d=c(null!==(n=null!==(i=e.pickuplon)&&void 0!==i?i:e.pickuplong)&&void 0!==n?n:e.picklongitude);return null==s||null==l?null:{step:Number(e.step)||0,orderid:e.orderid,deliveryid:e.deliveryid,customer:e.deliverycustomer||e.customername||"Order ".concat(e.orderid),address:e.deliveryaddress||e.deliverysuburb||"",dropLat:s,dropLng:l,pickLat:null!==a&&void 0!==a?a:null,pickLng:null!==d&&void 0!==d?d:null,expectedTime:e.expecteddeliverytime||null}})).filter(Boolean).sort(((e,r)=>e.step-r.step));ge(d)}catch(o){(0,K.k)(null===o||void 0===o?void 0:o.message,"error",2e3),ge([])}finally{ve(!1)}},_e=(0,n.useMemo)((()=>ze?ze.reduce(((e,r)=>e+(Number(r.deliveryamt)||0)),0):0),[ze]),Me=[{key:"riders",label:"Active Riders",color:Z,icon:D.bsz,value:Pe.riders},{key:"orders",label:"Total Orders",color:"#0ea5e9",icon:D.F6S,value:Pe.orders},{key:"delivered",label:"Delivered",color:"#10b981",icon:D.mU9,value:Pe.delivered},{key:"amount",label:"Total Amount",color:"#f59e0b",icon:D.YHz,value:oe(_e)}];return(0,Y.jsxs)(Y.Fragment,{children:[(Ce||he)&&(0,Y.jsx)(_.A,{}),(0,Y.jsx)(l.A,{elevation:0,sx:{mb:{xs:1.5,md:2},p:{xs:1.5,sm:2,md:2.5},borderRadius:U.radiusCard/8,border:"1px solid",borderColor:U.borderSubtle,background:"linear-gradient(135deg, ".concat(V(Z)," 0%, ").concat(V(Q)," 100%)"),boxShadow:U.shadowMd},children:(0,Y.jsxs)(p.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",spacing:{xs:1.5,sm:2},children:[(0,Y.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:{xs:1.25,sm:1.75},children:[(0,Y.jsx)(a.A,{sx:{width:{xs:40,sm:48},height:{xs:40,sm:48},bgcolor:Z,color:"#fff",boxShadow:"0 6px 18px ".concat($(Z))},children:(0,Y.jsx)(D.bsz,{size:22})}),(0,Y.jsxs)(p.A,{children:[(0,Y.jsx)(x.A,{variant:"h3",sx:{fontWeight:800,color:U.textPrimary,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"}},children:"Riders Summary"}),(0,Y.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[(0,Y.jsx)(d.A,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:"#10b981",boxShadow:"0 0 0 4px rgba(16,185,129,0.18)"}}),(0,Y.jsxs)(x.A,{variant:"caption",sx:{color:U.textSecondary,fontWeight:600},children:["Live \xb7 ",L||"All Zones"," \xb7 ",ne]})]})]})]}),(0,Y.jsx)(T.A,{locaName:L,setAppId:xe,setLocoName:F,pill:!0,accentColor:Z,icon:(0,Y.jsx)(D.HPi,{size:14}),placeholder:"Select Zone",paperComponent:J,sx:{width:{xs:"100%",sm:280},zIndex:100}})]})}),(0,Y.jsx)(m.Ay,{container:!0,spacing:{xs:1.25,sm:1.5,md:2},sx:{mt:"1px"},children:Me.map((e=>{const r=e.icon;return(0,Y.jsx)(m.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,Y.jsxs)(l.A,{elevation:0,sx:{position:"relative",overflow:"hidden",p:{xs:1.25,sm:1.75,md:2.25},borderRadius:U.radiusCard/8,border:"1px solid",borderColor:U.borderSubtle,background:"#fff",transition:"transform 0.2s, box-shadow 0.2s, border-color 0.2s","&:hover":{transform:"translateY(-3px)",boxShadow:U.shadowMd,borderColor:q(e.color)}},children:[(0,Y.jsx)(d.A,{sx:{position:"absolute",top:0,left:0,right:0,height:3,background:"linear-gradient(90deg, ".concat(e.color," 0%, ").concat(X(e.color)," 100%)")}}),(0,Y.jsxs)(p.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,Y.jsxs)(p.A,{spacing:.5,sx:{minWidth:0,flex:1},children:[(0,Y.jsx)(x.A,{variant:"caption",sx:{color:U.textSecondary,fontWeight:700,letterSpacing:.4,textTransform:"uppercase",fontSize:{xs:10,sm:11},whiteSpace:"nowrap"},children:e.label}),(0,Y.jsx)(x.A,{sx:{fontWeight:800,color:U.textPrimary,lineHeight:1.1,fontSize:{xs:"1.1rem",sm:"1.4rem",md:"1.6rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.value})]}),(0,Y.jsx)(a.A,{sx:{width:{xs:36,sm:42,md:48},height:{xs:36,sm:42,md:48},bgcolor:X(e.color),color:e.color,boxShadow:"inset 0 0 0 1px ".concat(q(e.color)),flexShrink:0},children:(0,Y.jsx)(r,{size:20})})]})]})},e.key)}))}),(0,Y.jsx)(l.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:U.radiusCard/8,borderTopRightRadius:U.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:U.borderSubtle,borderBottom:0,background:"#fff"},children:(0,Y.jsxs)(p.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,Y.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:1.25,flexWrap:"wrap",children:[(0,Y.jsx)(ee,{color:Z,size:32,children:(0,Y.jsx)(D.bsz,{size:18})}),(0,Y.jsxs)(p.A,{children:[(0,Y.jsxs)(x.A,{variant:"caption",sx:{fontWeight:800,color:U.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:["Orders \xb7 ",ne]}),(0,Y.jsxs)(x.A,{variant:"body2",sx:{color:U.textPrimary,fontWeight:700},children:[De.length," riders \xb7 ",Pe.orders," orders"]})]}),(0,Y.jsx)(c.A,{title:"Date Filter",placement:"top",children:(0,Y.jsxs)(d.A,{onClick:()=>G(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:V("#f59e0b"),border:"1.5px solid ".concat(q("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,ml:1,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat($("#f59e0b"))}},children:[(0,Y.jsx)(D.Ki0,{size:14}),R()(t).format("DD/MM/YY")," \u2013 ",R()(P).format("DD/MM/YY")]})})]}),(0,Y.jsx)(d.A,{sx:{width:{xs:"100%",sm:280,lg:340},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,Y.jsx)(E.A,{value:Se,onChange:we,onDebouncedChange:ke,placeholder:"Search riders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:V(Z),"& fieldset":{borderColor:q(Z),borderWidth:1.5},"&:hover fieldset":{borderColor:Z},"&.Mui-focused fieldset":{borderColor:Z,borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat($(Z))}}})})]})}),(0,Y.jsxs)(l.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:U.radiusCard/8,borderBottomRightRadius:U.radiusCard/8,border:"1px solid",borderColor:U.borderSubtle,overflow:"hidden",background:"#fff"},children:[r?(0,Y.jsxs)(B.nV,{scroll:!0,children:[Ce&&(0,Y.jsx)(p.A,{alignItems:"center",sx:{py:4},children:(0,Y.jsx)(x.A,{variant:"caption",sx:{color:U.textMuted,fontWeight:700},children:"Loading riders\u2026"})}),De&&0!==De.length||Ce?De.map(((e,r)=>{const t=ae===e.userid,o=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0),n="".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"\u2014";return(0,Y.jsxs)(B.pg,{accent:Z,selected:t,header:(0,Y.jsxs)(p.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,Y.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,Y.jsx)(ee,{color:Z,size:36,children:(0,Y.jsx)(D.LTk,{size:18})}),(0,Y.jsxs)(p.A,{sx:{minWidth:0},children:[(0,Y.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:U.textPrimary},noWrap:!0,children:n}),(0,Y.jsxs)(x.A,{variant:"caption",sx:{color:U.textSecondary},children:["#",String(r+1).padStart(2,"0")," \xb7 ID #",e.userid]})]})]}),(0,Y.jsxs)(p.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:[(0,Y.jsx)(c.A,{title:"View planned route",placement:"top",children:(0,Y.jsx)(A.A,{size:"small",onClick:()=>{fe({userid:null===e||void 0===e?void 0:e.userid,name:"".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"Rider ".concat(null===e||void 0===e?void 0:e.userid)}),ge(null),me(!0),Ie(null===e||void 0===e?void 0:e.userid)},sx:{bgcolor:X("#0ea5e9"),color:"#0ea5e9",border:"1px solid ".concat(q("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},children:(0,Y.jsx)(D.Cd7,{size:14})})}),(0,Y.jsx)(c.A,{title:t?"Collapse breakdown":"Expand breakdown",placement:"top",children:(0,Y.jsx)(A.A,{size:"small",onClick:()=>{const r=!t;ce(r?e.userid:null),r&&Re(e.userid)},sx:{bgcolor:t?Z:X(Z),color:t?"#fff":Z,border:"1px solid ".concat(q(Z)),"&:hover":{bgcolor:Z,color:"#fff"}},children:t?(0,Y.jsx)(D.Xbk,{size:16}):(0,Y.jsx)(D.j1Q,{size:16})})})]})]}),children:[(0,Y.jsxs)(B.FG,{columns:2,children:[(0,Y.jsx)(B.pY,{label:"Orders",children:(0,Y.jsx)(te,{value:e.totalorders,color:Z,icon:(0,Y.jsx)(D.F6S,{size:11})})}),(0,Y.jsx)(B.pY,{label:"Delivered",children:(0,Y.jsx)(te,{value:e.delivered,color:"#10b981",icon:(0,Y.jsx)(D.mU9,{size:11})})}),(0,Y.jsx)(B.pY,{label:"Pending",children:(0,Y.jsx)(te,{value:e.pending,color:"#f59e0b",icon:(0,Y.jsx)(D.tX0,{size:11})})}),(0,Y.jsx)(B.pY,{label:"Cancelled",children:(0,Y.jsx)(te,{value:e.cancelled,color:"#ef4444",icon:(0,Y.jsx)(D.uDv,{size:11})})}),(0,Y.jsx)(B.pY,{label:"KMS",children:(0,Y.jsx)(re,{color:"#ef4444",icon:(0,Y.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,Y.jsx)(B.pY,{label:"Actual KMS",children:(0,Y.jsx)(re,{color:"#10b981",icon:(0,Y.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})}),(0,Y.jsx)(B.pY,{label:"Amount",full:!0,children:(0,Y.jsx)(re,{color:Z,icon:(0,Y.jsx)(D.YHz,{size:11}),label:oe(o).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]}),t&&(0,Y.jsx)(g.A,{in:t,timeout:"auto",unmountOnExit:!0,children:(0,Y.jsxs)(l.A,{elevation:0,sx:{mt:1.25,borderRadius:U.radiusCard/8,border:"1px solid",borderColor:U.borderSubtle,overflow:"hidden",boxShadow:U.shadowSoft},children:[(0,Y.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:1.5,py:1,background:"linear-gradient(135deg, ".concat(V(Z)," 0%, ").concat(V(Q)," 100%)"),borderBottom:"1px solid ".concat(U.borderSubtle)},children:[(0,Y.jsx)(ee,{color:Z,size:24,selected:!0,children:(0,Y.jsx)(D.Itr,{size:12})}),(0,Y.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:U.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:"Tenant Breakdown"})]}),(0,Y.jsxs)(p.A,{divider:(0,Y.jsx)(j.A,{}),children:[he&&(0,Y.jsx)(x.A,{variant:"caption",sx:{color:U.textMuted,textAlign:"center",py:2},children:"Loading\u2026"}),he||se&&0!==se.length?null===se||void 0===se?void 0:se.map(((e,r)=>(0,Y.jsxs)(d.A,{sx:{p:1.5},children:[(0,Y.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mb:1},children:[(0,Y.jsx)(ee,{color:"#0ea5e9",size:24,children:(0,Y.jsx)(D.Itr,{size:12})}),(0,Y.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:U.textPrimary},noWrap:!0,children:e.tenantname||"\u2014"})]}),(0,Y.jsxs)(B.FG,{columns:2,children:[(0,Y.jsx)(B.pY,{label:"All",children:(0,Y.jsx)(te,{value:e.totalorders,color:Z,icon:(0,Y.jsx)(D.F6S,{size:10})})}),(0,Y.jsx)(B.pY,{label:"Completed",children:(0,Y.jsx)(te,{value:e.deliveriescompleted,color:"#10b981",icon:(0,Y.jsx)(D.mU9,{size:10})})}),(0,Y.jsx)(B.pY,{label:"Pending",children:(0,Y.jsx)(te,{value:e.deliveriespending,color:"#f59e0b",icon:(0,Y.jsx)(D.tX0,{size:10})})}),(0,Y.jsx)(B.pY,{label:"Cancelled",children:(0,Y.jsx)(te,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,Y.jsx)(D.uDv,{size:10})})}),(0,Y.jsx)(B.pY,{label:"KMS",children:(0,Y.jsx)(re,{color:"#ef4444",icon:(0,Y.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,Y.jsx)(B.pY,{label:"Actual KMS",children:(0,Y.jsx)(re,{color:"#10b981",icon:(0,Y.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})}),(0,Y.jsx)(B.pY,{label:"Amount",full:!0,children:(0,Y.jsx)(re,{color:Z,icon:(0,Y.jsx)(D.YHz,{size:10}),label:oe(Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0)).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]})]},"".concat(e.tenantname,"-").concat(r)))):(0,Y.jsx)(x.A,{variant:"caption",sx:{color:U.textMuted,textAlign:"center",py:2},children:"No tenant breakdown available."})]})]})})]},e.userid||r)})):(0,Y.jsxs)(p.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,Y.jsx)(a.A,{sx:{width:64,height:64,bgcolor:X("#94a3b8"),color:U.textMuted},children:(0,Y.jsx)(D.bsz,{size:28})}),(0,Y.jsx)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:U.textPrimary},children:"No riders to show"}),(0,Y.jsx)(x.A,{variant:"caption",sx:{color:U.textSecondary},children:Se?"Try a different keyword.":"Pick a zone or date range to load the summary."})]})]}):(0,Y.jsx)(f.A,{sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:q(Z),borderRadius:8,"&:hover":{backgroundColor:Z}},"&::-webkit-scrollbar-track":{backgroundColor:U.surfaceAlt}},children:(0,Y.jsxs)(b.A,{stickyHeader:!0,sx:{minWidth:{xs:880,md:1080}},children:[(0,Y.jsx)(v.A,{children:(0,Y.jsxs)(S.A,{sx:{"& th":{backgroundColor:U.surfaceAlt,color:U.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(U.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,Y.jsx)(w.A,{children:"#"}),(0,Y.jsx)(w.A,{children:"Rider"}),(0,Y.jsx)(w.A,{align:"center",children:"Orders"}),(0,Y.jsx)(w.A,{align:"center",children:"Pending"}),(0,Y.jsx)(w.A,{align:"center",children:"Cancelled"}),(0,Y.jsx)(w.A,{align:"center",children:"Delivered"}),(0,Y.jsx)(w.A,{align:"center",children:"KMS"}),(0,Y.jsx)(w.A,{align:"center",children:"Amount"}),(0,Y.jsx)(w.A,{align:"right",children:"Action"})]})}),(0,Y.jsxs)(y.A,{children:[Ce&&(0,Y.jsx)(W.r,{col:5}),De&&0!==De.length||Ce?De.map(((e,r)=>{const t=ae===e.userid,o=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,Y.jsxs)(n.Fragment,{children:[(0,Y.jsxs)(S.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:t?"none":"1px solid ".concat(U.divider),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:t?"#fff":U.surfaceAlt},bgcolor:t?V(Z):"transparent"},children:[(0,Y.jsx)(w.A,{children:(0,Y.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:U.textMuted},children:String(r+1).padStart(2,"0")})}),(0,Y.jsx)(w.A,{children:(0,Y.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,Y.jsx)(ee,{color:Z,size:36,children:(0,Y.jsx)(D.LTk,{size:18})}),(0,Y.jsxs)(p.A,{children:[(0,Y.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:U.textPrimary,whiteSpace:"nowrap"},children:"".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"\u2014"}),(0,Y.jsxs)(x.A,{variant:"caption",sx:{color:U.textSecondary},children:["ID #",e.userid]})]})]})}),(0,Y.jsx)(w.A,{align:"center",children:(0,Y.jsx)(te,{value:e.totalorders,color:Z,icon:(0,Y.jsx)(D.F6S,{size:11})})}),(0,Y.jsx)(w.A,{align:"center",children:(0,Y.jsx)(te,{value:e.pending,color:"#f59e0b",icon:(0,Y.jsx)(D.tX0,{size:11})})}),(0,Y.jsx)(w.A,{align:"center",children:(0,Y.jsx)(te,{value:e.cancelled,color:"#ef4444",icon:(0,Y.jsx)(D.uDv,{size:11})})}),(0,Y.jsx)(w.A,{align:"center",children:(0,Y.jsx)(te,{value:e.delivered,color:"#10b981",icon:(0,Y.jsx)(D.mU9,{size:11})})}),(0,Y.jsx)(w.A,{align:"center",children:(0,Y.jsxs)(p.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,Y.jsx)(re,{color:"#ef4444",icon:(0,Y.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,Y.jsx)(re,{color:"#10b981",icon:(0,Y.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,Y.jsx)(w.A,{align:"center",children:(0,Y.jsx)(re,{color:Z,icon:(0,Y.jsx)(D.YHz,{size:11}),label:oe(o).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})}),(0,Y.jsx)(w.A,{align:"right",children:(0,Y.jsxs)(p.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[(0,Y.jsx)(c.A,{title:"View planned route",placement:"top",children:(0,Y.jsx)(A.A,{size:"small",onClick:()=>{fe({userid:null===e||void 0===e?void 0:e.userid,name:"".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()||"Rider ".concat(null===e||void 0===e?void 0:e.userid)}),ge(null),me(!0),Ie(null===e||void 0===e?void 0:e.userid)},sx:{bgcolor:X("#0ea5e9"),color:"#0ea5e9",border:"1px solid ".concat(q("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},children:(0,Y.jsx)(D.Cd7,{size:14})})}),(0,Y.jsx)(c.A,{title:t?"Collapse breakdown":"Expand breakdown",placement:"top",children:(0,Y.jsx)(A.A,{size:"small",onClick:()=>{const r=!t;ce(r?e.userid:null),r&&Re(e.userid)},sx:{bgcolor:t?Z:X(Z),color:t?"#fff":Z,border:"1px solid ".concat(q(Z)),"&:hover":{bgcolor:Z,color:"#fff"}},children:t?(0,Y.jsx)(D.Xbk,{size:16}):(0,Y.jsx)(D.j1Q,{size:16})})})]})})]}),t&&(0,Y.jsx)(S.A,{children:(0,Y.jsx)(w.A,{colSpan:9,sx:{p:0,borderBottom:"1px solid ".concat(U.divider),bgcolor:V(Z)},children:(0,Y.jsx)(g.A,{in:t,timeout:"auto",unmountOnExit:!0,children:(0,Y.jsx)(d.A,{sx:{p:{xs:1,md:2}},children:(0,Y.jsxs)(l.A,{elevation:0,sx:{borderRadius:U.radiusCard/8,border:"1px solid",borderColor:U.borderSubtle,overflow:"hidden",boxShadow:U.shadowSoft},children:[(0,Y.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:2,py:1.25,background:"linear-gradient(135deg, ".concat(V(Z)," 0%, ").concat(V(Q)," 100%)"),borderBottom:"1px solid ".concat(U.borderSubtle)},children:[(0,Y.jsx)(ee,{color:Z,size:28,selected:!0,children:(0,Y.jsx)(D.Itr,{size:14})}),(0,Y.jsxs)(x.A,{variant:"caption",sx:{fontWeight:800,color:U.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:["Tenant Breakdown \xb7 ","".concat((null===e||void 0===e?void 0:e.firstname)||""," ").concat((null===e||void 0===e?void 0:e.lastname)||"").trim()]})]}),(0,Y.jsxs)(b.A,{size:"small",children:[(0,Y.jsx)(v.A,{children:(0,Y.jsxs)(S.A,{sx:{"& th":{backgroundColor:U.surfaceAlt,color:U.textSecondary,fontSize:10,fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(U.borderSubtle),py:1,px:1.5}},children:[(0,Y.jsx)(w.A,{children:"#"}),(0,Y.jsx)(w.A,{children:"Client"}),(0,Y.jsx)(w.A,{align:"center",children:"All"}),(0,Y.jsx)(w.A,{align:"center",children:"Pending"}),(0,Y.jsx)(w.A,{align:"center",children:"Completed"}),(0,Y.jsx)(w.A,{align:"center",children:"Cancelled"}),(0,Y.jsx)(w.A,{align:"center",children:"KMS"}),(0,Y.jsx)(w.A,{align:"center",children:"Amount"})]})}),(0,Y.jsxs)(y.A,{children:[he&&(0,Y.jsx)(W.r,{col:4}),he||se&&0!==se.length?null===se||void 0===se?void 0:se.map(((e,r)=>(0,Y.jsxs)(S.A,{sx:{"& td":{borderBottom:"1px solid ".concat(U.divider),py:1,px:1.5},"&:hover":{backgroundColor:U.surfaceAlt}},children:[(0,Y.jsx)(w.A,{children:(0,Y.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:U.textMuted},children:String(r+1).padStart(2,"0")})}),(0,Y.jsx)(w.A,{children:(0,Y.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,Y.jsx)(ee,{color:"#0ea5e9",size:24,children:(0,Y.jsx)(D.Itr,{size:12})}),(0,Y.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:U.textPrimary,whiteSpace:"nowrap"},children:e.tenantname||"\u2014"})]})}),(0,Y.jsx)(w.A,{align:"center",children:(0,Y.jsx)(te,{value:e.totalorders,color:Z,icon:(0,Y.jsx)(D.F6S,{size:10})})}),(0,Y.jsx)(w.A,{align:"center",children:(0,Y.jsx)(te,{value:e.deliveriespending,color:"#f59e0b",icon:(0,Y.jsx)(D.tX0,{size:10})})}),(0,Y.jsx)(w.A,{align:"center",children:(0,Y.jsx)(te,{value:e.deliveriescompleted,color:"#10b981",icon:(0,Y.jsx)(D.mU9,{size:10})})}),(0,Y.jsx)(w.A,{align:"center",children:(0,Y.jsx)(te,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,Y.jsx)(D.uDv,{size:10})})}),(0,Y.jsx)(w.A,{align:"center",children:(0,Y.jsxs)(p.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,Y.jsx)(re,{color:"#ef4444",icon:(0,Y.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,Y.jsx)(re,{color:"#10b981",icon:(0,Y.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,Y.jsx)(w.A,{align:"center",children:(0,Y.jsx)(re,{color:Z,icon:(0,Y.jsx)(D.YHz,{size:10}),label:oe(Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0)).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]},"".concat(e.tenantname,"-").concat(r)))):(0,Y.jsx)(S.A,{children:(0,Y.jsx)(w.A,{colSpan:8,sx:{py:3},children:(0,Y.jsx)(x.A,{variant:"caption",sx:{color:U.textMuted,textAlign:"center",display:"block"},children:"No tenant breakdown available."})})})]})]})]})})})})})]},e.userid||r)})):(0,Y.jsx)(S.A,{children:(0,Y.jsx)(w.A,{colSpan:9,sx:{py:6},children:(0,Y.jsxs)(p.A,{alignItems:"center",spacing:1.5,children:[(0,Y.jsx)(a.A,{sx:{width:64,height:64,bgcolor:X("#94a3b8"),color:U.textMuted},children:(0,Y.jsx)(D.bsz,{size:28})}),(0,Y.jsx)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:U.textPrimary},children:"No riders to show"}),(0,Y.jsx)(x.A,{variant:"caption",sx:{color:U.textSecondary},children:Se?"Try a different keyword.":"Pick a zone or date range to load the summary."})]})})})]})]})}),De.length>0&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(j.A,{}),(0,Y.jsxs)(p.A,{direction:"row",alignItems:"center",justifyContent:"flex-end",spacing:1.5,sx:{px:2,py:1.5,background:"linear-gradient(135deg, ".concat(V(Z)," 0%, ").concat(V(Q)," 100%)")},children:[(0,Y.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:U.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:"Grand Total"}),(0,Y.jsx)(k.A,{label:oe(_e),sx:{fontWeight:800,fontSize:13,color:"#fff",background:"linear-gradient(135deg, ".concat(Z," 0%, ").concat(Q," 100%)"),boxShadow:"0 6px 16px ".concat($(Z))}})]})]})]}),(0,Y.jsx)(C.A,{maxWidth:"xl",fullScreen:!0,open:pe,onClose:()=>{me(!1),ge(null),fe(null)},children:(0,Y.jsx)(z.A,{sx:{p:0,height:"100vh"},children:(0,Y.jsx)(O,{details:Ae,loading:be,riderName:null===je||void 0===je?void 0:je.name,dateRange:"".concat(R()(t).format("DD/MM/YY")," \u2013 ").concat(R()(P).format("DD/MM/YY")),onClose:()=>{me(!1),ge(null),fe(null)}})})}),(0,Y.jsx)(M.A,{open:H,onClose:()=>G(!1),onSelect:e=>{o(e.startDate),N(e.endDate),ie(e.label)}})]})}},23787:(e,r,t)=>{t.d(r,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var o=t(89379),n=t(80045),i=t(93230),s=t(2235),l=t(16491),a=t(82053),c=t(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:r,scroll:t=!1,onScroll:s,sx:l}=e,a=(0,n.A)(e,d);return(0,c.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:s,sx:(0,o.A)((0,o.A)({p:1.5},t&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:r}))},h=e=>{let{accent:r="#662582",header:t,footer:n,selected:i=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(s.A,{elevation:0,onClick:a,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?r:"#e2e8f0",background:i?"".concat(r,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:r}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[t,d,n]})]})},u=e=>{let{children:r,columns:t=2,sx:n}=e;return(0,c.jsx)(l.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(t,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:r})},p=e=>{let{label:r,value:t,children:o,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:r}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==t&&void 0!==t?t:"\u2014"})})]})}},35678:(e,r,t)=>{t.d(r,{A:()=>v});var o=t(9950),n=t(96583),i=t(40033),s=t(82053),l=t(28170),a=t(93230),c=t(82223),d=t(55916),x=t(4159),h=t.n(x),u=t(56712),p=t(81417),m=t(96600),A=t(53132),g=t(94289),j=t(57326),f=t(50624),b=t(44414);const v=e=>{let{open:r,onClose:t,onSelect:x}=e;const[v,S]=(0,o.useState)(null);return(0,b.jsxs)(n.A,{open:r,onClose:t,children:[(0,b.jsx)(i.A,{align:"left",children:(0,b.jsx)(s.A,{variant:"h4",children:"Select Filter Options"})}),(0,b.jsx)(l.A,{sx:{width:"100%"},className:"datedialog",children:(0,b.jsx)(d.U,{open:r,toggle:t,id:"daterange1",onChange:e=>{S({startDate:h()(e.startDate).format("YYYY-MM-DD"),endDate:h()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,u.A)(new Date,-1),endDate:(0,u.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,u.A)(new Date,1),endDate:(0,u.A)(new Date,1)},{label:"This Week",startDate:(0,p.A)(new Date),endDate:(0,m.A)(new Date)},{label:"Last Week",startDate:(0,p.A)((0,A.A)(new Date,-1)),endDate:(0,m.A)((0,A.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,A.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,g.A)(new Date),endDate:(0,j.A)(new Date)},{label:"Last Month",startDate:(0,g.A)((0,f.A)(new Date,-1)),endDate:(0,j.A)((0,f.A)(new Date,-1))}]})}),(0,b.jsx)(a.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,b.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{v?(x(v),t()):t()},children:"OK"})})]})}},46639:(e,r,t)=>{t.d(r,{A:()=>_});var o=t(57528),n=t(98587),i=t(58168),s=t(9950),l=t(72004),a=t(3484),c=t(88283),d=t(89548),x=t(18463),h=t(59254),u=t(45558),p=t(1614);function m(e){return(0,p.Ay)("MuiCircularProgress",e)}(0,u.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var A,g,j,f,b=t(44414);const v=["className","color","disableShrink","size","style","thickness","value","variant"];let S,w,y,k;const C=44,z=(0,c.i7)(S||(S=A||(A=(0,o.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),D=(0,c.i7)(w||(w=g||(g=(0,o.A)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),P=(0,h.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,r[t.variant],r["color".concat((0,d.A)(t.color))]]}})((e=>{let{ownerState:r,theme:t}=e;return(0,i.A)({display:"inline-block"},"determinate"===r.variant&&{transition:t.transitions.create("transform")},"inherit"!==r.color&&{color:(t.vars||t).palette[r.color].main})}),(e=>{let{ownerState:r}=e;return"indeterminate"===r.variant&&(0,c.AH)(y||(y=j||(j=(0,o.A)(["\n animation: "," 1.4s linear infinite;\n "]))),z)})),R=(0,h.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,r)=>r.svg})({display:"block"}),I=(0,h.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.circle,r["circle".concat((0,d.A)(t.variant))],t.disableShrink&&r.circleDisableShrink]}})((e=>{let{ownerState:r,theme:t}=e;return(0,i.A)({stroke:"currentColor"},"determinate"===r.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===r.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:r}=e;return"indeterminate"===r.variant&&!r.disableShrink&&(0,c.AH)(k||(k=f||(f=(0,o.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),D)})),_=s.forwardRef((function(e,r){const t=(0,x.b)({props:e,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:c=!1,size:h=40,style:u,thickness:p=3.6,value:A=0,variant:g="indeterminate"}=t,j=(0,n.A)(t,v),f=(0,i.A)({},t,{color:s,disableShrink:c,size:h,thickness:p,value:A,variant:g}),S=(e=>{const{classes:r,variant:t,color:o,disableShrink:n}=e,i={root:["root",t,"color".concat((0,d.A)(o))],svg:["svg"],circle:["circle","circle".concat((0,d.A)(t)),n&&"circleDisableShrink"]};return(0,a.A)(i,m,r)})(f),w={},y={},k={};if("determinate"===g){const e=2*Math.PI*((C-p)/2);w.strokeDasharray=e.toFixed(3),k["aria-valuenow"]=Math.round(A),w.strokeDashoffset="".concat(((100-A)/100*e).toFixed(3),"px"),y.transform="rotate(-90deg)"}return(0,b.jsx)(P,(0,i.A)({className:(0,l.A)(S.root,o),style:(0,i.A)({width:h,height:h},y,u),ownerState:f,ref:r,role:"progressbar"},k,j,{children:(0,b.jsx)(R,{className:S.svg,ownerState:f,viewBox:"".concat(22," ").concat(22," ").concat(C," ").concat(C),children:(0,b.jsx)(I,{className:S.circle,style:w,ownerState:f,cx:C,cy:C,r:(C-p)/2,fill:"none",strokeWidth:p})})}))}))},56311:(e,r,t)=>{t.d(r,{A:()=>u});var o=t(89379),n=t(9950),i=t(2660),s=t(2046),l=t(83274),a=t(25333),c=t(97125),d=t(7762),x=t(52097),h=t(44414);const u=e=>{let{value:r,onChange:t,onDebouncedChange:u,debounceTime:p=500,placeholder:m="Search (ctrl+k)",sx:A}=e;const g=(0,n.useRef)(null),[j]=(0,x.d7)(r,p);return(0,n.useEffect)((()=>{u&&u(j)}),[j,u]),(0,n.useEffect)((()=>{const e=e=>{var r;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(r=g.current)||void 0===r||r.focus());"Escape"===e.key&&document.activeElement===g.current&&g.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(i.A,{sx:(0,o.A)({},A),inputRef:g,placeholder:m,autoComplete:"off",value:r,fullWidth:!0,onChange:e=>t(e.target.value),startAdornment:(0,h.jsx)(s.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(l.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:r?"visible":"hidden"},onClick:()=>t(""),children:(0,h.jsx)(d.A,{})})})})}},59212:(e,r,t)=>{t.d(r,{A:()=>h});var o=t(89379),n=t(9950),i=t(93230),s=t(41413),l=t(77922),a=t(29925),c=t(26910),d=t(31222),x=t(44414);const h=(0,n.forwardRef)(((e,r)=>{let{setAppId:t,setLocoName:h,setPage:u,sx:p,textfeildSx:m,textfieldSx:A,pill:g=!1,accentColor:j="#6366f1",icon:f,placeholder:b="Select Zone",paperComponent:v}=e;const[S,w]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===S.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const r=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(r.data.status){const e=[...r.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),w(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[S.length]);const y=e=>"".concat(j).concat(e),k=y("08"),C=y("26"),z=y("55"),D=y("18"),P=g?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"999px",bgcolor:k,fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s, background-color 0.2s","& fieldset":{borderColor:z,borderWidth:1.5},"&:hover fieldset":{borderColor:j},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(C)},"&.Mui-focused fieldset":{borderColor:j,borderWidth:2}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:j}}:{},R=g&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(s.A,{sx:{width:24,height:24,bgcolor:D,color:j,transition:"background-color 0.15s, color 0.15s"},children:f||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:S||[],getOptionLabel:e=>{var r;return null!==(r=null===e||void 0===e?void 0:e.locationname)&&void 0!==r?r:""},PaperComponent:v,sx:(0,o.A)({},p),onChange:(e,r,o)=>{"clear"===o?(null===t||void 0===t||t(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):r&&(null===t||void 0===t||t(r.applocationid),null===h||void 0===h||h(r.locationname),null===u||void 0===u||u(0))},renderInput:e=>g?(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:r,placeholder:b,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:R}),sx:(0,o.A)((0,o.A)({},P),A||m||{})})):(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:r,label:"Select Zones",sx:(0,o.A)({},A||m||{})}))})}))},96646:(e,r,t)=>{t.d(r,{r:()=>a});var o=t(9213),n=t(21671),i=t(82917),s=t(93230),l=t(44414);const a=e=>{let{rowsPerPage:r=5,col:t=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(r)).map(((e,r)=>(0,l.jsxs)(o.A,{children:[(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:t}).map(((e,r)=>(0,l.jsx)(n.A,{children:(0,l.jsxs)(s.A,{spacing:.5,children:[(0,l.jsx)(i.A,{variant:"text",width:100}),(0,l.jsx)(i.A,{variant:"text",width:80})]})},r))),(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"text",width:150})}),(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(n.A,{align:"center",children:(0,l.jsxs)(s.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},r)))})}}}]); \ No newline at end of file diff --git a/build/static/js/2533.ca2d198d.chunk.js b/build/static/js/2533.ca2d198d.chunk.js new file mode 100644 index 0000000..058ff03 --- /dev/null +++ b/build/static/js/2533.ca2d198d.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2533],{23787:(e,o,i)=>{i.d(o,{FG:()=>u,nV:()=>x,pY:()=>f,pg:()=>h});var r=i(89379),t=i(80045),n=i(93230),l=i(2235),s=i(16491),c=i(82053),a=i(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:o,scroll:i=!1,onScroll:l,sx:s}=e,c=(0,t.A)(e,d);return(0,a.jsx)(n.A,(0,r.A)((0,r.A)({spacing:1.25,onScroll:l,sx:(0,r.A)((0,r.A)({p:1.5},i&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},c),{},{children:o}))},h=e=>{let{accent:o="#662582",header:i,footer:t,selected:n=!1,onClick:c,children:d,sx:x}=e;return(0,a.jsxs)(l.A,{elevation:0,onClick:c,sx:(0,r.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:n?o:"#e2e8f0",background:n?"".concat(o,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,a.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:o}}),(0,a.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[i,d,t]})]})},u=e=>{let{children:o,columns:i=2,sx:t}=e;return(0,a.jsx)(s.A,{sx:(0,r.A)({display:"grid",gridTemplateColumns:"repeat(".concat(i,", minmax(0, 1fr))"),gap:1,mt:1.25},t),children:o})},f=e=>{let{label:o,value:i,children:r,full:t=!1,align:n="left"}=e;return(0,a.jsxs)(s.A,{sx:{gridColumn:t?"1 / -1":"auto",minWidth:0,textAlign:n},children:[(0,a.jsx)(c.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:o}),(0,a.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==r?r:(0,a.jsx)(c.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==i&&void 0!==i?i:"\u2014"})})]})}},27001:(e,o,i)=>{i.d(o,{A:()=>s});var r=i(93230),t=i(16491),n=i(82053),l=i(44414);function s(e){let{title:o,subtitle:i,live:s=!1,action:c}=e;return(0,l.jsxs)(r.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(t.A,{sx:{minWidth:0},children:[(0,l.jsx)(n.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:o}),i&&(0,l.jsxs)(r.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[s&&(0,l.jsx)(t.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(n.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:i})]})]}),c&&(0,l.jsx)(t.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:c})]})}},36803:(e,o,i)=>{i.d(o,{A:()=>x});var r=i(48089),t=i(50704),n=i(93230),l=i(16491),s=i(82053),c=i(82917),a=i(41413),d=i(44414);function x(e){let{title:o,value:i,icon:x,color:h="#662582",caption:u,loading:f=!1}=e;return(0,d.jsx)(r.A,{sx:{height:"100%"},children:(0,d.jsx)(t.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(n.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(s.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:o}),f?(0,d.jsx)(c.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(s.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:i}),u&&(0,d.jsx)(s.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),x&&(0,d.jsx)(a.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},56311:(e,o,i)=>{i.d(o,{A:()=>u});var r=i(89379),t=i(9950),n=i(2660),l=i(2046),s=i(83274),c=i(25333),a=i(97125),d=i(7762),x=i(52097),h=i(44414);const u=e=>{let{value:o,onChange:i,onDebouncedChange:u,debounceTime:f=500,placeholder:p="Search (ctrl+k)",sx:g}=e;const A=(0,t.useRef)(null),[v]=(0,x.d7)(o,f);return(0,t.useEffect)((()=>{u&&u(v)}),[v,u]),(0,t.useEffect)((()=>{const e=e=>{var o;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(o=A.current)||void 0===o||o.focus());"Escape"===e.key&&document.activeElement===A.current&&A.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(n.A,{sx:(0,r.A)({},g),inputRef:A,placeholder:p,autoComplete:"off",value:o,fullWidth:!0,onChange:e=>i(e.target.value),startAdornment:(0,h.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(a.A,{})}),endAdornment:(0,h.jsx)(s.A,{title:"Clear",children:(0,h.jsx)(c.A,{sx:{visibility:o?"visible":"hidden"},onClick:()=>i(""),children:(0,h.jsx)(d.A,{})})})})}},58691:(e,o,i)=>{i.d(o,{A:()=>s});i(9950);var r=i(16491),t=i(46639),n=i(62217),l=i(44414);function s(e){let{size:o=70,imgSize:i=40,alt:s="loader"}=e;return(0,l.jsxs)(r.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,l.jsx)(t.A,{size:o}),(0,l.jsx)(r.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:i,height:i},children:(0,l.jsx)("img",{src:n,alt:s,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,o,i)=>{i.d(o,{A:()=>h});var r=i(89379),t=i(9950),n=i(93230),l=i(41413),s=i(77922),c=i(29925),a=i(26910),d=i(31222),x=i(44414);const h=(0,t.forwardRef)(((e,o)=>{let{setAppId:i,setLocoName:h,setPage:u,sx:f,textfeildSx:p,textfieldSx:g,pill:A=!1,accentColor:v="#6366f1",icon:j,placeholder:b="Select Zone",paperComponent:m}=e;const[y,S]=(0,t.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,t.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const o=await a.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(o.data.status){const e=[...o.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const w=e=>"".concat(v).concat(e),k=w("26"),W=w("18"),C=A?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(k)},"&.Mui-focused fieldset":{borderColor:v,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},z=A&&(0,x.jsx)(n.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(l.A,{sx:{width:24,height:24,bgcolor:W,color:v,transition:"background-color 0.15s, color 0.15s"},children:j||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(s.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var o;return null!==(o=null===e||void 0===e?void 0:e.locationname)&&void 0!==o?o:""},PaperComponent:m,sx:(0,r.A)({},f),onChange:(e,o,r)=>{"clear"===r?(null===i||void 0===i||i(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):o&&(null===i||void 0===i||i(o.applocationid),null===h||void 0===h||h(o.locationname),null===u||void 0===u||u(0))},renderInput:e=>A?(0,x.jsx)(c.A,(0,r.A)((0,r.A)({},e),{},{inputRef:o,placeholder:b,InputProps:(0,r.A)((0,r.A)({},e.InputProps),{},{startAdornment:z}),sx:(0,r.A)((0,r.A)({},C),g||p||{})})):(0,x.jsx)(c.A,(0,r.A)((0,r.A)({},e),{},{inputRef:o,label:"Select Zones",sx:(0,r.A)({},g||p||{})}))})}))},62217:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAPnUlEQVR4AdVae3AU9R3/7d4jdyGQQKAhECBAJBSmEAtFSQUjqPgAHGlhRm0lDkWY6Tg+O9qiErR26h8WR8ZWqTMN1ur4qMpDrTyjtDwDJloeCYiBvAgkaZ53l7vb3X4/v9vfZS/Zu9uFwLSfmb3d293f7u/z+z5/399K7CphdW5JrupgBZosZ0ialmu8pklSjUOTamRJbvvjqTUV7CpAYlcIj+SWZHQ55WJZlm7UNK2IXpRhpZ3GWJskSWXUZrPD4Sp77eSva9gVwIATXz35+SJNYWs1phWxAYDEpDKVaZv+fOrZUjaAGDDiK695rpgetpYOc82upw72sMycdJbz/SzmHeKl/ynRay31bbS1s7rjTczXGYj3ihrShnUDNQCXTXzlNS8UyExdbybhSdeNYwXz81nBzflE2pKms7oT51ntiSa276NKVn3wrNktNcGQelNpTUkNuwxcFvFV+S88rKnKy8ZzkOz84uvYvOJZ/PhyAE3Y/+HXbN+HFVwjjJAlR8lr1WueY9wt2MclEYfj8rnkj+nwRnHOLuGWhnbmpfuMKh/3Xn0Atm74IuY8OcGPFYk99kbVM98xm7BFnDyttHLyb3MlRdsjSWycOA+VLv79YpY5Ork6V5efY59s/JJVHznH/+dMymLz7v0Rm71oWtK2GIDSJ7ew6kMxJlCjytI8u+Qddm4+93bPBIfqiiG96KG5RPouljokuZT3b/2avf7EB6ylsZ1dM2MsG5OfxU7RAFSWVbMAObUphRMTtsc7CpdMh6c3kqe8gN117Yh5W4627GljFmGZ+C/ynx/flzSkDPW2Aqj2+lV/Y5mj0tljG3/GFhQXspkLpnBJVx85yyq/OGWJPAANgzkd2/utOMXJzxp965vlF3YFrPRHZtYgSZq6vi/p2TT6VrF+1Vt8/yiRhnoLiIHAftc7h0kDzlp6HgYcfTAgVwmEPmIWzTeZxPEQaeWkkhJJk1eJk8vWLGBz75nBrAIqfmDrN2zhqjlsetGkftddKU6WQ2qPe6AZVuwdGPP9kWw4+ZWKnVXiVO6M4UXtR1rKDiZrm4g4J70871cTnMzzd3ESNn3bgz9mdgC7hmoufeKWuB4/c1QGV3nYfP7Msfy/FYB8rM1LC6YNm72lonXv+UTtEqr60qVLJTcbvEv8h20tfOhGZgeQtpBiZnZ6wnuhEUDFnlPMDhaSMCbNilohc0kp61mEW1y1j0u8hLR78Ff5xX3t2i5AHLjegvqOIdtHXK/8oorZRfGLiw3aJM1dkVeynA5kCsGm98cjLhNxh4O5nxEnoOJW4rQRkDRUF3adTNoAEprRRB7tfJ09zA7Qt3mGCCMz+dmioiLKcSRTjvGISw/kPbNcSDtzdLotDy6A+AyYObR4KCjK53ur3t2I+ct7s0b0Pfds4U04RuLV914z4rjJ4ZSc94sTSBrsShvYv62S76frZKwAYQ2orWpidoEExyh1tzPl6SlTpjhJ6v3u7Utcgm0vHf/wePKUc8TJS5E21LWu6gKbRBmalXwcgHp70yISg8QR3oTWWAWk3gtpbp6/cCiLRK8Y9k7jHzgCGh3n8om/ibpueHKr0vZT5lVZFvHItVWRaALVQ4pqxcYfL3opeoxcvlr3D4BVc4HU4eFFeMt0ZsHJvUzcFKPkY4gvW7YMGiC7ZfcicW723dalXUsS3lSyNeZcBUmsmaS/5p0Vlp4BVccADsvOYP6uAM/yKsqq7PkJmv8L4k7mmEu7DcRNIfIqkedu3qjq0pkzZ/DfITE5quZjp2Qxu0Dnha1iX1fdxD55fW/CNjANYN49s7jKI5O788E5kfY0oHZQcEuvT5GY8wbaye+//36MqsfY+JEjR6QlY1cX0CHvNdQmZ/JIZhUtjW3RzkNqsG90Hti2cS8fgGSoqz7Pp6loi/uH6wNnJ7zBNA0ZYvrdY1aMZ6hdGHQ9RuL473KmDBUnUB+zAyE1dP6me2fxpMUYljat3Zb0GfvJodWRRz9Aic/utw+Ts/NG1L/L0qQrCoRggVTXUGRPMULmNo44h0CflZXlcGiuXLPGdoDOo7Pw0EYpC5W/c9Wcfm3EoAGiSAF4h0QiQmtDmyUHKZAzZSSrPam/W5MgzJgUlo+CrgFSU1OT5GTOseKi7UytsT2GiJlqW1X5aB+IrJfCYXNDO7MDYwh1yA4kYvKMGTNkkcxw4ghjdJLfQ9ntJRcgWxqsFUCsqDzg1e0U5FtsEvfGVIQ4J9nv90fNXEhcgmPLyEAh49KJW4WZlzezYSE172BvjDbZhc5JPn78eH/nlpubK7e1tcWQtjtRaDXpnLHaYkRflTdbSEhN65V4a4Plclo/IC/TDyV9ixCnNJWFw2EpPT2dBcKBBtHA3+FndmCmjsueuJnIf8/0/mQq79UlDkdpV+LGOnxQ7aljOmFwBTjxY8eOSXV1day9vV1SlFCHaFB3wroT8sdZ+kE4QuXFDMkSG7+ucZmUxdmdqrbU9WpIINQuiPO5CM5x4pTVYMdTucbgt8ejjeutj3K8Tg0jaU2aMY4nJWYQKm+mLT7d7kUW2GrDwRmFFpD8Xax3xSUmZcUfPhL7L2yvp9XJTv7ijgAv4ltBPK8rHNRCPf00QzKVRzs8p7Y6YRktCqy99foMrWN73bsnWJ/ZmTGbUVlkADRFDUarlIYKZkKYeWUjUYSm+0sWmraFxHdTaTkRhtnI2bHwKBBUA3iwSv6LcxPnjV4dI6J5vV61W+04JM5X7LBG3Mwr9820oPLxZln+zsQpac6kkdG5QDLs+7AyetwRat0FTvqsLEpeJDBaTU2NQocqBXl1f9PnH4uGmN5ZcSpmqu41KSUvffwWy4UJIzCIxlQ2bj/ILxnX1mq6Tx0EJwrVKlVjNFF8NKasbMSIEeqgQYOUWl91W0gNlIvGu0oPJH2h31Ti/VNeqP8dJrm6KQnDYIp5erKwZpR2j9JTfrRldy1x4mZMCYwWk7mxiPjVixcvqt3d3WpKSopS6z/9J/GA3ZsOJZW6mRp640h2Pk1bsWhoBzAToLo8fhES0t4fo+YXoblhWZbDtOcaLa5FbZziGyc/ZMgQpaenJ7yz4b1DqhpuxDV492RSNxuYeF4cWF6yiNmB8OyJ1B3SFlFI1ZSGj2o3grjS2dnJSescYyswa9eu5cQ7OjpwE0YodLGn/jVxHVJPFNfNc21PQiKiSJEIxgGFZ49XfETfthk+HGiO9B08wsOHD8deNd4fJa7rPi6G09LSeINPm97cHFT9R3gHSOqlT25m8WCWXCRzYvMpqUmkFYBxQOHZYedmNXdj36Cp6LvOJdTc3KzS4oKqC5cjSlz3dvhRurq6Qh6PJ0SDETrefvQP4h54y76fYwhg+ffRjfeRCi/kkrx+0Q9oVSRx2SpRbI8S7+iVuAiP+KrCiK0bvozx5Idat68KBoMhCmNBcKFQrYC4KDQC0SqrfhIS56oeCASC5ORCh5o/Pz7aO279CE/Oo7hvG70EBYrCPrX26CzM+uoxh0hnUWYyJd4VmSihWvvJxkheX2uY1e0qPRij4q09TW98/Z8D59B3CmNBUnMFoVpMTgT6LigI44eqB2kwMNxBchJvk8ofFTdtempLTNi4XCCdjWcWqLwgrH3w0g4eCaBVq1/6Kb+GPrz3u+3Re31K95cfnHv1dfSZPDn6HoKq06qvqvVZPey3Po6RKSsr49cwVWWRwXE2+M7tyxs87VZZktNwsZJSWVRhJxTksMsFPgyY85MZbGrhBJqDe5kzxRGd20MjOlq6qNqawSOBWDcHaQhAQCG7Pty66+l29WKz0+n0k8ZCVQITJ04M7dy5U1m3bl0M8XjVFgyIizYP2ckgUpnBdJw6OeOHuYWZC191ys6o8WJtepHNNXMrgDeHE0MuALLG9Bc2bVTvsBo+v6/ls1+ebDv8Ham4j8IxZmPdtMEzhljvPCSKeMT5wmF2dra7sbExlY4H0QZJe4n82L7ksWRT/OJdl1yVtQqELHhvoyMjSZ//V4T0WbfbHSCnxklTxdhPxdMgaXjY6NSMBPtBX0ODikPqbto4eXpwKj0Y5MfMHHbzI6mOtJhADOkXLikY8AGA9JFA7S49FDMZCij+ih31bz3V2FPbqpOGlLH5aION94vfAnELi3qtHddBHJ7Hy3Sp0+YhO3Ivzl65Yrgn+wFjO3j82UumDcgAxCMMNPnPbdhc98a7LpcLThikYdOQNrdtcmhhKrD0U3GBZBVVieKfg5wdJJ+Smprq9fl8kH4qvdATCoVc+ekFo28YvvgVh0H1BWACWGLGBzpjLK7KoGSEGgC2Pl8wckDK/247+MrR1t2YL8N+IVmfThh7YdcKS/Cda1LiqFHRJufk5LioLuch8h6dvJfIpxB5aITzjtE/v32kZ/wDTpMBAJC+YkkKWmD8ktlHCQqKmrUnL7BWIh3vs23YcmPgu798Wv/Xz0CM3h2mdwd0wnwjn9QzatSoEJXKw1pEZeMTYxagq73w9FB7Suw8XlVVvaRi+A/yuO64bfR9t2eljL09xeEtYAOAQNhfcabrm9J/XtyGPIKn1Lp6B3X19tN6gJ/m29ymSUgKUlMzh2aEncUDmdRe1tXeaPce/dilbxgAOT99evbEQdOuHebJvsHrSC2gpec0Ky/RmNrlV3wVneHWrw427/hHc7C+k/IJEFZ1KSOjDFDIEtLmSRb1LUR94/dZeY+tVROoPDaQo1TQTS9PoSlfik4cA0B9c7mpc1z6GAByghISoZkjivI8MuVRjqEjU52DRuossXir+UJdFHcCXfW+b09VtR9tMnReoefxNJqeCbsF6R7KygL03B56N8/OWK/3tkTaNnHWa/M8zrNIru8iOik0GeADQGHFTabh0q85qL/8Kwu0xSBgTwPB6BiLGMZn83SZzmuQMAhTWz5voEeGoNcgTtWUHiqW8OO8vLww+R5lz5494UT2PBDEY9rSQqOTHAmP91TFdNGChJsyPTdlelztqcMu6i+XvNiIkBQRHlcPHGv6sUbHIKzo56J1AZBkvR5cSFhUVBR2CbD69bIpysvLecdoAHqINOytm0ijJt9J3r+TVBLHXfrGkwsiJRIMLF1i76MBEue7qE0XqTPadYiNnFen3j6Ad5HGYSDwTcslkQYGamVULLrLpH7y6dOnuY1TGctFFR0hcYfhvujinQ6eaNBgYc6sEHm+0WAKqatEWJkwYYI6depUjYhbtuWrBW775GGd1FEXFQA8FFsR8+HRMdFBKocgPrTvRkgnh4l70ijPxtwAzpLnCLpDvSztvFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg=="},72533:(e,o,i)=>{i.r(o),i.d(o,{default:()=>de});var r=i(89379),t=i(9950),n=i(99459),l=i(28429),s=i(2235),c=i(41413),a=i(47223),d=i(55158),x=i(60899),h=i(93230),u=i(16491),f=i(82053),p=i(82917),g=i(1320),A=i(25333),v=i(15769),j=i(69780),b=i(9213),m=i(21671),y=i(34075),S=i(83274),w=i(33738),k=i(14857),W=i(4159),C=i.n(W),z=i(31222),R=i(59212),Y=i(27001),I=i(36803),T=i(23787),J=i(56311),M=i(94826),P=i(81425),L=i(36150),N=i(60010),B=i(58691),H=i(96646),K=i(20466),F=i(26910),D=i(44414),V=i(36220);C().extend(V);const Z=14,E="0 12px 32px rgba(15, 23, 42, 0.12)",q="#0f172a",G="#64748b",U="#94a3b8",O="#e2e8f0",Q="#f1f5f9",X="#ffffff",_="#f8fafc",$=(e,o)=>"".concat(e).concat(o),ee=e=>$(e,"08"),oe=e=>$(e,"18"),ie=e=>$(e,"55"),re="#662582",te=e=>(0,D.jsx)(s.A,(0,r.A)((0,r.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:E,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),ne=e=>{let{color:o,selected:i,size:r=24,children:t}=e;return(0,D.jsx)(c.A,{sx:{width:r,height:r,bgcolor:i?o:oe(o),color:i?"#fff":o,transition:"background-color 0.15s, color 0.15s"},children:t})},le={active:{label:"Active",color:"#10b981",icon:z.mU9},inactive:{label:"Inactive",color:"#ef4444",icon:z.uDv},online:{label:"Online",color:"#10b981",icon:z.mU9},offline:{label:"Offline",color:"#ef4444",icon:z.uDv},idle:{label:"Idle",color:"#f59e0b",icon:z.VP9},unknown:{label:"Unknown",color:"#94a3b8",icon:z.gsJ}},se=[{key:0,label:"All Riders",color:re,icon:z.Itr,countKey:"total"},{key:1,label:"Active",color:"#10b981",icon:z.mU9,countKey:"active"}],ce=e=>{var o,i,r;return[{key:"total",label:"Total Riders",color:re,icon:z.AYP,value:null!==(o=null===e||void 0===e?void 0:e.total)&&void 0!==o?o:0},{key:"active",label:"Active Riders",color:"#10b981",icon:z.cAP,value:null!==(i=null===e||void 0===e?void 0:e.active)&&void 0!==i?i:0},{key:"inactive",label:"Inactive Riders",color:"#ef4444",icon:z.qiG,value:null!==(r=null===e||void 0===e?void 0:e.inactive)&&void 0!==r?r:0}]},ae=e=>{let{color:o,icon:i,label:r,value:t}=e;return(0,D.jsx)(x.Ay,{item:!0,xs:6,sm:4,md:3,children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:1.125,py:.75,borderRadius:1.75,bgcolor:"#fff",border:"1px solid ".concat(ie(o)),minWidth:0},children:[(0,D.jsx)(ne,{color:o,size:28,children:(0,D.jsx)(i,{size:14})}),(0,D.jsxs)(h.A,{sx:{minWidth:0},children:[(0,D.jsx)(f.A,{sx:{color:U,fontWeight:700,lineHeight:1,textTransform:"uppercase",letterSpacing:.4,fontSize:9.5},children:r}),(0,D.jsx)(f.A,{sx:{color:q,fontWeight:800,fontSize:13,lineHeight:1.2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",mt:.25},children:t})]})]})})},de=()=>{const e=(0,l.Zp)(),o=(0,k.A)(),i=(0,a.A)(o.breakpoints.down("md")),W=(0,t.useRef)(),V=(0,t.useRef)(),[E,de]=(0,t.useState)(""),[xe,he]=(0,t.useState)(""),[ue,fe]=(0,t.useState)("All"),[pe,ge]=(0,t.useState)(0),[Ae,ve]=(0,t.useState)(0),je=localStorage.getItem("roleid"),[be,me]=(0,t.useState)(null),[ye,Se]=(0,t.useState)(null);n.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const{data:we,isLoading:ke}=(0,L.I)({queryKey:["allriders",pe,Ae],queryFn:P.eF}),We=async e=>{try{const o=await F.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getriderperiodiclogs?userid=").concat(e));0==o.data.data.length?(me(null),(0,K.k)(o.data.message,"error",2e3)):Se(o.data.data)}catch(o){(0,K.k)(o.message,"error",2e3)}},{data:Ce,isLoading:ze,isError:Re,error:Ye}=(0,L.I)({queryKey:["ridersStatus"],queryFn:P.bY}),{data:Ie,isLoading:Te,isFetchingNextPage:Je,fetchNextPage:Me,hasNextPage:Pe}=(0,N.q)({queryKey:["allriders",pe,xe,Ae],queryFn:P.DM,getNextPageParam:(e,o)=>{var i;return null!==(i=e.details)&&void 0!==i&&i.length?o.length+1:void 0}}),Le=((null===Ie||void 0===Ie?void 0:Ie.pages.flatMap((e=>e.details||[])))||[]).filter(Boolean);(0,t.useEffect)((()=>{if(!Pe)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Me()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return W.current&&e.observe(W.current),()=>{W.current&&e.unobserve(W.current)}}),[Pe,Me]);const Ne=Re?Ye:null;(0,t.useEffect)((()=>{Ne&&(0,K.k)(Ne,"error",2e3)}),[Ne]);const Be=e=>{if(0==Ae){const o="active"===((null===e||void 0===e?void 0:e.status)||"").toLowerCase()?"active":"inactive";return le[o]||le.unknown}const o=null===Ce||void 0===Ce?void 0:Ce.find((o=>o.userid===(null===e||void 0===e?void 0:e.userid))),i=((null===o||void 0===o?void 0:o.status)||"unknown").toLowerCase();return le[i]||le.unknown};return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(d.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:Te||ke||ze,children:(0,D.jsx)(M.A,{color:"inherit"})}),(0,D.jsx)(Y.A,{title:"Riders",subtitle:"Live \xb7 ".concat(ue||"All Zones"),live:!0,action:(0,D.jsx)(R.A,{locaName:ue,setAppId:ge,setLocoName:fe,pill:!0,accentColor:re,icon:(0,D.jsx)(z.HPi,{size:14}),placeholder:"Select Zone",paperComponent:te,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,D.jsx)(x.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:ce(we).map((e=>{var o;const i=e.icon;return(0,D.jsx)(x.Ay,{item:!0,xs:12,sm:4,children:(0,D.jsx)(I.A,{title:e.label,value:null!==(o=e.value)&&void 0!==o?o:0,icon:(0,D.jsx)(i,{size:20}),color:e.color,loading:ke})},e.key)}))}),(0,D.jsx)(s.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:Z/8,borderTopRightRadius:Z/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:O,borderBottom:0,background:"#fff"},children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,D.jsx)(h.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:O,borderRadius:4}},children:se.map((e=>{var o;const i=e.icon,r=Ae===e.key,t=null!==(o=null===we||void 0===we?void 0:we[e.countKey])&&void 0!==o?o:0;return(0,D.jsxs)(u.A,{onClick:()=>{return o=e.key,ve(o),void me(null);var o},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:"10px",border:"1px solid ".concat(r?e.color:O),bgcolor:r?e.color:X,color:r?"#fff":G,fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:r?e.color:"#cbd5e1",bgcolor:r?e.color:"#f8fafc"}},children:[(0,D.jsx)(c.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:r?"rgba(255,255,255,0.22)":oe(e.color),color:r?"#fff":e.color},children:(0,D.jsx)(i,{size:13})}),(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:e.label}),(0,D.jsx)(u.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:r?"rgba(255,255,255,0.22)":"#f8fafc",color:r?"#fff":"#64748b",border:"none"},children:ke?(0,D.jsx)(p.A,{variant:"text",width:14,height:10}):t})]},e.key)}))}),(0,D.jsx)(u.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,D.jsx)(J.A,{value:E,onChange:de,onDebouncedChange:he,placeholder:"Search riders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat((He=re,$(He,"26")))}}})})]})}),(0,D.jsx)(s.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:Z/8,borderBottomRightRadius:Z/8,border:"1px solid",borderColor:O,overflow:"hidden",background:"#fff"},children:(0,D.jsx)(g.A,{ref:V,onScroll:e=>{const{scrollTop:o,scrollHeight:i,clientHeight:r}=e.currentTarget;o+r>=i-50&&Pe&&!Je&&Me()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:ie(re),borderRadius:8,"&:hover":{backgroundColor:re}},"&::-webkit-scrollbar-track":{backgroundColor:_}},children:i?(0,D.jsxs)(T.nV,{sx:{p:1.25},children:[Te&&(0,D.jsxs)(h.A,{alignItems:"center",sx:{py:6},children:[(0,D.jsx)(B.A,{}),(0,D.jsx)(f.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading riders\u2026"})]}),0===(null===Le||void 0===Le?void 0:Le.length)&&!Te&&(0,D.jsxs)(h.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,D.jsx)(c.A,{sx:{width:64,height:64,bgcolor:oe("#94a3b8"),color:U},children:(0,D.jsx)(z.aVM,{size:28})}),(0,D.jsx)(f.A,{variant:"subtitle1",sx:{fontWeight:700,color:q},children:"No riders to show"}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:G,textAlign:"center",px:2},children:E?"Try a different keyword.":"No ".concat(0===Ae?"":"active ","riders for this zone.")})]}),0!==(null===Le||void 0===Le?void 0:Le.length)&&(null===Le||void 0===Le?void 0:Le.map(((o,i)=>{var r,t,n,l;const s=Be(o),a=s.icon,d=be===o.userid;return(0,D.jsxs)(T.pg,{accent:s.color,selected:d,header:(0,D.jsxs)(h.A,{spacing:1.25,children:[(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:U},children:String(i+1).padStart(2,"0")}),(0,D.jsxs)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(ie(re)),color:re,fontWeight:800,fontSize:11},children:["#",null===o||void 0===o?void 0:o.userid]}),(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:ee(s.color),border:"1px solid ".concat(ie(s.color)),color:s.color},children:[(0,D.jsx)(ne,{color:s.color,size:18,children:(0,D.jsx)(a,{size:11})}),(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:800,fontSize:10.5,lineHeight:1},children:s.label})]})]}),1==je&&(0,D.jsxs)(h.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:[(0,D.jsx)(A.A,{size:"small",sx:{borderRadius:999,bgcolor:oe(re),color:re,border:"1px solid ".concat(ie(re)),"&:hover":{bgcolor:re,color:"#fff"}},onClick:()=>{e("/nearle/riders/edit",{state:{riderdata:o}})},children:(0,D.jsx)(z.Yvo,{size:14})}),0!=Ae&&(0,D.jsx)(A.A,{size:"small",sx:{borderRadius:999,bgcolor:d?"#0ea5e9":oe("#0ea5e9"),color:d?"#fff":"#0ea5e9",border:"1px solid ".concat(ie("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},onClick:()=>{o.userid==be?me(null):(me(o.userid),We(o.userid))},children:d?(0,D.jsx)(z.rAP,{size:14}):(0,D.jsx)(z.WnU,{size:14})})]})]}),(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,D.jsx)(c.A,{sx:{width:36,height:36,bgcolor:oe(re),color:re,fontWeight:800,fontSize:16,border:"1px solid ".concat(ie(re)),flexShrink:0},children:(o.fullname||o.username||"?").charAt(0).toUpperCase()}),(0,D.jsxs)(u.A,{sx:{minWidth:0},children:[(0,D.jsx)(f.A,{sx:{fontWeight:800,color:q,fontSize:15},noWrap:!0,children:o.username||"\u2014"}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:G},noWrap:!0,children:o.contactno||"\u2014"})]})]})]}),children:[(0,D.jsxs)(T.FG,{children:[(0,D.jsxs)(T.pY,{label:"Address",full:!0,children:[(0,D.jsx)(f.A,{sx:{fontSize:13,fontWeight:600,color:G},noWrap:!0,children:o.suburb||(o.address?o.address.slice(0,20)+"\u2026":"\u2014")}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:U},noWrap:!0,children:o.city||""})]}),(0,D.jsx)(T.pY,{label:"Vehicle",children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,D.jsx)(ne,{color:"#0ea5e9",size:22,children:(0,D.jsx)(z.aVM,{size:12})}),(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:q},children:o.vehicleno||"\u2014"})]})}),(0,D.jsx)(T.pY,{label:"Shift",value:"#".concat(null!==(t=o.shiftid)&&void 0!==t?t:"\u2014")}),(0,D.jsx)(T.pY,{label:"Time",children:(0,D.jsxs)(h.A,{spacing:.5,children:[(0,D.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:.875,py:.25,borderRadius:999,bgcolor:ee("#10b981"),border:"1px solid ".concat(ie("#10b981")),color:"#10b981",fontSize:10.5,fontWeight:800},children:o.starttime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.starttime)).format("hh:mm A"):"\u2014"}),(0,D.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:.875,py:.25,borderRadius:999,bgcolor:ee("#ef4444"),border:"1px solid ".concat(ie("#ef4444")),color:"#ef4444",fontSize:10.5,fontWeight:800},children:o.endtime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.endtime)).format("hh:mm A"):"\u2014"})]})}),(0,D.jsx)(T.pY,{label:"Fare",value:null!==(n=o.basefare)&&void 0!==n?n:"\u2014"}),(0,D.jsx)(T.pY,{label:"Fuel",value:null!==(l=o.fuelcharge)&&void 0!==l?l:"\u2014"})]}),d&&0!==Ae&&(0,D.jsxs)(u.A,{sx:{mt:1.5,p:1.25,borderRadius:2,bgcolor:"#ffffff",border:"1px solid ".concat(ie(re))},children:[(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1.25},children:[(0,D.jsx)(ne,{color:re,size:26,children:(0,D.jsx)(z.o8z,{size:14})}),(0,D.jsxs)(f.A,{sx:{fontWeight:800,color:G,letterSpacing:.6,textTransform:"uppercase",fontSize:11},children:["Live telemetry \u2014 ",o.username||"Rider #".concat(o.userid)]})]}),(0,D.jsxs)(x.Ay,{container:!0,spacing:1.25,children:[(0,D.jsx)(ae,{color:"#ef4444",icon:z.gwi,label:"Location",value:null!==ye&&void 0!==ye&&ye.latitude?"".concat(ye.latitude,", ").concat(ye.longitude):"\u2014"}),(0,D.jsx)(ae,{color:"#10b981",icon:z.E_J,label:"Battery",value:null!==ye&&void 0!==ye&&ye.battery?"".concat(ye.battery,"%"):"N/A"}),(0,D.jsx)(ae,{color:null!==ye&&void 0!==ye&&ye.is_charging?"#10b981":"#94a3b8",icon:z.Im6,label:"Charging",value:null!==ye&&void 0!==ye&&ye.is_charging?"Charging":"Not Charging"}),(0,D.jsx)(ae,{color:"#0ea5e9",icon:z.BJM,label:"Speed",value:void 0!==(null===ye||void 0===ye?void 0:ye.speed)?"".concat(ye.speed," km/h"):"\u2014"}),(0,D.jsx)(ae,{color:"#8b5cf6",icon:z.o8z,label:"Accuracy",value:void 0!==(null===ye||void 0===ye?void 0:ye.accuracy)?"".concat(ye.accuracy," m"):"\u2014"}),(0,D.jsx)(ae,{color:"#f59e0b",icon:z.VP9,label:"Log time",value:(null===ye||void 0===ye?void 0:ye.logdate)||"\u2014"}),(0,D.jsx)(ae,{color:re,icon:z.gsJ,label:"Active order",value:(null===ye||void 0===ye?void 0:ye.orderid)||"N/A"}),(0,D.jsx)(ae,{color:"idle"===(null===ye||void 0===ye?void 0:ye.status)?"#f59e0b":"#10b981",icon:z.mU9,label:"Status",value:(null===ye||void 0===ye?void 0:ye.status)||"unknown"})]})]})]},null!==(r=o.userid)&&void 0!==r?r:i)}))),0!==(null===Le||void 0===Le?void 0:Le.length)&&(0,D.jsx)("div",{ref:W,style:{height:40,textAlign:"center"},children:Je||Pe?(0,D.jsx)(B.A,{}):(0,D.jsx)(f.A,{variant:"caption",sx:{color:U,fontWeight:600},children:"No more riders"})})]}):(0,D.jsxs)(v.A,{stickyHeader:!0,sx:{minWidth:{xs:1100,md:1300}},children:[(0,D.jsx)(j.A,{children:(0,D.jsxs)(b.A,{sx:{"& th":{backgroundColor:_,color:G,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(O),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,D.jsx)(m.A,{children:"#"}),(0,D.jsx)(m.A,{children:"ID"}),(0,D.jsx)(m.A,{children:"Rider"}),(0,D.jsx)(m.A,{children:"Address"}),(0,D.jsx)(m.A,{children:"Vehicle"}),(0,D.jsx)(m.A,{children:"Shift"}),(0,D.jsx)(m.A,{align:"center",children:"Time"}),(0,D.jsx)(m.A,{children:"Fare"}),(0,D.jsx)(m.A,{children:"Fuel"}),(0,D.jsx)(m.A,{align:"center",children:"Status"}),1==je&&(0,D.jsx)(m.A,{align:"right",children:"Action"})]})}),(0,D.jsxs)(y.A,{children:[Te&&(0,D.jsx)(H.r,{col:6}),0===(null===Le||void 0===Le?void 0:Le.length)&&!Te&&(0,D.jsx)(b.A,{children:(0,D.jsx)(m.A,{colSpan:1==je?11:10,sx:{py:6},children:(0,D.jsxs)(h.A,{alignItems:"center",spacing:1.5,children:[(0,D.jsx)(c.A,{sx:{width:64,height:64,bgcolor:oe("#94a3b8"),color:U},children:(0,D.jsx)(z.aVM,{size:28})}),(0,D.jsx)(f.A,{variant:"subtitle1",sx:{fontWeight:700,color:q},children:"No riders to show"}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:G},children:E?"Try a different keyword.":"No ".concat(0===Ae?"":"active ","riders for this zone.")})]})})}),0!==(null===Le||void 0===Le?void 0:Le.length)&&(null===Le||void 0===Le?void 0:Le.map(((o,i)=>{var n,l,s,a;const d=Be(o),p=d.icon,g=be===o.userid;return(0,D.jsxs)(t.Fragment,{children:[(0,D.jsxs)(b.A,{sx:(0,r.A)({cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(Q),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:_}},g&&{backgroundColor:ee(re)}),children:[(0,D.jsx)(m.A,{children:(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:U},children:String(i+1).padStart(2,"0")})}),(0,D.jsx)(m.A,{children:(0,D.jsxs)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(ie(re)),color:re,fontWeight:800,fontSize:11,minWidth:56},children:["#",null===o||void 0===o?void 0:o.userid]})}),(0,D.jsx)(m.A,{children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,D.jsx)(c.A,{sx:{width:36,height:36,bgcolor:oe(re),color:re,fontWeight:800,fontSize:16,border:"1px solid ".concat(ie(re))},children:(o.fullname||o.username||"?").charAt(0).toUpperCase()}),(0,D.jsxs)(h.A,{sx:{minWidth:0},children:[(0,D.jsx)(f.A,{variant:"subtitle2",sx:{fontWeight:700,color:q,whiteSpace:"nowrap"},children:o.username||"\u2014"}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:G},children:o.contactno||"\u2014"})]})]})}),(0,D.jsx)(m.A,{sx:{maxWidth:220},children:(0,D.jsx)(S.A,{title:o.address||"",placement:"top",children:(0,D.jsxs)(h.A,{children:[(0,D.jsx)(f.A,{variant:"caption",sx:{color:G,fontWeight:600},noWrap:!0,children:o.suburb||(o.address?o.address.slice(0,20)+"\u2026":"\u2014")}),(0,D.jsx)(f.A,{variant:"caption",sx:{color:U},noWrap:!0,children:o.city||""})]})})}),(0,D.jsx)(m.A,{children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,D.jsx)(ne,{color:"#0ea5e9",size:22,children:(0,D.jsx)(z.aVM,{size:12})}),(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:q},children:o.vehicleno||"\u2014"})]})}),(0,D.jsx)(m.A,{children:(0,D.jsxs)(f.A,{variant:"caption",sx:{color:G,fontWeight:600},children:["#",null!==(l=o.shiftid)&&void 0!==l?l:"\u2014"]})}),(0,D.jsx)(m.A,{align:"center",children:(0,D.jsxs)(h.A,{spacing:.5,alignItems:"center",children:[(0,D.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",gap:.375,px:.875,py:.25,borderRadius:999,bgcolor:ee("#10b981"),border:"1px solid ".concat(ie("#10b981")),color:"#10b981",fontSize:10.5,fontWeight:800,minWidth:88,justifyContent:"center"},children:o.starttime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.starttime)).format("hh:mm A"):"\u2014"}),(0,D.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",gap:.375,px:.875,py:.25,borderRadius:999,bgcolor:ee("#ef4444"),border:"1px solid ".concat(ie("#ef4444")),color:"#ef4444",fontSize:10.5,fontWeight:800,minWidth:88,justifyContent:"center"},children:o.endtime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.endtime)).format("hh:mm A"):"\u2014"})]})}),(0,D.jsx)(m.A,{children:(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:q},children:null!==(s=o.basefare)&&void 0!==s?s:"\u2014"})}),(0,D.jsx)(m.A,{children:(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:700,color:q},children:null!==(a=o.fuelcharge)&&void 0!==a?a:"\u2014"})}),(0,D.jsx)(m.A,{align:"center",children:(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:ee(d.color),border:"1px solid ".concat(ie(d.color)),color:d.color},children:[(0,D.jsx)(ne,{color:d.color,size:20,children:(0,D.jsx)(p,{size:12})}),(0,D.jsx)(f.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:d.label})]})}),1==je&&(0,D.jsx)(m.A,{align:"right",children:(0,D.jsxs)(h.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[(0,D.jsx)(S.A,{title:"Edit rider",placement:"top",children:(0,D.jsx)(A.A,{size:"small",sx:{bgcolor:oe(re),color:re,border:"1px solid ".concat(ie(re)),"&:hover":{bgcolor:re,color:"#fff"}},onClick:()=>{e("/nearle/riders/edit",{state:{riderdata:o}})},children:(0,D.jsx)(z.Yvo,{size:14})})}),0!=Ae&&(0,D.jsx)(S.A,{title:g?"Hide logs":"View live logs",placement:"top",children:(0,D.jsx)(A.A,{size:"small",sx:{bgcolor:g?"#0ea5e9":oe("#0ea5e9"),color:g?"#fff":"#0ea5e9",border:"1px solid ".concat(ie("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},onClick:()=>{o.userid==be?me(null):(me(o.userid),We(o.userid))},children:g?(0,D.jsx)(z.rAP,{size:14}):(0,D.jsx)(z.WnU,{size:14})})})]})})]}),g&&0!==Ae&&(0,D.jsx)(b.A,{children:(0,D.jsx)(m.A,{colSpan:1==je?11:10,sx:{p:0,borderBottom:"1px solid ".concat(Q)},children:(0,D.jsx)(w.A,{in:g,timeout:"auto",unmountOnExit:!0,children:(0,D.jsxs)(u.A,{sx:{p:{xs:1.5,md:2},bgcolor:"#ffffff",borderTop:"1px solid ".concat(ie(re))},children:[(0,D.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1.25},children:[(0,D.jsx)(ne,{color:re,size:26,children:(0,D.jsx)(z.o8z,{size:14})}),(0,D.jsxs)(f.A,{sx:{fontWeight:800,color:G,letterSpacing:.6,textTransform:"uppercase",fontSize:11},children:["Live telemetry \u2014 ",o.username||"Rider #".concat(o.userid)]})]}),(0,D.jsxs)(x.Ay,{container:!0,spacing:1.25,children:[(0,D.jsx)(ae,{color:"#ef4444",icon:z.gwi,label:"Location",value:null!==ye&&void 0!==ye&&ye.latitude?"".concat(ye.latitude,", ").concat(ye.longitude):"\u2014"}),(0,D.jsx)(ae,{color:"#10b981",icon:z.E_J,label:"Battery",value:null!==ye&&void 0!==ye&&ye.battery?"".concat(ye.battery,"%"):"N/A"}),(0,D.jsx)(ae,{color:null!==ye&&void 0!==ye&&ye.is_charging?"#10b981":"#94a3b8",icon:z.Im6,label:"Charging",value:null!==ye&&void 0!==ye&&ye.is_charging?"Charging":"Not Charging"}),(0,D.jsx)(ae,{color:"#0ea5e9",icon:z.BJM,label:"Speed",value:void 0!==(null===ye||void 0===ye?void 0:ye.speed)?"".concat(ye.speed," km/h"):"\u2014"}),(0,D.jsx)(ae,{color:"#8b5cf6",icon:z.o8z,label:"Accuracy",value:void 0!==(null===ye||void 0===ye?void 0:ye.accuracy)?"".concat(ye.accuracy," m"):"\u2014"}),(0,D.jsx)(ae,{color:"#f59e0b",icon:z.VP9,label:"Log time",value:(null===ye||void 0===ye?void 0:ye.logdate)||"\u2014"}),(0,D.jsx)(ae,{color:re,icon:z.gsJ,label:"Active order",value:(null===ye||void 0===ye?void 0:ye.orderid)||"N/A"}),(0,D.jsx)(ae,{color:"idle"===(null===ye||void 0===ye?void 0:ye.status)?"#f59e0b":"#10b981",icon:z.mU9,label:"Status",value:(null===ye||void 0===ye?void 0:ye.status)||"unknown"})]})]})})})})]},null!==(n=o.userid)&&void 0!==n?n:i)}))),0!==(null===Le||void 0===Le?void 0:Le.length)&&(0,D.jsx)(b.A,{children:(0,D.jsx)(m.A,{colSpan:1==je?11:10,sx:{borderBottom:"none"},children:(0,D.jsx)("div",{ref:W,style:{height:40,textAlign:"center"},children:Je||Pe?(0,D.jsx)(B.A,{}):(0,D.jsx)(f.A,{variant:"caption",sx:{color:U,fontWeight:600},children:"No more riders"})})})})]})]})})})]});var He}},94826:(e,o,i)=>{i.d(o,{A:()=>a});var r=i(59254),t=i(46639),n=i(62217),l=i(44414);const s=(0,r.Ay)("div")((()=>({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}))),c=(0,r.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),a=()=>(0,l.jsxs)(s,{children:[(0,l.jsx)(t.A,{color:"primary",size:80,thickness:6}),(0,l.jsx)(c,{children:(0,l.jsx)("img",{src:n,alt:"Logo",style:{width:"100%",height:"100%"}})})]})},96646:(e,o,i)=>{i.d(o,{r:()=>c});var r=i(9213),t=i(21671),n=i(82917),l=i(93230),s=i(44414);const c=e=>{let{rowsPerPage:o=5,col:i=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(o)).map(((e,o)=>(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"text",width:30})}),Array.from({length:i}).map(((e,o)=>(0,s.jsx)(t.A,{children:(0,s.jsxs)(l.A,{spacing:.5,children:[(0,s.jsx)(n.A,{variant:"text",width:100}),(0,s.jsx)(n.A,{variant:"text",width:80})]})},o))),(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"text",width:150})}),(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(t.A,{align:"center",children:(0,s.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(n.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(n.A,{variant:"circular",width:28,height:28})]})})]},o)))})}}}]); \ No newline at end of file diff --git a/build/static/js/2533.ef2d33a7.chunk.js b/build/static/js/2533.ef2d33a7.chunk.js deleted file mode 100644 index af611d1..0000000 --- a/build/static/js/2533.ef2d33a7.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2533],{23787:(e,o,r)=>{r.d(o,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var i=r(89379),t=r(80045),n=r(93230),l=r(2235),s=r(16491),c=r(82053),a=r(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:o,scroll:r=!1,onScroll:l,sx:s}=e,c=(0,t.A)(e,d);return(0,a.jsx)(n.A,(0,i.A)((0,i.A)({spacing:1.25,onScroll:l,sx:(0,i.A)((0,i.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},c),{},{children:o}))},h=e=>{let{accent:o="#662582",header:r,footer:t,selected:n=!1,onClick:c,children:d,sx:x}=e;return(0,a.jsxs)(l.A,{elevation:0,onClick:c,sx:(0,i.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:n?o:"#e2e8f0",background:n?"".concat(o,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,a.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:o}}),(0,a.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[r,d,t]})]})},u=e=>{let{children:o,columns:r=2,sx:t}=e;return(0,a.jsx)(s.A,{sx:(0,i.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},t),children:o})},p=e=>{let{label:o,value:r,children:i,full:t=!1,align:n="left"}=e;return(0,a.jsxs)(s.A,{sx:{gridColumn:t?"1 / -1":"auto",minWidth:0,textAlign:n},children:[(0,a.jsx)(c.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:o}),(0,a.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==i?i:(0,a.jsx)(c.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},56311:(e,o,r)=>{r.d(o,{A:()=>u});var i=r(89379),t=r(9950),n=r(2660),l=r(2046),s=r(83274),c=r(25333),a=r(97125),d=r(7762),x=r(52097),h=r(44414);const u=e=>{let{value:o,onChange:r,onDebouncedChange:u,debounceTime:p=500,placeholder:g="Search (ctrl+k)",sx:f}=e;const A=(0,t.useRef)(null),[m]=(0,x.d7)(o,p);return(0,t.useEffect)((()=>{u&&u(m)}),[m,u]),(0,t.useEffect)((()=>{const e=e=>{var o;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(o=A.current)||void 0===o||o.focus());"Escape"===e.key&&document.activeElement===A.current&&A.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(n.A,{sx:(0,i.A)({},f),inputRef:A,placeholder:g,autoComplete:"off",value:o,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,h.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(a.A,{})}),endAdornment:(0,h.jsx)(s.A,{title:"Clear",children:(0,h.jsx)(c.A,{sx:{visibility:o?"visible":"hidden"},onClick:()=>r(""),children:(0,h.jsx)(d.A,{})})})})}},58691:(e,o,r)=>{r.d(o,{A:()=>s});r(9950);var i=r(16491),t=r(46639),n=r(62217),l=r(44414);function s(e){let{size:o=70,imgSize:r=40,alt:s="loader"}=e;return(0,l.jsxs)(i.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,l.jsx)(t.A,{size:o}),(0,l.jsx)(i.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:r,height:r},children:(0,l.jsx)("img",{src:n,alt:s,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,o,r)=>{r.d(o,{A:()=>h});var i=r(89379),t=r(9950),n=r(93230),l=r(41413),s=r(77922),c=r(29925),a=r(26910),d=r(31222),x=r(44414);const h=(0,t.forwardRef)(((e,o)=>{let{setAppId:r,setLocoName:h,setPage:u,sx:p,textfeildSx:g,textfieldSx:f,pill:A=!1,accentColor:m="#6366f1",icon:j,placeholder:b="Select Zone",paperComponent:v}=e;const[S,w]=(0,t.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,t.useEffect)((()=>{0===S.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const o=await a.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(o.data.status){const e=[...o.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),w(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[S.length]);const y=e=>"".concat(m).concat(e),k=y("08"),W=y("26"),C=y("55"),z=y("18"),R=A?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"999px",bgcolor:k,fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s, background-color 0.2s","& fieldset":{borderColor:C,borderWidth:1.5},"&:hover fieldset":{borderColor:m},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(W)},"&.Mui-focused fieldset":{borderColor:m,borderWidth:2}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:m}}:{},Y=A&&(0,x.jsx)(n.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(l.A,{sx:{width:24,height:24,bgcolor:z,color:m,transition:"background-color 0.15s, color 0.15s"},children:j||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(s.A,{id:"location-autocomplete",options:S||[],getOptionLabel:e=>{var o;return null!==(o=null===e||void 0===e?void 0:e.locationname)&&void 0!==o?o:""},PaperComponent:v,sx:(0,i.A)({},p),onChange:(e,o,i)=>{"clear"===i?(null===r||void 0===r||r(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):o&&(null===r||void 0===r||r(o.applocationid),null===h||void 0===h||h(o.locationname),null===u||void 0===u||u(0))},renderInput:e=>A?(0,x.jsx)(c.A,(0,i.A)((0,i.A)({},e),{},{inputRef:o,placeholder:b,InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{startAdornment:Y}),sx:(0,i.A)((0,i.A)({},R),f||g||{})})):(0,x.jsx)(c.A,(0,i.A)((0,i.A)({},e),{},{inputRef:o,label:"Select Zones",sx:(0,i.A)({},f||g||{})}))})}))},62217:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAPnUlEQVR4AdVae3AU9R3/7d4jdyGQQKAhECBAJBSmEAtFSQUjqPgAHGlhRm0lDkWY6Tg+O9qiErR26h8WR8ZWqTMN1ur4qMpDrTyjtDwDJloeCYiBvAgkaZ53l7vb3X4/v9vfZS/Zu9uFwLSfmb3d293f7u/z+z5/399K7CphdW5JrupgBZosZ0ialmu8pklSjUOTamRJbvvjqTUV7CpAYlcIj+SWZHQ55WJZlm7UNK2IXpRhpZ3GWJskSWXUZrPD4Sp77eSva9gVwIATXz35+SJNYWs1phWxAYDEpDKVaZv+fOrZUjaAGDDiK695rpgetpYOc82upw72sMycdJbz/SzmHeKl/ynRay31bbS1s7rjTczXGYj3ihrShnUDNQCXTXzlNS8UyExdbybhSdeNYwXz81nBzflE2pKms7oT51ntiSa276NKVn3wrNktNcGQelNpTUkNuwxcFvFV+S88rKnKy8ZzkOz84uvYvOJZ/PhyAE3Y/+HXbN+HFVwjjJAlR8lr1WueY9wt2MclEYfj8rnkj+nwRnHOLuGWhnbmpfuMKh/3Xn0Atm74IuY8OcGPFYk99kbVM98xm7BFnDyttHLyb3MlRdsjSWycOA+VLv79YpY5Ork6V5efY59s/JJVHznH/+dMymLz7v0Rm71oWtK2GIDSJ7ew6kMxJlCjytI8u+Qddm4+93bPBIfqiiG96KG5RPouljokuZT3b/2avf7EB6ylsZ1dM2MsG5OfxU7RAFSWVbMAObUphRMTtsc7CpdMh6c3kqe8gN117Yh5W4627GljFmGZ+C/ynx/flzSkDPW2Aqj2+lV/Y5mj0tljG3/GFhQXspkLpnBJVx85yyq/OGWJPAANgzkd2/utOMXJzxp965vlF3YFrPRHZtYgSZq6vi/p2TT6VrF+1Vt8/yiRhnoLiIHAftc7h0kDzlp6HgYcfTAgVwmEPmIWzTeZxPEQaeWkkhJJk1eJk8vWLGBz75nBrAIqfmDrN2zhqjlsetGkftddKU6WQ2qPe6AZVuwdGPP9kWw4+ZWKnVXiVO6M4UXtR1rKDiZrm4g4J70871cTnMzzd3ESNn3bgz9mdgC7hmoufeKWuB4/c1QGV3nYfP7Msfy/FYB8rM1LC6YNm72lonXv+UTtEqr60qVLJTcbvEv8h20tfOhGZgeQtpBiZnZ6wnuhEUDFnlPMDhaSMCbNilohc0kp61mEW1y1j0u8hLR78Ff5xX3t2i5AHLjegvqOIdtHXK/8oorZRfGLiw3aJM1dkVeynA5kCsGm98cjLhNxh4O5nxEnoOJW4rQRkDRUF3adTNoAEprRRB7tfJ09zA7Qt3mGCCMz+dmioiLKcSRTjvGISw/kPbNcSDtzdLotDy6A+AyYObR4KCjK53ur3t2I+ct7s0b0Pfds4U04RuLV914z4rjJ4ZSc94sTSBrsShvYv62S76frZKwAYQ2orWpidoEExyh1tzPl6SlTpjhJ6v3u7Utcgm0vHf/wePKUc8TJS5E21LWu6gKbRBmalXwcgHp70yISg8QR3oTWWAWk3gtpbp6/cCiLRK8Y9k7jHzgCGh3n8om/ibpueHKr0vZT5lVZFvHItVWRaALVQ4pqxcYfL3opeoxcvlr3D4BVc4HU4eFFeMt0ZsHJvUzcFKPkY4gvW7YMGiC7ZfcicW723dalXUsS3lSyNeZcBUmsmaS/5p0Vlp4BVccADsvOYP6uAM/yKsqq7PkJmv8L4k7mmEu7DcRNIfIqkedu3qjq0pkzZ/DfITE5quZjp2Qxu0Dnha1iX1fdxD55fW/CNjANYN49s7jKI5O788E5kfY0oHZQcEuvT5GY8wbaye+//36MqsfY+JEjR6QlY1cX0CHvNdQmZ/JIZhUtjW3RzkNqsG90Hti2cS8fgGSoqz7Pp6loi/uH6wNnJ7zBNA0ZYvrdY1aMZ6hdGHQ9RuL473KmDBUnUB+zAyE1dP6me2fxpMUYljat3Zb0GfvJodWRRz9Aic/utw+Ts/NG1L/L0qQrCoRggVTXUGRPMULmNo44h0CflZXlcGiuXLPGdoDOo7Pw0EYpC5W/c9Wcfm3EoAGiSAF4h0QiQmtDmyUHKZAzZSSrPam/W5MgzJgUlo+CrgFSU1OT5GTOseKi7UytsT2GiJlqW1X5aB+IrJfCYXNDO7MDYwh1yA4kYvKMGTNkkcxw4ghjdJLfQ9ntJRcgWxqsFUCsqDzg1e0U5FtsEvfGVIQ4J9nv90fNXEhcgmPLyEAh49KJW4WZlzezYSE172BvjDbZhc5JPn78eH/nlpubK7e1tcWQtjtRaDXpnLHaYkRflTdbSEhN65V4a4Plclo/IC/TDyV9ixCnNJWFw2EpPT2dBcKBBtHA3+FndmCmjsueuJnIf8/0/mQq79UlDkdpV+LGOnxQ7aljOmFwBTjxY8eOSXV1day9vV1SlFCHaFB3wroT8sdZ+kE4QuXFDMkSG7+ucZmUxdmdqrbU9WpIINQuiPO5CM5x4pTVYMdTucbgt8ejjeutj3K8Tg0jaU2aMY4nJWYQKm+mLT7d7kUW2GrDwRmFFpD8Xax3xSUmZcUfPhL7L2yvp9XJTv7ijgAv4ltBPK8rHNRCPf00QzKVRzs8p7Y6YRktCqy99foMrWN73bsnWJ/ZmTGbUVlkADRFDUarlIYKZkKYeWUjUYSm+0sWmraFxHdTaTkRhtnI2bHwKBBUA3iwSv6LcxPnjV4dI6J5vV61W+04JM5X7LBG3Mwr9820oPLxZln+zsQpac6kkdG5QDLs+7AyetwRat0FTvqsLEpeJDBaTU2NQocqBXl1f9PnH4uGmN5ZcSpmqu41KSUvffwWy4UJIzCIxlQ2bj/ILxnX1mq6Tx0EJwrVKlVjNFF8NKasbMSIEeqgQYOUWl91W0gNlIvGu0oPJH2h31Ti/VNeqP8dJrm6KQnDYIp5erKwZpR2j9JTfrRldy1x4mZMCYwWk7mxiPjVixcvqt3d3WpKSopS6z/9J/GA3ZsOJZW6mRp640h2Pk1bsWhoBzAToLo8fhES0t4fo+YXoblhWZbDtOcaLa5FbZziGyc/ZMgQpaenJ7yz4b1DqhpuxDV492RSNxuYeF4cWF6yiNmB8OyJ1B3SFlFI1ZSGj2o3grjS2dnJSescYyswa9eu5cQ7OjpwE0YodLGn/jVxHVJPFNfNc21PQiKiSJEIxgGFZ49XfETfthk+HGiO9B08wsOHD8deNd4fJa7rPi6G09LSeINPm97cHFT9R3gHSOqlT25m8WCWXCRzYvMpqUmkFYBxQOHZYedmNXdj36Cp6LvOJdTc3KzS4oKqC5cjSlz3dvhRurq6Qh6PJ0SDETrefvQP4h54y76fYwhg+ffRjfeRCi/kkrx+0Q9oVSRx2SpRbI8S7+iVuAiP+KrCiK0bvozx5Idat68KBoMhCmNBcKFQrYC4KDQC0SqrfhIS56oeCASC5ORCh5o/Pz7aO279CE/Oo7hvG70EBYrCPrX26CzM+uoxh0hnUWYyJd4VmSihWvvJxkheX2uY1e0qPRij4q09TW98/Z8D59B3CmNBUnMFoVpMTgT6LigI44eqB2kwMNxBchJvk8ofFTdtempLTNi4XCCdjWcWqLwgrH3w0g4eCaBVq1/6Kb+GPrz3u+3Re31K95cfnHv1dfSZPDn6HoKq06qvqvVZPey3Po6RKSsr49cwVWWRwXE2+M7tyxs87VZZktNwsZJSWVRhJxTksMsFPgyY85MZbGrhBJqDe5kzxRGd20MjOlq6qNqawSOBWDcHaQhAQCG7Pty66+l29WKz0+n0k8ZCVQITJ04M7dy5U1m3bl0M8XjVFgyIizYP2ckgUpnBdJw6OeOHuYWZC191ys6o8WJtepHNNXMrgDeHE0MuALLG9Bc2bVTvsBo+v6/ls1+ebDv8Ham4j8IxZmPdtMEzhljvPCSKeMT5wmF2dra7sbExlY4H0QZJe4n82L7ksWRT/OJdl1yVtQqELHhvoyMjSZ//V4T0WbfbHSCnxklTxdhPxdMgaXjY6NSMBPtBX0ODikPqbto4eXpwKj0Y5MfMHHbzI6mOtJhADOkXLikY8AGA9JFA7S49FDMZCij+ih31bz3V2FPbqpOGlLH5aION94vfAnELi3qtHddBHJ7Hy3Sp0+YhO3Ivzl65Yrgn+wFjO3j82UumDcgAxCMMNPnPbdhc98a7LpcLThikYdOQNrdtcmhhKrD0U3GBZBVVieKfg5wdJJ+Smprq9fl8kH4qvdATCoVc+ekFo28YvvgVh0H1BWACWGLGBzpjLK7KoGSEGgC2Pl8wckDK/247+MrR1t2YL8N+IVmfThh7YdcKS/Cda1LiqFHRJufk5LioLuch8h6dvJfIpxB5aITzjtE/v32kZ/wDTpMBAJC+YkkKWmD8ktlHCQqKmrUnL7BWIh3vs23YcmPgu798Wv/Xz0CM3h2mdwd0wnwjn9QzatSoEJXKw1pEZeMTYxagq73w9FB7Suw8XlVVvaRi+A/yuO64bfR9t2eljL09xeEtYAOAQNhfcabrm9J/XtyGPIKn1Lp6B3X19tN6gJ/m29ymSUgKUlMzh2aEncUDmdRe1tXeaPce/dilbxgAOT99evbEQdOuHebJvsHrSC2gpec0Ky/RmNrlV3wVneHWrw427/hHc7C+k/IJEFZ1KSOjDFDIEtLmSRb1LUR94/dZeY+tVROoPDaQo1TQTS9PoSlfik4cA0B9c7mpc1z6GAByghISoZkjivI8MuVRjqEjU52DRuossXir+UJdFHcCXfW+b09VtR9tMnReoefxNJqeCbsF6R7KygL03B56N8/OWK/3tkTaNnHWa/M8zrNIru8iOik0GeADQGHFTabh0q85qL/8Kwu0xSBgTwPB6BiLGMZn83SZzmuQMAhTWz5voEeGoNcgTtWUHiqW8OO8vLww+R5lz5494UT2PBDEY9rSQqOTHAmP91TFdNGChJsyPTdlelztqcMu6i+XvNiIkBQRHlcPHGv6sUbHIKzo56J1AZBkvR5cSFhUVBR2CbD69bIpysvLecdoAHqINOytm0ijJt9J3r+TVBLHXfrGkwsiJRIMLF1i76MBEue7qE0XqTPadYiNnFen3j6Ad5HGYSDwTcslkQYGamVULLrLpH7y6dOnuY1TGctFFR0hcYfhvujinQ6eaNBgYc6sEHm+0WAKqatEWJkwYYI6depUjYhbtuWrBW775GGd1FEXFQA8FFsR8+HRMdFBKocgPrTvRkgnh4l70ijPxtwAzpLnCLpDvSztvFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg=="},72533:(e,o,r)=>{r.r(o),r.d(o,{default:()=>ae});var i=r(89379),t=r(9950),n=r(99459),l=r(28429),s=r(2235),c=r(41413),a=r(47223),d=r(55158),x=r(93230),h=r(82053),u=r(16491),p=r(60899),g=r(82917),f=r(1320),A=r(25333),m=r(15769),j=r(69780),b=r(9213),v=r(21671),S=r(34075),w=r(83274),y=r(33738),k=r(14857),W=r(4159),C=r.n(W),z=r(31222),R=r(59212),Y=r(23787),I=r(56311),T=r(94826),J=r(81425),M=r(36150),P=r(60010),L=r(58691),N=r(96646),B=r(20466),H=r(26910),K=r(44414),D=r(36220);C().extend(D);const F=16,V="0 8px 24px rgba(15, 23, 42, 0.08)",Z="0 18px 50px rgba(15, 23, 42, 0.18)",E="#0f172a",q="#64748b",U="#94a3b8",G="#e2e8f0",O="#f1f5f9",Q="#f8fafc",X=(e,o)=>"".concat(e).concat(o),_=e=>X(e,"08"),$=e=>X(e,"18"),ee=e=>X(e,"26"),oe=e=>X(e,"55"),re="#662582",ie=e=>(0,K.jsx)(s.A,(0,i.A)((0,i.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:Z,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),te=e=>{let{color:o,selected:r,size:i=24,children:t}=e;return(0,K.jsx)(c.A,{sx:{width:i,height:i,bgcolor:r?o:$(o),color:r?"#fff":o,transition:"background-color 0.15s, color 0.15s"},children:t})},ne={active:{label:"Active",color:"#10b981",icon:z.mU9},inactive:{label:"Inactive",color:"#ef4444",icon:z.uDv},online:{label:"Online",color:"#10b981",icon:z.mU9},offline:{label:"Offline",color:"#ef4444",icon:z.uDv},idle:{label:"Idle",color:"#f59e0b",icon:z.VP9},unknown:{label:"Unknown",color:"#94a3b8",icon:z.gsJ}},le=[{key:0,label:"All Riders",color:re,icon:z.Itr,countKey:"total"},{key:1,label:"Active",color:"#10b981",icon:z.mU9,countKey:"active"}],se=e=>{var o,r,i;return[{key:"total",label:"Total Riders",color:re,icon:z.Itr,value:null!==(o=null===e||void 0===e?void 0:e.total)&&void 0!==o?o:0},{key:"active",label:"Active Riders",color:"#10b981",icon:z.mU9,value:null!==(r=null===e||void 0===e?void 0:e.active)&&void 0!==r?r:0},{key:"inactive",label:"Inactive Riders",color:"#ef4444",icon:z.uDv,value:null!==(i=null===e||void 0===e?void 0:e.inactive)&&void 0!==i?i:0}]},ce=e=>{let{color:o,icon:r,label:i,value:t}=e;return(0,K.jsx)(p.Ay,{item:!0,xs:6,sm:4,md:3,children:(0,K.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:1.125,py:.75,borderRadius:1.75,bgcolor:"#fff",border:"1px solid ".concat(oe(o)),minWidth:0},children:[(0,K.jsx)(te,{color:o,size:28,children:(0,K.jsx)(r,{size:14})}),(0,K.jsxs)(x.A,{sx:{minWidth:0},children:[(0,K.jsx)(h.A,{sx:{color:U,fontWeight:700,lineHeight:1,textTransform:"uppercase",letterSpacing:.4,fontSize:9.5},children:i}),(0,K.jsx)(h.A,{sx:{color:E,fontWeight:800,fontSize:13,lineHeight:1.2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",mt:.25},children:t})]})]})})},ae=()=>{const e=(0,l.Zp)(),o=(0,k.A)(),r=(0,a.A)(o.breakpoints.down("md")),W=(0,t.useRef)(),D=(0,t.useRef)(),[Z,X]=(0,t.useState)(""),[ae,de]=(0,t.useState)(""),[xe,he]=(0,t.useState)("All"),[ue,pe]=(0,t.useState)(0),[ge,fe]=(0,t.useState)(0),Ae=localStorage.getItem("roleid"),[me,je]=(0,t.useState)(null),[be,ve]=(0,t.useState)(null);n.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const{data:Se,isLoading:we}=(0,M.I)({queryKey:["allriders",ue,ge],queryFn:J.eF}),ye=async e=>{try{const o=await H.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getriderperiodiclogs?userid=").concat(e));0==o.data.data.length?(je(null),(0,B.k)(o.data.message,"error",2e3)):ve(o.data.data)}catch(o){(0,B.k)(o.message,"error",2e3)}},{data:ke,isLoading:We,isError:Ce,error:ze}=(0,M.I)({queryKey:["ridersStatus"],queryFn:J.bY}),{data:Re,isLoading:Ye,isFetchingNextPage:Ie,fetchNextPage:Te,hasNextPage:Je}=(0,P.q)({queryKey:["allriders",ue,ae,ge],queryFn:J.DM,getNextPageParam:(e,o)=>{var r;return null!==(r=e.details)&&void 0!==r&&r.length?o.length+1:void 0}}),Me=(null===Re||void 0===Re?void 0:Re.pages.flatMap((e=>e.details)))||[];(0,t.useEffect)((()=>{if(!Je)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Te()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return W.current&&e.observe(W.current),()=>{W.current&&e.unobserve(W.current)}}),[Je,Te]);const Pe=Ce?ze:null;(0,t.useEffect)((()=>{Pe&&(0,B.k)(Pe,"error",2e3)}),[Pe]);const Le=e=>{if(0==ge){const o="active"===(e.status||"").toLowerCase()?"active":"inactive";return ne[o]}const o=null===ke||void 0===ke?void 0:ke.find((o=>o.userid===e.userid)),r=((null===o||void 0===o?void 0:o.status)||"unknown").toLowerCase();return ne[r]||ne.unknown};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(d.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:Ye||we||We,children:(0,K.jsx)(T.A,{color:"inherit"})}),(0,K.jsx)(s.A,{elevation:0,sx:{mb:{xs:1.5,md:2},p:{xs:1.5,sm:2,md:2.5},borderRadius:F/8,border:"1px solid",borderColor:G,background:"linear-gradient(135deg, ".concat(_(re)," 0%, ").concat(_("#9255AB")," 100%)"),boxShadow:V},children:(0,K.jsxs)(x.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",spacing:{xs:1.5,sm:2},children:[(0,K.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:{xs:1.25,sm:1.75},children:[(0,K.jsx)(c.A,{sx:{width:{xs:40,sm:48},height:{xs:40,sm:48},bgcolor:re,color:"#fff",boxShadow:"0 6px 18px ".concat(ee(re))},children:(0,K.jsx)(z.bsz,{size:22})}),(0,K.jsxs)(x.A,{children:[(0,K.jsx)(h.A,{variant:"h3",sx:{fontWeight:800,color:E,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"}},children:"Riders"}),(0,K.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[(0,K.jsx)(u.A,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:"#10b981",boxShadow:"0 0 0 4px rgba(16,185,129,0.18)"}}),(0,K.jsxs)(h.A,{variant:"caption",sx:{color:q,fontWeight:600},children:["Live \xb7 ",xe||"All Zones"]})]})]})]}),(0,K.jsx)(R.A,{locaName:xe,setAppId:pe,setLocoName:he,pill:!0,accentColor:re,icon:(0,K.jsx)(z.HPi,{size:14}),placeholder:"Select Zone",paperComponent:ie,sx:{width:{xs:"100%",sm:280},zIndex:100}})]})}),(0,K.jsx)(p.Ay,{container:!0,spacing:{xs:1.25,sm:1.5,md:2},sx:{mt:"1px"},children:se(Se).map((e=>{const o=e.icon;return(0,K.jsx)(p.Ay,{item:!0,xs:12,sm:4,children:(0,K.jsxs)(s.A,{elevation:0,sx:{position:"relative",overflow:"hidden",p:{xs:1.25,sm:1.75,md:2.25},borderRadius:F/8,border:"1px solid",borderColor:G,background:"#fff",transition:"transform 0.2s, box-shadow 0.2s, border-color 0.2s","&:hover":{transform:"translateY(-3px)",boxShadow:V,borderColor:oe(e.color)}},children:[(0,K.jsx)(u.A,{sx:{position:"absolute",top:0,left:0,right:0,height:3,background:"linear-gradient(90deg, ".concat(e.color," 0%, ").concat($(e.color)," 100%)")}}),(0,K.jsxs)(x.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,K.jsxs)(x.A,{spacing:.5,sx:{minWidth:0,flex:1},children:[(0,K.jsx)(h.A,{variant:"caption",sx:{color:q,fontWeight:700,letterSpacing:.4,textTransform:"uppercase",fontSize:{xs:10,sm:11},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.label}),we?(0,K.jsx)(g.A,{sx:{width:70,height:{xs:28,md:36}},animation:"wave"}):(0,K.jsx)(h.A,{sx:{fontWeight:800,color:E,lineHeight:1.1,fontSize:{xs:"1.5rem",sm:"1.75rem",md:"2rem"}},children:e.value})]}),(0,K.jsx)(c.A,{sx:{width:{xs:36,sm:42,md:48},height:{xs:36,sm:42,md:48},bgcolor:$(e.color),color:e.color,boxShadow:"inset 0 0 0 1px ".concat(oe(e.color)),flexShrink:0},children:(0,K.jsx)(o,{size:20})})]})]})},e.key)}))}),(0,K.jsx)(s.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:F/8,borderTopRightRadius:F/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:G,borderBottom:0,background:"#fff"},children:(0,K.jsxs)(x.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,K.jsx)(x.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:G,borderRadius:4}},children:le.map((e=>{var o;const r=e.icon,i=ge===e.key,t=null!==(o=null===Se||void 0===Se?void 0:Se[e.countKey])&&void 0!==o?o:0;return(0,K.jsxs)(u.A,{onClick:()=>{return o=e.key,fe(o),void je(null);var o},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:999,border:"1.5px solid ".concat(i?e.color:oe(e.color)),bgcolor:i?e.color:_(e.color),color:i?"#fff":e.color,fontWeight:700,boxShadow:i?"0 6px 18px ".concat(ee(e.color)):"none",transition:"all 0.18s","&:hover":{borderColor:e.color,boxShadow:i?"0 6px 18px ".concat(ee(e.color)):"0 0 0 3px ".concat(ee(e.color))}},children:[(0,K.jsx)(c.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:i?"rgba(255,255,255,0.22)":$(e.color),color:i?"#fff":e.color},children:(0,K.jsx)(r,{size:13})}),(0,K.jsx)(h.A,{variant:"caption",sx:{fontWeight:800,fontSize:{xs:11.5,md:13},lineHeight:1},children:e.label}),(0,K.jsx)(u.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:800,bgcolor:i?"rgba(255,255,255,0.22)":"#fff",color:i?"#fff":e.color,border:i?"none":"1px solid ".concat(oe(e.color))},children:we?(0,K.jsx)(g.A,{variant:"text",width:14,height:10}):t})]},e.key)}))}),(0,K.jsx)(u.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,K.jsx)(I.A,{value:Z,onChange:X,onDebouncedChange:de,placeholder:"Search riders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:_(re),"& fieldset":{borderColor:oe(re),borderWidth:1.5},"&:hover fieldset":{borderColor:re},"&.Mui-focused fieldset":{borderColor:re,borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(ee(re))}}})})]})}),(0,K.jsx)(s.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:F/8,borderBottomRightRadius:F/8,border:"1px solid",borderColor:G,overflow:"hidden",background:"#fff"},children:(0,K.jsx)(f.A,{ref:D,onScroll:e=>{const{scrollTop:o,scrollHeight:r,clientHeight:i}=e.currentTarget;o+i>=r-50&&Je&&!Ie&&Te()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:oe(re),borderRadius:8,"&:hover":{backgroundColor:re}},"&::-webkit-scrollbar-track":{backgroundColor:Q}},children:r?(0,K.jsxs)(Y.nV,{sx:{p:1.25},children:[Ye&&(0,K.jsxs)(x.A,{alignItems:"center",sx:{py:6},children:[(0,K.jsx)(L.A,{}),(0,K.jsx)(h.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading riders\u2026"})]}),0===(null===Me||void 0===Me?void 0:Me.length)&&!Ye&&(0,K.jsxs)(x.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,K.jsx)(c.A,{sx:{width:64,height:64,bgcolor:$("#94a3b8"),color:U},children:(0,K.jsx)(z.aVM,{size:28})}),(0,K.jsx)(h.A,{variant:"subtitle1",sx:{fontWeight:700,color:E},children:"No riders to show"}),(0,K.jsx)(h.A,{variant:"caption",sx:{color:q,textAlign:"center",px:2},children:Z?"Try a different keyword.":"No ".concat(0===ge?"":"active ","riders for this zone.")})]}),0!==(null===Me||void 0===Me?void 0:Me.length)&&(null===Me||void 0===Me?void 0:Me.map(((o,r)=>{var i,t,n,l;const s=Le(o),a=s.icon,d=me===o.userid;return(0,K.jsxs)(Y.pg,{accent:s.color,selected:d,header:(0,K.jsxs)(x.A,{spacing:1.25,children:[(0,K.jsxs)(x.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,K.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,K.jsx)(h.A,{variant:"caption",sx:{fontWeight:700,color:U},children:String(r+1).padStart(2,"0")}),(0,K.jsxs)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:_(re),border:"1px solid ".concat(oe(re)),color:re,fontWeight:800,fontSize:11},children:["#",null===o||void 0===o?void 0:o.userid]}),(0,K.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:_(s.color),border:"1px solid ".concat(oe(s.color)),color:s.color},children:[(0,K.jsx)(te,{color:s.color,size:18,children:(0,K.jsx)(a,{size:11})}),(0,K.jsx)(h.A,{variant:"caption",sx:{fontWeight:800,fontSize:10.5,lineHeight:1},children:s.label})]})]}),1==Ae&&(0,K.jsxs)(x.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:[(0,K.jsx)(A.A,{size:"small",sx:{borderRadius:999,bgcolor:$(re),color:re,border:"1px solid ".concat(oe(re)),"&:hover":{bgcolor:re,color:"#fff"}},onClick:()=>{e("/nearle/riders/edit",{state:{riderdata:o}})},children:(0,K.jsx)(z.Yvo,{size:14})}),0!=ge&&(0,K.jsx)(A.A,{size:"small",sx:{borderRadius:999,bgcolor:d?"#0ea5e9":$("#0ea5e9"),color:d?"#fff":"#0ea5e9",border:"1px solid ".concat(oe("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},onClick:()=>{o.userid==me?je(null):(je(o.userid),ye(o.userid))},children:d?(0,K.jsx)(z.rAP,{size:14}):(0,K.jsx)(z.WnU,{size:14})})]})]}),(0,K.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,K.jsx)(c.A,{sx:{width:36,height:36,bgcolor:$(re),color:re,fontWeight:800,fontSize:16,border:"1px solid ".concat(oe(re)),flexShrink:0},children:(o.fullname||o.username||"?").charAt(0).toUpperCase()}),(0,K.jsxs)(u.A,{sx:{minWidth:0},children:[(0,K.jsx)(h.A,{sx:{fontWeight:800,color:E,fontSize:15},noWrap:!0,children:o.username||"\u2014"}),(0,K.jsx)(h.A,{variant:"caption",sx:{color:q},noWrap:!0,children:o.contactno||"\u2014"})]})]})]}),children:[(0,K.jsxs)(Y.FG,{children:[(0,K.jsxs)(Y.pY,{label:"Address",full:!0,children:[(0,K.jsx)(h.A,{sx:{fontSize:13,fontWeight:600,color:q},noWrap:!0,children:o.suburb||(o.address?o.address.slice(0,20)+"\u2026":"\u2014")}),(0,K.jsx)(h.A,{variant:"caption",sx:{color:U},noWrap:!0,children:o.city||""})]}),(0,K.jsx)(Y.pY,{label:"Vehicle",children:(0,K.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,K.jsx)(te,{color:"#0ea5e9",size:22,children:(0,K.jsx)(z.aVM,{size:12})}),(0,K.jsx)(h.A,{variant:"caption",sx:{fontWeight:700,color:E},children:o.vehicleno||"\u2014"})]})}),(0,K.jsx)(Y.pY,{label:"Shift",value:"#".concat(null!==(t=o.shiftid)&&void 0!==t?t:"\u2014")}),(0,K.jsx)(Y.pY,{label:"Time",children:(0,K.jsxs)(x.A,{spacing:.5,children:[(0,K.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:.875,py:.25,borderRadius:999,bgcolor:_("#10b981"),border:"1px solid ".concat(oe("#10b981")),color:"#10b981",fontSize:10.5,fontWeight:800},children:o.starttime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.starttime)).format("hh:mm A"):"\u2014"}),(0,K.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:.875,py:.25,borderRadius:999,bgcolor:_("#ef4444"),border:"1px solid ".concat(oe("#ef4444")),color:"#ef4444",fontSize:10.5,fontWeight:800},children:o.endtime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.endtime)).format("hh:mm A"):"\u2014"})]})}),(0,K.jsx)(Y.pY,{label:"Fare",value:null!==(n=o.basefare)&&void 0!==n?n:"\u2014"}),(0,K.jsx)(Y.pY,{label:"Fuel",value:null!==(l=o.fuelcharge)&&void 0!==l?l:"\u2014"})]}),d&&0!==ge&&(0,K.jsxs)(u.A,{sx:{mt:1.5,p:1.25,borderRadius:2,bgcolor:_(re),border:"1px solid ".concat(oe(re))},children:[(0,K.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1.25},children:[(0,K.jsx)(te,{color:re,size:26,children:(0,K.jsx)(z.o8z,{size:14})}),(0,K.jsxs)(h.A,{sx:{fontWeight:800,color:q,letterSpacing:.6,textTransform:"uppercase",fontSize:11},children:["Live telemetry \u2014 ",o.username||"Rider #".concat(o.userid)]})]}),(0,K.jsxs)(p.Ay,{container:!0,spacing:1.25,children:[(0,K.jsx)(ce,{color:"#ef4444",icon:z.gwi,label:"Location",value:null!==be&&void 0!==be&&be.latitude?"".concat(be.latitude,", ").concat(be.longitude):"\u2014"}),(0,K.jsx)(ce,{color:"#10b981",icon:z.E_J,label:"Battery",value:null!==be&&void 0!==be&&be.battery?"".concat(be.battery,"%"):"N/A"}),(0,K.jsx)(ce,{color:null!==be&&void 0!==be&&be.is_charging?"#10b981":"#94a3b8",icon:z.Im6,label:"Charging",value:null!==be&&void 0!==be&&be.is_charging?"Charging":"Not Charging"}),(0,K.jsx)(ce,{color:"#0ea5e9",icon:z.BJM,label:"Speed",value:void 0!==(null===be||void 0===be?void 0:be.speed)?"".concat(be.speed," km/h"):"\u2014"}),(0,K.jsx)(ce,{color:"#8b5cf6",icon:z.o8z,label:"Accuracy",value:void 0!==(null===be||void 0===be?void 0:be.accuracy)?"".concat(be.accuracy," m"):"\u2014"}),(0,K.jsx)(ce,{color:"#f59e0b",icon:z.VP9,label:"Log time",value:(null===be||void 0===be?void 0:be.logdate)||"\u2014"}),(0,K.jsx)(ce,{color:re,icon:z.gsJ,label:"Active order",value:(null===be||void 0===be?void 0:be.orderid)||"N/A"}),(0,K.jsx)(ce,{color:"idle"===(null===be||void 0===be?void 0:be.status)?"#f59e0b":"#10b981",icon:z.mU9,label:"Status",value:(null===be||void 0===be?void 0:be.status)||"unknown"})]})]})]},null!==(i=o.userid)&&void 0!==i?i:r)}))),0!==(null===Me||void 0===Me?void 0:Me.length)&&(0,K.jsx)("div",{ref:W,style:{height:40,textAlign:"center"},children:Ie||Je?(0,K.jsx)(L.A,{}):(0,K.jsx)(h.A,{variant:"caption",sx:{color:U,fontWeight:600},children:"No more riders"})})]}):(0,K.jsxs)(m.A,{stickyHeader:!0,sx:{minWidth:{xs:1100,md:1300}},children:[(0,K.jsx)(j.A,{children:(0,K.jsxs)(b.A,{sx:{"& th":{backgroundColor:Q,color:q,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(G),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,K.jsx)(v.A,{children:"#"}),(0,K.jsx)(v.A,{children:"ID"}),(0,K.jsx)(v.A,{children:"Rider"}),(0,K.jsx)(v.A,{children:"Address"}),(0,K.jsx)(v.A,{children:"Vehicle"}),(0,K.jsx)(v.A,{children:"Shift"}),(0,K.jsx)(v.A,{align:"center",children:"Time"}),(0,K.jsx)(v.A,{children:"Fare"}),(0,K.jsx)(v.A,{children:"Fuel"}),(0,K.jsx)(v.A,{align:"center",children:"Status"}),1==Ae&&(0,K.jsx)(v.A,{align:"right",children:"Action"})]})}),(0,K.jsxs)(S.A,{children:[Ye&&(0,K.jsx)(N.r,{col:6}),0===(null===Me||void 0===Me?void 0:Me.length)&&!Ye&&(0,K.jsx)(b.A,{children:(0,K.jsx)(v.A,{colSpan:1==Ae?11:10,sx:{py:6},children:(0,K.jsxs)(x.A,{alignItems:"center",spacing:1.5,children:[(0,K.jsx)(c.A,{sx:{width:64,height:64,bgcolor:$("#94a3b8"),color:U},children:(0,K.jsx)(z.aVM,{size:28})}),(0,K.jsx)(h.A,{variant:"subtitle1",sx:{fontWeight:700,color:E},children:"No riders to show"}),(0,K.jsx)(h.A,{variant:"caption",sx:{color:q},children:Z?"Try a different keyword.":"No ".concat(0===ge?"":"active ","riders for this zone.")})]})})}),0!==(null===Me||void 0===Me?void 0:Me.length)&&(null===Me||void 0===Me?void 0:Me.map(((o,r)=>{var n,l,s,a;const d=Le(o),g=d.icon,f=me===o.userid;return(0,K.jsxs)(t.Fragment,{children:[(0,K.jsxs)(b.A,{sx:(0,i.A)({cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(O),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:Q}},f&&{backgroundColor:_(re)}),children:[(0,K.jsx)(v.A,{children:(0,K.jsx)(h.A,{variant:"caption",sx:{fontWeight:700,color:U},children:String(r+1).padStart(2,"0")})}),(0,K.jsx)(v.A,{children:(0,K.jsxs)(u.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:_(re),border:"1px solid ".concat(oe(re)),color:re,fontWeight:800,fontSize:11,minWidth:56},children:["#",null===o||void 0===o?void 0:o.userid]})}),(0,K.jsx)(v.A,{children:(0,K.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,K.jsx)(c.A,{sx:{width:36,height:36,bgcolor:$(re),color:re,fontWeight:800,fontSize:16,border:"1px solid ".concat(oe(re))},children:(o.fullname||o.username||"?").charAt(0).toUpperCase()}),(0,K.jsxs)(x.A,{sx:{minWidth:0},children:[(0,K.jsx)(h.A,{variant:"subtitle2",sx:{fontWeight:700,color:E,whiteSpace:"nowrap"},children:o.username||"\u2014"}),(0,K.jsx)(h.A,{variant:"caption",sx:{color:q},children:o.contactno||"\u2014"})]})]})}),(0,K.jsx)(v.A,{sx:{maxWidth:220},children:(0,K.jsx)(w.A,{title:o.address||"",placement:"top",children:(0,K.jsxs)(x.A,{children:[(0,K.jsx)(h.A,{variant:"caption",sx:{color:q,fontWeight:600},noWrap:!0,children:o.suburb||(o.address?o.address.slice(0,20)+"\u2026":"\u2014")}),(0,K.jsx)(h.A,{variant:"caption",sx:{color:U},noWrap:!0,children:o.city||""})]})})}),(0,K.jsx)(v.A,{children:(0,K.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,K.jsx)(te,{color:"#0ea5e9",size:22,children:(0,K.jsx)(z.aVM,{size:12})}),(0,K.jsx)(h.A,{variant:"caption",sx:{fontWeight:700,color:E},children:o.vehicleno||"\u2014"})]})}),(0,K.jsx)(v.A,{children:(0,K.jsxs)(h.A,{variant:"caption",sx:{color:q,fontWeight:600},children:["#",null!==(l=o.shiftid)&&void 0!==l?l:"\u2014"]})}),(0,K.jsx)(v.A,{align:"center",children:(0,K.jsxs)(x.A,{spacing:.5,alignItems:"center",children:[(0,K.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",gap:.375,px:.875,py:.25,borderRadius:999,bgcolor:_("#10b981"),border:"1px solid ".concat(oe("#10b981")),color:"#10b981",fontSize:10.5,fontWeight:800,minWidth:88,justifyContent:"center"},children:o.starttime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.starttime)).format("hh:mm A"):"\u2014"}),(0,K.jsx)(u.A,{sx:{display:"inline-flex",alignItems:"center",gap:.375,px:.875,py:.25,borderRadius:999,bgcolor:_("#ef4444"),border:"1px solid ".concat(oe("#ef4444")),color:"#ef4444",fontSize:10.5,fontWeight:800,minWidth:88,justifyContent:"center"},children:o.endtime?C()("".concat(C()().format("MM-DD-YYYY")," ").concat(o.endtime)).format("hh:mm A"):"\u2014"})]})}),(0,K.jsx)(v.A,{children:(0,K.jsx)(h.A,{variant:"caption",sx:{fontWeight:700,color:E},children:null!==(s=o.basefare)&&void 0!==s?s:"\u2014"})}),(0,K.jsx)(v.A,{children:(0,K.jsx)(h.A,{variant:"caption",sx:{fontWeight:700,color:E},children:null!==(a=o.fuelcharge)&&void 0!==a?a:"\u2014"})}),(0,K.jsx)(v.A,{align:"center",children:(0,K.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:_(d.color),border:"1px solid ".concat(oe(d.color)),color:d.color},children:[(0,K.jsx)(te,{color:d.color,size:20,children:(0,K.jsx)(g,{size:12})}),(0,K.jsx)(h.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:d.label})]})}),1==Ae&&(0,K.jsx)(v.A,{align:"right",children:(0,K.jsxs)(x.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[(0,K.jsx)(w.A,{title:"Edit rider",placement:"top",children:(0,K.jsx)(A.A,{size:"small",sx:{bgcolor:$(re),color:re,border:"1px solid ".concat(oe(re)),"&:hover":{bgcolor:re,color:"#fff"}},onClick:()=>{e("/nearle/riders/edit",{state:{riderdata:o}})},children:(0,K.jsx)(z.Yvo,{size:14})})}),0!=ge&&(0,K.jsx)(w.A,{title:f?"Hide logs":"View live logs",placement:"top",children:(0,K.jsx)(A.A,{size:"small",sx:{bgcolor:f?"#0ea5e9":$("#0ea5e9"),color:f?"#fff":"#0ea5e9",border:"1px solid ".concat(oe("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},onClick:()=>{o.userid==me?je(null):(je(o.userid),ye(o.userid))},children:f?(0,K.jsx)(z.rAP,{size:14}):(0,K.jsx)(z.WnU,{size:14})})})]})})]}),f&&0!==ge&&(0,K.jsx)(b.A,{children:(0,K.jsx)(v.A,{colSpan:1==Ae?11:10,sx:{p:0,borderBottom:"1px solid ".concat(O)},children:(0,K.jsx)(y.A,{in:f,timeout:"auto",unmountOnExit:!0,children:(0,K.jsxs)(u.A,{sx:{p:{xs:1.5,md:2},bgcolor:_(re),borderTop:"1px solid ".concat(oe(re))},children:[(0,K.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1.25},children:[(0,K.jsx)(te,{color:re,size:26,children:(0,K.jsx)(z.o8z,{size:14})}),(0,K.jsxs)(h.A,{sx:{fontWeight:800,color:q,letterSpacing:.6,textTransform:"uppercase",fontSize:11},children:["Live telemetry \u2014 ",o.username||"Rider #".concat(o.userid)]})]}),(0,K.jsxs)(p.Ay,{container:!0,spacing:1.25,children:[(0,K.jsx)(ce,{color:"#ef4444",icon:z.gwi,label:"Location",value:null!==be&&void 0!==be&&be.latitude?"".concat(be.latitude,", ").concat(be.longitude):"\u2014"}),(0,K.jsx)(ce,{color:"#10b981",icon:z.E_J,label:"Battery",value:null!==be&&void 0!==be&&be.battery?"".concat(be.battery,"%"):"N/A"}),(0,K.jsx)(ce,{color:null!==be&&void 0!==be&&be.is_charging?"#10b981":"#94a3b8",icon:z.Im6,label:"Charging",value:null!==be&&void 0!==be&&be.is_charging?"Charging":"Not Charging"}),(0,K.jsx)(ce,{color:"#0ea5e9",icon:z.BJM,label:"Speed",value:void 0!==(null===be||void 0===be?void 0:be.speed)?"".concat(be.speed," km/h"):"\u2014"}),(0,K.jsx)(ce,{color:"#8b5cf6",icon:z.o8z,label:"Accuracy",value:void 0!==(null===be||void 0===be?void 0:be.accuracy)?"".concat(be.accuracy," m"):"\u2014"}),(0,K.jsx)(ce,{color:"#f59e0b",icon:z.VP9,label:"Log time",value:(null===be||void 0===be?void 0:be.logdate)||"\u2014"}),(0,K.jsx)(ce,{color:re,icon:z.gsJ,label:"Active order",value:(null===be||void 0===be?void 0:be.orderid)||"N/A"}),(0,K.jsx)(ce,{color:"idle"===(null===be||void 0===be?void 0:be.status)?"#f59e0b":"#10b981",icon:z.mU9,label:"Status",value:(null===be||void 0===be?void 0:be.status)||"unknown"})]})]})})})})]},null!==(n=o.userid)&&void 0!==n?n:r)}))),0!==(null===Me||void 0===Me?void 0:Me.length)&&(0,K.jsx)(b.A,{children:(0,K.jsx)(v.A,{colSpan:1==Ae?11:10,sx:{borderBottom:"none"},children:(0,K.jsx)("div",{ref:W,style:{height:40,textAlign:"center"},children:Ie||Je?(0,K.jsx)(L.A,{}):(0,K.jsx)(h.A,{variant:"caption",sx:{color:U,fontWeight:600},children:"No more riders"})})})})]})]})})})]})}},94826:(e,o,r)=>{r.d(o,{A:()=>a});var i=r(59254),t=r(46639),n=r(62217),l=r(44414);const s=(0,i.Ay)("div")((()=>({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}))),c=(0,i.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),a=()=>(0,l.jsxs)(s,{children:[(0,l.jsx)(t.A,{color:"primary",size:80,thickness:6}),(0,l.jsx)(c,{children:(0,l.jsx)("img",{src:n,alt:"Logo",style:{width:"100%",height:"100%"}})})]})},96646:(e,o,r)=>{r.d(o,{r:()=>c});var i=r(9213),t=r(21671),n=r(82917),l=r(93230),s=r(44414);const c=e=>{let{rowsPerPage:o=5,col:r=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(o)).map(((e,o)=>(0,s.jsxs)(i.A,{children:[(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"text",width:30})}),Array.from({length:r}).map(((e,o)=>(0,s.jsx)(t.A,{children:(0,s.jsxs)(l.A,{spacing:.5,children:[(0,s.jsx)(n.A,{variant:"text",width:100}),(0,s.jsx)(n.A,{variant:"text",width:80})]})},o))),(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"text",width:150})}),(0,s.jsx)(t.A,{children:(0,s.jsx)(n.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(t.A,{align:"center",children:(0,s.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(n.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(n.A,{variant:"circular",width:28,height:28})]})})]},o)))})}}}]); \ No newline at end of file diff --git a/build/static/js/2851.3a0ed207.chunk.js b/build/static/js/2851.3a0ed207.chunk.js new file mode 100644 index 0000000..8b54427 --- /dev/null +++ b/build/static/js/2851.3a0ed207.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2851],{22851:(e,o,r)=>{r.r(o),r.d(o,{default:()=>Be});var t=r(89379),i=r(85571),n=r(8881),l=r(24513),s=r(36256),d=r(9950),c=r(4159),a=r.n(c),h=r(26910),x=r(14857),u=r(31222),p=r(51778),g=r(36150),f=r(60010),v=r(2235),A=r(41413),b=r(47223),m=r(55158),j=r(60899),w=r(93230),S=r(82053),y=r(77922),W=r(25277),C=r(29925),k=r(16491),R=r(1320),z=r(93038),D=r(25333),P=r(15769),I=r(69780),L=r(9213),M=r(21671),Y=r(34075),T=r(83274),F=r(33738),E=r(17239),K=r(23266),O=r(96583),N=r(28170),H=r(82223),B=r(40033),J=r(79739),q=r(37476),G=r(56712),Z=r(81417),U=r(96600),V=r(53132),Q=r(94289),X=r(57326),_=r(50624),$=r(55916),ee=r(52351),oe=r(67562),re=r(49883),te=r(81425),ie=r(56311),ne=r(20466),le=r(96646),se=r(59212),de=r(58691),ce=r(27001),ae=r(36803),he=r(23787),xe=r(44414),ue=r(36220);a().extend(ue);const pe=14,ge=10,fe="0 1px 3px rgba(15, 23, 42, 0.06)",ve="0 12px 32px rgba(15, 23, 42, 0.12)",Ae="#0f172a",be="#64748b",me="#94a3b8",je="#e2e8f0",we="#cbd5e1",Se="#f1f5f9",ye="#ffffff",We="#f8fafc",Ce="#662582",ke=(e,o)=>"".concat(e).concat(o),Re=e=>ke(e,"08"),ze=e=>ke(e,"18"),De=e=>ke(e,"26"),Pe=e=>ke(e,"55"),Ie=()=>({cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:ge+"px",bgcolor:ye,fontWeight:600,color:Ae,paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:je,borderWidth:1},"&:hover fieldset":{borderColor:we},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De(Ce))},"&.Mui-focused fieldset":{borderColor:Ce,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:me}}),Le={pending:{label:"Pending",color:"#f59e0b",icon:u.tX0},accepted:{label:"Accepted",color:"#6366f1",icon:u.Azs},arrived:{label:"Arrived",color:"#06b6d4",icon:u.gwi},picked:{label:"Picked",color:"#8b5cf6",icon:u.gsJ},active:{label:"Active",color:"#14b8a6",icon:u.pk7},skipped:{label:"Skipped",color:"#f97316",icon:u.ivF},delivered:{label:"Delivered",color:"#10b981",icon:u.mU9},cancelled:{label:"Cancelled",color:"#ef4444",icon:u.uDv}},Me=[{status:"pending",countKey:"uncoveredLength"},{status:"accepted",countKey:"assignedLength"},{status:"arrived",countKey:"arrivedLength"},{status:"picked",countKey:"pickedLength"},{status:"active",countKey:"activeLength"},{status:"skipped",countKey:"skippedLength"},{status:"delivered",countKey:"coveredLength"},{status:"cancelled",countKey:"cancelLength"}],Ye=[{key:"created",label:"Created Orders",color:"#0ea5e9",icon:u.HU2},{key:"pending",label:"Pending Orders",color:"#f59e0b",icon:u.G6c},{key:"delivered",label:"Delivered Orders",color:"#10b981",icon:u.cAP},{key:"cancelled",label:"Cancelled Orders",color:"#ef4444",icon:u.qiG}],Te=[{id:"all",label:"All Batches",range:"Across the day",color:"#7c3aed",iconKey:"all"},{id:"morning",label:"Morning Batch",range:"12 AM to 8 AM",color:"#0ea5e9",iconKey:"morning",startHour:0,endHour:8},{id:"afternoon",label:"Afternoon Batch",range:"9 AM to 12:30 PM",color:"#f59e0b",iconKey:"afternoon",startHour:9,endHour:12.5},{id:"evening",label:"Evening Batch",range:"4 PM to 7 PM",color:"#6366f1",iconKey:"evening",startHour:16,endHour:19}],Fe={all:u.lB9,morning:u.N3N,afternoon:u.aSE,evening:u.giK},Ee=()=>{const e=a()(),o=e.hour()+e.minute()/60;for(const r of Te)if("all"!==r.id&&o>=r.startHour&&o{let o=null;for(const n of Ke)if(null!==e&&void 0!==e&&e[n]){o=e[n];break}if(!o)return null;const r=String(o).trim();if(/^\d{4}-\d{2}-\d{2}$/.test(r))return null;const t=a()(o);if(!t.isValid())return null;const i=t.hour()+t.minute()/60;for(const n of Te)if("all"!==n.id&&i>=n.startHour&&i(0,xe.jsx)(v.A,(0,t.A)((0,t.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:ve,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),He=e=>{let{color:o,selected:r,size:t=24,children:i}=e;return(0,xe.jsx)(A.A,{sx:{width:t,height:t,bgcolor:r?o:ze(o),color:r?"#fff":o,transition:"background-color 0.15s, color 0.15s"},children:i})},Be=()=>{const e=localStorage.getItem("userid"),o=(0,x.A)(),r=(0,b.A)(o.breakpoints.down("md")),c=(0,d.useRef)(),ue=(0,d.useRef)(),[ke,Ke]=(0,d.useState)([]),[Be,Je]=(0,d.useState)(!1),[qe,Ge]=(0,d.useState)("All"),[Ze,Ue]=(0,d.useState)(0),[Ve,Qe]=(0,d.useState)(a()().format("YYYY-MM-DD")),[Xe,_e]=(0,d.useState)(a()().format("YYYY-MM-DD")),[$e,eo]=(0,d.useState)("Pending"),[oo,ro]=(0,d.useState)(0),[to,io]=(0,d.useState)(!1),[no,lo]=(0,d.useState)("Today"),[so,co]=(0,d.useState)(""),[ao,ho]=(0,d.useState)(),[xo,uo]=(0,d.useState)(),[po,go]=(0,d.useState)(""),[fo,vo]=(0,d.useState)({}),[Ao,bo]=(0,d.useState)(""),[mo,jo]=(0,d.useState)(""),[wo,So]=(0,d.useState)("pending"),[yo,Wo]=(0,d.useState)("delivered"),Co=(0,d.useRef)(null),ko=(0,d.useRef)(null),[Ro,zo]=d.useState(0),[Do,Po]=d.useState(50),[Io,Lo]=d.useState(),[Mo,Yo]=(0,d.useState)(null),[To,Fo]=(0,d.useState)(null),[Eo,Ko]=(0,d.useState)(""),[Oo,No]=(0,d.useState)(""),[Ho,Bo]=d.useState(null),[Jo,qo]=(0,d.useState)(null),[Go,Zo]=(0,d.useState)(!1),[Uo,Vo]=d.useState(null),[Qo,Xo]=(0,d.useState)(""),[_o,$o]=(0,d.useState)(!1),[er,or]=(0,d.useState)(!1),[rr,tr]=(0,d.useState)(""),[ir,nr]=(0,d.useState)(null),[lr,sr]=(0,d.useState)(0),[dr,cr]=(0,d.useState)(0),[ar,hr]=(0,d.useState)(null),[xr,ur]=(0,d.useState)(null),[pr,gr]=(0,d.useState)(0),[fr,vr]=(0,d.useState)(Ee),Ar=localStorage.getItem("roleid");(0,d.useEffect)((()=>{sr(0),hr(null),cr(0),ur(null)}),[Ze]),(0,d.useEffect)((()=>{cr(0),ur(null)}),[lr]);const br=Boolean(Ho),mr=(e,o)=>{qo(o),console.log("selectedRow",o),Bo(e.currentTarget)},jr=()=>{Bo(null)},{mutate:wr}=(0,p.n)({mutationFn:e=>{let{selectedRow:o,cancelFeed:r}=e;return(0,te.zF)(o,r)},onSuccess:()=>{Lr("Delivery Cancelled Successfully","success"),$o(!1),ot(),Kr(),qr()},onError:e=>{Lr(e.message,"error")}}),{data:Sr,isLoading:yr,isError:Wr,error:Cr}=(0,g.I)({queryKey:["tenantlist",Ze],queryFn:()=>(0,te.Mn)(Ze),enabled:0!==Ze}),{data:kr,isLoading:Rr,isError:zr,error:Dr}=(0,g.I)({queryKey:["gettenantlocations",lr],queryFn:()=>(0,te.DL)(lr),enabled:0!==lr}),Pr=(0,p.n)({mutationFn:te.k3,onSuccess:()=>{(0,n.M8)("Notification sent Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})},onError:e=>{(0,n.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}}),Ir=(0,p.n)({mutationFn:e=>{let{selectedRider:o,selectedRow:r}=e;return(0,te.R_)(o,r)},onSuccess:(e,o)=>{let{selectedRider:r,selectedRow:t}=o;Zo(!1),or(!1),"Success"===e.data.message&&(i.A.info("Rider changed successfully for order ID ".concat(null===t||void 0===t?void 0:t.orderid,". New Rider: ").concat(null===r||void 0===r?void 0:r.firstname," ").concat(null===r||void 0===r?void 0:r.lastname)),Lr("Rider Changed Successfully","success")),ot(),Kr(),qr(),Pr.mutate(r.userfcmtoken)},onError:(e,o)=>{let{selectedRider:r,selectedRow:t}=o;i.A.error("Failed to change rider for order ID ".concat(null===t||void 0===t?void 0:t.orderid,":"),e),Lr(e.message,"error"),Zo(!1)}}),Lr=(e,o)=>{(0,n.M8)(e,{variant:o,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})},{data:Mr}=(0,g.I)({queryKey:["orderdetails",To],queryFn:()=>(0,te.z3)(To),enabled:!!To}),Yr=()=>{Je(!1)},{isLoading:Tr,isError:Fr,error:Er,refetch:Kr}=(0,f.q)({queryKey:["fetchdeliveries",Ze,e,wo,Ve,Xe,Do,Oo,lr,dr,pr],queryFn:te.tL,getNextPageParam:e=>{var o;return null!==(o=e.nextPage)&&void 0!==o?o:void 0}}),{data:Or,fetchNextPage:Nr,hasNextPage:Hr,isFetchingNextPage:Br,isLoading:Jr,refetch:qr}=(0,f.q)({queryKey:["fetchdeliveries-batchcounts",Ze,e,"all",Ve,Xe,200,"",lr,dr,pr],queryFn:te.tL,getNextPageParam:e=>{var o;return null!==(o=e.nextPage)&&void 0!==o?o:void 0}}),Gr=(0,d.useMemo)((()=>((null===Or||void 0===Or?void 0:Or.pages)||[]).flatMap((e=>e.rows||[]))),[Or]);(0,d.useEffect)((()=>{Hr&&!Br&&Nr()}),[Hr,Br,Nr,Gr.length]);const Zr=Hr||Br,Ur=(0,d.useMemo)((()=>{const e=String(wo||"").toLowerCase(),o=String(Oo||"").trim().toLowerCase();return Gr.filter((r=>{if("all"!==fr&&Oe(r)!==fr)return!1;const t=String(r.orderstatus||"").toLowerCase();if(e&&t!==e)return!1;if(o){if(![r.deliverycustomer,r.deliveryaddress,r.deliverysuburb,r.pickupcustomer,r.pickupaddress,r.pickupsuburb,r.orderid,r.tenantname,r.ridername,r.username].map((e=>String(e||"").toLowerCase())).join(" ").includes(o))return!1}return!0}))}),[Gr,fr,wo,Oo]),Vr=(0,d.useMemo)((()=>{const e={uncoveredLength:0,assignedLength:0,arrivedLength:0,pickedLength:0,activeLength:0,skippedLength:0,coveredLength:0,cancelLength:0};return Gr.forEach((o=>{if("all"!==fr&&Oe(o)!==fr)return;switch(String(o.orderstatus||"").toLowerCase()){case"pending":e.uncoveredLength+=1;break;case"accepted":case"assigned":e.assignedLength+=1;break;case"arrived":e.arrivedLength+=1;break;case"picked":e.pickedLength+=1;break;case"active":e.activeLength+=1;break;case"skipped":e.skippedLength+=1;break;case"delivered":e.coveredLength+=1;break;case"cancelled":case"canceled":e.cancelLength+=1}})),e}),[Gr,fr]),Qr=(0,d.useMemo)((()=>{const e={all:0};return Te.forEach((o=>{"all"!==o.id&&(e[o.id]=0)})),Gr.forEach((o=>{const r=Oe(o);r&&(e[r]=(e[r]||0)+1,e.all+=1)})),e}),[Gr]);(0,d.useEffect)((()=>{if(!Hr)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Nr()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return c.current&&e.observe(c.current),()=>{c.current&&e.unobserve(c.current)}}),[Hr,Nr]);const{data:Xr={},isLoading:_r,isError:$r,error:et,refetch:ot}=(0,g.I)({queryKey:["fetchCountData",Ze,e,Ve,Xe,Do,Oo,lr,dr,pr,$e],queryFn:()=>(0,te.qB)(Ze,e,Ve,Xe,Do,Oo,lr,dr,pr)});(0,d.useEffect)((()=>{console.log("countData",Xr),0===oo&&Xr&&Lo(Xr.uncoveredLength)}),[Xr]);const{data:rt=[],isLoading:tt,isError:it,error:nt}=(0,g.I)({queryKey:["ridersList",Ze],queryFn:te.Sd,enabled:Boolean(Ze),onError:e=>{(0,ne.k)(e.message,"error",2e3)}}),lt=(0,p.n)({mutationFn:e=>(0,te.wT)(e),onSuccess:e=>{console.log(e),e.data.status&&(Lr("Updated Successfully","success"),uo(""),go(""),Je(!1),Kr(),ot(),qr())},onError:e=>{console.log(e),Lr(e.message,"success")}}),st=Fr?"Error fetching deliveries: ".concat(null===Er||void 0===Er?void 0:Er.message):$r?"Error fetching count summary: ".concat(null===et||void 0===et?void 0:et.message):it?"Error fetching riders: ".concat(null===nt||void 0===nt?void 0:nt.message):Wr?"Error tenant list: ".concat(null===Cr||void 0===Cr?void 0:Cr.message):zr?"Error location list: ".concat(null===Dr||void 0===Dr?void 0:Dr.message):null;return st?(console.log("errorMessage",st),(0,ne.k)(st,"error",2e3),null):(0,xe.jsxs)(xe.Fragment,{children:[(_r||Jr||yr||Rr||tt)&&(0,xe.jsx)(xe.Fragment,{children:(0,xe.jsx)(ee.A,{})}),(0,xe.jsx)(m.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:_r||Tr||yr||Rr||tt}),(0,xe.jsx)(ce.A,{title:"Deliveries",subtitle:"Live \xb7 ".concat(qe||"All Zones"),live:!0,action:(0,xe.jsx)(se.A,{ref:Co,locaName:qe,setAppId:Ue,setLocoName:Ge,setPage:zo,pill:!0,accentColor:"#662582",icon:(0,xe.jsx)(u.HPi,{size:14}),placeholder:"Select Zone",paperComponent:Ne,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,xe.jsx)(j.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:[(0,t.A)((0,t.A)({},Ye[0]),{},{value:Qr.all,percentage:null}),(0,t.A)((0,t.A)({},Ye[1]),{},{value:null===Xr||void 0===Xr?void 0:Xr.uncoveredLength,percentage:null!==Xr&&void 0!==Xr&&Xr.total?Math.round(Xr.uncoveredLength/Xr.total*100):0}),(0,t.A)((0,t.A)({},Ye[2]),{},{value:null===Xr||void 0===Xr?void 0:Xr.coveredLength,percentage:null!==Xr&&void 0!==Xr&&Xr.total?Math.round(Xr.coveredLength/Xr.total*100):0}),(0,t.A)((0,t.A)({},Ye[3]),{},{value:null===Xr||void 0===Xr?void 0:Xr.cancelLength,percentage:null!==Xr&&void 0!==Xr&&Xr.total?Math.round(Xr.cancelLength/Xr.total*100):0})].map((e=>{var o;const r=e.icon,t="number"===typeof e.percentage?e.percentage:Number(e.percentage),i=!Number.isNaN(t)&&void 0!==e.percentage&&null!==e.percentage;return(0,xe.jsx)(j.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,xe.jsx)(ae.A,{title:e.label,value:null!==(o=e.value)&&void 0!==o?o:0,icon:(0,xe.jsx)(r,{size:20}),color:e.color,loading:_r,caption:i?"".concat(Math.abs(t),"% of total"):void 0})},e.key)}))}),(0,xe.jsxs)(v.A,{elevation:0,sx:{mt:{xs:1.5,md:2},mb:{xs:1.5,md:2},p:{xs:1.5,md:2},borderRadius:pe/8,border:"1px solid",borderColor:je,background:"#fff",boxShadow:fe},children:[(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:{xs:1,md:1.5},color:be},children:[(0,xe.jsx)(A.A,{sx:{width:28,height:28,bgcolor:ze("#662582"),color:"#662582"},children:(0,xe.jsx)(u.MiI,{size:16})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:800,letterSpacing:.6,textTransform:"uppercase",color:be},children:"Filters"})]}),(0,xe.jsxs)(w.A,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:1.25,sx:{flexWrap:"wrap"},children:[(0,xe.jsxs)(w.A,{direction:"row",flexWrap:"wrap",gap:1.5,alignItems:"center",children:[(()=>{const e=Te.find((e=>e.id===fr))||Te[0],o=Fe[e.iconKey]||u.VP9;return(0,xe.jsx)(y.A,{disableClearable:!0,size:"small",openOnFocus:!0,selectOnFocus:!0,filterOptions:e=>e,options:Te,value:e,onChange:(e,o)=>o&&vr(o.id),getOptionLabel:e=>e.label,isOptionEqualToValue:(e,o)=>e.id===o.id,PaperComponent:Ne,ListboxProps:{sx:{py:0,maxHeight:360}},renderOption:(e,o,r)=>{var i;let{selected:n}=r;const l=Fe[o.iconKey]||u.VP9,s=null!==(i=Qr[o.id])&&void 0!==i?i:0;return(0,d.createElement)("li",(0,t.A)((0,t.A)({},e),{},{key:o.id,style:{display:"flex",alignItems:"center",gap:12,padding:"10px 14px",borderBottom:"1px solid #f1f5f9",backgroundColor:n?"".concat(o.color,"10"):"transparent",transition:"background-color 0.15s"}}),(0,xe.jsx)(A.A,{sx:{width:36,height:36,bgcolor:n?o.color:"".concat(o.color,"18"),color:n?"#fff":o.color,transition:"background-color 0.15s, color 0.15s"},children:(0,xe.jsx)(l,{size:20})}),(0,xe.jsxs)(w.A,{direction:"column",spacing:0,flex:1,minWidth:0,children:[(0,xe.jsx)(S.A,{variant:"body2",fontWeight:700,color:"#0f172a",noWrap:!0,children:o.label}),(0,xe.jsx)(S.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:o.range})]}),(0,xe.jsx)(W.A,{size:"small",label:s,sx:{minWidth:36,height:22,fontWeight:800,fontSize:11,bgcolor:s>0?"".concat(o.color,"18"):"#f1f5f9",color:s>0?o.color:"#94a3b8",border:"1px solid ".concat(s>0?o.color+"55":"#e2e8f0"),"& .MuiChip-label":{px:.75}}}),n&&(0,xe.jsx)(A.A,{sx:{width:22,height:22,bgcolor:o.color,color:"#fff"},children:(0,xe.jsx)(u.g9_,{size:14})}))},renderInput:r=>{var i;return(0,xe.jsx)(C.A,(0,t.A)((0,t.A)({},r),{},{placeholder:"Batch",inputProps:(0,t.A)((0,t.A)({},r.inputProps),{},{readOnly:!0,style:(0,t.A)((0,t.A)({},(null===(i=r.inputProps)||void 0===i?void 0:i.style)||{}),{},{cursor:"pointer",caretColor:"transparent"})}),InputProps:(0,t.A)((0,t.A)({},r.InputProps),{},{startAdornment:(0,xe.jsx)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(A.A,{sx:{width:24,height:24,bgcolor:"".concat(e.color,"18"),color:e.color},children:(0,xe.jsx)(o,{size:14})})})}),sx:{minWidth:{xs:180,sm:220,md:240},cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De("#662582"))},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}}))}})})(),Ve&&Xe&&(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:.75,onClick:()=>io(!0),sx:{pl:.5,pr:1.25,py:.5,borderRadius:"10px",cursor:"pointer",bgcolor:"#ffffff",border:"1px solid #e2e8f0",transition:"border-color 0.15s","&:hover":{borderColor:"#cbd5e1"}},children:[(0,xe.jsx)(He,{color:"#94a3b8",children:(0,xe.jsx)(u.tjE,{size:14})}),(0,xe.jsxs)(S.A,{variant:"caption",sx:{fontWeight:600,color:"#475569",whiteSpace:"nowrap"},children:[a()(Ve).format("DD MMM")," \u2013 ",a()(Xe).format("DD MMM")]})]})]}),(0,xe.jsx)(y.A,{disablePortal:!0,options:Sr||[],value:ar,PaperComponent:Ne,sx:{flex:{xs:"1 1 100%",sm:"1 1 180px"},minWidth:{xs:"100%",sm:180}},onOpen:e=>{Ze||(e.preventDefault(),(0,ne.k)("Please select your zone first!","warning",3e3),setTimeout((()=>{var e;return null===(e=Co.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,o,r)=>{"clear"===r?(sr(0),hr(null),cr(0),ur(null)):(sr((null===o||void 0===o?void 0:o.tenantid)||0),hr(o),cr(0),ur(null))},renderInput:e=>(0,xe.jsx)(C.A,(0,t.A)((0,t.A)({},e),{},{inputRef:ko,placeholder:"Select Tenant",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(He,{color:"#94a3b8",children:(0,xe.jsx)(u.gl1,{size:14})})})}),sx:Ie()}))}),(0,xe.jsx)(y.A,{disablePortal:!0,options:kr||[],getOptionLabel:e=>"".concat(e.locationname," (").concat(e.suburb,")")||0,value:xr,PaperComponent:Ne,sx:{flex:{xs:"1 1 100%",sm:"1 1 180px"},minWidth:{xs:"100%",sm:180}},onOpen:e=>{Ze||lr?lr||(e.preventDefault(),(0,ne.k)("Please select your Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=ko.current)||void 0===e?void 0:e.focus()}),0)):(e.preventDefault(),(0,ne.k)("Please select your Zone and Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=Co.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,o,r)=>{"clear"===r?(cr(0),ur(null)):(cr(o.locationid||0),ur(o))},renderInput:e=>(0,xe.jsx)(C.A,(0,t.A)((0,t.A)({},e),{},{placeholder:"Select Location",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(He,{color:"#94a3b8",children:(0,xe.jsx)(u.gwi,{size:14})})})}),sx:Ie()}))}),(0,xe.jsx)(y.A,{disabled:tt,options:rt,PaperComponent:Ne,getOptionLabel:e=>"".concat(e.firstname," ").concat(e.lastname," (").concat(e.contactno,")"),sx:{flex:{xs:"1 1 100%",sm:"1 1 180px"},minWidth:{xs:"100%",sm:180}},onChange:(e,o,r)=>{gr("clear"===r?0:o.userid)},onOpen:e=>{Ze||(e.preventDefault(),(0,ne.k)("Please select your zone first!","warning",3e3),setTimeout((()=>{var e;return null===(e=Co.current)||void 0===e?void 0:e.focus()}),0))},renderInput:e=>(0,xe.jsx)(C.A,(0,t.A)((0,t.A)({},e),{},{placeholder:"Choose Rider",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(He,{color:"#94a3b8",children:(0,xe.jsx)(u.bsz,{size:14})})})}),sx:Ie()}))})]})]}),(0,xe.jsx)(v.A,{elevation:0,sx:{p:{xs:1,md:1.5},borderTopLeftRadius:pe/8,borderTopRightRadius:pe/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:je,borderBottom:0,background:"#fff"},children:(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,xe.jsx)(w.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:je,borderRadius:4}},children:Me.map(((e,o)=>{var r;const t=Le[e.status],i=t.icon,n=oo===o,l=null!==(r=Vr[e.countKey])&&void 0!==r?r:0;return(0,xe.jsxs)(k.A,{onClick:e=>{return r=o,zo(0),ro(r),Po(50),0===r&&(eo("Pending"),So("pending"),Lo(null===Xr||void 0===Xr?void 0:Xr.uncoveredLength)),1===r&&(eo("Assigned"),So("accepted"),Lo(null===Xr||void 0===Xr?void 0:Xr.assignedLength)),2===r&&(eo("Arrived"),So("arrived"),Lo(null===Xr||void 0===Xr?void 0:Xr.arrivedLength)),3===r&&(eo("Picked"),So("picked"),Lo(null===Xr||void 0===Xr?void 0:Xr.pickedLength)),4===r&&(eo("Active"),So("active"),Lo(null===Xr||void 0===Xr?void 0:Xr.activeLength)),5===r&&(eo("Skipped"),So("skipped"),Lo(null===Xr||void 0===Xr?void 0:Xr.skippedLength)),6===r&&(eo("Delivered"),So("delivered"),Lo(null===Xr||void 0===Xr?void 0:Xr.coveredLength)),7===r&&(eo("Cancelled"),So("cancelled"),Lo(null===Xr||void 0===Xr?void 0:Xr.cancelLength)),console.log(r),void Ko("");var r},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:ge+"px",border:"1px solid ".concat(n?t.color:je),bgcolor:n?t.color:ye,color:n?"#fff":be,fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:n?t.color:we,bgcolor:n?t.color:We}},children:[(0,xe.jsx)(A.A,{sx:{width:{xs:20,md:22},height:{xs:20,md:22},bgcolor:n?"rgba(255,255,255,0.22)":ze(t.color),color:n?"#fff":t.color},children:(0,xe.jsx)(i,{size:12})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:t.label}),(0,xe.jsx)(k.A,{sx:{minWidth:{xs:20,md:24},height:{xs:18,md:20},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:n?"rgba(255,255,255,0.22)":We,color:n?"#fff":be,border:"none"},children:l})]},e.status)}))}),(0,xe.jsx)(k.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,xe.jsx)(ie.A,{value:Eo,onChange:Ko,onDebouncedChange:No,sx:{m:0,width:"100%",borderRadius:ge+"px",bgcolor:ye,"& fieldset":{borderColor:je,borderWidth:1},"&:hover fieldset":{borderColor:we},"&.Mui-focused fieldset":{borderColor:Ce,borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De(Ce))}}})})]})}),(0,xe.jsx)(v.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:pe/8,borderBottomRightRadius:pe/8,border:"1px solid",borderColor:je,overflow:"hidden",background:"#fff"},children:(0,xe.jsx)(R.A,{ref:ue,onScroll:e=>{const{scrollTop:o,scrollHeight:r,clientHeight:t}=e.currentTarget;o+t>=r-50&&Hr&&!Br&&Nr()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},overflow:"auto",overflowX:"auto","&::-webkit-scrollbar":{width:"10px",height:"10px",cursor:"pointer"},"&::-webkit-scrollbar-thumb":{backgroundColor:Pe("#662582"),borderRadius:"8px",cursor:"pointer","&:hover":{backgroundColor:"#662582"}},"&::-webkit-scrollbar-track":{backgroundColor:We}},children:((e,o,i,n,s,h)=>{const x="Cancelled"!==$e&&"Delivered"!==$e,p="Created"==$e,g=15+(x?1:0)+(p?1:0);return r?(0,xe.jsxs)(he.nV,{sx:{p:1.25},children:[0===Ur.length&&!Go&&!Zr&&(0,xe.jsxs)(w.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,xe.jsx)(A.A,{sx:{width:64,height:64,bgcolor:ze("#94a3b8"),color:me},children:(0,xe.jsx)(u.gsJ,{size:28})}),(0,xe.jsx)(S.A,{variant:"subtitle1",sx:{fontWeight:700,color:Ae},children:"No deliveries to show"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be,textAlign:"center",px:2},children:"all"===fr?"No ".concat(((null===(e=Le[wo])||void 0===e?void 0:e.label)||$e).toLowerCase()," orders for this filter."):"No ".concat(((null===(o=Le[wo])||void 0===o?void 0:o.label)||$e).toLowerCase()," orders in ").concat((null===(i=Te.find((e=>e.id===fr)))||void 0===i?void 0:i.label)||"this batch",".")})]}),0===Ur.length&&Zr&&(0,xe.jsxs)(w.A,{alignItems:"center",sx:{py:6},children:[(0,xe.jsx)(de.A,{}),(0,xe.jsx)(S.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading deliveries\u2026"})]}),Ur.map(((e,o)=>{var r,i,n,s,d,c,h,g;const f=Le[String(e.orderstatus||"").toLowerCase()]||{label:e.orderstatus||"\u2014",color:"#94a3b8",icon:u.bfP},v=f.icon,A=!!ke.find((o=>o.orderheaderid==e.orderheaderid)),b=(null===Mo||void 0===Mo?void 0:Mo.orderid)===(null===e||void 0===e?void 0:e.orderid),m=e=>({display:"inline-flex",alignItems:"center",justifyContent:"center",color:e,fontWeight:700,fontSize:12,whiteSpace:"nowrap"});return(0,xe.jsxs)(he.pg,{accent:f.color,selected:A,header:(0,xe.jsxs)(w.A,{spacing:1.25,children:[(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[p&&(0,xe.jsx)(z.A,{size:"small",sx:{p:.25},onChange:o=>{if(o.target.checked){let o=ke;o.push((0,t.A)((0,t.A)({},e),{},{sno:ke.length+1})),Ke([...o])}else{let o=ke.find((o=>o.orderheaderid==e.orderheaderid));if(o){let e=ke;e.splice(o.sno-1,1),e.map(((e,o)=>{e.sno=o+1})),Ke([...e])}}},checked:!!ke.find((o=>o.orderheaderid==e.orderheaderid))}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:me},children:String(Ro*Do+o+1).padStart(2,"0")}),(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:Re(f.color),border:"1px solid ".concat(Pe(f.color)),color:f.color},children:[(0,xe.jsx)(He,{color:f.color,size:18,children:(0,xe.jsx)(v,{size:11})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:800,fontSize:10.5,lineHeight:1},children:f.label})]})]}),(0,xe.jsxs)(w.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:["C"==e.deliverytype&&(0,xe.jsx)(D.A,{size:"small",onClick:()=>{(null===Mo||void 0===Mo?void 0:Mo.orderid)===e.orderid?(Yo(null),Fo(null)):(Yo(e),Fo(e.orderheaderid))},sx:{borderRadius:999,bgcolor:Re("#06b6d4"),color:"#06b6d4",border:"1px solid ".concat(Pe("#06b6d4")),"&:hover":{bgcolor:ze("#06b6d4")}},children:b?(0,xe.jsx)(oe.A,{fontSize:"small"}):(0,xe.jsx)(re.A,{fontSize:"small"})}),x&&(0,xe.jsx)(D.A,{size:"small",onClick:o=>mr(o,e),sx:{borderRadius:999,bgcolor:Re("#662582"),color:"#662582",border:"1px solid ".concat(Pe("#662582")),"&:hover":{bgcolor:ze("#662582")}},children:(0,xe.jsx)(l.A,{})})]})]}),(0,xe.jsxs)(k.A,{sx:{minWidth:0},children:[(0,xe.jsx)(S.A,{sx:{fontWeight:800,color:Ae,fontSize:15},noWrap:!0,children:e.tenantname}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},noWrap:!0,children:[e.tenantsuburb,e.applocation].filter(Boolean).join(" \xb7 ")||"\u2014"})]})]}),children:[(0,xe.jsxs)(he.FG,{children:[(0,xe.jsxs)(he.pY,{label:"Order / Location",full:!0,children:[(0,xe.jsx)(S.A,{sx:{fontSize:13,fontWeight:600,color:Ae},noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")}),(0,xe.jsxs)(S.A,{variant:"caption",sx:{color:be},children:[e.orderid," \xb7 ",e.deliveryid]})]}),(0,xe.jsxs)(he.pY,{label:"Pickup",children:[(0,xe.jsx)(S.A,{sx:{fontSize:13,fontWeight:600,color:Ae},noWrap:!0,children:e.pickupcustomer||"\u2014"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},noWrap:!0,children:e.pickupcontactno})]}),(0,xe.jsxs)(he.pY,{label:"Drop",children:[(0,xe.jsx)(S.A,{sx:{fontSize:13,fontWeight:600,color:Ae},noWrap:!0,children:e.deliverycustomer||"\u2014"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},noWrap:!0,children:e.deliverycontactno})]}),(0,xe.jsx)(he.pY,{label:"Rider",full:!0,children:e.ridername?(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,xe.jsx)(He,{color:"#8b5cf6",size:24,children:(0,xe.jsx)(u.bsz,{size:13})}),(0,xe.jsxs)(w.A,{sx:{minWidth:0},children:[(0,xe.jsx)(S.A,{sx:{fontSize:13,fontWeight:700,color:Ae},noWrap:!0,children:e.ridername}),(0,xe.jsxs)(S.A,{variant:"caption",sx:{color:be},noWrap:!0,children:["ID #",e.userid," \xb7 ",e.ridercontact||"\u2014"]})]})]}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me,fontWeight:600},children:"Unassigned"})}),(0,xe.jsx)(he.pY,{label:"ETA",value:e.expecteddeliverytime?a()(e.expecteddeliverytime).format("hh:mm A"):"\u2014"}),(0,xe.jsx)(he.pY,{label:"Transit",children:(0,xe.jsxs)(k.A,{sx:m("#06b6d4"),children:[e.transitminutes||0,"m"]})}),(0,xe.jsx)(he.pY,{label:"Kms \xb7 plan / act",children:(0,xe.jsxs)(w.A,{direction:"row",spacing:.5,flexWrap:"wrap",useFlexGap:!0,children:[(0,xe.jsxs)(k.A,{sx:m("#ef4444"),children:[e.kms||0," km"]}),(0,xe.jsxs)(k.A,{sx:m("#10b981"),children:[e.cumulativekms||0," km"]})]})}),(0,xe.jsx)(he.pY,{label:"Amount \xb7 chg / amt",children:(0,xe.jsxs)(w.A,{direction:"row",spacing:.5,flexWrap:"wrap",useFlexGap:!0,children:[(0,xe.jsxs)(k.A,{sx:m("#ef4444"),children:["\u20b9 ",null!==(i=null===(n=e.deliverycharges)||void 0===n?void 0:n.toFixed(2))&&void 0!==i?i:"0.00"]}),(0,xe.jsxs)(k.A,{sx:m("#10b981"),children:["\u20b9 ",null!==(s=null===(d=e.deliveryamt)||void 0===d?void 0:d.toFixed(2))&&void 0!==s?s:"0.00"]})]})}),(0,xe.jsx)(he.pY,{label:"Qty",value:e.Quantity||"\u2014"}),(0,xe.jsx)(he.pY,{label:"COD",children:(0,xe.jsx)(S.A,{sx:{fontSize:13,fontWeight:800,color:e.collectionamt?"#ef4444":me},children:e.collectionamt?"\u20b9 ".concat(e.collectionamt.toFixed(2)):"\u2014"})}),(0,xe.jsx)(he.pY,{label:"Step",children:e.step?(0,xe.jsx)(k.A,{sx:(0,t.A)((0,t.A)({},m("#662582")),{},{minWidth:30,fontWeight:800}),children:e.step}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me},children:"\u2014"})}),e.notes&&(0,xe.jsx)(he.pY,{label:"Notes",full:!0,children:(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:e.notes})})]}),b&&(0,xe.jsxs)(k.A,{sx:{mt:1.5,p:1.25,borderRadius:2,bgcolor:We,border:"1px solid ".concat(Se)},children:[(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1},children:[(0,xe.jsx)(He,{color:"#662582",size:22,children:(0,xe.jsx)(u.gsJ,{size:12})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#662582"},children:"Product Details"})]}),(0,xe.jsxs)(w.A,{spacing:1,children:[null===Mr||void 0===Mr||null===(c=Mr.details)||void 0===c?void 0:c.map(((e,o)=>(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1.25,sx:{p:1,borderRadius:1.5,bgcolor:"#fff",border:"1px solid ".concat(Se)},children:[(0,xe.jsx)(k.A,{component:"img",src:(null===e||void 0===e?void 0:e.productimage)||"https://via.placeholder.com/40",alt:null===e||void 0===e?void 0:e.productname,sx:{width:36,height:36,objectFit:"cover",borderRadius:1.5,border:"1px solid ".concat(Se),flexShrink:0}}),(0,xe.jsxs)(w.A,{sx:{minWidth:0,flex:1},children:[(0,xe.jsx)(S.A,{variant:"body2",sx:{fontWeight:600,color:Ae},noWrap:!0,children:(null===e||void 0===e?void 0:e.productname)||"Unnamed"}),(0,xe.jsxs)(S.A,{variant:"caption",sx:{color:be},children:["Qty ",(null===e||void 0===e?void 0:e.orderqty)||0," \xb7 \u20b9 ",(null===e||void 0===e?void 0:e.price)||0]})]}),(0,xe.jsxs)(S.A,{variant:"body2",sx:{fontWeight:800,color:Ae,flexShrink:0},children:["\u20b9 ",((null===e||void 0===e?void 0:e.productsumprice)+(null===e||void 0===e?void 0:e.taxamount)).toFixed(2)||0]})]},o))),(0,xe.jsxs)(w.A,{direction:"row",justifyContent:"space-between",sx:{pt:.5},children:[(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:be},children:"Total Amount"}),(0,xe.jsxs)(S.A,{variant:"body2",sx:{fontWeight:800,color:"#10b981"},children:["\u20b9 ",null===Mr||void 0===Mr||null===(h=Mr.pricedetails)||void 0===h||null===(g=h.orderamount)||void 0===g?void 0:g.toFixed(2)]})]})]})]})]},null!==(r=e.orderheaderid)&&void 0!==r?r:"".concat(e.tenantname,"-").concat(o))})),0!=(null===Gr||void 0===Gr?void 0:Gr.length)&&(0,xe.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:Br||Hr?(0,xe.jsx)(de.A,{}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me,fontWeight:600},children:"\xb7 End of list \xb7"})})]}):(0,xe.jsxs)(P.A,{stickyHeader:!0,sx:{minWidth:{xs:1100,lg:1300,xl:1400}},children:[(0,xe.jsx)(I.A,{children:(0,xe.jsxs)(L.A,{sx:{"& th":{backgroundColor:We,color:be,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(je),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[p&&(0,xe.jsx)(M.A,{sx:{whiteSpace:"nowrap"},children:(0,xe.jsx)(z.A,{indeterminate:ke.length>0&&ke.length!=Ur.length,onChange:e=>{e.target.checked?Ke([...Ur]):Ke([])},checked:ke.length>0&&ke.length==Ur.length})}),(0,xe.jsx)(M.A,{children:"#"}),(0,xe.jsx)(M.A,{children:"Status"}),(0,xe.jsx)(M.A,{children:"Tenant"}),(0,xe.jsx)(M.A,{children:"Order / Location"}),(0,xe.jsx)(M.A,{children:"Pickup"}),(0,xe.jsx)(M.A,{children:"Drop"}),(0,xe.jsx)(M.A,{children:"Rider"}),(0,xe.jsx)(M.A,{children:"ETA"}),(0,xe.jsx)(M.A,{children:"Transit"}),(0,xe.jsx)(M.A,{children:"Kms"}),(0,xe.jsx)(M.A,{children:"Amount"}),(0,xe.jsx)(M.A,{children:"Notes"}),(0,xe.jsx)(M.A,{children:"Step"}),(0,xe.jsx)(M.A,{children:"Qty"}),(0,xe.jsx)(M.A,{children:"COD"}),x&&(0,xe.jsx)(M.A,{align:"right",children:"Action"})]})}),(Go||Jr)&&(0,xe.jsx)(le.r,{col:8}),(0,xe.jsxs)(Y.A,{children:[0==Ur.length&&!Go&&!Zr&&(0,xe.jsx)(L.A,{children:(0,xe.jsx)(M.A,{colSpan:g,sx:{py:6},children:(0,xe.jsxs)(w.A,{alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(A.A,{sx:{width:64,height:64,bgcolor:ze("#94a3b8"),color:me},children:(0,xe.jsx)(u.gsJ,{size:28})}),(0,xe.jsx)(S.A,{variant:"subtitle1",sx:{fontWeight:700,color:Ae},children:"No deliveries to show"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:"all"===fr?"No ".concat(((null===(n=Le[wo])||void 0===n?void 0:n.label)||$e).toLowerCase()," orders for this filter."):"No ".concat(((null===(s=Le[wo])||void 0===s?void 0:s.label)||$e).toLowerCase()," orders in ").concat((null===(h=Te.find((e=>e.id===fr)))||void 0===h?void 0:h.label)||"this batch",".")})]})})}),0==Ur.length&&Zr&&(0,xe.jsx)(L.A,{children:(0,xe.jsxs)(M.A,{colSpan:g,sx:{textAlign:"center",py:6},children:[(0,xe.jsx)(de.A,{}),(0,xe.jsx)(S.A,{variant:"caption",color:"text.secondary",sx:{display:"block",mt:1},children:"Loading deliveries\u2026"})]})}),Ur.map(((e,o)=>{var r,i,n,s,c,h,x,p;const f=Le[String(e.orderstatus||"").toLowerCase()]||{label:e.orderstatus||"\u2014",color:"#94a3b8",icon:u.bfP},A=f.icon,b=!!ke.find((o=>o.orderheaderid==e.orderheaderid));return(0,xe.jsxs)(d.Fragment,{children:[(0,xe.jsxs)(L.A,{role:"checkbox",tabIndex:-1,sx:{cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(Se),py:{xs:1,md:1.5},px:{xs:1,md:2}},backgroundColor:b?ze("#8b5cf6"):"transparent","&:hover":{backgroundColor:b?ze("#8b5cf6"):We}},children:["Created"==$e&&(0,xe.jsx)(M.A,{children:(0,xe.jsx)(z.A,{onChange:o=>{if(o.target.checked){let o=ke;o.push((0,t.A)((0,t.A)({},e),{},{sno:ke.length+1})),Ke([...o])}else{if(ke.find((o=>o.orderheaderid==e.orderheaderid))){let o=ke,r=ke.find((o=>o.orderheaderid==e.orderheaderid));o.splice(r.sno-1,1),o.map(((e,o)=>{e.sno=o+1})),Ke([...o])}}console.log("list",ke)},checked:ke.find((o=>o.orderheaderid==e.orderheaderid))})}),(0,xe.jsx)(M.A,{children:(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:me},children:String(Ro*Do+o+1).padStart(2,"0")})}),(0,xe.jsx)(M.A,{children:(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:Re(f.color),border:"1px solid ".concat(Pe(f.color)),color:f.color},children:[(0,xe.jsx)(He,{color:f.color,size:20,children:(0,xe.jsx)(A,{size:12})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:f.label})]})}),(0,xe.jsx)(M.A,{children:(0,xe.jsx)(T.A,{title:e.tenantadress,children:(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{noWrap:!0,variant:"subtitle2",sx:{fontWeight:700,color:Ae},children:e.tenantname}),(0,xe.jsx)(S.A,{noWrap:!0,variant:"caption",sx:{color:be},children:e.tenantsuburb}),(0,xe.jsx)(S.A,{noWrap:!0,variant:"caption",sx:{color:me},children:e.applocation})]})})}),(0,xe.jsxs)(M.A,{align:"left",children:[(0,xe.jsx)(T.A,{title:"Location Name-Suburb",placement:"top",children:(0,xe.jsx)(S.A,{variant:"subtitle1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,xe.jsxs)(w.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(T.A,{title:"Order Id",placement:"top",children:(0,xe.jsx)(S.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,xe.jsxs)(T.A,{title:"Ordered date",placement:"top",children:[(0,xe.jsx)(S.A,{noWrap:!0,sx:{fontSize:"12px"},children:a()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,xe.jsx)(S.A,{noWrap:!0,sx:{fontSize:"11px"},children:a()(e.orderdate).utc().format("hh:mm A")})]})]}),"-",(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(T.A,{title:"Delivery Id",placement:"top",children:(0,xe.jsx)(S.A,{variant:"body2",noWrap:!0,children:e.deliveryid})}),(0,xe.jsxs)(T.A,{title:"Delivery date",placement:"top",children:[(0,xe.jsx)(S.A,{noWrap:!0,sx:{fontSize:"12px"},children:a()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,xe.jsx)(S.A,{noWrap:!0,sx:{fontSize:"11px"},children:a()(e.deliverydate).utc().format("hh:mm A")})]})]})]})]}),(0,xe.jsx)(M.A,{align:"left",children:(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:700,color:Ae,whiteSpace:"nowrap"},children:e.pickupcustomer}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:e.pickupcontactno}),(0,xe.jsx)(T.A,{title:e.Pickupaddress,sx:{whiteSpace:"nowrap"},children:(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me},children:e.pickuplocation||(e.Pickupaddress?e.Pickupaddress.slice(0,14)+"\u2026":"\u2014")})})]})}),(0,xe.jsx)(M.A,{align:"left",children:(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:700,color:Ae,whiteSpace:"nowrap"},children:e.deliverycustomer}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:e.deliverycontactno}),(0,xe.jsx)(T.A,{title:e.deliveryaddress,children:(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me,whiteSpace:"nowrap"},children:e.deliverylocation||(e.deliveryaddress?e.deliveryaddress.slice(0,14)+"\u2026":"\u2014")})})]})}),(0,xe.jsx)(M.A,{children:e.ridername?(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,xe.jsx)(He,{color:"#8b5cf6",size:28,children:(0,xe.jsx)(u.bsz,{size:14})}),(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:700,color:Ae},noWrap:!0,children:e.ridername}),(0,xe.jsxs)(S.A,{variant:"caption",sx:{color:be},children:["ID #",e.userid," \xb7 ",e.ridercontact||"\u2014"]})]})]}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me,fontWeight:600},children:"Unassigned"})}),(0,xe.jsx)(M.A,{align:"left",children:(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:700,color:Ae,whiteSpace:"nowrap"},children:e.expecteddeliverytime?a()(e.expecteddeliverytime).format("hh:mm A"):"\u2014"})}),(0,xe.jsx)(M.A,{align:"left",children:(0,xe.jsxs)(k.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:999,bgcolor:Re("#06b6d4"),color:"#06b6d4",fontWeight:700,fontSize:12,border:"1px solid ".concat(Pe("#06b6d4"))},children:[e.transitminutes||0,"m"]})}),(0,xe.jsx)(M.A,{children:(0,xe.jsxs)(w.A,{direction:"column",spacing:.5,alignItems:"flex-start",children:[(0,xe.jsx)(T.A,{title:"Planned KMS",placement:"top",children:(0,xe.jsxs)(k.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:Re("#ef4444"),color:"#ef4444",fontWeight:700,fontSize:11,border:"1px solid ".concat(Pe("#ef4444")),whiteSpace:"nowrap",minWidth:75},children:[e.kms||0," km"]})}),(0,xe.jsx)(T.A,{title:"Actual KMS",placement:"top",children:(0,xe.jsxs)(k.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:Re("#10b981"),color:"#10b981",fontWeight:700,fontSize:11,border:"1px solid ".concat(Pe("#10b981")),whiteSpace:"nowrap",minWidth:75},children:[e.cumulativekms||0," km"]})})]})}),(0,xe.jsx)(M.A,{align:"left",children:(0,xe.jsxs)(w.A,{direction:"column",spacing:.5,alignItems:"flex-start",children:[(0,xe.jsx)(T.A,{title:"Delivery Charge",placement:"top",children:(0,xe.jsxs)(k.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:Re("#ef4444"),color:"#ef4444",fontWeight:700,fontSize:11,border:"1px solid ".concat(Pe("#ef4444")),whiteSpace:"nowrap",minWidth:85},children:["\u20b9 ",null!==(i=null===(n=e.deliverycharges)||void 0===n?void 0:n.toFixed(2))&&void 0!==i?i:"0.00"]})}),(0,xe.jsx)(T.A,{title:"Delivery Amount",placement:"top",children:(0,xe.jsxs)(k.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:Re("#10b981"),color:"#10b981",fontWeight:700,fontSize:11,border:"1px solid ".concat(Pe("#10b981")),whiteSpace:"nowrap",minWidth:85},children:["\u20b9 ",null!==(s=null===(c=e.deliveryamt)||void 0===c?void 0:c.toFixed(2))&&void 0!==s?s:"0.00"]})})]})}),(0,xe.jsx)(M.A,{children:e.notes?(0,xe.jsx)(T.A,{title:e.notes,children:(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be,maxWidth:160,display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.notes})}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me},children:"\u2014"})}),(0,xe.jsx)(M.A,{align:"center",children:e.step?(0,xe.jsx)(k.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:30,height:24,px:.875,borderRadius:999,bgcolor:Re("#662582"),border:"1px solid ".concat(Pe("#662582")),color:"#662582",fontWeight:800,fontSize:11},children:e.step}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me},children:"\u2014"})}),(0,xe.jsx)(M.A,{children:(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:700,color:e.Quantity?Ae:me,whiteSpace:"nowrap"},children:e.Quantity||"\u2014"})}),(0,xe.jsx)(M.A,{children:(0,xe.jsx)(S.A,{variant:"subtitle2",sx:{fontWeight:800,color:e.collectionamt?"#ef4444":me,whiteSpace:"nowrap"},children:e.collectionamt?"\u20b9 ".concat(e.collectionamt.toFixed(2)):"\u2014"})}),"Cancelled"!==$e&&"Delivered"!==$e&&(0,xe.jsx)(M.A,{align:"right",children:(0,xe.jsxs)(w.A,{direction:"row",justifyContent:"flex-end",spacing:.75,children:["C"==e.deliverytype&&(0,xe.jsx)(T.A,{title:"Product details",placement:"top",children:(0,xe.jsx)(D.A,{size:"small",onClick:()=>{(null===Mo||void 0===Mo?void 0:Mo.orderid)===e.orderid?(Yo(null),Fo(null)):(Yo(e),Fo(e.orderheaderid))},sx:{borderRadius:999,bgcolor:Re("#06b6d4"),color:"#06b6d4",border:"1px solid ".concat(Pe("#06b6d4")),"&:hover":{bgcolor:ze("#06b6d4")}},children:(null===Mo||void 0===Mo?void 0:Mo.orderid)===e.orderid?(0,xe.jsx)(oe.A,{fontSize:"small"}):(0,xe.jsx)(re.A,{fontSize:"small"})})}),(0,xe.jsx)(T.A,{title:"Actions",placement:"top",children:(0,xe.jsx)(D.A,{size:"small",onClick:o=>mr(o,e),sx:{borderRadius:999,bgcolor:Re("#662582"),color:"#662582",border:"1px solid ".concat(Pe("#662582")),"&:hover":{bgcolor:ze("#662582")}},children:(0,xe.jsx)(l.A,{})})})]})})]}),(null===Mo||void 0===Mo?void 0:Mo.orderid)===(null===e||void 0===e?void 0:e.orderid)&&(0,xe.jsx)(L.A,{children:(0,xe.jsx)(M.A,{colSpan:g,sx:{p:0,border:0,backgroundColor:We},children:(0,xe.jsx)(F.A,{in:!0,timeout:"auto",unmountOnExit:!0,children:(0,xe.jsx)(k.A,{sx:{width:"100%",p:2.5},children:(0,xe.jsxs)(v.A,{elevation:0,sx:{borderRadius:2,border:"1px solid",borderColor:je,overflow:"hidden",background:"#fff"},children:[(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:2,py:1.25,borderBottom:"1px solid ".concat(Se),bgcolor:Re("#662582")},children:[(0,xe.jsx)(He,{color:"#662582",children:(0,xe.jsx)(u.gsJ,{size:14})}),(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#662582"},children:"Product Details"})]}),(0,xe.jsxs)(P.A,{size:"small",sx:{minWidth:800},children:[(0,xe.jsx)(I.A,{children:(0,xe.jsxs)(L.A,{sx:{"& th":{fontSize:11,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:be,borderBottom:"1px solid ".concat(Se)},"&:hover":{backgroundColor:"transparent !important"}},children:[(0,xe.jsx)(M.A,{children:"#"}),(0,xe.jsx)(M.A,{children:"Product"}),(0,xe.jsx)(M.A,{children:"Description"}),(0,xe.jsx)(M.A,{align:"right",children:"Qty"}),(0,xe.jsx)(M.A,{align:"right",children:"Cost"}),(0,xe.jsx)(M.A,{align:"right",children:"Price"}),(0,xe.jsx)(M.A,{align:"right",children:"Tax"}),(0,xe.jsx)(M.A,{align:"right",children:"Amount"})]})}),(0,xe.jsxs)(Y.A,{children:[null===Mr||void 0===Mr||null===(h=Mr.details)||void 0===h?void 0:h.map(((e,o)=>{var r,t;return(0,xe.jsxs)(L.A,{sx:{"&:hover":{backgroundColor:We+" !important"}},children:[(0,xe.jsx)(M.A,{sx:{color:me,fontWeight:700},children:String(o+1).padStart(2,"0")}),(0,xe.jsx)(M.A,{children:(0,xe.jsxs)(w.A,{direction:"row",spacing:1.25,alignItems:"center",children:[(0,xe.jsx)(k.A,{component:"img",src:(null===e||void 0===e?void 0:e.productimage)||"https://via.placeholder.com/40",alt:null===e||void 0===e?void 0:e.productname,sx:{width:36,height:36,objectFit:"cover",borderRadius:1.5,border:"1px solid ".concat(Se)}}),(0,xe.jsx)(S.A,{variant:"body2",sx:{fontWeight:600,color:Ae},noWrap:!0,children:(null===e||void 0===e?void 0:e.productname)||"Unnamed"})]})}),(0,xe.jsx)(M.A,{sx:{color:be},children:(null===e||void 0===e?void 0:e.productdescription)||"-"}),(0,xe.jsx)(M.A,{align:"right",sx:{fontWeight:700},children:(null===e||void 0===e?void 0:e.orderqty)||0}),(0,xe.jsxs)(M.A,{align:"right",children:["\u20b9 ",(null===e||void 0===e?void 0:e.price)||0]}),(0,xe.jsxs)(M.A,{align:"right",children:["\u20b9 ",(null!==(r=null===e||void 0===e?void 0:e.productsumprice)&&void 0!==r?r:0).toFixed(2)]}),(0,xe.jsxs)(M.A,{align:"right",children:["\u20b9 ",(null!==(t=null===e||void 0===e?void 0:e.taxamount)&&void 0!==t?t:0).toFixed(2)]}),(0,xe.jsxs)(M.A,{align:"right",sx:{fontWeight:800,color:Ae},children:["\u20b9 ",((null===e||void 0===e?void 0:e.productsumprice)+(null===e||void 0===e?void 0:e.taxamount)).toFixed(2)||0]})]},o)})),(0,xe.jsxs)(L.A,{sx:{"&:hover":{backgroundColor:"transparent !important"}},children:[(0,xe.jsx)(M.A,{align:"right",colSpan:7,sx:{fontWeight:700,color:be,borderTop:"1px solid ".concat(Se)},children:"Total Amount"}),(0,xe.jsxs)(M.A,{align:"right",sx:{fontWeight:800,color:"#10b981",borderTop:"1px solid ".concat(Se)},children:["\u20b9 ",null===Mr||void 0===Mr||null===(x=Mr.pricedetails)||void 0===x||null===(p=x.orderamount)||void 0===p?void 0:p.toFixed(2)]})]})]})]})]})})})})})]},null!==(r=e.orderheaderid)&&void 0!==r?r:"".concat(e.tenantname,"-").concat(o))})),0!=(null===Gr||void 0===Gr?void 0:Gr.length)&&(0,xe.jsx)(L.A,{children:(0,xe.jsx)(M.A,{colSpan:g,rowSpan:3,children:(0,xe.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:Br||Hr?(0,xe.jsx)(de.A,{}):(0,xe.jsx)(S.A,{variant:"caption",sx:{color:me,fontWeight:600},children:"\xb7 End of list \xb7"})})})})]})]})})()})}),(0,xe.jsxs)(E.A,{anchorEl:Ho,open:br,onClose:jr,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{elevation:0,sx:{minWidth:220,borderRadius:2,mt:.75,border:"1px solid",borderColor:je,boxShadow:ve,overflow:"hidden","& .MuiMenuItem-root":{fontSize:13,fontWeight:600,py:1.1,px:1.5,gap:1,transition:"background-color 0.15s","&:hover":{bgcolor:We}}}},children:["delivered"!==(null===Jo||void 0===Jo?void 0:Jo.orderstatus)&&(0,xe.jsxs)(K.A,{onClick:()=>{Pr.mutate(Jo.userfcmtoken),jr()},children:[(0,xe.jsx)(He,{color:"#0ea5e9",size:22,children:(0,xe.jsx)(u.q53,{size:13})}),"Notify Rider"]}),["pending","accepted","arrived"].includes(null===Jo||void 0===Jo?void 0:Jo.orderstatus)&&(0,xe.jsxs)(K.A,{onClick:()=>{var e;if(!Ze)return Lr("Please select a location first!","warning"),void(null===(e=Co.current)||void 0===e||e.focus());or(!0),jr()},children:[(0,xe.jsx)(He,{color:"#8b5cf6",size:22,children:(0,xe.jsx)(u.bsz,{size:13})}),"Change Rider"]}),(1==Ar||2==Ar)&&(0,xe.jsxs)(K.A,{onClick:()=>{co(Jo.kms),ho(Jo.cumulativekms),bo(Jo.droplat),jo(Jo.droplon),go(Jo.notes),uo(Jo.deliveryamount),Wo(Jo.orderstatus||"delivered"),vo(Jo),Je(!0),jr()},children:[(0,xe.jsx)(He,{color:"#10b981",size:22,children:(0,xe.jsx)(u.mU9,{size:13})}),"Update Status"]}),"cancelled"!==(null===Jo||void 0===Jo?void 0:Jo.orderstatus)&&"delivered"!==(null===Jo||void 0===Jo?void 0:Jo.orderstatus)&&(0,xe.jsxs)(K.A,{sx:{color:"#ef4444 !important"},onClick:()=>{$o(!0),jr()},children:[(0,xe.jsx)(He,{color:"#ef4444",size:22,children:(0,xe.jsx)(u.uDv,{size:13})}),"Cancel Delivery"]})]}),(0,xe.jsxs)(O.A,{open:_o,onClose:()=>$o(!1),maxWidth:"xs",fullWidth:!0,PaperProps:{elevation:0,sx:{borderRadius:3,border:"1px solid",borderColor:je,boxShadow:ve,overflow:"hidden"}},children:[(0,xe.jsx)(k.A,{sx:{height:4,background:"linear-gradient(90deg, #ef4444 0%, ".concat(ze("#ef4444")," 100%)")}}),(0,xe.jsx)(N.A,{sx:{p:3.5},children:(0,xe.jsxs)(w.A,{alignItems:"center",spacing:2.5,children:[(0,xe.jsx)(A.A,{sx:{width:64,height:64,bgcolor:ze("#ef4444"),color:"#ef4444"},children:(0,xe.jsx)(s.A,{style:{fontSize:28}})}),(0,xe.jsxs)(w.A,{spacing:.5,alignItems:"center",children:[(0,xe.jsx)(S.A,{variant:"h4",sx:{fontWeight:800,color:Ae},children:"Cancel Delivery?"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be,textAlign:"center",px:1},children:"This action will cancel the delivery and notify the rider. Please share a brief reason."})]}),(0,xe.jsx)(C.A,{fullWidth:!0,placeholder:"Reason for cancellation",multiline:!0,minRows:2,maxRows:4,onChange:e=>tr(e.target.value),sx:{"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:We,"& fieldset":{borderColor:je},"&:hover fieldset":{borderColor:"#ef4444"},"&.Mui-focused fieldset":{borderColor:"#ef4444",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De("#ef4444"))}}}}),(0,xe.jsxs)(w.A,{direction:"row",spacing:1.5,sx:{width:1},children:[(0,xe.jsx)(H.A,{fullWidth:!0,onClick:()=>$o(!1),variant:"outlined",sx:{borderRadius:999,py:1.1,fontWeight:700,borderColor:je,color:be,"&:hover":{borderColor:me,bgcolor:We}},children:"Keep Delivery"}),(0,xe.jsx)(H.A,{fullWidth:!0,variant:"contained",onClick:()=>{""==rr?Lr("Enter FeedBack","error"):wr({selectedRow:Jo,cancelFeed:rr}),(async()=>{console.log("cancelridernotification",Jo);try{return(await h.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/utils/notifyuser"),{token:Jo.userfcmtoken,notification:{title:"NearleXpress",body:"".concat(Jo.orderid," have been Cancelled"),sound:"ring",image:""},data:{type:"cancel"}})).data}catch(e){Lr(e.message,"error",2e3),console.log(e)}})()},autoFocus:!0,sx:{borderRadius:999,py:1.1,fontWeight:800,bgcolor:"#ef4444",boxShadow:"0 6px 18px ".concat(De("#ef4444")),"&:hover":{bgcolor:"#dc2626"}},children:"Yes, Cancel"})]})]})})]}),(0,xe.jsxs)(O.A,{open:er,onClose:()=>or(!1),maxWidth:"sm",fullWidth:!0,TransitionComponent:q.s,PaperProps:{elevation:0,sx:{borderRadius:3,border:"1px solid",borderColor:je,boxShadow:ve,overflow:"hidden"}},children:[(0,xe.jsx)(k.A,{sx:{height:4,background:"linear-gradient(90deg, #8b5cf6 0%, ".concat(ze("#8b5cf6")," 100%)")}}),(0,xe.jsx)(B.A,{sx:{p:3,pb:1.5},children:(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(A.A,{sx:{width:44,height:44,bgcolor:ze("#8b5cf6"),color:"#8b5cf6"},children:(0,xe.jsx)(u.bsz,{size:22})}),(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"h4",sx:{fontWeight:800,color:Ae},children:"Change Rider"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:"Assign this delivery to a different rider"})]})]})}),(0,xe.jsx)(N.A,{sx:{p:3,pt:2},children:(0,xe.jsx)(y.A,{fullWidth:!0,options:rt,PaperComponent:Ne,getOptionLabel:e=>"".concat(e.firstname," ").concat(e.lastname," (").concat(e.contactno,")"),onChange:(e,o)=>{nr(o),i.A.debug("Rider selected in dropdown:",o?"".concat(o.firstname," ").concat(o.lastname):"None")},renderInput:e=>(0,xe.jsx)(C.A,(0,t.A)((0,t.A)({},e),{},{placeholder:"Choose Rider",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(w.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(He,{color:"#8b5cf6",children:(0,xe.jsx)(u.bsz,{size:14})})})}),sx:Ie()}))})}),(0,xe.jsx)(J.A,{sx:{p:3,pt:1},children:(0,xe.jsxs)(w.A,{direction:"row",spacing:1.5,sx:{width:1},children:[(0,xe.jsx)(H.A,{fullWidth:!0,variant:"outlined",onClick:()=>or(!1),sx:{borderRadius:999,py:1.1,fontWeight:700,borderColor:je,color:be,"&:hover":{borderColor:me,bgcolor:We}},children:"Cancel"}),(0,xe.jsx)(H.A,{fullWidth:!0,variant:"contained",onClick:()=>{Zo(!0),i.A.info("Initiating rider assignment change for order ID ".concat(null===Jo||void 0===Jo?void 0:Jo.orderid," to rider: ").concat(null===ir||void 0===ir?void 0:ir.firstname," ").concat(null===ir||void 0===ir?void 0:ir.lastname)),Ir.mutate({selectedRider:ir,selectedRow:Jo})},sx:{borderRadius:999,py:1.1,fontWeight:800,bgcolor:"#8b5cf6",boxShadow:"0 6px 18px ".concat(De("#8b5cf6")),"&:hover":{bgcolor:"#7c3aed"}},children:"Change Rider"})]})})]}),(0,xe.jsxs)(O.A,{open:to,onClose:()=>io(!1),fullScreen:r,PaperProps:{elevation:0,sx:{borderRadius:{xs:0,sm:3},border:"1px solid",borderColor:je,boxShadow:ve,overflow:"hidden"}},children:[(0,xe.jsx)(k.A,{sx:{height:4,background:"linear-gradient(90deg, #f59e0b 0%, ".concat(ze("#f59e0b")," 100%)")}}),(0,xe.jsx)(B.A,{align:"left",sx:{p:3,pb:1.5},children:(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(A.A,{sx:{width:44,height:44,bgcolor:ze("#f59e0b"),color:"#f59e0b"},children:(0,xe.jsx)(u.tjE,{size:22})}),(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"h4",sx:{fontWeight:800,color:Ae},children:"Date Range"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:"Pick a window to filter the deliveries"})]})]})}),(0,xe.jsx)(N.A,{sx:{width:"100%"},className:"datedialog",children:(0,xe.jsx)($.U,{open:to,toggle:()=>io(!to),id:"daterange1",onChange:e=>{"All"===e.label?(Qe(""),_e(""),io(!1)):(Qe(a()(e.startDate).format("YYYY-MM-DD")),_e(a()(e.endDate).format("YYYY-MM-DD")),e.label?lo(e.label):lo("")),console.log(e)},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,G.A)(new Date,-1),endDate:(0,G.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,G.A)(new Date,1),endDate:(0,G.A)(new Date,1)},{label:"This Week",startDate:(0,Z.A)(new Date),endDate:(0,U.A)(new Date)},{label:"Last Week",startDate:(0,Z.A)((0,V.A)(new Date,-1)),endDate:(0,U.A)((0,V.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,V.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,Q.A)(new Date),endDate:(0,X.A)(new Date)},{label:"Last Month",startDate:(0,Q.A)((0,_.A)(new Date,-1)),endDate:(0,X.A)((0,_.A)(new Date,-1))}]})}),(0,xe.jsx)(w.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2.5,pt:1},children:(0,xe.jsx)(H.A,{variant:"contained",onClick:()=>{io(!1)},sx:{borderRadius:999,px:3,py:1,fontWeight:800,bgcolor:"#f59e0b",boxShadow:"0 6px 18px ".concat(De("#f59e0b")),"&:hover":{bgcolor:"#d97706"}},children:"Apply"})})]}),(0,xe.jsxs)(O.A,{fullWidth:!0,open:Be,onClose:Yr,scroll:"paper",maxWidth:"sm",fullScreen:r,TransitionComponent:q.s,PaperProps:{elevation:0,sx:{borderRadius:{xs:0,sm:3},border:"1px solid",borderColor:je,boxShadow:ve,overflow:"hidden"}},children:[(0,xe.jsx)(k.A,{sx:{height:4,background:"linear-gradient(90deg, #10b981 0%, ".concat(ze("#10b981")," 100%)")}}),(0,xe.jsx)(B.A,{sx:{p:3,pb:1.5},children:(0,xe.jsxs)(w.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(A.A,{sx:{width:44,height:44,bgcolor:ze("#10b981"),color:"#10b981"},children:(0,xe.jsx)(u.mU9,{size:22})}),(0,xe.jsxs)(w.A,{children:[(0,xe.jsx)(S.A,{variant:"h4",sx:{fontWeight:800,color:Ae},children:"Update Delivery Status"}),(0,xe.jsx)(S.A,{variant:"caption",sx:{color:be},children:null!==fo&&void 0!==fo&&fo.orderid?"Order #".concat(fo.orderid):"Modify delivery details"})]})]})}),(0,xe.jsx)(N.A,{dividers:!0,sx:{p:3,bgcolor:We},children:(0,xe.jsxs)(j.Ay,{container:!0,spacing:2,children:[[{label:"KMs",value:so,set:e=>co(e),color:"#ef4444"},{label:"Actual KMs",value:ao,set:e=>ho(+e),color:"#10b981"},{label:"Delivery Latitude",value:Ao,set:e=>bo(e),color:"#06b6d4"},{label:"Delivery Longitude",value:mo,set:e=>jo(e),color:"#06b6d4"}].map((e=>(0,xe.jsxs)(j.Ay,{item:!0,xs:12,sm:6,children:[(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:be,letterSpacing:.5,textTransform:"uppercase"},children:e.label}),(0,xe.jsx)(C.A,{fullWidth:!0,value:e.value,type:"number",onChange:o=>e.set(o.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:je},"&:hover fieldset":{borderColor:e.color},"&.Mui-focused fieldset":{borderColor:e.color,borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De(e.color))}}}})]},e.label))),(0,xe.jsxs)(j.Ay,{item:!0,xs:12,children:[(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:be,letterSpacing:.5,textTransform:"uppercase"},children:"Amount"}),(0,xe.jsx)(C.A,{fullWidth:!0,type:"number",value:xo,onChange:e=>uo(+e.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:je},"&:hover fieldset":{borderColor:"#10b981"},"&.Mui-focused fieldset":{borderColor:"#10b981",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De("#10b981"))}}}})]}),(0,xe.jsxs)(j.Ay,{item:!0,xs:12,children:[(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:be,letterSpacing:.5,textTransform:"uppercase"},children:"Status"}),(0,xe.jsx)(C.A,{select:!0,fullWidth:!0,value:yo,onChange:e=>Wo(e.target.value),SelectProps:{MenuProps:{PaperProps:{sx:{borderRadius:2,mt:.5,boxShadow:ve}}}},sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:je},"&:hover fieldset":{borderColor:"#662582"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De("#662582"))}}},children:["pending","accepted","started","arrived","delivered","cancelled"].map((e=>{const o=Le[e]||{label:e,color:"#662582",icon:u.bfP},r=o.icon;return(0,xe.jsxs)(K.A,{value:e,sx:{gap:1},children:[(0,xe.jsx)(He,{color:o.color,size:22,children:(0,xe.jsx)(r,{size:13})}),o.label]},e)}))})]}),(0,xe.jsxs)(j.Ay,{item:!0,xs:12,children:[(0,xe.jsx)(S.A,{variant:"caption",sx:{fontWeight:700,color:be,letterSpacing:.5,textTransform:"uppercase"},children:"Notes"}),(0,xe.jsx)(C.A,{value:po,fullWidth:!0,multiline:!0,minRows:2,onChange:e=>go(e.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:je},"&:hover fieldset":{borderColor:"#662582"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(De("#662582"))}}}})]})]})}),(0,xe.jsx)(J.A,{sx:{p:3},children:(0,xe.jsxs)(w.A,{direction:"row",spacing:1.5,sx:{width:1},children:[(0,xe.jsx)(H.A,{fullWidth:!0,variant:"outlined",onClick:Yr,sx:{borderRadius:999,py:1.1,fontWeight:700,borderColor:je,color:be,"&:hover":{borderColor:me,bgcolor:We}},children:"Close"}),(0,xe.jsx)(H.A,{fullWidth:!0,variant:"contained",onClick:()=>{so?ao?Ao?mo?xo?lt.mutate({deliveryid:fo.deliveryid,orderheaderid:fo.orderheaderid,orderstatus:yo,deliverytime:a()().format("YYYY-MM-DD HH:mm:ss"),deliverylat:Ao,deliverylong:mo,kms:so,cumulativekms:ao,deliveryamt:parseFloat(xo),notes:po,userid:+Jo.userid}):Lr("Fill Delivery Amount","warning"):Lr("Fill Delivery Longitude","warning"):Lr("Fill Delivery Latitude","warning"):Lr("Fill Actual Kms","warning"):Lr("Fill Kms","warning")},sx:{borderRadius:999,py:1.1,fontWeight:800,bgcolor:"#10b981",boxShadow:"0 6px 18px ".concat(De("#10b981")),"&:hover":{bgcolor:"#059669"}},children:"Update"})]})})]})]})}},23787:(e,o,r)=>{r.d(o,{FG:()=>u,nV:()=>h,pY:()=>p,pg:()=>x});var t=r(89379),i=r(80045),n=r(93230),l=r(2235),s=r(16491),d=r(82053),c=r(44414);const a=["children","scroll","onScroll","sx"],h=e=>{let{children:o,scroll:r=!1,onScroll:l,sx:s}=e,d=(0,i.A)(e,a);return(0,c.jsx)(n.A,(0,t.A)((0,t.A)({spacing:1.25,onScroll:l,sx:(0,t.A)((0,t.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},d),{},{children:o}))},x=e=>{let{accent:o="#662582",header:r,footer:i,selected:n=!1,onClick:d,children:a,sx:h}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:d,sx:(0,t.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:n?o:"#e2e8f0",background:n?"".concat(o,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},h),children:[(0,c.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:o}}),(0,c.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[r,a,i]})]})},u=e=>{let{children:o,columns:r=2,sx:i}=e;return(0,c.jsx)(s.A,{sx:(0,t.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},i),children:o})},p=e=>{let{label:o,value:r,children:t,full:i=!1,align:n="left"}=e;return(0,c.jsxs)(s.A,{sx:{gridColumn:i?"1 / -1":"auto",minWidth:0,textAlign:n},children:[(0,c.jsx)(d.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:o}),(0,c.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==t?t:(0,c.jsx)(d.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},27001:(e,o,r)=>{r.d(o,{A:()=>s});var t=r(93230),i=r(16491),n=r(82053),l=r(44414);function s(e){let{title:o,subtitle:r,live:s=!1,action:d}=e;return(0,l.jsxs)(t.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(i.A,{sx:{minWidth:0},children:[(0,l.jsx)(n.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:o}),r&&(0,l.jsxs)(t.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[s&&(0,l.jsx)(i.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(n.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:r})]})]}),d&&(0,l.jsx)(i.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:d})]})}},36803:(e,o,r)=>{r.d(o,{A:()=>h});var t=r(48089),i=r(50704),n=r(93230),l=r(16491),s=r(82053),d=r(82917),c=r(41413),a=r(44414);function h(e){let{title:o,value:r,icon:h,color:x="#662582",caption:u,loading:p=!1}=e;return(0,a.jsx)(t.A,{sx:{height:"100%"},children:(0,a.jsx)(i.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,a.jsxs)(n.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,a.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,a.jsx)(s.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:o}),p?(0,a.jsx)(d.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,a.jsx)(s.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),u&&(0,a.jsx)(s.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),h&&(0,a.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(x,"14"),color:x,flexShrink:0},children:h})]})})})}},56311:(e,o,r)=>{r.d(o,{A:()=>u});var t=r(89379),i=r(9950),n=r(2660),l=r(2046),s=r(83274),d=r(25333),c=r(97125),a=r(7762),h=r(52097),x=r(44414);const u=e=>{let{value:o,onChange:r,onDebouncedChange:u,debounceTime:p=500,placeholder:g="Search (ctrl+k)",sx:f}=e;const v=(0,i.useRef)(null),[A]=(0,h.d7)(o,p);return(0,i.useEffect)((()=>{u&&u(A)}),[A,u]),(0,i.useEffect)((()=>{const e=e=>{var o;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(o=v.current)||void 0===o||o.focus());"Escape"===e.key&&document.activeElement===v.current&&v.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,x.jsx)(n.A,{sx:(0,t.A)({},f),inputRef:v,placeholder:g,autoComplete:"off",value:o,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,x.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,x.jsx)(c.A,{})}),endAdornment:(0,x.jsx)(s.A,{title:"Clear",children:(0,x.jsx)(d.A,{sx:{visibility:o?"visible":"hidden"},onClick:()=>r(""),children:(0,x.jsx)(a.A,{})})})})}},58691:(e,o,r)=>{r.d(o,{A:()=>s});r(9950);var t=r(16491),i=r(46639),n=r(62217),l=r(44414);function s(e){let{size:o=70,imgSize:r=40,alt:s="loader"}=e;return(0,l.jsxs)(t.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,l.jsx)(i.A,{size:o}),(0,l.jsx)(t.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:r,height:r},children:(0,l.jsx)("img",{src:n,alt:s,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,o,r)=>{r.d(o,{A:()=>x});var t=r(89379),i=r(9950),n=r(93230),l=r(41413),s=r(77922),d=r(29925),c=r(26910),a=r(31222),h=r(44414);const x=(0,i.forwardRef)(((e,o)=>{let{setAppId:r,setLocoName:x,setPage:u,sx:p,textfeildSx:g,textfieldSx:f,pill:v=!1,accentColor:A="#6366f1",icon:b,placeholder:m="Select Zone",paperComponent:j}=e;const[w,S]=(0,i.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,i.useEffect)((()=>{0===w.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const o=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(o.data.status){const e=[...o.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[w.length]);const y=e=>"".concat(A).concat(e),W=y("26"),C=y("18"),k=v?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(W)},"&.Mui-focused fieldset":{borderColor:A,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},R=v&&(0,h.jsx)(n.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,h.jsx)(l.A,{sx:{width:24,height:24,bgcolor:C,color:A,transition:"background-color 0.15s, color 0.15s"},children:b||(0,h.jsx)(a.HPi,{size:14})})});return(0,h.jsx)(s.A,{id:"location-autocomplete",options:w||[],getOptionLabel:e=>{var o;return null!==(o=null===e||void 0===e?void 0:e.locationname)&&void 0!==o?o:""},PaperComponent:j,sx:(0,t.A)({},p),onChange:(e,o,t)=>{"clear"===t?(null===r||void 0===r||r(0),null===x||void 0===x||x(""),null===u||void 0===u||u(0)):o&&(null===r||void 0===r||r(o.applocationid),null===x||void 0===x||x(o.locationname),null===u||void 0===u||u(0))},renderInput:e=>v?(0,h.jsx)(d.A,(0,t.A)((0,t.A)({},e),{},{inputRef:o,placeholder:m,InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:R}),sx:(0,t.A)((0,t.A)({},k),f||g||{})})):(0,h.jsx)(d.A,(0,t.A)((0,t.A)({},e),{},{inputRef:o,label:"Select Zones",sx:(0,t.A)({},f||g||{})}))})}))},62217:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAPnUlEQVR4AdVae3AU9R3/7d4jdyGQQKAhECBAJBSmEAtFSQUjqPgAHGlhRm0lDkWY6Tg+O9qiErR26h8WR8ZWqTMN1ur4qMpDrTyjtDwDJloeCYiBvAgkaZ53l7vb3X4/v9vfZS/Zu9uFwLSfmb3d293f7u/z+z5/399K7CphdW5JrupgBZosZ0ialmu8pklSjUOTamRJbvvjqTUV7CpAYlcIj+SWZHQ55WJZlm7UNK2IXpRhpZ3GWJskSWXUZrPD4Sp77eSva9gVwIATXz35+SJNYWs1phWxAYDEpDKVaZv+fOrZUjaAGDDiK695rpgetpYOc82upw72sMycdJbz/SzmHeKl/ynRay31bbS1s7rjTczXGYj3ihrShnUDNQCXTXzlNS8UyExdbybhSdeNYwXz81nBzflE2pKms7oT51ntiSa276NKVn3wrNktNcGQelNpTUkNuwxcFvFV+S88rKnKy8ZzkOz84uvYvOJZ/PhyAE3Y/+HXbN+HFVwjjJAlR8lr1WueY9wt2MclEYfj8rnkj+nwRnHOLuGWhnbmpfuMKh/3Xn0Atm74IuY8OcGPFYk99kbVM98xm7BFnDyttHLyb3MlRdsjSWycOA+VLv79YpY5Ork6V5efY59s/JJVHznH/+dMymLz7v0Rm71oWtK2GIDSJ7ew6kMxJlCjytI8u+Qddm4+93bPBIfqiiG96KG5RPouljokuZT3b/2avf7EB6ylsZ1dM2MsG5OfxU7RAFSWVbMAObUphRMTtsc7CpdMh6c3kqe8gN117Yh5W4627GljFmGZ+C/ynx/flzSkDPW2Aqj2+lV/Y5mj0tljG3/GFhQXspkLpnBJVx85yyq/OGWJPAANgzkd2/utOMXJzxp965vlF3YFrPRHZtYgSZq6vi/p2TT6VrF+1Vt8/yiRhnoLiIHAftc7h0kDzlp6HgYcfTAgVwmEPmIWzTeZxPEQaeWkkhJJk1eJk8vWLGBz75nBrAIqfmDrN2zhqjlsetGkftddKU6WQ2qPe6AZVuwdGPP9kWw4+ZWKnVXiVO6M4UXtR1rKDiZrm4g4J70871cTnMzzd3ESNn3bgz9mdgC7hmoufeKWuB4/c1QGV3nYfP7Msfy/FYB8rM1LC6YNm72lonXv+UTtEqr60qVLJTcbvEv8h20tfOhGZgeQtpBiZnZ6wnuhEUDFnlPMDhaSMCbNilohc0kp61mEW1y1j0u8hLR78Ff5xX3t2i5AHLjegvqOIdtHXK/8oorZRfGLiw3aJM1dkVeynA5kCsGm98cjLhNxh4O5nxEnoOJW4rQRkDRUF3adTNoAEprRRB7tfJ09zA7Qt3mGCCMz+dmioiLKcSRTjvGISw/kPbNcSDtzdLotDy6A+AyYObR4KCjK53ur3t2I+ct7s0b0Pfds4U04RuLV914z4rjJ4ZSc94sTSBrsShvYv62S76frZKwAYQ2orWpidoEExyh1tzPl6SlTpjhJ6v3u7Utcgm0vHf/wePKUc8TJS5E21LWu6gKbRBmalXwcgHp70yISg8QR3oTWWAWk3gtpbp6/cCiLRK8Y9k7jHzgCGh3n8om/ibpueHKr0vZT5lVZFvHItVWRaALVQ4pqxcYfL3opeoxcvlr3D4BVc4HU4eFFeMt0ZsHJvUzcFKPkY4gvW7YMGiC7ZfcicW723dalXUsS3lSyNeZcBUmsmaS/5p0Vlp4BVccADsvOYP6uAM/yKsqq7PkJmv8L4k7mmEu7DcRNIfIqkedu3qjq0pkzZ/DfITE5quZjp2Qxu0Dnha1iX1fdxD55fW/CNjANYN49s7jKI5O788E5kfY0oHZQcEuvT5GY8wbaye+//36MqsfY+JEjR6QlY1cX0CHvNdQmZ/JIZhUtjW3RzkNqsG90Hti2cS8fgGSoqz7Pp6loi/uH6wNnJ7zBNA0ZYvrdY1aMZ6hdGHQ9RuL473KmDBUnUB+zAyE1dP6me2fxpMUYljat3Zb0GfvJodWRRz9Aic/utw+Ts/NG1L/L0qQrCoRggVTXUGRPMULmNo44h0CflZXlcGiuXLPGdoDOo7Pw0EYpC5W/c9Wcfm3EoAGiSAF4h0QiQmtDmyUHKZAzZSSrPam/W5MgzJgUlo+CrgFSU1OT5GTOseKi7UytsT2GiJlqW1X5aB+IrJfCYXNDO7MDYwh1yA4kYvKMGTNkkcxw4ghjdJLfQ9ntJRcgWxqsFUCsqDzg1e0U5FtsEvfGVIQ4J9nv90fNXEhcgmPLyEAh49KJW4WZlzezYSE172BvjDbZhc5JPn78eH/nlpubK7e1tcWQtjtRaDXpnLHaYkRflTdbSEhN65V4a4Plclo/IC/TDyV9ixCnNJWFw2EpPT2dBcKBBtHA3+FndmCmjsueuJnIf8/0/mQq79UlDkdpV+LGOnxQ7aljOmFwBTjxY8eOSXV1day9vV1SlFCHaFB3wroT8sdZ+kE4QuXFDMkSG7+ucZmUxdmdqrbU9WpIINQuiPO5CM5x4pTVYMdTucbgt8ejjeutj3K8Tg0jaU2aMY4nJWYQKm+mLT7d7kUW2GrDwRmFFpD8Xax3xSUmZcUfPhL7L2yvp9XJTv7ijgAv4ltBPK8rHNRCPf00QzKVRzs8p7Y6YRktCqy99foMrWN73bsnWJ/ZmTGbUVlkADRFDUarlIYKZkKYeWUjUYSm+0sWmraFxHdTaTkRhtnI2bHwKBBUA3iwSv6LcxPnjV4dI6J5vV61W+04JM5X7LBG3Mwr9820oPLxZln+zsQpac6kkdG5QDLs+7AyetwRat0FTvqsLEpeJDBaTU2NQocqBXl1f9PnH4uGmN5ZcSpmqu41KSUvffwWy4UJIzCIxlQ2bj/ILxnX1mq6Tx0EJwrVKlVjNFF8NKasbMSIEeqgQYOUWl91W0gNlIvGu0oPJH2h31Ti/VNeqP8dJrm6KQnDYIp5erKwZpR2j9JTfrRldy1x4mZMCYwWk7mxiPjVixcvqt3d3WpKSopS6z/9J/GA3ZsOJZW6mRp640h2Pk1bsWhoBzAToLo8fhES0t4fo+YXoblhWZbDtOcaLa5FbZziGyc/ZMgQpaenJ7yz4b1DqhpuxDV492RSNxuYeF4cWF6yiNmB8OyJ1B3SFlFI1ZSGj2o3grjS2dnJSescYyswa9eu5cQ7OjpwE0YodLGn/jVxHVJPFNfNc21PQiKiSJEIxgGFZ49XfETfthk+HGiO9B08wsOHD8deNd4fJa7rPi6G09LSeINPm97cHFT9R3gHSOqlT25m8WCWXCRzYvMpqUmkFYBxQOHZYedmNXdj36Cp6LvOJdTc3KzS4oKqC5cjSlz3dvhRurq6Qh6PJ0SDETrefvQP4h54y76fYwhg+ffRjfeRCi/kkrx+0Q9oVSRx2SpRbI8S7+iVuAiP+KrCiK0bvozx5Idat68KBoMhCmNBcKFQrYC4KDQC0SqrfhIS56oeCASC5ORCh5o/Pz7aO279CE/Oo7hvG70EBYrCPrX26CzM+uoxh0hnUWYyJd4VmSihWvvJxkheX2uY1e0qPRij4q09TW98/Z8D59B3CmNBUnMFoVpMTgT6LigI44eqB2kwMNxBchJvk8ofFTdtempLTNi4XCCdjWcWqLwgrH3w0g4eCaBVq1/6Kb+GPrz3u+3Re31K95cfnHv1dfSZPDn6HoKq06qvqvVZPey3Po6RKSsr49cwVWWRwXE2+M7tyxs87VZZktNwsZJSWVRhJxTksMsFPgyY85MZbGrhBJqDe5kzxRGd20MjOlq6qNqawSOBWDcHaQhAQCG7Pty66+l29WKz0+n0k8ZCVQITJ04M7dy5U1m3bl0M8XjVFgyIizYP2ckgUpnBdJw6OeOHuYWZC191ys6o8WJtepHNNXMrgDeHE0MuALLG9Bc2bVTvsBo+v6/ls1+ebDv8Ham4j8IxZmPdtMEzhljvPCSKeMT5wmF2dra7sbExlY4H0QZJe4n82L7ksWRT/OJdl1yVtQqELHhvoyMjSZ//V4T0WbfbHSCnxklTxdhPxdMgaXjY6NSMBPtBX0ODikPqbto4eXpwKj0Y5MfMHHbzI6mOtJhADOkXLikY8AGA9JFA7S49FDMZCij+ih31bz3V2FPbqpOGlLH5aION94vfAnELi3qtHddBHJ7Hy3Sp0+YhO3Ivzl65Yrgn+wFjO3j82UumDcgAxCMMNPnPbdhc98a7LpcLThikYdOQNrdtcmhhKrD0U3GBZBVVieKfg5wdJJ+Smprq9fl8kH4qvdATCoVc+ekFo28YvvgVh0H1BWACWGLGBzpjLK7KoGSEGgC2Pl8wckDK/247+MrR1t2YL8N+IVmfThh7YdcKS/Cda1LiqFHRJufk5LioLuch8h6dvJfIpxB5aITzjtE/v32kZ/wDTpMBAJC+YkkKWmD8ktlHCQqKmrUnL7BWIh3vs23YcmPgu798Wv/Xz0CM3h2mdwd0wnwjn9QzatSoEJXKw1pEZeMTYxagq73w9FB7Suw8XlVVvaRi+A/yuO64bfR9t2eljL09xeEtYAOAQNhfcabrm9J/XtyGPIKn1Lp6B3X19tN6gJ/m29ymSUgKUlMzh2aEncUDmdRe1tXeaPce/dilbxgAOT99evbEQdOuHebJvsHrSC2gpec0Ky/RmNrlV3wVneHWrw427/hHc7C+k/IJEFZ1KSOjDFDIEtLmSRb1LUR94/dZeY+tVROoPDaQo1TQTS9PoSlfik4cA0B9c7mpc1z6GAByghISoZkjivI8MuVRjqEjU52DRuossXir+UJdFHcCXfW+b09VtR9tMnReoefxNJqeCbsF6R7KygL03B56N8/OWK/3tkTaNnHWa/M8zrNIru8iOik0GeADQGHFTabh0q85qL/8Kwu0xSBgTwPB6BiLGMZn83SZzmuQMAhTWz5voEeGoNcgTtWUHiqW8OO8vLww+R5lz5494UT2PBDEY9rSQqOTHAmP91TFdNGChJsyPTdlelztqcMu6i+XvNiIkBQRHlcPHGv6sUbHIKzo56J1AZBkvR5cSFhUVBR2CbD69bIpysvLecdoAHqINOytm0ijJt9J3r+TVBLHXfrGkwsiJRIMLF1i76MBEue7qE0XqTPadYiNnFen3j6Ad5HGYSDwTcslkQYGamVULLrLpH7y6dOnuY1TGctFFR0hcYfhvujinQ6eaNBgYc6sEHm+0WAKqatEWJkwYYI6depUjYhbtuWrBW775GGd1FEXFQA8FFsR8+HRMdFBKocgPrTvRkgnh4l70ijPxtwAzpLnCLpDvSztvFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg=="},96646:(e,o,r)=>{r.d(o,{r:()=>d});var t=r(9213),i=r(21671),n=r(82917),l=r(93230),s=r(44414);const d=e=>{let{rowsPerPage:o=5,col:r=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(o)).map(((e,o)=>(0,s.jsxs)(t.A,{children:[(0,s.jsx)(i.A,{children:(0,s.jsx)(n.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(i.A,{children:(0,s.jsx)(n.A,{variant:"text",width:30})}),Array.from({length:r}).map(((e,o)=>(0,s.jsx)(i.A,{children:(0,s.jsxs)(l.A,{spacing:.5,children:[(0,s.jsx)(n.A,{variant:"text",width:100}),(0,s.jsx)(n.A,{variant:"text",width:80})]})},o))),(0,s.jsx)(i.A,{children:(0,s.jsx)(n.A,{variant:"text",width:150})}),(0,s.jsx)(i.A,{children:(0,s.jsx)(n.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(i.A,{align:"center",children:(0,s.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(n.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(n.A,{variant:"circular",width:28,height:28})]})})]},o)))})}}}]); \ No newline at end of file diff --git a/build/static/js/2851.b582cabe.chunk.js b/build/static/js/2851.b582cabe.chunk.js deleted file mode 100644 index 1f49972..0000000 --- a/build/static/js/2851.b582cabe.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2851],{22851:(e,o,r)=>{r.r(o),r.d(o,{default:()=>Ke});var t=r(89379),n=r(85571),i=r(8881),l=r(24513),s=r(36256),d=r(9950),c=r(4159),a=r.n(c),x=r(26910),h=r(14857),u=r(31222),p=r(51778),g=r(36150),f=r(60010),b=r(2235),v=r(41413),A=r(47223),m=r(55158),j=r(93230),w=r(82053),S=r(16491),y=r(60899),C=r(82917),W=r(77922),k=r(25277),R=r(29925),z=r(1320),D=r(93038),I=r(25333),P=r(15769),L=r(69780),M=r(9213),Y=r(21671),T=r(34075),F=r(83274),E=r(33738),K=r(17239),O=r(23266),N=r(96583),H=r(28170),B=r(82223),J=r(40033),q=r(79739),Z=r(37476),U=r(56712),G=r(81417),V=r(96600),Q=r(53132),X=r(94289),_=r(57326),$=r(50624),ee=r(55916),oe=r(52351),re=r(67562),te=r(49883),ne=r(81425),ie=r(56311),le=r(20466),se=r(96646),de=r(59212),ce=r(58691),ae=r(23787),xe=r(44414),he=r(36220);a().extend(he);const ue=999,pe=16,ge="0 8px 24px rgba(15, 23, 42, 0.08)",fe="0 18px 50px rgba(15, 23, 42, 0.18)",be="#0f172a",ve="#64748b",Ae="#94a3b8",me="#e2e8f0",je="#f1f5f9",we="#f8fafc",Se=(e,o)=>"".concat(e).concat(o),ye=e=>Se(e,"08"),Ce=e=>Se(e,"18"),We=e=>Se(e,"26"),ke=e=>Se(e,"55"),Re=e=>({cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:ue+"px",bgcolor:ye(e),fontWeight:600,color:be,paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s, background-color 0.2s","& fieldset":{borderColor:ke(e),borderWidth:1.5},"&:hover fieldset":{borderColor:e},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(We(e))},"&.Mui-focused fieldset":{borderColor:e,borderWidth:2}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:e}}),ze={pending:{label:"Pending",color:"#f59e0b",icon:u.tX0},accepted:{label:"Accepted",color:"#6366f1",icon:u.Azs},arrived:{label:"Arrived",color:"#06b6d4",icon:u.gwi},picked:{label:"Picked",color:"#8b5cf6",icon:u.gsJ},active:{label:"Active",color:"#14b8a6",icon:u.pk7},skipped:{label:"Skipped",color:"#f97316",icon:u.ivF},delivered:{label:"Delivered",color:"#10b981",icon:u.mU9},cancelled:{label:"Cancelled",color:"#ef4444",icon:u.uDv}},De=[{status:"pending",countKey:"uncoveredLength"},{status:"accepted",countKey:"assignedLength"},{status:"arrived",countKey:"arrivedLength"},{status:"picked",countKey:"pickedLength"},{status:"active",countKey:"activeLength"},{status:"skipped",countKey:"skippedLength"},{status:"delivered",countKey:"coveredLength"},{status:"cancelled",countKey:"cancelLength"}],Ie=[{key:"created",label:"Created Orders",color:"#0ea5e9",icon:u.F6S},{key:"pending",label:"Pending Orders",color:"#f59e0b",icon:u.tX0},{key:"delivered",label:"Delivered Orders",color:"#10b981",icon:u.mU9},{key:"cancelled",label:"Cancelled Orders",color:"#ef4444",icon:u.uDv}],Pe=[{id:"all",label:"All Batches",range:"Across the day",color:"#7c3aed",iconKey:"all"},{id:"morning",label:"Morning Batch",range:"12 AM to 8 AM",color:"#0ea5e9",iconKey:"morning",startHour:0,endHour:8},{id:"afternoon",label:"Afternoon Batch",range:"9 AM to 12:30 PM",color:"#f59e0b",iconKey:"afternoon",startHour:9,endHour:12.5},{id:"evening",label:"Evening Batch",range:"4 PM to 7 PM",color:"#6366f1",iconKey:"evening",startHour:16,endHour:19}],Le={all:u.lB9,morning:u.N3N,afternoon:u.aSE,evening:u.giK},Me=()=>{const e=a()(),o=e.hour()+e.minute()/60;for(const r of Pe)if("all"!==r.id&&o>=r.startHour&&o{let o=null;for(const i of Ye)if(null!==e&&void 0!==e&&e[i]){o=e[i];break}if(!o)return null;const r=String(o).trim();if(/^\d{4}-\d{2}-\d{2}$/.test(r))return null;const t=a()(o);if(!t.isValid())return null;const n=t.hour()+t.minute()/60;for(const i of Pe)if("all"!==i.id&&n>=i.startHour&&n(0,xe.jsx)(b.A,(0,t.A)((0,t.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:fe,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),Ee=e=>{let{color:o,selected:r,size:t=24,children:n}=e;return(0,xe.jsx)(v.A,{sx:{width:t,height:t,bgcolor:r?o:Ce(o),color:r?"#fff":o,transition:"background-color 0.15s, color 0.15s"},children:n})},Ke=()=>{const e=localStorage.getItem("userid"),o=(0,h.A)(),r=(0,A.A)(o.breakpoints.down("md")),c=(0,d.useRef)(),he=(0,d.useRef)(),[ue,Se]=(0,d.useState)([]),[Ye,Ke]=(0,d.useState)(!1),[Oe,Ne]=(0,d.useState)("All"),[He,Be]=(0,d.useState)(0),[Je,qe]=(0,d.useState)(a()().format("YYYY-MM-DD")),[Ze,Ue]=(0,d.useState)(a()().format("YYYY-MM-DD")),[Ge,Ve]=(0,d.useState)("Pending"),[Qe,Xe]=(0,d.useState)(0),[_e,$e]=(0,d.useState)(!1),[eo,oo]=(0,d.useState)("Today"),[ro,to]=(0,d.useState)(""),[no,io]=(0,d.useState)(),[lo,so]=(0,d.useState)(),[co,ao]=(0,d.useState)(""),[xo,ho]=(0,d.useState)({}),[uo,po]=(0,d.useState)(""),[go,fo]=(0,d.useState)(""),[bo,vo]=(0,d.useState)("pending"),[Ao,mo]=(0,d.useState)("delivered"),jo=(0,d.useRef)(null),wo=(0,d.useRef)(null),[So,yo]=d.useState(0),[Co,Wo]=d.useState(50),[ko,Ro]=d.useState(),[zo,Do]=(0,d.useState)(null),[Io,Po]=(0,d.useState)(null),[Lo,Mo]=(0,d.useState)(""),[Yo,To]=(0,d.useState)(""),[Fo,Eo]=d.useState(null),[Ko,Oo]=(0,d.useState)(null),[No,Ho]=(0,d.useState)(!1),[Bo,Jo]=d.useState(null),[qo,Zo]=(0,d.useState)(""),[Uo,Go]=(0,d.useState)(!1),[Vo,Qo]=(0,d.useState)(!1),[Xo,_o]=(0,d.useState)(""),[$o,er]=(0,d.useState)(null),[or,rr]=(0,d.useState)(0),[tr,nr]=(0,d.useState)(0),[ir,lr]=(0,d.useState)(null),[sr,dr]=(0,d.useState)(null),[cr,ar]=(0,d.useState)(0),[xr,hr]=(0,d.useState)(Me),ur=localStorage.getItem("roleid");(0,d.useEffect)((()=>{rr(0),lr(null),nr(0),dr(null)}),[He]),(0,d.useEffect)((()=>{nr(0),dr(null)}),[or]);const pr=Boolean(Fo),gr=(e,o)=>{Oo(o),console.log("selectedRow",o),Eo(e.currentTarget)},fr=()=>{Eo(null)},{mutate:br}=(0,p.n)({mutationFn:e=>{let{selectedRow:o,cancelFeed:r}=e;return(0,ne.zF)(o,r)},onSuccess:()=>{Rr("Delivery Cancelled Successfully","success"),Go(!1),Qr(),Mr(),Or()},onError:e=>{Rr(e.message,"error")}}),{data:vr,isLoading:Ar,isError:mr,error:jr}=(0,g.I)({queryKey:["tenantlist",He],queryFn:()=>(0,ne.Mn)(He),enabled:0!==He}),{data:wr,isLoading:Sr,isError:yr,error:Cr}=(0,g.I)({queryKey:["gettenantlocations",or],queryFn:()=>(0,ne.DL)(or),enabled:0!==or}),Wr=(0,p.n)({mutationFn:ne.k3,onSuccess:()=>{(0,i.M8)("Notification sent Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})},onError:e=>{(0,i.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}}),kr=(0,p.n)({mutationFn:e=>{let{selectedRider:o,selectedRow:r}=e;return(0,ne.R_)(o,r)},onSuccess:(e,o)=>{let{selectedRider:r,selectedRow:t}=o;Ho(!1),Qo(!1),"Success"===e.data.message&&(n.A.info("Rider changed successfully for order ID ".concat(null===t||void 0===t?void 0:t.orderid,". New Rider: ").concat(null===r||void 0===r?void 0:r.firstname," ").concat(null===r||void 0===r?void 0:r.lastname)),Rr("Rider Changed Successfully","success")),Qr(),Mr(),Or(),Wr.mutate(r.userfcmtoken)},onError:(e,o)=>{let{selectedRider:r,selectedRow:t}=o;n.A.error("Failed to change rider for order ID ".concat(null===t||void 0===t?void 0:t.orderid,":"),e),Rr(e.message,"error"),Ho(!1)}}),Rr=(e,o)=>{(0,i.M8)(e,{variant:o,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})},{data:zr}=(0,g.I)({queryKey:["orderdetails",Io],queryFn:()=>(0,ne.z3)(Io),enabled:!!Io}),Dr=()=>{Ke(!1)},{isLoading:Ir,isError:Pr,error:Lr,refetch:Mr}=(0,f.q)({queryKey:["fetchdeliveries",He,e,bo,Je,Ze,Co,Yo,or,tr,cr],queryFn:ne.tL,getNextPageParam:e=>{var o;return null!==(o=e.nextPage)&&void 0!==o?o:void 0}}),{data:Yr,fetchNextPage:Tr,hasNextPage:Fr,isFetchingNextPage:Er,isLoading:Kr,refetch:Or}=(0,f.q)({queryKey:["fetchdeliveries-batchcounts",He,e,"all",Je,Ze,200,"",or,tr,cr],queryFn:ne.tL,getNextPageParam:e=>{var o;return null!==(o=e.nextPage)&&void 0!==o?o:void 0}}),Nr=(0,d.useMemo)((()=>((null===Yr||void 0===Yr?void 0:Yr.pages)||[]).flatMap((e=>e.rows||[]))),[Yr]);(0,d.useEffect)((()=>{Fr&&!Er&&Tr()}),[Fr,Er,Tr,Nr.length]);const Hr=Fr||Er,Br=(0,d.useMemo)((()=>{const e=String(bo||"").toLowerCase(),o=String(Yo||"").trim().toLowerCase();return Nr.filter((r=>{if("all"!==xr&&Te(r)!==xr)return!1;const t=String(r.orderstatus||"").toLowerCase();if(e&&t!==e)return!1;if(o){if(![r.deliverycustomer,r.deliveryaddress,r.deliverysuburb,r.pickupcustomer,r.pickupaddress,r.pickupsuburb,r.orderid,r.tenantname,r.ridername,r.username].map((e=>String(e||"").toLowerCase())).join(" ").includes(o))return!1}return!0}))}),[Nr,xr,bo,Yo]),Jr=(0,d.useMemo)((()=>{const e={uncoveredLength:0,assignedLength:0,arrivedLength:0,pickedLength:0,activeLength:0,skippedLength:0,coveredLength:0,cancelLength:0};return Nr.forEach((o=>{if("all"!==xr&&Te(o)!==xr)return;switch(String(o.orderstatus||"").toLowerCase()){case"pending":e.uncoveredLength+=1;break;case"accepted":case"assigned":e.assignedLength+=1;break;case"arrived":e.arrivedLength+=1;break;case"picked":e.pickedLength+=1;break;case"active":e.activeLength+=1;break;case"skipped":e.skippedLength+=1;break;case"delivered":e.coveredLength+=1;break;case"cancelled":case"canceled":e.cancelLength+=1}})),e}),[Nr,xr]),qr=(0,d.useMemo)((()=>{const e={all:0};return Pe.forEach((o=>{"all"!==o.id&&(e[o.id]=0)})),Nr.forEach((o=>{const r=Te(o);r&&(e[r]=(e[r]||0)+1,e.all+=1)})),e}),[Nr]);(0,d.useEffect)((()=>{if(!Fr)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Tr()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return c.current&&e.observe(c.current),()=>{c.current&&e.unobserve(c.current)}}),[Fr,Tr]);const{data:Zr={},isLoading:Ur,isError:Gr,error:Vr,refetch:Qr}=(0,g.I)({queryKey:["fetchCountData",He,e,Je,Ze,Co,Yo,or,tr,cr,Ge],queryFn:()=>(0,ne.qB)(He,e,Je,Ze,Co,Yo,or,tr,cr)});(0,d.useEffect)((()=>{console.log("countData",Zr),0===Qe&&Zr&&Ro(Zr.uncoveredLength)}),[Zr]);const{data:Xr=[],isLoading:_r,isError:$r,error:et}=(0,g.I)({queryKey:["ridersList",He],queryFn:ne.Sd,enabled:Boolean(He),onError:e=>{(0,le.k)(e.message,"error",2e3)}}),ot=(0,p.n)({mutationFn:e=>(0,ne.wT)(e),onSuccess:e=>{console.log(e),e.data.status&&(Rr("Updated Successfully","success"),so(""),ao(""),Ke(!1),Mr(),Qr(),Or())},onError:e=>{console.log(e),Rr(e.message,"success")}}),rt=Pr?"Error fetching deliveries: ".concat(null===Lr||void 0===Lr?void 0:Lr.message):Gr?"Error fetching count summary: ".concat(null===Vr||void 0===Vr?void 0:Vr.message):$r?"Error fetching riders: ".concat(null===et||void 0===et?void 0:et.message):mr?"Error tenant list: ".concat(null===jr||void 0===jr?void 0:jr.message):yr?"Error location list: ".concat(null===Cr||void 0===Cr?void 0:Cr.message):null;return rt?(console.log("errorMessage",rt),(0,le.k)(rt,"error",2e3),null):(0,xe.jsxs)(xe.Fragment,{children:[(Ur||Kr||Ar||Sr||_r)&&(0,xe.jsx)(xe.Fragment,{children:(0,xe.jsx)(oe.A,{})}),(0,xe.jsx)(m.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:Ur||Ir||Ar||Sr||_r}),(0,xe.jsx)(b.A,{elevation:0,sx:{mb:{xs:1.5,md:2},p:{xs:1.5,sm:2,md:2.5},borderRadius:pe/8,border:"1px solid",borderColor:me,background:"linear-gradient(135deg, ".concat(ye("#6366f1")," 0%, ").concat(ye("#0ea5e9")," 100%)"),boxShadow:ge},children:(0,xe.jsxs)(j.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",spacing:{xs:1.5,sm:2},children:[(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:{xs:1.25,sm:1.75},children:[(0,xe.jsx)(v.A,{sx:{width:{xs:40,sm:48},height:{xs:40,sm:48},bgcolor:"#6366f1",color:"#fff",boxShadow:"0 6px 18px rgba(99,102,241,0.32)"},children:(0,xe.jsx)(u.F6S,{size:22})}),(0,xe.jsxs)(j.A,{children:[(0,xe.jsx)(w.A,{variant:"h3",sx:{fontWeight:800,color:be,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"}},children:"Deliveries"}),(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[(0,xe.jsx)(S.A,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:"#10b981",boxShadow:"0 0 0 4px rgba(16,185,129,0.18)"}}),(0,xe.jsxs)(w.A,{variant:"caption",sx:{color:ve,fontWeight:600},children:["Live \xb7 ",Oe||"All Zones"]})]})]})]}),(0,xe.jsx)(de.A,{ref:jo,locaName:Oe,setAppId:Be,setLocoName:Ne,setPage:yo,pill:!0,accentColor:"#6366f1",icon:(0,xe.jsx)(u.HPi,{size:14}),placeholder:"Select Zone",paperComponent:Fe,sx:{width:{xs:"100%",sm:280},zIndex:100}})]})}),(0,xe.jsx)(y.Ay,{container:!0,spacing:{xs:1.25,sm:1.5,md:2},sx:{mt:"1px"},children:[(0,t.A)((0,t.A)({},Ie[0]),{},{value:qr.all,percentage:null}),(0,t.A)((0,t.A)({},Ie[1]),{},{value:null===Zr||void 0===Zr?void 0:Zr.uncoveredLength,percentage:null!==Zr&&void 0!==Zr&&Zr.total?Math.round(Zr.uncoveredLength/Zr.total*100):0}),(0,t.A)((0,t.A)({},Ie[2]),{},{value:null===Zr||void 0===Zr?void 0:Zr.coveredLength,percentage:null!==Zr&&void 0!==Zr&&Zr.total?Math.round(Zr.coveredLength/Zr.total*100):0}),(0,t.A)((0,t.A)({},Ie[3]),{},{value:null===Zr||void 0===Zr?void 0:Zr.cancelLength,percentage:null!==Zr&&void 0!==Zr&&Zr.total?Math.round(Zr.cancelLength/Zr.total*100):0})].map((e=>{var o;const r=e.icon,t="number"===typeof e.percentage?e.percentage:Number(e.percentage),n=!Number.isNaN(t)&&void 0!==e.percentage&&null!==e.percentage;return(0,xe.jsx)(y.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,xe.jsxs)(b.A,{elevation:0,sx:{position:"relative",overflow:"hidden",p:{xs:1.25,sm:1.75,md:2.25},borderRadius:pe/8,border:"1px solid",borderColor:me,background:"#fff",transition:"transform 0.2s, box-shadow 0.2s, border-color 0.2s",cursor:"pointer","&:hover":{transform:"translateY(-3px)",boxShadow:ge,borderColor:ke(e.color)}},children:[(0,xe.jsx)(S.A,{sx:{position:"absolute",top:0,left:0,right:0,height:3,background:"linear-gradient(90deg, ".concat(e.color," 0%, ").concat(Ce(e.color)," 100%)")}}),(0,xe.jsxs)(j.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,xe.jsxs)(j.A,{spacing:.5,sx:{minWidth:0,flex:1},children:[(0,xe.jsx)(w.A,{variant:"caption",sx:{color:ve,fontWeight:700,letterSpacing:.4,textTransform:"uppercase",fontSize:{xs:10,sm:11},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.label}),Ur?(0,xe.jsx)(C.A,{sx:{width:70,height:{xs:28,md:36}},animation:"wave"}):(0,xe.jsx)(w.A,{sx:{fontWeight:800,color:be,lineHeight:1.1,fontSize:{xs:"1.5rem",sm:"1.75rem",md:"2rem"}},children:null!==(o=e.value)&&void 0!==o?o:0}),n&&(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:.5,sx:{mt:.5,flexWrap:"wrap"},children:[(0,xe.jsxs)(S.A,{sx:{display:"inline-flex",alignItems:"center",gap:.25,px:.75,py:.25,borderRadius:999,bgcolor:Ce(e.color),color:e.color,fontSize:{xs:10,sm:11},fontWeight:800},children:[Math.abs(t),"%"]}),(0,xe.jsx)(w.A,{variant:"caption",sx:{color:Ae,display:{xs:"none",sm:"inline"}},children:"of total"})]})]}),(0,xe.jsx)(v.A,{sx:{width:{xs:36,sm:42,md:48},height:{xs:36,sm:42,md:48},bgcolor:Ce(e.color),color:e.color,boxShadow:"inset 0 0 0 1px ".concat(ke(e.color)),flexShrink:0},children:(0,xe.jsx)(r,{size:20})})]})]})},e.key)}))}),(0,xe.jsxs)(b.A,{elevation:0,sx:{mt:{xs:1.5,md:2},mb:{xs:1.5,md:2},p:{xs:1.5,md:2},borderRadius:pe/8,border:"1px solid",borderColor:me,background:"#fff",boxShadow:ge},children:[(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:{xs:1,md:1.5},color:ve},children:[(0,xe.jsx)(v.A,{sx:{width:28,height:28,bgcolor:Ce("#6366f1"),color:"#6366f1"},children:(0,xe.jsx)(u.MiI,{size:16})}),(0,xe.jsx)(w.A,{variant:"caption",sx:{fontWeight:800,letterSpacing:.6,textTransform:"uppercase",color:ve},children:"Filters"})]}),(0,xe.jsxs)(j.A,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:1.25,sx:{flexWrap:"wrap"},children:[(0,xe.jsxs)(j.A,{direction:"row",flexWrap:"wrap",gap:1.5,alignItems:"center",children:[(()=>{const e=Pe.find((e=>e.id===xr))||Pe[0],o=Le[e.iconKey]||u.VP9;return(0,xe.jsx)(W.A,{disableClearable:!0,size:"small",openOnFocus:!0,selectOnFocus:!0,filterOptions:e=>e,options:Pe,value:e,onChange:(e,o)=>o&&hr(o.id),getOptionLabel:e=>e.label,isOptionEqualToValue:(e,o)=>e.id===o.id,PaperComponent:Fe,ListboxProps:{sx:{py:0,maxHeight:360}},renderOption:(e,o,r)=>{var n;let{selected:i}=r;const l=Le[o.iconKey]||u.VP9,s=null!==(n=qr[o.id])&&void 0!==n?n:0;return(0,d.createElement)("li",(0,t.A)((0,t.A)({},e),{},{key:o.id,style:{display:"flex",alignItems:"center",gap:12,padding:"10px 14px",borderBottom:"1px solid #f1f5f9",backgroundColor:i?"".concat(o.color,"10"):"transparent",transition:"background-color 0.15s"}}),(0,xe.jsx)(v.A,{sx:{width:36,height:36,bgcolor:i?o.color:"".concat(o.color,"18"),color:i?"#fff":o.color,transition:"background-color 0.15s, color 0.15s"},children:(0,xe.jsx)(l,{size:20})}),(0,xe.jsxs)(j.A,{direction:"column",spacing:0,flex:1,minWidth:0,children:[(0,xe.jsx)(w.A,{variant:"body2",fontWeight:700,color:"#0f172a",noWrap:!0,children:o.label}),(0,xe.jsx)(w.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:o.range})]}),(0,xe.jsx)(k.A,{size:"small",label:s,sx:{minWidth:36,height:22,fontWeight:800,fontSize:11,bgcolor:s>0?"".concat(o.color,"18"):"#f1f5f9",color:s>0?o.color:"#94a3b8",border:"1px solid ".concat(s>0?o.color+"55":"#e2e8f0"),"& .MuiChip-label":{px:.75}}}),i&&(0,xe.jsx)(v.A,{sx:{width:22,height:22,bgcolor:o.color,color:"#fff"},children:(0,xe.jsx)(u.g9_,{size:14})}))},renderInput:r=>{var n;return(0,xe.jsx)(R.A,(0,t.A)((0,t.A)({},r),{},{placeholder:"Batch",inputProps:(0,t.A)((0,t.A)({},r.inputProps),{},{readOnly:!0,style:(0,t.A)((0,t.A)({},(null===(n=r.inputProps)||void 0===n?void 0:n.style)||{}),{},{cursor:"pointer",caretColor:"transparent"})}),InputProps:(0,t.A)((0,t.A)({},r.InputProps),{},{startAdornment:(0,xe.jsx)(j.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(v.A,{sx:{width:24,height:24,bgcolor:"".concat(e.color,"18"),color:e.color},children:(0,xe.jsx)(o,{size:14})})})}),sx:{minWidth:{xs:180,sm:220,md:240},cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"999px",bgcolor:"".concat(e.color,"08"),fontWeight:700,color:e.color,paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s, background-color 0.2s","& fieldset":{borderColor:"".concat(e.color,"55"),borderWidth:1.5},"&:hover fieldset":{borderColor:e.color},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(e.color,"26")},"&.Mui-focused fieldset":{borderColor:e.color,borderWidth:2}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:e.color}}}))}})})(),Je&&Ze&&(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:.75,onClick:()=>$e(!0),sx:{pl:.5,pr:1.25,py:.5,borderRadius:999,cursor:"pointer",bgcolor:ye("#f59e0b"),border:"1.5px solid ".concat(ke("#f59e0b")),transition:"border-color 0.15s, box-shadow 0.15s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(We("#f59e0b"))}},children:[(0,xe.jsx)(Ee,{color:"#f59e0b",children:(0,xe.jsx)(u.tjE,{size:14})}),(0,xe.jsxs)(w.A,{variant:"caption",sx:{fontWeight:700,color:"#f59e0b",whiteSpace:"nowrap"},children:[a()(Je).format("DD MMM")," \u2013 ",a()(Ze).format("DD MMM")]})]})]}),(0,xe.jsx)(W.A,{disablePortal:!0,options:vr||[],value:ir,PaperComponent:Fe,sx:{flex:{xs:"1 1 100%",sm:"1 1 180px"},minWidth:{xs:"100%",sm:180}},onOpen:e=>{He||(e.preventDefault(),(0,le.k)("Please select your zone first!","warning",3e3),setTimeout((()=>{var e;return null===(e=jo.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,o,r)=>{"clear"===r?(rr(0),lr(null),nr(0),dr(null)):(rr((null===o||void 0===o?void 0:o.tenantid)||0),lr(o),nr(0),dr(null))},renderInput:e=>(0,xe.jsx)(R.A,(0,t.A)((0,t.A)({},e),{},{inputRef:wo,placeholder:"Select Tenant",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(j.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(Ee,{color:"#0ea5e9",children:(0,xe.jsx)(u.gl1,{size:14})})})}),sx:Re("#0ea5e9")}))}),(0,xe.jsx)(W.A,{disablePortal:!0,options:wr||[],getOptionLabel:e=>"".concat(e.locationname," (").concat(e.suburb,")")||0,value:sr,PaperComponent:Fe,sx:{flex:{xs:"1 1 100%",sm:"1 1 180px"},minWidth:{xs:"100%",sm:180}},onOpen:e=>{He||or?or||(e.preventDefault(),(0,le.k)("Please select your Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=wo.current)||void 0===e?void 0:e.focus()}),0)):(e.preventDefault(),(0,le.k)("Please select your Zone and Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=jo.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,o,r)=>{"clear"===r?(nr(0),dr(null)):(nr(o.locationid||0),dr(o))},renderInput:e=>(0,xe.jsx)(R.A,(0,t.A)((0,t.A)({},e),{},{placeholder:"Select Location",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(j.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(Ee,{color:"#14b8a6",children:(0,xe.jsx)(u.gwi,{size:14})})})}),sx:Re("#14b8a6")}))}),(0,xe.jsx)(W.A,{disabled:_r,options:Xr,PaperComponent:Fe,getOptionLabel:e=>"".concat(e.firstname," ").concat(e.lastname," (").concat(e.contactno,")"),sx:{flex:{xs:"1 1 100%",sm:"1 1 180px"},minWidth:{xs:"100%",sm:180}},onChange:(e,o,r)=>{ar("clear"===r?0:o.userid)},onOpen:e=>{He||(e.preventDefault(),(0,le.k)("Please select your zone first!","warning",3e3),setTimeout((()=>{var e;return null===(e=jo.current)||void 0===e?void 0:e.focus()}),0))},renderInput:e=>(0,xe.jsx)(R.A,(0,t.A)((0,t.A)({},e),{},{placeholder:"Choose Rider",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(j.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(Ee,{color:"#8b5cf6",children:(0,xe.jsx)(u.bsz,{size:14})})})}),sx:Re("#8b5cf6")}))})]})]}),(0,xe.jsx)(b.A,{elevation:0,sx:{p:{xs:1,md:1.5},borderTopLeftRadius:pe/8,borderTopRightRadius:pe/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:me,borderBottom:0,background:"#fff"},children:(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,xe.jsx)(j.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:me,borderRadius:4}},children:De.map(((e,o)=>{var r;const t=ze[e.status],n=t.icon,i=Qe===o,l=null!==(r=Jr[e.countKey])&&void 0!==r?r:0;return(0,xe.jsxs)(S.A,{onClick:e=>{return r=o,yo(0),Xe(r),Wo(50),0===r&&(Ve("Pending"),vo("pending"),Ro(null===Zr||void 0===Zr?void 0:Zr.uncoveredLength)),1===r&&(Ve("Assigned"),vo("accepted"),Ro(null===Zr||void 0===Zr?void 0:Zr.assignedLength)),2===r&&(Ve("Arrived"),vo("arrived"),Ro(null===Zr||void 0===Zr?void 0:Zr.arrivedLength)),3===r&&(Ve("Picked"),vo("picked"),Ro(null===Zr||void 0===Zr?void 0:Zr.pickedLength)),4===r&&(Ve("Active"),vo("active"),Ro(null===Zr||void 0===Zr?void 0:Zr.activeLength)),5===r&&(Ve("Skipped"),vo("skipped"),Ro(null===Zr||void 0===Zr?void 0:Zr.skippedLength)),6===r&&(Ve("Delivered"),vo("delivered"),Ro(null===Zr||void 0===Zr?void 0:Zr.coveredLength)),7===r&&(Ve("Cancelled"),vo("cancelled"),Ro(null===Zr||void 0===Zr?void 0:Zr.cancelLength)),console.log(r),void Mo("");var r},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:999,border:"1.5px solid ".concat(i?t.color:ke(t.color)),bgcolor:i?t.color:ye(t.color),color:i?"#fff":t.color,fontWeight:700,boxShadow:i?"0 6px 18px ".concat(We(t.color)):"none",transition:"all 0.18s","&:hover":{borderColor:t.color,boxShadow:i?"0 6px 18px ".concat(We(t.color)):"0 0 0 3px ".concat(We(t.color))}},children:[(0,xe.jsx)(v.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:i?"rgba(255,255,255,0.22)":Ce(t.color),color:i?"#fff":t.color},children:(0,xe.jsx)(n,{size:13})}),(0,xe.jsx)(w.A,{variant:"caption",sx:{fontWeight:800,fontSize:{xs:11.5,md:13},lineHeight:1},children:t.label}),(0,xe.jsx)(S.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:800,bgcolor:i?"rgba(255,255,255,0.22)":"#fff",color:i?"#fff":t.color,border:i?"none":"1px solid ".concat(ke(t.color))},children:l})]},e.status)}))}),(0,xe.jsx)(S.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,xe.jsx)(ie.A,{value:Lo,onChange:Mo,onDebouncedChange:To,sx:{m:0,width:"100%",borderRadius:999,bgcolor:ye("#6366f1"),"& fieldset":{borderColor:ke("#6366f1"),borderWidth:1.5},"&:hover fieldset":{borderColor:"#6366f1"},"&.Mui-focused fieldset":{borderColor:"#6366f1",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(We("#6366f1"))}}})})]})}),(0,xe.jsx)(b.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:pe/8,borderBottomRightRadius:pe/8,border:"1px solid",borderColor:me,overflow:"hidden",background:"#fff"},children:(0,xe.jsx)(z.A,{ref:he,onScroll:e=>{const{scrollTop:o,scrollHeight:r,clientHeight:t}=e.currentTarget;o+t>=r-50&&Fr&&!Er&&Tr()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},overflow:"auto",overflowX:"auto","&::-webkit-scrollbar":{width:"10px",height:"10px",cursor:"pointer"},"&::-webkit-scrollbar-thumb":{backgroundColor:ke("#6366f1"),borderRadius:"8px",cursor:"pointer","&:hover":{backgroundColor:"#6366f1"}},"&::-webkit-scrollbar-track":{backgroundColor:we}},children:((e,o,n,i,s,x)=>{const h="Cancelled"!==Ge&&"Delivered"!==Ge,p="Created"==Ge,g=15+(h?1:0)+(p?1:0);return r?(0,xe.jsxs)(ae.nV,{sx:{p:1.25},children:[0===Br.length&&!No&&!Hr&&(0,xe.jsxs)(j.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,xe.jsx)(v.A,{sx:{width:64,height:64,bgcolor:Ce("#94a3b8"),color:Ae},children:(0,xe.jsx)(u.gsJ,{size:28})}),(0,xe.jsx)(w.A,{variant:"subtitle1",sx:{fontWeight:700,color:be},children:"No deliveries to show"}),(0,xe.jsx)(w.A,{variant:"caption",sx:{color:ve,textAlign:"center",px:2},children:"all"===xr?"No ".concat(((null===(e=ze[bo])||void 0===e?void 0:e.label)||Ge).toLowerCase()," orders for this filter."):"No ".concat(((null===(o=ze[bo])||void 0===o?void 0:o.label)||Ge).toLowerCase()," orders in ").concat((null===(n=Pe.find((e=>e.id===xr)))||void 0===n?void 0:n.label)||"this batch",".")})]}),0===Br.length&&Hr&&(0,xe.jsxs)(j.A,{alignItems:"center",sx:{py:6},children:[(0,xe.jsx)(ce.A,{}),(0,xe.jsx)(w.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading deliveries\u2026"})]}),Br.map(((e,o)=>{var r,n,i,s,d,c,x,g;const f=ze[String(e.orderstatus||"").toLowerCase()]||{label:e.orderstatus||"\u2014",color:"#94a3b8",icon:u.bfP},b=f.icon,v=!!ue.find((o=>o.orderheaderid==e.orderheaderid)),A=(null===zo||void 0===zo?void 0:zo.orderid)===(null===e||void 0===e?void 0:e.orderid),m=e=>({display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.25,borderRadius:999,bgcolor:ye(e),color:e,fontWeight:700,fontSize:11,border:"1px solid ".concat(ke(e)),whiteSpace:"nowrap"});return(0,xe.jsxs)(ae.pg,{accent:f.color,selected:v,header:(0,xe.jsxs)(j.A,{spacing:1.25,children:[(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[p&&(0,xe.jsx)(D.A,{size:"small",sx:{p:.25},onChange:o=>{if(o.target.checked){let o=ue;o.push((0,t.A)((0,t.A)({},e),{},{sno:ue.length+1})),Se([...o])}else{let o=ue.find((o=>o.orderheaderid==e.orderheaderid));if(o){let e=ue;e.splice(o.sno-1,1),e.map(((e,o)=>{e.sno=o+1})),Se([...e])}}},checked:!!ue.find((o=>o.orderheaderid==e.orderheaderid))}),(0,xe.jsx)(w.A,{variant:"caption",sx:{fontWeight:700,color:Ae},children:String(So*Co+o+1).padStart(2,"0")}),(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:ye(f.color),border:"1px solid ".concat(ke(f.color)),color:f.color},children:[(0,xe.jsx)(Ee,{color:f.color,size:18,children:(0,xe.jsx)(b,{size:11})}),(0,xe.jsx)(w.A,{variant:"caption",sx:{fontWeight:800,fontSize:10.5,lineHeight:1},children:f.label})]})]}),(0,xe.jsxs)(j.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:["C"==e.deliverytype&&(0,xe.jsx)(I.A,{size:"small",onClick:()=>{(null===zo||void 0===zo?void 0:zo.orderid)===e.orderid?(Do(null),Po(null)):(Do(e),Po(e.orderheaderid))},sx:{borderRadius:999,bgcolor:ye("#06b6d4"),color:"#06b6d4",border:"1px solid ".concat(ke("#06b6d4")),"&:hover":{bgcolor:Ce("#06b6d4")}},children:A?(0,xe.jsx)(re.A,{fontSize:"small"}):(0,xe.jsx)(te.A,{fontSize:"small"})}),h&&(0,xe.jsx)(I.A,{size:"small",onClick:o=>gr(o,e),sx:{borderRadius:999,bgcolor:ye("#6366f1"),color:"#6366f1",border:"1px solid ".concat(ke("#6366f1")),"&:hover":{bgcolor:Ce("#6366f1")}},children:(0,xe.jsx)(l.A,{})})]})]}),(0,xe.jsxs)(S.A,{sx:{minWidth:0},children:[(0,xe.jsx)(w.A,{sx:{fontWeight:800,color:be,fontSize:15},noWrap:!0,children:e.tenantname}),(0,xe.jsx)(w.A,{variant:"caption",sx:{color:ve},noWrap:!0,children:[e.tenantsuburb,e.applocation].filter(Boolean).join(" \xb7 ")||"\u2014"})]})]}),children:[(0,xe.jsxs)(ae.FG,{children:[(0,xe.jsxs)(ae.pY,{label:"Order / Location",full:!0,children:[(0,xe.jsx)(w.A,{sx:{fontSize:13,fontWeight:600,color:be},noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")}),(0,xe.jsxs)(w.A,{variant:"caption",sx:{color:ve},children:[e.orderid," \xb7 ",e.deliveryid]})]}),(0,xe.jsxs)(ae.pY,{label:"Pickup",children:[(0,xe.jsx)(w.A,{sx:{fontSize:13,fontWeight:600,color:be},noWrap:!0,children:e.pickupcustomer||"\u2014"}),(0,xe.jsx)(w.A,{variant:"caption",sx:{color:ve},noWrap:!0,children:e.pickupcontactno})]}),(0,xe.jsxs)(ae.pY,{label:"Drop",children:[(0,xe.jsx)(w.A,{sx:{fontSize:13,fontWeight:600,color:be},noWrap:!0,children:e.deliverycustomer||"\u2014"}),(0,xe.jsx)(w.A,{variant:"caption",sx:{color:ve},noWrap:!0,children:e.deliverycontactno})]}),(0,xe.jsx)(ae.pY,{label:"Rider",full:!0,children:e.ridername?(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,xe.jsx)(Ee,{color:"#8b5cf6",size:24,children:(0,xe.jsx)(u.bsz,{size:13})}),(0,xe.jsxs)(j.A,{sx:{minWidth:0},children:[(0,xe.jsx)(w.A,{sx:{fontSize:13,fontWeight:700,color:be},noWrap:!0,children:e.ridername}),(0,xe.jsxs)(w.A,{variant:"caption",sx:{color:ve},noWrap:!0,children:["ID #",e.userid," \xb7 ",e.ridercontact||"\u2014"]})]})]}):(0,xe.jsx)(w.A,{variant:"caption",sx:{color:Ae,fontWeight:600},children:"Unassigned"})}),(0,xe.jsx)(ae.pY,{label:"ETA",value:e.expecteddeliverytime?a()(e.expecteddeliverytime).format("hh:mm A"):"\u2014"}),(0,xe.jsx)(ae.pY,{label:"Transit",children:(0,xe.jsxs)(S.A,{sx:m("#06b6d4"),children:[e.transitminutes||0,"m"]})}),(0,xe.jsx)(ae.pY,{label:"Kms \xb7 plan / act",children:(0,xe.jsxs)(j.A,{direction:"row",spacing:.5,flexWrap:"wrap",useFlexGap:!0,children:[(0,xe.jsxs)(S.A,{sx:m("#ef4444"),children:[e.kms||0," km"]}),(0,xe.jsxs)(S.A,{sx:m("#10b981"),children:[e.cumulativekms||0," km"]})]})}),(0,xe.jsx)(ae.pY,{label:"Amount \xb7 chg / amt",children:(0,xe.jsxs)(j.A,{direction:"row",spacing:.5,flexWrap:"wrap",useFlexGap:!0,children:[(0,xe.jsxs)(S.A,{sx:m("#ef4444"),children:["\u20b9 ",null!==(n=null===(i=e.deliverycharges)||void 0===i?void 0:i.toFixed(2))&&void 0!==n?n:"0.00"]}),(0,xe.jsxs)(S.A,{sx:m("#10b981"),children:["\u20b9 ",null!==(s=null===(d=e.deliveryamt)||void 0===d?void 0:d.toFixed(2))&&void 0!==s?s:"0.00"]})]})}),(0,xe.jsx)(ae.pY,{label:"Qty",value:e.Quantity||"\u2014"}),(0,xe.jsx)(ae.pY,{label:"COD",children:(0,xe.jsx)(w.A,{sx:{fontSize:13,fontWeight:800,color:e.collectionamt?"#ef4444":Ae},children:e.collectionamt?"\u20b9 ".concat(e.collectionamt.toFixed(2)):"\u2014"})}),(0,xe.jsx)(ae.pY,{label:"Step",children:e.step?(0,xe.jsx)(S.A,{sx:(0,t.A)((0,t.A)({},m("#6366f1")),{},{minWidth:30,fontWeight:800}),children:e.step}):(0,xe.jsx)(w.A,{variant:"caption",sx:{color:Ae},children:"\u2014"})}),e.notes&&(0,xe.jsx)(ae.pY,{label:"Notes",full:!0,children:(0,xe.jsx)(w.A,{variant:"caption",sx:{color:ve},children:e.notes})})]}),A&&(0,xe.jsxs)(S.A,{sx:{mt:1.5,p:1.25,borderRadius:2,bgcolor:we,border:"1px solid ".concat(je)},children:[(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1},children:[(0,xe.jsx)(Ee,{color:"#6366f1",size:22,children:(0,xe.jsx)(u.gsJ,{size:12})}),(0,xe.jsx)(w.A,{variant:"caption",sx:{fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#6366f1"},children:"Product Details"})]}),(0,xe.jsxs)(j.A,{spacing:1,children:[null===zr||void 0===zr||null===(c=zr.details)||void 0===c?void 0:c.map(((e,o)=>(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1.25,sx:{p:1,borderRadius:1.5,bgcolor:"#fff",border:"1px solid ".concat(je)},children:[(0,xe.jsx)(S.A,{component:"img",src:(null===e||void 0===e?void 0:e.productimage)||"https://via.placeholder.com/40",alt:null===e||void 0===e?void 0:e.productname,sx:{width:36,height:36,objectFit:"cover",borderRadius:1.5,border:"1px solid ".concat(je),flexShrink:0}}),(0,xe.jsxs)(j.A,{sx:{minWidth:0,flex:1},children:[(0,xe.jsx)(w.A,{variant:"body2",sx:{fontWeight:600,color:be},noWrap:!0,children:(null===e||void 0===e?void 0:e.productname)||"Unnamed"}),(0,xe.jsxs)(w.A,{variant:"caption",sx:{color:ve},children:["Qty ",(null===e||void 0===e?void 0:e.orderqty)||0," \xb7 \u20b9 ",(null===e||void 0===e?void 0:e.price)||0]})]}),(0,xe.jsxs)(w.A,{variant:"body2",sx:{fontWeight:800,color:be,flexShrink:0},children:["\u20b9 ",((null===e||void 0===e?void 0:e.productsumprice)+(null===e||void 0===e?void 0:e.taxamount)).toFixed(2)||0]})]},o))),(0,xe.jsxs)(j.A,{direction:"row",justifyContent:"space-between",sx:{pt:.5},children:[(0,xe.jsx)(w.A,{variant:"caption",sx:{fontWeight:700,color:ve},children:"Total Amount"}),(0,xe.jsxs)(w.A,{variant:"body2",sx:{fontWeight:800,color:"#10b981"},children:["\u20b9 ",null===zr||void 0===zr||null===(x=zr.pricedetails)||void 0===x||null===(g=x.orderamount)||void 0===g?void 0:g.toFixed(2)]})]})]})]})]},null!==(r=e.orderheaderid)&&void 0!==r?r:"".concat(e.tenantname,"-").concat(o))})),0!=(null===Nr||void 0===Nr?void 0:Nr.length)&&(0,xe.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:Er||Fr?(0,xe.jsx)(ce.A,{}):(0,xe.jsx)(w.A,{variant:"caption",sx:{color:Ae,fontWeight:600},children:"\xb7 End of list \xb7"})})]}):(0,xe.jsxs)(P.A,{stickyHeader:!0,sx:{minWidth:{xs:1100,lg:1300,xl:1400}},children:[(0,xe.jsx)(L.A,{children:(0,xe.jsxs)(M.A,{sx:{"& th":{backgroundColor:we,color:ve,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(me),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[p&&(0,xe.jsx)(Y.A,{sx:{whiteSpace:"nowrap"},children:(0,xe.jsx)(D.A,{indeterminate:ue.length>0&&ue.length!=Br.length,onChange:e=>{e.target.checked?Se([...Br]):Se([])},checked:ue.length>0&&ue.length==Br.length})}),(0,xe.jsx)(Y.A,{children:"#"}),(0,xe.jsx)(Y.A,{children:"Status"}),(0,xe.jsx)(Y.A,{children:"Tenant"}),(0,xe.jsx)(Y.A,{children:"Order / Location"}),(0,xe.jsx)(Y.A,{children:"Pickup"}),(0,xe.jsx)(Y.A,{children:"Drop"}),(0,xe.jsx)(Y.A,{children:"Rider"}),(0,xe.jsx)(Y.A,{children:"ETA"}),(0,xe.jsx)(Y.A,{children:"Transit"}),(0,xe.jsx)(Y.A,{children:"Kms"}),(0,xe.jsx)(Y.A,{children:"Amount"}),(0,xe.jsx)(Y.A,{children:"Notes"}),(0,xe.jsx)(Y.A,{children:"Step"}),(0,xe.jsx)(Y.A,{children:"Qty"}),(0,xe.jsx)(Y.A,{children:"COD"}),h&&(0,xe.jsx)(Y.A,{align:"right",children:"Action"})]})}),(No||Kr)&&(0,xe.jsx)(se.r,{col:8}),(0,xe.jsxs)(T.A,{children:[0==Br.length&&!No&&!Hr&&(0,xe.jsx)(M.A,{children:(0,xe.jsx)(Y.A,{colSpan:g,sx:{py:6},children:(0,xe.jsxs)(j.A,{alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(v.A,{sx:{width:64,height:64,bgcolor:Ce("#94a3b8"),color:Ae},children:(0,xe.jsx)(u.gsJ,{size:28})}),(0,xe.jsx)(w.A,{variant:"subtitle1",sx:{fontWeight:700,color:be},children:"No deliveries to show"}),(0,xe.jsx)(w.A,{variant:"caption",sx:{color:ve},children:"all"===xr?"No ".concat(((null===(i=ze[bo])||void 0===i?void 0:i.label)||Ge).toLowerCase()," orders for this filter."):"No ".concat(((null===(s=ze[bo])||void 0===s?void 0:s.label)||Ge).toLowerCase()," orders in ").concat((null===(x=Pe.find((e=>e.id===xr)))||void 0===x?void 0:x.label)||"this batch",".")})]})})}),0==Br.length&&Hr&&(0,xe.jsx)(M.A,{children:(0,xe.jsxs)(Y.A,{colSpan:g,sx:{textAlign:"center",py:6},children:[(0,xe.jsx)(ce.A,{}),(0,xe.jsx)(w.A,{variant:"caption",color:"text.secondary",sx:{display:"block",mt:1},children:"Loading deliveries\u2026"})]})}),Br.map(((e,o)=>{var r,n,i,s,c,x,h,p;const f=ze[String(e.orderstatus||"").toLowerCase()]||{label:e.orderstatus||"\u2014",color:"#94a3b8",icon:u.bfP},v=f.icon,A=!!ue.find((o=>o.orderheaderid==e.orderheaderid));return(0,xe.jsxs)(d.Fragment,{children:[(0,xe.jsxs)(M.A,{role:"checkbox",tabIndex:-1,sx:{cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(je),py:{xs:1,md:1.5},px:{xs:1,md:2}},backgroundColor:A?Ce("#8b5cf6"):"transparent","&:hover":{backgroundColor:A?Ce("#8b5cf6"):we}},children:["Created"==Ge&&(0,xe.jsx)(Y.A,{children:(0,xe.jsx)(D.A,{onChange:o=>{if(o.target.checked){let o=ue;o.push((0,t.A)((0,t.A)({},e),{},{sno:ue.length+1})),Se([...o])}else{if(ue.find((o=>o.orderheaderid==e.orderheaderid))){let o=ue,r=ue.find((o=>o.orderheaderid==e.orderheaderid));o.splice(r.sno-1,1),o.map(((e,o)=>{e.sno=o+1})),Se([...o])}}console.log("list",ue)},checked:ue.find((o=>o.orderheaderid==e.orderheaderid))})}),(0,xe.jsx)(Y.A,{children:(0,xe.jsx)(w.A,{variant:"caption",sx:{fontWeight:700,color:Ae},children:String(So*Co+o+1).padStart(2,"0")})}),(0,xe.jsx)(Y.A,{children:(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:ye(f.color),border:"1px solid ".concat(ke(f.color)),color:f.color},children:[(0,xe.jsx)(Ee,{color:f.color,size:20,children:(0,xe.jsx)(v,{size:12})}),(0,xe.jsx)(w.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:f.label})]})}),(0,xe.jsx)(Y.A,{children:(0,xe.jsx)(F.A,{title:e.tenantadress,children:(0,xe.jsxs)(j.A,{children:[(0,xe.jsx)(w.A,{noWrap:!0,variant:"subtitle2",sx:{fontWeight:700,color:be},children:e.tenantname}),(0,xe.jsx)(w.A,{noWrap:!0,variant:"caption",sx:{color:ve},children:e.tenantsuburb}),(0,xe.jsx)(w.A,{noWrap:!0,variant:"caption",sx:{color:Ae},children:e.applocation})]})})}),(0,xe.jsxs)(Y.A,{align:"left",children:[(0,xe.jsx)(F.A,{title:"Location Name-Suburb",placement:"top",children:(0,xe.jsx)(w.A,{variant:"subtitle1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,xe.jsxs)(j.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,xe.jsxs)(j.A,{children:[(0,xe.jsx)(F.A,{title:"Order Id",placement:"top",children:(0,xe.jsx)(w.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,xe.jsxs)(F.A,{title:"Ordered date",placement:"top",children:[(0,xe.jsx)(w.A,{noWrap:!0,sx:{fontSize:"12px"},children:a()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,xe.jsx)(w.A,{noWrap:!0,sx:{fontSize:"11px"},children:a()(e.orderdate).utc().format("hh:mm A")})]})]}),"-",(0,xe.jsxs)(j.A,{children:[(0,xe.jsx)(F.A,{title:"Delivery Id",placement:"top",children:(0,xe.jsx)(w.A,{variant:"body2",noWrap:!0,children:e.deliveryid})}),(0,xe.jsxs)(F.A,{title:"Delivery date",placement:"top",children:[(0,xe.jsx)(w.A,{noWrap:!0,sx:{fontSize:"12px"},children:a()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,xe.jsx)(w.A,{noWrap:!0,sx:{fontSize:"11px"},children:a()(e.deliverydate).utc().format("hh:mm A")})]})]})]})]}),(0,xe.jsx)(Y.A,{align:"left",children:(0,xe.jsxs)(j.A,{children:[(0,xe.jsx)(w.A,{variant:"subtitle2",sx:{fontWeight:700,color:be,whiteSpace:"nowrap"},children:e.pickupcustomer}),(0,xe.jsx)(w.A,{variant:"caption",sx:{color:ve},children:e.pickupcontactno}),(0,xe.jsx)(F.A,{title:e.Pickupaddress,sx:{whiteSpace:"nowrap"},children:(0,xe.jsx)(w.A,{variant:"caption",sx:{color:Ae},children:e.pickuplocation||(e.Pickupaddress?e.Pickupaddress.slice(0,14)+"\u2026":"\u2014")})})]})}),(0,xe.jsx)(Y.A,{align:"left",children:(0,xe.jsxs)(j.A,{children:[(0,xe.jsx)(w.A,{variant:"subtitle2",sx:{fontWeight:700,color:be,whiteSpace:"nowrap"},children:e.deliverycustomer}),(0,xe.jsx)(w.A,{variant:"caption",sx:{color:ve},children:e.deliverycontactno}),(0,xe.jsx)(F.A,{title:e.deliveryaddress,children:(0,xe.jsx)(w.A,{variant:"caption",sx:{color:Ae,whiteSpace:"nowrap"},children:e.deliverylocation||(e.deliveryaddress?e.deliveryaddress.slice(0,14)+"\u2026":"\u2014")})})]})}),(0,xe.jsx)(Y.A,{children:e.ridername?(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,xe.jsx)(Ee,{color:"#8b5cf6",size:28,children:(0,xe.jsx)(u.bsz,{size:14})}),(0,xe.jsxs)(j.A,{children:[(0,xe.jsx)(w.A,{variant:"subtitle2",sx:{fontWeight:700,color:be},noWrap:!0,children:e.ridername}),(0,xe.jsxs)(w.A,{variant:"caption",sx:{color:ve},children:["ID #",e.userid," \xb7 ",e.ridercontact||"\u2014"]})]})]}):(0,xe.jsx)(w.A,{variant:"caption",sx:{color:Ae,fontWeight:600},children:"Unassigned"})}),(0,xe.jsx)(Y.A,{align:"left",children:(0,xe.jsx)(w.A,{variant:"subtitle2",sx:{fontWeight:700,color:be,whiteSpace:"nowrap"},children:e.expecteddeliverytime?a()(e.expecteddeliverytime).format("hh:mm A"):"\u2014"})}),(0,xe.jsx)(Y.A,{align:"left",children:(0,xe.jsxs)(S.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:999,bgcolor:ye("#06b6d4"),color:"#06b6d4",fontWeight:700,fontSize:12,border:"1px solid ".concat(ke("#06b6d4"))},children:[e.transitminutes||0,"m"]})}),(0,xe.jsx)(Y.A,{children:(0,xe.jsxs)(j.A,{direction:"column",spacing:.5,alignItems:"flex-start",children:[(0,xe.jsx)(F.A,{title:"Planned KMS",placement:"top",children:(0,xe.jsxs)(S.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:ye("#ef4444"),color:"#ef4444",fontWeight:700,fontSize:11,border:"1px solid ".concat(ke("#ef4444")),whiteSpace:"nowrap",minWidth:75},children:[e.kms||0," km"]})}),(0,xe.jsx)(F.A,{title:"Actual KMS",placement:"top",children:(0,xe.jsxs)(S.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:ye("#10b981"),color:"#10b981",fontWeight:700,fontSize:11,border:"1px solid ".concat(ke("#10b981")),whiteSpace:"nowrap",minWidth:75},children:[e.cumulativekms||0," km"]})})]})}),(0,xe.jsx)(Y.A,{align:"left",children:(0,xe.jsxs)(j.A,{direction:"column",spacing:.5,alignItems:"flex-start",children:[(0,xe.jsx)(F.A,{title:"Delivery Charge",placement:"top",children:(0,xe.jsxs)(S.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:ye("#ef4444"),color:"#ef4444",fontWeight:700,fontSize:11,border:"1px solid ".concat(ke("#ef4444")),whiteSpace:"nowrap",minWidth:85},children:["\u20b9 ",null!==(n=null===(i=e.deliverycharges)||void 0===i?void 0:i.toFixed(2))&&void 0!==n?n:"0.00"]})}),(0,xe.jsx)(F.A,{title:"Delivery Amount",placement:"top",children:(0,xe.jsxs)(S.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1.25,py:.375,borderRadius:999,bgcolor:ye("#10b981"),color:"#10b981",fontWeight:700,fontSize:11,border:"1px solid ".concat(ke("#10b981")),whiteSpace:"nowrap",minWidth:85},children:["\u20b9 ",null!==(s=null===(c=e.deliveryamt)||void 0===c?void 0:c.toFixed(2))&&void 0!==s?s:"0.00"]})})]})}),(0,xe.jsx)(Y.A,{children:e.notes?(0,xe.jsx)(F.A,{title:e.notes,children:(0,xe.jsx)(w.A,{variant:"caption",sx:{color:ve,maxWidth:160,display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.notes})}):(0,xe.jsx)(w.A,{variant:"caption",sx:{color:Ae},children:"\u2014"})}),(0,xe.jsx)(Y.A,{align:"center",children:e.step?(0,xe.jsx)(S.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:30,height:24,px:.875,borderRadius:999,bgcolor:ye("#6366f1"),border:"1px solid ".concat(ke("#6366f1")),color:"#6366f1",fontWeight:800,fontSize:11},children:e.step}):(0,xe.jsx)(w.A,{variant:"caption",sx:{color:Ae},children:"\u2014"})}),(0,xe.jsx)(Y.A,{children:(0,xe.jsx)(w.A,{variant:"subtitle2",sx:{fontWeight:700,color:e.Quantity?be:Ae,whiteSpace:"nowrap"},children:e.Quantity||"\u2014"})}),(0,xe.jsx)(Y.A,{children:(0,xe.jsx)(w.A,{variant:"subtitle2",sx:{fontWeight:800,color:e.collectionamt?"#ef4444":Ae,whiteSpace:"nowrap"},children:e.collectionamt?"\u20b9 ".concat(e.collectionamt.toFixed(2)):"\u2014"})}),"Cancelled"!==Ge&&"Delivered"!==Ge&&(0,xe.jsx)(Y.A,{align:"right",children:(0,xe.jsxs)(j.A,{direction:"row",justifyContent:"flex-end",spacing:.75,children:["C"==e.deliverytype&&(0,xe.jsx)(F.A,{title:"Product details",placement:"top",children:(0,xe.jsx)(I.A,{size:"small",onClick:()=>{(null===zo||void 0===zo?void 0:zo.orderid)===e.orderid?(Do(null),Po(null)):(Do(e),Po(e.orderheaderid))},sx:{borderRadius:999,bgcolor:ye("#06b6d4"),color:"#06b6d4",border:"1px solid ".concat(ke("#06b6d4")),"&:hover":{bgcolor:Ce("#06b6d4")}},children:(null===zo||void 0===zo?void 0:zo.orderid)===e.orderid?(0,xe.jsx)(re.A,{fontSize:"small"}):(0,xe.jsx)(te.A,{fontSize:"small"})})}),(0,xe.jsx)(F.A,{title:"Actions",placement:"top",children:(0,xe.jsx)(I.A,{size:"small",onClick:o=>gr(o,e),sx:{borderRadius:999,bgcolor:ye("#6366f1"),color:"#6366f1",border:"1px solid ".concat(ke("#6366f1")),"&:hover":{bgcolor:Ce("#6366f1")}},children:(0,xe.jsx)(l.A,{})})})]})})]}),(null===zo||void 0===zo?void 0:zo.orderid)===(null===e||void 0===e?void 0:e.orderid)&&(0,xe.jsx)(M.A,{children:(0,xe.jsx)(Y.A,{colSpan:g,sx:{p:0,border:0,backgroundColor:we},children:(0,xe.jsx)(E.A,{in:!0,timeout:"auto",unmountOnExit:!0,children:(0,xe.jsx)(S.A,{sx:{width:"100%",p:2.5},children:(0,xe.jsxs)(b.A,{elevation:0,sx:{borderRadius:2,border:"1px solid",borderColor:me,overflow:"hidden",background:"#fff"},children:[(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:2,py:1.25,borderBottom:"1px solid ".concat(je),bgcolor:ye("#6366f1")},children:[(0,xe.jsx)(Ee,{color:"#6366f1",children:(0,xe.jsx)(u.gsJ,{size:14})}),(0,xe.jsx)(w.A,{variant:"caption",sx:{fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#6366f1"},children:"Product Details"})]}),(0,xe.jsxs)(P.A,{size:"small",sx:{minWidth:800},children:[(0,xe.jsx)(L.A,{children:(0,xe.jsxs)(M.A,{sx:{"& th":{fontSize:11,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:ve,borderBottom:"1px solid ".concat(je)},"&:hover":{backgroundColor:"transparent !important"}},children:[(0,xe.jsx)(Y.A,{children:"#"}),(0,xe.jsx)(Y.A,{children:"Product"}),(0,xe.jsx)(Y.A,{children:"Description"}),(0,xe.jsx)(Y.A,{align:"right",children:"Qty"}),(0,xe.jsx)(Y.A,{align:"right",children:"Cost"}),(0,xe.jsx)(Y.A,{align:"right",children:"Price"}),(0,xe.jsx)(Y.A,{align:"right",children:"Tax"}),(0,xe.jsx)(Y.A,{align:"right",children:"Amount"})]})}),(0,xe.jsxs)(T.A,{children:[null===zr||void 0===zr||null===(x=zr.details)||void 0===x?void 0:x.map(((e,o)=>{var r,t;return(0,xe.jsxs)(M.A,{sx:{"&:hover":{backgroundColor:we+" !important"}},children:[(0,xe.jsx)(Y.A,{sx:{color:Ae,fontWeight:700},children:String(o+1).padStart(2,"0")}),(0,xe.jsx)(Y.A,{children:(0,xe.jsxs)(j.A,{direction:"row",spacing:1.25,alignItems:"center",children:[(0,xe.jsx)(S.A,{component:"img",src:(null===e||void 0===e?void 0:e.productimage)||"https://via.placeholder.com/40",alt:null===e||void 0===e?void 0:e.productname,sx:{width:36,height:36,objectFit:"cover",borderRadius:1.5,border:"1px solid ".concat(je)}}),(0,xe.jsx)(w.A,{variant:"body2",sx:{fontWeight:600,color:be},noWrap:!0,children:(null===e||void 0===e?void 0:e.productname)||"Unnamed"})]})}),(0,xe.jsx)(Y.A,{sx:{color:ve},children:(null===e||void 0===e?void 0:e.productdescription)||"-"}),(0,xe.jsx)(Y.A,{align:"right",sx:{fontWeight:700},children:(null===e||void 0===e?void 0:e.orderqty)||0}),(0,xe.jsxs)(Y.A,{align:"right",children:["\u20b9 ",(null===e||void 0===e?void 0:e.price)||0]}),(0,xe.jsxs)(Y.A,{align:"right",children:["\u20b9 ",(null!==(r=null===e||void 0===e?void 0:e.productsumprice)&&void 0!==r?r:0).toFixed(2)]}),(0,xe.jsxs)(Y.A,{align:"right",children:["\u20b9 ",(null!==(t=null===e||void 0===e?void 0:e.taxamount)&&void 0!==t?t:0).toFixed(2)]}),(0,xe.jsxs)(Y.A,{align:"right",sx:{fontWeight:800,color:be},children:["\u20b9 ",((null===e||void 0===e?void 0:e.productsumprice)+(null===e||void 0===e?void 0:e.taxamount)).toFixed(2)||0]})]},o)})),(0,xe.jsxs)(M.A,{sx:{"&:hover":{backgroundColor:"transparent !important"}},children:[(0,xe.jsx)(Y.A,{align:"right",colSpan:7,sx:{fontWeight:700,color:ve,borderTop:"1px solid ".concat(je)},children:"Total Amount"}),(0,xe.jsxs)(Y.A,{align:"right",sx:{fontWeight:800,color:"#10b981",borderTop:"1px solid ".concat(je)},children:["\u20b9 ",null===zr||void 0===zr||null===(h=zr.pricedetails)||void 0===h||null===(p=h.orderamount)||void 0===p?void 0:p.toFixed(2)]})]})]})]})]})})})})})]},null!==(r=e.orderheaderid)&&void 0!==r?r:"".concat(e.tenantname,"-").concat(o))})),0!=(null===Nr||void 0===Nr?void 0:Nr.length)&&(0,xe.jsx)(M.A,{children:(0,xe.jsx)(Y.A,{colSpan:g,rowSpan:3,children:(0,xe.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:Er||Fr?(0,xe.jsx)(ce.A,{}):(0,xe.jsx)(w.A,{variant:"caption",sx:{color:Ae,fontWeight:600},children:"\xb7 End of list \xb7"})})})})]})]})})()})}),(0,xe.jsxs)(K.A,{anchorEl:Fo,open:pr,onClose:fr,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{elevation:0,sx:{minWidth:220,borderRadius:2,mt:.75,border:"1px solid",borderColor:me,boxShadow:fe,overflow:"hidden","& .MuiMenuItem-root":{fontSize:13,fontWeight:600,py:1.1,px:1.5,gap:1,transition:"background-color 0.15s","&:hover":{bgcolor:we}}}},children:["delivered"!==(null===Ko||void 0===Ko?void 0:Ko.orderstatus)&&(0,xe.jsxs)(O.A,{onClick:()=>{Wr.mutate(Ko.userfcmtoken),fr()},children:[(0,xe.jsx)(Ee,{color:"#0ea5e9",size:22,children:(0,xe.jsx)(u.q53,{size:13})}),"Notify Rider"]}),["pending","accepted","arrived"].includes(null===Ko||void 0===Ko?void 0:Ko.orderstatus)&&(0,xe.jsxs)(O.A,{onClick:()=>{var e;if(!He)return Rr("Please select a location first!","warning"),void(null===(e=jo.current)||void 0===e||e.focus());Qo(!0),fr()},children:[(0,xe.jsx)(Ee,{color:"#8b5cf6",size:22,children:(0,xe.jsx)(u.bsz,{size:13})}),"Change Rider"]}),(1==ur||2==ur)&&(0,xe.jsxs)(O.A,{onClick:()=>{to(Ko.kms),io(Ko.cumulativekms),po(Ko.droplat),fo(Ko.droplon),ao(Ko.notes),so(Ko.deliveryamount),mo(Ko.orderstatus||"delivered"),ho(Ko),Ke(!0),fr()},children:[(0,xe.jsx)(Ee,{color:"#10b981",size:22,children:(0,xe.jsx)(u.mU9,{size:13})}),"Update Status"]}),"cancelled"!==(null===Ko||void 0===Ko?void 0:Ko.orderstatus)&&"delivered"!==(null===Ko||void 0===Ko?void 0:Ko.orderstatus)&&(0,xe.jsxs)(O.A,{sx:{color:"#ef4444 !important"},onClick:()=>{Go(!0),fr()},children:[(0,xe.jsx)(Ee,{color:"#ef4444",size:22,children:(0,xe.jsx)(u.uDv,{size:13})}),"Cancel Delivery"]})]}),(0,xe.jsxs)(N.A,{open:Uo,onClose:()=>Go(!1),maxWidth:"xs",fullWidth:!0,PaperProps:{elevation:0,sx:{borderRadius:3,border:"1px solid",borderColor:me,boxShadow:fe,overflow:"hidden"}},children:[(0,xe.jsx)(S.A,{sx:{height:4,background:"linear-gradient(90deg, #ef4444 0%, ".concat(Ce("#ef4444")," 100%)")}}),(0,xe.jsx)(H.A,{sx:{p:3.5},children:(0,xe.jsxs)(j.A,{alignItems:"center",spacing:2.5,children:[(0,xe.jsx)(v.A,{sx:{width:64,height:64,bgcolor:Ce("#ef4444"),color:"#ef4444"},children:(0,xe.jsx)(s.A,{style:{fontSize:28}})}),(0,xe.jsxs)(j.A,{spacing:.5,alignItems:"center",children:[(0,xe.jsx)(w.A,{variant:"h4",sx:{fontWeight:800,color:be},children:"Cancel Delivery?"}),(0,xe.jsx)(w.A,{variant:"caption",sx:{color:ve,textAlign:"center",px:1},children:"This action will cancel the delivery and notify the rider. Please share a brief reason."})]}),(0,xe.jsx)(R.A,{fullWidth:!0,placeholder:"Reason for cancellation",multiline:!0,minRows:2,maxRows:4,onChange:e=>_o(e.target.value),sx:{"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:we,"& fieldset":{borderColor:me},"&:hover fieldset":{borderColor:"#ef4444"},"&.Mui-focused fieldset":{borderColor:"#ef4444",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(We("#ef4444"))}}}}),(0,xe.jsxs)(j.A,{direction:"row",spacing:1.5,sx:{width:1},children:[(0,xe.jsx)(B.A,{fullWidth:!0,onClick:()=>Go(!1),variant:"outlined",sx:{borderRadius:999,py:1.1,fontWeight:700,borderColor:me,color:ve,"&:hover":{borderColor:Ae,bgcolor:we}},children:"Keep Delivery"}),(0,xe.jsx)(B.A,{fullWidth:!0,variant:"contained",onClick:()=>{""==Xo?Rr("Enter FeedBack","error"):br({selectedRow:Ko,cancelFeed:Xo}),(async()=>{console.log("cancelridernotification",Ko);try{return(await x.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/utils/notifyuser"),{token:Ko.userfcmtoken,notification:{title:"NearleXpress",body:"".concat(Ko.orderid," have been Cancelled"),sound:"ring",image:""},data:{type:"cancel"}})).data}catch(e){Rr(e.message,"error",2e3),console.log(e)}})()},autoFocus:!0,sx:{borderRadius:999,py:1.1,fontWeight:800,bgcolor:"#ef4444",boxShadow:"0 6px 18px ".concat(We("#ef4444")),"&:hover":{bgcolor:"#dc2626"}},children:"Yes, Cancel"})]})]})})]}),(0,xe.jsxs)(N.A,{open:Vo,onClose:()=>Qo(!1),maxWidth:"sm",fullWidth:!0,TransitionComponent:Z.s,PaperProps:{elevation:0,sx:{borderRadius:3,border:"1px solid",borderColor:me,boxShadow:fe,overflow:"hidden"}},children:[(0,xe.jsx)(S.A,{sx:{height:4,background:"linear-gradient(90deg, #8b5cf6 0%, ".concat(Ce("#8b5cf6")," 100%)")}}),(0,xe.jsx)(J.A,{sx:{p:3,pb:1.5},children:(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(v.A,{sx:{width:44,height:44,bgcolor:Ce("#8b5cf6"),color:"#8b5cf6"},children:(0,xe.jsx)(u.bsz,{size:22})}),(0,xe.jsxs)(j.A,{children:[(0,xe.jsx)(w.A,{variant:"h4",sx:{fontWeight:800,color:be},children:"Change Rider"}),(0,xe.jsx)(w.A,{variant:"caption",sx:{color:ve},children:"Assign this delivery to a different rider"})]})]})}),(0,xe.jsx)(H.A,{sx:{p:3,pt:2},children:(0,xe.jsx)(W.A,{fullWidth:!0,options:Xr,PaperComponent:Fe,getOptionLabel:e=>"".concat(e.firstname," ").concat(e.lastname," (").concat(e.contactno,")"),onChange:(e,o)=>{er(o),n.A.debug("Rider selected in dropdown:",o?"".concat(o.firstname," ").concat(o.lastname):"None")},renderInput:e=>(0,xe.jsx)(R.A,(0,t.A)((0,t.A)({},e),{},{placeholder:"Choose Rider",InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:(0,xe.jsx)(j.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,xe.jsx)(Ee,{color:"#8b5cf6",children:(0,xe.jsx)(u.bsz,{size:14})})})}),sx:Re("#8b5cf6")}))})}),(0,xe.jsx)(q.A,{sx:{p:3,pt:1},children:(0,xe.jsxs)(j.A,{direction:"row",spacing:1.5,sx:{width:1},children:[(0,xe.jsx)(B.A,{fullWidth:!0,variant:"outlined",onClick:()=>Qo(!1),sx:{borderRadius:999,py:1.1,fontWeight:700,borderColor:me,color:ve,"&:hover":{borderColor:Ae,bgcolor:we}},children:"Cancel"}),(0,xe.jsx)(B.A,{fullWidth:!0,variant:"contained",onClick:()=>{Ho(!0),n.A.info("Initiating rider assignment change for order ID ".concat(null===Ko||void 0===Ko?void 0:Ko.orderid," to rider: ").concat(null===$o||void 0===$o?void 0:$o.firstname," ").concat(null===$o||void 0===$o?void 0:$o.lastname)),kr.mutate({selectedRider:$o,selectedRow:Ko})},sx:{borderRadius:999,py:1.1,fontWeight:800,bgcolor:"#8b5cf6",boxShadow:"0 6px 18px ".concat(We("#8b5cf6")),"&:hover":{bgcolor:"#7c3aed"}},children:"Change Rider"})]})})]}),(0,xe.jsxs)(N.A,{open:_e,onClose:()=>$e(!1),fullScreen:r,PaperProps:{elevation:0,sx:{borderRadius:{xs:0,sm:3},border:"1px solid",borderColor:me,boxShadow:fe,overflow:"hidden"}},children:[(0,xe.jsx)(S.A,{sx:{height:4,background:"linear-gradient(90deg, #f59e0b 0%, ".concat(Ce("#f59e0b")," 100%)")}}),(0,xe.jsx)(J.A,{align:"left",sx:{p:3,pb:1.5},children:(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(v.A,{sx:{width:44,height:44,bgcolor:Ce("#f59e0b"),color:"#f59e0b"},children:(0,xe.jsx)(u.tjE,{size:22})}),(0,xe.jsxs)(j.A,{children:[(0,xe.jsx)(w.A,{variant:"h4",sx:{fontWeight:800,color:be},children:"Date Range"}),(0,xe.jsx)(w.A,{variant:"caption",sx:{color:ve},children:"Pick a window to filter the deliveries"})]})]})}),(0,xe.jsx)(H.A,{sx:{width:"100%"},className:"datedialog",children:(0,xe.jsx)(ee.U,{open:_e,toggle:()=>$e(!_e),id:"daterange1",onChange:e=>{"All"===e.label?(qe(""),Ue(""),$e(!1)):(qe(a()(e.startDate).format("YYYY-MM-DD")),Ue(a()(e.endDate).format("YYYY-MM-DD")),e.label?oo(e.label):oo("")),console.log(e)},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,U.A)(new Date,-1),endDate:(0,U.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,U.A)(new Date,1),endDate:(0,U.A)(new Date,1)},{label:"This Week",startDate:(0,G.A)(new Date),endDate:(0,V.A)(new Date)},{label:"Last Week",startDate:(0,G.A)((0,Q.A)(new Date,-1)),endDate:(0,V.A)((0,Q.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,Q.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,X.A)(new Date),endDate:(0,_.A)(new Date)},{label:"Last Month",startDate:(0,X.A)((0,$.A)(new Date,-1)),endDate:(0,_.A)((0,$.A)(new Date,-1))}]})}),(0,xe.jsx)(j.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2.5,pt:1},children:(0,xe.jsx)(B.A,{variant:"contained",onClick:()=>{$e(!1)},sx:{borderRadius:999,px:3,py:1,fontWeight:800,bgcolor:"#f59e0b",boxShadow:"0 6px 18px ".concat(We("#f59e0b")),"&:hover":{bgcolor:"#d97706"}},children:"Apply"})})]}),(0,xe.jsxs)(N.A,{fullWidth:!0,open:Ye,onClose:Dr,scroll:"paper",maxWidth:"sm",fullScreen:r,TransitionComponent:Z.s,PaperProps:{elevation:0,sx:{borderRadius:{xs:0,sm:3},border:"1px solid",borderColor:me,boxShadow:fe,overflow:"hidden"}},children:[(0,xe.jsx)(S.A,{sx:{height:4,background:"linear-gradient(90deg, #10b981 0%, ".concat(Ce("#10b981")," 100%)")}}),(0,xe.jsx)(J.A,{sx:{p:3,pb:1.5},children:(0,xe.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,xe.jsx)(v.A,{sx:{width:44,height:44,bgcolor:Ce("#10b981"),color:"#10b981"},children:(0,xe.jsx)(u.mU9,{size:22})}),(0,xe.jsxs)(j.A,{children:[(0,xe.jsx)(w.A,{variant:"h4",sx:{fontWeight:800,color:be},children:"Update Delivery Status"}),(0,xe.jsx)(w.A,{variant:"caption",sx:{color:ve},children:null!==xo&&void 0!==xo&&xo.orderid?"Order #".concat(xo.orderid):"Modify delivery details"})]})]})}),(0,xe.jsx)(H.A,{dividers:!0,sx:{p:3,bgcolor:we},children:(0,xe.jsxs)(y.Ay,{container:!0,spacing:2,children:[[{label:"KMs",value:ro,set:e=>to(e),color:"#ef4444"},{label:"Actual KMs",value:no,set:e=>io(+e),color:"#10b981"},{label:"Delivery Latitude",value:uo,set:e=>po(e),color:"#06b6d4"},{label:"Delivery Longitude",value:go,set:e=>fo(e),color:"#06b6d4"}].map((e=>(0,xe.jsxs)(y.Ay,{item:!0,xs:12,sm:6,children:[(0,xe.jsx)(w.A,{variant:"caption",sx:{fontWeight:700,color:ve,letterSpacing:.5,textTransform:"uppercase"},children:e.label}),(0,xe.jsx)(R.A,{fullWidth:!0,value:e.value,type:"number",onChange:o=>e.set(o.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:me},"&:hover fieldset":{borderColor:e.color},"&.Mui-focused fieldset":{borderColor:e.color,borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(We(e.color))}}}})]},e.label))),(0,xe.jsxs)(y.Ay,{item:!0,xs:12,children:[(0,xe.jsx)(w.A,{variant:"caption",sx:{fontWeight:700,color:ve,letterSpacing:.5,textTransform:"uppercase"},children:"Amount"}),(0,xe.jsx)(R.A,{fullWidth:!0,type:"number",value:lo,onChange:e=>so(+e.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:me},"&:hover fieldset":{borderColor:"#10b981"},"&.Mui-focused fieldset":{borderColor:"#10b981",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(We("#10b981"))}}}})]}),(0,xe.jsxs)(y.Ay,{item:!0,xs:12,children:[(0,xe.jsx)(w.A,{variant:"caption",sx:{fontWeight:700,color:ve,letterSpacing:.5,textTransform:"uppercase"},children:"Status"}),(0,xe.jsx)(R.A,{select:!0,fullWidth:!0,value:Ao,onChange:e=>mo(e.target.value),SelectProps:{MenuProps:{PaperProps:{sx:{borderRadius:2,mt:.5,boxShadow:fe}}}},sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:me},"&:hover fieldset":{borderColor:"#6366f1"},"&.Mui-focused fieldset":{borderColor:"#6366f1",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(We("#6366f1"))}}},children:["pending","accepted","started","arrived","delivered","cancelled"].map((e=>{const o=ze[e]||{label:e,color:"#6366f1",icon:u.bfP},r=o.icon;return(0,xe.jsxs)(O.A,{value:e,sx:{gap:1},children:[(0,xe.jsx)(Ee,{color:o.color,size:22,children:(0,xe.jsx)(r,{size:13})}),o.label]},e)}))})]}),(0,xe.jsxs)(y.Ay,{item:!0,xs:12,children:[(0,xe.jsx)(w.A,{variant:"caption",sx:{fontWeight:700,color:ve,letterSpacing:.5,textTransform:"uppercase"},children:"Notes"}),(0,xe.jsx)(R.A,{value:co,fullWidth:!0,multiline:!0,minRows:2,onChange:e=>ao(e.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fff","& fieldset":{borderColor:me},"&:hover fieldset":{borderColor:"#6366f1"},"&.Mui-focused fieldset":{borderColor:"#6366f1",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(We("#6366f1"))}}}})]})]})}),(0,xe.jsx)(q.A,{sx:{p:3},children:(0,xe.jsxs)(j.A,{direction:"row",spacing:1.5,sx:{width:1},children:[(0,xe.jsx)(B.A,{fullWidth:!0,variant:"outlined",onClick:Dr,sx:{borderRadius:999,py:1.1,fontWeight:700,borderColor:me,color:ve,"&:hover":{borderColor:Ae,bgcolor:we}},children:"Close"}),(0,xe.jsx)(B.A,{fullWidth:!0,variant:"contained",onClick:()=>{ro?no?uo?go?lo?ot.mutate({deliveryid:xo.deliveryid,orderheaderid:xo.orderheaderid,orderstatus:Ao,deliverytime:a()().format("YYYY-MM-DD HH:mm:ss"),deliverylat:uo,deliverylong:go,kms:ro,cumulativekms:no,deliveryamt:parseFloat(lo),notes:co,userid:+Ko.userid}):Rr("Fill Delivery Amount","warning"):Rr("Fill Delivery Longitude","warning"):Rr("Fill Delivery Latitude","warning"):Rr("Fill Actual Kms","warning"):Rr("Fill Kms","warning")},sx:{borderRadius:999,py:1.1,fontWeight:800,bgcolor:"#10b981",boxShadow:"0 6px 18px ".concat(We("#10b981")),"&:hover":{bgcolor:"#059669"}},children:"Update"})]})})]})]})}},23787:(e,o,r)=>{r.d(o,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var t=r(89379),n=r(80045),i=r(93230),l=r(2235),s=r(16491),d=r(82053),c=r(44414);const a=["children","scroll","onScroll","sx"],x=e=>{let{children:o,scroll:r=!1,onScroll:l,sx:s}=e,d=(0,n.A)(e,a);return(0,c.jsx)(i.A,(0,t.A)((0,t.A)({spacing:1.25,onScroll:l,sx:(0,t.A)((0,t.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},d),{},{children:o}))},h=e=>{let{accent:o="#662582",header:r,footer:n,selected:i=!1,onClick:d,children:a,sx:x}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:d,sx:(0,t.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?o:"#e2e8f0",background:i?"".concat(o,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:o}}),(0,c.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[r,a,n]})]})},u=e=>{let{children:o,columns:r=2,sx:n}=e;return(0,c.jsx)(s.A,{sx:(0,t.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:o})},p=e=>{let{label:o,value:r,children:t,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(s.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(d.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:o}),(0,c.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==t?t:(0,c.jsx)(d.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},56311:(e,o,r)=>{r.d(o,{A:()=>u});var t=r(89379),n=r(9950),i=r(2660),l=r(2046),s=r(83274),d=r(25333),c=r(97125),a=r(7762),x=r(52097),h=r(44414);const u=e=>{let{value:o,onChange:r,onDebouncedChange:u,debounceTime:p=500,placeholder:g="Search (ctrl+k)",sx:f}=e;const b=(0,n.useRef)(null),[v]=(0,x.d7)(o,p);return(0,n.useEffect)((()=>{u&&u(v)}),[v,u]),(0,n.useEffect)((()=>{const e=e=>{var o;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(o=b.current)||void 0===o||o.focus());"Escape"===e.key&&document.activeElement===b.current&&b.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(i.A,{sx:(0,t.A)({},f),inputRef:b,placeholder:g,autoComplete:"off",value:o,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,h.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(s.A,{title:"Clear",children:(0,h.jsx)(d.A,{sx:{visibility:o?"visible":"hidden"},onClick:()=>r(""),children:(0,h.jsx)(a.A,{})})})})}},58691:(e,o,r)=>{r.d(o,{A:()=>s});r(9950);var t=r(16491),n=r(46639),i=r(62217),l=r(44414);function s(e){let{size:o=70,imgSize:r=40,alt:s="loader"}=e;return(0,l.jsxs)(t.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,l.jsx)(n.A,{size:o}),(0,l.jsx)(t.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:r,height:r},children:(0,l.jsx)("img",{src:i,alt:s,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,o,r)=>{r.d(o,{A:()=>h});var t=r(89379),n=r(9950),i=r(93230),l=r(41413),s=r(77922),d=r(29925),c=r(26910),a=r(31222),x=r(44414);const h=(0,n.forwardRef)(((e,o)=>{let{setAppId:r,setLocoName:h,setPage:u,sx:p,textfeildSx:g,textfieldSx:f,pill:b=!1,accentColor:v="#6366f1",icon:A,placeholder:m="Select Zone",paperComponent:j}=e;const[w,S]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===w.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const o=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(o.data.status){const e=[...o.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[w.length]);const y=e=>"".concat(v).concat(e),C=y("08"),W=y("26"),k=y("55"),R=y("18"),z=b?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"999px",bgcolor:C,fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s, background-color 0.2s","& fieldset":{borderColor:k,borderWidth:1.5},"&:hover fieldset":{borderColor:v},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(W)},"&.Mui-focused fieldset":{borderColor:v,borderWidth:2}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:v}}:{},D=b&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(l.A,{sx:{width:24,height:24,bgcolor:R,color:v,transition:"background-color 0.15s, color 0.15s"},children:A||(0,x.jsx)(a.HPi,{size:14})})});return(0,x.jsx)(s.A,{id:"location-autocomplete",options:w||[],getOptionLabel:e=>{var o;return null!==(o=null===e||void 0===e?void 0:e.locationname)&&void 0!==o?o:""},PaperComponent:j,sx:(0,t.A)({},p),onChange:(e,o,t)=>{"clear"===t?(null===r||void 0===r||r(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):o&&(null===r||void 0===r||r(o.applocationid),null===h||void 0===h||h(o.locationname),null===u||void 0===u||u(0))},renderInput:e=>b?(0,x.jsx)(d.A,(0,t.A)((0,t.A)({},e),{},{inputRef:o,placeholder:m,InputProps:(0,t.A)((0,t.A)({},e.InputProps),{},{startAdornment:D}),sx:(0,t.A)((0,t.A)({},z),f||g||{})})):(0,x.jsx)(d.A,(0,t.A)((0,t.A)({},e),{},{inputRef:o,label:"Select Zones",sx:(0,t.A)({},f||g||{})}))})}))},62217:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAPnUlEQVR4AdVae3AU9R3/7d4jdyGQQKAhECBAJBSmEAtFSQUjqPgAHGlhRm0lDkWY6Tg+O9qiErR26h8WR8ZWqTMN1ur4qMpDrTyjtDwDJloeCYiBvAgkaZ53l7vb3X4/v9vfZS/Zu9uFwLSfmb3d293f7u/z+z5/399K7CphdW5JrupgBZosZ0ialmu8pklSjUOTamRJbvvjqTUV7CpAYlcIj+SWZHQ55WJZlm7UNK2IXpRhpZ3GWJskSWXUZrPD4Sp77eSva9gVwIATXz35+SJNYWs1phWxAYDEpDKVaZv+fOrZUjaAGDDiK695rpgetpYOc82upw72sMycdJbz/SzmHeKl/ynRay31bbS1s7rjTczXGYj3ihrShnUDNQCXTXzlNS8UyExdbybhSdeNYwXz81nBzflE2pKms7oT51ntiSa276NKVn3wrNktNcGQelNpTUkNuwxcFvFV+S88rKnKy8ZzkOz84uvYvOJZ/PhyAE3Y/+HXbN+HFVwjjJAlR8lr1WueY9wt2MclEYfj8rnkj+nwRnHOLuGWhnbmpfuMKh/3Xn0Atm74IuY8OcGPFYk99kbVM98xm7BFnDyttHLyb3MlRdsjSWycOA+VLv79YpY5Ork6V5efY59s/JJVHznH/+dMymLz7v0Rm71oWtK2GIDSJ7ew6kMxJlCjytI8u+Qddm4+93bPBIfqiiG96KG5RPouljokuZT3b/2avf7EB6ylsZ1dM2MsG5OfxU7RAFSWVbMAObUphRMTtsc7CpdMh6c3kqe8gN117Yh5W4627GljFmGZ+C/ynx/flzSkDPW2Aqj2+lV/Y5mj0tljG3/GFhQXspkLpnBJVx85yyq/OGWJPAANgzkd2/utOMXJzxp965vlF3YFrPRHZtYgSZq6vi/p2TT6VrF+1Vt8/yiRhnoLiIHAftc7h0kDzlp6HgYcfTAgVwmEPmIWzTeZxPEQaeWkkhJJk1eJk8vWLGBz75nBrAIqfmDrN2zhqjlsetGkftddKU6WQ2qPe6AZVuwdGPP9kWw4+ZWKnVXiVO6M4UXtR1rKDiZrm4g4J70871cTnMzzd3ESNn3bgz9mdgC7hmoufeKWuB4/c1QGV3nYfP7Msfy/FYB8rM1LC6YNm72lonXv+UTtEqr60qVLJTcbvEv8h20tfOhGZgeQtpBiZnZ6wnuhEUDFnlPMDhaSMCbNilohc0kp61mEW1y1j0u8hLR78Ff5xX3t2i5AHLjegvqOIdtHXK/8oorZRfGLiw3aJM1dkVeynA5kCsGm98cjLhNxh4O5nxEnoOJW4rQRkDRUF3adTNoAEprRRB7tfJ09zA7Qt3mGCCMz+dmioiLKcSRTjvGISw/kPbNcSDtzdLotDy6A+AyYObR4KCjK53ur3t2I+ct7s0b0Pfds4U04RuLV914z4rjJ4ZSc94sTSBrsShvYv62S76frZKwAYQ2orWpidoEExyh1tzPl6SlTpjhJ6v3u7Utcgm0vHf/wePKUc8TJS5E21LWu6gKbRBmalXwcgHp70yISg8QR3oTWWAWk3gtpbp6/cCiLRK8Y9k7jHzgCGh3n8om/ibpueHKr0vZT5lVZFvHItVWRaALVQ4pqxcYfL3opeoxcvlr3D4BVc4HU4eFFeMt0ZsHJvUzcFKPkY4gvW7YMGiC7ZfcicW723dalXUsS3lSyNeZcBUmsmaS/5p0Vlp4BVccADsvOYP6uAM/yKsqq7PkJmv8L4k7mmEu7DcRNIfIqkedu3qjq0pkzZ/DfITE5quZjp2Qxu0Dnha1iX1fdxD55fW/CNjANYN49s7jKI5O788E5kfY0oHZQcEuvT5GY8wbaye+//36MqsfY+JEjR6QlY1cX0CHvNdQmZ/JIZhUtjW3RzkNqsG90Hti2cS8fgGSoqz7Pp6loi/uH6wNnJ7zBNA0ZYvrdY1aMZ6hdGHQ9RuL473KmDBUnUB+zAyE1dP6me2fxpMUYljat3Zb0GfvJodWRRz9Aic/utw+Ts/NG1L/L0qQrCoRggVTXUGRPMULmNo44h0CflZXlcGiuXLPGdoDOo7Pw0EYpC5W/c9Wcfm3EoAGiSAF4h0QiQmtDmyUHKZAzZSSrPam/W5MgzJgUlo+CrgFSU1OT5GTOseKi7UytsT2GiJlqW1X5aB+IrJfCYXNDO7MDYwh1yA4kYvKMGTNkkcxw4ghjdJLfQ9ntJRcgWxqsFUCsqDzg1e0U5FtsEvfGVIQ4J9nv90fNXEhcgmPLyEAh49KJW4WZlzezYSE172BvjDbZhc5JPn78eH/nlpubK7e1tcWQtjtRaDXpnLHaYkRflTdbSEhN65V4a4Plclo/IC/TDyV9ixCnNJWFw2EpPT2dBcKBBtHA3+FndmCmjsueuJnIf8/0/mQq79UlDkdpV+LGOnxQ7aljOmFwBTjxY8eOSXV1day9vV1SlFCHaFB3wroT8sdZ+kE4QuXFDMkSG7+ucZmUxdmdqrbU9WpIINQuiPO5CM5x4pTVYMdTucbgt8ejjeutj3K8Tg0jaU2aMY4nJWYQKm+mLT7d7kUW2GrDwRmFFpD8Xax3xSUmZcUfPhL7L2yvp9XJTv7ijgAv4ltBPK8rHNRCPf00QzKVRzs8p7Y6YRktCqy99foMrWN73bsnWJ/ZmTGbUVlkADRFDUarlIYKZkKYeWUjUYSm+0sWmraFxHdTaTkRhtnI2bHwKBBUA3iwSv6LcxPnjV4dI6J5vV61W+04JM5X7LBG3Mwr9820oPLxZln+zsQpac6kkdG5QDLs+7AyetwRat0FTvqsLEpeJDBaTU2NQocqBXl1f9PnH4uGmN5ZcSpmqu41KSUvffwWy4UJIzCIxlQ2bj/ILxnX1mq6Tx0EJwrVKlVjNFF8NKasbMSIEeqgQYOUWl91W0gNlIvGu0oPJH2h31Ti/VNeqP8dJrm6KQnDYIp5erKwZpR2j9JTfrRldy1x4mZMCYwWk7mxiPjVixcvqt3d3WpKSopS6z/9J/GA3ZsOJZW6mRp640h2Pk1bsWhoBzAToLo8fhES0t4fo+YXoblhWZbDtOcaLa5FbZziGyc/ZMgQpaenJ7yz4b1DqhpuxDV492RSNxuYeF4cWF6yiNmB8OyJ1B3SFlFI1ZSGj2o3grjS2dnJSescYyswa9eu5cQ7OjpwE0YodLGn/jVxHVJPFNfNc21PQiKiSJEIxgGFZ49XfETfthk+HGiO9B08wsOHD8deNd4fJa7rPi6G09LSeINPm97cHFT9R3gHSOqlT25m8WCWXCRzYvMpqUmkFYBxQOHZYedmNXdj36Cp6LvOJdTc3KzS4oKqC5cjSlz3dvhRurq6Qh6PJ0SDETrefvQP4h54y76fYwhg+ffRjfeRCi/kkrx+0Q9oVSRx2SpRbI8S7+iVuAiP+KrCiK0bvozx5Idat68KBoMhCmNBcKFQrYC4KDQC0SqrfhIS56oeCASC5ORCh5o/Pz7aO279CE/Oo7hvG70EBYrCPrX26CzM+uoxh0hnUWYyJd4VmSihWvvJxkheX2uY1e0qPRij4q09TW98/Z8D59B3CmNBUnMFoVpMTgT6LigI44eqB2kwMNxBchJvk8ofFTdtempLTNi4XCCdjWcWqLwgrH3w0g4eCaBVq1/6Kb+GPrz3u+3Re31K95cfnHv1dfSZPDn6HoKq06qvqvVZPey3Po6RKSsr49cwVWWRwXE2+M7tyxs87VZZktNwsZJSWVRhJxTksMsFPgyY85MZbGrhBJqDe5kzxRGd20MjOlq6qNqawSOBWDcHaQhAQCG7Pty66+l29WKz0+n0k8ZCVQITJ04M7dy5U1m3bl0M8XjVFgyIizYP2ckgUpnBdJw6OeOHuYWZC191ys6o8WJtepHNNXMrgDeHE0MuALLG9Bc2bVTvsBo+v6/ls1+ebDv8Ham4j8IxZmPdtMEzhljvPCSKeMT5wmF2dra7sbExlY4H0QZJe4n82L7ksWRT/OJdl1yVtQqELHhvoyMjSZ//V4T0WbfbHSCnxklTxdhPxdMgaXjY6NSMBPtBX0ODikPqbto4eXpwKj0Y5MfMHHbzI6mOtJhADOkXLikY8AGA9JFA7S49FDMZCij+ih31bz3V2FPbqpOGlLH5aION94vfAnELi3qtHddBHJ7Hy3Sp0+YhO3Ivzl65Yrgn+wFjO3j82UumDcgAxCMMNPnPbdhc98a7LpcLThikYdOQNrdtcmhhKrD0U3GBZBVVieKfg5wdJJ+Smprq9fl8kH4qvdATCoVc+ekFo28YvvgVh0H1BWACWGLGBzpjLK7KoGSEGgC2Pl8wckDK/247+MrR1t2YL8N+IVmfThh7YdcKS/Cda1LiqFHRJufk5LioLuch8h6dvJfIpxB5aITzjtE/v32kZ/wDTpMBAJC+YkkKWmD8ktlHCQqKmrUnL7BWIh3vs23YcmPgu798Wv/Xz0CM3h2mdwd0wnwjn9QzatSoEJXKw1pEZeMTYxagq73w9FB7Suw8XlVVvaRi+A/yuO64bfR9t2eljL09xeEtYAOAQNhfcabrm9J/XtyGPIKn1Lp6B3X19tN6gJ/m29ymSUgKUlMzh2aEncUDmdRe1tXeaPce/dilbxgAOT99evbEQdOuHebJvsHrSC2gpec0Ky/RmNrlV3wVneHWrw427/hHc7C+k/IJEFZ1KSOjDFDIEtLmSRb1LUR94/dZeY+tVROoPDaQo1TQTS9PoSlfik4cA0B9c7mpc1z6GAByghISoZkjivI8MuVRjqEjU52DRuossXir+UJdFHcCXfW+b09VtR9tMnReoefxNJqeCbsF6R7KygL03B56N8/OWK/3tkTaNnHWa/M8zrNIru8iOik0GeADQGHFTabh0q85qL/8Kwu0xSBgTwPB6BiLGMZn83SZzmuQMAhTWz5voEeGoNcgTtWUHiqW8OO8vLww+R5lz5494UT2PBDEY9rSQqOTHAmP91TFdNGChJsyPTdlelztqcMu6i+XvNiIkBQRHlcPHGv6sUbHIKzo56J1AZBkvR5cSFhUVBR2CbD69bIpysvLecdoAHqINOytm0ijJt9J3r+TVBLHXfrGkwsiJRIMLF1i76MBEue7qE0XqTPadYiNnFen3j6Ad5HGYSDwTcslkQYGamVULLrLpH7y6dOnuY1TGctFFR0hcYfhvujinQ6eaNBgYc6sEHm+0WAKqatEWJkwYYI6depUjYhbtuWrBW775GGd1FEXFQA8FFsR8+HRMdFBKocgPrTvRkgnh4l70ijPxtwAzpLnCLpDvSztvFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg=="},96646:(e,o,r)=>{r.d(o,{r:()=>d});var t=r(9213),n=r(21671),i=r(82917),l=r(93230),s=r(44414);const d=e=>{let{rowsPerPage:o=5,col:r=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(o)).map(((e,o)=>(0,s.jsxs)(t.A,{children:[(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:r}).map(((e,o)=>(0,s.jsx)(n.A,{children:(0,s.jsxs)(l.A,{spacing:.5,children:[(0,s.jsx)(i.A,{variant:"text",width:100}),(0,s.jsx)(i.A,{variant:"text",width:80})]})},o))),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"text",width:150})}),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(n.A,{align:"center",children:(0,s.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},o)))})}}}]); \ No newline at end of file diff --git a/build/static/js/3723.8624a149.chunk.js b/build/static/js/3723.8624a149.chunk.js new file mode 100644 index 0000000..57bae86 --- /dev/null +++ b/build/static/js/3723.8624a149.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[3723],{855:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(7208),a=n(76475),o=n(44414);function i(e){var t,n;let i,s,{children:l,type:c="scale",direction:u="right",offset:d=10,scale:p={hover:1.05,tap:.95}}=e;switch(u){case"up":case"left":i=d,s=0;break;default:i=0,s=d}const[f,h]=(0,r.Y)(i,s),[v,g]=(0,r.Y)(i,s);switch(c){case"rotate":return(0,o.jsx)(a.P.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:l});case"slide":return"up"===u||"down"===u?(0,o.jsx)(a.P.div,{animate:{y:void 0!==v?v:""},onHoverEnd:()=>g(),onHoverStart:()=>g(),children:l}):(0,o.jsx)(a.P.div,{animate:{x:void 0!==f?f:""},onHoverEnd:()=>h(),onHoverStart:()=>h(),children:l});default:return"number"===typeof p&&(p={hover:p,tap:p}),(0,o.jsx)(a.P.div,{whileHover:{scale:null===(t=p)||void 0===t?void 0:t.hover},whileTap:{scale:null===(n=p)||void 0===n?void 0:n.tap},children:l})}}},2046:(e,t,n)=>{n.d(t,{A:()=>j});var r=n(98587),a=n(58168),o=n(9950),i=n(72004),s=n(3484),l=n(89548),c=n(82053),u=n(15866),d=n(39766),p=n(59254),f=n(45558),h=n(1614);function v(e){return(0,h.Ay)("MuiInputAdornment",e)}const g=(0,f.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var y,m=n(18463),b=n(44414);const A=["children","className","component","disablePointerEvents","disableTypography","position","variant"],x=(0,p.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat((0,l.A)(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===n.variant&&{["&.".concat(g.positionStart,"&:not(.").concat(g.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),j=o.forwardRef((function(e,t){const n=(0,m.b)({props:e,name:"MuiInputAdornment"}),{children:p,className:f,component:h="div",disablePointerEvents:g=!1,disableTypography:j=!1,position:S,variant:w}=n,C=(0,r.A)(n,A),k=(0,d.A)()||{};let O=w;w&&k.variant,k&&!O&&(O=k.variant);const I=(0,a.A)({},n,{hiddenLabel:k.hiddenLabel,size:k.size,disablePointerEvents:g,position:S,variant:O}),D=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:a,size:o,variant:i}=e,c={root:["root",n&&"disablePointerEvents",a&&"position".concat((0,l.A)(a)),i,r&&"hiddenLabel",o&&"size".concat((0,l.A)(o))]};return(0,s.A)(c,v,t)})(I);return(0,b.jsx)(u.A.Provider,{value:null,children:(0,b.jsx)(x,(0,a.A)({as:h,ownerState:I,className:(0,i.A)(D.root,f),ref:t},C,{children:"string"!==typeof p||j?(0,b.jsxs)(o.Fragment,{children:["start"===S?y||(y=(0,b.jsx)("span",{className:"notranslate",children:"\u200b"})):null,p]}):(0,b.jsx)(c.A,{color:"text.secondary",children:p})}))})}))},8457:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALEAAABFCAYAAAAFKgfKAAAQE0lEQVR4Ae2dS4wcRxmA/6p5GLxEHiuHRILgtpx1wslrDjwuZDdcAduckTyrxOsIFNl7Q1HsnbVz4YC8IQoku4685sjFNnCMtGMuICTkzQWIdy23RZDgABlAgL0zXcX/Vz+mp6cf1Y/ZJUl90u70zHTXdNf8/df/qhoAg8FgMBgMBoPBYDAYDIa9hEEJ2lan1WzWzoGUbXxqSYAeNrkJIK+vbV1cB4NhFygsxO1nO1bT4Ru4aSXsYu/0xdy63bHBYJgghYQ4KsCkgTnATSlZC5icgaFg9ySIubWtziYYDBOCQ07GBFjI16f64vDbWxfnV7cvnOI1MYfmxbK3e4sB30CzwwKDYULk1sRnpy9dQ83bVk9QWFe3lzpx+y08vdwBxpa8p2RaHEfTogcGQ8XU8ux8ZrrTRrnv0DZK/zoK8GLSvr/7e7f7xYOzBxljX8GnrRqHR/QaGAwVk8ucQNMg0KysL5az9u87skP7ugezcxTNAIOhYrSF2NXCnsMm5fW3NKIOZD44QvjautWss/NgMFSMthCHtXCSHRzHO/c6N934MTXCToPBUDFaQvzi051ZCGlhyAmT8nVv0/LaMhgqQ0uIa4wHGpQP5DrkhNeHxzDJToLBUCGZQkxxYT+kRhGJtwpk4N76ozrG9j7xOTAYKiRTiBsOzPrbAyFuQUEwKaKOZcBmTJTCUCU8e4eab0rY5KRBUbgMUs+12vDGMBjKkirErikhZ2kbTYkulAAFtxtsM26BwVARqUJclSlBkF3sh9oYg2NgMFREqhBzWTvhb5cyJTzQHrbpEYV5FgyGiqinvSndskoMDbMuVACTYEsG1GbLywBSyM3Cz7lpyjUNRUkUYhSyoC6YgSxsSrxw5PJJzuU1tKlbknSwC5VoXgO38d7a1lJn4Ujn5GoF2t7wySMQYhK2GpdX4nZC7bm0cPTSc6t3L56CnHDukMAmhtRQy29SyI1xTqaLlhC/hA6ncPj9kXa8wvxHfbGsM5skWiq6unXxMG2QM7tvwM/hNVNSxoISCCnmrm53uknvt1FRNIHfiH4OXQtjbGX17oXUIquz05c3fMe7HGpKWXfH7bsejZKBkkGwb0pNY/NRteiidkVKOUtKDUrQGHDrzfuvPqDtwCZmTFrgdmb4z32PPlDCyYVnLpUq4Hnq2SeC7W++7OY8OJN2va5MjFK4mh7azQa/440ihaCCfxRguk4LJkycABNuf8vO7qXoldl4vtkcCm7VBJMppDxZVoCj8OGGDBre/9in1N8YApbyJirI5qXHxz97AL7e/nLw+jde/hoc/dIhvCaJdxOfEUwehGooPJuERiPYBeElRqoCE2DDkWJ3QEU1qUSUF+myYAIMbWI2/IDTP/gW/OS7P1Pbz6PgffD7v8Dd3yrN3fLu1txmxeOfG++bp77wBLz/mwc2amNLSjgEBRESFrlyQoMquRZqZBLkXBNVyfQJB2wcIU5hOLDwbJTPDCDWWSWtxBweFlCbSlbps6i2hHF2jl7EaM7smelLbb2Z4/K2kKp+OxccFQh+UGBGTrH6gR0YQNUoZRYySsr27Zv3Lz7wt+vDD+EHMEqAGrOl/nyeQW35eTQDPCFWdysNc2m2Xhwf/OGv8NQrT8JXv30MhfdJ9drmu3fR3hY2flkW/pXQAGJzdauzgnauHbJzrWaD3fAEuVBnvTMhR3MfCrAMaSUJ4hR+lhJ4PN/NJmfkH6j38Xu/gq/dzLoG7L/7V7eXupAT9C9s9C+uwO5iV9m3YU2shOi//3oYvEQmBWnLX/zoVyMHccavYcdqzZlDDdvCOw7+88+H8GPU7mRGYIfDD7/zU/jbn0cOt6AkVOd85shyy9dkeFEzjQajL2geCkDzCaEE6GQuRvtIZUEdb44ieNO8QuFFz7FaDjlW/mSCTtpnoYM3o5zVnEiHjYyA/5aDfzRg4rTK9i1NTPa3AyGWnrFNwvbLN27DhVsL8OnH9sGfUIP++sZ70TZQy6nhcDHrwxgfGvEktNe///OR9/c59fv9mjNL2987/Noh3+Msytq9pfNnp5ePSRyK1eej3CwcvWxnefpxBBNiC4JDcwdgdMj0tHBA3DQvjJmv4zWc9q/Bm9q1nm4aMTILcju04XOhfIB3E8GEaZXtWwgppsAAxDvZ8rc3330fLp9YhVeefyOwjWM4X4X3THe+AKa+6J36oBLn7lFfks1uBy+grVg2slIF5MyNfHlSLieVtjrDZQ8I8kUmOuSTANcGTqERa68Z2sQFwh46ZoVvayfh3fk9dT8JTpqkdOaO2kRbb06EVygScGXh6Gsfrt59VXtmCg31UAK6QUfbG3Hm0B9g5xamL+lN2cr0ReRtVETrSYe7jtVotIMcYsZEd6oP9sruLqfQY5o5AR2UELvJAyhCtlnBUm8O1XFC1HqYaKHCoMrCO1RwhDcHamS+EdygUqzga+/pprjDdldZ4kJq3nlpX7MXcuvGvoeO3erW0nra8QtPX+qFIxEck1ioXroru78eSK/KvlVC7DgUWy0MmRW38kYrCNQcNj1iaMtWkWo5NGmqgIQVhQdvsKGTRDFkDFst4vUekhnHv4Cp8DJhoAGG2GhUiAmpFSJfyG2c1e2LFMFphTSy1x+d1KXGquiHyEutsqao37e0rYTYjyAUhTMVATgOeZFcnUStBj0aCThnB6BiyEnCL84a/eLgWpYAq/PiKqNWmHpdzOFDNxpSI1tYYJpXtx3G+A1/NNENuSVBERzsD0gTZH9k9CnbD1OMW49A9EIlky00RTegBFNuTXpYiGu0ECAUh6nwTtxUfpk2XHKhbEYa+tE2RLNV5vaudYj54mLp9+FmswG0jwUVEQ2pQc4lDwg0A5ZDZoBWyC2NLEF2HKeLgmtDhf0wGIj1BpqeVaecCXVzeHUTyTANI9wNA1njb8jEk+aSfRh6qpIeMCHoi8OkwjxLKSsl7aYWRAR5XULx4TPMvogZQYkNyAmZARCOtiT2dZ428UaKREA8QZ4J98PI55aA2qzVxPEq+9ZHGRGRiq4xdmricMZaxAq0cbtrW0tz4ddQw95POo68f9/AX5i+fIcKUXb64qBZeNCQB9dMYenCuY7DvZAi05skx6N4PFaojEqjUd0QZvhk4JoTGMtN2cemfyr6oGNWuJVuVugVCzSQwhti3FixwaCNr4nTitbtYGcuFjXsmVajwfLnxb0p/Zn2ucEQwY1OaHqMKoow6inH4psVq+8rh0SLYcKDFS7J3Auo/vZT2H+DevaIUx+AnWcFpZe8ES2pbaamdo3Hd/Ock855UXtk5lEoFgqAMV07WvdRts3wtXtCLK2kMDHNvAg/J0/57PTyiaA4JQkyK57t3ISUTGC4EL7RcDYxTawVZvOmJ8U6mnhDrq+VyAZhMoHmA7Zj3rJ5X8z5X7abgaudZiBnBegtaicaytHFc6QIibOYJID0i1SY+DkvPOWS1LY3gTdwpBeOXl7yf8lK95xC52WjJlkMz3Ok8GDDqV1j/tojBXMJzbqKgnSqbDN87a5NDGnmBM28GCVSnJJEq+mw9CC5GNri/roUOmE22tcNAY2Hf0gAzxQs89MVYPzCr1CpJCs4v42Ow+PvRJ1gNYWnwe9QwVLeeOrC0Us3wC2Kt6AYFtqL18IzOygixSqZwzeEQo5Vt8lJq6XvwsZsYHLy6AdnIBOWy0nz1qVoUUlm1r5VC7KuAHtTmApGYCJEpnt5MWULcqJSuFJNbC0LJlJ4mzY8ubCgYnCEqOI8R6hn1U04Uthxr9NPGTQ4O11tBobCbGxmhyvhXM/amwTZrVYjjT96w3iCDDqmRbIAy839fTkXLpBBg2cWYLTH1ExryTYhA8nGNFDLW5fuptfO7NgxqW27zjBPMu3wOJbiiMecD6Qlp3TajEOwoQzFykuBNv1rJ+pZdRNJhR9eCWW4uKY8ErWqOhf99DMJMk1BwnTxRhFBThJgsrmmBuJUtMKLc35MgozsK069rVEAdebI8spw1olLZF06K3oM/bxakSozlUjavjCf93wywJT5hfw1MhmUbbPOWNaM2+Q7ZGwGQk6i4TTUDJR6JtWSa602L8N3/MXp5XUOoz+pkCbISQKMzuX1q9sX21Ax8X2ZrvkKl0lK6L2UkZoWNYwE5SuZaVF2V0ac/SQYxv51FsShqUoCxG3QgNrccVQFm+2/hpqYp2rifj89d85qcl467D5UgxsrzmlL+1zdWmqjdulFtUucICdqYLT1r95bqsbm3UNo7QzZ4OnXESPA6LSr7+DhQ+g1xyfbqTJOBpohBe5GPaheJBSJsWF8sZg2Orpt0AHbbFK7R19r+xMcOM/QBFl1DGoVeL1oRSahG0bLuYuD5tjFnY8ryMsbdNefmb68EWsD43FrHwMBLoHdcFxFQt+7gPy/zxKDhb0/zCtI0AgIaCDFiu8U1zPqJmzQYGcgV5oNNYxbUALqOBWvxHb6NVXttQIFSCq9pCSMVI8xKijl11E/irjhSk1nSbIek+I2c+RKOOmhRrbpTpfJ2gldB14OV5IKYCFzk/IMNB0tV5tqBBjzk1q0RgY+9uppc+DCKec0SPgwzDNfoNB57CIYeqrUEZIrz7mQEBM7dbnecNg5zY6y6UaEjxH0i1VV3JTk90COuYYqWdPgH1bZJpFWDVmHiua1UewYnbxuTidv7LOFFA8w9UzC/BwUJPQj6rrXRgutbBRfaIXP4E2cvodU9uTp8XdYMcctCwYn8Jy6kJPwtJ8iU4iyAgVUr5w31Ux9JyE5FFwPT9UfO1jTC/UhJw9jtndKxY5VIZA63VaRlYZCAmzFvG3TP69DIufIZihMV0SQuaolyUjyJnwD6JVvQkmCqM7oB85wxnJPAfKnVNF22SlEcaADdyNL0GMOSnUlucyZck6DnDy0THI5eVEHLvzbHjxn6C5NgMlJoeVb6Q+jFAfjnRYSZKWRKxmdNLCLTLCNQtOq4P8bGyaAvyQCF0LMq/UHMLSkpu6QTRo4BPmHOncqjSysXbzfvFNgmEjbpMgSYHJSwq/R870UZOrjIlOV4lAjh8xejWnPkJVEOSJtsmCybD1pYbfzJb5EIeWi7lD2qDY4jA+Bxg/bYeTVkjBlDe95BdiHXkc7/tC4HV/ctEhDRQyUsyxuTaEjWeV6D57X38U+wxAjPxbjze8FFH69XnHUR7W5fyACR1wzap0f3ZSmFDC/ds9dR4EEOGqH0RKgaSsopgkwpY7Xti/MQQquN8024ouV5OZOX44Ictzq7Fkrwhsmi27JaW6oQEjmKOogYaJlsbynNpk4+/viYFEBJgGcGjiZwzUJKAlqvAm06zayoQATE2JXe4lFyKju8usnGg33NzIo7YvCe/wqDo9pw22WAEerz7LO1QjyR5eJCTFBQW2qUOI1cZjMgrh1DPyYIYPaOT/tu1LCBs4rwD5GkD+61GEX8CIO9KdMA++HYWYo9Qj+cklS3NJxACYhwD5q3TRV1snujLfvOnv5ir4MBoPBYDAYDAaDwWAwZPI/iTTgFxK8/KcAAAAASUVORK5CYII="},20466:(e,t,n)=>{n.d(t,{k:()=>a});var r=n(8881);const a=(e,t,n)=>(0,r.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:n||2e3})},21862:(e,t,n)=>{var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==y(e)&&"function"!==typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=a?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(9950)),a=["placeholder","separator","isLastChild","ariaLabelOverride","shouldRender","inputStyle","focus","isDisabled","hasErrored","errorStyle","isSuccessed","successStyle","focusStyle","disabledStyle","shouldAutoFocus","isInputNum","index","value","className","isInputSecure","onSubmit"];function o(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n0&&console.error("Length of the placeholder should be equal to the number of inputs.")}})),g(h(e),"handleOtpChange",(function(t){(0,e.props.onChange)(t.join(""))})),g(h(e),"isInputValueValid",(function(t){return(e.props.isInputNum?!isNaN(parseInt(t,10)):"string"===typeof t)&&1===t.trim().length})),g(h(e),"focusInput",(function(t){var n=e.props.numInputs,r=Math.max(Math.min(n-1,t),0);e.setState({activeInput:r})})),g(h(e),"focusNextInput",(function(){var t=e.state.activeInput;e.focusInput(t+1)})),g(h(e),"focusPrevInput",(function(){var t=e.state.activeInput;e.focusInput(t-1)})),g(h(e),"changeCodeAtFocus",(function(t){var n=e.state.activeInput,r=e.getOtpValue();r[n]=t[0],e.handleOtpChange(r)})),g(h(e),"handleOnPaste",(function(t){t.preventDefault();var n=e.state.activeInput,r=e.props,a=r.numInputs;if(!r.isDisabled){for(var o=e.getOtpValue(),i=n,s=t.clipboardData.getData("text/plain"),l=(e.props.isInputNum?s.replace(/\D/g,""):s).slice(0,a-n).split(""),c=0;c=n&&l.length>0&&(o[c]=l.shift(),i++);e.setState({activeInput:i},(function(){e.focusInput(i),e.handleOtpChange(o)}))}})),g(h(e),"handleOnChange",(function(t){var n=t.target.value;e.isInputValueValid(n)&&e.changeCodeAtFocus(n)})),g(h(e),"handleOnKeyDown",(function(t){8===t.keyCode||"Backspace"===t.key?(t.preventDefault(),e.changeCodeAtFocus(""),e.focusInput(e.state.activeInput-1)):46===t.keyCode||"Delete"===t.key?(t.preventDefault(),e.changeCodeAtFocus("")):37===t.keyCode||"ArrowLeft"===t.key?(t.preventDefault(),e.focusPrevInput()):39===t.keyCode||"ArrowRight"===t.key?(t.preventDefault(),e.focusNextInput()):32===t.keyCode||" "===t.key||"Spacebar"===t.key||"Space"===t.key?t.preventDefault():13!==t.keyCode&&"Enter"!==t.key||e.props.onSubmit()})),g(h(e),"handleOnInput",(function(t){var n=t.target.value;if(t.target.value)if(t.target.value&&t.target.value.length>1){t.preventDefault();for(var r=e.props.numInputs,a=e.state.activeInput,o=e.getOtpValue(),i=t.target.value.slice(0,r-a).split(""),s=0;s=a&&i.length>0&&(o[s]=i.shift());e.handleOtpChange(o),e.focusInput(e.props.numInputs)}else if(n&&n.trim().length>1)t.clipboardData={getData:function(){return n.trim()}},e.handleOnPaste(t);else if(e.isInputValueValid(t.target.value))e.focusNextInput();else if(!e.props.isInputNum){var l=t.nativeEvent;null===l.data&&"deleteContentBackward"===l.inputType&&(t.preventDefault(),e.changeCodeAtFocus(""),e.focusPrevInput())}})),g(h(e),"renderInputs",(function(){for(var t=e.state.activeInput,n=e.props,a=n.id,o=n.autoComplete,s=n.numInputs,l=n.inputStyle,c=n.focusStyle,u=n.separator,d=n.separateAfter,p=void 0===d?1:d,f=n.isDisabled,h=n.disabledStyle,v=n.hasErrored,g=n.errorStyle,y=n.isSuccessed,m=n.successStyle,A=n.shouldAutoFocus,x=n.isInputNum,j=n.isInputSecure,S=n.className,w=n.inputProps,C=n.onSubmit,k=[],O=e.getOtpValue(),I=e.getPlaceholderValue(),D=e.props["data-cy"],N=e.props["data-testid"],E=e.props["custom-test-attr"],P=e.props["custom-test-id"],M=function(n){var d=void 0;d=(n+1)%parseInt(p)===0;var M={};E&&(M[E]=P&&"".concat(P,"-").concat(n));var F={};w&&(Array.isArray(w)?w[n]&&(F=w[n]):F=w),k.push(r.default.createElement(b,i({id:a&&"".concat(a,"-").concat(n),autoComplete:null!==o&&void 0!==o?o:"off",placeholder:I&&I[n],key:n,index:n,focus:t===n,value:O&&O[n],onChange:e.handleOnChange,onKeyDown:e.handleOnKeyDown,onInput:e.handleOnInput,onPaste:e.handleOnPaste,onFocus:function(t){e.setState({activeInput:n}),t.target.select()},onBlur:function(){return e.setState({activeInput:-1})},separator:u,inputStyle:l,focusStyle:c,isLastChild:n===s-1,isDisabled:f,disabledStyle:h,hasErrored:v,errorStyle:g,isSuccessed:y,successStyle:m,shouldAutoFocus:A,isInputNum:x,isInputSecure:j,className:S,"data-cy":D&&"".concat(D,"-").concat(n),"data-testid":N&&"".concat(N,"-").concat(n),shouldRender:d,onSubmit:C},F,M)))},F=0;F0&&this.setState({activeInput:0})}},{key:"render",value:function(){var e=this.props.containerStyle;return r.default.createElement("div",{style:Object.assign({display:"flex"},m(e)&&e),className:m(e)?"":e},this.renderInputs())}}]),n}(r.Component);g(A,"defaultProps",{numInputs:4,onChange:function(e){return console.log(e)},isDisabled:!1,shouldAutoFocus:!1,value:"",isInputSecure:!1,onSubmit:function(e){return console.log(e)}})},23723:(e,t,n)=>{n.r(t),n.d(t,{default:()=>I});var r=n(9950),a=n(8881),o=n(855),i=(n(21862),n(16491)),s=n(82053),l=n(93230),c=n(48089),u=n(50704),d=n(29925),p=n(2046),f=n(25333),h=n(29277),v=n(36080),g=n(82223),y=n(14857),m=n(26910),b=n(28429),A=n(52351),x=n(8457),j=n(82569),S=n(20466),w=(n(45669),n(62375)),C=n(62462),k=n(68889),O=n(44414);const I=()=>{const e=(0,j.wA)(),t=(0,j.d4)((e=>e.fcm)),n=((0,j.d4)((e=>e.fcm.permission)),(0,y.A)()),[I,D]=(0,r.useState)(!1);let N=(0,b.Zp)();const[E,P]=(0,r.useState)(""),[M,F]=(0,r.useState)(""),[Y,T]=(0,r.useState)({}),[R,V]=(0,r.useState)(""),[z,L]=(0,r.useState)(0),[B,U]=(0,r.useState)(""),[q,J]=(0,r.useState)(""),[Q,W]=(0,r.useState)(!1),[H,G]=(0,r.useState)(!1),[K,Z]=(0,r.useState)(!1),[X,_]=(0,r.useState)(0);(0,r.useEffect)((()=>{localStorage.getItem("firstname")&&N("/nearle/dispatch")}),[]);const $=async()=>{if(D(!0),!R)return ee("Fill All required fields"),void D(!1);try{const n=await m.A.post("https://jupiter.nearle.app/live/api/v1/users/console/login",{authname:R,configid:9,userfcmtoken:null===t||void 0===t?void 0:t.token,password:B});if(409!=n.data.code||n.data.status)if(403==n.data.code)(0,S.k)(n.data.message,"warning",3e3);else if(409==n.data.code&&n.data.status)L(1),_(n.data.details.userid),(0,S.k)("User Found","success",3e3),(0,S.k)(n.data.message,"success",3e3);else if(401!=n.data.code||n.data.status)if(401==n.data.code&&n.data.status)(0,S.k)(n.data.message,"success",3e3),te(n.data.userid),L(2);else if(200==n.data.code&&n.data.status){(0,S.k)(n.data.message,"success",1e3),T(n.data.details);const t=n.data.details;e((0,k.FN)(t)),localStorage.setItem("firstname",t.firstname),localStorage.setItem("authname",t.authname),localStorage.setItem("roleid",t.roleid),localStorage.setItem("tenantid",t.tenantid),localStorage.setItem("partnerid",t.partnerid),localStorage.setItem("applocationid",t.applocationid),localStorage.setItem("userid",t.userid),localStorage.setItem("userfcmtoken",t.userfcmtoken),te(t.userid),N("/nearle/dispatch")}else(0,S.k)(n.data.message,"error",3e3);else(0,S.k)(n.data.message,"error",3e3);else(0,S.k)(n.data.message,"error",3e3)}catch(n){console.error(n),(0,S.k)(n.message,"error",5e3)}finally{D(!1)}},ee=e=>{(0,a.M8)(e,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:1500})},te=async e=>{const t=[...(await m.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e))).data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(t))};return(0,O.jsxs)(i.A,{sx:{minHeight:"100vh",display:"flex",bgcolor:"#f8fafc"},children:[I&&(0,O.jsx)(A.A,{}),(0,O.jsxs)(i.A,{sx:{display:{xs:"none",md:"flex"},position:"relative",overflow:"hidden",flexBasis:"46%",flexDirection:"column",justifyContent:"space-between",color:"#fff",p:6,background:"linear-gradient(150deg, #4D1C61 0%, #662582 52%, #9255AB 100%)"},children:[(0,O.jsx)(i.A,{sx:{position:"absolute",top:-120,right:-80,width:360,height:360,borderRadius:"50%",background:"radial-gradient(circle, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 70%)"}}),(0,O.jsx)(i.A,{sx:{position:"absolute",bottom:-150,left:-110,width:440,height:440,borderRadius:"50%",background:"radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%)"}}),(0,O.jsx)(i.A,{sx:{position:"relative"},children:(0,O.jsx)(i.A,{sx:{bgcolor:"#fff",borderRadius:2,px:1.5,py:.75,display:"inline-flex",boxShadow:"0 8px 20px rgba(0,0,0,0.18)"},children:(0,O.jsx)("img",{src:x,alt:"NearlExpress",style:{height:30,display:"block"}})})}),(0,O.jsxs)(i.A,{sx:{position:"relative"},children:[(0,O.jsxs)(s.A,{sx:{fontSize:34,fontWeight:700,lineHeight:1.18,letterSpacing:"-0.02em",mb:2},children:["Operate your dispatch,",(0,O.jsx)("br",{}),"end to end."]}),(0,O.jsx)(s.A,{sx:{fontSize:16,color:"rgba(255,255,255,0.82)",maxWidth:430,lineHeight:1.6},children:"Orders, AI route optimisation, live rider tracking and billing \u2014 all in the NearlExpress operator console."})]}),(0,O.jsx)(l.A,{spacing:1.25,sx:{position:"relative"},children:["Real-time fleet visibility","AI-optimised dispatch routes","Tenant, pricing & invoice control"].map((e=>(0,O.jsxs)(l.A,{direction:"row",spacing:1.25,alignItems:"center",children:[(0,O.jsx)(i.A,{sx:{width:22,height:22,borderRadius:"50%",bgcolor:"rgba(255,255,255,0.18)",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700},children:"\u2713"}),(0,O.jsx)(s.A,{sx:{fontSize:14.5,color:"rgba(255,255,255,0.9)"},children:e})]},e)))})]}),(0,O.jsx)(i.A,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",p:{xs:2.5,sm:4}},children:(0,O.jsxs)(i.A,{sx:{width:"100%",maxWidth:420},children:[(0,O.jsxs)(c.A,{sx:{width:"100%",borderRadius:3,border:"1px solid ".concat(n.palette.divider),boxShadow:"0 14px 40px rgba(15, 23, 42, 0.10)",p:{xs:2.5,sm:4}},children:[(0,O.jsx)(l.A,{alignItems:"center",mb:2.5,children:(0,O.jsx)("img",{src:x,alt:"loginpagelogo",style:{maxHeight:48}})}),(0,O.jsx)(s.A,{variant:"h3",textAlign:"center",sx:{fontWeight:700,mb:.5},children:"Welcome back"}),(0,O.jsx)(s.A,{variant:"body2",textAlign:"center",sx:{color:"#64748b",mb:3},children:"Sign in to the NearlExpress console"}),(0,O.jsx)(u.A,{sx:{p:0},children:(0,O.jsx)("form",{noValidate:!0,onSubmit:e=>{e.preventDefault(),0==z?$():1==z?B&&q&&B==q?(async()=>{const e=await m.A.put("".concat("https://jupiter.nearle.app/live/api/v2","/users/update"),{userid:X,password:B});e.data.status&&((0,S.k)(e.data.message,"success",3e3),(0,S.k)("Enter Password to Login","success",3e3),L(2),U(""))})():(0,S.k)("Check Password","warning",3e3):2==z&&(B||(0,S.k)("Invalid Password","warning",3e3),$())},children:(0,O.jsxs)(l.A,{spacing:3,children:[(0,O.jsx)(d.A,{autoFocus:!0,fullWidth:!0,label:"E-mail Address",variant:"outlined",autoComplete:"email",required:!0,value:R,onChange:e=>V(e.target.value.toLocaleLowerCase()),InputProps:{readOnly:z}}),1==z&&(0,O.jsxs)(l.A,{display:"flex",flexDirection:"column",spacing:3,children:[(0,O.jsx)(s.A,{variant:"h4",textAlign:"start",mb:3,children:"Setup Password"}),(0,O.jsx)(d.A,{autoFocus:!0,fullWidth:!0,label:"Enter New Password",variant:"outlined",required:!0,type:H?"text":"password",value:B,onChange:e=>U(e.target.value),InputProps:{endAdornment:(0,O.jsx)(p.A,{position:"end",children:(0,O.jsx)(f.A,{onClick:()=>G((e=>!e)),edge:"end",children:H?(0,O.jsx)(C.A,{}):(0,O.jsx)(w.A,{})})})}}),(0,O.jsx)(d.A,{error:""!==q&&B!==q,fullWidth:!0,label:"Re-Enter Password",variant:"outlined",required:!0,type:K?"text":"password",value:q,onChange:e=>J(e.target.value),InputProps:{endAdornment:(0,O.jsx)(p.A,{position:"end",children:(0,O.jsx)(f.A,{onClick:()=>Z((e=>!e)),edge:"end",children:K?(0,O.jsx)(C.A,{}):(0,O.jsx)(w.A,{})})})}})]}),2==z&&(0,O.jsxs)(l.A,{display:"flex",flexDirection:"column",spacing:3,children:[(0,O.jsx)(s.A,{variant:"h4",textAlign:"start",mb:3,children:"Enter Password"}),(0,O.jsx)(d.A,{autoFocus:!0,fullWidth:!0,label:"Enter Password",variant:"outlined",required:!0,type:H?"text":"password",value:B,onChange:e=>U(e.target.value),InputProps:{endAdornment:(0,O.jsx)(p.A,{position:"end",children:(0,O.jsx)(f.A,{onClick:()=>G((e=>!e)),edge:"end",children:H?(0,O.jsx)(C.A,{}):(0,O.jsx)(w.A,{})})})}})]}),Q&&(0,O.jsxs)(l.A,{spacing:1.5,children:[(0,O.jsxs)(l.A,{direction:"row",justifyContent:"space-between",children:[(0,O.jsx)(h.A,{children:"Enter Password"}),(0,O.jsx)(v.A,{variant:"body2",sx:{cursor:"pointer"},onClick:()=>{P(""),$()},children:"Retry"})]}),(0,O.jsx)(d.A,{type:"passowrd",value:B,onChange:e=>U(e.target.value)})]}),(0,O.jsx)(o.A,{children:(0,O.jsx)(g.A,{fullWidth:!0,size:"large",type:"submit",variant:"contained",color:"primary",children:"Continue"})})]})})})]}),(0,O.jsxs)(l.A,{direction:"row",justifyContent:"center",alignItems:"center",flexWrap:"wrap",useFlexGap:!0,spacing:2,sx:{mt:3},children:[(0,O.jsx)(s.A,{variant:"caption",component:v.A,href:"https://nearle.in",target:"_blank",sx:{color:"#94a3b8",textDecoration:"none",fontWeight:600,"&:hover":{color:"#662582"}},children:"\xa9 All rights reserved"}),(0,O.jsx)(s.A,{variant:"caption",component:v.A,href:"https://nearle.in/terms",target:"_blank",sx:{color:"#94a3b8",textDecoration:"none",fontWeight:600,"&:hover":{color:"#662582"}},children:"Terms and Conditions"}),(0,O.jsx)(s.A,{variant:"caption",component:v.A,href:"https://nearle.in/privacy",target:"_blank",sx:{color:"#94a3b8",textDecoration:"none",fontWeight:600,"&:hover":{color:"#662582"}},children:"Privacy Policy"})]})]})})]})}},36080:(e,t,n)=>{n.d(t,{A:()=>C});var r=n(98587),a=n(58168),o=n(9950),i=n(72004),s=n(3484),l=n(89548),c=n(59254),u=n(18463),d=n(52695),p=n(31506),f=n(82053),h=n(45558),v=n(1614);function g(e){return(0,v.Ay)("MuiLink",e)}const y=(0,h.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var m=n(12703),b=n(99269);const A={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},x=e=>{let{theme:t,ownerState:n}=e;const r=(e=>A[e]||e)(n.color),a=(0,m.Yn)(t,"palette.".concat(r),!1)||n.color,o=(0,m.Yn)(t,"palette.".concat(r,"Channel"));return"vars"in t&&o?"rgba(".concat(o," / 0.4)"):(0,b.X4)(a,.4)};var j=n(44414);const S=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],w=(0,c.Ay)(f.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["underline".concat((0,l.A)(n.underline))],"button"===n.component&&t.button]}})((e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,a.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:x({theme:t,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(y.focusVisible)]:{outline:"auto"}})})),C=o.forwardRef((function(e,t){const n=(0,u.b)({props:e,name:"MuiLink"}),{className:c,color:f="primary",component:h="a",onBlur:v,onFocus:y,TypographyClasses:m,underline:b="always",variant:x="inherit",sx:C}=n,k=(0,r.A)(n,S),{isFocusVisibleRef:O,onBlur:I,onFocus:D,ref:N}=(0,d.A)(),[E,P]=o.useState(!1),M=(0,p.A)(t,N),F=(0,a.A)({},n,{color:f,component:h,focusVisible:E,underline:b,variant:x}),Y=(e=>{const{classes:t,component:n,focusVisible:r,underline:a}=e,o={root:["root","underline".concat((0,l.A)(a)),"button"===n&&"button",r&&"focusVisible"]};return(0,s.A)(o,g,t)})(F);return(0,j.jsx)(w,(0,a.A)({color:f,className:(0,i.A)(Y.root,c),classes:m,component:h,onBlur:e=>{I(e),!1===O.current&&P(!1),v&&v(e)},onFocus:e=>{D(e),!0===O.current&&P(!0),y&&y(e)},ref:M,ownerState:F,variant:x,sx:[...Object.keys(A).includes(f)?[]:[{color:f}],...Array.isArray(C)?C:[C]]},k))}))},62375:(e,t,n)=>{var r=n(24994);t.A=void 0;var a=r(n(79526)),o=n(44414);t.A=(0,a.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility")},62462:(e,t,n)=>{var r=n(24994);t.A=void 0;var a=r(n(79526)),o=n(44414);t.A=(0,a.default)((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")}}]); \ No newline at end of file diff --git a/build/static/js/3723.f0610be4.chunk.js b/build/static/js/3723.f0610be4.chunk.js deleted file mode 100644 index 0fbf70e..0000000 --- a/build/static/js/3723.f0610be4.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[3723],{855:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(7208),a=n(76475),o=n(44414);function s(e){var t,n;let s,i,{children:l,type:c="scale",direction:u="right",offset:d=10,scale:p={hover:1.05,tap:.95}}=e;switch(u){case"up":case"left":s=d,i=0;break;default:s=0,i=d}const[f,h]=(0,r.Y)(s,i),[v,y]=(0,r.Y)(s,i);switch(c){case"rotate":return(0,o.jsx)(a.P.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:l});case"slide":return"up"===u||"down"===u?(0,o.jsx)(a.P.div,{animate:{y:void 0!==v?v:""},onHoverEnd:()=>y(),onHoverStart:()=>y(),children:l}):(0,o.jsx)(a.P.div,{animate:{x:void 0!==f?f:""},onHoverEnd:()=>h(),onHoverStart:()=>h(),children:l});default:return"number"===typeof p&&(p={hover:p,tap:p}),(0,o.jsx)(a.P.div,{whileHover:{scale:null===(t=p)||void 0===t?void 0:t.hover},whileTap:{scale:null===(n=p)||void 0===n?void 0:n.tap},children:l})}}},2046:(e,t,n)=>{n.d(t,{A:()=>S});var r=n(98587),a=n(58168),o=n(9950),s=n(72004),i=n(3484),l=n(89548),c=n(82053),u=n(15866),d=n(39766),p=n(59254),f=n(45558),h=n(1614);function v(e){return(0,h.Ay)("MuiInputAdornment",e)}const y=(0,f.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var m,g=n(18463),A=n(44414);const b=["children","className","component","disablePointerEvents","disableTypography","position","variant"],x=(0,p.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat((0,l.A)(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===n.variant&&{["&.".concat(y.positionStart,"&:not(.").concat(y.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),S=o.forwardRef((function(e,t){const n=(0,g.b)({props:e,name:"MuiInputAdornment"}),{children:p,className:f,component:h="div",disablePointerEvents:y=!1,disableTypography:S=!1,position:w,variant:C}=n,j=(0,r.A)(n,b),O=(0,d.A)()||{};let k=C;C&&O.variant,O&&!k&&(k=O.variant);const I=(0,a.A)({},n,{hiddenLabel:O.hiddenLabel,size:O.size,disablePointerEvents:y,position:w,variant:k}),D=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:a,size:o,variant:s}=e,c={root:["root",n&&"disablePointerEvents",a&&"position".concat((0,l.A)(a)),s,r&&"hiddenLabel",o&&"size".concat((0,l.A)(o))]};return(0,i.A)(c,v,t)})(I);return(0,A.jsx)(u.A.Provider,{value:null,children:(0,A.jsx)(x,(0,a.A)({as:h,ownerState:I,className:(0,s.A)(D.root,f),ref:t},j,{children:"string"!==typeof p||S?(0,A.jsxs)(o.Fragment,{children:["start"===w?m||(m=(0,A.jsx)("span",{className:"notranslate",children:"\u200b"})):null,p]}):(0,A.jsx)(c.A,{color:"text.secondary",children:p})}))})}))},8457:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALEAAABFCAYAAAAFKgfKAAAQE0lEQVR4Ae2dS4wcRxmA/6p5GLxEHiuHRILgtpx1wslrDjwuZDdcAduckTyrxOsIFNl7Q1HsnbVz4YC8IQoku4685sjFNnCMtGMuICTkzQWIdy23RZDgABlAgL0zXcX/Vz+mp6cf1Y/ZJUl90u70zHTXdNf8/df/qhoAg8FgMBgMBoPBYDAYDIa9hEEJ2lan1WzWzoGUbXxqSYAeNrkJIK+vbV1cB4NhFygsxO1nO1bT4Ru4aSXsYu/0xdy63bHBYJgghYQ4KsCkgTnATSlZC5icgaFg9ySIubWtziYYDBOCQ07GBFjI16f64vDbWxfnV7cvnOI1MYfmxbK3e4sB30CzwwKDYULk1sRnpy9dQ83bVk9QWFe3lzpx+y08vdwBxpa8p2RaHEfTogcGQ8XU8ux8ZrrTRrnv0DZK/zoK8GLSvr/7e7f7xYOzBxljX8GnrRqHR/QaGAwVk8ucQNMg0KysL5az9u87skP7ugezcxTNAIOhYrSF2NXCnsMm5fW3NKIOZD44QvjautWss/NgMFSMthCHtXCSHRzHO/c6N934MTXCToPBUDFaQvzi051ZCGlhyAmT8nVv0/LaMhgqQ0uIa4wHGpQP5DrkhNeHxzDJToLBUCGZQkxxYT+kRhGJtwpk4N76ozrG9j7xOTAYKiRTiBsOzPrbAyFuQUEwKaKOZcBmTJTCUCU8e4eab0rY5KRBUbgMUs+12vDGMBjKkirErikhZ2kbTYkulAAFtxtsM26BwVARqUJclSlBkF3sh9oYg2NgMFREqhBzWTvhb5cyJTzQHrbpEYV5FgyGiqinvSndskoMDbMuVACTYEsG1GbLywBSyM3Cz7lpyjUNRUkUYhSyoC6YgSxsSrxw5PJJzuU1tKlbknSwC5VoXgO38d7a1lJn4Ujn5GoF2t7wySMQYhK2GpdX4nZC7bm0cPTSc6t3L56CnHDukMAmhtRQy29SyI1xTqaLlhC/hA6ncPj9kXa8wvxHfbGsM5skWiq6unXxMG2QM7tvwM/hNVNSxoISCCnmrm53uknvt1FRNIHfiH4OXQtjbGX17oXUIquz05c3fMe7HGpKWXfH7bsejZKBkkGwb0pNY/NRteiidkVKOUtKDUrQGHDrzfuvPqDtwCZmTFrgdmb4z32PPlDCyYVnLpUq4Hnq2SeC7W++7OY8OJN2va5MjFK4mh7azQa/440ihaCCfxRguk4LJkycABNuf8vO7qXoldl4vtkcCm7VBJMppDxZVoCj8OGGDBre/9in1N8YApbyJirI5qXHxz97AL7e/nLw+jde/hoc/dIhvCaJdxOfEUwehGooPJuERiPYBeElRqoCE2DDkWJ3QEU1qUSUF+myYAIMbWI2/IDTP/gW/OS7P1Pbz6PgffD7v8Dd3yrN3fLu1txmxeOfG++bp77wBLz/mwc2amNLSjgEBRESFrlyQoMquRZqZBLkXBNVyfQJB2wcIU5hOLDwbJTPDCDWWSWtxBweFlCbSlbps6i2hHF2jl7EaM7smelLbb2Z4/K2kKp+OxccFQh+UGBGTrH6gR0YQNUoZRYySsr27Zv3Lz7wt+vDD+EHMEqAGrOl/nyeQW35eTQDPCFWdysNc2m2Xhwf/OGv8NQrT8JXv30MhfdJ9drmu3fR3hY2flkW/pXQAGJzdauzgnauHbJzrWaD3fAEuVBnvTMhR3MfCrAMaSUJ4hR+lhJ4PN/NJmfkH6j38Xu/gq/dzLoG7L/7V7eXupAT9C9s9C+uwO5iV9m3YU2shOi//3oYvEQmBWnLX/zoVyMHccavYcdqzZlDDdvCOw7+88+H8GPU7mRGYIfDD7/zU/jbn0cOt6AkVOd85shyy9dkeFEzjQajL2geCkDzCaEE6GQuRvtIZUEdb44ieNO8QuFFz7FaDjlW/mSCTtpnoYM3o5zVnEiHjYyA/5aDfzRg4rTK9i1NTPa3AyGWnrFNwvbLN27DhVsL8OnH9sGfUIP++sZ70TZQy6nhcDHrwxgfGvEktNe///OR9/c59fv9mjNL2987/Noh3+Msytq9pfNnp5ePSRyK1eej3CwcvWxnefpxBBNiC4JDcwdgdMj0tHBA3DQvjJmv4zWc9q/Bm9q1nm4aMTILcju04XOhfIB3E8GEaZXtWwgppsAAxDvZ8rc3330fLp9YhVeefyOwjWM4X4X3THe+AKa+6J36oBLn7lFfks1uBy+grVg2slIF5MyNfHlSLieVtjrDZQ8I8kUmOuSTANcGTqERa68Z2sQFwh46ZoVvayfh3fk9dT8JTpqkdOaO2kRbb06EVygScGXh6Gsfrt59VXtmCg31UAK6QUfbG3Hm0B9g5xamL+lN2cr0ReRtVETrSYe7jtVotIMcYsZEd6oP9sruLqfQY5o5AR2UELvJAyhCtlnBUm8O1XFC1HqYaKHCoMrCO1RwhDcHamS+EdygUqzga+/pprjDdldZ4kJq3nlpX7MXcuvGvoeO3erW0nra8QtPX+qFIxEck1ioXroru78eSK/KvlVC7DgUWy0MmRW38kYrCNQcNj1iaMtWkWo5NGmqgIQVhQdvsKGTRDFkDFst4vUekhnHv4Cp8DJhoAGG2GhUiAmpFSJfyG2c1e2LFMFphTSy1x+d1KXGquiHyEutsqao37e0rYTYjyAUhTMVATgOeZFcnUStBj0aCThnB6BiyEnCL84a/eLgWpYAq/PiKqNWmHpdzOFDNxpSI1tYYJpXtx3G+A1/NNENuSVBERzsD0gTZH9k9CnbD1OMW49A9EIlky00RTegBFNuTXpYiGu0ECAUh6nwTtxUfpk2XHKhbEYa+tE2RLNV5vaudYj54mLp9+FmswG0jwUVEQ2pQc4lDwg0A5ZDZoBWyC2NLEF2HKeLgmtDhf0wGIj1BpqeVaecCXVzeHUTyTANI9wNA1njb8jEk+aSfRh6qpIeMCHoi8OkwjxLKSsl7aYWRAR5XULx4TPMvogZQYkNyAmZARCOtiT2dZ428UaKREA8QZ4J98PI55aA2qzVxPEq+9ZHGRGRiq4xdmricMZaxAq0cbtrW0tz4ddQw95POo68f9/AX5i+fIcKUXb64qBZeNCQB9dMYenCuY7DvZAi05skx6N4PFaojEqjUd0QZvhk4JoTGMtN2cemfyr6oGNWuJVuVugVCzSQwhti3FixwaCNr4nTitbtYGcuFjXsmVajwfLnxb0p/Zn2ucEQwY1OaHqMKoow6inH4psVq+8rh0SLYcKDFS7J3Auo/vZT2H+DevaIUx+AnWcFpZe8ES2pbaamdo3Hd/Ock855UXtk5lEoFgqAMV07WvdRts3wtXtCLK2kMDHNvAg/J0/57PTyiaA4JQkyK57t3ISUTGC4EL7RcDYxTawVZvOmJ8U6mnhDrq+VyAZhMoHmA7Zj3rJ5X8z5X7abgaudZiBnBegtaicaytHFc6QIibOYJID0i1SY+DkvPOWS1LY3gTdwpBeOXl7yf8lK95xC52WjJlkMz3Ok8GDDqV1j/tojBXMJzbqKgnSqbDN87a5NDGnmBM28GCVSnJJEq+mw9CC5GNri/roUOmE22tcNAY2Hf0gAzxQs89MVYPzCr1CpJCs4v42Ow+PvRJ1gNYWnwe9QwVLeeOrC0Us3wC2Kt6AYFtqL18IzOygixSqZwzeEQo5Vt8lJq6XvwsZsYHLy6AdnIBOWy0nz1qVoUUlm1r5VC7KuAHtTmApGYCJEpnt5MWULcqJSuFJNbC0LJlJ4mzY8ubCgYnCEqOI8R6hn1U04Uthxr9NPGTQ4O11tBobCbGxmhyvhXM/amwTZrVYjjT96w3iCDDqmRbIAy839fTkXLpBBg2cWYLTH1ExryTYhA8nGNFDLW5fuptfO7NgxqW27zjBPMu3wOJbiiMecD6Qlp3TajEOwoQzFykuBNv1rJ+pZdRNJhR9eCWW4uKY8ErWqOhf99DMJMk1BwnTxRhFBThJgsrmmBuJUtMKLc35MgozsK069rVEAdebI8spw1olLZF06K3oM/bxakSozlUjavjCf93wywJT5hfw1MhmUbbPOWNaM2+Q7ZGwGQk6i4TTUDJR6JtWSa602L8N3/MXp5XUOoz+pkCbISQKMzuX1q9sX21Ax8X2ZrvkKl0lK6L2UkZoWNYwE5SuZaVF2V0ac/SQYxv51FsShqUoCxG3QgNrccVQFm+2/hpqYp2rifj89d85qcl467D5UgxsrzmlL+1zdWmqjdulFtUucICdqYLT1r95bqsbm3UNo7QzZ4OnXESPA6LSr7+DhQ+g1xyfbqTJOBpohBe5GPaheJBSJsWF8sZg2Orpt0AHbbFK7R19r+xMcOM/QBFl1DGoVeL1oRSahG0bLuYuD5tjFnY8ryMsbdNefmb68EWsD43FrHwMBLoHdcFxFQt+7gPy/zxKDhb0/zCtI0AgIaCDFiu8U1zPqJmzQYGcgV5oNNYxbUALqOBWvxHb6NVXttQIFSCq9pCSMVI8xKijl11E/irjhSk1nSbIek+I2c+RKOOmhRrbpTpfJ2gldB14OV5IKYCFzk/IMNB0tV5tqBBjzk1q0RgY+9uppc+DCKec0SPgwzDNfoNB57CIYeqrUEZIrz7mQEBM7dbnecNg5zY6y6UaEjxH0i1VV3JTk90COuYYqWdPgH1bZJpFWDVmHiua1UewYnbxuTidv7LOFFA8w9UzC/BwUJPQj6rrXRgutbBRfaIXP4E2cvodU9uTp8XdYMcctCwYn8Jy6kJPwtJ8iU4iyAgVUr5w31Ux9JyE5FFwPT9UfO1jTC/UhJw9jtndKxY5VIZA63VaRlYZCAmzFvG3TP69DIufIZihMV0SQuaolyUjyJnwD6JVvQkmCqM7oB85wxnJPAfKnVNF22SlEcaADdyNL0GMOSnUlucyZck6DnDy0THI5eVEHLvzbHjxn6C5NgMlJoeVb6Q+jFAfjnRYSZKWRKxmdNLCLTLCNQtOq4P8bGyaAvyQCF0LMq/UHMLSkpu6QTRo4BPmHOncqjSysXbzfvFNgmEjbpMgSYHJSwq/R870UZOrjIlOV4lAjh8xejWnPkJVEOSJtsmCybD1pYbfzJb5EIeWi7lD2qDY4jA+Bxg/bYeTVkjBlDe95BdiHXkc7/tC4HV/ctEhDRQyUsyxuTaEjWeV6D57X38U+wxAjPxbjze8FFH69XnHUR7W5fyACR1wzap0f3ZSmFDC/ds9dR4EEOGqH0RKgaSsopgkwpY7Xti/MQQquN8024ouV5OZOX44Ictzq7Fkrwhsmi27JaW6oQEjmKOogYaJlsbynNpk4+/viYFEBJgGcGjiZwzUJKAlqvAm06zayoQATE2JXe4lFyKju8usnGg33NzIo7YvCe/wqDo9pw22WAEerz7LO1QjyR5eJCTFBQW2qUOI1cZjMgrh1DPyYIYPaOT/tu1LCBs4rwD5GkD+61GEX8CIO9KdMA++HYWYo9Qj+cklS3NJxACYhwD5q3TRV1snujLfvOnv5ir4MBoPBYDAYDAaDwWAwZPI/iTTgFxK8/KcAAAAASUVORK5CYII="},20466:(e,t,n)=>{n.d(t,{k:()=>a});var r=n(8881);const a=(e,t,n)=>(0,r.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:n||2e3})},21862:(e,t,n)=>{var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==m(e)&&"function"!==typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=a?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(9950)),a=["placeholder","separator","isLastChild","ariaLabelOverride","shouldRender","inputStyle","focus","isDisabled","hasErrored","errorStyle","isSuccessed","successStyle","focusStyle","disabledStyle","shouldAutoFocus","isInputNum","index","value","className","isInputSecure","onSubmit"];function o(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n0&&console.error("Length of the placeholder should be equal to the number of inputs.")}})),y(h(e),"handleOtpChange",(function(t){(0,e.props.onChange)(t.join(""))})),y(h(e),"isInputValueValid",(function(t){return(e.props.isInputNum?!isNaN(parseInt(t,10)):"string"===typeof t)&&1===t.trim().length})),y(h(e),"focusInput",(function(t){var n=e.props.numInputs,r=Math.max(Math.min(n-1,t),0);e.setState({activeInput:r})})),y(h(e),"focusNextInput",(function(){var t=e.state.activeInput;e.focusInput(t+1)})),y(h(e),"focusPrevInput",(function(){var t=e.state.activeInput;e.focusInput(t-1)})),y(h(e),"changeCodeAtFocus",(function(t){var n=e.state.activeInput,r=e.getOtpValue();r[n]=t[0],e.handleOtpChange(r)})),y(h(e),"handleOnPaste",(function(t){t.preventDefault();var n=e.state.activeInput,r=e.props,a=r.numInputs;if(!r.isDisabled){for(var o=e.getOtpValue(),s=n,i=t.clipboardData.getData("text/plain"),l=(e.props.isInputNum?i.replace(/\D/g,""):i).slice(0,a-n).split(""),c=0;c=n&&l.length>0&&(o[c]=l.shift(),s++);e.setState({activeInput:s},(function(){e.focusInput(s),e.handleOtpChange(o)}))}})),y(h(e),"handleOnChange",(function(t){var n=t.target.value;e.isInputValueValid(n)&&e.changeCodeAtFocus(n)})),y(h(e),"handleOnKeyDown",(function(t){8===t.keyCode||"Backspace"===t.key?(t.preventDefault(),e.changeCodeAtFocus(""),e.focusInput(e.state.activeInput-1)):46===t.keyCode||"Delete"===t.key?(t.preventDefault(),e.changeCodeAtFocus("")):37===t.keyCode||"ArrowLeft"===t.key?(t.preventDefault(),e.focusPrevInput()):39===t.keyCode||"ArrowRight"===t.key?(t.preventDefault(),e.focusNextInput()):32===t.keyCode||" "===t.key||"Spacebar"===t.key||"Space"===t.key?t.preventDefault():13!==t.keyCode&&"Enter"!==t.key||e.props.onSubmit()})),y(h(e),"handleOnInput",(function(t){var n=t.target.value;if(t.target.value)if(t.target.value&&t.target.value.length>1){t.preventDefault();for(var r=e.props.numInputs,a=e.state.activeInput,o=e.getOtpValue(),s=t.target.value.slice(0,r-a).split(""),i=0;i=a&&s.length>0&&(o[i]=s.shift());e.handleOtpChange(o),e.focusInput(e.props.numInputs)}else if(n&&n.trim().length>1)t.clipboardData={getData:function(){return n.trim()}},e.handleOnPaste(t);else if(e.isInputValueValid(t.target.value))e.focusNextInput();else if(!e.props.isInputNum){var l=t.nativeEvent;null===l.data&&"deleteContentBackward"===l.inputType&&(t.preventDefault(),e.changeCodeAtFocus(""),e.focusPrevInput())}})),y(h(e),"renderInputs",(function(){for(var t=e.state.activeInput,n=e.props,a=n.id,o=n.autoComplete,i=n.numInputs,l=n.inputStyle,c=n.focusStyle,u=n.separator,d=n.separateAfter,p=void 0===d?1:d,f=n.isDisabled,h=n.disabledStyle,v=n.hasErrored,y=n.errorStyle,m=n.isSuccessed,g=n.successStyle,b=n.shouldAutoFocus,x=n.isInputNum,S=n.isInputSecure,w=n.className,C=n.inputProps,j=n.onSubmit,O=[],k=e.getOtpValue(),I=e.getPlaceholderValue(),D=e.props["data-cy"],N=e.props["data-testid"],E=e.props["custom-test-attr"],P=e.props["custom-test-id"],M=function(n){var d=void 0;d=(n+1)%parseInt(p)===0;var M={};E&&(M[E]=P&&"".concat(P,"-").concat(n));var Y={};C&&(Array.isArray(C)?C[n]&&(Y=C[n]):Y=C),O.push(r.default.createElement(A,s({id:a&&"".concat(a,"-").concat(n),autoComplete:null!==o&&void 0!==o?o:"off",placeholder:I&&I[n],key:n,index:n,focus:t===n,value:k&&k[n],onChange:e.handleOnChange,onKeyDown:e.handleOnKeyDown,onInput:e.handleOnInput,onPaste:e.handleOnPaste,onFocus:function(t){e.setState({activeInput:n}),t.target.select()},onBlur:function(){return e.setState({activeInput:-1})},separator:u,inputStyle:l,focusStyle:c,isLastChild:n===i-1,isDisabled:f,disabledStyle:h,hasErrored:v,errorStyle:y,isSuccessed:m,successStyle:g,shouldAutoFocus:b,isInputNum:x,isInputSecure:S,className:w,"data-cy":D&&"".concat(D,"-").concat(n),"data-testid":N&&"".concat(N,"-").concat(n),shouldRender:d,onSubmit:j},Y,M)))},Y=0;Y0&&this.setState({activeInput:0})}},{key:"render",value:function(){var e=this.props.containerStyle;return r.default.createElement("div",{style:Object.assign({display:"flex"},g(e)&&e),className:g(e)?"":e},this.renderInputs())}}]),n}(r.Component);y(b,"defaultProps",{numInputs:4,onChange:function(e){return console.log(e)},isDisabled:!1,shouldAutoFocus:!1,value:"",isInputSecure:!1,onSubmit:function(e){return console.log(e)}})},23723:(e,t,n)=>{n.r(t),n.d(t,{default:()=>I});var r=n(9950),a=n(8881),o=n(855),s=(n(21862),n(16491)),i=n(93230),l=n(48089),c=n(82053),u=n(50704),d=n(29925),p=n(2046),f=n(25333),h=n(29277),v=n(36080),y=n(82223),m=n(14857),g=n(26910),A=n(28429),b=n(52351),x=n(8457),S=n(82569),w=n(20466),C=(n(45669),n(62375)),j=n(62462),O=n(68889),k=n(44414);const I=()=>{const e=(0,S.wA)(),t=(0,S.d4)((e=>e.fcm)),n=((0,S.d4)((e=>e.fcm.permission)),(0,m.A)()),[I,D]=(0,r.useState)(!1);let N=(0,A.Zp)();const[E,P]=(0,r.useState)(""),[M,Y]=(0,r.useState)(""),[F,T]=(0,r.useState)({}),[V,L]=(0,r.useState)(""),[R,z]=(0,r.useState)(0),[B,U]=(0,r.useState)(""),[q,J]=(0,r.useState)(""),[Q,G]=(0,r.useState)(!1),[H,W]=(0,r.useState)(!1),[K,Z]=(0,r.useState)(!1),[X,_]=(0,r.useState)(0);(0,r.useEffect)((()=>{localStorage.getItem("firstname")&&N("/nearle/dispatch")}),[]);const $=async()=>{if(D(!0),!V)return ee("Fill All required fields"),void D(!1);try{const n=await g.A.post("https://jupiter.nearle.app/live/api/v1/users/console/login",{authname:V,configid:9,userfcmtoken:null===t||void 0===t?void 0:t.token,password:B});if(409!=n.data.code||n.data.status)if(403==n.data.code)(0,w.k)(n.data.message,"warning",3e3);else if(409==n.data.code&&n.data.status)z(1),_(n.data.details.userid),(0,w.k)("User Found","success",3e3),(0,w.k)(n.data.message,"success",3e3);else if(401!=n.data.code||n.data.status)if(401==n.data.code&&n.data.status)(0,w.k)(n.data.message,"success",3e3),te(n.data.userid),z(2);else if(200==n.data.code&&n.data.status){(0,w.k)(n.data.message,"success",1e3),T(n.data.details);const t=n.data.details;e((0,O.FN)(t)),localStorage.setItem("firstname",t.firstname),localStorage.setItem("authname",t.authname),localStorage.setItem("roleid",t.roleid),localStorage.setItem("tenantid",t.tenantid),localStorage.setItem("partnerid",t.partnerid),localStorage.setItem("applocationid",t.applocationid),localStorage.setItem("userid",t.userid),localStorage.setItem("userfcmtoken",t.userfcmtoken),te(t.userid),N("/nearle/dispatch")}else(0,w.k)(n.data.message,"error",3e3);else(0,w.k)(n.data.message,"error",3e3);else(0,w.k)(n.data.message,"error",3e3)}catch(n){console.error(n),(0,w.k)(n.message,"error",5e3)}finally{D(!1)}},ee=e=>{(0,a.M8)(e,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:1500})},te=async e=>{const t=[...(await g.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e))).data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(t))};return(0,k.jsxs)(s.A,{sx:{height:"100vh",position:"relative"},children:[I&&(0,k.jsx)(b.A,{}),(0,k.jsx)(i.A,{sx:{minHeight:"100vh",alignItems:"center",justifyContent:"center",px:2},children:(0,k.jsxs)(l.A,{sx:{width:"100%",maxWidth:420,borderRadius:2,border:"1px solid ".concat(n.palette.divider),boxShadow:"none",p:{xs:2,sm:3}},children:[(0,k.jsx)(i.A,{alignItems:"center",mb:2,children:(0,k.jsx)("img",{src:x,alt:"loginpagelogo"})}),(0,k.jsx)(c.A,{variant:"h3",textAlign:"start",mb:3,children:"Login"}),(0,k.jsx)(u.A,{sx:{p:0},children:(0,k.jsx)("form",{noValidate:!0,onSubmit:e=>{e.preventDefault(),0==R?$():1==R?B&&q&&B==q?(async()=>{const e=await g.A.put("".concat("https://jupiter.nearle.app/live/api/v2","/users/update"),{userid:X,password:B});e.data.status&&((0,w.k)(e.data.message,"success",3e3),(0,w.k)("Enter Password to Login","success",3e3),z(2),U(""))})():(0,w.k)("Check Password","warning",3e3):2==R&&(B||(0,w.k)("Invalid Password","warning",3e3),$())},children:(0,k.jsxs)(i.A,{spacing:3,children:[(0,k.jsx)(d.A,{autoFocus:!0,fullWidth:!0,label:"E-mail Address",variant:"outlined",autoComplete:"email",required:!0,value:V,onChange:e=>L(e.target.value.toLocaleLowerCase()),InputProps:{readOnly:R}}),1==R&&(0,k.jsxs)(i.A,{display:"flex",flexDirection:"column",spacing:3,children:[(0,k.jsx)(c.A,{variant:"h4",textAlign:"start",mb:3,children:"Setup Password"}),(0,k.jsx)(d.A,{autoFocus:!0,fullWidth:!0,label:"Enter New Password",variant:"outlined",required:!0,type:H?"text":"password",value:B,onChange:e=>U(e.target.value),InputProps:{endAdornment:(0,k.jsx)(p.A,{position:"end",children:(0,k.jsx)(f.A,{onClick:()=>W((e=>!e)),edge:"end",children:H?(0,k.jsx)(j.A,{}):(0,k.jsx)(C.A,{})})})}}),(0,k.jsx)(d.A,{error:""!==q&&B!==q,fullWidth:!0,label:"Re-Enter Password",variant:"outlined",required:!0,type:K?"text":"password",value:q,onChange:e=>J(e.target.value),InputProps:{endAdornment:(0,k.jsx)(p.A,{position:"end",children:(0,k.jsx)(f.A,{onClick:()=>Z((e=>!e)),edge:"end",children:K?(0,k.jsx)(j.A,{}):(0,k.jsx)(C.A,{})})})}})]}),2==R&&(0,k.jsxs)(i.A,{display:"flex",flexDirection:"column",spacing:3,children:[(0,k.jsx)(c.A,{variant:"h4",textAlign:"start",mb:3,children:"Enter Password"}),(0,k.jsx)(d.A,{autoFocus:!0,fullWidth:!0,label:"Enter Password",variant:"outlined",required:!0,type:H?"text":"password",value:B,onChange:e=>U(e.target.value),InputProps:{endAdornment:(0,k.jsx)(p.A,{position:"end",children:(0,k.jsx)(f.A,{onClick:()=>W((e=>!e)),edge:"end",children:H?(0,k.jsx)(j.A,{}):(0,k.jsx)(C.A,{})})})}})]}),Q&&(0,k.jsxs)(i.A,{spacing:1.5,children:[(0,k.jsxs)(i.A,{direction:"row",justifyContent:"space-between",children:[(0,k.jsx)(h.A,{children:"Enter Password"}),(0,k.jsx)(v.A,{variant:"body2",sx:{cursor:"pointer"},onClick:()=>{P(""),$()},children:"Retry"})]}),(0,k.jsx)(d.A,{type:"passowrd",value:B,onChange:e=>U(e.target.value)})]}),(0,k.jsx)(o.A,{children:(0,k.jsx)(y.A,{fullWidth:!0,size:"large",type:"submit",variant:"contained",color:"primary",children:"Continue"})})]})})})]})}),(0,k.jsxs)(i.A,{sx:{position:"absolute",bottom:10,width:"100%",display:"flex",flexDirection:"row",justifyContent:"end",gap:2,p:2},children:[(0,k.jsx)(c.A,{variant:"subtitle1",color:"secondary",component:v.A,href:"https://nearle.in",target:"_blank",sx:{display:"flex"},children:"\xa9 All rights reserved"}),(0,k.jsx)(c.A,{variant:"subtitle1",color:"secondary",component:v.A,href:"https://nearle.in/terms",target:"_blank",sx:{display:"flex"},children:"Terms and Conditions"}),(0,k.jsx)(c.A,{variant:"subtitle1",color:"secondary",component:v.A,href:"https://nearle.in/privacy",target:"_blank",sx:{display:"flex"},children:"Privacy Policy"})]})]})}},36080:(e,t,n)=>{n.d(t,{A:()=>j});var r=n(98587),a=n(58168),o=n(9950),s=n(72004),i=n(3484),l=n(89548),c=n(59254),u=n(18463),d=n(52695),p=n(31506),f=n(82053),h=n(45558),v=n(1614);function y(e){return(0,v.Ay)("MuiLink",e)}const m=(0,h.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var g=n(12703),A=n(99269);const b={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},x=e=>{let{theme:t,ownerState:n}=e;const r=(e=>b[e]||e)(n.color),a=(0,g.Yn)(t,"palette.".concat(r),!1)||n.color,o=(0,g.Yn)(t,"palette.".concat(r,"Channel"));return"vars"in t&&o?"rgba(".concat(o," / 0.4)"):(0,A.X4)(a,.4)};var S=n(44414);const w=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],C=(0,c.Ay)(f.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["underline".concat((0,l.A)(n.underline))],"button"===n.component&&t.button]}})((e=>{let{theme:t,ownerState:n}=e;return(0,a.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,a.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:x({theme:t,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(m.focusVisible)]:{outline:"auto"}})})),j=o.forwardRef((function(e,t){const n=(0,u.b)({props:e,name:"MuiLink"}),{className:c,color:f="primary",component:h="a",onBlur:v,onFocus:m,TypographyClasses:g,underline:A="always",variant:x="inherit",sx:j}=n,O=(0,r.A)(n,w),{isFocusVisibleRef:k,onBlur:I,onFocus:D,ref:N}=(0,d.A)(),[E,P]=o.useState(!1),M=(0,p.A)(t,N),Y=(0,a.A)({},n,{color:f,component:h,focusVisible:E,underline:A,variant:x}),F=(e=>{const{classes:t,component:n,focusVisible:r,underline:a}=e,o={root:["root","underline".concat((0,l.A)(a)),"button"===n&&"button",r&&"focusVisible"]};return(0,i.A)(o,y,t)})(Y);return(0,S.jsx)(C,(0,a.A)({color:f,className:(0,s.A)(F.root,c),classes:g,component:h,onBlur:e=>{I(e),!1===k.current&&P(!1),v&&v(e)},onFocus:e=>{D(e),!0===k.current&&P(!0),m&&m(e)},ref:M,ownerState:Y,variant:x,sx:[...Object.keys(b).includes(f)?[]:[{color:f}],...Array.isArray(j)?j:[j]]},O))}))},62375:(e,t,n)=>{var r=n(24994);t.A=void 0;var a=r(n(79526)),o=n(44414);t.A=(0,a.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility")},62462:(e,t,n)=>{var r=n(24994);t.A=void 0;var a=r(n(79526)),o=n(44414);t.A=(0,a.default)((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")}}]); \ No newline at end of file diff --git a/build/static/js/4793.84e511ac.chunk.js b/build/static/js/4793.84e511ac.chunk.js deleted file mode 100644 index 301bf0e..0000000 --- a/build/static/js/4793.84e511ac.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4793],{20466:(e,t,a)=>{a.d(t,{k:()=>n});var o=a(8881);const n=(e,t,a)=>(0,o.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:a||2e3})},23266:(e,t,a)=>{a.d(t,{A:()=>w});var o=a(98587),n=a(58168),s=a(9950),i=a(72004),l=a(3484),r=a(99269),c=a(59254),d=a(19608),u=a(18463),p=a(13372),m=a(24184),g=a(79044),h=a(31506),A=a(40777),v=a(92455),x=a(88543),f=a(45558),b=a(1614);function y(e){return(0,b.Ay)("MuiMenuItem",e)}const j=(0,f.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var C=a(44414);const _=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],S=(0,c.Ay)(m.A,{shouldForwardProp:e=>(0,d.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:a}=e;return[t.root,a.dense&&t.dense,a.divider&&t.divider,!a.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:a}=e;return(0,n.A)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!a.disableGutters&&{paddingLeft:16,paddingRight:16},a.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(j.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(j.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(j.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(j.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(j.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(A.A.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(A.A.inset)]:{marginLeft:52},["& .".concat(x.A.root)]:{marginTop:0,marginBottom:0},["& .".concat(x.A.inset)]:{paddingLeft:36},["& .".concat(v.A.root)]:{minWidth:36}},!a.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},a.dense&&(0,n.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(v.A.root," svg")]:{fontSize:"1.25rem"}}))})),w=s.forwardRef((function(e,t){const a=(0,u.b)({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:c="li",dense:d=!1,divider:m=!1,disableGutters:A=!1,focusVisibleClassName:v,role:x="menuitem",tabIndex:f,className:b}=a,j=(0,o.A)(a,_),w=s.useContext(p.A),k=s.useMemo((()=>({dense:d||w.dense||!1,disableGutters:A})),[w.dense,d,A]),I=s.useRef(null);(0,g.A)((()=>{r&&I.current&&I.current.focus()}),[r]);const M=(0,n.A)({},a,{dense:k.dense,divider:m,disableGutters:A}),O=(e=>{const{disabled:t,dense:a,divider:o,disableGutters:s,selected:i,classes:r}=e,c={root:["root",a&&"dense",t&&"disabled",!s&&"gutters",o&&"divider",i&&"selected"]},d=(0,l.A)(c,y,r);return(0,n.A)({},r,d)})(a),N=(0,h.A)(I,t);let E;return a.disabled||(E=void 0!==f?f:-1),(0,C.jsx)(p.A.Provider,{value:k,children:(0,C.jsx)(S,(0,n.A)({ref:N,role:x,tabIndex:E,component:c,focusVisibleClassName:(0,i.A)(O.focusVisible,v),className:(0,i.A)(O.root,b)},j,{ownerState:M,classes:O}))})}))},59212:(e,t,a)=>{a.d(t,{A:()=>p});var o=a(89379),n=a(9950),s=a(93230),i=a(41413),l=a(77922),r=a(29925),c=a(26910),d=a(31222),u=a(44414);const p=(0,n.forwardRef)(((e,t)=>{let{setAppId:a,setLocoName:p,setPage:m,sx:g,textfeildSx:h,textfieldSx:A,pill:v=!1,accentColor:x="#6366f1",icon:f,placeholder:b="Select Zone",paperComponent:y}=e;const[j,C]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===j.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),C(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[j.length]);const _=e=>"".concat(x).concat(e),S=_("08"),w=_("26"),k=_("55"),I=_("18"),M=v?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"999px",bgcolor:S,fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s, background-color 0.2s","& fieldset":{borderColor:k,borderWidth:1.5},"&:hover fieldset":{borderColor:x},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(w)},"&.Mui-focused fieldset":{borderColor:x,borderWidth:2}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:x}}:{},O=v&&(0,u.jsx)(s.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,u.jsx)(i.A,{sx:{width:24,height:24,bgcolor:I,color:x,transition:"background-color 0.15s, color 0.15s"},children:f||(0,u.jsx)(d.HPi,{size:14})})});return(0,u.jsx)(l.A,{id:"location-autocomplete",options:j||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:y,sx:(0,o.A)({},g),onChange:(e,t,o)=>{"clear"===o?(null===a||void 0===a||a(0),null===p||void 0===p||p(""),null===m||void 0===m||m(0)):t&&(null===a||void 0===a||a(t.applocationid),null===p||void 0===p||p(t.locationname),null===m||void 0===m||m(0))},renderInput:e=>v?(0,u.jsx)(r.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:b,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:O}),sx:(0,o.A)((0,o.A)({},M),A||h||{})})):(0,u.jsx)(r.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},A||h||{})}))})}))},94793:(e,t,a)=>{a.r(t),a.d(t,{default:()=>k});var o=a(89379),n=a(9950),s=a(14857),i=a(47223),l=a(60899),r=a(93230),c=a(82053),d=a(77922),u=a(29925),p=a(19647),m=a(70006),g=a(23266),h=a(25333),A=a(82223),v=a(50027),x=a(26910),f=a(52351),b=a(99459),y=a(8881),j=a(28429),C=a(96319),_=a(59212),S=a(20466),w=a(44414);const k=()=>{const e=(0,s.A)(),t=(0,i.A)(e.breakpoints.down("md")),[a,k]=(0,n.useState)(0),I=(0,n.useRef)(null),[M,O]=(0,n.useState)(""),[N,E]=(0,n.useState)(""),[L,F]=(0,n.useState)(""),[W,z]=(0,n.useState)(""),[P,H]=(0,n.useState)(""),[R,D]=(0,n.useState)(""),[B,V]=(0,n.useState)(""),[G,T]=(0,n.useState)(),[X,Z]=(0,n.useState)(),[J,K]=(0,n.useState)(),[Y,q]=(0,n.useState)("Select Location"),[Q,U]=(0,n.useState)([]),[$,ee]=(0,n.useState)(0),[te,ae]=(0,n.useState)({}),[oe,ne]=(0,n.useState)({latitude:0,longitude:0}),[se,ie]=(0,n.useState)(!1),le=(0,j.Zp)();b.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8"),(0,n.useEffect)((()=>{if(B){const e=document.getElementById("addressAuto1"),t=new window.google.maps.places.Autocomplete(e,{strictBounds:!0,bounds:new window.google.maps.Circle({center:new window.google.maps.LatLng(G,X),radius:1e3*J}).getBounds()});t.addListener("place_changed",(()=>{const e=t.getPlace();V("".concat(e.name,", ").concat(e.formatted_address)),console.log("new place",e),console.log(" pick (new place) lat lng",{lat:e.geometry.location.lat(),lng:e.geometry.location.lng()}),ne({latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()}),F("".concat(e.name," ").concat(e.formatted_address)),ae((0,o.A)((0,o.A)({},te),{},{address:"".concat(e.name," ").concat(e.formatted_address)}));const a={address:"".concat(e.name," ").concat(e.formatted_address),street_number:"",route:"",locality:"",sublocality_level_1:"",administrative_area_level_3:"",administrative_area_level_1:"",country:"",postal_code:""};e.address_components.forEach((e=>{e.types.forEach((t=>{switch(t){case"street_number":a.street_number=e.long_name;break;case"route":a.route=e.long_name;break;case"locality":a.locality=e.long_name;break;case"sublocality_level_1":a.sublocality_level_1=e.long_name;break;case"administrative_area_level_3":a.administrative_area_level_3=e.long_name;break;case"administrative_area_level_1":a.administrative_area_level_1=e.long_name;break;case"country":a.country=e.long_name;break;case"postal_code":a.postal_code=e.long_name}}))})),ae((0,o.A)((0,o.A)({},te),{},{address:a.address,doorno:"".concat(a.street_number," ").concat(a.route),suburb:a.administrative_area_level_3,city:a.locality,state:a.administrative_area_level_1,postcode:a.postal_code,latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()})),console.log("Pick Address:",a)}))}}),[B]);(0,n.useEffect)((()=>{a&&(async()=>{ie(!0),await x.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapplocations/?applocationid=").concat(a)).then((e=>{console.log("getapplocations",e);const{latitude:t,longitude:a,radius:o}=e.data.details[0];e.data.status&&(T(t),Z(a),K(o),console.log("radius",o)),ie(!1)})).catch((e=>{console.log(e),ie(!1)}))})()}),[a]);(0,n.useEffect)((()=>{a&&(async e=>{ie(!0),await x.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenants/?applocationid=").concat(e,"&status=active")).then((e=>{if(console.log(e),e.data.status){let t=[];e.data.details.map((e=>{t.push((0,o.A)((0,o.A)({},e),{},{label:"".concat(e.tenantname)}))})),U(t)}ie(!1)})).catch((e=>{console.log(e),ie(!1)}))})(a)}),[a]);const re=e=>{(0,y.M8)(e,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})};return(0,w.jsxs)(w.Fragment,{children:[se&&(0,w.jsx)(f.A,{}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sx:{mb:2},children:(0,w.jsx)(r.A,{direction:"row",justifyContent:"space-between",alignItems:"center",children:(0,w.jsx)(c.A,{variant:"h3",children:"Create Customer"})})}),(0,w.jsx)(v.A,{sx:{p:{xs:1.5,md:3}},children:(0,w.jsxs)(l.Ay,{container:!0,spacing:{xs:2,md:3},children:[(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsxs)(l.Ay,{container:!0,spacing:{xs:2,md:3},children:[(0,w.jsx)(l.Ay,{item:!0,xs:12,md:6,children:(0,w.jsx)(_.A,{ref:I,locaName:Y,setAppId:k,setLocoName:q,sx:{}})}),(0,w.jsxs)(l.Ay,{item:!0,xs:12,md:6,children:[(0,w.jsx)(d.A,{fullWidth:!0,disabled:0==a,id:"free-solo-demo",sx:{},options:Q||[],renderInput:e=>(0,w.jsx)(u.A,(0,o.A)((0,o.A)({},e),{},{label:"Choose Client",focused:!0})),onChange:(e,t,a)=>{t?(console.log("Client",t),(async e=>{try{const t=await x.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantlocations/?tenantid=").concat(e));console.log("gettenantlocations",t.data.details),t.data.details.length}catch(t){console.log("gettenantlocations",t)}})(t.tenantid),ee(t.tenantid)):(setClientinfo({}),setTenantid(""))}})," "]}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-last-name",children:"Name"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-last-name",placeholder:"Name",onChange:e=>z(e.target.value),value:W,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-phone",children:"Phone Number"}),(0,w.jsxs)(r.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,w.jsx)(m.A,{defaultValue:"+1",disabled:!0,sx:{cursor:"not-allowed"},children:(0,w.jsx)(g.A,{value:"+1",children:"+91"})}),(0,w.jsx)(u.A,{type:"number",id:"personal-phone",fullWidth:!0,placeholder:"Phone Number",onChange:e=>{e.target.value.toString().length<=10&&O(e.target.value)},value:M,autoComplete:"off",sx:{cursor:"not-allowed"}})]})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-email",children:"Email "}),(0,w.jsx)(u.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Email ",onChange:e=>E(e.target.value),value:N,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-location",children:"Door No"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-location",placeholder:"Door No",onChange:e=>H(e.target.value),value:P,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-email",children:" Address"}),(0,w.jsx)(u.A,{variant:"outlined",id:"addressAuto1",fullWidth:!0,value:B,onChange:e=>{a?a&&V(e.target.value):(0,S.k)("Select Location First","warning",3e3)},InputProps:{endAdornment:(0,w.jsx)(h.A,{onClick:()=>{V(""),ae((0,o.A)((0,o.A)({},te),{},{doorno:"",suburb:"",city:"",postcode:"",landmark:""})),ne({latitude:0,longitude:0})},size:"small",children:(0,w.jsx)(C.A,{})})}})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-location",children:"Location"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-location",placeholder:"Location",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{suburb:e.target.value})),value:te.suburb,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-zipcode",children:"City"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-zipcode",placeholder:"City",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{city:e.target.value})),value:te.city,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-location",children:"State"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-location",placeholder:"State",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{state:e.target.value})),value:te.state,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-zipcode",children:"Post Code"}),(0,w.jsx)(u.A,{fullWidth:!0,type:"number",id:"personal-zipcode",placeholder:"Zipcode",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{postcode:e.target.value})),value:te.postcode,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-email",children:"Landmark"}),(0,w.jsx)(u.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Landmark",onChange:e=>D(e.target.value),value:R,autoComplete:"off"})]})})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsx)(r.A,{direction:{xs:"column",sm:"row"},justifyContent:"flex-end",alignItems:{xs:"stretch",sm:"center"},spacing:2,children:(0,w.jsx)(A.A,{variant:"contained",fullWidth:t,onClick:()=>{""===a?re("Select Applocation "):""===$?re("Select Tenant"):""===W?re("Enter Name"):""===M?re("Enter Mobile Number "):""===L?re("Enter Address "):""===te.city?re("Enter City "):""===te.state?re("Enter State "):""===te.suburb?re("Enter location "):""===te.postcode?re("Enter Post Code "):""===R?re("Enter Land Mark "):""===te.latitude?re("Invalid latitude "):""===te.longitude?re("Invaiid Longitude "):(async()=>{let e={applocationid:+a,tenantid:+$,customerid:0,configid:1,firstname:W,dialcode:"+91",contactno:M,email:N,doorno:P,address:te.address,suburb:te.suburb,city:te.city,state:te.state,postcode:te.postcode,landmark:R,latitude:oe.latitude.toString(),longitude:oe.longitude.toString(),profileimage:"",devicetype:"",deviceid:"",customertoken:"",primaryaddress:1};console.log(e),ie(!0);try{await x.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/customers/create"),e).then((e=>{console.log(e),e.data.status?((0,y.M8)(" Created Successfully ",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),le("/nearle/customers")):"Customer Already available"==e.data.message&&(0,y.M8)("Customer Already available",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),ie(!1)})).catch((e=>{console.log(e),ie(!1),(0,y.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}))}catch(t){console.log(t),ie(!1)}})()},children:"Create"})})})]})})]})}}}]); \ No newline at end of file diff --git a/build/static/js/4793.a677f2ac.chunk.js b/build/static/js/4793.a677f2ac.chunk.js new file mode 100644 index 0000000..4dec4b4 --- /dev/null +++ b/build/static/js/4793.a677f2ac.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4793],{20466:(e,t,a)=>{a.d(t,{k:()=>n});var o=a(8881);const n=(e,t,a)=>(0,o.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:a||2e3})},23266:(e,t,a)=>{a.d(t,{A:()=>w});var o=a(98587),n=a(58168),s=a(9950),i=a(72004),l=a(3484),r=a(99269),c=a(59254),d=a(19608),u=a(18463),p=a(13372),m=a(24184),g=a(79044),h=a(31506),A=a(40777),v=a(92455),x=a(88543),f=a(45558),b=a(1614);function y(e){return(0,b.Ay)("MuiMenuItem",e)}const j=(0,f.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var C=a(44414);const _=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],S=(0,c.Ay)(m.A,{shouldForwardProp:e=>(0,d.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:a}=e;return[t.root,a.dense&&t.dense,a.divider&&t.divider,!a.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:a}=e;return(0,n.A)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!a.disableGutters&&{paddingLeft:16,paddingRight:16},a.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(j.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(j.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(j.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,r.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(j.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(j.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(A.A.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(A.A.inset)]:{marginLeft:52},["& .".concat(x.A.root)]:{marginTop:0,marginBottom:0},["& .".concat(x.A.inset)]:{paddingLeft:36},["& .".concat(v.A.root)]:{minWidth:36}},!a.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},a.dense&&(0,n.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(v.A.root," svg")]:{fontSize:"1.25rem"}}))})),w=s.forwardRef((function(e,t){const a=(0,u.b)({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:c="li",dense:d=!1,divider:m=!1,disableGutters:A=!1,focusVisibleClassName:v,role:x="menuitem",tabIndex:f,className:b}=a,j=(0,o.A)(a,_),w=s.useContext(p.A),k=s.useMemo((()=>({dense:d||w.dense||!1,disableGutters:A})),[w.dense,d,A]),I=s.useRef(null);(0,g.A)((()=>{r&&I.current&&I.current.focus()}),[r]);const M=(0,n.A)({},a,{dense:k.dense,divider:m,disableGutters:A}),O=(e=>{const{disabled:t,dense:a,divider:o,disableGutters:s,selected:i,classes:r}=e,c={root:["root",a&&"dense",t&&"disabled",!s&&"gutters",o&&"divider",i&&"selected"]},d=(0,l.A)(c,y,r);return(0,n.A)({},r,d)})(a),N=(0,h.A)(I,t);let E;return a.disabled||(E=void 0!==f?f:-1),(0,C.jsx)(p.A.Provider,{value:k,children:(0,C.jsx)(S,(0,n.A)({ref:N,role:x,tabIndex:E,component:c,focusVisibleClassName:(0,i.A)(O.focusVisible,v),className:(0,i.A)(O.root,b)},j,{ownerState:M,classes:O}))})}))},59212:(e,t,a)=>{a.d(t,{A:()=>p});var o=a(89379),n=a(9950),s=a(93230),i=a(41413),l=a(77922),r=a(29925),c=a(26910),d=a(31222),u=a(44414);const p=(0,n.forwardRef)(((e,t)=>{let{setAppId:a,setLocoName:p,setPage:m,sx:g,textfeildSx:h,textfieldSx:A,pill:v=!1,accentColor:x="#6366f1",icon:f,placeholder:b="Select Zone",paperComponent:y}=e;const[j,C]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===j.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),C(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[j.length]);const _=e=>"".concat(x).concat(e),S=_("26"),w=_("18"),k=v?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(S)},"&.Mui-focused fieldset":{borderColor:x,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},I=v&&(0,u.jsx)(s.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,u.jsx)(i.A,{sx:{width:24,height:24,bgcolor:w,color:x,transition:"background-color 0.15s, color 0.15s"},children:f||(0,u.jsx)(d.HPi,{size:14})})});return(0,u.jsx)(l.A,{id:"location-autocomplete",options:j||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:y,sx:(0,o.A)({},g),onChange:(e,t,o)=>{"clear"===o?(null===a||void 0===a||a(0),null===p||void 0===p||p(""),null===m||void 0===m||m(0)):t&&(null===a||void 0===a||a(t.applocationid),null===p||void 0===p||p(t.locationname),null===m||void 0===m||m(0))},renderInput:e=>v?(0,u.jsx)(r.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:b,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:I}),sx:(0,o.A)((0,o.A)({},k),A||h||{})})):(0,u.jsx)(r.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},A||h||{})}))})}))},94793:(e,t,a)=>{a.r(t),a.d(t,{default:()=>k});var o=a(89379),n=a(9950),s=a(14857),i=a(47223),l=a(60899),r=a(93230),c=a(82053),d=a(77922),u=a(29925),p=a(19647),m=a(70006),g=a(23266),h=a(25333),A=a(82223),v=a(50027),x=a(26910),f=a(52351),b=a(99459),y=a(8881),j=a(28429),C=a(96319),_=a(59212),S=a(20466),w=a(44414);const k=()=>{const e=(0,s.A)(),t=(0,i.A)(e.breakpoints.down("md")),[a,k]=(0,n.useState)(0),I=(0,n.useRef)(null),[M,O]=(0,n.useState)(""),[N,E]=(0,n.useState)(""),[L,F]=(0,n.useState)(""),[W,z]=(0,n.useState)(""),[P,H]=(0,n.useState)(""),[R,D]=(0,n.useState)(""),[B,V]=(0,n.useState)(""),[G,T]=(0,n.useState)(),[X,Z]=(0,n.useState)(),[J,K]=(0,n.useState)(),[Y,q]=(0,n.useState)("Select Location"),[Q,U]=(0,n.useState)([]),[$,ee]=(0,n.useState)(0),[te,ae]=(0,n.useState)({}),[oe,ne]=(0,n.useState)({latitude:0,longitude:0}),[se,ie]=(0,n.useState)(!1),le=(0,j.Zp)();b.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8"),(0,n.useEffect)((()=>{if(B){const e=document.getElementById("addressAuto1"),t=new window.google.maps.places.Autocomplete(e,{strictBounds:!0,bounds:new window.google.maps.Circle({center:new window.google.maps.LatLng(G,X),radius:1e3*J}).getBounds()});t.addListener("place_changed",(()=>{const e=t.getPlace();V("".concat(e.name,", ").concat(e.formatted_address)),console.log("new place",e),console.log(" pick (new place) lat lng",{lat:e.geometry.location.lat(),lng:e.geometry.location.lng()}),ne({latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()}),F("".concat(e.name," ").concat(e.formatted_address)),ae((0,o.A)((0,o.A)({},te),{},{address:"".concat(e.name," ").concat(e.formatted_address)}));const a={address:"".concat(e.name," ").concat(e.formatted_address),street_number:"",route:"",locality:"",sublocality_level_1:"",administrative_area_level_3:"",administrative_area_level_1:"",country:"",postal_code:""};e.address_components.forEach((e=>{e.types.forEach((t=>{switch(t){case"street_number":a.street_number=e.long_name;break;case"route":a.route=e.long_name;break;case"locality":a.locality=e.long_name;break;case"sublocality_level_1":a.sublocality_level_1=e.long_name;break;case"administrative_area_level_3":a.administrative_area_level_3=e.long_name;break;case"administrative_area_level_1":a.administrative_area_level_1=e.long_name;break;case"country":a.country=e.long_name;break;case"postal_code":a.postal_code=e.long_name}}))})),ae((0,o.A)((0,o.A)({},te),{},{address:a.address,doorno:"".concat(a.street_number," ").concat(a.route),suburb:a.administrative_area_level_3,city:a.locality,state:a.administrative_area_level_1,postcode:a.postal_code,latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()})),console.log("Pick Address:",a)}))}}),[B]);(0,n.useEffect)((()=>{a&&(async()=>{ie(!0),await x.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapplocations/?applocationid=").concat(a)).then((e=>{console.log("getapplocations",e);const{latitude:t,longitude:a,radius:o}=e.data.details[0];e.data.status&&(T(t),Z(a),K(o),console.log("radius",o)),ie(!1)})).catch((e=>{console.log(e),ie(!1)}))})()}),[a]);(0,n.useEffect)((()=>{a&&(async e=>{ie(!0),await x.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenants/?applocationid=").concat(e,"&status=active")).then((e=>{if(console.log(e),e.data.status){let t=[];e.data.details.map((e=>{t.push((0,o.A)((0,o.A)({},e),{},{label:"".concat(e.tenantname)}))})),U(t)}ie(!1)})).catch((e=>{console.log(e),ie(!1)}))})(a)}),[a]);const re=e=>{(0,y.M8)(e,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})};return(0,w.jsxs)(w.Fragment,{children:[se&&(0,w.jsx)(f.A,{}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sx:{mb:2},children:(0,w.jsx)(r.A,{direction:"row",justifyContent:"space-between",alignItems:"center",children:(0,w.jsx)(c.A,{variant:"h3",children:"Create Customer"})})}),(0,w.jsx)(v.A,{sx:{p:{xs:1.5,md:3}},children:(0,w.jsxs)(l.Ay,{container:!0,spacing:{xs:2,md:3},children:[(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsxs)(l.Ay,{container:!0,spacing:{xs:2,md:3},children:[(0,w.jsx)(l.Ay,{item:!0,xs:12,md:6,children:(0,w.jsx)(_.A,{ref:I,locaName:Y,setAppId:k,setLocoName:q,sx:{}})}),(0,w.jsxs)(l.Ay,{item:!0,xs:12,md:6,children:[(0,w.jsx)(d.A,{fullWidth:!0,disabled:0==a,id:"free-solo-demo",sx:{},options:Q||[],renderInput:e=>(0,w.jsx)(u.A,(0,o.A)((0,o.A)({},e),{},{label:"Choose Client",focused:!0})),onChange:(e,t,a)=>{t?(console.log("Client",t),(async e=>{try{const t=await x.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantlocations/?tenantid=").concat(e));console.log("gettenantlocations",t.data.details),t.data.details.length}catch(t){console.log("gettenantlocations",t)}})(t.tenantid),ee(t.tenantid)):(setClientinfo({}),setTenantid(""))}})," "]}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-last-name",children:"Name"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-last-name",placeholder:"Name",onChange:e=>z(e.target.value),value:W,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-phone",children:"Phone Number"}),(0,w.jsxs)(r.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,w.jsx)(m.A,{defaultValue:"+1",disabled:!0,sx:{cursor:"not-allowed"},children:(0,w.jsx)(g.A,{value:"+1",children:"+91"})}),(0,w.jsx)(u.A,{type:"number",id:"personal-phone",fullWidth:!0,placeholder:"Phone Number",onChange:e=>{e.target.value.toString().length<=10&&O(e.target.value)},value:M,autoComplete:"off",sx:{cursor:"not-allowed"}})]})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-email",children:"Email "}),(0,w.jsx)(u.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Email ",onChange:e=>E(e.target.value),value:N,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-location",children:"Door No"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-location",placeholder:"Door No",onChange:e=>H(e.target.value),value:P,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-email",children:" Address"}),(0,w.jsx)(u.A,{variant:"outlined",id:"addressAuto1",fullWidth:!0,value:B,onChange:e=>{a?a&&V(e.target.value):(0,S.k)("Select Location First","warning",3e3)},InputProps:{endAdornment:(0,w.jsx)(h.A,{onClick:()=>{V(""),ae((0,o.A)((0,o.A)({},te),{},{doorno:"",suburb:"",city:"",postcode:"",landmark:""})),ne({latitude:0,longitude:0})},size:"small",children:(0,w.jsx)(C.A,{})})}})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-location",children:"Location"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-location",placeholder:"Location",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{suburb:e.target.value})),value:te.suburb,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-zipcode",children:"City"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-zipcode",placeholder:"City",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{city:e.target.value})),value:te.city,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-location",children:"State"}),(0,w.jsx)(u.A,{fullWidth:!0,id:"personal-location",placeholder:"State",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{state:e.target.value})),value:te.state,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-zipcode",children:"Post Code"}),(0,w.jsx)(u.A,{fullWidth:!0,type:"number",id:"personal-zipcode",placeholder:"Zipcode",onChange:e=>ae((0,o.A)((0,o.A)({},te),{},{postcode:e.target.value})),value:te.postcode,autoComplete:"off"})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsxs)(r.A,{spacing:1.25,children:[(0,w.jsx)(p.A,{htmlFor:"personal-email",children:"Landmark"}),(0,w.jsx)(u.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Landmark",onChange:e=>D(e.target.value),value:R,autoComplete:"off"})]})})]})}),(0,w.jsx)(l.Ay,{item:!0,xs:12,children:(0,w.jsx)(r.A,{direction:{xs:"column",sm:"row"},justifyContent:"flex-end",alignItems:{xs:"stretch",sm:"center"},spacing:2,children:(0,w.jsx)(A.A,{variant:"contained",fullWidth:t,onClick:()=>{""===a?re("Select Applocation "):""===$?re("Select Tenant"):""===W?re("Enter Name"):""===M?re("Enter Mobile Number "):""===L?re("Enter Address "):""===te.city?re("Enter City "):""===te.state?re("Enter State "):""===te.suburb?re("Enter location "):""===te.postcode?re("Enter Post Code "):""===R?re("Enter Land Mark "):""===te.latitude?re("Invalid latitude "):""===te.longitude?re("Invaiid Longitude "):(async()=>{let e={applocationid:+a,tenantid:+$,customerid:0,configid:1,firstname:W,dialcode:"+91",contactno:M,email:N,doorno:P,address:te.address,suburb:te.suburb,city:te.city,state:te.state,postcode:te.postcode,landmark:R,latitude:oe.latitude.toString(),longitude:oe.longitude.toString(),profileimage:"",devicetype:"",deviceid:"",customertoken:"",primaryaddress:1};console.log(e),ie(!0);try{await x.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/customers/create"),e).then((e=>{console.log(e),e.data.status?((0,y.M8)(" Created Successfully ",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),le("/nearle/customers")):"Customer Already available"==e.data.message&&(0,y.M8)("Customer Already available",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),ie(!1)})).catch((e=>{console.log(e),ie(!1),(0,y.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}))}catch(t){console.log(t),ie(!1)}})()},children:"Create"})})})]})})]})}}}]); \ No newline at end of file diff --git a/build/static/js/4947.a675ba1a.chunk.js b/build/static/js/4947.a675ba1a.chunk.js new file mode 100644 index 0000000..dd50755 --- /dev/null +++ b/build/static/js/4947.a675ba1a.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4947],{13968:(e,r,t)=>{t.r(r),t.d(r,{default:()=>ze});var o=t(89379),n=t(9950),i=t(47965),l=t(44070),s=t(36256),a=t(13838),c=t(4159),d=t.n(c),x=t(36150),h=t(60010),u=t(51778),p=(t(47659),t(14857)),A=t(94118),g=t(37476),f=t(94826),m=t(52351),j=t(67562),b=t(49883),v=t(31222),y=t(35678),k=t(56311),S=t(44414);var w=t(50027),C=t(20466),W=t(96646),D=t(59212),I=t(27001),z=t(36803);const M=t.p+"static/media/aiImage.89c2ccb91a41d85031e3.png";var Y=t(63189),P=t(99324),R=t(6604),O=t(2235),F=t(41413),T=t(47223),L=t(55158),E=t(59382),N=t(28810),q=t(79046),H=t(33092),K=t(60899),_=t(77922),B=t(29925),U=t(93230),Z=t(83274),Q=t(16491),V=t(82053),X=t(1320),G=t(93038),J=t(25333),$=t(15769),ee=t(69780),re=t(9213),te=t(21671),oe=t(34075),ne=t(96583),ie=t(40033),le=t(25277),se=t(28170),ae=t(79739),ce=t(82223),de=t(74745),xe=t(81425),he=t(58691),ue=t(23787),pe=t(28429),Ae=t(90376),ge=t(54413),fe=t(36220);d().extend(fe);const me={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},je=(e,r)=>"".concat(e).concat(r),be=e=>je(e,"08"),ve=e=>je(e,"18"),ye=e=>je(e,"26"),ke=e=>je(e,"55"),Se="#662582",we=e=>(0,S.jsx)(O.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:me.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),Ce=e=>{let{color:r,selected:t,size:o=24,children:n}=e;return(0,S.jsx)(F.A,{sx:{width:o,height:o,bgcolor:t?r:ve(r),color:t?"#fff":r,transition:"background-color 0.15s, color 0.15s"},children:n})},We=()=>({"& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,"& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(ye("#662582"))},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5}}}),De={created:{label:"Created",color:"#0ea5e9",icon:v.F6S},pending:{label:"Pending",color:"#f59e0b",icon:v.tX0},processing:{label:"Processing",color:"#0ea5e9",icon:v.bfP},modified:{label:"Modified",color:"#06b6d4",icon:v.bfP},confirmed:{label:"Confirmed",color:"#10b981",icon:v.mU9},accepted:{label:"Accepted",color:"#6366f1",icon:v.mU9},delivered:{label:"Delivered",color:"#10b981",icon:v.mU9},cancelled:{label:"Cancelled",color:"#ef4444",icon:v.uDv}},Ie=[{idx:0,status:"created",label:"Created",color:Se,icon:v.F6S,countKey:"created"},{idx:1,status:"pending",label:"Pending",color:"#f59e0b",icon:v.tX0,countKey:"pending"},{idx:2,status:"delivered",label:"Delivered",color:"#10b981",icon:v.mU9,countKey:"delivered"},{idx:3,status:"cancelled",label:"Cancelled",color:"#ef4444",icon:v.uDv,countKey:"cancelled"}],ze=()=>{const e=(0,p.A)(),r=(0,T.A)(e.breakpoints.down("md")),t=(0,pe.Zp)(),c=(0,n.useRef)(),fe=(0,n.useRef)(),je=(0,n.useRef)(null),ze=(0,n.useRef)(null),[Me,Ye]=(0,n.useState)(0),[Pe,Re]=(0,n.useState)("All"),[Oe,Fe]=(0,n.useState)(!1),[Te,Le]=(0,n.useState)(d()().format("YYYY-MM-DD")),[Ee,Ne]=(0,n.useState)(d()().format("YYYY-MM-DD")),[qe,He]=(0,n.useState)("Today"),[Ke,_e]=(0,n.useState)(!1),[Be,Ue]=(0,n.useState)(0),[Ze,Qe]=(0,n.useState)("created"),[Ve,Xe]=(0,n.useState)(!1),[Ge,Je]=(0,n.useState)(!1),[$e,er]=(0,n.useState)(!1),[rr,tr]=(0,n.useState)(null),[or,nr]=(0,n.useState)(null),[ir,lr]=(0,n.useState)(""),[sr,ar]=(0,n.useState)(0),[cr,dr]=(0,n.useState)(null),[xr,hr]=(0,n.useState)(0),[ur,pr]=(0,n.useState)(0),[Ar,gr]=(0,n.useState)(""),[fr,mr]=(0,n.useState)(""),[jr,br]=(0,n.useState)(!1),[vr,yr]=(0,n.useState)(!1),[kr,Sr]=(0,n.useState)(null),[wr,Cr]=(0,n.useState)(null),[Wr,Dr]=(0,n.useState)(!1),[Ir,zr]=(0,n.useState)(!1),[Mr,Yr]=(0,n.useState)(!1),[Pr,Rr]=(0,n.useState)(null),[Or,Fr]=(0,n.useState)([]),[Tr,Lr]=(0,n.useState)([]),[Er,Nr]=(0,n.useState)(null),[qr,Hr]=(0,n.useState)(null),[Kr]=(0,n.useState)(0),[_r,Br]=(0,n.useState)([]),[Ur,Zr]=(0,n.useState)([]),Qr=(0,n.useRef)(0),Vr=(0,n.useRef)(null),[Xr,Gr]=(0,n.useState)(null),[Jr,$r]=(0,n.useState)([]);(0,n.useEffect)((()=>{hr(0),Sr(null),pr(0),Cr(null)}),[Me]),(0,n.useEffect)((()=>{pr(0),Cr(null)}),[xr]),(0,n.useEffect)((()=>{const e=Ur.map((e=>({zone_name:e.zone_name,ordernotes:e.ordernotes,rider:e.rider,step:e.step,ordertype:e.ordertype,orderamount:e.orderamount,riderkms:e.riderkms,cumulativekms:e.cumulativekms,baseprice:e.baseprice,minkm:e.minkm,priceperkm:e.priceperkm,kms:e.kms,actualkms:e.actualkms,rider_charge:e.rider_charge,deliveryamt:e.deliveryamt,deliverycharges:e.deliverycharges,profit:e.profit})));Br(e),console.log("csvExportData",e)}),[Ur]),(0,n.useEffect)((()=>{if(null===Tr||void 0===Tr||!Tr.length)return;const e=Tr.map((e=>{const r=Number(e.cumulativekms||0),t=Number(e.minkm||0),n=Number(e.baseprice||0),i=Number(e.priceperkm||0);return r<=t?(0,o.A)((0,o.A)({},e),{},{deliveryamt:n}):(0,o.A)((0,o.A)({},e),{},{deliveryamt:(r-t)*i+n})}));Zr(e),console.log("finaldeliveryList",e)}),[Tr]);const{data:et,isLoading:rt,isError:tt,error:ot,refetch:nt}=(0,x.I)({queryKey:["percentageData",Me],queryFn:()=>(0,xe.jy)(Me),enabled:!0}),{data:it,isLoading:lt,isError:st,error:at}=(0,x.I)({queryKey:["tenantlist",Me],queryFn:()=>(0,xe.Mn)(Me),enabled:0!==Me}),{data:ct,isLoading:dt,isError:xt,error:ht}=(0,x.I)({queryKey:["gettenantlocations",xr],queryFn:()=>(0,xe.DL)(xr),enabled:0!==xr}),{data:ut=[],isLoading:pt}=(0,x.I)({queryKey:["paymentmodes"],queryFn:xe.HY}),{data:At=[],isLoading:gt}=(0,x.I)({queryKey:["ridersList",Me],queryFn:xe.Sd,enabled:0!==Me}),{data:ft,isLoading:mt,isError:jt,error:bt,refetch:vt}=(0,x.I)({queryKey:["ordersCount",Me,Te,Ee,Ze,xr,ur],queryFn:xe.Hh,refetchOnMount:!0,refetchOnWindowFocus:!0}),{data:yt}=(0,x.I)({queryKey:["getallriders"],queryFn:xe.Xw,refetchOnMount:!0,refetchOnWindowFocus:!0}),{data:kt,isLoading:St,isError:wt,error:Ct,fetchNextPage:Wt,hasNextPage:Dt,isFetchingNextPage:It,refetch:zt}=(0,h.q)({queryKey:["fetchOrders",Me,Ze,fr,Te,Ee,100,xr,ur],queryFn:xe.nQ,getNextPageParam:e=>{var r;return null!==(r=e.nextPage)&&void 0!==r?r:void 0},refetchOnWindowFocus:!0,refetchOnMount:!0,refetchOnReconnect:!0,staleTime:0}),Mt=(null===kt||void 0===kt?void 0:kt.pages.flatMap((e=>e.rows)))||[];(0,n.useEffect)((()=>{if(!Dt)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Wt()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return c.current&&e.observe(c.current),()=>{c.current&&e.unobserve(c.current)}}),[Dt,Wt]);const Yt=(0,u.n)({mutationFn:0==Qr.current?xe.FC:xe.Yk,onSuccess:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(console.log("data",e),console.log("varialbles",r),(0,C.k)("Orders Optimised Successfully","success",2e3),vt(),zt(),Fe(!1),br(!1),0==Qr.current)Lr(null===e||void 0===e?void 0:e.details),Nr(null===e||void 0===e?void 0:e.zones),Hr(null===e||void 0===e?void 0:e.meta),Yr(!0);else{var o,n,i;Lr(null===e||void 0===e?void 0:e.details),Nr(null===e||void 0===e?void 0:e.zones),Hr(null===e||void 0===e?void 0:e.meta),Rr(e);const r=Vr.current||{};t("/nearle/dispatch/preview",{state:{dispatchPreviewData:e,aiMode:null!==(o=r.aiMode)&&void 0!==o?o:Qr.current,selectedMode:r.selectedMode||Xr,deliveryData:r.deliveryData||[],autoRiders:r.autoRiders||yt||[],absentRidersPayload:r.absentRidersPayload||[],rider:r.rider||rr,appId:null!==(n=r.appId)&&void 0!==n?n:Me,tenantId:null!==(i=r.tenantid)&&void 0!==i?i:xr,startdate:Te}})}},onError:e=>{(0,C.k)(e.message,"error",4e3),br(!1),Fe(!1)},onSettled:()=>{Et(),Fe(!1),br(!1),yr(!1)}}),Pt=(0,u.n)({mutationFn:xe.H2,onMutate:()=>{yr(!0)},onSuccess:e=>{console.log("create data",e),(0,C.k)("Delivery Created Successfully","success",2e3),t("/nearle/deliveries"),Ft.mutate(null===rr||void 0===rr?void 0:rr.userfcmtoken)},onError:e=>{(0,C.k)(e.message,"error",4e3)},onSettled:()=>{yr(!1)}}),Rt=(0,u.n)({mutationFn:xe.N4,onSuccess:e=>{e.status&&(Xe(!1),(0,C.k)("Order Cancelled Successfully","success",2e3),vt(),nt())},onError:e=>{(0,C.k)(e.message,"error",2e3)}}),Ot=(0,u.n)({mutationFn:xe.zR,onSuccess:e=>{e.status&&(er(!1),(0,C.k)("Order Cancelled Successfully","success",2e3),zt(),vt(),nt(),Fr([]))},onError:e=>{(0,C.k)(e.message,"error",2e3)}}),Ft=(0,u.n)({mutationFn:xe.k3,onSuccess:()=>{(0,C.k)("Notification sent Successfully","success",2e3)},onError:e=>{(0,C.k)(e.message,"error",2e3)}}),Tt=async e=>{yr(!0),Fe(!0);const r=Or.map((e=>(0,o.A)((0,o.A)({},e),{},{deliveryid:0,deliverydate:d()(e.deliverydate).utc().format("YYYY-MM-DD HH:mm:ss"),assigntime:d()().format("YYYY-MM-DD HH:mm:ss"),orderstatus:"pending",orderamount:e.deliverycharge,droplat:e.deliverylat,droplon:e.deliverylong,pickuplat:e.pickuplat,pickuplon:e.pickuplong,ordernotes:e.ordernotes,deliverycharges:e.deliverycharge,pickuplocation:e.pickupsuburb,deliverylocation:e.deliverysuburb})));console.log("deliveryData",r);const t=(Jr||[]).map((e=>({userid:e.userid,username:"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||e.username||"Rider ".concat(e.userid)})));Vr.current={deliveryData:r,absentRidersPayload:t,autoRiders:yt,selectedMode:Xr,aiMode:Qr.current,rider:rr,appId:Me,tenantid:xr},0==Qr.current?Yt.mutate({deliveries:r}):Xr&&1==(null===Xr||void 0===Xr?void 0:Xr.value)?Yt.mutate({deliveries:1==Xr.value?r:{body:r},hypertuning_params:e||null,selectedMode:Xr,absent_riders:t}):Yt.mutate({data:{orders:r,riders:yt,config:{pay_type:"hourly",base_pay:300,strategy:"multi_trip"},absent_riders:t},selectedMode:Xr})},Lt=(0,u.n)({mutationFn:xe.H2,onSuccess:(e,r)=>{console.log("data",e),console.log("varialbles",r),(0,C.k)("Delivery Created Successfully","success",2e3),yr(!1),t("/nearle/deliveries")},onError:e=>{(0,C.k)(e.message,"error",4e3)},onSettled:()=>{yr(!1)}}),Et=()=>{Je(!1),tr(null),nr(null),Gr(null),$r([])},Nt=tt?"Error fetching percentages: ".concat(null===ot||void 0===ot?void 0:ot.message):jt?"Error fetching orders Count: ".concat(null===bt||void 0===bt?void 0:bt.message):wt?"Error fetching orders : ".concat(null===Ct||void 0===Ct?void 0:Ct.message):st?"Error Fetching on Tenants:".concat(null===at||void 0===at?void 0:at.message," "):xt?"Error Fetching on Tenants Locations:".concat(null===ht||void 0===ht?void 0:ht.message," "):null;return(0,n.useEffect)((()=>{Nt&&(console.log(Nt),(0,C.k)(Nt,"error",3e3))}),[Nt]),(0,S.jsxs)(n.Fragment,{children:[(rt||mt||St||lt||dt||jr)&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(m.A,{}),(0,S.jsx)(f.A,{})]}),(0,S.jsx)(L.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:jr||St,children:(0,S.jsx)(f.A,{color:"inherit"})}),(0,S.jsx)(L.A,{sx:{zIndex:1e3},open:Wr}),Or.length>0&&(0,S.jsxs)(E.A,{ariaLabel:"Actions",icon:(0,S.jsx)(N.A,{badgeContent:(null===Or||void 0===Or?void 0:Or.length)||"",color:"secondary",children:(0,S.jsx)(q.A,{})}),open:Wr,onOpen:()=>Dr(!0),onClose:()=>Dr(!1),sx:{position:"fixed",bottom:52,right:16,"& .MuiFab-primary":{bgcolor:"#7b1fa2",color:"#fff","&:hover":{bgcolor:"#6a1b9a"},width:64,height:64}},children:[(0,S.jsx)(H.A,{icon:(0,S.jsx)("img",{src:M,alt:"Assign",style:{width:38,height:38,objectFit:"contain",borderRadius:50}}),tooltipTitle:" Optimisation",FabProps:{sx:{bgcolor:"primary.main",color:"#fff","&:hover":{bgcolor:"primary.dark"},width:64,height:64}},onClick:()=>{Qr.current=1,Dr(!1),Je(!0)}}),(0,S.jsx)(H.A,{icon:(0,S.jsx)(i.A,{style:{fontSize:22}}),tooltipTitle:"Manual Assign",FabProps:{sx:{bgcolor:"success.600",color:"#fff","&:hover":{bgcolor:"success.dark"},width:64,height:64}},onClick:()=>{Qr.current=0,Dr(!1),Je(!0)}}),(0,S.jsx)(H.A,{icon:(0,S.jsx)(l.A,{style:{fontSize:22}}),tooltipTitle:"Delete",FabProps:{sx:{bgcolor:"#d32f2f",color:"#fff","&:hover":{bgcolor:"#9a0007"},width:64,height:64}},onClick:()=>{Dr(!1),er(!0)}})]}),(0,S.jsx)(I.A,{title:"Orders",subtitle:"Live \xb7 ".concat(Pe||"All Zones"," \xb7 ").concat(qe),live:!0,action:(0,S.jsx)(D.A,{ref:je,locaName:Pe,setAppId:Ye,setLocoName:Re,setPage:ar,pill:!0,accentColor:Se,icon:(0,S.jsx)(v.HPi,{size:14}),placeholder:"Select Zone",paperComponent:we,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,S.jsx)(K.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:[{key:"created",label:"Created Orders",color:"#662582",icon:v.AdO,value:null===et||void 0===et?void 0:et.created,percentage:null===et||void 0===et?void 0:et.percentage1},{key:"pending",label:"Pending Orders",color:"#f59e0b",icon:v.G6c,value:null===et||void 0===et?void 0:et.uncoveredOrders,percentage:null===et||void 0===et?void 0:et.percentage2},{key:"delivered",label:"Delivered Orders",color:"#10b981",icon:v.cAP,value:null===et||void 0===et?void 0:et.coveredOrders,percentage:null===et||void 0===et?void 0:et.percentage3},{key:"cancelled",label:"Cancelled Orders",color:"#ef4444",icon:v.qiG,value:null===et||void 0===et?void 0:et.cancelled,percentage:null===et||void 0===et?void 0:et.percentage4}].map((e=>{var r;const t=e.icon;return(0,S.jsx)(K.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,S.jsx)(z.A,{title:e.label,value:null!==(r=e.value)&&void 0!==r?r:0,icon:(0,S.jsx)(t,{size:20}),color:e.color,loading:rt,caption:null!=e.percentage?"".concat(e.percentage,"% of total"):void 0})},e.key)}))}),(0,S.jsxs)(O.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1.25,md:1.75},borderRadius:me.radiusCard/8,border:"1px solid",borderColor:me.borderSubtle,background:"#fff",boxShadow:me.shadowSoft},children:[(0,S.jsxs)(K.Ay,{container:!0,spacing:1.25,alignItems:"center",children:[(0,S.jsx)(K.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,S.jsx)(_.A,{options:it||[],value:kr,getOptionLabel:e=>(null===e||void 0===e?void 0:e.tenantname)||"",PaperComponent:we,onOpen:e=>{Me||(e.preventDefault(),(0,C.k)("Please select location first!","warning",3e3),setTimeout((()=>{var e;null===(e=je.current)||void 0===e||e.focus()}),0))},onChange:(e,r,t)=>{"clear"===t?(hr(0),Sr(null),pr(0),Cr(null)):(hr((null===r||void 0===r?void 0:r.tenantid)||0),Sr(r),pr(0),Cr(null))},renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{inputRef:ze,placeholder:"Select Tenant",size:"small",sx:We(),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,S.jsx)(U.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,S.jsx)(Ce,{color:"#94a3b8",size:22,children:(0,S.jsx)(v.Itr,{size:13})})})})}))})}),(0,S.jsx)(K.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,S.jsx)(_.A,{options:ct||[],getOptionLabel:e=>e?"".concat(e.locationname," (").concat(e.suburb,")"):"",value:wr,PaperComponent:we,onOpen:e=>{Me||xr?xr||(e.preventDefault(),(0,C.k)("Please select Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=ze.current)||void 0===e||e.focus()}),0)):(e.preventDefault(),(0,C.k)("Please select a your Location and Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=je.current)||void 0===e||e.focus()}),0))},onChange:(e,r,t)=>{"clear"===t?(pr(0),Cr(null)):(pr(r.locationid||0),Cr(r))},renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Location",size:"small",sx:We(),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,S.jsx)(U.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,S.jsx)(Ce,{color:"#94a3b8",size:22,children:(0,S.jsx)(v.JFD,{size:13})})})})}))})}),(0,S.jsx)(K.Ay,{item:!0,xs:12,sm:12,md:4,children:(0,S.jsxs)(U.A,{direction:"row",spacing:1,alignItems:"center",justifyContent:{xs:"flex-start",md:"flex-end"},flexWrap:"wrap",children:[(0,S.jsx)(Z.A,{title:"Date Filter",placement:"top",children:(0,S.jsxs)(Q.A,{onClick:()=>_e(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.5,py:.875,borderRadius:"10px",cursor:"pointer",bgcolor:"#ffffff",border:"1px solid #e2e8f0",color:"#475569",fontWeight:600,fontSize:12,transition:"border-color 0.15s, box-shadow 0.15s","&:hover":{borderColor:"#cbd5e1"},"& svg":{color:"#94a3b8"}},children:[(0,S.jsx)(v.Ki0,{size:15}),d()(Te).format("DD/MM/YY")," \u2013 ",d()(Ee).format("DD/MM/YY")]})}),(0,S.jsx)(Q.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:"8px",bgcolor:"#f1f5f9",color:"#64748b",fontSize:11,fontWeight:600},children:qe})]})})]}),(0,S.jsx)(y.A,{open:Ke,onClose:()=>_e(!1),onSelect:e=>{Le(e.startDate),Ne(e.endDate),He(e.label),console.log("Selected Date Range:",e)}})]}),(0,S.jsx)(O.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:me.radiusCard/8,borderTopRightRadius:me.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:me.borderSubtle,borderBottom:0,background:"#fff"},children:(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,S.jsx)(U.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:me.borderSubtle,borderRadius:4}},children:Ie.map((e=>{var r;const t=e.icon,o=Be===e.idx,n=null!==(r=null===ft||void 0===ft?void 0:ft[e.countKey])&&void 0!==r?r:0;return(0,S.jsxs)(Q.A,{onClick:r=>{return t=e.idx,ar(0),Ue(t),0===t&&Qe("created"),1===t&&Qe("pending"),2===t&&Qe("delivered"),3===t&&Qe("cancelled"),void gr("");var t},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:me.radiusField+"px",border:"1px solid ".concat(o?e.color:me.borderSubtle),bgcolor:o?e.color:me.surface,color:o?"#fff":me.textSecondary,fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:o?e.color:me.borderHover,bgcolor:o?e.color:me.surfaceAlt}},children:[(0,S.jsx)(F.A,{sx:{width:{xs:20,md:22},height:{xs:20,md:22},bgcolor:o?"rgba(255,255,255,0.22)":ve(e.color),color:o?"#fff":e.color},children:(0,S.jsx)(t,{size:12})}),(0,S.jsx)(V.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:e.label}),(0,S.jsx)(Q.A,{sx:{minWidth:{xs:20,md:24},height:{xs:18,md:20},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:o?"rgba(255,255,255,0.22)":me.surfaceAlt,color:o?"#fff":me.textSecondary,border:"none"},children:n})]},e.status)}))}),(0,S.jsx)(Q.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,S.jsx)(k.A,{value:Ar,onChange:gr,onDebouncedChange:mr,placeholder:"Search orders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:be(Se),"& fieldset":{borderColor:ke(Se),borderWidth:1.5},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(ye(Se))}}})})]})}),(0,S.jsx)(O.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:me.radiusCard/8,borderBottomRightRadius:me.radiusCard/8,border:"1px solid",borderColor:me.borderSubtle,overflow:"hidden",background:"#fff"},children:(0,S.jsx)(X.A,{ref:fe,onScroll:e=>{const{scrollTop:r,scrollHeight:t,clientHeight:o}=e.currentTarget;r+o>=t-50&&Dt&&!It&&Wt()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},overflow:"auto","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:ke(Se),borderRadius:8,"&:hover":{backgroundColor:Se}},"&::-webkit-scrollbar-track":{backgroundColor:me.surfaceAlt}},children:r?(0,S.jsxs)(ue.nV,{sx:{p:1.25},children:[0===(null===Mt||void 0===Mt?void 0:Mt.length)&&!St&&(0,S.jsxs)(U.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,S.jsx)(F.A,{sx:{width:64,height:64,bgcolor:ve("#94a3b8"),color:me.textMuted},children:(0,S.jsx)(v.F6S,{size:28})}),(0,S.jsxs)(V.A,{variant:"subtitle1",sx:{fontWeight:700,color:me.textPrimary},children:["No ",Ze," orders"]}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary,textAlign:"center",px:2},children:Ar?"Try a different keyword.":"Adjust the filters above to load orders."})]}),St&&(0,S.jsxs)(U.A,{alignItems:"center",sx:{py:6},children:[(0,S.jsx)(he.A,{}),(0,S.jsx)(V.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading orders\u2026"})]}),null===Mt||void 0===Mt?void 0:Mt.map(((r,t)=>{const n=!!Or.find((e=>e.orderheaderid===r.orderheaderid)),i=De[String(r.orderstatus||"").toLowerCase()]||{label:r.orderstatus||"\u2014",color:Se,icon:v.bfP},l=i.icon;return(0,S.jsx)(ue.pg,{accent:i.color,selected:n,header:(0,S.jsxs)(U.A,{spacing:1.25,children:[(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:["created"===Ze&&(0,S.jsx)(G.A,{size:"small",sx:{p:.25,color:ke(Se),"&.Mui-checked":{color:Se}},onChange:e=>{var t;if(!Me)return(0,C.k)("Please select a location first!","warning",2e3),void(null===(t=je.current)||void 0===t||t.focus());e.target.checked?Fr((e=>[...e,(0,o.A)((0,o.A)({},r),{},{sno:e.length+1})])):Fr((e=>e.filter((e=>e.orderheaderid!==r.orderheaderid)).map(((e,r)=>(0,o.A)((0,o.A)({},e),{},{sno:r+1})))))},checked:n}),(0,S.jsx)(V.A,{variant:"caption",sx:{fontWeight:700,color:me.textMuted},children:String(100*sr+t+1).padStart(2,"0")}),(0,S.jsxs)(Q.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:be(i.color),border:"1px solid ".concat(ke(i.color)),color:i.color,fontSize:10.5,fontWeight:800,whiteSpace:"nowrap"},children:[(0,S.jsx)(l,{size:11})," ",i.label]})]}),"created"===r.orderstatus&&(0,S.jsxs)(U.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:["C"===r.deliverytype&&(0,S.jsx)(J.A,{size:"small",onClick:()=>{(null===cr||void 0===cr?void 0:cr.orderid)===r.orderid?dr(null):dr(r)},sx:{borderRadius:999,bgcolor:be("#06b6d4"),color:"#06b6d4",border:"1px solid ".concat(ke("#06b6d4")),"&:hover":{bgcolor:ve("#06b6d4")}},children:(null===cr||void 0===cr?void 0:cr.orderid)===r.orderid?(0,S.jsx)(j.A,{fontSize:"small"}):(0,S.jsx)(b.A,{fontSize:"small"})}),(0,S.jsx)(J.A,{size:"small",disabled:n,onClick:()=>{Xe(!0),lr(r.orderheaderid)},sx:{borderRadius:999,bgcolor:be("#ef4444"),color:"#ef4444",border:"1px solid ".concat(ke("#ef4444")),"&:hover":{bgcolor:ve("#ef4444")},"&.Mui-disabled":{color:e.palette.secondary.main}},children:(0,S.jsx)(A.A,{})})]})]}),(0,S.jsxs)(Q.A,{sx:{minWidth:0},children:[(0,S.jsx)(V.A,{sx:{fontWeight:800,color:me.textPrimary,fontSize:15},noWrap:!0,children:r.tenantname}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},noWrap:!0,children:[r.tenantsuburb,r.applocation].filter(Boolean).join(" \xb7 ")||"\u2014"})]})]}),children:(0,S.jsxs)(ue.FG,{children:[(0,S.jsxs)(ue.pY,{label:"Order / Location",full:!0,children:[(0,S.jsx)(V.A,{sx:{fontSize:13,fontWeight:600,color:me.textPrimary},noWrap:!0,children:"".concat(r.locationname,"-(").concat(r.locationsuburb,")")}),(0,S.jsxs)(V.A,{variant:"caption",sx:{color:me.textSecondary},children:[r.orderid," \xb7 ",d()(r.pickupslot).utc().format("DD/MM/YYYY")," ",d()(r.pickupslot).format("hh:mm A")]})]}),(0,S.jsxs)(ue.pY,{label:"Pickup",children:[(0,S.jsx)(V.A,{sx:{fontSize:13,fontWeight:600,color:me.textPrimary},noWrap:!0,children:r.pickupcustomer||"\u2014"}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},noWrap:!0,children:r.pickupcontactno}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},noWrap:!0,children:r.pickupsuburb||r.pickupaddress})]}),(0,S.jsxs)(ue.pY,{label:"Drop",children:[(0,S.jsx)(V.A,{sx:{fontSize:13,fontWeight:600,color:me.textPrimary},noWrap:!0,children:r.deliverycustomer||"\u2014"}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},noWrap:!0,children:r.deliverycontactno}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},noWrap:!0,children:r.deliverysuburb||r.deliveryaddress})]}),(0,S.jsx)(ue.pY,{label:"Qty",value:r.quantity||"\u2014"}),(0,S.jsx)(ue.pY,{label:"KMS",children:(0,S.jsxs)(Q.A,{sx:(s="#06b6d4",{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.25,borderRadius:999,bgcolor:be(s),color:s,fontWeight:700,fontSize:11,border:"1px solid ".concat(ke(s)),whiteSpace:"nowrap"}),children:[r.kms||0," km"]})}),(0,S.jsx)(ue.pY,{label:"COD",children:(0,S.jsx)(V.A,{sx:{fontSize:13,fontWeight:800,color:r.collectionamt?"#ef4444":me.textMuted},children:r.collectionamt?"\u20b9 ".concat(r.collectionamt.toFixed(2)):"\u2014"})}),(0,S.jsx)(ue.pY,{label:"Charges",children:(0,S.jsx)(V.A,{sx:{fontSize:13,fontWeight:800,color:r.deliverycharge?"#ef4444":me.textMuted},children:r.deliverycharge?"\u20b9 ".concat(r.deliverycharge.toFixed(2)):"\u2014"})}),r.ordernotes&&(0,S.jsx)(ue.pY,{label:"Notes",full:!0,children:(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},children:r.ordernotes})})]})},r.sno);var s})),0!=(null===Mt||void 0===Mt?void 0:Mt.length)&&(0,S.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:It||Dt?(0,S.jsx)(he.A,{}):(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textMuted,fontWeight:600},children:"No more orders"})})]}):(0,S.jsxs)($.A,{stickyHeader:!0,sx:{minWidth:{xs:960,md:1180}},children:[(0,S.jsx)(ee.A,{children:(0,S.jsxs)(re.A,{sx:{"& th":{backgroundColor:me.surfaceAlt,color:me.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(me.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:1.5}}},children:["created"==Ze&&(0,S.jsx)(te.A,{sx:{position:"sticky !important"},children:(0,S.jsx)(G.A,{size:"small",sx:{p:.5,color:ke(Se),"&.Mui-checked, &.MuiCheckbox-indeterminate":{color:Se}},indeterminate:Or.length>0&&Or.length!==(null===Mt||void 0===Mt?void 0:Mt.length),checked:Or.length===(null===Mt||void 0===Mt?void 0:Mt.length),onChange:e=>{var r;if(!Me)return(0,C.k)("Please select a location first!","warning",2e3),void(null===(r=je.current)||void 0===r||r.focus());if(e.target.checked){const e=null===Mt||void 0===Mt?void 0:Mt.map(((e,r)=>(0,o.A)((0,o.A)({},e),{},{sno:r+1})));Fr(e)}else Fr([])}})}),(0,S.jsx)(te.A,{children:"#"}),(0,S.jsx)(te.A,{children:"Tenant"}),(0,S.jsx)(te.A,{children:"Location"}),(0,S.jsx)(te.A,{children:"Pickup"}),(0,S.jsx)(te.A,{children:"Drop"}),(0,S.jsx)(te.A,{align:"center",children:"QTY"}),(0,S.jsx)(te.A,{align:"right",children:"COD"}),(0,S.jsx)(te.A,{align:"center",children:"KMS"}),(0,S.jsx)(te.A,{align:"right",children:"Charges"}),(0,S.jsx)(te.A,{children:"Notes"}),(0,S.jsx)(te.A,{children:"Status"}),"created"==Ze&&(0,S.jsx)(te.A,{align:"right",children:"Actions"})]})}),(0,S.jsxs)(oe.A,{children:[0===(null===Mt||void 0===Mt?void 0:Mt.length)&&!St&&(0,S.jsx)(re.A,{children:(0,S.jsx)(te.A,{colSpan:13,sx:{py:6},children:(0,S.jsxs)(U.A,{alignItems:"center",spacing:1.5,children:[(0,S.jsx)(F.A,{sx:{width:64,height:64,bgcolor:ve("#94a3b8"),color:me.textMuted},children:(0,S.jsx)(v.F6S,{size:28})}),(0,S.jsxs)(V.A,{variant:"subtitle1",sx:{fontWeight:700,color:me.textPrimary},children:["No ",Ze," orders"]}),(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textSecondary},children:Ar?"Try a different keyword.":"Adjust the filters above to load orders."})]})})}),St&&(0,S.jsx)(W.r,{col:8}),null===Mt||void 0===Mt?void 0:Mt.map(((r,t)=>{const n=!!Or.find((e=>e.orderheaderid===r.orderheaderid));return(0,S.jsxs)(re.A,{role:"checkbox",tabIndex:-1,sx:{cursor:"pointer",transition:"background-color 0.15s",backgroundColor:n?be(Se):"transparent","& td":{borderBottom:"1px solid ".concat(me.divider),py:{xs:1,md:1.25},px:{xs:1,md:1.5}},"&:hover":{backgroundColor:n?ve(Se)+" !important":me.surfaceAlt}},children:["created"===Ze&&(0,S.jsx)(te.A,{children:(0,S.jsx)(G.A,{size:"small",sx:{p:.5,color:ke(Se),"&.Mui-checked":{color:Se}},onChange:e=>{var t;if(!Me)return(0,C.k)("Please select a location first!","warning",2e3),void(null===(t=je.current)||void 0===t||t.focus());e.target.checked?Fr((e=>[...e,(0,o.A)((0,o.A)({},r),{},{sno:e.length+1})])):Fr((e=>e.filter((e=>e.orderheaderid!==r.orderheaderid)).map(((e,r)=>(0,o.A)((0,o.A)({},e),{},{sno:r+1})))))},checked:n})}),(0,S.jsx)(te.A,{children:(0,S.jsx)(V.A,{children:100*sr+t+1})}),(0,S.jsx)(te.A,{children:(0,S.jsxs)(Z.A,{title:r.tenantaddress,children:[(0,S.jsx)(V.A,{variant:"subtitle1",noWrap:!0,children:r.tenantname}),(0,S.jsxs)(V.A,{noWrap:!0,variant:"body2",children:[r.tenantsuburb,(0,S.jsx)("br",{})]}),(0,S.jsx)(V.A,{noWrap:!0,variant:"body2",children:r.applocation})]})}),(0,S.jsxs)(te.A,{align:"left",children:[(0,S.jsx)(V.A,{variant:"subtitle1",noWrap:!0,children:"".concat(r.locationname,"-(").concat(r.locationsuburb,")")}),(0,S.jsx)(Z.A,{title:"TenantId - OrderId",children:(0,S.jsx)(V.A,{variant:"body2",noWrap:!0,children:r.orderid})}),(0,S.jsx)(Z.A,{title:"Pickup Slot",children:(0,S.jsxs)(V.A,{noWrap:!0,sx:{fontSize:"12px"},children:[d()(r.pickupslot).utc().format("DD/MM/YYYY")," ",d()(r.pickupslot).format("hh:mm A")]})})]}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:r.pickupcustomer}),(0,S.jsx)(V.A,{variant:"caption",children:r.pickupcontactno}),(0,S.jsx)(Z.A,{title:r.pickupaddress,children:(0,S.jsx)(V.A,{variant:"caption",children:"".concat(r.pickupsuburb||r.pickupaddress.slice(0,12)+".....")})})]})}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"subtitle1",sx:{maxWidth:120,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.deliverycustomer}),(0,S.jsx)(V.A,{variant:"caption",children:r.deliverycontactno}),(0,S.jsx)(Z.A,{title:r.deliveryaddress,sx:{whiteSpace:"nowrap"},children:(0,S.jsx)(V.A,{variant:"caption",children:"".concat(r.deliverysuburb||r.deliveryaddress.slice(0,12)+".....")})})]})}),(0,S.jsx)(te.A,{align:"center",children:r.quantity?(0,S.jsx)(V.A,{variant:"subtitle1",color:"error",sx:{whiteSpace:"nowrap"},children:r.quantity}):(0,S.jsx)(V.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:r.quantity})}),(0,S.jsx)(te.A,{align:"right",children:r.collectionamt?(0,S.jsxs)(V.A,{variant:"subtitle1",color:r.collectionamt?"error":null,sx:{whiteSpace:"nowrap"},children:["\u20b9",r.collectionamt.toFixed(2)]}):(0,S.jsxs)(V.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:["\u20b9",r.collectionamt.toFixed(2)]})}),(0,S.jsx)(te.A,{align:"center",children:(0,S.jsx)(V.A,{variant:"subtitle1",color:r.kms?"error":null,children:r.kms})}),(0,S.jsx)(te.A,{align:"right",children:r.deliverycharge?(0,S.jsxs)(V.A,{variant:"subtitle1",color:r.deliverycharge?"error":null,sx:{whiteSpace:"nowrap"},children:["\u20b9",r.deliverycharge.toFixed(2)]}):(0,S.jsxs)(V.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:["\u20b9",r.deliverycharge.toFixed(2)]})}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsx)(V.A,{variant:"body1",fontSize:"12px",sx:{maxWidth:120,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.ordernotes})}),(0,S.jsx)(te.A,{align:"left",children:(()=>{const e=De[String(r.orderstatus||"").toLowerCase()]||{label:r.orderstatus||"\u2014",color:Se,icon:v.bfP},t=e.icon;return(0,S.jsxs)(Q.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:be(e.color),border:"1px solid ".concat(ke(e.color)),color:e.color,fontSize:11,fontWeight:800,whiteSpace:"nowrap"},children:[(0,S.jsx)(t,{size:12})," ",e.label]})})()}),"created"===r.orderstatus&&(0,S.jsx)(te.A,{align:"center",children:(0,S.jsxs)(U.A,{flexDirection:"row",justifyContent:"end",children:["C"===r.deliverytype&&(0,S.jsx)(Z.A,{title:"Product details",children:(0,S.jsx)(J.A,{color:"primary",onClick:()=>{(null===cr||void 0===cr?void 0:cr.orderid)===r.orderid?dr(null):dr(r)},children:(null===cr||void 0===cr?void 0:cr.orderid)===r.orderid?(0,S.jsx)(j.A,{}):(0,S.jsx)(b.A,{})})}),(0,S.jsx)(Z.A,{title:"To Cancel",children:(0,S.jsx)(J.A,{"aria-describedby":"aria-".concat(r.sno),disabled:n,onClick:()=>{Xe(!0),lr(r.orderheaderid)},children:(0,S.jsx)(A.A,{style:{color:n?e.palette.secondary.main:e.palette.error.main}})})})]})})]},r.sno)})),0!=(null===Mt||void 0===Mt?void 0:Mt.length)&&(0,S.jsx)(re.A,{children:(0,S.jsx)(te.A,{colSpan:15,rowSpan:3,sx:{borderBottom:"none"},children:(0,S.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:It||Dt?(0,S.jsx)(he.A,{}):(0,S.jsx)(V.A,{variant:"caption",sx:{color:me.textMuted,fontWeight:600},children:"No more orders"})})})})]})]})})}),(0,S.jsxs)(ne.A,{fullScreen:!0,open:Ge,TransitionComponent:g.s,children:[(0,S.jsx)(L.A,{sx:{position:"absolute",color:"#fff",zIndex:e=>e.zIndex.modal+1},open:jr,children:(0,S.jsx)(f.A,{color:"inherit",text:"Optimising ... .."})}),(0,S.jsx)(ie.A,{sx:{bgcolor:e.palette.primary.lighter},children:(0,S.jsx)(N.A,{badgeContent:null===Or||void 0===Or?void 0:Or.length,color:"primary",children:(0,S.jsx)(le.A,{label:(0,S.jsx)(V.A,{variant:"h3",children:"Preview Orders "}),variant:"contained"})})}),(0,S.jsx)(se.A,{dividers:!0,children:(0,S.jsx)(w.A,{content:!1,children:(0,S.jsx)(X.A,{children:(0,S.jsxs)($.A,{stickyHeader:!0,children:[(0,S.jsx)(ee.A,{children:(0,S.jsxs)(re.A,{children:[(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"#"}),(0,S.jsxs)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:["Tenant"," "]}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"order Location"}),(0,S.jsxs)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:["Pickup"," "]}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"Delivery"}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"Notes"}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"Charges"}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"KMS"})]})}),(0,S.jsx)(oe.A,{children:Or.map(((e,r)=>(0,S.jsx)(n.Fragment,{children:(0,S.jsxs)(re.A,{sx:{},children:[(0,S.jsx)(te.A,{children:(0,S.jsxs)(V.A,{children:[" ",e.sno]})}),(0,S.jsx)(te.A,{children:(0,S.jsxs)(Z.A,{title:e.tenantaddress,children:[(0,S.jsx)(V.A,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,S.jsxs)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:[e.tenantsuburb,(0,S.jsx)("br",{})]}),(0,S.jsx)(V.A,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,S.jsxs)(te.A,{align:"left",children:[(0,S.jsx)(Z.A,{title:e.locationaddress,placement:"top",children:(0,S.jsx)(V.A,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,S.jsx)(Z.A,{title:"Order Id",children:(0,S.jsx)(V.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,S.jsxs)(U.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,S.jsxs)(Z.A,{title:"Ordered date",children:[(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.orderdate).utc().format("hh:mm A")})]}),"-",(0,S.jsxs)(Z.A,{title:"Delivery date",children:[(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.deliverydate).utc().format("hh:mm A")})]})]})]}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsx)(U.A,{direction:"row",spacing:1,children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"caption",children:e.pickupcustomer}),(0,S.jsx)(V.A,{variant:"caption",children:e.pickupcontactno}),(0,S.jsx)(Z.A,{title:e.pickupaddress,children:(0,S.jsx)(V.A,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})})}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsx)(U.A,{direction:"row",spacing:1,children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"caption",children:e.deliverycustomer}),(0,S.jsx)(V.A,{variant:"caption",children:e.deliverycontactno}),(0,S.jsx)(Z.A,{title:e.deliveryaddress,children:(0,S.jsx)(V.A,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})})}),(0,S.jsx)(te.A,{align:"left",children:e.ordernotes}),(0,S.jsxs)(te.A,{align:"left",children:["\u20b9 ",e.deliverycharge.toFixed(2)]}),(0,S.jsx)(te.A,{align:"left",children:e.kms})]})},r)))})]})})})}),(0,S.jsx)(ae.A,{sx:{bgcolor:e.palette.secondary.light},children:(0,S.jsx)(K.Ay,{container:!0,sx:{},children:(0,S.jsx)(K.Ay,{item:!0,xs:12,children:(0,S.jsxs)(U.A,{sx:{mt:2,mr:2},direction:"row",justifyContent:"flex-end",flexWrap:"wrap",gap:2,spacing:5,children:[(0,S.jsx)(ce.A,{sx:{width:"130px"},color:"secondary",variant:"contained",onClick:()=>{Et()},startIcon:(0,S.jsx)(A.A,{}),children:"Close"}),1==Qr.current&&(0,S.jsx)(_.A,{options:[{label:"Bike",value:1},{label:"Auto",value:2}],getOptionLabel:e=>e.label,value:Xr,onChange:(e,r)=>{Gr(r),console.log("Selected value:",null===r||void 0===r?void 0:r.value)},renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({sx:{width:200,border:"1px solid ",borderColor:"primary.main"}},e),{},{placeholder:"Select Transport"})),isOptionEqualToValue:(e,r)=>e.value===r.value}),1==Qr.current&&(0,S.jsx)(_.A,{multiple:!0,fullWidth:!1,options:At||[],loading:gt,disableCloseOnSelect:!0,limitTags:2,value:Jr,onChange:(e,r)=>$r(r),getOptionLabel:e=>"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"Rider #".concat(e.userid),isOptionEqualToValue:(e,r)=>e.userid===r.userid,PaperComponent:e=>(0,S.jsx)(O.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:"0 14px 40px rgba(15, 23, 42, 0.18)",border:"1px solid",borderColor:"divider",overflow:"hidden"}})),ListboxProps:{sx:{py:0,maxHeight:340}},noOptionsText:(0,S.jsxs)(U.A,{alignItems:"center",py:2,spacing:1,children:[(0,S.jsx)(v.vbW,{size:26,color:"#94a3b8"}),(0,S.jsx)(V.A,{variant:"caption",color:"text.secondary",children:"No riders to show for this location"})]}),renderTags:(e,r)=>e.map(((e,t)=>{const i="".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"Rider #".concat(e.userid),l=(i.match(/\b\w/g)||[]).slice(0,2).join("").toUpperCase()||"?",s=r({index:t});return(0,n.createElement)(le.A,(0,o.A)((0,o.A)({},s),{},{key:e.userid,size:"small",avatar:(0,S.jsx)(F.A,{sx:{bgcolor:"#fed7aa",color:"#9a3412",fontSize:10,fontWeight:800},children:l}),label:i,sx:{height:26,bgcolor:"#fff7ed",color:"#9a3412",border:"1px solid",borderColor:"#fdba74",fontWeight:600,fontSize:12,"& .MuiChip-label":{px:.75},"& .MuiChip-deleteIcon":{color:"#c2410c",fontSize:16,"&:hover":{color:"#7c2d12"}}}}))})),renderOption:(e,r,t)=>{let{selected:i}=t;const l="".concat(r.firstname||""," ").concat(r.lastname||"").trim(),s=(l.match(/\b\w/g)||[]).slice(0,2).join("").toUpperCase()||"?";return(0,n.createElement)("li",(0,o.A)((0,o.A)({},e),{},{key:r.userid,style:{display:"flex",alignItems:"center",gap:12,padding:"8px 12px",borderBottom:"1px solid #f1f5f9",backgroundColor:i?"#fff7ed":"transparent"}}),(0,S.jsx)(G.A,{size:"small",checked:i,sx:{p:.5,color:"#fb923c","&.Mui-checked":{color:"#ea580c"}}}),(0,S.jsx)(F.A,{sx:{width:34,height:34,bgcolor:i?"#fb923c":"#f1f5f9",color:i?"#fff":"#475569",fontSize:12,fontWeight:800,transition:"background-color 0.15s, color 0.15s"},children:s}),(0,S.jsxs)(U.A,{direction:"column",spacing:0,flex:1,minWidth:0,children:[(0,S.jsx)(V.A,{variant:"body2",fontWeight:700,color:"#0f172a",noWrap:!0,children:l||"Rider #".concat(r.userid)}),(0,S.jsxs)(V.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:["ID #",r.userid,r.contactno?" \xb7 ".concat(r.contactno):""]})]}),i&&(0,S.jsx)(le.A,{size:"small",label:"Absent",sx:{height:18,fontSize:9,fontWeight:800,letterSpacing:.3,bgcolor:"#ea580c",color:"#fff","& .MuiChip-label":{px:.75}}}))},renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{label:"Absent Riders",placeholder:Jr.length?"":"Pick riders unavailable today",InputLabelProps:{shrink:!0},InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25},children:[(0,S.jsx)(v.ihY,{size:18,color:"#ea580c"}),Jr.length>0&&(0,S.jsx)(le.A,{size:"small",label:Jr.length,sx:{height:18,minWidth:22,fontSize:10,fontWeight:800,bgcolor:"#ea580c",color:"#fff","& .MuiChip-label":{px:.5}}}),e.InputProps.startAdornment]})}),sx:{minWidth:300,maxWidth:440,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fffbf5",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#fdba74",borderWidth:1.5},"&:hover fieldset":{borderColor:"#fb923c"},"&.Mui-focused":{boxShadow:"0 0 0 3px rgba(251, 146, 60, 0.18)"},"&.Mui-focused fieldset":{borderColor:"#ea580c",borderWidth:2}},"& .MuiInputLabel-root":{fontWeight:700,fontSize:13,color:"#9a3412","&.Mui-focused":{color:"#9a3412"}}}})),sx:{"& .MuiAutocomplete-tag":{my:.25},"& .MuiAutocomplete-endAdornment":{right:8}}}),(0,S.jsx)(ce.A,{color:"primary",disabled:!Xr&&1==Qr.current,variant:"contained",startIcon:1==Qr.current&&(0,S.jsx)("img",{src:M,alt:"Assign",style:{width:32,height:32,objectFit:"contain",borderRadius:50}}),onClick:()=>{br(!0),Tt()},children:Oe?"Optimising...":0==Qr.current?"Optimise Orders":"AI Optimise Orders"})]})})})})]}),(0,S.jsxs)(ne.A,{fullScreen:!0,open:Mr,TransitionComponent:g.s,children:[(0,S.jsx)(ie.A,{children:(0,S.jsx)(U.A,{children:(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",spacing:1,sx:{ml:1},children:[(0,S.jsx)(Z.A,{title:"Back to orders",placement:"top",children:(0,S.jsx)(J.A,{onClick:()=>Yr(!1),sx:{backgroundColor:"action.hover",color:"text.primary","&:hover":{backgroundColor:"action.selected"}},children:(0,S.jsx)(P.eQE,{size:22})})}),(0,S.jsx)(V.A,{sx:{m:2},variant:"h3",children:"Assign Orders"})]})})}),(0,S.jsx)(de.A,{}),(0,S.jsx)(se.A,{children:(0,S.jsxs)(w.A,{content:!1,children:[(pt||gt||vr)&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(m.A,{}),(0,S.jsx)(f.A,{})]}),(0,S.jsx)(L.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:pt||gt||vr,children:(0,S.jsx)(f.A,{color:"inherit"})}),(0,S.jsx)(X.A,{children:(0,S.jsxs)($.A,{stickyHeader:!0,children:[(0,S.jsx)(ee.A,{children:(0,S.jsxs)(re.A,{sx:{backgroundColor:"red"},children:[(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"#"}),1==Kr&&(0,S.jsxs)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:["Zone"," "]}),(0,S.jsxs)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:["Tenant"," "]}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"order Location"}),(0,S.jsxs)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:["Pickup"," "]}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Delivery"}),(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Notes"}),1==Kr&&(0,S.jsx)(te.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Rider"}),(0,S.jsx)(te.A,{align:"center",sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Type"}),(0,S.jsx)(te.A,{align:"center",sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Charges"}),(0,S.jsx)(te.A,{align:"center",sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"KMS"})]})}),(0,S.jsxs)(oe.A,{children:[0==(null===Ur||void 0===Ur?void 0:Ur.length)&&(0,S.jsx)(re.A,{children:(0,S.jsx)(te.A,{colSpan:10,children:(0,S.jsx)(a.A,{})})}),null===Ur||void 0===Ur?void 0:Ur.map(((e,r)=>(0,S.jsxs)(re.A,{sx:{},children:[(0,S.jsx)(te.A,{children:(0,S.jsxs)(V.A,{children:[" ",r+1]})}),(0,S.jsx)(te.A,{children:(0,S.jsxs)(Z.A,{title:e.tenantaddress,children:[(0,S.jsx)(V.A,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,S.jsxs)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:[e.tenantsuburb,(0,S.jsx)("br",{})]}),(0,S.jsx)(V.A,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,S.jsxs)(te.A,{align:"left",children:[(0,S.jsx)(Z.A,{title:e.locationaddress,placement:"top",children:(0,S.jsx)(V.A,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,S.jsx)(Z.A,{title:"Order Id",children:(0,S.jsx)(V.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,S.jsxs)(U.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,S.jsxs)(Z.A,{title:"Ordered date",children:[(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.orderdate).utc().format("hh:mm A")})]}),"-",(0,S.jsxs)(Z.A,{title:"Delivery date",children:[(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,S.jsx)(V.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.deliverydate).utc().format("hh:mm A")})]})]})]}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsx)(U.A,{direction:"row",spacing:1,children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"caption",children:e.pickupcustomer}),(0,S.jsx)(V.A,{variant:"caption",children:e.pickupcontactno}),(0,S.jsx)(Z.A,{title:e.pickupaddress,children:(0,S.jsx)(V.A,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})})}),(0,S.jsx)(te.A,{align:"left",children:(0,S.jsx)(U.A,{direction:"row",spacing:1,children:(0,S.jsxs)(U.A,{direction:"column",children:[(0,S.jsx)(V.A,{variant:"caption",children:e.deliverycustomer}),(0,S.jsx)(V.A,{variant:"caption",children:e.deliverycontactno}),(0,S.jsx)(Z.A,{title:e.deliveryaddress,children:(0,S.jsx)(V.A,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})})}),(0,S.jsx)(te.A,{align:"left",children:e.ordernotes}),(0,S.jsx)(te.A,{align:"center",children:(0,S.jsx)(le.A,{size:"small",label:e.ordertype,color:"Economy"==e.ordertype?"success":"Risky"==e.ordertype?"error":"primary",variant:"light"})}),(0,S.jsx)(te.A,{align:"center",children:(0,S.jsxs)(U.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,S.jsx)(Z.A,{title:"Charges",placement:"top",children:(0,S.jsx)(le.A,{size:"small",label:"\u20b9 ".concat(e.deliverycharge.toFixed(2)," "),color:"error",variant:"light"})}),(0,S.jsx)(Z.A,{title:"Amount",placement:"left",children:(0,S.jsx)(le.A,{size:"small",label:"\u20b9 ".concat(e.deliveryamt.toFixed(2)," "),color:"success",variant:"light"})})]})}),(0,S.jsx)(te.A,{align:"center",children:(0,S.jsxs)(U.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,S.jsx)(Z.A,{title:"KMS",placement:"top",children:(0,S.jsx)(le.A,{size:"small",label:"".concat(e.kms," km"),color:"error",variant:"light"})}),(0,S.jsx)(Z.A,{title:"Cumulative Kms",placement:"right",children:(0,S.jsx)(le.A,{size:"small",label:"".concat(e.cumulativekms," km"),color:"success",variant:"light"})})]})})]},r)))]})]})}),(0,S.jsx)(de.A,{})]})}),(0,S.jsx)(de.A,{}),(0,S.jsxs)(ae.A,{sx:{flexDirection:"column",alignItems:"stretch",p:2,gap:2},children:[(0,S.jsxs)(K.Ay,{container:!0,spacing:2,children:[(0,S.jsx)(K.Ay,{item:!0,xs:12,sm:6,children:(0,S.jsx)(_.A,{options:ut,fullWidth:!0,renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{label:"Choose Payment"})),onChange:(e,r,t)=>{if("clear"!==t){if(r){nr(r);const e=null===Ur||void 0===Ur?void 0:Ur.map((e=>(0,o.A)((0,o.A)({},e),{},{paymenttype:r.apptypeid||42})));Zr(e)}}else nr(null)}})}),(0,S.jsx)(K.Ay,{item:!0,xs:12,sm:6,children:(0,S.jsx)(_.A,{options:At,fullWidth:!0,renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{label:"Choose Rider"})),onChange:(e,r,t)=>{if("clear"!==t){if(r){tr(r);const e=null===Ur||void 0===Ur?void 0:Ur.map((e=>(0,o.A)((0,o.A)({},e),{},{userid:r.userid,fuelcharge:r.fuelcharge||0,userfcmtoken:r.userfcmtoken})));Zr(e)}}else tr(null)}})})]}),(0,S.jsxs)(U.A,{direction:"row",spacing:2,justifyContent:"flex-end",sx:{pt:1,my:2},children:[(0,S.jsx)(ce.A,{variant:"outlined",color:"secondary",startIcon:(0,S.jsx)(Y.A,{}),onClick:()=>Yr(!1),children:"Back"}),(0,S.jsx)(ce.A,{variant:"contained",disabled:!rr||!or,onClick:()=>{null!==Ur&&void 0!==Ur&&Ur.length?Pt.mutate({deliveries:Ur}):(0,C.k)("No deliveries selected","error",3e3)},children:"Assign Orders"})]})]})]}),(0,S.jsxs)(ne.A,{open:Ir,fullScreen:!0,TransitionComponent:g.s,PaperProps:{sx:{display:"flex",flexDirection:"column",overflow:"hidden"}},children:[(0,S.jsx)(L.A,{sx:{position:"absolute",color:"#fff",zIndex:e=>e.zIndex.modal+1},open:vr,children:(0,S.jsx)(f.A,{color:"inherit"})}),(0,S.jsx)(ie.A,{sx:{py:1.25},children:(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{},children:[(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,S.jsx)(Z.A,{title:"Back to orders",placement:"top",children:(0,S.jsx)(J.A,{onClick:()=>t("/nearle/orders"),sx:{bgcolor:"action.hover","&:hover":{bgcolor:"action.selected"}},children:(0,S.jsx)(P.eQE,{size:20})})}),(0,S.jsx)(V.A,{variant:"h3",fontWeight:600,children:"Assign Orders"})]}),(0,S.jsxs)(U.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,S.jsx)(_.A,{options:[{tuneid:1,type:"Balanced",value:"balanced"},{tuneid:2,type:"Aggressive Speed",value:"aggressive_speed"},{tuneid:3,type:"Fuel Saver",value:"fuel_saver"},{tuneid:4,type:"Zone Strict",value:"zone_strict"}]||[],getOptionLabel:e=>e.type,sx:{minWidth:250,maxWidth:600,flex:1},renderInput:e=>(0,S.jsx)(B.A,(0,o.A)((0,o.A)({},e),{},{label:"Hyper Tuning"})),onChange:(e,r,t)=>{"clear"===t?Tt(null):(console.log("val",r),Tt(r.value))}}),(0,S.jsx)(ce.A,{variant:"contained",color:"primary",startIcon:(0,S.jsx)(R.UF6,{}),onClick:()=>{yr(!0),Tt("reshuffle")},children:"Re-Assign"}),(0,S.jsx)(Ae.Ay,{data:_r,filename:"Orders_Detail_".concat(d()().format("YYYY-MM-DD_HHmmss"),".csv"),label:" CSV",style:{m:1}})]})]})}),(0,S.jsx)(se.A,{sx:{p:0,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},children:Pr&&(0,S.jsx)(ge.default,{data:Pr,embedded:!0})}),(0,S.jsx)(ae.A,{sx:{px:2,py:1.25},children:(0,S.jsxs)(U.A,{direction:"row",gap:2,alignItems:"center",justifyContent:"end",children:[(0,S.jsx)(ce.A,{variant:"contained",color:"secondary",startIcon:(0,S.jsx)(Y.A,{}),onClick:()=>{zr(!1)},children:"Back"}),(0,S.jsx)(ce.A,{variant:"contained",onClick:async()=>{yr(!0),Lt.mutate({deliveries:Ur})},children:"Assign Orders"})]})})]}),(0,S.jsx)(ne.A,{open:Ve,onClose:()=>handleClose(),maxWidth:"xs",children:(0,S.jsx)(se.A,{sx:{mt:2,my:1},children:(0,S.jsxs)(U.A,{alignItems:"center",spacing:3.5,children:[(0,S.jsx)(F.A,{color:"error",sx:{width:72,height:72,fontSize:"1.75rem"},children:(0,S.jsx)(s.A,{})}),(0,S.jsx)(U.A,{spacing:2,children:(0,S.jsx)(V.A,{variant:"h4",align:"center",children:"Are you sure you want to cancel this order?"})}),(0,S.jsxs)(U.A,{direction:"row",spacing:2,sx:{width:1},children:[(0,S.jsx)(ce.A,{fullWidth:!0,color:"error",variant:"contained",onClick:()=>{Rt.mutate(ir)},autoFocus:!0,children:"Yes, Cancel"}),(0,S.jsx)(ce.A,{fullWidth:!0,onClick:()=>{Xe(!1)},color:"secondary",variant:"outlined",children:"No"})]})]})})}),(0,S.jsx)(ne.A,{open:$e,onClose:()=>er(!1),maxWidth:"xs",children:(0,S.jsx)(se.A,{sx:{mt:2,my:1},children:(0,S.jsxs)(U.A,{alignItems:"center",spacing:3.5,children:[(0,S.jsx)(F.A,{color:"error",sx:{width:72,height:72,fontSize:"1.75rem"},children:(0,S.jsx)(s.A,{})}),(0,S.jsx)(U.A,{spacing:2,children:(0,S.jsx)(V.A,{variant:"h4",align:"center",children:"Are you sure, you want to cancel multiple orders?"})}),(0,S.jsxs)(U.A,{direction:"row",spacing:2,sx:{width:1},children:[(0,S.jsx)(ce.A,{fullWidth:!0,onClick:()=>{er(!1)},color:"secondary",variant:"outlined",children:"No"}),(0,S.jsx)(ce.A,{fullWidth:!0,color:"error",variant:"contained",onClick:()=>{Ot.mutate(Or)},autoFocus:!0,children:"Yes, Cancel"})]})]})})})]})}},23787:(e,r,t)=>{t.d(r,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var o=t(89379),n=t(80045),i=t(93230),l=t(2235),s=t(16491),a=t(82053),c=t(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:r,scroll:t=!1,onScroll:l,sx:s}=e,a=(0,n.A)(e,d);return(0,c.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:l,sx:(0,o.A)((0,o.A)({p:1.5},t&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),s)},a),{},{children:r}))},h=e=>{let{accent:r="#662582",header:t,footer:n,selected:i=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:a,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?r:"#e2e8f0",background:i?"".concat(r,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(s.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:r}}),(0,c.jsxs)(s.A,{sx:{p:1.5,pl:2},children:[t,d,n]})]})},u=e=>{let{children:r,columns:t=2,sx:n}=e;return(0,c.jsx)(s.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(t,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:r})},p=e=>{let{label:r,value:t,children:o,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(s.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:r}),(0,c.jsx)(s.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==t&&void 0!==t?t:"\u2014"})})]})}},27001:(e,r,t)=>{t.d(r,{A:()=>s});var o=t(93230),n=t(16491),i=t(82053),l=t(44414);function s(e){let{title:r,subtitle:t,live:s=!1,action:a}=e;return(0,l.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(n.A,{sx:{minWidth:0},children:[(0,l.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:r}),t&&(0,l.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[s&&(0,l.jsx)(n.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:t})]})]}),a&&(0,l.jsx)(n.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},35678:(e,r,t)=>{t.d(r,{A:()=>v});var o=t(9950),n=t(96583),i=t(40033),l=t(82053),s=t(28170),a=t(93230),c=t(82223),d=t(55916),x=t(4159),h=t.n(x),u=t(56712),p=t(81417),A=t(96600),g=t(53132),f=t(94289),m=t(57326),j=t(50624),b=t(44414);const v=e=>{let{open:r,onClose:t,onSelect:x}=e;const[v,y]=(0,o.useState)(null);return(0,b.jsxs)(n.A,{open:r,onClose:t,children:[(0,b.jsx)(i.A,{align:"left",children:(0,b.jsx)(l.A,{variant:"h4",children:"Select Filter Options"})}),(0,b.jsx)(s.A,{sx:{width:"100%"},className:"datedialog",children:(0,b.jsx)(d.U,{open:r,toggle:t,id:"daterange1",onChange:e=>{y({startDate:h()(e.startDate).format("YYYY-MM-DD"),endDate:h()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,u.A)(new Date,-1),endDate:(0,u.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,u.A)(new Date,1),endDate:(0,u.A)(new Date,1)},{label:"This Week",startDate:(0,p.A)(new Date),endDate:(0,A.A)(new Date)},{label:"Last Week",startDate:(0,p.A)((0,g.A)(new Date,-1)),endDate:(0,A.A)((0,g.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,g.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,f.A)(new Date),endDate:(0,m.A)(new Date)},{label:"Last Month",startDate:(0,f.A)((0,j.A)(new Date,-1)),endDate:(0,m.A)((0,j.A)(new Date,-1))}]})}),(0,b.jsx)(a.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,b.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{v?(x(v),t()):t()},children:"OK"})})]})}},36803:(e,r,t)=>{t.d(r,{A:()=>x});var o=t(48089),n=t(50704),i=t(93230),l=t(16491),s=t(82053),a=t(82917),c=t(41413),d=t(44414);function x(e){let{title:r,value:t,icon:x,color:h="#662582",caption:u,loading:p=!1}=e;return(0,d.jsx)(o.A,{sx:{height:"100%"},children:(0,d.jsx)(n.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(s.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),p?(0,d.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(s.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),u&&(0,d.jsx)(s.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},47659:(e,r,t)=>{t.d(r,{A:()=>d});var o=t(89379),n=t(48089),i=t(50704),l=t(16491),s=t(82053),a=t(60899),c=t(44414);const d=e=>{let{primary:r,secondary:t,percentage:d,color:x,sx:h}=e;return(0,c.jsx)(n.A,{elevation:0,sx:(0,o.A)({background:x,position:"relative",color:"#fff","&:hover svg":{opacity:1,transform:"scale(1.1)"}},h),children:(0,c.jsxs)(i.A,{children:[(0,c.jsx)(l.A,{sx:{position:"absolute",right:15,top:25,color:"#fff","& svg":{width:36,height:36,opacity:.5,transition:"all .3s ease-in-out"}},children:(0,c.jsx)(s.A,{variant:"h2",color:"inherit",sx:{fontSize:{xs:20,md:25}},children:d&&"number"===typeof d?"".concat(d.toString()," %"):d})}),(0,c.jsxs)(a.Ay,{container:!0,spacing:0,children:[(0,c.jsx)(a.Ay,{item:!0,xs:12,children:(0,c.jsx)(s.A,{variant:"h3",color:"inherit",sx:{fontSize:{xs:16,md:20}},children:t})}),(0,c.jsx)(a.Ay,{item:!0,xs:12,children:(0,c.jsx)(s.A,{variant:"subtitle2",color:"inherit",children:r})})]})]})})}},56311:(e,r,t)=>{t.d(r,{A:()=>u});var o=t(89379),n=t(9950),i=t(2660),l=t(2046),s=t(83274),a=t(25333),c=t(97125),d=t(7762),x=t(52097),h=t(44414);const u=e=>{let{value:r,onChange:t,onDebouncedChange:u,debounceTime:p=500,placeholder:A="Search (ctrl+k)",sx:g}=e;const f=(0,n.useRef)(null),[m]=(0,x.d7)(r,p);return(0,n.useEffect)((()=>{u&&u(m)}),[m,u]),(0,n.useEffect)((()=>{const e=e=>{var r;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(r=f.current)||void 0===r||r.focus());"Escape"===e.key&&document.activeElement===f.current&&f.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(i.A,{sx:(0,o.A)({},g),inputRef:f,placeholder:A,autoComplete:"off",value:r,fullWidth:!0,onChange:e=>t(e.target.value),startAdornment:(0,h.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(s.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:r?"visible":"hidden"},onClick:()=>t(""),children:(0,h.jsx)(d.A,{})})})})}},58691:(e,r,t)=>{t.d(r,{A:()=>s});t(9950);var o=t(16491),n=t(46639),i=t(62217),l=t(44414);function s(e){let{size:r=70,imgSize:t=40,alt:s="loader"}=e;return(0,l.jsxs)(o.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,l.jsx)(n.A,{size:r}),(0,l.jsx)(o.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:t,height:t},children:(0,l.jsx)("img",{src:i,alt:s,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,r,t)=>{t.d(r,{A:()=>h});var o=t(89379),n=t(9950),i=t(93230),l=t(41413),s=t(77922),a=t(29925),c=t(26910),d=t(31222),x=t(44414);const h=(0,n.forwardRef)(((e,r)=>{let{setAppId:t,setLocoName:h,setPage:u,sx:p,textfeildSx:A,textfieldSx:g,pill:f=!1,accentColor:m="#6366f1",icon:j,placeholder:b="Select Zone",paperComponent:v}=e;const[y,k]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const r=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(r.data.status){const e=[...r.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),k(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const S=e=>"".concat(m).concat(e),w=S("26"),C=S("18"),W=f?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(w)},"&.Mui-focused fieldset":{borderColor:m,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},D=f&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(l.A,{sx:{width:24,height:24,bgcolor:C,color:m,transition:"background-color 0.15s, color 0.15s"},children:j||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(s.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var r;return null!==(r=null===e||void 0===e?void 0:e.locationname)&&void 0!==r?r:""},PaperComponent:v,sx:(0,o.A)({},p),onChange:(e,r,o)=>{"clear"===o?(null===t||void 0===t||t(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):r&&(null===t||void 0===t||t(r.applocationid),null===h||void 0===h||h(r.locationname),null===u||void 0===u||u(0))},renderInput:e=>f?(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:r,placeholder:b,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:D}),sx:(0,o.A)((0,o.A)({},W),g||A||{})})):(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:r,label:"Select Zones",sx:(0,o.A)({},g||A||{})}))})}))},96646:(e,r,t)=>{t.d(r,{r:()=>a});var o=t(9213),n=t(21671),i=t(82917),l=t(93230),s=t(44414);const a=e=>{let{rowsPerPage:r=5,col:t=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(r)).map(((e,r)=>(0,s.jsxs)(o.A,{children:[(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:t}).map(((e,r)=>(0,s.jsx)(n.A,{children:(0,s.jsxs)(l.A,{spacing:.5,children:[(0,s.jsx)(i.A,{variant:"text",width:100}),(0,s.jsx)(i.A,{variant:"text",width:80})]})},r))),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"text",width:150})}),(0,s.jsx)(n.A,{children:(0,s.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(n.A,{align:"center",children:(0,s.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},r)))})}}}]); \ No newline at end of file diff --git a/build/static/js/4947.c561ede9.chunk.js b/build/static/js/4947.c561ede9.chunk.js deleted file mode 100644 index 61a30fc..0000000 --- a/build/static/js/4947.c561ede9.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[4947],{13968:(e,r,o)=>{o.r(r),o.d(r,{default:()=>Ee});var n=o(89379),t=o(9950),i=o(47965),s=o(44070),l=o(36256),a=o(13838),c=o(4159),d=o.n(c),x=o(36150),h=o(60010),p=o(51778),u=(o(47659),o(14857)),A=o(94118),g=o(37476),m=o(94826),j=o(52351),f=o(67562),b=o(49883),v=o(31222),y=o(35678),k=o(56311),w=o(44414);var S=o(50027),C=o(20466),W=o(96646),D=o(59212);const z=o.p+"static/media/aiImage.89c2ccb91a41d85031e3.png";var I=o(63189),M=o(99324),Y=o(6604),R=o(2235),O=o(41413),P=o(47223),F=o(55158),T=o(59382),L=o(28810),E=o(79046),N=o(33092),H=o(93230),q=o(82053),K=o(16491),_=o(60899),B=o(82917),U=o(77922),Z=o(29925),X=o(83274),Q=o(1320),V=o(93038),G=o(25333),J=o(15769),$=o(69780),ee=o(9213),re=o(21671),oe=o(34075),ne=o(96583),te=o(40033),ie=o(25277),se=o(28170),le=o(79739),ae=o(82223),ce=o(74745),de=o(81425),xe=o(58691),he=o(23787),pe=o(28429),ue=o(90376),Ae=o(54413),ge=o(36220);d().extend(ge);const me=999,je=16,fe="0 14px 40px rgba(15, 23, 42, 0.10)",be="0 8px 24px rgba(15, 23, 42, 0.08)",ve="0 18px 50px rgba(15, 23, 42, 0.18)",ye="#0f172a",ke="#64748b",we="#94a3b8",Se="#e2e8f0",Ce="#f1f5f9",We="#f8fafc",De=(e,r)=>"".concat(e).concat(r),ze=e=>De(e,"08"),Ie=e=>De(e,"18"),Me=e=>De(e,"26"),Ye=e=>De(e,"55"),Re="#662582",Oe=e=>(0,w.jsx)(R.A,(0,n.A)((0,n.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:ve,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),Pe=e=>{let{color:r,selected:o,size:n=24,children:t}=e;return(0,w.jsx)(O.A,{sx:{width:n,height:n,bgcolor:o?r:Ie(r),color:o?"#fff":r,transition:"background-color 0.15s, color 0.15s"},children:t})},Fe=e=>({"& .MuiOutlinedInput-root":{borderRadius:me+"px",bgcolor:ze(e),fontWeight:600,"& fieldset":{borderColor:Ye(e),borderWidth:1.5},"&:hover fieldset":{borderColor:e},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(Me(e))},"&.Mui-focused fieldset":{borderColor:e,borderWidth:2}}}),Te={created:{label:"Created",color:"#0ea5e9",icon:v.F6S},pending:{label:"Pending",color:"#f59e0b",icon:v.tX0},processing:{label:"Processing",color:"#0ea5e9",icon:v.bfP},modified:{label:"Modified",color:"#06b6d4",icon:v.bfP},confirmed:{label:"Confirmed",color:"#10b981",icon:v.mU9},accepted:{label:"Accepted",color:"#6366f1",icon:v.mU9},delivered:{label:"Delivered",color:"#10b981",icon:v.mU9},cancelled:{label:"Cancelled",color:"#ef4444",icon:v.uDv}},Le=[{idx:0,status:"created",label:"Created",color:Re,icon:v.F6S,countKey:"created"},{idx:1,status:"pending",label:"Pending",color:"#f59e0b",icon:v.tX0,countKey:"pending"},{idx:2,status:"delivered",label:"Delivered",color:"#10b981",icon:v.mU9,countKey:"delivered"},{idx:3,status:"cancelled",label:"Cancelled",color:"#ef4444",icon:v.uDv,countKey:"cancelled"}],Ee=()=>{const e=(0,u.A)(),r=(0,P.A)(e.breakpoints.down("md")),o=(0,pe.Zp)(),c=(0,t.useRef)(),ge=(0,t.useRef)(),me=(0,t.useRef)(null),ve=(0,t.useRef)(null),[De,Ee]=(0,t.useState)(0),[Ne,He]=(0,t.useState)("All"),[qe,Ke]=(0,t.useState)(!1),[_e,Be]=(0,t.useState)(d()().format("YYYY-MM-DD")),[Ue,Ze]=(0,t.useState)(d()().format("YYYY-MM-DD")),[Xe,Qe]=(0,t.useState)("Today"),[Ve,Ge]=(0,t.useState)(!1),[Je,$e]=(0,t.useState)(0),[er,rr]=(0,t.useState)("created"),[or,nr]=(0,t.useState)(!1),[tr,ir]=(0,t.useState)(!1),[sr,lr]=(0,t.useState)(!1),[ar,cr]=(0,t.useState)(null),[dr,xr]=(0,t.useState)(null),[hr,pr]=(0,t.useState)(""),[ur,Ar]=(0,t.useState)(0),[gr,mr]=(0,t.useState)(null),[jr,fr]=(0,t.useState)(0),[br,vr]=(0,t.useState)(0),[yr,kr]=(0,t.useState)(""),[wr,Sr]=(0,t.useState)(""),[Cr,Wr]=(0,t.useState)(!1),[Dr,zr]=(0,t.useState)(!1),[Ir,Mr]=(0,t.useState)(null),[Yr,Rr]=(0,t.useState)(null),[Or,Pr]=(0,t.useState)(!1),[Fr,Tr]=(0,t.useState)(!1),[Lr,Er]=(0,t.useState)(!1),[Nr,Hr]=(0,t.useState)(null),[qr,Kr]=(0,t.useState)([]),[_r,Br]=(0,t.useState)([]),[Ur,Zr]=(0,t.useState)(null),[Xr,Qr]=(0,t.useState)(null),[Vr]=(0,t.useState)(0),[Gr,Jr]=(0,t.useState)([]),[$r,eo]=(0,t.useState)([]),ro=(0,t.useRef)(0),oo=(0,t.useRef)(null),[no,to]=(0,t.useState)(null),[io,so]=(0,t.useState)([]);(0,t.useEffect)((()=>{fr(0),Mr(null),vr(0),Rr(null)}),[De]),(0,t.useEffect)((()=>{vr(0),Rr(null)}),[jr]),(0,t.useEffect)((()=>{const e=$r.map((e=>({zone_name:e.zone_name,ordernotes:e.ordernotes,rider:e.rider,step:e.step,ordertype:e.ordertype,orderamount:e.orderamount,riderkms:e.riderkms,cumulativekms:e.cumulativekms,baseprice:e.baseprice,minkm:e.minkm,priceperkm:e.priceperkm,kms:e.kms,actualkms:e.actualkms,rider_charge:e.rider_charge,deliveryamt:e.deliveryamt,deliverycharges:e.deliverycharges,profit:e.profit})));Jr(e),console.log("csvExportData",e)}),[$r]),(0,t.useEffect)((()=>{if(null===_r||void 0===_r||!_r.length)return;const e=_r.map((e=>{const r=Number(e.cumulativekms||0),o=Number(e.minkm||0),t=Number(e.baseprice||0),i=Number(e.priceperkm||0);return r<=o?(0,n.A)((0,n.A)({},e),{},{deliveryamt:t}):(0,n.A)((0,n.A)({},e),{},{deliveryamt:(r-o)*i+t})}));eo(e),console.log("finaldeliveryList",e)}),[_r]);const{data:lo,isLoading:ao,isError:co,error:xo,refetch:ho}=(0,x.I)({queryKey:["percentageData",De],queryFn:()=>(0,de.jy)(De),enabled:!0}),{data:po,isLoading:uo,isError:Ao,error:go}=(0,x.I)({queryKey:["tenantlist",De],queryFn:()=>(0,de.Mn)(De),enabled:0!==De}),{data:mo,isLoading:jo,isError:fo,error:bo}=(0,x.I)({queryKey:["gettenantlocations",jr],queryFn:()=>(0,de.DL)(jr),enabled:0!==jr}),{data:vo=[],isLoading:yo}=(0,x.I)({queryKey:["paymentmodes"],queryFn:de.HY}),{data:ko=[],isLoading:wo}=(0,x.I)({queryKey:["ridersList",De],queryFn:de.Sd,enabled:0!==De}),{data:So,isLoading:Co,isError:Wo,error:Do,refetch:zo}=(0,x.I)({queryKey:["ordersCount",De,_e,Ue,er,jr,br],queryFn:de.Hh,refetchOnMount:!0,refetchOnWindowFocus:!0}),{data:Io}=(0,x.I)({queryKey:["getallriders"],queryFn:de.Xw,refetchOnMount:!0,refetchOnWindowFocus:!0}),{data:Mo,isLoading:Yo,isError:Ro,error:Oo,fetchNextPage:Po,hasNextPage:Fo,isFetchingNextPage:To,refetch:Lo}=(0,h.q)({queryKey:["fetchOrders",De,er,wr,_e,Ue,100,jr,br],queryFn:de.nQ,getNextPageParam:e=>{var r;return null!==(r=e.nextPage)&&void 0!==r?r:void 0},refetchOnWindowFocus:!0,refetchOnMount:!0,refetchOnReconnect:!0,staleTime:0}),Eo=(null===Mo||void 0===Mo?void 0:Mo.pages.flatMap((e=>e.rows)))||[];(0,t.useEffect)((()=>{if(!Fo)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Po()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return c.current&&e.observe(c.current),()=>{c.current&&e.unobserve(c.current)}}),[Fo,Po]);const No=(0,p.n)({mutationFn:0==ro.current?de.FC:de.Yk,onSuccess:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(console.log("data",e),console.log("varialbles",r),(0,C.k)("Orders Optimised Successfully","success",2e3),zo(),Lo(),Ke(!1),Wr(!1),0==ro.current)Br(null===e||void 0===e?void 0:e.details),Zr(null===e||void 0===e?void 0:e.zones),Qr(null===e||void 0===e?void 0:e.meta),Er(!0);else{var n,t,i;Br(null===e||void 0===e?void 0:e.details),Zr(null===e||void 0===e?void 0:e.zones),Qr(null===e||void 0===e?void 0:e.meta),Hr(e);const r=oo.current||{};o("/nearle/dispatch/preview",{state:{dispatchPreviewData:e,aiMode:null!==(n=r.aiMode)&&void 0!==n?n:ro.current,selectedMode:r.selectedMode||no,deliveryData:r.deliveryData||[],autoRiders:r.autoRiders||Io||[],absentRidersPayload:r.absentRidersPayload||[],rider:r.rider||ar,appId:null!==(t=r.appId)&&void 0!==t?t:De,tenantId:null!==(i=r.tenantid)&&void 0!==i?i:jr,startdate:_e}})}},onError:e=>{(0,C.k)(e.message,"error",4e3),Wr(!1),Ke(!1)},onSettled:()=>{Zo(),Ke(!1),Wr(!1),zr(!1)}}),Ho=(0,p.n)({mutationFn:de.H2,onMutate:()=>{zr(!0)},onSuccess:e=>{console.log("create data",e),(0,C.k)("Delivery Created Successfully","success",2e3),o("/nearle/deliveries"),_o.mutate(null===ar||void 0===ar?void 0:ar.userfcmtoken)},onError:e=>{(0,C.k)(e.message,"error",4e3)},onSettled:()=>{zr(!1)}}),qo=(0,p.n)({mutationFn:de.N4,onSuccess:e=>{e.status&&(nr(!1),(0,C.k)("Order Cancelled Successfully","success",2e3),zo(),ho())},onError:e=>{(0,C.k)(e.message,"error",2e3)}}),Ko=(0,p.n)({mutationFn:de.zR,onSuccess:e=>{e.status&&(lr(!1),(0,C.k)("Order Cancelled Successfully","success",2e3),Lo(),zo(),ho(),Kr([]))},onError:e=>{(0,C.k)(e.message,"error",2e3)}}),_o=(0,p.n)({mutationFn:de.k3,onSuccess:()=>{(0,C.k)("Notification sent Successfully","success",2e3)},onError:e=>{(0,C.k)(e.message,"error",2e3)}}),Bo=async e=>{zr(!0),Ke(!0);const r=qr.map((e=>(0,n.A)((0,n.A)({},e),{},{deliveryid:0,deliverydate:d()(e.deliverydate).utc().format("YYYY-MM-DD HH:mm:ss"),assigntime:d()().format("YYYY-MM-DD HH:mm:ss"),orderstatus:"pending",orderamount:e.deliverycharge,droplat:e.deliverylat,droplon:e.deliverylong,pickuplat:e.pickuplat,pickuplon:e.pickuplong,ordernotes:e.ordernotes,deliverycharges:e.deliverycharge,pickuplocation:e.pickupsuburb,deliverylocation:e.deliverysuburb})));console.log("deliveryData",r);const o=(io||[]).map((e=>({userid:e.userid,username:"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||e.username||"Rider ".concat(e.userid)})));oo.current={deliveryData:r,absentRidersPayload:o,autoRiders:Io,selectedMode:no,aiMode:ro.current,rider:ar,appId:De,tenantid:jr},0==ro.current?No.mutate({deliveries:r}):no&&1==(null===no||void 0===no?void 0:no.value)?No.mutate({deliveries:1==no.value?r:{body:r},hypertuning_params:e||null,selectedMode:no,absent_riders:o}):No.mutate({data:{orders:r,riders:Io,config:{pay_type:"hourly",base_pay:300,strategy:"multi_trip"},absent_riders:o},selectedMode:no})},Uo=(0,p.n)({mutationFn:de.H2,onSuccess:(e,r)=>{console.log("data",e),console.log("varialbles",r),(0,C.k)("Delivery Created Successfully","success",2e3),zr(!1),o("/nearle/deliveries")},onError:e=>{(0,C.k)(e.message,"error",4e3)},onSettled:()=>{zr(!1)}}),Zo=()=>{ir(!1),cr(null),xr(null),to(null),so([])},Xo=co?"Error fetching percentages: ".concat(null===xo||void 0===xo?void 0:xo.message):Wo?"Error fetching orders Count: ".concat(null===Do||void 0===Do?void 0:Do.message):Ro?"Error fetching orders : ".concat(null===Oo||void 0===Oo?void 0:Oo.message):Ao?"Error Fetching on Tenants:".concat(null===go||void 0===go?void 0:go.message," "):fo?"Error Fetching on Tenants Locations:".concat(null===bo||void 0===bo?void 0:bo.message," "):null;return(0,t.useEffect)((()=>{Xo&&(console.log(Xo),(0,C.k)(Xo,"error",3e3))}),[Xo]),(0,w.jsxs)(t.Fragment,{children:[(ao||Co||Yo||uo||jo||Cr)&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(j.A,{}),(0,w.jsx)(m.A,{})]}),(0,w.jsx)(F.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:Cr||Yo,children:(0,w.jsx)(m.A,{color:"inherit"})}),(0,w.jsx)(F.A,{sx:{zIndex:1e3},open:Or}),qr.length>0&&(0,w.jsxs)(T.A,{ariaLabel:"Actions",icon:(0,w.jsx)(L.A,{badgeContent:(null===qr||void 0===qr?void 0:qr.length)||"",color:"secondary",children:(0,w.jsx)(E.A,{})}),open:Or,onOpen:()=>Pr(!0),onClose:()=>Pr(!1),sx:{position:"fixed",bottom:52,right:16,"& .MuiFab-primary":{bgcolor:"#7b1fa2",color:"#fff","&:hover":{bgcolor:"#6a1b9a"},width:64,height:64}},children:[(0,w.jsx)(N.A,{icon:(0,w.jsx)("img",{src:z,alt:"Assign",style:{width:38,height:38,objectFit:"contain",borderRadius:50}}),tooltipTitle:" Optimisation",FabProps:{sx:{bgcolor:"primary.main",color:"#fff","&:hover":{bgcolor:"primary.dark"},width:64,height:64}},onClick:()=>{ro.current=1,Pr(!1),ir(!0)}}),(0,w.jsx)(N.A,{icon:(0,w.jsx)(i.A,{style:{fontSize:22}}),tooltipTitle:"Manual Assign",FabProps:{sx:{bgcolor:"success.600",color:"#fff","&:hover":{bgcolor:"success.dark"},width:64,height:64}},onClick:()=>{ro.current=0,Pr(!1),ir(!0)}}),(0,w.jsx)(N.A,{icon:(0,w.jsx)(s.A,{style:{fontSize:22}}),tooltipTitle:"Delete",FabProps:{sx:{bgcolor:"#d32f2f",color:"#fff","&:hover":{bgcolor:"#9a0007"},width:64,height:64}},onClick:()=>{Pr(!1),lr(!0)}})]}),(0,w.jsx)(R.A,{elevation:0,sx:{mb:{xs:1.5,md:2},p:{xs:1.5,sm:2,md:2.5},borderRadius:je/8,border:"1px solid",borderColor:Se,background:"linear-gradient(135deg, ".concat(ze(Re)," 0%, ").concat(ze("#9255AB")," 100%)"),boxShadow:be},children:(0,w.jsxs)(H.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",spacing:{xs:1.5,sm:2},children:[(0,w.jsxs)(H.A,{direction:"row",alignItems:"center",spacing:{xs:1.25,sm:1.75},children:[(0,w.jsx)(O.A,{sx:{width:{xs:40,sm:48},height:{xs:40,sm:48},bgcolor:Re,color:"#fff",boxShadow:"0 6px 18px ".concat(Me(Re))},children:(0,w.jsx)(v.F6S,{size:22})}),(0,w.jsxs)(H.A,{children:[(0,w.jsx)(q.A,{variant:"h3",sx:{fontWeight:800,color:ye,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"}},children:"Orders"}),(0,w.jsxs)(H.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[(0,w.jsx)(K.A,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:"#10b981",boxShadow:"0 0 0 4px rgba(16,185,129,0.18)"}}),(0,w.jsxs)(q.A,{variant:"caption",sx:{color:ke,fontWeight:600},children:["Live \xb7 ",Ne||"All Zones"," \xb7 ",Xe]})]})]})]}),(0,w.jsx)(D.A,{ref:me,locaName:Ne,setAppId:Ee,setLocoName:He,setPage:Ar,pill:!0,accentColor:Re,icon:(0,w.jsx)(v.HPi,{size:14}),placeholder:"Select Zone",paperComponent:Oe,sx:{width:{xs:"100%",sm:280},zIndex:100}})]})}),(0,w.jsx)(_.Ay,{container:!0,spacing:{xs:1.25,sm:1.5,md:2},sx:{mt:"1px"},children:[{key:"created",label:"Created Orders",color:"#0ea5e9",icon:v.F6S,value:null===lo||void 0===lo?void 0:lo.created,percentage:null===lo||void 0===lo?void 0:lo.percentage1},{key:"pending",label:"Pending Orders",color:"#f59e0b",icon:v.tX0,value:null===lo||void 0===lo?void 0:lo.uncoveredOrders,percentage:null===lo||void 0===lo?void 0:lo.percentage2},{key:"delivered",label:"Delivered Orders",color:"#10b981",icon:v.mU9,value:null===lo||void 0===lo?void 0:lo.coveredOrders,percentage:null===lo||void 0===lo?void 0:lo.percentage3},{key:"cancelled",label:"Cancelled Orders",color:"#ef4444",icon:v.uDv,value:null===lo||void 0===lo?void 0:lo.cancelled,percentage:null===lo||void 0===lo?void 0:lo.percentage4}].map((e=>{var r;const o=e.icon;return(0,w.jsx)(_.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,w.jsxs)(R.A,{elevation:0,sx:{position:"relative",overflow:"hidden",p:{xs:1.25,sm:1.75,md:2.25},borderRadius:je/8,border:"1px solid",borderColor:Se,background:"#fff",transition:"transform 0.2s, box-shadow 0.2s, border-color 0.2s","&:hover":{transform:"translateY(-3px)",boxShadow:be,borderColor:Ye(e.color)}},children:[(0,w.jsx)(K.A,{sx:{position:"absolute",top:0,left:0,right:0,height:3,background:"linear-gradient(90deg, ".concat(e.color," 0%, ").concat(Ie(e.color)," 100%)")}}),(0,w.jsxs)(H.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,w.jsxs)(H.A,{spacing:.5,sx:{minWidth:0,flex:1},children:[(0,w.jsx)(q.A,{variant:"caption",sx:{color:ke,fontWeight:700,letterSpacing:.4,textTransform:"uppercase",fontSize:{xs:10,sm:11},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.label}),(0,w.jsx)(q.A,{sx:{fontWeight:800,color:ye,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"}},children:ao?(0,w.jsx)(B.A,{sx:{width:40},animation:"wave"}):null!==(r=e.value)&&void 0!==r?r:0}),null!=e.percentage&&(0,w.jsxs)(q.A,{variant:"caption",sx:{color:ke,fontWeight:700},children:[e.percentage,"%"]})]}),(0,w.jsx)(O.A,{sx:{width:{xs:36,sm:42,md:48},height:{xs:36,sm:42,md:48},bgcolor:Ie(e.color),color:e.color,boxShadow:"inset 0 0 0 1px ".concat(Ye(e.color)),flexShrink:0},children:(0,w.jsx)(o,{size:20})})]})]})},e.key)}))}),(0,w.jsxs)(R.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1.25,md:1.75},borderRadius:je/8,border:"1px solid",borderColor:Se,background:"#fff",boxShadow:fe},children:[(0,w.jsxs)(_.Ay,{container:!0,spacing:1.25,alignItems:"center",children:[(0,w.jsx)(_.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,w.jsx)(U.A,{options:po||[],value:Ir,getOptionLabel:e=>(null===e||void 0===e?void 0:e.tenantname)||"",PaperComponent:Oe,onOpen:e=>{De||(e.preventDefault(),(0,C.k)("Please select location first!","warning",3e3),setTimeout((()=>{var e;null===(e=me.current)||void 0===e||e.focus()}),0))},onChange:(e,r,o)=>{"clear"===o?(fr(0),Mr(null),vr(0),Rr(null)):(fr((null===r||void 0===r?void 0:r.tenantid)||0),Mr(r),vr(0),Rr(null))},renderInput:e=>(0,w.jsx)(Z.A,(0,n.A)((0,n.A)({},e),{},{inputRef:ve,placeholder:"Select Tenant",size:"small",sx:Fe("#0ea5e9"),InputProps:(0,n.A)((0,n.A)({},e.InputProps),{},{startAdornment:(0,w.jsx)(H.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,w.jsx)(Pe,{color:"#0ea5e9",size:22,selected:!0,children:(0,w.jsx)(v.Itr,{size:13})})})})}))})}),(0,w.jsx)(_.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,w.jsx)(U.A,{options:mo||[],getOptionLabel:e=>e?"".concat(e.locationname," (").concat(e.suburb,")"):"",value:Yr,PaperComponent:Oe,onOpen:e=>{De||jr?jr||(e.preventDefault(),(0,C.k)("Please select Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=ve.current)||void 0===e||e.focus()}),0)):(e.preventDefault(),(0,C.k)("Please select a your Location and Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=me.current)||void 0===e||e.focus()}),0))},onChange:(e,r,o)=>{"clear"===o?(vr(0),Rr(null)):(vr(r.locationid||0),Rr(r))},renderInput:e=>(0,w.jsx)(Z.A,(0,n.A)((0,n.A)({},e),{},{placeholder:"Select Location",size:"small",sx:Fe("#10b981"),InputProps:(0,n.A)((0,n.A)({},e.InputProps),{},{startAdornment:(0,w.jsx)(H.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,w.jsx)(Pe,{color:"#10b981",size:22,selected:!0,children:(0,w.jsx)(v.JFD,{size:13})})})})}))})}),(0,w.jsx)(_.Ay,{item:!0,xs:12,sm:12,md:4,children:(0,w.jsxs)(H.A,{direction:"row",spacing:1,alignItems:"center",justifyContent:{xs:"flex-start",md:"flex-end"},flexWrap:"wrap",children:[(0,w.jsx)(X.A,{title:"Date Filter",placement:"top",children:(0,w.jsxs)(K.A,{onClick:()=>Ge(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:ze("#f59e0b"),border:"1.5px solid ".concat(Ye("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(Me("#f59e0b"))}},children:[(0,w.jsx)(v.Ki0,{size:14}),d()(_e).format("DD/MM/YY")," \u2013 ",d()(Ue).format("DD/MM/YY")]})}),(0,w.jsxs)(K.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:999,bgcolor:ze(Re),border:"1px solid ".concat(Ye(Re)),color:Re,fontSize:11,fontWeight:800},children:[(0,w.jsx)(v.GdF,{size:12})," ",Xe]})]})})]}),(0,w.jsx)(y.A,{open:Ve,onClose:()=>Ge(!1),onSelect:e=>{Be(e.startDate),Ze(e.endDate),Qe(e.label),console.log("Selected Date Range:",e)}})]}),(0,w.jsx)(R.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:je/8,borderTopRightRadius:je/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:Se,borderBottom:0,background:"#fff"},children:(0,w.jsxs)(H.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,w.jsx)(H.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:Se,borderRadius:4}},children:Le.map((e=>{var r;const o=e.icon,n=Je===e.idx,t=null!==(r=null===So||void 0===So?void 0:So[e.countKey])&&void 0!==r?r:0;return(0,w.jsxs)(K.A,{onClick:r=>{return o=e.idx,Ar(0),$e(o),0===o&&rr("created"),1===o&&rr("pending"),2===o&&rr("delivered"),3===o&&rr("cancelled"),void kr("");var o},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:999,border:"1.5px solid ".concat(n?e.color:Ye(e.color)),bgcolor:n?e.color:ze(e.color),color:n?"#fff":e.color,fontWeight:700,boxShadow:n?"0 6px 18px ".concat(Me(e.color)):"none",transition:"all 0.18s","&:hover":{borderColor:e.color,boxShadow:n?"0 6px 18px ".concat(Me(e.color)):"0 0 0 3px ".concat(Me(e.color))}},children:[(0,w.jsx)(O.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:n?"rgba(255,255,255,0.22)":Ie(e.color),color:n?"#fff":e.color},children:(0,w.jsx)(o,{size:13})}),(0,w.jsx)(q.A,{variant:"caption",sx:{fontWeight:800,fontSize:{xs:11.5,md:13},lineHeight:1},children:e.label}),(0,w.jsx)(K.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:800,bgcolor:n?"rgba(255,255,255,0.22)":"#fff",color:n?"#fff":e.color,border:n?"none":"1px solid ".concat(Ye(e.color))},children:t})]},e.status)}))}),(0,w.jsx)(K.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,w.jsx)(k.A,{value:yr,onChange:kr,onDebouncedChange:Sr,placeholder:"Search orders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:ze(Re),"& fieldset":{borderColor:Ye(Re),borderWidth:1.5},"&:hover fieldset":{borderColor:Re},"&.Mui-focused fieldset":{borderColor:Re,borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(Me(Re))}}})})]})}),(0,w.jsx)(R.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:je/8,borderBottomRightRadius:je/8,border:"1px solid",borderColor:Se,overflow:"hidden",background:"#fff"},children:(0,w.jsx)(Q.A,{ref:ge,onScroll:e=>{const{scrollTop:r,scrollHeight:o,clientHeight:n}=e.currentTarget;r+n>=o-50&&Fo&&!To&&Po()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},overflow:"auto","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:Ye(Re),borderRadius:8,"&:hover":{backgroundColor:Re}},"&::-webkit-scrollbar-track":{backgroundColor:We}},children:r?(0,w.jsxs)(he.nV,{sx:{p:1.25},children:[0===(null===Eo||void 0===Eo?void 0:Eo.length)&&!Yo&&(0,w.jsxs)(H.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,w.jsx)(O.A,{sx:{width:64,height:64,bgcolor:Ie("#94a3b8"),color:we},children:(0,w.jsx)(v.F6S,{size:28})}),(0,w.jsxs)(q.A,{variant:"subtitle1",sx:{fontWeight:700,color:ye},children:["No ",er," orders"]}),(0,w.jsx)(q.A,{variant:"caption",sx:{color:ke,textAlign:"center",px:2},children:yr?"Try a different keyword.":"Adjust the filters above to load orders."})]}),Yo&&(0,w.jsxs)(H.A,{alignItems:"center",sx:{py:6},children:[(0,w.jsx)(xe.A,{}),(0,w.jsx)(q.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading orders\u2026"})]}),null===Eo||void 0===Eo?void 0:Eo.map(((r,o)=>{const t=!!qr.find((e=>e.orderheaderid===r.orderheaderid)),i=Te[String(r.orderstatus||"").toLowerCase()]||{label:r.orderstatus||"\u2014",color:Re,icon:v.bfP},s=i.icon;return(0,w.jsx)(he.pg,{accent:i.color,selected:t,header:(0,w.jsxs)(H.A,{spacing:1.25,children:[(0,w.jsxs)(H.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,w.jsxs)(H.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:["created"===er&&(0,w.jsx)(V.A,{size:"small",sx:{p:.25,color:Ye(Re),"&.Mui-checked":{color:Re}},onChange:e=>{var o;if(!De)return(0,C.k)("Please select a location first!","warning",2e3),void(null===(o=me.current)||void 0===o||o.focus());e.target.checked?Kr((e=>[...e,(0,n.A)((0,n.A)({},r),{},{sno:e.length+1})])):Kr((e=>e.filter((e=>e.orderheaderid!==r.orderheaderid)).map(((e,r)=>(0,n.A)((0,n.A)({},e),{},{sno:r+1})))))},checked:t}),(0,w.jsx)(q.A,{variant:"caption",sx:{fontWeight:700,color:we},children:String(100*ur+o+1).padStart(2,"0")}),(0,w.jsxs)(K.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:ze(i.color),border:"1px solid ".concat(Ye(i.color)),color:i.color,fontSize:10.5,fontWeight:800,whiteSpace:"nowrap"},children:[(0,w.jsx)(s,{size:11})," ",i.label]})]}),"created"===r.orderstatus&&(0,w.jsxs)(H.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:["C"===r.deliverytype&&(0,w.jsx)(G.A,{size:"small",onClick:()=>{(null===gr||void 0===gr?void 0:gr.orderid)===r.orderid?mr(null):mr(r)},sx:{borderRadius:999,bgcolor:ze("#06b6d4"),color:"#06b6d4",border:"1px solid ".concat(Ye("#06b6d4")),"&:hover":{bgcolor:Ie("#06b6d4")}},children:(null===gr||void 0===gr?void 0:gr.orderid)===r.orderid?(0,w.jsx)(f.A,{fontSize:"small"}):(0,w.jsx)(b.A,{fontSize:"small"})}),(0,w.jsx)(G.A,{size:"small",disabled:t,onClick:()=>{nr(!0),pr(r.orderheaderid)},sx:{borderRadius:999,bgcolor:ze("#ef4444"),color:"#ef4444",border:"1px solid ".concat(Ye("#ef4444")),"&:hover":{bgcolor:Ie("#ef4444")},"&.Mui-disabled":{color:e.palette.secondary.main}},children:(0,w.jsx)(A.A,{})})]})]}),(0,w.jsxs)(K.A,{sx:{minWidth:0},children:[(0,w.jsx)(q.A,{sx:{fontWeight:800,color:ye,fontSize:15},noWrap:!0,children:r.tenantname}),(0,w.jsx)(q.A,{variant:"caption",sx:{color:ke},noWrap:!0,children:[r.tenantsuburb,r.applocation].filter(Boolean).join(" \xb7 ")||"\u2014"})]})]}),children:(0,w.jsxs)(he.FG,{children:[(0,w.jsxs)(he.pY,{label:"Order / Location",full:!0,children:[(0,w.jsx)(q.A,{sx:{fontSize:13,fontWeight:600,color:ye},noWrap:!0,children:"".concat(r.locationname,"-(").concat(r.locationsuburb,")")}),(0,w.jsxs)(q.A,{variant:"caption",sx:{color:ke},children:[r.orderid," \xb7 ",d()(r.pickupslot).utc().format("DD/MM/YYYY")," ",d()(r.pickupslot).format("hh:mm A")]})]}),(0,w.jsxs)(he.pY,{label:"Pickup",children:[(0,w.jsx)(q.A,{sx:{fontSize:13,fontWeight:600,color:ye},noWrap:!0,children:r.pickupcustomer||"\u2014"}),(0,w.jsx)(q.A,{variant:"caption",sx:{color:ke},noWrap:!0,children:r.pickupcontactno}),(0,w.jsx)(q.A,{variant:"caption",sx:{color:ke},noWrap:!0,children:r.pickupsuburb||r.pickupaddress})]}),(0,w.jsxs)(he.pY,{label:"Drop",children:[(0,w.jsx)(q.A,{sx:{fontSize:13,fontWeight:600,color:ye},noWrap:!0,children:r.deliverycustomer||"\u2014"}),(0,w.jsx)(q.A,{variant:"caption",sx:{color:ke},noWrap:!0,children:r.deliverycontactno}),(0,w.jsx)(q.A,{variant:"caption",sx:{color:ke},noWrap:!0,children:r.deliverysuburb||r.deliveryaddress})]}),(0,w.jsx)(he.pY,{label:"Qty",value:r.quantity||"\u2014"}),(0,w.jsx)(he.pY,{label:"KMS",children:(0,w.jsxs)(K.A,{sx:(l="#06b6d4",{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.25,borderRadius:999,bgcolor:ze(l),color:l,fontWeight:700,fontSize:11,border:"1px solid ".concat(Ye(l)),whiteSpace:"nowrap"}),children:[r.kms||0," km"]})}),(0,w.jsx)(he.pY,{label:"COD",children:(0,w.jsx)(q.A,{sx:{fontSize:13,fontWeight:800,color:r.collectionamt?"#ef4444":we},children:r.collectionamt?"\u20b9 ".concat(r.collectionamt.toFixed(2)):"\u2014"})}),(0,w.jsx)(he.pY,{label:"Charges",children:(0,w.jsx)(q.A,{sx:{fontSize:13,fontWeight:800,color:r.deliverycharge?"#ef4444":we},children:r.deliverycharge?"\u20b9 ".concat(r.deliverycharge.toFixed(2)):"\u2014"})}),r.ordernotes&&(0,w.jsx)(he.pY,{label:"Notes",full:!0,children:(0,w.jsx)(q.A,{variant:"caption",sx:{color:ke},children:r.ordernotes})})]})},r.sno);var l})),0!=(null===Eo||void 0===Eo?void 0:Eo.length)&&(0,w.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:To||Fo?(0,w.jsx)(xe.A,{}):(0,w.jsx)(q.A,{variant:"caption",sx:{color:we,fontWeight:600},children:"No more orders"})})]}):(0,w.jsxs)(J.A,{stickyHeader:!0,sx:{minWidth:{xs:960,md:1180}},children:[(0,w.jsx)($.A,{children:(0,w.jsxs)(ee.A,{sx:{"& th":{backgroundColor:We,color:ke,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(Se),py:{xs:1,md:1.25},px:{xs:1,md:1.5}}},children:["created"==er&&(0,w.jsx)(re.A,{sx:{position:"sticky !important"},children:(0,w.jsx)(V.A,{size:"small",sx:{p:.5,color:Ye(Re),"&.Mui-checked, &.MuiCheckbox-indeterminate":{color:Re}},indeterminate:qr.length>0&&qr.length!==(null===Eo||void 0===Eo?void 0:Eo.length),checked:qr.length===(null===Eo||void 0===Eo?void 0:Eo.length),onChange:e=>{var r;if(!De)return(0,C.k)("Please select a location first!","warning",2e3),void(null===(r=me.current)||void 0===r||r.focus());if(e.target.checked){const e=null===Eo||void 0===Eo?void 0:Eo.map(((e,r)=>(0,n.A)((0,n.A)({},e),{},{sno:r+1})));Kr(e)}else Kr([])}})}),(0,w.jsx)(re.A,{children:"#"}),(0,w.jsx)(re.A,{children:"Tenant"}),(0,w.jsx)(re.A,{children:"Location"}),(0,w.jsx)(re.A,{children:"Pickup"}),(0,w.jsx)(re.A,{children:"Drop"}),(0,w.jsx)(re.A,{align:"center",children:"QTY"}),(0,w.jsx)(re.A,{align:"right",children:"COD"}),(0,w.jsx)(re.A,{align:"center",children:"KMS"}),(0,w.jsx)(re.A,{align:"right",children:"Charges"}),(0,w.jsx)(re.A,{children:"Notes"}),(0,w.jsx)(re.A,{children:"Status"}),"created"==er&&(0,w.jsx)(re.A,{align:"right",children:"Actions"})]})}),(0,w.jsxs)(oe.A,{children:[0===(null===Eo||void 0===Eo?void 0:Eo.length)&&!Yo&&(0,w.jsx)(ee.A,{children:(0,w.jsx)(re.A,{colSpan:13,sx:{py:6},children:(0,w.jsxs)(H.A,{alignItems:"center",spacing:1.5,children:[(0,w.jsx)(O.A,{sx:{width:64,height:64,bgcolor:Ie("#94a3b8"),color:we},children:(0,w.jsx)(v.F6S,{size:28})}),(0,w.jsxs)(q.A,{variant:"subtitle1",sx:{fontWeight:700,color:ye},children:["No ",er," orders"]}),(0,w.jsx)(q.A,{variant:"caption",sx:{color:ke},children:yr?"Try a different keyword.":"Adjust the filters above to load orders."})]})})}),Yo&&(0,w.jsx)(W.r,{col:8}),null===Eo||void 0===Eo?void 0:Eo.map(((r,o)=>{const t=!!qr.find((e=>e.orderheaderid===r.orderheaderid));return(0,w.jsxs)(ee.A,{role:"checkbox",tabIndex:-1,sx:{cursor:"pointer",transition:"background-color 0.15s",backgroundColor:t?ze(Re):"transparent","& td":{borderBottom:"1px solid ".concat(Ce),py:{xs:1,md:1.25},px:{xs:1,md:1.5}},"&:hover":{backgroundColor:t?Ie(Re)+" !important":We}},children:["created"===er&&(0,w.jsx)(re.A,{children:(0,w.jsx)(V.A,{size:"small",sx:{p:.5,color:Ye(Re),"&.Mui-checked":{color:Re}},onChange:e=>{var o;if(!De)return(0,C.k)("Please select a location first!","warning",2e3),void(null===(o=me.current)||void 0===o||o.focus());e.target.checked?Kr((e=>[...e,(0,n.A)((0,n.A)({},r),{},{sno:e.length+1})])):Kr((e=>e.filter((e=>e.orderheaderid!==r.orderheaderid)).map(((e,r)=>(0,n.A)((0,n.A)({},e),{},{sno:r+1})))))},checked:t})}),(0,w.jsx)(re.A,{children:(0,w.jsx)(q.A,{children:100*ur+o+1})}),(0,w.jsx)(re.A,{children:(0,w.jsxs)(X.A,{title:r.tenantaddress,children:[(0,w.jsx)(q.A,{variant:"subtitle1",noWrap:!0,children:r.tenantname}),(0,w.jsxs)(q.A,{noWrap:!0,variant:"body2",children:[r.tenantsuburb,(0,w.jsx)("br",{})]}),(0,w.jsx)(q.A,{noWrap:!0,variant:"body2",children:r.applocation})]})}),(0,w.jsxs)(re.A,{align:"left",children:[(0,w.jsx)(q.A,{variant:"subtitle1",noWrap:!0,children:"".concat(r.locationname,"-(").concat(r.locationsuburb,")")}),(0,w.jsx)(X.A,{title:"TenantId - OrderId",children:(0,w.jsx)(q.A,{variant:"body2",noWrap:!0,children:r.orderid})}),(0,w.jsx)(X.A,{title:"Pickup Slot",children:(0,w.jsxs)(q.A,{noWrap:!0,sx:{fontSize:"12px"},children:[d()(r.pickupslot).utc().format("DD/MM/YYYY")," ",d()(r.pickupslot).format("hh:mm A")]})})]}),(0,w.jsx)(re.A,{align:"left",children:(0,w.jsxs)(H.A,{direction:"column",children:[(0,w.jsx)(q.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:r.pickupcustomer}),(0,w.jsx)(q.A,{variant:"caption",children:r.pickupcontactno}),(0,w.jsx)(X.A,{title:r.pickupaddress,children:(0,w.jsx)(q.A,{variant:"caption",children:"".concat(r.pickupsuburb||r.pickupaddress.slice(0,12)+".....")})})]})}),(0,w.jsx)(re.A,{align:"left",children:(0,w.jsxs)(H.A,{direction:"column",children:[(0,w.jsx)(q.A,{variant:"subtitle1",sx:{maxWidth:120,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.deliverycustomer}),(0,w.jsx)(q.A,{variant:"caption",children:r.deliverycontactno}),(0,w.jsx)(X.A,{title:r.deliveryaddress,sx:{whiteSpace:"nowrap"},children:(0,w.jsx)(q.A,{variant:"caption",children:"".concat(r.deliverysuburb||r.deliveryaddress.slice(0,12)+".....")})})]})}),(0,w.jsx)(re.A,{align:"center",children:r.quantity?(0,w.jsx)(q.A,{variant:"subtitle1",color:"error",sx:{whiteSpace:"nowrap"},children:r.quantity}):(0,w.jsx)(q.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:r.quantity})}),(0,w.jsx)(re.A,{align:"right",children:r.collectionamt?(0,w.jsxs)(q.A,{variant:"subtitle1",color:r.collectionamt?"error":null,sx:{whiteSpace:"nowrap"},children:["\u20b9",r.collectionamt.toFixed(2)]}):(0,w.jsxs)(q.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:["\u20b9",r.collectionamt.toFixed(2)]})}),(0,w.jsx)(re.A,{align:"center",children:(0,w.jsx)(q.A,{variant:"subtitle1",color:r.kms?"error":null,children:r.kms})}),(0,w.jsx)(re.A,{align:"right",children:r.deliverycharge?(0,w.jsxs)(q.A,{variant:"subtitle1",color:r.deliverycharge?"error":null,sx:{whiteSpace:"nowrap"},children:["\u20b9",r.deliverycharge.toFixed(2)]}):(0,w.jsxs)(q.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:["\u20b9",r.deliverycharge.toFixed(2)]})}),(0,w.jsx)(re.A,{align:"left",children:(0,w.jsx)(q.A,{variant:"body1",fontSize:"12px",sx:{maxWidth:120,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.ordernotes})}),(0,w.jsx)(re.A,{align:"left",children:(()=>{const e=Te[String(r.orderstatus||"").toLowerCase()]||{label:r.orderstatus||"\u2014",color:Re,icon:v.bfP},o=e.icon;return(0,w.jsxs)(K.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:ze(e.color),border:"1px solid ".concat(Ye(e.color)),color:e.color,fontSize:11,fontWeight:800,whiteSpace:"nowrap"},children:[(0,w.jsx)(o,{size:12})," ",e.label]})})()}),"created"===r.orderstatus&&(0,w.jsx)(re.A,{align:"center",children:(0,w.jsxs)(H.A,{flexDirection:"row",justifyContent:"end",children:["C"===r.deliverytype&&(0,w.jsx)(X.A,{title:"Product details",children:(0,w.jsx)(G.A,{color:"primary",onClick:()=>{(null===gr||void 0===gr?void 0:gr.orderid)===r.orderid?mr(null):mr(r)},children:(null===gr||void 0===gr?void 0:gr.orderid)===r.orderid?(0,w.jsx)(f.A,{}):(0,w.jsx)(b.A,{})})}),(0,w.jsx)(X.A,{title:"To Cancel",children:(0,w.jsx)(G.A,{"aria-describedby":"aria-".concat(r.sno),disabled:t,onClick:()=>{nr(!0),pr(r.orderheaderid)},children:(0,w.jsx)(A.A,{style:{color:t?e.palette.secondary.main:e.palette.error.main}})})})]})})]},r.sno)})),0!=(null===Eo||void 0===Eo?void 0:Eo.length)&&(0,w.jsx)(ee.A,{children:(0,w.jsx)(re.A,{colSpan:15,rowSpan:3,sx:{borderBottom:"none"},children:(0,w.jsx)("div",{ref:c,style:{height:40,textAlign:"center"},children:To||Fo?(0,w.jsx)(xe.A,{}):(0,w.jsx)(q.A,{variant:"caption",sx:{color:we,fontWeight:600},children:"No more orders"})})})})]})]})})}),(0,w.jsxs)(ne.A,{fullScreen:!0,open:tr,TransitionComponent:g.s,children:[(0,w.jsx)(F.A,{sx:{position:"absolute",color:"#fff",zIndex:e=>e.zIndex.modal+1},open:Cr,children:(0,w.jsx)(m.A,{color:"inherit",text:"Optimising ... .."})}),(0,w.jsx)(te.A,{sx:{bgcolor:e.palette.primary.lighter},children:(0,w.jsx)(L.A,{badgeContent:null===qr||void 0===qr?void 0:qr.length,color:"primary",children:(0,w.jsx)(ie.A,{label:(0,w.jsx)(q.A,{variant:"h3",children:"Preview Orders "}),variant:"contained"})})}),(0,w.jsx)(se.A,{dividers:!0,children:(0,w.jsx)(S.A,{content:!1,children:(0,w.jsx)(Q.A,{children:(0,w.jsxs)(J.A,{stickyHeader:!0,children:[(0,w.jsx)($.A,{children:(0,w.jsxs)(ee.A,{children:[(0,w.jsx)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"#"}),(0,w.jsxs)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:["Tenant"," "]}),(0,w.jsx)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"order Location"}),(0,w.jsxs)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:["Pickup"," "]}),(0,w.jsx)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"Delivery"}),(0,w.jsx)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"Notes"}),(0,w.jsx)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"Charges"}),(0,w.jsx)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.lighter},children:"KMS"})]})}),(0,w.jsx)(oe.A,{children:qr.map(((e,r)=>(0,w.jsx)(t.Fragment,{children:(0,w.jsxs)(ee.A,{sx:{},children:[(0,w.jsx)(re.A,{children:(0,w.jsxs)(q.A,{children:[" ",e.sno]})}),(0,w.jsx)(re.A,{children:(0,w.jsxs)(X.A,{title:e.tenantaddress,children:[(0,w.jsx)(q.A,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,w.jsxs)(q.A,{noWrap:!0,sx:{fontSize:"11px"},children:[e.tenantsuburb,(0,w.jsx)("br",{})]}),(0,w.jsx)(q.A,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,w.jsxs)(re.A,{align:"left",children:[(0,w.jsx)(X.A,{title:e.locationaddress,placement:"top",children:(0,w.jsx)(q.A,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,w.jsx)(X.A,{title:"Order Id",children:(0,w.jsx)(q.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,w.jsxs)(H.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,w.jsxs)(X.A,{title:"Ordered date",children:[(0,w.jsx)(q.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,w.jsx)(q.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.orderdate).utc().format("hh:mm A")})]}),"-",(0,w.jsxs)(X.A,{title:"Delivery date",children:[(0,w.jsx)(q.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,w.jsx)(q.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.deliverydate).utc().format("hh:mm A")})]})]})]}),(0,w.jsx)(re.A,{align:"left",children:(0,w.jsx)(H.A,{direction:"row",spacing:1,children:(0,w.jsxs)(H.A,{direction:"column",children:[(0,w.jsx)(q.A,{variant:"caption",children:e.pickupcustomer}),(0,w.jsx)(q.A,{variant:"caption",children:e.pickupcontactno}),(0,w.jsx)(X.A,{title:e.pickupaddress,children:(0,w.jsx)(q.A,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})})}),(0,w.jsx)(re.A,{align:"left",children:(0,w.jsx)(H.A,{direction:"row",spacing:1,children:(0,w.jsxs)(H.A,{direction:"column",children:[(0,w.jsx)(q.A,{variant:"caption",children:e.deliverycustomer}),(0,w.jsx)(q.A,{variant:"caption",children:e.deliverycontactno}),(0,w.jsx)(X.A,{title:e.deliveryaddress,children:(0,w.jsx)(q.A,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})})}),(0,w.jsx)(re.A,{align:"left",children:e.ordernotes}),(0,w.jsxs)(re.A,{align:"left",children:["\u20b9 ",e.deliverycharge.toFixed(2)]}),(0,w.jsx)(re.A,{align:"left",children:e.kms})]})},r)))})]})})})}),(0,w.jsx)(le.A,{sx:{bgcolor:e.palette.secondary.light},children:(0,w.jsx)(_.Ay,{container:!0,sx:{},children:(0,w.jsx)(_.Ay,{item:!0,xs:12,children:(0,w.jsxs)(H.A,{sx:{mt:2,mr:2},direction:"row",justifyContent:"flex-end",flexWrap:"wrap",gap:2,spacing:5,children:[(0,w.jsx)(ae.A,{sx:{width:"130px"},color:"secondary",variant:"contained",onClick:()=>{Zo()},startIcon:(0,w.jsx)(A.A,{}),children:"Close"}),1==ro.current&&(0,w.jsx)(U.A,{options:[{label:"Bike",value:1},{label:"Auto",value:2}],getOptionLabel:e=>e.label,value:no,onChange:(e,r)=>{to(r),console.log("Selected value:",null===r||void 0===r?void 0:r.value)},renderInput:e=>(0,w.jsx)(Z.A,(0,n.A)((0,n.A)({sx:{width:200,border:"1px solid ",borderColor:"primary.main"}},e),{},{placeholder:"Select Transport"})),isOptionEqualToValue:(e,r)=>e.value===r.value}),1==ro.current&&(0,w.jsx)(U.A,{multiple:!0,fullWidth:!1,options:ko||[],loading:wo,disableCloseOnSelect:!0,limitTags:2,value:io,onChange:(e,r)=>so(r),getOptionLabel:e=>"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"Rider #".concat(e.userid),isOptionEqualToValue:(e,r)=>e.userid===r.userid,PaperComponent:e=>(0,w.jsx)(R.A,(0,n.A)((0,n.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:"0 14px 40px rgba(15, 23, 42, 0.18)",border:"1px solid",borderColor:"divider",overflow:"hidden"}})),ListboxProps:{sx:{py:0,maxHeight:340}},noOptionsText:(0,w.jsxs)(H.A,{alignItems:"center",py:2,spacing:1,children:[(0,w.jsx)(v.vbW,{size:26,color:"#94a3b8"}),(0,w.jsx)(q.A,{variant:"caption",color:"text.secondary",children:"No riders to show for this location"})]}),renderTags:(e,r)=>e.map(((e,o)=>{const i="".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"Rider #".concat(e.userid),s=(i.match(/\b\w/g)||[]).slice(0,2).join("").toUpperCase()||"?",l=r({index:o});return(0,t.createElement)(ie.A,(0,n.A)((0,n.A)({},l),{},{key:e.userid,size:"small",avatar:(0,w.jsx)(O.A,{sx:{bgcolor:"#fed7aa",color:"#9a3412",fontSize:10,fontWeight:800},children:s}),label:i,sx:{height:26,bgcolor:"#fff7ed",color:"#9a3412",border:"1px solid",borderColor:"#fdba74",fontWeight:600,fontSize:12,"& .MuiChip-label":{px:.75},"& .MuiChip-deleteIcon":{color:"#c2410c",fontSize:16,"&:hover":{color:"#7c2d12"}}}}))})),renderOption:(e,r,o)=>{let{selected:i}=o;const s="".concat(r.firstname||""," ").concat(r.lastname||"").trim(),l=(s.match(/\b\w/g)||[]).slice(0,2).join("").toUpperCase()||"?";return(0,t.createElement)("li",(0,n.A)((0,n.A)({},e),{},{key:r.userid,style:{display:"flex",alignItems:"center",gap:12,padding:"8px 12px",borderBottom:"1px solid #f1f5f9",backgroundColor:i?"#fff7ed":"transparent"}}),(0,w.jsx)(V.A,{size:"small",checked:i,sx:{p:.5,color:"#fb923c","&.Mui-checked":{color:"#ea580c"}}}),(0,w.jsx)(O.A,{sx:{width:34,height:34,bgcolor:i?"#fb923c":"#f1f5f9",color:i?"#fff":"#475569",fontSize:12,fontWeight:800,transition:"background-color 0.15s, color 0.15s"},children:l}),(0,w.jsxs)(H.A,{direction:"column",spacing:0,flex:1,minWidth:0,children:[(0,w.jsx)(q.A,{variant:"body2",fontWeight:700,color:"#0f172a",noWrap:!0,children:s||"Rider #".concat(r.userid)}),(0,w.jsxs)(q.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:["ID #",r.userid,r.contactno?" \xb7 ".concat(r.contactno):""]})]}),i&&(0,w.jsx)(ie.A,{size:"small",label:"Absent",sx:{height:18,fontSize:9,fontWeight:800,letterSpacing:.3,bgcolor:"#ea580c",color:"#fff","& .MuiChip-label":{px:.75}}}))},renderInput:e=>(0,w.jsx)(Z.A,(0,n.A)((0,n.A)({},e),{},{label:"Absent Riders",placeholder:io.length?"":"Pick riders unavailable today",InputLabelProps:{shrink:!0},InputProps:(0,n.A)((0,n.A)({},e.InputProps),{},{startAdornment:(0,w.jsxs)(H.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25},children:[(0,w.jsx)(v.ihY,{size:18,color:"#ea580c"}),io.length>0&&(0,w.jsx)(ie.A,{size:"small",label:io.length,sx:{height:18,minWidth:22,fontSize:10,fontWeight:800,bgcolor:"#ea580c",color:"#fff","& .MuiChip-label":{px:.5}}}),e.InputProps.startAdornment]})}),sx:{minWidth:300,maxWidth:440,"& .MuiOutlinedInput-root":{borderRadius:2,bgcolor:"#fffbf5",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#fdba74",borderWidth:1.5},"&:hover fieldset":{borderColor:"#fb923c"},"&.Mui-focused":{boxShadow:"0 0 0 3px rgba(251, 146, 60, 0.18)"},"&.Mui-focused fieldset":{borderColor:"#ea580c",borderWidth:2}},"& .MuiInputLabel-root":{fontWeight:700,fontSize:13,color:"#9a3412","&.Mui-focused":{color:"#9a3412"}}}})),sx:{"& .MuiAutocomplete-tag":{my:.25},"& .MuiAutocomplete-endAdornment":{right:8}}}),(0,w.jsx)(ae.A,{color:"primary",disabled:!no&&1==ro.current,variant:"contained",startIcon:1==ro.current&&(0,w.jsx)("img",{src:z,alt:"Assign",style:{width:32,height:32,objectFit:"contain",borderRadius:50}}),onClick:()=>{Wr(!0),Bo()},children:qe?"Optimising...":0==ro.current?"Optimise Orders":"AI Optimise Orders"})]})})})})]}),(0,w.jsxs)(ne.A,{fullScreen:!0,open:Lr,TransitionComponent:g.s,children:[(0,w.jsx)(te.A,{children:(0,w.jsx)(H.A,{children:(0,w.jsxs)(H.A,{direction:"row",alignItems:"center",spacing:1,sx:{ml:1},children:[(0,w.jsx)(X.A,{title:"Back to orders",placement:"top",children:(0,w.jsx)(G.A,{onClick:()=>Er(!1),sx:{backgroundColor:"action.hover",color:"text.primary","&:hover":{backgroundColor:"action.selected"}},children:(0,w.jsx)(M.eQE,{size:22})})}),(0,w.jsx)(q.A,{sx:{m:2},variant:"h3",children:"Assign Orders"})]})})}),(0,w.jsx)(ce.A,{}),(0,w.jsx)(se.A,{children:(0,w.jsxs)(S.A,{content:!1,children:[(yo||wo||Dr)&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(j.A,{}),(0,w.jsx)(m.A,{})]}),(0,w.jsx)(F.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:yo||wo||Dr,children:(0,w.jsx)(m.A,{color:"inherit"})}),(0,w.jsx)(Q.A,{children:(0,w.jsxs)(J.A,{stickyHeader:!0,children:[(0,w.jsx)($.A,{children:(0,w.jsxs)(ee.A,{sx:{backgroundColor:"red"},children:[(0,w.jsx)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"#"}),1==Vr&&(0,w.jsxs)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:["Zone"," "]}),(0,w.jsxs)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:["Tenant"," "]}),(0,w.jsx)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"order Location"}),(0,w.jsxs)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:["Pickup"," "]}),(0,w.jsx)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Delivery"}),(0,w.jsx)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Notes"}),1==Vr&&(0,w.jsx)(re.A,{sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Rider"}),(0,w.jsx)(re.A,{align:"center",sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Type"}),(0,w.jsx)(re.A,{align:"center",sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"Charges"}),(0,w.jsx)(re.A,{align:"center",sx:{position:"sticky !important",backgroundColor:e.palette.secondary.light},children:"KMS"})]})}),(0,w.jsxs)(oe.A,{children:[0==(null===$r||void 0===$r?void 0:$r.length)&&(0,w.jsx)(ee.A,{children:(0,w.jsx)(re.A,{colSpan:10,children:(0,w.jsx)(a.A,{})})}),null===$r||void 0===$r?void 0:$r.map(((e,r)=>(0,w.jsxs)(ee.A,{sx:{},children:[(0,w.jsx)(re.A,{children:(0,w.jsxs)(q.A,{children:[" ",r+1]})}),(0,w.jsx)(re.A,{children:(0,w.jsxs)(X.A,{title:e.tenantaddress,children:[(0,w.jsx)(q.A,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,w.jsxs)(q.A,{noWrap:!0,sx:{fontSize:"11px"},children:[e.tenantsuburb,(0,w.jsx)("br",{})]}),(0,w.jsx)(q.A,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,w.jsxs)(re.A,{align:"left",children:[(0,w.jsx)(X.A,{title:e.locationaddress,placement:"top",children:(0,w.jsx)(q.A,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,w.jsx)(X.A,{title:"Order Id",children:(0,w.jsx)(q.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,w.jsxs)(H.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,w.jsxs)(X.A,{title:"Ordered date",children:[(0,w.jsx)(q.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,w.jsx)(q.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.orderdate).utc().format("hh:mm A")})]}),"-",(0,w.jsxs)(X.A,{title:"Delivery date",children:[(0,w.jsx)(q.A,{noWrap:!0,sx:{fontSize:"12px"},children:d()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,w.jsx)(q.A,{noWrap:!0,sx:{fontSize:"11px"},children:d()(e.deliverydate).utc().format("hh:mm A")})]})]})]}),(0,w.jsx)(re.A,{align:"left",children:(0,w.jsx)(H.A,{direction:"row",spacing:1,children:(0,w.jsxs)(H.A,{direction:"column",children:[(0,w.jsx)(q.A,{variant:"caption",children:e.pickupcustomer}),(0,w.jsx)(q.A,{variant:"caption",children:e.pickupcontactno}),(0,w.jsx)(X.A,{title:e.pickupaddress,children:(0,w.jsx)(q.A,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})})}),(0,w.jsx)(re.A,{align:"left",children:(0,w.jsx)(H.A,{direction:"row",spacing:1,children:(0,w.jsxs)(H.A,{direction:"column",children:[(0,w.jsx)(q.A,{variant:"caption",children:e.deliverycustomer}),(0,w.jsx)(q.A,{variant:"caption",children:e.deliverycontactno}),(0,w.jsx)(X.A,{title:e.deliveryaddress,children:(0,w.jsx)(q.A,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})})}),(0,w.jsx)(re.A,{align:"left",children:e.ordernotes}),(0,w.jsx)(re.A,{align:"center",children:(0,w.jsx)(ie.A,{size:"small",label:e.ordertype,color:"Economy"==e.ordertype?"success":"Risky"==e.ordertype?"error":"primary",variant:"light"})}),(0,w.jsx)(re.A,{align:"center",children:(0,w.jsxs)(H.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,w.jsx)(X.A,{title:"Charges",placement:"top",children:(0,w.jsx)(ie.A,{size:"small",label:"\u20b9 ".concat(e.deliverycharge.toFixed(2)," "),color:"error",variant:"light"})}),(0,w.jsx)(X.A,{title:"Amount",placement:"left",children:(0,w.jsx)(ie.A,{size:"small",label:"\u20b9 ".concat(e.deliveryamt.toFixed(2)," "),color:"success",variant:"light"})})]})}),(0,w.jsx)(re.A,{align:"center",children:(0,w.jsxs)(H.A,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,w.jsx)(X.A,{title:"KMS",placement:"top",children:(0,w.jsx)(ie.A,{size:"small",label:"".concat(e.kms," km"),color:"error",variant:"light"})}),(0,w.jsx)(X.A,{title:"Cumulative Kms",placement:"right",children:(0,w.jsx)(ie.A,{size:"small",label:"".concat(e.cumulativekms," km"),color:"success",variant:"light"})})]})})]},r)))]})]})}),(0,w.jsx)(ce.A,{})]})}),(0,w.jsx)(ce.A,{}),(0,w.jsxs)(le.A,{sx:{flexDirection:"column",alignItems:"stretch",p:2,gap:2},children:[(0,w.jsxs)(_.Ay,{container:!0,spacing:2,children:[(0,w.jsx)(_.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsx)(U.A,{options:vo,fullWidth:!0,renderInput:e=>(0,w.jsx)(Z.A,(0,n.A)((0,n.A)({},e),{},{label:"Choose Payment"})),onChange:(e,r,o)=>{if("clear"!==o){if(r){xr(r);const e=null===$r||void 0===$r?void 0:$r.map((e=>(0,n.A)((0,n.A)({},e),{},{paymenttype:r.apptypeid||42})));eo(e)}}else xr(null)}})}),(0,w.jsx)(_.Ay,{item:!0,xs:12,sm:6,children:(0,w.jsx)(U.A,{options:ko,fullWidth:!0,renderInput:e=>(0,w.jsx)(Z.A,(0,n.A)((0,n.A)({},e),{},{label:"Choose Rider"})),onChange:(e,r,o)=>{if("clear"!==o){if(r){cr(r);const e=null===$r||void 0===$r?void 0:$r.map((e=>(0,n.A)((0,n.A)({},e),{},{userid:r.userid,fuelcharge:r.fuelcharge||0,userfcmtoken:r.userfcmtoken})));eo(e)}}else cr(null)}})})]}),(0,w.jsxs)(H.A,{direction:"row",spacing:2,justifyContent:"flex-end",sx:{pt:1,my:2},children:[(0,w.jsx)(ae.A,{variant:"outlined",color:"secondary",startIcon:(0,w.jsx)(I.A,{}),onClick:()=>Er(!1),children:"Back"}),(0,w.jsx)(ae.A,{variant:"contained",disabled:!ar||!dr,onClick:()=>{null!==$r&&void 0!==$r&&$r.length?Ho.mutate({deliveries:$r}):(0,C.k)("No deliveries selected","error",3e3)},children:"Assign Orders"})]})]})]}),(0,w.jsxs)(ne.A,{open:Fr,fullScreen:!0,TransitionComponent:g.s,PaperProps:{sx:{display:"flex",flexDirection:"column",overflow:"hidden"}},children:[(0,w.jsx)(F.A,{sx:{position:"absolute",color:"#fff",zIndex:e=>e.zIndex.modal+1},open:Dr,children:(0,w.jsx)(m.A,{color:"inherit"})}),(0,w.jsx)(te.A,{sx:{py:1.25},children:(0,w.jsxs)(H.A,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{},children:[(0,w.jsxs)(H.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,w.jsx)(X.A,{title:"Back to orders",placement:"top",children:(0,w.jsx)(G.A,{onClick:()=>o("/nearle/orders"),sx:{bgcolor:"action.hover","&:hover":{bgcolor:"action.selected"}},children:(0,w.jsx)(M.eQE,{size:20})})}),(0,w.jsx)(q.A,{variant:"h3",fontWeight:600,children:"Assign Orders"})]}),(0,w.jsxs)(H.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,w.jsx)(U.A,{options:[{tuneid:1,type:"Balanced",value:"balanced"},{tuneid:2,type:"Aggressive Speed",value:"aggressive_speed"},{tuneid:3,type:"Fuel Saver",value:"fuel_saver"},{tuneid:4,type:"Zone Strict",value:"zone_strict"}]||[],getOptionLabel:e=>e.type,sx:{minWidth:250,maxWidth:600,flex:1},renderInput:e=>(0,w.jsx)(Z.A,(0,n.A)((0,n.A)({},e),{},{label:"Hyper Tuning"})),onChange:(e,r,o)=>{"clear"===o?Bo(null):(console.log("val",r),Bo(r.value))}}),(0,w.jsx)(ae.A,{variant:"contained",color:"primary",startIcon:(0,w.jsx)(Y.UF6,{}),onClick:()=>{zr(!0),Bo("reshuffle")},children:"Re-Assign"}),(0,w.jsx)(ue.Ay,{data:Gr,filename:"Orders_Detail_".concat(d()().format("YYYY-MM-DD_HHmmss"),".csv"),label:" CSV",style:{m:1}})]})]})}),(0,w.jsx)(se.A,{sx:{p:0,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},children:Nr&&(0,w.jsx)(Ae.default,{data:Nr,embedded:!0})}),(0,w.jsx)(le.A,{sx:{px:2,py:1.25},children:(0,w.jsxs)(H.A,{direction:"row",gap:2,alignItems:"center",justifyContent:"end",children:[(0,w.jsx)(ae.A,{variant:"contained",color:"secondary",startIcon:(0,w.jsx)(I.A,{}),onClick:()=>{Tr(!1)},children:"Back"}),(0,w.jsx)(ae.A,{variant:"contained",onClick:async()=>{zr(!0),Uo.mutate({deliveries:$r})},children:"Assign Orders"})]})})]}),(0,w.jsx)(ne.A,{open:or,onClose:()=>handleClose(),maxWidth:"xs",children:(0,w.jsx)(se.A,{sx:{mt:2,my:1},children:(0,w.jsxs)(H.A,{alignItems:"center",spacing:3.5,children:[(0,w.jsx)(O.A,{color:"error",sx:{width:72,height:72,fontSize:"1.75rem"},children:(0,w.jsx)(l.A,{})}),(0,w.jsx)(H.A,{spacing:2,children:(0,w.jsx)(q.A,{variant:"h4",align:"center",children:"Are you sure you want to cancel this order?"})}),(0,w.jsxs)(H.A,{direction:"row",spacing:2,sx:{width:1},children:[(0,w.jsx)(ae.A,{fullWidth:!0,color:"error",variant:"contained",onClick:()=>{qo.mutate(hr)},autoFocus:!0,children:"Yes, Cancel"}),(0,w.jsx)(ae.A,{fullWidth:!0,onClick:()=>{nr(!1)},color:"secondary",variant:"outlined",children:"No"})]})]})})}),(0,w.jsx)(ne.A,{open:sr,onClose:()=>lr(!1),maxWidth:"xs",children:(0,w.jsx)(se.A,{sx:{mt:2,my:1},children:(0,w.jsxs)(H.A,{alignItems:"center",spacing:3.5,children:[(0,w.jsx)(O.A,{color:"error",sx:{width:72,height:72,fontSize:"1.75rem"},children:(0,w.jsx)(l.A,{})}),(0,w.jsx)(H.A,{spacing:2,children:(0,w.jsx)(q.A,{variant:"h4",align:"center",children:"Are you sure, you want to cancel multiple orders?"})}),(0,w.jsxs)(H.A,{direction:"row",spacing:2,sx:{width:1},children:[(0,w.jsx)(ae.A,{fullWidth:!0,onClick:()=>{lr(!1)},color:"secondary",variant:"outlined",children:"No"}),(0,w.jsx)(ae.A,{fullWidth:!0,color:"error",variant:"contained",onClick:()=>{Ko.mutate(qr)},autoFocus:!0,children:"Yes, Cancel"})]})]})})})]})}},23787:(e,r,o)=>{o.d(r,{FG:()=>p,nV:()=>x,pY:()=>u,pg:()=>h});var n=o(89379),t=o(80045),i=o(93230),s=o(2235),l=o(16491),a=o(82053),c=o(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:r,scroll:o=!1,onScroll:s,sx:l}=e,a=(0,t.A)(e,d);return(0,c.jsx)(i.A,(0,n.A)((0,n.A)({spacing:1.25,onScroll:s,sx:(0,n.A)((0,n.A)({p:1.5},o&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:r}))},h=e=>{let{accent:r="#662582",header:o,footer:t,selected:i=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(s.A,{elevation:0,onClick:a,sx:(0,n.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?r:"#e2e8f0",background:i?"".concat(r,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:r}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[o,d,t]})]})},p=e=>{let{children:r,columns:o=2,sx:t}=e;return(0,c.jsx)(l.A,{sx:(0,n.A)({display:"grid",gridTemplateColumns:"repeat(".concat(o,", minmax(0, 1fr))"),gap:1,mt:1.25},t),children:r})},u=e=>{let{label:r,value:o,children:n,full:t=!1,align:i="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:t?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:r}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==n?n:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==o&&void 0!==o?o:"\u2014"})})]})}},35678:(e,r,o)=>{o.d(r,{A:()=>v});var n=o(9950),t=o(96583),i=o(40033),s=o(82053),l=o(28170),a=o(93230),c=o(82223),d=o(55916),x=o(4159),h=o.n(x),p=o(56712),u=o(81417),A=o(96600),g=o(53132),m=o(94289),j=o(57326),f=o(50624),b=o(44414);const v=e=>{let{open:r,onClose:o,onSelect:x}=e;const[v,y]=(0,n.useState)(null);return(0,b.jsxs)(t.A,{open:r,onClose:o,children:[(0,b.jsx)(i.A,{align:"left",children:(0,b.jsx)(s.A,{variant:"h4",children:"Select Filter Options"})}),(0,b.jsx)(l.A,{sx:{width:"100%"},className:"datedialog",children:(0,b.jsx)(d.U,{open:r,toggle:o,id:"daterange1",onChange:e=>{y({startDate:h()(e.startDate).format("YYYY-MM-DD"),endDate:h()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,p.A)(new Date,-1),endDate:(0,p.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,p.A)(new Date,1),endDate:(0,p.A)(new Date,1)},{label:"This Week",startDate:(0,u.A)(new Date),endDate:(0,A.A)(new Date)},{label:"Last Week",startDate:(0,u.A)((0,g.A)(new Date,-1)),endDate:(0,A.A)((0,g.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,g.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,m.A)(new Date),endDate:(0,j.A)(new Date)},{label:"Last Month",startDate:(0,m.A)((0,f.A)(new Date,-1)),endDate:(0,j.A)((0,f.A)(new Date,-1))}]})}),(0,b.jsx)(a.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,b.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{v?(x(v),o()):o()},children:"OK"})})]})}},47659:(e,r,o)=>{o.d(r,{A:()=>d});var n=o(89379),t=o(48089),i=o(50704),s=o(16491),l=o(82053),a=o(60899),c=o(44414);const d=e=>{let{primary:r,secondary:o,percentage:d,color:x,sx:h}=e;return(0,c.jsx)(t.A,{elevation:0,sx:(0,n.A)({background:x,position:"relative",color:"#fff","&:hover svg":{opacity:1,transform:"scale(1.1)"}},h),children:(0,c.jsxs)(i.A,{children:[(0,c.jsx)(s.A,{sx:{position:"absolute",right:15,top:25,color:"#fff","& svg":{width:36,height:36,opacity:.5,transition:"all .3s ease-in-out"}},children:(0,c.jsx)(l.A,{variant:"h2",color:"inherit",sx:{fontSize:{xs:20,md:25}},children:d&&"number"===typeof d?"".concat(d.toString()," %"):d})}),(0,c.jsxs)(a.Ay,{container:!0,spacing:0,children:[(0,c.jsx)(a.Ay,{item:!0,xs:12,children:(0,c.jsx)(l.A,{variant:"h3",color:"inherit",sx:{fontSize:{xs:16,md:20}},children:o})}),(0,c.jsx)(a.Ay,{item:!0,xs:12,children:(0,c.jsx)(l.A,{variant:"subtitle2",color:"inherit",children:r})})]})]})})}},56311:(e,r,o)=>{o.d(r,{A:()=>p});var n=o(89379),t=o(9950),i=o(2660),s=o(2046),l=o(83274),a=o(25333),c=o(97125),d=o(7762),x=o(52097),h=o(44414);const p=e=>{let{value:r,onChange:o,onDebouncedChange:p,debounceTime:u=500,placeholder:A="Search (ctrl+k)",sx:g}=e;const m=(0,t.useRef)(null),[j]=(0,x.d7)(r,u);return(0,t.useEffect)((()=>{p&&p(j)}),[j,p]),(0,t.useEffect)((()=>{const e=e=>{var r;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(r=m.current)||void 0===r||r.focus());"Escape"===e.key&&document.activeElement===m.current&&m.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(i.A,{sx:(0,n.A)({},g),inputRef:m,placeholder:A,autoComplete:"off",value:r,fullWidth:!0,onChange:e=>o(e.target.value),startAdornment:(0,h.jsx)(s.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(l.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:r?"visible":"hidden"},onClick:()=>o(""),children:(0,h.jsx)(d.A,{})})})})}},58691:(e,r,o)=>{o.d(r,{A:()=>l});o(9950);var n=o(16491),t=o(46639),i=o(62217),s=o(44414);function l(e){let{size:r=70,imgSize:o=40,alt:l="loader"}=e;return(0,s.jsxs)(n.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,s.jsx)(t.A,{size:r}),(0,s.jsx)(n.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:o,height:o},children:(0,s.jsx)("img",{src:i,alt:l,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,r,o)=>{o.d(r,{A:()=>h});var n=o(89379),t=o(9950),i=o(93230),s=o(41413),l=o(77922),a=o(29925),c=o(26910),d=o(31222),x=o(44414);const h=(0,t.forwardRef)(((e,r)=>{let{setAppId:o,setLocoName:h,setPage:p,sx:u,textfeildSx:A,textfieldSx:g,pill:m=!1,accentColor:j="#6366f1",icon:f,placeholder:b="Select Zone",paperComponent:v}=e;const[y,k]=(0,t.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,t.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const r=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(r.data.status){const e=[...r.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),k(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const w=e=>"".concat(j).concat(e),S=w("08"),C=w("26"),W=w("55"),D=w("18"),z=m?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"999px",bgcolor:S,fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s, background-color 0.2s","& fieldset":{borderColor:W,borderWidth:1.5},"&:hover fieldset":{borderColor:j},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(C)},"&.Mui-focused fieldset":{borderColor:j,borderWidth:2}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:j}}:{},I=m&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(s.A,{sx:{width:24,height:24,bgcolor:D,color:j,transition:"background-color 0.15s, color 0.15s"},children:f||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var r;return null!==(r=null===e||void 0===e?void 0:e.locationname)&&void 0!==r?r:""},PaperComponent:v,sx:(0,n.A)({},u),onChange:(e,r,n)=>{"clear"===n?(null===o||void 0===o||o(0),null===h||void 0===h||h(""),null===p||void 0===p||p(0)):r&&(null===o||void 0===o||o(r.applocationid),null===h||void 0===h||h(r.locationname),null===p||void 0===p||p(0))},renderInput:e=>m?(0,x.jsx)(a.A,(0,n.A)((0,n.A)({},e),{},{inputRef:r,placeholder:b,InputProps:(0,n.A)((0,n.A)({},e.InputProps),{},{startAdornment:I}),sx:(0,n.A)((0,n.A)({},z),g||A||{})})):(0,x.jsx)(a.A,(0,n.A)((0,n.A)({},e),{},{inputRef:r,label:"Select Zones",sx:(0,n.A)({},g||A||{})}))})}))},96646:(e,r,o)=>{o.d(r,{r:()=>a});var n=o(9213),t=o(21671),i=o(82917),s=o(93230),l=o(44414);const a=e=>{let{rowsPerPage:r=5,col:o=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(r)).map(((e,r)=>(0,l.jsxs)(n.A,{children:[(0,l.jsx)(t.A,{children:(0,l.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(t.A,{children:(0,l.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:o}).map(((e,r)=>(0,l.jsx)(t.A,{children:(0,l.jsxs)(s.A,{spacing:.5,children:[(0,l.jsx)(i.A,{variant:"text",width:100}),(0,l.jsx)(i.A,{variant:"text",width:80})]})},r))),(0,l.jsx)(t.A,{children:(0,l.jsx)(i.A,{variant:"text",width:150})}),(0,l.jsx)(t.A,{children:(0,l.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(t.A,{align:"center",children:(0,l.jsxs)(s.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},r)))})}}}]); \ No newline at end of file diff --git a/build/static/js/6165.266ba693.chunk.js b/build/static/js/6165.266ba693.chunk.js new file mode 100644 index 0000000..4fa3735 --- /dev/null +++ b/build/static/js/6165.266ba693.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6165],{23787:(e,o,r)=>{r.d(o,{FG:()=>u,nV:()=>x,pY:()=>f,pg:()=>h});var n=r(89379),i=r(80045),t=r(93230),s=r(2235),l=r(16491),c=r(82053),a=r(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:o,scroll:r=!1,onScroll:s,sx:l}=e,c=(0,i.A)(e,d);return(0,a.jsx)(t.A,(0,n.A)((0,n.A)({spacing:1.25,onScroll:s,sx:(0,n.A)((0,n.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},c),{},{children:o}))},h=e=>{let{accent:o="#662582",header:r,footer:i,selected:t=!1,onClick:c,children:d,sx:x}=e;return(0,a.jsxs)(s.A,{elevation:0,onClick:c,sx:(0,n.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:t?o:"#e2e8f0",background:t?"".concat(o,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,a.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:o}}),(0,a.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[r,d,i]})]})},u=e=>{let{children:o,columns:r=2,sx:i}=e;return(0,a.jsx)(l.A,{sx:(0,n.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},i),children:o})},f=e=>{let{label:o,value:r,children:n,full:i=!1,align:t="left"}=e;return(0,a.jsxs)(l.A,{sx:{gridColumn:i?"1 / -1":"auto",minWidth:0,textAlign:t},children:[(0,a.jsx)(c.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:o}),(0,a.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==n?n:(0,a.jsx)(c.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},26165:(e,o,r)=>{r.r(o),r.d(o,{default:()=>$});var n=r(9950),i=r(28429),t=r(36150),s=r(4159),l=r.n(s),c=r(41413),a=r(47223),d=r(16491),x=r(82053),h=r(60899),u=r(2235),f=r(93230),p=r(83274),g=r(25333),m=r(1320),j=r(15769),b=r(69780),A=r(9213),v=r(21671),w=r(34075),y=r(74745),k=r(6258),C=r(14857),S=r(31222),W=r(81425),I=r(52351),z=r(56311),R=r(27001),Y=r(36803),M=r(96646),T=r(23787),D=r(44414),P=r(36220);l().extend(P);const L=14,F="#0f172a",B="#64748b",H="#94a3b8",N="#e2e8f0",E="#f1f5f9",K="#ffffff",O="#f8fafc",G=(e,o)=>"".concat(e).concat(o),U=e=>G(e,"08"),q=e=>G(e,"18"),X=e=>G(e,"55"),_="#662582",V=e=>{let{color:o,selected:r,size:n=24,children:i}=e;return(0,D.jsx)(c.A,{sx:{width:n,height:n,bgcolor:r?o:q(o),color:r?"#fff":o,transition:"background-color 0.15s, color 0.15s"},children:i})},J={0:{key:"all",label:"All",color:_,icon:S.Uhn,countKey:"totalcount"},1:{key:"open",label:"Open",color:"#ef4444",icon:S.tX0,countKey:"pendingcount"},2:{key:"overdue",label:"Overdue",color:"#f59e0b",icon:S.tMO,countKey:"overduecount"},3:{key:"paid",label:"Paid",color:"#10b981",icon:S.mU9,countKey:"paidcount"}},Z=[0,1,2,3];function Q(e){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(Number(e)||0)}const $=()=>{var e,o,r,s;const P=(0,i.Zp)(),$=(0,C.A)(),ee=(0,a.A)($.breakpoints.down("md")),[oe,re]=(0,n.useState)(0),[ne,ie]=(0,n.useState)(10),[te,se]=(0,n.useState)(0),[le,ce]=(0,n.useState)(!1),[ae,de]=(0,n.useState)(""),[xe,he]=(0,n.useState)(""),ue=n.useCallback((e=>{he(e),re(0)}),[]),{data:fe,isLoading:pe,isError:ge,error:me}=(0,t.I)({queryKey:["invoiceInsight"],queryFn:W.Y8,refetchInterval:3e5}),{data:je,isLoading:be,isError:Ae,error:ve}=(0,t.I)({queryKey:[te],queryFn:W.XC,refetchInterval:3e5}),we=pe||be,ye=ge||Ae,ke=(null===me||void 0===me?void 0:me.message)||(null===ve||void 0===ve?void 0:ve.message),Ce=(0,n.useMemo)((()=>{if(!je)return[];if(!xe)return je;const e=xe.toLowerCase().trim();return je.filter((o=>[o.tenantname,o.contactperson,String(o.invoiceno)].filter(Boolean).some((o=>String(o).toLowerCase().includes(e)))))}),[je,xe]),Se=(0,n.useMemo)((()=>{const e=Math.max(0,Math.ceil(Ce.length/ne)-1);return Math.min(oe,e)}),[Ce.length,oe,ne]);n.useEffect((()=>{oe!==Se&&re(Se)}),[oe,Se]);const We=(0,n.useMemo)((()=>Ce.slice(Se*ne,Se*ne+ne)),[Ce,Se,ne]),Ie=(0,n.useMemo)((()=>Ce.reduce(((e,o)=>e+(Number(o.totalamount)||0)),0)),[Ce]),ze=(0,n.useMemo)((()=>We.reduce(((e,o)=>e+(Number(o.totalamount)||0)),0)),[We]);if(ye)return ke;const Re=[{idx:0,label:"All Invoices",color:_,icon:S.Uhn,value:null!==(e=null===fe||void 0===fe?void 0:fe.totalcount)&&void 0!==e?e:0},{idx:1,label:"Open",color:"#ef4444",icon:S.G6c,value:null!==(o=null===fe||void 0===fe?void 0:fe.pendingcount)&&void 0!==o?o:0},{idx:2,label:"Overdue",color:"#f59e0b",icon:S.tMO,value:null!==(r=null===fe||void 0===fe?void 0:fe.overduecount)&&void 0!==r?r:0},{idx:3,label:"Paid",color:"#10b981",icon:S.cAP,value:null!==(s=null===fe||void 0===fe?void 0:fe.paidcount)&&void 0!==s?s:0}],Ye=J[te];return(0,D.jsxs)(D.Fragment,{children:[(le||we)&&(0,D.jsx)(I.A,{}),(0,D.jsx)(R.A,{title:"Invoices",subtitle:"Live \xb7 Viewing ".concat(Ye.label.toLowerCase()," invoices"),live:!0,action:(0,D.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:1,px:1.5,py:.875,borderRadius:999,bgcolor:"#ffffff",border:"1.5px solid ".concat(X(_)),color:_,fontWeight:800,fontSize:12},children:[(0,D.jsx)(S.YHz,{size:14}),(0,D.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:B,letterSpacing:.4,textTransform:"uppercase"},children:"Grand Total"}),(0,D.jsx)(x.A,{sx:{fontWeight:800,color:_,fontSize:13},children:Q(Ie)})]})}),(0,D.jsx)(h.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:Re.map((e=>{const o=e.icon;return(0,D.jsx)(h.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,D.jsx)(d.A,{onClick:()=>{se(e.idx),re(0)},sx:{cursor:"pointer",height:"100%"},children:(0,D.jsx)(Y.A,{title:e.label,value:e.value,icon:(0,D.jsx)(o,{size:20}),color:e.color,loading:pe})})},e.idx)}))}),(0,D.jsx)(u.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:L/8,borderTopRightRadius:L/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:N,borderBottom:0,background:"#fff"},children:(0,D.jsxs)(f.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,D.jsx)(f.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:N,borderRadius:4}},children:Z.map((e=>{var o;const r=J[e],n=r.icon,i=te===e,t=null!==(o=null===fe||void 0===fe?void 0:fe[r.countKey])&&void 0!==o?o:0;return(0,D.jsxs)(d.A,{onClick:()=>{se(e),re(0)},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:999,border:"1px solid ".concat(i?r.color:N),bgcolor:i?r.color:K,color:i?"#fff":B,fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:i?r.color:"#cbd5e1",bgcolor:i?r.color:O}},children:[(0,D.jsx)(c.A,{sx:{width:{xs:20,md:22},height:{xs:20,md:22},bgcolor:i?"rgba(255,255,255,0.22)":q(r.color),color:i?"#fff":r.color},children:(0,D.jsx)(n,{size:12})}),(0,D.jsx)(x.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:r.label}),(0,D.jsx)(d.A,{sx:{minWidth:{xs:20,md:24},height:{xs:18,md:20},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:i?"rgba(255,255,255,0.22)":O,color:i?"#fff":B,border:"none"},children:t})]},e)}))}),(0,D.jsx)(d.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,D.jsx)(z.A,{value:ae,onChange:de,onDebouncedChange:ue,placeholder:"Search invoices (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat((Me=_,G(Me,"26")))}}})})]})}),(0,D.jsxs)(u.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:L/8,borderBottomRightRadius:L/8,border:"1px solid",borderColor:N,overflow:"hidden",background:"#fff"},children:[ee?(0,D.jsx)(D.Fragment,{children:be?(0,D.jsx)(d.A,{sx:{p:1.5},children:(0,D.jsx)(M.r,{col:4})}):0===We.length?(0,D.jsxs)(f.A,{alignItems:"center",spacing:1.5,sx:{py:6,px:2},children:[(0,D.jsx)(c.A,{sx:{width:64,height:64,bgcolor:q("#94a3b8"),color:H},children:(0,D.jsx)(S.GdF,{size:28})}),(0,D.jsx)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:F},children:"No invoices to show"}),(0,D.jsx)(x.A,{variant:"caption",sx:{color:B,textAlign:"center"},children:ae?"Try a different keyword.":"No ".concat(Ye.label.toLowerCase()," invoices for this filter.")})]}):(0,D.jsx)(T.nV,{children:We.map(((e,o)=>{var r;const n=2===te||e.duedate&&l()(e.duedate).isBefore(l()(),"day")&&3!==te;return(0,D.jsx)(T.pg,{accent:_,header:(0,D.jsxs)(f.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,D.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,D.jsx)(V,{color:_,size:36,children:(0,D.jsx)(S.Itr,{size:18})}),(0,D.jsxs)(f.A,{spacing:.25,sx:{minWidth:0},children:[(0,D.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:F},noWrap:!0,children:e.tenantname||"\u2014"}),e.contactperson&&(0,D.jsx)(x.A,{variant:"caption",sx:{color:B},noWrap:!0,children:e.contactperson})]})]}),(0,D.jsx)(p.A,{title:"Preview invoice",placement:"left",children:(0,D.jsx)(g.A,{size:"small",onClick:()=>{ce(!0),setTimeout((()=>{ce(!1),P("/nearle/invoice/preview",{state:e})}),500)},sx:{flexShrink:0,bgcolor:q(_),color:_,border:"1px solid ".concat(X(_)),"&:hover":{bgcolor:_,color:"#fff"}},children:(0,D.jsx)(S.U3x,{size:16})})})]}),children:(0,D.jsxs)(T.FG,{children:[(0,D.jsx)(T.pY,{label:"Invoice ID",children:(0,D.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:U("#0ea5e9"),border:"1px solid ".concat(X("#0ea5e9")),color:"#0ea5e9",fontSize:11,fontWeight:800},children:[(0,D.jsx)(S.GdF,{size:12})," ",e.invoiceno||"\u2014"]})}),(0,D.jsx)(T.pY,{label:"Amount",align:"right",children:(0,D.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(X(_)),color:_,fontSize:11,fontWeight:800,justifyContent:"center"},children:[(0,D.jsx)(S.YHz,{size:11}),Q(e.totalamount).replace("\u20b9","").trim()]})}),(0,D.jsx)(T.pY,{label:"Invoice Date",children:(0,D.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,D.jsx)(S.auT,{size:12,color:H}),(0,D.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:F},noWrap:!0,children:e.transactiondate?l()(e.transactiondate).format("DD/MM/YYYY"):"\u2014"})]})}),(0,D.jsx)(T.pY,{label:"Due Date",children:(0,D.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,D.jsx)(S.auT,{size:12,color:n&&3!==te?"#ef4444":H}),(0,D.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:n&&3!==te?"#ef4444":F},noWrap:!0,children:e.duedate?l()(e.duedate).format("DD/MM/YYYY"):"\u2014"})]})}),(0,D.jsx)(T.pY,{label:"Items",children:(0,D.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.875,py:.25,borderRadius:999,bgcolor:U("#14b8a6"),border:"1px solid ".concat(X("#14b8a6")),color:"#14b8a6",fontSize:11,fontWeight:800,minWidth:44,justifyContent:"center"},children:[(0,D.jsx)(S.gsJ,{size:11})," ",null!==(r=e.itemcount)&&void 0!==r?r:0]})})]})},e.invoiceno||o)}))})}):(0,D.jsx)(m.A,{sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:X(_),borderRadius:8,"&:hover":{backgroundColor:_}},"&::-webkit-scrollbar-track":{backgroundColor:O}},children:(0,D.jsxs)(j.A,{stickyHeader:!0,sx:{minWidth:{xs:880,md:1060}},children:[(0,D.jsx)(b.A,{children:(0,D.jsxs)(A.A,{sx:{"& th":{backgroundColor:O,color:B,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(N),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,D.jsx)(v.A,{children:"#"}),(0,D.jsx)(v.A,{children:"Client"}),(0,D.jsx)(v.A,{children:"Invoice ID"}),(0,D.jsx)(v.A,{children:"Invoice Date"}),(0,D.jsx)(v.A,{children:"Due Date"}),(0,D.jsx)(v.A,{align:"center",children:"Items"}),(0,D.jsx)(v.A,{align:"right",children:"Amount"}),(0,D.jsx)(v.A,{align:"center",children:"Action"})]})}),(0,D.jsxs)(w.A,{children:[be&&(0,D.jsx)(M.r,{col:4}),be||0!==We.length?We.map(((e,o)=>{var r;const n=2===te||e.duedate&&l()(e.duedate).isBefore(l()(),"day")&&3!==te;return(0,D.jsxs)(A.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(E),py:{xs:1,md:1.5},px:{xs:1,md:2},verticalAlign:"top"},"&:hover":{backgroundColor:O}},children:[(0,D.jsx)(v.A,{children:(0,D.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:H},children:String(Se*ne+o+1).padStart(2,"0")})}),(0,D.jsx)(v.A,{children:(0,D.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,D.jsx)(V,{color:_,size:36,children:(0,D.jsx)(S.Itr,{size:18})}),(0,D.jsxs)(f.A,{spacing:.25,sx:{minWidth:0},children:[(0,D.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:F,whiteSpace:"nowrap"},children:e.tenantname||"\u2014"}),e.contactperson&&(0,D.jsx)(x.A,{variant:"caption",sx:{color:B},children:e.contactperson})]})]})}),(0,D.jsx)(v.A,{children:(0,D.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:U("#0ea5e9"),border:"1px solid ".concat(X("#0ea5e9")),color:"#0ea5e9",fontSize:11,fontWeight:800},children:[(0,D.jsx)(S.GdF,{size:12})," ",e.invoiceno||"\u2014"]})}),(0,D.jsx)(v.A,{children:(0,D.jsxs)(f.A,{spacing:.25,children:[(0,D.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,D.jsx)(S.auT,{size:12,color:H}),(0,D.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:F,whiteSpace:"nowrap"},children:e.transactiondate?l()(e.transactiondate).format("DD/MM/YYYY"):"\u2014"})]}),(0,D.jsx)(x.A,{variant:"caption",sx:{color:B,pl:2},children:e.transactiondate?l()(e.transactiondate).utc().format("hh:mm A"):""})]})}),(0,D.jsx)(v.A,{children:(0,D.jsxs)(f.A,{spacing:.25,children:[(0,D.jsxs)(f.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,D.jsx)(S.auT,{size:12,color:n&&3!==te?"#ef4444":H}),(0,D.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:n&&3!==te?"#ef4444":F,whiteSpace:"nowrap"},children:e.duedate?l()(e.duedate).format("DD/MM/YYYY"):"\u2014"})]}),(0,D.jsx)(x.A,{variant:"caption",sx:{color:B,pl:2},children:e.duedate?l()(e.duedate).utc().format("hh:mm A"):""})]})}),(0,D.jsx)(v.A,{align:"center",children:(0,D.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.875,py:.25,borderRadius:999,bgcolor:U("#14b8a6"),border:"1px solid ".concat(X("#14b8a6")),color:"#14b8a6",fontSize:11,fontWeight:800,minWidth:44,justifyContent:"center"},children:[(0,D.jsx)(S.gsJ,{size:11})," ",null!==(r=e.itemcount)&&void 0!==r?r:0]})}),(0,D.jsx)(v.A,{align:"right",children:(0,D.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(X(_)),color:_,fontSize:11,fontWeight:800,minWidth:110,justifyContent:"center"},children:[(0,D.jsx)(S.YHz,{size:11}),Q(e.totalamount).replace("\u20b9","").trim()]})}),(0,D.jsx)(v.A,{align:"center",children:(0,D.jsx)(p.A,{title:"Preview invoice",placement:"left",children:(0,D.jsx)(g.A,{size:"small",onClick:()=>{ce(!0),setTimeout((()=>{ce(!1),P("/nearle/invoice/preview",{state:e})}),500)},sx:{bgcolor:q(_),color:_,border:"1px solid ".concat(X(_)),"&:hover":{bgcolor:_,color:"#fff"}},children:(0,D.jsx)(S.U3x,{size:16})})})})]},e.invoiceno||o)})):(0,D.jsx)(A.A,{children:(0,D.jsx)(v.A,{colSpan:8,sx:{py:6},children:(0,D.jsxs)(f.A,{alignItems:"center",spacing:1.5,children:[(0,D.jsx)(c.A,{sx:{width:64,height:64,bgcolor:q("#94a3b8"),color:H},children:(0,D.jsx)(S.GdF,{size:28})}),(0,D.jsx)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:F},children:"No invoices to show"}),(0,D.jsx)(x.A,{variant:"caption",sx:{color:B},children:ae?"Try a different keyword.":"No ".concat(Ye.label.toLowerCase()," invoices for this filter.")})]})})})]})]})}),(0,D.jsx)(y.A,{}),(0,D.jsxs)(f.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",sx:{px:2,py:1,background:"#ffffff"},children:[(0,D.jsxs)(x.A,{variant:"caption",sx:{fontWeight:800,color:B,letterSpacing:.6,textTransform:"uppercase"},children:["Page total \xb7 ",Q(ze)]}),(0,D.jsx)(k.A,{rowsPerPageOptions:[5,10,25,100],component:"div",count:Ce.length,rowsPerPage:ne,page:Se,onPageChange:(e,o)=>re(o),onRowsPerPageChange:e=>{var o;ie(+(null===e||void 0===e||null===(o=e.target)||void 0===o?void 0:o.value)),re(0)},sx:{"& .MuiTablePagination-toolbar":{minHeight:40,px:0},"& .MuiTablePagination-selectLabel, & .MuiTablePagination-displayedRows":{fontWeight:700,color:B}}})]})]}),(0,D.jsx)(i.sv,{})]});var Me}},27001:(e,o,r)=>{r.d(o,{A:()=>l});var n=r(93230),i=r(16491),t=r(82053),s=r(44414);function l(e){let{title:o,subtitle:r,live:l=!1,action:c}=e;return(0,s.jsxs)(n.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,s.jsxs)(i.A,{sx:{minWidth:0},children:[(0,s.jsx)(t.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:o}),r&&(0,s.jsxs)(n.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[l&&(0,s.jsx)(i.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,s.jsx)(t.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:r})]})]}),c&&(0,s.jsx)(i.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:c})]})}},36803:(e,o,r)=>{r.d(o,{A:()=>x});var n=r(48089),i=r(50704),t=r(93230),s=r(16491),l=r(82053),c=r(82917),a=r(41413),d=r(44414);function x(e){let{title:o,value:r,icon:x,color:h="#662582",caption:u,loading:f=!1}=e;return(0,d.jsx)(n.A,{sx:{height:"100%"},children:(0,d.jsx)(i.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(t.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(s.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(l.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:o}),f?(0,d.jsx)(c.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(l.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),u&&(0,d.jsx)(l.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),x&&(0,d.jsx)(a.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},56311:(e,o,r)=>{r.d(o,{A:()=>u});var n=r(89379),i=r(9950),t=r(2660),s=r(2046),l=r(83274),c=r(25333),a=r(97125),d=r(7762),x=r(52097),h=r(44414);const u=e=>{let{value:o,onChange:r,onDebouncedChange:u,debounceTime:f=500,placeholder:p="Search (ctrl+k)",sx:g}=e;const m=(0,i.useRef)(null),[j]=(0,x.d7)(o,f);return(0,i.useEffect)((()=>{u&&u(j)}),[j,u]),(0,i.useEffect)((()=>{const e=e=>{var o;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(o=m.current)||void 0===o||o.focus());"Escape"===e.key&&document.activeElement===m.current&&m.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(t.A,{sx:(0,n.A)({},g),inputRef:m,placeholder:p,autoComplete:"off",value:o,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,h.jsx)(s.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(a.A,{})}),endAdornment:(0,h.jsx)(l.A,{title:"Clear",children:(0,h.jsx)(c.A,{sx:{visibility:o?"visible":"hidden"},onClick:()=>r(""),children:(0,h.jsx)(d.A,{})})})})}},96646:(e,o,r)=>{r.d(o,{r:()=>c});var n=r(9213),i=r(21671),t=r(82917),s=r(93230),l=r(44414);const c=e=>{let{rowsPerPage:o=5,col:r=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(o)).map(((e,o)=>(0,l.jsxs)(n.A,{children:[(0,l.jsx)(i.A,{children:(0,l.jsx)(t.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(i.A,{children:(0,l.jsx)(t.A,{variant:"text",width:30})}),Array.from({length:r}).map(((e,o)=>(0,l.jsx)(i.A,{children:(0,l.jsxs)(s.A,{spacing:.5,children:[(0,l.jsx)(t.A,{variant:"text",width:100}),(0,l.jsx)(t.A,{variant:"text",width:80})]})},o))),(0,l.jsx)(i.A,{children:(0,l.jsx)(t.A,{variant:"text",width:150})}),(0,l.jsx)(i.A,{children:(0,l.jsx)(t.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(i.A,{align:"center",children:(0,l.jsxs)(s.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(t.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(t.A,{variant:"circular",width:28,height:28})]})})]},o)))})}}}]); \ No newline at end of file diff --git a/build/static/js/6165.733094c1.chunk.js b/build/static/js/6165.733094c1.chunk.js deleted file mode 100644 index 2b06b10..0000000 --- a/build/static/js/6165.733094c1.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6165],{23787:(e,o,r)=>{r.d(o,{FG:()=>p,nV:()=>x,pY:()=>u,pg:()=>h});var n=r(89379),i=r(80045),t=r(93230),s=r(2235),l=r(16491),c=r(82053),a=r(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:o,scroll:r=!1,onScroll:s,sx:l}=e,c=(0,i.A)(e,d);return(0,a.jsx)(t.A,(0,n.A)((0,n.A)({spacing:1.25,onScroll:s,sx:(0,n.A)((0,n.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},c),{},{children:o}))},h=e=>{let{accent:o="#662582",header:r,footer:i,selected:t=!1,onClick:c,children:d,sx:x}=e;return(0,a.jsxs)(s.A,{elevation:0,onClick:c,sx:(0,n.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:t?o:"#e2e8f0",background:t?"".concat(o,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,a.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:o}}),(0,a.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[r,d,i]})]})},p=e=>{let{children:o,columns:r=2,sx:i}=e;return(0,a.jsx)(l.A,{sx:(0,n.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},i),children:o})},u=e=>{let{label:o,value:r,children:n,full:i=!1,align:t="left"}=e;return(0,a.jsxs)(l.A,{sx:{gridColumn:i?"1 / -1":"auto",minWidth:0,textAlign:t},children:[(0,a.jsx)(c.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:o}),(0,a.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==n?n:(0,a.jsx)(c.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},26165:(e,o,r)=>{r.r(o),r.d(o,{default:()=>$});var n=r(9950),i=r(28429),t=r(36150),s=r(4159),l=r.n(s),c=r(41413),a=r(47223),d=r(2235),x=r(93230),h=r(82053),p=r(16491),u=r(60899),g=r(83274),f=r(25333),m=r(1320),b=r(15769),j=r(69780),A=r(9213),v=r(21671),w=r(34075),y=r(74745),S=r(6258),C=r(14857),k=r(31222),W=r(81425),z=r(52351),I=r(56311),R=r(96646),Y=r(23787),M=r(44414),T=r(36220);l().extend(T);const D=16,P="0 8px 24px rgba(15, 23, 42, 0.08)",L="#0f172a",F="#64748b",B="#94a3b8",H="#e2e8f0",N="#f1f5f9",E="#f8fafc",K=(e,o)=>"".concat(e).concat(o),G=e=>K(e,"08"),O=e=>K(e,"18"),U=e=>K(e,"26"),X=e=>K(e,"55"),q="#662582",_="#9255AB",V=e=>{let{color:o,selected:r,size:n=24,children:i}=e;return(0,M.jsx)(c.A,{sx:{width:n,height:n,bgcolor:r?o:O(o),color:r?"#fff":o,transition:"background-color 0.15s, color 0.15s"},children:i})},J={0:{key:"all",label:"All",color:q,icon:k.Uhn,countKey:"totalcount"},1:{key:"open",label:"Open",color:"#ef4444",icon:k.tX0,countKey:"pendingcount"},2:{key:"overdue",label:"Overdue",color:"#f59e0b",icon:k.tMO,countKey:"overduecount"},3:{key:"paid",label:"Paid",color:"#10b981",icon:k.mU9,countKey:"paidcount"}},Z=[0,1,2,3];function Q(e){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(Number(e)||0)}const $=()=>{var e,o,r,s;const T=(0,i.Zp)(),K=(0,C.A)(),$=(0,a.A)(K.breakpoints.down("md")),[ee,oe]=(0,n.useState)(0),[re,ne]=(0,n.useState)(10),[ie,te]=(0,n.useState)(0),[se,le]=(0,n.useState)(!1),[ce,ae]=(0,n.useState)(""),[de,xe]=(0,n.useState)(""),he=n.useCallback((e=>{xe(e),oe(0)}),[]),{data:pe,isLoading:ue,isError:ge,error:fe}=(0,t.I)({queryKey:["invoiceInsight"],queryFn:W.Y8,refetchInterval:3e5}),{data:me,isLoading:be,isError:je,error:Ae}=(0,t.I)({queryKey:[ie],queryFn:W.XC,refetchInterval:3e5}),ve=ue||be,we=ge||je,ye=(null===fe||void 0===fe?void 0:fe.message)||(null===Ae||void 0===Ae?void 0:Ae.message),Se=(0,n.useMemo)((()=>{if(!me)return[];if(!de)return me;const e=de.toLowerCase().trim();return me.filter((o=>[o.tenantname,o.contactperson,String(o.invoiceno)].filter(Boolean).some((o=>String(o).toLowerCase().includes(e)))))}),[me,de]),Ce=(0,n.useMemo)((()=>{const e=Math.max(0,Math.ceil(Se.length/re)-1);return Math.min(ee,e)}),[Se.length,ee,re]);n.useEffect((()=>{ee!==Ce&&oe(Ce)}),[ee,Ce]);const ke=(0,n.useMemo)((()=>Se.slice(Ce*re,Ce*re+re)),[Se,Ce,re]),We=(0,n.useMemo)((()=>Se.reduce(((e,o)=>e+(Number(o.totalamount)||0)),0)),[Se]),ze=(0,n.useMemo)((()=>ke.reduce(((e,o)=>e+(Number(o.totalamount)||0)),0)),[ke]);if(we)return ye;const Ie=[{idx:0,label:"All Invoices",color:q,icon:k.Uhn,value:null!==(e=null===pe||void 0===pe?void 0:pe.totalcount)&&void 0!==e?e:0},{idx:1,label:"Open",color:"#ef4444",icon:k.tX0,value:null!==(o=null===pe||void 0===pe?void 0:pe.pendingcount)&&void 0!==o?o:0},{idx:2,label:"Overdue",color:"#f59e0b",icon:k.tMO,value:null!==(r=null===pe||void 0===pe?void 0:pe.overduecount)&&void 0!==r?r:0},{idx:3,label:"Paid",color:"#10b981",icon:k.mU9,value:null!==(s=null===pe||void 0===pe?void 0:pe.paidcount)&&void 0!==s?s:0}],Re=J[ie];return(0,M.jsxs)(M.Fragment,{children:[(se||ve)&&(0,M.jsx)(z.A,{}),(0,M.jsx)(d.A,{elevation:0,sx:{mb:{xs:1.5,md:2},p:{xs:1.5,sm:2,md:2.5},borderRadius:D/8,border:"1px solid",borderColor:H,background:"linear-gradient(135deg, ".concat(G(q)," 0%, ").concat(G(_)," 100%)"),boxShadow:P},children:(0,M.jsxs)(x.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",spacing:{xs:1.5,sm:2},children:[(0,M.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:{xs:1.25,sm:1.75},children:[(0,M.jsx)(c.A,{sx:{width:{xs:40,sm:48},height:{xs:40,sm:48},bgcolor:q,color:"#fff",boxShadow:"0 6px 18px ".concat(U(q))},children:(0,M.jsx)(k.GdF,{size:22})}),(0,M.jsxs)(x.A,{children:[(0,M.jsx)(h.A,{variant:"h3",sx:{fontWeight:800,color:L,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"}},children:"Invoices"}),(0,M.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[(0,M.jsx)(p.A,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:"#10b981",boxShadow:"0 0 0 4px rgba(16,185,129,0.18)"}}),(0,M.jsxs)(h.A,{variant:"caption",sx:{color:F,fontWeight:600},children:["Live \xb7 Viewing ",Re.label.toLowerCase()," invoices"]})]})]})]}),(0,M.jsxs)(p.A,{sx:{display:"inline-flex",alignItems:"center",gap:1,px:1.5,py:.875,borderRadius:999,bgcolor:G(q),border:"1.5px solid ".concat(X(q)),color:q,fontWeight:800,fontSize:12},children:[(0,M.jsx)(k.YHz,{size:14}),(0,M.jsx)(h.A,{variant:"caption",sx:{fontWeight:800,color:F,letterSpacing:.4,textTransform:"uppercase"},children:"Grand Total"}),(0,M.jsx)(h.A,{sx:{fontWeight:800,color:q,fontSize:13},children:Q(We)})]})]})}),(0,M.jsx)(u.Ay,{container:!0,spacing:{xs:1.25,sm:1.5,md:2},sx:{mt:"1px"},children:Ie.map((e=>{const o=e.icon,r=ie===e.idx;return(0,M.jsx)(u.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,M.jsxs)(d.A,{elevation:0,onClick:()=>{te(e.idx),oe(0)},sx:{position:"relative",overflow:"hidden",cursor:"pointer",p:{xs:1.25,sm:1.75,md:2.25},borderRadius:D/8,border:"1px solid",borderColor:r?X(e.color):H,background:r?G(e.color):"#fff",boxShadow:r?"0 0 0 3px ".concat(U(e.color)):"none",transition:"transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s","&:hover":{transform:"translateY(-3px)",boxShadow:P,borderColor:X(e.color)}},children:[(0,M.jsx)(p.A,{sx:{position:"absolute",top:0,left:0,right:0,height:3,background:"linear-gradient(90deg, ".concat(e.color," 0%, ").concat(O(e.color)," 100%)")}}),(0,M.jsxs)(x.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,M.jsxs)(x.A,{spacing:.5,sx:{minWidth:0,flex:1},children:[(0,M.jsx)(h.A,{variant:"caption",sx:{color:F,fontWeight:700,letterSpacing:.4,textTransform:"uppercase",fontSize:{xs:10,sm:11},whiteSpace:"nowrap"},children:e.label}),(0,M.jsx)(h.A,{sx:{fontWeight:800,color:L,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"}},children:e.value})]}),(0,M.jsx)(c.A,{sx:{width:{xs:36,sm:42,md:48},height:{xs:36,sm:42,md:48},bgcolor:O(e.color),color:e.color,boxShadow:"inset 0 0 0 1px ".concat(X(e.color)),flexShrink:0},children:(0,M.jsx)(o,{size:20})})]})]})},e.idx)}))}),(0,M.jsx)(d.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:D/8,borderTopRightRadius:D/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:H,borderBottom:0,background:"#fff"},children:(0,M.jsxs)(x.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,M.jsx)(x.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:H,borderRadius:4}},children:Z.map((e=>{var o;const r=J[e],n=r.icon,i=ie===e,t=null!==(o=null===pe||void 0===pe?void 0:pe[r.countKey])&&void 0!==o?o:0;return(0,M.jsxs)(p.A,{onClick:()=>{te(e),oe(0)},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:999,border:"1.5px solid ".concat(i?r.color:X(r.color)),bgcolor:i?r.color:G(r.color),color:i?"#fff":r.color,fontWeight:700,boxShadow:i?"0 6px 18px ".concat(U(r.color)):"none",transition:"all 0.18s","&:hover":{borderColor:r.color,boxShadow:i?"0 6px 18px ".concat(U(r.color)):"0 0 0 3px ".concat(U(r.color))}},children:[(0,M.jsx)(c.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:i?"rgba(255,255,255,0.22)":O(r.color),color:i?"#fff":r.color},children:(0,M.jsx)(n,{size:13})}),(0,M.jsx)(h.A,{variant:"caption",sx:{fontWeight:800,fontSize:{xs:11.5,md:13},lineHeight:1},children:r.label}),(0,M.jsx)(p.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:800,bgcolor:i?"rgba(255,255,255,0.22)":"#fff",color:i?"#fff":r.color,border:i?"none":"1px solid ".concat(X(r.color))},children:t})]},e)}))}),(0,M.jsx)(p.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,M.jsx)(I.A,{value:ce,onChange:ae,onDebouncedChange:he,placeholder:"Search invoices (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:G(q),"& fieldset":{borderColor:X(q),borderWidth:1.5},"&:hover fieldset":{borderColor:q},"&.Mui-focused fieldset":{borderColor:q,borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(U(q))}}})})]})}),(0,M.jsxs)(d.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:D/8,borderBottomRightRadius:D/8,border:"1px solid",borderColor:H,overflow:"hidden",background:"#fff"},children:[$?(0,M.jsx)(M.Fragment,{children:be?(0,M.jsx)(p.A,{sx:{p:1.5},children:(0,M.jsx)(R.r,{col:4})}):0===ke.length?(0,M.jsxs)(x.A,{alignItems:"center",spacing:1.5,sx:{py:6,px:2},children:[(0,M.jsx)(c.A,{sx:{width:64,height:64,bgcolor:O("#94a3b8"),color:B},children:(0,M.jsx)(k.GdF,{size:28})}),(0,M.jsx)(h.A,{variant:"subtitle1",sx:{fontWeight:700,color:L},children:"No invoices to show"}),(0,M.jsx)(h.A,{variant:"caption",sx:{color:F,textAlign:"center"},children:ce?"Try a different keyword.":"No ".concat(Re.label.toLowerCase()," invoices for this filter.")})]}):(0,M.jsx)(Y.nV,{children:ke.map(((e,o)=>{var r;const n=2===ie||e.duedate&&l()(e.duedate).isBefore(l()(),"day")&&3!==ie;return(0,M.jsx)(Y.pg,{accent:q,header:(0,M.jsxs)(x.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,M.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,M.jsx)(V,{color:q,size:36,children:(0,M.jsx)(k.Itr,{size:18})}),(0,M.jsxs)(x.A,{spacing:.25,sx:{minWidth:0},children:[(0,M.jsx)(h.A,{variant:"subtitle2",sx:{fontWeight:700,color:L},noWrap:!0,children:e.tenantname||"\u2014"}),e.contactperson&&(0,M.jsx)(h.A,{variant:"caption",sx:{color:F},noWrap:!0,children:e.contactperson})]})]}),(0,M.jsx)(g.A,{title:"Preview invoice",placement:"left",children:(0,M.jsx)(f.A,{size:"small",onClick:()=>{le(!0),setTimeout((()=>{le(!1),T("/nearle/invoice/preview",{state:e})}),500)},sx:{flexShrink:0,bgcolor:O(q),color:q,border:"1px solid ".concat(X(q)),"&:hover":{bgcolor:q,color:"#fff"}},children:(0,M.jsx)(k.U3x,{size:16})})})]}),children:(0,M.jsxs)(Y.FG,{children:[(0,M.jsx)(Y.pY,{label:"Invoice ID",children:(0,M.jsxs)(p.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:G("#0ea5e9"),border:"1px solid ".concat(X("#0ea5e9")),color:"#0ea5e9",fontSize:11,fontWeight:800},children:[(0,M.jsx)(k.GdF,{size:12})," ",e.invoiceno||"\u2014"]})}),(0,M.jsx)(Y.pY,{label:"Amount",align:"right",children:(0,M.jsxs)(p.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:G(q),border:"1px solid ".concat(X(q)),color:q,fontSize:11,fontWeight:800,justifyContent:"center"},children:[(0,M.jsx)(k.YHz,{size:11}),Q(e.totalamount).replace("\u20b9","").trim()]})}),(0,M.jsx)(Y.pY,{label:"Invoice Date",children:(0,M.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,M.jsx)(k.auT,{size:12,color:B}),(0,M.jsx)(h.A,{variant:"caption",sx:{fontWeight:700,color:L},noWrap:!0,children:e.transactiondate?l()(e.transactiondate).format("DD/MM/YYYY"):"\u2014"})]})}),(0,M.jsx)(Y.pY,{label:"Due Date",children:(0,M.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,M.jsx)(k.auT,{size:12,color:n&&3!==ie?"#ef4444":B}),(0,M.jsx)(h.A,{variant:"caption",sx:{fontWeight:700,color:n&&3!==ie?"#ef4444":L},noWrap:!0,children:e.duedate?l()(e.duedate).format("DD/MM/YYYY"):"\u2014"})]})}),(0,M.jsx)(Y.pY,{label:"Items",children:(0,M.jsxs)(p.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.875,py:.25,borderRadius:999,bgcolor:G("#14b8a6"),border:"1px solid ".concat(X("#14b8a6")),color:"#14b8a6",fontSize:11,fontWeight:800,minWidth:44,justifyContent:"center"},children:[(0,M.jsx)(k.gsJ,{size:11})," ",null!==(r=e.itemcount)&&void 0!==r?r:0]})})]})},e.invoiceno||o)}))})}):(0,M.jsx)(m.A,{sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:X(q),borderRadius:8,"&:hover":{backgroundColor:q}},"&::-webkit-scrollbar-track":{backgroundColor:E}},children:(0,M.jsxs)(b.A,{stickyHeader:!0,sx:{minWidth:{xs:880,md:1060}},children:[(0,M.jsx)(j.A,{children:(0,M.jsxs)(A.A,{sx:{"& th":{backgroundColor:E,color:F,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(H),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,M.jsx)(v.A,{children:"#"}),(0,M.jsx)(v.A,{children:"Client"}),(0,M.jsx)(v.A,{children:"Invoice ID"}),(0,M.jsx)(v.A,{children:"Invoice Date"}),(0,M.jsx)(v.A,{children:"Due Date"}),(0,M.jsx)(v.A,{align:"center",children:"Items"}),(0,M.jsx)(v.A,{align:"right",children:"Amount"}),(0,M.jsx)(v.A,{align:"center",children:"Action"})]})}),(0,M.jsxs)(w.A,{children:[be&&(0,M.jsx)(R.r,{col:4}),be||0!==ke.length?ke.map(((e,o)=>{var r;const n=2===ie||e.duedate&&l()(e.duedate).isBefore(l()(),"day")&&3!==ie;return(0,M.jsxs)(A.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(N),py:{xs:1,md:1.5},px:{xs:1,md:2},verticalAlign:"top"},"&:hover":{backgroundColor:E}},children:[(0,M.jsx)(v.A,{children:(0,M.jsx)(h.A,{variant:"caption",sx:{fontWeight:700,color:B},children:String(Ce*re+o+1).padStart(2,"0")})}),(0,M.jsx)(v.A,{children:(0,M.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,M.jsx)(V,{color:q,size:36,children:(0,M.jsx)(k.Itr,{size:18})}),(0,M.jsxs)(x.A,{spacing:.25,sx:{minWidth:0},children:[(0,M.jsx)(h.A,{variant:"subtitle2",sx:{fontWeight:700,color:L,whiteSpace:"nowrap"},children:e.tenantname||"\u2014"}),e.contactperson&&(0,M.jsx)(h.A,{variant:"caption",sx:{color:F},children:e.contactperson})]})]})}),(0,M.jsx)(v.A,{children:(0,M.jsxs)(p.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:G("#0ea5e9"),border:"1px solid ".concat(X("#0ea5e9")),color:"#0ea5e9",fontSize:11,fontWeight:800},children:[(0,M.jsx)(k.GdF,{size:12})," ",e.invoiceno||"\u2014"]})}),(0,M.jsx)(v.A,{children:(0,M.jsxs)(x.A,{spacing:.25,children:[(0,M.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,M.jsx)(k.auT,{size:12,color:B}),(0,M.jsx)(h.A,{variant:"caption",sx:{fontWeight:700,color:L,whiteSpace:"nowrap"},children:e.transactiondate?l()(e.transactiondate).format("DD/MM/YYYY"):"\u2014"})]}),(0,M.jsx)(h.A,{variant:"caption",sx:{color:F,pl:2},children:e.transactiondate?l()(e.transactiondate).utc().format("hh:mm A"):""})]})}),(0,M.jsx)(v.A,{children:(0,M.jsxs)(x.A,{spacing:.25,children:[(0,M.jsxs)(x.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,M.jsx)(k.auT,{size:12,color:n&&3!==ie?"#ef4444":B}),(0,M.jsx)(h.A,{variant:"caption",sx:{fontWeight:700,color:n&&3!==ie?"#ef4444":L,whiteSpace:"nowrap"},children:e.duedate?l()(e.duedate).format("DD/MM/YYYY"):"\u2014"})]}),(0,M.jsx)(h.A,{variant:"caption",sx:{color:F,pl:2},children:e.duedate?l()(e.duedate).utc().format("hh:mm A"):""})]})}),(0,M.jsx)(v.A,{align:"center",children:(0,M.jsxs)(p.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.875,py:.25,borderRadius:999,bgcolor:G("#14b8a6"),border:"1px solid ".concat(X("#14b8a6")),color:"#14b8a6",fontSize:11,fontWeight:800,minWidth:44,justifyContent:"center"},children:[(0,M.jsx)(k.gsJ,{size:11})," ",null!==(r=e.itemcount)&&void 0!==r?r:0]})}),(0,M.jsx)(v.A,{align:"right",children:(0,M.jsxs)(p.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:G(q),border:"1px solid ".concat(X(q)),color:q,fontSize:11,fontWeight:800,minWidth:110,justifyContent:"center"},children:[(0,M.jsx)(k.YHz,{size:11}),Q(e.totalamount).replace("\u20b9","").trim()]})}),(0,M.jsx)(v.A,{align:"center",children:(0,M.jsx)(g.A,{title:"Preview invoice",placement:"left",children:(0,M.jsx)(f.A,{size:"small",onClick:()=>{le(!0),setTimeout((()=>{le(!1),T("/nearle/invoice/preview",{state:e})}),500)},sx:{bgcolor:O(q),color:q,border:"1px solid ".concat(X(q)),"&:hover":{bgcolor:q,color:"#fff"}},children:(0,M.jsx)(k.U3x,{size:16})})})})]},e.invoiceno||o)})):(0,M.jsx)(A.A,{children:(0,M.jsx)(v.A,{colSpan:8,sx:{py:6},children:(0,M.jsxs)(x.A,{alignItems:"center",spacing:1.5,children:[(0,M.jsx)(c.A,{sx:{width:64,height:64,bgcolor:O("#94a3b8"),color:B},children:(0,M.jsx)(k.GdF,{size:28})}),(0,M.jsx)(h.A,{variant:"subtitle1",sx:{fontWeight:700,color:L},children:"No invoices to show"}),(0,M.jsx)(h.A,{variant:"caption",sx:{color:F},children:ce?"Try a different keyword.":"No ".concat(Re.label.toLowerCase()," invoices for this filter.")})]})})})]})]})}),(0,M.jsx)(y.A,{}),(0,M.jsxs)(x.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",sx:{px:2,py:1,background:"linear-gradient(135deg, ".concat(G(q)," 0%, ").concat(G(_)," 100%)")},children:[(0,M.jsxs)(h.A,{variant:"caption",sx:{fontWeight:800,color:F,letterSpacing:.6,textTransform:"uppercase"},children:["Page total \xb7 ",Q(ze)]}),(0,M.jsx)(S.A,{rowsPerPageOptions:[5,10,25,100],component:"div",count:Se.length,rowsPerPage:re,page:Ce,onPageChange:(e,o)=>oe(o),onRowsPerPageChange:e=>{var o;ne(+(null===e||void 0===e||null===(o=e.target)||void 0===o?void 0:o.value)),oe(0)},sx:{"& .MuiTablePagination-toolbar":{minHeight:40,px:0},"& .MuiTablePagination-selectLabel, & .MuiTablePagination-displayedRows":{fontWeight:700,color:F}}})]})]}),(0,M.jsx)(i.sv,{})]})}},56311:(e,o,r)=>{r.d(o,{A:()=>p});var n=r(89379),i=r(9950),t=r(2660),s=r(2046),l=r(83274),c=r(25333),a=r(97125),d=r(7762),x=r(52097),h=r(44414);const p=e=>{let{value:o,onChange:r,onDebouncedChange:p,debounceTime:u=500,placeholder:g="Search (ctrl+k)",sx:f}=e;const m=(0,i.useRef)(null),[b]=(0,x.d7)(o,u);return(0,i.useEffect)((()=>{p&&p(b)}),[b,p]),(0,i.useEffect)((()=>{const e=e=>{var o;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(o=m.current)||void 0===o||o.focus());"Escape"===e.key&&document.activeElement===m.current&&m.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(t.A,{sx:(0,n.A)({},f),inputRef:m,placeholder:g,autoComplete:"off",value:o,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,h.jsx)(s.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(a.A,{})}),endAdornment:(0,h.jsx)(l.A,{title:"Clear",children:(0,h.jsx)(c.A,{sx:{visibility:o?"visible":"hidden"},onClick:()=>r(""),children:(0,h.jsx)(d.A,{})})})})}},96646:(e,o,r)=>{r.d(o,{r:()=>c});var n=r(9213),i=r(21671),t=r(82917),s=r(93230),l=r(44414);const c=e=>{let{rowsPerPage:o=5,col:r=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(o)).map(((e,o)=>(0,l.jsxs)(n.A,{children:[(0,l.jsx)(i.A,{children:(0,l.jsx)(t.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(i.A,{children:(0,l.jsx)(t.A,{variant:"text",width:30})}),Array.from({length:r}).map(((e,o)=>(0,l.jsx)(i.A,{children:(0,l.jsxs)(s.A,{spacing:.5,children:[(0,l.jsx)(t.A,{variant:"text",width:100}),(0,l.jsx)(t.A,{variant:"text",width:80})]})},o))),(0,l.jsx)(i.A,{children:(0,l.jsx)(t.A,{variant:"text",width:150})}),(0,l.jsx)(i.A,{children:(0,l.jsx)(t.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(i.A,{align:"center",children:(0,l.jsxs)(s.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(t.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(t.A,{variant:"circular",width:28,height:28})]})})]},o)))})}}}]); \ No newline at end of file diff --git a/build/static/js/6666.d98d718f.chunk.js b/build/static/js/6666.2278dc7d.chunk.js similarity index 62% rename from build/static/js/6666.d98d718f.chunk.js rename to build/static/js/6666.2278dc7d.chunk.js index 519f02d..a70d560 100644 --- a/build/static/js/6666.d98d718f.chunk.js +++ b/build/static/js/6666.2278dc7d.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6666],{54413:(e,s,a)=>{a.r(s),a.d(s,{default:()=>pe});var t=a(80045),i=a(89379),n=a(9950),r=a(98007),l=a(47113),c=a(82215),d=a(99810),o=a(49029),u=a(33516),m=a(48513),p=a(37119),h=a(2527),x=a.n(h);a(55392);x().PolylineOffset={translatePoint:(e,s,a)=>x().point(e.x+s*Math.cos(a),e.y+s*Math.sin(a)),offsetPointLine(e,s){const a=e.length;if(a<2)throw new Error("Line should be defined by at least 2 points");let t,i=e[0];const n=Math.PI/2,r=[];for(let l=1;l=0&&l<=1&&c>=0&&c<=1?x().point(e.x+c*i.x,e.y+c*i.y):null},segmentAsVector:(e,s)=>x().point(s.x-e.x,s.y-e.y),joinLineSegments(e){const s=[];let a=e[0].offset;s.push(a[0]);for(let t=1;te.latLngToLayerPoint(s)));return this.offsetPoints(t,a).map((s=>e.layerPointToLatLng(s)))}};const v=x().Polyline.prototype._projectLatlngs;x().Polyline.prototype._projectLatlngs=function(e,s,a){const t=this.options.offset;if(!t||"number"!==typeof t)return v.call(this,e,s,a);if(!(e[0]instanceof x().LatLng)){for(let t=0;tthis._map.latLngToLayerPoint(e))),n=x().PolylineOffset.offsetPoints(i,t);for(let r=0;r{const e=t,n=e.onTime+e.late,r=s.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),l=r<0,c=a.filter((e=>e.anomaly)),d=a.filter((e=>w.Ys.has(String(e.orderstatus||"").toLowerCase()))).length,o=a.filter((e=>w.yP.has(String(e.orderstatus||"").toLowerCase()))).length,u=null==e.kmDeltaPct?"":e.kmDeltaPct>25?"is-over":e.kmDeltaPct<-5?"is-under":"",m=a.length||1,p=e.onTime+e.late||1,h=Math.round(d/m*60+e.onTime/p*25+(m-e.anomalies)/m*15),x=h>=85?"#16a34a":h>=65?"#f59e0b":"#dc2626",v=h>=85?"Excellent":h>=65?"Acceptable":"Needs review",j=a.filter((e=>e.actualTs)),g=j.reduce(((e,s)=>!e||s.actualTs.isBefore(e)?s.actualTs:e),null),f=j.reduce(((e,s)=>!e||s.actualTs.isAfter(e)?s.actualTs:e),null),N=g&&f?Math.max(0,f.diff(g,"minute")):0,b=a.length>1?Math.round(N/(a.length-1)):0,y=N>0?(e.actualKm/(N/60)).toFixed(1):null,k=a.filter((e=>!e.isLoading&&e.coordsCount>0)),S=k.filter((e=>null!=e.timeDeltaMin&&!e.anomaly)).sort(((e,s)=>e.timeDeltaMin-s.timeDeltaMin))[0]||null,_=k.filter((e=>e.anomaly)).sort(((e,s)=>{const a=Math.abs(e.kmDeltaPct||0)+(e.timeDeltaMin>0?e.timeDeltaMin:0);return Math.abs(s.kmDeltaPct||0)+(s.timeDeltaMin>0?s.timeDeltaMin:0)-a}))[0]||null,F=i.filter(((e,s)=>{var a;const t=null===(a=e.order)||void 0===a?void 0:a.step;return null!=t&&t!==s+1})),M=[];F.forEach((e=>{var s;const a=null===(s=e.order)||void 0===s?void 0:s.step,t=i.findIndex((s=>s.sequenceStep===e.sequenceStep))+1,n=t-a,r=M[M.length-1];r&&r.delta===n&&r.lastActualPos+1===t?(r.items.push({d:e,planned:a,actualPos:t,delta:n}),r.lastActualPos=t):M.push({delta:n,items:[{d:e,planned:a,actualPos:t,delta:n}],lastActualPos:t})}));const C={};s.orders.forEach((e=>{const s=e.trip_number||1;C[s]||(C[s]=[]),C[s].push(e)}));const z=Object.entries(C).sort(((e,s)=>{let[a]=e,[t]=s;return Number(a)-Number(t)})).map((e=>{let[s,a]=e;return{tNum:s,count:a.length,plannedKm:a.reduce(((e,s)=>e+parseFloat(s.kms||0)),0),actualKm:a.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),profit:a.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),delivered:a.filter((e=>w.Ys.has(String(e.orderstatus||"").toLowerCase()))).length}}));return{sum:e,totalSteps:n,totalProfit:r,isLoss:l,deviations:c,delivered:d,skipped:o,stepDeltaPct:u,score:h,scoreColor:x,scoreLabel:v,firstDelivery:g,lastDelivery:f,activeMin:N,avgPerStop:b,avgSpeed:y,bestStep:S,worstStep:_,outOfOrderSteps:F,seqRuns:M,tripList:z}}),[s,a,t,i]),v=null!=r?a.find((e=>e.sequenceStep===r)):null,j=e=>{l((s=>s===e?null:e))},g=function(e){let s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{d:a,planned:t,actualPos:i,delta:n}=e;return(0,C.jsxs)("li",{className:"cdp-seq-diff".concat(r===a.sequenceStep?" is-focused":"").concat(s?"":" is-nested"),onClick:()=>j(a.sequenceStep),children:[(0,C.jsx)("span",{className:"cdp-seq-diff-num",style:{background:(0,w.gM)((t||a.sequenceStep)-1)},children:t||a.sequenceStep}),(0,C.jsxs)("div",{className:"cdp-seq-diff-body",children:[(0,C.jsx)("div",{className:"cdp-seq-diff-title",children:a.deliverycustomer||"Step ".concat(t||a.sequenceStep)}),(0,C.jsxs)("div",{className:"cdp-seq-diff-sub",children:["Visited ",(0,C.jsx)("strong",{children:(0,w.IE)(i)})," ","\xb7 planned ",(0,C.jsx)("strong",{children:(0,w.IE)(t)})]})]}),(0,C.jsx)("span",{className:"cdp-seq-diff-tag",children:n>0?"+".concat(n):"".concat(n)})]},"diff-".concat(a.sequenceStep))},{sum:f,totalSteps:N,totalProfit:b,isLoss:y,deviations:k,delivered:_,skipped:z,stepDeltaPct:A,score:P,scoreColor:E,scoreLabel:D,firstDelivery:L,lastDelivery:q,activeMin:I,avgPerStop:O,avgSpeed:R,bestStep:T,worstStep:H,outOfOrderSteps:Y,seqRuns:V,tripList:K}=x;return(0,C.jsxs)("aside",{id:"compare-data-panel",className:"compare-data-panel".concat(h?" cdp-is-mobile":""),children:[(0,C.jsxs)("div",{className:"cdp-head",children:[(0,C.jsxs)("div",{className:"cdp-head-title",children:[(0,C.jsx)("span",{className:"cdp-rider-dot",style:{background:s.color}}),(0,C.jsxs)("div",{className:"cdp-head-text",children:[(0,C.jsx)("div",{className:"cdp-rider-name",children:s.riderName}),(0,C.jsx)("div",{className:"cdp-head-badge",children:"PLANNED vs ACTUAL"})]})]}),(0,C.jsx)("button",{type:"button",className:"cdp-close",onClick:m,title:"Exit compare","aria-label":"Exit compare",children:(0,C.jsx)(S.m6K,{})})]}),(0,C.jsxs)("div",{className:"cdp-scroll",children:[(0,C.jsx)("section",{className:"cdp-section cdp-score-section",children:(0,C.jsxs)("div",{className:"cdp-score-wrap",children:[(0,C.jsx)("div",{className:"cdp-score-ring",style:{background:"conic-gradient(".concat(E," ").concat(3.6*P,"deg, rgba(15,23,42,0.08) 0deg)")},children:(0,C.jsxs)("div",{className:"cdp-score-inner",children:[(0,C.jsx)("div",{className:"cdp-score-value",style:{color:E},children:P}),(0,C.jsx)("div",{className:"cdp-score-unit",children:"/100"})]})}),(0,C.jsxs)("div",{className:"cdp-score-body",children:[(0,C.jsx)("div",{className:"cdp-score-label",style:{color:E},children:D}),(0,C.jsx)("div",{className:"cdp-score-title",children:"Compliance score"}),(0,C.jsxs)("div",{className:"cdp-score-sub",children:[_,"/",a.length," delivered",f.anomalies>0?" \xb7 ".concat(f.anomalies," deviation").concat(f.anomalies>1?"s":""):"",f.late>0?" \xb7 ".concat(f.late," late"):"",z>0?" \xb7 ".concat(z," skipped"):""]})]})]})}),(0,C.jsxs)("section",{className:"cdp-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head",children:[(0,C.jsx)("span",{className:"cdp-section-icon",children:(0,C.jsx)(S.Zs6,{})}),(0,C.jsx)("span",{className:"cdp-section-title",children:"Day overview"})]}),(0,C.jsxs)("div",{className:"cdp-tiles",children:[(0,C.jsxs)("div",{className:"cdp-tile",children:[(0,C.jsxs)("div",{className:"cdp-tile-label",children:[(0,C.jsx)(S.xI$,{})," Distance"]}),(0,C.jsxs)("div",{className:"cdp-tile-value",children:[f.actualKm.toFixed(1),(0,C.jsx)("span",{className:"cdp-tile-unit",children:"km"})]}),(0,C.jsxs)("div",{className:"cdp-tile-sub",children:["planned ",f.plannedKm.toFixed(1)," km"]})]}),(0,C.jsxs)("div",{className:"cdp-tile".concat(f.anomalies>0?" is-warn":""),children:[(0,C.jsxs)("div",{className:"cdp-tile-label",children:[(0,C.jsx)(S.Wux,{})," Deviation"]}),(0,C.jsx)("div",{className:"cdp-tile-value ".concat(A),children:null!=f.kmDeltaPct?"".concat(f.kmDeltaPct>0?"+":"").concat(f.kmDeltaPct.toFixed(0),"%"):"\u2014"}),(0,C.jsx)("div",{className:"cdp-tile-sub",children:f.anomalies>0?"".concat(f.anomalies," flagged"):"within plan"})]}),(0,C.jsxs)("div",{className:"cdp-tile".concat(f.late>0?" is-warn":""),children:[(0,C.jsxs)("div",{className:"cdp-tile-label",children:[(0,C.jsx)(S.VP9,{})," On-time"]}),(0,C.jsxs)("div",{className:"cdp-tile-value",children:[f.onTime,N>0&&(0,C.jsxs)("span",{className:"cdp-tile-unit",children:["/",N]})]}),(0,C.jsx)("div",{className:"cdp-tile-sub",children:f.late>0?"".concat(f.late," late"):"all on schedule"})]}),(0,C.jsxs)("div",{className:"cdp-tile ".concat(y?"is-loss":"is-gain"),children:[(0,C.jsxs)("div",{className:"cdp-tile-label",children:[y?(0,C.jsx)(S.Rod,{}):(0,C.jsx)(S.imn,{})," ",y?"Loss":"Profit"]}),(0,C.jsxs)("div",{className:"cdp-tile-value",children:[y?"-":"","\u20b9",Math.abs(b).toFixed(0)]}),(0,C.jsxs)("div",{className:"cdp-tile-sub",children:[s.orders.length," ",1===s.orders.length?"order":"orders"," \xb7 ",_," delivered"]})]})]})]}),a.length>0&&(0,C.jsxs)("section",{className:"cdp-section cdp-seq-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head cdp-section-head-clickable",onClick:()=>d((e=>!e)),role:"button","aria-expanded":c,title:c?"Collapse route sequence":"Expand route sequence",children:[(0,C.jsx)("span",{className:"cdp-section-icon",children:(0,C.jsx)(S.$G1,{})}),(0,C.jsx)("span",{className:"cdp-section-title",children:"Route sequence"}),(0,C.jsx)("span",{className:"cdp-seq-status".concat(Y.length>0?" is-warn":" is-good"),children:Y.length>0?"".concat(Y.length," out of order"):"In order"}),(0,C.jsx)("span",{className:"cdp-seq-toggle".concat(c?" is-open":""),children:(0,C.jsx)(S.j1Q,{})})]}),c&&(0,C.jsx)("div",{className:"cdp-seq",children:Y.length>0?(0,C.jsx)("ul",{className:"cdp-seq-diffs",children:V.map(((e,s)=>{if(1===e.items.length)return g(e.items[0]);const a=e.items[0],t=e.items[e.items.length-1],i=o.has(s),l=e.delta>0?"+".concat(e.delta):"".concat(e.delta),c=e.items.some((e=>e.d.sequenceStep===r));return(0,C.jsxs)(n.Fragment,{children:[(0,C.jsxs)("li",{className:"cdp-seq-diff is-group".concat(i?" is-expanded":"").concat(c?" is-focused":""),onClick:()=>{return e=s,void u((s=>{const a=new Set(s);return a.has(e)?a.delete(e):a.add(e),a}));var e},"aria-expanded":i,children:[(0,C.jsxs)("span",{className:"cdp-seq-group-num",children:[(0,C.jsx)("span",{className:"cdp-seq-group-num-bg",style:{background:"linear-gradient(135deg, ".concat((0,w.gM)((a.planned||1)-1),", ").concat((0,w.gM)((t.planned||1)-1),")")}}),(0,C.jsxs)("span",{className:"cdp-seq-group-num-label",children:[e.items.length,"\xd7"]})]}),(0,C.jsxs)("div",{className:"cdp-seq-diff-body",children:[(0,C.jsxs)("div",{className:"cdp-seq-diff-title",children:[e.items.length," consecutive steps shifted"," ",(0,C.jsx)("span",{className:"cdp-seq-group-delta",children:l})]}),(0,C.jsxs)("div",{className:"cdp-seq-diff-sub",children:["Planned ",(0,w.IE)(a.planned),"\u2013",(0,w.IE)(t.planned)," ","visited"," ",(0,C.jsxs)("strong",{children:[(0,w.IE)(a.actualPos),"\u2013",(0,w.IE)(t.actualPos)]})]})]}),(0,C.jsx)("span",{className:"cdp-seq-diff-tag",children:l}),(0,C.jsx)("span",{className:"cdp-seq-group-toggle".concat(i?" is-open":""),"aria-hidden":"true",children:(0,C.jsx)(S.j1Q,{})})]}),i&&(0,C.jsx)("li",{className:"cdp-seq-group-children-wrap",children:(0,C.jsx)("ul",{className:"cdp-seq-group-children",children:e.items.map((e=>g(e,!1)))})})]},"run-".concat(s,"-").concat(a.d.sequenceStep))}))}):(0,C.jsxs)("div",{className:"cdp-seq-good",children:[(0,C.jsx)(S.mU9,{})," Rider followed the planned route in order."]})})]}),(L||q)&&(0,C.jsxs)("section",{className:"cdp-section cdp-timing-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head",children:[(0,C.jsx)("span",{className:"cdp-section-icon",children:(0,C.jsx)(S.pWE,{})}),(0,C.jsx)("span",{className:"cdp-section-title",children:"Timing"}),I>0&&(0,C.jsxs)("span",{className:"cdp-timing-active-tag",children:[(0,C.jsx)("span",{className:"cdp-timing-active-pulse"}),"Day window"]})]}),(0,C.jsxs)("div",{className:"cdp-timing-clock",children:[(0,C.jsxs)("div",{className:"cdp-clock-card is-start",children:[(0,C.jsxs)("div",{className:"cdp-clock-label",children:[(0,C.jsx)(S.WVj,{})," First delivery"]}),(0,C.jsxs)("div",{className:"cdp-clock-face",children:[(0,C.jsx)("span",{className:"cdp-clock-time",children:L?L.format("hh:mm"):"\u2014"}),(0,C.jsx)("span",{className:"cdp-clock-period",children:L?L.format("A"):""})]}),(0,C.jsx)("div",{className:"cdp-clock-caption",children:"Started"})]}),(0,C.jsxs)("div",{className:"cdp-clock-track","aria-hidden":"true",children:[(0,C.jsx)("span",{className:"cdp-clock-track-line"}),(0,C.jsx)("span",{className:"cdp-clock-track-dot is-start"}),(0,C.jsx)("span",{className:"cdp-clock-track-dot is-end"}),(0,C.jsxs)("div",{className:"cdp-clock-duration",children:[(0,C.jsx)("span",{className:"cdp-clock-duration-icon",children:(0,C.jsx)(S.DZH,{})}),(0,C.jsx)("span",{className:"cdp-clock-duration-val",children:I>0?I>=60?"".concat(Math.floor(I/60),"h ").concat(I%60,"m"):"".concat(I,"m"):"\u2014"}),(0,C.jsx)("span",{className:"cdp-clock-duration-sub",children:"active"})]})]}),(0,C.jsxs)("div",{className:"cdp-clock-card is-end",children:[(0,C.jsxs)("div",{className:"cdp-clock-label",children:[(0,C.jsx)(S.mU9,{})," Last delivery"]}),(0,C.jsxs)("div",{className:"cdp-clock-face",children:[(0,C.jsx)("span",{className:"cdp-clock-time",children:q?q.format("hh:mm"):"\u2014"}),(0,C.jsx)("span",{className:"cdp-clock-period",children:q?q.format("A"):""})]}),(0,C.jsx)("div",{className:"cdp-clock-caption",children:"Finished"})]})]}),(0,C.jsxs)("div",{className:"cdp-timing-stats",children:[(0,C.jsxs)("div",{className:"cdp-timing-stat",children:[(0,C.jsxs)("div",{className:"cdp-timing-stat-head",children:[(0,C.jsx)("div",{className:"cdp-timing-stat-icon",children:(0,C.jsx)(S.VP9,{})}),(0,C.jsxs)("div",{className:"cdp-timing-stat-body",children:[(0,C.jsxs)("div",{className:"cdp-timing-stat-value",children:[O>0?"".concat(O):"\u2014",O>0&&(0,C.jsx)("span",{className:"cdp-timing-stat-unit",children:"min"})]}),(0,C.jsx)("div",{className:"cdp-timing-stat-label",children:"Avg / stop"})]})]}),a.length>0&&(0,C.jsxs)("div",{className:"cdp-timing-stat-viz cdp-stops-dots","aria-hidden":"true",children:[Array.from({length:Math.min(a.length,12)}).map(((e,s)=>(0,C.jsx)("span",{className:"cdp-stop-dot"},"dot-".concat(s)))),(0,C.jsxs)("span",{className:"cdp-timing-stat-viz-label",children:[a.length," stop",1===a.length?"":"s"]})]})]}),null!=R&&(0,C.jsxs)("div",{className:"cdp-timing-stat",children:[(0,C.jsxs)("div",{className:"cdp-timing-stat-head",children:[(0,C.jsx)("div",{className:"cdp-timing-stat-icon",children:(0,C.jsx)(S.BJM,{})}),(0,C.jsxs)("div",{className:"cdp-timing-stat-body",children:[(0,C.jsxs)("div",{className:"cdp-timing-stat-value",children:[R,(0,C.jsx)("span",{className:"cdp-timing-stat-unit",children:"km/h"})]}),(0,C.jsx)("div",{className:"cdp-timing-stat-label",children:"Avg speed"})]})]}),(0,C.jsxs)("div",{className:"cdp-timing-stat-viz cdp-speed-gauge","aria-hidden":"true",children:[(0,C.jsx)("div",{className:"cdp-speed-gauge-track",children:(0,C.jsx)("div",{className:"cdp-speed-gauge-fill",style:{width:"".concat(Math.min(100,parseFloat(R)/60*100),"%")}})}),(0,C.jsxs)("div",{className:"cdp-speed-gauge-scale",children:[(0,C.jsx)("span",{children:"0"}),(0,C.jsx)("span",{children:"30"}),(0,C.jsx)("span",{children:"60 km/h"})]})]})]})]})]}),(T||H)&&(0,C.jsxs)("section",{className:"cdp-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head",children:[(0,C.jsx)("span",{className:"cdp-section-icon",children:(0,C.jsx)(S.SeC,{})}),(0,C.jsx)("span",{className:"cdp-section-title",children:"Highlights"})]}),(0,C.jsxs)("div",{className:"cdp-highlights",children:[T&&(0,C.jsxs)("div",{className:"cdp-highlight is-best",onClick:()=>j(T.sequenceStep),role:"button",title:"Focus this step",children:[(0,C.jsx)("span",{className:"cdp-highlight-rail","aria-hidden":"true"}),(0,C.jsxs)("div",{className:"cdp-highlight-content",children:[(0,C.jsxs)("div",{className:"cdp-highlight-top",children:[(0,C.jsxs)("span",{className:"cdp-highlight-label",children:[(0,C.jsx)("span",{className:"cdp-highlight-chip",children:(0,C.jsx)(S.mU9,{})}),"Fastest stop"]}),(0,C.jsxs)("span",{className:"cdp-highlight-step-chip",style:{background:(0,w.gM)(T.sequenceStep-1)},children:["Step ",T.sequenceStep]})]}),(0,C.jsx)("div",{className:"cdp-highlight-title",children:T.deliverycustomer||"Step ".concat(T.sequenceStep)}),(0,C.jsx)("div",{className:"cdp-highlight-meta",children:(0,C.jsx)("span",{className:"cdp-highlight-pill is-good",children:null!=T.timeDeltaMin?0===T.timeDeltaMin?"On schedule":"".concat(T.timeDeltaMin>0?"+":"").concat(T.timeDeltaMin," min vs plan"):"On schedule"})})]})]}),H&&(0,C.jsxs)("div",{className:"cdp-highlight is-worst",onClick:()=>j(H.sequenceStep),role:"button",title:"Focus this step",children:[(0,C.jsx)("span",{className:"cdp-highlight-rail","aria-hidden":"true"}),(0,C.jsxs)("div",{className:"cdp-highlight-content",children:[(0,C.jsxs)("div",{className:"cdp-highlight-top",children:[(0,C.jsxs)("span",{className:"cdp-highlight-label",children:[(0,C.jsx)("span",{className:"cdp-highlight-chip",children:(0,C.jsx)(S.Wux,{})}),"Biggest deviation"]}),(0,C.jsxs)("span",{className:"cdp-highlight-step-chip",style:{background:(0,w.gM)(H.sequenceStep-1)},children:["Step ",H.sequenceStep]})]}),(0,C.jsx)("div",{className:"cdp-highlight-title",children:H.deliverycustomer||"Step ".concat(H.sequenceStep)}),(0,C.jsxs)("div",{className:"cdp-highlight-meta",children:[null!=H.kmDeltaPct&&(0,C.jsxs)("span",{className:"cdp-highlight-pill is-bad",children:[H.kmDeltaPct>0?"+":"",H.kmDeltaPct.toFixed(0),"% route"]}),null!=H.timeDeltaMin&&H.timeDeltaMin>0&&(0,C.jsxs)("span",{className:"cdp-highlight-pill is-bad",children:["+",H.timeDeltaMin,"m late"]})]})]})]})]})]}),K.length>1&&(0,C.jsxs)("section",{className:"cdp-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head",children:[(0,C.jsx)("span",{className:"cdp-section-icon",children:(0,C.jsx)(S.$G1,{})}),(0,C.jsxs)("span",{className:"cdp-section-title",children:["Trips (",K.length,")"]})]}),(0,C.jsx)("div",{className:"cdp-trips",children:K.map((e=>{const s=e.profit<0;return(0,C.jsxs)("div",{className:"cdp-trip",children:[(0,C.jsxs)("div",{className:"cdp-trip-head",children:[(0,C.jsxs)("span",{className:"cdp-trip-badge",children:["Trip ",e.tNum]}),(0,C.jsxs)("span",{className:"cdp-trip-meta",children:[e.delivered,"/",e.count," delivered"]})]}),(0,C.jsxs)("div",{className:"cdp-trip-stats",children:[(0,C.jsxs)("span",{title:"Distance",children:[(0,C.jsx)(S.xI$,{}),e.actualKm.toFixed(1),"km",(0,C.jsxs)("small",{children:[" / ",e.plannedKm.toFixed(1)]})]}),(0,C.jsxs)("span",{className:s?"is-over":"",title:s?"Loss":"Profit",children:[(0,C.jsx)(S.ohY,{}),s?"-":"","\u20b9",Math.abs(e.profit).toFixed(0)]})]})]},"trip-".concat(e.tNum))}))})]}),v&&(e=>{const s=(0,w.gM)(v.sequenceStep-1),a=v.kmDelta>=0?"+":"",t=v.anomaly?"is-over":v.kmDelta<-.1?"is-under":"",i=null!=v.timeDeltaMin?v.timeDeltaMin>10?"is-over":v.timeDeltaMin<-2?"is-under":"":"",n=(0,w.Cx)(v.orderstatus),r=parseFloat((null===(e=v.order)||void 0===e?void 0:e.profit)||0);return(0,C.jsxs)("section",{className:"cdp-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head",children:[(0,C.jsx)("span",{className:"cdp-section-icon",children:(0,C.jsx)(S.$G1,{})}),(0,C.jsxs)("span",{className:"cdp-section-title",children:["Step ",v.sequenceStep," details"]}),(0,C.jsx)("button",{type:"button",className:"cdp-section-clear",onClick:()=>l(null),title:"Clear step focus",children:"Show all"})]}),(0,C.jsxs)("div",{className:"compare-delta".concat(v.anomaly?" is-anomaly":""),children:[(0,C.jsxs)("div",{className:"compare-delta-title",children:[(0,C.jsx)("span",{className:"compare-delta-step-badge",style:{background:s},children:v.sequenceStep}),(0,C.jsxs)("div",{className:"compare-delta-title-text",children:[(0,C.jsx)("div",{className:"compare-delta-title-main",children:v.deliverycustomer||"Step ".concat(v.sequenceStep)}),(0,C.jsxs)("div",{className:"compare-delta-title-sub",children:[v.pickupcustomer?"from ".concat(v.pickupcustomer," \xb7 "):"","Order #",v.orderid]})]}),v.orderstatus&&(0,C.jsx)("span",{className:"compare-delta-status",style:{background:n.bg,color:n.fg},children:n.label})]}),(0,C.jsxs)("div",{className:"compare-delta-grid",children:[(0,C.jsxs)("div",{className:"compare-delta-cell".concat(v.anomaly?" is-anomaly":""),children:[(0,C.jsx)("span",{className:"compare-delta-cell-label",children:"Distance"}),(0,C.jsxs)("span",{className:"compare-delta-cell-val",children:[v.actualKm.toFixed(2)," ",(0,C.jsx)("span",{className:"compare-delta-cell-unit",children:"km"})]}),(0,C.jsxs)("span",{className:"compare-delta-cell-sub",children:["planned ",v.plannedKm.toFixed(2)," km"]})]}),(0,C.jsxs)("div",{className:"compare-delta-cell",children:[(0,C.jsx)("span",{className:"compare-delta-cell-label",children:"\u0394 Route"}),(0,C.jsxs)("span",{className:"compare-delta-cell-val ".concat(t),children:[a,v.kmDelta.toFixed(2)," km"]}),(0,C.jsx)("span",{className:"compare-delta-cell-sub",children:null!=v.kmDeltaPct?"".concat(a).concat(v.kmDeltaPct.toFixed(0),"% vs plan"):"no planned km"})]}),(0,C.jsxs)("div",{className:"compare-delta-cell",children:[(0,C.jsx)("span",{className:"compare-delta-cell-label",children:"Time"}),(0,C.jsx)("span",{className:"compare-delta-cell-val ".concat(i),children:null!=v.timeDeltaMin?"".concat(v.timeDeltaMin>0?"+":"").concat(v.timeDeltaMin," min"):"\u2014"}),(0,C.jsx)("span",{className:"compare-delta-cell-sub",children:v.actualTs&&v.expectedTs?"".concat(v.actualTs.format("HH:mm")," vs ").concat(v.expectedTs.format("HH:mm")):v.actualTs?"delivered ".concat(v.actualTs.format("HH:mm")):"in flight"})]}),!Number.isNaN(r)&&0!==r&&(0,C.jsxs)("div",{className:"compare-delta-cell".concat(r<0?" is-anomaly":""),children:[(0,C.jsx)("span",{className:"compare-delta-cell-label",children:r<0?"Loss":"Profit"}),(0,C.jsxs)("span",{className:"compare-delta-cell-val ".concat(r<0?"is-over":"is-under"),children:[r<0?"-":"","\u20b9",Math.abs(r).toFixed(0)]}),(0,C.jsx)("span",{className:"compare-delta-cell-sub",children:"order revenue"})]})]})]})]})})(),k.length>0&&(0,C.jsxs)("section",{className:"cdp-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head",children:[(0,C.jsx)("span",{className:"cdp-section-icon cdp-icon-warn",children:(0,C.jsx)(S.ItP,{})}),(0,C.jsxs)("span",{className:"cdp-section-title",children:["Deviations (",k.length,")"]})]}),(0,C.jsx)("ul",{className:"cdp-dev-list",children:k.map((e=>{const s=(0,w.gM)(e.sequenceStep-1),a=e.kmDelta>=0?"+":"";return(0,C.jsxs)("li",{className:"cdp-dev-item".concat(r===e.sequenceStep?" is-focused":""),onClick:()=>j(e.sequenceStep),children:[(0,C.jsx)("span",{className:"cdp-dev-num",style:{background:s},children:e.sequenceStep}),(0,C.jsxs)("div",{className:"cdp-dev-body",children:[(0,C.jsx)("div",{className:"cdp-dev-title",children:e.deliverycustomer||"Step ".concat(e.sequenceStep)}),(0,C.jsxs)("div",{className:"cdp-dev-meta",children:[null!=e.kmDeltaPct&&(0,C.jsxs)("span",{className:"cdp-dev-chip is-over",children:[a,e.kmDeltaPct.toFixed(0),"% route"]}),null!=e.timeDeltaMin&&e.timeDeltaMin>10&&(0,C.jsxs)("span",{className:"cdp-dev-chip is-over",children:["+",e.timeDeltaMin,"m late"]})]})]})]},"dev-".concat(e.sequenceStep))}))})]}),(0,C.jsxs)("section",{className:"cdp-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head",children:[(0,C.jsx)("span",{className:"cdp-section-icon",children:(0,C.jsx)(S.EgJ,{})}),(0,C.jsxs)("span",{className:"cdp-section-title",children:["Steps (",a.length,")"]}),(0,C.jsxs)("span",{className:"cdp-section-sub",children:[_,"/",a.length," delivered"]})]}),(0,C.jsx)("ul",{className:"cdp-step-list",children:a.map((e=>{var s;const a=(0,w.gM)(e.sequenceStep-1),t=String(e.orderstatus||"").toLowerCase(),i=w.Ys.has(t),n=w.yP.has(t),l=i&&!e.anomaly,c=r===e.sequenceStep,d=(0,w.Cx)(e.orderstatus),o=parseFloat((null===(s=e.order)||void 0===s?void 0:s.profit)||0),u=e.kmDelta>=0?"+":"",m=null!=e.timeDeltaMin?e.timeDeltaMin>10?"is-over":e.timeDeltaMin<-2?"is-under":"":"",p=["cdp-step",c?"is-focused":"",e.anomaly?"is-anomaly":"",l?"is-correct":"",n?"is-skipped":"",e.isLoading?"is-loading":""].filter(Boolean).join(" ");return(0,C.jsxs)("li",{className:p,onClick:()=>j(e.sequenceStep),children:[(0,C.jsxs)("span",{className:"cdp-step-num",style:{background:a},children:[e.sequenceStep,l&&(0,C.jsx)("span",{className:"cdp-step-check",children:(0,C.jsx)(S.mU9,{})}),e.anomaly&&(0,C.jsx)("span",{className:"cdp-step-flag",children:(0,C.jsx)(S.ItP,{})})]}),(0,C.jsxs)("div",{className:"cdp-step-body",children:[(0,C.jsxs)("div",{className:"cdp-step-title-row",children:[(0,C.jsx)("span",{className:"cdp-step-title",children:e.deliverycustomer||"Step ".concat(e.sequenceStep)}),e.orderstatus&&(0,C.jsx)("span",{className:"cdp-step-status",style:{background:d.bg,color:d.fg},children:d.label})]}),(0,C.jsxs)("div",{className:"cdp-step-sub",children:[e.pickupcustomer?"from ".concat(e.pickupcustomer," \xb7 "):"","Order #",e.orderid]}),(0,C.jsxs)("div",{className:"cdp-step-deltas",children:[(0,C.jsxs)("span",{className:"cdp-step-delta",title:"Distance",children:[(0,C.jsx)(S.xI$,{}),e.actualKm.toFixed(1),"km",e.plannedKm>0&&(0,C.jsxs)("small",{className:e.anomaly?"is-over":"",children:[" ",u,e.kmDelta.toFixed(1)]})]}),(0,C.jsxs)("span",{className:"cdp-step-delta ".concat(m),title:"Delivery time",children:[(0,C.jsx)(S.VP9,{}),e.actualTs?e.actualTs.format("HH:mm"):"\u2014",null!=e.timeDeltaMin&&(0,C.jsxs)("small",{children:[" ",e.timeDeltaMin>0?"+":"",e.timeDeltaMin,"m"]})]}),!Number.isNaN(o)&&0!==o&&(0,C.jsxs)("span",{className:"cdp-step-delta".concat(o<0?" is-over":""),title:o<0?"Loss":"Profit",children:[(0,C.jsx)(S.ohY,{}),o<0?"-":"","\u20b9",Math.abs(o).toFixed(0)]})]})]})]},"step-".concat(e.sequenceStep))}))})]})]})]})};var A=a(85571);const P=["_ts"],E="#6366f1",D="#10b981",L=e=>{const s=parseFloat(e);return Number.isFinite(s)?s:NaN},q=e=>{if(!e)return"";const s=String(e).trim();if(!s)return"";if(s.includes(",")){const e=s.split(",").map((e=>e.trim())).filter(Boolean);return 0===e.length?s:e.length<=2?e.join(", "):e.slice(-2).join(", ")}const a=s.split(/\s+/).filter(Boolean),t=a.length>6?a.slice(-6).join(" "):s;return t.length>40?"".concat(t.slice(0,40).trim(),"\u2026"):t},I=e=>Number.isFinite(L(e.droplat||e.deliverylat))&&Number.isFinite(L(e.droplon||e.deliverylong)),O=e=>e.pickuplat||e.pickuplatitude||e.pickup_lat,R=e=>e.pickuplong||e.pickuplongitude||e.picklongitude||e.pickup_lon,T=e=>Number.isFinite(L(O(e)))&&Number.isFinite(L(R(e))),H=[{id:"morning",name:"Morning Batch",startHour:0,endHour:8},{id:"afternoon",name:"Afternoon Batch",startHour:9,endHour:12.5},{id:"evening",name:"Evening Batch",startHour:16,endHour:19}],Y="dispatch.slots.v9",V=["dispatch.slots.v1","dispatch.slots.v2","dispatch.slots.v3","dispatch.slots.v4","dispatch.slots.v5","dispatch.slots.v6","dispatch.slots.v7","dispatch.slots.v8"],K=(e,s)=>"Slot ".concat(e+1," \xb7 ").concat(B(s)),B=e=>{const s=Math.floor(e),a=Math.round(60*(e-s)),t=(s+11)%12+1,i=s>=12&&s<24?"PM":"AM";if(0===a)return"".concat(t," ").concat(i);const n=String(a).padStart(2,"0");return"".concat(t,":").concat(n," ").concat(i)},U=(e,s)=>s>=24?"After ".concat(B(e)):"".concat(B(e),"\u2013").concat(B(s)),G=H.map(((e,s)=>(0,i.A)((0,i.A)({},e),{},{label:e.name||K(s,e.startHour),range:U(e.startHour,e.endHour)}))),J=(e,s)=>{for(const a of s)if(e>=a.startHour&&e2&&void 0!==arguments[2]?arguments[2]:G;const a=((e,s)=>{const a=W.find((e=>e.id===s))||W[0];for(const t of a.keys)if(null!==e&&void 0!==e&&e[t])return e[t];return null})(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all");if(!a)return null;const t=String(a).trim();if(/^\d{4}-\d{2}-\d{2}$/.test(t))return null;const i=g()(a);return i.isValid()?J(i.hour()+i.minute()/60,s):null};function Z(e){let{targetRef:s}=e;const a=(0,r.ko)();return(0,n.useEffect)((()=>(s.current=a,()=>{s.current=null})),[a]),null}function X(e){let{trigger:s}=e;const a=(0,r.ko)();return(0,n.useEffect)((()=>{const e=[0,60,120,200,300,380].map((e=>setTimeout((()=>a.invalidateSize({animate:!1})),e)));return()=>e.forEach(clearTimeout)}),[s,a]),null}function Q(e,s){const a=e=>e*Math.PI/180,t=a(e[0]),i=a(s[0]),n=a(s[0]-e[0]),r=a(s[1]-e[1]),l=Math.sin(n/2)**2+Math.cos(t)*Math.cos(i)*Math.sin(r/2)**2;return 12742*Math.asin(Math.min(1,Math.sqrt(l)))}function ee(e){if(!Array.isArray(e)||e.length<2)return 0;let s=0;for(let a=1;a{let a=0,t=1/0;for(let i=0;i{const a=Math.max(s,i);t.push(e.slice(i,a+1)),i=a})),t}const ae=e=>{if(!e)return null;const s=g()(e);return s.isValid()?s.format("HH:mm:ss"):String(e)},te=[{key:"assigntime",label:"Assigned"},{key:"acceptedtime",label:"Accepted"},{key:"arrivaltime",label:"Arrived"},{key:"pickuptime",label:"Pickup"},{key:"starttime",label:"Started"},{key:"deliverytime",label:"Delivered",final:!0}],ie=e=>{const s=e.filter(I);if(!s.length)return[];const a=e.find(T),t=[];return a&&t.push([L(O(a)),L(R(a))]),s.forEach((e=>t.push([L(e.droplat||e.deliverylat),L(e.droplon||e.deliverylong)]))),t},ne=(e,s,a)=>{if(!a||0===a.length)return"".concat(e,"-").concat(s);const t=a.map((e=>"".concat(e[0].toFixed(5),",").concat(e[1].toFixed(5)))).join("|");return"".concat(e,"-").concat(s,"-").concat(t)};delete x().Icon.Default.prototype._getIconUrl,x().Icon.Default.mergeOptions({iconRetinaUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon-2x.png",iconUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-shadow.png"});const re=["#0055FF","#00D82C","#FF6B00","#9D00FF","#FF00A8","#00C2B2","#FF9900","#FF0000"],le=e=>{const s=String(null!==e&&void 0!==e?e:"");if(!s)return re[0];let a=0;for(let t=0;t>>0;return re[a%re.length]},ce=e=>{let{focusedItem:s,viewMode:a,orders:t,kitchens:i,locationKey:l}=e;const c=(0,r.ko)(),d=(0,n.useRef)(""),o=(0,n.useMemo)((()=>{const e=null!=l?"loc:".concat(l,"|"):"",n=e=>{let s=0,a=0,t=0;for(const i of e)Number.isFinite(i[0])&&Number.isFinite(i[1])&&(s+=i[0],a+=i[1],t+=1);return 0===t?"0":"".concat((s/t).toFixed(1),",").concat((a/t).toFixed(1))};if(s){var r,c,d;const a=null!==(r=null!==(c=null!==(d=s.id)&&void 0!==d?d:s.kitchenName)&&void 0!==c?c:s.name)&&void 0!==r?r:null!=s.lat?"".concat(s.lat,",").concat(s.lon):"item",t=s.orders?s.orders.length:0;return"".concat(e,"f|").concat(a,"|").concat(t)}const o=(i||[]).map((e=>[e.lat,e.lon])),u=n(o);if("kitchens"===a){const s=o.filter((e=>Number.isFinite(e[0])&&Number.isFinite(e[1]))).length;return"".concat(e,"k|").concat(s,"|").concat(u)}if("all"===a){const s=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)]));return"".concat(e,"a|").concat(s.length,"|").concat(n(s))}return"".concat(e,"m|").concat(a||"","|").concat(o.length,"|").concat(u)}),[s,a,t,i,l]);return(0,n.useEffect)((()=>{if(d.current===o)return;let e=[];s?s.orders?(e=s.orders.map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])),s.orders.forEach((s=>e.push([L(O(s)),L(R(s))])))):e=[[s.lat,s.lon]]:"kitchens"===a?(e=(i||[]).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lon))).map((e=>[e.lat,e.lon])),0===e.length&&(e=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])))):"all"===a?e=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])):(e=(i||[]).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lon))).map((e=>[e.lat,e.lon])),0===e.length&&(e=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)]))));const n=e.filter((e=>Number.isFinite(e[0])&&Number.isFinite(e[1])));if(n.length>0){const e=x().latLngBounds(n);if(e.isValid()){1===n.length||e.getNorthEast().equals(e.getSouthWest())?c.setView(n[0],15,{animate:!0,duration:.6}):c.flyToBounds(e,{padding:[60,60],duration:.6,maxZoom:16}),d.current=o}}else;}),[o,s,a,t,i,c]),null},de=e=>{let{children:s}=e;return(0,C.jsx)("span",{className:"ico-inline",style:{display:"inline-flex",alignItems:"center",verticalAlign:"-2px",marginRight:4},children:s})},oe=[{key:"morning",label:"Morning",timeRange:"12:00 AM \u2013 8:00 AM",sub:"Early shift orders",color:"#f59e0b",bg:"#fffbeb",border:"#fde68a"},{key:"afternoon",label:"Noon",timeRange:"9:00 AM \u2013 12:30 PM",sub:"Lunch rush window",color:"#10b981",bg:"#ecfdf5",border:"#a7f3d0"},{key:"evening",label:"Evening",timeRange:"4:00 PM \u2013 7:00 PM",sub:"Dinner & end-of-day",color:"#6366f1",bg:"#eef2ff",border:"#c7d2fe"}],ue=e=>{if(null==e)return"\u2014";if("number"===typeof e)return e.toLocaleString("en-IN");const s=parseFloat(e);return Number.isFinite(s)?s.toLocaleString("en-IN"):String(e)},me=e=>{if(!e||"string"!==typeof e)return null;const s=e.split(":").map(Number);if(s.length<2||s.some((e=>!Number.isFinite(e))))return null;const[a,t,i=0]=s;return 3600*a+60*t+i},pe=e=>{let{data:s,embedded:a=!1,selectedRiderId:r,onRiderSelect:h,pulseOrderId:v,onChangeRider:j}=e;const F=null!==s&&void 0!==s&&s.zones&&s.zones.length>0?"zones":"riders",[M,B]=(0,n.useState)(F),[W,pe]=(0,n.useState)("live"),[he,xe]=(0,n.useState)({}),[ve,je]=(0,n.useState)(null),[ge,fe]=(0,n.useState)(null),[Ne,be]=(0,n.useState)(null);(0,n.useEffect)((()=>{if(!Ne)return;const e=e=>{"Escape"===e.key&&be(null)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[Ne]);const ye=(0,f.n)({mutationFn:_.W0,onMutate:e=>je(e.batch),onSuccess:(e,s)=>{xe((a=>(0,i.A)((0,i.A)({},a),{},{[s.batch]:{data:e,fetchedAt:g()().format("HH:mm:ss")}})))},onSettled:()=>je(null)}),ke=e=>{fe(e);const s=he[e];s&&s.data&&!1!==s.data.success||ye.mutate({batch:e,tenantId:916})},Se=15e3,_e=(0,n.useRef)(null);(0,n.useEffect)((()=>{_e.current=ve}),[ve]),(0,n.useEffect)((()=>{if("analysis"!==W)return;if(!ge)return;const e=setInterval((()=>{_e.current||"undefined"!==typeof document&&document.hidden||ye.mutate({batch:ge,tenantId:916})}),Se);return()=>clearInterval(e)}),[W,ge]);const[we,Fe]=(0,n.useState)(new Set),[Me,Ce]=(0,n.useState)(null),[ze,Ae]=(0,n.useState)(null),[Pe,Ee]=(0,n.useState)(null),[De,Le]=(0,n.useState)(null),[qe,Ie]=(0,n.useState)("planned"),Oe=(0,n.useRef)({}),Re=(0,n.useRef)(new Set),Te=(0,n.useRef)(new Set),He=((0,n.useRef)(null),(0,n.useRef)(null)),[Ye,Ve]=(0,n.useState)(null),Ke=void 0!==r,[Be,Ue]=(0,n.useState)(""),{data:Ge}=(0,N.I)({queryKey:["appLocations"],queryFn:_.aL,staleTime:3e5}),Je="undefined"!==typeof window?localStorage.getItem("applocationid"):null,[We,$e]=(0,n.useState)(null!=Je?Number(Je):0),[Ze,Xe]=(0,n.useState)(!1),Qe=(0,n.useRef)(null),[es,ss]=(0,n.useState)("assigned"),[as,ts]=(0,n.useState)(!1),is=(0,n.useRef)(null),[ns,rs]=(0,n.useState)((()=>{if("undefined"===typeof window)return G;try{const e=window.localStorage.getItem(Y);if(!e)return G;const s=JSON.parse(e);return Array.isArray(s)&&s.length===H.length?s.map(((e,s)=>{const a=e.id||"slot-".concat(s+1),t=Number(e.startHour)||0,i=Number(e.endHour)||24,n=G.find((e=>e.id===a));return{id:a,startHour:t,endHour:i,label:(null===n||void 0===n?void 0:n.name)||K(s,t),range:U(t,i)}})):G}catch(e){return G}})),ls=ns,[cs,ds]=(0,n.useState)(!1),os=(0,n.useRef)(null);(0,n.useEffect)((()=>{if("undefined"!==typeof window)try{V.forEach((e=>window.localStorage.removeItem(e)))}catch(e){}}),[]);const us=(0,n.useRef)(!1);(0,n.useEffect)((()=>{if(us.current){if("undefined"!==typeof window)try{window.localStorage.setItem(Y,JSON.stringify(ns.map((e=>{let{id:s,startHour:a,endHour:t}=e;return{id:s,startHour:a,endHour:t}}))))}catch(e){}}else us.current=!0}),[ns]),(0,n.useEffect)((()=>{if(!Ze)return;const e=e=>{Qe.current&&!Qe.current.contains(e.target)&&Xe(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[Ze]),(0,n.useEffect)((()=>{if(!as)return;const e=e=>{is.current&&!is.current.contains(e.target)&&ts(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[as]),(0,n.useEffect)((()=>{if(!cs)return;const e=e=>{os.current&&!os.current.contains(e.target)&&ds(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[cs]);const[ms,ps]=(0,n.useState)(null),[hs,xs]=(0,n.useState)(""),{data:vs,isFetching:js,isError:gs,error:fs}=(0,N.I)({queryKey:["riderPeriodicLog",ms],queryFn:()=>(0,_.ne)(ms),enabled:"rider-info"===M&&null!=ms,refetchInterval:"rider-info"===M&&null!=ms&&15e3,refetchIntervalInBackground:!1,staleTime:5e3,refetchOnWindowFocus:!1}),Ns=(0,n.useMemo)((()=>{const e=parseFloat(null===vs||void 0===vs?void 0:vs.latitude),s=parseFloat(null===vs||void 0===vs?void 0:vs.longitude);return Number.isFinite(e)&&Number.isFinite(s)?{lat:e.toFixed(4),lon:s.toFixed(4)}:null}),[null===vs||void 0===vs?void 0:vs.latitude,null===vs||void 0===vs?void 0:vs.longitude]),{data:bs}=(0,N.I)({queryKey:["reverseGeocode",null===Ns||void 0===Ns?void 0:Ns.lat,null===Ns||void 0===Ns?void 0:Ns.lon],queryFn:async()=>{const e=await fetch("https://nominatim.openstreetmap.org/reverse?lat=".concat(Ns.lat,"&lon=").concat(Ns.lon,"&format=json&zoom=16&addressdetails=1"),{headers:{Accept:"application/json"}});if(!e.ok)return null;const s=await e.json(),a=(null===s||void 0===s?void 0:s.address)||{};return{area:a.suburb||a.neighbourhood||a.village||a.hamlet||a.city_district||a.town||a.city||a.county||a.state||"",display:(null===s||void 0===s?void 0:s.display_name)||""}},enabled:"rider-info"===M&&!!Ns,staleTime:3e5,refetchOnWindowFocus:!1,retry:1}),ys=(0,n.useMemo)((()=>{if(!Ge)return null;const e=Ge.find((e=>String(e.applocationid)===String(We)));return(null===e||void 0===e?void 0:e.locationname)||null}),[Ge,We]),[ks,Ss]=(0,n.useState)({}),_s=(0,n.useRef)({}),[ws,Fs]=(0,n.useState)({}),Ms=(0,n.useRef)({}),[Cs,zs]=(0,n.useState)(!1),[As,Ps]=(0,n.useState)([]),[Es,Ds]=(0,n.useState)({}),Ls=(0,n.useRef)(!1),[qs,Is]=(0,n.useState)(g()().format("YYYY-MM-DD")),[Os,Rs]=(0,n.useState)(!1),[Ts,Hs]=(0,n.useState)((()=>g()(qs).isValid()?g()(qs).startOf("month"):g()().startOf("month"))),Ys=(0,n.useRef)(null);(0,n.useEffect)((()=>{if(!Os)return;const e=e=>{Ys.current&&(Ys.current.contains(e.target)||Rs(!1))},s=e=>{"Escape"===e.key&&Rs(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",s)}}),[Os]),(0,n.useEffect)((()=>{if(Os){const e=g()(qs);e.isValid()&&Hs(e.startOf("month"))}}),[Os,qs]);const[Vs,Ks]=(0,n.useState)(!1),[Bs,Us]=(0,n.useState)("combined"),[Gs,Js]=(0,n.useState)(!0),[Ws,$s]=(0,n.useState)(!0),[Zs,Xs]=(0,n.useState)((()=>new Set)),Qs=(0,n.useRef)(!1),[ea,sa]=(0,n.useState)(!1),aa=(0,n.useRef)(!1),ta=(0,n.useRef)(!1),[ia,na]=(0,n.useState)(!1),[ra,la]=(0,n.useState)(null),ca=(0,n.useRef)(null),da=(0,n.useRef)(null);da.current||(da.current=x().canvas({padding:1.5,tolerance:5}));const{data:oa}=(0,N.I)({queryKey:[We,qs,""],queryFn:_.zb,refetchInterval:15e3,refetchIntervalInBackground:!1,staleTime:5e3,refetchOnWindowFocus:!1}),ua=(0,n.useMemo)((()=>(oa||[]).map((e=>{var s;const a=parseFloat(null===e||void 0===e?void 0:e.latitude),t=parseFloat(null===e||void 0===e?void 0:e.longitude);return Number.isFinite(a)&&Number.isFinite(t)?{id:String(null!==(s=e.userid)&&void 0!==s?s:""),userid:e.userid,username:e.username||"Rider #".concat(e.userid),status:String(e.status||"").toLowerCase(),contactno:e.contactno,orderid:e.orderid,logdate:e.logdate,lat:a,lon:t}:null})).filter(Boolean)),[oa]),[ma,pa]=(0,n.useState)((()=>{const e=g()();return J(e.hour()+e.minute()/60,G)||G[0].id}));(0,n.useEffect)((()=>{var e;"all"!==ma&&(ls.some((e=>e.id===ma))||pa((null===(e=ls[0])||void 0===e?void 0:e.id)||"all"))}),[ls,ma]);const ha=(0,n.useRef)(null),xa=!s,va="undefined"!==typeof window&&localStorage.getItem("userid")||0,{data:ja,isFetching:ga,isError:fa,fetchNextPage:Na,hasNextPage:ba,isFetchingNextPage:ya}=(0,b.q)({queryKey:["dispatchDeliveries",We,va,"all",qs,qs,50,"",0,0,0],queryFn:_.tL,getNextPageParam:e=>{var s;return null!==(s=e.nextPage)&&void 0!==s?s:void 0},enabled:xa});(0,n.useEffect)((()=>{xa&&ba&&!ya&&Na()}),[xa,ba,ya,Na]);const ka=(0,n.useMemo)((()=>{const e=((null===ja||void 0===ja?void 0:ja.pages)||[]).flatMap((e=>e.rows||[])),s=new Set,a=[];for(const t of e){const e=null!=t.orderid?String(t.orderid):null;e&&s.has(e)||(e&&s.add(e),a.push(t))}return a}),[ja]),Sa=(0,n.useMemo)((()=>{const e=new Map;return ka.forEach((s=>{const a=String(s.userid||s.rider_id||"");a&&"unassigned"!==a&&"0"!==a&&(e.has(a)||e.set(a,{id:a,riderName:s.ridername||s.rider_name||s.username||"Rider ".concat(a)}))})),Array.from(e.values()).sort(((e,s)=>String(e.riderName).localeCompare(String(s.riderName))))}),[ka]),_a=(0,n.useMemo)((()=>{const e={all:ka.length};return ls.forEach((s=>{e[s.id]=0})),ka.forEach((s=>{const a=$(s,es,ls);a&&(e[a]=(e[a]||0)+1)})),e}),[ka,es,ls]),wa=(0,n.useMemo)((()=>"all"===ma?ka:ka.filter((e=>$(e,es,ls)===ma))),[ka,ma,es,ls]),Fa=(0,n.useMemo)((()=>{if(!xa)return null;if(!wa.length)return{code:200,zone_summary:[],zones:[]};const e=e=>String(e||"").trim(),s={};wa.forEach((a=>{const t=e(a.deliverysuburb)||e(a.locationsuburb)||e(a.zone_name)||"Unzoned",i=t.toLowerCase(),n=String(a.userid||a.rider_id||"unassigned"),r=a.ridername||a.rider_name||a.username||("unassigned"===n?"Unassigned":"Rider ".concat(n));s[i]||(s[i]={zone_name:t,riders:{}}),s[i].riders[n]||(s[i].riders[n]={rider_id:n,rider_name:r,orders:[]}),s[i].riders[n].orders.push(a)}));const a=Object.values(s).map((e=>{const s=Object.values(e.riders).map((e=>{const s=[...e.orders].sort(((e,s)=>g()(e.deliverydate||e.assigntime||0).valueOf()-g()(s.deliverydate||s.assigntime||0).valueOf()));return(0,i.A)((0,i.A)({},e),{},{orders:s.map(((e,s)=>(0,i.A)((0,i.A)({},e),{},{trip_number:e.trip_number||1,step:e.step||s+1})))})}));return{zone_name:e.zone_name,riders:s}}));return{code:200,zone_summary:a.map((e=>{const s=e.riders.flatMap((e=>e.orders)),a=s.filter((e=>e.userid||e.rider_id)).length;return{zone_name:e.zone_name,total_orders:s.length,assigned_orders:a,unassigned_orders_count:s.length-a,active_riders_count:e.riders.filter((e=>"unassigned"!==e.rider_id)).length,total_delivery_kms:s.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),total_profit:s.reduce(((e,s)=>e+parseFloat(s.profit||0)),0)}})),zones:a}}),[xa,wa]),Ma=(0,n.useMemo)((()=>{const e=s||Fa||{zones:[],zone_summary:[]},a=e.zones||[],t={};(e.zone_summary||[]).forEach((e=>{t[e.zone_name]=e}));const i=(e,s)=>{const a={};return e.forEach((e=>{const t=s(e);t&&(a[t]=(a[t]||0)+1)})),Object.entries(a).map((e=>{let[s,a]=e;return{name:s,count:a}})).sort(((e,s)=>s.count-e.count))};return a.map((e=>{var s,a,n,r;const l=t[e.zone_name]||{},c=(e.riders||[]).flatMap((e=>e.orders||[])),d=(e.riders||[]).filter((e=>e.rider_id&&"unassigned"!==e.rider_id)).length,o=i(c,(e=>e.deliverysuburb||e.locationsuburb)),u=i(c,(e=>e.pickupcustomer||e.kitchen_key)),m={};return c.forEach((e=>{const s=String(e.orderstatus||"unknown").toLowerCase();m[s]=(m[s]||0)+1})),{id:e.zone_name,name:e.zone_name,riders:e.riders||[],orders:c,totalOrders:null!==(s=l.total_orders)&&void 0!==s?s:c.length,activeRidersCount:null!==(a=l.active_riders_count)&&void 0!==a?a:d,totalKms:null!==(n=l.total_delivery_kms)&&void 0!==n?n:c.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),totalProfit:null!==(r=l.total_profit)&&void 0!==r?r:c.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),suburbs:o,kitchens:u,statusCounts:m}}))}),[s,Fa]),{riders:Ca,kitchens:za,allOrders:Aa,stats:Pa}=(0,n.useMemo)((()=>{const e=[];((s||Fa||{zones:[],zone_summary:[]}).zones||[]).forEach((s=>{(s.riders||[]).forEach((a=>{a.orders.forEach((t=>{e.push((0,i.A)((0,i.A)({},t),{},{zone_name:s.zone_name,rider_name:a.rider_name,rider_id:a.rider_id}))}))}))}));const a={};e.forEach((e=>{const s=e.rider_id||e.userid||"unknown";a[s]||(a[s]={id:s,riderName:e.rider_name||e.username||e.rider||s,orders:[],color:re[Object.keys(a).length%re.length]}),a[s].orders.push(e)}));const t={};e.forEach((e=>{const s=e.pickupcustomer||e.kitchen_key||"Unknown",a=s.toLowerCase().trim();t[a]?!Number.isFinite(t[a].lat)&&T(e)&&(t[a].lat=L(O(e)),t[a].lon=L(R(e))):t[a]={id:a,kitchenName:s,lat:L(O(e)),lon:L(R(e)),orders:[],riders:new Set},t[a].orders.push(e),e.rider_id&&t[a].riders.add(e.rider_id)}));const n=e.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),r=e.reduce(((e,s)=>e+parseFloat(s.profit||0)),0);return{riders:Object.values(a).map((e=>(0,i.A)((0,i.A)({},e),{},{orders:[...e.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)}))}))).sort(((e,s)=>s.orders.length-e.orders.length)),kitchens:Object.values(t).sort(((e,s)=>s.orders.length-e.orders.length)),allOrders:e,stats:{totalOrders:e.length,totalKms:n,totalProfit:r,totalRiders:Object.keys(a).length}}}),[s,Fa]),Ea=Ke?r&&Ca.find((e=>e.id===r))||null:Me,Da=(0,n.useCallback)((e=>{h&&h(e?e.id:null),Ke||Ce(e),Le(null)}),[Ke,h]),La=(0,n.useRef)(null);(0,n.useEffect)((()=>{const e=Ea?Ea.id:null;e!==La.current&&(Ea?A.A.info("Focused rider changed to: ".concat(Ea.riderName," (").concat(Ea.orders.length," orders)")):A.A.info("Focused rider reset to: None"),La.current=e)}),[Ea]),(0,n.useEffect)((()=>{De?A.A.info("Focused order updated: ID ".concat(De.orderid)):A.A.debug("Focused order selection cleared")}),[De]);const qa=(0,n.useRef)(0);(0,n.useEffect)((()=>{Aa&&Aa.length!==qa.current&&(A.A.info("Orders database updated: ".concat(Aa.length," orders actively tracked")),qa.current=Aa.length)}),[Aa]);const Ia=(0,n.useRef)(0);(0,n.useEffect)((()=>{ua&&ua.length!==Ia.current&&(A.A.info("Live riders list updated: ".concat(ua.length," active riders mapped")),Ia.current=ua.length)}),[ua]);const Oa=(0,n.useMemo)((()=>Ea?{orders:Ea.orders.length,riders:1,km:Ea.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),profit:Ea.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),label:"Focused Rider"}:ze?{orders:ze.orders.length,riders:ze.riders.size,km:ze.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),profit:ze.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),label:"Focused Kitchen"}:{orders:Pa.totalOrders,riders:Pa.totalRiders,km:Pa.totalKms,profit:Pa.totalProfit,label:"Total Fleet"}),[Ea,ze,Pa]),Ra=(0,n.useMemo)((()=>{if(!Ea)return[];const e=new Set;return Ea.orders.forEach((s=>{null!=s.deliveryid&&""!==s.deliveryid&&0!==s.deliveryid&&e.add(String(s.deliveryid))})),Array.from(e)}),[Ea]),Ta=(0,y.E)({queries:Ra.map((e=>({queryKey:["deliveryLogs",e],queryFn:async()=>{var s,a;const i=await k.A.get("".concat("https://jupiter.nearle.app/live/api/v3","/deliveries/getdeliverylogs/?deliveryid=").concat(e));return function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return[];const a=e.filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&(Math.abs(e.lat)>.1||Math.abs(e.lng)>.1)));if(0===a.length)return[];if(1===a.length)return[{lat:a[0].lat,lng:a[0].lng,logdate:a[0].logdate,_ts:a[0]._ts}];const t=null!=s.processNoise?s.processNoise:1e-10,i=null!=s.measurementNoise?s.measurementNoise:2e-9,n=null!=s.outlierGate?s.outlierGate:9,r=null!=s.maxSpeedKmh?s.maxSpeedKmh:120,l=e=>e._ts||(e.logdate?new Date(e.logdate).getTime():0);let c=0;for(;cr||(d.push(e),o=s)}if(d.length<2)return d.map((e=>({lat:e.lat,lng:e.lng,logdate:e.logdate,_ts:e._ts})));const u=e=>{const s=d.length,a=new Array(s),r=new Array(s),c=new Array(s),o=new Array(s),u=new Array(s),m=l(d[0]),p=l(d[1]),h=Math.max(.1,(p-m)/1e3),x=(d[1][e]-d[0][e])/h;a[0]=[d[0][e],x],r[0]=[i,0,0,1],c[0]=a[0].slice(),o[0]=r[0].slice(),u[0]=0;let v=m;for(let g=1;gn){a[g]=[x,j],r[g]=[_,w,F,M];continue}const A=_/z,P=F/z,E=x+A*C,D=j+P*C;a[g]=[E,D],r[g]=[(1-A)*_,(1-A)*w,F-P*_,M-P*w]}const j=new Array(s);j[s-1]=a[s-1].slice();for(let t=s-2;t>=0;t--){const e=u[t+1],[s,i,n,l]=r[t],d=s+e*i,m=i,p=n+e*l,h=l,[x,v,g,f]=o[t+1],N=x*f-v*g;if(!Number.isFinite(N)||Math.abs(N)<1e-30){j[t]=a[t].slice();continue}const b=f/N,y=-v/N,k=-g/N,S=x/N,_=d*b+m*k,w=d*y+m*S,F=p*b+h*k,M=p*y+h*S,C=j[t+1][0]-c[t+1][0],z=j[t+1][1]-c[t+1][1];j[t]=[a[t][0]+_*C+w*z,a[t][1]+F*C+M*z]}return j.map((e=>e[0]))},m=u("lat"),p=u("lng");return d.map(((e,s)=>({lat:m[s],lng:p[s],logdate:e.logdate,_ts:e._ts})))}(([null===i||void 0===i||null===(s=i.data)||void 0===s?void 0:s.details,null===i||void 0===i||null===(a=i.data)||void 0===a?void 0:a.data,null===i||void 0===i?void 0:i.data,i].find((e=>Array.isArray(e)))||[]).map((e=>{var s,a,t;const i=null!==e&&void 0!==e&&e.logdate?g()(e.logdate):null;return{lat:parseFloat(null!==(s=null===e||void 0===e?void 0:e.latitude)&&void 0!==s?s:null===e||void 0===e?void 0:e.lat),lng:parseFloat(null!==(a=null!==(t=null===e||void 0===e?void 0:e.longitude)&&void 0!==t?t:null===e||void 0===e?void 0:e.lng)&&void 0!==a?a:null===e||void 0===e?void 0:e.lon),logdate:null===e||void 0===e?void 0:e.logdate,_ts:i&&i.isValid()?i.valueOf():Number.MAX_SAFE_INTEGER}})).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng))).sort(((e,s)=>e._ts-s._ts))).map((e=>{let{_ts:s}=e;return(0,t.A)(e,P)}))},enabled:Vs&&null!=Ea,staleTime:3e5,refetchOnWindowFocus:!1,retry:1})))}),Ha=(0,n.useMemo)((()=>{if(!Ea)return[];const e=e=>{const s=e.deliverytime||e.expecteddeliverytime;if(!s)return Number.MAX_SAFE_INTEGER;const a=g()(s);return a.isValid()?a.valueOf():Number.MAX_SAFE_INTEGER};return Ea.orders.filter((e=>null!=e.deliveryid&&""!==e.deliveryid&&0!==e.deliveryid)).sort(((s,a)=>{const t=e(s)-e(a);return 0!==t?t:(s.step||0)-(a.step||0)})).map(((e,s)=>{const a=Ra.indexOf(String(e.deliveryid)),t=a>=0?Ta[a]:null;return{sequenceStep:s+1,orderid:e.orderid,deliveryid:e.deliveryid,deliverycustomer:e.deliverycustomer,pickupcustomer:e.pickupcustomer,step:e.step,tripNumber:e.trip_number||1,deliverytime:e.deliverytime||e.expecteddeliverytime,kms:parseFloat(e.actualkms||e.kms||0)||0,profit:parseFloat(e.profit||0)||0,orderstatus:e.orderstatus,isLoading:(null===t||void 0===t?void 0:t.isLoading)||(null===t||void 0===t?void 0:t.isFetching),isError:null===t||void 0===t?void 0:t.isError,coords:(null===t||void 0===t?void 0:t.data)||[]}}))}),[Ea,Ra,Ta]),Ya=(0,n.useMemo)((()=>Ea?Ha.map((e=>{const s=Ea.orders.find((s=>String(s.deliveryid)===String(e.deliveryid))),a=parseFloat((null===s||void 0===s?void 0:s.kms)||0)||0,t=ws[e.deliveryid];let i=0;Array.isArray(t)&&t.length>=2?i=ee(t):null!=(null===s||void 0===s?void 0:s.actualkms)&&""!==s.actualkms?i=parseFloat(s.actualkms)||0:e.coords.length>=2&&(i=ee(e.coords.map((e=>[e.lat,e.lng]))));const n=i-a,r=a>0?n/a*100:null,l=null!==s&&void 0!==s&&s.expecteddeliverytime?g()(s.expecteddeliverytime):null,c=null!==s&&void 0!==s&&s.deliverytime?g()(s.deliverytime):null,d=null!==l&&void 0!==l&&l.isValid()&&null!==c&&void 0!==c&&c.isValid()?c.diff(l,"minute"):null,o=a>0&&i>1.25*a||null!=d&&d>15;return{sequenceStep:e.sequenceStep,deliveryid:e.deliveryid,orderid:e.orderid,order:s,plannedKm:a,actualKm:i,kmDelta:n,kmDeltaPct:r,expectedTs:null!==l&&void 0!==l&&l.isValid()?l:null,actualTs:null!==c&&void 0!==c&&c.isValid()?c:null,timeDeltaMin:d,anomaly:o,orderstatus:e.orderstatus,deliverycustomer:e.deliverycustomer,pickupcustomer:null===s||void 0===s?void 0:s.pickupcustomer,isLoading:e.isLoading,coordsCount:e.coords.length}})):[]),[Ha,Ea,ws]),Va=(0,n.useMemo)((()=>{if(0===Ya.length)return{plannedKm:0,actualKm:0,kmDeltaPct:null,anomalies:0,late:0,onTime:0};const e=Ya.filter((e=>!e.isLoading&&e.coordsCount>0)),s=e.reduce(((e,s)=>e+s.plannedKm),0),a=e.reduce(((e,s)=>e+s.actualKm),0);return{plannedKm:s,actualKm:a,kmDeltaPct:s>0?(a-s)/s*100:null,anomalies:e.filter((e=>e.anomaly)).length,late:e.filter((e=>null!=e.timeDeltaMin&&e.timeDeltaMin>5)).length,onTime:e.filter((e=>null!=e.timeDeltaMin&&e.timeDeltaMin<=5)).length}}),[Ya]),Ka=(0,n.useMemo)((()=>[...Ya].sort(((e,s)=>{var a,t;return((null===(a=e.order)||void 0===a?void 0:a.step)||e.sequenceStep)-((null===(t=s.order)||void 0===t?void 0:t.step)||s.sequenceStep)}))),[Ya]),Ba=(0,n.useMemo)((()=>[...Ya].sort(((e,s)=>e.sequenceStep-s.sequenceStep))),[Ya]),Ua=(0,n.useMemo)((()=>{if(!Vs||!ra||!Ea)return null;const e=Ha.find((e=>e.sequenceStep===ra));if(!e)return null;const s=Ea.orders.find((s=>String(s.deliveryid)===String(e.deliveryid)));return s?{orders:[s],id:"cmp-step-".concat(ra,"-").concat(s.orderid)}:null}),[Vs,ra,Ea,Ha]);(0,n.useEffect)((()=>{la(null),Xs(new Set),Us("combined")}),[Vs,null===Ea||void 0===Ea?void 0:Ea.id]),(0,n.useEffect)((()=>{!Ea&&Vs&&Ks(!1)}),[Ea,Vs]),(0,n.useEffect)((()=>{Qs.current&&Ea&&(Qs.current=!1,Ks(!0))}),[Ea]),(0,n.useEffect)((()=>{Vs&&!ta.current?(aa.current=ea,sa(!0),na(!1)):!Vs&&ta.current&&sa(aa.current),ta.current=Vs}),[Vs]);const Ga=(0,n.useCallback)((async(e,s,a)=>{if(a.length<2)return;const t=ne(e,s,a);if(void 0!==_s.current[t])return;_s.current[t]=null,Ss((e=>(0,i.A)((0,i.A)({},e),{},{[t]:null})));const n=a.map((e=>"".concat(e[1],",").concat(e[0]))).join(";"),r="https://router.project-osrm.org/route/v1/driving/".concat(n,"?overview=full&geometries=geojson");try{const e=await fetch(r),s=await e.json();if(s.routes&&s.routes[0]){const e=s.routes[0].geometry.coordinates.map((e=>[e[1],e[0]]));_s.current[t]=e,Ss((s=>(0,i.A)((0,i.A)({},s),{},{[t]:e})))}else _s.current[t]=!1,Ss((e=>(0,i.A)((0,i.A)({},e),{},{[t]:!1})))}catch(l){console.error("OSRM Fetch error:",l),_s.current[t]=!1,Ss((e=>(0,i.A)((0,i.A)({},e),{},{[t]:!1})))}}),[]);(0,n.useEffect)((()=>{_s.current={},Ss({}),Ms.current={},Fs({})}),[qs,ma]);const Ja=(0,n.useCallback)((async(e,s)=>{if(void 0!==Ms.current[e])return;if(!Array.isArray(s)||s.length<2)return;Ms.current[e]=null,Fs((s=>(0,i.A)((0,i.A)({},s),{},{[e]:null})));const a=s=>{Ms.current[e]=s,Fs((a=>(0,i.A)((0,i.A)({},a),{},{[e]:s})))},t=()=>{Ms.current[e]=!1,Fs((s=>(0,i.A)((0,i.A)({},s),{},{[e]:!1})))},n=(e,s)=>{if(e.length<=s)return e;const a=Math.ceil(e.length/s),t=e.filter(((e,s)=>s%a===0)),i=e[e.length-1];return t[t.length-1]!==i&&t.push(i),t};try{const e=n(s,90).map((e=>"".concat(e[1],",").concat(e[0]))).join(";"),t="https://router.project-osrm.org/match/v1/driving/".concat(e,"?overview=full&geometries=geojson&gaps=ignore&tidy=true"),i=await fetch(t),r=await i.json();if(r.matchings&&r.matchings.length>0){const e=r.matchings.flatMap((e=>{var s;return((null===(s=e.geometry)||void 0===s?void 0:s.coordinates)||[]).map((e=>[e[1],e[0]]))}));if(e.length>=2)return void a(e)}}catch(r){console.warn("OSRM Match error, trying route fallback:",r)}try{const e=n(s,25).map((e=>"".concat(e[1],",").concat(e[0]))).join(";"),i="https://router.project-osrm.org/route/v1/driving/".concat(e,"?overview=full&geometries=geojson"),r=await fetch(i),l=await r.json();if(l.routes&&l.routes[0]){const e=l.routes[0].geometry.coordinates.map((e=>[e[1],e[0]]));if(e.length>=2)return void a(e)}t()}catch(r){console.error("OSRM Route fallback error:",r),t()}}),[]);(0,n.useEffect)((()=>{Vs&&Ea&&Ha.forEach((e=>{if(!e.deliveryid||e.coords.length<2)return;const s=e.coords.map((e=>[e.lat,e.lng]));Ja(e.deliveryid,s)}))}),[Ha,Vs,Ea,Ja]),(0,n.useEffect)((()=>{Ls.current=Cs}),[Cs]),(0,n.useEffect)((()=>{if(a)return;const e=()=>{const e=new Date;Ue([e.getHours(),e.getMinutes(),e.getSeconds()].map((e=>String(e).padStart(2,"0"))).join(":"))},s=setInterval(e,1e3);return e(),()=>clearInterval(s)}),[a]),(0,n.useEffect)((()=>{Fe(new Set(Ca.map((e=>e.id))))}),[Ca]),(0,n.useEffect)((()=>{Ca.forEach((e=>{if(!we.has(e.id))return;if(Ea&&Ea.id!==e.id)return;const s={};e.orders.forEach((e=>{const a=e.trip_number||1;s[a]||(s[a]=[]),s[a].push(e)})),Object.entries(s).forEach((s=>{let[a,t]=s;const i=[...t].sort(((e,s)=>(e.step||0)-(s.step||0))),n=ie(i);n.length>=2&&Ga(e.id,a,n)}))}))}),[Ca,we,Ea,Ga]);const Wa=(0,n.useRef)(null);(0,n.useEffect)((()=>{if(!xa)return;const e=()=>{const e=g()();return e.hour()+e.minute()/60};null===Wa.current&&(Wa.current=e());const s=setInterval((()=>{const s=e(),a=J(Wa.current,ls),t=J(s,ls);Wa.current=s,t&&t!==a&&pa((e=>e===a?t:e))}),3e4);return()=>clearInterval(s)}),[xa,ls]),(0,n.useEffect)((()=>{Le(null)}),[null===ze||void 0===ze?void 0:ze.id]),(0,n.useEffect)((()=>{const e=ha.current;e&&"function"===typeof e.scrollIntoView&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[ma]),(0,n.useEffect)((()=>{if(!De)return;const e=setTimeout((()=>{var e;const s=null===Aa||void 0===Aa||null===(e=Aa.find)||void 0===e?void 0:e.call(Aa,(e=>String(e.orderid)===String(De.orderid)));s&&Ve(s)}),350);return()=>clearTimeout(e)}),[De,Aa]);const $a=function(e){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return x().divIcon({className:"",iconSize:s?[56,56]:[46,46],iconAnchor:s?[28,28]:[23,23],popupAnchor:[0,s?-30:-24],html:'
').concat((e||"K").charAt(0).toUpperCase(),"
")})},Za=e=>{var s;return(null===(s=Ca.find((s=>s.id===e)))||void 0===s?void 0:s.color)||"#475569"},Xa=(e,s)=>{if(!e||!s||!I(s))return null;const a=ua.find((s=>String(s.id)===String(e)));if(!a)return null;const t=L(s.droplat||s.deliverylat),i=L(s.droplon||s.deliverylong);if(!Number.isFinite(t)||!Number.isFinite(i))return null;const n=Q([a.lat,a.lon],[t,i]);return Math.round(1e3*n)},Qa=e=>null===e||void 0===e?"":e>=1e3?"".concat((e/1e3).toFixed(1)," km"):"".concat(e," m");return(0,C.jsxs)("div",{className:"dispatch-container".concat(a?" embedded":"").concat(Vs?" compare-open":""),children:[!a&&(0,C.jsxs)("div",{id:"hdr",children:[(0,C.jsxs)("div",{className:"logo",children:[(0,C.jsx)("div",{className:"logo-badge",children:"D"}),(0,C.jsx)("div",{className:"logo-name",children:"Dispatch"}),Ge&&Ge.length>0&&(0,C.jsxs)("div",{className:"logo-city-wrap",ref:Qe,children:[(0,C.jsxs)("button",{type:"button",className:"logo-city ".concat(Ze?"open":""),onClick:()=>Xe((e=>!e)),"aria-haspopup":"listbox","aria-expanded":Ze,title:"Switch hub",children:[(0,C.jsx)(S.JFD,{}),(0,C.jsx)("span",{className:"logo-city-text",children:ys||"All locations"}),(0,C.jsx)(S.j1Q,{className:"logo-city-caret"})]}),Ze&&(0,C.jsx)("div",{className:"logo-city-menu",role:"listbox",children:Ge.map((e=>{const s=String(e.applocationid)===String(We);return(0,C.jsxs)("button",{type:"button",role:"option","aria-selected":s,className:"logo-city-option ".concat(s?"active":""),onClick:()=>(e=>{if(A.A.info("Switching hub/location ID:",e),$e(Number(e)),Xe(!1),"undefined"!==typeof window)try{localStorage.setItem("applocationid",String(e))}catch(s){}Da(null),Ae(null),Ee(null)})(e.applocationid),children:[(0,C.jsx)(S.JFD,{className:"logo-city-option-icon"}),(0,C.jsx)("span",{children:e.locationname}),s&&(0,C.jsx)("span",{className:"logo-city-option-check",children:"\u2713"})]},e.applocationid)}))})]}),(0,C.jsxs)("div",{id:"dispatch-top-tabs",className:"dtt-inline",children:[(0,C.jsxs)("button",{type:"button",className:"dtt-tab ".concat("live"===W?"active":""),onClick:()=>pe("live"),children:[(0,C.jsx)("span",{className:"dtt-icon",children:(0,C.jsx)(S.Cd7,{})}),"Live"]}),(0,C.jsxs)("button",{type:"button",className:"dtt-tab ".concat("analysis"===W?"active":""),onClick:()=>pe("analysis"),children:[(0,C.jsx)("span",{className:"dtt-icon",children:(0,C.jsx)(S.DX0,{})}),"Analysis"]})]})]}),(0,C.jsxs)("div",{className:"hdr-stats",children:[(()=>{const e=Oa.profit<0,s=Math.abs(Oa.profit);return(0,C.jsxs)("span",{className:"strat-stat ".concat(e?"strat-stat-loss":"strat-stat-profit"),title:"".concat(e?"Loss":"Profit"," (").concat(Oa.label,")"),children:[(0,C.jsx)("span",{className:"strat-stat-icon",children:e?(0,C.jsx)(S.Rod,{}):(0,C.jsx)(S.imn,{})}),(0,C.jsx)("span",{className:"strat-stat-label",children:e?"Loss":"Profit"}),(0,C.jsxs)("span",{className:"strat-stat-value",children:[e?"-":"","\u20b9",s.toFixed(0)]})]})})(),xa&&(0,C.jsxs)(C.Fragment,{children:[ga&&(0,C.jsxs)("span",{className:"live-status",children:[(0,C.jsx)("span",{className:"live-dot"})," Loading ",ka.length?"\xb7 ".concat(ka.length," loaded"):""]}),!ga&&!fa&&(0,C.jsxs)("span",{className:"live-status live-status-ready",children:[(0,C.jsx)("span",{className:"live-dot ready"})," ",wa.length," orders",(0,C.jsxs)("span",{className:"live-status-sub",children:[" / ",ka.length," total"]})]}),fa&&(0,C.jsxs)("span",{className:"live-status live-status-error",children:[(0,C.jsx)("span",{className:"live-dot error"})," Failed to load"]}),(()=>{const e=g()().startOf("day"),s=e.format("YYYY-MM-DD"),a=g()(qs),t=qs===s,i=a.isAfter(e,"day"),n=s=>{if(!s)return;const a=s.format("YYYY-MM-DD");a!==qs?s.isAfter(e,"day")||(Is(a),Da(null),Ae(null),Ee(null),Rs(!1)):Rs(!1)},r=Ts.startOf("month"),l=r.subtract(r.day(),"day"),c=Array.from({length:42},((e,s)=>l.add(s,"day"))),d=!Ts.add(1,"month").startOf("month").isAfter(e,"month");return(0,C.jsxs)("div",{className:"date-chip".concat(t?" is-today":"").concat(Os?" is-open":""),ref:Ys,children:[(0,C.jsx)("button",{type:"button",className:"date-chip-nav",onClick:()=>n(a.subtract(1,"day")),"aria-label":"Previous day",title:"Previous day",children:(0,C.jsx)(S.E_E,{})}),(0,C.jsxs)("button",{type:"button",className:"date-chip-main",onClick:()=>Rs((e=>!e)),"aria-haspopup":"dialog","aria-expanded":Os,children:[(0,C.jsx)("span",{className:"date-chip-icon","aria-hidden":"true",children:(0,C.jsx)(S.dDC,{})}),(0,C.jsxs)("span",{className:"date-chip-text",children:[(0,C.jsxs)("span",{className:"date-chip-label",children:["Date",t&&(0,C.jsx)("span",{className:"date-chip-today-pill",children:"Today"})]}),(0,C.jsx)("span",{className:"date-chip-value",children:a.isValid()?a.format("ddd, MMM D, YYYY"):"\u2014"})]}),(0,C.jsx)("span",{className:"date-chip-chevron".concat(Os?" is-open":""),"aria-hidden":"true",children:(0,C.jsx)(S.j1Q,{})})]}),(0,C.jsx)("button",{type:"button",className:"date-chip-nav",onClick:()=>{t||i||n(a.add(1,"day"))},disabled:t||i,"aria-label":"Next day",title:t?"You're viewing today":"Next day",children:(0,C.jsx)(S.xVu,{})}),Os&&(0,C.jsxs)("div",{className:"date-cal-popover",role:"dialog","aria-label":"Pick a date",children:[(0,C.jsxs)("div",{className:"date-cal-header",children:[(0,C.jsx)("button",{type:"button",className:"date-cal-nav",onClick:()=>Hs((e=>e.subtract(1,"month"))),"aria-label":"Previous month",children:(0,C.jsx)(S.E_E,{})}),(0,C.jsx)("div",{className:"date-cal-title",children:Ts.format("MMMM YYYY")}),(0,C.jsx)("button",{type:"button",className:"date-cal-nav",onClick:()=>{const s=Ts.add(1,"month");s.startOf("month").isAfter(e,"month")||Hs(s)},disabled:!d,"aria-label":"Next month",children:(0,C.jsx)(S.xVu,{})})]}),(0,C.jsx)("div",{className:"date-cal-weekdays",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((e=>(0,C.jsx)("div",{className:"date-cal-weekday",children:e},e)))}),(0,C.jsx)("div",{className:"date-cal-grid",children:c.map((a=>{const t=a.month()===Ts.month(),i=a.format("YYYY-MM-DD")===qs,r=a.format("YYYY-MM-DD")===s,l=a.isAfter(e,"day"),c=["date-cal-day",!t&&"is-other-month",i&&"is-selected",r&&"is-today",l&&"is-disabled"].filter(Boolean).join(" ");return(0,C.jsx)("button",{type:"button",className:c,disabled:l,onClick:()=>n(a),"aria-current":r?"date":void 0,"aria-pressed":i,children:a.date()},a.format("YYYY-MM-DD"))}))}),(0,C.jsxs)("div",{className:"date-cal-presets",children:[(0,C.jsx)("button",{type:"button",className:"date-cal-preset",onClick:()=>n(e),children:"Today"}),(0,C.jsx)("button",{type:"button",className:"date-cal-preset",onClick:()=>n(e.subtract(1,"day")),children:"Yesterday"}),(0,C.jsx)("button",{type:"button",className:"date-cal-preset",onClick:()=>n(e.subtract(7,"day")),children:"\u22127 days"})]})]})]})})()]})]}),(0,C.jsx)("div",{id:"clock",children:Be})]}),(a||"live"===W)&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("div",{id:"strat-row",children:[(0,C.jsxs)("button",{className:"sbt ".concat("kitchens"===M?"active":""),onClick:()=>{A.A.info("View mode changed: By Location"),B("kitchens"),Da(null),Ae(null),Ee(null)},children:[(0,C.jsx)("span",{className:"sbt-icon",children:(0,C.jsx)(S.JFD,{})})," By Location"]}),(0,C.jsxs)("button",{className:"sbt ".concat("zones"===M?"active":""),onClick:()=>{A.A.info("View mode changed: By Zone"),B("zones"),Da(null),Ae(null),Ee(null)},children:[(0,C.jsx)("span",{className:"sbt-icon",children:(0,C.jsx)(S.Cd7,{})})," By Zone"]}),(0,C.jsxs)("button",{className:"sbt ".concat("riders"===M?"active":""),onClick:()=>{A.A.info("View mode changed: By Rider"),B("riders"),Da(null),Ae(null),Ee(null)},children:[(0,C.jsx)("span",{className:"sbt-icon",children:(0,C.jsx)(S.bsz,{})})," By Rider"]}),(0,C.jsxs)("button",{className:"sbt ".concat("all"===M?"active":""),onClick:()=>{A.A.info("View mode changed: All Routes"),B("all"),Da(null),Ae(null),Ee(null)},children:[(0,C.jsx)("span",{className:"sbt-icon",children:(0,C.jsx)(S.Zs6,{})})," All Routes"]}),(0,C.jsxs)("button",{type:"button",className:"sbt sbt-rider-info ".concat("rider-info"===M?"active":""),onClick:()=>{B("rider-info"),Da(null),Ae(null),Ee(null)},title:"Live GPS / battery / status snapshot for a rider",children:[(0,C.jsx)("span",{className:"sbt-icon",children:(0,C.jsx)(S.k4P,{})})," Rider Info"]})]}),xa&&"rider-info"!==M&&(0,C.jsxs)("div",{id:"batch-row",children:[(0,C.jsx)("span",{className:"batch-label",children:"Batch"}),(0,C.jsx)("div",{className:"batch-scroll",children:ls.map((e=>{var s;const a=ma===e.id;return(0,C.jsxs)("button",{ref:a?ha:null,className:"batch-btn batch-slot ".concat(a?"active":""),onClick:()=>{pa(e.id),Da(null),Ae(null),Ee(null)},title:"".concat(e.label," (").concat(e.range,")"),children:[(0,C.jsx)("span",{className:"batch-btn-label",children:e.label}),(0,C.jsx)("span",{className:"batch-btn-count",children:null!==(s=_a[e.id])&&void 0!==s?s:0})]},e.id)}))})]}),"rider-info"===M?(0,C.jsxs)("div",{className:"rider-info-mode",children:[(0,C.jsxs)("div",{className:"ri-sidebar",children:[(0,C.jsxs)("div",{className:"ri-sb-head",children:[(0,C.jsx)("div",{className:"ri-sb-title",children:"Riders"}),(0,C.jsxs)("div",{className:"ri-sb-sub",children:[Sa.length," ",1===Sa.length?"rider":"riders"," today"]})]}),(0,C.jsxs)("div",{className:"ri-search",children:[(0,C.jsx)(S.gZ7,{className:"ri-search-icon"}),(0,C.jsx)("input",{type:"text",className:"ri-search-input",placeholder:"Search by name or ID",value:hs,onChange:e=>xs(e.target.value)})]}),(()=>{const e=hs.trim().toLowerCase(),s=Sa.filter((s=>!e||(String(s.riderName||"").toLowerCase().includes(e)||String(s.id).includes(e))));return 0===s.length?(0,C.jsx)("div",{className:"ri-empty",children:hs?'No riders match "'.concat(hs,'"'):"No riders have orders today"}):(0,C.jsx)("div",{className:"ri-rider-list",children:s.map((e=>{const s=String(ms)===String(e.id);return(0,C.jsxs)("button",{type:"button",className:"ri-rider-item ".concat(s?"active":""),onClick:()=>ps(e.id),children:[(0,C.jsx)("span",{className:"ri-rider-dot",style:{background:le(e.id)}}),(0,C.jsxs)("span",{className:"ri-rider-info-block",children:[(0,C.jsx)("span",{className:"ri-rider-name",children:e.riderName}),(0,C.jsxs)("span",{className:"ri-rider-meta",children:["#",e.id]})]}),(0,C.jsx)("span",{className:"ri-rider-arrow",children:"\u2192"})]},e.id)}))})})()]}),(0,C.jsx)("div",{className:"ri-main",children:null==ms?(0,C.jsxs)("div",{className:"ri-placeholder",children:[(0,C.jsx)("div",{className:"ri-placeholder-icon",children:(0,C.jsx)(S.k4P,{})}),(0,C.jsx)("div",{className:"ri-placeholder-title",children:"Pick a rider"}),(0,C.jsx)("div",{className:"ri-placeholder-sub",children:"Select a rider from the list on the left to see their live GPS, battery, connection, and current order snapshot."})]}):(0,C.jsxs)(C.Fragment,{children:[js&&!vs&&(0,C.jsx)("div",{className:"ri-loading",children:"Loading rider snapshot\u2026"}),gs&&(0,C.jsxs)("div",{className:"ri-error",children:["Couldn't load this rider's log. ",(null===fs||void 0===fs?void 0:fs.message)||""]}),vs&&(()=>{const e=vs,s=parseFloat(e.latitude),a=parseFloat(e.longitude),t=Number.isFinite(s)&&Number.isFinite(a),i=parseInt(String(e.battery||"").replace("%",""),10),n=Number.isFinite(i)&&i<=20,r=parseFloat(e.speed),c=String(e.status||"").toLowerCase();return(0,C.jsxs)("div",{className:"ri-snapshot",children:[(0,C.jsxs)("div",{className:"ri-snap-head",children:[(0,C.jsx)("div",{className:"ri-snap-name",children:e.username||"Rider #".concat(e.userid)}),(0,C.jsxs)("div",{className:"ri-snap-meta",children:[(0,C.jsxs)("span",{children:["#",e.userid]}),e.status&&(0,C.jsx)("span",{className:"ri-status ri-status-".concat(c),children:e.status}),(0,C.jsxs)("span",{className:"ri-live ".concat(js?"is-refetching":""),children:[(0,C.jsx)("span",{className:"ri-live-dot"}),js?"Updating\u2026":"Live"]})]}),e.logdate&&(0,C.jsxs)("div",{className:"ri-snap-time",children:[(0,C.jsx)(S.VP9,{})," Last seen ",e.logdate]})]}),(0,C.jsxs)("div",{className:"ri-snap-grid",children:[(0,C.jsxs)("div",{className:"ri-stat ".concat(n?"ri-stat-warn":""),children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.wZm,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"Battery"}),(0,C.jsxs)("div",{className:"ri-stat-value",children:[e.battery||"\u2014",e.is_charging&&(0,C.jsx)("span",{className:"ri-stat-tag",children:"Charging"})]})]})]}),(0,C.jsxs)("div",{className:"ri-stat",children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.Xh5,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"Connection"}),(0,C.jsx)("div",{className:"ri-stat-value",children:e.connection||"\u2014"})]})]}),(0,C.jsxs)("div",{className:"ri-stat",children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.HPi,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"GPS Accuracy"}),(0,C.jsx)("div",{className:"ri-stat-value",children:e.accuracy?"".concat(e.accuracy," m"):"\u2014"})]})]}),(0,C.jsxs)("div",{className:"ri-stat",children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.o8z,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"Location Service"}),(0,C.jsx)("div",{className:"ri-stat-value",children:e.location_service||"\u2014"})]})]}),(0,C.jsxs)("div",{className:"ri-stat",children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.BJM,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"Speed"}),(0,C.jsx)("div",{className:"ri-stat-value",children:Number.isFinite(r)?"".concat(r.toFixed(2)," km/h"):"\u2014"})]})]}),(0,C.jsxs)("div",{className:"ri-stat",children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.bqQ,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"Heading"}),(0,C.jsx)("div",{className:"ri-stat-value",children:null!=e.heading?"".concat(e.heading,"\xb0"):"\u2014"})]})]}),(0,C.jsxs)("div",{className:"ri-stat",children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.pSF,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"App State"}),(0,C.jsx)("div",{className:"ri-stat-value",children:e.is_background?"Background":"Foreground"})]})]}),(0,C.jsxs)("div",{className:"ri-stat",children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.gsJ,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"Current Order"}),(0,C.jsx)("div",{className:"ri-stat-value",children:e.orderid||"\u2014"})]})]})]}),t&&(0,C.jsxs)("div",{className:"ri-map-section",children:[(0,C.jsxs)("div",{className:"ri-coords-label",children:[(0,C.jsx)(S.gwi,{})," ",s.toFixed(6),", ",a.toFixed(6)]}),(0,C.jsx)("div",{className:"ri-map",children:(0,C.jsxs)(d.W,{center:[s,a],zoom:13,scrollWheelZoom:!1,style:{height:"100%",width:"100%"},children:[(0,C.jsx)(o.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"\xa9 OpenStreetMap contributors"}),(0,C.jsxs)(l.p,{position:[s,a],children:[(0,C.jsx)(u.m,{direction:"top",offset:[0,-10],permanent:!0,className:"ri-area-banner",children:(null===bs||void 0===bs?void 0:bs.area)||"Locating area\u2026"}),(0,C.jsxs)(m.z,{children:[(0,C.jsx)("div",{style:{fontWeight:700,marginBottom:2},children:e.username||"Rider #".concat(e.userid)}),(null===bs||void 0===bs?void 0:bs.area)&&(0,C.jsx)("div",{style:{fontSize:12,color:"#0f172a",marginBottom:4},children:bs.area}),(0,C.jsx)("div",{style:{fontSize:11,color:"#64748b"},children:e.logdate?"Last seen ".concat(e.logdate):"".concat(s.toFixed(6),", ").concat(a.toFixed(6))})]})]})]},"".concat(e.userid,"-").concat(s,"-").concat(a))})]})]})})()]})})]}):(0,C.jsxs)("div",{id:"body",className:"".concat(ea?"sidebar-collapsed":""," ").concat(Vs?"compare-mode":""," ").concat(Vs&&ia?"compare-data-collapsed":"").trim(),children:[(0,C.jsx)("button",{type:"button",className:"sidebar-toggle-tab".concat(ea?" is-collapsed":""),onClick:()=>sa((e=>!e)),title:ea?"Show sidebar":"Hide sidebar","aria-label":ea?"Show sidebar":"Hide sidebar",children:ea?(0,C.jsx)(S.xVu,{}):(0,C.jsx)(S.E_E,{})}),Vs&&Ea&&(0,C.jsx)("button",{type:"button",className:"compare-data-toggle-tab".concat(ia?" is-collapsed":""),onClick:()=>na((e=>!e)),title:ia?"Show details panel":"Hide details panel","aria-label":ia?"Show details panel":"Hide details panel",children:ia?(0,C.jsx)(S.E_E,{}):(0,C.jsx)(S.xVu,{})}),(0,C.jsxs)("div",{id:"sidebar",children:[!Ea&&(0,C.jsxs)("div",{className:"sb-header",children:[(0,C.jsxs)("div",{className:"sb-header-top",children:[(0,C.jsxs)("div",{className:"sb-header-title",children:[(0,C.jsx)("span",{className:"sb-title-bar","aria-hidden":"true"}),(0,C.jsx)("span",{className:"sb-title-text",children:"RIDER DISPATCH"})]}),(0,C.jsxs)("span",{className:"sb-header-scope",title:Oa.label,children:[(0,C.jsx)("span",{className:"sb-scope-dot"}),Oa.label]})]}),(0,C.jsxs)("div",{className:"sb-header-tiles",children:[(0,C.jsxs)("div",{className:"sb-tile sb-tile-orders",children:[(0,C.jsx)("span",{className:"sb-tile-icon",children:(0,C.jsx)(S.gsJ,{})}),(0,C.jsxs)("div",{className:"sb-tile-body",children:[(0,C.jsx)("div",{className:"sb-tile-value",children:Oa.orders}),(0,C.jsx)("div",{className:"sb-tile-label",children:1===Oa.orders?"Order":"Orders"})]})]}),(0,C.jsxs)("div",{className:"sb-tile sb-tile-riders",children:[(0,C.jsx)("span",{className:"sb-tile-icon",children:(0,C.jsx)(S.aVM,{})}),(0,C.jsxs)("div",{className:"sb-tile-body",children:[(0,C.jsx)("div",{className:"sb-tile-value",children:Oa.riders}),(0,C.jsx)("div",{className:"sb-tile-label",children:1===Oa.riders?"Rider":"Riders"})]})]})]})]}),Ea||ze?(0,C.jsxs)("div",{id:"route-detail",children:[(0,C.jsxs)("button",{className:"rd-back",onClick:()=>{Da(null),Ae(null)},children:["\u2190 Back to ",Pe?Pe.name:"list"]}),Ea?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{className:"rd-rider-name",style:{color:Ea.color},children:Ea.riderName}),(()=>{const e=Ea.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),s=Ea.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),a=s<0;return(0,C.jsxs)("div",{className:"rd-stats-grid",children:[(0,C.jsxs)("div",{className:"rd-stat rd-stat-orders",children:[(0,C.jsx)("div",{className:"rd-stat-icon",children:(0,C.jsx)(S.gsJ,{})}),(0,C.jsx)("div",{className:"rd-stat-value",children:Ea.orders.length}),(0,C.jsx)("div",{className:"rd-stat-label",children:"Orders"})]}),(0,C.jsxs)("div",{className:"rd-stat rd-stat-distance",children:[(0,C.jsx)("div",{className:"rd-stat-icon",children:(0,C.jsx)(S.xI$,{})}),(0,C.jsxs)("div",{className:"rd-stat-value",children:[e.toFixed(1),(0,C.jsx)("span",{className:"rd-stat-unit",children:"km"})]}),(0,C.jsx)("div",{className:"rd-stat-label",children:"Distance"})]}),(0,C.jsxs)("div",{className:"rd-stat rd-stat-profit ".concat(a?"is-loss":"is-gain"),children:[(0,C.jsx)("div",{className:"rd-stat-icon",children:a?(0,C.jsx)(S.Rod,{}):(0,C.jsx)(S.imn,{})}),(0,C.jsxs)("div",{className:"rd-stat-value",children:[a?"-":"","\u20b9",Math.abs(s).toFixed(0)]}),(0,C.jsx)("div",{className:"rd-stat-label",children:a?"Loss":"Profit"})]})]})})(),(()=>{const e={};Ea.orders.forEach((s=>{const a=s.trip_number||1;e[a]||(e[a]=[]),e[a].push(s)}));const s=[...Ea.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!w.Ys.has(s)&&!w.yP.has(s)})),a=s?s.orderid:null,t=e=>{const s=e.deliverytime||e.expecteddeliverytime;if(!s)return Number.MAX_SAFE_INTEGER;const a=g()(s);return a.isValid()?a.valueOf():Number.MAX_SAFE_INTEGER},i="time"===qe;let r=null;return Object.entries(e).sort(((e,s)=>{let[a]=e,[t]=s;return Number(a)-Number(t)})).map((e=>{let[s,l]=e;const c=i?[...l].sort(((e,s)=>{const a=t(e)-t(s);return 0!==a?a:(e.step||0)-(s.step||0)})):l;return(0,C.jsxs)("div",{className:"trip-block",children:[(0,C.jsxs)("div",{className:"trip-header",style:{background:"".concat(Ea.color,"12"),borderColor:"".concat(Ea.color,"30")},children:[(0,C.jsxs)("span",{className:"th-badge",style:{background:Ea.color},children:["Trip ",s]}),(0,C.jsxs)("span",{className:"trip-stats",children:[(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.gwi,{})}),l.length," stops"]}),(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.xI$,{})}),l.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0).toFixed(1)," km"]})]}),(0,C.jsxs)("div",{className:"trip-sort-toggle",role:"group","aria-label":"Sort stops by","data-mode":i?"time":"planned",children:[(0,C.jsxs)("button",{type:"button",className:"trip-sort-pill ".concat(i?"":"is-active"),"aria-pressed":!i,onClick:()=>Ie("planned"),title:"Sort stops by planned step (dispatched order)",children:[(0,C.jsx)(S.EgJ,{"aria-hidden":"true"}),(0,C.jsx)("span",{children:"Planned"})]}),(0,C.jsxs)("button",{type:"button",className:"trip-sort-pill ".concat(i?"is-active":""),"aria-pressed":i,onClick:()=>Ie("time"),title:"Sort stops by completion time (which delivery was done first)",children:[(0,C.jsx)(S.VP9,{"aria-hidden":"true"}),(0,C.jsx)("span",{children:"By time"})]})]})]}),(0,C.jsx)("div",{className:"zone-order-grid",children:c.map(((e,t)=>{const l=(e.kitchen_key||e.pickupcustomer||"Unknown").toLowerCase().trim(),c=null!==r&&l!==r;r=l;const d=De&&De.orderid===e.orderid,o=a&&e.orderid===a,u=parseFloat(e.droplat||e.deliverylat),m=parseFloat(e.droplon||e.deliverylong),p=Number.isFinite(u)&&Number.isFinite(m),h=(0,w.Cx)(e.orderstatus),x=parseFloat(e.profit||0),v=x<0,g=Xa(Ea.id,e),f=e.step||t+1,N=i&&!e.deliverytime;return(0,C.jsxs)(n.Fragment,{children:[c&&(0,C.jsxs)("div",{className:"kitchen-transition",children:[(0,C.jsx)("span",{className:"kt-ico",children:(0,C.jsx)(S.$G1,{})})," Switch to ",(0,C.jsx)("strong",{children:e.pickupcustomer})]}),(0,C.jsxs)("div",{className:"zone-order-card ".concat(p?"clickable":""," ").concat(d?"active":""," ").concat(o?"going-on":""," ").concat(N?"is-pending-time":""),role:p?"button":void 0,tabIndex:p?0:void 0,onClick:p?()=>Le(d?null:{orderid:e.orderid,lat:u,lon:m}):void 0,onKeyDown:p?s=>{"Enter"!==s.key&&" "!==s.key||(s.preventDefault(),Le(d?null:{orderid:e.orderid,lat:u,lon:m}))}:void 0,title:p?d?"Click to show full trip":"Show ".concat(e.deliverycustomer||"order #".concat(e.orderid)," on map"):void 0,children:[(0,C.jsxs)("div",{className:"zone-order-card-head",children:[(0,C.jsx)("div",{className:"zone-order-num",title:"Planned step ".concat(e.step||t+1),children:f}),(0,C.jsx)("div",{className:"zone-order-id-block",children:(0,C.jsxs)("div",{className:"zone-order-id",children:["Order #",e.orderid]})}),(()=>{const s=ae(e.deliverytime),a=ae(e.expecteddeliverytime),t=!w.Ys.has(String(e.orderstatus||"").toLowerCase())&&null!==g;return e.orderstatus||s||a||t?(0,C.jsxs)("div",{className:"zone-order-status-stack",children:[e.orderstatus&&(0,C.jsx)("span",{className:"zone-order-status",style:{background:h.bg,color:h.fg},children:h.label}),(s||a)&&(0,C.jsxs)("span",{className:"zone-order-time ".concat(s?"":"is-expected"),title:s?"Delivered at ".concat(s):"Expected at ".concat(a),children:[(0,C.jsx)(S.VP9,{}),s||a]}),t&&(0,C.jsxs)("span",{className:"zone-order-est-drop",title:"Estimated distance to drop location",children:[(0,C.jsx)(S.HPi,{}),Qa(g)]})]}):null})(),j&&(0,C.jsx)("button",{type:"button",className:"zone-order-change-rider",title:"Change rider",onClick:s=>{s.stopPropagation(),j(e,Ea)},children:(0,C.jsx)(S.$G1,{})})]}),(0,C.jsxs)("div",{className:"zone-order-customer",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.u9F,{})}),e.deliverycustomer||"\u2014"]}),e.pickupcustomer&&(0,C.jsxs)("div",{className:"zone-order-line",title:"Kitchen: ".concat(e.pickupcustomer),children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.NtI,{})}),e.pickupcustomer]}),(e.deliverysuburb||e.deliveryaddress)&&(0,C.jsxs)("div",{className:"zone-order-line",title:e.deliveryaddress||e.deliverysuburb,children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.gwi,{})}),e.deliverysuburb||q(e.deliveryaddress)]}),e.ordernotes&&(0,C.jsxs)("div",{className:"zone-order-line zone-order-notes",title:e.ordernotes,children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.dKO,{})}),e.ordernotes]}),(0,C.jsxs)("div",{className:"zone-order-stats",children:[(0,C.jsxs)("span",{className:"zone-order-chip",title:"Distance",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.xI$,{})}),e.actualkms||e.kms||0," km"]}),(0,C.jsxs)("span",{className:"zone-order-chip ".concat(v?"is-loss":"is-profit"),title:"Profit",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.ohY,{})}),v?"-":"","\u20b9",Math.abs(x).toFixed(0)]}),null!=e.deliverycharge&&(0,C.jsxs)("span",{className:"zone-order-chip",title:"Delivery charge",children:["\u20b9",parseFloat(e.deliverycharge).toFixed(0)," chg"]}),e.ordertype&&(0,C.jsx)("span",{className:"zone-order-chip zone-order-type type-".concat(String(e.ordertype).toLowerCase()),children:e.ordertype}),(0,C.jsxs)("span",{className:"zone-order-chip zone-order-trip",children:["T",e.trip_number||s," \xb7 S",e.step||t+1]})]})]})]},e.orderid)}))})]},s)}))})()]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{className:"rd-rider-name",style:{color:"#f59e0b"},children:ze.kitchenName}),(0,C.jsxs)("div",{className:"rd-rider-sub",children:[(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.gsJ,{})}),ze.orders.length," orders"]}),(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.aVM,{})}),ze.riders.size," riders"]})]}),(0,C.jsxs)("div",{className:"zone-detail-section",children:[(0,C.jsxs)("div",{className:"zone-section-label",children:["Orders ",(0,C.jsxs)("span",{className:"section-count",children:["(",ze.orders.length,")"]})]}),0===ze.orders.length?(0,C.jsx)("div",{className:"zone-suburb-panel-empty",children:"No orders for this kitchen."}):(0,C.jsx)("div",{className:"zone-order-grid",children:ze.orders.map(((e,s)=>{const a=parseFloat(e.droplat||e.deliverylat),t=parseFloat(e.droplon||e.deliverylong),i=Number.isFinite(a)&&Number.isFinite(t),n=De&&De.orderid===e.orderid,r=(0,w.Cx)(e.orderstatus),l=parseFloat(e.profit||0),c=l<0,d=e.rider_id||e.userid,o=d?Ca.find((e=>String(e.id)===String(d))):null,u=(()=>{if(!o)return null;const e=[...o.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!w.Ys.has(s)&&!w.yP.has(s)}));return e?e.orderid:null})(),m=u&&e.orderid===u,p=d?Xa(d,e):null;return(0,C.jsxs)("div",{className:"zone-order-card ".concat(i?"clickable":""," ").concat(n?"active":""," ").concat(m?"going-on":""),role:i?"button":void 0,tabIndex:i?0:void 0,onClick:i?()=>Le(n?null:{orderid:e.orderid,lat:a,lon:t}):void 0,children:[(0,C.jsxs)("div",{className:"zone-order-card-head",children:[(0,C.jsx)("div",{className:"zone-order-num",children:e.step||s+1}),(0,C.jsxs)("div",{className:"zone-order-id-block",children:[(0,C.jsxs)("div",{className:"zone-order-id",children:["Order #",e.orderid]}),(0,C.jsxs)("div",{className:"zone-order-rider",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.aVM,{})}),e.rider_name||e.ridername||"Unassigned"]})]}),(()=>{const s=ae(e.deliverytime),a=ae(e.expecteddeliverytime),t=!w.Ys.has(String(e.orderstatus||"").toLowerCase())&&null!==p;return e.orderstatus||s||a||t?(0,C.jsxs)("div",{className:"zone-order-status-stack",children:[e.orderstatus&&(0,C.jsx)("span",{className:"zone-order-status",style:{background:r.bg,color:r.fg},children:r.label}),(s||a)&&(0,C.jsxs)("span",{className:"zone-order-time ".concat(s?"":"is-expected"),title:s?"Delivered at ".concat(s):"Expected at ".concat(a),children:[(0,C.jsx)(S.VP9,{}),s||a]}),t&&(0,C.jsxs)("span",{className:"zone-order-est-drop",title:"Estimated distance to drop location",children:[(0,C.jsx)(S.HPi,{}),Qa(p)]})]}):null})()]}),(0,C.jsxs)("div",{className:"zone-order-customer",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.u9F,{})}),e.deliverycustomer||"\u2014"]}),e.pickupcustomer&&(0,C.jsxs)("div",{className:"zone-order-line",title:"Kitchen: ".concat(e.pickupcustomer),children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.NtI,{})}),e.pickupcustomer]}),(e.deliverysuburb||e.deliveryaddress)&&(0,C.jsxs)("div",{className:"zone-order-line",title:e.deliveryaddress||e.deliverysuburb,children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.gwi,{})}),e.deliverysuburb||q(e.deliveryaddress)]}),e.ordernotes&&(0,C.jsxs)("div",{className:"zone-order-line zone-order-notes",title:e.ordernotes,children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.dKO,{})}),e.ordernotes]}),(0,C.jsxs)("div",{className:"zone-order-stats",children:[(0,C.jsxs)("span",{className:"zone-order-chip",title:"Distance",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.xI$,{})}),e.actualkms||e.kms||0," km"]}),(0,C.jsxs)("span",{className:"zone-order-chip ".concat(c?"is-loss":"is-profit"),title:"Profit",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.ohY,{})}),c?"-":"","\u20b9",Math.abs(l).toFixed(0)]}),null!=e.deliverycharge&&(0,C.jsxs)("span",{className:"zone-order-chip",title:"Delivery charge",children:["\u20b9",parseFloat(e.deliverycharge).toFixed(0)," chg"]}),e.ordertype&&(0,C.jsx)("span",{className:"zone-order-chip zone-order-type type-".concat(String(e.ordertype).toLowerCase()),children:e.ordertype}),(0,C.jsxs)("span",{className:"zone-order-chip zone-order-trip",children:["T",e.trip_number||"-"," \xb7 S",e.step||s+1]})]})]},e.orderid)}))})]})]})]}):Pe?(0,C.jsxs)("div",{id:"route-detail",children:[(0,C.jsx)("button",{className:"rd-back",onClick:()=>Ee(null),children:"\u2190 Back to zones"}),(0,C.jsx)("div",{className:"rd-rider-name",style:{color:"#3b82f6"},children:Pe.name}),(0,C.jsx)("div",{className:"rd-rider-sub",children:(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.gsJ,{})}),Pe.totalOrders," ",1===Pe.totalOrders?"order":"orders"]})}),(0,C.jsxs)("div",{className:"zone-detail-section",children:[(0,C.jsxs)("div",{className:"zone-section-label",children:["Orders ",(0,C.jsxs)("span",{className:"section-count",children:["(",Pe.orders.length,")"]})]}),0===Pe.orders.length?(0,C.jsx)("div",{className:"zone-suburb-panel-empty",children:"No orders in this zone."}):(0,C.jsx)("div",{className:"zone-order-grid",children:Pe.orders.map(((e,s)=>{const a=parseFloat(e.droplat||e.deliverylat),t=parseFloat(e.droplon||e.deliverylong),i=Number.isFinite(a)&&Number.isFinite(t),n=De&&De.orderid===e.orderid,r=(0,w.Cx)(e.orderstatus),l=parseFloat(e.profit||0),c=l<0,d=e.rider_id||e.userid,o=d?Ca.find((e=>String(e.id)===String(d))):null,u=(()=>{if(!o)return null;const e=[...o.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!w.Ys.has(s)&&!w.yP.has(s)}));return e?e.orderid:null})(),m=u&&e.orderid===u,p=d?Xa(d,e):null;return(0,C.jsxs)("div",{className:"zone-order-card ".concat(i?"clickable":""," ").concat(n?"active":""," ").concat(m?"going-on":""),role:i?"button":void 0,tabIndex:i?0:void 0,onClick:i?()=>Le(n?null:{orderid:e.orderid,lat:a,lon:t}):void 0,children:[(0,C.jsxs)("div",{className:"zone-order-card-head",children:[(0,C.jsx)("div",{className:"zone-order-num",children:e.step||s+1}),(0,C.jsxs)("div",{className:"zone-order-id-block",children:[(0,C.jsxs)("div",{className:"zone-order-id",children:["Order #",e.orderid]}),(0,C.jsxs)("div",{className:"zone-order-rider",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.aVM,{})}),e.rider_name||e.ridername||"Unassigned"]})]}),(()=>{const s=ae(e.deliverytime),a=ae(e.expecteddeliverytime),t=!w.Ys.has(String(e.orderstatus||"").toLowerCase())&&null!==p;return e.orderstatus||s||a||t?(0,C.jsxs)("div",{className:"zone-order-status-stack",children:[e.orderstatus&&(0,C.jsx)("span",{className:"zone-order-status",style:{background:r.bg,color:r.fg},children:r.label}),(s||a)&&(0,C.jsxs)("span",{className:"zone-order-time ".concat(s?"":"is-expected"),title:s?"Delivered at ".concat(s):"Expected at ".concat(a),children:[(0,C.jsx)(S.VP9,{}),s||a]}),t&&(0,C.jsxs)("span",{className:"zone-order-est-drop",title:"Estimated distance to drop location",children:[(0,C.jsx)(S.HPi,{}),Qa(p)]})]}):null})()]}),(0,C.jsxs)("div",{className:"zone-order-customer",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.u9F,{})}),e.deliverycustomer||"\u2014"]}),e.pickupcustomer&&(0,C.jsxs)("div",{className:"zone-order-line",title:"Kitchen: ".concat(e.pickupcustomer),children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.NtI,{})}),e.pickupcustomer]}),(e.deliverysuburb||e.deliveryaddress)&&(0,C.jsxs)("div",{className:"zone-order-line",title:e.deliveryaddress||e.deliverysuburb,children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.gwi,{})}),e.deliverysuburb||q(e.deliveryaddress)]}),e.ordernotes&&(0,C.jsxs)("div",{className:"zone-order-line zone-order-notes",title:e.ordernotes,children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.dKO,{})}),e.ordernotes]}),(0,C.jsxs)("div",{className:"zone-order-stats",children:[(0,C.jsxs)("span",{className:"zone-order-chip",title:"Distance",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.xI$,{})}),e.actualkms||e.kms||0," km"]}),(0,C.jsxs)("span",{className:"zone-order-chip ".concat(c?"is-loss":"is-profit"),title:"Profit",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.ohY,{})}),c?"-":"","\u20b9",Math.abs(l).toFixed(0)]}),null!=e.deliverycharge&&(0,C.jsxs)("span",{className:"zone-order-chip",title:"Delivery charge",children:["\u20b9",parseFloat(e.deliverycharge).toFixed(0)," chg"]}),e.ordertype&&(0,C.jsx)("span",{className:"zone-order-chip zone-order-type type-".concat(String(e.ordertype).toLowerCase()),children:e.ordertype}),(0,C.jsxs)("span",{className:"zone-order-chip zone-order-trip",children:["T",e.trip_number||"-"," \xb7 S",e.step||s+1]})]})]},e.orderid)}))})]})]}):(0,C.jsxs)("div",{id:"riders-panel",children:[(0,C.jsx)("div",{className:"ph",children:"zones"===M?"Zone dispatch":"kitchens"===M?"Kitchen dispatch":"Rider dispatch"}),(0,C.jsx)("div",{id:"rider-cards",children:0!==Aa.length||ga?"zones"===M?Ma.map(((e,s)=>{const a=e.statusCounts.delivered||0,t=e.totalProfit<0;return(0,C.jsxs)("div",{className:"rcard zone-card",onClick:()=>Ee(e),style:{animationDelay:"".concat(.05*s,"s")},children:[(0,C.jsxs)("div",{className:"zone-card-header",children:[(0,C.jsx)("div",{className:"zone-card-emoji",children:(0,C.jsx)(S.Cd7,{})}),(0,C.jsxs)("div",{className:"zone-card-titles",children:[(0,C.jsx)("div",{className:"zone-card-name",children:e.name}),(0,C.jsxs)("div",{className:"zone-card-sub",children:[e.activeRidersCount," ",1===e.activeRidersCount?"rider":"riders"," \xb7 ",e.totalOrders," ",1===e.totalOrders?"order":"orders"]})]}),(0,C.jsx)("span",{className:"zone-card-arrow","aria-hidden":"true",children:"\u2192"})]}),e.totalOrders>0&&(0,C.jsxs)("div",{className:"zone-progress-row",children:[(0,C.jsx)("div",{className:"zone-status-bar",title:Object.entries(e.statusCounts).map((e=>{let[s,a]=e;return"".concat((0,w.Cx)(s).label,": ").concat(a)})).join(" \xb7 "),children:Object.entries(e.statusCounts).map((s=>{let[a,t]=s;const i=(0,w.Cx)(a),n=t/e.totalOrders*100;return(0,C.jsx)("div",{className:"zone-status-seg",style:{width:"".concat(n,"%"),background:i.bg}},a)}))}),(0,C.jsxs)("div",{className:"zone-progress-label",children:[a,"/",e.totalOrders]})]}),(0,C.jsxs)("div",{className:"zone-stat-pills",children:[(0,C.jsxs)("span",{className:"zone-stat-pill",title:"Areas covered",children:[(0,C.jsx)("span",{className:"zone-stat-icon",children:(0,C.jsx)(S.gwi,{})}),(0,C.jsx)("span",{className:"zone-stat-value",children:e.suburbs.length}),(0,C.jsx)("span",{className:"zone-stat-label",children:1===e.suburbs.length?"area":"areas"})]}),(0,C.jsxs)("span",{className:"zone-stat-pill",title:"Total distance",children:[(0,C.jsx)("span",{className:"zone-stat-icon",children:(0,C.jsx)(S.xI$,{})}),(0,C.jsx)("span",{className:"zone-stat-value",children:e.totalKms.toFixed(1)}),(0,C.jsx)("span",{className:"zone-stat-label",children:"km"})]}),(0,C.jsxs)("span",{className:"zone-stat-pill",title:"Kitchens",children:[(0,C.jsx)("span",{className:"zone-stat-icon",children:(0,C.jsx)(S.NtI,{})}),(0,C.jsx)("span",{className:"zone-stat-value",children:e.kitchens.length}),(0,C.jsx)("span",{className:"zone-stat-label",children:1===e.kitchens.length?"kitchen":"kitchens"})]}),(0,C.jsxs)("span",{className:"zone-stat-pill ".concat(t?"profit-negative":"profit-positive"),title:"Total profit",children:[(0,C.jsx)("span",{className:"zone-stat-icon",children:(0,C.jsx)(S.ohY,{})}),(0,C.jsx)("span",{className:"zone-stat-value",children:t?"-\u20b9".concat(Math.abs(e.totalProfit).toFixed(0)):"\u20b9".concat(e.totalProfit.toFixed(0))})]})]}),e.suburbs.length>0&&(0,C.jsxs)("div",{className:"zone-card-suburbs",children:[(0,C.jsx)("span",{className:"zone-card-suburbs-text",children:e.suburbs.slice(0,3).map((e=>e.name)).join(" \xb7 ")}),e.suburbs.length>3&&(0,C.jsxs)("span",{className:"zone-card-suburbs-more",children:["+",e.suburbs.length-3]})]})]},e.id)})):"kitchens"===M?za.map(((e,s)=>(0,C.jsxs)("div",{className:"rcard",onClick:()=>Ae(e),style:{animationDelay:"".concat(.05*s,"s")},children:[(0,C.jsxs)("div",{className:"rcard-top",children:[(0,C.jsx)("div",{className:"rcard-emo",style:{background:"#f59e0b18",borderColor:"#f59e0b50",color:"#f59e0b"},children:(0,C.jsx)(S.NtI,{})}),(0,C.jsxs)("div",{className:"rcard-info",children:[(0,C.jsx)("div",{className:"rcard-name",children:e.kitchenName}),(0,C.jsxs)("div",{className:"rcard-zone",children:[e.riders.size," riders \xb7 ",(0,C.jsx)(de,{children:(0,C.jsx)(S.ohY,{})}),"\u20b9",e.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0).toFixed(0)]})]}),(0,C.jsx)("div",{className:"rcard-badge",style:{background:"#f59e0b18",color:"#f59e0b"},children:e.orders.length})]}),(0,C.jsx)("div",{className:"bar-bg",children:(0,C.jsx)("div",{className:"bar-fg",style:{width:"".concat(Math.min(100,e.orders.length/20*100),"%"),background:"#f59e0b"}})}),(0,C.jsxs)("div",{className:"rcard-meta",children:[(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.xI$,{})}),e.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0).toFixed(1)," km"]}),(0,C.jsxs)("span",{children:[e.riders.size," riders"]})]}),(0,C.jsx)("div",{className:"step-ids",children:Array.from(e.riders).slice(0,10).map((e=>{var s;return(0,C.jsx)("span",{className:"step-id",style:{color:Za(e)},children:null===(s=Ca.find((s=>s.id===e)))||void 0===s?void 0:s.riderName.split(" ")[0]},e)}))})]},e.id))):Ca.map(((e,s)=>{var a;const t=e.orders.length,i=e.orders.filter((e=>w.Ys.has(String(e.orderstatus||"").toLowerCase()))).length,n=t>0&&i>=t,r=e.orders.find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!w.Ys.has(s)&&!w.yP.has(s)})),l=r?Xa(e.id,r):null;return(0,C.jsxs)("div",{className:"rcard",onClick:()=>Da(e),style:{animationDelay:"".concat(.05*s,"s")},children:[(0,C.jsxs)("div",{className:"rcard-top",children:[(0,C.jsx)("div",{className:"rcard-emo",style:{background:"".concat(e.color,"18"),borderColor:"".concat(e.color,"50"),color:e.color},children:(0,C.jsx)(S.aVM,{})}),(0,C.jsxs)("div",{className:"rcard-info",children:[(0,C.jsx)("div",{className:"rcard-name",children:e.riderName}),(0,C.jsxs)("div",{className:"rcard-zone",children:[(null===(a=e.orders[0])||void 0===a?void 0:a.zone_name)||ys||"Local"," \xb7 ",new Set(e.orders.map((e=>e.trip_number||1))).size," trips"]})]}),(0,C.jsxs)("div",{className:"rcard-badge ".concat(n?"is-done":""),style:n?void 0:{background:"".concat(e.color,"18"),color:e.color},title:"".concat(i," delivered of ").concat(t," total"),children:[i,"/",t]})]}),(0,C.jsx)("div",{className:"bar-bg",children:(0,C.jsx)("div",{className:"bar-fg",style:{width:"".concat(Math.min(100,t/15*100),"%"),background:e.color}})}),(0,C.jsxs)("div",{className:"rcard-meta",children:[(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.xI$,{})}),e.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0).toFixed(1)," km"]}),null!==l&&(0,C.jsxs)("span",{className:"rcard-est-meters",title:"Estimated distance to next drop location",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.HPi,{})}),Qa(l)," to drop"]}),(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.ohY,{})}),"\u20b9",e.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0).toFixed(0)]})]}),(0,C.jsx)("div",{className:"step-ids",children:e.orders.slice(0,15).map((e=>(0,C.jsxs)("span",{className:"step-id",children:["S",e.step]},e.orderid)))})]},e.id)})):(e=>{const s=null===(e=ls.find((e=>e.id===ma)))||void 0===e?void 0:e.label,a=xa&&ka.length>0;return(0,C.jsxs)("div",{className:"empty-slot",children:[(0,C.jsx)("div",{className:"empty-slot-icon",children:(0,C.jsx)(S.gsJ,{})}),(0,C.jsx)("div",{className:"empty-slot-title",children:s?"No orders in ".concat(s):"No orders"}),(0,C.jsx)("div",{className:"empty-slot-sub",children:a?"".concat(ka.length," order").concat(1===ka.length?"":"s"," exist in other slots today"):"No deliveries found for this date"})]})})()})]})]}),(0,C.jsxs)("div",{id:"map-wrap",className:"".concat("kitchens"===M?"view-mode-kitchens":""," ").concat(Vs?"compare-split":"").trim(),children:[(0,C.jsxs)(d.W,{center:[11.022,76.982],zoom:12,scrollWheelZoom:!0,style:{height:"100%",width:"100%"},zoomControl:!1,renderer:da.current,inertia:!0,inertiaDeceleration:2400,inertiaMaxSpeed:2e3,wheelDebounceTime:20,wheelPxPerZoomLevel:80,zoomSnap:.25,children:[(0,C.jsx)(o.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"\xa9 OpenStreetMap contributors"}),(0,C.jsx)(p.p,{position:"bottomright"}),Vs&&(0,C.jsx)(Z,{targetRef:ca}),(0,C.jsx)(X,{trigger:"".concat(ea,"|").concat(Vs,"|").concat(ia)}),(0,C.jsx)(ce,{focusedItem:Ua||(Ea||ze)&&De||Ea||ze||Pe,viewMode:M,orders:Aa,kitchens:za,locationKey:We}),za.filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lon))).filter((e=>!Ea||e.riders.has(Ea.id))).map(((e,s)=>(0,C.jsx)(l.p,{position:[e.lat,e.lon],icon:$a(e.kitchenName,(null===ze||void 0===ze?void 0:ze.id)===e.id),zIndexOffset:(null===ze||void 0===ze?void 0:ze.id)===e.id?4e3:2e3,eventHandlers:{click:()=>Ae(e),mouseover:e=>e.target.openPopup(),mouseout:e=>e.target.closePopup()},children:(0,C.jsxs)(m.z,{className:"kitchen-popup",maxWidth:220,minWidth:200,autoPan:!0,autoPanPadding:[20,20],children:[(0,C.jsx)("div",{className:"kp-header",children:"KITCHEN"}),(0,C.jsx)("div",{className:"kp-name",children:e.kitchenName}),(0,C.jsxs)("div",{className:"kp-stat",children:[(0,C.jsx)("span",{className:"kp-stat-lbl",children:"Orders"}),(0,C.jsx)("span",{className:"kp-stat-val",children:e.orders.length})]})]})},"k-".concat(s)))),(()=>{if(Vs&&Ea&&"actual"===Bs)return null;let e=Aa;Pe&&(e=Pe.orders),ze&&(e=ze.orders),Ea&&(e=Ea.orders),e=e.filter(I);const s=Vs&&Ea?new Map(Ha.map((e=>[String(e.deliveryid),e.sequenceStep]))):null;return e.map(((a,t)=>{const i=a.rider_id,n=!i||we.has(i);let r,c=Za(i);if(s&&i===Ea.id&&null!=a.deliveryid){const e=s.get(String(a.deliveryid));e&&(c=(0,w.gM)(e-1),r=e)}const d=!!Ea||!!ze,o=(0,w.Cx)(a.orderstatus),u="delivered"===String(a.orderstatus||"").toLowerCase(),m=v&&String(v)===String(a.orderid),p=a.orderstatus?'\n \n \n ').concat(u?'':"","\n "):"",h=d?(()=>{const s=r||a.step||e.indexOf(a)+1,t=32;return x().divIcon({className:"",iconSize:[t,t],iconAnchor:[16,16],popupAnchor:[0,-28],html:'
9?12:14,"px;opacity:").concat(n?1:.75,'">').concat(s>0?s:"").concat(p,"
")})})():x().divIcon({className:"",iconSize:[24,30],iconAnchor:[2,30],popupAnchor:[10,-25],html:'
').concat(p,"
")});return(0,C.jsx)(l.p,{position:[parseFloat(a.droplat||a.deliverylat),parseFloat(a.droplon||a.deliverylong)],icon:h,zIndexOffset:i?100:0,ref:e=>{e?Oe.current[String(a.orderid)]=e:delete Oe.current[String(a.orderid)]},eventHandlers:{click:()=>{const e=String(a.orderid);Re.current.has(e)?(Re.current.delete(e),Ve(null)):(Re.current.add(e),Ve(a))}}},"".concat(a.orderid,"-").concat(d?"num":"flag"))}))})(),(()=>{const e=Vs&&Ea&&"actual"===Bs;if(Cs)return e?[]:As.map(((e,s)=>(0,C.jsx)(c.R,{positions:[e.from,e.to],pathOptions:{color:e.color,weight:6,opacity:.9,lineJoin:"round",lineCap:"round"}},s)));const s=[],a=Pe?new Set(Pe.riders.map((e=>String(e.rider_id)))):null;return e||Ca.forEach((e=>{const t=we.has(e.id);if(Ea&&Ea.id!==e.id)return;if(ze&&!ze.riders.has(e.id))return;if(a&&!a.has(String(e.id)))return;const i=e.orders,r={};i.forEach((e=>{const s=e.trip_number||1;r[s]||(r[s]=[]),r[s].push(e)})),Object.entries(r).forEach((a=>{let[i,r]=a;const l=ze?r.filter((e=>(e.pickupcustomer||e.kitchen_key||"Unknown").toLowerCase().trim()===ze.id)):r;if(0===l.length)return;const d=[...r].sort(((e,s)=>(e.step||0)-(s.step||0))),o=ie(d),u=ne(e.id,i,o),m=ks[u],p=[...l].sort(((e,s)=>(e.step||0)-(s.step||0))),h=Array.isArray(m)&&m.length>=2,x=!1===m;if(!h&&!x)return;const v=h?m:ie(p);if(!v||v.length<2)return;const j=t?1:.1,g="kitchens"===M||ze?7:6,f=Vs&&Ea&&e.id===Ea.id,N=x?"8 6":f&&"combined"===Bs?"6 5":void 0;if(Vs&&Ea&&e.id===Ea.id){const a=new Map(Ha.map((e=>[String(e.deliveryid),e.sequenceStep]))),t=p.filter(I),n=t.map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)]));let r;if(h)r=se(v,n);else{const e=v.length>n.length;r=[];for(let s=0;s=v.length||t>=v.length?r.push([]):r.push([v[a],v[t]])}}const l="combined"===Bs?5:0;return s.push((0,C.jsx)(c.R,{positions:v,pathOptions:{color:"#ffffff",weight:g+4,opacity:.5*j,lineJoin:"round",lineCap:"round",offset:l}},"".concat(e.id,"-").concat(i,"-halo"))),void r.forEach(((n,r)=>{if(!n||n.length<2)return;const d=t[r],o=d?a.get(String(d.deliveryid)):null,u="combined"===Bs?E:o?(0,w.gM)(o-1):e.color,m=null!=ra&&ra===o,p=m?g+1.5:g,h=m?1:ra?.5*j:j;s.push((0,C.jsx)(c.R,{positions:n,pathOptions:{color:u,weight:p,opacity:h,lineJoin:"round",lineCap:"round",dashArray:N,offset:l}},"".concat(e.id,"-").concat(i,"-step-").concat(r,"-").concat((null===d||void 0===d?void 0:d.deliveryid)||r)))}))}s.push((0,C.jsxs)(n.Fragment,{children:[(0,C.jsx)(c.R,{positions:v,pathOptions:{color:"#ffffff",weight:g+4,opacity:.5*j,lineJoin:"round",lineCap:"round"}}),(0,C.jsx)(c.R,{positions:v,pathOptions:{color:e.color,weight:g,opacity:j,lineJoin:"round",lineCap:"round",dashArray:N}})]},"".concat(e.id,"-").concat(i)))}))})),s})(),ua.filter((e=>Ca.some((s=>String(s.id)===String(e.id))))).filter((e=>!Ea||String(Ea.id)===String(e.id))).map((e=>{var s;const a="active"===e.status?"#16a34a":"#dc2626",t=Ca.find((s=>String(s.id)===String(e.id))),i=null===t||void 0===t||null===(s=t.orders)||void 0===s?void 0:s.slice().sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!w.Ys.has(s)&&!w.yP.has(s)})),n=i?i.deliverysuburb||q(i.deliveryaddress):null,r=x().divIcon({className:"",iconSize:[140,56],iconAnchor:[12,41],popupAnchor:[58,-40],html:'
\n
\n
').concat((e.username||"").replace(/[<>&"']/g,"")).concat(e.orderid?" #".concat(String(e.orderid).replace(/[<>&"']/g,""),""):"","
\n
")});return(0,C.jsx)(l.p,{position:[e.lat,e.lon],icon:r,zIndexOffset:2500,eventHandlers:{click:s=>{const a=String(e.id);Te.current.has(a)?(Te.current.delete(a),s.target.closePopup()):(Te.current.add(a),s.target.openPopup());const t=Ca.find((e=>String(e.id)===a));t&&Da(t)},popupclose:()=>{Te.current.delete(String(e.id))}},children:(0,C.jsxs)(m.z,{maxWidth:260,autoPan:!0,autoPanPadding:[20,20],className:"dispatch-popup live-rider-popup",children:[(0,C.jsx)("div",{className:"pu-hdr-live",children:(0,C.jsxs)("div",{className:"pu-hdr-left",children:[(0,C.jsx)("span",{className:"pu-live-indicator",style:{"--pulse-color":a},children:(0,C.jsx)("span",{className:"pu-live-dot"})}),(0,C.jsx)("span",{className:"pu-hdr-title",children:"LIVE GPS"})]})}),(0,C.jsxs)("div",{className:"pu-rider-profile",children:[(0,C.jsx)("div",{className:"pu-avatar",style:{backgroundColor:"".concat(a,"12"),color:a},children:(0,C.jsx)(S.bsz,{})}),(0,C.jsxs)("div",{className:"pu-rider-info-text",children:[(0,C.jsxs)("div",{className:"pu-rider-name-row",children:[(0,C.jsx)("span",{className:"pu-rider-name",children:e.username||"Rider #".concat(e.id)}),e.status&&(0,C.jsx)("span",{className:"pu-status-badge ".concat("active"===e.status.toLowerCase()?"active":"idle"),children:e.status})]}),(0,C.jsxs)("div",{className:"pu-rider-meta",children:["Rider ID: #",e.id]})]})]}),(0,C.jsxs)("div",{className:"pu-body-content",children:[e.orderid&&(0,C.jsxs)("div",{className:"pu-info-row",children:[(0,C.jsx)("span",{className:"pu-info-label",children:"Active Order"}),(0,C.jsxs)("span",{className:"pu-info-value pu-order-badge",children:["#",e.orderid]})]}),i&&(0,C.jsxs)("div",{className:"pu-info-row",children:[(0,C.jsx)("span",{className:"pu-info-label",children:"Next Stop"}),(0,C.jsxs)("span",{className:"pu-info-value",style:{color:"#4f46e5"},children:["#",i.step||"?"," \xb7 ",i.deliverycustomer||"\u2014"]})]}),n&&(0,C.jsxs)("div",{className:"pu-info-row",children:[(0,C.jsx)("span",{className:"pu-info-label",children:"Next Location"}),(0,C.jsx)("span",{className:"pu-info-value",title:i.deliveryaddress||n,children:n})]}),(null===i||void 0===i?void 0:i.pickupcustomer)&&(0,C.jsxs)("div",{className:"pu-info-row",children:[(0,C.jsx)("span",{className:"pu-info-label",children:"Pickup"}),(0,C.jsx)("span",{className:"pu-info-value",title:i.pickupcustomer,children:i.pickupcustomer})]}),e.contactno&&(0,C.jsxs)("div",{className:"pu-info-row",children:[(0,C.jsx)("span",{className:"pu-info-label",children:"Phone"}),(0,C.jsx)("a",{href:"tel:".concat(e.contactno),className:"pu-info-value pu-phone-link",children:e.contactno})]}),e.logdate&&(0,C.jsxs)("div",{className:"pu-info-row",children:[(0,C.jsx)("span",{className:"pu-info-label",children:"Last Seen"}),(0,C.jsxs)("span",{className:"pu-info-value pu-time-stamp",children:[(0,C.jsx)(S.VP9,{className:"inline-icon"})," ",g()(e.logdate).isValid()?g()(e.logdate).format("hh:mm:ss A"):e.logdate]})]}),(0,C.jsxs)("div",{className:"pu-info-row",children:[(0,C.jsx)("span",{className:"pu-info-label",children:"Position"}),(0,C.jsxs)("span",{className:"pu-info-value pu-coordinates",children:[e.lat.toFixed(5),", ",e.lon.toFixed(5)]})]})]})]})},"live-".concat(e.id))})),Vs&&Ea&&"planned"!==Bs&&Ha.map(((e,s)=>{var a,t;if(0===e.coords.length)return null;const i=(0,w.gM)(s),r="combined"===Bs?D:i,d=[e.coords[0].lat,e.coords[0].lng],o=[e.coords[e.coords.length-1].lat,e.coords[e.coords.length-1].lng],m=ws[e.deliveryid],p=Array.isArray(m)&&m.length>=2?m:e.coords.map((e=>[e.lat,e.lng]));let h=p,v=!0;if(Cs){const s=Es[e.sequenceStep]||0;s<2?v=!1:h=p.slice(0,Math.min(s,p.length))}const j=ra===e.sequenceStep,f=String(e.orderstatus||"").toLowerCase(),N=w.Ys.has(f),b=w.yP.has(f),y=Ya.find((s=>s.sequenceStep===e.sequenceStep)),k=!(null===y||void 0===y||!y.anomaly),_=null===Ea||void 0===Ea||null===(a=Ea.orders)||void 0===a?void 0:a.find((s=>null!=s.deliveryid&&String(s.deliveryid)===String(e.deliveryid))),F=(0,w.Cx)(e.orderstatus),M=(e.orderstatus&&'\n \n \n ').concat(N?'':"","\n "),["compare-step-pin"]);j&&M.push("is-focused"),N&&M.push("is-delivered"),b&&M.push("is-skipped"),k&&M.push("is-anomaly");const z='
')+''.concat(e.sequenceStep,"")+(N?'':"")+"
",A=x().divIcon({className:"",iconSize:[36,36],iconAnchor:[18,18],popupAnchor:[0,-22],html:z}),P=1===e.sequenceStep,E=P?x().divIcon({className:"",iconSize:[40,40],iconAnchor:[20,20],html:'
')+'
'}):null,L="combined"===Bs?-5:0;return(0,C.jsxs)(n.Fragment,{children:[v&&(0,C.jsx)(c.R,{positions:h,pathOptions:{color:"#ffffff",weight:j?11:9,opacity:j?.75:.55,lineJoin:"round",lineCap:"round",offset:L}}),v&&(0,C.jsx)(c.R,{positions:h,pathOptions:{color:r,weight:j?6.5:5,opacity:j?1:ra?.55:.95,lineJoin:"round",lineCap:"round",offset:L}}),P&&(0,C.jsx)(l.p,{position:d,icon:E,zIndexOffset:j?900:100,eventHandlers:{click:s=>{s.originalEvent&&s.originalEvent.stopPropagation(),la((s=>s===e.sequenceStep?null:e.sequenceStep))}},children:(0,C.jsx)(u.m,{direction:"top",offset:[0,-12],opacity:1,className:"compare-tooltip",children:(0,C.jsxs)("div",{className:"cmp-tip",children:[(0,C.jsxs)("div",{className:"cmp-tip-header",children:[(0,C.jsx)("span",{className:"cmp-tip-step",style:{background:i},children:(0,C.jsx)(S.zPd,{})}),(0,C.jsxs)("div",{className:"cmp-tip-title-stack",children:[(0,C.jsx)("div",{className:"cmp-tip-title",children:e.pickupcustomer||"Pickup"}),(0,C.jsx)("div",{className:"cmp-tip-sub",children:null!==(t=e.coords[0])&&void 0!==t&&t.logdate?"Picked up \xb7 ".concat(g()(e.coords[0].logdate).format("hh:mm A")):"Rider trip origin"})]})]}),(0,C.jsx)("div",{className:"cmp-tip-action",children:"Click for step 1 details"})]})})}),(0,C.jsx)(l.p,{position:o,icon:A,zIndexOffset:j?1e3:200,eventHandlers:_?{click:s=>{s.originalEvent&&s.originalEvent.stopPropagation(),la((s=>s===e.sequenceStep?null:e.sequenceStep)),He.current&&(clearTimeout(He.current),He.current=null);const a=String(_.orderid);Re.current.has(a)?(Re.current.delete(a),Ve(null)):(Re.current.add(a),Ve(_))}}:{click:s=>{s.originalEvent&&s.originalEvent.stopPropagation(),la((s=>s===e.sequenceStep?null:e.sequenceStep)),_&&s.target&&"function"===typeof s.target.openPopup&&s.target.openPopup()}},children:!_&&(0,C.jsx)(u.m,{direction:"top",offset:[0,-20],opacity:1,className:"compare-tooltip",children:(()=>{const s=(0,w.Cx)(e.orderstatus);return(0,C.jsxs)("div",{className:"cmp-tip",children:[(0,C.jsxs)("div",{className:"cmp-tip-header",children:[(0,C.jsx)("span",{className:"cmp-tip-step",style:{background:i},children:e.sequenceStep}),(0,C.jsxs)("div",{className:"cmp-tip-title-stack",children:[(0,C.jsx)("div",{className:"cmp-tip-title",children:e.deliverycustomer||"Step ".concat(e.sequenceStep)}),(0,C.jsx)("div",{className:"cmp-tip-sub",children:e.deliverytime?"Delivered ".concat(g()(e.deliverytime).format("hh:mm A")):"".concat(e.coords.length," GPS pings")})]}),e.orderstatus&&(0,C.jsx)("span",{className:"cmp-tip-tag",style:{background:s.bg,color:s.fg},children:s.label})]}),k&&(0,C.jsx)("div",{className:"cmp-tip-anomaly",children:"Deviation flagged \u2014 see details below"}),(0,C.jsx)("div",{className:"cmp-tip-action",children:j?"Click to deselect":"Click for details"})]})})()})})]},"actual-".concat(e.deliveryid))}))]}),Vs&&Ea&&(0,C.jsxs)("div",{className:"compare-view-switcher",role:"group","aria-label":"Compare view layer",children:[(0,C.jsx)("button",{type:"button",className:"actual"===Bs?"is-active":"",onClick:()=>Us("actual"),title:"Show only the rider's actual GPS trail",children:"Actual"}),(0,C.jsx)("button",{type:"button",className:"planned"===Bs?"is-active":"",onClick:()=>Us("planned"),title:"Show only the dispatched planned route",children:"Planned"}),(0,C.jsx)("button",{type:"button",className:"combined"===Bs?"is-active":"",onClick:()=>Us("combined"),title:"Overlay planned (dashed) and actual (solid) on one map",children:"Combined"})]}),(0,C.jsx)("div",{id:"ov-tl"}),(0,C.jsxs)("div",{id:"ov-br",children:[(0,C.jsxs)("button",{className:"sbt ".concat(Cs?"active":""),onClick:()=>{if(Cs)return zs(!1),Ps([]),void Ds({});zs(!0),Ps([]),Ds({});const e=Vs&&Ea,s=e?new Map(Ha.map((e=>[String(e.deliveryid),e.sequenceStep]))):null,a=[];if(Ca.forEach((t=>{if(!we.has(t.id))return;if(Ea&&Ea.id!==t.id)return;if(ze&&!ze.riders.has(t.id))return;const i={};t.orders.forEach((e=>{const s=e.trip_number||1;i[s]||(i[s]=[]),i[s].push(e)})),Object.entries(i).forEach((i=>{let[n,r]=i;const l=ze?r.filter((e=>(e.pickupcustomer||e.kitchen_key||"Unknown").toLowerCase().trim()===ze.id)):r;if(0===l.length)return;const c=[...r].sort(((e,s)=>(e.step||0)-(s.step||0))),d=ie(c),o=ne(t.id,n,d),u=ks[o],m=[...l].sort(((e,s)=>(e.step||0)-(s.step||0))),p=ie(m),h="kitchens"===M||ze,x=u||p;if(x.length<2)return;let v=()=>t.color;if(e&&t.id===Ea.id){const e=m.filter(I).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])),a=u?se(u,e):(()=>{const s=p.length>e.length,a=[];for(let t=0;t=p.length||i>=p.length?a.push([]):a.push([p[e],p[i]])}return a})(),i=[];let n=0;a.forEach(((e,s)=>{const a=Math.max(0,((null===e||void 0===e?void 0:e.length)||0)-1);for(let t=0;t{const a=i[e];if(null==a)return t.color;const n=m.filter(I)[a],r=n?s.get(String(n.deliveryid)):null;return r?(0,w.gM)(r-1):t.color}}for(let e=0;ee.delay-s.delay)),a.forEach(((e,s)=>{setTimeout((()=>{Ps((s=>[...s,e])),s===a.length-1&&setTimeout((()=>{zs(!1),Ds({})}),1e3)}),e.delay)})),e&&Ha.length>0){const e=[...Ha],s=e.map((e=>{const s=ws[e.deliveryid];return Array.isArray(s)&&s.length>=2?s:e.coords.map((e=>[e.lat,e.lng]))})),t=a.length>0?a[a.length-1].delay:800*e.length,i=Math.max(t,600*e.length),n=i/Math.max(1,e.length),r=Date.now(),l=()=>{if(!Ls.current)return;const a=Date.now()-r,t={};e.forEach(((e,i)=>{const r=s[i];if(!r||r.length<2)return;const l=i*n;if(a>=l+n)t[e.sequenceStep]=r.length;else if(a>=l){const s=(a-l)/n;t[e.sequenceStep]=Math.max(2,Math.ceil(s*r.length))}})),Ds(t),a{if(Vs)Ks(!1);else{if(!Ea){const e=Ca.find((e=>(e.orders||[]).some((e=>null!=e.deliveryid&&""!==e.deliveryid&&0!==e.deliveryid)))),s=Ca.find((e=>e.orders&&e.orders.length>0)),a=e||s;if(a&&(Da(a),Ke))return void(Qs.current=!0)}Ks(!0)}},title:Ea?"Compare planned vs. actual route for ".concat(Ea.riderName):"Compare planned vs. actual route (will focus the first rider)",style:{boxShadow:"var(--shadow-lg)",background:Vs?"linear-gradient(135deg, #6366f1, #3b82f6)":"#fff",marginLeft:8,color:Vs?"#fff":void 0},children:[(0,C.jsx)("span",{className:"sbt-icon",children:(0,C.jsx)(S.$G1,{})}),Vs?"Exit Compare":"Compare"]})]})]}),Vs&&Ea&&(0,C.jsx)("div",{id:"compare-map-wrap",children:(()=>{const e=Ha.length,s=Ha.filter((e=>e.coords.length>0)).length,a=Ha.filter((e=>e.isLoading)).length,t=e>0?Math.round(s/e*100):0,i=e>0&&s===e&&0===a,r=null!=ra?Ya.find((e=>e.sequenceStep===ra)):null;return(0,C.jsxs)("div",{className:"compare-header-v2",children:[(0,C.jsxs)("div",{className:"compare-header-row",children:[(0,C.jsxs)("div",{className:"compare-title",children:[(0,C.jsx)("span",{className:"compare-title-dot",style:{background:Ea.color}}),(0,C.jsx)("span",{className:"compare-title-name",children:Ea.riderName}),(0,C.jsx)("span",{className:"compare-title-badge",children:"ACTUAL vs PLANNED"})]}),(0,C.jsxs)("div",{className:"compare-header-tools",children:[null!=ra&&(0,C.jsxs)("button",{type:"button",className:"compare-overall-btn",onClick:()=>la(null),title:"Zoom out to the whole day",children:[(0,C.jsx)(S.Zs6,{})," Overall"]}),(0,C.jsx)("button",{type:"button",className:"compare-timeline-toggle".concat(Ws?" is-open":""),onClick:()=>$s((e=>!e)),title:Ws?"Hide planned/actual timeline":"Show planned/actual timeline","aria-expanded":Ws,children:(0,C.jsx)(S.j1Q,{})})]})]}),Ws&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("div",{className:"compare-timeline-wrap",children:[(0,C.jsxs)("div",{className:"compare-timeline-container",children:[(0,C.jsxs)("div",{className:"compare-timeline-labels",children:[(0,C.jsx)("div",{className:"compare-timeline-label",children:"Planned"}),(0,C.jsx)("div",{className:"compare-timeline-label",children:"Actual"})]}),(0,C.jsxs)("div",{className:"compare-timeline-scrollable",children:[(0,C.jsx)("div",{className:"compare-timeline-track is-planned",children:Ka.map(((e,s)=>{var a;const t=String(e.orderstatus||"").toLowerCase(),i=w.Ys.has(t),r=w.yP.has(t),l=ra===e.sequenceStep,c=e.isLoading&&0===e.coordsCount,d=!e.isLoading&&0===e.coordsCount,o=(null===(a=e.order)||void 0===a?void 0:a.step)||e.sequenceStep,u=(0,w.gM)(o-1),m=["compare-step",l&&"is-focused",i&&"is-delivered",r&&"is-skipped",!i&&!r&&"is-pending",c&&"is-loading",d&&"is-no-data",e.anomaly&&"is-anomaly"].filter(Boolean).join(" ");return(0,C.jsxs)(n.Fragment,{children:[s>0&&(0,C.jsx)("span",{className:"compare-step-spacer"}),(0,C.jsxs)("button",{type:"button",className:m,style:{"--step-color":u},onClick:()=>la((s=>s===e.sequenceStep?null:e.sequenceStep)),title:"Planned Step ".concat(o)+(e.deliverycustomer?" \xb7 ".concat(e.deliverycustomer):"")+(e.expectedTs?" \xb7 ".concat(e.expectedTs.format("hh:mm A")):"")+(e.anomaly?" \xb7 deviation flagged":""),children:[(0,C.jsx)("span",{className:"compare-step-circle",children:c?(0,C.jsx)("span",{className:"compare-step-spin"}):o}),e.expectedTs&&(0,C.jsx)("span",{className:"compare-step-tick",children:e.expectedTs.format("HH:mm")})]})]},"step-p-".concat(e.deliveryid))}))}),(0,C.jsx)("div",{className:"compare-timeline-track is-actual",children:Ba.map(((e,s)=>{var a;const t=String(e.orderstatus||"").toLowerCase(),i=w.Ys.has(t),r=w.yP.has(t),l=ra===e.sequenceStep,c=e.isLoading&&0===e.coordsCount,d=!e.isLoading&&0===e.coordsCount,o=(null===(a=e.order)||void 0===a?void 0:a.step)||e.sequenceStep,u=(0,w.gM)(o-1),m=["compare-step",l&&"is-focused",i&&"is-delivered",r&&"is-skipped",!i&&!r&&"is-pending",c&&"is-loading",d&&"is-no-data",e.anomaly&&"is-anomaly"].filter(Boolean).join(" ");return(0,C.jsxs)(n.Fragment,{children:[s>0&&(0,C.jsx)("span",{className:"compare-step-spacer"}),(0,C.jsxs)("button",{type:"button",className:m,style:{"--step-color":u},onClick:()=>la((s=>s===e.sequenceStep?null:e.sequenceStep)),title:"Actual Visit ".concat(s+1," (Planned Step ").concat(o,")")+(e.deliverycustomer?" \xb7 ".concat(e.deliverycustomer):"")+(e.actualTs?" \xb7 ".concat(e.actualTs.format("hh:mm A")):"")+(e.anomaly?" \xb7 deviation flagged":""),children:[(0,C.jsx)("span",{className:"compare-step-circle",children:c?(0,C.jsx)("span",{className:"compare-step-spin"}):o}),e.actualTs&&(0,C.jsx)("span",{className:"compare-step-tick",children:e.actualTs.format("HH:mm")}),e.anomaly&&(0,C.jsx)("span",{className:"compare-step-flag",title:"Deviation flagged"})]})]},"step-a-".concat(e.deliveryid))}))})]})]}),(0,C.jsxs)("div",{className:"compare-progress-strip",children:[(0,C.jsx)("div",{className:"compare-progress-bar-wrap",children:(0,C.jsx)("div",{className:"compare-progress-bar-fill".concat(i?" is-done":""),style:{width:"".concat(t,"%")}})}),(0,C.jsx)("span",{className:"compare-progress-text",children:a>0?"Loading GPS\u2026 ".concat(s,"/").concat(e):"".concat(s,"/").concat(e," tracks")})]})]}),(()=>{const e="combined"===Bs,s=r?(0,w.gM)(r.sequenceStep-1):"linear-gradient(90deg, ".concat(w.Z3.slice(0,6).join(", "),")"),a=e?E:s,t=e?D:s;return(0,C.jsxs)("div",{className:"compare-legend",children:[(0,C.jsxs)("span",{className:"compare-legend-item",children:[(0,C.jsx)("span",{className:"compare-legend-swatch is-step-color is-dashed",style:{background:a}}),"Planned (dashed)"]}),(0,C.jsxs)("span",{className:"compare-legend-item",children:[(0,C.jsx)("span",{className:"compare-legend-swatch is-step-color",style:{background:t}}),"Actual GPS (solid)"]}),(0,C.jsx)("span",{className:"compare-legend-note",children:"Kalman-smoothed GPS \xb7 OSRM road-snapped"})]})})()]})]})})()}),Vs&&Ea&&(0,C.jsx)(z,{focusedRider:Ea,compareDeltas:Ya,compareSummary:Va,actualOrdered:Ba,focusedCompareStep:ra,setFocusedCompareStep:la,sequenceOpen:Gs,setSequenceOpen:Js,expandedSeqGroups:Zs,setExpandedSeqGroups:Xs,onClose:()=>Ks(!1)})]}),Ye&&(0,C.jsx)("div",{className:"dispatch-popup-center",role:"dialog","aria-label":"Order ".concat(Ye.orderid," details"),onMouseEnter:()=>{He.current&&(clearTimeout(He.current),He.current=null)},onMouseLeave:()=>{(e=>{if(!e)return!1;if(Re.current.has(String(e.orderid)))return!0;if(Vs&&Ea&&null!=e.deliveryid){const s=Ha.find((s=>String(s.deliveryid)===String(e.deliveryid)));if(s&&ra===s.sequenceStep)return!0}return!1})(Ye)||(He.current&&clearTimeout(He.current),He.current=setTimeout((()=>{Ve(null),He.current=null}),200))},children:(0,C.jsxs)("div",{className:"dispatch-popup-card dispatch-popup",children:[(0,C.jsx)("button",{type:"button",className:"dispatch-popup-center-close","aria-label":"Close order details",onClick:()=>{Re.current.delete(String(Ye.orderid)),Ve(null)},children:"\xd7"}),(e=>{const s=(0,w.Cx)(e.orderstatus),a=e.rider_id||e.userid,t=w.Ys.has(String(e.orderstatus||"").toLowerCase()),i=t?null:Xa(a,e);return(0,C.jsxs)("div",{style:{height:"100%",width:"100%"},children:[(0,C.jsxs)("div",{className:"pu-header",children:[(0,C.jsxs)("div",{className:"pu-header-top",children:[(0,C.jsxs)("div",{className:"pu-id",children:["ORDER #",e.orderid]}),e.orderstatus&&(0,C.jsx)("span",{className:"pu-status-chip",style:{background:s.bg,color:s.fg},children:s.label})]}),(0,C.jsxs)("div",{className:"pu-rider",children:[(0,C.jsx)(S.aVM,{})," ",(0,C.jsx)("span",{children:e.rider_name||e.ridername||"Unassigned"})]}),(e.deliverycustomer||e.customername)&&(0,C.jsxs)("div",{className:"pu-customer",title:e.deliverycustomer||e.customername,children:[(0,C.jsx)(S.u9F,{}),(0,C.jsx)("span",{children:e.deliverycustomer||e.customername})]}),null!=e.deliveryid&&(0,C.jsxs)("div",{className:"pu-delivery-id",children:["Delivery #",e.deliveryid]})]}),(0,C.jsxs)("div",{className:"pu-body",children:[te.some((s=>e[s.key]))&&(0,C.jsxs)("div",{className:"pu-section",children:[(0,C.jsx)("div",{className:"pu-section-label",children:"Timeline"}),(0,C.jsx)("div",{className:"pu-timeline",children:te.map((s=>{const a=ae(e[s.key]);return a?(0,C.jsxs)("div",{className:"pu-tl-row ".concat(s.final?"delivered":""),children:[(0,C.jsx)("span",{className:"pu-tl-dot"}),(0,C.jsx)("span",{className:"pu-tl-label",children:s.label}),(0,C.jsx)("span",{className:"pu-tl-time",children:a})]},s.key):null}))})]}),(0,C.jsxs)("div",{className:"pu-section",children:[(0,C.jsx)("div",{className:"pu-section-label",children:"Details"}),(0,C.jsxs)("div",{className:"pu-details-grid",children:[(e.pickupcustomer||e.locationname||e.pickuplocation)&&(0,C.jsxs)("div",{className:"pu-detail",children:[(0,C.jsx)("div",{className:"pu-detail-icon",children:(0,C.jsx)(S.NtI,{})}),(0,C.jsxs)("div",{className:"pu-detail-body",children:[(0,C.jsx)("div",{className:"pu-detail-label",children:"Pickup"}),(0,C.jsx)("div",{className:"pu-detail-value",title:e.pickupcustomer||e.locationname||e.pickuplocation,children:e.pickupcustomer||e.locationname||e.pickuplocation})]})]}),(e.deliverysuburb||e.deliveryaddress)&&(0,C.jsxs)("div",{className:"pu-detail",children:[(0,C.jsx)("div",{className:"pu-detail-icon",children:(0,C.jsx)(S.JFD,{})}),(0,C.jsxs)("div",{className:"pu-detail-body",children:[(0,C.jsx)("div",{className:"pu-detail-label",children:"Drop"}),(0,C.jsx)("div",{className:"pu-detail-value",title:e.deliveryaddress||e.deliverysuburb,children:e.deliverysuburb||q(e.deliveryaddress)})]})]}),e.zone_name&&(0,C.jsxs)("div",{className:"pu-detail",children:[(0,C.jsx)("div",{className:"pu-detail-icon",children:(0,C.jsx)(S.Cd7,{})}),(0,C.jsxs)("div",{className:"pu-detail-body",children:[(0,C.jsx)("div",{className:"pu-detail-label",children:"Zone"}),(0,C.jsx)("div",{className:"pu-detail-value",title:e.zone_name,children:e.zone_name})]})]}),(e.rider_id||e.userid)&&(0,C.jsxs)("div",{className:"pu-detail",children:[(0,C.jsx)("div",{className:"pu-detail-icon",children:(0,C.jsx)(S.aVM,{})}),(0,C.jsxs)("div",{className:"pu-detail-body",children:[(0,C.jsx)("div",{className:"pu-detail-label",children:"Rider ID"}),(0,C.jsxs)("div",{className:"pu-detail-value",children:["#",e.rider_id||e.userid]})]})]})]}),(null!=e.kms||null!=e.actualkms||!t&&null!=e.riderkms||null!==i)&&(0,C.jsxs)("div",{className:"pu-distance-row",children:[null!=e.kms&&""!==e.kms&&(0,C.jsxs)("div",{className:"pu-distance-chip",children:[(0,C.jsx)("span",{className:"pu-distance-icon",children:(0,C.jsx)(S.xI$,{})}),(0,C.jsx)("span",{className:"pu-distance-label",children:"Planned"}),(0,C.jsxs)("span",{className:"pu-distance-value",children:[e.kms," km"]})]}),null!=e.actualkms&&""!==e.actualkms&&(0,C.jsxs)("div",{className:"pu-distance-chip",children:[(0,C.jsx)("span",{className:"pu-distance-icon",children:(0,C.jsx)(S.xI$,{})}),(0,C.jsx)("span",{className:"pu-distance-label",children:"Actual"}),(0,C.jsxs)("span",{className:"pu-distance-value",children:[e.actualkms," km"]})]}),!t&&null!=e.riderkms&&""!==e.riderkms&&(0,C.jsxs)("div",{className:"pu-distance-chip",children:[(0,C.jsx)("span",{className:"pu-distance-icon",children:(0,C.jsx)(S.bsz,{})}),(0,C.jsx)("span",{className:"pu-distance-label",children:"Rider"}),(0,C.jsxs)("span",{className:"pu-distance-value",children:[parseFloat(e.riderkms).toFixed(2)," km"]})]}),null!==i&&(0,C.jsxs)("div",{className:"pu-distance-chip pu-est-meters",title:"Estimated distance to drop location",children:[(0,C.jsx)("span",{className:"pu-distance-icon",children:(0,C.jsx)(S.HPi,{})}),(0,C.jsx)("span",{className:"pu-distance-label",children:"Est. to Drop"}),(0,C.jsx)("span",{className:"pu-distance-value",children:Qa(i)})]})]})]})]})]})})(Ye)]})})]}),!a&&"analysis"===W&&(0,C.jsxs)("div",{id:"dispatch-analysis",children:[(0,C.jsx)("div",{className:"da-picker-row",children:oe.map((e=>{var s;const a=he[e.key],t=ve===e.key,i=!1===(null===a||void 0===a||null===(s=a.data)||void 0===s?void 0:s.success),n=i?"#fee2e2":a?"".concat(e.color,"22"):"#f1f5f9",r=i?"#dc2626":a?e.color:"#64748b",l=t?"Loading\u2026":i?"! Failed":a?"\u2713 ".concat(a.fetchedAt):"Fetch",c=ge===e.key;return(0,C.jsxs)("button",{type:"button",className:"da-picker ".concat(a?"has-data":""," ").concat(t?"is-loading":""," ").concat(c?"is-active":""),onClick:()=>!t&&ke(e.key),style:{borderColor:c?e.color:i?"#fecaca":a?e.border:"#e2e8f0",background:i?"#fef2f2":a?e.bg:"#ffffff",boxShadow:c?"0 0 0 2px ".concat(e.color,"33"):void 0},disabled:t,children:[(0,C.jsxs)("div",{className:"da-picker-head",children:[(0,C.jsx)("div",{className:"da-picker-badge",style:{background:"".concat(e.color,"22"),color:e.color},children:e.label[0]}),(0,C.jsxs)("div",{className:"da-picker-meta",children:[(0,C.jsx)("div",{className:"da-picker-name",children:e.label}),(0,C.jsx)("div",{className:"da-picker-range",children:e.timeRange})]}),(0,C.jsx)("span",{className:"da-picker-status",style:{background:n,color:r},children:l})]}),(0,C.jsx)("div",{className:"da-picker-sub",children:e.sub})]},e.key)}))}),((e,s,a)=>{if(!ge)return(0,C.jsx)("div",{className:"da-empty",children:"Pick a batch above to view its efficiency analysis."});const t=oe.find((e=>e.key===ge)),n=he[ge],r=ve===ge;if(r&&!n)return(0,C.jsxs)("div",{className:"da-empty",children:["Loading ",t.label," batch\u2026"]});if(!n)return null;const l=n.data||{};var c,d;if(!1===l.success)return(0,C.jsxs)("div",{className:"da-result-card da-result-card-error",style:{borderColor:"#fecaca",borderTopColor:"#ef4444"},children:[(0,C.jsxs)("div",{className:"da-result-head",children:[(0,C.jsxs)("div",{children:[(0,C.jsxs)("div",{className:"da-result-title",children:[t.label," Batch"]}),(0,C.jsxs)("div",{className:"da-result-sub",children:[t.timeRange," \xb7 Fetched at ",n.fetchedAt]})]}),(0,C.jsx)("button",{type:"button",className:"da-result-refresh",title:"Retry",onClick:()=>ke(ge),disabled:r,style:{background:"#fee2e2",color:"#dc2626"},children:(0,C.jsx)(S.joZ,{})})]}),(0,C.jsxs)("div",{className:"da-error",children:[(0,C.jsxs)("div",{className:"da-error-title",children:[(0,C.jsx)(S.ItP,{}),(0,C.jsx)("span",{children:(null===l||void 0===l||null===(c=l.error)||void 0===c?void 0:c.code)||"Request failed"})]}),(0,C.jsx)("div",{className:"da-error-msg",children:(null===l||void 0===l||null===(d=l.error)||void 0===d?void 0:d.message)||"The server returned an error."}),(null===l||void 0===l?void 0:l.request_id)&&(0,C.jsxs)("div",{className:"da-error-meta",children:["request_id: ",l.request_id]})]})]});const o=l.fleet_summary||{},u=Array.isArray(l.rider_timelines)?l.rider_timelines:[],m=Array.isArray(l.substitution_opportunities)?l.substitution_opportunities:[],p=l.top_recommendation,h=!(!p||!p.idle_rider_name&&!p.idle_rider_id),x=!!(p&&p.action&&"none"!==p.action&&h),v=l.window||{},j=(e,s)=>{const a=String(null!==e&&void 0!==e?e:"").trim();if(!a)return s||"\u2014";const t="string"===typeof s&&/^Rider\s+\d+$/i.test(s.trim()),i=Array.isArray(Ca)?Ca.find((e=>String(e.id)===a)):null;if(i&&i.riderName)return i.riderName;const n=Array.isArray(Sa)?Sa.find((e=>String(e.id)===a)):null;return n&&n.riderName?n.riderName:!t&&s?s:"Rider ".concat(a)},g=me(o.fleet_start),f=me(o.fleet_done),N=null!=g&&null!=f&&f>g?f-g:null,b=parseFloat(o.avg_utilisation_pct),y=Number.isFinite(b)?b:null,k=null==y?"unknown":y>=85?"good":y>=70?"ok":"low",_="good"===k?"#10b981":"ok"===k?"#f59e0b":"low"===k?"#ef4444":"#94a3b8",w=(e=>{let{assessment:s,spreadMin:a,stdev:t}=e;const i=String(s||"").toLowerCase();return/high imbalance|severe|critical/.test(i)||/imbalance|recommend/.test(i)||null!=a&&a>30||null!=t&&t>1?"warn":/balanced|excellent|good/.test(i)?"success":"info"})({assessment:null===p||void 0===p?void 0:p.fleet_balance_assessment,spreadMin:parseFloat(o.finish_time_spread_minutes),stdev:parseFloat(o.load_balance_stdev)}),F=u.map((e=>{const s=me(e.started_at),a=me(e.finished_at);let t=0,n=100;null!=g&&N&&(null!=s&&(t=Math.max(0,Math.min(100,(s-g)/N*100))),null!=a&&(n=Math.max(0,Math.min(100,(a-g)/N*100))));const r=Math.max(0,n-t),l=parseFloat(e.active_minutes),c=parseFloat(e.idle_minutes),d=(Number.isFinite(l)?l:0)+(Number.isFinite(c)?c:0),o=d>0?l/d*100:y,u=null==o?"unknown":o>=85?"good":o>=70?"ok":"low",m="good"===u?"#10b981":"ok"===u?"#f59e0b":"low"===u?"#ef4444":"#94a3b8",p=j(e.userid,e.name);return(0,i.A)((0,i.A)({},e),{},{displayName:p,_startPct:t,_endPct:n,_activePct:r,_riderUtilPct:o,_riderColor:m})}));return F.sort(((e,s)=>(me(s.finished_at)||0)-(me(e.finished_at)||0))),(0,C.jsxs)("div",{className:"da-detail",children:[(0,C.jsxs)("div",{className:"da-detail-head",style:{borderTopColor:t.color,background:t.bg},children:[(0,C.jsxs)("div",{children:[(0,C.jsxs)("div",{className:"da-detail-title",children:[t.label," Batch",(0,C.jsxs)("span",{className:"da-detail-sub-inline",children:[l.date?" \xb7 ".concat(l.date):"",v.from&&v.to?" \xb7 ".concat(v.from," \u2013 ").concat(v.to):""]})]}),(0,C.jsxs)("div",{className:"da-detail-sub",children:["Fetched at ",n.fetchedAt," \xb7 Input deliveries: ",null!==(e=l.input_delivery_count)&&void 0!==e?e:"\u2014"]})]}),(0,C.jsxs)("div",{className:"da-detail-actions",children:[(0,C.jsxs)("span",{className:"da-live-tag ".concat(r?"is-active":""),title:"Auto-refreshing every ".concat(Math.round(15),"s"),children:[(0,C.jsx)("span",{className:"da-live-dot"}),"Live \xb7 ",Math.round(15),"s"]}),(0,C.jsx)("button",{type:"button",className:"da-result-refresh",title:"Refresh now",onClick:()=>{xe((e=>{const s=(0,i.A)({},e);return delete s[ge],s})),ye.mutate({batch:ge,tenantId:916})},disabled:r,style:{background:"".concat(t.color,"22"),color:t.color},children:(0,C.jsx)(S.joZ,{})})]})]}),(0,C.jsx)("div",{className:"da-section",children:(0,C.jsxs)("div",{className:"da-hero-row",children:[(0,C.jsxs)("div",{className:"da-hero-card",style:{borderTopColor:t.color},children:[(0,C.jsx)("div",{className:"da-hero-icon",style:{background:"".concat(t.color,"22"),color:t.color},children:(0,C.jsx)(S.gsJ,{})}),(0,C.jsx)("div",{className:"da-hero-value",children:ue(o.total_orders)}),(0,C.jsx)("div",{className:"da-hero-label",children:"Total Orders"}),null!=l.input_delivery_count&&l.input_delivery_count!==o.total_orders&&(0,C.jsxs)("div",{className:"da-hero-sub",children:[l.input_delivery_count," input"]})]}),(0,C.jsxs)("div",{className:"da-hero-card",style:{borderTopColor:"#0ea5e9"},children:[(0,C.jsx)("div",{className:"da-hero-icon",style:{background:"#0ea5e922",color:"#0ea5e9"},children:(0,C.jsx)(S.aVM,{})}),(0,C.jsx)("div",{className:"da-hero-value",children:ue(o.total_riders)}),(0,C.jsx)("div",{className:"da-hero-label",children:"Active Riders"}),null!=o.orders_per_rider_avg&&(0,C.jsxs)("div",{className:"da-hero-sub",children:[o.orders_per_rider_avg," avg orders / rider"]})]}),(0,C.jsxs)("div",{className:"da-hero-card",style:{borderTopColor:"#8b5cf6"},children:[(0,C.jsx)("div",{className:"da-hero-icon",style:{background:"#8b5cf622",color:"#8b5cf6"},children:(0,C.jsx)(S.VP9,{})}),(0,C.jsxs)("div",{className:"da-hero-value",children:[null!=o.total_duration_minutes?"".concat(o.total_duration_minutes):"\u2014",null!=o.total_duration_minutes&&(0,C.jsx)("span",{className:"da-hero-unit",children:" min"})]}),(0,C.jsx)("div",{className:"da-hero-label",children:"Fleet Window"}),o.fleet_start&&o.fleet_done&&(0,C.jsxs)("div",{className:"da-hero-sub",children:[o.fleet_start," \u2192 ",o.fleet_done]})]})]})}),(0,C.jsxs)("div",{className:"da-section",children:[(0,C.jsx)("div",{className:"da-section-label",children:"Fleet Health"}),(0,C.jsxs)("div",{className:"da-health-row",children:[(0,C.jsxs)("div",{className:"da-health-card",children:[(0,C.jsx)("div",{className:"da-ring",style:{"--ring-color":_,"--ring-pct":null!=y?Math.max(0,Math.min(100,y)):0},children:(0,C.jsxs)("span",{className:"da-ring-num",children:[null!=y?"".concat(y.toFixed(0)):"\u2014",null!=y&&(0,C.jsx)("span",{className:"da-ring-unit",children:"%"})]})}),(0,C.jsxs)("div",{className:"da-health-meta",children:[(0,C.jsx)("div",{className:"da-health-label",children:"Avg Utilisation"}),(0,C.jsx)("div",{className:"da-health-sub",style:{color:_},children:"good"===k?"Strong":"ok"===k?"Moderate":"low"===k?"Low":"\u2014"})]})]}),(0,C.jsxs)("div",{className:"da-health-card da-health-card-stat",children:[(0,C.jsx)("div",{className:"da-health-value",children:null!=o.load_balance_stdev?parseFloat(o.load_balance_stdev).toFixed(2):"\u2014"}),(0,C.jsx)("div",{className:"da-health-label",children:"Load Balance \u03c3"}),(0,C.jsx)("div",{className:"da-health-sub",children:null!=o.load_balance_stdev?parseFloat(o.load_balance_stdev)>1?"Uneven workload":"Workload balanced":"Stdev of orders / rider"})]}),(0,C.jsxs)("div",{className:"da-health-card da-health-card-stat",children:[(0,C.jsxs)("div",{className:"da-health-value",children:[null!=o.finish_time_spread_minutes?"".concat(o.finish_time_spread_minutes):"\u2014",null!=o.finish_time_spread_minutes&&(0,C.jsx)("span",{className:"da-health-unit",children:" min"})]}),(0,C.jsx)("div",{className:"da-health-label",children:"Finish Spread"}),(0,C.jsx)("div",{className:"da-health-sub",children:null!=o.finish_time_stdev_minutes?"\u03c3 ".concat(parseFloat(o.finish_time_stdev_minutes).toFixed(1)," min"):"First \u2192 last finish"})]}),(0,C.jsxs)("div",{className:"da-health-card da-health-card-stat",children:[(0,C.jsxs)("div",{className:"da-health-value",children:[null!=o.avg_active_minutes?"".concat(parseFloat(o.avg_active_minutes).toFixed(0)):"\u2014",null!=o.avg_active_minutes&&(0,C.jsx)("span",{className:"da-health-unit",children:" min"})]}),(0,C.jsx)("div",{className:"da-health-label",children:"Avg Active"}),(0,C.jsx)("div",{className:"da-health-sub",children:"Per rider, this batch"})]})]})]}),(0,C.jsxs)("div",{className:"da-section",children:[(0,C.jsx)("div",{className:"da-section-label",children:"Top Recommendation"}),x?(0,C.jsxs)("div",{className:"da-rec-banner is-action",children:[(0,C.jsx)("div",{className:"da-rec-banner-icon",children:(0,C.jsx)(S.DX0,{})}),(0,C.jsxs)("div",{className:"da-rec-banner-body",children:[(0,C.jsxs)("div",{className:"da-rec-head",children:[(0,C.jsx)("div",{className:"da-rec-action",children:(0,C.jsx)("span",{children:(p.action||"recommendation").replaceAll("_"," ")})}),null!=p.fleet_improvement_minutes&&(0,C.jsxs)("span",{className:"da-rec-improve",style:p.fleet_improvement_minutes>0?{background:"#dcfce7",color:"#166534"}:{background:"#f1f5f9",color:"#475569"},children:[p.fleet_improvement_minutes>0?"\u2191":"\u2022"," Fleet improves by ",p.fleet_improvement_minutes," min"]})]}),(0,C.jsxs)("div",{className:"da-rec-line",children:[(0,C.jsx)("strong",{children:j(p.idle_rider_id,p.idle_rider_name)}),p.primary_kitchen&&(0,C.jsxs)(C.Fragment,{children:[" \xb7 primary kitchen ",(0,C.jsx)("strong",{children:p.primary_kitchen})]}),p.second_kitchen&&(0,C.jsxs)(C.Fragment,{children:[" \u2192 also serve ",(0,C.jsx)("strong",{children:p.second_kitchen})," after ",p.second_kitchen_dispatch_after||"\u2014"]})]}),p.description&&(0,C.jsx)("div",{className:"da-rec-desc",children:p.description}),(null===p||void 0===p?void 0:p.fleet_balance_assessment)&&(0,C.jsx)("div",{className:"da-rec-assess",children:p.fleet_balance_assessment}),(null===(s=p.activate_when)||void 0===s||null===(a=s.rules)||void 0===a?void 0:a.length)>0&&(0,C.jsxs)("div",{className:"da-rec-rules",children:[(0,C.jsxs)("div",{className:"da-rec-rules-head",children:["Activate when (",p.activate_when.condition||"AND","):"]}),p.activate_when.rules.map(((e,s)=>(0,C.jsxs)("div",{className:"da-rec-rule",children:[(0,C.jsxs)("code",{children:[e.field," ",e.operator," ",e.value]}),e.reason&&(0,C.jsxs)("span",{className:"da-rec-rule-why",children:[" \u2014 ",e.reason]})]},s)))]})]})]}):(0,C.jsxs)("div",{className:"da-rec-banner is-".concat(w),children:[(0,C.jsx)("div",{className:"da-rec-banner-icon",children:"warn"===w?(0,C.jsx)(S.Wux,{}):"success"===w?(0,C.jsx)(S.mU9,{}):(0,C.jsx)(S.DX0,{})}),(0,C.jsxs)("div",{className:"da-rec-banner-body",children:[(0,C.jsx)("div",{className:"da-rec-action",children:(0,C.jsx)("span",{children:"warn"===w?"Fleet imbalance detected \u2014 no feasible substitution":"success"===w?"Fleet ran balanced \u2014 no reassignment needed":"No action recommended"})}),(null===p||void 0===p?void 0:p.reason)&&(0,C.jsx)("div",{className:"da-rec-desc",children:p.reason}),(null===p||void 0===p?void 0:p.fleet_balance_assessment)&&(0,C.jsx)("div",{className:"da-rec-assess",children:p.fleet_balance_assessment})]})]})]}),F.length>0&&(0,C.jsxs)("div",{className:"da-section",children:[(0,C.jsxs)("div",{className:"da-section-label",children:["Rider Timelines ",(0,C.jsxs)("span",{className:"da-section-count",children:["(",F.length,")"]}),(0,C.jsx)("span",{className:"da-section-hint",children:"Sorted by latest finish \u2014 bottleneck riders first"})]}),(0,C.jsxs)("div",{className:"da-gantt-axis",children:[(0,C.jsx)("span",{children:o.fleet_start||"\u2014"}),(0,C.jsx)("span",{className:"da-gantt-axis-mid",children:null!=o.total_duration_minutes?"".concat(o.total_duration_minutes," min batch"):"Batch window"}),(0,C.jsx)("span",{children:o.fleet_done||"\u2014"})]}),(0,C.jsx)("div",{className:"da-timeline-list",children:F.map((e=>{var s,a,t;const i="active"===String(e.status||"").toLowerCase(),n=null!==(s=e.completed_orders)&&void 0!==s?s:e.order_count,r=null!==(a=e.pending_orders)&&void 0!==a?a:0,l=null!=n&&e.order_count>0?Math.max(0,Math.min(100,n/e.order_count*100)):0,c=null!=e.idle_minutes&&e.idle_minutes>30,d=null!=e.kitchen_confidence&&e.kitchen_confidence<.7;return(0,C.jsxs)("div",{className:"da-timeline-card",children:[(0,C.jsxs)("div",{className:"da-timeline-top",children:[(0,C.jsxs)("div",{className:"da-timeline-name",children:[(0,C.jsx)(S.aVM,{style:{color:e._riderColor}}),(0,C.jsx)("span",{title:e.name&&e.name!==e.displayName?"API name: ".concat(e.name):void 0,children:e.displayName}),(0,C.jsxs)("span",{className:"da-timeline-id",children:["#",e.userid]})]}),(0,C.jsx)("span",{className:"da-pill ".concat(i?"is-active":"is-idle"),children:e.status})]}),(0,C.jsxs)("div",{className:"da-gantt-row",children:[(0,C.jsxs)("div",{className:"da-gantt-track",title:"".concat(e.started_at," \u2192 ").concat(e.finished_at),children:[(0,C.jsxs)("div",{className:"da-gantt-fill",style:{left:"".concat(e._startPct,"%"),width:"".concat(Math.max(2,e._activePct),"%"),background:e._riderColor},children:[(0,C.jsx)("span",{className:"da-gantt-fill-start",children:e.started_at}),(0,C.jsx)("span",{className:"da-gantt-fill-end",children:e.finished_at})]}),e._endPct<99&&(0,C.jsx)("div",{className:"da-gantt-idle",style:{left:"".concat(e._endPct,"%"),width:"".concat(100-e._endPct,"%")},title:"Idle ".concat(e.idle_minutes," min after finishing")})]}),(0,C.jsx)("span",{className:"da-gantt-util",style:{background:"".concat(e._riderColor,"22"),color:e._riderColor},title:"Per-rider utilisation: ".concat(null!=e._riderUtilPct?e._riderUtilPct.toFixed(0):"\u2014","%"),children:null!=e._riderUtilPct?"".concat(e._riderUtilPct.toFixed(0),"%"):"\u2014"})]}),(0,C.jsxs)("div",{className:"da-timeline-mid",children:[e.kitchen?(0,C.jsxs)("span",{className:"da-chip",title:null!=e.kitchen_confidence?"Kitchen confidence: ".concat((100*e.kitchen_confidence).toFixed(0),"%"):void 0,children:[(0,C.jsx)(S.NtI,{})," ",e.kitchen,null!=e.kitchen_confidence&&(0,C.jsx)("span",{className:"da-conf-dot ".concat(d?"is-low":"is-ok"),"aria-label":"Confidence ".concat((100*e.kitchen_confidence).toFixed(0),"%")})]}):(0,C.jsxs)("span",{className:"da-chip",style:{background:"#f8fafc",color:"#64748b",borderColor:"#e2e8f0",borderStyle:"dashed"},title:"Solver did not identify a primary kitchen for this rider",children:[(0,C.jsx)(S.NtI,{})," Unassigned"]}),(0,C.jsxs)("span",{className:"da-chip da-chip-orders",title:"Completed ".concat(n," of ").concat(e.order_count),children:[(0,C.jsx)(S.gsJ,{}),(0,C.jsxs)("span",{className:"da-orders-label",children:[n,"/",e.order_count]}),(0,C.jsx)("span",{className:"da-orders-bar",children:(0,C.jsx)("span",{className:"da-orders-bar-fill",style:{width:"".concat(l,"%")}})}),r>0&&(0,C.jsxs)("span",{className:"da-orders-pending",children:[r," pending"]})]}),null!=e.pace_orders_per_hour&&(0,C.jsxs)("span",{className:"da-chip",title:"Delivery pace this batch",children:[(0,C.jsx)(S.BJM,{})," ",parseFloat(e.pace_orders_per_hour).toFixed(1)," / hr"]}),null!=e.active_minutes&&(0,C.jsxs)("span",{className:"da-chip",title:"Time actively delivering",children:[(0,C.jsx)(S.pWE,{})," ",parseFloat(e.active_minutes).toFixed(0)," min active"]}),(0,C.jsxs)("span",{className:"da-chip",style:c?{background:"#fef3c7",color:"#92400e",borderColor:"#fde68a"}:void 0,title:"Idle time after this rider finished \u2014 fleet kept running",children:[(0,C.jsx)(S.VP9,{})," ",null!==(t=e.idle_minutes)&&void 0!==t?t:0," min idle"]}),null!=e.free_window_minutes&&(0,C.jsxs)("span",{className:"da-chip",style:e.free_window_minutes>=30?{background:"#ecfdf5",color:"#065f46",borderColor:"#a7f3d0"}:e.free_window_minutes>0?{background:"#fefce8",color:"#854d0e",borderColor:"#fde68a"}:{background:"#fef2f2",color:"#991b1b",borderColor:"#fecaca"},title:"Free window before the next batch \u2014 capacity available for a follow-up run",children:[(0,C.jsx)(S.pWE,{})," ",parseFloat(e.free_window_minutes).toFixed(0)," min free"]})]})]},e.userid)}))})]}),m.length>0&&(0,C.jsxs)("div",{className:"da-section",children:[(0,C.jsxs)("div",{className:"da-section-label",children:["Substitution Opportunities ",(0,C.jsxs)("span",{className:"da-section-count",children:["(",m.length,")"]})]}),(0,C.jsx)("div",{className:"da-sub-list",children:m.map(((e,s)=>{var a;const t=e.idle_rider||{},i=e.most_relieved_rider||{},n=null!==(a=e.fleet_improvement_minutes)&&void 0!==a?a:0;return(0,C.jsxs)("div",{className:"da-sub-card",children:[(0,C.jsxs)("div",{className:"da-sub-head",children:[(0,C.jsxs)("div",{className:"da-sub-title",children:[(0,C.jsx)("strong",{children:j(t.userid,t.name)})," ","covers ",(0,C.jsx)("strong",{children:e.target_kitchen})]}),(0,C.jsxs)("span",{className:"da-sub-improve",style:n>0?{background:"#dcfce7",color:"#166534"}:{background:"#f1f5f9",color:"#475569"},children:["Fleet ",n>0?"\u2191":"\u2022"," ",n," min"]})]}),(0,C.jsxs)("div",{className:"da-sub-meta",children:[(0,C.jsxs)("span",{className:"da-chip",children:[(0,C.jsx)(S.xI$,{})," ",e.travel_to_kitchen_km," km"]}),(0,C.jsxs)("span",{className:"da-chip",children:[(0,C.jsx)(S.pWE,{})," ",e.travel_to_kitchen_minutes," min travel"]}),(0,C.jsxs)("span",{className:"da-chip",children:[(0,C.jsx)(S.VP9,{})," arrives ",e.arrive_at_kitchen]}),(0,C.jsxs)("span",{className:"da-chip",children:[(0,C.jsx)(S.gsJ,{})," ",e.total_orders_transferred," orders"]}),(0,C.jsxs)("span",{className:"da-chip",children:[(0,C.jsx)(S.xI$,{})," +",e.extra_km_for_idle_rider," km for idle rider"]})]}),(i.name||null!=i.userid)&&(0,C.jsxs)("div",{className:"da-sub-relieved",children:[(0,C.jsx)(S.imn,{}),"Most relieved: ",(0,C.jsx)("strong",{children:j(i.userid,i.name)})," ","(",i.original_finish," \u2192 ",i.new_finish,", saves"," ",i.time_saved_minutes," min)"]}),Array.isArray(e.orders_to_transfer)&&e.orders_to_transfer.length>0&&(0,C.jsxs)("div",{className:"da-sub-transfers",children:[(0,C.jsx)("div",{className:"da-sub-transfers-head",children:"Orders transferred"}),e.orders_to_transfer.map((e=>{var s;const a=null!==(s=e.improvement_minutes)&&void 0!==s?s:0;return(0,C.jsxs)("div",{className:"da-transfer-row",children:[(0,C.jsxs)("span",{className:"da-transfer-id",children:["#",e.deliveryid]}),(0,C.jsxs)("span",{className:"da-transfer-from",children:["from ",j(e.from_rider_id||e.from_userid,e.from_rider_name)]}),(0,C.jsxs)("span",{className:"da-transfer-time",children:[e.original_delivery_time," \u2192 ",e.estimated_delivery_time]}),(0,C.jsxs)("span",{className:"da-transfer-imp",style:a>0?{background:"#dcfce7",color:"#166534"}:a<0?{background:"#fee2e2",color:"#991b1b"}:{background:"#f1f5f9",color:"#475569"},children:[a>0?"+":"",a," min"]})]},e.deliveryid)}))]})]},s)}))})]})]})})()]}),Ne&&(0,C.jsx)("div",{className:"da-pos-modal-backdrop",role:"dialog","aria-modal":"true","aria-label":"Last known position of ".concat(Ne.name),onClick:e=>{e.target===e.currentTarget&&be(null)},children:(0,C.jsxs)("div",{className:"da-pos-modal-card",children:[(0,C.jsxs)("div",{className:"da-pos-modal-head",children:[(0,C.jsxs)("div",{className:"da-pos-modal-title-wrap",children:[(0,C.jsx)("div",{className:"da-pos-modal-avatar",style:{background:"".concat(Ne.color||"#662582","22"),color:Ne.color||"#662582"},children:(0,C.jsx)(S.aVM,{})}),(0,C.jsxs)("div",{children:[(0,C.jsx)("div",{className:"da-pos-modal-title",children:Ne.name}),(0,C.jsxs)("div",{className:"da-pos-modal-sub",children:["#",Ne.userid,Ne.kitchen&&(0,C.jsxs)(C.Fragment,{children:[" \xb7 ",Ne.kitchen]}),Ne.finished_at&&(0,C.jsxs)(C.Fragment,{children:[" \xb7 finished ",Ne.finished_at]})]})]})]}),(0,C.jsxs)("div",{className:"da-pos-modal-actions",children:[(0,C.jsx)("span",{className:"da-pill ".concat("active"===String(Ne.status||"").toLowerCase()?"is-active":"is-idle"),children:Ne.status||"\u2014"}),(0,C.jsx)("button",{type:"button",className:"da-pos-modal-close","aria-label":"Close",onClick:()=>be(null),children:(0,C.jsx)(S.m6K,{})})]})]}),(0,C.jsx)("div",{className:"da-pos-modal-map",children:(0,C.jsxs)(d.W,{center:[Ne.lat,Ne.lon],zoom:13,scrollWheelZoom:!0,style:{width:"100%",height:"100%"},whenReady:e=>{const s=e.target;requestAnimationFrame((()=>s.invalidateSize())),setTimeout((()=>s.invalidateSize()),260)},children:[(0,C.jsx)(o.e,{attribution:'\xa9 OpenStreetMap',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),(0,C.jsx)(l.p,{position:[Ne.lat,Ne.lon],children:(0,C.jsxs)(m.z,{children:[(0,C.jsx)("strong",{children:Ne.name}),(0,C.jsx)("br",{}),Ne.lat.toFixed(6),", ",Ne.lon.toFixed(6)]})})]},"".concat(Ne.userid,"-").concat(Ne.lat,"-").concat(Ne.lon))}),(0,C.jsxs)("div",{className:"da-pos-modal-foot",children:[(0,C.jsxs)("div",{className:"da-pos-modal-coord",children:[(0,C.jsx)(S.gwi,{}),(0,C.jsxs)("span",{children:[(0,C.jsx)("strong",{children:"Lat:"})," ",Ne.lat.toFixed(6),(0,C.jsx)("span",{className:"da-pos-modal-sep",children:"\xb7"}),(0,C.jsx)("strong",{children:"Lon:"})," ",Ne.lon.toFixed(6)]})]}),(0,C.jsx)("button",{type:"button",className:"da-pos-modal-copy",onClick:()=>{var e,s;const a="".concat(Ne.lat.toFixed(6),", ").concat(Ne.lon.toFixed(6));null!==(e=navigator)&&void 0!==e&&null!==(s=e.clipboard)&&void 0!==s&&s.writeText&&navigator.clipboard.writeText(a)},title:"Copy coordinates",children:"Copy"})]})]})})]})}},84702:(e,s,a)=>{a.d(s,{Cx:()=>i,IE:()=>d,Ys:()=>n,Z3:()=>l,gM:()=>c,yP:()=>r});const t={created:{label:"Created",bg:"#3b82f6",fg:"#fff"},pending:{label:"Pending",bg:"#f59e0b",fg:"#fff"},accepted:{label:"Accepted",bg:"#8b5cf6",fg:"#fff"},arrived:{label:"Arrived",bg:"#ea580c",fg:"#fff"},picked:{label:"Picked",bg:"#0ea5e9",fg:"#fff"},active:{label:"Active",bg:"#0ea5e9",fg:"#fff"},delivered:{label:"Delivered",bg:"#22c55e",fg:"#fff"},skipped:{label:"Skipped",bg:"#94a3b8",fg:"#fff"},cancelled:{label:"Cancelled",bg:"#ef4444",fg:"#fff"}},i=e=>t[String(e||"").toLowerCase()]||{label:e||"Unknown",bg:"#64748b",fg:"#fff"},n=new Set(["delivered"]),r=new Set(["cancelled","skipped"]),l=["#2563eb","#dc2626","#16a34a","#ea580c","#9333ea","#0891b2","#ca8a04","#db2777","#0f766e","#7c3aed","#65a30d","#0284c7","#b91c1c","#15803d","#a16207","#86198f"],c=e=>l[(e%l.length+l.length)%l.length],d=e=>{if(null==e)return"";const s=["th","st","nd","rd"],a=e%100;return e+(s[(a-20)%10]||s[a]||s[0])}}}]); \ No newline at end of file +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6666],{54413:(e,s,a)=>{a.r(s),a.d(s,{default:()=>pe});var t=a(80045),i=a(89379),n=a(9950),r=a(98007),l=a(47113),c=a(82215),d=a(99810),o=a(49029),u=a(33516),m=a(48513),p=a(37119),h=a(2527),x=a.n(h);a(55392);x().PolylineOffset={translatePoint:(e,s,a)=>x().point(e.x+s*Math.cos(a),e.y+s*Math.sin(a)),offsetPointLine(e,s){const a=e.length;if(a<2)throw new Error("Line should be defined by at least 2 points");let t,i=e[0];const n=Math.PI/2,r=[];for(let l=1;l=0&&l<=1&&c>=0&&c<=1?x().point(e.x+c*i.x,e.y+c*i.y):null},segmentAsVector:(e,s)=>x().point(s.x-e.x,s.y-e.y),joinLineSegments(e){const s=[];let a=e[0].offset;s.push(a[0]);for(let t=1;te.latLngToLayerPoint(s)));return this.offsetPoints(t,a).map((s=>e.layerPointToLatLng(s)))}};const v=x().Polyline.prototype._projectLatlngs;x().Polyline.prototype._projectLatlngs=function(e,s,a){const t=this.options.offset;if(!t||"number"!==typeof t)return v.call(this,e,s,a);if(!(e[0]instanceof x().LatLng)){for(let t=0;tthis._map.latLngToLayerPoint(e))),n=x().PolylineOffset.offsetPoints(i,t);for(let r=0;r{const e=t,n=e.onTime+e.late,r=s.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),l=r<0,c=a.filter((e=>e.anomaly)),d=a.filter((e=>w.Ys.has(String(e.orderstatus||"").toLowerCase()))).length,o=a.filter((e=>w.yP.has(String(e.orderstatus||"").toLowerCase()))).length,u=null==e.kmDeltaPct?"":e.kmDeltaPct>25?"is-over":e.kmDeltaPct<-5?"is-under":"",m=a.length||1,p=e.onTime+e.late||1,h=Math.round(d/m*60+e.onTime/p*25+(m-e.anomalies)/m*15),x=h>=85?"#16a34a":h>=65?"#f59e0b":"#dc2626",v=h>=85?"Excellent":h>=65?"Acceptable":"Needs review",j=a.filter((e=>e.actualTs)),g=j.reduce(((e,s)=>!e||s.actualTs.isBefore(e)?s.actualTs:e),null),f=j.reduce(((e,s)=>!e||s.actualTs.isAfter(e)?s.actualTs:e),null),N=g&&f?Math.max(0,f.diff(g,"minute")):0,b=a.length>1?Math.round(N/(a.length-1)):0,y=N>0?(e.actualKm/(N/60)).toFixed(1):null,k=a.filter((e=>!e.isLoading&&e.coordsCount>0)),S=k.filter((e=>null!=e.timeDeltaMin&&!e.anomaly)).sort(((e,s)=>e.timeDeltaMin-s.timeDeltaMin))[0]||null,_=k.filter((e=>e.anomaly)).sort(((e,s)=>{const a=Math.abs(e.kmDeltaPct||0)+(e.timeDeltaMin>0?e.timeDeltaMin:0);return Math.abs(s.kmDeltaPct||0)+(s.timeDeltaMin>0?s.timeDeltaMin:0)-a}))[0]||null,F=i.filter(((e,s)=>{var a;const t=null===(a=e.order)||void 0===a?void 0:a.step;return null!=t&&t!==s+1})),M=[];F.forEach((e=>{var s;const a=null===(s=e.order)||void 0===s?void 0:s.step,t=i.findIndex((s=>s.sequenceStep===e.sequenceStep))+1,n=t-a,r=M[M.length-1];r&&r.delta===n&&r.lastActualPos+1===t?(r.items.push({d:e,planned:a,actualPos:t,delta:n}),r.lastActualPos=t):M.push({delta:n,items:[{d:e,planned:a,actualPos:t,delta:n}],lastActualPos:t})}));const C={};s.orders.forEach((e=>{const s=e.trip_number||1;C[s]||(C[s]=[]),C[s].push(e)}));const z=Object.entries(C).sort(((e,s)=>{let[a]=e,[t]=s;return Number(a)-Number(t)})).map((e=>{let[s,a]=e;return{tNum:s,count:a.length,plannedKm:a.reduce(((e,s)=>e+parseFloat(s.kms||0)),0),actualKm:a.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),profit:a.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),delivered:a.filter((e=>w.Ys.has(String(e.orderstatus||"").toLowerCase()))).length}}));return{sum:e,totalSteps:n,totalProfit:r,isLoss:l,deviations:c,delivered:d,skipped:o,stepDeltaPct:u,score:h,scoreColor:x,scoreLabel:v,firstDelivery:g,lastDelivery:f,activeMin:N,avgPerStop:b,avgSpeed:y,bestStep:S,worstStep:_,outOfOrderSteps:F,seqRuns:M,tripList:z}}),[s,a,t,i]),v=null!=r?a.find((e=>e.sequenceStep===r)):null,j=e=>{l((s=>s===e?null:e))},g=function(e){let s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{d:a,planned:t,actualPos:i,delta:n}=e;return(0,C.jsxs)("li",{className:"cdp-seq-diff".concat(r===a.sequenceStep?" is-focused":"").concat(s?"":" is-nested"),onClick:()=>j(a.sequenceStep),children:[(0,C.jsx)("span",{className:"cdp-seq-diff-num",style:{background:(0,w.gM)((t||a.sequenceStep)-1)},children:t||a.sequenceStep}),(0,C.jsxs)("div",{className:"cdp-seq-diff-body",children:[(0,C.jsx)("div",{className:"cdp-seq-diff-title",children:a.deliverycustomer||"Step ".concat(t||a.sequenceStep)}),(0,C.jsxs)("div",{className:"cdp-seq-diff-sub",children:["Visited ",(0,C.jsx)("strong",{children:(0,w.IE)(i)})," ","\xb7 planned ",(0,C.jsx)("strong",{children:(0,w.IE)(t)})]})]}),(0,C.jsx)("span",{className:"cdp-seq-diff-tag",children:n>0?"+".concat(n):"".concat(n)})]},"diff-".concat(a.sequenceStep))},{sum:f,totalSteps:N,totalProfit:b,isLoss:y,deviations:k,delivered:_,skipped:z,stepDeltaPct:A,score:P,scoreColor:E,scoreLabel:D,firstDelivery:L,lastDelivery:q,activeMin:I,avgPerStop:O,avgSpeed:R,bestStep:T,worstStep:H,outOfOrderSteps:Y,seqRuns:V,tripList:K}=x;return(0,C.jsxs)("aside",{id:"compare-data-panel",className:"compare-data-panel".concat(h?" cdp-is-mobile":""),children:[(0,C.jsxs)("div",{className:"cdp-head",children:[(0,C.jsxs)("div",{className:"cdp-head-title",children:[(0,C.jsx)("span",{className:"cdp-rider-dot",style:{background:s.color}}),(0,C.jsxs)("div",{className:"cdp-head-text",children:[(0,C.jsx)("div",{className:"cdp-rider-name",children:s.riderName}),(0,C.jsx)("div",{className:"cdp-head-badge",children:"PLANNED vs ACTUAL"})]})]}),(0,C.jsx)("button",{type:"button",className:"cdp-close",onClick:m,title:"Exit compare","aria-label":"Exit compare",children:(0,C.jsx)(S.m6K,{})})]}),(0,C.jsxs)("div",{className:"cdp-scroll",children:[(0,C.jsx)("section",{className:"cdp-section cdp-score-section",children:(0,C.jsxs)("div",{className:"cdp-score-wrap",children:[(0,C.jsx)("div",{className:"cdp-score-ring",style:{background:"conic-gradient(".concat(E," ").concat(3.6*P,"deg, rgba(15,23,42,0.08) 0deg)")},children:(0,C.jsxs)("div",{className:"cdp-score-inner",children:[(0,C.jsx)("div",{className:"cdp-score-value",style:{color:E},children:P}),(0,C.jsx)("div",{className:"cdp-score-unit",children:"/100"})]})}),(0,C.jsxs)("div",{className:"cdp-score-body",children:[(0,C.jsx)("div",{className:"cdp-score-label",style:{color:E},children:D}),(0,C.jsx)("div",{className:"cdp-score-title",children:"Compliance score"}),(0,C.jsxs)("div",{className:"cdp-score-sub",children:[_,"/",a.length," delivered",f.anomalies>0?" \xb7 ".concat(f.anomalies," deviation").concat(f.anomalies>1?"s":""):"",f.late>0?" \xb7 ".concat(f.late," late"):"",z>0?" \xb7 ".concat(z," skipped"):""]})]})]})}),(0,C.jsxs)("section",{className:"cdp-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head",children:[(0,C.jsx)("span",{className:"cdp-section-icon",children:(0,C.jsx)(S.Zs6,{})}),(0,C.jsx)("span",{className:"cdp-section-title",children:"Day overview"})]}),(0,C.jsxs)("div",{className:"cdp-tiles",children:[(0,C.jsxs)("div",{className:"cdp-tile",children:[(0,C.jsxs)("div",{className:"cdp-tile-label",children:[(0,C.jsx)(S.xI$,{})," Distance"]}),(0,C.jsxs)("div",{className:"cdp-tile-value",children:[f.actualKm.toFixed(1),(0,C.jsx)("span",{className:"cdp-tile-unit",children:"km"})]}),(0,C.jsxs)("div",{className:"cdp-tile-sub",children:["planned ",f.plannedKm.toFixed(1)," km"]})]}),(0,C.jsxs)("div",{className:"cdp-tile".concat(f.anomalies>0?" is-warn":""),children:[(0,C.jsxs)("div",{className:"cdp-tile-label",children:[(0,C.jsx)(S.Wux,{})," Deviation"]}),(0,C.jsx)("div",{className:"cdp-tile-value ".concat(A),children:null!=f.kmDeltaPct?"".concat(f.kmDeltaPct>0?"+":"").concat(f.kmDeltaPct.toFixed(0),"%"):"\u2014"}),(0,C.jsx)("div",{className:"cdp-tile-sub",children:f.anomalies>0?"".concat(f.anomalies," flagged"):"within plan"})]}),(0,C.jsxs)("div",{className:"cdp-tile".concat(f.late>0?" is-warn":""),children:[(0,C.jsxs)("div",{className:"cdp-tile-label",children:[(0,C.jsx)(S.VP9,{})," On-time"]}),(0,C.jsxs)("div",{className:"cdp-tile-value",children:[f.onTime,N>0&&(0,C.jsxs)("span",{className:"cdp-tile-unit",children:["/",N]})]}),(0,C.jsx)("div",{className:"cdp-tile-sub",children:f.late>0?"".concat(f.late," late"):"all on schedule"})]}),(0,C.jsxs)("div",{className:"cdp-tile ".concat(y?"is-loss":"is-gain"),children:[(0,C.jsxs)("div",{className:"cdp-tile-label",children:[y?(0,C.jsx)(S.Rod,{}):(0,C.jsx)(S.imn,{})," ",y?"Loss":"Profit"]}),(0,C.jsxs)("div",{className:"cdp-tile-value",children:[y?"-":"","\u20b9",Math.abs(b).toFixed(0)]}),(0,C.jsxs)("div",{className:"cdp-tile-sub",children:[s.orders.length," ",1===s.orders.length?"order":"orders"," \xb7 ",_," delivered"]})]})]})]}),a.length>0&&(0,C.jsxs)("section",{className:"cdp-section cdp-seq-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head cdp-section-head-clickable",onClick:()=>d((e=>!e)),role:"button","aria-expanded":c,title:c?"Collapse route sequence":"Expand route sequence",children:[(0,C.jsx)("span",{className:"cdp-section-icon",children:(0,C.jsx)(S.$G1,{})}),(0,C.jsx)("span",{className:"cdp-section-title",children:"Route sequence"}),(0,C.jsx)("span",{className:"cdp-seq-status".concat(Y.length>0?" is-warn":" is-good"),children:Y.length>0?"".concat(Y.length," out of order"):"In order"}),(0,C.jsx)("span",{className:"cdp-seq-toggle".concat(c?" is-open":""),children:(0,C.jsx)(S.j1Q,{})})]}),c&&(0,C.jsx)("div",{className:"cdp-seq",children:Y.length>0?(0,C.jsx)("ul",{className:"cdp-seq-diffs",children:V.map(((e,s)=>{if(1===e.items.length)return g(e.items[0]);const a=e.items[0],t=e.items[e.items.length-1],i=o.has(s),l=e.delta>0?"+".concat(e.delta):"".concat(e.delta),c=e.items.some((e=>e.d.sequenceStep===r));return(0,C.jsxs)(n.Fragment,{children:[(0,C.jsxs)("li",{className:"cdp-seq-diff is-group".concat(i?" is-expanded":"").concat(c?" is-focused":""),onClick:()=>{return e=s,void u((s=>{const a=new Set(s);return a.has(e)?a.delete(e):a.add(e),a}));var e},"aria-expanded":i,children:[(0,C.jsxs)("span",{className:"cdp-seq-group-num",children:[(0,C.jsx)("span",{className:"cdp-seq-group-num-bg",style:{background:"linear-gradient(135deg, ".concat((0,w.gM)((a.planned||1)-1),", ").concat((0,w.gM)((t.planned||1)-1),")")}}),(0,C.jsxs)("span",{className:"cdp-seq-group-num-label",children:[e.items.length,"\xd7"]})]}),(0,C.jsxs)("div",{className:"cdp-seq-diff-body",children:[(0,C.jsxs)("div",{className:"cdp-seq-diff-title",children:[e.items.length," consecutive steps shifted"," ",(0,C.jsx)("span",{className:"cdp-seq-group-delta",children:l})]}),(0,C.jsxs)("div",{className:"cdp-seq-diff-sub",children:["Planned ",(0,w.IE)(a.planned),"\u2013",(0,w.IE)(t.planned)," ","visited"," ",(0,C.jsxs)("strong",{children:[(0,w.IE)(a.actualPos),"\u2013",(0,w.IE)(t.actualPos)]})]})]}),(0,C.jsx)("span",{className:"cdp-seq-diff-tag",children:l}),(0,C.jsx)("span",{className:"cdp-seq-group-toggle".concat(i?" is-open":""),"aria-hidden":"true",children:(0,C.jsx)(S.j1Q,{})})]}),i&&(0,C.jsx)("li",{className:"cdp-seq-group-children-wrap",children:(0,C.jsx)("ul",{className:"cdp-seq-group-children",children:e.items.map((e=>g(e,!1)))})})]},"run-".concat(s,"-").concat(a.d.sequenceStep))}))}):(0,C.jsxs)("div",{className:"cdp-seq-good",children:[(0,C.jsx)(S.mU9,{})," Rider followed the planned route in order."]})})]}),(L||q)&&(0,C.jsxs)("section",{className:"cdp-section cdp-timing-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head",children:[(0,C.jsx)("span",{className:"cdp-section-icon",children:(0,C.jsx)(S.pWE,{})}),(0,C.jsx)("span",{className:"cdp-section-title",children:"Timing"}),I>0&&(0,C.jsxs)("span",{className:"cdp-timing-active-tag",children:[(0,C.jsx)("span",{className:"cdp-timing-active-pulse"}),"Day window"]})]}),(0,C.jsxs)("div",{className:"cdp-timing-clock",children:[(0,C.jsxs)("div",{className:"cdp-clock-card is-start",children:[(0,C.jsxs)("div",{className:"cdp-clock-label",children:[(0,C.jsx)(S.WVj,{})," First delivery"]}),(0,C.jsxs)("div",{className:"cdp-clock-face",children:[(0,C.jsx)("span",{className:"cdp-clock-time",children:L?L.format("hh:mm"):"\u2014"}),(0,C.jsx)("span",{className:"cdp-clock-period",children:L?L.format("A"):""})]}),(0,C.jsx)("div",{className:"cdp-clock-caption",children:"Started"})]}),(0,C.jsxs)("div",{className:"cdp-clock-track","aria-hidden":"true",children:[(0,C.jsx)("span",{className:"cdp-clock-track-line"}),(0,C.jsx)("span",{className:"cdp-clock-track-dot is-start"}),(0,C.jsx)("span",{className:"cdp-clock-track-dot is-end"}),(0,C.jsxs)("div",{className:"cdp-clock-duration",children:[(0,C.jsx)("span",{className:"cdp-clock-duration-icon",children:(0,C.jsx)(S.DZH,{})}),(0,C.jsx)("span",{className:"cdp-clock-duration-val",children:I>0?I>=60?"".concat(Math.floor(I/60),"h ").concat(I%60,"m"):"".concat(I,"m"):"\u2014"}),(0,C.jsx)("span",{className:"cdp-clock-duration-sub",children:"active"})]})]}),(0,C.jsxs)("div",{className:"cdp-clock-card is-end",children:[(0,C.jsxs)("div",{className:"cdp-clock-label",children:[(0,C.jsx)(S.mU9,{})," Last delivery"]}),(0,C.jsxs)("div",{className:"cdp-clock-face",children:[(0,C.jsx)("span",{className:"cdp-clock-time",children:q?q.format("hh:mm"):"\u2014"}),(0,C.jsx)("span",{className:"cdp-clock-period",children:q?q.format("A"):""})]}),(0,C.jsx)("div",{className:"cdp-clock-caption",children:"Finished"})]})]}),(0,C.jsxs)("div",{className:"cdp-timing-stats",children:[(0,C.jsxs)("div",{className:"cdp-timing-stat",children:[(0,C.jsxs)("div",{className:"cdp-timing-stat-head",children:[(0,C.jsx)("div",{className:"cdp-timing-stat-icon",children:(0,C.jsx)(S.VP9,{})}),(0,C.jsxs)("div",{className:"cdp-timing-stat-body",children:[(0,C.jsxs)("div",{className:"cdp-timing-stat-value",children:[O>0?"".concat(O):"\u2014",O>0&&(0,C.jsx)("span",{className:"cdp-timing-stat-unit",children:"min"})]}),(0,C.jsx)("div",{className:"cdp-timing-stat-label",children:"Avg / stop"})]})]}),a.length>0&&(0,C.jsxs)("div",{className:"cdp-timing-stat-viz cdp-stops-dots","aria-hidden":"true",children:[Array.from({length:Math.min(a.length,12)}).map(((e,s)=>(0,C.jsx)("span",{className:"cdp-stop-dot"},"dot-".concat(s)))),(0,C.jsxs)("span",{className:"cdp-timing-stat-viz-label",children:[a.length," stop",1===a.length?"":"s"]})]})]}),null!=R&&(0,C.jsxs)("div",{className:"cdp-timing-stat",children:[(0,C.jsxs)("div",{className:"cdp-timing-stat-head",children:[(0,C.jsx)("div",{className:"cdp-timing-stat-icon",children:(0,C.jsx)(S.BJM,{})}),(0,C.jsxs)("div",{className:"cdp-timing-stat-body",children:[(0,C.jsxs)("div",{className:"cdp-timing-stat-value",children:[R,(0,C.jsx)("span",{className:"cdp-timing-stat-unit",children:"km/h"})]}),(0,C.jsx)("div",{className:"cdp-timing-stat-label",children:"Avg speed"})]})]}),(0,C.jsxs)("div",{className:"cdp-timing-stat-viz cdp-speed-gauge","aria-hidden":"true",children:[(0,C.jsx)("div",{className:"cdp-speed-gauge-track",children:(0,C.jsx)("div",{className:"cdp-speed-gauge-fill",style:{width:"".concat(Math.min(100,parseFloat(R)/60*100),"%")}})}),(0,C.jsxs)("div",{className:"cdp-speed-gauge-scale",children:[(0,C.jsx)("span",{children:"0"}),(0,C.jsx)("span",{children:"30"}),(0,C.jsx)("span",{children:"60 km/h"})]})]})]})]})]}),(T||H)&&(0,C.jsxs)("section",{className:"cdp-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head",children:[(0,C.jsx)("span",{className:"cdp-section-icon",children:(0,C.jsx)(S.SeC,{})}),(0,C.jsx)("span",{className:"cdp-section-title",children:"Highlights"})]}),(0,C.jsxs)("div",{className:"cdp-highlights",children:[T&&(0,C.jsxs)("div",{className:"cdp-highlight is-best",onClick:()=>j(T.sequenceStep),role:"button",title:"Focus this step",children:[(0,C.jsx)("span",{className:"cdp-highlight-rail","aria-hidden":"true"}),(0,C.jsxs)("div",{className:"cdp-highlight-content",children:[(0,C.jsxs)("div",{className:"cdp-highlight-top",children:[(0,C.jsxs)("span",{className:"cdp-highlight-label",children:[(0,C.jsx)("span",{className:"cdp-highlight-chip",children:(0,C.jsx)(S.mU9,{})}),"Fastest stop"]}),(0,C.jsxs)("span",{className:"cdp-highlight-step-chip",style:{background:(0,w.gM)(T.sequenceStep-1)},children:["Step ",T.sequenceStep]})]}),(0,C.jsx)("div",{className:"cdp-highlight-title",children:T.deliverycustomer||"Step ".concat(T.sequenceStep)}),(0,C.jsx)("div",{className:"cdp-highlight-meta",children:(0,C.jsx)("span",{className:"cdp-highlight-pill is-good",children:null!=T.timeDeltaMin?0===T.timeDeltaMin?"On schedule":"".concat(T.timeDeltaMin>0?"+":"").concat(T.timeDeltaMin," min vs plan"):"On schedule"})})]})]}),H&&(0,C.jsxs)("div",{className:"cdp-highlight is-worst",onClick:()=>j(H.sequenceStep),role:"button",title:"Focus this step",children:[(0,C.jsx)("span",{className:"cdp-highlight-rail","aria-hidden":"true"}),(0,C.jsxs)("div",{className:"cdp-highlight-content",children:[(0,C.jsxs)("div",{className:"cdp-highlight-top",children:[(0,C.jsxs)("span",{className:"cdp-highlight-label",children:[(0,C.jsx)("span",{className:"cdp-highlight-chip",children:(0,C.jsx)(S.Wux,{})}),"Biggest deviation"]}),(0,C.jsxs)("span",{className:"cdp-highlight-step-chip",style:{background:(0,w.gM)(H.sequenceStep-1)},children:["Step ",H.sequenceStep]})]}),(0,C.jsx)("div",{className:"cdp-highlight-title",children:H.deliverycustomer||"Step ".concat(H.sequenceStep)}),(0,C.jsxs)("div",{className:"cdp-highlight-meta",children:[null!=H.kmDeltaPct&&(0,C.jsxs)("span",{className:"cdp-highlight-pill is-bad",children:[H.kmDeltaPct>0?"+":"",H.kmDeltaPct.toFixed(0),"% route"]}),null!=H.timeDeltaMin&&H.timeDeltaMin>0&&(0,C.jsxs)("span",{className:"cdp-highlight-pill is-bad",children:["+",H.timeDeltaMin,"m late"]})]})]})]})]})]}),K.length>1&&(0,C.jsxs)("section",{className:"cdp-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head",children:[(0,C.jsx)("span",{className:"cdp-section-icon",children:(0,C.jsx)(S.$G1,{})}),(0,C.jsxs)("span",{className:"cdp-section-title",children:["Trips (",K.length,")"]})]}),(0,C.jsx)("div",{className:"cdp-trips",children:K.map((e=>{const s=e.profit<0;return(0,C.jsxs)("div",{className:"cdp-trip",children:[(0,C.jsxs)("div",{className:"cdp-trip-head",children:[(0,C.jsxs)("span",{className:"cdp-trip-badge",children:["Trip ",e.tNum]}),(0,C.jsxs)("span",{className:"cdp-trip-meta",children:[e.delivered,"/",e.count," delivered"]})]}),(0,C.jsxs)("div",{className:"cdp-trip-stats",children:[(0,C.jsxs)("span",{title:"Distance",children:[(0,C.jsx)(S.xI$,{}),e.actualKm.toFixed(1),"km",(0,C.jsxs)("small",{children:[" / ",e.plannedKm.toFixed(1)]})]}),(0,C.jsxs)("span",{className:s?"is-over":"",title:s?"Loss":"Profit",children:[(0,C.jsx)(S.ohY,{}),s?"-":"","\u20b9",Math.abs(e.profit).toFixed(0)]})]})]},"trip-".concat(e.tNum))}))})]}),v&&(e=>{const s=(0,w.gM)(v.sequenceStep-1),a=v.kmDelta>=0?"+":"",t=v.anomaly?"is-over":v.kmDelta<-.1?"is-under":"",i=null!=v.timeDeltaMin?v.timeDeltaMin>10?"is-over":v.timeDeltaMin<-2?"is-under":"":"",n=(0,w.Cx)(v.orderstatus),r=parseFloat((null===(e=v.order)||void 0===e?void 0:e.profit)||0);return(0,C.jsxs)("section",{className:"cdp-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head",children:[(0,C.jsx)("span",{className:"cdp-section-icon",children:(0,C.jsx)(S.$G1,{})}),(0,C.jsxs)("span",{className:"cdp-section-title",children:["Step ",v.sequenceStep," details"]}),(0,C.jsx)("button",{type:"button",className:"cdp-section-clear",onClick:()=>l(null),title:"Clear step focus",children:"Show all"})]}),(0,C.jsxs)("div",{className:"compare-delta".concat(v.anomaly?" is-anomaly":""),children:[(0,C.jsxs)("div",{className:"compare-delta-title",children:[(0,C.jsx)("span",{className:"compare-delta-step-badge",style:{background:s},children:v.sequenceStep}),(0,C.jsxs)("div",{className:"compare-delta-title-text",children:[(0,C.jsx)("div",{className:"compare-delta-title-main",children:v.deliverycustomer||"Step ".concat(v.sequenceStep)}),(0,C.jsxs)("div",{className:"compare-delta-title-sub",children:[v.pickupcustomer?"from ".concat(v.pickupcustomer," \xb7 "):"","Order #",v.orderid]})]}),v.orderstatus&&(0,C.jsx)("span",{className:"compare-delta-status",style:{background:n.bg,color:n.fg},children:n.label})]}),(0,C.jsxs)("div",{className:"compare-delta-grid",children:[(0,C.jsxs)("div",{className:"compare-delta-cell".concat(v.anomaly?" is-anomaly":""),children:[(0,C.jsx)("span",{className:"compare-delta-cell-label",children:"Distance"}),(0,C.jsxs)("span",{className:"compare-delta-cell-val",children:[v.actualKm.toFixed(2)," ",(0,C.jsx)("span",{className:"compare-delta-cell-unit",children:"km"})]}),(0,C.jsxs)("span",{className:"compare-delta-cell-sub",children:["planned ",v.plannedKm.toFixed(2)," km"]})]}),(0,C.jsxs)("div",{className:"compare-delta-cell",children:[(0,C.jsx)("span",{className:"compare-delta-cell-label",children:"\u0394 Route"}),(0,C.jsxs)("span",{className:"compare-delta-cell-val ".concat(t),children:[a,v.kmDelta.toFixed(2)," km"]}),(0,C.jsx)("span",{className:"compare-delta-cell-sub",children:null!=v.kmDeltaPct?"".concat(a).concat(v.kmDeltaPct.toFixed(0),"% vs plan"):"no planned km"})]}),(0,C.jsxs)("div",{className:"compare-delta-cell",children:[(0,C.jsx)("span",{className:"compare-delta-cell-label",children:"Time"}),(0,C.jsx)("span",{className:"compare-delta-cell-val ".concat(i),children:null!=v.timeDeltaMin?"".concat(v.timeDeltaMin>0?"+":"").concat(v.timeDeltaMin," min"):"\u2014"}),(0,C.jsx)("span",{className:"compare-delta-cell-sub",children:v.actualTs&&v.expectedTs?"".concat(v.actualTs.format("HH:mm")," vs ").concat(v.expectedTs.format("HH:mm")):v.actualTs?"delivered ".concat(v.actualTs.format("HH:mm")):"in flight"})]}),!Number.isNaN(r)&&0!==r&&(0,C.jsxs)("div",{className:"compare-delta-cell".concat(r<0?" is-anomaly":""),children:[(0,C.jsx)("span",{className:"compare-delta-cell-label",children:r<0?"Loss":"Profit"}),(0,C.jsxs)("span",{className:"compare-delta-cell-val ".concat(r<0?"is-over":"is-under"),children:[r<0?"-":"","\u20b9",Math.abs(r).toFixed(0)]}),(0,C.jsx)("span",{className:"compare-delta-cell-sub",children:"order revenue"})]})]})]})]})})(),k.length>0&&(0,C.jsxs)("section",{className:"cdp-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head",children:[(0,C.jsx)("span",{className:"cdp-section-icon cdp-icon-warn",children:(0,C.jsx)(S.ItP,{})}),(0,C.jsxs)("span",{className:"cdp-section-title",children:["Deviations (",k.length,")"]})]}),(0,C.jsx)("ul",{className:"cdp-dev-list",children:k.map((e=>{const s=(0,w.gM)(e.sequenceStep-1),a=e.kmDelta>=0?"+":"";return(0,C.jsxs)("li",{className:"cdp-dev-item".concat(r===e.sequenceStep?" is-focused":""),onClick:()=>j(e.sequenceStep),children:[(0,C.jsx)("span",{className:"cdp-dev-num",style:{background:s},children:e.sequenceStep}),(0,C.jsxs)("div",{className:"cdp-dev-body",children:[(0,C.jsx)("div",{className:"cdp-dev-title",children:e.deliverycustomer||"Step ".concat(e.sequenceStep)}),(0,C.jsxs)("div",{className:"cdp-dev-meta",children:[null!=e.kmDeltaPct&&(0,C.jsxs)("span",{className:"cdp-dev-chip is-over",children:[a,e.kmDeltaPct.toFixed(0),"% route"]}),null!=e.timeDeltaMin&&e.timeDeltaMin>10&&(0,C.jsxs)("span",{className:"cdp-dev-chip is-over",children:["+",e.timeDeltaMin,"m late"]})]})]})]},"dev-".concat(e.sequenceStep))}))})]}),(0,C.jsxs)("section",{className:"cdp-section",children:[(0,C.jsxs)("div",{className:"cdp-section-head",children:[(0,C.jsx)("span",{className:"cdp-section-icon",children:(0,C.jsx)(S.EgJ,{})}),(0,C.jsxs)("span",{className:"cdp-section-title",children:["Steps (",a.length,")"]}),(0,C.jsxs)("span",{className:"cdp-section-sub",children:[_,"/",a.length," delivered"]})]}),(0,C.jsx)("ul",{className:"cdp-step-list",children:a.map((e=>{var s;const a=(0,w.gM)(e.sequenceStep-1),t=String(e.orderstatus||"").toLowerCase(),i=w.Ys.has(t),n=w.yP.has(t),l=i&&!e.anomaly,c=r===e.sequenceStep,d=(0,w.Cx)(e.orderstatus),o=parseFloat((null===(s=e.order)||void 0===s?void 0:s.profit)||0),u=e.kmDelta>=0?"+":"",m=null!=e.timeDeltaMin?e.timeDeltaMin>10?"is-over":e.timeDeltaMin<-2?"is-under":"":"",p=["cdp-step",c?"is-focused":"",e.anomaly?"is-anomaly":"",l?"is-correct":"",n?"is-skipped":"",e.isLoading?"is-loading":""].filter(Boolean).join(" ");return(0,C.jsxs)("li",{className:p,onClick:()=>j(e.sequenceStep),children:[(0,C.jsxs)("span",{className:"cdp-step-num",style:{background:a},children:[e.sequenceStep,l&&(0,C.jsx)("span",{className:"cdp-step-check",children:(0,C.jsx)(S.mU9,{})}),e.anomaly&&(0,C.jsx)("span",{className:"cdp-step-flag",children:(0,C.jsx)(S.ItP,{})})]}),(0,C.jsxs)("div",{className:"cdp-step-body",children:[(0,C.jsxs)("div",{className:"cdp-step-title-row",children:[(0,C.jsx)("span",{className:"cdp-step-title",children:e.deliverycustomer||"Step ".concat(e.sequenceStep)}),e.orderstatus&&(0,C.jsx)("span",{className:"cdp-step-status",style:{background:d.bg,color:d.fg},children:d.label})]}),(0,C.jsxs)("div",{className:"cdp-step-sub",children:[e.pickupcustomer?"from ".concat(e.pickupcustomer," \xb7 "):"","Order #",e.orderid]}),(0,C.jsxs)("div",{className:"cdp-step-deltas",children:[(0,C.jsxs)("span",{className:"cdp-step-delta",title:"Distance",children:[(0,C.jsx)(S.xI$,{}),e.actualKm.toFixed(1),"km",e.plannedKm>0&&(0,C.jsxs)("small",{className:e.anomaly?"is-over":"",children:[" ",u,e.kmDelta.toFixed(1)]})]}),(0,C.jsxs)("span",{className:"cdp-step-delta ".concat(m),title:"Delivery time",children:[(0,C.jsx)(S.VP9,{}),e.actualTs?e.actualTs.format("HH:mm"):"\u2014",null!=e.timeDeltaMin&&(0,C.jsxs)("small",{children:[" ",e.timeDeltaMin>0?"+":"",e.timeDeltaMin,"m"]})]}),!Number.isNaN(o)&&0!==o&&(0,C.jsxs)("span",{className:"cdp-step-delta".concat(o<0?" is-over":""),title:o<0?"Loss":"Profit",children:[(0,C.jsx)(S.ohY,{}),o<0?"-":"","\u20b9",Math.abs(o).toFixed(0)]})]})]})]},"step-".concat(e.sequenceStep))}))})]})]})]})};var A=a(85571);const P=["_ts"],E="#662582",D="#10b981",L=e=>{const s=parseFloat(e);return Number.isFinite(s)?s:NaN},q=e=>{if(!e)return"";const s=String(e).trim();if(!s)return"";if(s.includes(",")){const e=s.split(",").map((e=>e.trim())).filter(Boolean);return 0===e.length?s:e.length<=2?e.join(", "):e.slice(-2).join(", ")}const a=s.split(/\s+/).filter(Boolean),t=a.length>6?a.slice(-6).join(" "):s;return t.length>40?"".concat(t.slice(0,40).trim(),"\u2026"):t},I=e=>Number.isFinite(L(e.droplat||e.deliverylat))&&Number.isFinite(L(e.droplon||e.deliverylong)),O=e=>e.pickuplat||e.pickuplatitude||e.pickup_lat,R=e=>e.pickuplong||e.pickuplongitude||e.picklongitude||e.pickup_lon,T=e=>Number.isFinite(L(O(e)))&&Number.isFinite(L(R(e))),H=[{id:"morning",name:"Morning Batch",startHour:0,endHour:8},{id:"afternoon",name:"Afternoon Batch",startHour:9,endHour:12.5},{id:"evening",name:"Evening Batch",startHour:16,endHour:19}],Y="dispatch.slots.v9",V=["dispatch.slots.v1","dispatch.slots.v2","dispatch.slots.v3","dispatch.slots.v4","dispatch.slots.v5","dispatch.slots.v6","dispatch.slots.v7","dispatch.slots.v8"],K=(e,s)=>"Slot ".concat(e+1," \xb7 ").concat(B(s)),B=e=>{const s=Math.floor(e),a=Math.round(60*(e-s)),t=(s+11)%12+1,i=s>=12&&s<24?"PM":"AM";if(0===a)return"".concat(t," ").concat(i);const n=String(a).padStart(2,"0");return"".concat(t,":").concat(n," ").concat(i)},U=(e,s)=>s>=24?"After ".concat(B(e)):"".concat(B(e),"\u2013").concat(B(s)),G=H.map(((e,s)=>(0,i.A)((0,i.A)({},e),{},{label:e.name||K(s,e.startHour),range:U(e.startHour,e.endHour)}))),W=(e,s)=>{for(const a of s)if(e>=a.startHour&&e2&&void 0!==arguments[2]?arguments[2]:G;const a=((e,s)=>{const a=J.find((e=>e.id===s))||J[0];for(const t of a.keys)if(null!==e&&void 0!==e&&e[t])return e[t];return null})(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all");if(!a)return null;const t=String(a).trim();if(/^\d{4}-\d{2}-\d{2}$/.test(t))return null;const i=g()(a);return i.isValid()?W(i.hour()+i.minute()/60,s):null};function Z(e){let{targetRef:s}=e;const a=(0,r.ko)();return(0,n.useEffect)((()=>(s.current=a,()=>{s.current=null})),[a]),null}function X(e){let{trigger:s}=e;const a=(0,r.ko)();return(0,n.useEffect)((()=>{const e=[0,60,120,200,300,380].map((e=>setTimeout((()=>a.invalidateSize({animate:!1})),e)));return()=>e.forEach(clearTimeout)}),[s,a]),null}function Q(e,s){const a=e=>e*Math.PI/180,t=a(e[0]),i=a(s[0]),n=a(s[0]-e[0]),r=a(s[1]-e[1]),l=Math.sin(n/2)**2+Math.cos(t)*Math.cos(i)*Math.sin(r/2)**2;return 12742*Math.asin(Math.min(1,Math.sqrt(l)))}function ee(e){if(!Array.isArray(e)||e.length<2)return 0;let s=0;for(let a=1;a{let a=0,t=1/0;for(let i=0;i{const a=Math.max(s,i);t.push(e.slice(i,a+1)),i=a})),t}const ae=e=>{if(!e)return null;const s=g()(e);return s.isValid()?s.format("HH:mm:ss"):String(e)},te=[{key:"assigntime",label:"Assigned"},{key:"acceptedtime",label:"Accepted"},{key:"arrivaltime",label:"Arrived"},{key:"pickuptime",label:"Pickup"},{key:"starttime",label:"Started"},{key:"deliverytime",label:"Delivered",final:!0}],ie=e=>{const s=e.filter(I);if(!s.length)return[];const a=e.find(T),t=[];return a&&t.push([L(O(a)),L(R(a))]),s.forEach((e=>t.push([L(e.droplat||e.deliverylat),L(e.droplon||e.deliverylong)]))),t},ne=(e,s,a)=>{if(!a||0===a.length)return"".concat(e,"-").concat(s);const t=a.map((e=>"".concat(e[0].toFixed(5),",").concat(e[1].toFixed(5)))).join("|");return"".concat(e,"-").concat(s,"-").concat(t)};delete x().Icon.Default.prototype._getIconUrl,x().Icon.Default.mergeOptions({iconRetinaUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon-2x.png",iconUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-shadow.png"});const re=["#0055FF","#00D82C","#FF6B00","#9D00FF","#FF00A8","#00C2B2","#FF9900","#FF0000"],le=e=>{const s=String(null!==e&&void 0!==e?e:"");if(!s)return re[0];let a=0;for(let t=0;t>>0;return re[a%re.length]},ce=e=>{let{focusedItem:s,viewMode:a,orders:t,kitchens:i,locationKey:l}=e;const c=(0,r.ko)(),d=(0,n.useRef)(""),o=(0,n.useMemo)((()=>{const e=null!=l?"loc:".concat(l,"|"):"",n=e=>{let s=0,a=0,t=0;for(const i of e)Number.isFinite(i[0])&&Number.isFinite(i[1])&&(s+=i[0],a+=i[1],t+=1);return 0===t?"0":"".concat((s/t).toFixed(1),",").concat((a/t).toFixed(1))};if(s){var r,c,d;const a=null!==(r=null!==(c=null!==(d=s.id)&&void 0!==d?d:s.kitchenName)&&void 0!==c?c:s.name)&&void 0!==r?r:null!=s.lat?"".concat(s.lat,",").concat(s.lon):"item",t=s.orders?s.orders.length:0;return"".concat(e,"f|").concat(a,"|").concat(t)}const o=(i||[]).map((e=>[e.lat,e.lon])),u=n(o);if("kitchens"===a){const s=o.filter((e=>Number.isFinite(e[0])&&Number.isFinite(e[1]))).length;return"".concat(e,"k|").concat(s,"|").concat(u)}if("all"===a){const s=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)]));return"".concat(e,"a|").concat(s.length,"|").concat(n(s))}return"".concat(e,"m|").concat(a||"","|").concat(o.length,"|").concat(u)}),[s,a,t,i,l]);return(0,n.useEffect)((()=>{if(d.current===o)return;let e=[];s?s.orders?(e=s.orders.map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])),s.orders.forEach((s=>e.push([L(O(s)),L(R(s))])))):e=[[s.lat,s.lon]]:"kitchens"===a?(e=(i||[]).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lon))).map((e=>[e.lat,e.lon])),0===e.length&&(e=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])))):"all"===a?e=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])):(e=(i||[]).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lon))).map((e=>[e.lat,e.lon])),0===e.length&&(e=(t||[]).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)]))));const n=e.filter((e=>Number.isFinite(e[0])&&Number.isFinite(e[1])));if(n.length>0){const e=x().latLngBounds(n);if(e.isValid()){1===n.length||e.getNorthEast().equals(e.getSouthWest())?c.setView(n[0],15,{animate:!0,duration:.6}):c.flyToBounds(e,{padding:[60,60],duration:.6,maxZoom:16}),d.current=o}}else;}),[o,s,a,t,i,c]),null},de=e=>{let{children:s}=e;return(0,C.jsx)("span",{className:"ico-inline",style:{display:"inline-flex",alignItems:"center",verticalAlign:"-2px",marginRight:4},children:s})},oe=[{key:"morning",label:"Morning",timeRange:"12:00 AM \u2013 8:00 AM",sub:"Early shift orders",color:"#f59e0b",bg:"#fffbeb",border:"#fde68a"},{key:"afternoon",label:"Noon",timeRange:"9:00 AM \u2013 12:30 PM",sub:"Lunch rush window",color:"#10b981",bg:"#ecfdf5",border:"#a7f3d0"},{key:"evening",label:"Evening",timeRange:"4:00 PM \u2013 7:00 PM",sub:"Dinner & end-of-day",color:"#6366f1",bg:"#eef2ff",border:"#c7d2fe"}],ue=e=>{if(null==e)return"\u2014";if("number"===typeof e)return e.toLocaleString("en-IN");const s=parseFloat(e);return Number.isFinite(s)?s.toLocaleString("en-IN"):String(e)},me=e=>{if(!e||"string"!==typeof e)return null;const s=e.split(":").map(Number);if(s.length<2||s.some((e=>!Number.isFinite(e))))return null;const[a,t,i=0]=s;return 3600*a+60*t+i},pe=e=>{let{data:s,embedded:a=!1,selectedRiderId:r,onRiderSelect:h,pulseOrderId:v,onChangeRider:j}=e;const F=null!==s&&void 0!==s&&s.zones&&s.zones.length>0?"zones":"riders",[M,B]=(0,n.useState)(F),[J,pe]=(0,n.useState)("live"),[he,xe]=(0,n.useState)({}),[ve,je]=(0,n.useState)(null),[ge,fe]=(0,n.useState)(null),[Ne,be]=(0,n.useState)(null);(0,n.useEffect)((()=>{if(!Ne)return;const e=e=>{"Escape"===e.key&&be(null)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[Ne]);const ye=(0,f.n)({mutationFn:_.W0,onMutate:e=>je(e.batch),onSuccess:(e,s)=>{xe((a=>(0,i.A)((0,i.A)({},a),{},{[s.batch]:{data:e,fetchedAt:g()().format("HH:mm:ss")}})))},onSettled:()=>je(null)}),ke=e=>{fe(e);const s=he[e];s&&s.data&&!1!==s.data.success||ye.mutate({batch:e,tenantId:916})},Se=15e3,_e=(0,n.useRef)(null);(0,n.useEffect)((()=>{_e.current=ve}),[ve]),(0,n.useEffect)((()=>{if("analysis"!==J)return;if(!ge)return;const e=setInterval((()=>{_e.current||"undefined"!==typeof document&&document.hidden||ye.mutate({batch:ge,tenantId:916})}),Se);return()=>clearInterval(e)}),[J,ge]);const[we,Fe]=(0,n.useState)(new Set),[Me,Ce]=(0,n.useState)(null),[ze,Ae]=(0,n.useState)(null),[Pe,Ee]=(0,n.useState)(null),[De,Le]=(0,n.useState)(null),[qe,Ie]=(0,n.useState)("planned"),Oe=(0,n.useRef)({}),Re=(0,n.useRef)(new Set),Te=(0,n.useRef)(new Set),He=((0,n.useRef)(null),(0,n.useRef)(null)),[Ye,Ve]=(0,n.useState)(null),Ke=void 0!==r,[Be,Ue]=(0,n.useState)(""),{data:Ge}=(0,N.I)({queryKey:["appLocations"],queryFn:_.aL,staleTime:3e5}),We="undefined"!==typeof window?localStorage.getItem("applocationid"):null,[Je,$e]=(0,n.useState)(null!=We?Number(We):0),[Ze,Xe]=(0,n.useState)(!1),Qe=(0,n.useRef)(null),[es,ss]=(0,n.useState)("assigned"),[as,ts]=(0,n.useState)(!1),is=(0,n.useRef)(null),[ns,rs]=(0,n.useState)((()=>{if("undefined"===typeof window)return G;try{const e=window.localStorage.getItem(Y);if(!e)return G;const s=JSON.parse(e);return Array.isArray(s)&&s.length===H.length?s.map(((e,s)=>{const a=e.id||"slot-".concat(s+1),t=Number(e.startHour)||0,i=Number(e.endHour)||24,n=G.find((e=>e.id===a));return{id:a,startHour:t,endHour:i,label:(null===n||void 0===n?void 0:n.name)||K(s,t),range:U(t,i)}})):G}catch(e){return G}})),ls=ns,[cs,ds]=(0,n.useState)(!1),os=(0,n.useRef)(null);(0,n.useEffect)((()=>{if("undefined"!==typeof window)try{V.forEach((e=>window.localStorage.removeItem(e)))}catch(e){}}),[]);const us=(0,n.useRef)(!1);(0,n.useEffect)((()=>{if(us.current){if("undefined"!==typeof window)try{window.localStorage.setItem(Y,JSON.stringify(ns.map((e=>{let{id:s,startHour:a,endHour:t}=e;return{id:s,startHour:a,endHour:t}}))))}catch(e){}}else us.current=!0}),[ns]),(0,n.useEffect)((()=>{if(!Ze)return;const e=e=>{Qe.current&&!Qe.current.contains(e.target)&&Xe(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[Ze]),(0,n.useEffect)((()=>{if(!as)return;const e=e=>{is.current&&!is.current.contains(e.target)&&ts(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[as]),(0,n.useEffect)((()=>{if(!cs)return;const e=e=>{os.current&&!os.current.contains(e.target)&&ds(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[cs]);const[ms,ps]=(0,n.useState)(null),[hs,xs]=(0,n.useState)(""),{data:vs,isFetching:js,isError:gs,error:fs}=(0,N.I)({queryKey:["riderPeriodicLog",ms],queryFn:()=>(0,_.ne)(ms),enabled:"rider-info"===M&&null!=ms,refetchInterval:"rider-info"===M&&null!=ms&&15e3,refetchIntervalInBackground:!1,staleTime:5e3,refetchOnWindowFocus:!1}),Ns=(0,n.useMemo)((()=>{const e=parseFloat(null===vs||void 0===vs?void 0:vs.latitude),s=parseFloat(null===vs||void 0===vs?void 0:vs.longitude);return Number.isFinite(e)&&Number.isFinite(s)?{lat:e.toFixed(4),lon:s.toFixed(4)}:null}),[null===vs||void 0===vs?void 0:vs.latitude,null===vs||void 0===vs?void 0:vs.longitude]),{data:bs}=(0,N.I)({queryKey:["reverseGeocode",null===Ns||void 0===Ns?void 0:Ns.lat,null===Ns||void 0===Ns?void 0:Ns.lon],queryFn:async()=>{const e=await fetch("https://nominatim.openstreetmap.org/reverse?lat=".concat(Ns.lat,"&lon=").concat(Ns.lon,"&format=json&zoom=16&addressdetails=1"),{headers:{Accept:"application/json"}});if(!e.ok)return null;const s=await e.json(),a=(null===s||void 0===s?void 0:s.address)||{};return{area:a.suburb||a.neighbourhood||a.village||a.hamlet||a.city_district||a.town||a.city||a.county||a.state||"",display:(null===s||void 0===s?void 0:s.display_name)||""}},enabled:"rider-info"===M&&!!Ns,staleTime:3e5,refetchOnWindowFocus:!1,retry:1}),ys=(0,n.useMemo)((()=>{if(!Ge)return null;const e=Ge.find((e=>String(e.applocationid)===String(Je)));return(null===e||void 0===e?void 0:e.locationname)||null}),[Ge,Je]),[ks,Ss]=(0,n.useState)({}),_s=(0,n.useRef)({}),[ws,Fs]=(0,n.useState)({}),Ms=(0,n.useRef)({}),[Cs,zs]=(0,n.useState)(!1),[As,Ps]=(0,n.useState)([]),[Es,Ds]=(0,n.useState)({}),Ls=(0,n.useRef)(!1),[qs,Is]=(0,n.useState)(g()().format("YYYY-MM-DD")),[Os,Rs]=(0,n.useState)(!1),[Ts,Hs]=(0,n.useState)((()=>g()(qs).isValid()?g()(qs).startOf("month"):g()().startOf("month"))),Ys=(0,n.useRef)(null);(0,n.useEffect)((()=>{if(!Os)return;const e=e=>{Ys.current&&(Ys.current.contains(e.target)||Rs(!1))},s=e=>{"Escape"===e.key&&Rs(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",s)}}),[Os]),(0,n.useEffect)((()=>{if(Os){const e=g()(qs);e.isValid()&&Hs(e.startOf("month"))}}),[Os,qs]);const[Vs,Ks]=(0,n.useState)(!1),[Bs,Us]=(0,n.useState)("combined"),[Gs,Ws]=(0,n.useState)(!0),[Js,$s]=(0,n.useState)(!0),[Zs,Xs]=(0,n.useState)((()=>new Set)),Qs=(0,n.useRef)(!1),[ea,sa]=(0,n.useState)(!1),aa=(0,n.useRef)(!1),ta=(0,n.useRef)(!1),[ia,na]=(0,n.useState)(!1),[ra,la]=(0,n.useState)(null),ca=(0,n.useRef)(null),da=(0,n.useRef)(null);da.current||(da.current=x().canvas({padding:1.5,tolerance:5}));const{data:oa}=(0,N.I)({queryKey:[Je,qs,""],queryFn:_.zb,refetchInterval:15e3,refetchIntervalInBackground:!1,staleTime:5e3,refetchOnWindowFocus:!1}),ua=(0,n.useMemo)((()=>(oa||[]).map((e=>{var s;const a=parseFloat(null===e||void 0===e?void 0:e.latitude),t=parseFloat(null===e||void 0===e?void 0:e.longitude);return Number.isFinite(a)&&Number.isFinite(t)?{id:String(null!==(s=e.userid)&&void 0!==s?s:""),userid:e.userid,username:e.username||"Rider #".concat(e.userid),status:String(e.status||"").toLowerCase(),contactno:e.contactno,orderid:e.orderid,logdate:e.logdate,lat:a,lon:t}:null})).filter(Boolean)),[oa]),[ma,pa]=(0,n.useState)((()=>{const e=g()();return W(e.hour()+e.minute()/60,G)||G[0].id}));(0,n.useEffect)((()=>{var e;"all"!==ma&&(ls.some((e=>e.id===ma))||pa((null===(e=ls[0])||void 0===e?void 0:e.id)||"all"))}),[ls,ma]);const ha=(0,n.useRef)(null),xa=!s,va="undefined"!==typeof window&&localStorage.getItem("userid")||0,{data:ja,isFetching:ga,isError:fa,fetchNextPage:Na,hasNextPage:ba,isFetchingNextPage:ya}=(0,b.q)({queryKey:["dispatchDeliveries",Je,va,"all",qs,qs,50,"",0,0,0],queryFn:_.tL,getNextPageParam:e=>{var s;return null!==(s=e.nextPage)&&void 0!==s?s:void 0},enabled:xa});(0,n.useEffect)((()=>{xa&&ba&&!ya&&Na()}),[xa,ba,ya,Na]);const ka=(0,n.useMemo)((()=>{const e=((null===ja||void 0===ja?void 0:ja.pages)||[]).flatMap((e=>e.rows||[])),s=new Set,a=[];for(const t of e){const e=null!=t.orderid?String(t.orderid):null;e&&s.has(e)||(e&&s.add(e),a.push(t))}return a}),[ja]),Sa=(0,n.useMemo)((()=>{const e=new Map;return ka.forEach((s=>{const a=String(s.userid||s.rider_id||"");a&&"unassigned"!==a&&"0"!==a&&(e.has(a)||e.set(a,{id:a,riderName:s.ridername||s.rider_name||s.username||"Rider ".concat(a)}))})),Array.from(e.values()).sort(((e,s)=>String(e.riderName).localeCompare(String(s.riderName))))}),[ka]),_a=(0,n.useMemo)((()=>{const e={all:ka.length};return ls.forEach((s=>{e[s.id]=0})),ka.forEach((s=>{const a=$(s,es,ls);a&&(e[a]=(e[a]||0)+1)})),e}),[ka,es,ls]),wa=(0,n.useMemo)((()=>"all"===ma?ka:ka.filter((e=>$(e,es,ls)===ma))),[ka,ma,es,ls]),Fa=(0,n.useMemo)((()=>{if(!xa)return null;if(!wa.length)return{code:200,zone_summary:[],zones:[]};const e=e=>String(e||"").trim(),s={};wa.forEach((a=>{const t=e(a.deliverysuburb)||e(a.locationsuburb)||e(a.zone_name)||"Unzoned",i=t.toLowerCase(),n=String(a.userid||a.rider_id||"unassigned"),r=a.ridername||a.rider_name||a.username||("unassigned"===n?"Unassigned":"Rider ".concat(n));s[i]||(s[i]={zone_name:t,riders:{}}),s[i].riders[n]||(s[i].riders[n]={rider_id:n,rider_name:r,orders:[]}),s[i].riders[n].orders.push(a)}));const a=Object.values(s).map((e=>{const s=Object.values(e.riders).map((e=>{const s=[...e.orders].sort(((e,s)=>g()(e.deliverydate||e.assigntime||0).valueOf()-g()(s.deliverydate||s.assigntime||0).valueOf()));return(0,i.A)((0,i.A)({},e),{},{orders:s.map(((e,s)=>(0,i.A)((0,i.A)({},e),{},{trip_number:e.trip_number||1,step:e.step||s+1})))})}));return{zone_name:e.zone_name,riders:s}}));return{code:200,zone_summary:a.map((e=>{const s=e.riders.flatMap((e=>e.orders)),a=s.filter((e=>e.userid||e.rider_id)).length;return{zone_name:e.zone_name,total_orders:s.length,assigned_orders:a,unassigned_orders_count:s.length-a,active_riders_count:e.riders.filter((e=>"unassigned"!==e.rider_id)).length,total_delivery_kms:s.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),total_profit:s.reduce(((e,s)=>e+parseFloat(s.profit||0)),0)}})),zones:a}}),[xa,wa]),Ma=(0,n.useMemo)((()=>{const e=s||Fa||{zones:[],zone_summary:[]},a=e.zones||[],t={};(e.zone_summary||[]).forEach((e=>{t[e.zone_name]=e}));const i=(e,s)=>{const a={};return e.forEach((e=>{const t=s(e);t&&(a[t]=(a[t]||0)+1)})),Object.entries(a).map((e=>{let[s,a]=e;return{name:s,count:a}})).sort(((e,s)=>s.count-e.count))};return a.map((e=>{var s,a,n,r;const l=t[e.zone_name]||{},c=(e.riders||[]).flatMap((e=>e.orders||[])),d=(e.riders||[]).filter((e=>e.rider_id&&"unassigned"!==e.rider_id)).length,o=i(c,(e=>e.deliverysuburb||e.locationsuburb)),u=i(c,(e=>e.pickupcustomer||e.kitchen_key)),m={};return c.forEach((e=>{const s=String(e.orderstatus||"unknown").toLowerCase();m[s]=(m[s]||0)+1})),{id:e.zone_name,name:e.zone_name,riders:e.riders||[],orders:c,totalOrders:null!==(s=l.total_orders)&&void 0!==s?s:c.length,activeRidersCount:null!==(a=l.active_riders_count)&&void 0!==a?a:d,totalKms:null!==(n=l.total_delivery_kms)&&void 0!==n?n:c.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),totalProfit:null!==(r=l.total_profit)&&void 0!==r?r:c.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),suburbs:o,kitchens:u,statusCounts:m}}))}),[s,Fa]),{riders:Ca,kitchens:za,allOrders:Aa,stats:Pa}=(0,n.useMemo)((()=>{const e=[];((s||Fa||{zones:[],zone_summary:[]}).zones||[]).forEach((s=>{(s.riders||[]).forEach((a=>{a.orders.forEach((t=>{e.push((0,i.A)((0,i.A)({},t),{},{zone_name:s.zone_name,rider_name:a.rider_name,rider_id:a.rider_id}))}))}))}));const a={};e.forEach((e=>{const s=e.rider_id||e.userid||"unknown";a[s]||(a[s]={id:s,riderName:e.rider_name||e.username||e.rider||s,orders:[],color:re[Object.keys(a).length%re.length]}),a[s].orders.push(e)}));const t={};e.forEach((e=>{const s=e.pickupcustomer||e.kitchen_key||"Unknown",a=s.toLowerCase().trim();t[a]?!Number.isFinite(t[a].lat)&&T(e)&&(t[a].lat=L(O(e)),t[a].lon=L(R(e))):t[a]={id:a,kitchenName:s,lat:L(O(e)),lon:L(R(e)),orders:[],riders:new Set},t[a].orders.push(e),e.rider_id&&t[a].riders.add(e.rider_id)}));const n=e.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),r=e.reduce(((e,s)=>e+parseFloat(s.profit||0)),0);return{riders:Object.values(a).map((e=>(0,i.A)((0,i.A)({},e),{},{orders:[...e.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)}))}))).sort(((e,s)=>s.orders.length-e.orders.length)),kitchens:Object.values(t).sort(((e,s)=>s.orders.length-e.orders.length)),allOrders:e,stats:{totalOrders:e.length,totalKms:n,totalProfit:r,totalRiders:Object.keys(a).length}}}),[s,Fa]),Ea=Ke?r&&Ca.find((e=>e.id===r))||null:Me,Da=(0,n.useCallback)((e=>{h&&h(e?e.id:null),Ke||Ce(e),Le(null)}),[Ke,h]),La=(0,n.useRef)(null);(0,n.useEffect)((()=>{const e=Ea?Ea.id:null;e!==La.current&&(Ea?A.A.info("Focused rider changed to: ".concat(Ea.riderName," (").concat(Ea.orders.length," orders)")):A.A.info("Focused rider reset to: None"),La.current=e)}),[Ea]),(0,n.useEffect)((()=>{De?A.A.info("Focused order updated: ID ".concat(De.orderid)):A.A.debug("Focused order selection cleared")}),[De]);const qa=(0,n.useRef)(0);(0,n.useEffect)((()=>{Aa&&Aa.length!==qa.current&&(A.A.info("Orders database updated: ".concat(Aa.length," orders actively tracked")),qa.current=Aa.length)}),[Aa]);const Ia=(0,n.useRef)(0);(0,n.useEffect)((()=>{ua&&ua.length!==Ia.current&&(A.A.info("Live riders list updated: ".concat(ua.length," active riders mapped")),Ia.current=ua.length)}),[ua]);const Oa=(0,n.useMemo)((()=>Ea?{orders:Ea.orders.length,riders:1,km:Ea.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),profit:Ea.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),label:"Focused Rider"}:ze?{orders:ze.orders.length,riders:ze.riders.size,km:ze.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),profit:ze.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),label:"Focused Kitchen"}:{orders:Pa.totalOrders,riders:Pa.totalRiders,km:Pa.totalKms,profit:Pa.totalProfit,label:"Total Fleet"}),[Ea,ze,Pa]),Ra=(0,n.useMemo)((()=>{if(!Ea)return[];const e=new Set;return Ea.orders.forEach((s=>{null!=s.deliveryid&&""!==s.deliveryid&&0!==s.deliveryid&&e.add(String(s.deliveryid))})),Array.from(e)}),[Ea]),Ta=(0,y.E)({queries:Ra.map((e=>({queryKey:["deliveryLogs",e],queryFn:async()=>{var s,a;const i=await k.A.get("".concat("https://jupiter.nearle.app/live/api/v3","/deliveries/getdeliverylogs/?deliveryid=").concat(e));return function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return[];const a=e.filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&(Math.abs(e.lat)>.1||Math.abs(e.lng)>.1)));if(0===a.length)return[];if(1===a.length)return[{lat:a[0].lat,lng:a[0].lng,logdate:a[0].logdate,_ts:a[0]._ts}];const t=null!=s.processNoise?s.processNoise:1e-10,i=null!=s.measurementNoise?s.measurementNoise:2e-9,n=null!=s.outlierGate?s.outlierGate:9,r=null!=s.maxSpeedKmh?s.maxSpeedKmh:120,l=e=>e._ts||(e.logdate?new Date(e.logdate).getTime():0);let c=0;for(;cr||(d.push(e),o=s)}if(d.length<2)return d.map((e=>({lat:e.lat,lng:e.lng,logdate:e.logdate,_ts:e._ts})));const u=e=>{const s=d.length,a=new Array(s),r=new Array(s),c=new Array(s),o=new Array(s),u=new Array(s),m=l(d[0]),p=l(d[1]),h=Math.max(.1,(p-m)/1e3),x=(d[1][e]-d[0][e])/h;a[0]=[d[0][e],x],r[0]=[i,0,0,1],c[0]=a[0].slice(),o[0]=r[0].slice(),u[0]=0;let v=m;for(let g=1;gn){a[g]=[x,j],r[g]=[_,w,F,M];continue}const A=_/z,P=F/z,E=x+A*C,D=j+P*C;a[g]=[E,D],r[g]=[(1-A)*_,(1-A)*w,F-P*_,M-P*w]}const j=new Array(s);j[s-1]=a[s-1].slice();for(let t=s-2;t>=0;t--){const e=u[t+1],[s,i,n,l]=r[t],d=s+e*i,m=i,p=n+e*l,h=l,[x,v,g,f]=o[t+1],N=x*f-v*g;if(!Number.isFinite(N)||Math.abs(N)<1e-30){j[t]=a[t].slice();continue}const b=f/N,y=-v/N,k=-g/N,S=x/N,_=d*b+m*k,w=d*y+m*S,F=p*b+h*k,M=p*y+h*S,C=j[t+1][0]-c[t+1][0],z=j[t+1][1]-c[t+1][1];j[t]=[a[t][0]+_*C+w*z,a[t][1]+F*C+M*z]}return j.map((e=>e[0]))},m=u("lat"),p=u("lng");return d.map(((e,s)=>({lat:m[s],lng:p[s],logdate:e.logdate,_ts:e._ts})))}(([null===i||void 0===i||null===(s=i.data)||void 0===s?void 0:s.details,null===i||void 0===i||null===(a=i.data)||void 0===a?void 0:a.data,null===i||void 0===i?void 0:i.data,i].find((e=>Array.isArray(e)))||[]).map((e=>{var s,a,t;const i=null!==e&&void 0!==e&&e.logdate?g()(e.logdate):null;return{lat:parseFloat(null!==(s=null===e||void 0===e?void 0:e.latitude)&&void 0!==s?s:null===e||void 0===e?void 0:e.lat),lng:parseFloat(null!==(a=null!==(t=null===e||void 0===e?void 0:e.longitude)&&void 0!==t?t:null===e||void 0===e?void 0:e.lng)&&void 0!==a?a:null===e||void 0===e?void 0:e.lon),logdate:null===e||void 0===e?void 0:e.logdate,_ts:i&&i.isValid()?i.valueOf():Number.MAX_SAFE_INTEGER}})).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng))).sort(((e,s)=>e._ts-s._ts))).map((e=>{let{_ts:s}=e;return(0,t.A)(e,P)}))},enabled:Vs&&null!=Ea,staleTime:3e5,refetchOnWindowFocus:!1,retry:1})))}),Ha=(0,n.useMemo)((()=>{if(!Ea)return[];const e=e=>{const s=e.deliverytime||e.expecteddeliverytime;if(!s)return Number.MAX_SAFE_INTEGER;const a=g()(s);return a.isValid()?a.valueOf():Number.MAX_SAFE_INTEGER};return Ea.orders.filter((e=>null!=e.deliveryid&&""!==e.deliveryid&&0!==e.deliveryid)).sort(((s,a)=>{const t=e(s)-e(a);return 0!==t?t:(s.step||0)-(a.step||0)})).map(((e,s)=>{const a=Ra.indexOf(String(e.deliveryid)),t=a>=0?Ta[a]:null;return{sequenceStep:s+1,orderid:e.orderid,deliveryid:e.deliveryid,deliverycustomer:e.deliverycustomer,pickupcustomer:e.pickupcustomer,step:e.step,tripNumber:e.trip_number||1,deliverytime:e.deliverytime||e.expecteddeliverytime,kms:parseFloat(e.actualkms||e.kms||0)||0,profit:parseFloat(e.profit||0)||0,orderstatus:e.orderstatus,isLoading:(null===t||void 0===t?void 0:t.isLoading)||(null===t||void 0===t?void 0:t.isFetching),isError:null===t||void 0===t?void 0:t.isError,coords:(null===t||void 0===t?void 0:t.data)||[]}}))}),[Ea,Ra,Ta]),Ya=(0,n.useMemo)((()=>Ea?Ha.map((e=>{const s=Ea.orders.find((s=>String(s.deliveryid)===String(e.deliveryid))),a=parseFloat((null===s||void 0===s?void 0:s.kms)||0)||0,t=ws[e.deliveryid];let i=0;Array.isArray(t)&&t.length>=2?i=ee(t):null!=(null===s||void 0===s?void 0:s.actualkms)&&""!==s.actualkms?i=parseFloat(s.actualkms)||0:e.coords.length>=2&&(i=ee(e.coords.map((e=>[e.lat,e.lng]))));const n=i-a,r=a>0?n/a*100:null,l=null!==s&&void 0!==s&&s.expecteddeliverytime?g()(s.expecteddeliverytime):null,c=null!==s&&void 0!==s&&s.deliverytime?g()(s.deliverytime):null,d=null!==l&&void 0!==l&&l.isValid()&&null!==c&&void 0!==c&&c.isValid()?c.diff(l,"minute"):null,o=a>0&&i>1.25*a||null!=d&&d>15;return{sequenceStep:e.sequenceStep,deliveryid:e.deliveryid,orderid:e.orderid,order:s,plannedKm:a,actualKm:i,kmDelta:n,kmDeltaPct:r,expectedTs:null!==l&&void 0!==l&&l.isValid()?l:null,actualTs:null!==c&&void 0!==c&&c.isValid()?c:null,timeDeltaMin:d,anomaly:o,orderstatus:e.orderstatus,deliverycustomer:e.deliverycustomer,pickupcustomer:null===s||void 0===s?void 0:s.pickupcustomer,isLoading:e.isLoading,coordsCount:e.coords.length}})):[]),[Ha,Ea,ws]),Va=(0,n.useMemo)((()=>{if(0===Ya.length)return{plannedKm:0,actualKm:0,kmDeltaPct:null,anomalies:0,late:0,onTime:0};const e=Ya.filter((e=>!e.isLoading&&e.coordsCount>0)),s=e.reduce(((e,s)=>e+s.plannedKm),0),a=e.reduce(((e,s)=>e+s.actualKm),0);return{plannedKm:s,actualKm:a,kmDeltaPct:s>0?(a-s)/s*100:null,anomalies:e.filter((e=>e.anomaly)).length,late:e.filter((e=>null!=e.timeDeltaMin&&e.timeDeltaMin>5)).length,onTime:e.filter((e=>null!=e.timeDeltaMin&&e.timeDeltaMin<=5)).length}}),[Ya]),Ka=(0,n.useMemo)((()=>[...Ya].sort(((e,s)=>{var a,t;return((null===(a=e.order)||void 0===a?void 0:a.step)||e.sequenceStep)-((null===(t=s.order)||void 0===t?void 0:t.step)||s.sequenceStep)}))),[Ya]),Ba=(0,n.useMemo)((()=>[...Ya].sort(((e,s)=>e.sequenceStep-s.sequenceStep))),[Ya]),Ua=(0,n.useMemo)((()=>{if(!Vs||!ra||!Ea)return null;const e=Ha.find((e=>e.sequenceStep===ra));if(!e)return null;const s=Ea.orders.find((s=>String(s.deliveryid)===String(e.deliveryid)));return s?{orders:[s],id:"cmp-step-".concat(ra,"-").concat(s.orderid)}:null}),[Vs,ra,Ea,Ha]);(0,n.useEffect)((()=>{la(null),Xs(new Set),Us("combined")}),[Vs,null===Ea||void 0===Ea?void 0:Ea.id]),(0,n.useEffect)((()=>{!Ea&&Vs&&Ks(!1)}),[Ea,Vs]),(0,n.useEffect)((()=>{Qs.current&&Ea&&(Qs.current=!1,Ks(!0))}),[Ea]),(0,n.useEffect)((()=>{Vs&&!ta.current?(aa.current=ea,sa(!0),na(!1)):!Vs&&ta.current&&sa(aa.current),ta.current=Vs}),[Vs]);const Ga=(0,n.useCallback)((async(e,s,a)=>{if(a.length<2)return;const t=ne(e,s,a);if(void 0!==_s.current[t])return;_s.current[t]=null,Ss((e=>(0,i.A)((0,i.A)({},e),{},{[t]:null})));const n=a.map((e=>"".concat(e[1],",").concat(e[0]))).join(";"),r="https://router.project-osrm.org/route/v1/driving/".concat(n,"?overview=full&geometries=geojson");try{const e=await fetch(r),s=await e.json();if(s.routes&&s.routes[0]){const e=s.routes[0].geometry.coordinates.map((e=>[e[1],e[0]]));_s.current[t]=e,Ss((s=>(0,i.A)((0,i.A)({},s),{},{[t]:e})))}else _s.current[t]=!1,Ss((e=>(0,i.A)((0,i.A)({},e),{},{[t]:!1})))}catch(l){console.error("OSRM Fetch error:",l),_s.current[t]=!1,Ss((e=>(0,i.A)((0,i.A)({},e),{},{[t]:!1})))}}),[]);(0,n.useEffect)((()=>{_s.current={},Ss({}),Ms.current={},Fs({})}),[qs,ma]);const Wa=(0,n.useCallback)((async(e,s)=>{if(void 0!==Ms.current[e])return;if(!Array.isArray(s)||s.length<2)return;Ms.current[e]=null,Fs((s=>(0,i.A)((0,i.A)({},s),{},{[e]:null})));const a=s=>{Ms.current[e]=s,Fs((a=>(0,i.A)((0,i.A)({},a),{},{[e]:s})))},t=()=>{Ms.current[e]=!1,Fs((s=>(0,i.A)((0,i.A)({},s),{},{[e]:!1})))},n=(e,s)=>{if(e.length<=s)return e;const a=Math.ceil(e.length/s),t=e.filter(((e,s)=>s%a===0)),i=e[e.length-1];return t[t.length-1]!==i&&t.push(i),t};try{const e=n(s,90).map((e=>"".concat(e[1],",").concat(e[0]))).join(";"),t="https://router.project-osrm.org/match/v1/driving/".concat(e,"?overview=full&geometries=geojson&gaps=ignore&tidy=true"),i=await fetch(t),r=await i.json();if(r.matchings&&r.matchings.length>0){const e=r.matchings.flatMap((e=>{var s;return((null===(s=e.geometry)||void 0===s?void 0:s.coordinates)||[]).map((e=>[e[1],e[0]]))}));if(e.length>=2)return void a(e)}}catch(r){console.warn("OSRM Match error, trying route fallback:",r)}try{const e=n(s,25).map((e=>"".concat(e[1],",").concat(e[0]))).join(";"),i="https://router.project-osrm.org/route/v1/driving/".concat(e,"?overview=full&geometries=geojson"),r=await fetch(i),l=await r.json();if(l.routes&&l.routes[0]){const e=l.routes[0].geometry.coordinates.map((e=>[e[1],e[0]]));if(e.length>=2)return void a(e)}t()}catch(r){console.error("OSRM Route fallback error:",r),t()}}),[]);(0,n.useEffect)((()=>{Vs&&Ea&&Ha.forEach((e=>{if(!e.deliveryid||e.coords.length<2)return;const s=e.coords.map((e=>[e.lat,e.lng]));Wa(e.deliveryid,s)}))}),[Ha,Vs,Ea,Wa]),(0,n.useEffect)((()=>{Ls.current=Cs}),[Cs]),(0,n.useEffect)((()=>{if(a)return;const e=()=>{const e=new Date;Ue([e.getHours(),e.getMinutes(),e.getSeconds()].map((e=>String(e).padStart(2,"0"))).join(":"))},s=setInterval(e,1e3);return e(),()=>clearInterval(s)}),[a]),(0,n.useEffect)((()=>{Fe(new Set(Ca.map((e=>e.id))))}),[Ca]),(0,n.useEffect)((()=>{Ca.forEach((e=>{if(!we.has(e.id))return;if(Ea&&Ea.id!==e.id)return;const s={};e.orders.forEach((e=>{const a=e.trip_number||1;s[a]||(s[a]=[]),s[a].push(e)})),Object.entries(s).forEach((s=>{let[a,t]=s;const i=[...t].sort(((e,s)=>(e.step||0)-(s.step||0))),n=ie(i);n.length>=2&&Ga(e.id,a,n)}))}))}),[Ca,we,Ea,Ga]);const Ja=(0,n.useRef)(null);(0,n.useEffect)((()=>{if(!xa)return;const e=()=>{const e=g()();return e.hour()+e.minute()/60};null===Ja.current&&(Ja.current=e());const s=setInterval((()=>{const s=e(),a=W(Ja.current,ls),t=W(s,ls);Ja.current=s,t&&t!==a&&pa((e=>e===a?t:e))}),3e4);return()=>clearInterval(s)}),[xa,ls]),(0,n.useEffect)((()=>{Le(null)}),[null===ze||void 0===ze?void 0:ze.id]),(0,n.useEffect)((()=>{const e=ha.current;e&&"function"===typeof e.scrollIntoView&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[ma]),(0,n.useEffect)((()=>{if(!De)return;const e=setTimeout((()=>{var e;const s=null===Aa||void 0===Aa||null===(e=Aa.find)||void 0===e?void 0:e.call(Aa,(e=>String(e.orderid)===String(De.orderid)));s&&Ve(s)}),350);return()=>clearTimeout(e)}),[De,Aa]);const $a=function(e){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return x().divIcon({className:"",iconSize:s?[56,56]:[46,46],iconAnchor:s?[28,28]:[23,23],popupAnchor:[0,s?-30:-24],html:'
').concat((e||"K").charAt(0).toUpperCase(),"
")})},Za=e=>{var s;return(null===(s=Ca.find((s=>s.id===e)))||void 0===s?void 0:s.color)||"#475569"},Xa=(e,s)=>{if(!e||!s||!I(s))return null;const a=ua.find((s=>String(s.id)===String(e)));if(!a)return null;const t=L(s.droplat||s.deliverylat),i=L(s.droplon||s.deliverylong);if(!Number.isFinite(t)||!Number.isFinite(i))return null;const n=Q([a.lat,a.lon],[t,i]);return Math.round(1e3*n)},Qa=e=>null===e||void 0===e?"":e>=1e3?"".concat((e/1e3).toFixed(1)," km"):"".concat(e," m");return(0,C.jsxs)("div",{className:"dispatch-container".concat(a?" embedded":"").concat(Vs?" compare-open":""),children:[!a&&(0,C.jsxs)("div",{id:"hdr",children:[(0,C.jsxs)("div",{className:"logo",children:[(0,C.jsx)("div",{className:"logo-badge",children:"D"}),(0,C.jsx)("div",{className:"logo-name",children:"Dispatch"}),Ge&&Ge.length>0&&(0,C.jsxs)("div",{className:"logo-city-wrap",ref:Qe,children:[(0,C.jsxs)("button",{type:"button",className:"logo-city ".concat(Ze?"open":""),onClick:()=>Xe((e=>!e)),"aria-haspopup":"listbox","aria-expanded":Ze,title:"Switch hub",children:[(0,C.jsx)(S.JFD,{}),(0,C.jsx)("span",{className:"logo-city-text",children:ys||"All locations"}),(0,C.jsx)(S.j1Q,{className:"logo-city-caret"})]}),Ze&&(0,C.jsx)("div",{className:"logo-city-menu",role:"listbox",children:Ge.map((e=>{const s=String(e.applocationid)===String(Je);return(0,C.jsxs)("button",{type:"button",role:"option","aria-selected":s,className:"logo-city-option ".concat(s?"active":""),onClick:()=>(e=>{if(A.A.info("Switching hub/location ID:",e),$e(Number(e)),Xe(!1),"undefined"!==typeof window)try{localStorage.setItem("applocationid",String(e))}catch(s){}Da(null),Ae(null),Ee(null)})(e.applocationid),children:[(0,C.jsx)(S.JFD,{className:"logo-city-option-icon"}),(0,C.jsx)("span",{children:e.locationname}),s&&(0,C.jsx)("span",{className:"logo-city-option-check",children:"\u2713"})]},e.applocationid)}))})]}),(0,C.jsxs)("div",{id:"dispatch-top-tabs",className:"dtt-inline",children:[(0,C.jsxs)("button",{type:"button",className:"dtt-tab ".concat("live"===J?"active":""),onClick:()=>pe("live"),children:[(0,C.jsx)("span",{className:"dtt-icon",children:(0,C.jsx)(S.Cd7,{})}),"Live"]}),(0,C.jsxs)("button",{type:"button",className:"dtt-tab ".concat("analysis"===J?"active":""),onClick:()=>pe("analysis"),children:[(0,C.jsx)("span",{className:"dtt-icon",children:(0,C.jsx)(S.DX0,{})}),"Analysis"]})]})]}),(0,C.jsxs)("div",{className:"hdr-stats",children:[(()=>{const e=Oa.profit<0,s=Math.abs(Oa.profit);return(0,C.jsxs)("span",{className:"strat-stat ".concat(e?"strat-stat-loss":"strat-stat-profit"),title:"".concat(e?"Loss":"Profit"," (").concat(Oa.label,")"),children:[(0,C.jsx)("span",{className:"strat-stat-icon",children:e?(0,C.jsx)(S.Rod,{}):(0,C.jsx)(S.imn,{})}),(0,C.jsx)("span",{className:"strat-stat-label",children:e?"Loss":"Profit"}),(0,C.jsxs)("span",{className:"strat-stat-value",children:[e?"-":"","\u20b9",s.toFixed(0)]})]})})(),xa&&(0,C.jsxs)(C.Fragment,{children:[ga&&(0,C.jsxs)("span",{className:"live-status",children:[(0,C.jsx)("span",{className:"live-dot"})," Loading ",ka.length?"\xb7 ".concat(ka.length," loaded"):""]}),!ga&&!fa&&(0,C.jsxs)("span",{className:"live-status live-status-ready",children:[(0,C.jsx)("span",{className:"live-dot ready"})," ",wa.length," orders",(0,C.jsxs)("span",{className:"live-status-sub",children:[" / ",ka.length," total"]})]}),fa&&(0,C.jsxs)("span",{className:"live-status live-status-error",children:[(0,C.jsx)("span",{className:"live-dot error"})," Failed to load"]}),(()=>{const e=g()().startOf("day"),s=e.format("YYYY-MM-DD"),a=g()(qs),t=qs===s,i=a.isAfter(e,"day"),n=s=>{if(!s)return;const a=s.format("YYYY-MM-DD");a!==qs?s.isAfter(e,"day")||(Is(a),Da(null),Ae(null),Ee(null),Rs(!1)):Rs(!1)},r=Ts.startOf("month"),l=r.subtract(r.day(),"day"),c=Array.from({length:42},((e,s)=>l.add(s,"day"))),d=!Ts.add(1,"month").startOf("month").isAfter(e,"month");return(0,C.jsxs)("div",{className:"date-chip".concat(t?" is-today":"").concat(Os?" is-open":""),ref:Ys,children:[(0,C.jsx)("button",{type:"button",className:"date-chip-nav",onClick:()=>n(a.subtract(1,"day")),"aria-label":"Previous day",title:"Previous day",children:(0,C.jsx)(S.E_E,{})}),(0,C.jsxs)("button",{type:"button",className:"date-chip-main",onClick:()=>Rs((e=>!e)),"aria-haspopup":"dialog","aria-expanded":Os,children:[(0,C.jsx)("span",{className:"date-chip-icon","aria-hidden":"true",children:(0,C.jsx)(S.dDC,{})}),(0,C.jsxs)("span",{className:"date-chip-text",children:[(0,C.jsxs)("span",{className:"date-chip-label",children:["Date",t&&(0,C.jsx)("span",{className:"date-chip-today-pill",children:"Today"})]}),(0,C.jsx)("span",{className:"date-chip-value",children:a.isValid()?a.format("ddd, MMM D, YYYY"):"\u2014"})]}),(0,C.jsx)("span",{className:"date-chip-chevron".concat(Os?" is-open":""),"aria-hidden":"true",children:(0,C.jsx)(S.j1Q,{})})]}),(0,C.jsx)("button",{type:"button",className:"date-chip-nav",onClick:()=>{t||i||n(a.add(1,"day"))},disabled:t||i,"aria-label":"Next day",title:t?"You're viewing today":"Next day",children:(0,C.jsx)(S.xVu,{})}),Os&&(0,C.jsxs)("div",{className:"date-cal-popover",role:"dialog","aria-label":"Pick a date",children:[(0,C.jsxs)("div",{className:"date-cal-header",children:[(0,C.jsx)("button",{type:"button",className:"date-cal-nav",onClick:()=>Hs((e=>e.subtract(1,"month"))),"aria-label":"Previous month",children:(0,C.jsx)(S.E_E,{})}),(0,C.jsx)("div",{className:"date-cal-title",children:Ts.format("MMMM YYYY")}),(0,C.jsx)("button",{type:"button",className:"date-cal-nav",onClick:()=>{const s=Ts.add(1,"month");s.startOf("month").isAfter(e,"month")||Hs(s)},disabled:!d,"aria-label":"Next month",children:(0,C.jsx)(S.xVu,{})})]}),(0,C.jsx)("div",{className:"date-cal-weekdays",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((e=>(0,C.jsx)("div",{className:"date-cal-weekday",children:e},e)))}),(0,C.jsx)("div",{className:"date-cal-grid",children:c.map((a=>{const t=a.month()===Ts.month(),i=a.format("YYYY-MM-DD")===qs,r=a.format("YYYY-MM-DD")===s,l=a.isAfter(e,"day"),c=["date-cal-day",!t&&"is-other-month",i&&"is-selected",r&&"is-today",l&&"is-disabled"].filter(Boolean).join(" ");return(0,C.jsx)("button",{type:"button",className:c,disabled:l,onClick:()=>n(a),"aria-current":r?"date":void 0,"aria-pressed":i,children:a.date()},a.format("YYYY-MM-DD"))}))}),(0,C.jsxs)("div",{className:"date-cal-presets",children:[(0,C.jsx)("button",{type:"button",className:"date-cal-preset",onClick:()=>n(e),children:"Today"}),(0,C.jsx)("button",{type:"button",className:"date-cal-preset",onClick:()=>n(e.subtract(1,"day")),children:"Yesterday"}),(0,C.jsx)("button",{type:"button",className:"date-cal-preset",onClick:()=>n(e.subtract(7,"day")),children:"\u22127 days"})]})]})]})})()]})]}),(0,C.jsx)("div",{id:"clock",children:Be})]}),(a||"live"===J)&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("div",{id:"strat-row",children:[(0,C.jsxs)("button",{className:"sbt ".concat("kitchens"===M?"active":""),onClick:()=>{A.A.info("View mode changed: By Location"),B("kitchens"),Da(null),Ae(null),Ee(null)},children:[(0,C.jsx)("span",{className:"sbt-icon",children:(0,C.jsx)(S.JFD,{})})," By Location"]}),(0,C.jsxs)("button",{className:"sbt ".concat("zones"===M?"active":""),onClick:()=>{A.A.info("View mode changed: By Zone"),B("zones"),Da(null),Ae(null),Ee(null)},children:[(0,C.jsx)("span",{className:"sbt-icon",children:(0,C.jsx)(S.Cd7,{})})," By Zone"]}),(0,C.jsxs)("button",{className:"sbt ".concat("riders"===M?"active":""),onClick:()=>{A.A.info("View mode changed: By Rider"),B("riders"),Da(null),Ae(null),Ee(null)},children:[(0,C.jsx)("span",{className:"sbt-icon",children:(0,C.jsx)(S.bsz,{})})," By Rider"]}),(0,C.jsxs)("button",{className:"sbt ".concat("all"===M?"active":""),onClick:()=>{A.A.info("View mode changed: All Routes"),B("all"),Da(null),Ae(null),Ee(null)},children:[(0,C.jsx)("span",{className:"sbt-icon",children:(0,C.jsx)(S.Zs6,{})})," All Routes"]}),(0,C.jsxs)("button",{type:"button",className:"sbt sbt-rider-info ".concat("rider-info"===M?"active":""),onClick:()=>{B("rider-info"),Da(null),Ae(null),Ee(null)},title:"Live GPS / battery / status snapshot for a rider",children:[(0,C.jsx)("span",{className:"sbt-icon",children:(0,C.jsx)(S.k4P,{})})," Rider Info"]})]}),xa&&"rider-info"!==M&&(0,C.jsxs)("div",{id:"batch-row",children:[(0,C.jsx)("span",{className:"batch-label",children:"Batch"}),(0,C.jsx)("div",{className:"batch-scroll",children:ls.map((e=>{var s;const a=ma===e.id;return(0,C.jsxs)("button",{ref:a?ha:null,className:"batch-btn batch-slot ".concat(a?"active":""),onClick:()=>{pa(e.id),Da(null),Ae(null),Ee(null)},title:"".concat(e.label," (").concat(e.range,")"),children:[(0,C.jsx)("span",{className:"batch-btn-label",children:e.label}),(0,C.jsx)("span",{className:"batch-btn-count",children:null!==(s=_a[e.id])&&void 0!==s?s:0})]},e.id)}))})]}),"rider-info"===M?(0,C.jsxs)("div",{className:"rider-info-mode",children:[(0,C.jsxs)("div",{className:"ri-sidebar",children:[(0,C.jsxs)("div",{className:"ri-sb-head",children:[(0,C.jsx)("div",{className:"ri-sb-title",children:"Riders"}),(0,C.jsxs)("div",{className:"ri-sb-sub",children:[Sa.length," ",1===Sa.length?"rider":"riders"," today"]})]}),(0,C.jsxs)("div",{className:"ri-search",children:[(0,C.jsx)(S.gZ7,{className:"ri-search-icon"}),(0,C.jsx)("input",{type:"text",className:"ri-search-input",placeholder:"Search by name or ID",value:hs,onChange:e=>xs(e.target.value)})]}),(()=>{const e=hs.trim().toLowerCase(),s=Sa.filter((s=>!e||(String(s.riderName||"").toLowerCase().includes(e)||String(s.id).includes(e))));return 0===s.length?(0,C.jsx)("div",{className:"ri-empty",children:hs?'No riders match "'.concat(hs,'"'):"No riders have orders today"}):(0,C.jsx)("div",{className:"ri-rider-list",children:s.map((e=>{const s=String(ms)===String(e.id);return(0,C.jsxs)("button",{type:"button",className:"ri-rider-item ".concat(s?"active":""),onClick:()=>ps(e.id),children:[(0,C.jsx)("span",{className:"ri-rider-dot",style:{background:le(e.id)}}),(0,C.jsxs)("span",{className:"ri-rider-info-block",children:[(0,C.jsx)("span",{className:"ri-rider-name",children:e.riderName}),(0,C.jsxs)("span",{className:"ri-rider-meta",children:["#",e.id]})]}),(0,C.jsx)("span",{className:"ri-rider-arrow",children:"\u2192"})]},e.id)}))})})()]}),(0,C.jsx)("div",{className:"ri-main",children:null==ms?(0,C.jsxs)("div",{className:"ri-placeholder",children:[(0,C.jsx)("div",{className:"ri-placeholder-icon",children:(0,C.jsx)(S.k4P,{})}),(0,C.jsx)("div",{className:"ri-placeholder-title",children:"Pick a rider"}),(0,C.jsx)("div",{className:"ri-placeholder-sub",children:"Select a rider from the list on the left to see their live GPS, battery, connection, and current order snapshot."})]}):(0,C.jsxs)(C.Fragment,{children:[js&&!vs&&(0,C.jsx)("div",{className:"ri-loading",children:"Loading rider snapshot\u2026"}),gs&&(0,C.jsxs)("div",{className:"ri-error",children:["Couldn't load this rider's log. ",(null===fs||void 0===fs?void 0:fs.message)||""]}),vs&&(()=>{const e=vs,s=parseFloat(e.latitude),a=parseFloat(e.longitude),t=Number.isFinite(s)&&Number.isFinite(a),i=parseInt(String(e.battery||"").replace("%",""),10),n=Number.isFinite(i)&&i<=20,r=parseFloat(e.speed),c=String(e.status||"").toLowerCase();return(0,C.jsxs)("div",{className:"ri-snapshot",children:[(0,C.jsxs)("div",{className:"ri-snap-head",children:[(0,C.jsx)("div",{className:"ri-snap-name",children:e.username||"Rider #".concat(e.userid)}),(0,C.jsxs)("div",{className:"ri-snap-meta",children:[(0,C.jsxs)("span",{children:["#",e.userid]}),e.status&&(0,C.jsx)("span",{className:"ri-status ri-status-".concat(c),children:e.status}),(0,C.jsxs)("span",{className:"ri-live ".concat(js?"is-refetching":""),children:[(0,C.jsx)("span",{className:"ri-live-dot"}),js?"Updating\u2026":"Live"]})]}),e.logdate&&(0,C.jsxs)("div",{className:"ri-snap-time",children:[(0,C.jsx)(S.VP9,{})," Last seen ",e.logdate]})]}),(0,C.jsxs)("div",{className:"ri-snap-grid",children:[(0,C.jsxs)("div",{className:"ri-stat ".concat(n?"ri-stat-warn":""),children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.wZm,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"Battery"}),(0,C.jsxs)("div",{className:"ri-stat-value",children:[e.battery||"\u2014",e.is_charging&&(0,C.jsx)("span",{className:"ri-stat-tag",children:"Charging"})]})]})]}),(0,C.jsxs)("div",{className:"ri-stat",children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.Xh5,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"Connection"}),(0,C.jsx)("div",{className:"ri-stat-value",children:e.connection||"\u2014"})]})]}),(0,C.jsxs)("div",{className:"ri-stat",children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.HPi,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"GPS Accuracy"}),(0,C.jsx)("div",{className:"ri-stat-value",children:e.accuracy?"".concat(e.accuracy," m"):"\u2014"})]})]}),(0,C.jsxs)("div",{className:"ri-stat",children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.o8z,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"Location Service"}),(0,C.jsx)("div",{className:"ri-stat-value",children:e.location_service||"\u2014"})]})]}),(0,C.jsxs)("div",{className:"ri-stat",children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.BJM,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"Speed"}),(0,C.jsx)("div",{className:"ri-stat-value",children:Number.isFinite(r)?"".concat(r.toFixed(2)," km/h"):"\u2014"})]})]}),(0,C.jsxs)("div",{className:"ri-stat",children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.bqQ,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"Heading"}),(0,C.jsx)("div",{className:"ri-stat-value",children:null!=e.heading?"".concat(e.heading,"\xb0"):"\u2014"})]})]}),(0,C.jsxs)("div",{className:"ri-stat",children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.pSF,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"App State"}),(0,C.jsx)("div",{className:"ri-stat-value",children:e.is_background?"Background":"Foreground"})]})]}),(0,C.jsxs)("div",{className:"ri-stat",children:[(0,C.jsx)("div",{className:"ri-stat-icon",children:(0,C.jsx)(S.gsJ,{})}),(0,C.jsxs)("div",{className:"ri-stat-body",children:[(0,C.jsx)("div",{className:"ri-stat-label",children:"Current Order"}),(0,C.jsx)("div",{className:"ri-stat-value",children:e.orderid||"\u2014"})]})]})]}),t&&(0,C.jsxs)("div",{className:"ri-map-section",children:[(0,C.jsxs)("div",{className:"ri-coords-label",children:[(0,C.jsx)(S.gwi,{})," ",s.toFixed(6),", ",a.toFixed(6)]}),(0,C.jsx)("div",{className:"ri-map",children:(0,C.jsxs)(d.W,{center:[s,a],zoom:13,scrollWheelZoom:!1,style:{height:"100%",width:"100%"},children:[(0,C.jsx)(o.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"\xa9 OpenStreetMap contributors"}),(0,C.jsxs)(l.p,{position:[s,a],children:[(0,C.jsx)(u.m,{direction:"top",offset:[0,-10],permanent:!0,className:"ri-area-banner",children:(null===bs||void 0===bs?void 0:bs.area)||"Locating area\u2026"}),(0,C.jsxs)(m.z,{children:[(0,C.jsx)("div",{style:{fontWeight:700,marginBottom:2},children:e.username||"Rider #".concat(e.userid)}),(null===bs||void 0===bs?void 0:bs.area)&&(0,C.jsx)("div",{style:{fontSize:12,color:"#0f172a",marginBottom:4},children:bs.area}),(0,C.jsx)("div",{style:{fontSize:11,color:"#64748b"},children:e.logdate?"Last seen ".concat(e.logdate):"".concat(s.toFixed(6),", ").concat(a.toFixed(6))})]})]})]},"".concat(e.userid,"-").concat(s,"-").concat(a))})]})]})})()]})})]}):(0,C.jsxs)("div",{id:"body",className:"".concat(ea?"sidebar-collapsed":""," ").concat(Vs?"compare-mode":""," ").concat(Vs&&ia?"compare-data-collapsed":"").trim(),children:[(0,C.jsx)("button",{type:"button",className:"sidebar-toggle-tab".concat(ea?" is-collapsed":""),onClick:()=>sa((e=>!e)),title:ea?"Show sidebar":"Hide sidebar","aria-label":ea?"Show sidebar":"Hide sidebar",children:ea?(0,C.jsx)(S.xVu,{}):(0,C.jsx)(S.E_E,{})}),Vs&&Ea&&(0,C.jsx)("button",{type:"button",className:"compare-data-toggle-tab".concat(ia?" is-collapsed":""),onClick:()=>na((e=>!e)),title:ia?"Show details panel":"Hide details panel","aria-label":ia?"Show details panel":"Hide details panel",children:ia?(0,C.jsx)(S.E_E,{}):(0,C.jsx)(S.xVu,{})}),(0,C.jsxs)("div",{id:"sidebar",children:[!Ea&&(0,C.jsxs)("div",{className:"sb-header",children:[(0,C.jsxs)("div",{className:"sb-header-top",children:[(0,C.jsxs)("div",{className:"sb-header-title",children:[(0,C.jsx)("span",{className:"sb-title-bar","aria-hidden":"true"}),(0,C.jsx)("span",{className:"sb-title-text",children:"RIDER DISPATCH"})]}),(0,C.jsxs)("span",{className:"sb-header-scope",title:Oa.label,children:[(0,C.jsx)("span",{className:"sb-scope-dot"}),Oa.label]})]}),(0,C.jsxs)("div",{className:"sb-header-tiles",children:[(0,C.jsxs)("div",{className:"sb-tile sb-tile-orders",children:[(0,C.jsx)("span",{className:"sb-tile-icon",children:(0,C.jsx)(S.gsJ,{})}),(0,C.jsxs)("div",{className:"sb-tile-body",children:[(0,C.jsx)("div",{className:"sb-tile-value",children:Oa.orders}),(0,C.jsx)("div",{className:"sb-tile-label",children:1===Oa.orders?"Order":"Orders"})]})]}),(0,C.jsxs)("div",{className:"sb-tile sb-tile-riders",children:[(0,C.jsx)("span",{className:"sb-tile-icon",children:(0,C.jsx)(S.aVM,{})}),(0,C.jsxs)("div",{className:"sb-tile-body",children:[(0,C.jsx)("div",{className:"sb-tile-value",children:Oa.riders}),(0,C.jsx)("div",{className:"sb-tile-label",children:1===Oa.riders?"Rider":"Riders"})]})]})]})]}),Ea||ze?(0,C.jsxs)("div",{id:"route-detail",children:[(0,C.jsxs)("button",{className:"rd-back",onClick:()=>{Da(null),Ae(null)},children:["\u2190 Back to ",Pe?Pe.name:"list"]}),Ea?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{className:"rd-rider-name",style:{color:Ea.color},children:Ea.riderName}),(()=>{const e=Ea.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0),s=Ea.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0),a=s<0;return(0,C.jsxs)("div",{className:"rd-stats-grid",children:[(0,C.jsxs)("div",{className:"rd-stat rd-stat-orders",children:[(0,C.jsx)("div",{className:"rd-stat-icon",children:(0,C.jsx)(S.gsJ,{})}),(0,C.jsx)("div",{className:"rd-stat-value",children:Ea.orders.length}),(0,C.jsx)("div",{className:"rd-stat-label",children:"Orders"})]}),(0,C.jsxs)("div",{className:"rd-stat rd-stat-distance",children:[(0,C.jsx)("div",{className:"rd-stat-icon",children:(0,C.jsx)(S.xI$,{})}),(0,C.jsxs)("div",{className:"rd-stat-value",children:[e.toFixed(1),(0,C.jsx)("span",{className:"rd-stat-unit",children:"km"})]}),(0,C.jsx)("div",{className:"rd-stat-label",children:"Distance"})]}),(0,C.jsxs)("div",{className:"rd-stat rd-stat-profit ".concat(a?"is-loss":"is-gain"),children:[(0,C.jsx)("div",{className:"rd-stat-icon",children:a?(0,C.jsx)(S.Rod,{}):(0,C.jsx)(S.imn,{})}),(0,C.jsxs)("div",{className:"rd-stat-value",children:[a?"-":"","\u20b9",Math.abs(s).toFixed(0)]}),(0,C.jsx)("div",{className:"rd-stat-label",children:a?"Loss":"Profit"})]})]})})(),(()=>{const e={};Ea.orders.forEach((s=>{const a=s.trip_number||1;e[a]||(e[a]=[]),e[a].push(s)}));const s=[...Ea.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!w.Ys.has(s)&&!w.yP.has(s)})),a=s?s.orderid:null,t=e=>{const s=e.deliverytime||e.expecteddeliverytime;if(!s)return Number.MAX_SAFE_INTEGER;const a=g()(s);return a.isValid()?a.valueOf():Number.MAX_SAFE_INTEGER},i="time"===qe;let r=null;return Object.entries(e).sort(((e,s)=>{let[a]=e,[t]=s;return Number(a)-Number(t)})).map((e=>{let[s,l]=e;const c=i?[...l].sort(((e,s)=>{const a=t(e)-t(s);return 0!==a?a:(e.step||0)-(s.step||0)})):l;return(0,C.jsxs)("div",{className:"trip-block",children:[(0,C.jsxs)("div",{className:"trip-header",style:{background:"".concat(Ea.color,"12"),borderColor:"".concat(Ea.color,"30")},children:[(0,C.jsxs)("span",{className:"th-badge",style:{background:Ea.color},children:["Trip ",s]}),(0,C.jsxs)("span",{className:"trip-stats",children:[(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.gwi,{})}),l.length," stops"]}),(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.xI$,{})}),l.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0).toFixed(1)," km"]})]}),(0,C.jsxs)("div",{className:"trip-sort-toggle",role:"group","aria-label":"Sort stops by","data-mode":i?"time":"planned",children:[(0,C.jsxs)("button",{type:"button",className:"trip-sort-pill ".concat(i?"":"is-active"),"aria-pressed":!i,onClick:()=>Ie("planned"),title:"Sort stops by planned step (dispatched order)",children:[(0,C.jsx)(S.EgJ,{"aria-hidden":"true"}),(0,C.jsx)("span",{children:"Planned"})]}),(0,C.jsxs)("button",{type:"button",className:"trip-sort-pill ".concat(i?"is-active":""),"aria-pressed":i,onClick:()=>Ie("time"),title:"Sort stops by completion time (which delivery was done first)",children:[(0,C.jsx)(S.VP9,{"aria-hidden":"true"}),(0,C.jsx)("span",{children:"By time"})]})]})]}),(0,C.jsx)("div",{className:"zone-order-grid",children:c.map(((e,t)=>{const l=(e.kitchen_key||e.pickupcustomer||"Unknown").toLowerCase().trim(),c=null!==r&&l!==r;r=l;const d=De&&De.orderid===e.orderid,o=a&&e.orderid===a,u=parseFloat(e.droplat||e.deliverylat),m=parseFloat(e.droplon||e.deliverylong),p=Number.isFinite(u)&&Number.isFinite(m),h=(0,w.Cx)(e.orderstatus),x=parseFloat(e.profit||0),v=x<0,g=Xa(Ea.id,e),f=e.step||t+1,N=i&&!e.deliverytime;return(0,C.jsxs)(n.Fragment,{children:[c&&(0,C.jsxs)("div",{className:"kitchen-transition",children:[(0,C.jsx)("span",{className:"kt-ico",children:(0,C.jsx)(S.$G1,{})})," Switch to ",(0,C.jsx)("strong",{children:e.pickupcustomer})]}),(0,C.jsxs)("div",{className:"zone-order-card ".concat(p?"clickable":""," ").concat(d?"active":""," ").concat(o?"going-on":""," ").concat(N?"is-pending-time":""),role:p?"button":void 0,tabIndex:p?0:void 0,onClick:p?()=>Le(d?null:{orderid:e.orderid,lat:u,lon:m}):void 0,onKeyDown:p?s=>{"Enter"!==s.key&&" "!==s.key||(s.preventDefault(),Le(d?null:{orderid:e.orderid,lat:u,lon:m}))}:void 0,title:p?d?"Click to show full trip":"Show ".concat(e.deliverycustomer||"order #".concat(e.orderid)," on map"):void 0,children:[(0,C.jsxs)("div",{className:"zone-order-card-head",children:[(0,C.jsx)("div",{className:"zone-order-num",title:"Planned step ".concat(e.step||t+1),children:f}),(0,C.jsx)("div",{className:"zone-order-id-block",children:(0,C.jsxs)("div",{className:"zone-order-id",children:["Order #",e.orderid]})}),(()=>{const s=ae(e.deliverytime),a=ae(e.expecteddeliverytime),t=!w.Ys.has(String(e.orderstatus||"").toLowerCase())&&null!==g;return e.orderstatus||s||a||t?(0,C.jsxs)("div",{className:"zone-order-status-stack",children:[e.orderstatus&&(0,C.jsx)("span",{className:"zone-order-status",style:{background:h.bg,color:h.fg},children:h.label}),(s||a)&&(0,C.jsxs)("span",{className:"zone-order-time ".concat(s?"":"is-expected"),title:s?"Delivered at ".concat(s):"Expected at ".concat(a),children:[(0,C.jsx)(S.VP9,{}),s||a]}),t&&(0,C.jsxs)("span",{className:"zone-order-est-drop",title:"Estimated distance to drop location",children:[(0,C.jsx)(S.HPi,{}),Qa(g)]})]}):null})(),j&&(0,C.jsx)("button",{type:"button",className:"zone-order-change-rider",title:"Change rider",onClick:s=>{s.stopPropagation(),j(e,Ea)},children:(0,C.jsx)(S.$G1,{})})]}),(0,C.jsxs)("div",{className:"zone-order-customer",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.u9F,{})}),e.deliverycustomer||"\u2014"]}),e.pickupcustomer&&(0,C.jsxs)("div",{className:"zone-order-line",title:"Kitchen: ".concat(e.pickupcustomer),children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.NtI,{})}),e.pickupcustomer]}),(e.deliverysuburb||e.deliveryaddress)&&(0,C.jsxs)("div",{className:"zone-order-line",title:e.deliveryaddress||e.deliverysuburb,children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.gwi,{})}),e.deliverysuburb||q(e.deliveryaddress)]}),e.ordernotes&&(0,C.jsxs)("div",{className:"zone-order-line zone-order-notes",title:e.ordernotes,children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.dKO,{})}),e.ordernotes]}),(0,C.jsxs)("div",{className:"zone-order-stats",children:[(0,C.jsxs)("span",{className:"zone-order-chip",title:"Distance",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.xI$,{})}),e.actualkms||e.kms||0," km"]}),(0,C.jsxs)("span",{className:"zone-order-chip ".concat(v?"is-loss":"is-profit"),title:"Profit",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.ohY,{})}),v?"-":"","\u20b9",Math.abs(x).toFixed(0)]}),null!=e.deliverycharge&&(0,C.jsxs)("span",{className:"zone-order-chip",title:"Delivery charge",children:["\u20b9",parseFloat(e.deliverycharge).toFixed(0)," chg"]}),e.ordertype&&(0,C.jsx)("span",{className:"zone-order-chip zone-order-type type-".concat(String(e.ordertype).toLowerCase()),children:e.ordertype}),(0,C.jsxs)("span",{className:"zone-order-chip zone-order-trip",children:["T",e.trip_number||s," \xb7 S",e.step||t+1]})]})]})]},e.orderid)}))})]},s)}))})()]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{className:"rd-rider-name",style:{color:"#f59e0b"},children:ze.kitchenName}),(0,C.jsxs)("div",{className:"rd-rider-sub",children:[(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.gsJ,{})}),ze.orders.length," orders"]}),(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.aVM,{})}),ze.riders.size," riders"]})]}),(0,C.jsxs)("div",{className:"zone-detail-section",children:[(0,C.jsxs)("div",{className:"zone-section-label",children:["Orders ",(0,C.jsxs)("span",{className:"section-count",children:["(",ze.orders.length,")"]})]}),0===ze.orders.length?(0,C.jsx)("div",{className:"zone-suburb-panel-empty",children:"No orders for this kitchen."}):(0,C.jsx)("div",{className:"zone-order-grid",children:ze.orders.map(((e,s)=>{const a=parseFloat(e.droplat||e.deliverylat),t=parseFloat(e.droplon||e.deliverylong),i=Number.isFinite(a)&&Number.isFinite(t),n=De&&De.orderid===e.orderid,r=(0,w.Cx)(e.orderstatus),l=parseFloat(e.profit||0),c=l<0,d=e.rider_id||e.userid,o=d?Ca.find((e=>String(e.id)===String(d))):null,u=(()=>{if(!o)return null;const e=[...o.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!w.Ys.has(s)&&!w.yP.has(s)}));return e?e.orderid:null})(),m=u&&e.orderid===u,p=d?Xa(d,e):null;return(0,C.jsxs)("div",{className:"zone-order-card ".concat(i?"clickable":""," ").concat(n?"active":""," ").concat(m?"going-on":""),role:i?"button":void 0,tabIndex:i?0:void 0,onClick:i?()=>Le(n?null:{orderid:e.orderid,lat:a,lon:t}):void 0,children:[(0,C.jsxs)("div",{className:"zone-order-card-head",children:[(0,C.jsx)("div",{className:"zone-order-num",children:e.step||s+1}),(0,C.jsxs)("div",{className:"zone-order-id-block",children:[(0,C.jsxs)("div",{className:"zone-order-id",children:["Order #",e.orderid]}),(0,C.jsxs)("div",{className:"zone-order-rider",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.aVM,{})}),e.rider_name||e.ridername||"Unassigned"]})]}),(()=>{const s=ae(e.deliverytime),a=ae(e.expecteddeliverytime),t=!w.Ys.has(String(e.orderstatus||"").toLowerCase())&&null!==p;return e.orderstatus||s||a||t?(0,C.jsxs)("div",{className:"zone-order-status-stack",children:[e.orderstatus&&(0,C.jsx)("span",{className:"zone-order-status",style:{background:r.bg,color:r.fg},children:r.label}),(s||a)&&(0,C.jsxs)("span",{className:"zone-order-time ".concat(s?"":"is-expected"),title:s?"Delivered at ".concat(s):"Expected at ".concat(a),children:[(0,C.jsx)(S.VP9,{}),s||a]}),t&&(0,C.jsxs)("span",{className:"zone-order-est-drop",title:"Estimated distance to drop location",children:[(0,C.jsx)(S.HPi,{}),Qa(p)]})]}):null})()]}),(0,C.jsxs)("div",{className:"zone-order-customer",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.u9F,{})}),e.deliverycustomer||"\u2014"]}),e.pickupcustomer&&(0,C.jsxs)("div",{className:"zone-order-line",title:"Kitchen: ".concat(e.pickupcustomer),children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.NtI,{})}),e.pickupcustomer]}),(e.deliverysuburb||e.deliveryaddress)&&(0,C.jsxs)("div",{className:"zone-order-line",title:e.deliveryaddress||e.deliverysuburb,children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.gwi,{})}),e.deliverysuburb||q(e.deliveryaddress)]}),e.ordernotes&&(0,C.jsxs)("div",{className:"zone-order-line zone-order-notes",title:e.ordernotes,children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.dKO,{})}),e.ordernotes]}),(0,C.jsxs)("div",{className:"zone-order-stats",children:[(0,C.jsxs)("span",{className:"zone-order-chip",title:"Distance",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.xI$,{})}),e.actualkms||e.kms||0," km"]}),(0,C.jsxs)("span",{className:"zone-order-chip ".concat(c?"is-loss":"is-profit"),title:"Profit",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.ohY,{})}),c?"-":"","\u20b9",Math.abs(l).toFixed(0)]}),null!=e.deliverycharge&&(0,C.jsxs)("span",{className:"zone-order-chip",title:"Delivery charge",children:["\u20b9",parseFloat(e.deliverycharge).toFixed(0)," chg"]}),e.ordertype&&(0,C.jsx)("span",{className:"zone-order-chip zone-order-type type-".concat(String(e.ordertype).toLowerCase()),children:e.ordertype}),(0,C.jsxs)("span",{className:"zone-order-chip zone-order-trip",children:["T",e.trip_number||"-"," \xb7 S",e.step||s+1]})]})]},e.orderid)}))})]})]})]}):Pe?(0,C.jsxs)("div",{id:"route-detail",children:[(0,C.jsx)("button",{className:"rd-back",onClick:()=>Ee(null),children:"\u2190 Back to zones"}),(0,C.jsx)("div",{className:"rd-rider-name",style:{color:"#3b82f6"},children:Pe.name}),(0,C.jsx)("div",{className:"rd-rider-sub",children:(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.gsJ,{})}),Pe.totalOrders," ",1===Pe.totalOrders?"order":"orders"]})}),(0,C.jsxs)("div",{className:"zone-detail-section",children:[(0,C.jsxs)("div",{className:"zone-section-label",children:["Orders ",(0,C.jsxs)("span",{className:"section-count",children:["(",Pe.orders.length,")"]})]}),0===Pe.orders.length?(0,C.jsx)("div",{className:"zone-suburb-panel-empty",children:"No orders in this zone."}):(0,C.jsx)("div",{className:"zone-order-grid",children:Pe.orders.map(((e,s)=>{const a=parseFloat(e.droplat||e.deliverylat),t=parseFloat(e.droplon||e.deliverylong),i=Number.isFinite(a)&&Number.isFinite(t),n=De&&De.orderid===e.orderid,r=(0,w.Cx)(e.orderstatus),l=parseFloat(e.profit||0),c=l<0,d=e.rider_id||e.userid,o=d?Ca.find((e=>String(e.id)===String(d))):null,u=(()=>{if(!o)return null;const e=[...o.orders].sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!w.Ys.has(s)&&!w.yP.has(s)}));return e?e.orderid:null})(),m=u&&e.orderid===u,p=d?Xa(d,e):null;return(0,C.jsxs)("div",{className:"zone-order-card ".concat(i?"clickable":""," ").concat(n?"active":""," ").concat(m?"going-on":""),role:i?"button":void 0,tabIndex:i?0:void 0,onClick:i?()=>Le(n?null:{orderid:e.orderid,lat:a,lon:t}):void 0,children:[(0,C.jsxs)("div",{className:"zone-order-card-head",children:[(0,C.jsx)("div",{className:"zone-order-num",children:e.step||s+1}),(0,C.jsxs)("div",{className:"zone-order-id-block",children:[(0,C.jsxs)("div",{className:"zone-order-id",children:["Order #",e.orderid]}),(0,C.jsxs)("div",{className:"zone-order-rider",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.aVM,{})}),e.rider_name||e.ridername||"Unassigned"]})]}),(()=>{const s=ae(e.deliverytime),a=ae(e.expecteddeliverytime),t=!w.Ys.has(String(e.orderstatus||"").toLowerCase())&&null!==p;return e.orderstatus||s||a||t?(0,C.jsxs)("div",{className:"zone-order-status-stack",children:[e.orderstatus&&(0,C.jsx)("span",{className:"zone-order-status",style:{background:r.bg,color:r.fg},children:r.label}),(s||a)&&(0,C.jsxs)("span",{className:"zone-order-time ".concat(s?"":"is-expected"),title:s?"Delivered at ".concat(s):"Expected at ".concat(a),children:[(0,C.jsx)(S.VP9,{}),s||a]}),t&&(0,C.jsxs)("span",{className:"zone-order-est-drop",title:"Estimated distance to drop location",children:[(0,C.jsx)(S.HPi,{}),Qa(p)]})]}):null})()]}),(0,C.jsxs)("div",{className:"zone-order-customer",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.u9F,{})}),e.deliverycustomer||"\u2014"]}),e.pickupcustomer&&(0,C.jsxs)("div",{className:"zone-order-line",title:"Kitchen: ".concat(e.pickupcustomer),children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.NtI,{})}),e.pickupcustomer]}),(e.deliverysuburb||e.deliveryaddress)&&(0,C.jsxs)("div",{className:"zone-order-line",title:e.deliveryaddress||e.deliverysuburb,children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.gwi,{})}),e.deliverysuburb||q(e.deliveryaddress)]}),e.ordernotes&&(0,C.jsxs)("div",{className:"zone-order-line zone-order-notes",title:e.ordernotes,children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.dKO,{})}),e.ordernotes]}),(0,C.jsxs)("div",{className:"zone-order-stats",children:[(0,C.jsxs)("span",{className:"zone-order-chip",title:"Distance",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.xI$,{})}),e.actualkms||e.kms||0," km"]}),(0,C.jsxs)("span",{className:"zone-order-chip ".concat(c?"is-loss":"is-profit"),title:"Profit",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.ohY,{})}),c?"-":"","\u20b9",Math.abs(l).toFixed(0)]}),null!=e.deliverycharge&&(0,C.jsxs)("span",{className:"zone-order-chip",title:"Delivery charge",children:["\u20b9",parseFloat(e.deliverycharge).toFixed(0)," chg"]}),e.ordertype&&(0,C.jsx)("span",{className:"zone-order-chip zone-order-type type-".concat(String(e.ordertype).toLowerCase()),children:e.ordertype}),(0,C.jsxs)("span",{className:"zone-order-chip zone-order-trip",children:["T",e.trip_number||"-"," \xb7 S",e.step||s+1]})]})]},e.orderid)}))})]})]}):(0,C.jsxs)("div",{id:"riders-panel",children:[(0,C.jsx)("div",{className:"ph",children:"zones"===M?"Zone dispatch":"kitchens"===M?"Kitchen dispatch":"Rider dispatch"}),(0,C.jsx)("div",{id:"rider-cards",children:0!==Aa.length||ga?"zones"===M?Ma.map(((e,s)=>{const a=e.statusCounts.delivered||0,t=e.totalProfit<0;return(0,C.jsxs)("div",{className:"rcard zone-card",onClick:()=>Ee(e),style:{animationDelay:"".concat(.05*s,"s")},children:[(0,C.jsxs)("div",{className:"zone-card-header",children:[(0,C.jsx)("div",{className:"zone-card-emoji",children:(0,C.jsx)(S.Cd7,{})}),(0,C.jsxs)("div",{className:"zone-card-titles",children:[(0,C.jsx)("div",{className:"zone-card-name",children:e.name}),(0,C.jsxs)("div",{className:"zone-card-sub",children:[e.activeRidersCount," ",1===e.activeRidersCount?"rider":"riders"," \xb7 ",e.totalOrders," ",1===e.totalOrders?"order":"orders"]})]}),(0,C.jsx)("span",{className:"zone-card-arrow","aria-hidden":"true",children:"\u2192"})]}),e.totalOrders>0&&(0,C.jsxs)("div",{className:"zone-progress-row",children:[(0,C.jsx)("div",{className:"zone-status-bar",title:Object.entries(e.statusCounts).map((e=>{let[s,a]=e;return"".concat((0,w.Cx)(s).label,": ").concat(a)})).join(" \xb7 "),children:Object.entries(e.statusCounts).map((s=>{let[a,t]=s;const i=(0,w.Cx)(a),n=t/e.totalOrders*100;return(0,C.jsx)("div",{className:"zone-status-seg",style:{width:"".concat(n,"%"),background:i.bg}},a)}))}),(0,C.jsxs)("div",{className:"zone-progress-label",children:[a,"/",e.totalOrders]})]}),(0,C.jsxs)("div",{className:"zone-stat-pills",children:[(0,C.jsxs)("span",{className:"zone-stat-pill",title:"Areas covered",children:[(0,C.jsx)("span",{className:"zone-stat-icon",children:(0,C.jsx)(S.gwi,{})}),(0,C.jsx)("span",{className:"zone-stat-value",children:e.suburbs.length}),(0,C.jsx)("span",{className:"zone-stat-label",children:1===e.suburbs.length?"area":"areas"})]}),(0,C.jsxs)("span",{className:"zone-stat-pill",title:"Total distance",children:[(0,C.jsx)("span",{className:"zone-stat-icon",children:(0,C.jsx)(S.xI$,{})}),(0,C.jsx)("span",{className:"zone-stat-value",children:e.totalKms.toFixed(1)}),(0,C.jsx)("span",{className:"zone-stat-label",children:"km"})]}),(0,C.jsxs)("span",{className:"zone-stat-pill",title:"Kitchens",children:[(0,C.jsx)("span",{className:"zone-stat-icon",children:(0,C.jsx)(S.NtI,{})}),(0,C.jsx)("span",{className:"zone-stat-value",children:e.kitchens.length}),(0,C.jsx)("span",{className:"zone-stat-label",children:1===e.kitchens.length?"kitchen":"kitchens"})]}),(0,C.jsxs)("span",{className:"zone-stat-pill ".concat(t?"profit-negative":"profit-positive"),title:"Total profit",children:[(0,C.jsx)("span",{className:"zone-stat-icon",children:(0,C.jsx)(S.ohY,{})}),(0,C.jsx)("span",{className:"zone-stat-value",children:t?"-\u20b9".concat(Math.abs(e.totalProfit).toFixed(0)):"\u20b9".concat(e.totalProfit.toFixed(0))})]})]}),e.suburbs.length>0&&(0,C.jsxs)("div",{className:"zone-card-suburbs",children:[(0,C.jsx)("span",{className:"zone-card-suburbs-text",children:e.suburbs.slice(0,3).map((e=>e.name)).join(" \xb7 ")}),e.suburbs.length>3&&(0,C.jsxs)("span",{className:"zone-card-suburbs-more",children:["+",e.suburbs.length-3]})]})]},e.id)})):"kitchens"===M?za.map(((e,s)=>(0,C.jsxs)("div",{className:"rcard",onClick:()=>Ae(e),style:{animationDelay:"".concat(.05*s,"s")},children:[(0,C.jsxs)("div",{className:"rcard-top",children:[(0,C.jsx)("div",{className:"rcard-emo",style:{background:"#f59e0b18",borderColor:"#f59e0b50",color:"#f59e0b"},children:(0,C.jsx)(S.NtI,{})}),(0,C.jsxs)("div",{className:"rcard-info",children:[(0,C.jsx)("div",{className:"rcard-name",children:e.kitchenName}),(0,C.jsxs)("div",{className:"rcard-zone",children:[e.riders.size," riders \xb7 ",(0,C.jsx)(de,{children:(0,C.jsx)(S.ohY,{})}),"\u20b9",e.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0).toFixed(0)]})]}),(0,C.jsx)("div",{className:"rcard-badge",style:{background:"#f59e0b18",color:"#f59e0b"},children:e.orders.length})]}),(0,C.jsx)("div",{className:"bar-bg",children:(0,C.jsx)("div",{className:"bar-fg",style:{width:"".concat(Math.min(100,e.orders.length/20*100),"%"),background:"#f59e0b"}})}),(0,C.jsxs)("div",{className:"rcard-meta",children:[(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.xI$,{})}),e.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0).toFixed(1)," km"]}),(0,C.jsxs)("span",{children:[e.riders.size," riders"]})]}),(0,C.jsx)("div",{className:"step-ids",children:Array.from(e.riders).slice(0,10).map((e=>{var s;return(0,C.jsx)("span",{className:"step-id",style:{color:Za(e)},children:null===(s=Ca.find((s=>s.id===e)))||void 0===s?void 0:s.riderName.split(" ")[0]},e)}))})]},e.id))):Ca.map(((e,s)=>{var a;const t=e.orders.length,i=e.orders.filter((e=>w.Ys.has(String(e.orderstatus||"").toLowerCase()))).length,n=t>0&&i>=t,r=e.orders.find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!w.Ys.has(s)&&!w.yP.has(s)})),l=r?Xa(e.id,r):null;return(0,C.jsxs)("div",{className:"rcard",onClick:()=>Da(e),style:{animationDelay:"".concat(.05*s,"s"),borderLeft:"3px solid ".concat(e.color)},children:[(0,C.jsxs)("div",{className:"rcard-top",children:[(0,C.jsx)("div",{className:"rcard-emo",style:{background:"#f1f5f9",borderColor:"#e2e8f0",color:"#64748b"},children:(0,C.jsx)(S.aVM,{})}),(0,C.jsxs)("div",{className:"rcard-info",children:[(0,C.jsx)("div",{className:"rcard-name",children:e.riderName}),(0,C.jsxs)("div",{className:"rcard-zone",children:[(null===(a=e.orders[0])||void 0===a?void 0:a.zone_name)||ys||"Local"," \xb7 ",new Set(e.orders.map((e=>e.trip_number||1))).size," trips"]})]}),(0,C.jsxs)("div",{className:"rcard-badge ".concat(n?"is-done":""),style:n?void 0:{background:"#f1f5f9",color:"#475569"},title:"".concat(i," delivered of ").concat(t," total"),children:[i,"/",t]})]}),(0,C.jsx)("div",{className:"bar-bg",children:(0,C.jsx)("div",{className:"bar-fg",style:{width:"".concat(Math.min(100,t/15*100),"%"),background:e.color}})}),(0,C.jsxs)("div",{className:"rcard-meta",children:[(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.xI$,{})}),e.orders.reduce(((e,s)=>e+parseFloat(s.actualkms||s.kms||0)),0).toFixed(1)," km"]}),null!==l&&(0,C.jsxs)("span",{className:"rcard-est-meters",title:"Estimated distance to next drop location",children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.HPi,{})}),Qa(l)," to drop"]}),(0,C.jsxs)("span",{children:[(0,C.jsx)(de,{children:(0,C.jsx)(S.ohY,{})}),"\u20b9",e.orders.reduce(((e,s)=>e+parseFloat(s.profit||0)),0).toFixed(0)]})]}),(0,C.jsx)("div",{className:"step-ids",children:e.orders.slice(0,15).map((e=>(0,C.jsxs)("span",{className:"step-id",children:["S",e.step]},e.orderid)))})]},e.id)})):(e=>{const s=null===(e=ls.find((e=>e.id===ma)))||void 0===e?void 0:e.label,a=xa&&ka.length>0;return(0,C.jsxs)("div",{className:"empty-slot",children:[(0,C.jsx)("div",{className:"empty-slot-icon",children:(0,C.jsx)(S.gsJ,{})}),(0,C.jsx)("div",{className:"empty-slot-title",children:s?"No orders in ".concat(s):"No orders"}),(0,C.jsx)("div",{className:"empty-slot-sub",children:a?"".concat(ka.length," order").concat(1===ka.length?"":"s"," exist in other slots today"):"No deliveries found for this date"})]})})()})]})]}),(0,C.jsxs)("div",{id:"map-wrap",className:"".concat("kitchens"===M?"view-mode-kitchens":""," ").concat(Vs?"compare-split":"").trim(),children:[(0,C.jsxs)(d.W,{center:[11.022,76.982],zoom:12,scrollWheelZoom:!0,style:{height:"100%",width:"100%"},zoomControl:!1,renderer:da.current,inertia:!0,inertiaDeceleration:2400,inertiaMaxSpeed:2e3,wheelDebounceTime:20,wheelPxPerZoomLevel:80,zoomSnap:.25,children:[(0,C.jsx)(o.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"\xa9 OpenStreetMap contributors"}),(0,C.jsx)(p.p,{position:"bottomright"}),Vs&&(0,C.jsx)(Z,{targetRef:ca}),(0,C.jsx)(X,{trigger:"".concat(ea,"|").concat(Vs,"|").concat(ia)}),(0,C.jsx)(ce,{focusedItem:Ua||(Ea||ze)&&De||Ea||ze||Pe,viewMode:M,orders:Aa,kitchens:za,locationKey:Je}),za.filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lon))).filter((e=>!Ea||e.riders.has(Ea.id))).map(((e,s)=>(0,C.jsx)(l.p,{position:[e.lat,e.lon],icon:$a(e.kitchenName,(null===ze||void 0===ze?void 0:ze.id)===e.id),zIndexOffset:(null===ze||void 0===ze?void 0:ze.id)===e.id?4e3:2e3,eventHandlers:{click:()=>Ae(e),mouseover:e=>e.target.openPopup(),mouseout:e=>e.target.closePopup()},children:(0,C.jsxs)(m.z,{className:"kitchen-popup",maxWidth:220,minWidth:200,autoPan:!0,autoPanPadding:[20,20],children:[(0,C.jsx)("div",{className:"kp-header",children:"KITCHEN"}),(0,C.jsx)("div",{className:"kp-name",children:e.kitchenName}),(0,C.jsxs)("div",{className:"kp-stat",children:[(0,C.jsx)("span",{className:"kp-stat-lbl",children:"Orders"}),(0,C.jsx)("span",{className:"kp-stat-val",children:e.orders.length})]})]})},"k-".concat(s)))),(()=>{if(Vs&&Ea&&"actual"===Bs)return null;let e=Aa;Pe&&(e=Pe.orders),ze&&(e=ze.orders),Ea&&(e=Ea.orders),e=e.filter(I);const s=Vs&&Ea?new Map(Ha.map((e=>[String(e.deliveryid),e.sequenceStep]))):null;return e.map(((a,t)=>{const i=a.rider_id,n=!i||we.has(i);let r,c=Za(i);if(s&&i===Ea.id&&null!=a.deliveryid){const e=s.get(String(a.deliveryid));e&&(c=(0,w.gM)(e-1),r=e)}const d=!!Ea||!!ze,o=(0,w.Cx)(a.orderstatus),u="delivered"===String(a.orderstatus||"").toLowerCase(),m=v&&String(v)===String(a.orderid),p=a.orderstatus?'\n \n \n ').concat(u?'':"","\n "):"",h=d?(()=>{const s=r||a.step||e.indexOf(a)+1,t=32;return x().divIcon({className:"",iconSize:[t,t],iconAnchor:[16,16],popupAnchor:[0,-28],html:'
9?12:14,"px;opacity:").concat(n?1:.75,'">').concat(s>0?s:"").concat(p,"
")})})():x().divIcon({className:"",iconSize:[24,30],iconAnchor:[2,30],popupAnchor:[10,-25],html:'
').concat(p,"
")});return(0,C.jsx)(l.p,{position:[parseFloat(a.droplat||a.deliverylat),parseFloat(a.droplon||a.deliverylong)],icon:h,zIndexOffset:i?100:0,ref:e=>{e?Oe.current[String(a.orderid)]=e:delete Oe.current[String(a.orderid)]},eventHandlers:{click:()=>{const e=String(a.orderid);Re.current.has(e)?(Re.current.delete(e),Ve(null)):(Re.current.add(e),Ve(a))}}},"".concat(a.orderid,"-").concat(d?"num":"flag"))}))})(),(()=>{const e=Vs&&Ea&&"actual"===Bs;if(Cs)return e?[]:As.map(((e,s)=>(0,C.jsx)(c.R,{positions:[e.from,e.to],pathOptions:{color:e.color,weight:6,opacity:.9,lineJoin:"round",lineCap:"round"}},s)));const s=[],a=Pe?new Set(Pe.riders.map((e=>String(e.rider_id)))):null;return e||Ca.forEach((e=>{const t=we.has(e.id);if(Ea&&Ea.id!==e.id)return;if(ze&&!ze.riders.has(e.id))return;if(a&&!a.has(String(e.id)))return;const i=e.orders,r={};i.forEach((e=>{const s=e.trip_number||1;r[s]||(r[s]=[]),r[s].push(e)})),Object.entries(r).forEach((a=>{let[i,r]=a;const l=ze?r.filter((e=>(e.pickupcustomer||e.kitchen_key||"Unknown").toLowerCase().trim()===ze.id)):r;if(0===l.length)return;const d=[...r].sort(((e,s)=>(e.step||0)-(s.step||0))),o=ie(d),u=ne(e.id,i,o),m=ks[u],p=[...l].sort(((e,s)=>(e.step||0)-(s.step||0))),h=Array.isArray(m)&&m.length>=2,x=!1===m;if(!h&&!x)return;const v=h?m:ie(p);if(!v||v.length<2)return;const j=t?1:.1,g="kitchens"===M||ze?7:6,f=Vs&&Ea&&e.id===Ea.id,N=x?"8 6":f&&"combined"===Bs?"6 5":void 0;if(Vs&&Ea&&e.id===Ea.id){const a=new Map(Ha.map((e=>[String(e.deliveryid),e.sequenceStep]))),t=p.filter(I),n=t.map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)]));let r;if(h)r=se(v,n);else{const e=v.length>n.length;r=[];for(let s=0;s=v.length||t>=v.length?r.push([]):r.push([v[a],v[t]])}}const l="combined"===Bs?5:0;return s.push((0,C.jsx)(c.R,{positions:v,pathOptions:{color:"#ffffff",weight:g+4,opacity:.5*j,lineJoin:"round",lineCap:"round",offset:l}},"".concat(e.id,"-").concat(i,"-halo"))),void r.forEach(((n,r)=>{if(!n||n.length<2)return;const d=t[r],o=d?a.get(String(d.deliveryid)):null,u="combined"===Bs?E:o?(0,w.gM)(o-1):e.color,m=null!=ra&&ra===o,p=m?g+1.5:g,h=m?1:ra?.5*j:j;s.push((0,C.jsx)(c.R,{positions:n,pathOptions:{color:u,weight:p,opacity:h,lineJoin:"round",lineCap:"round",dashArray:N,offset:l}},"".concat(e.id,"-").concat(i,"-step-").concat(r,"-").concat((null===d||void 0===d?void 0:d.deliveryid)||r)))}))}s.push((0,C.jsxs)(n.Fragment,{children:[(0,C.jsx)(c.R,{positions:v,pathOptions:{color:"#ffffff",weight:g+4,opacity:.5*j,lineJoin:"round",lineCap:"round"}}),(0,C.jsx)(c.R,{positions:v,pathOptions:{color:e.color,weight:g,opacity:j,lineJoin:"round",lineCap:"round",dashArray:N}})]},"".concat(e.id,"-").concat(i)))}))})),s})(),ua.filter((e=>Ca.some((s=>String(s.id)===String(e.id))))).filter((e=>!Ea||String(Ea.id)===String(e.id))).map((e=>{var s;const a="active"===e.status?"#16a34a":"#dc2626",t=Ca.find((s=>String(s.id)===String(e.id))),i=null===t||void 0===t||null===(s=t.orders)||void 0===s?void 0:s.slice().sort(((e,s)=>{const a=e.trip_number||1,t=s.trip_number||1;return a!==t?a-t:(e.step||0)-(s.step||0)})).find((e=>{const s=String(e.orderstatus||"").toLowerCase();return!w.Ys.has(s)&&!w.yP.has(s)})),n=i?i.deliverysuburb||q(i.deliveryaddress):null,r=x().divIcon({className:"",iconSize:[140,56],iconAnchor:[12,41],popupAnchor:[58,-40],html:'
\n
\n
').concat((e.username||"").replace(/[<>&"']/g,"")).concat(e.orderid?" #".concat(String(e.orderid).replace(/[<>&"']/g,""),""):"","
\n
")});return(0,C.jsx)(l.p,{position:[e.lat,e.lon],icon:r,zIndexOffset:2500,eventHandlers:{click:s=>{const a=String(e.id);Te.current.has(a)?(Te.current.delete(a),s.target.closePopup()):(Te.current.add(a),s.target.openPopup());const t=Ca.find((e=>String(e.id)===a));t&&Da(t)},popupclose:()=>{Te.current.delete(String(e.id))}},children:(0,C.jsxs)(m.z,{maxWidth:260,autoPan:!0,autoPanPadding:[20,20],className:"dispatch-popup live-rider-popup",children:[(0,C.jsx)("div",{className:"pu-hdr-live",children:(0,C.jsxs)("div",{className:"pu-hdr-left",children:[(0,C.jsx)("span",{className:"pu-live-indicator",style:{"--pulse-color":a},children:(0,C.jsx)("span",{className:"pu-live-dot"})}),(0,C.jsx)("span",{className:"pu-hdr-title",children:"LIVE GPS"})]})}),(0,C.jsxs)("div",{className:"pu-rider-profile",children:[(0,C.jsx)("div",{className:"pu-avatar",style:{backgroundColor:"".concat(a,"12"),color:a},children:(0,C.jsx)(S.bsz,{})}),(0,C.jsxs)("div",{className:"pu-rider-info-text",children:[(0,C.jsxs)("div",{className:"pu-rider-name-row",children:[(0,C.jsx)("span",{className:"pu-rider-name",children:e.username||"Rider #".concat(e.id)}),e.status&&(0,C.jsx)("span",{className:"pu-status-badge ".concat("active"===e.status.toLowerCase()?"active":"idle"),children:e.status})]}),(0,C.jsxs)("div",{className:"pu-rider-meta",children:["Rider ID: #",e.id]})]})]}),(0,C.jsxs)("div",{className:"pu-body-content",children:[e.orderid&&(0,C.jsxs)("div",{className:"pu-info-row",children:[(0,C.jsx)("span",{className:"pu-info-label",children:"Active Order"}),(0,C.jsxs)("span",{className:"pu-info-value pu-order-badge",children:["#",e.orderid]})]}),i&&(0,C.jsxs)("div",{className:"pu-info-row",children:[(0,C.jsx)("span",{className:"pu-info-label",children:"Next Stop"}),(0,C.jsxs)("span",{className:"pu-info-value",style:{color:"#4f46e5"},children:["#",i.step||"?"," \xb7 ",i.deliverycustomer||"\u2014"]})]}),n&&(0,C.jsxs)("div",{className:"pu-info-row",children:[(0,C.jsx)("span",{className:"pu-info-label",children:"Next Location"}),(0,C.jsx)("span",{className:"pu-info-value",title:i.deliveryaddress||n,children:n})]}),(null===i||void 0===i?void 0:i.pickupcustomer)&&(0,C.jsxs)("div",{className:"pu-info-row",children:[(0,C.jsx)("span",{className:"pu-info-label",children:"Pickup"}),(0,C.jsx)("span",{className:"pu-info-value",title:i.pickupcustomer,children:i.pickupcustomer})]}),e.contactno&&(0,C.jsxs)("div",{className:"pu-info-row",children:[(0,C.jsx)("span",{className:"pu-info-label",children:"Phone"}),(0,C.jsx)("a",{href:"tel:".concat(e.contactno),className:"pu-info-value pu-phone-link",children:e.contactno})]}),e.logdate&&(0,C.jsxs)("div",{className:"pu-info-row",children:[(0,C.jsx)("span",{className:"pu-info-label",children:"Last Seen"}),(0,C.jsxs)("span",{className:"pu-info-value pu-time-stamp",children:[(0,C.jsx)(S.VP9,{className:"inline-icon"})," ",g()(e.logdate).isValid()?g()(e.logdate).format("hh:mm:ss A"):e.logdate]})]}),(0,C.jsxs)("div",{className:"pu-info-row",children:[(0,C.jsx)("span",{className:"pu-info-label",children:"Position"}),(0,C.jsxs)("span",{className:"pu-info-value pu-coordinates",children:[e.lat.toFixed(5),", ",e.lon.toFixed(5)]})]})]})]})},"live-".concat(e.id))})),Vs&&Ea&&"planned"!==Bs&&Ha.map(((e,s)=>{var a,t;if(0===e.coords.length)return null;const i=(0,w.gM)(s),r="combined"===Bs?D:i,d=[e.coords[0].lat,e.coords[0].lng],o=[e.coords[e.coords.length-1].lat,e.coords[e.coords.length-1].lng],m=ws[e.deliveryid],p=Array.isArray(m)&&m.length>=2?m:e.coords.map((e=>[e.lat,e.lng]));let h=p,v=!0;if(Cs){const s=Es[e.sequenceStep]||0;s<2?v=!1:h=p.slice(0,Math.min(s,p.length))}const j=ra===e.sequenceStep,f=String(e.orderstatus||"").toLowerCase(),N=w.Ys.has(f),b=w.yP.has(f),y=Ya.find((s=>s.sequenceStep===e.sequenceStep)),k=!(null===y||void 0===y||!y.anomaly),_=null===Ea||void 0===Ea||null===(a=Ea.orders)||void 0===a?void 0:a.find((s=>null!=s.deliveryid&&String(s.deliveryid)===String(e.deliveryid))),F=(0,w.Cx)(e.orderstatus),M=(e.orderstatus&&'\n \n \n ').concat(N?'':"","\n "),["compare-step-pin"]);j&&M.push("is-focused"),N&&M.push("is-delivered"),b&&M.push("is-skipped"),k&&M.push("is-anomaly");const z='
')+''.concat(e.sequenceStep,"")+(N?'':"")+"
",A=x().divIcon({className:"",iconSize:[36,36],iconAnchor:[18,18],popupAnchor:[0,-22],html:z}),P=1===e.sequenceStep,E=P?x().divIcon({className:"",iconSize:[40,40],iconAnchor:[20,20],html:'
')+'
'}):null,L="combined"===Bs?-5:0;return(0,C.jsxs)(n.Fragment,{children:[v&&(0,C.jsx)(c.R,{positions:h,pathOptions:{color:"#ffffff",weight:j?11:9,opacity:j?.75:.55,lineJoin:"round",lineCap:"round",offset:L}}),v&&(0,C.jsx)(c.R,{positions:h,pathOptions:{color:r,weight:j?6.5:5,opacity:j?1:ra?.55:.95,lineJoin:"round",lineCap:"round",offset:L}}),P&&(0,C.jsx)(l.p,{position:d,icon:E,zIndexOffset:j?900:100,eventHandlers:{click:s=>{s.originalEvent&&s.originalEvent.stopPropagation(),la((s=>s===e.sequenceStep?null:e.sequenceStep))}},children:(0,C.jsx)(u.m,{direction:"top",offset:[0,-12],opacity:1,className:"compare-tooltip",children:(0,C.jsxs)("div",{className:"cmp-tip",children:[(0,C.jsxs)("div",{className:"cmp-tip-header",children:[(0,C.jsx)("span",{className:"cmp-tip-step",style:{background:i},children:(0,C.jsx)(S.zPd,{})}),(0,C.jsxs)("div",{className:"cmp-tip-title-stack",children:[(0,C.jsx)("div",{className:"cmp-tip-title",children:e.pickupcustomer||"Pickup"}),(0,C.jsx)("div",{className:"cmp-tip-sub",children:null!==(t=e.coords[0])&&void 0!==t&&t.logdate?"Picked up \xb7 ".concat(g()(e.coords[0].logdate).format("hh:mm A")):"Rider trip origin"})]})]}),(0,C.jsx)("div",{className:"cmp-tip-action",children:"Click for step 1 details"})]})})}),(0,C.jsx)(l.p,{position:o,icon:A,zIndexOffset:j?1e3:200,eventHandlers:_?{click:s=>{s.originalEvent&&s.originalEvent.stopPropagation(),la((s=>s===e.sequenceStep?null:e.sequenceStep)),He.current&&(clearTimeout(He.current),He.current=null);const a=String(_.orderid);Re.current.has(a)?(Re.current.delete(a),Ve(null)):(Re.current.add(a),Ve(_))}}:{click:s=>{s.originalEvent&&s.originalEvent.stopPropagation(),la((s=>s===e.sequenceStep?null:e.sequenceStep)),_&&s.target&&"function"===typeof s.target.openPopup&&s.target.openPopup()}},children:!_&&(0,C.jsx)(u.m,{direction:"top",offset:[0,-20],opacity:1,className:"compare-tooltip",children:(()=>{const s=(0,w.Cx)(e.orderstatus);return(0,C.jsxs)("div",{className:"cmp-tip",children:[(0,C.jsxs)("div",{className:"cmp-tip-header",children:[(0,C.jsx)("span",{className:"cmp-tip-step",style:{background:i},children:e.sequenceStep}),(0,C.jsxs)("div",{className:"cmp-tip-title-stack",children:[(0,C.jsx)("div",{className:"cmp-tip-title",children:e.deliverycustomer||"Step ".concat(e.sequenceStep)}),(0,C.jsx)("div",{className:"cmp-tip-sub",children:e.deliverytime?"Delivered ".concat(g()(e.deliverytime).format("hh:mm A")):"".concat(e.coords.length," GPS pings")})]}),e.orderstatus&&(0,C.jsx)("span",{className:"cmp-tip-tag",style:{background:s.bg,color:s.fg},children:s.label})]}),k&&(0,C.jsx)("div",{className:"cmp-tip-anomaly",children:"Deviation flagged \u2014 see details below"}),(0,C.jsx)("div",{className:"cmp-tip-action",children:j?"Click to deselect":"Click for details"})]})})()})})]},"actual-".concat(e.deliveryid))}))]}),Vs&&Ea&&(0,C.jsxs)("div",{className:"compare-view-switcher",role:"group","aria-label":"Compare view layer",children:[(0,C.jsx)("button",{type:"button",className:"actual"===Bs?"is-active":"",onClick:()=>Us("actual"),title:"Show only the rider's actual GPS trail",children:"Actual"}),(0,C.jsx)("button",{type:"button",className:"planned"===Bs?"is-active":"",onClick:()=>Us("planned"),title:"Show only the dispatched planned route",children:"Planned"}),(0,C.jsx)("button",{type:"button",className:"combined"===Bs?"is-active":"",onClick:()=>Us("combined"),title:"Overlay planned (dashed) and actual (solid) on one map",children:"Combined"})]}),(0,C.jsx)("div",{id:"ov-tl"}),(0,C.jsxs)("div",{id:"ov-br",children:[(0,C.jsxs)("button",{className:"sbt ".concat(Cs?"active":""),onClick:()=>{if(Cs)return zs(!1),Ps([]),void Ds({});zs(!0),Ps([]),Ds({});const e=Vs&&Ea,s=e?new Map(Ha.map((e=>[String(e.deliveryid),e.sequenceStep]))):null,a=[];if(Ca.forEach((t=>{if(!we.has(t.id))return;if(Ea&&Ea.id!==t.id)return;if(ze&&!ze.riders.has(t.id))return;const i={};t.orders.forEach((e=>{const s=e.trip_number||1;i[s]||(i[s]=[]),i[s].push(e)})),Object.entries(i).forEach((i=>{let[n,r]=i;const l=ze?r.filter((e=>(e.pickupcustomer||e.kitchen_key||"Unknown").toLowerCase().trim()===ze.id)):r;if(0===l.length)return;const c=[...r].sort(((e,s)=>(e.step||0)-(s.step||0))),d=ie(c),o=ne(t.id,n,d),u=ks[o],m=[...l].sort(((e,s)=>(e.step||0)-(s.step||0))),p=ie(m),h="kitchens"===M||ze,x=u||p;if(x.length<2)return;let v=()=>t.color;if(e&&t.id===Ea.id){const e=m.filter(I).map((e=>[parseFloat(e.droplat||e.deliverylat),parseFloat(e.droplon||e.deliverylong)])),a=u?se(u,e):(()=>{const s=p.length>e.length,a=[];for(let t=0;t=p.length||i>=p.length?a.push([]):a.push([p[e],p[i]])}return a})(),i=[];let n=0;a.forEach(((e,s)=>{const a=Math.max(0,((null===e||void 0===e?void 0:e.length)||0)-1);for(let t=0;t{const a=i[e];if(null==a)return t.color;const n=m.filter(I)[a],r=n?s.get(String(n.deliveryid)):null;return r?(0,w.gM)(r-1):t.color}}for(let e=0;ee.delay-s.delay)),a.forEach(((e,s)=>{setTimeout((()=>{Ps((s=>[...s,e])),s===a.length-1&&setTimeout((()=>{zs(!1),Ds({})}),1e3)}),e.delay)})),e&&Ha.length>0){const e=[...Ha],s=e.map((e=>{const s=ws[e.deliveryid];return Array.isArray(s)&&s.length>=2?s:e.coords.map((e=>[e.lat,e.lng]))})),t=a.length>0?a[a.length-1].delay:800*e.length,i=Math.max(t,600*e.length),n=i/Math.max(1,e.length),r=Date.now(),l=()=>{if(!Ls.current)return;const a=Date.now()-r,t={};e.forEach(((e,i)=>{const r=s[i];if(!r||r.length<2)return;const l=i*n;if(a>=l+n)t[e.sequenceStep]=r.length;else if(a>=l){const s=(a-l)/n;t[e.sequenceStep]=Math.max(2,Math.ceil(s*r.length))}})),Ds(t),a{if(Vs)Ks(!1);else{if(!Ea){const e=Ca.find((e=>(e.orders||[]).some((e=>null!=e.deliveryid&&""!==e.deliveryid&&0!==e.deliveryid)))),s=Ca.find((e=>e.orders&&e.orders.length>0)),a=e||s;if(a&&(Da(a),Ke))return void(Qs.current=!0)}Ks(!0)}},title:Ea?"Compare planned vs. actual route for ".concat(Ea.riderName):"Compare planned vs. actual route (will focus the first rider)",style:{boxShadow:"var(--shadow-lg)",background:Vs?"linear-gradient(135deg, #662582, #9255AB)":"#fff",marginLeft:8,color:Vs?"#fff":void 0},children:[(0,C.jsx)("span",{className:"sbt-icon",children:(0,C.jsx)(S.$G1,{})}),Vs?"Exit Compare":"Compare"]})]})]}),Vs&&Ea&&(0,C.jsx)("div",{id:"compare-map-wrap",children:(()=>{const e=Ha.length,s=Ha.filter((e=>e.coords.length>0)).length,a=Ha.filter((e=>e.isLoading)).length,t=e>0?Math.round(s/e*100):0,i=e>0&&s===e&&0===a,r=null!=ra?Ya.find((e=>e.sequenceStep===ra)):null;return(0,C.jsxs)("div",{className:"compare-header-v2",children:[(0,C.jsxs)("div",{className:"compare-header-row",children:[(0,C.jsxs)("div",{className:"compare-title",children:[(0,C.jsx)("span",{className:"compare-title-dot",style:{background:Ea.color}}),(0,C.jsx)("span",{className:"compare-title-name",children:Ea.riderName}),(0,C.jsx)("span",{className:"compare-title-badge",children:"ACTUAL vs PLANNED"})]}),(0,C.jsxs)("div",{className:"compare-header-tools",children:[null!=ra&&(0,C.jsxs)("button",{type:"button",className:"compare-overall-btn",onClick:()=>la(null),title:"Zoom out to the whole day",children:[(0,C.jsx)(S.Zs6,{})," Overall"]}),(0,C.jsx)("button",{type:"button",className:"compare-timeline-toggle".concat(Js?" is-open":""),onClick:()=>$s((e=>!e)),title:Js?"Hide planned/actual timeline":"Show planned/actual timeline","aria-expanded":Js,children:(0,C.jsx)(S.j1Q,{})})]})]}),Js&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("div",{className:"compare-timeline-wrap",children:[(0,C.jsxs)("div",{className:"compare-timeline-container",children:[(0,C.jsxs)("div",{className:"compare-timeline-labels",children:[(0,C.jsx)("div",{className:"compare-timeline-label",children:"Planned"}),(0,C.jsx)("div",{className:"compare-timeline-label",children:"Actual"})]}),(0,C.jsxs)("div",{className:"compare-timeline-scrollable",children:[(0,C.jsx)("div",{className:"compare-timeline-track is-planned",children:Ka.map(((e,s)=>{var a;const t=String(e.orderstatus||"").toLowerCase(),i=w.Ys.has(t),r=w.yP.has(t),l=ra===e.sequenceStep,c=e.isLoading&&0===e.coordsCount,d=!e.isLoading&&0===e.coordsCount,o=(null===(a=e.order)||void 0===a?void 0:a.step)||e.sequenceStep,u=(0,w.gM)(o-1),m=["compare-step",l&&"is-focused",i&&"is-delivered",r&&"is-skipped",!i&&!r&&"is-pending",c&&"is-loading",d&&"is-no-data",e.anomaly&&"is-anomaly"].filter(Boolean).join(" ");return(0,C.jsxs)(n.Fragment,{children:[s>0&&(0,C.jsx)("span",{className:"compare-step-spacer"}),(0,C.jsxs)("button",{type:"button",className:m,style:{"--step-color":u},onClick:()=>la((s=>s===e.sequenceStep?null:e.sequenceStep)),title:"Planned Step ".concat(o)+(e.deliverycustomer?" \xb7 ".concat(e.deliverycustomer):"")+(e.expectedTs?" \xb7 ".concat(e.expectedTs.format("hh:mm A")):"")+(e.anomaly?" \xb7 deviation flagged":""),children:[(0,C.jsx)("span",{className:"compare-step-circle",children:c?(0,C.jsx)("span",{className:"compare-step-spin"}):o}),e.expectedTs&&(0,C.jsx)("span",{className:"compare-step-tick",children:e.expectedTs.format("HH:mm")})]})]},"step-p-".concat(e.deliveryid))}))}),(0,C.jsx)("div",{className:"compare-timeline-track is-actual",children:Ba.map(((e,s)=>{var a;const t=String(e.orderstatus||"").toLowerCase(),i=w.Ys.has(t),r=w.yP.has(t),l=ra===e.sequenceStep,c=e.isLoading&&0===e.coordsCount,d=!e.isLoading&&0===e.coordsCount,o=(null===(a=e.order)||void 0===a?void 0:a.step)||e.sequenceStep,u=(0,w.gM)(o-1),m=["compare-step",l&&"is-focused",i&&"is-delivered",r&&"is-skipped",!i&&!r&&"is-pending",c&&"is-loading",d&&"is-no-data",e.anomaly&&"is-anomaly"].filter(Boolean).join(" ");return(0,C.jsxs)(n.Fragment,{children:[s>0&&(0,C.jsx)("span",{className:"compare-step-spacer"}),(0,C.jsxs)("button",{type:"button",className:m,style:{"--step-color":u},onClick:()=>la((s=>s===e.sequenceStep?null:e.sequenceStep)),title:"Actual Visit ".concat(s+1," (Planned Step ").concat(o,")")+(e.deliverycustomer?" \xb7 ".concat(e.deliverycustomer):"")+(e.actualTs?" \xb7 ".concat(e.actualTs.format("hh:mm A")):"")+(e.anomaly?" \xb7 deviation flagged":""),children:[(0,C.jsx)("span",{className:"compare-step-circle",children:c?(0,C.jsx)("span",{className:"compare-step-spin"}):o}),e.actualTs&&(0,C.jsx)("span",{className:"compare-step-tick",children:e.actualTs.format("HH:mm")}),e.anomaly&&(0,C.jsx)("span",{className:"compare-step-flag",title:"Deviation flagged"})]})]},"step-a-".concat(e.deliveryid))}))})]})]}),(0,C.jsxs)("div",{className:"compare-progress-strip",children:[(0,C.jsx)("div",{className:"compare-progress-bar-wrap",children:(0,C.jsx)("div",{className:"compare-progress-bar-fill".concat(i?" is-done":""),style:{width:"".concat(t,"%")}})}),(0,C.jsx)("span",{className:"compare-progress-text",children:a>0?"Loading GPS\u2026 ".concat(s,"/").concat(e):"".concat(s,"/").concat(e," tracks")})]})]}),(()=>{const e="combined"===Bs,s=r?(0,w.gM)(r.sequenceStep-1):"linear-gradient(90deg, ".concat(w.Z3.slice(0,6).join(", "),")"),a=e?E:s,t=e?D:s;return(0,C.jsxs)("div",{className:"compare-legend",children:[(0,C.jsxs)("span",{className:"compare-legend-item",children:[(0,C.jsx)("span",{className:"compare-legend-swatch is-step-color is-dashed",style:{background:a}}),"Planned (dashed)"]}),(0,C.jsxs)("span",{className:"compare-legend-item",children:[(0,C.jsx)("span",{className:"compare-legend-swatch is-step-color",style:{background:t}}),"Actual GPS (solid)"]}),(0,C.jsx)("span",{className:"compare-legend-note",children:"Kalman-smoothed GPS \xb7 OSRM road-snapped"})]})})()]})]})})()}),Vs&&Ea&&(0,C.jsx)(z,{focusedRider:Ea,compareDeltas:Ya,compareSummary:Va,actualOrdered:Ba,focusedCompareStep:ra,setFocusedCompareStep:la,sequenceOpen:Gs,setSequenceOpen:Ws,expandedSeqGroups:Zs,setExpandedSeqGroups:Xs,onClose:()=>Ks(!1)})]}),Ye&&(0,C.jsx)("div",{className:"dispatch-popup-center",role:"dialog","aria-label":"Order ".concat(Ye.orderid," details"),onMouseEnter:()=>{He.current&&(clearTimeout(He.current),He.current=null)},onMouseLeave:()=>{(e=>{if(!e)return!1;if(Re.current.has(String(e.orderid)))return!0;if(Vs&&Ea&&null!=e.deliveryid){const s=Ha.find((s=>String(s.deliveryid)===String(e.deliveryid)));if(s&&ra===s.sequenceStep)return!0}return!1})(Ye)||(He.current&&clearTimeout(He.current),He.current=setTimeout((()=>{Ve(null),He.current=null}),200))},children:(0,C.jsxs)("div",{className:"dispatch-popup-card dispatch-popup",children:[(0,C.jsx)("button",{type:"button",className:"dispatch-popup-center-close","aria-label":"Close order details",onClick:()=>{Re.current.delete(String(Ye.orderid)),Ve(null)},children:"\xd7"}),(e=>{const s=(0,w.Cx)(e.orderstatus),a=e.rider_id||e.userid,t=w.Ys.has(String(e.orderstatus||"").toLowerCase()),i=t?null:Xa(a,e);return(0,C.jsxs)("div",{style:{height:"100%",width:"100%"},children:[(0,C.jsxs)("div",{className:"pu-header",children:[(0,C.jsxs)("div",{className:"pu-header-top",children:[(0,C.jsxs)("div",{className:"pu-id",children:["ORDER #",e.orderid]}),e.orderstatus&&(0,C.jsx)("span",{className:"pu-status-chip",style:{background:s.bg,color:s.fg},children:s.label})]}),(0,C.jsxs)("div",{className:"pu-rider",children:[(0,C.jsx)(S.aVM,{})," ",(0,C.jsx)("span",{children:e.rider_name||e.ridername||"Unassigned"})]}),(e.deliverycustomer||e.customername)&&(0,C.jsxs)("div",{className:"pu-customer",title:e.deliverycustomer||e.customername,children:[(0,C.jsx)(S.u9F,{}),(0,C.jsx)("span",{children:e.deliverycustomer||e.customername})]}),null!=e.deliveryid&&(0,C.jsxs)("div",{className:"pu-delivery-id",children:["Delivery #",e.deliveryid]})]}),(0,C.jsxs)("div",{className:"pu-body",children:[te.some((s=>e[s.key]))&&(0,C.jsxs)("div",{className:"pu-section",children:[(0,C.jsx)("div",{className:"pu-section-label",children:"Timeline"}),(0,C.jsx)("div",{className:"pu-timeline",children:te.map((s=>{const a=ae(e[s.key]);return a?(0,C.jsxs)("div",{className:"pu-tl-row ".concat(s.final?"delivered":""),children:[(0,C.jsx)("span",{className:"pu-tl-dot"}),(0,C.jsx)("span",{className:"pu-tl-label",children:s.label}),(0,C.jsx)("span",{className:"pu-tl-time",children:a})]},s.key):null}))})]}),(0,C.jsxs)("div",{className:"pu-section",children:[(0,C.jsx)("div",{className:"pu-section-label",children:"Details"}),(0,C.jsxs)("div",{className:"pu-details-grid",children:[(e.pickupcustomer||e.locationname||e.pickuplocation)&&(0,C.jsxs)("div",{className:"pu-detail",children:[(0,C.jsx)("div",{className:"pu-detail-icon",children:(0,C.jsx)(S.NtI,{})}),(0,C.jsxs)("div",{className:"pu-detail-body",children:[(0,C.jsx)("div",{className:"pu-detail-label",children:"Pickup"}),(0,C.jsx)("div",{className:"pu-detail-value",title:e.pickupcustomer||e.locationname||e.pickuplocation,children:e.pickupcustomer||e.locationname||e.pickuplocation})]})]}),(e.deliverysuburb||e.deliveryaddress)&&(0,C.jsxs)("div",{className:"pu-detail",children:[(0,C.jsx)("div",{className:"pu-detail-icon",children:(0,C.jsx)(S.JFD,{})}),(0,C.jsxs)("div",{className:"pu-detail-body",children:[(0,C.jsx)("div",{className:"pu-detail-label",children:"Drop"}),(0,C.jsx)("div",{className:"pu-detail-value",title:e.deliveryaddress||e.deliverysuburb,children:e.deliverysuburb||q(e.deliveryaddress)})]})]}),e.zone_name&&(0,C.jsxs)("div",{className:"pu-detail",children:[(0,C.jsx)("div",{className:"pu-detail-icon",children:(0,C.jsx)(S.Cd7,{})}),(0,C.jsxs)("div",{className:"pu-detail-body",children:[(0,C.jsx)("div",{className:"pu-detail-label",children:"Zone"}),(0,C.jsx)("div",{className:"pu-detail-value",title:e.zone_name,children:e.zone_name})]})]}),(e.rider_id||e.userid)&&(0,C.jsxs)("div",{className:"pu-detail",children:[(0,C.jsx)("div",{className:"pu-detail-icon",children:(0,C.jsx)(S.aVM,{})}),(0,C.jsxs)("div",{className:"pu-detail-body",children:[(0,C.jsx)("div",{className:"pu-detail-label",children:"Rider ID"}),(0,C.jsxs)("div",{className:"pu-detail-value",children:["#",e.rider_id||e.userid]})]})]})]}),(null!=e.kms||null!=e.actualkms||!t&&null!=e.riderkms||null!==i)&&(0,C.jsxs)("div",{className:"pu-distance-row",children:[null!=e.kms&&""!==e.kms&&(0,C.jsxs)("div",{className:"pu-distance-chip",children:[(0,C.jsx)("span",{className:"pu-distance-icon",children:(0,C.jsx)(S.xI$,{})}),(0,C.jsx)("span",{className:"pu-distance-label",children:"Planned"}),(0,C.jsxs)("span",{className:"pu-distance-value",children:[e.kms," km"]})]}),null!=e.actualkms&&""!==e.actualkms&&(0,C.jsxs)("div",{className:"pu-distance-chip",children:[(0,C.jsx)("span",{className:"pu-distance-icon",children:(0,C.jsx)(S.xI$,{})}),(0,C.jsx)("span",{className:"pu-distance-label",children:"Actual"}),(0,C.jsxs)("span",{className:"pu-distance-value",children:[e.actualkms," km"]})]}),!t&&null!=e.riderkms&&""!==e.riderkms&&(0,C.jsxs)("div",{className:"pu-distance-chip",children:[(0,C.jsx)("span",{className:"pu-distance-icon",children:(0,C.jsx)(S.bsz,{})}),(0,C.jsx)("span",{className:"pu-distance-label",children:"Rider"}),(0,C.jsxs)("span",{className:"pu-distance-value",children:[parseFloat(e.riderkms).toFixed(2)," km"]})]}),null!==i&&(0,C.jsxs)("div",{className:"pu-distance-chip pu-est-meters",title:"Estimated distance to drop location",children:[(0,C.jsx)("span",{className:"pu-distance-icon",children:(0,C.jsx)(S.HPi,{})}),(0,C.jsx)("span",{className:"pu-distance-label",children:"Est. to Drop"}),(0,C.jsx)("span",{className:"pu-distance-value",children:Qa(i)})]})]})]})]})]})})(Ye)]})})]}),!a&&"analysis"===J&&(0,C.jsxs)("div",{id:"dispatch-analysis",children:[(0,C.jsx)("div",{className:"da-picker-row",children:oe.map((e=>{var s;const a=he[e.key],t=ve===e.key,i=!1===(null===a||void 0===a||null===(s=a.data)||void 0===s?void 0:s.success),n=i?"#fee2e2":a?"".concat(e.color,"22"):"#f1f5f9",r=i?"#dc2626":a?e.color:"#64748b",l=t?"Loading\u2026":i?"! Failed":a?"\u2713 ".concat(a.fetchedAt):"Fetch",c=ge===e.key;return(0,C.jsxs)("button",{type:"button",className:"da-picker ".concat(a?"has-data":""," ").concat(t?"is-loading":""," ").concat(c?"is-active":""),onClick:()=>!t&&ke(e.key),style:{borderColor:c?e.color:i?"#fecaca":a?e.border:"#e2e8f0",background:i?"#fef2f2":a?e.bg:"#ffffff",boxShadow:c?"0 0 0 2px ".concat(e.color,"33"):void 0},disabled:t,children:[(0,C.jsxs)("div",{className:"da-picker-head",children:[(0,C.jsx)("div",{className:"da-picker-badge",style:{background:"".concat(e.color,"22"),color:e.color},children:e.label[0]}),(0,C.jsxs)("div",{className:"da-picker-meta",children:[(0,C.jsx)("div",{className:"da-picker-name",children:e.label}),(0,C.jsx)("div",{className:"da-picker-range",children:e.timeRange})]}),(0,C.jsx)("span",{className:"da-picker-status",style:{background:n,color:r},children:l})]}),(0,C.jsx)("div",{className:"da-picker-sub",children:e.sub})]},e.key)}))}),((e,s,a)=>{if(!ge)return(0,C.jsx)("div",{className:"da-empty",children:"Pick a batch above to view its efficiency analysis."});const t=oe.find((e=>e.key===ge)),n=he[ge],r=ve===ge;if(r&&!n)return(0,C.jsxs)("div",{className:"da-empty",children:["Loading ",t.label," batch\u2026"]});if(!n)return null;const l=n.data||{};var c,d;if(!1===l.success)return(0,C.jsxs)("div",{className:"da-result-card da-result-card-error",style:{borderColor:"#fecaca",borderTopColor:"#ef4444"},children:[(0,C.jsxs)("div",{className:"da-result-head",children:[(0,C.jsxs)("div",{children:[(0,C.jsxs)("div",{className:"da-result-title",children:[t.label," Batch"]}),(0,C.jsxs)("div",{className:"da-result-sub",children:[t.timeRange," \xb7 Fetched at ",n.fetchedAt]})]}),(0,C.jsx)("button",{type:"button",className:"da-result-refresh",title:"Retry",onClick:()=>ke(ge),disabled:r,style:{background:"#fee2e2",color:"#dc2626"},children:(0,C.jsx)(S.joZ,{})})]}),(0,C.jsxs)("div",{className:"da-error",children:[(0,C.jsxs)("div",{className:"da-error-title",children:[(0,C.jsx)(S.ItP,{}),(0,C.jsx)("span",{children:(null===l||void 0===l||null===(c=l.error)||void 0===c?void 0:c.code)||"Request failed"})]}),(0,C.jsx)("div",{className:"da-error-msg",children:(null===l||void 0===l||null===(d=l.error)||void 0===d?void 0:d.message)||"The server returned an error."}),(null===l||void 0===l?void 0:l.request_id)&&(0,C.jsxs)("div",{className:"da-error-meta",children:["request_id: ",l.request_id]})]})]});const o=l.fleet_summary||{},u=Array.isArray(l.rider_timelines)?l.rider_timelines:[],m=Array.isArray(l.substitution_opportunities)?l.substitution_opportunities:[],p=l.top_recommendation,h=!(!p||!p.idle_rider_name&&!p.idle_rider_id),x=!!(p&&p.action&&"none"!==p.action&&h),v=l.window||{},j=(e,s)=>{const a=String(null!==e&&void 0!==e?e:"").trim();if(!a)return s||"\u2014";const t="string"===typeof s&&/^Rider\s+\d+$/i.test(s.trim()),i=Array.isArray(Ca)?Ca.find((e=>String(e.id)===a)):null;if(i&&i.riderName)return i.riderName;const n=Array.isArray(Sa)?Sa.find((e=>String(e.id)===a)):null;return n&&n.riderName?n.riderName:!t&&s?s:"Rider ".concat(a)},g=me(o.fleet_start),f=me(o.fleet_done),N=null!=g&&null!=f&&f>g?f-g:null,b=parseFloat(o.avg_utilisation_pct),y=Number.isFinite(b)?b:null,k=null==y?"unknown":y>=85?"good":y>=70?"ok":"low",_="good"===k?"#10b981":"ok"===k?"#f59e0b":"low"===k?"#ef4444":"#94a3b8",w=(e=>{let{assessment:s,spreadMin:a,stdev:t}=e;const i=String(s||"").toLowerCase();return/high imbalance|severe|critical/.test(i)||/imbalance|recommend/.test(i)||null!=a&&a>30||null!=t&&t>1?"warn":/balanced|excellent|good/.test(i)?"success":"info"})({assessment:null===p||void 0===p?void 0:p.fleet_balance_assessment,spreadMin:parseFloat(o.finish_time_spread_minutes),stdev:parseFloat(o.load_balance_stdev)}),F=u.map((e=>{const s=me(e.started_at),a=me(e.finished_at);let t=0,n=100;null!=g&&N&&(null!=s&&(t=Math.max(0,Math.min(100,(s-g)/N*100))),null!=a&&(n=Math.max(0,Math.min(100,(a-g)/N*100))));const r=Math.max(0,n-t),l=parseFloat(e.active_minutes),c=parseFloat(e.idle_minutes),d=(Number.isFinite(l)?l:0)+(Number.isFinite(c)?c:0),o=d>0?l/d*100:y,u=null==o?"unknown":o>=85?"good":o>=70?"ok":"low",m="good"===u?"#10b981":"ok"===u?"#f59e0b":"low"===u?"#ef4444":"#94a3b8",p=j(e.userid,e.name);return(0,i.A)((0,i.A)({},e),{},{displayName:p,_startPct:t,_endPct:n,_activePct:r,_riderUtilPct:o,_riderColor:m})}));return F.sort(((e,s)=>(me(s.finished_at)||0)-(me(e.finished_at)||0))),(0,C.jsxs)("div",{className:"da-detail",children:[(0,C.jsxs)("div",{className:"da-detail-head",style:{borderTopColor:t.color,background:t.bg},children:[(0,C.jsxs)("div",{children:[(0,C.jsxs)("div",{className:"da-detail-title",children:[t.label," Batch",(0,C.jsxs)("span",{className:"da-detail-sub-inline",children:[l.date?" \xb7 ".concat(l.date):"",v.from&&v.to?" \xb7 ".concat(v.from," \u2013 ").concat(v.to):""]})]}),(0,C.jsxs)("div",{className:"da-detail-sub",children:["Fetched at ",n.fetchedAt," \xb7 Input deliveries: ",null!==(e=l.input_delivery_count)&&void 0!==e?e:"\u2014"]})]}),(0,C.jsxs)("div",{className:"da-detail-actions",children:[(0,C.jsxs)("span",{className:"da-live-tag ".concat(r?"is-active":""),title:"Auto-refreshing every ".concat(Math.round(15),"s"),children:[(0,C.jsx)("span",{className:"da-live-dot"}),"Live \xb7 ",Math.round(15),"s"]}),(0,C.jsx)("button",{type:"button",className:"da-result-refresh",title:"Refresh now",onClick:()=>{xe((e=>{const s=(0,i.A)({},e);return delete s[ge],s})),ye.mutate({batch:ge,tenantId:916})},disabled:r,style:{background:"".concat(t.color,"22"),color:t.color},children:(0,C.jsx)(S.joZ,{})})]})]}),(0,C.jsx)("div",{className:"da-section",children:(0,C.jsxs)("div",{className:"da-hero-row",children:[(0,C.jsxs)("div",{className:"da-hero-card",children:[(0,C.jsx)("div",{className:"da-hero-icon",style:{background:"#6625821f",color:"#662582"},children:(0,C.jsx)(S.aEx,{})}),(0,C.jsx)("div",{className:"da-hero-value",children:ue(o.total_orders)}),(0,C.jsx)("div",{className:"da-hero-label",children:"Total Orders"}),null!=l.input_delivery_count&&l.input_delivery_count!==o.total_orders&&(0,C.jsxs)("div",{className:"da-hero-sub",children:[l.input_delivery_count," input"]})]}),(0,C.jsxs)("div",{className:"da-hero-card",children:[(0,C.jsx)("div",{className:"da-hero-icon",style:{background:"#0ea5e91f",color:"#0ea5e9"},children:(0,C.jsx)(S.GQB,{})}),(0,C.jsx)("div",{className:"da-hero-value",children:ue(o.total_riders)}),(0,C.jsx)("div",{className:"da-hero-label",children:"Active Riders"}),null!=o.orders_per_rider_avg&&(0,C.jsxs)("div",{className:"da-hero-sub",children:[o.orders_per_rider_avg," avg orders / rider"]})]}),(0,C.jsxs)("div",{className:"da-hero-card",children:[(0,C.jsx)("div",{className:"da-hero-icon",style:{background:"#8b5cf61f",color:"#8b5cf6"},children:(0,C.jsx)(S.XT0,{})}),(0,C.jsxs)("div",{className:"da-hero-value",children:[null!=o.total_duration_minutes?"".concat(o.total_duration_minutes):"\u2014",null!=o.total_duration_minutes&&(0,C.jsx)("span",{className:"da-hero-unit",children:" min"})]}),(0,C.jsx)("div",{className:"da-hero-label",children:"Fleet Window"}),o.fleet_start&&o.fleet_done&&(0,C.jsxs)("div",{className:"da-hero-sub",children:[o.fleet_start," \u2192 ",o.fleet_done]})]})]})}),(0,C.jsxs)("div",{className:"da-section",children:[(0,C.jsx)("div",{className:"da-section-label",children:"Fleet Health"}),(0,C.jsxs)("div",{className:"da-health-row",children:[(0,C.jsxs)("div",{className:"da-health-card",children:[(0,C.jsx)("div",{className:"da-ring",style:{"--ring-color":_,"--ring-pct":null!=y?Math.max(0,Math.min(100,y)):0},children:(0,C.jsxs)("span",{className:"da-ring-num",children:[null!=y?"".concat(y.toFixed(0)):"\u2014",null!=y&&(0,C.jsx)("span",{className:"da-ring-unit",children:"%"})]})}),(0,C.jsxs)("div",{className:"da-health-meta",children:[(0,C.jsx)("div",{className:"da-health-label",children:"Avg Utilisation"}),(0,C.jsx)("div",{className:"da-health-sub",style:{color:_},children:"good"===k?"Strong":"ok"===k?"Moderate":"low"===k?"Low":"\u2014"})]})]}),(0,C.jsxs)("div",{className:"da-health-card da-health-card-stat",children:[(0,C.jsx)("div",{className:"da-health-value",children:null!=o.load_balance_stdev?parseFloat(o.load_balance_stdev).toFixed(2):"\u2014"}),(0,C.jsx)("div",{className:"da-health-label",children:"Load Balance \u03c3"}),(0,C.jsx)("div",{className:"da-health-sub",children:null!=o.load_balance_stdev?parseFloat(o.load_balance_stdev)>1?"Uneven workload":"Workload balanced":"Stdev of orders / rider"})]}),(0,C.jsxs)("div",{className:"da-health-card da-health-card-stat",children:[(0,C.jsxs)("div",{className:"da-health-value",children:[null!=o.finish_time_spread_minutes?"".concat(o.finish_time_spread_minutes):"\u2014",null!=o.finish_time_spread_minutes&&(0,C.jsx)("span",{className:"da-health-unit",children:" min"})]}),(0,C.jsx)("div",{className:"da-health-label",children:"Finish Spread"}),(0,C.jsx)("div",{className:"da-health-sub",children:null!=o.finish_time_stdev_minutes?"\u03c3 ".concat(parseFloat(o.finish_time_stdev_minutes).toFixed(1)," min"):"First \u2192 last finish"})]}),(0,C.jsxs)("div",{className:"da-health-card da-health-card-stat",children:[(0,C.jsxs)("div",{className:"da-health-value",children:[null!=o.avg_active_minutes?"".concat(parseFloat(o.avg_active_minutes).toFixed(0)):"\u2014",null!=o.avg_active_minutes&&(0,C.jsx)("span",{className:"da-health-unit",children:" min"})]}),(0,C.jsx)("div",{className:"da-health-label",children:"Avg Active"}),(0,C.jsx)("div",{className:"da-health-sub",children:"Per rider, this batch"})]})]})]}),(0,C.jsxs)("div",{className:"da-section",children:[(0,C.jsx)("div",{className:"da-section-label",children:"Top Recommendation"}),x?(0,C.jsxs)("div",{className:"da-rec-banner is-action",children:[(0,C.jsx)("div",{className:"da-rec-banner-icon",children:(0,C.jsx)(S.DX0,{})}),(0,C.jsxs)("div",{className:"da-rec-banner-body",children:[(0,C.jsxs)("div",{className:"da-rec-head",children:[(0,C.jsx)("div",{className:"da-rec-action",children:(0,C.jsx)("span",{children:(p.action||"recommendation").replaceAll("_"," ")})}),null!=p.fleet_improvement_minutes&&(0,C.jsxs)("span",{className:"da-rec-improve",style:p.fleet_improvement_minutes>0?{background:"#dcfce7",color:"#166534"}:{background:"#f1f5f9",color:"#475569"},children:[p.fleet_improvement_minutes>0?"\u2191":"\u2022"," Fleet improves by ",p.fleet_improvement_minutes," min"]})]}),(0,C.jsxs)("div",{className:"da-rec-line",children:[(0,C.jsx)("strong",{children:j(p.idle_rider_id,p.idle_rider_name)}),p.primary_kitchen&&(0,C.jsxs)(C.Fragment,{children:[" \xb7 primary kitchen ",(0,C.jsx)("strong",{children:p.primary_kitchen})]}),p.second_kitchen&&(0,C.jsxs)(C.Fragment,{children:[" \u2192 also serve ",(0,C.jsx)("strong",{children:p.second_kitchen})," after ",p.second_kitchen_dispatch_after||"\u2014"]})]}),p.description&&(0,C.jsx)("div",{className:"da-rec-desc",children:p.description}),(null===p||void 0===p?void 0:p.fleet_balance_assessment)&&(0,C.jsx)("div",{className:"da-rec-assess",children:p.fleet_balance_assessment}),(null===(s=p.activate_when)||void 0===s||null===(a=s.rules)||void 0===a?void 0:a.length)>0&&(0,C.jsxs)("div",{className:"da-rec-rules",children:[(0,C.jsxs)("div",{className:"da-rec-rules-head",children:["Activate when (",p.activate_when.condition||"AND","):"]}),p.activate_when.rules.map(((e,s)=>(0,C.jsxs)("div",{className:"da-rec-rule",children:[(0,C.jsxs)("code",{children:[e.field," ",e.operator," ",e.value]}),e.reason&&(0,C.jsxs)("span",{className:"da-rec-rule-why",children:[" \u2014 ",e.reason]})]},s)))]})]})]}):(0,C.jsxs)("div",{className:"da-rec-banner is-".concat(w),children:[(0,C.jsx)("div",{className:"da-rec-banner-icon",children:"warn"===w?(0,C.jsx)(S.Wux,{}):"success"===w?(0,C.jsx)(S.mU9,{}):(0,C.jsx)(S.DX0,{})}),(0,C.jsxs)("div",{className:"da-rec-banner-body",children:[(0,C.jsx)("div",{className:"da-rec-action",children:(0,C.jsx)("span",{children:"warn"===w?"Fleet imbalance detected \u2014 no feasible substitution":"success"===w?"Fleet ran balanced \u2014 no reassignment needed":"No action recommended"})}),(null===p||void 0===p?void 0:p.reason)&&(0,C.jsx)("div",{className:"da-rec-desc",children:p.reason}),(null===p||void 0===p?void 0:p.fleet_balance_assessment)&&(0,C.jsx)("div",{className:"da-rec-assess",children:p.fleet_balance_assessment})]})]})]}),F.length>0&&(0,C.jsxs)("div",{className:"da-section",children:[(0,C.jsxs)("div",{className:"da-section-label",children:["Rider Timelines ",(0,C.jsxs)("span",{className:"da-section-count",children:["(",F.length,")"]}),(0,C.jsx)("span",{className:"da-section-hint",children:"Sorted by latest finish \u2014 bottleneck riders first"})]}),(0,C.jsxs)("div",{className:"da-gantt-axis",children:[(0,C.jsx)("span",{children:o.fleet_start||"\u2014"}),(0,C.jsx)("span",{className:"da-gantt-axis-mid",children:null!=o.total_duration_minutes?"".concat(o.total_duration_minutes," min batch"):"Batch window"}),(0,C.jsx)("span",{children:o.fleet_done||"\u2014"})]}),(0,C.jsx)("div",{className:"da-timeline-list",children:F.map((e=>{var s,a,t;const i="active"===String(e.status||"").toLowerCase(),n=null!==(s=e.completed_orders)&&void 0!==s?s:e.order_count,r=null!==(a=e.pending_orders)&&void 0!==a?a:0,l=null!=n&&e.order_count>0?Math.max(0,Math.min(100,n/e.order_count*100)):0,c=null!=e.idle_minutes&&e.idle_minutes>30,d=null!=e.kitchen_confidence&&e.kitchen_confidence<.7;return(0,C.jsxs)("div",{className:"da-timeline-card",children:[(0,C.jsxs)("div",{className:"da-timeline-top",children:[(0,C.jsxs)("div",{className:"da-timeline-name",children:[(0,C.jsx)(S.aVM,{style:{color:e._riderColor}}),(0,C.jsx)("span",{title:e.name&&e.name!==e.displayName?"API name: ".concat(e.name):void 0,children:e.displayName}),(0,C.jsxs)("span",{className:"da-timeline-id",children:["#",e.userid]})]}),(0,C.jsx)("span",{className:"da-pill ".concat(i?"is-active":"is-idle"),children:e.status})]}),(0,C.jsxs)("div",{className:"da-gantt-row",children:[(0,C.jsxs)("div",{className:"da-gantt-track",title:"".concat(e.started_at," \u2192 ").concat(e.finished_at),children:[(0,C.jsxs)("div",{className:"da-gantt-fill",style:{left:"".concat(e._startPct,"%"),width:"".concat(Math.max(2,e._activePct),"%"),background:e._riderColor},children:[(0,C.jsx)("span",{className:"da-gantt-fill-start",children:e.started_at}),(0,C.jsx)("span",{className:"da-gantt-fill-end",children:e.finished_at})]}),e._endPct<99&&(0,C.jsx)("div",{className:"da-gantt-idle",style:{left:"".concat(e._endPct,"%"),width:"".concat(100-e._endPct,"%")},title:"Idle ".concat(e.idle_minutes," min after finishing")})]}),(0,C.jsx)("span",{className:"da-gantt-util",style:{background:"".concat(e._riderColor,"22"),color:e._riderColor},title:"Per-rider utilisation: ".concat(null!=e._riderUtilPct?e._riderUtilPct.toFixed(0):"\u2014","%"),children:null!=e._riderUtilPct?"".concat(e._riderUtilPct.toFixed(0),"%"):"\u2014"})]}),(0,C.jsxs)("div",{className:"da-timeline-mid",children:[e.kitchen?(0,C.jsxs)("span",{className:"da-chip",title:null!=e.kitchen_confidence?"Kitchen confidence: ".concat((100*e.kitchen_confidence).toFixed(0),"%"):void 0,children:[(0,C.jsx)(S.NtI,{})," ",e.kitchen,null!=e.kitchen_confidence&&(0,C.jsx)("span",{className:"da-conf-dot ".concat(d?"is-low":"is-ok"),"aria-label":"Confidence ".concat((100*e.kitchen_confidence).toFixed(0),"%")})]}):(0,C.jsxs)("span",{className:"da-chip",style:{background:"#f8fafc",color:"#64748b",borderColor:"#e2e8f0",borderStyle:"dashed"},title:"Solver did not identify a primary kitchen for this rider",children:[(0,C.jsx)(S.NtI,{})," Unassigned"]}),(0,C.jsxs)("span",{className:"da-chip da-chip-orders",title:"Completed ".concat(n," of ").concat(e.order_count),children:[(0,C.jsx)(S.gsJ,{}),(0,C.jsxs)("span",{className:"da-orders-label",children:[n,"/",e.order_count]}),(0,C.jsx)("span",{className:"da-orders-bar",children:(0,C.jsx)("span",{className:"da-orders-bar-fill",style:{width:"".concat(l,"%")}})}),r>0&&(0,C.jsxs)("span",{className:"da-orders-pending",children:[r," pending"]})]}),null!=e.pace_orders_per_hour&&(0,C.jsxs)("span",{className:"da-chip",title:"Delivery pace this batch",children:[(0,C.jsx)(S.BJM,{})," ",parseFloat(e.pace_orders_per_hour).toFixed(1)," / hr"]}),null!=e.active_minutes&&(0,C.jsxs)("span",{className:"da-chip",title:"Time actively delivering",children:[(0,C.jsx)(S.pWE,{})," ",parseFloat(e.active_minutes).toFixed(0)," min active"]}),(0,C.jsxs)("span",{className:"da-chip",style:c?{background:"#fef3c7",color:"#92400e",borderColor:"#fde68a"}:void 0,title:"Idle time after this rider finished \u2014 fleet kept running",children:[(0,C.jsx)(S.VP9,{})," ",null!==(t=e.idle_minutes)&&void 0!==t?t:0," min idle"]}),null!=e.free_window_minutes&&(0,C.jsxs)("span",{className:"da-chip",style:e.free_window_minutes>=30?{background:"#ecfdf5",color:"#065f46",borderColor:"#a7f3d0"}:e.free_window_minutes>0?{background:"#fefce8",color:"#854d0e",borderColor:"#fde68a"}:{background:"#fef2f2",color:"#991b1b",borderColor:"#fecaca"},title:"Free window before the next batch \u2014 capacity available for a follow-up run",children:[(0,C.jsx)(S.pWE,{})," ",parseFloat(e.free_window_minutes).toFixed(0)," min free"]})]})]},e.userid)}))})]}),m.length>0&&(0,C.jsxs)("div",{className:"da-section",children:[(0,C.jsxs)("div",{className:"da-section-label",children:["Substitution Opportunities ",(0,C.jsxs)("span",{className:"da-section-count",children:["(",m.length,")"]})]}),(0,C.jsx)("div",{className:"da-sub-list",children:m.map(((e,s)=>{var a;const t=e.idle_rider||{},i=e.most_relieved_rider||{},n=null!==(a=e.fleet_improvement_minutes)&&void 0!==a?a:0;return(0,C.jsxs)("div",{className:"da-sub-card",children:[(0,C.jsxs)("div",{className:"da-sub-head",children:[(0,C.jsxs)("div",{className:"da-sub-title",children:[(0,C.jsx)("strong",{children:j(t.userid,t.name)})," ","covers ",(0,C.jsx)("strong",{children:e.target_kitchen})]}),(0,C.jsxs)("span",{className:"da-sub-improve",style:n>0?{background:"#dcfce7",color:"#166534"}:{background:"#f1f5f9",color:"#475569"},children:["Fleet ",n>0?"\u2191":"\u2022"," ",n," min"]})]}),(0,C.jsxs)("div",{className:"da-sub-meta",children:[(0,C.jsxs)("span",{className:"da-chip",children:[(0,C.jsx)(S.xI$,{})," ",e.travel_to_kitchen_km," km"]}),(0,C.jsxs)("span",{className:"da-chip",children:[(0,C.jsx)(S.pWE,{})," ",e.travel_to_kitchen_minutes," min travel"]}),(0,C.jsxs)("span",{className:"da-chip",children:[(0,C.jsx)(S.VP9,{})," arrives ",e.arrive_at_kitchen]}),(0,C.jsxs)("span",{className:"da-chip",children:[(0,C.jsx)(S.gsJ,{})," ",e.total_orders_transferred," orders"]}),(0,C.jsxs)("span",{className:"da-chip",children:[(0,C.jsx)(S.xI$,{})," +",e.extra_km_for_idle_rider," km for idle rider"]})]}),(i.name||null!=i.userid)&&(0,C.jsxs)("div",{className:"da-sub-relieved",children:[(0,C.jsx)(S.imn,{}),"Most relieved: ",(0,C.jsx)("strong",{children:j(i.userid,i.name)})," ","(",i.original_finish," \u2192 ",i.new_finish,", saves"," ",i.time_saved_minutes," min)"]}),Array.isArray(e.orders_to_transfer)&&e.orders_to_transfer.length>0&&(0,C.jsxs)("div",{className:"da-sub-transfers",children:[(0,C.jsx)("div",{className:"da-sub-transfers-head",children:"Orders transferred"}),e.orders_to_transfer.map((e=>{var s;const a=null!==(s=e.improvement_minutes)&&void 0!==s?s:0;return(0,C.jsxs)("div",{className:"da-transfer-row",children:[(0,C.jsxs)("span",{className:"da-transfer-id",children:["#",e.deliveryid]}),(0,C.jsxs)("span",{className:"da-transfer-from",children:["from ",j(e.from_rider_id||e.from_userid,e.from_rider_name)]}),(0,C.jsxs)("span",{className:"da-transfer-time",children:[e.original_delivery_time," \u2192 ",e.estimated_delivery_time]}),(0,C.jsxs)("span",{className:"da-transfer-imp",style:a>0?{background:"#dcfce7",color:"#166534"}:a<0?{background:"#fee2e2",color:"#991b1b"}:{background:"#f1f5f9",color:"#475569"},children:[a>0?"+":"",a," min"]})]},e.deliveryid)}))]})]},s)}))})]})]})})()]}),Ne&&(0,C.jsx)("div",{className:"da-pos-modal-backdrop",role:"dialog","aria-modal":"true","aria-label":"Last known position of ".concat(Ne.name),onClick:e=>{e.target===e.currentTarget&&be(null)},children:(0,C.jsxs)("div",{className:"da-pos-modal-card",children:[(0,C.jsxs)("div",{className:"da-pos-modal-head",children:[(0,C.jsxs)("div",{className:"da-pos-modal-title-wrap",children:[(0,C.jsx)("div",{className:"da-pos-modal-avatar",style:{background:"".concat(Ne.color||"#662582","22"),color:Ne.color||"#662582"},children:(0,C.jsx)(S.aVM,{})}),(0,C.jsxs)("div",{children:[(0,C.jsx)("div",{className:"da-pos-modal-title",children:Ne.name}),(0,C.jsxs)("div",{className:"da-pos-modal-sub",children:["#",Ne.userid,Ne.kitchen&&(0,C.jsxs)(C.Fragment,{children:[" \xb7 ",Ne.kitchen]}),Ne.finished_at&&(0,C.jsxs)(C.Fragment,{children:[" \xb7 finished ",Ne.finished_at]})]})]})]}),(0,C.jsxs)("div",{className:"da-pos-modal-actions",children:[(0,C.jsx)("span",{className:"da-pill ".concat("active"===String(Ne.status||"").toLowerCase()?"is-active":"is-idle"),children:Ne.status||"\u2014"}),(0,C.jsx)("button",{type:"button",className:"da-pos-modal-close","aria-label":"Close",onClick:()=>be(null),children:(0,C.jsx)(S.m6K,{})})]})]}),(0,C.jsx)("div",{className:"da-pos-modal-map",children:(0,C.jsxs)(d.W,{center:[Ne.lat,Ne.lon],zoom:13,scrollWheelZoom:!0,style:{width:"100%",height:"100%"},whenReady:e=>{const s=e.target;requestAnimationFrame((()=>s.invalidateSize())),setTimeout((()=>s.invalidateSize()),260)},children:[(0,C.jsx)(o.e,{attribution:'\xa9 OpenStreetMap',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),(0,C.jsx)(l.p,{position:[Ne.lat,Ne.lon],children:(0,C.jsxs)(m.z,{children:[(0,C.jsx)("strong",{children:Ne.name}),(0,C.jsx)("br",{}),Ne.lat.toFixed(6),", ",Ne.lon.toFixed(6)]})})]},"".concat(Ne.userid,"-").concat(Ne.lat,"-").concat(Ne.lon))}),(0,C.jsxs)("div",{className:"da-pos-modal-foot",children:[(0,C.jsxs)("div",{className:"da-pos-modal-coord",children:[(0,C.jsx)(S.gwi,{}),(0,C.jsxs)("span",{children:[(0,C.jsx)("strong",{children:"Lat:"})," ",Ne.lat.toFixed(6),(0,C.jsx)("span",{className:"da-pos-modal-sep",children:"\xb7"}),(0,C.jsx)("strong",{children:"Lon:"})," ",Ne.lon.toFixed(6)]})]}),(0,C.jsx)("button",{type:"button",className:"da-pos-modal-copy",onClick:()=>{var e,s;const a="".concat(Ne.lat.toFixed(6),", ").concat(Ne.lon.toFixed(6));null!==(e=navigator)&&void 0!==e&&null!==(s=e.clipboard)&&void 0!==s&&s.writeText&&navigator.clipboard.writeText(a)},title:"Copy coordinates",children:"Copy"})]})]})})]})}},84702:(e,s,a)=>{a.d(s,{Cx:()=>i,IE:()=>d,Ys:()=>n,Z3:()=>l,gM:()=>c,yP:()=>r});const t={created:{label:"Created",bg:"#3b82f6",fg:"#fff"},pending:{label:"Pending",bg:"#f59e0b",fg:"#fff"},accepted:{label:"Accepted",bg:"#8b5cf6",fg:"#fff"},arrived:{label:"Arrived",bg:"#ea580c",fg:"#fff"},picked:{label:"Picked",bg:"#0ea5e9",fg:"#fff"},active:{label:"Active",bg:"#0ea5e9",fg:"#fff"},delivered:{label:"Delivered",bg:"#22c55e",fg:"#fff"},skipped:{label:"Skipped",bg:"#94a3b8",fg:"#fff"},cancelled:{label:"Cancelled",bg:"#ef4444",fg:"#fff"}},i=e=>t[String(e||"").toLowerCase()]||{label:e||"Unknown",bg:"#64748b",fg:"#fff"},n=new Set(["delivered"]),r=new Set(["cancelled","skipped"]),l=["#2563eb","#dc2626","#16a34a","#ea580c","#9333ea","#0891b2","#ca8a04","#db2777","#0f766e","#7c3aed","#65a30d","#0284c7","#b91c1c","#15803d","#a16207","#86198f"],c=e=>l[(e%l.length+l.length)%l.length],d=e=>{if(null==e)return"";const s=["th","st","nd","rd"],a=e%100;return e+(s[(a-20)%10]||s[a]||s[0])}}}]); \ No newline at end of file diff --git a/build/static/js/6849.2250b254.chunk.js b/build/static/js/6849.2250b254.chunk.js new file mode 100644 index 0000000..2c00e11 --- /dev/null +++ b/build/static/js/6849.2250b254.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6849],{23787:(e,t,n)=>{n.d(t,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var o=n(89379),r=n(80045),i=n(93230),l=n(2235),a=n(16491),s=n(82053),c=n(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:n=!1,onScroll:l,sx:a}=e,s=(0,r.A)(e,d);return(0,c.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:l,sx:(0,o.A)((0,o.A)({p:1.5},n&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),a)},s),{},{children:t}))},h=e=>{let{accent:t="#662582",header:n,footer:r,selected:i=!1,onClick:s,children:d,sx:x}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:s,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(a.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(a.A,{sx:{p:1.5,pl:2},children:[n,d,r]})]})},u=e=>{let{children:t,columns:n=2,sx:r}=e;return(0,c.jsx)(a.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(n,", minmax(0, 1fr))"),gap:1,mt:1.25},r),children:t})},p=e=>{let{label:t,value:n,children:o,full:r=!1,align:i="left"}=e;return(0,c.jsxs)(a.A,{sx:{gridColumn:r?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(s.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(a.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(s.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==n&&void 0!==n?n:"\u2014"})})]})}},27001:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(93230),r=n(16491),i=n(82053),l=n(44414);function a(e){let{title:t,subtitle:n,live:a=!1,action:s}=e;return(0,l.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,l.jsxs)(r.A,{sx:{minWidth:0},children:[(0,l.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),n&&(0,l.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[a&&(0,l.jsx)(r.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,l.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:n})]})]}),s&&(0,l.jsx)(r.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:s})]})}},35678:(e,t,n)=>{n.d(t,{A:()=>v});var o=n(9950),r=n(96583),i=n(40033),l=n(82053),a=n(28170),s=n(93230),c=n(82223),d=n(55916),x=n(4159),h=n.n(x),u=n(56712),p=n(81417),m=n(96600),j=n(53132),g=n(94289),b=n(57326),f=n(50624),A=n(44414);const v=e=>{let{open:t,onClose:n,onSelect:x}=e;const[v,w]=(0,o.useState)(null);return(0,A.jsxs)(r.A,{open:t,onClose:n,children:[(0,A.jsx)(i.A,{align:"left",children:(0,A.jsx)(l.A,{variant:"h4",children:"Select Filter Options"})}),(0,A.jsx)(a.A,{sx:{width:"100%"},className:"datedialog",children:(0,A.jsx)(d.U,{open:t,toggle:n,id:"daterange1",onChange:e=>{w({startDate:h()(e.startDate).format("YYYY-MM-DD"),endDate:h()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,u.A)(new Date,-1),endDate:(0,u.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,u.A)(new Date,1),endDate:(0,u.A)(new Date,1)},{label:"This Week",startDate:(0,p.A)(new Date),endDate:(0,m.A)(new Date)},{label:"Last Week",startDate:(0,p.A)((0,j.A)(new Date,-1)),endDate:(0,m.A)((0,j.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,j.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,g.A)(new Date),endDate:(0,b.A)(new Date)},{label:"Last Month",startDate:(0,g.A)((0,f.A)(new Date,-1)),endDate:(0,b.A)((0,f.A)(new Date,-1))}]})}),(0,A.jsx)(s.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,A.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{v?(x(v),n()):n()},children:"OK"})})]})}},36803:(e,t,n)=>{n.d(t,{A:()=>x});var o=n(48089),r=n(50704),i=n(93230),l=n(16491),a=n(82053),s=n(82917),c=n(41413),d=n(44414);function x(e){let{title:t,value:n,icon:x,color:h="#662582",caption:u,loading:p=!1}=e;return(0,d.jsx)(o.A,{sx:{height:"100%"},children:(0,d.jsx)(r.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(l.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(a.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),p?(0,d.jsx)(s.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(a.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n}),u&&(0,d.jsx)(a.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},56311:(e,t,n)=>{n.d(t,{A:()=>u});var o=n(89379),r=n(9950),i=n(2660),l=n(2046),a=n(83274),s=n(25333),c=n(97125),d=n(7762),x=n(52097),h=n(44414);const u=e=>{let{value:t,onChange:n,onDebouncedChange:u,debounceTime:p=500,placeholder:m="Search (ctrl+k)",sx:j}=e;const g=(0,r.useRef)(null),[b]=(0,x.d7)(t,p);return(0,r.useEffect)((()=>{u&&u(b)}),[b,u]),(0,r.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=g.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===g.current&&g.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(i.A,{sx:(0,o.A)({},j),inputRef:g,placeholder:m,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>n(e.target.value),startAdornment:(0,h.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(a.A,{title:"Clear",children:(0,h.jsx)(s.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>n(""),children:(0,h.jsx)(d.A,{})})})})}},56849:(e,t,n)=>{n.r(t),n.d(t,{default:()=>oe});var o=n(89379),r=n(9950),i=n(26910),l=n(36150),a=n(2235),s=n(41413),c=n(83274),d=n(16491),x=n(82053),h=n(14857),u=n(47223),p=n(60899),m=n(93230),j=n(77922),g=n(29925),b=n(25333),f=n(33738),A=n(1320),v=n(15769),w=n(69780),S=n(9213),y=n(21671),C=n(34075),k=n(74745),z=n(25277),D=n(31222),W=n(4159),I=n.n(W),M=n(81425),Y=n(52351),P=n(35678),N=n(59212),T=n(27001),R=n(36803),F=n(56311),O=n(23787),L=n(96646),K=n(20466),B=n(44414),H=n(36220);I().extend(H);const E={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},Z=(e,t)=>"".concat(e).concat(t),U=e=>Z(e,"08"),X=e=>Z(e,"18"),q=e=>Z(e,"26"),$=e=>Z(e,"55"),V="#662582",G="#9255AB",J=e=>(0,B.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:E.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),_=e=>{let{color:t,selected:n,size:o=24,children:r}=e;return(0,B.jsx)(s.A,{sx:{width:o,height:o,bgcolor:n?t:X(t),color:n?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:r})},Q=e=>{let{color:t,icon:n,label:o,tooltip:r,minWidth:i=80}=e;return(0,B.jsx)(c.A,{title:r||"",placement:"top",children:(0,B.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat($(t)),color:t,fontSize:11,fontWeight:800,minWidth:i,justifyContent:"center",whiteSpace:"nowrap"},children:[n,o]})})},ee=e=>{let{value:t,color:n="#ef4444",icon:o}=e;const r=Number(t)||0;return 0===r?(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textMuted,fontWeight:700},children:"0"}):(0,B.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.875,py:.25,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat($(n)),color:n,fontSize:12,fontWeight:800,minWidth:36,justifyContent:"center"},children:[o,r]})},te=e=>({"& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,"& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(q(e))},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5}}});function ne(e){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(Number(e)||0)}function oe(){const e=(0,h.A)(),t=(0,u.A)(e.breakpoints.down("md")),n=(0,r.useRef)(null),W=(0,r.useRef)(null),[H,Z]=(0,r.useState)(0),[oe,re]=(0,r.useState)(I()().format("YYYY-MM-DD")),[ie,le]=(0,r.useState)(I()().format("YYYY-MM-DD")),[ae,se]=(0,r.useState)("All"),[ce,de]=(0,r.useState)(!1),[xe,he]=(0,r.useState)(null),[ue,pe]=(0,r.useState)("Today"),[me,je]=(0,r.useState)([]),[ge,be]=(0,r.useState)(!1),[fe,Ae]=(0,r.useState)(0),[ve,we]=(0,r.useState)(0),[Se,ye]=(0,r.useState)(null),[Ce,ke]=(0,r.useState)(null),[ze,De]=(0,r.useState)(""),[We,Ie]=(0,r.useState)(""),[,Me]=(0,r.useState)(0);(0,r.useEffect)((()=>{we(0),ye(null),Ae(0),ke(null),he(null)}),[H]),(0,r.useEffect)((()=>{Ae(0),ke(null),he(null)}),[ve]);const{data:Ye,isLoading:Pe,isError:Ne,error:Te}=(0,l.I)({queryKey:[H,ve,fe,oe,ie],queryFn:ve?M.U6:M.DK}),{data:Re}=(0,l.I)({queryKey:["tenantlist",H],queryFn:()=>(0,M.Mn)(H),enabled:0!==H}),{data:Fe}=(0,l.I)({queryKey:["gettenantlocations",ve],queryFn:()=>(0,M.DL)(ve),enabled:0!==ve}),Oe=(0,r.useMemo)((()=>Array.isArray(Ye)?Ye:[]),[Ye]),Le=(0,r.useMemo)((()=>{if(!We)return Oe;const e=We.toLowerCase().trim();return Oe.filter((t=>[t.tenantname,t.locationname,String(t.tenantid||""),String(t.locationid||"")].filter(Boolean).some((t=>String(t).toLowerCase().includes(e)))))}),[Oe,We]),Ke=(0,r.useMemo)((()=>Le.reduce(((e,t)=>(e.totalOrders+=Number(t.totalorders)||0,e.orderPend+=Number(t.Orderspending)||0,e.orderComplete+=Number(t.orderscompleted)||0,e.orderCancel+=Number(t.orderscancelled)||0,e.deliPend+=Number(t.deliveriespending)||0,e.deliComplete+=Number(t.deliveriescompleted)||0,e.deliCancel+=Number(t.deliveriescancelled)||0,e.collection+=Number(t.collectionamt)||0,e.kms+=Number(t.kms)||0,e.cumulativekms+=Number(t.cumulativekms)||0,e.amount+=Math.max(Number(t.charges)||0,Number(t.deliveryamt)||0),e)),{totalOrders:0,orderPend:0,orderComplete:0,orderCancel:0,deliPend:0,deliComplete:0,deliCancel:0,collection:0,kms:0,cumulativekms:0,amount:0})),[Le]),Be=async e=>{be(!0);try{var t;const n=await i.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getuserreportsummary/?tenantid=").concat(e,"&fromdate=").concat(oe,"&todate=").concat(ie));je(Array.isArray(null===(t=n.data)||void 0===t?void 0:t.details)?n.data.details:[])}catch(n){(0,K.k)((null===n||void 0===n?void 0:n.message)||"Failed to load rider breakdown","error",2e3),je([])}finally{be(!1)}},He=async e=>{be(!0);try{var t;const n=await i.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getriderlocationsummary/?tenantid=").concat(ve,"&locationid=").concat(e,"&fromdate=").concat(oe,"&todate=").concat(ie));je(Array.isArray(null===(t=n.data)||void 0===t?void 0:t.details)?n.data.details:[])}catch(n){(0,K.k)((null===n||void 0===n?void 0:n.message)||"Failed to load rider breakdown","error",2e3),je([])}finally{be(!1)}};Ne&&console.warn("ordersSummary error:",null===Te||void 0===Te?void 0:Te.message);const Ee=[{key:"orders",label:"Total Orders",color:V,icon:D.HU2,value:Ke.totalOrders},{key:"pending",label:"Orders Pending",color:"#f59e0b",icon:D.G6c,value:Ke.orderPend},{key:"completed",label:"Orders Completed",color:"#10b981",icon:D.cAP,value:Ke.orderComplete},{key:"amount",label:"Total Amount",color:"#0ea5e9",icon:D.S75,value:ne(Ke.amount)}],Ze=Boolean(ve);return(0,B.jsxs)(B.Fragment,{children:[(ge||Pe)&&(0,B.jsx)(Y.A,{}),(0,B.jsx)(T.A,{title:"Orders Summary",subtitle:"Live \xb7 ".concat(ae||"All Zones"," \xb7 ").concat(ue),live:!0,action:(0,B.jsx)(N.A,{ref:n,locaName:ae,setAppId:Z,setLocoName:se,setPage:Me,pill:!0,accentColor:V,icon:(0,B.jsx)(D.HPi,{size:14}),placeholder:"Select Zone",paperComponent:J,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,B.jsx)(p.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:Ee.map((e=>{var t;const n=e.icon;return(0,B.jsx)(p.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,B.jsx)(R.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,B.jsx)(n,{size:20}),color:e.color,loading:Pe})},e.key)}))}),(0,B.jsx)(a.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:E.radiusCard/8,borderTopRightRadius:E.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:E.borderSubtle,borderBottom:0,background:"#fff"},children:(0,B.jsxs)(m.A,{direction:{xs:"column",md:"row"},alignItems:{xs:"stretch",md:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1.25,flexWrap:"wrap",children:[(0,B.jsx)(c.A,{title:"Date Filter",placement:"top",children:(0,B.jsxs)(d.A,{onClick:()=>de(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:U("#f59e0b"),border:"1.5px solid ".concat($("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(q("#f59e0b"))}},children:[(0,B.jsx)(D.Ki0,{size:14}),"Orders \xb7 ",ue," \xb7 ",I()(oe).format("DD/MM/YY")," \u2013 ",I()(ie).format("DD/MM/YY")]})}),(0,B.jsx)(j.A,{options:Re||[],value:Se,getOptionLabel:e=>(null===e||void 0===e?void 0:e.tenantname)||(null===e||void 0===e?void 0:e.label)||"",isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.tenantid)===(null===t||void 0===t?void 0:t.tenantid),PaperComponent:J,sx:(0,o.A)({minWidth:{xs:"100%",sm:220}},te(V)),onOpen:e=>{H||(e.preventDefault(),(0,K.k)("Please select a Zone first!","warning",3e3),setTimeout((()=>{var e;return null===(e=n.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,t,n)=>{"clear"!==n&&t?(we((null===t||void 0===t?void 0:t.tenantid)||0),ye(t),Ae((null===t||void 0===t?void 0:t.locationid)||0),ke(null)):(we(0),ye(null),Ae(0),ke(null))},renderInput:e=>(0,B.jsx)(g.A,(0,o.A)((0,o.A)({},e),{},{inputRef:W,placeholder:"Select Tenant",size:"small",InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:[(0,B.jsx)(_,{color:V,size:24,selected:Boolean(Se),children:(0,B.jsx)(D.nZo,{size:14})}),e.InputProps.startAdornment]})})}))}),(0,B.jsx)(j.A,{options:Fe||[],value:Ce,getOptionLabel:e=>null!==e&&void 0!==e&&e.locationname?"".concat(e.locationname).concat(e.suburb?" (".concat(e.suburb,")"):""):"",isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.locationid)===(null===t||void 0===t?void 0:t.locationid),PaperComponent:J,sx:(0,o.A)({minWidth:{xs:"100%",sm:220}},te("#0ea5e9")),onOpen:e=>{H||ve?ve||(e.preventDefault(),(0,K.k)("Please select a Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=W.current)||void 0===e?void 0:e.focus()}),0)):(e.preventDefault(),(0,K.k)("Please select Zone and Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=n.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,t,n)=>{"clear"!==n&&t?(Ae((null===t||void 0===t?void 0:t.locationid)||0),ke(t)):(Ae(0),ke(null))},renderInput:e=>(0,B.jsx)(g.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Location",size:"small",InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:[(0,B.jsx)(_,{color:"#0ea5e9",size:24,selected:Boolean(Ce),children:(0,B.jsx)(D.gwi,{size:14})}),e.InputProps.startAdornment]})})}))})]}),(0,B.jsx)(d.A,{sx:{width:{xs:"100%",md:280,lg:320},flex:{xs:"1 1 100%",md:"0 0 auto"}},children:(0,B.jsx)(F.A,{value:ze,onChange:De,onDebouncedChange:Ie,placeholder:"Search ".concat(Ze?"locations":"tenants"," (ctrl+k)"),sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(q(V))}}})})]})}),(0,B.jsxs)(a.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:E.radiusCard/8,borderBottomRightRadius:E.radiusCard/8,border:"1px solid",borderColor:E.borderSubtle,overflow:"hidden",background:"#fff"},children:[t?(0,B.jsxs)(B.Fragment,{children:[Pe&&(0,B.jsx)(O.nV,{children:[0,1,2,3].map((e=>(0,B.jsx)(O.pg,{accent:E.borderSubtle,children:(0,B.jsx)(d.A,{sx:{height:96}})},e)))}),!Pe&&0===Le.length&&(0,B.jsxs)(m.A,{alignItems:"center",spacing:1.5,sx:{py:6,px:2},children:[(0,B.jsx)(s.A,{sx:{width:64,height:64,bgcolor:X("#94a3b8"),color:E.textMuted},children:(0,B.jsx)(D.Z2J,{size:28})}),(0,B.jsxs)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:E.textPrimary},children:["No ",Ze?"locations":"tenants"," to show"]}),(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textSecondary,textAlign:"center",maxWidth:360},children:We?"Try a different keyword.":Ne?"Something went wrong fetching the summary. Try a different filter.":"Pick a zone, tenant, or date range to load the summary."})]}),!Pe&&Le.length>0&&(0,B.jsx)(O.nV,{children:Le.map(((e,t)=>{const n=Ze?e.locationname:e.tenantname,o=xe===n,r=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0),i=Ze?"#0ea5e9":V;return(0,B.jsxs)(O.pg,{accent:i,selected:o,header:(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,B.jsx)(_,{color:i,size:36,children:Ze?(0,B.jsx)(D.gwi,{size:18}):(0,B.jsx)(D.nZo,{size:18})}),(0,B.jsxs)(m.A,{sx:{minWidth:0,flex:1},children:[(0,B.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:E.textPrimary},noWrap:!0,children:(Ze?e.locationname:e.tenantname)||"\u2014"}),(0,B.jsxs)(x.A,{variant:"caption",sx:{color:E.textSecondary},children:["ID #",Ze?e.locationid:e.tenantid]})]}),(0,B.jsx)(c.A,{title:o?"Hide rider breakdown":"View rider breakdown",placement:"top",children:(0,B.jsx)(b.A,{size:"small",onClick:()=>{const t=!o;he(t?n:null),t&&(je([]),Ze?He(e.locationid):Be(e.tenantid))},sx:{flexShrink:0,bgcolor:o?V:X(V),color:o?"#fff":V,border:"1px solid ".concat($(V)),"&:hover":{bgcolor:V,color:"#fff"}},children:o?(0,B.jsx)(D.Xbk,{size:16}):(0,B.jsx)(D.j1Q,{size:16})})})]}),children:[(0,B.jsxs)(O.FG,{columns:3,children:[(0,B.jsx)(O.pY,{label:"All",align:"center",children:(0,B.jsx)(ee,{value:e.totalorders,color:V,icon:(0,B.jsx)(D.F6S,{size:11})})}),(0,B.jsx)(O.pY,{label:"Ord Pending",align:"center",children:(0,B.jsx)(ee,{value:e.Orderspending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:11})})}),(0,B.jsx)(O.pY,{label:"Ord Cancelled",align:"center",children:(0,B.jsx)(ee,{value:e.orderscancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:11})})}),(0,B.jsx)(O.pY,{label:"Ord Completed",align:"center",children:(0,B.jsx)(ee,{value:e.orderscompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:11})})}),(0,B.jsx)(O.pY,{label:"Del Pending",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriespending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:11})})}),(0,B.jsx)(O.pY,{label:"Del Cancelled",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:11})})}),(0,B.jsx)(O.pY,{label:"Del Completed",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:11})})}),(0,B.jsx)(O.pY,{label:"Collection",align:"center",children:(0,B.jsx)(Q,{color:"#f59e0b",icon:(0,B.jsx)(D.YHz,{size:11}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection Amount",minWidth:90})}),(0,B.jsx)(O.pY,{label:"Amount",align:"center",children:(0,B.jsx)(Q,{color:V,icon:(0,B.jsx)(D.YHz,{size:11}),label:ne(r).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})}),(0,B.jsx)(O.pY,{label:"KMS",align:"center",children:(0,B.jsx)(Q,{color:"#ef4444",icon:(0,B.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,B.jsx)(O.pY,{label:"Actual KMS",align:"center",children:(0,B.jsx)(Q,{color:"#10b981",icon:(0,B.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})})]}),(0,B.jsx)(f.A,{in:o,timeout:"auto",unmountOnExit:!0,children:(0,B.jsxs)(d.A,{sx:{mt:1.5},children:[(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1},children:[(0,B.jsx)(_,{color:V,size:24,selected:!0,children:(0,B.jsx)(D.Itr,{size:12})}),(0,B.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:E.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:"Rider Breakdown"})]}),ge||me&&0!==me.length?(0,B.jsx)(m.A,{spacing:1,children:me.map(((e,t)=>{const n=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,B.jsxs)(O.pg,{accent:V,children:[(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,B.jsx)(_,{color:V,size:28,children:(0,B.jsx)(D.LTk,{size:14})}),(0,B.jsxs)(m.A,{sx:{minWidth:0},children:[(0,B.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:E.textPrimary},noWrap:!0,children:"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"\u2014"}),(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textSecondary},children:e.ridercontact||"ID #".concat(e.userid)})]})]}),(0,B.jsxs)(O.FG,{columns:3,children:[(0,B.jsx)(O.pY,{label:"Orders",align:"center",children:(0,B.jsx)(ee,{value:e.orderscreated,color:V,icon:(0,B.jsx)(D.F6S,{size:10})})}),(0,B.jsx)(O.pY,{label:"Deliveries",align:"center",children:(0,B.jsx)(ee,{value:e.totalorders,color:"#0ea5e9",icon:(0,B.jsx)(D.F6S,{size:10})})}),(0,B.jsx)(O.pY,{label:"Pending",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriespending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:10})})}),(0,B.jsx)(O.pY,{label:"Cancelled",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:10})})}),(0,B.jsx)(O.pY,{label:"Completed",align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:10})})}),(0,B.jsx)(O.pY,{label:"Collection",align:"center",children:(0,B.jsx)(Q,{color:"#f59e0b",icon:(0,B.jsx)(D.YHz,{size:10}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection",minWidth:80})}),(0,B.jsx)(O.pY,{label:"KMS",align:"center",children:(0,B.jsx)(Q,{color:"#ef4444",icon:(0,B.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,B.jsx)(O.pY,{label:"Actual KMS",align:"center",children:(0,B.jsx)(Q,{color:"#10b981",icon:(0,B.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})}),(0,B.jsx)(O.pY,{label:"Amount",align:"center",children:(0,B.jsx)(Q,{color:V,icon:(0,B.jsx)(D.YHz,{size:10}),label:ne(n).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]})]},"".concat(e.userid,"-").concat(t))}))}):(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textMuted,display:"block",py:1,textAlign:"center"},children:"No rider activity for this row."})]})})]},"".concat(n,"-").concat(t))}))})]}):(0,B.jsx)(A.A,{sx:{maxHeight:{xs:"calc(100vh - 280px)",md:"calc(100vh - 240px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:$(V),borderRadius:8,"&:hover":{backgroundColor:V}},"&::-webkit-scrollbar-track":{backgroundColor:E.surfaceAlt}},children:(0,B.jsxs)(v.A,{stickyHeader:!0,sx:{minWidth:{xs:1080,md:1200}},children:[(0,B.jsxs)(w.A,{children:[(0,B.jsxs)(S.A,{sx:{"& th":{backgroundColor:E.surfaceAlt,color:E.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(E.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:1.5}}},children:[(0,B.jsx)(y.A,{rowSpan:2,children:"#"}),(0,B.jsx)(y.A,{rowSpan:2,children:Ze?"Location":"Tenant"}),(0,B.jsx)(y.A,{align:"center",rowSpan:2,children:"All"}),(0,B.jsx)(y.A,{align:"center",colSpan:3,sx:{bgcolor:"".concat(U("#ef4444")," !important"),color:"#ef4444 !important"},children:"Orders"}),(0,B.jsx)(y.A,{align:"center",colSpan:3,sx:{bgcolor:"".concat(U("#10b981")," !important"),color:"#10b981 !important"},children:"Deliveries"}),(0,B.jsx)(y.A,{align:"center",rowSpan:2,children:"Collection"}),(0,B.jsx)(y.A,{align:"center",rowSpan:2,children:"KMS / Actual"}),(0,B.jsx)(y.A,{align:"center",rowSpan:2,children:"Amount"}),(0,B.jsx)(y.A,{align:"right",rowSpan:2,children:"Action"})]}),(0,B.jsxs)(S.A,{sx:{"& th":{backgroundColor:E.surfaceAlt,color:E.textSecondary,fontSize:{xs:10,md:10.5},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(E.borderSubtle),py:{xs:.75,md:1},px:{xs:1,md:1.5}}},children:[(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#ef4444")," !important"),color:"#f59e0b !important"},children:"Pending"}),(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#ef4444")," !important"),color:"#ef4444 !important"},children:"Cancelled"}),(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#ef4444")," !important"),color:"#10b981 !important"},children:"Completed"}),(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#10b981")," !important"),color:"#f59e0b !important"},children:"Pending"}),(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#10b981")," !important"),color:"#ef4444 !important"},children:"Cancelled"}),(0,B.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(U("#10b981")," !important"),color:"#10b981 !important"},children:"Completed"})]})]}),(0,B.jsxs)(C.A,{children:[Pe&&(0,B.jsx)(L.r,{col:9}),!Pe&&0===Le.length&&(0,B.jsx)(S.A,{children:(0,B.jsx)(y.A,{colSpan:13,sx:{py:6},children:(0,B.jsxs)(m.A,{alignItems:"center",spacing:1.5,children:[(0,B.jsx)(s.A,{sx:{width:64,height:64,bgcolor:X("#94a3b8"),color:E.textMuted},children:(0,B.jsx)(D.Z2J,{size:28})}),(0,B.jsxs)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:E.textPrimary},children:["No ",Ze?"locations":"tenants"," to show"]}),(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textSecondary,textAlign:"center",maxWidth:360},children:We?"Try a different keyword.":Ne?"Something went wrong fetching the summary. Try a different filter.":"Pick a zone, tenant, or date range to load the summary."})]})})}),Le.map(((e,t)=>{const n=Ze?e.locationname:e.tenantname,o=xe===n,i=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,B.jsxs)(r.Fragment,{children:[(0,B.jsxs)(S.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:o?"none":"1px solid ".concat(E.divider),py:{xs:1,md:1.25},px:{xs:1,md:1.5}},"&:hover":{backgroundColor:o?"#fff":E.surfaceAlt},bgcolor:o?U(V):"transparent"},children:[(0,B.jsx)(y.A,{children:(0,B.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:E.textMuted},children:String(t+1).padStart(2,"0")})}),(0,B.jsx)(y.A,{children:(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,B.jsx)(_,{color:Ze?"#0ea5e9":V,size:36,children:Ze?(0,B.jsx)(D.gwi,{size:18}):(0,B.jsx)(D.nZo,{size:18})}),(0,B.jsxs)(m.A,{children:[(0,B.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:E.textPrimary,whiteSpace:"nowrap"},children:(Ze?e.locationname:e.tenantname)||"\u2014"}),(0,B.jsxs)(x.A,{variant:"caption",sx:{color:E.textSecondary},children:["ID #",Ze?e.locationid:e.tenantid]})]})]})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.totalorders,color:V,icon:(0,B.jsx)(D.F6S,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.Orderspending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.orderscancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.orderscompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriespending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:11})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(Q,{color:"#f59e0b",icon:(0,B.jsx)(D.YHz,{size:11}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection Amount",minWidth:90})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsxs)(m.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,B.jsx)(Q,{color:"#ef4444",icon:(0,B.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,B.jsx)(Q,{color:"#10b981",icon:(0,B.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(Q,{color:V,icon:(0,B.jsx)(D.YHz,{size:11}),label:ne(i).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})}),(0,B.jsx)(y.A,{align:"right",children:(0,B.jsx)(c.A,{title:o?"Hide rider breakdown":"View rider breakdown",placement:"top",children:(0,B.jsx)(b.A,{size:"small",onClick:()=>{const t=!o;he(t?n:null),t&&(je([]),Ze?He(e.locationid):Be(e.tenantid))},sx:{bgcolor:o?V:X(V),color:o?"#fff":V,border:"1px solid ".concat($(V)),"&:hover":{bgcolor:V,color:"#fff"}},children:o?(0,B.jsx)(D.Xbk,{size:16}):(0,B.jsx)(D.j1Q,{size:16})})})})]}),o&&(0,B.jsx)(S.A,{children:(0,B.jsx)(y.A,{colSpan:13,sx:{p:0,borderBottom:"1px solid ".concat(E.divider),bgcolor:U(V)},children:(0,B.jsx)(f.A,{in:o,timeout:"auto",unmountOnExit:!0,children:(0,B.jsx)(d.A,{sx:{p:{xs:1,md:2}},children:(0,B.jsxs)(a.A,{elevation:0,sx:{borderRadius:E.radiusCard/8,border:"1px solid",borderColor:E.borderSubtle,overflow:"hidden",boxShadow:E.shadowSoft},children:[(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:2,py:1.25,background:"#ffffff",borderBottom:"1px solid ".concat(E.borderSubtle)},children:[(0,B.jsx)(_,{color:V,size:28,selected:!0,children:(0,B.jsx)(D.Itr,{size:14})}),(0,B.jsxs)(x.A,{variant:"caption",sx:{fontWeight:700,color:E.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:["Rider Breakdown \xb7 ",Ze?e.locationname:e.tenantname]})]}),(0,B.jsxs)(v.A,{size:"small",children:[(0,B.jsx)(w.A,{children:(0,B.jsxs)(S.A,{sx:{"& th":{backgroundColor:E.surfaceAlt,color:E.textSecondary,fontSize:10,fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(E.borderSubtle),py:1,px:1.5}},children:[(0,B.jsx)(y.A,{children:"#"}),(0,B.jsx)(y.A,{children:"Rider"}),(0,B.jsx)(y.A,{align:"center",children:"Orders"}),(0,B.jsx)(y.A,{align:"center",children:"Deliveries"}),(0,B.jsx)(y.A,{align:"center",children:"Pending"}),(0,B.jsx)(y.A,{align:"center",children:"Cancelled"}),(0,B.jsx)(y.A,{align:"center",children:"Completed"}),(0,B.jsx)(y.A,{align:"center",children:"Collection"}),(0,B.jsx)(y.A,{align:"center",children:"KMS / Actual"}),(0,B.jsx)(y.A,{align:"center",children:"Amount"})]})}),(0,B.jsxs)(C.A,{children:[ge&&(0,B.jsx)(L.r,{col:6}),ge||me&&0!==me.length?me.map(((e,t)=>{const n=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,B.jsxs)(S.A,{sx:{"& td":{borderBottom:"1px solid ".concat(E.divider),py:1,px:1.5},"&:hover":{backgroundColor:E.surfaceAlt}},children:[(0,B.jsx)(y.A,{children:(0,B.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:E.textMuted},children:String(t+1).padStart(2,"0")})}),(0,B.jsx)(y.A,{children:(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,B.jsx)(_,{color:V,size:28,children:(0,B.jsx)(D.LTk,{size:14})}),(0,B.jsxs)(m.A,{children:[(0,B.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:E.textPrimary,whiteSpace:"nowrap"},children:"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"\u2014"}),(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textSecondary},children:e.ridercontact||"ID #".concat(e.userid)})]})]})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.orderscreated,color:V,icon:(0,B.jsx)(D.F6S,{size:10})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.totalorders,color:"#0ea5e9",icon:(0,B.jsx)(D.F6S,{size:10})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriespending,color:"#f59e0b",icon:(0,B.jsx)(D.tX0,{size:10})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,B.jsx)(D.uDv,{size:10})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(ee,{value:e.deliveriescompleted,color:"#10b981",icon:(0,B.jsx)(D.mU9,{size:10})})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(Q,{color:"#f59e0b",icon:(0,B.jsx)(D.YHz,{size:10}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection",minWidth:80})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsxs)(m.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,B.jsx)(Q,{color:"#ef4444",icon:(0,B.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,B.jsx)(Q,{color:"#10b981",icon:(0,B.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,B.jsx)(y.A,{align:"center",children:(0,B.jsx)(Q,{color:V,icon:(0,B.jsx)(D.YHz,{size:10}),label:ne(n).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]},"".concat(e.userid,"-").concat(t))})):(0,B.jsx)(S.A,{children:(0,B.jsx)(y.A,{colSpan:10,sx:{py:3},children:(0,B.jsx)(x.A,{variant:"caption",sx:{color:E.textMuted,textAlign:"center",display:"block"},children:"No rider activity for this row."})})})]})]})]})})})})})]},"".concat(n,"-").concat(t))}))]})]})}),Le.length>0&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(k.A,{}),(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1.5,flexWrap:"wrap",sx:{px:2,py:1.5,background:"#ffffff"},children:[(0,B.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:1,flexWrap:"wrap",children:[(0,B.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:E.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:"Grand Total"}),(0,B.jsx)(z.A,{size:"small",label:"".concat(Ke.totalOrders," orders"),sx:{fontWeight:700,bgcolor:X(V),color:V,border:"1px solid ".concat($(V))}}),(0,B.jsx)(z.A,{size:"small",label:"".concat(Ke.deliComplete," delivered"),sx:{fontWeight:700,bgcolor:X("#10b981"),color:"#10b981",border:"1px solid ".concat($("#10b981"))}}),(0,B.jsx)(z.A,{size:"small",label:"".concat(Ke.deliPend," pending"),sx:{fontWeight:700,bgcolor:X("#f59e0b"),color:"#f59e0b",border:"1px solid ".concat($("#f59e0b"))}})]}),(0,B.jsx)(z.A,{label:ne(Ke.amount),sx:{fontWeight:800,fontSize:13,color:"#fff",background:"linear-gradient(135deg, ".concat(V," 0%, ").concat(G," 100%)"),boxShadow:"0 6px 16px ".concat(q(V))}})]})]})]}),(0,B.jsx)(P.A,{open:ce,onClose:()=>de(!1),onSelect:e=>{re(e.startDate),le(e.endDate),pe(e.label)}})]})}},59212:(e,t,n)=>{n.d(t,{A:()=>h});var o=n(89379),r=n(9950),i=n(93230),l=n(41413),a=n(77922),s=n(29925),c=n(26910),d=n(31222),x=n(44414);const h=(0,r.forwardRef)(((e,t)=>{let{setAppId:n,setLocoName:h,setPage:u,sx:p,textfeildSx:m,textfieldSx:j,pill:g=!1,accentColor:b="#6366f1",icon:f,placeholder:A="Select Zone",paperComponent:v}=e;const[w,S]=(0,r.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,r.useEffect)((()=>{0===w.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[w.length]);const y=e=>"".concat(b).concat(e),C=y("26"),k=y("18"),z=g?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(C)},"&.Mui-focused fieldset":{borderColor:b,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},D=g&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(l.A,{sx:{width:24,height:24,bgcolor:k,color:b,transition:"background-color 0.15s, color 0.15s"},children:f||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(a.A,{id:"location-autocomplete",options:w||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:v,sx:(0,o.A)({},p),onChange:(e,t,o)=>{"clear"===o?(null===n||void 0===n||n(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):t&&(null===n||void 0===n||n(t.applocationid),null===h||void 0===h||h(t.locationname),null===u||void 0===u||u(0))},renderInput:e=>g?(0,x.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:A,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:D}),sx:(0,o.A)((0,o.A)({},z),j||m||{})})):(0,x.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},j||m||{})}))})}))},96646:(e,t,n)=>{n.d(t,{r:()=>s});var o=n(9213),r=n(21671),i=n(82917),l=n(93230),a=n(44414);const s=e=>{let{rowsPerPage:t=5,col:n=1}=e;return(0,a.jsx)(a.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,a.jsxs)(o.A,{children:[(0,a.jsx)(r.A,{children:(0,a.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,a.jsx)(r.A,{children:(0,a.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:n}).map(((e,t)=>(0,a.jsx)(r.A,{children:(0,a.jsxs)(l.A,{spacing:.5,children:[(0,a.jsx)(i.A,{variant:"text",width:100}),(0,a.jsx)(i.A,{variant:"text",width:80})]})},t))),(0,a.jsx)(r.A,{children:(0,a.jsx)(i.A,{variant:"text",width:150})}),(0,a.jsx)(r.A,{children:(0,a.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,a.jsx)(r.A,{align:"center",children:(0,a.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,a.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,a.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file diff --git a/build/static/js/6849.9b9d612c.chunk.js b/build/static/js/6849.9b9d612c.chunk.js deleted file mode 100644 index bca5ff2..0000000 --- a/build/static/js/6849.9b9d612c.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6849],{23787:(e,t,o)=>{o.d(t,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var r=o(89379),n=o(80045),i=o(93230),l=o(2235),a=o(16491),s=o(82053),c=o(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:o=!1,onScroll:l,sx:a}=e,s=(0,n.A)(e,d);return(0,c.jsx)(i.A,(0,r.A)((0,r.A)({spacing:1.25,onScroll:l,sx:(0,r.A)((0,r.A)({p:1.5},o&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),a)},s),{},{children:t}))},h=e=>{let{accent:t="#662582",header:o,footer:n,selected:i=!1,onClick:s,children:d,sx:x}=e;return(0,c.jsxs)(l.A,{elevation:0,onClick:s,sx:(0,r.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(a.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(a.A,{sx:{p:1.5,pl:2},children:[o,d,n]})]})},u=e=>{let{children:t,columns:o=2,sx:n}=e;return(0,c.jsx)(a.A,{sx:(0,r.A)({display:"grid",gridTemplateColumns:"repeat(".concat(o,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},p=e=>{let{label:t,value:o,children:r,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(a.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(s.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(a.A,{sx:{mt:.25,minWidth:0},children:void 0!==r?r:(0,c.jsx)(s.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==o&&void 0!==o?o:"\u2014"})})]})}},35678:(e,t,o)=>{o.d(t,{A:()=>v});var r=o(9950),n=o(96583),i=o(40033),l=o(82053),a=o(28170),s=o(93230),c=o(82223),d=o(55916),x=o(4159),h=o.n(x),u=o(56712),p=o(81417),m=o(96600),g=o(53132),j=o(94289),b=o(57326),A=o(50624),f=o(44414);const v=e=>{let{open:t,onClose:o,onSelect:x}=e;const[v,w]=(0,r.useState)(null);return(0,f.jsxs)(n.A,{open:t,onClose:o,children:[(0,f.jsx)(i.A,{align:"left",children:(0,f.jsx)(l.A,{variant:"h4",children:"Select Filter Options"})}),(0,f.jsx)(a.A,{sx:{width:"100%"},className:"datedialog",children:(0,f.jsx)(d.U,{open:t,toggle:o,id:"daterange1",onChange:e=>{w({startDate:h()(e.startDate).format("YYYY-MM-DD"),endDate:h()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,u.A)(new Date,-1),endDate:(0,u.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,u.A)(new Date,1),endDate:(0,u.A)(new Date,1)},{label:"This Week",startDate:(0,p.A)(new Date),endDate:(0,m.A)(new Date)},{label:"Last Week",startDate:(0,p.A)((0,g.A)(new Date,-1)),endDate:(0,m.A)((0,g.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,g.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,j.A)(new Date),endDate:(0,b.A)(new Date)},{label:"Last Month",startDate:(0,j.A)((0,A.A)(new Date,-1)),endDate:(0,b.A)((0,A.A)(new Date,-1))}]})}),(0,f.jsx)(s.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,f.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{v?(x(v),o()):o()},children:"OK"})})]})}},56311:(e,t,o)=>{o.d(t,{A:()=>u});var r=o(89379),n=o(9950),i=o(2660),l=o(2046),a=o(83274),s=o(25333),c=o(97125),d=o(7762),x=o(52097),h=o(44414);const u=e=>{let{value:t,onChange:o,onDebouncedChange:u,debounceTime:p=500,placeholder:m="Search (ctrl+k)",sx:g}=e;const j=(0,n.useRef)(null),[b]=(0,x.d7)(t,p);return(0,n.useEffect)((()=>{u&&u(b)}),[b,u]),(0,n.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=j.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===j.current&&j.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(i.A,{sx:(0,r.A)({},g),inputRef:j,placeholder:m,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>o(e.target.value),startAdornment:(0,h.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(a.A,{title:"Clear",children:(0,h.jsx)(s.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>o(""),children:(0,h.jsx)(d.A,{})})})})}},56849:(e,t,o)=>{o.r(t),o.d(t,{default:()=>te});var r=o(89379),n=o(9950),i=o(26910),l=o(36150),a=o(2235),s=o(41413),c=o(83274),d=o(16491),x=o(82053),h=o(14857),u=o(47223),p=o(93230),m=o(60899),g=o(77922),j=o(29925),b=o(25333),A=o(33738),f=o(1320),v=o(15769),w=o(69780),S=o(9213),y=o(21671),C=o(34075),z=o(74745),k=o(25277),D=o(31222),W=o(4159),I=o.n(W),M=o(81425),Y=o(52351),P=o(35678),N=o(59212),T=o(56311),R=o(23787),F=o(96646),O=o(20466),L=o(44414),K=o(36220);I().extend(K);const B={radiusPill:999,radiusCard:16,shadowSoft:"0 14px 40px rgba(15, 23, 42, 0.10)",shadowMd:"0 8px 24px rgba(15, 23, 42, 0.08)",shadowPop:"0 18px 50px rgba(15, 23, 42, 0.18)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},H=(e,t)=>"".concat(e).concat(t),E=e=>H(e,"08"),Z=e=>H(e,"18"),X=e=>H(e,"26"),U=e=>H(e,"55"),q="#662582",$="#9255AB",V=e=>(0,L.jsx)(a.A,(0,r.A)((0,r.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:B.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),G=e=>{let{color:t,selected:o,size:r=24,children:n}=e;return(0,L.jsx)(s.A,{sx:{width:r,height:r,bgcolor:o?t:Z(t),color:o?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:n})},J=e=>{let{color:t,icon:o,label:r,tooltip:n,minWidth:i=80}=e;return(0,L.jsx)(c.A,{title:n||"",placement:"top",children:(0,L.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:E(t),border:"1px solid ".concat(U(t)),color:t,fontSize:11,fontWeight:800,minWidth:i,justifyContent:"center",whiteSpace:"nowrap"},children:[o,r]})})},_=e=>{let{value:t,color:o="#ef4444",icon:r}=e;const n=Number(t)||0;return 0===n?(0,L.jsx)(x.A,{variant:"caption",sx:{color:B.textMuted,fontWeight:700},children:"0"}):(0,L.jsxs)(d.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.875,py:.25,borderRadius:999,bgcolor:E(o),border:"1px solid ".concat(U(o)),color:o,fontSize:12,fontWeight:800,minWidth:36,justifyContent:"center"},children:[r,n]})},Q=e=>({"& .MuiOutlinedInput-root":{borderRadius:B.radiusPill+"px",bgcolor:E(e),fontWeight:600,"& fieldset":{borderColor:U(e),borderWidth:1.5},"&:hover fieldset":{borderColor:e},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(X(e))},"&.Mui-focused fieldset":{borderColor:e,borderWidth:2}}});function ee(e){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(Number(e)||0)}function te(){const e=(0,h.A)(),t=(0,u.A)(e.breakpoints.down("md")),o=(0,n.useRef)(null),W=(0,n.useRef)(null),[K,H]=(0,n.useState)(0),[te,oe]=(0,n.useState)(I()().format("YYYY-MM-DD")),[re,ne]=(0,n.useState)(I()().format("YYYY-MM-DD")),[ie,le]=(0,n.useState)("All"),[ae,se]=(0,n.useState)(!1),[ce,de]=(0,n.useState)(null),[xe,he]=(0,n.useState)("Today"),[ue,pe]=(0,n.useState)([]),[me,ge]=(0,n.useState)(!1),[je,be]=(0,n.useState)(0),[Ae,fe]=(0,n.useState)(0),[ve,we]=(0,n.useState)(null),[Se,ye]=(0,n.useState)(null),[Ce,ze]=(0,n.useState)(""),[ke,De]=(0,n.useState)(""),[,We]=(0,n.useState)(0);(0,n.useEffect)((()=>{fe(0),we(null),be(0),ye(null),de(null)}),[K]),(0,n.useEffect)((()=>{be(0),ye(null),de(null)}),[Ae]);const{data:Ie,isLoading:Me,isError:Ye,error:Pe}=(0,l.I)({queryKey:[K,Ae,je,te,re],queryFn:Ae?M.U6:M.DK}),{data:Ne}=(0,l.I)({queryKey:["tenantlist",K],queryFn:()=>(0,M.Mn)(K),enabled:0!==K}),{data:Te}=(0,l.I)({queryKey:["gettenantlocations",Ae],queryFn:()=>(0,M.DL)(Ae),enabled:0!==Ae}),Re=(0,n.useMemo)((()=>Array.isArray(Ie)?Ie:[]),[Ie]),Fe=(0,n.useMemo)((()=>{if(!ke)return Re;const e=ke.toLowerCase().trim();return Re.filter((t=>[t.tenantname,t.locationname,String(t.tenantid||""),String(t.locationid||"")].filter(Boolean).some((t=>String(t).toLowerCase().includes(e)))))}),[Re,ke]),Oe=(0,n.useMemo)((()=>Fe.reduce(((e,t)=>(e.totalOrders+=Number(t.totalorders)||0,e.orderPend+=Number(t.Orderspending)||0,e.orderComplete+=Number(t.orderscompleted)||0,e.orderCancel+=Number(t.orderscancelled)||0,e.deliPend+=Number(t.deliveriespending)||0,e.deliComplete+=Number(t.deliveriescompleted)||0,e.deliCancel+=Number(t.deliveriescancelled)||0,e.collection+=Number(t.collectionamt)||0,e.kms+=Number(t.kms)||0,e.cumulativekms+=Number(t.cumulativekms)||0,e.amount+=Math.max(Number(t.charges)||0,Number(t.deliveryamt)||0),e)),{totalOrders:0,orderPend:0,orderComplete:0,orderCancel:0,deliPend:0,deliComplete:0,deliCancel:0,collection:0,kms:0,cumulativekms:0,amount:0})),[Fe]),Le=async e=>{ge(!0);try{var t;const o=await i.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getuserreportsummary/?tenantid=").concat(e,"&fromdate=").concat(te,"&todate=").concat(re));pe(Array.isArray(null===(t=o.data)||void 0===t?void 0:t.details)?o.data.details:[])}catch(o){(0,O.k)((null===o||void 0===o?void 0:o.message)||"Failed to load rider breakdown","error",2e3),pe([])}finally{ge(!1)}},Ke=async e=>{ge(!0);try{var t;const o=await i.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getriderlocationsummary/?tenantid=").concat(Ae,"&locationid=").concat(e,"&fromdate=").concat(te,"&todate=").concat(re));pe(Array.isArray(null===(t=o.data)||void 0===t?void 0:t.details)?o.data.details:[])}catch(o){(0,O.k)((null===o||void 0===o?void 0:o.message)||"Failed to load rider breakdown","error",2e3),pe([])}finally{ge(!1)}};Ye&&console.warn("ordersSummary error:",null===Pe||void 0===Pe?void 0:Pe.message);const Be=[{key:"orders",label:"Total Orders",color:q,icon:D.F6S,value:Oe.totalOrders},{key:"pending",label:"Orders Pending",color:"#f59e0b",icon:D.tX0,value:Oe.orderPend},{key:"completed",label:"Orders Completed",color:"#10b981",icon:D.mU9,value:Oe.orderComplete},{key:"amount",label:"Total Amount",color:"#0ea5e9",icon:D.YHz,value:ee(Oe.amount)}],He=Boolean(Ae);return(0,L.jsxs)(L.Fragment,{children:[(me||Me)&&(0,L.jsx)(Y.A,{}),(0,L.jsx)(a.A,{elevation:0,sx:{mb:{xs:1.5,md:2},p:{xs:1.5,sm:2,md:2.5},borderRadius:B.radiusCard/8,border:"1px solid",borderColor:B.borderSubtle,background:"linear-gradient(135deg, ".concat(E(q)," 0%, ").concat(E($)," 100%)"),boxShadow:B.shadowMd},children:(0,L.jsxs)(p.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",spacing:{xs:1.5,sm:2},children:[(0,L.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:{xs:1.25,sm:1.75},children:[(0,L.jsx)(s.A,{sx:{width:{xs:40,sm:48},height:{xs:40,sm:48},bgcolor:q,color:"#fff",boxShadow:"0 6px 18px ".concat(X(q))},children:(0,L.jsx)(D.GdF,{size:22})}),(0,L.jsxs)(p.A,{children:[(0,L.jsx)(x.A,{variant:"h3",sx:{fontWeight:800,color:B.textPrimary,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"}},children:"Orders Summary"}),(0,L.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[(0,L.jsx)(d.A,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:"#10b981",boxShadow:"0 0 0 4px rgba(16,185,129,0.18)"}}),(0,L.jsxs)(x.A,{variant:"caption",sx:{color:B.textSecondary,fontWeight:600},children:["Live \xb7 ",ie||"All Zones"," \xb7 ",xe]})]})]})]}),(0,L.jsx)(N.A,{ref:o,locaName:ie,setAppId:H,setLocoName:le,setPage:We,pill:!0,accentColor:q,icon:(0,L.jsx)(D.HPi,{size:14}),placeholder:"Select Zone",paperComponent:V,sx:{width:{xs:"100%",sm:280},zIndex:100}})]})}),(0,L.jsx)(m.Ay,{container:!0,spacing:{xs:1.25,sm:1.5,md:2},sx:{mt:"1px"},children:Be.map((e=>{const t=e.icon;return(0,L.jsx)(m.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,L.jsxs)(a.A,{elevation:0,sx:{position:"relative",overflow:"hidden",p:{xs:1.25,sm:1.75,md:2.25},borderRadius:B.radiusCard/8,border:"1px solid",borderColor:B.borderSubtle,background:"#fff",transition:"transform 0.2s, box-shadow 0.2s, border-color 0.2s","&:hover":{transform:"translateY(-3px)",boxShadow:B.shadowMd,borderColor:U(e.color)}},children:[(0,L.jsx)(d.A,{sx:{position:"absolute",top:0,left:0,right:0,height:3,background:"linear-gradient(90deg, ".concat(e.color," 0%, ").concat(Z(e.color)," 100%)")}}),(0,L.jsxs)(p.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,L.jsxs)(p.A,{spacing:.5,sx:{minWidth:0,flex:1},children:[(0,L.jsx)(x.A,{variant:"caption",sx:{color:B.textSecondary,fontWeight:700,letterSpacing:.4,textTransform:"uppercase",fontSize:{xs:10,sm:11},whiteSpace:"nowrap"},children:e.label}),(0,L.jsx)(x.A,{sx:{fontWeight:800,color:B.textPrimary,lineHeight:1.1,fontSize:{xs:"1.1rem",sm:"1.4rem",md:"1.6rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.value})]}),(0,L.jsx)(s.A,{sx:{width:{xs:36,sm:42,md:48},height:{xs:36,sm:42,md:48},bgcolor:Z(e.color),color:e.color,boxShadow:"inset 0 0 0 1px ".concat(U(e.color)),flexShrink:0},children:(0,L.jsx)(t,{size:20})})]})]})},e.key)}))}),(0,L.jsx)(a.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:B.radiusCard/8,borderTopRightRadius:B.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:B.borderSubtle,borderBottom:0,background:"#fff"},children:(0,L.jsxs)(p.A,{direction:{xs:"column",md:"row"},alignItems:{xs:"stretch",md:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,L.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:1.25,flexWrap:"wrap",children:[(0,L.jsx)(c.A,{title:"Date Filter",placement:"top",children:(0,L.jsxs)(d.A,{onClick:()=>se(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:E("#f59e0b"),border:"1.5px solid ".concat(U("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(X("#f59e0b"))}},children:[(0,L.jsx)(D.Ki0,{size:14}),"Orders \xb7 ",xe," \xb7 ",I()(te).format("DD/MM/YY")," \u2013 ",I()(re).format("DD/MM/YY")]})}),(0,L.jsx)(g.A,{options:Ne||[],value:ve,getOptionLabel:e=>(null===e||void 0===e?void 0:e.tenantname)||(null===e||void 0===e?void 0:e.label)||"",isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.tenantid)===(null===t||void 0===t?void 0:t.tenantid),PaperComponent:V,sx:(0,r.A)({minWidth:{xs:"100%",sm:220}},Q(q)),onOpen:e=>{K||(e.preventDefault(),(0,O.k)("Please select a Zone first!","warning",3e3),setTimeout((()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,t,o)=>{"clear"!==o&&t?(fe((null===t||void 0===t?void 0:t.tenantid)||0),we(t),be((null===t||void 0===t?void 0:t.locationid)||0),ye(null)):(fe(0),we(null),be(0),ye(null))},renderInput:e=>(0,L.jsx)(j.A,(0,r.A)((0,r.A)({},e),{},{inputRef:W,placeholder:"Select Tenant",size:"small",InputProps:(0,r.A)((0,r.A)({},e.InputProps),{},{startAdornment:(0,L.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:[(0,L.jsx)(G,{color:q,size:24,selected:Boolean(ve),children:(0,L.jsx)(D.nZo,{size:14})}),e.InputProps.startAdornment]})})}))}),(0,L.jsx)(g.A,{options:Te||[],value:Se,getOptionLabel:e=>null!==e&&void 0!==e&&e.locationname?"".concat(e.locationname).concat(e.suburb?" (".concat(e.suburb,")"):""):"",isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.locationid)===(null===t||void 0===t?void 0:t.locationid),PaperComponent:V,sx:(0,r.A)({minWidth:{xs:"100%",sm:220}},Q("#0ea5e9")),onOpen:e=>{K||Ae?Ae||(e.preventDefault(),(0,O.k)("Please select a Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=W.current)||void 0===e?void 0:e.focus()}),0)):(e.preventDefault(),(0,O.k)("Please select Zone and Tenant first!","warning",3e3),setTimeout((()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.focus()}),0))},onChange:(e,t,o)=>{"clear"!==o&&t?(be((null===t||void 0===t?void 0:t.locationid)||0),ye(t)):(be(0),ye(null))},renderInput:e=>(0,L.jsx)(j.A,(0,r.A)((0,r.A)({},e),{},{placeholder:"Select Location",size:"small",InputProps:(0,r.A)((0,r.A)({},e.InputProps),{},{startAdornment:(0,L.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:[(0,L.jsx)(G,{color:"#0ea5e9",size:24,selected:Boolean(Se),children:(0,L.jsx)(D.gwi,{size:14})}),e.InputProps.startAdornment]})})}))})]}),(0,L.jsx)(d.A,{sx:{width:{xs:"100%",md:280,lg:320},flex:{xs:"1 1 100%",md:"0 0 auto"}},children:(0,L.jsx)(T.A,{value:Ce,onChange:ze,onDebouncedChange:De,placeholder:"Search ".concat(He?"locations":"tenants"," (ctrl+k)"),sx:{m:0,width:"100%",borderRadius:999,bgcolor:E(q),"& fieldset":{borderColor:U(q),borderWidth:1.5},"&:hover fieldset":{borderColor:q},"&.Mui-focused fieldset":{borderColor:q,borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(X(q))}}})})]})}),(0,L.jsxs)(a.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:B.radiusCard/8,borderBottomRightRadius:B.radiusCard/8,border:"1px solid",borderColor:B.borderSubtle,overflow:"hidden",background:"#fff"},children:[t?(0,L.jsxs)(L.Fragment,{children:[Me&&(0,L.jsx)(R.nV,{children:[0,1,2,3].map((e=>(0,L.jsx)(R.pg,{accent:B.borderSubtle,children:(0,L.jsx)(d.A,{sx:{height:96}})},e)))}),!Me&&0===Fe.length&&(0,L.jsxs)(p.A,{alignItems:"center",spacing:1.5,sx:{py:6,px:2},children:[(0,L.jsx)(s.A,{sx:{width:64,height:64,bgcolor:Z("#94a3b8"),color:B.textMuted},children:(0,L.jsx)(D.Z2J,{size:28})}),(0,L.jsxs)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:B.textPrimary},children:["No ",He?"locations":"tenants"," to show"]}),(0,L.jsx)(x.A,{variant:"caption",sx:{color:B.textSecondary,textAlign:"center",maxWidth:360},children:ke?"Try a different keyword.":Ye?"Something went wrong fetching the summary. Try a different filter.":"Pick a zone, tenant, or date range to load the summary."})]}),!Me&&Fe.length>0&&(0,L.jsx)(R.nV,{children:Fe.map(((e,t)=>{const o=He?e.locationname:e.tenantname,r=ce===o,n=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0),i=He?"#0ea5e9":q;return(0,L.jsxs)(R.pg,{accent:i,selected:r,header:(0,L.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,L.jsx)(G,{color:i,size:36,children:He?(0,L.jsx)(D.gwi,{size:18}):(0,L.jsx)(D.nZo,{size:18})}),(0,L.jsxs)(p.A,{sx:{minWidth:0,flex:1},children:[(0,L.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:B.textPrimary},noWrap:!0,children:(He?e.locationname:e.tenantname)||"\u2014"}),(0,L.jsxs)(x.A,{variant:"caption",sx:{color:B.textSecondary},children:["ID #",He?e.locationid:e.tenantid]})]}),(0,L.jsx)(c.A,{title:r?"Hide rider breakdown":"View rider breakdown",placement:"top",children:(0,L.jsx)(b.A,{size:"small",onClick:()=>{const t=!r;de(t?o:null),t&&(pe([]),He?Ke(e.locationid):Le(e.tenantid))},sx:{flexShrink:0,bgcolor:r?q:Z(q),color:r?"#fff":q,border:"1px solid ".concat(U(q)),"&:hover":{bgcolor:q,color:"#fff"}},children:r?(0,L.jsx)(D.Xbk,{size:16}):(0,L.jsx)(D.j1Q,{size:16})})})]}),children:[(0,L.jsxs)(R.FG,{columns:3,children:[(0,L.jsx)(R.pY,{label:"All",align:"center",children:(0,L.jsx)(_,{value:e.totalorders,color:q,icon:(0,L.jsx)(D.F6S,{size:11})})}),(0,L.jsx)(R.pY,{label:"Ord Pending",align:"center",children:(0,L.jsx)(_,{value:e.Orderspending,color:"#f59e0b",icon:(0,L.jsx)(D.tX0,{size:11})})}),(0,L.jsx)(R.pY,{label:"Ord Cancelled",align:"center",children:(0,L.jsx)(_,{value:e.orderscancelled,color:"#ef4444",icon:(0,L.jsx)(D.uDv,{size:11})})}),(0,L.jsx)(R.pY,{label:"Ord Completed",align:"center",children:(0,L.jsx)(_,{value:e.orderscompleted,color:"#10b981",icon:(0,L.jsx)(D.mU9,{size:11})})}),(0,L.jsx)(R.pY,{label:"Del Pending",align:"center",children:(0,L.jsx)(_,{value:e.deliveriespending,color:"#f59e0b",icon:(0,L.jsx)(D.tX0,{size:11})})}),(0,L.jsx)(R.pY,{label:"Del Cancelled",align:"center",children:(0,L.jsx)(_,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,L.jsx)(D.uDv,{size:11})})}),(0,L.jsx)(R.pY,{label:"Del Completed",align:"center",children:(0,L.jsx)(_,{value:e.deliveriescompleted,color:"#10b981",icon:(0,L.jsx)(D.mU9,{size:11})})}),(0,L.jsx)(R.pY,{label:"Collection",align:"center",children:(0,L.jsx)(J,{color:"#f59e0b",icon:(0,L.jsx)(D.YHz,{size:11}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection Amount",minWidth:90})}),(0,L.jsx)(R.pY,{label:"Amount",align:"center",children:(0,L.jsx)(J,{color:q,icon:(0,L.jsx)(D.YHz,{size:11}),label:ee(n).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})}),(0,L.jsx)(R.pY,{label:"KMS",align:"center",children:(0,L.jsx)(J,{color:"#ef4444",icon:(0,L.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,L.jsx)(R.pY,{label:"Actual KMS",align:"center",children:(0,L.jsx)(J,{color:"#10b981",icon:(0,L.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})})]}),(0,L.jsx)(A.A,{in:r,timeout:"auto",unmountOnExit:!0,children:(0,L.jsxs)(d.A,{sx:{mt:1.5},children:[(0,L.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1},children:[(0,L.jsx)(G,{color:q,size:24,selected:!0,children:(0,L.jsx)(D.Itr,{size:12})}),(0,L.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:B.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:"Rider Breakdown"})]}),me||ue&&0!==ue.length?(0,L.jsx)(p.A,{spacing:1,children:ue.map(((e,t)=>{const o=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,L.jsxs)(R.pg,{accent:q,children:[(0,L.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,L.jsx)(G,{color:q,size:28,children:(0,L.jsx)(D.LTk,{size:14})}),(0,L.jsxs)(p.A,{sx:{minWidth:0},children:[(0,L.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:B.textPrimary},noWrap:!0,children:"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"\u2014"}),(0,L.jsx)(x.A,{variant:"caption",sx:{color:B.textSecondary},children:e.ridercontact||"ID #".concat(e.userid)})]})]}),(0,L.jsxs)(R.FG,{columns:3,children:[(0,L.jsx)(R.pY,{label:"Orders",align:"center",children:(0,L.jsx)(_,{value:e.orderscreated,color:q,icon:(0,L.jsx)(D.F6S,{size:10})})}),(0,L.jsx)(R.pY,{label:"Deliveries",align:"center",children:(0,L.jsx)(_,{value:e.totalorders,color:"#0ea5e9",icon:(0,L.jsx)(D.F6S,{size:10})})}),(0,L.jsx)(R.pY,{label:"Pending",align:"center",children:(0,L.jsx)(_,{value:e.deliveriespending,color:"#f59e0b",icon:(0,L.jsx)(D.tX0,{size:10})})}),(0,L.jsx)(R.pY,{label:"Cancelled",align:"center",children:(0,L.jsx)(_,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,L.jsx)(D.uDv,{size:10})})}),(0,L.jsx)(R.pY,{label:"Completed",align:"center",children:(0,L.jsx)(_,{value:e.deliveriescompleted,color:"#10b981",icon:(0,L.jsx)(D.mU9,{size:10})})}),(0,L.jsx)(R.pY,{label:"Collection",align:"center",children:(0,L.jsx)(J,{color:"#f59e0b",icon:(0,L.jsx)(D.YHz,{size:10}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection",minWidth:80})}),(0,L.jsx)(R.pY,{label:"KMS",align:"center",children:(0,L.jsx)(J,{color:"#ef4444",icon:(0,L.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"})}),(0,L.jsx)(R.pY,{label:"Actual KMS",align:"center",children:(0,L.jsx)(J,{color:"#10b981",icon:(0,L.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})}),(0,L.jsx)(R.pY,{label:"Amount",align:"center",children:(0,L.jsx)(J,{color:q,icon:(0,L.jsx)(D.YHz,{size:10}),label:ee(o).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]})]},"".concat(e.userid,"-").concat(t))}))}):(0,L.jsx)(x.A,{variant:"caption",sx:{color:B.textMuted,display:"block",py:1,textAlign:"center"},children:"No rider activity for this row."})]})})]},"".concat(o,"-").concat(t))}))})]}):(0,L.jsx)(f.A,{sx:{maxHeight:{xs:"calc(100vh - 280px)",md:"calc(100vh - 240px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:U(q),borderRadius:8,"&:hover":{backgroundColor:q}},"&::-webkit-scrollbar-track":{backgroundColor:B.surfaceAlt}},children:(0,L.jsxs)(v.A,{stickyHeader:!0,sx:{minWidth:{xs:1080,md:1200}},children:[(0,L.jsxs)(w.A,{children:[(0,L.jsxs)(S.A,{sx:{"& th":{backgroundColor:B.surfaceAlt,color:B.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(B.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:1.5}}},children:[(0,L.jsx)(y.A,{rowSpan:2,children:"#"}),(0,L.jsx)(y.A,{rowSpan:2,children:He?"Location":"Tenant"}),(0,L.jsx)(y.A,{align:"center",rowSpan:2,children:"All"}),(0,L.jsx)(y.A,{align:"center",colSpan:3,sx:{bgcolor:"".concat(E("#ef4444")," !important"),color:"#ef4444 !important"},children:"Orders"}),(0,L.jsx)(y.A,{align:"center",colSpan:3,sx:{bgcolor:"".concat(E("#10b981")," !important"),color:"#10b981 !important"},children:"Deliveries"}),(0,L.jsx)(y.A,{align:"center",rowSpan:2,children:"Collection"}),(0,L.jsx)(y.A,{align:"center",rowSpan:2,children:"KMS / Actual"}),(0,L.jsx)(y.A,{align:"center",rowSpan:2,children:"Amount"}),(0,L.jsx)(y.A,{align:"right",rowSpan:2,children:"Action"})]}),(0,L.jsxs)(S.A,{sx:{"& th":{backgroundColor:B.surfaceAlt,color:B.textSecondary,fontSize:{xs:10,md:10.5},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(B.borderSubtle),py:{xs:.75,md:1},px:{xs:1,md:1.5}}},children:[(0,L.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(E("#ef4444")," !important"),color:"#f59e0b !important"},children:"Pending"}),(0,L.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(E("#ef4444")," !important"),color:"#ef4444 !important"},children:"Cancelled"}),(0,L.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(E("#ef4444")," !important"),color:"#10b981 !important"},children:"Completed"}),(0,L.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(E("#10b981")," !important"),color:"#f59e0b !important"},children:"Pending"}),(0,L.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(E("#10b981")," !important"),color:"#ef4444 !important"},children:"Cancelled"}),(0,L.jsx)(y.A,{align:"center",sx:{bgcolor:"".concat(E("#10b981")," !important"),color:"#10b981 !important"},children:"Completed"})]})]}),(0,L.jsxs)(C.A,{children:[Me&&(0,L.jsx)(F.r,{col:9}),!Me&&0===Fe.length&&(0,L.jsx)(S.A,{children:(0,L.jsx)(y.A,{colSpan:13,sx:{py:6},children:(0,L.jsxs)(p.A,{alignItems:"center",spacing:1.5,children:[(0,L.jsx)(s.A,{sx:{width:64,height:64,bgcolor:Z("#94a3b8"),color:B.textMuted},children:(0,L.jsx)(D.Z2J,{size:28})}),(0,L.jsxs)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:B.textPrimary},children:["No ",He?"locations":"tenants"," to show"]}),(0,L.jsx)(x.A,{variant:"caption",sx:{color:B.textSecondary,textAlign:"center",maxWidth:360},children:ke?"Try a different keyword.":Ye?"Something went wrong fetching the summary. Try a different filter.":"Pick a zone, tenant, or date range to load the summary."})]})})}),Fe.map(((e,t)=>{const o=He?e.locationname:e.tenantname,r=ce===o,i=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,L.jsxs)(n.Fragment,{children:[(0,L.jsxs)(S.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:r?"none":"1px solid ".concat(B.divider),py:{xs:1,md:1.25},px:{xs:1,md:1.5}},"&:hover":{backgroundColor:r?"#fff":B.surfaceAlt},bgcolor:r?E(q):"transparent"},children:[(0,L.jsx)(y.A,{children:(0,L.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:B.textMuted},children:String(t+1).padStart(2,"0")})}),(0,L.jsx)(y.A,{children:(0,L.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,L.jsx)(G,{color:He?"#0ea5e9":q,size:36,children:He?(0,L.jsx)(D.gwi,{size:18}):(0,L.jsx)(D.nZo,{size:18})}),(0,L.jsxs)(p.A,{children:[(0,L.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:B.textPrimary,whiteSpace:"nowrap"},children:(He?e.locationname:e.tenantname)||"\u2014"}),(0,L.jsxs)(x.A,{variant:"caption",sx:{color:B.textSecondary},children:["ID #",He?e.locationid:e.tenantid]})]})]})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(_,{value:e.totalorders,color:q,icon:(0,L.jsx)(D.F6S,{size:11})})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(_,{value:e.Orderspending,color:"#f59e0b",icon:(0,L.jsx)(D.tX0,{size:11})})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(_,{value:e.orderscancelled,color:"#ef4444",icon:(0,L.jsx)(D.uDv,{size:11})})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(_,{value:e.orderscompleted,color:"#10b981",icon:(0,L.jsx)(D.mU9,{size:11})})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(_,{value:e.deliveriespending,color:"#f59e0b",icon:(0,L.jsx)(D.tX0,{size:11})})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(_,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,L.jsx)(D.uDv,{size:11})})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(_,{value:e.deliveriescompleted,color:"#10b981",icon:(0,L.jsx)(D.mU9,{size:11})})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(J,{color:"#f59e0b",icon:(0,L.jsx)(D.YHz,{size:11}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection Amount",minWidth:90})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsxs)(p.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,L.jsx)(J,{color:"#ef4444",icon:(0,L.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,L.jsx)(J,{color:"#10b981",icon:(0,L.jsx)(D.xI$,{size:11}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(J,{color:q,icon:(0,L.jsx)(D.YHz,{size:11}),label:ee(i).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})}),(0,L.jsx)(y.A,{align:"right",children:(0,L.jsx)(c.A,{title:r?"Hide rider breakdown":"View rider breakdown",placement:"top",children:(0,L.jsx)(b.A,{size:"small",onClick:()=>{const t=!r;de(t?o:null),t&&(pe([]),He?Ke(e.locationid):Le(e.tenantid))},sx:{bgcolor:r?q:Z(q),color:r?"#fff":q,border:"1px solid ".concat(U(q)),"&:hover":{bgcolor:q,color:"#fff"}},children:r?(0,L.jsx)(D.Xbk,{size:16}):(0,L.jsx)(D.j1Q,{size:16})})})})]}),r&&(0,L.jsx)(S.A,{children:(0,L.jsx)(y.A,{colSpan:13,sx:{p:0,borderBottom:"1px solid ".concat(B.divider),bgcolor:E(q)},children:(0,L.jsx)(A.A,{in:r,timeout:"auto",unmountOnExit:!0,children:(0,L.jsx)(d.A,{sx:{p:{xs:1,md:2}},children:(0,L.jsxs)(a.A,{elevation:0,sx:{borderRadius:B.radiusCard/8,border:"1px solid",borderColor:B.borderSubtle,overflow:"hidden",boxShadow:B.shadowSoft},children:[(0,L.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:2,py:1.25,background:"linear-gradient(135deg, ".concat(E(q)," 0%, ").concat(E($)," 100%)"),borderBottom:"1px solid ".concat(B.borderSubtle)},children:[(0,L.jsx)(G,{color:q,size:28,selected:!0,children:(0,L.jsx)(D.Itr,{size:14})}),(0,L.jsxs)(x.A,{variant:"caption",sx:{fontWeight:800,color:B.textPrimary,letterSpacing:.6,textTransform:"uppercase"},children:["Rider Breakdown \xb7 ",He?e.locationname:e.tenantname]})]}),(0,L.jsxs)(v.A,{size:"small",children:[(0,L.jsx)(w.A,{children:(0,L.jsxs)(S.A,{sx:{"& th":{backgroundColor:B.surfaceAlt,color:B.textSecondary,fontSize:10,fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(B.borderSubtle),py:1,px:1.5}},children:[(0,L.jsx)(y.A,{children:"#"}),(0,L.jsx)(y.A,{children:"Rider"}),(0,L.jsx)(y.A,{align:"center",children:"Orders"}),(0,L.jsx)(y.A,{align:"center",children:"Deliveries"}),(0,L.jsx)(y.A,{align:"center",children:"Pending"}),(0,L.jsx)(y.A,{align:"center",children:"Cancelled"}),(0,L.jsx)(y.A,{align:"center",children:"Completed"}),(0,L.jsx)(y.A,{align:"center",children:"Collection"}),(0,L.jsx)(y.A,{align:"center",children:"KMS / Actual"}),(0,L.jsx)(y.A,{align:"center",children:"Amount"})]})}),(0,L.jsxs)(C.A,{children:[me&&(0,L.jsx)(F.r,{col:6}),me||ue&&0!==ue.length?ue.map(((e,t)=>{const o=Math.max(Number(e.charges)||0,Number(e.deliveryamt)||0);return(0,L.jsxs)(S.A,{sx:{"& td":{borderBottom:"1px solid ".concat(B.divider),py:1,px:1.5},"&:hover":{backgroundColor:B.surfaceAlt}},children:[(0,L.jsx)(y.A,{children:(0,L.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:B.textMuted},children:String(t+1).padStart(2,"0")})}),(0,L.jsx)(y.A,{children:(0,L.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,L.jsx)(G,{color:q,size:28,children:(0,L.jsx)(D.LTk,{size:14})}),(0,L.jsxs)(p.A,{children:[(0,L.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:B.textPrimary,whiteSpace:"nowrap"},children:"".concat(e.firstname||""," ").concat(e.lastname||"").trim()||"\u2014"}),(0,L.jsx)(x.A,{variant:"caption",sx:{color:B.textSecondary},children:e.ridercontact||"ID #".concat(e.userid)})]})]})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(_,{value:e.orderscreated,color:q,icon:(0,L.jsx)(D.F6S,{size:10})})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(_,{value:e.totalorders,color:"#0ea5e9",icon:(0,L.jsx)(D.F6S,{size:10})})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(_,{value:e.deliveriespending,color:"#f59e0b",icon:(0,L.jsx)(D.tX0,{size:10})})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(_,{value:e.deliveriescancelled,color:"#ef4444",icon:(0,L.jsx)(D.uDv,{size:10})})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(_,{value:e.deliveriescompleted,color:"#10b981",icon:(0,L.jsx)(D.mU9,{size:10})})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(J,{color:"#f59e0b",icon:(0,L.jsx)(D.YHz,{size:10}),label:Number(e.collectionamt||0).toFixed(2),tooltip:"Collection",minWidth:80})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsxs)(p.A,{direction:"column",spacing:.5,alignItems:"center",children:[(0,L.jsx)(J,{color:"#ef4444",icon:(0,L.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.kms||0).toFixed(2)," km"),tooltip:"KMS"}),(0,L.jsx)(J,{color:"#10b981",icon:(0,L.jsx)(D.xI$,{size:10}),label:"".concat(Number(e.cumulativekms||0).toFixed(2)," km"),tooltip:"Actual KMS"})]})}),(0,L.jsx)(y.A,{align:"center",children:(0,L.jsx)(J,{color:q,icon:(0,L.jsx)(D.YHz,{size:10}),label:ee(o).replace("\u20b9","").trim(),tooltip:"Total Amount",minWidth:100})})]},"".concat(e.userid,"-").concat(t))})):(0,L.jsx)(S.A,{children:(0,L.jsx)(y.A,{colSpan:10,sx:{py:3},children:(0,L.jsx)(x.A,{variant:"caption",sx:{color:B.textMuted,textAlign:"center",display:"block"},children:"No rider activity for this row."})})})]})]})]})})})})})]},"".concat(o,"-").concat(t))}))]})]})}),Fe.length>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(z.A,{}),(0,L.jsxs)(p.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1.5,flexWrap:"wrap",sx:{px:2,py:1.5,background:"linear-gradient(135deg, ".concat(E(q)," 0%, ").concat(E($)," 100%)")},children:[(0,L.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:1,flexWrap:"wrap",children:[(0,L.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:B.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:"Grand Total"}),(0,L.jsx)(k.A,{size:"small",label:"".concat(Oe.totalOrders," orders"),sx:{fontWeight:700,bgcolor:Z(q),color:q,border:"1px solid ".concat(U(q))}}),(0,L.jsx)(k.A,{size:"small",label:"".concat(Oe.deliComplete," delivered"),sx:{fontWeight:700,bgcolor:Z("#10b981"),color:"#10b981",border:"1px solid ".concat(U("#10b981"))}}),(0,L.jsx)(k.A,{size:"small",label:"".concat(Oe.deliPend," pending"),sx:{fontWeight:700,bgcolor:Z("#f59e0b"),color:"#f59e0b",border:"1px solid ".concat(U("#f59e0b"))}})]}),(0,L.jsx)(k.A,{label:ee(Oe.amount),sx:{fontWeight:800,fontSize:13,color:"#fff",background:"linear-gradient(135deg, ".concat(q," 0%, ").concat($," 100%)"),boxShadow:"0 6px 16px ".concat(X(q))}})]})]})]}),(0,L.jsx)(P.A,{open:ae,onClose:()=>se(!1),onSelect:e=>{oe(e.startDate),ne(e.endDate),he(e.label)}})]})}},59212:(e,t,o)=>{o.d(t,{A:()=>h});var r=o(89379),n=o(9950),i=o(93230),l=o(41413),a=o(77922),s=o(29925),c=o(26910),d=o(31222),x=o(44414);const h=(0,n.forwardRef)(((e,t)=>{let{setAppId:o,setLocoName:h,setPage:u,sx:p,textfeildSx:m,textfieldSx:g,pill:j=!1,accentColor:b="#6366f1",icon:A,placeholder:f="Select Zone",paperComponent:v}=e;const[w,S]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===w.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[w.length]);const y=e=>"".concat(b).concat(e),C=y("08"),z=y("26"),k=y("55"),D=y("18"),W=j?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"999px",bgcolor:C,fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s, background-color 0.2s","& fieldset":{borderColor:k,borderWidth:1.5},"&:hover fieldset":{borderColor:b},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(z)},"&.Mui-focused fieldset":{borderColor:b,borderWidth:2}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:b}}:{},I=j&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(l.A,{sx:{width:24,height:24,bgcolor:D,color:b,transition:"background-color 0.15s, color 0.15s"},children:A||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(a.A,{id:"location-autocomplete",options:w||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:v,sx:(0,r.A)({},p),onChange:(e,t,r)=>{"clear"===r?(null===o||void 0===o||o(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):t&&(null===o||void 0===o||o(t.applocationid),null===h||void 0===h||h(t.locationname),null===u||void 0===u||u(0))},renderInput:e=>j?(0,x.jsx)(s.A,(0,r.A)((0,r.A)({},e),{},{inputRef:t,placeholder:f,InputProps:(0,r.A)((0,r.A)({},e.InputProps),{},{startAdornment:I}),sx:(0,r.A)((0,r.A)({},W),g||m||{})})):(0,x.jsx)(s.A,(0,r.A)((0,r.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,r.A)({},g||m||{})}))})}))},96646:(e,t,o)=>{o.d(t,{r:()=>s});var r=o(9213),n=o(21671),i=o(82917),l=o(93230),a=o(44414);const s=e=>{let{rowsPerPage:t=5,col:o=1}=e;return(0,a.jsx)(a.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,a.jsxs)(r.A,{children:[(0,a.jsx)(n.A,{children:(0,a.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,a.jsx)(n.A,{children:(0,a.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:o}).map(((e,t)=>(0,a.jsx)(n.A,{children:(0,a.jsxs)(l.A,{spacing:.5,children:[(0,a.jsx)(i.A,{variant:"text",width:100}),(0,a.jsx)(i.A,{variant:"text",width:80})]})},t))),(0,a.jsx)(n.A,{children:(0,a.jsx)(i.A,{variant:"text",width:150})}),(0,a.jsx)(n.A,{children:(0,a.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,a.jsx)(n.A,{align:"center",children:(0,a.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,a.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,a.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file diff --git a/build/static/js/7157.5fea29d8.chunk.js b/build/static/js/7157.5fea29d8.chunk.js deleted file mode 100644 index 2c9d273..0000000 --- a/build/static/js/7157.5fea29d8.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[7157],{23787:(e,r,o)=>{o.d(r,{FG:()=>p,nV:()=>x,pY:()=>g,pg:()=>h});var i=o(89379),n=o(80045),t=o(93230),s=o(2235),l=o(16491),c=o(82053),a=o(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:r,scroll:o=!1,onScroll:s,sx:l}=e,c=(0,n.A)(e,d);return(0,a.jsx)(t.A,(0,i.A)((0,i.A)({spacing:1.25,onScroll:s,sx:(0,i.A)((0,i.A)({p:1.5},o&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},c),{},{children:r}))},h=e=>{let{accent:r="#662582",header:o,footer:n,selected:t=!1,onClick:c,children:d,sx:x}=e;return(0,a.jsxs)(s.A,{elevation:0,onClick:c,sx:(0,i.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:t?r:"#e2e8f0",background:t?"".concat(r,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,a.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:r}}),(0,a.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[o,d,n]})]})},p=e=>{let{children:r,columns:o=2,sx:n}=e;return(0,a.jsx)(l.A,{sx:(0,i.A)({display:"grid",gridTemplateColumns:"repeat(".concat(o,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:r})},g=e=>{let{label:r,value:o,children:i,full:n=!1,align:t="left"}=e;return(0,a.jsxs)(l.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:t},children:[(0,a.jsx)(c.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:r}),(0,a.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==i?i:(0,a.jsx)(c.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==o&&void 0!==o?o:"\u2014"})})]})}},56311:(e,r,o)=>{o.d(r,{A:()=>p});var i=o(89379),n=o(9950),t=o(2660),s=o(2046),l=o(83274),c=o(25333),a=o(97125),d=o(7762),x=o(52097),h=o(44414);const p=e=>{let{value:r,onChange:o,onDebouncedChange:p,debounceTime:g=500,placeholder:m="Search (ctrl+k)",sx:b}=e;const u=(0,n.useRef)(null),[j]=(0,x.d7)(r,g);return(0,n.useEffect)((()=>{p&&p(j)}),[j,p]),(0,n.useEffect)((()=>{const e=e=>{var r;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(r=u.current)||void 0===r||r.focus());"Escape"===e.key&&document.activeElement===u.current&&u.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(t.A,{sx:(0,i.A)({},b),inputRef:u,placeholder:m,autoComplete:"off",value:r,fullWidth:!0,onChange:e=>o(e.target.value),startAdornment:(0,h.jsx)(s.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(a.A,{})}),endAdornment:(0,h.jsx)(l.A,{title:"Clear",children:(0,h.jsx)(c.A,{sx:{visibility:r?"visible":"hidden"},onClick:()=>o(""),children:(0,h.jsx)(d.A,{})})})})}},59212:(e,r,o)=>{o.d(r,{A:()=>h});var i=o(89379),n=o(9950),t=o(93230),s=o(41413),l=o(77922),c=o(29925),a=o(26910),d=o(31222),x=o(44414);const h=(0,n.forwardRef)(((e,r)=>{let{setAppId:o,setLocoName:h,setPage:p,sx:g,textfeildSx:m,textfieldSx:b,pill:u=!1,accentColor:j="#6366f1",icon:A,placeholder:f="Select Zone",paperComponent:v}=e;const[w,S]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===w.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const r=await a.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(r.data.status){const e=[...r.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[w.length]);const k=e=>"".concat(j).concat(e),y=k("08"),C=k("26"),I=k("55"),z=k("18"),W=u?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"999px",bgcolor:y,fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s, background-color 0.2s","& fieldset":{borderColor:I,borderWidth:1.5},"&:hover fieldset":{borderColor:j},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(C)},"&.Mui-focused fieldset":{borderColor:j,borderWidth:2}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:j}}:{},R=u&&(0,x.jsx)(t.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(s.A,{sx:{width:24,height:24,bgcolor:z,color:j,transition:"background-color 0.15s, color 0.15s"},children:A||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:w||[],getOptionLabel:e=>{var r;return null!==(r=null===e||void 0===e?void 0:e.locationname)&&void 0!==r?r:""},PaperComponent:v,sx:(0,i.A)({},g),onChange:(e,r,i)=>{"clear"===i?(null===o||void 0===o||o(0),null===h||void 0===h||h(""),null===p||void 0===p||p(0)):r&&(null===o||void 0===o||o(r.applocationid),null===h||void 0===h||h(r.locationname),null===p||void 0===p||p(0))},renderInput:e=>u?(0,x.jsx)(c.A,(0,i.A)((0,i.A)({},e),{},{inputRef:r,placeholder:f,InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{startAdornment:R}),sx:(0,i.A)((0,i.A)({},W),b||m||{})})):(0,x.jsx)(c.A,(0,i.A)((0,i.A)({},e),{},{inputRef:r,label:"Select Zones",sx:(0,i.A)({},b||m||{})}))})}))},96646:(e,r,o)=>{o.d(r,{r:()=>c});var i=o(9213),n=o(21671),t=o(82917),s=o(93230),l=o(44414);const c=e=>{let{rowsPerPage:r=5,col:o=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(r)).map(((e,r)=>(0,l.jsxs)(i.A,{children:[(0,l.jsx)(n.A,{children:(0,l.jsx)(t.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(n.A,{children:(0,l.jsx)(t.A,{variant:"text",width:30})}),Array.from({length:o}).map(((e,r)=>(0,l.jsx)(n.A,{children:(0,l.jsxs)(s.A,{spacing:.5,children:[(0,l.jsx)(t.A,{variant:"text",width:100}),(0,l.jsx)(t.A,{variant:"text",width:80})]})},r))),(0,l.jsx)(n.A,{children:(0,l.jsx)(t.A,{variant:"text",width:150})}),(0,l.jsx)(n.A,{children:(0,l.jsx)(t.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(n.A,{align:"center",children:(0,l.jsxs)(s.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(t.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(t.A,{variant:"circular",width:28,height:28})]})})]},r)))})}},97157:(e,r,o)=>{o.r(r),o.d(r,{default:()=>_});var i=o(89379),n=o(9950),t=o(2235),s=o(41413),l=o(16491),c=o(14857),a=o(47223),d=o(93230),x=o(82053),h=o(60899),p=o(1320),g=o(15769),m=o(69780),b=o(9213),u=o(21671),j=o(34075),A=o(31222),f=o(36150),v=o(52351),w=o(56311),S=o(59212),k=o(23787),y=o(96646),C=o(81425),I=o(44414);const z=16,W="0 8px 24px rgba(15, 23, 42, 0.08)",R="0 18px 50px rgba(15, 23, 42, 0.18)",M="#0f172a",P="#64748b",L="#94a3b8",B="#e2e8f0",F="#f1f5f9",N="#f8fafc",T=(e,r)=>"".concat(e).concat(r),J=e=>T(e,"08"),D=e=>T(e,"18"),H=e=>T(e,"26"),K=e=>T(e,"55"),O="#662582",E=e=>(0,I.jsx)(t.A,(0,i.A)((0,i.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:R,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),Y=e=>{let{color:r,selected:o,size:i=24,children:n}=e;return(0,I.jsx)(s.A,{sx:{width:i,height:i,bgcolor:o?r:D(r),color:o?"#fff":r,transition:"background-color 0.15s, color 0.15s"},children:n})},Z=e=>new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(Number(e)||0),G=e=>new Intl.NumberFormat("en-IN",{minimumFractionDigits:2}).format(Number(e)||0),$=e=>{let{color:r,icon:o,label:i,width:n}=e;return(0,I.jsxs)(l.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:J(r),border:"1px solid ".concat(K(r)),color:r,fontSize:11,fontWeight:800,minWidth:n,justifyContent:"center"},children:[o,i]})},_=()=>{const e=(0,c.A)(),r=(0,a.A)(e.breakpoints.down("md")),o=(0,n.useRef)(),[i,R]=(0,n.useState)(0),[T,_]=(0,n.useState)("All"),[q,V]=(0,n.useState)(""),[X,Q]=(0,n.useState)(""),{data:U=[],isLoading:ee}=(0,f.I)({queryKey:["getallpricing",i],queryFn:C.OM,keepPreviousData:!0}),re=(0,n.useMemo)((()=>{if(!X)return U;const e=X.toLowerCase().trim();return U.filter((r=>[r.applocation,r.appname,r.slab,String(r.pricingid)].filter(Boolean).some((r=>String(r).toLowerCase().includes(e)))))}),[U,X]),oe=(0,n.useMemo)((()=>{const e=U.length;return{total:e,tenants:new Set(U.map((e=>e.appname)).filter(Boolean)).size,avgBase:e?U.reduce(((e,r)=>e+(Number(r.baseprice)||0)),0)/e:0}}),[U]),ie=[{key:"total",label:"Total Pricing Slabs",color:O,icon:A.JL6,value:oe.total},{key:"tenants",label:"Tenants Priced",color:"#0ea5e9",icon:A.Itr,value:oe.tenants},{key:"avg",label:"Avg Base Price",color:"#f59e0b",icon:A.H4F,value:Z(oe.avgBase)},{key:"zone",label:"Active Zone",color:"#10b981",icon:A.JFD,value:T||"All Zones"}];return(0,I.jsxs)(I.Fragment,{children:[ee&&(0,I.jsx)(v.A,{}),(0,I.jsx)(t.A,{elevation:0,sx:{mb:{xs:1.5,md:2},p:{xs:1.5,sm:2,md:2.5},borderRadius:z/8,border:"1px solid",borderColor:B,background:"linear-gradient(135deg, ".concat(J(O)," 0%, ").concat(J("#9255AB")," 100%)"),boxShadow:W},children:(0,I.jsxs)(d.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",spacing:{xs:1.5,sm:2},children:[(0,I.jsxs)(d.A,{direction:"row",alignItems:"center",spacing:{xs:1.25,sm:1.75},children:[(0,I.jsx)(s.A,{sx:{width:{xs:40,sm:48},height:{xs:40,sm:48},bgcolor:O,color:"#fff",boxShadow:"0 6px 18px ".concat(H(O))},children:(0,I.jsx)(A.JL6,{size:22})}),(0,I.jsxs)(d.A,{children:[(0,I.jsx)(x.A,{variant:"h3",sx:{fontWeight:800,color:M,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"}},children:"Pricing"}),(0,I.jsxs)(d.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[(0,I.jsx)(l.A,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:"#10b981",boxShadow:"0 0 0 4px rgba(16,185,129,0.18)"}}),(0,I.jsxs)(x.A,{variant:"caption",sx:{color:P,fontWeight:600},children:["Live \xb7 ",T||"All Zones"]})]})]})]}),(0,I.jsx)(S.A,{locaName:T,setAppId:R,setLocoName:_,pill:!0,accentColor:O,icon:(0,I.jsx)(A.HPi,{size:14}),placeholder:"Select Zone",paperComponent:E,sx:{width:{xs:"100%",sm:280},zIndex:100}})]})}),(0,I.jsx)(h.Ay,{container:!0,spacing:{xs:1.25,sm:1.5,md:2},sx:{mt:"1px"},children:ie.map((e=>{const r=e.icon;return(0,I.jsx)(h.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,I.jsxs)(t.A,{elevation:0,sx:{position:"relative",overflow:"hidden",p:{xs:1.25,sm:1.75,md:2.25},borderRadius:z/8,border:"1px solid",borderColor:B,background:"#fff",transition:"transform 0.2s, box-shadow 0.2s, border-color 0.2s","&:hover":{transform:"translateY(-3px)",boxShadow:W,borderColor:K(e.color)}},children:[(0,I.jsx)(l.A,{sx:{position:"absolute",top:0,left:0,right:0,height:3,background:"linear-gradient(90deg, ".concat(e.color," 0%, ").concat(D(e.color)," 100%)")}}),(0,I.jsxs)(d.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,I.jsxs)(d.A,{spacing:.5,sx:{minWidth:0,flex:1},children:[(0,I.jsx)(x.A,{variant:"caption",sx:{color:P,fontWeight:700,letterSpacing:.4,textTransform:"uppercase",fontSize:{xs:10,sm:11},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.label}),(0,I.jsx)(x.A,{sx:{fontWeight:800,color:M,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.value})]}),(0,I.jsx)(s.A,{sx:{width:{xs:36,sm:42,md:48},height:{xs:36,sm:42,md:48},bgcolor:D(e.color),color:e.color,boxShadow:"inset 0 0 0 1px ".concat(K(e.color)),flexShrink:0},children:(0,I.jsx)(r,{size:20})})]})]})},e.key)}))}),(0,I.jsx)(t.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:z/8,borderTopRightRadius:z/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:B,borderBottom:0,background:"#fff"},children:(0,I.jsxs)(d.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,I.jsxs)(d.A,{direction:"row",alignItems:"center",spacing:1.25,children:[(0,I.jsx)(Y,{color:O,size:32,children:(0,I.jsx)(A.JL6,{size:18})}),(0,I.jsxs)(d.A,{children:[(0,I.jsx)(x.A,{variant:"caption",sx:{fontWeight:800,color:P,letterSpacing:.6,textTransform:"uppercase"},children:"Pricing Catalog"}),(0,I.jsxs)(x.A,{variant:"body2",sx:{color:M,fontWeight:700},children:[U.length," total \xb7 ",re.length," shown"]})]})]}),(0,I.jsx)(l.A,{sx:{width:{xs:"100%",sm:280,lg:340},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,I.jsx)(w.A,{value:q,onChange:V,onDebouncedChange:Q,placeholder:"Search pricing (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:J(O),"& fieldset":{borderColor:K(O),borderWidth:1.5},"&:hover fieldset":{borderColor:O},"&.Mui-focused fieldset":{borderColor:O,borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(H(O))}}})})]})}),(0,I.jsx)(t.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:z/8,borderBottomRightRadius:z/8,border:"1px solid",borderColor:B,overflow:"hidden",background:"#fff"},children:r?0!==re.length||ee?(0,I.jsx)(k.nV,{scroll:!0,children:re.map(((e,r)=>{var o;return(0,I.jsxs)(k.pg,{accent:O,header:(0,I.jsxs)(d.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,I.jsxs)(d.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,I.jsx)(Y,{color:O,size:36,children:(0,I.jsx)(A.Itr,{size:18})}),(0,I.jsxs)(d.A,{sx:{minWidth:0},children:[(0,I.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:M},noWrap:!0,children:e.appname||"\u2014"}),(0,I.jsxs)(x.A,{variant:"caption",sx:{color:P},children:["ID #",e.pricingid]})]})]}),(0,I.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:L,flexShrink:0},children:String(r+1).padStart(2,"0")})]}),children:[(0,I.jsxs)(d.A,{direction:"row",spacing:.75,sx:{mt:1,flexWrap:"wrap",gap:.75},children:[e.applocation?(0,I.jsxs)(l.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:J("#10b981"),border:"1px solid ".concat(K("#10b981")),color:"#10b981",fontSize:11,fontWeight:800},children:[(0,I.jsx)(A.JFD,{size:12})," ",e.applocation]}):null,(0,I.jsxs)(l.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:J("#0ea5e9"),border:"1px solid ".concat(K("#0ea5e9")),color:"#0ea5e9",fontSize:11,fontWeight:800},children:[(0,I.jsx)(A.BJM,{size:12})," ",e.slab||"\u2014"]})]}),(0,I.jsxs)(k.FG,{children:[(0,I.jsx)(k.pY,{label:"Base Price",children:(0,I.jsx)($,{color:O,icon:(0,I.jsx)(A.bmp,{size:12}),label:Z(e.baseprice)})}),(0,I.jsx)(k.pY,{label:"Price / KM",children:(0,I.jsx)($,{color:"#10b981",icon:(0,I.jsx)(A.H4F,{size:12}),label:Z(e.priceperkm)})}),(0,I.jsx)(k.pY,{label:"Min KM",children:(0,I.jsx)($,{color:"#f59e0b",icon:(0,I.jsx)(A.xI$,{size:12}),label:"".concat(G(e.minkm)," km")})}),(0,I.jsx)(k.pY,{label:"Max KM",children:(0,I.jsx)($,{color:"#ef4444",icon:(0,I.jsx)(A.xI$,{size:12}),label:"".concat(G(e.maxkm)," km")})}),(0,I.jsx)(k.pY,{label:"Min Orders",children:(0,I.jsxs)(d.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,I.jsx)(A.GdF,{size:14,color:L}),(0,I.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:M},children:null!==(o=e.minorder)&&void 0!==o?o:"\u2014"})]})})]})]},e.pricingid||"".concat(e.appname,"-").concat(r))}))}):(0,I.jsxs)(d.A,{alignItems:"center",spacing:1.5,sx:{py:6,px:2},children:[(0,I.jsx)(s.A,{sx:{width:64,height:64,bgcolor:D("#94a3b8"),color:L},children:(0,I.jsx)(A.JL6,{size:28})}),(0,I.jsx)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:M},children:"No pricing to show"}),(0,I.jsx)(x.A,{variant:"caption",sx:{color:P,textAlign:"center"},children:q?"Try a different keyword.":"Pick a zone above to load the catalog."})]}):(0,I.jsx)(p.A,{ref:o,sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:K(O),borderRadius:8,"&:hover":{backgroundColor:O}},"&::-webkit-scrollbar-track":{backgroundColor:N}},children:(0,I.jsxs)(g.A,{stickyHeader:!0,sx:{minWidth:{xs:860,md:1080}},children:[(0,I.jsx)(m.A,{children:(0,I.jsxs)(b.A,{sx:{"& th":{backgroundColor:N,color:P,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(B),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,I.jsx)(u.A,{children:"#"}),(0,I.jsx)(u.A,{children:"Tenant"}),(0,I.jsx)(u.A,{children:"Zone"}),(0,I.jsx)(u.A,{children:"Slab"}),(0,I.jsx)(u.A,{align:"center",children:"Base Price"}),(0,I.jsx)(u.A,{align:"center",children:"Min KM"}),(0,I.jsx)(u.A,{align:"center",children:"Price / KM"}),(0,I.jsx)(u.A,{align:"center",children:"Max KM"}),(0,I.jsx)(u.A,{align:"center",children:"Min Orders"})]})}),(0,I.jsxs)(j.A,{children:[ee&&(0,I.jsx)(y.r,{col:5}),0!==re.length||ee?re.map(((e,r)=>{var o;return(0,I.jsxs)(b.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(F),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:N}},children:[(0,I.jsx)(u.A,{children:(0,I.jsx)(x.A,{variant:"caption",sx:{fontWeight:700,color:L},children:String(r+1).padStart(2,"0")})}),(0,I.jsx)(u.A,{children:(0,I.jsxs)(d.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,I.jsx)(Y,{color:O,size:36,children:(0,I.jsx)(A.Itr,{size:18})}),(0,I.jsxs)(d.A,{children:[(0,I.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:M,whiteSpace:"nowrap"},children:e.appname||"\u2014"}),(0,I.jsxs)(x.A,{variant:"caption",sx:{color:P},children:["ID #",e.pricingid]})]})]})}),(0,I.jsx)(u.A,{children:e.applocation?(0,I.jsxs)(l.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:J("#10b981"),border:"1px solid ".concat(K("#10b981")),color:"#10b981",fontSize:11,fontWeight:800},children:[(0,I.jsx)(A.JFD,{size:12})," ",e.applocation]}):(0,I.jsx)(x.A,{variant:"caption",sx:{color:L},children:"\u2014"})}),(0,I.jsx)(u.A,{children:(0,I.jsxs)(l.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:J("#0ea5e9"),border:"1px solid ".concat(K("#0ea5e9")),color:"#0ea5e9",fontSize:11,fontWeight:800},children:[(0,I.jsx)(A.BJM,{size:12})," ",e.slab||"\u2014"]})}),(0,I.jsx)(u.A,{align:"center",children:(0,I.jsx)($,{color:O,icon:(0,I.jsx)(A.bmp,{size:12}),label:Z(e.baseprice),width:110})}),(0,I.jsx)(u.A,{align:"center",children:(0,I.jsx)($,{color:"#f59e0b",icon:(0,I.jsx)(A.xI$,{size:12}),label:"".concat(G(e.minkm)," km"),width:90})}),(0,I.jsx)(u.A,{align:"center",children:(0,I.jsx)($,{color:"#10b981",icon:(0,I.jsx)(A.H4F,{size:12}),label:Z(e.priceperkm),width:110})}),(0,I.jsx)(u.A,{align:"center",children:(0,I.jsx)($,{color:"#ef4444",icon:(0,I.jsx)(A.xI$,{size:12}),label:"".concat(G(e.maxkm)," km"),width:90})}),(0,I.jsx)(u.A,{align:"center",children:(0,I.jsxs)(d.A,{direction:"row",alignItems:"center",justifyContent:"center",spacing:.5,children:[(0,I.jsx)(A.GdF,{size:14,color:L}),(0,I.jsx)(x.A,{variant:"subtitle2",sx:{fontWeight:700,color:M,whiteSpace:"nowrap"},children:null!==(o=e.minorder)&&void 0!==o?o:"\u2014"})]})})]},e.pricingid||"".concat(e.appname,"-").concat(r))})):(0,I.jsx)(b.A,{children:(0,I.jsx)(u.A,{colSpan:9,sx:{py:6},children:(0,I.jsxs)(d.A,{alignItems:"center",spacing:1.5,children:[(0,I.jsx)(s.A,{sx:{width:64,height:64,bgcolor:D("#94a3b8"),color:L},children:(0,I.jsx)(A.JL6,{size:28})}),(0,I.jsx)(x.A,{variant:"subtitle1",sx:{fontWeight:700,color:M},children:"No pricing to show"}),(0,I.jsx)(x.A,{variant:"caption",sx:{color:P},children:q?"Try a different keyword.":"Pick a zone above to load the catalog."})]})})})]})]})})})]})}}}]); \ No newline at end of file diff --git a/build/static/js/7157.99d280ab.chunk.js b/build/static/js/7157.99d280ab.chunk.js new file mode 100644 index 0000000..2343d47 --- /dev/null +++ b/build/static/js/7157.99d280ab.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[7157],{23787:(e,r,o)=>{o.d(r,{FG:()=>p,nV:()=>x,pY:()=>g,pg:()=>h});var n=o(89379),i=o(80045),t=o(93230),s=o(2235),l=o(16491),c=o(82053),a=o(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:r,scroll:o=!1,onScroll:s,sx:l}=e,c=(0,i.A)(e,d);return(0,a.jsx)(t.A,(0,n.A)((0,n.A)({spacing:1.25,onScroll:s,sx:(0,n.A)((0,n.A)({p:1.5},o&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},c),{},{children:r}))},h=e=>{let{accent:r="#662582",header:o,footer:i,selected:t=!1,onClick:c,children:d,sx:x}=e;return(0,a.jsxs)(s.A,{elevation:0,onClick:c,sx:(0,n.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:t?r:"#e2e8f0",background:t?"".concat(r,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,a.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:r}}),(0,a.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[o,d,i]})]})},p=e=>{let{children:r,columns:o=2,sx:i}=e;return(0,a.jsx)(l.A,{sx:(0,n.A)({display:"grid",gridTemplateColumns:"repeat(".concat(o,", minmax(0, 1fr))"),gap:1,mt:1.25},i),children:r})},g=e=>{let{label:r,value:o,children:n,full:i=!1,align:t="left"}=e;return(0,a.jsxs)(l.A,{sx:{gridColumn:i?"1 / -1":"auto",minWidth:0,textAlign:t},children:[(0,a.jsx)(c.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:r}),(0,a.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==n?n:(0,a.jsx)(c.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==o&&void 0!==o?o:"\u2014"})})]})}},27001:(e,r,o)=>{o.d(r,{A:()=>l});var n=o(93230),i=o(16491),t=o(82053),s=o(44414);function l(e){let{title:r,subtitle:o,live:l=!1,action:c}=e;return(0,s.jsxs)(n.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,s.jsxs)(i.A,{sx:{minWidth:0},children:[(0,s.jsx)(t.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:r}),o&&(0,s.jsxs)(n.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[l&&(0,s.jsx)(i.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,s.jsx)(t.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:o})]})]}),c&&(0,s.jsx)(i.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:c})]})}},36803:(e,r,o)=>{o.d(r,{A:()=>x});var n=o(48089),i=o(50704),t=o(93230),s=o(16491),l=o(82053),c=o(82917),a=o(41413),d=o(44414);function x(e){let{title:r,value:o,icon:x,color:h="#662582",caption:p,loading:g=!1}=e;return(0,d.jsx)(n.A,{sx:{height:"100%"},children:(0,d.jsx)(i.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(t.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(s.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(l.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),g?(0,d.jsx)(c.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(l.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:o}),p&&(0,d.jsx)(l.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:p})]}),x&&(0,d.jsx)(a.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},56311:(e,r,o)=>{o.d(r,{A:()=>p});var n=o(89379),i=o(9950),t=o(2660),s=o(2046),l=o(83274),c=o(25333),a=o(97125),d=o(7762),x=o(52097),h=o(44414);const p=e=>{let{value:r,onChange:o,onDebouncedChange:p,debounceTime:g=500,placeholder:u="Search (ctrl+k)",sx:m}=e;const j=(0,i.useRef)(null),[b]=(0,x.d7)(r,g);return(0,i.useEffect)((()=>{p&&p(b)}),[b,p]),(0,i.useEffect)((()=>{const e=e=>{var r;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(r=j.current)||void 0===r||r.focus());"Escape"===e.key&&document.activeElement===j.current&&j.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(t.A,{sx:(0,n.A)({},m),inputRef:j,placeholder:u,autoComplete:"off",value:r,fullWidth:!0,onChange:e=>o(e.target.value),startAdornment:(0,h.jsx)(s.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(a.A,{})}),endAdornment:(0,h.jsx)(l.A,{title:"Clear",children:(0,h.jsx)(c.A,{sx:{visibility:r?"visible":"hidden"},onClick:()=>o(""),children:(0,h.jsx)(d.A,{})})})})}},59212:(e,r,o)=>{o.d(r,{A:()=>h});var n=o(89379),i=o(9950),t=o(93230),s=o(41413),l=o(77922),c=o(29925),a=o(26910),d=o(31222),x=o(44414);const h=(0,i.forwardRef)(((e,r)=>{let{setAppId:o,setLocoName:h,setPage:p,sx:g,textfeildSx:u,textfieldSx:m,pill:j=!1,accentColor:b="#6366f1",icon:A,placeholder:f="Select Zone",paperComponent:v}=e;const[w,S]=(0,i.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,i.useEffect)((()=>{0===w.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const r=await a.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(r.data.status){const e=[...r.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[w.length]);const k=e=>"".concat(b).concat(e),y=k("26"),C=k("18"),I=j?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(y)},"&.Mui-focused fieldset":{borderColor:b,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},z=j&&(0,x.jsx)(t.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(s.A,{sx:{width:24,height:24,bgcolor:C,color:b,transition:"background-color 0.15s, color 0.15s"},children:A||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:w||[],getOptionLabel:e=>{var r;return null!==(r=null===e||void 0===e?void 0:e.locationname)&&void 0!==r?r:""},PaperComponent:v,sx:(0,n.A)({},g),onChange:(e,r,n)=>{"clear"===n?(null===o||void 0===o||o(0),null===h||void 0===h||h(""),null===p||void 0===p||p(0)):r&&(null===o||void 0===o||o(r.applocationid),null===h||void 0===h||h(r.locationname),null===p||void 0===p||p(0))},renderInput:e=>j?(0,x.jsx)(c.A,(0,n.A)((0,n.A)({},e),{},{inputRef:r,placeholder:f,InputProps:(0,n.A)((0,n.A)({},e.InputProps),{},{startAdornment:z}),sx:(0,n.A)((0,n.A)({},I),m||u||{})})):(0,x.jsx)(c.A,(0,n.A)((0,n.A)({},e),{},{inputRef:r,label:"Select Zones",sx:(0,n.A)({},m||u||{})}))})}))},96646:(e,r,o)=>{o.d(r,{r:()=>c});var n=o(9213),i=o(21671),t=o(82917),s=o(93230),l=o(44414);const c=e=>{let{rowsPerPage:r=5,col:o=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(r)).map(((e,r)=>(0,l.jsxs)(n.A,{children:[(0,l.jsx)(i.A,{children:(0,l.jsx)(t.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(i.A,{children:(0,l.jsx)(t.A,{variant:"text",width:30})}),Array.from({length:o}).map(((e,r)=>(0,l.jsx)(i.A,{children:(0,l.jsxs)(s.A,{spacing:.5,children:[(0,l.jsx)(t.A,{variant:"text",width:100}),(0,l.jsx)(t.A,{variant:"text",width:80})]})},r))),(0,l.jsx)(i.A,{children:(0,l.jsx)(t.A,{variant:"text",width:150})}),(0,l.jsx)(i.A,{children:(0,l.jsx)(t.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(i.A,{align:"center",children:(0,l.jsxs)(s.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(t.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(t.A,{variant:"circular",width:28,height:28})]})})]},r)))})}},97157:(e,r,o)=>{o.r(r),o.d(r,{default:()=>Q});var n=o(89379),i=o(9950),t=o(2235),s=o(41413),l=o(82053),c=o(16491),a=o(14857),d=o(47223),x=o(60899),h=o(93230),p=o(1320),g=o(15769),u=o(69780),m=o(9213),j=o(21671),b=o(34075),A=o(31222),f=o(36150),v=o(52351),w=o(56311),S=o(59212),k=o(27001),y=o(36803),C=o(23787),I=o(96646),z=o(81425),W=o(44414);const R=14,M=10,P="0 12px 32px rgba(15, 23, 42, 0.12)",L="#0f172a",B="#64748b",N="#94a3b8",F="#e2e8f0",T="#cbd5e1",D="#f1f5f9",E="#ffffff",H="#f8fafc",J=(e,r)=>"".concat(e).concat(r),K=e=>J(e,"08"),O=e=>J(e,"18"),Y=e=>J(e,"55"),Z="#662582",G=e=>(0,W.jsx)(t.A,(0,n.A)((0,n.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:P,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),X=e=>{let{color:r,selected:o,size:n=24,children:i}=e;return(0,W.jsx)(s.A,{sx:{width:n,height:n,bgcolor:o?r:O(r),color:o?"#fff":r,transition:"background-color 0.15s, color 0.15s"},children:i})},$=e=>new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(Number(e)||0),_=e=>new Intl.NumberFormat("en-IN",{minimumFractionDigits:2}).format(Number(e)||0),V=e=>{let{label:r}=e;return(0,W.jsx)(l.A,{component:"span",sx:{fontSize:13.5,fontWeight:700,color:L,whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:r})},q=e=>{let{icon:r,label:o}=e;return(0,W.jsxs)(c.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:8,bgcolor:H,border:"1px solid ".concat(F),color:L,fontSize:12,fontWeight:600,whiteSpace:"nowrap"},children:[(0,W.jsx)(c.A,{component:"span",sx:{display:"inline-flex",color:N},children:r}),o]})},Q=()=>{const e=(0,a.A)(),r=(0,d.A)(e.breakpoints.down("md")),o=(0,i.useRef)(),[n,P]=(0,i.useState)(0),[Q,U]=(0,i.useState)("All"),[ee,re]=(0,i.useState)(""),[oe,ne]=(0,i.useState)(""),{data:ie=[],isLoading:te}=(0,f.I)({queryKey:["getallpricing",n],queryFn:z.OM,keepPreviousData:!0}),se=(0,i.useMemo)((()=>{if(!oe)return ie;const e=oe.toLowerCase().trim();return ie.filter((r=>[r.applocation,r.appname,r.slab,String(r.pricingid)].filter(Boolean).some((r=>String(r).toLowerCase().includes(e)))))}),[ie,oe]),le=(0,i.useMemo)((()=>{const e=ie.length;return{total:e,tenants:new Set(ie.map((e=>e.appname)).filter(Boolean)).size,avgBase:e?ie.reduce(((e,r)=>e+(Number(r.baseprice)||0)),0)/e:0}}),[ie]),ce=[{key:"total",label:"Total Pricing Slabs",color:Z,icon:A.x2E,value:le.total},{key:"tenants",label:"Tenants Priced",color:"#0ea5e9",icon:A.AYP,value:le.tenants},{key:"avg",label:"Avg Base Price",color:"#f59e0b",icon:A.X3k,value:$(le.avgBase)},{key:"zone",label:"Active Zone",color:"#10b981",icon:A.XXh,value:Q||"All Zones"}];return(0,W.jsxs)(W.Fragment,{children:[te&&(0,W.jsx)(v.A,{}),(0,W.jsx)(k.A,{title:"Pricing",subtitle:"Live \xb7 ".concat(Q||"All Zones"),live:!0,action:(0,W.jsx)(S.A,{locaName:Q,setAppId:P,setLocoName:U,pill:!0,accentColor:Z,icon:(0,W.jsx)(A.HPi,{size:14}),placeholder:"Select Zone",paperComponent:G,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,W.jsx)(x.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:ce.map((e=>{const r=e.icon;return(0,W.jsx)(x.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,W.jsx)(y.A,{title:e.label,value:e.value,icon:(0,W.jsx)(r,{size:20}),color:e.color})},e.key)}))}),(0,W.jsx)(t.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:R/8,borderTopRightRadius:R/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:F,borderBottom:0,background:"#fff"},children:(0,W.jsxs)(h.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,W.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1.25,children:[(0,W.jsx)(X,{color:Z,size:32,children:(0,W.jsx)(A.JL6,{size:18})}),(0,W.jsxs)(h.A,{children:[(0,W.jsx)(l.A,{variant:"caption",sx:{fontWeight:800,color:B,letterSpacing:.6,textTransform:"uppercase"},children:"Pricing Catalog"}),(0,W.jsxs)(l.A,{variant:"body2",sx:{color:L,fontWeight:700},children:[ie.length," total \xb7 ",se.length," shown"]})]})]}),(0,W.jsx)(c.A,{sx:{width:{xs:"100%",sm:280,lg:340},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,W.jsx)(w.A,{value:ee,onChange:re,onDebouncedChange:ne,placeholder:"Search pricing (ctrl+k)",sx:{m:0,width:"100%",borderRadius:M+"px",bgcolor:E,"& fieldset":{borderColor:F,borderWidth:1},"&:hover fieldset":{borderColor:T},"&.Mui-focused fieldset":{borderColor:Z,borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat((ae=Z,J(ae,"26")))}}})})]})}),(0,W.jsx)(t.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:R/8,borderBottomRightRadius:R/8,border:"1px solid",borderColor:F,overflow:"hidden",background:"#fff"},children:r?0!==se.length||te?(0,W.jsx)(C.nV,{scroll:!0,children:se.map(((e,r)=>{var o;return(0,W.jsxs)(C.pg,{accent:Z,header:(0,W.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,W.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,W.jsx)(X,{color:Z,size:36,children:(0,W.jsx)(A.Itr,{size:18})}),(0,W.jsxs)(h.A,{sx:{minWidth:0},children:[(0,W.jsx)(l.A,{variant:"subtitle2",sx:{fontWeight:700,color:L},noWrap:!0,children:e.appname||"\u2014"}),(0,W.jsxs)(l.A,{variant:"caption",sx:{color:B},children:["ID #",e.pricingid]})]})]}),(0,W.jsx)(l.A,{variant:"caption",sx:{fontWeight:700,color:N,flexShrink:0},children:String(r+1).padStart(2,"0")})]}),children:[(0,W.jsxs)(h.A,{direction:"row",spacing:.75,sx:{mt:1,flexWrap:"wrap",gap:.75},children:[e.applocation?(0,W.jsxs)(c.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:K("#10b981"),border:"1px solid ".concat(Y("#10b981")),color:"#10b981",fontSize:11,fontWeight:800},children:[(0,W.jsx)(A.JFD,{size:12})," ",e.applocation]}):null,(0,W.jsxs)(c.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:K("#0ea5e9"),border:"1px solid ".concat(Y("#0ea5e9")),color:"#0ea5e9",fontSize:11,fontWeight:800},children:[(0,W.jsx)(A.BJM,{size:12})," ",e.slab||"\u2014"]})]}),(0,W.jsxs)(C.FG,{children:[(0,W.jsx)(C.pY,{label:"Base Price",children:(0,W.jsx)(V,{color:Z,icon:(0,W.jsx)(A.bmp,{size:12}),label:$(e.baseprice)})}),(0,W.jsx)(C.pY,{label:"Price / KM",children:(0,W.jsx)(V,{color:"#10b981",icon:(0,W.jsx)(A.H4F,{size:12}),label:$(e.priceperkm)})}),(0,W.jsx)(C.pY,{label:"Min KM",children:(0,W.jsx)(V,{color:"#f59e0b",icon:(0,W.jsx)(A.xI$,{size:12}),label:"".concat(_(e.minkm)," km")})}),(0,W.jsx)(C.pY,{label:"Max KM",children:(0,W.jsx)(V,{color:"#ef4444",icon:(0,W.jsx)(A.xI$,{size:12}),label:"".concat(_(e.maxkm)," km")})}),(0,W.jsx)(C.pY,{label:"Min Orders",children:(0,W.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,W.jsx)(A.GdF,{size:14,color:N}),(0,W.jsx)(l.A,{variant:"subtitle2",sx:{fontWeight:700,color:L},children:null!==(o=e.minorder)&&void 0!==o?o:"\u2014"})]})})]})]},e.pricingid||"".concat(e.appname,"-").concat(r))}))}):(0,W.jsxs)(h.A,{alignItems:"center",spacing:1.5,sx:{py:6,px:2},children:[(0,W.jsx)(s.A,{sx:{width:64,height:64,bgcolor:O("#94a3b8"),color:N},children:(0,W.jsx)(A.JL6,{size:28})}),(0,W.jsx)(l.A,{variant:"subtitle1",sx:{fontWeight:700,color:L},children:"No pricing to show"}),(0,W.jsx)(l.A,{variant:"caption",sx:{color:B,textAlign:"center"},children:ee?"Try a different keyword.":"Pick a zone above to load the catalog."})]}):(0,W.jsx)(p.A,{ref:o,sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:Y(Z),borderRadius:8,"&:hover":{backgroundColor:Z}},"&::-webkit-scrollbar-track":{backgroundColor:H}},children:(0,W.jsxs)(g.A,{stickyHeader:!0,sx:{minWidth:{xs:860,md:1080}},children:[(0,W.jsx)(u.A,{children:(0,W.jsxs)(m.A,{sx:{"& th":{backgroundColor:H,color:B,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(F),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,W.jsx)(j.A,{children:"#"}),(0,W.jsx)(j.A,{children:"Tenant"}),(0,W.jsx)(j.A,{children:"Zone"}),(0,W.jsx)(j.A,{children:"Slab"}),(0,W.jsx)(j.A,{align:"center",children:"Base Price"}),(0,W.jsx)(j.A,{align:"center",children:"Min KM"}),(0,W.jsx)(j.A,{align:"center",children:"Price / KM"}),(0,W.jsx)(j.A,{align:"center",children:"Max KM"}),(0,W.jsx)(j.A,{align:"center",children:"Min Orders"})]})}),(0,W.jsxs)(b.A,{children:[te&&(0,W.jsx)(I.r,{col:5}),0!==se.length||te?se.map(((e,r)=>{var o;return(0,W.jsxs)(m.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(D),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:H}},children:[(0,W.jsx)(j.A,{children:(0,W.jsx)(l.A,{variant:"caption",sx:{fontWeight:700,color:N},children:String(r+1).padStart(2,"0")})}),(0,W.jsx)(j.A,{children:(0,W.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,W.jsx)(X,{color:Z,size:36,children:(0,W.jsx)(A.Itr,{size:18})}),(0,W.jsxs)(h.A,{children:[(0,W.jsx)(l.A,{variant:"subtitle2",sx:{fontWeight:700,color:L,whiteSpace:"nowrap"},children:e.appname||"\u2014"}),(0,W.jsxs)(l.A,{variant:"caption",sx:{color:B},children:["ID #",e.pricingid]})]})]})}),(0,W.jsx)(j.A,{children:e.applocation?(0,W.jsx)(q,{icon:(0,W.jsx)(A.JFD,{size:12}),label:e.applocation}):(0,W.jsx)(l.A,{variant:"caption",sx:{color:N},children:"\u2014"})}),(0,W.jsx)(j.A,{children:(0,W.jsx)(q,{icon:(0,W.jsx)(A.BJM,{size:12}),label:e.slab||"\u2014"})}),(0,W.jsx)(j.A,{align:"center",children:(0,W.jsx)(V,{color:Z,icon:(0,W.jsx)(A.bmp,{size:12}),label:$(e.baseprice),width:110})}),(0,W.jsx)(j.A,{align:"center",children:(0,W.jsx)(V,{color:"#f59e0b",icon:(0,W.jsx)(A.xI$,{size:12}),label:"".concat(_(e.minkm)," km"),width:90})}),(0,W.jsx)(j.A,{align:"center",children:(0,W.jsx)(V,{color:"#10b981",icon:(0,W.jsx)(A.H4F,{size:12}),label:$(e.priceperkm),width:110})}),(0,W.jsx)(j.A,{align:"center",children:(0,W.jsx)(V,{color:"#ef4444",icon:(0,W.jsx)(A.xI$,{size:12}),label:"".concat(_(e.maxkm)," km"),width:90})}),(0,W.jsx)(j.A,{align:"center",children:(0,W.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"center",spacing:.5,children:[(0,W.jsx)(A.GdF,{size:14,color:N}),(0,W.jsx)(l.A,{variant:"subtitle2",sx:{fontWeight:700,color:L,whiteSpace:"nowrap"},children:null!==(o=e.minorder)&&void 0!==o?o:"\u2014"})]})})]},e.pricingid||"".concat(e.appname,"-").concat(r))})):(0,W.jsx)(m.A,{children:(0,W.jsx)(j.A,{colSpan:9,sx:{py:6},children:(0,W.jsxs)(h.A,{alignItems:"center",spacing:1.5,children:[(0,W.jsx)(s.A,{sx:{width:64,height:64,bgcolor:O("#94a3b8"),color:N},children:(0,W.jsx)(A.JL6,{size:28})}),(0,W.jsx)(l.A,{variant:"subtitle1",sx:{fontWeight:700,color:L},children:"No pricing to show"}),(0,W.jsx)(l.A,{variant:"caption",sx:{color:B},children:ee?"Try a different keyword.":"Pick a zone above to load the catalog."})]})})})]})]})})})]});var ae}}}]); \ No newline at end of file diff --git a/build/static/js/8846.23c0ba58.chunk.js b/build/static/js/8846.23c0ba58.chunk.js deleted file mode 100644 index ab7d9e7..0000000 --- a/build/static/js/8846.23c0ba58.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[8846],{11041:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ce});var o=r(89379),n=r(9950),i=r(26910),a=r(60010),l=r(36150),s=r(2235),c=r(41413),d=r(83274),x=r(16491),h=r(93230),u=r(82917),p=r(82053),m=r(47223),g=r(55158),f=r(60899),b=r(77922),v=r(29925),A=r(82223),j=r(1320),y=r(25333),w=r(15769),S=r(69780),k=r(9213),D=r(21671),M=r(34075),C=r(74745),z=r(96583),I=r(40033),W=r(28170),P=r(25277),R=r(79739),Y=r(14857),T=r(31222),L=r(43302),N=r(99810),O=r(49029),F=r(47113),E=r(33516),K=r(82215),H=r(2527),_=r.n(H),B=(r(55392),r(4159)),q=r.n(B),J=r(57560),Z=r(94826),G=r(44414),U=r(36220);q().extend(U);const V=new(_().Icon)({iconUrl:"https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-green.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],shadowSize:[41,41]}),$=new(_().Icon)({iconUrl:"https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],shadowSize:[41,41]}),X=e=>{let{coordinates:t,additionalProps:r,order:o,setMapOpen:i}=e;console.log("additionalProps",r);const a=(0,n.useRef)(null),l=(0,Y.A)(),[s,c]=(0,n.useState)([]),[d,u]=(0,n.useState)(!1);if((0,n.useEffect)((()=>{if(a.current&&t.length>0){const e=[[Math.min(...t.map((e=>e.lat))),Math.min(...t.map((e=>e.lng)))],[Math.max(...t.map((e=>e.lat))),Math.max(...t.map((e=>e.lng)))]];a.current.fitBounds(e)}}),[t]),(0,n.useEffect)((()=>{(async()=>{if(u(!0),t.length<2)return c([]),void u(!1);const e=(e,t)=>{if(e.length<=t)return e;const r=Math.ceil(e.length/t),o=e.filter(((e,t)=>t%r===0)),n=e[e.length-1];return o[o.length-1]!==n&&o.push(n),o};try{const r=e(t,90).map((e=>"".concat(e.lng,",").concat(e.lat))).join(";"),o="https://router.project-osrm.org/match/v1/driving/".concat(r,"?overview=full&geometries=geojson&gaps=ignore&tidy=true"),n=await fetch(o),i=await n.json();if(i.matchings&&i.matchings.length>0){const e=i.matchings.flatMap((e=>{var t;return((null===(t=e.geometry)||void 0===t?void 0:t.coordinates)||[]).map((e=>{let[t,r]=e;return{lat:r,lng:t}}))}));if(e.length>=2)return c(e),void u(!1)}}catch(r){console.warn("OSRM Match error, trying route fallback:",r)}try{const r=e(t,25).map((e=>"".concat(e.lng,",").concat(e.lat))).join(";"),o="https://router.project-osrm.org/route/v1/driving/".concat(r,"?overview=full&geometries=geojson"),n=await fetch(o),i=await n.json();if(i.routes&&i.routes[0]){const e=i.routes[0].geometry.coordinates.map((e=>{let[t,r]=e;return{lat:r,lng:t}}));c(e)}else c(t)}catch(o){console.error("OSRM Route fallback error:",o),c(t)}finally{u(!1)}})()}),[t]),!t||0===t.length)return null;const m=t[0],g=t[t.length-1],f=t[Math.floor(t.length/2)],b=e=>{let{label:t,value:r}=e;return(0,G.jsxs)(h.A,{direction:"row",spacing:1,alignItems:"center",children:[(0,G.jsxs)(p.A,{variant:"subtitle1",sx:{fontWeight:600},children:[t,":"]}),(0,G.jsx)(P.A,{label:r||"0.00",color:"primary",sx:{fontWeight:700}})]})};return(0,G.jsxs)(x.A,{sx:{width:"100%",height:"100vh",position:"relative",overflow:"hidden"},children:[d&&(0,G.jsx)(Z.A,{}),(0,G.jsx)(P.A,{label:"Close",icon:(0,G.jsx)(J.A,{style:{fontSize:18}}),onClick:()=>i(!1),sx:{position:"absolute",top:12,right:12,zIndex:2e3,bgcolor:l.palette.error.main,color:"#fff",fontWeight:600,borderRadius:"12px",px:1.5,py:.5,boxShadow:l.shadows[4],cursor:"pointer","& .MuiChip-icon":{color:"#fff"}}}),(0,G.jsxs)(N.W,{center:f,zoom:14,scrollWheelZoom:!0,style:{height:"100%",width:"100%"},ref:a,children:[(0,G.jsx)(O.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),(0,G.jsx)(F.p,{position:m,icon:V,children:(0,G.jsx)(E.m,{direction:"bottom",children:"Pickup: ".concat(q()(r.riderStart).format("DD-MM-YYYY hh:mm A"))})}),(0,G.jsx)(F.p,{position:g,icon:$,children:(0,G.jsx)(E.m,{direction:"bottom",children:"Drop: ".concat(q()(r.riderEnd).format("DD-MM-YYYY hh:mm A"))})}),s.length>0&&(0,G.jsx)(K.R,{positions:s,pathOptions:{color:"blue",weight:5}})]}),(0,G.jsx)(x.A,{sx:{position:"absolute",bottom:0,width:"100%",bgcolor:"rgba(255,255,255,0.96)",p:2,boxShadow:l.shadows[3],zIndex:1500},children:(0,G.jsxs)(h.A,{direction:"row",flexWrap:"wrap",rowGap:1.5,columnGap:3,alignItems:"center",children:[(0,G.jsx)(b,{label:"Tenant",value:null===o||void 0===o?void 0:o.tenantname}),(0,G.jsx)(b,{label:"Rider",value:null===o||void 0===o?void 0:o.ridername}),(0,G.jsx)(b,{label:"Pickup",value:null===o||void 0===o?void 0:o.pickupcustomer}),(0,G.jsx)(b,{label:"Drop",value:null===o||void 0===o?void 0:o.deliverycustomer}),(0,G.jsx)(b,{label:"Kms",value:null===o||void 0===o?void 0:o.kms}),(0,G.jsx)(b,{label:"Actual Kms",value:null===o||void 0===o?void 0:o.actualkms}),(0,G.jsx)(b,{label:"Rider Kms",value:null===o||void 0===o?void 0:o.riderkms})]})})]})};var Q=r(81425),ee=r(90376),te=r(52351),re=r(8881),oe=r(35678),ne=r(56311),ie=r(58691),ae=r(59212),le=r(20466);function se(e){let{rows:t=5,columns:r=6,height:o=40}=e;return(0,G.jsx)(G.Fragment,{children:[...Array(t)].map(((e,t)=>(0,G.jsx)(k.A,{children:[...Array(r)].map(((e,t)=>(0,G.jsx)(D.A,{children:(0,G.jsx)(u.A,{variant:"rectangular",height:o,width:70,animation:"wave"})},t)))},t)))})}var ce=r(23787),de=r(36220);q().extend(de);const xe=(e,t,r)=>{(0,re.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:r||1500})},he={radiusPill:999,radiusCard:16,shadowSoft:"0 14px 40px rgba(15, 23, 42, 0.10)",shadowMd:"0 8px 24px rgba(15, 23, 42, 0.08)",shadowPop:"0 18px 50px rgba(15, 23, 42, 0.18)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},ue=(e,t)=>"".concat(e).concat(t),pe=e=>ue(e,"08"),me=e=>ue(e,"18"),ge=e=>ue(e,"26"),fe=e=>ue(e,"55"),be="#662582",ve="#9255AB",Ae=e=>(0,G.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:he.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),je=e=>{let{color:t,selected:r,size:o=24,children:n}=e;return(0,G.jsx)(c.A,{sx:{width:o,height:o,bgcolor:r?t:me(t),color:r?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:n})},ye=e=>({"& .MuiOutlinedInput-root":{borderRadius:he.radiusPill+"px",bgcolor:pe(e),fontWeight:600,"& fieldset":{borderColor:fe(e),borderWidth:1.5},"&:hover fieldset":{borderColor:e},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(ge(e))},"&.Mui-focused fieldset":{borderColor:e,borderWidth:2}}}),we={all:{label:"All",color:be,icon:T.YBc},pending:{label:"Pending",color:"#f59e0b",icon:T.tX0},accepted:{label:"Accepted",color:"#6366f1",icon:T.Azs},arrived:{label:"Arrived",color:"#06b6d4",icon:T.gwi},picked:{label:"Picked",color:"#8b5cf6",icon:T.gsJ},active:{label:"Active",color:"#14b8a6",icon:T.pk7},delivered:{label:"Delivered",color:"#10b981",icon:T.mU9},skipped:{label:"Skipped",color:"#f97316",icon:T.ivF},cancelled:{label:"Cancelled",color:"#ef4444",icon:T.uDv}},Se=["all","pending","accepted","arrived","picked","active","delivered","skipped","cancelled"],ke=e=>{let{color:t,icon:r,label:o,tooltip:n}=e;return(0,G.jsx)(d.A,{title:n||"",placement:"top",children:(0,G.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:pe(t),border:"1px solid ".concat(fe(t)),color:t,fontSize:11,fontWeight:800,minWidth:80,justifyContent:"center",whiteSpace:"nowrap"},children:[r,o]})})},De=e=>{let{value:t,formatDate:r,formatTime:o,success:n}=e;return t?(0,G.jsxs)(h.A,{spacing:.25,children:[(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textSecondary,fontWeight:600,whiteSpace:"nowrap"},children:r(t)}),(0,G.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textPrimary,fontWeight:800,whiteSpace:"nowrap"},children:o(t)}),n&&(0,G.jsx)(L.cxC,{style:{color:"#10b981",fontSize:12}})]})]}):(0,G.jsxs)(h.A,{spacing:.5,children:[(0,G.jsx)(u.A,{animation:!1,variant:"text",width:70,height:12}),(0,G.jsx)(u.A,{animation:!1,variant:"text",width:55,height:14})]})};function Me(e,t){const r=e=>e*Math.PI/180,o=r(e[0]),n=r(t[0]),i=r(t[0]-e[0]),a=r(t[1]-e[1]),l=Math.sin(i/2)**2+Math.cos(o)*Math.cos(n)*Math.sin(a/2)**2;return 12742*Math.asin(Math.min(1,Math.sqrt(l)))}function Ce(){const e=(0,Y.A)(),t=(0,m.A)(e.breakpoints.down("md")),r=(0,n.useRef)(),u=(0,n.useRef)(),L=(0,n.useRef)(null),N=(0,n.useRef)(null),O=localStorage.getItem("userid"),[F,E]=(0,n.useState)(0),[K,H]=(0,n.useState)(50),[_,B]=(0,n.useState)("All"),[J,U]=(0,n.useState)(q()().format("YYYY-MM-DD")),[V,$]=(0,n.useState)(q()().format("YYYY-MM-DD")),[de,ue]=(0,n.useState)(!1),[Ce,ze]=(0,n.useState)(!1),[Ie,We]=(0,n.useState)("Today"),[Pe,Re]=(0,n.useState)(0),[Ye,Te]=(0,n.useState)(""),[Le,Ne]=(0,n.useState)(""),[Oe,Fe]=(0,n.useState)([]),[Ee,Ke]=(0,n.useState)(),[He,_e]=(0,n.useState)(),[Be,qe]=(0,n.useState)({}),[Je,Ze]=(0,n.useState)(!1);let[Ge,Ue]=(0,n.useState)(0),[Ve,$e]=(0,n.useState)(0),[Xe,Qe]=(0,n.useState)(0),[et,tt]=(0,n.useState)(0),[rt,ot]=(0,n.useState)(0),[nt,it]=(0,n.useState)(0),[at,lt]=(0,n.useState)(0),[st,ct]=(0,n.useState)(0),[dt,xt]=(0,n.useState)(0);const[ht,ut]=(0,n.useState)("All"),[pt,mt]=(0,n.useState)(0),[gt,ft]=(0,n.useState)(0),[bt,vt]=(0,n.useState)(null),[At,jt]=(0,n.useState)(null),[yt,wt]=(0,n.useState)(),[St,kt]=(0,n.useState)(null),[Dt,Mt]=(0,n.useState)(!1),[Ct,zt]=(0,n.useState)(!1),It={all:Ge,pending:Xe,accepted:rt,arrived:st,picked:nt,active:at,delivered:Ve,skipped:dt,cancelled:et};function Wt(e,t,r,o){const n=(r-e)*(Math.PI/180),i=(o-t)*(Math.PI/180),a=Math.sin(n/2)*Math.sin(n/2)+Math.cos(e*(Math.PI/180))*Math.cos(r*(Math.PI/180))*Math.sin(i/2)*Math.sin(i/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))}(0,n.useEffect)((()=>{ft(0),vt(null),mt(0),jt(null),wt(null),kt(null)}),[Pe]),(0,n.useEffect)((()=>{mt(0),jt(null),kt(null)}),[gt]),(0,n.useEffect)((()=>{kt(null)}),[pt]);const Pt=async e=>{zt(!0);try{const t=(await i.A.get("".concat("https://jupiter.nearle.app/live/api/v3","/deliveries/getdeliverylogs/?deliveryid=").concat(e))).data.details;if(Array.isArray(t)&&0!==t.length){const e=t.map((e=>{var t,r,o;const n=null!==e&&void 0!==e&&e.logdate?q()(e.logdate):null;return{lat:parseFloat(null!==(t=null===e||void 0===e?void 0:e.latitude)&&void 0!==t?t:null===e||void 0===e?void 0:e.lat),lng:parseFloat(null!==(r=null!==(o=null===e||void 0===e?void 0:e.longitude)&&void 0!==o?o:null===e||void 0===e?void 0:e.lng)&&void 0!==r?r:null===e||void 0===e?void 0:e.lon),logdate:null===e||void 0===e?void 0:e.logdate,_ts:n&&n.isValid()?n.valueOf():Number.MAX_SAFE_INTEGER}})).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng))).sort(((e,t)=>e._ts-t._ts));if(0!==e.length){Ke(e[0].logdate),_e(e[e.length-1].logdate);const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return[];const r=e.filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&(Math.abs(e.lat)>.1||Math.abs(e.lng)>.1)));if(0===r.length)return[];if(1===r.length)return[{lat:r[0].lat,lng:r[0].lng,logdate:r[0].logdate,_ts:r[0]._ts}];const o=null!=t.processNoise?t.processNoise:1e-10,n=null!=t.measurementNoise?t.measurementNoise:2e-9,i=null!=t.outlierGate?t.outlierGate:9,a=null!=t.maxSpeedKmh?t.maxSpeedKmh:120,l=e=>e._ts||(e.logdate?new Date(e.logdate).getTime():0);let s=0;for(;sa||(c.push(e),d=t)}if(c.length<2)return c.map((e=>({lat:e.lat,lng:e.lng,logdate:e.logdate,_ts:e._ts})));const x=e=>{const t=c.length,r=new Array(t),a=new Array(t),s=new Array(t),d=new Array(t),x=new Array(t),h=l(c[0]),u=l(c[1]),p=Math.max(.1,(u-h)/1e3),m=(c[1][e]-c[0][e])/p;r[0]=[c[0][e],m],a[0]=[n,0,0,1],s[0]=r[0].slice(),d[0]=a[0].slice(),x[0]=0;let g=h;for(let b=1;bi){r[b]=[m,f],a[b]=[k,D,M,C];continue}const W=k/I,P=M/I,R=m+W*z,Y=f+P*z;r[b]=[R,Y],a[b]=[(1-W)*k,(1-W)*D,M-P*k,C-P*D]}const f=new Array(t);f[t-1]=r[t-1].slice();for(let o=t-2;o>=0;o--){const e=x[o+1],[t,n,i,l]=a[o],c=t+e*n,h=n,u=i+e*l,p=l,[m,g,b,v]=d[o+1],A=m*v-g*b;if(!Number.isFinite(A)||Math.abs(A)<1e-30){f[o]=r[o].slice();continue}const j=v/A,y=-g/A,w=-b/A,S=m/A,k=c*j+h*w,D=c*y+h*S,M=u*j+p*w,C=u*y+p*S,z=f[o+1][0]-s[o+1][0],I=f[o+1][1]-s[o+1][1];f[o]=[r[o][0]+k*z+D*I,r[o][1]+M*z+C*I]}return f.map((e=>e[0]))},h=x("lat"),u=x("lng");return c.map(((e,t)=>({lat:h[t],lng:u[t],logdate:e.logdate,_ts:e._ts})))}(e),r=t.map((e=>({lat:e.lat,lng:e.lng})));Fe(r),function(e){let t=0;for(let r=0;r{var t;return null!==(t=e.nextPage)&&void 0!==t?t:void 0},refetchOnWindowFocus:!0,refetchOnMount:!0,refetchOnReconnect:!0}),Et=(null===Rt||void 0===Rt?void 0:Rt.pages.flatMap((e=>e.rows)))||[];(0,n.useEffect)((()=>{if(!Ot)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Nt()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return r.current&&e.observe(r.current),()=>{r.current&&e.unobserve(r.current)}}),[Ot,Nt]);const{data:Kt,isLoading:Ht,isError:_t,error:Bt}=(0,l.I)({queryKey:["tenantlist",Pe],queryFn:()=>(0,Q.Mn)(Pe),enabled:0!==Pe}),{data:qt,isLoading:Jt,isError:Zt,error:Gt}=(0,l.I)({queryKey:["fetchRidersList",Pe],queryFn:Q.Sd,enabled:0!==Pe}),{data:Ut,isLoading:Vt,isError:$t,error:Xt}=(0,l.I)({queryKey:["gettenantlocations",gt],queryFn:()=>(0,Q.DL)(gt),enabled:0!==gt});(0,n.useEffect)((()=>{(async()=>{Ze(!0);try{await i.A.get(0==Pe?"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/deliverysummary/?fromdate=").concat(J,"&todate=").concat(V):"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/deliverysummary/?applocationid=").concat(Pe,"&tenantid=").concat(gt,"&locationid=").concat(pt,"&fromdate=").concat(J,"&todate=").concat(V,"&userid=").concat((null===yt||void 0===yt?void 0:yt.userid)||0)).then((e=>{Ue(e.data.details.total),Qe(e.data.details.pending),ot(e.data.details.accepted),ct(e.data.details.arrived),it(e.data.details.picked),lt(e.data.details.active),$e(e.data.details.delivered),xt(e.data.details.skipped),tt(e.data.details.cancelled)})).catch((e=>{(0,re.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}))}catch(e){console.log(e)}finally{Ze(!1)}})()}),[Pe,J,V,ht,gt,pt,yt]);const Qt=null===Et||void 0===Et?void 0:Et.map((e=>({tenantname:e.tenantname,tenantcity:e.tenantcity,tenantcontactno:e.tenantcontactno,rider:e.ridername,orderid:e.orderid,paymenttype:64==e.paymenttype?"Pay Later":42==e.paymenttype?"Pay on Delivery":"Digital",deliverydate:e.deliverydate,orderstatus:e.orderstatus,ordernotes:e.ordernotes,kms:e.kms,cumulativekms:e.cumulativekms,assigntime:e.assigntime,starttime:e.starttime,arrivaltime:e.arrivaltime,pickuptime:e.pickuptime,deliverytime:e.deliverytime,canceltime:e.canceltime,deliverycharge:e.deliverycharges,deliveryamt:e.deliveryamt,pickupcustomer:e.pickupcustomer,pickupcontactno:e.pickupcontactno,Pickupaddress:e.pickupaddress,pickupsuburb:e.pickupsuburb,pickupcity:e.applocation,pickuplat:e.pickuplat,pickuplong:e.pickuplon,deliverycustomer:e.deliverycustomer,deliverycontactno:e.deliverycontactno,deliveryaddress:e.deliveryaddress,deliverysuburb:e.locationsuburb,deliverylat:e.deliverylat,deliverylong:e.deliverylong,locationname:e.locationname,locationsuburb:e.pickuplocation,deliverylocation:e.deliverylocation,locationcontactno:e.locationcontactno})));function er(e){return q()(e).format("DD/MM/YYYY ")}function tr(e){return q()(e).format(" hh:mm A")}const rr=Tt?"An error has occurred: (fetchDeliveries) ".concat(Lt.message):_t?"An error has occurred: (getTenants) ".concat(Bt.message):$t?"An error has occurred: (gettenantlocations) ".concat(Xt.message):Zt?"An error has occurred: (getriderbydelivery) ".concat(Gt.message):null;(0,n.useEffect)((()=>{rr&&xe(rr,"warning",2e3)}),[rr]);const or=[{key:"total",label:"Total Orders",color:be,icon:T.F6S,value:Ge},{key:"delivered",label:"Delivered",color:"#10b981",icon:T.mU9,value:Ve},{key:"pending",label:"Pending",color:"#f59e0b",icon:T.tX0,value:Xe},{key:"cancelled",label:"Cancelled",color:"#ef4444",icon:T.uDv,value:et}];return(0,G.jsxs)(G.Fragment,{children:[(Je||Ht||Vt||Ct||Jt||Ft)&&(0,G.jsx)("div",{children:(0,G.jsx)(te.A,{})}),Yt&&(0,G.jsx)(g.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:Yt}),(0,G.jsx)(s.A,{elevation:0,sx:{mb:{xs:1.5,md:2},p:{xs:1.5,sm:2,md:2.5},borderRadius:he.radiusCard/8,border:"1px solid",borderColor:he.borderSubtle,background:"linear-gradient(135deg, ".concat(pe(be)," 0%, ").concat(pe(ve)," 100%)"),boxShadow:he.shadowMd},children:(0,G.jsxs)(h.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",spacing:{xs:1.5,sm:2},children:[(0,G.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:{xs:1.25,sm:1.75},children:[(0,G.jsx)(c.A,{sx:{width:{xs:40,sm:48},height:{xs:40,sm:48},bgcolor:be,color:"#fff",boxShadow:"0 6px 18px ".concat(ge(be))},children:(0,G.jsx)(T.Z2J,{size:22})}),(0,G.jsxs)(h.A,{children:[(0,G.jsx)(p.A,{variant:"h3",sx:{fontWeight:800,color:he.textPrimary,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"}},children:"Orders Details"}),(0,G.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[(0,G.jsx)(x.A,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:"#10b981",boxShadow:"0 0 0 4px rgba(16,185,129,0.18)"}}),(0,G.jsxs)(p.A,{variant:"caption",sx:{color:he.textSecondary,fontWeight:600},children:["Live \xb7 ",_||"All Zones"," \xb7 ",Ie]})]})]})]}),(0,G.jsx)(ae.A,{ref:L,locaName:_,setAppId:Re,setLocoName:B,setPage:E,pill:!0,accentColor:be,icon:(0,G.jsx)(T.HPi,{size:14}),placeholder:"Select Zone",paperComponent:Ae,sx:{width:{xs:"100%",sm:280},zIndex:100}})]})}),(0,G.jsx)(f.Ay,{container:!0,spacing:{xs:1.25,sm:1.5,md:2},sx:{mt:"1px"},children:or.map((e=>{const t=e.icon;return(0,G.jsx)(f.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,G.jsxs)(s.A,{elevation:0,sx:{position:"relative",overflow:"hidden",p:{xs:1.25,sm:1.75,md:2.25},borderRadius:he.radiusCard/8,border:"1px solid",borderColor:he.borderSubtle,background:"#fff",transition:"transform 0.2s, box-shadow 0.2s, border-color 0.2s","&:hover":{transform:"translateY(-3px)",boxShadow:he.shadowMd,borderColor:fe(e.color)}},children:[(0,G.jsx)(x.A,{sx:{position:"absolute",top:0,left:0,right:0,height:3,background:"linear-gradient(90deg, ".concat(e.color," 0%, ").concat(me(e.color)," 100%)")}}),(0,G.jsxs)(h.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,G.jsxs)(h.A,{spacing:.5,sx:{minWidth:0,flex:1},children:[(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textSecondary,fontWeight:700,letterSpacing:.4,textTransform:"uppercase",fontSize:{xs:10,sm:11},whiteSpace:"nowrap"},children:e.label}),(0,G.jsx)(p.A,{sx:{fontWeight:800,color:he.textPrimary,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"}},children:e.value})]}),(0,G.jsx)(c.A,{sx:{width:{xs:36,sm:42,md:48},height:{xs:36,sm:42,md:48},bgcolor:me(e.color),color:e.color,boxShadow:"inset 0 0 0 1px ".concat(fe(e.color)),flexShrink:0},children:(0,G.jsx)(t,{size:20})})]})]})},e.key)}))}),(0,G.jsx)(s.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1.25,md:1.75},borderRadius:he.radiusCard/8,border:"1px solid",borderColor:he.borderSubtle,background:"#fff",boxShadow:he.shadowSoft},children:(0,G.jsxs)(f.Ay,{container:!0,spacing:1.25,alignItems:"center",children:[(0,G.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,G.jsx)(b.A,{options:Kt||[],value:bt,getOptionLabel:e=>(null===e||void 0===e?void 0:e.tenantname)||"",PaperComponent:Ae,onOpen:e=>{Pe||(e.preventDefault(),(0,le.k)("Please select a your app location first!","warning",3e3),setTimeout((()=>{var e;null===(e=L.current)||void 0===e||e.focus()}),0))},onChange:(e,t,r)=>{"clear"===r?(ft(0),vt(null),mt(0),jt(null)):(ft((null===t||void 0===t?void 0:t.tenantid)||0),vt(t),mt(t.locationid),jt(null))},renderInput:e=>(0,G.jsx)(v.A,(0,o.A)((0,o.A)({},e),{},{inputRef:N,placeholder:"Select Tenant",size:"small",sx:ye("#0ea5e9"),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,G.jsx)(h.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,G.jsx)(je,{color:"#0ea5e9",size:22,selected:!0,children:(0,G.jsx)(T.Itr,{size:13})})})})}))})}),(0,G.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,G.jsx)(b.A,{options:Ut||[],getOptionLabel:e=>e?"".concat(e.locationname," (").concat(e.suburb,")"):"",value:At,PaperComponent:Ae,onOpen:e=>{Pe||gt?gt||(e.preventDefault(),(0,le.k)("Please select a your Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=N.current)||void 0===e||e.focus()}),0)):(e.preventDefault(),(0,le.k)("Please select a your Location and Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=L.current)||void 0===e||e.focus()}),0))},onChange:(e,t,r)=>{"clear"===r?(mt(0),jt(null)):(mt(t.locationid||0),jt(t))},renderInput:e=>(0,G.jsx)(v.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Location",size:"small",sx:ye("#10b981"),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,G.jsx)(h.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,G.jsx)(je,{color:"#10b981",size:22,selected:!0,children:(0,G.jsx)(T.JFD,{size:13})})})})}))})}),(0,G.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,G.jsx)(b.A,{options:qt||[],value:St,getOptionLabel:e=>"".concat(e.firstname," ").concat(e.lastname),PaperComponent:Ae,onOpen:()=>{Pe||(0,le.k)("Select App Location First","warning",2e3)},onChange:(e,t,r)=>{"clear"===r?(wt(null),kt(null)):(wt(t),kt(t))},renderInput:e=>(0,G.jsx)(v.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Rider",size:"small",sx:ye("#8b5cf6"),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,G.jsx)(h.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,G.jsx)(je,{color:"#8b5cf6",size:22,selected:!0,children:(0,G.jsx)(T.bsz,{size:13})})})})}))})}),(0,G.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,G.jsxs)(h.A,{direction:"row",spacing:1,alignItems:"center",justifyContent:{xs:"flex-start",md:"flex-end"},children:[(0,G.jsx)(d.A,{title:"Date Filter",placement:"top",children:(0,G.jsxs)(x.A,{onClick:()=>ue(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:pe("#f59e0b"),border:"1.5px solid ".concat(fe("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(ge("#f59e0b"))}},children:[(0,G.jsx)(T.Ki0,{size:14}),q()(J).format("DD/MM/YY")," \u2013 ",q()(V).format("DD/MM/YY")]})}),(0,G.jsx)(A.A,{variant:"contained",size:"small",startIcon:(0,G.jsx)(T.S3Y,{}),onClick:()=>{Mt(!0),setTimeout((()=>{H("")}),0)},sx:{borderRadius:999,px:1.5,py:.75,fontWeight:800,fontSize:12,textTransform:"none",background:"linear-gradient(135deg, ".concat(be," 0%, ").concat(ve," 100%)"),boxShadow:"0 6px 18px ".concat(ge(be)),"&:hover":{background:"linear-gradient(135deg, ".concat(be," 0%, ").concat(ve," 100%)"),boxShadow:"0 8px 22px ".concat(ge(be))}},children:"Export"})]})})]})}),(0,G.jsx)(s.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:he.radiusCard/8,borderTopRightRadius:he.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:he.borderSubtle,borderBottom:0,background:"#fff"},children:(0,G.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,G.jsx)(h.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:he.borderSubtle,borderRadius:4}},children:Se.map((e=>{var t;const r=we[e],o=r.icon,n=ht.toLowerCase()===e,i=null!==(t=It[e])&&void 0!==t?t:0;return(0,G.jsxs)(x.A,{onClick:()=>ut("all"===e?"All":e),sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:999,border:"1.5px solid ".concat(n?r.color:fe(r.color)),bgcolor:n?r.color:pe(r.color),color:n?"#fff":r.color,fontWeight:700,boxShadow:n?"0 6px 18px ".concat(ge(r.color)):"none",transition:"all 0.18s","&:hover":{borderColor:r.color,boxShadow:n?"0 6px 18px ".concat(ge(r.color)):"0 0 0 3px ".concat(ge(r.color))}},children:[(0,G.jsx)(c.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:n?"rgba(255,255,255,0.22)":me(r.color),color:n?"#fff":r.color},children:(0,G.jsx)(o,{size:13})}),(0,G.jsx)(p.A,{variant:"caption",sx:{fontWeight:800,fontSize:{xs:11.5,md:13},lineHeight:1},children:r.label}),(0,G.jsx)(x.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:800,bgcolor:n?"rgba(255,255,255,0.22)":"#fff",color:n?"#fff":r.color,border:n?"none":"1px solid ".concat(fe(r.color))},children:i})]},e)}))}),(0,G.jsx)(x.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,G.jsx)(ne.A,{value:Ye,onChange:Te,onDebouncedChange:Ne,placeholder:"Search orders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:pe(be),"& fieldset":{borderColor:fe(be),borderWidth:1.5},"&:hover fieldset":{borderColor:be},"&.Mui-focused fieldset":{borderColor:be,borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(ge(be))}}})})]})}),(0,G.jsx)(s.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:he.radiusCard/8,borderBottomRightRadius:he.radiusCard/8,border:"1px solid",borderColor:he.borderSubtle,overflow:"hidden",background:"#fff"},children:(0,G.jsxs)(j.A,{ref:u,onScroll:e=>{const{scrollTop:t,scrollHeight:r,clientHeight:o}=e.currentTarget;t+o>=r-50&&Ot&&!Ft&&Nt()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},overflow:"auto","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:fe(be),borderRadius:8,"&:hover":{backgroundColor:be}},"&::-webkit-scrollbar-track":{backgroundColor:he.surfaceAlt}},children:[t?(0,G.jsx)(ce.nV,{sx:{p:1.25},children:Yt?(0,G.jsxs)(h.A,{alignItems:"center",sx:{py:6},children:[(0,G.jsx)(ie.A,{}),(0,G.jsx)(p.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading orders\u2026"})]}):0==(null===Et||void 0===Et?void 0:Et.length)?(0,G.jsxs)(h.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,G.jsx)(c.A,{sx:{width:64,height:64,bgcolor:me("#94a3b8"),color:he.textMuted},children:(0,G.jsx)(T.Z2J,{size:28})}),(0,G.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:he.textPrimary},children:"No orders to show"}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textSecondary,textAlign:"center",px:2},children:Ye?"Try a different keyword.":"Adjust the filters above to load orders."})]}):null===Et||void 0===Et?void 0:Et.map(((e,t)=>{var r;const o=String(e.orderstatus||"").toLowerCase(),n=we[o]||{label:e.orderstatus||"\u2014",color:be,icon:T.Z2J},i=n.icon,a="cancelled"===o,l="delivered"===e.orderstatus;return(0,G.jsx)(ce.pg,{accent:n.color,header:(0,G.jsxs)(h.A,{spacing:1.25,children:[(0,G.jsxs)(h.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,G.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,G.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:he.textMuted},children:String(F*K+t+1).padStart(2,"0")}),(0,G.jsx)(je,{color:be,size:32,children:(0,G.jsx)(T.Itr,{size:16})}),(0,G.jsxs)(h.A,{spacing:.25,sx:{minWidth:0},children:[(0,G.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:he.textPrimary},noWrap:!0,children:e.tenantname}),(0,G.jsxs)(p.A,{variant:"caption",sx:{color:he.textSecondary,fontWeight:700},children:["#",e.orderid]})]})]}),(0,G.jsx)(d.A,{title:l?"View rider route":"Available for delivered orders",placement:"top",children:(0,G.jsx)("span",{children:(0,G.jsx)(y.A,{size:"small",disabled:!l,onClick:()=>{l&&(Pt(e.deliveryid),qe(e))},sx:{flexShrink:0,bgcolor:me(l?be:"#94a3b8"),color:l?be:he.textMuted,border:"1px solid ".concat(fe(l?be:"#94a3b8")),"&:hover":{bgcolor:l?be:me("#94a3b8"),color:l?"#fff":he.textMuted}},children:(0,G.jsx)(T.Cd7,{size:14})})})})]}),(0,G.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,sx:{flexWrap:"wrap",gap:.5},children:[(0,G.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:pe(n.color),border:"1px solid ".concat(fe(n.color)),color:n.color,fontSize:11,fontWeight:800},children:[(0,G.jsx)(i,{size:12})," ",n.label]}),e.ridername&&(0,G.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:pe("#8b5cf6"),border:"1px solid ".concat(fe("#8b5cf6")),color:"#8b5cf6",fontSize:11,fontWeight:800},children:[(0,G.jsx)(T.bsz,{size:12})," ",e.ridername]}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textMuted,fontWeight:600},children:q()(e.deliverydate).utc().format("DD/MM/YYYY \xb7 hh:mm A")})]})]}),children:(0,G.jsxs)(ce.FG,{children:[(0,G.jsx)(ce.pY,{label:"Pickup",children:(0,G.jsxs)(h.A,{spacing:.25,sx:{minWidth:0},children:[(0,G.jsx)(p.A,{sx:{fontSize:13,fontWeight:700,color:he.textPrimary},noWrap:!0,children:e.pickupcustomer||"\u2014"}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textSecondary},noWrap:!0,children:e.pickupcontactno}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textSecondary},noWrap:!0,children:e.pickupsuburb||(e.Pickupaddress?e.Pickupaddress.slice(0,22)+"\u2026":"")}),e.applocation&&(0,G.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.75,py:.25,borderRadius:999,bgcolor:pe("#10b981"),border:"1px solid ".concat(fe("#10b981")),color:"#10b981",fontSize:10,fontWeight:800,width:"fit-content"},children:[(0,G.jsx)(T.JFD,{size:11})," ",e.applocation]})]})}),(0,G.jsx)(ce.pY,{label:"Drop",children:(0,G.jsxs)(h.A,{spacing:.25,sx:{minWidth:0},children:[(0,G.jsx)(p.A,{sx:{fontSize:13,fontWeight:700,color:he.textPrimary},noWrap:!0,children:e.deliverycustomer||"\u2014"}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textSecondary},noWrap:!0,children:e.deliverycontactno}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textSecondary},noWrap:!0,children:e.deliverysuburb||(e.deliveryaddress?e.deliveryaddress.slice(0,22)+"\u2026":"")})]})}),(0,G.jsx)(ce.pY,{label:"Assigned",children:(0,G.jsx)(De,{value:e.assigntime,formatDate:er,formatTime:tr})}),(0,G.jsx)(ce.pY,{label:"Accepted",children:(0,G.jsx)(De,{value:e.acceptedtime,formatDate:er,formatTime:tr})}),(0,G.jsx)(ce.pY,{label:"Arrived",children:(0,G.jsx)(De,{value:e.arrivaltime,formatDate:er,formatTime:tr})}),(0,G.jsx)(ce.pY,{label:"Picked",children:(0,G.jsx)(De,{value:e.pickuptime,formatDate:er,formatTime:tr,success:"active"===e.deliverystatus})}),(0,G.jsx)(ce.pY,{label:"Active",children:(0,G.jsx)(De,{value:e.starttime,formatDate:er,formatTime:tr})}),(0,G.jsx)(ce.pY,{label:"Delivered",children:(0,G.jsx)(De,{value:e.deliverytime,formatDate:er,formatTime:tr})}),(0,G.jsx)(ce.pY,{label:"Cancelled",children:(0,G.jsx)(De,{value:e.canceltime,formatDate:er,formatTime:tr})}),(0,G.jsx)(ce.pY,{label:"KMS \xb7 plan / act / rider",full:!0,children:(0,G.jsxs)(h.A,{direction:"row",spacing:.5,sx:{flexWrap:"wrap",gap:.5},children:[(0,G.jsx)(ke,{color:"#ef4444",icon:(0,G.jsx)(T.xI$,{size:11}),label:a||""==e.kms?"0 km":"".concat(e.kms," km"),tooltip:"KMS"}),(0,G.jsx)(ke,{color:"#10b981",icon:(0,G.jsx)(T.xI$,{size:11}),label:"".concat(null!==(r=e.cumulativekms)&&void 0!==r?r:0," km"),tooltip:"Actual KMS"}),(0,G.jsx)(ke,{color:"#0ea5e9",icon:(0,G.jsx)(T.xI$,{size:11}),label:"".concat(e.previouskms||(a?"0.00":e.kms)||0," km"),tooltip:"Rider KMS"})]})}),(0,G.jsx)(ce.pY,{label:"Charges \xb7 chg / amt",full:!0,children:(0,G.jsxs)(h.A,{direction:"row",spacing:.5,sx:{flexWrap:"wrap",gap:.5},children:[(0,G.jsx)(ke,{color:"#ef4444",icon:(0,G.jsx)(T.YHz,{size:11}),label:a||""==e.deliverycharges?"0.00":"".concat(e.deliverycharges,".00"),tooltip:"Delivery Charge"}),(0,G.jsx)(ke,{color:"#10b981",icon:(0,G.jsx)(T.YHz,{size:11}),label:""==e.deliveryamt?"0.00":"".concat(e.deliveryamt,".00"),tooltip:"Delivery Amount"})]})}),e.ordernotes&&(0,G.jsx)(ce.pY,{label:"Notes",full:!0,children:(0,G.jsxs)(h.A,{direction:"row",spacing:.5,alignItems:"flex-start",children:[(0,G.jsx)(T.NpB,{size:12,color:he.textMuted,style:{marginTop:2,flexShrink:0}}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textSecondary},children:e.ordernotes})]})})]})},e.deliveryid||"".concat(e.orderid,"-").concat(t))}))}):(0,G.jsxs)(w.A,{stickyHeader:!0,sx:{minWidth:1600},children:[(0,G.jsx)(S.A,{children:(0,G.jsxs)(k.A,{sx:{"& th":{backgroundColor:he.surfaceAlt,color:he.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(he.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:1.5}}},children:[(0,G.jsx)(D.A,{children:"#"}),(0,G.jsx)(D.A,{children:"Map"}),(0,G.jsx)(D.A,{children:"Client"}),(0,G.jsx)(D.A,{children:"Pickup"}),(0,G.jsx)(D.A,{children:"Drop"}),(0,G.jsx)(D.A,{children:"Status / Rider"}),(0,G.jsx)(D.A,{children:"Assigned"}),(0,G.jsx)(D.A,{children:"Accepted"}),(0,G.jsx)(D.A,{children:"Arrived"}),(0,G.jsx)(D.A,{children:"Picked"}),(0,G.jsx)(D.A,{children:"Active"}),(0,G.jsx)(D.A,{children:"Delivered"}),(0,G.jsx)(D.A,{children:"Cancelled"}),(0,G.jsx)(D.A,{children:"Notes"}),(0,G.jsx)(D.A,{align:"center",children:"KMS"}),(0,G.jsx)(D.A,{align:"center",children:"Charges"})]})}),(0,G.jsx)(M.A,{children:Yt?(0,G.jsx)(se,{rows:16,columns:16,height:15}):0==(null===Et||void 0===Et?void 0:Et.length)?(0,G.jsx)(k.A,{children:(0,G.jsx)(D.A,{colSpan:16,sx:{py:6},children:(0,G.jsxs)(h.A,{alignItems:"center",spacing:1.5,children:[(0,G.jsx)(c.A,{sx:{width:64,height:64,bgcolor:me("#94a3b8"),color:he.textMuted},children:(0,G.jsx)(T.Z2J,{size:28})}),(0,G.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:he.textPrimary},children:"No orders to show"}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textSecondary},children:Ye?"Try a different keyword.":"Adjust the filters above to load orders."})]})})}):null===Et||void 0===Et?void 0:Et.map(((e,t)=>{var r;const o=String(e.orderstatus||"").toLowerCase(),n=we[o]||{label:e.orderstatus||"\u2014",color:be,icon:T.Z2J},i=n.icon,a="cancelled"===o;return(0,G.jsxs)(k.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(he.divider),py:{xs:1,md:1.25},px:{xs:1,md:1.5},verticalAlign:"top"},"&:hover":{backgroundColor:he.surfaceAlt}},children:[(0,G.jsx)(D.A,{children:(0,G.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:he.textMuted},children:String(F*K+t+1).padStart(2,"0")})}),(0,G.jsx)(D.A,{children:(0,G.jsx)(d.A,{title:"delivered"===e.orderstatus?"View rider route":"Available for delivered orders",placement:"top",children:(0,G.jsx)("span",{children:(0,G.jsx)(y.A,{size:"small",disabled:"delivered"!==e.orderstatus,onClick:()=>{"delivered"===e.orderstatus&&(Pt(e.deliveryid),qe(e))},sx:{bgcolor:"delivered"===e.orderstatus?me(be):me("#94a3b8"),color:"delivered"===e.orderstatus?be:he.textMuted,border:"1px solid ".concat("delivered"===e.orderstatus?fe(be):fe("#94a3b8")),"&:hover":{bgcolor:"delivered"===e.orderstatus?be:me("#94a3b8"),color:"delivered"===e.orderstatus?"#fff":he.textMuted}},children:(0,G.jsx)(T.Cd7,{size:14})})})})}),(0,G.jsx)(D.A,{children:(0,G.jsxs)(h.A,{direction:"row",alignItems:"flex-start",spacing:1,children:[(0,G.jsx)(je,{color:be,size:32,children:(0,G.jsx)(T.Itr,{size:16})}),(0,G.jsxs)(h.A,{spacing:.25,sx:{minWidth:0},children:[(0,G.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:he.textPrimary,whiteSpace:"nowrap"},children:e.tenantname}),(0,G.jsx)(d.A,{title:"Order ID",placement:"top",children:(0,G.jsxs)(p.A,{variant:"caption",sx:{color:he.textSecondary,fontWeight:700},children:["#",e.orderid]})}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textMuted},children:q()(e.deliverydate).utc().format("DD/MM/YYYY \xb7 hh:mm A")})]})]})}),(0,G.jsx)(D.A,{children:(0,G.jsxs)(h.A,{spacing:.25,children:[(0,G.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:he.textPrimary,whiteSpace:"nowrap"},children:e.pickupcustomer||"\u2014"}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textSecondary},children:e.pickupcontactno}),(0,G.jsx)(d.A,{title:e.Pickupaddress||e.pickupsuburb||"",children:(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textSecondary,cursor:"pointer",display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.pickupsuburb||(e.Pickupaddress?e.Pickupaddress.slice(0,22)+"\u2026":"")})}),e.applocation&&(0,G.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.75,py:.25,borderRadius:999,bgcolor:pe("#10b981"),border:"1px solid ".concat(fe("#10b981")),color:"#10b981",fontSize:10,fontWeight:800,width:"fit-content"},children:[(0,G.jsx)(T.JFD,{size:11})," ",e.applocation]})]})}),(0,G.jsx)(D.A,{children:(0,G.jsxs)(h.A,{spacing:.25,children:[(0,G.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:he.textPrimary,whiteSpace:"nowrap"},children:e.deliverycustomer||"\u2014"}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textSecondary},children:e.deliverycontactno}),(0,G.jsx)(d.A,{title:e.deliveryaddress||"",children:(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textSecondary,cursor:"pointer",display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.deliverysuburb||(e.deliveryaddress?e.deliveryaddress.slice(0,22)+"\u2026":"")})})]})}),(0,G.jsx)(D.A,{children:(0,G.jsxs)(h.A,{spacing:.5,children:[(0,G.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:pe(n.color),border:"1px solid ".concat(fe(n.color)),color:n.color,fontSize:11,fontWeight:800,width:"fit-content"},children:[(0,G.jsx)(i,{size:12})," ",n.label]}),e.ridername&&(0,G.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,G.jsx)(T.bsz,{size:12,color:he.textMuted}),(0,G.jsx)(d.A,{title:"Rider ID: ".concat(e.userid),children:(0,G.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:he.textPrimary,whiteSpace:"nowrap"},children:e.ridername})})]})]})}),(0,G.jsx)(D.A,{children:(0,G.jsx)(De,{value:e.assigntime,formatDate:er,formatTime:tr})}),(0,G.jsx)(D.A,{children:(0,G.jsx)(De,{value:e.acceptedtime,formatDate:er,formatTime:tr})}),(0,G.jsx)(D.A,{children:(0,G.jsx)(De,{value:e.arrivaltime,formatDate:er,formatTime:tr})}),(0,G.jsx)(D.A,{children:(0,G.jsx)(De,{value:e.pickuptime,formatDate:er,formatTime:tr,success:"active"===e.deliverystatus})}),(0,G.jsx)(D.A,{children:(0,G.jsx)(De,{value:e.starttime,formatDate:er,formatTime:tr})}),(0,G.jsx)(D.A,{children:(0,G.jsx)(De,{value:e.deliverytime,formatDate:er,formatTime:tr})}),(0,G.jsx)(D.A,{children:(0,G.jsx)(De,{value:e.canceltime,formatDate:er,formatTime:tr})}),(0,G.jsx)(D.A,{sx:{maxWidth:180},children:e.ordernotes?(0,G.jsxs)(h.A,{direction:"row",spacing:.5,alignItems:"flex-start",children:[(0,G.jsx)(T.NpB,{size:12,color:he.textMuted,style:{marginTop:2,flexShrink:0}}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textSecondary,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.ordernotes})]}):(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textMuted},children:"\u2014"})}),(0,G.jsx)(D.A,{align:"center",children:(0,G.jsxs)(h.A,{spacing:.5,alignItems:"center",children:[(0,G.jsx)(ke,{color:"#ef4444",icon:(0,G.jsx)(T.xI$,{size:11}),label:a||""==e.kms?"0 km":"".concat(e.kms," km"),tooltip:"KMS"}),(0,G.jsx)(ke,{color:"#10b981",icon:(0,G.jsx)(T.xI$,{size:11}),label:"".concat(null!==(r=e.cumulativekms)&&void 0!==r?r:0," km"),tooltip:"Actual KMS"}),(0,G.jsx)(ke,{color:"#0ea5e9",icon:(0,G.jsx)(T.xI$,{size:11}),label:"".concat(e.previouskms||(a?"0.00":e.kms)||0," km"),tooltip:"Rider KMS"})]})}),(0,G.jsx)(D.A,{align:"center",children:(0,G.jsxs)(h.A,{spacing:.5,alignItems:"center",children:[(0,G.jsx)(ke,{color:"#ef4444",icon:(0,G.jsx)(T.YHz,{size:11}),label:a||""==e.deliverycharges?"0.00":"".concat(e.deliverycharges,".00"),tooltip:"Delivery Charge"}),(0,G.jsx)(ke,{color:"#10b981",icon:(0,G.jsx)(T.YHz,{size:11}),label:""==e.deliveryamt?"0.00":"".concat(e.deliveryamt,".00"),tooltip:"Delivery Amount"})]})})]},e.deliveryid||"".concat(e.orderid,"-").concat(t))}))})]}),(0,G.jsx)(C.A,{}),0!==(null===Et||void 0===Et?void 0:Et.length)&&(0,G.jsx)(h.A,{justifyContent:"center",alignItems:"center",sx:{width:"100%",py:2},children:(0,G.jsx)(h.A,{ref:r,style:{textAlign:"center",width:"100%"},children:Ft||Ot?(0,G.jsx)(ie.A,{}):(0,G.jsx)(p.A,{variant:"caption",sx:{color:he.textMuted,fontWeight:600},children:"No more orders"})})})]})}),(0,G.jsxs)(z.A,{open:Dt,onClose:()=>Mt(!1),fullWidth:!0,maxWidth:"sm",fullScreen:t,PaperProps:{sx:{borderRadius:{xs:0,sm:3},overflow:"hidden"}},children:[(0,G.jsx)(I.A,{sx:{background:"linear-gradient(135deg, ".concat(be," 0%, ").concat(ve," 100%)"),color:"#fff",py:2},children:(0,G.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,G.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,G.jsx)(c.A,{sx:{width:36,height:36,bgcolor:"rgba(255,255,255,0.22)",color:"#fff"},children:(0,G.jsx)(T.S3Y,{size:20})}),(0,G.jsxs)(h.A,{children:[(0,G.jsx)(p.A,{sx:{fontSize:11,fontWeight:700,opacity:.85,letterSpacing:.6,textTransform:"uppercase",lineHeight:1},children:"Report"}),(0,G.jsx)(p.A,{sx:{fontWeight:800,fontSize:{xs:"1.05rem",sm:"1.2rem"},lineHeight:1.2,mt:.25},children:"Export Orders"})]})]}),(0,G.jsx)(y.A,{size:"small",onClick:()=>Mt(!1),sx:{color:"#fff",bgcolor:"rgba(255,255,255,0.18)","&:hover":{bgcolor:"rgba(255,255,255,0.3)"}},children:(0,G.jsx)(T.m6K,{size:16})})]})}),(0,G.jsxs)(W.A,{sx:{p:2},children:[Yt&&(0,G.jsx)(Z.A,{}),[{label:"App Location",value:_,color:be},{label:"Tenant",value:null===bt||void 0===bt?void 0:bt.tenantname,color:"#0ea5e9"},{label:"Business Location",value:null===At||void 0===At?void 0:At.locationname,color:"#10b981"},{label:"Status",value:ht,color:"#f59e0b"},{label:"Rider",value:St?"".concat(St.firstname," ").concat(St.lastname):null,color:"#8b5cf6"},{label:"Keyword",value:Ye,color:"#06b6d4"},{label:"Start Date",value:J,color:"#14b8a6"},{label:"End Date",value:V,color:"#ef4444"}].map(((e,t)=>(0,G.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{px:1.5,py:1,borderRadius:2,bgcolor:pe(e.color),border:"1px solid ".concat(fe(e.color)),mb:1},children:[(0,G.jsx)(p.A,{variant:"body2",sx:{fontWeight:700,color:he.textPrimary},children:e.label}),(0,G.jsx)(P.A,{size:"small",label:e.value||"None",sx:{fontWeight:700,bgcolor:e.value?e.color:me("#94a3b8"),color:e.value?"#fff":he.textMuted,border:"none"}})]},t)))]}),(0,G.jsxs)(R.A,{sx:{p:2,bgcolor:he.surfaceAlt,gap:1},children:[(0,G.jsx)(A.A,{color:"inherit",variant:"outlined",onClick:()=>Mt(!1),sx:{borderRadius:999,px:2,textTransform:"none",fontWeight:700,borderColor:he.borderSubtle,color:he.textSecondary},children:"Cancel"}),(0,G.jsx)(ee.pK,{data:Qt,filename:"Orders_Detail_".concat(q()().format("YYYY-MM-DD_HHmmss"),".csv"),label:"Download CSV",btnLoading:Yt,onClick:()=>{setTimeout((()=>Mt(!1)),0)}})]})]}),(0,G.jsx)(oe.A,{open:de,onClose:()=>ue(!1),onSelect:e=>{U(e.startDate),$(e.endDate),We(e.label)}}),(0,G.jsx)(z.A,{open:Ce,onClose:()=>{ze(!1)},fullScreen:!0,fullWidth:!0,children:Oe&&(0,G.jsx)("div",{children:(0,G.jsx)(X,{coordinates:Oe,additionalProps:{riderStart:Ee,riderEnd:He},order:Be,setMapOpen:ze})})})]})}},23787:(e,t,r)=>{r.d(t,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var o=r(89379),n=r(80045),i=r(93230),a=r(2235),l=r(16491),s=r(82053),c=r(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:r=!1,onScroll:a,sx:l}=e,s=(0,n.A)(e,d);return(0,c.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:a,sx:(0,o.A)((0,o.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},s),{},{children:t}))},h=e=>{let{accent:t="#662582",header:r,footer:n,selected:i=!1,onClick:s,children:d,sx:x}=e;return(0,c.jsxs)(a.A,{elevation:0,onClick:s,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[r,d,n]})]})},u=e=>{let{children:t,columns:r=2,sx:n}=e;return(0,c.jsx)(l.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},p=e=>{let{label:t,value:r,children:o,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(s.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(s.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},35678:(e,t,r)=>{r.d(t,{A:()=>j});var o=r(9950),n=r(96583),i=r(40033),a=r(82053),l=r(28170),s=r(93230),c=r(82223),d=r(55916),x=r(4159),h=r.n(x),u=r(56712),p=r(81417),m=r(96600),g=r(53132),f=r(94289),b=r(57326),v=r(50624),A=r(44414);const j=e=>{let{open:t,onClose:r,onSelect:x}=e;const[j,y]=(0,o.useState)(null);return(0,A.jsxs)(n.A,{open:t,onClose:r,children:[(0,A.jsx)(i.A,{align:"left",children:(0,A.jsx)(a.A,{variant:"h4",children:"Select Filter Options"})}),(0,A.jsx)(l.A,{sx:{width:"100%"},className:"datedialog",children:(0,A.jsx)(d.U,{open:t,toggle:r,id:"daterange1",onChange:e=>{y({startDate:h()(e.startDate).format("YYYY-MM-DD"),endDate:h()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,u.A)(new Date,-1),endDate:(0,u.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,u.A)(new Date,1),endDate:(0,u.A)(new Date,1)},{label:"This Week",startDate:(0,p.A)(new Date),endDate:(0,m.A)(new Date)},{label:"Last Week",startDate:(0,p.A)((0,g.A)(new Date,-1)),endDate:(0,m.A)((0,g.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,g.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,f.A)(new Date),endDate:(0,b.A)(new Date)},{label:"Last Month",startDate:(0,f.A)((0,v.A)(new Date,-1)),endDate:(0,b.A)((0,v.A)(new Date,-1))}]})}),(0,A.jsx)(s.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,A.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{j?(x(j),r()):r()},children:"OK"})})]})}},46639:(e,t,r)=>{r.d(t,{A:()=>P});var o=r(57528),n=r(98587),i=r(58168),a=r(9950),l=r(72004),s=r(3484),c=r(88283),d=r(89548),x=r(18463),h=r(59254),u=r(45558),p=r(1614);function m(e){return(0,p.Ay)("MuiCircularProgress",e)}(0,u.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var g,f,b,v,A=r(44414);const j=["className","color","disableShrink","size","style","thickness","value","variant"];let y,w,S,k;const D=44,M=(0,c.i7)(y||(y=g||(g=(0,o.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),C=(0,c.i7)(w||(w=f||(f=(0,o.A)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),z=(0,h.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t["color".concat((0,d.A)(r.color))]]}})((e=>{let{ownerState:t,theme:r}=e;return(0,i.A)({display:"inline-block"},"determinate"===t.variant&&{transition:r.transitions.create("transform")},"inherit"!==t.color&&{color:(r.vars||r).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,c.AH)(S||(S=b||(b=(0,o.A)(["\n animation: "," 1.4s linear infinite;\n "]))),M)})),I=(0,h.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),W=(0,h.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t["circle".concat((0,d.A)(r.variant))],r.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:r}=e;return(0,i.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,c.AH)(k||(k=v||(v=(0,o.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),C)})),P=a.forwardRef((function(e,t){const r=(0,x.b)({props:e,name:"MuiCircularProgress"}),{className:o,color:a="primary",disableShrink:c=!1,size:h=40,style:u,thickness:p=3.6,value:g=0,variant:f="indeterminate"}=r,b=(0,n.A)(r,j),v=(0,i.A)({},r,{color:a,disableShrink:c,size:h,thickness:p,value:g,variant:f}),y=(e=>{const{classes:t,variant:r,color:o,disableShrink:n}=e,i={root:["root",r,"color".concat((0,d.A)(o))],svg:["svg"],circle:["circle","circle".concat((0,d.A)(r)),n&&"circleDisableShrink"]};return(0,s.A)(i,m,t)})(v),w={},S={},k={};if("determinate"===f){const e=2*Math.PI*((D-p)/2);w.strokeDasharray=e.toFixed(3),k["aria-valuenow"]=Math.round(g),w.strokeDashoffset="".concat(((100-g)/100*e).toFixed(3),"px"),S.transform="rotate(-90deg)"}return(0,A.jsx)(z,(0,i.A)({className:(0,l.A)(y.root,o),style:(0,i.A)({width:h,height:h},S,u),ownerState:v,ref:t,role:"progressbar"},k,b,{children:(0,A.jsx)(I,{className:y.svg,ownerState:v,viewBox:"".concat(22," ").concat(22," ").concat(D," ").concat(D),children:(0,A.jsx)(W,{className:y.circle,style:w,ownerState:v,cx:D,cy:D,r:(D-p)/2,fill:"none",strokeWidth:p})})}))}))},56311:(e,t,r)=>{r.d(t,{A:()=>u});var o=r(89379),n=r(9950),i=r(2660),a=r(2046),l=r(83274),s=r(25333),c=r(97125),d=r(7762),x=r(52097),h=r(44414);const u=e=>{let{value:t,onChange:r,onDebouncedChange:u,debounceTime:p=500,placeholder:m="Search (ctrl+k)",sx:g}=e;const f=(0,n.useRef)(null),[b]=(0,x.d7)(t,p);return(0,n.useEffect)((()=>{u&&u(b)}),[b,u]),(0,n.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=f.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===f.current&&f.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(i.A,{sx:(0,o.A)({},g),inputRef:f,placeholder:m,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,h.jsx)(a.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(l.A,{title:"Clear",children:(0,h.jsx)(s.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>r(""),children:(0,h.jsx)(d.A,{})})})})}},58691:(e,t,r)=>{r.d(t,{A:()=>l});r(9950);var o=r(16491),n=r(46639),i=r(62217),a=r(44414);function l(e){let{size:t=70,imgSize:r=40,alt:l="loader"}=e;return(0,a.jsxs)(o.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,a.jsx)(n.A,{size:t}),(0,a.jsx)(o.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:r,height:r},children:(0,a.jsx)("img",{src:i,alt:l,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(89379),n=r(9950),i=r(93230),a=r(41413),l=r(77922),s=r(29925),c=r(26910),d=r(31222),x=r(44414);const h=(0,n.forwardRef)(((e,t)=>{let{setAppId:r,setLocoName:h,setPage:u,sx:p,textfeildSx:m,textfieldSx:g,pill:f=!1,accentColor:b="#6366f1",icon:v,placeholder:A="Select Zone",paperComponent:j}=e;const[y,w]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),w(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const S=e=>"".concat(b).concat(e),k=S("08"),D=S("26"),M=S("55"),C=S("18"),z=f?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"999px",bgcolor:k,fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s, background-color 0.2s","& fieldset":{borderColor:M,borderWidth:1.5},"&:hover fieldset":{borderColor:b},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(D)},"&.Mui-focused fieldset":{borderColor:b,borderWidth:2}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:b}}:{},I=f&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(a.A,{sx:{width:24,height:24,bgcolor:C,color:b,transition:"background-color 0.15s, color 0.15s"},children:v||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:j,sx:(0,o.A)({},p),onChange:(e,t,o)=>{"clear"===o?(null===r||void 0===r||r(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):t&&(null===r||void 0===r||r(t.applocationid),null===h||void 0===h||h(t.locationname),null===u||void 0===u||u(0))},renderInput:e=>f?(0,x.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:A,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:I}),sx:(0,o.A)((0,o.A)({},z),g||m||{})})):(0,x.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},g||m||{})}))})}))}}]); \ No newline at end of file diff --git a/build/static/js/8846.90c19cd6.chunk.js b/build/static/js/8846.90c19cd6.chunk.js new file mode 100644 index 0000000..fc12d20 --- /dev/null +++ b/build/static/js/8846.90c19cd6.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[8846],{11041:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ie});var o=r(89379),n=r(9950),i=r(26910),a=r(60010),l=r(36150),s=r(2235),c=r(41413),d=r(83274),x=r(16491),u=r(93230),h=r(82917),p=r(82053),m=r(47223),g=r(55158),f=r(60899),v=r(77922),b=r(29925),A=r(82223),j=r(1320),y=r(25333),w=r(15769),S=r(69780),k=r(9213),D=r(21671),M=r(34075),C=r(74745),z=r(96583),I=r(40033),W=r(28170),P=r(25277),R=r(79739),Y=r(14857),T=r(31222),L=r(43302),N=r(99810),O=r(49029),F=r(47113),E=r(33516),K=r(82215),H=r(2527),_=r.n(H),B=(r(55392),r(4159)),q=r.n(B),J=r(57560),G=r(94826),Z=r(44414),U=r(36220);q().extend(U);const V=new(_().Icon)({iconUrl:"https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-green.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],shadowSize:[41,41]}),$=new(_().Icon)({iconUrl:"https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],shadowSize:[41,41]}),X=e=>{let{coordinates:t,additionalProps:r,order:o,setMapOpen:i}=e;console.log("additionalProps",r);const a=(0,n.useRef)(null),l=(0,Y.A)(),[s,c]=(0,n.useState)([]),[d,h]=(0,n.useState)(!1);if((0,n.useEffect)((()=>{if(a.current&&t.length>0){const e=[[Math.min(...t.map((e=>e.lat))),Math.min(...t.map((e=>e.lng)))],[Math.max(...t.map((e=>e.lat))),Math.max(...t.map((e=>e.lng)))]];a.current.fitBounds(e)}}),[t]),(0,n.useEffect)((()=>{(async()=>{if(h(!0),t.length<2)return c([]),void h(!1);const e=(e,t)=>{if(e.length<=t)return e;const r=Math.ceil(e.length/t),o=e.filter(((e,t)=>t%r===0)),n=e[e.length-1];return o[o.length-1]!==n&&o.push(n),o};try{const r=e(t,90).map((e=>"".concat(e.lng,",").concat(e.lat))).join(";"),o="https://router.project-osrm.org/match/v1/driving/".concat(r,"?overview=full&geometries=geojson&gaps=ignore&tidy=true"),n=await fetch(o),i=await n.json();if(i.matchings&&i.matchings.length>0){const e=i.matchings.flatMap((e=>{var t;return((null===(t=e.geometry)||void 0===t?void 0:t.coordinates)||[]).map((e=>{let[t,r]=e;return{lat:r,lng:t}}))}));if(e.length>=2)return c(e),void h(!1)}}catch(r){console.warn("OSRM Match error, trying route fallback:",r)}try{const r=e(t,25).map((e=>"".concat(e.lng,",").concat(e.lat))).join(";"),o="https://router.project-osrm.org/route/v1/driving/".concat(r,"?overview=full&geometries=geojson"),n=await fetch(o),i=await n.json();if(i.routes&&i.routes[0]){const e=i.routes[0].geometry.coordinates.map((e=>{let[t,r]=e;return{lat:r,lng:t}}));c(e)}else c(t)}catch(o){console.error("OSRM Route fallback error:",o),c(t)}finally{h(!1)}})()}),[t]),!t||0===t.length)return null;const m=t[0],g=t[t.length-1],f=t[Math.floor(t.length/2)],v=e=>{let{label:t,value:r}=e;return(0,Z.jsxs)(u.A,{direction:"row",spacing:1,alignItems:"center",children:[(0,Z.jsxs)(p.A,{variant:"subtitle1",sx:{fontWeight:600},children:[t,":"]}),(0,Z.jsx)(P.A,{label:r||"0.00",color:"primary",sx:{fontWeight:700}})]})};return(0,Z.jsxs)(x.A,{sx:{width:"100%",height:"100vh",position:"relative",overflow:"hidden"},children:[d&&(0,Z.jsx)(G.A,{}),(0,Z.jsx)(P.A,{label:"Close",icon:(0,Z.jsx)(J.A,{style:{fontSize:18}}),onClick:()=>i(!1),sx:{position:"absolute",top:12,right:12,zIndex:2e3,bgcolor:l.palette.error.main,color:"#fff",fontWeight:600,borderRadius:"12px",px:1.5,py:.5,boxShadow:l.shadows[4],cursor:"pointer","& .MuiChip-icon":{color:"#fff"}}}),(0,Z.jsxs)(N.W,{center:f,zoom:14,scrollWheelZoom:!0,style:{height:"100%",width:"100%"},ref:a,children:[(0,Z.jsx)(O.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),(0,Z.jsx)(F.p,{position:m,icon:V,children:(0,Z.jsx)(E.m,{direction:"bottom",children:"Pickup: ".concat(q()(r.riderStart).format("DD-MM-YYYY hh:mm A"))})}),(0,Z.jsx)(F.p,{position:g,icon:$,children:(0,Z.jsx)(E.m,{direction:"bottom",children:"Drop: ".concat(q()(r.riderEnd).format("DD-MM-YYYY hh:mm A"))})}),s.length>0&&(0,Z.jsx)(K.R,{positions:s,pathOptions:{color:"blue",weight:5}})]}),(0,Z.jsx)(x.A,{sx:{position:"absolute",bottom:0,width:"100%",bgcolor:"rgba(255,255,255,0.96)",p:2,boxShadow:l.shadows[3],zIndex:1500},children:(0,Z.jsxs)(u.A,{direction:"row",flexWrap:"wrap",rowGap:1.5,columnGap:3,alignItems:"center",children:[(0,Z.jsx)(v,{label:"Tenant",value:null===o||void 0===o?void 0:o.tenantname}),(0,Z.jsx)(v,{label:"Rider",value:null===o||void 0===o?void 0:o.ridername}),(0,Z.jsx)(v,{label:"Pickup",value:null===o||void 0===o?void 0:o.pickupcustomer}),(0,Z.jsx)(v,{label:"Drop",value:null===o||void 0===o?void 0:o.deliverycustomer}),(0,Z.jsx)(v,{label:"Kms",value:null===o||void 0===o?void 0:o.kms}),(0,Z.jsx)(v,{label:"Actual Kms",value:null===o||void 0===o?void 0:o.actualkms}),(0,Z.jsx)(v,{label:"Rider Kms",value:null===o||void 0===o?void 0:o.riderkms})]})})]})};var Q=r(81425),ee=r(90376),te=r(52351),re=r(8881),oe=r(35678),ne=r(56311),ie=r(58691),ae=r(59212),le=r(27001),se=r(36803),ce=r(20466);function de(e){let{rows:t=5,columns:r=6,height:o=40}=e;return(0,Z.jsx)(Z.Fragment,{children:[...Array(t)].map(((e,t)=>(0,Z.jsx)(k.A,{children:[...Array(r)].map(((e,t)=>(0,Z.jsx)(D.A,{children:(0,Z.jsx)(h.A,{variant:"rectangular",height:o,width:70,animation:"wave"})},t)))},t)))})}var xe=r(23787),ue=r(36220);q().extend(ue);const he=(e,t,r)=>{(0,re.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:r||1500})},pe={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},me=(e,t)=>"".concat(e).concat(t),ge=e=>me(e,"08"),fe=e=>me(e,"18"),ve=e=>me(e,"26"),be=e=>me(e,"55"),Ae="#662582",je="#9255AB",ye=e=>(0,Z.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:pe.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),we=e=>{let{color:t,selected:r,size:o=24,children:n}=e;return(0,Z.jsx)(c.A,{sx:{width:o,height:o,bgcolor:r?t:fe(t),color:r?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:n})},Se=e=>({"& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,"& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(ve(e))},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5}}}),ke={all:{label:"All",color:Ae,icon:T.YBc},pending:{label:"Pending",color:"#f59e0b",icon:T.tX0},accepted:{label:"Accepted",color:"#6366f1",icon:T.Azs},arrived:{label:"Arrived",color:"#06b6d4",icon:T.gwi},picked:{label:"Picked",color:"#8b5cf6",icon:T.gsJ},active:{label:"Active",color:"#14b8a6",icon:T.pk7},delivered:{label:"Delivered",color:"#10b981",icon:T.mU9},skipped:{label:"Skipped",color:"#f97316",icon:T.ivF},cancelled:{label:"Cancelled",color:"#ef4444",icon:T.uDv}},De=["all","pending","accepted","arrived","picked","active","delivered","skipped","cancelled"],Me=e=>{let{color:t,icon:r,label:o,tooltip:n}=e;return(0,Z.jsx)(d.A,{title:n||"",placement:"top",children:(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(be(t)),color:t,fontSize:11,fontWeight:800,minWidth:80,justifyContent:"center",whiteSpace:"nowrap"},children:[r,o]})})},Ce=e=>{let{value:t,formatDate:r,formatTime:o,success:n}=e;return t?(0,Z.jsxs)(u.A,{spacing:.25,children:[(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary,fontWeight:600,whiteSpace:"nowrap"},children:r(t)}),(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textPrimary,fontWeight:800,whiteSpace:"nowrap"},children:o(t)}),n&&(0,Z.jsx)(L.cxC,{style:{color:"#10b981",fontSize:12}})]})]}):(0,Z.jsxs)(u.A,{spacing:.5,children:[(0,Z.jsx)(h.A,{animation:!1,variant:"text",width:70,height:12}),(0,Z.jsx)(h.A,{animation:!1,variant:"text",width:55,height:14})]})};function ze(e,t){const r=e=>e*Math.PI/180,o=r(e[0]),n=r(t[0]),i=r(t[0]-e[0]),a=r(t[1]-e[1]),l=Math.sin(i/2)**2+Math.cos(o)*Math.cos(n)*Math.sin(a/2)**2;return 12742*Math.asin(Math.min(1,Math.sqrt(l)))}function Ie(){const e=(0,Y.A)(),t=(0,m.A)(e.breakpoints.down("md")),r=(0,n.useRef)(),h=(0,n.useRef)(),L=(0,n.useRef)(null),N=(0,n.useRef)(null),O=localStorage.getItem("userid"),[F,E]=(0,n.useState)(0),[K,H]=(0,n.useState)(50),[_,B]=(0,n.useState)("All"),[J,U]=(0,n.useState)(q()().format("YYYY-MM-DD")),[V,$]=(0,n.useState)(q()().format("YYYY-MM-DD")),[ue,me]=(0,n.useState)(!1),[Ie,We]=(0,n.useState)(!1),[Pe,Re]=(0,n.useState)("Today"),[Ye,Te]=(0,n.useState)(0),[Le,Ne]=(0,n.useState)(""),[Oe,Fe]=(0,n.useState)(""),[Ee,Ke]=(0,n.useState)([]),[He,_e]=(0,n.useState)(),[Be,qe]=(0,n.useState)(),[Je,Ge]=(0,n.useState)({}),[Ze,Ue]=(0,n.useState)(!1);let[Ve,$e]=(0,n.useState)(0),[Xe,Qe]=(0,n.useState)(0),[et,tt]=(0,n.useState)(0),[rt,ot]=(0,n.useState)(0),[nt,it]=(0,n.useState)(0),[at,lt]=(0,n.useState)(0),[st,ct]=(0,n.useState)(0),[dt,xt]=(0,n.useState)(0),[ut,ht]=(0,n.useState)(0);const[pt,mt]=(0,n.useState)("All"),[gt,ft]=(0,n.useState)(0),[vt,bt]=(0,n.useState)(0),[At,jt]=(0,n.useState)(null),[yt,wt]=(0,n.useState)(null),[St,kt]=(0,n.useState)(),[Dt,Mt]=(0,n.useState)(null),[Ct,zt]=(0,n.useState)(!1),[It,Wt]=(0,n.useState)(!1),Pt={all:Ve,pending:et,accepted:nt,arrived:dt,picked:at,active:st,delivered:Xe,skipped:ut,cancelled:rt};function Rt(e,t,r,o){const n=(r-e)*(Math.PI/180),i=(o-t)*(Math.PI/180),a=Math.sin(n/2)*Math.sin(n/2)+Math.cos(e*(Math.PI/180))*Math.cos(r*(Math.PI/180))*Math.sin(i/2)*Math.sin(i/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))}(0,n.useEffect)((()=>{bt(0),jt(null),ft(0),wt(null),kt(null),Mt(null)}),[Ye]),(0,n.useEffect)((()=>{ft(0),wt(null),Mt(null)}),[vt]),(0,n.useEffect)((()=>{Mt(null)}),[gt]);const Yt=async e=>{Wt(!0);try{const t=(await i.A.get("".concat("https://jupiter.nearle.app/live/api/v3","/deliveries/getdeliverylogs/?deliveryid=").concat(e))).data.details;if(Array.isArray(t)&&0!==t.length){const e=t.map((e=>{var t,r,o;const n=null!==e&&void 0!==e&&e.logdate?q()(e.logdate):null;return{lat:parseFloat(null!==(t=null===e||void 0===e?void 0:e.latitude)&&void 0!==t?t:null===e||void 0===e?void 0:e.lat),lng:parseFloat(null!==(r=null!==(o=null===e||void 0===e?void 0:e.longitude)&&void 0!==o?o:null===e||void 0===e?void 0:e.lng)&&void 0!==r?r:null===e||void 0===e?void 0:e.lon),logdate:null===e||void 0===e?void 0:e.logdate,_ts:n&&n.isValid()?n.valueOf():Number.MAX_SAFE_INTEGER}})).filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng))).sort(((e,t)=>e._ts-t._ts));if(0!==e.length){_e(e[0].logdate),qe(e[e.length-1].logdate);const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return[];const r=e.filter((e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&(Math.abs(e.lat)>.1||Math.abs(e.lng)>.1)));if(0===r.length)return[];if(1===r.length)return[{lat:r[0].lat,lng:r[0].lng,logdate:r[0].logdate,_ts:r[0]._ts}];const o=null!=t.processNoise?t.processNoise:1e-10,n=null!=t.measurementNoise?t.measurementNoise:2e-9,i=null!=t.outlierGate?t.outlierGate:9,a=null!=t.maxSpeedKmh?t.maxSpeedKmh:120,l=e=>e._ts||(e.logdate?new Date(e.logdate).getTime():0);let s=0;for(;sa||(c.push(e),d=t)}if(c.length<2)return c.map((e=>({lat:e.lat,lng:e.lng,logdate:e.logdate,_ts:e._ts})));const x=e=>{const t=c.length,r=new Array(t),a=new Array(t),s=new Array(t),d=new Array(t),x=new Array(t),u=l(c[0]),h=l(c[1]),p=Math.max(.1,(h-u)/1e3),m=(c[1][e]-c[0][e])/p;r[0]=[c[0][e],m],a[0]=[n,0,0,1],s[0]=r[0].slice(),d[0]=a[0].slice(),x[0]=0;let g=u;for(let v=1;vi){r[v]=[m,f],a[v]=[k,D,M,C];continue}const W=k/I,P=M/I,R=m+W*z,Y=f+P*z;r[v]=[R,Y],a[v]=[(1-W)*k,(1-W)*D,M-P*k,C-P*D]}const f=new Array(t);f[t-1]=r[t-1].slice();for(let o=t-2;o>=0;o--){const e=x[o+1],[t,n,i,l]=a[o],c=t+e*n,u=n,h=i+e*l,p=l,[m,g,v,b]=d[o+1],A=m*b-g*v;if(!Number.isFinite(A)||Math.abs(A)<1e-30){f[o]=r[o].slice();continue}const j=b/A,y=-g/A,w=-v/A,S=m/A,k=c*j+u*w,D=c*y+u*S,M=h*j+p*w,C=h*y+p*S,z=f[o+1][0]-s[o+1][0],I=f[o+1][1]-s[o+1][1];f[o]=[r[o][0]+k*z+D*I,r[o][1]+M*z+C*I]}return f.map((e=>e[0]))},u=x("lat"),h=x("lng");return c.map(((e,t)=>({lat:u[t],lng:h[t],logdate:e.logdate,_ts:e._ts})))}(e),r=t.map((e=>({lat:e.lat,lng:e.lng})));Ke(r),function(e){let t=0;for(let r=0;r{var t;return null!==(t=e.nextPage)&&void 0!==t?t:void 0},refetchOnWindowFocus:!0,refetchOnMount:!0,refetchOnReconnect:!0}),Ht=(null===Tt||void 0===Tt?void 0:Tt.pages.flatMap((e=>e.rows)))||[];(0,n.useEffect)((()=>{if(!Et)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Ft()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return r.current&&e.observe(r.current),()=>{r.current&&e.unobserve(r.current)}}),[Et,Ft]);const{data:_t,isLoading:Bt,isError:qt,error:Jt}=(0,l.I)({queryKey:["tenantlist",Ye],queryFn:()=>(0,Q.Mn)(Ye),enabled:0!==Ye}),{data:Gt,isLoading:Zt,isError:Ut,error:Vt}=(0,l.I)({queryKey:["fetchRidersList",Ye],queryFn:Q.Sd,enabled:0!==Ye}),{data:$t,isLoading:Xt,isError:Qt,error:er}=(0,l.I)({queryKey:["gettenantlocations",vt],queryFn:()=>(0,Q.DL)(vt),enabled:0!==vt});(0,n.useEffect)((()=>{(async()=>{Ue(!0);try{await i.A.get(0==Ye?"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/deliverysummary/?fromdate=").concat(J,"&todate=").concat(V):"".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/deliverysummary/?applocationid=").concat(Ye,"&tenantid=").concat(vt,"&locationid=").concat(gt,"&fromdate=").concat(J,"&todate=").concat(V,"&userid=").concat((null===St||void 0===St?void 0:St.userid)||0)).then((e=>{$e(e.data.details.total),tt(e.data.details.pending),it(e.data.details.accepted),xt(e.data.details.arrived),lt(e.data.details.picked),ct(e.data.details.active),Qe(e.data.details.delivered),ht(e.data.details.skipped),ot(e.data.details.cancelled)})).catch((e=>{(0,re.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}))}catch(e){console.log(e)}finally{Ue(!1)}})()}),[Ye,J,V,pt,vt,gt,St]);const tr=null===Ht||void 0===Ht?void 0:Ht.map((e=>({tenantname:e.tenantname,tenantcity:e.tenantcity,tenantcontactno:e.tenantcontactno,rider:e.ridername,orderid:e.orderid,paymenttype:64==e.paymenttype?"Pay Later":42==e.paymenttype?"Pay on Delivery":"Digital",deliverydate:e.deliverydate,orderstatus:e.orderstatus,ordernotes:e.ordernotes,kms:e.kms,cumulativekms:e.cumulativekms,assigntime:e.assigntime,starttime:e.starttime,arrivaltime:e.arrivaltime,pickuptime:e.pickuptime,deliverytime:e.deliverytime,canceltime:e.canceltime,deliverycharge:e.deliverycharges,deliveryamt:e.deliveryamt,pickupcustomer:e.pickupcustomer,pickupcontactno:e.pickupcontactno,Pickupaddress:e.pickupaddress,pickupsuburb:e.pickupsuburb,pickupcity:e.applocation,pickuplat:e.pickuplat,pickuplong:e.pickuplon,deliverycustomer:e.deliverycustomer,deliverycontactno:e.deliverycontactno,deliveryaddress:e.deliveryaddress,deliverysuburb:e.locationsuburb,deliverylat:e.deliverylat,deliverylong:e.deliverylong,locationname:e.locationname,locationsuburb:e.pickuplocation,deliverylocation:e.deliverylocation,locationcontactno:e.locationcontactno})));function rr(e){return q()(e).format("DD/MM/YYYY ")}function or(e){return q()(e).format(" hh:mm A")}const nr=Nt?"An error has occurred: (fetchDeliveries) ".concat(Ot.message):qt?"An error has occurred: (getTenants) ".concat(Jt.message):Qt?"An error has occurred: (gettenantlocations) ".concat(er.message):Ut?"An error has occurred: (getriderbydelivery) ".concat(Vt.message):null;(0,n.useEffect)((()=>{nr&&he(nr,"warning",2e3)}),[nr]);const ir=[{key:"total",label:"Total Orders",color:Ae,icon:T.HU2,value:Ve},{key:"delivered",label:"Delivered",color:"#10b981",icon:T.cAP,value:Xe},{key:"pending",label:"Pending",color:"#f59e0b",icon:T.G6c,value:et},{key:"cancelled",label:"Cancelled",color:"#ef4444",icon:T.qiG,value:rt}];return(0,Z.jsxs)(Z.Fragment,{children:[(Ze||Bt||Xt||It||Zt||Kt)&&(0,Z.jsx)("div",{children:(0,Z.jsx)(te.A,{})}),Lt&&(0,Z.jsx)(g.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:Lt}),(0,Z.jsx)(le.A,{title:"Orders Details",subtitle:"Live \xb7 ".concat(_||"All Zones"," \xb7 ").concat(Pe),live:!0,action:(0,Z.jsx)(ae.A,{ref:L,locaName:_,setAppId:Te,setLocoName:B,setPage:E,pill:!0,accentColor:Ae,icon:(0,Z.jsx)(T.HPi,{size:14}),placeholder:"Select Zone",paperComponent:ye,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,Z.jsx)(f.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:ir.map((e=>{var t;const r=e.icon;return(0,Z.jsx)(f.Ay,{item:!0,xs:6,sm:6,md:3,children:(0,Z.jsx)(se.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,Z.jsx)(r,{size:20}),color:e.color,loading:Ze})},e.key)}))}),(0,Z.jsx)(s.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1.25,md:1.75},borderRadius:pe.radiusCard/8,border:"1px solid",borderColor:pe.borderSubtle,background:"#fff",boxShadow:pe.shadowSoft},children:(0,Z.jsxs)(f.Ay,{container:!0,spacing:1.25,alignItems:"center",children:[(0,Z.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,Z.jsx)(v.A,{options:_t||[],value:At,getOptionLabel:e=>(null===e||void 0===e?void 0:e.tenantname)||"",PaperComponent:ye,onOpen:e=>{Ye||(e.preventDefault(),(0,ce.k)("Please select a your app location first!","warning",3e3),setTimeout((()=>{var e;null===(e=L.current)||void 0===e||e.focus()}),0))},onChange:(e,t,r)=>{"clear"===r?(bt(0),jt(null),ft(0),wt(null)):(bt((null===t||void 0===t?void 0:t.tenantid)||0),jt(t),ft(t.locationid),wt(null))},renderInput:e=>(0,Z.jsx)(b.A,(0,o.A)((0,o.A)({},e),{},{inputRef:N,placeholder:"Select Tenant",size:"small",sx:Se("#0ea5e9"),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,Z.jsx)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,Z.jsx)(we,{color:"#0ea5e9",size:22,selected:!0,children:(0,Z.jsx)(T.Itr,{size:13})})})})}))})}),(0,Z.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,Z.jsx)(v.A,{options:$t||[],getOptionLabel:e=>e?"".concat(e.locationname," (").concat(e.suburb,")"):"",value:yt,PaperComponent:ye,onOpen:e=>{Ye||vt?vt||(e.preventDefault(),(0,ce.k)("Please select a your Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=N.current)||void 0===e||e.focus()}),0)):(e.preventDefault(),(0,ce.k)("Please select a your Location and Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=L.current)||void 0===e||e.focus()}),0))},onChange:(e,t,r)=>{"clear"===r?(ft(0),wt(null)):(ft(t.locationid||0),wt(t))},renderInput:e=>(0,Z.jsx)(b.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Location",size:"small",sx:Se("#10b981"),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,Z.jsx)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,Z.jsx)(we,{color:"#10b981",size:22,selected:!0,children:(0,Z.jsx)(T.JFD,{size:13})})})})}))})}),(0,Z.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,Z.jsx)(v.A,{options:Gt||[],value:Dt,getOptionLabel:e=>"".concat(e.firstname," ").concat(e.lastname),PaperComponent:ye,onOpen:()=>{Ye||(0,ce.k)("Select App Location First","warning",2e3)},onChange:(e,t,r)=>{"clear"===r?(kt(null),Mt(null)):(kt(t),Mt(t))},renderInput:e=>(0,Z.jsx)(b.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Rider",size:"small",sx:Se("#8b5cf6"),InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:(0,Z.jsx)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5},children:(0,Z.jsx)(we,{color:"#8b5cf6",size:22,selected:!0,children:(0,Z.jsx)(T.bsz,{size:13})})})})}))})}),(0,Z.jsx)(f.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,Z.jsxs)(u.A,{direction:"row",spacing:1,alignItems:"center",justifyContent:{xs:"flex-start",md:"flex-end"},children:[(0,Z.jsx)(d.A,{title:"Date Filter",placement:"top",children:(0,Z.jsxs)(x.A,{onClick:()=>me(!0),sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.75,borderRadius:999,cursor:"pointer",bgcolor:ge("#f59e0b"),border:"1.5px solid ".concat(be("#f59e0b")),color:"#f59e0b",fontWeight:800,fontSize:12,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(ve("#f59e0b"))}},children:[(0,Z.jsx)(T.Ki0,{size:14}),q()(J).format("DD/MM/YY")," \u2013 ",q()(V).format("DD/MM/YY")]})}),(0,Z.jsx)(A.A,{variant:"contained",size:"small",startIcon:(0,Z.jsx)(T.S3Y,{}),onClick:()=>{zt(!0),setTimeout((()=>{H("")}),0)},sx:{borderRadius:999,px:1.5,py:.75,fontWeight:800,fontSize:12,textTransform:"none",background:"linear-gradient(135deg, ".concat(Ae," 0%, ").concat(je," 100%)"),"&:hover":{background:"linear-gradient(135deg, ".concat(Ae," 0%, ").concat(je," 100%)"),boxShadow:"0 8px 22px ".concat(ve(Ae))}},children:"Export"})]})})]})}),(0,Z.jsx)(s.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:pe.radiusCard/8,borderTopRightRadius:pe.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:pe.borderSubtle,borderBottom:0,background:"#fff"},children:(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,Z.jsx)(u.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:pe.borderSubtle,borderRadius:4}},children:De.map((e=>{var t;const r=ke[e],o=r.icon,n=pt.toLowerCase()===e,i=null!==(t=Pt[e])&&void 0!==t?t:0;return(0,Z.jsxs)(x.A,{onClick:()=>mt("all"===e?"All":e),sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:999,border:"1px solid ".concat(n?r.color:pe.borderSubtle),bgcolor:n?r.color:pe.surface,color:n?"#fff":pe.textSecondary,fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:n?r.color:"#cbd5e1",bgcolor:n?r.color:pe.surfaceAlt}},children:[(0,Z.jsx)(c.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:n?"rgba(255,255,255,0.22)":fe(r.color),color:n?"#fff":r.color},children:(0,Z.jsx)(o,{size:13})}),(0,Z.jsx)(p.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:r.label}),(0,Z.jsx)(x.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:n?"rgba(255,255,255,0.22)":pe.surfaceAlt,color:n?"#fff":pe.textSecondary,border:"none"},children:i})]},e)}))}),(0,Z.jsx)(x.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,Z.jsx)(ne.A,{value:Le,onChange:Ne,onDebouncedChange:Fe,placeholder:"Search orders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(ve(Ae))}}})})]})}),(0,Z.jsx)(s.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:pe.radiusCard/8,borderBottomRightRadius:pe.radiusCard/8,border:"1px solid",borderColor:pe.borderSubtle,overflow:"hidden",background:"#fff"},children:(0,Z.jsxs)(j.A,{ref:h,onScroll:e=>{const{scrollTop:t,scrollHeight:r,clientHeight:o}=e.currentTarget;t+o>=r-50&&Et&&!Kt&&Ft()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},overflow:"auto","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:be(Ae),borderRadius:8,"&:hover":{backgroundColor:Ae}},"&::-webkit-scrollbar-track":{backgroundColor:pe.surfaceAlt}},children:[t?(0,Z.jsx)(xe.nV,{sx:{p:1.25},children:Lt?(0,Z.jsxs)(u.A,{alignItems:"center",sx:{py:6},children:[(0,Z.jsx)(ie.A,{}),(0,Z.jsx)(p.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading orders\u2026"})]}):0==(null===Ht||void 0===Ht?void 0:Ht.length)?(0,Z.jsxs)(u.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,Z.jsx)(c.A,{sx:{width:64,height:64,bgcolor:fe("#94a3b8"),color:pe.textMuted},children:(0,Z.jsx)(T.Z2J,{size:28})}),(0,Z.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:pe.textPrimary},children:"No orders to show"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary,textAlign:"center",px:2},children:Le?"Try a different keyword.":"Adjust the filters above to load orders."})]}):null===Ht||void 0===Ht?void 0:Ht.map(((e,t)=>{var r;const o=String(e.orderstatus||"").toLowerCase(),n=ke[o]||{label:e.orderstatus||"\u2014",color:Ae,icon:T.Z2J},i=n.icon,a="cancelled"===o,l="delivered"===e.orderstatus;return(0,Z.jsx)(xe.pg,{accent:n.color,header:(0,Z.jsxs)(u.A,{spacing:1.25,children:[(0,Z.jsxs)(u.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,Z.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:pe.textMuted},children:String(F*K+t+1).padStart(2,"0")}),(0,Z.jsx)(we,{color:Ae,size:32,children:(0,Z.jsx)(T.Itr,{size:16})}),(0,Z.jsxs)(u.A,{spacing:.25,sx:{minWidth:0},children:[(0,Z.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:pe.textPrimary},noWrap:!0,children:e.tenantname}),(0,Z.jsxs)(p.A,{variant:"caption",sx:{color:pe.textSecondary,fontWeight:700},children:["#",e.orderid]})]})]}),(0,Z.jsx)(d.A,{title:l?"View rider route":"Available for delivered orders",placement:"top",children:(0,Z.jsx)("span",{children:(0,Z.jsx)(y.A,{size:"small",disabled:!l,onClick:()=>{l&&(Yt(e.deliveryid),Ge(e))},sx:{flexShrink:0,bgcolor:fe(l?Ae:"#94a3b8"),color:l?Ae:pe.textMuted,border:"1px solid ".concat(be(l?Ae:"#94a3b8")),"&:hover":{bgcolor:l?Ae:fe("#94a3b8"),color:l?"#fff":pe.textMuted}},children:(0,Z.jsx)(T.Cd7,{size:14})})})})]}),(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{flexWrap:"wrap",gap:.5},children:[(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:ge(n.color),border:"1px solid ".concat(be(n.color)),color:n.color,fontSize:11,fontWeight:800},children:[(0,Z.jsx)(i,{size:12})," ",n.label]}),e.ridername&&(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:ge("#8b5cf6"),border:"1px solid ".concat(be("#8b5cf6")),color:"#8b5cf6",fontSize:11,fontWeight:800},children:[(0,Z.jsx)(T.bsz,{size:12})," ",e.ridername]}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textMuted,fontWeight:600},children:q()(e.deliverydate).utc().format("DD/MM/YYYY \xb7 hh:mm A")})]})]}),children:(0,Z.jsxs)(xe.FG,{children:[(0,Z.jsx)(xe.pY,{label:"Pickup",children:(0,Z.jsxs)(u.A,{spacing:.25,sx:{minWidth:0},children:[(0,Z.jsx)(p.A,{sx:{fontSize:13,fontWeight:700,color:pe.textPrimary},noWrap:!0,children:e.pickupcustomer||"\u2014"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},noWrap:!0,children:e.pickupcontactno}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},noWrap:!0,children:e.pickupsuburb||(e.Pickupaddress?e.Pickupaddress.slice(0,22)+"\u2026":"")}),e.applocation&&(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.75,py:.25,borderRadius:999,bgcolor:ge("#10b981"),border:"1px solid ".concat(be("#10b981")),color:"#10b981",fontSize:10,fontWeight:800,width:"fit-content"},children:[(0,Z.jsx)(T.JFD,{size:11})," ",e.applocation]})]})}),(0,Z.jsx)(xe.pY,{label:"Drop",children:(0,Z.jsxs)(u.A,{spacing:.25,sx:{minWidth:0},children:[(0,Z.jsx)(p.A,{sx:{fontSize:13,fontWeight:700,color:pe.textPrimary},noWrap:!0,children:e.deliverycustomer||"\u2014"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},noWrap:!0,children:e.deliverycontactno}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},noWrap:!0,children:e.deliverysuburb||(e.deliveryaddress?e.deliveryaddress.slice(0,22)+"\u2026":"")})]})}),(0,Z.jsx)(xe.pY,{label:"Assigned",children:(0,Z.jsx)(Ce,{value:e.assigntime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"Accepted",children:(0,Z.jsx)(Ce,{value:e.acceptedtime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"Arrived",children:(0,Z.jsx)(Ce,{value:e.arrivaltime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"Picked",children:(0,Z.jsx)(Ce,{value:e.pickuptime,formatDate:rr,formatTime:or,success:"active"===e.deliverystatus})}),(0,Z.jsx)(xe.pY,{label:"Active",children:(0,Z.jsx)(Ce,{value:e.starttime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"Delivered",children:(0,Z.jsx)(Ce,{value:e.deliverytime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"Cancelled",children:(0,Z.jsx)(Ce,{value:e.canceltime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(xe.pY,{label:"KMS \xb7 plan / act / rider",full:!0,children:(0,Z.jsxs)(u.A,{direction:"row",spacing:.5,sx:{flexWrap:"wrap",gap:.5},children:[(0,Z.jsx)(Me,{color:"#ef4444",icon:(0,Z.jsx)(T.xI$,{size:11}),label:a||""==e.kms?"0 km":"".concat(e.kms," km"),tooltip:"KMS"}),(0,Z.jsx)(Me,{color:"#10b981",icon:(0,Z.jsx)(T.xI$,{size:11}),label:"".concat(null!==(r=e.cumulativekms)&&void 0!==r?r:0," km"),tooltip:"Actual KMS"}),(0,Z.jsx)(Me,{color:"#0ea5e9",icon:(0,Z.jsx)(T.xI$,{size:11}),label:"".concat(e.previouskms||(a?"0.00":e.kms)||0," km"),tooltip:"Rider KMS"})]})}),(0,Z.jsx)(xe.pY,{label:"Charges \xb7 chg / amt",full:!0,children:(0,Z.jsxs)(u.A,{direction:"row",spacing:.5,sx:{flexWrap:"wrap",gap:.5},children:[(0,Z.jsx)(Me,{color:"#ef4444",icon:(0,Z.jsx)(T.YHz,{size:11}),label:a||""==e.deliverycharges?"0.00":"".concat(e.deliverycharges,".00"),tooltip:"Delivery Charge"}),(0,Z.jsx)(Me,{color:"#10b981",icon:(0,Z.jsx)(T.YHz,{size:11}),label:""==e.deliveryamt?"0.00":"".concat(e.deliveryamt,".00"),tooltip:"Delivery Amount"})]})}),e.ordernotes&&(0,Z.jsx)(xe.pY,{label:"Notes",full:!0,children:(0,Z.jsxs)(u.A,{direction:"row",spacing:.5,alignItems:"flex-start",children:[(0,Z.jsx)(T.NpB,{size:12,color:pe.textMuted,style:{marginTop:2,flexShrink:0}}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},children:e.ordernotes})]})})]})},e.deliveryid||"".concat(e.orderid,"-").concat(t))}))}):(0,Z.jsxs)(w.A,{stickyHeader:!0,sx:{minWidth:1600},children:[(0,Z.jsx)(S.A,{children:(0,Z.jsxs)(k.A,{sx:{"& th":{backgroundColor:pe.surfaceAlt,color:pe.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(pe.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:1.5}}},children:[(0,Z.jsx)(D.A,{children:"#"}),(0,Z.jsx)(D.A,{children:"Map"}),(0,Z.jsx)(D.A,{children:"Client"}),(0,Z.jsx)(D.A,{children:"Pickup"}),(0,Z.jsx)(D.A,{children:"Drop"}),(0,Z.jsx)(D.A,{children:"Status / Rider"}),(0,Z.jsx)(D.A,{children:"Assigned"}),(0,Z.jsx)(D.A,{children:"Accepted"}),(0,Z.jsx)(D.A,{children:"Arrived"}),(0,Z.jsx)(D.A,{children:"Picked"}),(0,Z.jsx)(D.A,{children:"Active"}),(0,Z.jsx)(D.A,{children:"Delivered"}),(0,Z.jsx)(D.A,{children:"Cancelled"}),(0,Z.jsx)(D.A,{children:"Notes"}),(0,Z.jsx)(D.A,{align:"center",children:"KMS"}),(0,Z.jsx)(D.A,{align:"center",children:"Charges"})]})}),(0,Z.jsx)(M.A,{children:Lt?(0,Z.jsx)(de,{rows:16,columns:16,height:15}):0==(null===Ht||void 0===Ht?void 0:Ht.length)?(0,Z.jsx)(k.A,{children:(0,Z.jsx)(D.A,{colSpan:16,sx:{py:6},children:(0,Z.jsxs)(u.A,{alignItems:"center",spacing:1.5,children:[(0,Z.jsx)(c.A,{sx:{width:64,height:64,bgcolor:fe("#94a3b8"),color:pe.textMuted},children:(0,Z.jsx)(T.Z2J,{size:28})}),(0,Z.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:pe.textPrimary},children:"No orders to show"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},children:Le?"Try a different keyword.":"Adjust the filters above to load orders."})]})})}):null===Ht||void 0===Ht?void 0:Ht.map(((e,t)=>{var r;const o=String(e.orderstatus||"").toLowerCase(),n=ke[o]||{label:e.orderstatus||"\u2014",color:Ae,icon:T.Z2J},i=n.icon,a="cancelled"===o;return(0,Z.jsxs)(k.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(pe.divider),py:{xs:1,md:1.25},px:{xs:1,md:1.5},verticalAlign:"top"},"&:hover":{backgroundColor:pe.surfaceAlt}},children:[(0,Z.jsx)(D.A,{children:(0,Z.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:pe.textMuted},children:String(F*K+t+1).padStart(2,"0")})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(d.A,{title:"delivered"===e.orderstatus?"View rider route":"Available for delivered orders",placement:"top",children:(0,Z.jsx)("span",{children:(0,Z.jsx)(y.A,{size:"small",disabled:"delivered"!==e.orderstatus,onClick:()=>{"delivered"===e.orderstatus&&(Yt(e.deliveryid),Ge(e))},sx:{bgcolor:"delivered"===e.orderstatus?fe(Ae):fe("#94a3b8"),color:"delivered"===e.orderstatus?Ae:pe.textMuted,border:"1px solid ".concat("delivered"===e.orderstatus?be(Ae):be("#94a3b8")),"&:hover":{bgcolor:"delivered"===e.orderstatus?Ae:fe("#94a3b8"),color:"delivered"===e.orderstatus?"#fff":pe.textMuted}},children:(0,Z.jsx)(T.Cd7,{size:14})})})})}),(0,Z.jsx)(D.A,{children:(0,Z.jsxs)(u.A,{direction:"row",alignItems:"flex-start",spacing:1,children:[(0,Z.jsx)(we,{color:Ae,size:32,children:(0,Z.jsx)(T.Itr,{size:16})}),(0,Z.jsxs)(u.A,{spacing:.25,sx:{minWidth:0},children:[(0,Z.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:pe.textPrimary,whiteSpace:"nowrap"},children:e.tenantname}),(0,Z.jsx)(d.A,{title:"Order ID",placement:"top",children:(0,Z.jsxs)(p.A,{variant:"caption",sx:{color:pe.textSecondary,fontWeight:700},children:["#",e.orderid]})}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textMuted},children:q()(e.deliverydate).utc().format("DD/MM/YYYY \xb7 hh:mm A")})]})]})}),(0,Z.jsx)(D.A,{children:(0,Z.jsxs)(u.A,{spacing:.25,children:[(0,Z.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:pe.textPrimary,whiteSpace:"nowrap"},children:e.pickupcustomer||"\u2014"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},children:e.pickupcontactno}),(0,Z.jsx)(d.A,{title:e.Pickupaddress||e.pickupsuburb||"",children:(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary,cursor:"pointer",display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.pickupsuburb||(e.Pickupaddress?e.Pickupaddress.slice(0,22)+"\u2026":"")})}),e.applocation&&(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.75,py:.25,borderRadius:999,bgcolor:ge("#10b981"),border:"1px solid ".concat(be("#10b981")),color:"#10b981",fontSize:10,fontWeight:800,width:"fit-content"},children:[(0,Z.jsx)(T.JFD,{size:11})," ",e.applocation]})]})}),(0,Z.jsx)(D.A,{children:(0,Z.jsxs)(u.A,{spacing:.25,children:[(0,Z.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:pe.textPrimary,whiteSpace:"nowrap"},children:e.deliverycustomer||"\u2014"}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary},children:e.deliverycontactno}),(0,Z.jsx)(d.A,{title:e.deliveryaddress||"",children:(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary,cursor:"pointer",display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.deliverysuburb||(e.deliveryaddress?e.deliveryaddress.slice(0,22)+"\u2026":"")})})]})}),(0,Z.jsx)(D.A,{children:(0,Z.jsxs)(u.A,{spacing:.5,children:[(0,Z.jsxs)(x.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:ge(n.color),border:"1px solid ".concat(be(n.color)),color:n.color,fontSize:11,fontWeight:800,width:"fit-content"},children:[(0,Z.jsx)(i,{size:12})," ",n.label]}),e.ridername&&(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,Z.jsx)(T.bsz,{size:12,color:pe.textMuted}),(0,Z.jsx)(d.A,{title:"Rider ID: ".concat(e.userid),children:(0,Z.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:pe.textPrimary,whiteSpace:"nowrap"},children:e.ridername})})]})]})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.assigntime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.acceptedtime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.arrivaltime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.pickuptime,formatDate:rr,formatTime:or,success:"active"===e.deliverystatus})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.starttime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.deliverytime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{children:(0,Z.jsx)(Ce,{value:e.canceltime,formatDate:rr,formatTime:or})}),(0,Z.jsx)(D.A,{sx:{maxWidth:180},children:e.ordernotes?(0,Z.jsxs)(u.A,{direction:"row",spacing:.5,alignItems:"flex-start",children:[(0,Z.jsx)(T.NpB,{size:12,color:pe.textMuted,style:{marginTop:2,flexShrink:0}}),(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textSecondary,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.ordernotes})]}):(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textMuted},children:"\u2014"})}),(0,Z.jsx)(D.A,{align:"center",children:(0,Z.jsxs)(u.A,{spacing:.5,alignItems:"center",children:[(0,Z.jsx)(Me,{color:"#ef4444",icon:(0,Z.jsx)(T.xI$,{size:11}),label:a||""==e.kms?"0 km":"".concat(e.kms," km"),tooltip:"KMS"}),(0,Z.jsx)(Me,{color:"#10b981",icon:(0,Z.jsx)(T.xI$,{size:11}),label:"".concat(null!==(r=e.cumulativekms)&&void 0!==r?r:0," km"),tooltip:"Actual KMS"}),(0,Z.jsx)(Me,{color:"#0ea5e9",icon:(0,Z.jsx)(T.xI$,{size:11}),label:"".concat(e.previouskms||(a?"0.00":e.kms)||0," km"),tooltip:"Rider KMS"})]})}),(0,Z.jsx)(D.A,{align:"center",children:(0,Z.jsxs)(u.A,{spacing:.5,alignItems:"center",children:[(0,Z.jsx)(Me,{color:"#ef4444",icon:(0,Z.jsx)(T.YHz,{size:11}),label:a||""==e.deliverycharges?"0.00":"".concat(e.deliverycharges,".00"),tooltip:"Delivery Charge"}),(0,Z.jsx)(Me,{color:"#10b981",icon:(0,Z.jsx)(T.YHz,{size:11}),label:""==e.deliveryamt?"0.00":"".concat(e.deliveryamt,".00"),tooltip:"Delivery Amount"})]})})]},e.deliveryid||"".concat(e.orderid,"-").concat(t))}))})]}),(0,Z.jsx)(C.A,{}),0!==(null===Ht||void 0===Ht?void 0:Ht.length)&&(0,Z.jsx)(u.A,{justifyContent:"center",alignItems:"center",sx:{width:"100%",py:2},children:(0,Z.jsx)(u.A,{ref:r,style:{textAlign:"center",width:"100%"},children:Kt||Et?(0,Z.jsx)(ie.A,{}):(0,Z.jsx)(p.A,{variant:"caption",sx:{color:pe.textMuted,fontWeight:600},children:"No more orders"})})})]})}),(0,Z.jsxs)(z.A,{open:Ct,onClose:()=>zt(!1),fullWidth:!0,maxWidth:"sm",fullScreen:t,PaperProps:{sx:{borderRadius:{xs:0,sm:3},overflow:"hidden"}},children:[(0,Z.jsx)(I.A,{sx:{background:"linear-gradient(135deg, ".concat(Ae," 0%, ").concat(je," 100%)"),color:"#fff",py:2},children:(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,Z.jsx)(c.A,{sx:{width:36,height:36,bgcolor:"rgba(255,255,255,0.22)",color:"#fff"},children:(0,Z.jsx)(T.S3Y,{size:20})}),(0,Z.jsxs)(u.A,{children:[(0,Z.jsx)(p.A,{sx:{fontSize:11,fontWeight:700,opacity:.85,letterSpacing:.6,textTransform:"uppercase",lineHeight:1},children:"Report"}),(0,Z.jsx)(p.A,{sx:{fontWeight:800,fontSize:{xs:"1.05rem",sm:"1.2rem"},lineHeight:1.2,mt:.25},children:"Export Orders"})]})]}),(0,Z.jsx)(y.A,{size:"small",onClick:()=>zt(!1),sx:{color:"#fff",bgcolor:"rgba(255,255,255,0.18)","&:hover":{bgcolor:"rgba(255,255,255,0.3)"}},children:(0,Z.jsx)(T.m6K,{size:16})})]})}),(0,Z.jsxs)(W.A,{sx:{p:2},children:[Lt&&(0,Z.jsx)(G.A,{}),[{label:"App Location",value:_,color:Ae},{label:"Tenant",value:null===At||void 0===At?void 0:At.tenantname,color:"#0ea5e9"},{label:"Business Location",value:null===yt||void 0===yt?void 0:yt.locationname,color:"#10b981"},{label:"Status",value:pt,color:"#f59e0b"},{label:"Rider",value:Dt?"".concat(Dt.firstname," ").concat(Dt.lastname):null,color:"#8b5cf6"},{label:"Keyword",value:Le,color:"#06b6d4"},{label:"Start Date",value:J,color:"#14b8a6"},{label:"End Date",value:V,color:"#ef4444"}].map(((e,t)=>(0,Z.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{px:1.5,py:1,borderRadius:2,bgcolor:ge(e.color),border:"1px solid ".concat(be(e.color)),mb:1},children:[(0,Z.jsx)(p.A,{variant:"body2",sx:{fontWeight:700,color:pe.textPrimary},children:e.label}),(0,Z.jsx)(P.A,{size:"small",label:e.value||"None",sx:{fontWeight:700,bgcolor:e.value?e.color:fe("#94a3b8"),color:e.value?"#fff":pe.textMuted,border:"none"}})]},t)))]}),(0,Z.jsxs)(R.A,{sx:{p:2,bgcolor:pe.surfaceAlt,gap:1},children:[(0,Z.jsx)(A.A,{color:"inherit",variant:"outlined",onClick:()=>zt(!1),sx:{borderRadius:999,px:2,textTransform:"none",fontWeight:700,borderColor:pe.borderSubtle,color:pe.textSecondary},children:"Cancel"}),(0,Z.jsx)(ee.pK,{data:tr,filename:"Orders_Detail_".concat(q()().format("YYYY-MM-DD_HHmmss"),".csv"),label:"Download CSV",btnLoading:Lt,onClick:()=>{setTimeout((()=>zt(!1)),0)}})]})]}),(0,Z.jsx)(oe.A,{open:ue,onClose:()=>me(!1),onSelect:e=>{U(e.startDate),$(e.endDate),Re(e.label)}}),(0,Z.jsx)(z.A,{open:Ie,onClose:()=>{We(!1)},fullScreen:!0,fullWidth:!0,children:Ee&&(0,Z.jsx)("div",{children:(0,Z.jsx)(X,{coordinates:Ee,additionalProps:{riderStart:He,riderEnd:Be},order:Je,setMapOpen:We})})})]})}},23787:(e,t,r)=>{r.d(t,{FG:()=>h,nV:()=>x,pY:()=>p,pg:()=>u});var o=r(89379),n=r(80045),i=r(93230),a=r(2235),l=r(16491),s=r(82053),c=r(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:r=!1,onScroll:a,sx:l}=e,s=(0,n.A)(e,d);return(0,c.jsx)(i.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:a,sx:(0,o.A)((0,o.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},s),{},{children:t}))},u=e=>{let{accent:t="#662582",header:r,footer:n,selected:i=!1,onClick:s,children:d,sx:x}=e;return(0,c.jsxs)(a.A,{elevation:0,onClick:s,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[r,d,n]})]})},h=e=>{let{children:t,columns:r=2,sx:n}=e;return(0,c.jsx)(l.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},p=e=>{let{label:t,value:r,children:o,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(s.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(s.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},27001:(e,t,r)=>{r.d(t,{A:()=>l});var o=r(93230),n=r(16491),i=r(82053),a=r(44414);function l(e){let{title:t,subtitle:r,live:l=!1,action:s}=e;return(0,a.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,a.jsxs)(n.A,{sx:{minWidth:0},children:[(0,a.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),r&&(0,a.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[l&&(0,a.jsx)(n.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,a.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:r})]})]}),s&&(0,a.jsx)(n.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:s})]})}},35678:(e,t,r)=>{r.d(t,{A:()=>j});var o=r(9950),n=r(96583),i=r(40033),a=r(82053),l=r(28170),s=r(93230),c=r(82223),d=r(55916),x=r(4159),u=r.n(x),h=r(56712),p=r(81417),m=r(96600),g=r(53132),f=r(94289),v=r(57326),b=r(50624),A=r(44414);const j=e=>{let{open:t,onClose:r,onSelect:x}=e;const[j,y]=(0,o.useState)(null);return(0,A.jsxs)(n.A,{open:t,onClose:r,children:[(0,A.jsx)(i.A,{align:"left",children:(0,A.jsx)(a.A,{variant:"h4",children:"Select Filter Options"})}),(0,A.jsx)(l.A,{sx:{width:"100%"},className:"datedialog",children:(0,A.jsx)(d.U,{open:t,toggle:r,id:"daterange1",onChange:e=>{y({startDate:u()(e.startDate).format("YYYY-MM-DD"),endDate:u()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,h.A)(new Date,-1),endDate:(0,h.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,h.A)(new Date,1),endDate:(0,h.A)(new Date,1)},{label:"This Week",startDate:(0,p.A)(new Date),endDate:(0,m.A)(new Date)},{label:"Last Week",startDate:(0,p.A)((0,g.A)(new Date,-1)),endDate:(0,m.A)((0,g.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,g.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,f.A)(new Date),endDate:(0,v.A)(new Date)},{label:"Last Month",startDate:(0,f.A)((0,b.A)(new Date,-1)),endDate:(0,v.A)((0,b.A)(new Date,-1))}]})}),(0,A.jsx)(s.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,A.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{j?(x(j),r()):r()},children:"OK"})})]})}},36803:(e,t,r)=>{r.d(t,{A:()=>x});var o=r(48089),n=r(50704),i=r(93230),a=r(16491),l=r(82053),s=r(82917),c=r(41413),d=r(44414);function x(e){let{title:t,value:r,icon:x,color:u="#662582",caption:h,loading:p=!1}=e;return(0,d.jsx)(o.A,{sx:{height:"100%"},children:(0,d.jsx)(n.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(a.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(l.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),p?(0,d.jsx)(s.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(l.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),h&&(0,d.jsx)(l.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:h})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(u,"14"),color:u,flexShrink:0},children:x})]})})})}},46639:(e,t,r)=>{r.d(t,{A:()=>P});var o=r(57528),n=r(98587),i=r(58168),a=r(9950),l=r(72004),s=r(3484),c=r(88283),d=r(89548),x=r(18463),u=r(59254),h=r(45558),p=r(1614);function m(e){return(0,p.Ay)("MuiCircularProgress",e)}(0,h.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var g,f,v,b,A=r(44414);const j=["className","color","disableShrink","size","style","thickness","value","variant"];let y,w,S,k;const D=44,M=(0,c.i7)(y||(y=g||(g=(0,o.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),C=(0,c.i7)(w||(w=f||(f=(0,o.A)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),z=(0,u.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t["color".concat((0,d.A)(r.color))]]}})((e=>{let{ownerState:t,theme:r}=e;return(0,i.A)({display:"inline-block"},"determinate"===t.variant&&{transition:r.transitions.create("transform")},"inherit"!==t.color&&{color:(r.vars||r).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,c.AH)(S||(S=v||(v=(0,o.A)(["\n animation: "," 1.4s linear infinite;\n "]))),M)})),I=(0,u.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),W=(0,u.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t["circle".concat((0,d.A)(r.variant))],r.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:r}=e;return(0,i.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,c.AH)(k||(k=b||(b=(0,o.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),C)})),P=a.forwardRef((function(e,t){const r=(0,x.b)({props:e,name:"MuiCircularProgress"}),{className:o,color:a="primary",disableShrink:c=!1,size:u=40,style:h,thickness:p=3.6,value:g=0,variant:f="indeterminate"}=r,v=(0,n.A)(r,j),b=(0,i.A)({},r,{color:a,disableShrink:c,size:u,thickness:p,value:g,variant:f}),y=(e=>{const{classes:t,variant:r,color:o,disableShrink:n}=e,i={root:["root",r,"color".concat((0,d.A)(o))],svg:["svg"],circle:["circle","circle".concat((0,d.A)(r)),n&&"circleDisableShrink"]};return(0,s.A)(i,m,t)})(b),w={},S={},k={};if("determinate"===f){const e=2*Math.PI*((D-p)/2);w.strokeDasharray=e.toFixed(3),k["aria-valuenow"]=Math.round(g),w.strokeDashoffset="".concat(((100-g)/100*e).toFixed(3),"px"),S.transform="rotate(-90deg)"}return(0,A.jsx)(z,(0,i.A)({className:(0,l.A)(y.root,o),style:(0,i.A)({width:u,height:u},S,h),ownerState:b,ref:t,role:"progressbar"},k,v,{children:(0,A.jsx)(I,{className:y.svg,ownerState:b,viewBox:"".concat(22," ").concat(22," ").concat(D," ").concat(D),children:(0,A.jsx)(W,{className:y.circle,style:w,ownerState:b,cx:D,cy:D,r:(D-p)/2,fill:"none",strokeWidth:p})})}))}))},56311:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(89379),n=r(9950),i=r(2660),a=r(2046),l=r(83274),s=r(25333),c=r(97125),d=r(7762),x=r(52097),u=r(44414);const h=e=>{let{value:t,onChange:r,onDebouncedChange:h,debounceTime:p=500,placeholder:m="Search (ctrl+k)",sx:g}=e;const f=(0,n.useRef)(null),[v]=(0,x.d7)(t,p);return(0,n.useEffect)((()=>{h&&h(v)}),[v,h]),(0,n.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=f.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===f.current&&f.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,u.jsx)(i.A,{sx:(0,o.A)({},g),inputRef:f,placeholder:m,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,u.jsx)(a.A,{position:"start",sx:{mr:-.5},children:(0,u.jsx)(c.A,{})}),endAdornment:(0,u.jsx)(l.A,{title:"Clear",children:(0,u.jsx)(s.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>r(""),children:(0,u.jsx)(d.A,{})})})})}},58691:(e,t,r)=>{r.d(t,{A:()=>l});r(9950);var o=r(16491),n=r(46639),i=r(62217),a=r(44414);function l(e){let{size:t=70,imgSize:r=40,alt:l="loader"}=e;return(0,a.jsxs)(o.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,a.jsx)(n.A,{size:t}),(0,a.jsx)(o.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:r,height:r},children:(0,a.jsx)("img",{src:i,alt:l,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,t,r)=>{r.d(t,{A:()=>u});var o=r(89379),n=r(9950),i=r(93230),a=r(41413),l=r(77922),s=r(29925),c=r(26910),d=r(31222),x=r(44414);const u=(0,n.forwardRef)(((e,t)=>{let{setAppId:r,setLocoName:u,setPage:h,sx:p,textfeildSx:m,textfieldSx:g,pill:f=!1,accentColor:v="#6366f1",icon:b,placeholder:A="Select Zone",paperComponent:j}=e;const[y,w]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),w(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const S=e=>"".concat(v).concat(e),k=S("26"),D=S("18"),M=f?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(k)},"&.Mui-focused fieldset":{borderColor:v,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},C=f&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(a.A,{sx:{width:24,height:24,bgcolor:D,color:v,transition:"background-color 0.15s, color 0.15s"},children:b||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:j,sx:(0,o.A)({},p),onChange:(e,t,o)=>{"clear"===o?(null===r||void 0===r||r(0),null===u||void 0===u||u(""),null===h||void 0===h||h(0)):t&&(null===r||void 0===r||r(t.applocationid),null===u||void 0===u||u(t.locationname),null===h||void 0===h||h(0))},renderInput:e=>f?(0,x.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:A,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:C}),sx:(0,o.A)((0,o.A)({},M),g||m||{})})):(0,x.jsx)(s.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},g||m||{})}))})}))}}]); \ No newline at end of file diff --git a/build/static/js/9521.15393fd8.chunk.js b/build/static/js/9521.15393fd8.chunk.js deleted file mode 100644 index 6f6cdab..0000000 --- a/build/static/js/9521.15393fd8.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[9521],{19521:(e,t,o)=>{o.r(t),o.d(t,{default:()=>re});var r=o(89379),s=o(9950),n=o(26910),i=o(54826),l=o(58691),a=o(2235),c=o(41413),d=o(14857),x=o(47223),h=o(93230),u=o(82053),p=o(16491),m=o(60899),g=o(83274),A=o(25333),f=o(1320),j=o(15769),b=o(69780),v=o(9213),S=o(21671),w=o(34075),y=o(96583),k=o(40033),C=o(28170),W=o(29925),R=o(77922),z=o(79739),P=o(82223),T=o(31222),Y=o(99459),I=o(28217),M=o(55471),L=o.n(M),E=o(21209),J=o(52351),N=o(56311),H=o(59212),B=o(60010),K=o(36150),Z=o(81425),F=o(20466),q=o(96646),D=o(23787),O=o(44414);const V={radiusPill:999,radiusCard:16,shadowSoft:"0 14px 40px rgba(15, 23, 42, 0.10)",shadowMd:"0 8px 24px rgba(15, 23, 42, 0.08)",shadowPop:"0 18px 50px rgba(15, 23, 42, 0.18)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},G=(e,t)=>"".concat(e).concat(t),U=e=>G(e,"08"),Q=e=>G(e,"18"),X=e=>G(e,"26"),_=e=>G(e,"55"),$=e=>(0,O.jsx)(a.A,(0,r.A)((0,r.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:V.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),ee=e=>{let{color:t,selected:o,size:r=24,children:s}=e;return(0,O.jsx)(c.A,{sx:{width:r,height:r,bgcolor:o?t:Q(t),color:o?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:s})},te="AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8";const oe={current:null};function re(){var e,t;const o=(0,d.A)(),M=(0,x.A)(o.breakpoints.down("md")),G=(0,s.useRef)(),re=(0,s.useRef)(),[se]=(0,s.useState)(50),[ne]=(0,s.useState)(0),[ie,le]=(0,s.useState)(0),[ae,ce]=(0,s.useState)("All"),[de,xe]=(0,s.useState)({}),[he,ue]=(0,s.useState)(!1),[pe,me]=(0,s.useState)(""),[ge,Ae]=(0,s.useState)({}),[fe,je]=(0,s.useState)(""),[be,ve]=(0,s.useState)(""),[Se,we]=(0,s.useState)(""),[ye,ke]=(0,s.useState)(""),[Ce,We]=(0,s.useState)(""),[Re,ze]=(0,s.useState)(""),[Pe,Te]=(0,s.useState)(null),[Ye,Ie]=(0,s.useState)(""),[Me,Le]=(0,s.useState)([]),Ee=(0,s.useRef)(!1);"undefined"===typeof window||Ee.current||(document.querySelector("#google-maps")||function(e,t,o){if(!t)return;const r=document.createElement("script");r.setAttribute("async",""),r.setAttribute("id",o),r.src=e,t.appendChild(r)}("https://maps.googleapis.com/maps/api/js?key=".concat(te,"&libraries=places"),document.querySelector("head"),"google-maps"),Ee.current=!0);const Je=(0,s.useMemo)((()=>(0,E.A)(((e,t)=>{oe.current.getPlacePredictions(e,t)}),400)),[]);(0,s.useEffect)((()=>{let e=!0;if(!oe.current&&window.google&&(oe.current=new window.google.maps.places.AutocompleteService),oe.current){if(""!==Ye)return Je({input:Ye},(t=>{if(e){let e=[];Pe&&(e=[Pe]),t&&(e=[...e,...t]),Le(e)}})),()=>{e=!1};Le(Pe?[Pe]:[])}}),[Pe,Ye,Je]),Y.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8"),(0,s.useEffect)((()=>{try{console.log("selected address =>",pe),Y.A.fromAddress(pe).then((e=>{if(console.log("lat long response =>",e.results[0]),"OK"==e.status){const{lat:t,lng:o}=e.results[0].geometry.location;if(Ae({lat:t,lng:o}),e.results[0].address_components){let s,n,i,l,a=e.results[0];for(let e=0;e(0,r.A)((0,r.A)({},e),{},{city:s||"",state:i||"",postcode:n||"",suburb:l||"",latitude:t||"",longitude:o||""})))}}}),(e=>{console.log(e)}))}catch(e){console.log(e)}}),[pe]);const{data:Ne,isLoading:He,isFetchingNextPage:Be,fetchNextPage:Ke,hasNextPage:Ze,refetch:Fe}=(0,B.q)({queryKey:["getAllCustomers",ie,Re,se],queryFn:Z.jO,getNextPageParam:e=>e.nextPage,keepPreviousData:!0}),qe=(null===Ne||void 0===Ne?void 0:Ne.pages.flatMap((e=>e.data)))||[];(0,s.useEffect)((()=>{if(!Ze)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&Ke()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return re.current&&e.observe(re.current),()=>{re.current&&e.unobserve(re.current)}}),[Ze,Ke]);const De=e=>{const{scrollTop:t,scrollHeight:o,clientHeight:r}=e.currentTarget;t+r>=o-50&&Ze&&!Be&&Ke()},{data:Oe,isLoading:Ve}=(0,K.I)({queryKey:["customersummary",ie],queryFn:Z.zf});(0,s.useEffect)((()=>{console.log("pageCount",Oe)}),[Oe]);const Ge=[{key:"total",label:"Total Customers",color:"#662582",icon:T.Itr,value:null!==(e=null===Oe||void 0===Oe?void 0:Oe.Total)&&void 0!==e?e:0},{key:"loaded",label:"Loaded in View",color:"#0ea5e9",icon:T.lbm,value:qe.length},{key:"zone",label:"Active Zone",color:"#10b981",icon:T.JFD,value:ae||"All Zones"}];return(0,O.jsxs)(O.Fragment,{children:[(Ve||He)&&(0,O.jsx)(J.A,{}),(0,O.jsx)(a.A,{elevation:0,sx:{mb:{xs:1.5,md:2},p:{xs:1.5,sm:2,md:2.5},borderRadius:V.radiusCard/8,border:"1px solid",borderColor:V.borderSubtle,background:"linear-gradient(135deg, ".concat(U("#662582")," 0%, ").concat(U("#9255AB")," 100%)"),boxShadow:V.shadowMd},children:(0,O.jsxs)(h.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",spacing:{xs:1.5,sm:2},children:[(0,O.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:{xs:1.25,sm:1.75},children:[(0,O.jsx)(c.A,{sx:{width:{xs:40,sm:48},height:{xs:40,sm:48},bgcolor:"#662582",color:"#fff",boxShadow:"0 6px 18px rgba(99,102,241,0.32)"},children:(0,O.jsx)(T._pN,{size:22})}),(0,O.jsxs)(h.A,{children:[(0,O.jsx)(u.A,{variant:"h3",sx:{fontWeight:800,color:V.textPrimary,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"}},children:"Customers"}),(0,O.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[(0,O.jsx)(p.A,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:"#10b981",boxShadow:"0 0 0 4px rgba(16,185,129,0.18)"}}),(0,O.jsxs)(u.A,{variant:"caption",sx:{color:V.textSecondary,fontWeight:600},children:["Live \xb7 ",ae||"All Zones"]})]})]})]}),(0,O.jsx)(H.A,{locaName:ae,setAppId:le,setLocoName:ce,pill:!0,accentColor:"#662582",icon:(0,O.jsx)(T.HPi,{size:14}),placeholder:"Select Zone",paperComponent:$,sx:{width:{xs:"100%",sm:280},zIndex:100}})]})}),(0,O.jsx)(m.Ay,{container:!0,spacing:{xs:1.25,sm:1.5,md:2},sx:{mt:"1px"},children:Ge.map((e=>{const t=e.icon;return(0,O.jsx)(m.Ay,{item:!0,xs:6,sm:4,children:(0,O.jsxs)(a.A,{elevation:0,sx:{position:"relative",overflow:"hidden",p:{xs:1.25,sm:1.75,md:2.25},borderRadius:V.radiusCard/8,border:"1px solid",borderColor:V.borderSubtle,background:"#fff",transition:"transform 0.2s, box-shadow 0.2s, border-color 0.2s","&:hover":{transform:"translateY(-3px)",boxShadow:V.shadowMd,borderColor:_(e.color)}},children:[(0,O.jsx)(p.A,{sx:{position:"absolute",top:0,left:0,right:0,height:3,background:"linear-gradient(90deg, ".concat(e.color," 0%, ").concat(Q(e.color)," 100%)")}}),(0,O.jsxs)(h.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,O.jsxs)(h.A,{spacing:.5,sx:{minWidth:0,flex:1},children:[(0,O.jsx)(u.A,{variant:"caption",sx:{color:V.textSecondary,fontWeight:700,letterSpacing:.4,textTransform:"uppercase",fontSize:{xs:10,sm:11},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.label}),(0,O.jsx)(u.A,{sx:{fontWeight:800,color:V.textPrimary,lineHeight:1.1,fontSize:{xs:"1.25rem",sm:"1.5rem",md:"1.75rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.value})]}),(0,O.jsx)(c.A,{sx:{width:{xs:36,sm:42,md:48},height:{xs:36,sm:42,md:48},bgcolor:Q(e.color),color:e.color,boxShadow:"inset 0 0 0 1px ".concat(_(e.color)),flexShrink:0},children:(0,O.jsx)(t,{size:20})})]})]})},e.key)}))}),(0,O.jsx)(a.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:V.radiusCard/8,borderTopRightRadius:V.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:V.borderSubtle,borderBottom:0,background:"#fff"},children:(0,O.jsxs)(h.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,O.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1.25,children:[(0,O.jsx)(ee,{color:"#662582",size:32,children:(0,O.jsx)(T.Itr,{size:18})}),(0,O.jsxs)(h.A,{children:[(0,O.jsx)(u.A,{variant:"caption",sx:{fontWeight:800,color:V.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:"Directory"}),(0,O.jsxs)(u.A,{variant:"body2",sx:{color:V.textPrimary,fontWeight:700},children:[null!==(t=null===Oe||void 0===Oe?void 0:Oe.Total)&&void 0!==t?t:0," total \xb7 ",qe.length," loaded"]})]})]}),(0,O.jsx)(p.A,{sx:{width:{xs:"100%",sm:280,lg:340},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,O.jsx)(N.A,{value:Ce,onChange:We,onDebouncedChange:ze,placeholder:"Search customers (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:U("#662582"),"& fieldset":{borderColor:_("#662582"),borderWidth:1.5},"&:hover fieldset":{borderColor:"#662582"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(X("#662582"))}}})})]})}),(0,O.jsx)(a.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:V.radiusCard/8,borderBottomRightRadius:V.radiusCard/8,border:"1px solid",borderColor:V.borderSubtle,overflow:"hidden",background:"#fff"},children:M?(0,O.jsxs)(D.nV,{scroll:!0,onScroll:De,children:[He&&(0,O.jsx)(l.A,{}),0!==(null===qe||void 0===qe?void 0:qe.length)||He?null===qe||void 0===qe?void 0:qe.map(((e,t)=>(0,O.jsx)(D.pg,{accent:"#662582",header:(0,O.jsxs)(h.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,O.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,O.jsx)(ee,{color:"#662582",size:36,children:(0,O.jsx)(T.Azs,{size:18})}),(0,O.jsxs)(h.A,{sx:{minWidth:0},children:[(0,O.jsx)(u.A,{variant:"subtitle2",sx:{fontWeight:700,color:V.textPrimary},noWrap:!0,children:e.firstname||"\u2014"}),(0,O.jsxs)(u.A,{variant:"caption",sx:{color:V.textSecondary},children:["ID #",e.customerid]})]})]}),(0,O.jsx)(g.A,{title:"Edit customer",placement:"top",children:(0,O.jsx)(A.A,{size:"small",onClick:()=>{xe(e),setTimeout((()=>ue(!0)),0)},sx:{bgcolor:Q("#8b5cf6"),color:"#8b5cf6",border:"1px solid ".concat(_("#8b5cf6")),flexShrink:0,"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},children:(0,O.jsx)(T.Yvo,{size:16})})})]}),children:(0,O.jsxs)(D.FG,{children:[(0,O.jsx)(D.pY,{label:"Contact",value:e.contactno||"\u2014"}),(0,O.jsx)(D.pY,{label:"Location",children:e.suburb?(0,O.jsxs)(p.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:U("#10b981"),border:"1px solid ".concat(_("#10b981")),color:"#10b981",fontSize:11,fontWeight:800},children:[(0,O.jsx)(T.gwi,{size:12})," ",e.suburb]}):(0,O.jsx)(u.A,{sx:{fontSize:13,fontWeight:600,color:V.textMuted},children:"\u2014"})}),(0,O.jsx)(D.pY,{label:"Address",full:!0,children:(0,O.jsx)(u.A,{sx:{fontSize:13,fontWeight:600,color:V.textPrimary},children:e.address||"\u2014"})})]})},e.customerid||"".concat(e.firstname,"-").concat(t)))):(0,O.jsxs)(h.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,O.jsx)(c.A,{sx:{width:64,height:64,bgcolor:Q("#94a3b8"),color:V.textMuted},children:(0,O.jsx)(T.Itr,{size:28})}),(0,O.jsx)(u.A,{variant:"subtitle1",sx:{fontWeight:700,color:V.textPrimary},children:"No customers to show"}),(0,O.jsx)(u.A,{variant:"caption",sx:{color:V.textSecondary,textAlign:"center"},children:Ce?"Try a different keyword.":"Pick a zone above to load the directory."})]}),0!==(null===qe||void 0===qe?void 0:qe.length)&&(0,O.jsx)("div",{ref:re,style:{height:40,textAlign:"center"},children:Be||Ze?(0,O.jsx)(l.A,{}):(0,O.jsx)(u.A,{variant:"caption",sx:{color:V.textMuted,fontWeight:600},children:"No more customers"})})]}):(0,O.jsx)(f.A,{ref:G,onScroll:De,sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:_("#662582"),borderRadius:8,"&:hover":{backgroundColor:"#662582"}},"&::-webkit-scrollbar-track":{backgroundColor:V.surfaceAlt}},children:(0,O.jsxs)(j.A,{stickyHeader:!0,sx:{minWidth:{xs:720,md:960}},children:[(0,O.jsx)(b.A,{children:(0,O.jsxs)(v.A,{sx:{"& th":{backgroundColor:V.surfaceAlt,color:V.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(V.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,O.jsx)(S.A,{children:"#"}),(0,O.jsx)(S.A,{children:"Customer"}),(0,O.jsx)(S.A,{children:"Contact"}),(0,O.jsx)(S.A,{children:"Address"}),(0,O.jsx)(S.A,{children:"Location"}),(0,O.jsx)(S.A,{align:"right",children:"Action"})]})}),(0,O.jsxs)(w.A,{children:[He&&(0,O.jsx)(q.r,{}),0!==(null===qe||void 0===qe?void 0:qe.length)||He?null===qe||void 0===qe?void 0:qe.map(((e,t)=>(0,O.jsxs)(v.A,{sx:{cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(V.divider),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:V.surfaceAlt}},children:[(0,O.jsx)(S.A,{children:(0,O.jsx)(u.A,{variant:"caption",sx:{fontWeight:700,color:V.textMuted},children:String(t+1+ne*se).padStart(2,"0")})}),(0,O.jsx)(S.A,{children:(0,O.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,O.jsx)(ee,{color:"#662582",size:36,children:(0,O.jsx)(T.Azs,{size:18})}),(0,O.jsxs)(h.A,{children:[(0,O.jsx)(u.A,{variant:"subtitle2",sx:{fontWeight:700,color:V.textPrimary,whiteSpace:"nowrap"},children:e.firstname||"\u2014"}),(0,O.jsxs)(u.A,{variant:"caption",sx:{color:V.textSecondary},children:["ID #",e.customerid]})]})]})}),(0,O.jsx)(S.A,{children:(0,O.jsxs)(h.A,{children:[(0,O.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,O.jsx)(T.EZw,{size:12,color:V.textMuted}),(0,O.jsx)(u.A,{variant:"subtitle2",sx:{fontWeight:700,color:V.textPrimary,whiteSpace:"nowrap"},children:e.contactno||"\u2014"})]}),e.email&&(0,O.jsx)(u.A,{variant:"caption",sx:{color:V.textSecondary},children:e.email})]})}),(0,O.jsx)(S.A,{sx:{maxWidth:280},children:(0,O.jsx)(g.A,{title:e.address||"",placement:"top",children:(0,O.jsx)(u.A,{variant:"caption",sx:{color:V.textSecondary,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.address||"\u2014"})})}),(0,O.jsx)(S.A,{children:e.suburb?(0,O.jsxs)(p.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:U("#10b981"),border:"1px solid ".concat(_("#10b981")),color:"#10b981",fontSize:11,fontWeight:800},children:[(0,O.jsx)(T.gwi,{size:12})," ",e.suburb]}):(0,O.jsx)(u.A,{variant:"caption",sx:{color:V.textMuted},children:"\u2014"})}),(0,O.jsx)(S.A,{align:"right",children:(0,O.jsx)(g.A,{title:"Edit customer",placement:"top",children:(0,O.jsx)(A.A,{size:"small",onClick:()=>{xe(e),setTimeout((()=>ue(!0)),0)},sx:{bgcolor:Q("#8b5cf6"),color:"#8b5cf6",border:"1px solid ".concat(_("#8b5cf6")),"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},children:(0,O.jsx)(T.Yvo,{size:16})})})})]},e.customerid||"".concat(e.firstname,"-").concat(t)))):(0,O.jsx)(v.A,{children:(0,O.jsx)(S.A,{colSpan:6,sx:{py:6},children:(0,O.jsxs)(h.A,{alignItems:"center",spacing:1.5,children:[(0,O.jsx)(c.A,{sx:{width:64,height:64,bgcolor:Q("#94a3b8"),color:V.textMuted},children:(0,O.jsx)(T.Itr,{size:28})}),(0,O.jsx)(u.A,{variant:"subtitle1",sx:{fontWeight:700,color:V.textPrimary},children:"No customers to show"}),(0,O.jsx)(u.A,{variant:"caption",sx:{color:V.textSecondary},children:Ce?"Try a different keyword.":"Pick a zone above to load the directory."})]})})}),0!==(null===qe||void 0===qe?void 0:qe.length)&&(0,O.jsx)(v.A,{children:(0,O.jsx)(S.A,{colSpan:6,sx:{borderBottom:"none"},children:(0,O.jsx)("div",{ref:re,style:{height:40,textAlign:"center"},children:Be||Ze?(0,O.jsx)(l.A,{}):(0,O.jsx)(u.A,{variant:"caption",sx:{color:V.textMuted,fontWeight:600},children:"No more customers"})})})})]})]})})}),(0,O.jsxs)(y.A,{open:he,onClose:()=>ue(!1),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",maxWidth:"lg",fullWidth:!0,fullScreen:M,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},children:[(0,O.jsx)(k.A,{id:"alert-dialog-title",sx:{background:"linear-gradient(135deg, #662582 0%, #9255AB 100%)",color:"#fff",py:2},children:(0,O.jsxs)(h.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,O.jsx)(c.A,{sx:{width:36,height:36,bgcolor:"rgba(255,255,255,0.2)",color:"#fff"},children:(0,O.jsx)(i.wwX,{style:{fontSize:18}})}),(0,O.jsxs)(h.A,{children:[(0,O.jsx)(u.A,{sx:{fontSize:11,fontWeight:700,opacity:.85,letterSpacing:.6,textTransform:"uppercase",lineHeight:1},children:"Customer"}),(0,O.jsxs)(u.A,{sx:{fontWeight:800,fontSize:{xs:"1.05rem",sm:"1.2rem"},lineHeight:1.2,mt:.25},children:["Edit ",(null===de||void 0===de?void 0:de.firstname)||"Customer"]})]})]})}),(0,O.jsx)(C.A,{children:(0,O.jsxs)(m.Ay,{container:!0,spacing:2,sx:{mt:2},children:[(0,O.jsxs)(m.Ay,{item:!0,xs:6,children:[(0,O.jsx)(u.A,{sx:{mb:1},children:"Customer Name"}),(0,O.jsx)(W.A,{variant:"outlined",fullWidth:!0,defaultValue:null===de||void 0===de?void 0:de.firstname,onChange:e=>{xe((0,r.A)((0,r.A)({},de),{},{firstname:e.target.value}))}})]}),(0,O.jsxs)(m.Ay,{item:!0,xs:6,children:[(0,O.jsx)(u.A,{sx:{mb:1},children:"Contact Number"}),(0,O.jsxs)(h.A,{direction:"row",spacing:1,children:[(0,O.jsx)(W.A,{readonly:!0,variant:"outlined",value:"+91",sx:{width:60}}),(0,O.jsx)(W.A,{variant:"outlined",fullWidth:!0,type:"text",value:(null===de||void 0===de?void 0:de.contactno)||"",inputProps:{maxLength:10,inputMode:"numeric",pattern:"[0-9]*"},onChange:e=>{const t=e.target.value.replace(/\D/g,"");xe((e=>(0,r.A)((0,r.A)({},e),{},{contactno:t})))}})]})]}),(0,O.jsxs)(m.Ay,{item:!0,xs:12,children:[(0,O.jsx)(u.A,{sx:{mb:1},children:"Address"}),(0,O.jsx)(R.A,{id:"google-map-demo",sx:{},fullWidth:!0,getOptionLabel:e=>"string"===typeof e?e:(null===e||void 0===e?void 0:e.description)||"",filterOptions:e=>e,options:Me,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:null===de||void 0===de?void 0:de.address,noOptionsText:"No locations",onChange:(e,t)=>{Le(t?[t,...Me]:Me),Te(t),console.log("newValue",t||""),me(null===t||void 0===t?void 0:t.description),xe((0,r.A)((0,r.A)({},de),{},{address:null===t||void 0===t?void 0:t.description}))},onInputChange:(e,t)=>{Ie(t)},renderInput:e=>(0,O.jsx)(W.A,(0,r.A)((0,r.A)({},e),{},{fullWidth:!0})),renderOption:(e,t)=>{const o=t.structured_formatting.main_text_matched_substrings||[],s=L()(t.structured_formatting.main_text,o.map((e=>[e.offset,e.offset+e.length])));return(0,O.jsx)("li",(0,r.A)((0,r.A)({},e),{},{children:(0,O.jsxs)(m.Ay,{container:!0,alignItems:"center",children:[(0,O.jsx)(m.Ay,{item:!0,sx:{display:"flex",width:44},children:(0,O.jsx)(I.A,{sx:{color:"text.secondary"}})}),(0,O.jsxs)(m.Ay,{item:!0,sx:{width:"calc(100% - 44px)",wordWrap:"break-word"},children:[null===s||void 0===s?void 0:s.map(((e,t)=>(0,O.jsx)(p.A,{component:"span",sx:{fontWeight:e.highlight?"bold":"regular"},children:e.text},t))),(0,O.jsx)(u.A,{variant:"body2",color:"text.secondary",children:null===t||void 0===t?void 0:t.structured_formatting.secondary_text})]})]})}))}})]}),(0,O.jsxs)(m.Ay,{item:!0,xs:6,children:[(0,O.jsx)(u.A,{sx:{mb:1},children:"Location"}),(0,O.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:null===de||void 0===de?void 0:de.suburb,onChange:e=>{const t=e.target.value;xe((e=>(0,r.A)((0,r.A)({},e),{},{suburb:t})))}})]}),(0,O.jsxs)(m.Ay,{item:!0,xs:6,children:[(0,O.jsx)(u.A,{sx:{mb:1},children:"City"}),(0,O.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:de.city||fe||"",onChange:e=>{const t=e.target.value;xe((e=>(0,r.A)((0,r.A)({},e),{},{city:t})))}})]}),(0,O.jsxs)(m.Ay,{item:!0,xs:6,children:[(0,O.jsx)(u.A,{sx:{mb:1},children:"State"}),(0,O.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:de.state||Se||"",onChange:e=>{const t=e.target.value;xe((e=>(0,r.A)((0,r.A)({},e),{},{state:t})))}})]}),(0,O.jsxs)(m.Ay,{item:!0,xs:6,children:[(0,O.jsx)(u.A,{sx:{mb:1},children:"Postcode"}),(0,O.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:""==be?de.postcode:be,onChange:e=>{const t=e.target.value;xe((e=>(0,r.A)((0,r.A)({},e),{},{postcode:t})))}})]}),(0,O.jsxs)(m.Ay,{item:!0,xs:12,children:[(0,O.jsx)(u.A,{sx:{mb:1},children:"Landmark"}),(0,O.jsx)(W.A,{variant:"outlined",fullWidth:!0,defaultValue:de.landmark,onChange:e=>{xe((0,r.A)((0,r.A)({},de),{},{landmark:e.target.value}))}})]}),(0,O.jsxs)(m.Ay,{item:!0,xs:6,sx:{cursor:"not-allowed"},children:[(0,O.jsx)(u.A,{sx:{mb:1},children:"Latitude"}),(0,O.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:ge.lat,sx:{cursor:"not-allowed"}})]}),(0,O.jsxs)(m.Ay,{item:!0,xs:6,sx:{cursor:"not-allowed"},children:[(0,O.jsx)(u.A,{sx:{mb:1},children:"Longitude"}),(0,O.jsx)(W.A,{readonly:!0,variant:"outlined",fullWidth:!0,value:ge.lng})]})]})}),(0,O.jsxs)(z.A,{sx:{mr:2,mb:2},children:[(0,O.jsx)(P.A,{onClick:()=>ue(!1),variant:"contained",color:"error",sx:{mr:2},children:"Close"}),(0,O.jsx)(P.A,{onClick:()=>{(async()=>{if(console.log("selectedCustomer",de),de.firstname)if(de.contactno)if(de.address)if(de.suburb)if(de.city)if(de.state)if(de.postcode)if(de.landmark)if(de.latitude)if(de.longitude)try{const e=await n.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/customers/update"),{customerid:de.customerid,configid:1,firstname:de.firstname,applocationid:de.applocationid,profileimage:"",dialcode:"+91",contactno:de.contactno,devicetype:"",deviceid:"",customertoken:"123",address:de.address,suburb:ye,city:fe,state:Se,postcode:be,landmark:de.landmark,doorno:de.doorno,latitude:de.latitude.toString(),longitude:de.longitude.toString()});console.log("postUpdateResponse",e),e.data.status&&((0,F.k)(e.data.message,"success",1500),ue(!1),Fe())}catch(e){console.log("postUpdate error",e)}else(0,F.k)("Enter Longitude","warning",1500);else(0,F.k)("Enter Latitude","warning",1500);else(0,F.k)("Enter Landmark","warning",1500);else(0,F.k)("Enter PostCode","warning",1500);else(0,F.k)("Enter State","warning",1500);else(0,F.k)("Enter City ","warning",1500);else(0,F.k)("Enter Suburb","warning",1500);else(0,F.k)("Enter Valid Address","warning",1500);else(0,F.k)("Enter Contact Number ","warning",1500);else(0,F.k)("Enter Door NO","warning",1500)})()},variant:"contained",autoFocus:!0,children:"Update"})]})]})]})}},23787:(e,t,o)=>{o.d(t,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var r=o(89379),s=o(80045),n=o(93230),i=o(2235),l=o(16491),a=o(82053),c=o(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:o=!1,onScroll:i,sx:l}=e,a=(0,s.A)(e,d);return(0,c.jsx)(n.A,(0,r.A)((0,r.A)({spacing:1.25,onScroll:i,sx:(0,r.A)((0,r.A)({p:1.5},o&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:t}))},h=e=>{let{accent:t="#662582",header:o,footer:s,selected:n=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(i.A,{elevation:0,onClick:a,sx:(0,r.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:n?t:"#e2e8f0",background:n?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[o,d,s]})]})},u=e=>{let{children:t,columns:o=2,sx:s}=e;return(0,c.jsx)(l.A,{sx:(0,r.A)({display:"grid",gridTemplateColumns:"repeat(".concat(o,", minmax(0, 1fr))"),gap:1,mt:1.25},s),children:t})},p=e=>{let{label:t,value:o,children:r,full:s=!1,align:n="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:s?"1 / -1":"auto",minWidth:0,textAlign:n},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==r?r:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==o&&void 0!==o?o:"\u2014"})})]})}},56311:(e,t,o)=>{o.d(t,{A:()=>u});var r=o(89379),s=o(9950),n=o(2660),i=o(2046),l=o(83274),a=o(25333),c=o(97125),d=o(7762),x=o(52097),h=o(44414);const u=e=>{let{value:t,onChange:o,onDebouncedChange:u,debounceTime:p=500,placeholder:m="Search (ctrl+k)",sx:g}=e;const A=(0,s.useRef)(null),[f]=(0,x.d7)(t,p);return(0,s.useEffect)((()=>{u&&u(f)}),[f,u]),(0,s.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=A.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===A.current&&A.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(n.A,{sx:(0,r.A)({},g),inputRef:A,placeholder:m,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>o(e.target.value),startAdornment:(0,h.jsx)(i.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(l.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>o(""),children:(0,h.jsx)(d.A,{})})})})}},58691:(e,t,o)=>{o.d(t,{A:()=>l});o(9950);var r=o(16491),s=o(46639),n=o(62217),i=o(44414);function l(e){let{size:t=70,imgSize:o=40,alt:l="loader"}=e;return(0,i.jsxs)(r.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,i.jsx)(s.A,{size:t}),(0,i.jsx)(r.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:o,height:o},children:(0,i.jsx)("img",{src:n,alt:l,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,t,o)=>{o.d(t,{A:()=>h});var r=o(89379),s=o(9950),n=o(93230),i=o(41413),l=o(77922),a=o(29925),c=o(26910),d=o(31222),x=o(44414);const h=(0,s.forwardRef)(((e,t)=>{let{setAppId:o,setLocoName:h,setPage:u,sx:p,textfeildSx:m,textfieldSx:g,pill:A=!1,accentColor:f="#6366f1",icon:j,placeholder:b="Select Zone",paperComponent:v}=e;const[S,w]=(0,s.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,s.useEffect)((()=>{0===S.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),w(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[S.length]);const y=e=>"".concat(f).concat(e),k=y("08"),C=y("26"),W=y("55"),R=y("18"),z=A?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"999px",bgcolor:k,fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s, background-color 0.2s","& fieldset":{borderColor:W,borderWidth:1.5},"&:hover fieldset":{borderColor:f},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(C)},"&.Mui-focused fieldset":{borderColor:f,borderWidth:2}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:f}}:{},P=A&&(0,x.jsx)(n.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(i.A,{sx:{width:24,height:24,bgcolor:R,color:f,transition:"background-color 0.15s, color 0.15s"},children:j||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:S||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:v,sx:(0,r.A)({},p),onChange:(e,t,r)=>{"clear"===r?(null===o||void 0===o||o(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):t&&(null===o||void 0===o||o(t.applocationid),null===h||void 0===h||h(t.locationname),null===u||void 0===u||u(0))},renderInput:e=>A?(0,x.jsx)(a.A,(0,r.A)((0,r.A)({},e),{},{inputRef:t,placeholder:b,InputProps:(0,r.A)((0,r.A)({},e.InputProps),{},{startAdornment:P}),sx:(0,r.A)((0,r.A)({},z),g||m||{})})):(0,x.jsx)(a.A,(0,r.A)((0,r.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,r.A)({},g||m||{})}))})}))},62217:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAPnUlEQVR4AdVae3AU9R3/7d4jdyGQQKAhECBAJBSmEAtFSQUjqPgAHGlhRm0lDkWY6Tg+O9qiErR26h8WR8ZWqTMN1ur4qMpDrTyjtDwDJloeCYiBvAgkaZ53l7vb3X4/v9vfZS/Zu9uFwLSfmb3d293f7u/z+z5/399K7CphdW5JrupgBZosZ0ialmu8pklSjUOTamRJbvvjqTUV7CpAYlcIj+SWZHQ55WJZlm7UNK2IXpRhpZ3GWJskSWXUZrPD4Sp77eSva9gVwIATXz35+SJNYWs1phWxAYDEpDKVaZv+fOrZUjaAGDDiK695rpgetpYOc82upw72sMycdJbz/SzmHeKl/ynRay31bbS1s7rjTczXGYj3ihrShnUDNQCXTXzlNS8UyExdbybhSdeNYwXz81nBzflE2pKms7oT51ntiSa276NKVn3wrNktNcGQelNpTUkNuwxcFvFV+S88rKnKy8ZzkOz84uvYvOJZ/PhyAE3Y/+HXbN+HFVwjjJAlR8lr1WueY9wt2MclEYfj8rnkj+nwRnHOLuGWhnbmpfuMKh/3Xn0Atm74IuY8OcGPFYk99kbVM98xm7BFnDyttHLyb3MlRdsjSWycOA+VLv79YpY5Ork6V5efY59s/JJVHznH/+dMymLz7v0Rm71oWtK2GIDSJ7ew6kMxJlCjytI8u+Qddm4+93bPBIfqiiG96KG5RPouljokuZT3b/2avf7EB6ylsZ1dM2MsG5OfxU7RAFSWVbMAObUphRMTtsc7CpdMh6c3kqe8gN117Yh5W4627GljFmGZ+C/ynx/flzSkDPW2Aqj2+lV/Y5mj0tljG3/GFhQXspkLpnBJVx85yyq/OGWJPAANgzkd2/utOMXJzxp965vlF3YFrPRHZtYgSZq6vi/p2TT6VrF+1Vt8/yiRhnoLiIHAftc7h0kDzlp6HgYcfTAgVwmEPmIWzTeZxPEQaeWkkhJJk1eJk8vWLGBz75nBrAIqfmDrN2zhqjlsetGkftddKU6WQ2qPe6AZVuwdGPP9kWw4+ZWKnVXiVO6M4UXtR1rKDiZrm4g4J70871cTnMzzd3ESNn3bgz9mdgC7hmoufeKWuB4/c1QGV3nYfP7Msfy/FYB8rM1LC6YNm72lonXv+UTtEqr60qVLJTcbvEv8h20tfOhGZgeQtpBiZnZ6wnuhEUDFnlPMDhaSMCbNilohc0kp61mEW1y1j0u8hLR78Ff5xX3t2i5AHLjegvqOIdtHXK/8oorZRfGLiw3aJM1dkVeynA5kCsGm98cjLhNxh4O5nxEnoOJW4rQRkDRUF3adTNoAEprRRB7tfJ09zA7Qt3mGCCMz+dmioiLKcSRTjvGISw/kPbNcSDtzdLotDy6A+AyYObR4KCjK53ur3t2I+ct7s0b0Pfds4U04RuLV914z4rjJ4ZSc94sTSBrsShvYv62S76frZKwAYQ2orWpidoEExyh1tzPl6SlTpjhJ6v3u7Utcgm0vHf/wePKUc8TJS5E21LWu6gKbRBmalXwcgHp70yISg8QR3oTWWAWk3gtpbp6/cCiLRK8Y9k7jHzgCGh3n8om/ibpueHKr0vZT5lVZFvHItVWRaALVQ4pqxcYfL3opeoxcvlr3D4BVc4HU4eFFeMt0ZsHJvUzcFKPkY4gvW7YMGiC7ZfcicW723dalXUsS3lSyNeZcBUmsmaS/5p0Vlp4BVccADsvOYP6uAM/yKsqq7PkJmv8L4k7mmEu7DcRNIfIqkedu3qjq0pkzZ/DfITE5quZjp2Qxu0Dnha1iX1fdxD55fW/CNjANYN49s7jKI5O788E5kfY0oHZQcEuvT5GY8wbaye+//36MqsfY+JEjR6QlY1cX0CHvNdQmZ/JIZhUtjW3RzkNqsG90Hti2cS8fgGSoqz7Pp6loi/uH6wNnJ7zBNA0ZYvrdY1aMZ6hdGHQ9RuL473KmDBUnUB+zAyE1dP6me2fxpMUYljat3Zb0GfvJodWRRz9Aic/utw+Ts/NG1L/L0qQrCoRggVTXUGRPMULmNo44h0CflZXlcGiuXLPGdoDOo7Pw0EYpC5W/c9Wcfm3EoAGiSAF4h0QiQmtDmyUHKZAzZSSrPam/W5MgzJgUlo+CrgFSU1OT5GTOseKi7UytsT2GiJlqW1X5aB+IrJfCYXNDO7MDYwh1yA4kYvKMGTNkkcxw4ghjdJLfQ9ntJRcgWxqsFUCsqDzg1e0U5FtsEvfGVIQ4J9nv90fNXEhcgmPLyEAh49KJW4WZlzezYSE172BvjDbZhc5JPn78eH/nlpubK7e1tcWQtjtRaDXpnLHaYkRflTdbSEhN65V4a4Plclo/IC/TDyV9ixCnNJWFw2EpPT2dBcKBBtHA3+FndmCmjsueuJnIf8/0/mQq79UlDkdpV+LGOnxQ7aljOmFwBTjxY8eOSXV1day9vV1SlFCHaFB3wroT8sdZ+kE4QuXFDMkSG7+ucZmUxdmdqrbU9WpIINQuiPO5CM5x4pTVYMdTucbgt8ejjeutj3K8Tg0jaU2aMY4nJWYQKm+mLT7d7kUW2GrDwRmFFpD8Xax3xSUmZcUfPhL7L2yvp9XJTv7ijgAv4ltBPK8rHNRCPf00QzKVRzs8p7Y6YRktCqy99foMrWN73bsnWJ/ZmTGbUVlkADRFDUarlIYKZkKYeWUjUYSm+0sWmraFxHdTaTkRhtnI2bHwKBBUA3iwSv6LcxPnjV4dI6J5vV61W+04JM5X7LBG3Mwr9820oPLxZln+zsQpac6kkdG5QDLs+7AyetwRat0FTvqsLEpeJDBaTU2NQocqBXl1f9PnH4uGmN5ZcSpmqu41KSUvffwWy4UJIzCIxlQ2bj/ILxnX1mq6Tx0EJwrVKlVjNFF8NKasbMSIEeqgQYOUWl91W0gNlIvGu0oPJH2h31Ti/VNeqP8dJrm6KQnDYIp5erKwZpR2j9JTfrRldy1x4mZMCYwWk7mxiPjVixcvqt3d3WpKSopS6z/9J/GA3ZsOJZW6mRp640h2Pk1bsWhoBzAToLo8fhES0t4fo+YXoblhWZbDtOcaLa5FbZziGyc/ZMgQpaenJ7yz4b1DqhpuxDV492RSNxuYeF4cWF6yiNmB8OyJ1B3SFlFI1ZSGj2o3grjS2dnJSescYyswa9eu5cQ7OjpwE0YodLGn/jVxHVJPFNfNc21PQiKiSJEIxgGFZ49XfETfthk+HGiO9B08wsOHD8deNd4fJa7rPi6G09LSeINPm97cHFT9R3gHSOqlT25m8WCWXCRzYvMpqUmkFYBxQOHZYedmNXdj36Cp6LvOJdTc3KzS4oKqC5cjSlz3dvhRurq6Qh6PJ0SDETrefvQP4h54y76fYwhg+ffRjfeRCi/kkrx+0Q9oVSRx2SpRbI8S7+iVuAiP+KrCiK0bvozx5Idat68KBoMhCmNBcKFQrYC4KDQC0SqrfhIS56oeCASC5ORCh5o/Pz7aO279CE/Oo7hvG70EBYrCPrX26CzM+uoxh0hnUWYyJd4VmSihWvvJxkheX2uY1e0qPRij4q09TW98/Z8D59B3CmNBUnMFoVpMTgT6LigI44eqB2kwMNxBchJvk8ofFTdtempLTNi4XCCdjWcWqLwgrH3w0g4eCaBVq1/6Kb+GPrz3u+3Re31K95cfnHv1dfSZPDn6HoKq06qvqvVZPey3Po6RKSsr49cwVWWRwXE2+M7tyxs87VZZktNwsZJSWVRhJxTksMsFPgyY85MZbGrhBJqDe5kzxRGd20MjOlq6qNqawSOBWDcHaQhAQCG7Pty66+l29WKz0+n0k8ZCVQITJ04M7dy5U1m3bl0M8XjVFgyIizYP2ckgUpnBdJw6OeOHuYWZC191ys6o8WJtepHNNXMrgDeHE0MuALLG9Bc2bVTvsBo+v6/ls1+ebDv8Ham4j8IxZmPdtMEzhljvPCSKeMT5wmF2dra7sbExlY4H0QZJe4n82L7ksWRT/OJdl1yVtQqELHhvoyMjSZ//V4T0WbfbHSCnxklTxdhPxdMgaXjY6NSMBPtBX0ODikPqbto4eXpwKj0Y5MfMHHbzI6mOtJhADOkXLikY8AGA9JFA7S49FDMZCij+ih31bz3V2FPbqpOGlLH5aION94vfAnELi3qtHddBHJ7Hy3Sp0+YhO3Ivzl65Yrgn+wFjO3j82UumDcgAxCMMNPnPbdhc98a7LpcLThikYdOQNrdtcmhhKrD0U3GBZBVVieKfg5wdJJ+Smprq9fl8kH4qvdATCoVc+ekFo28YvvgVh0H1BWACWGLGBzpjLK7KoGSEGgC2Pl8wckDK/247+MrR1t2YL8N+IVmfThh7YdcKS/Cda1LiqFHRJufk5LioLuch8h6dvJfIpxB5aITzjtE/v32kZ/wDTpMBAJC+YkkKWmD8ktlHCQqKmrUnL7BWIh3vs23YcmPgu798Wv/Xz0CM3h2mdwd0wnwjn9QzatSoEJXKw1pEZeMTYxagq73w9FB7Suw8XlVVvaRi+A/yuO64bfR9t2eljL09xeEtYAOAQNhfcabrm9J/XtyGPIKn1Lp6B3X19tN6gJ/m29ymSUgKUlMzh2aEncUDmdRe1tXeaPce/dilbxgAOT99evbEQdOuHebJvsHrSC2gpec0Ky/RmNrlV3wVneHWrw427/hHc7C+k/IJEFZ1KSOjDFDIEtLmSRb1LUR94/dZeY+tVROoPDaQo1TQTS9PoSlfik4cA0B9c7mpc1z6GAByghISoZkjivI8MuVRjqEjU52DRuossXir+UJdFHcCXfW+b09VtR9tMnReoefxNJqeCbsF6R7KygL03B56N8/OWK/3tkTaNnHWa/M8zrNIru8iOik0GeADQGHFTabh0q85qL/8Kwu0xSBgTwPB6BiLGMZn83SZzmuQMAhTWz5voEeGoNcgTtWUHiqW8OO8vLww+R5lz5494UT2PBDEY9rSQqOTHAmP91TFdNGChJsyPTdlelztqcMu6i+XvNiIkBQRHlcPHGv6sUbHIKzo56J1AZBkvR5cSFhUVBR2CbD69bIpysvLecdoAHqINOytm0ijJt9J3r+TVBLHXfrGkwsiJRIMLF1i76MBEue7qE0XqTPadYiNnFen3j6Ad5HGYSDwTcslkQYGamVULLrLpH7y6dOnuY1TGctFFR0hcYfhvujinQ6eaNBgYc6sEHm+0WAKqatEWJkwYYI6depUjYhbtuWrBW775GGd1FEXFQA8FFsR8+HRMdFBKocgPrTvRkgnh4l70ijPxtwAzpLnCLpDvSztvFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg=="},96646:(e,t,o)=>{o.d(t,{r:()=>a});var r=o(9213),s=o(21671),n=o(82917),i=o(93230),l=o(44414);const a=e=>{let{rowsPerPage:t=5,col:o=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,l.jsxs)(r.A,{children:[(0,l.jsx)(s.A,{children:(0,l.jsx)(n.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(s.A,{children:(0,l.jsx)(n.A,{variant:"text",width:30})}),Array.from({length:o}).map(((e,t)=>(0,l.jsx)(s.A,{children:(0,l.jsxs)(i.A,{spacing:.5,children:[(0,l.jsx)(n.A,{variant:"text",width:100}),(0,l.jsx)(n.A,{variant:"text",width:80})]})},t))),(0,l.jsx)(s.A,{children:(0,l.jsx)(n.A,{variant:"text",width:150})}),(0,l.jsx)(s.A,{children:(0,l.jsx)(n.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(s.A,{align:"center",children:(0,l.jsxs)(i.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(n.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(n.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file diff --git a/build/static/js/9521.f9f30508.chunk.js b/build/static/js/9521.f9f30508.chunk.js new file mode 100644 index 0000000..4ee412e --- /dev/null +++ b/build/static/js/9521.f9f30508.chunk.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[9521],{19521:(e,t,o)=>{o.r(t),o.d(t,{default:()=>ie});var r=o(89379),n=o(9950),i=o(26910),s=o(54826),l=o(58691),a=o(2235),c=o(41413),d=o(14857),x=o(47223),h=o(60899),u=o(93230),p=o(82053),A=o(16491),m=o(83274),g=o(25333),f=o(1320),j=o(15769),b=o(69780),v=o(9213),S=o(21671),y=o(34075),w=o(96583),k=o(40033),C=o(28170),W=o(29925),R=o(77922),P=o(79739),z=o(82223),T=o(31222),Y=o(99459),I=o(28217),L=o(55471),M=o.n(L),E=o(21209),J=o(52351),N=o(56311),H=o(59212),B=o(27001),K=o(36803),Z=o(60010),q=o(36150),F=o(81425),O=o(20466),V=o(96646),D=o(23787),G=o(44414);const U={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},Q=(e,t)=>"".concat(e).concat(t),X=e=>Q(e,"08"),_=e=>Q(e,"18"),$=e=>Q(e,"26"),ee=e=>Q(e,"55"),te=e=>(0,G.jsx)(a.A,(0,r.A)((0,r.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:U.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),oe=e=>{let{color:t,selected:o,size:r=24,children:n}=e;return(0,G.jsx)(c.A,{sx:{width:r,height:r,bgcolor:o?t:_(t),color:o?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:n})},re="AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8";const ne={current:null};function ie(){var e,t;const o=(0,d.A)(),L=(0,x.A)(o.breakpoints.down("md")),Q=(0,n.useRef)(),ie=(0,n.useRef)(),[se]=(0,n.useState)(50),[le]=(0,n.useState)(0),[ae,ce]=(0,n.useState)(0),[de,xe]=(0,n.useState)("All"),[he,ue]=(0,n.useState)({}),[pe,Ae]=(0,n.useState)(!1),[me,ge]=(0,n.useState)(""),[fe,je]=(0,n.useState)({}),[be,ve]=(0,n.useState)(""),[Se,ye]=(0,n.useState)(""),[we,ke]=(0,n.useState)(""),[Ce,We]=(0,n.useState)(""),[Re,Pe]=(0,n.useState)(""),[ze,Te]=(0,n.useState)(""),[Ye,Ie]=(0,n.useState)(null),[Le,Me]=(0,n.useState)(""),[Ee,Je]=(0,n.useState)([]),Ne=(0,n.useRef)(!1);"undefined"===typeof window||Ne.current||(document.querySelector("#google-maps")||function(e,t,o){if(!t)return;const r=document.createElement("script");r.setAttribute("async",""),r.setAttribute("id",o),r.src=e,t.appendChild(r)}("https://maps.googleapis.com/maps/api/js?key=".concat(re,"&libraries=places"),document.querySelector("head"),"google-maps"),Ne.current=!0);const He=(0,n.useMemo)((()=>(0,E.A)(((e,t)=>{ne.current.getPlacePredictions(e,t)}),400)),[]);(0,n.useEffect)((()=>{let e=!0;if(!ne.current&&window.google&&(ne.current=new window.google.maps.places.AutocompleteService),ne.current){if(""!==Le)return He({input:Le},(t=>{if(e){let e=[];Ye&&(e=[Ye]),t&&(e=[...e,...t]),Je(e)}})),()=>{e=!1};Je(Ye?[Ye]:[])}}),[Ye,Le,He]),Y.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8"),(0,n.useEffect)((()=>{try{console.log("selected address =>",me),Y.A.fromAddress(me).then((e=>{if(console.log("lat long response =>",e.results[0]),"OK"==e.status){const{lat:t,lng:o}=e.results[0].geometry.location;if(je({lat:t,lng:o}),e.results[0].address_components){let n,i,s,l,a=e.results[0];for(let e=0;e(0,r.A)((0,r.A)({},e),{},{city:n||"",state:s||"",postcode:i||"",suburb:l||"",latitude:t||"",longitude:o||""})))}}}),(e=>{console.log(e)}))}catch(e){console.log(e)}}),[me]);const{data:Be,isLoading:Ke,isFetchingNextPage:Ze,fetchNextPage:qe,hasNextPage:Fe,refetch:Oe}=(0,Z.q)({queryKey:["getAllCustomers",ae,ze,se],queryFn:F.jO,getNextPageParam:e=>e.nextPage,keepPreviousData:!0}),Ve=(null===Be||void 0===Be?void 0:Be.pages.flatMap((e=>e.data)))||[];(0,n.useEffect)((()=>{if(!Fe)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&qe()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return ie.current&&e.observe(ie.current),()=>{ie.current&&e.unobserve(ie.current)}}),[Fe,qe]);const De=e=>{const{scrollTop:t,scrollHeight:o,clientHeight:r}=e.currentTarget;t+r>=o-50&&Fe&&!Ze&&qe()},{data:Ge,isLoading:Ue}=(0,q.I)({queryKey:["customersummary",ae],queryFn:F.zf});(0,n.useEffect)((()=>{console.log("pageCount",Ge)}),[Ge]);const Qe=[{key:"total",label:"Total Customers",color:"#662582",icon:T.AYP,value:null!==(e=null===Ge||void 0===Ge?void 0:Ge.Total)&&void 0!==e?e:0},{key:"loaded",label:"Loaded in View",color:"#0ea5e9",icon:T.$Nl,value:Ve.length},{key:"zone",label:"Active Zone",color:"#10b981",icon:T.XXh,value:de||"All Zones"}];return(0,G.jsxs)(G.Fragment,{children:[(Ue||Ke)&&(0,G.jsx)(J.A,{}),(0,G.jsx)(B.A,{title:"Customers",subtitle:"Live \xb7 ".concat(de||"All Zones"),live:!0,action:(0,G.jsx)(H.A,{locaName:de,setAppId:ce,setLocoName:xe,pill:!0,accentColor:"#662582",icon:(0,G.jsx)(T.HPi,{size:14}),placeholder:"Select Zone",paperComponent:te,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,G.jsx)(h.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:Qe.map((e=>{var t;const o=e.icon;return(0,G.jsx)(h.Ay,{item:!0,xs:6,sm:4,children:(0,G.jsx)(K.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,G.jsx)(o,{size:20}),color:e.color,loading:Ue})},e.key)}))}),(0,G.jsx)(a.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:U.radiusCard/8,borderTopRightRadius:U.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:U.borderSubtle,borderBottom:0,background:"#fff"},children:(0,G.jsxs)(u.A,{direction:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between",spacing:1.25,children:[(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1.25,children:[(0,G.jsx)(oe,{color:"#662582",size:32,children:(0,G.jsx)(T.Itr,{size:18})}),(0,G.jsxs)(u.A,{children:[(0,G.jsx)(p.A,{variant:"caption",sx:{fontWeight:800,color:U.textSecondary,letterSpacing:.6,textTransform:"uppercase"},children:"Directory"}),(0,G.jsxs)(p.A,{variant:"body2",sx:{color:U.textPrimary,fontWeight:700},children:[null!==(t=null===Ge||void 0===Ge?void 0:Ge.Total)&&void 0!==t?t:0," total \xb7 ",Ve.length," loaded"]})]})]}),(0,G.jsx)(A.A,{sx:{width:{xs:"100%",sm:280,lg:340},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,G.jsx)(N.A,{value:Re,onChange:Pe,onDebouncedChange:Te,placeholder:"Search customers (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:X("#662582"),"& fieldset":{borderColor:ee("#662582"),borderWidth:1.5},"&:hover fieldset":{borderColor:"#662582"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:2},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat($("#662582"))}}})})]})}),(0,G.jsx)(a.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:U.radiusCard/8,borderBottomRightRadius:U.radiusCard/8,border:"1px solid",borderColor:U.borderSubtle,overflow:"hidden",background:"#fff"},children:L?(0,G.jsxs)(D.nV,{scroll:!0,onScroll:De,children:[Ke&&(0,G.jsx)(l.A,{}),0!==(null===Ve||void 0===Ve?void 0:Ve.length)||Ke?null===Ve||void 0===Ve?void 0:Ve.map(((e,t)=>(0,G.jsx)(D.pg,{accent:"#662582",header:(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,G.jsx)(oe,{color:"#662582",size:36,children:(0,G.jsx)(T.Azs,{size:18})}),(0,G.jsxs)(u.A,{sx:{minWidth:0},children:[(0,G.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:U.textPrimary},noWrap:!0,children:e.firstname||"\u2014"}),(0,G.jsxs)(p.A,{variant:"caption",sx:{color:U.textSecondary},children:["ID #",e.customerid]})]})]}),(0,G.jsx)(m.A,{title:"Edit customer",placement:"top",children:(0,G.jsx)(g.A,{size:"small",onClick:()=>{ue(e),setTimeout((()=>Ae(!0)),0)},sx:{bgcolor:_("#8b5cf6"),color:"#8b5cf6",border:"1px solid ".concat(ee("#8b5cf6")),flexShrink:0,"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},children:(0,G.jsx)(T.Yvo,{size:16})})})]}),children:(0,G.jsxs)(D.FG,{children:[(0,G.jsx)(D.pY,{label:"Contact",value:e.contactno||"\u2014"}),(0,G.jsx)(D.pY,{label:"Location",children:e.suburb?(0,G.jsxs)(A.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:X("#10b981"),border:"1px solid ".concat(ee("#10b981")),color:"#10b981",fontSize:11,fontWeight:800},children:[(0,G.jsx)(T.gwi,{size:12})," ",e.suburb]}):(0,G.jsx)(p.A,{sx:{fontSize:13,fontWeight:600,color:U.textMuted},children:"\u2014"})}),(0,G.jsx)(D.pY,{label:"Address",full:!0,children:(0,G.jsx)(p.A,{sx:{fontSize:13,fontWeight:600,color:U.textPrimary},children:e.address||"\u2014"})})]})},e.customerid||"".concat(e.firstname,"-").concat(t)))):(0,G.jsxs)(u.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,G.jsx)(c.A,{sx:{width:64,height:64,bgcolor:_("#94a3b8"),color:U.textMuted},children:(0,G.jsx)(T.Itr,{size:28})}),(0,G.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:U.textPrimary},children:"No customers to show"}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textSecondary,textAlign:"center"},children:Re?"Try a different keyword.":"Pick a zone above to load the directory."})]}),0!==(null===Ve||void 0===Ve?void 0:Ve.length)&&(0,G.jsx)("div",{ref:ie,style:{height:40,textAlign:"center"},children:Ze||Fe?(0,G.jsx)(l.A,{}):(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textMuted,fontWeight:600},children:"No more customers"})})]}):(0,G.jsx)(f.A,{ref:Q,onScroll:De,sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:ee("#662582"),borderRadius:8,"&:hover":{backgroundColor:"#662582"}},"&::-webkit-scrollbar-track":{backgroundColor:U.surfaceAlt}},children:(0,G.jsxs)(j.A,{stickyHeader:!0,sx:{minWidth:{xs:720,md:960}},children:[(0,G.jsx)(b.A,{children:(0,G.jsxs)(v.A,{sx:{"& th":{backgroundColor:U.surfaceAlt,color:U.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(U.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,G.jsx)(S.A,{children:"#"}),(0,G.jsx)(S.A,{children:"Customer"}),(0,G.jsx)(S.A,{children:"Contact"}),(0,G.jsx)(S.A,{children:"Address"}),(0,G.jsx)(S.A,{children:"Location"}),(0,G.jsx)(S.A,{align:"right",children:"Action"})]})}),(0,G.jsxs)(y.A,{children:[Ke&&(0,G.jsx)(V.r,{}),0!==(null===Ve||void 0===Ve?void 0:Ve.length)||Ke?null===Ve||void 0===Ve?void 0:Ve.map(((e,t)=>(0,G.jsxs)(v.A,{sx:{cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(U.divider),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:U.surfaceAlt}},children:[(0,G.jsx)(S.A,{children:(0,G.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:U.textMuted},children:String(t+1+le*se).padStart(2,"0")})}),(0,G.jsx)(S.A,{children:(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,G.jsx)(oe,{color:"#662582",size:36,children:(0,G.jsx)(T.Azs,{size:18})}),(0,G.jsxs)(u.A,{children:[(0,G.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:U.textPrimary,whiteSpace:"nowrap"},children:e.firstname||"\u2014"}),(0,G.jsxs)(p.A,{variant:"caption",sx:{color:U.textSecondary},children:["ID #",e.customerid]})]})]})}),(0,G.jsx)(S.A,{children:(0,G.jsxs)(u.A,{children:[(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,G.jsx)(T.EZw,{size:12,color:U.textMuted}),(0,G.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:U.textPrimary,whiteSpace:"nowrap"},children:e.contactno||"\u2014"})]}),e.email&&(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textSecondary},children:e.email})]})}),(0,G.jsx)(S.A,{sx:{maxWidth:280},children:(0,G.jsx)(m.A,{title:e.address||"",placement:"top",children:(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textSecondary,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.address||"\u2014"})})}),(0,G.jsx)(S.A,{children:e.suburb?(0,G.jsxs)(A.A,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1,py:.375,borderRadius:999,bgcolor:X("#10b981"),border:"1px solid ".concat(ee("#10b981")),color:"#10b981",fontSize:11,fontWeight:800},children:[(0,G.jsx)(T.gwi,{size:12})," ",e.suburb]}):(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textMuted},children:"\u2014"})}),(0,G.jsx)(S.A,{align:"right",children:(0,G.jsx)(m.A,{title:"Edit customer",placement:"top",children:(0,G.jsx)(g.A,{size:"small",onClick:()=>{ue(e),setTimeout((()=>Ae(!0)),0)},sx:{bgcolor:_("#8b5cf6"),color:"#8b5cf6",border:"1px solid ".concat(ee("#8b5cf6")),"&:hover":{bgcolor:"#8b5cf6",color:"#fff"}},children:(0,G.jsx)(T.Yvo,{size:16})})})})]},e.customerid||"".concat(e.firstname,"-").concat(t)))):(0,G.jsx)(v.A,{children:(0,G.jsx)(S.A,{colSpan:6,sx:{py:6},children:(0,G.jsxs)(u.A,{alignItems:"center",spacing:1.5,children:[(0,G.jsx)(c.A,{sx:{width:64,height:64,bgcolor:_("#94a3b8"),color:U.textMuted},children:(0,G.jsx)(T.Itr,{size:28})}),(0,G.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:U.textPrimary},children:"No customers to show"}),(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textSecondary},children:Re?"Try a different keyword.":"Pick a zone above to load the directory."})]})})}),0!==(null===Ve||void 0===Ve?void 0:Ve.length)&&(0,G.jsx)(v.A,{children:(0,G.jsx)(S.A,{colSpan:6,sx:{borderBottom:"none"},children:(0,G.jsx)("div",{ref:ie,style:{height:40,textAlign:"center"},children:Ze||Fe?(0,G.jsx)(l.A,{}):(0,G.jsx)(p.A,{variant:"caption",sx:{color:U.textMuted,fontWeight:600},children:"No more customers"})})})})]})]})})}),(0,G.jsxs)(w.A,{open:pe,onClose:()=>Ae(!1),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",maxWidth:"lg",fullWidth:!0,fullScreen:L,PaperProps:{sx:{borderRadius:{xs:0,sm:3}}},children:[(0,G.jsx)(k.A,{id:"alert-dialog-title",sx:{background:"linear-gradient(135deg, #662582 0%, #9255AB 100%)",color:"#fff",py:2},children:(0,G.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,G.jsx)(c.A,{sx:{width:36,height:36,bgcolor:"rgba(255,255,255,0.2)",color:"#fff"},children:(0,G.jsx)(s.wwX,{style:{fontSize:18}})}),(0,G.jsxs)(u.A,{children:[(0,G.jsx)(p.A,{sx:{fontSize:11,fontWeight:700,opacity:.85,letterSpacing:.6,textTransform:"uppercase",lineHeight:1},children:"Customer"}),(0,G.jsxs)(p.A,{sx:{fontWeight:800,fontSize:{xs:"1.05rem",sm:"1.2rem"},lineHeight:1.2,mt:.25},children:["Edit ",(null===he||void 0===he?void 0:he.firstname)||"Customer"]})]})]})}),(0,G.jsx)(C.A,{children:(0,G.jsxs)(h.Ay,{container:!0,spacing:2,sx:{mt:2},children:[(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Customer Name"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,defaultValue:null===he||void 0===he?void 0:he.firstname,onChange:e=>{ue((0,r.A)((0,r.A)({},he),{},{firstname:e.target.value}))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Contact Number"}),(0,G.jsxs)(u.A,{direction:"row",spacing:1,children:[(0,G.jsx)(W.A,{readonly:!0,variant:"outlined",value:"+91",sx:{width:60}}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,type:"text",value:(null===he||void 0===he?void 0:he.contactno)||"",inputProps:{maxLength:10,inputMode:"numeric",pattern:"[0-9]*"},onChange:e=>{const t=e.target.value.replace(/\D/g,"");ue((e=>(0,r.A)((0,r.A)({},e),{},{contactno:t})))}})]})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:12,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Address"}),(0,G.jsx)(R.A,{id:"google-map-demo",sx:{},fullWidth:!0,getOptionLabel:e=>"string"===typeof e?e:(null===e||void 0===e?void 0:e.description)||"",filterOptions:e=>e,options:Ee,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:null===he||void 0===he?void 0:he.address,noOptionsText:"No locations",onChange:(e,t)=>{Je(t?[t,...Ee]:Ee),Ie(t),console.log("newValue",t||""),ge(null===t||void 0===t?void 0:t.description),ue((0,r.A)((0,r.A)({},he),{},{address:null===t||void 0===t?void 0:t.description}))},onInputChange:(e,t)=>{Me(t)},renderInput:e=>(0,G.jsx)(W.A,(0,r.A)((0,r.A)({},e),{},{fullWidth:!0})),renderOption:(e,t)=>{const o=t.structured_formatting.main_text_matched_substrings||[],n=M()(t.structured_formatting.main_text,o.map((e=>[e.offset,e.offset+e.length])));return(0,G.jsx)("li",(0,r.A)((0,r.A)({},e),{},{children:(0,G.jsxs)(h.Ay,{container:!0,alignItems:"center",children:[(0,G.jsx)(h.Ay,{item:!0,sx:{display:"flex",width:44},children:(0,G.jsx)(I.A,{sx:{color:"text.secondary"}})}),(0,G.jsxs)(h.Ay,{item:!0,sx:{width:"calc(100% - 44px)",wordWrap:"break-word"},children:[null===n||void 0===n?void 0:n.map(((e,t)=>(0,G.jsx)(A.A,{component:"span",sx:{fontWeight:e.highlight?"bold":"regular"},children:e.text},t))),(0,G.jsx)(p.A,{variant:"body2",color:"text.secondary",children:null===t||void 0===t?void 0:t.structured_formatting.secondary_text})]})]})}))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Location"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:null===he||void 0===he?void 0:he.suburb,onChange:e=>{const t=e.target.value;ue((e=>(0,r.A)((0,r.A)({},e),{},{suburb:t})))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"City"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:he.city||be||"",onChange:e=>{const t=e.target.value;ue((e=>(0,r.A)((0,r.A)({},e),{},{city:t})))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"State"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:he.state||we||"",onChange:e=>{const t=e.target.value;ue((e=>(0,r.A)((0,r.A)({},e),{},{state:t})))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Postcode"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:""==Se?he.postcode:Se,onChange:e=>{const t=e.target.value;ue((e=>(0,r.A)((0,r.A)({},e),{},{postcode:t})))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:12,children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Landmark"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,defaultValue:he.landmark,onChange:e=>{ue((0,r.A)((0,r.A)({},he),{},{landmark:e.target.value}))}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,sx:{cursor:"not-allowed"},children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Latitude"}),(0,G.jsx)(W.A,{variant:"outlined",fullWidth:!0,value:fe.lat,sx:{cursor:"not-allowed"}})]}),(0,G.jsxs)(h.Ay,{item:!0,xs:6,sx:{cursor:"not-allowed"},children:[(0,G.jsx)(p.A,{sx:{mb:1},children:"Longitude"}),(0,G.jsx)(W.A,{readonly:!0,variant:"outlined",fullWidth:!0,value:fe.lng})]})]})}),(0,G.jsxs)(P.A,{sx:{mr:2,mb:2},children:[(0,G.jsx)(z.A,{onClick:()=>Ae(!1),variant:"contained",color:"error",sx:{mr:2},children:"Close"}),(0,G.jsx)(z.A,{onClick:()=>{(async()=>{if(console.log("selectedCustomer",he),he.firstname)if(he.contactno)if(he.address)if(he.suburb)if(he.city)if(he.state)if(he.postcode)if(he.landmark)if(he.latitude)if(he.longitude)try{const e=await i.A.put("".concat("https://jupiter.nearle.app/live/api/v1","/customers/update"),{customerid:he.customerid,configid:1,firstname:he.firstname,applocationid:he.applocationid,profileimage:"",dialcode:"+91",contactno:he.contactno,devicetype:"",deviceid:"",customertoken:"123",address:he.address,suburb:Ce,city:be,state:we,postcode:Se,landmark:he.landmark,doorno:he.doorno,latitude:he.latitude.toString(),longitude:he.longitude.toString()});console.log("postUpdateResponse",e),e.data.status&&((0,O.k)(e.data.message,"success",1500),Ae(!1),Oe())}catch(e){console.log("postUpdate error",e)}else(0,O.k)("Enter Longitude","warning",1500);else(0,O.k)("Enter Latitude","warning",1500);else(0,O.k)("Enter Landmark","warning",1500);else(0,O.k)("Enter PostCode","warning",1500);else(0,O.k)("Enter State","warning",1500);else(0,O.k)("Enter City ","warning",1500);else(0,O.k)("Enter Suburb","warning",1500);else(0,O.k)("Enter Valid Address","warning",1500);else(0,O.k)("Enter Contact Number ","warning",1500);else(0,O.k)("Enter Door NO","warning",1500)})()},variant:"contained",autoFocus:!0,children:"Update"})]})]})]})}},23787:(e,t,o)=>{o.d(t,{FG:()=>u,nV:()=>x,pY:()=>p,pg:()=>h});var r=o(89379),n=o(80045),i=o(93230),s=o(2235),l=o(16491),a=o(82053),c=o(44414);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:o=!1,onScroll:s,sx:l}=e,a=(0,n.A)(e,d);return(0,c.jsx)(i.A,(0,r.A)((0,r.A)({spacing:1.25,onScroll:s,sx:(0,r.A)((0,r.A)({p:1.5},o&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:t}))},h=e=>{let{accent:t="#662582",header:o,footer:n,selected:i=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(s.A,{elevation:0,onClick:a,sx:(0,r.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:i?t:"#e2e8f0",background:i?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[o,d,n]})]})},u=e=>{let{children:t,columns:o=2,sx:n}=e;return(0,c.jsx)(l.A,{sx:(0,r.A)({display:"grid",gridTemplateColumns:"repeat(".concat(o,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:t})},p=e=>{let{label:t,value:o,children:r,full:n=!1,align:i="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:n?"1 / -1":"auto",minWidth:0,textAlign:i},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==r?r:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==o&&void 0!==o?o:"\u2014"})})]})}},27001:(e,t,o)=>{o.d(t,{A:()=>l});var r=o(93230),n=o(16491),i=o(82053),s=o(44414);function l(e){let{title:t,subtitle:o,live:l=!1,action:a}=e;return(0,s.jsxs)(r.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,s.jsxs)(n.A,{sx:{minWidth:0},children:[(0,s.jsx)(i.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),o&&(0,s.jsxs)(r.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[l&&(0,s.jsx)(n.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,s.jsx)(i.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:o})]})]}),a&&(0,s.jsx)(n.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},36803:(e,t,o)=>{o.d(t,{A:()=>x});var r=o(48089),n=o(50704),i=o(93230),s=o(16491),l=o(82053),a=o(82917),c=o(41413),d=o(44414);function x(e){let{title:t,value:o,icon:x,color:h="#662582",caption:u,loading:p=!1}=e;return(0,d.jsx)(r.A,{sx:{height:"100%"},children:(0,d.jsx)(n.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(s.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(l.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),p?(0,d.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(l.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:o}),u&&(0,d.jsx)(l.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:u})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(h,"14"),color:h,flexShrink:0},children:x})]})})})}},56311:(e,t,o)=>{o.d(t,{A:()=>u});var r=o(89379),n=o(9950),i=o(2660),s=o(2046),l=o(83274),a=o(25333),c=o(97125),d=o(7762),x=o(52097),h=o(44414);const u=e=>{let{value:t,onChange:o,onDebouncedChange:u,debounceTime:p=500,placeholder:A="Search (ctrl+k)",sx:m}=e;const g=(0,n.useRef)(null),[f]=(0,x.d7)(t,p);return(0,n.useEffect)((()=>{u&&u(f)}),[f,u]),(0,n.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=g.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===g.current&&g.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,h.jsx)(i.A,{sx:(0,r.A)({},m),inputRef:g,placeholder:A,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>o(e.target.value),startAdornment:(0,h.jsx)(s.A,{position:"start",sx:{mr:-.5},children:(0,h.jsx)(c.A,{})}),endAdornment:(0,h.jsx)(l.A,{title:"Clear",children:(0,h.jsx)(a.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>o(""),children:(0,h.jsx)(d.A,{})})})})}},58691:(e,t,o)=>{o.d(t,{A:()=>l});o(9950);var r=o(16491),n=o(46639),i=o(62217),s=o(44414);function l(e){let{size:t=70,imgSize:o=40,alt:l="loader"}=e;return(0,s.jsxs)(r.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,s.jsx)(n.A,{size:t}),(0,s.jsx)(r.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:o,height:o},children:(0,s.jsx)("img",{src:i,alt:l,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,t,o)=>{o.d(t,{A:()=>h});var r=o(89379),n=o(9950),i=o(93230),s=o(41413),l=o(77922),a=o(29925),c=o(26910),d=o(31222),x=o(44414);const h=(0,n.forwardRef)(((e,t)=>{let{setAppId:o,setLocoName:h,setPage:u,sx:p,textfeildSx:A,textfieldSx:m,pill:g=!1,accentColor:f="#6366f1",icon:j,placeholder:b="Select Zone",paperComponent:v}=e;const[S,y]=(0,n.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,n.useEffect)((()=>{0===S.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),y(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[S.length]);const w=e=>"".concat(f).concat(e),k=w("26"),C=w("18"),W=g?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(k)},"&.Mui-focused fieldset":{borderColor:f,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},R=g&&(0,x.jsx)(i.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(s.A,{sx:{width:24,height:24,bgcolor:C,color:f,transition:"background-color 0.15s, color 0.15s"},children:j||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:S||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:v,sx:(0,r.A)({},p),onChange:(e,t,r)=>{"clear"===r?(null===o||void 0===o||o(0),null===h||void 0===h||h(""),null===u||void 0===u||u(0)):t&&(null===o||void 0===o||o(t.applocationid),null===h||void 0===h||h(t.locationname),null===u||void 0===u||u(0))},renderInput:e=>g?(0,x.jsx)(a.A,(0,r.A)((0,r.A)({},e),{},{inputRef:t,placeholder:b,InputProps:(0,r.A)((0,r.A)({},e.InputProps),{},{startAdornment:R}),sx:(0,r.A)((0,r.A)({},W),m||A||{})})):(0,x.jsx)(a.A,(0,r.A)((0,r.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,r.A)({},m||A||{})}))})}))},62217:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAPnUlEQVR4AdVae3AU9R3/7d4jdyGQQKAhECBAJBSmEAtFSQUjqPgAHGlhRm0lDkWY6Tg+O9qiErR26h8WR8ZWqTMN1ur4qMpDrTyjtDwDJloeCYiBvAgkaZ53l7vb3X4/v9vfZS/Zu9uFwLSfmb3d293f7u/z+z5/399K7CphdW5JrupgBZosZ0ialmu8pklSjUOTamRJbvvjqTUV7CpAYlcIj+SWZHQ55WJZlm7UNK2IXpRhpZ3GWJskSWXUZrPD4Sp77eSva9gVwIATXz35+SJNYWs1phWxAYDEpDKVaZv+fOrZUjaAGDDiK695rpgetpYOc82upw72sMycdJbz/SzmHeKl/ynRay31bbS1s7rjTczXGYj3ihrShnUDNQCXTXzlNS8UyExdbybhSdeNYwXz81nBzflE2pKms7oT51ntiSa276NKVn3wrNktNcGQelNpTUkNuwxcFvFV+S88rKnKy8ZzkOz84uvYvOJZ/PhyAE3Y/+HXbN+HFVwjjJAlR8lr1WueY9wt2MclEYfj8rnkj+nwRnHOLuGWhnbmpfuMKh/3Xn0Atm74IuY8OcGPFYk99kbVM98xm7BFnDyttHLyb3MlRdsjSWycOA+VLv79YpY5Ork6V5efY59s/JJVHznH/+dMymLz7v0Rm71oWtK2GIDSJ7ew6kMxJlCjytI8u+Qddm4+93bPBIfqiiG96KG5RPouljokuZT3b/2avf7EB6ylsZ1dM2MsG5OfxU7RAFSWVbMAObUphRMTtsc7CpdMh6c3kqe8gN117Yh5W4627GljFmGZ+C/ynx/flzSkDPW2Aqj2+lV/Y5mj0tljG3/GFhQXspkLpnBJVx85yyq/OGWJPAANgzkd2/utOMXJzxp965vlF3YFrPRHZtYgSZq6vi/p2TT6VrF+1Vt8/yiRhnoLiIHAftc7h0kDzlp6HgYcfTAgVwmEPmIWzTeZxPEQaeWkkhJJk1eJk8vWLGBz75nBrAIqfmDrN2zhqjlsetGkftddKU6WQ2qPe6AZVuwdGPP9kWw4+ZWKnVXiVO6M4UXtR1rKDiZrm4g4J70871cTnMzzd3ESNn3bgz9mdgC7hmoufeKWuB4/c1QGV3nYfP7Msfy/FYB8rM1LC6YNm72lonXv+UTtEqr60qVLJTcbvEv8h20tfOhGZgeQtpBiZnZ6wnuhEUDFnlPMDhaSMCbNilohc0kp61mEW1y1j0u8hLR78Ff5xX3t2i5AHLjegvqOIdtHXK/8oorZRfGLiw3aJM1dkVeynA5kCsGm98cjLhNxh4O5nxEnoOJW4rQRkDRUF3adTNoAEprRRB7tfJ09zA7Qt3mGCCMz+dmioiLKcSRTjvGISw/kPbNcSDtzdLotDy6A+AyYObR4KCjK53ur3t2I+ct7s0b0Pfds4U04RuLV914z4rjJ4ZSc94sTSBrsShvYv62S76frZKwAYQ2orWpidoEExyh1tzPl6SlTpjhJ6v3u7Utcgm0vHf/wePKUc8TJS5E21LWu6gKbRBmalXwcgHp70yISg8QR3oTWWAWk3gtpbp6/cCiLRK8Y9k7jHzgCGh3n8om/ibpueHKr0vZT5lVZFvHItVWRaALVQ4pqxcYfL3opeoxcvlr3D4BVc4HU4eFFeMt0ZsHJvUzcFKPkY4gvW7YMGiC7ZfcicW723dalXUsS3lSyNeZcBUmsmaS/5p0Vlp4BVccADsvOYP6uAM/yKsqq7PkJmv8L4k7mmEu7DcRNIfIqkedu3qjq0pkzZ/DfITE5quZjp2Qxu0Dnha1iX1fdxD55fW/CNjANYN49s7jKI5O788E5kfY0oHZQcEuvT5GY8wbaye+//36MqsfY+JEjR6QlY1cX0CHvNdQmZ/JIZhUtjW3RzkNqsG90Hti2cS8fgGSoqz7Pp6loi/uH6wNnJ7zBNA0ZYvrdY1aMZ6hdGHQ9RuL473KmDBUnUB+zAyE1dP6me2fxpMUYljat3Zb0GfvJodWRRz9Aic/utw+Ts/NG1L/L0qQrCoRggVTXUGRPMULmNo44h0CflZXlcGiuXLPGdoDOo7Pw0EYpC5W/c9Wcfm3EoAGiSAF4h0QiQmtDmyUHKZAzZSSrPam/W5MgzJgUlo+CrgFSU1OT5GTOseKi7UytsT2GiJlqW1X5aB+IrJfCYXNDO7MDYwh1yA4kYvKMGTNkkcxw4ghjdJLfQ9ntJRcgWxqsFUCsqDzg1e0U5FtsEvfGVIQ4J9nv90fNXEhcgmPLyEAh49KJW4WZlzezYSE172BvjDbZhc5JPn78eH/nlpubK7e1tcWQtjtRaDXpnLHaYkRflTdbSEhN65V4a4Plclo/IC/TDyV9ixCnNJWFw2EpPT2dBcKBBtHA3+FndmCmjsueuJnIf8/0/mQq79UlDkdpV+LGOnxQ7aljOmFwBTjxY8eOSXV1day9vV1SlFCHaFB3wroT8sdZ+kE4QuXFDMkSG7+ucZmUxdmdqrbU9WpIINQuiPO5CM5x4pTVYMdTucbgt8ejjeutj3K8Tg0jaU2aMY4nJWYQKm+mLT7d7kUW2GrDwRmFFpD8Xax3xSUmZcUfPhL7L2yvp9XJTv7ijgAv4ltBPK8rHNRCPf00QzKVRzs8p7Y6YRktCqy99foMrWN73bsnWJ/ZmTGbUVlkADRFDUarlIYKZkKYeWUjUYSm+0sWmraFxHdTaTkRhtnI2bHwKBBUA3iwSv6LcxPnjV4dI6J5vV61W+04JM5X7LBG3Mwr9820oPLxZln+zsQpac6kkdG5QDLs+7AyetwRat0FTvqsLEpeJDBaTU2NQocqBXl1f9PnH4uGmN5ZcSpmqu41KSUvffwWy4UJIzCIxlQ2bj/ILxnX1mq6Tx0EJwrVKlVjNFF8NKasbMSIEeqgQYOUWl91W0gNlIvGu0oPJH2h31Ti/VNeqP8dJrm6KQnDYIp5erKwZpR2j9JTfrRldy1x4mZMCYwWk7mxiPjVixcvqt3d3WpKSopS6z/9J/GA3ZsOJZW6mRp640h2Pk1bsWhoBzAToLo8fhES0t4fo+YXoblhWZbDtOcaLa5FbZziGyc/ZMgQpaenJ7yz4b1DqhpuxDV492RSNxuYeF4cWF6yiNmB8OyJ1B3SFlFI1ZSGj2o3grjS2dnJSescYyswa9eu5cQ7OjpwE0YodLGn/jVxHVJPFNfNc21PQiKiSJEIxgGFZ49XfETfthk+HGiO9B08wsOHD8deNd4fJa7rPi6G09LSeINPm97cHFT9R3gHSOqlT25m8WCWXCRzYvMpqUmkFYBxQOHZYedmNXdj36Cp6LvOJdTc3KzS4oKqC5cjSlz3dvhRurq6Qh6PJ0SDETrefvQP4h54y76fYwhg+ffRjfeRCi/kkrx+0Q9oVSRx2SpRbI8S7+iVuAiP+KrCiK0bvozx5Idat68KBoMhCmNBcKFQrYC4KDQC0SqrfhIS56oeCASC5ORCh5o/Pz7aO279CE/Oo7hvG70EBYrCPrX26CzM+uoxh0hnUWYyJd4VmSihWvvJxkheX2uY1e0qPRij4q09TW98/Z8D59B3CmNBUnMFoVpMTgT6LigI44eqB2kwMNxBchJvk8ofFTdtempLTNi4XCCdjWcWqLwgrH3w0g4eCaBVq1/6Kb+GPrz3u+3Re31K95cfnHv1dfSZPDn6HoKq06qvqvVZPey3Po6RKSsr49cwVWWRwXE2+M7tyxs87VZZktNwsZJSWVRhJxTksMsFPgyY85MZbGrhBJqDe5kzxRGd20MjOlq6qNqawSOBWDcHaQhAQCG7Pty66+l29WKz0+n0k8ZCVQITJ04M7dy5U1m3bl0M8XjVFgyIizYP2ckgUpnBdJw6OeOHuYWZC191ys6o8WJtepHNNXMrgDeHE0MuALLG9Bc2bVTvsBo+v6/ls1+ebDv8Ham4j8IxZmPdtMEzhljvPCSKeMT5wmF2dra7sbExlY4H0QZJe4n82L7ksWRT/OJdl1yVtQqELHhvoyMjSZ//V4T0WbfbHSCnxklTxdhPxdMgaXjY6NSMBPtBX0ODikPqbto4eXpwKj0Y5MfMHHbzI6mOtJhADOkXLikY8AGA9JFA7S49FDMZCij+ih31bz3V2FPbqpOGlLH5aION94vfAnELi3qtHddBHJ7Hy3Sp0+YhO3Ivzl65Yrgn+wFjO3j82UumDcgAxCMMNPnPbdhc98a7LpcLThikYdOQNrdtcmhhKrD0U3GBZBVVieKfg5wdJJ+Smprq9fl8kH4qvdATCoVc+ekFo28YvvgVh0H1BWACWGLGBzpjLK7KoGSEGgC2Pl8wckDK/247+MrR1t2YL8N+IVmfThh7YdcKS/Cda1LiqFHRJufk5LioLuch8h6dvJfIpxB5aITzjtE/v32kZ/wDTpMBAJC+YkkKWmD8ktlHCQqKmrUnL7BWIh3vs23YcmPgu798Wv/Xz0CM3h2mdwd0wnwjn9QzatSoEJXKw1pEZeMTYxagq73w9FB7Suw8XlVVvaRi+A/yuO64bfR9t2eljL09xeEtYAOAQNhfcabrm9J/XtyGPIKn1Lp6B3X19tN6gJ/m29ymSUgKUlMzh2aEncUDmdRe1tXeaPce/dilbxgAOT99evbEQdOuHebJvsHrSC2gpec0Ky/RmNrlV3wVneHWrw427/hHc7C+k/IJEFZ1KSOjDFDIEtLmSRb1LUR94/dZeY+tVROoPDaQo1TQTS9PoSlfik4cA0B9c7mpc1z6GAByghISoZkjivI8MuVRjqEjU52DRuossXir+UJdFHcCXfW+b09VtR9tMnReoefxNJqeCbsF6R7KygL03B56N8/OWK/3tkTaNnHWa/M8zrNIru8iOik0GeADQGHFTabh0q85qL/8Kwu0xSBgTwPB6BiLGMZn83SZzmuQMAhTWz5voEeGoNcgTtWUHiqW8OO8vLww+R5lz5494UT2PBDEY9rSQqOTHAmP91TFdNGChJsyPTdlelztqcMu6i+XvNiIkBQRHlcPHGv6sUbHIKzo56J1AZBkvR5cSFhUVBR2CbD69bIpysvLecdoAHqINOytm0ijJt9J3r+TVBLHXfrGkwsiJRIMLF1i76MBEue7qE0XqTPadYiNnFen3j6Ad5HGYSDwTcslkQYGamVULLrLpH7y6dOnuY1TGctFFR0hcYfhvujinQ6eaNBgYc6sEHm+0WAKqatEWJkwYYI6depUjYhbtuWrBW775GGd1FEXFQA8FFsR8+HRMdFBKocgPrTvRkgnh4l70ijPxtwAzpLnCLpDvSztvFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg=="},96646:(e,t,o)=>{o.d(t,{r:()=>a});var r=o(9213),n=o(21671),i=o(82917),s=o(93230),l=o(44414);const a=e=>{let{rowsPerPage:t=5,col:o=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,l.jsxs)(r.A,{children:[(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"text",width:30})}),Array.from({length:o}).map(((e,t)=>(0,l.jsx)(n.A,{children:(0,l.jsxs)(s.A,{spacing:.5,children:[(0,l.jsx)(i.A,{variant:"text",width:100}),(0,l.jsx)(i.A,{variant:"text",width:80})]})},t))),(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"text",width:150})}),(0,l.jsx)(n.A,{children:(0,l.jsx)(i.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(n.A,{align:"center",children:(0,l.jsxs)(s.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(i.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(i.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); \ No newline at end of file diff --git a/build/static/js/main.27e2deb8.js b/build/static/js/main.144619ee.js similarity index 72% rename from build/static/js/main.27e2deb8.js rename to build/static/js/main.144619ee.js index 097f87e..3816a16 100644 --- a/build/static/js/main.27e2deb8.js +++ b/build/static/js/main.144619ee.js @@ -1,2 +1,2 @@ -/*! For license information please see main.27e2deb8.js.LICENSE.txt */ -(()=>{var e={249:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(3484),l=n(59254),c=n(18463),u=n(13372),d=n(45558),f=n(1614);function p(e){return(0,f.Ay)("MuiList",e)}(0,d.A)("MuiList",["root","padding","dense","subheader"]);var h=n(44414);const m=["children","className","component","dense","disablePadding","subheader"],g=(0,l.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((e=>{let{ownerState:t}=e;return(0,o.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})})),v=i.forwardRef((function(e,t){const n=(0,c.b)({props:e,name:"MuiList"}),{children:l,className:d,component:f="ul",dense:v=!1,disablePadding:y=!1,subheader:b}=n,w=(0,r.A)(n,m),A=i.useMemo((()=>({dense:v})),[v]),x=(0,o.A)({},n,{component:f,dense:v,disablePadding:y}),S=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e,i={root:["root",!n&&"padding",r&&"dense",o&&"subheader"]};return(0,s.A)(i,p,t)})(x);return(0,h.jsx)(u.A.Provider,{value:A,children:(0,h.jsxs)(g,(0,o.A)({as:f,className:(0,a.A)(S.root,d),ref:t,ownerState:x},w,{children:[b,l]}))})}))},1018:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;td,Gh:()=>j,HS:()=>L,Oi:()=>s,Rr:()=>f,pX:()=>F,pb:()=>_,rc:()=>o,tH:()=>D,ue:()=>m,yD:()=>I,zR:()=>a}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(o||(o={}));const i="popstate";function a(e){return void 0===e&&(e={}),p((function(e,t){let{pathname:n,search:r,hash:o}=e.location;return u("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:d(t)}),null,e)}function s(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function l(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function c(e,t){return{usr:e.state,key:e.key,idx:t}}function u(e,t,n,o){return void 0===n&&(n=null),r({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?f(t):t,{state:n,key:t&&t.key||o||Math.random().toString(36).substr(2,8)})}function d(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function f(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function p(e,t,n,a){void 0===a&&(a={});let{window:l=document.defaultView,v5Compat:f=!1}=a,p=l.history,h=o.Pop,m=null,g=v();function v(){return(p.state||{idx:null}).idx}function y(){h=o.Pop;let e=v(),t=null==e?null:e-g;g=e,m&&m({action:h,location:w.location,delta:t})}function b(e){let t="null"!==l.location.origin?l.location.origin:l.location.href,n="string"===typeof e?e:d(e);return n=n.replace(/ $/,"%20"),s(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==g&&(g=0,p.replaceState(r({},p.state,{idx:g}),""));let w={get action(){return h},get location(){return e(l,p)},listen(e){if(m)throw new Error("A history only accepts one active listener");return l.addEventListener(i,y),m=e,()=>{l.removeEventListener(i,y),m=null}},createHref:e=>t(l,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){h=o.Push;let r=u(w.location,e,t);n&&n(r,e),g=v()+1;let i=c(r,g),a=w.createHref(r);try{p.pushState(i,"",a)}catch(s){if(s instanceof DOMException&&"DataCloneError"===s.name)throw s;l.location.assign(a)}f&&m&&m({action:h,location:w.location,delta:1})},replace:function(e,t){h=o.Replace;let r=u(w.location,e,t);n&&n(r,e),g=v();let i=c(r,g),a=w.createHref(r);p.replaceState(i,"",a),f&&m&&m({action:h,location:w.location,delta:0})},go:e=>p.go(e)};return w}var h;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(h||(h={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function m(e,t,n){return void 0===n&&(n="/"),g(e,t,n,!1)}function g(e,t,n,r){let o=_(("string"===typeof t?f(t):t).pathname||"/",n);if(null==o)return null;let i=v(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let s=0;null==a&&s{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(s(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let l=L([r,a.relativePath]),c=n.concat(a);e.children&&e.children.length>0&&(s(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),v(e.children,t,c,l)),(null!=e.path||e.index)&&t.push({path:l,score:C(l,e.index),routesMeta:c})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of y(e.path))o(e,t,r);else o(e,t)})),t}function y(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=y(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const b=/^:[\w-]+$/,w=3,A=2,x=1,S=10,E=-2,k=e=>"*"===e;function C(e,t){let n=e.split("/"),r=n.length;return n.some(k)&&(r+=E),t&&(r+=A),n.filter((e=>!k(e))).reduce(((e,t)=>e+(b.test(t)?w:""===t?x:S)),r)}function O(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function R(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return l(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function _(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function M(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function P(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function I(e,t){let n=P(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function j(e,t,n,o){let i;void 0===o&&(o=!1),"string"===typeof e?i=f(e):(i=r({},e),s(!i.pathname||!i.pathname.includes("?"),M("?","pathname","search",i)),s(!i.pathname||!i.pathname.includes("#"),M("#","pathname","hash",i)),s(!i.search||!i.search.includes("#"),M("#","search","hash",i)));let a,l=""===e||""===i.pathname,c=l?"/":i.pathname;if(null==c)a=n;else{let e=t.length-1;if(!o&&c.startsWith("..")){let t=c.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"===typeof e?f(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:B(r),hash:z(o)}}(i,a),d=c&&"/"!==c&&c.endsWith("/"),p=(l||"."===c)&&n.endsWith("/");return u.pathname.endsWith("/")||!d&&!p||(u.pathname+="/"),u}const L=e=>e.join("/").replace(/\/\/+/g,"/"),N=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",z=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class D extends Error{}function F(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const H=["post","put","patch","delete"],W=(new Set(H),["get",...H]);new Set(W),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred")},1352:(e,t,n)=>{"use strict";var r=n(17119);t.H=r.createRoot,r.hydrateRoot},1614:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>i});var r=n(41644);const o={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const i=o[t];return i?"".concat(n,"-").concat(i):"".concat(r.A.generate(e),"-").concat(t)}},1849:(e,t,n)=>{"use strict";n.d(t,{A:()=>He});var r=n(58168),o=n(98587),i=n(25329),a=n(9950),s=n(49456),l=n(95034),c=n(61262);function u(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function d(e){return e instanceof u(e).Element||e instanceof Element}function f(e){return e instanceof u(e).HTMLElement||e instanceof HTMLElement}function p(e){return"undefined"!==typeof ShadowRoot&&(e instanceof u(e).ShadowRoot||e instanceof ShadowRoot)}var h=Math.max,m=Math.min,g=Math.round;function v(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function y(){return!/^((?!chrome|android).)*safari/i.test(v())}function b(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&f(e)&&(o=e.offsetWidth>0&&g(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&g(r.height)/e.offsetHeight||1);var a=(d(e)?u(e):window).visualViewport,s=!y()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,p=r.width/o,h=r.height/i;return{width:p,height:h,top:c,right:l+p,bottom:c+h,left:l,x:l,y:c}}function w(e){var t=u(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function A(e){return e?(e.nodeName||"").toLowerCase():null}function x(e){return((d(e)?e.ownerDocument:e.document)||window.document).documentElement}function S(e){return b(x(e)).left+w(e).scrollLeft}function E(e){return u(e).getComputedStyle(e)}function k(e){var t=E(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function C(e,t,n){void 0===n&&(n=!1);var r=f(t),o=f(t)&&function(e){var t=e.getBoundingClientRect(),n=g(t.width)/e.offsetWidth||1,r=g(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=x(t),a=b(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==A(t)||k(i))&&(s=function(e){return e!==u(e)&&f(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:w(e);var t}(t)),f(t)?((l=b(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=S(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function O(e){var t=b(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function T(e){return"html"===A(e)?e:e.assignedSlot||e.parentNode||(p(e)?e.host:null)||x(e)}function R(e){return["html","body","#document"].indexOf(A(e))>=0?e.ownerDocument.body:f(e)&&k(e)?e:R(T(e))}function _(e,t){var n;void 0===t&&(t=[]);var r=R(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=u(r),a=o?[i].concat(i.visualViewport||[],k(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(_(T(a)))}function M(e){return["table","td","th"].indexOf(A(e))>=0}function P(e){return f(e)&&"fixed"!==E(e).position?e.offsetParent:null}function I(e){for(var t=u(e),n=P(e);n&&M(n)&&"static"===E(n).position;)n=P(n);return n&&("html"===A(n)||"body"===A(n)&&"static"===E(n).position)?t:n||function(e){var t=/firefox/i.test(v());if(/Trident/i.test(v())&&f(e)&&"fixed"===E(e).position)return null;var n=T(e);for(p(n)&&(n=n.host);f(n)&&["html","body"].indexOf(A(n))<0;){var r=E(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var j="top",L="bottom",N="right",B="left",z="auto",D=[j,L,N,B],F="start",H="end",W="viewport",U="popper",V=D.reduce((function(e,t){return e.concat([t+"-"+F,t+"-"+H])}),[]),G=[].concat(D,[z]).reduce((function(e,t){return e.concat([t,t+"-"+F,t+"-"+H])}),[]),q=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function K(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function X(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var Y={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function ne(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?$(o):null,a=o?ee(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case j:t={x:s,y:n.y-r.height};break;case L:t={x:s,y:n.y+n.height};break;case N:t={x:n.x+n.width,y:l};break;case B:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?te(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case F:t[c]=t[c]-(n[u]/2-r[u]/2);break;case H:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var re={top:"auto",right:"auto",bottom:"auto",left:"auto"};function oe(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=a.x,h=void 0===p?0:p,m=a.y,v=void 0===m?0:m,y="function"===typeof d?d({x:h,y:v}):{x:h,y:v};h=y.x,v=y.y;var b=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),A=B,S=j,k=window;if(c){var C=I(n),O="clientHeight",T="clientWidth";if(C===u(n)&&"static"!==E(C=x(n)).position&&"absolute"===s&&(O="scrollHeight",T="scrollWidth"),o===j||(o===B||o===N)&&i===H)S=L,v-=(f&&C===k&&k.visualViewport?k.visualViewport.height:C[O])-r.height,v*=l?1:-1;if(o===B||(o===j||o===L)&&i===H)A=N,h-=(f&&C===k&&k.visualViewport?k.visualViewport.width:C[T])-r.width,h*=l?1:-1}var R,_=Object.assign({position:s},c&&re),M=!0===d?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:g(n*o)/o||0,y:g(r*o)/o||0}}({x:h,y:v},u(n)):{x:h,y:v};return h=M.x,v=M.y,l?Object.assign({},_,((R={})[S]=w?"0":"",R[A]=b?"0":"",R.transform=(k.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",R)):Object.assign({},_,((t={})[S]=w?v+"px":"",t[A]=b?h+"px":"",t.transform="",t))}const ie={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=G.reduce((function(e,n){return e[n]=function(e,t,n){var r=$(e),o=[B,j].indexOf(r)>=0?-1:1,i="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[B,N].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var ae={left:"right",right:"left",bottom:"top",top:"bottom"};function se(e){return e.replace(/left|right|bottom|top/g,(function(e){return ae[e]}))}var le={start:"end",end:"start"};function ce(e){return e.replace(/start|end/g,(function(e){return le[e]}))}function ue(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&p(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function de(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function fe(e,t,n){return t===W?de(function(e,t){var n=u(e),r=x(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=y();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+S(e),y:l}}(e,n)):d(t)?function(e,t){var n=b(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):de(function(e){var t,n=x(e),r=w(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=h(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=h(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+S(e),l=-r.scrollTop;return"rtl"===E(o||n).direction&&(s+=h(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(x(e)))}function pe(e,t,n,r){var o="clippingParents"===t?function(e){var t=_(T(e)),n=["absolute","fixed"].indexOf(E(e).position)>=0&&f(e)?I(e):e;return d(n)?t.filter((function(e){return d(e)&&ue(e,n)&&"body"!==A(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=fe(e,n,r);return t.top=h(o.top,t.top),t.right=m(o.right,t.right),t.bottom=m(o.bottom,t.bottom),t.left=h(o.left,t.left),t}),fe(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function he(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function me(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ge(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?W:c,f=n.elementContext,p=void 0===f?U:f,h=n.altBoundary,m=void 0!==h&&h,g=n.padding,v=void 0===g?0:g,y=he("number"!==typeof v?v:me(v,D)),w=p===U?"reference":U,A=e.rects.popper,S=e.elements[m?w:p],E=pe(d(S)?S:S.contextElement||x(e.elements.popper),l,u,a),k=b(e.elements.reference),C=ne({reference:k,element:A,strategy:"absolute",placement:o}),O=de(Object.assign({},A,C)),T=p===U?O:k,R={top:E.top-T.top+y.top,bottom:T.bottom-E.bottom+y.bottom,left:E.left-T.left+y.left,right:T.right-E.right+y.right},_=e.modifiersData.offset;if(p===U&&_){var M=_[o];Object.keys(R).forEach((function(e){var t=[N,L].indexOf(e)>=0?1:-1,n=[j,L].indexOf(e)>=0?"y":"x";R[e]+=M[n]*t}))}return R}function ve(e,t,n){return h(e,m(t,n))}const ye={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=void 0===f||f,g=n.tetherOffset,v=void 0===g?0:g,y=ge(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=$(t.placement),w=ee(t.placement),A=!w,x=te(b),S="x"===x?"y":"x",E=t.modifiersData.popperOffsets,k=t.rects.reference,C=t.rects.popper,T="function"===typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,R="number"===typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(E){if(i){var P,z="y"===x?j:B,D="y"===x?L:N,H="y"===x?"height":"width",W=E[x],U=W+y[z],V=W-y[D],G=p?-C[H]/2:0,q=w===F?k[H]:C[H],K=w===F?-C[H]:-k[H],X=t.elements.arrow,Y=p&&X?O(X):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Z=Q[z],J=Q[D],ne=ve(0,k[H],Y[H]),re=A?k[H]/2-G-ne-Z-R.mainAxis:q-ne-Z-R.mainAxis,oe=A?-k[H]/2+G+ne+J+R.mainAxis:K+ne+J+R.mainAxis,ie=t.elements.arrow&&I(t.elements.arrow),ae=ie?"y"===x?ie.clientTop||0:ie.clientLeft||0:0,se=null!=(P=null==_?void 0:_[x])?P:0,le=W+oe-se,ce=ve(p?m(U,W+re-se-ae):U,W,p?h(V,le):V);E[x]=ce,M[x]=ce-W}if(s){var ue,de="x"===x?j:B,fe="x"===x?L:N,pe=E[S],he="y"===S?"height":"width",me=pe+y[de],ye=pe-y[fe],be=-1!==[j,B].indexOf(b),we=null!=(ue=null==_?void 0:_[S])?ue:0,Ae=be?me:pe-k[he]-C[he]-we+R.altAxis,xe=be?pe+k[he]+C[he]-we-R.altAxis:ye,Se=p&&be?function(e,t,n){var r=ve(e,t,n);return r>n?n:r}(Ae,pe,xe):ve(p?Ae:me,pe,p?xe:ye);E[S]=Se,M[S]=Se-pe}t.modifiersData[r]=M}},requiresIfExists:["offset"]};const be={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=$(n.placement),l=te(s),c=[B,N].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return he("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:me(e,D))}(o.padding,n),d=O(i),f="y"===l?j:B,p="y"===l?L:N,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],m=a[l]-n.rects.reference[l],g=I(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=h/2-m/2,b=u[f],w=v-d[c]-u[p],A=v/2-d[c]/2+y,x=ve(b,A,w),S=l;n.modifiersData[r]=((t={})[S]=x,t.centerOffset=x-A,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&ue(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function we(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ae(e){return[j,N,L,B].some((function(t){return e[t]>=0}))}var xe=Z({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=u(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,J)})),s&&l.addEventListener("resize",n.update,J),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,J)})),s&&l.removeEventListener("resize",n.update,J)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ne({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:$(t.placement),variation:ee(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,oe(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,oe(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];f(o)&&A(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});f(r)&&A(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},ie,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,v=$(g),y=l||(v===g||!h?[se(g)]:function(e){if($(e)===z)return[];var t=se(e);return[ce(e),t,ce(t)]}(g)),b=[g].concat(y).reduce((function(e,n){return e.concat($(n)===z?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?G:l,u=ee(r),d=u?s?V:V.filter((function(e){return ee(e)===u})):D,f=d.filter((function(e){return c.indexOf(e)>=0}));0===f.length&&(f=d);var p=f.reduce((function(t,n){return t[n]=ge(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[$(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,A=t.rects.popper,x=new Map,S=!0,E=b[0],k=0;k=0,_=R?"width":"height",M=ge(t,{placement:C,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),P=R?T?N:B:T?L:j;w[_]>A[_]&&(P=se(P));var I=se(P),H=[];if(i&&H.push(M[O]<=0),s&&H.push(M[P]<=0,M[I]<=0),H.every((function(e){return e}))){E=C,S=!1;break}x.set(C,H)}if(S)for(var W=function(e){var t=b.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},U=h?3:1;U>0;U--){if("break"===W(U))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},ye,be,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=ge(t,{elementContext:"reference"}),s=ge(t,{altBoundary:!0}),l=we(a,r),c=we(s,o,i),u=Ae(l),d=Ae(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),Se=n(3484),Ee=n(70134),ke=n(96039),Ce=n(45558),Oe=n(1614);function Te(e){return(0,Oe.Ay)("MuiPopper",e)}(0,Ce.A)("MuiPopper",["root"]);var Re=n(44414);const _e=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Me=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Pe(e){return"function"===typeof e?e():e}function Ie(e){return void 0!==e.nodeType}const je={},Le=a.forwardRef((function(e,t){var n;const{anchorEl:i,children:c,direction:u,disablePortal:d,modifiers:f,open:p,placement:h,popperOptions:m,popperRef:g,slotProps:v={},slots:y={},TransitionProps:b}=e,w=(0,o.A)(e,_e),A=a.useRef(null),x=(0,s.A)(A,t),S=a.useRef(null),E=(0,s.A)(S,g),k=a.useRef(E);(0,l.A)((()=>{k.current=E}),[E]),a.useImperativeHandle(g,(()=>S.current),[]);const C=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(h,u),[O,T]=a.useState(C),[R,_]=a.useState(Pe(i));a.useEffect((()=>{S.current&&S.current.forceUpdate()})),a.useEffect((()=>{i&&_(Pe(i))}),[i]),(0,l.A)((()=>{if(!R||!p)return;let e=[{name:"preventOverflow",options:{altBoundary:d}},{name:"flip",options:{altBoundary:d}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:e=>{let{state:t}=e;T(t.placement)}}];null!=f&&(e=e.concat(f)),m&&null!=m.modifiers&&(e=e.concat(m.modifiers));const t=xe(R,A.current,(0,r.A)({placement:C},m,{modifiers:e}));return k.current(t),()=>{t.destroy(),k.current(null)}}),[R,d,f,p,m,C]);const M={placement:O};null!==b&&(M.TransitionProps=b);const P=(e=>{const{classes:t}=e;return(0,Se.A)({root:["root"]},Te,t)})(e),I=null!=(n=y.root)?n:"div",j=(0,Ee.A)({elementType:I,externalSlotProps:v.root,externalForwardedProps:w,additionalProps:{role:"tooltip",ref:x},ownerState:e,className:P.root});return(0,Re.jsx)(I,(0,r.A)({},j,{children:"function"===typeof c?c(M):c}))})),Ne=a.forwardRef((function(e,t){const{anchorEl:n,children:i,container:s,direction:l="ltr",disablePortal:u=!1,keepMounted:d=!1,modifiers:f,open:p,placement:h="bottom",popperOptions:m=je,popperRef:g,style:v,transition:y=!1,slotProps:b={},slots:w={}}=e,A=(0,o.A)(e,Me),[x,S]=a.useState(!0);if(!d&&!p&&(!y||x))return null;let E;if(s)E=s;else if(n){const e=Pe(n);E=e&&Ie(e)?(0,c.A)(e).body:(0,c.A)(null).body}const k=p||!d||y&&!x?void 0:"none",C=y?{in:p,onEnter:()=>{S(!1)},onExited:()=>{S(!0)}}:void 0;return(0,Re.jsx)(ke.A,{disablePortal:u,container:E,children:(0,Re.jsx)(Le,(0,r.A)({anchorEl:n,direction:l,disablePortal:u,modifiers:f,ref:t,open:y?!x:p,placement:h,popperOptions:m,popperRef:g,slotProps:b,slots:w},A,{style:(0,r.A)({position:"fixed",top:0,left:0,display:k},v),TransitionProps:C,children:i}))})}));var Be=n(59254),ze=n(18463);const De=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Fe=(0,Be.Ay)(Ne,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),He=a.forwardRef((function(e,t){var n;const a=(0,i.A)(),s=(0,ze.b)({props:e,name:"MuiPopper"}),{anchorEl:l,component:c,components:u,componentsProps:d,container:f,disablePortal:p,keepMounted:h,modifiers:m,open:g,placement:v,popperOptions:y,popperRef:b,transition:w,slots:A,slotProps:x}=s,S=(0,o.A)(s,De),E=null!=(n=null==A?void 0:A.root)?n:null==u?void 0:u.Root,k=(0,r.A)({anchorEl:l,container:f,disablePortal:p,keepMounted:h,modifiers:m,open:g,placement:v,popperOptions:y,popperRef:b,transition:w},S);return(0,Re.jsx)(Fe,(0,r.A)({as:c,direction:null==a?void 0:a.direction,slots:{root:E},slotProps:null!=x?x:d},k,{ref:t}))}))},1976:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(59520).A},2235:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(3484),l=n(99269),c=n(59254);const u=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};var d=n(18463),f=n(45558),p=n(1614);function h(e){return(0,p.Ay)("MuiPaper",e)}(0,f.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var m=n(44414);const g=["className","component","elevation","square","variant"],v=(0,c.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})((e=>{let{theme:t,ownerState:n}=e;var r;return(0,o.A)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.divider)},"elevation"===n.variant&&(0,o.A)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,l.X4)("#fff",u(n.elevation)),", ").concat((0,l.X4)("#fff",u(n.elevation)),")")},t.vars&&{backgroundImage:null==(r=t.vars.overlays)?void 0:r[n.elevation]}))})),y=i.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiPaper"}),{className:i,component:l="div",elevation:c=1,square:u=!1,variant:f="elevation"}=n,p=(0,r.A)(n,g),y=(0,o.A)({},n,{component:l,elevation:c,square:u,variant:f}),b=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]};return(0,s.A)(i,h,o)})(y);return(0,m.jsx)(v,(0,o.A)({as:l,ownerState:y,className:(0,a.A)(b.root,i),ref:t},p))}))},2887:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(e,t)=>{switch(t){case"secondary":return e.palette.secondary;case"error":return e.palette.error;case"warning":return e.palette.warning;case"info":return e.palette.info;case"success":return e.palette.success;default:return e.palette.primary}}},3484:(e,t,n)=>{"use strict";function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r={};return Object.keys(e).forEach((o=>{r[o]=e[o].reduce(((e,r)=>{if(r){const o=t(r);""!==o&&e.push(o),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}n.d(t,{A:()=>r})},3888:(e,t,n)=>{"use strict";function r(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}n.d(t,{A:()=>r})},3911:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(58168),o=n(9950);const i={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};var a=n(61187),s=function(e,t){return o.createElement(a.A,(0,r.A)({},e,{ref:t,icon:i}))};const l=o.forwardRef(s)},4635:(e,t,n)=>{var r=n(14759).Symbol;e.exports=r},6171:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,b:()=>s});var r=n(9950),o=n(73808),i=n(44414);const a=r.createContext(void 0);function s(e){let{props:t,name:n}=e;return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?(0,o.A)(i.defaultProps,r):i.styleOverrides||i.variants?r:(0,o.A)(i,r)}({props:t,name:n,theme:{components:r.useContext(a)}})}const l=function(e){let{value:t,children:n}=e;return(0,i.jsx)(a.Provider,{value:t,children:n})}},6538:(e,t,n)=>{"use strict";e.exports=n(60759)},7148:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(12860),o=n(90357);const i=(0,r.A)();const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;return(0,o.A)(e)}},8195:(e,t,n)=>{"use strict";function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(t,{A:()=>r})},8881:(e,t,n)=>{"use strict";n.d(t,{n:()=>He,mk:()=>_e,M8:()=>Re});var r=n(9950),o=n(17119);function i(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||s,c=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,u=/\/\*[^]*?\*\/| +/g,d=/\n+/g,f=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?f(a,i):i+"{"+f(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=f(a,t?t.replace(/([^,])+/g,(e=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=f.p?f.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},p={},h=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+h(e[n]);return t}return e},m=(e,t,n,r,o)=>{let i=h(e),a=p[i]||(p[i]=(e=>{let t=0,n=11;for(;t>>0;return"go"+n})(i));if(!p[a]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=c.exec(e.replace(u,""));)t[4]?r.shift():t[3]?(n=t[3].replace(d," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(d," ").trim();return r[0]})(e);p[a]=f(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}let s=n&&p.g?p.g:null;return n&&(p.g=p[a]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(p[a],t,r,s),a};function g(e){let t=this||{},n=e.call?e(t.p):e;return m(n.unshift?n.raw?((e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":f(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),""))(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,l(t.target),t.g,t.o,t.k)}g.bind({g:1}),g.bind({k:1});function v(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var S=function(){return""},E=r.createContext({enqueueSnackbar:S,closeSnackbar:S}),k="@media (max-width:599.95px)",C="@media (min-width:600px)",O=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},T=function(e){return""+O(e.vertical)+O(e.horizontal)},R=function(e){return!!e||0===e},_="unmounted",M="exited",P="entering",I="entered",j="exiting",L=function(e){function t(t){var n;n=e.call(this,t)||this;var r,o=t.appear;return n.appearStatus=null,t.in?o?(r=M,n.appearStatus=P):r=I:r=t.unmountOnExit||t.mountOnEnter?_:M,n.state={status:r},n.nextCallback=null,n}w(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===_?{status:M}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==P&&n!==I&&(t=P):n!==P&&n!==I||(t=j)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!==typeof e&&"string"!==typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===P?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===M&&this.setState({status:_})},n.performEnter=function(e){var t=this,n=this.props.enter,r=e,o=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,r),this.safeSetState({status:P},(function(){t.props.onEntering&&t.props.onEntering(t.node,r),t.onTransitionEnd(o.enter,(function(){t.safeSetState({status:I},(function(){t.props.onEntered&&t.props.onEntered(t.node,r)}))}))}))):this.safeSetState({status:I},(function(){t.props.onEntered&&t.props.onEntered(t.node,r)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:j},(function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:M},(function(){e.props.onExited&&e.props.onExited(e.node)}))}))}))):this.safeSetState({status:M},(function(){e.props.onExited&&e.props.onExited(e.node)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;this.node&&!n?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===_)return null;var t=this.props;return(0,t.children)(e,A(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},y(t,[{key:"node",get:function(){var e,t=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!t)throw new Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(r.Component);function N(){}function B(e,t){"function"===typeof e?e(t):e&&(e.current=t)}function z(e,t){return(0,r.useMemo)((function(){return null==e&&null==t?null:function(n){B(e,n),B(t,n)}}),[e,t])}function D(e){var t=e.timeout,n=e.style,r=void 0===n?{}:n,o=e.mode;return{duration:"object"===typeof t?t[o]||0:t,easing:r.transitionTimingFunction,delay:r.transitionDelay}}L.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:N,onEntering:N,onEntered:N,onExit:N,onExiting:N,onExited:N};var F="cubic-bezier(0.4, 0, 0.2, 1)",H="cubic-bezier(0.0, 0, 0.2, 1)",W="cubic-bezier(0.4, 0, 0.6, 1)",U=function(e){e.scrollTop=e.scrollTop},V=function(e){return Math.round(e)+"ms"};function G(e,t){void 0===e&&(e=["all"]);var n=t||{},r=n.duration,o=void 0===r?300:r,i=n.easing,a=void 0===i?F:i,s=n.delay,l=void 0===s?0:s;return(Array.isArray(e)?e:[e]).map((function(e){var t="string"===typeof o?o:V(o),n="string"===typeof l?l:V(l);return e+" "+t+" "+a+" "+n})).join(",")}function q(e){var t=function(e){return e&&e.ownerDocument||document}(e);return t.defaultView||window}function K(e,t){if(t){var n=function(e,t){var n,r=t.getBoundingClientRect(),o=q(t);if(t.fakeTransform)n=t.fakeTransform;else{var i=o.getComputedStyle(t);n=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var a=0,s=0;if(n&&"none"!==n&&"string"===typeof n){var l=n.split("(")[1].split(")")[0].split(",");a=parseInt(l[4],10),s=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(o.innerWidth+a-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-a)+"px)";case"up":return"translateY("+(o.innerHeight+s-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-s)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var X=(0,r.forwardRef)((function(e,t){var n=e.children,o=e.direction,i=void 0===o?"down":o,a=e.in,s=e.style,l=e.timeout,c=void 0===l?0:l,u=e.onEnter,d=e.onEntered,f=e.onExit,p=e.onExited,h=A(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),m=(0,r.useRef)(null),g=z(n.ref,m),v=z(g,t),y=(0,r.useCallback)((function(){m.current&&K(i,m.current)}),[i]);return(0,r.useEffect)((function(){if(!a&&"down"!==i&&"right"!==i){var e=function(e,t){var n;function r(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a-1,i=e.snacks.findIndex(t)>-1;if(r||i)return e}return n.handleDisplaySnack(b({},e,{queue:[].concat(e.queue,[f])}))})),u},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?b({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some((function(e){return!e.open||e.requestClose})))return e;var t=!1,r=!1;e.snacks.reduce((function(e,t){return e+(t.open&&t.persist?1:0)}),0)===n.maxSnack&&(r=!0);var o=e.snacks.map((function(e){return t||e.persist&&!r?b({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),b({},e,{open:!1})):b({},e,{requestClose:!0}))}));return b({},e,{snacks:o})},n.handleEnteredSnack=function(e,t,r){if(!R(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState((function(e){return{snacks:e.snacks.map((function(e){return e.id===r?b({},e,{entered:!0}):b({},e)}))}}))},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var o=void 0===r;n.setState((function(e){var t=e.snacks,n=e.queue;return{snacks:t.map((function(e){return o||e.id===r?e.entered?b({},e,{open:!1}):b({},e,{requestClose:!0}):b({},e)})),queue:n.filter((function(e){return e.id!==r}))}}))},n.closeSnackbar=function(e){var t=n.state.snacks.find((function(t){return t.id===e}));R(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!R(t))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState((function(e){var r=n.processQueue(b({},e,{snacks:e.snacks.filter((function(e){return e.id!==t}))}));return 0===r.queue.length?r:n.handleDismissOldest(r)}))},Re=n.enqueueSnackbar,_e=n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(x(n)),closeSnackbar:n.closeSnackbar.bind(x(n))}},n}return w(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,i=n.domRoot,a=n.children,s=n.dense,l=void 0!==s&&s,c=n.Components,u=void 0===c?{}:c,d=n.classes,f=this.state.snacks.reduce((function(e,t){var n,r=T(t.anchorOrigin),o=e[r]||[];return b({},e,((n={})[r]=[].concat(o,[t]),n))}),{}),p=Object.keys(f).map((function(t){var n=f[t],o=n[0];return r.createElement(De,{key:t,dense:l,anchorOrigin:o.anchorOrigin,classes:d},n.map((function(t){return r.createElement(Ie,{key:t.id,snack:t,classes:d,Component:u[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:he([e.handleExitedSnack,e.props.onExited],t.id),onEntered:he([e.handleEnteredSnack,e.props.onEntered],t.id)})})))}));return r.createElement(E.Provider,{value:t},a,i?(0,o.createPortal)(p,i):p)},y(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||ee.maxSnack}}]),t}(r.Component)},9083:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(58168),o=n(9950);const i={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-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"};var a=n(61187),s=function(e,t){return o.createElement(a.A,(0,r.A)({},e,{ref:t,icon:i}))};const l=o.forwardRef(s)},9417:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:()=>r})},9593:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var o=r(n(79526)),i=n(44414);t.A=(0,o.default)((0,i.jsx)("path",{d:"M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7zm-4 4c-1.29-1.29-2.84-2.13-4.49-2.56l3.53 3.53zM2 3.05 5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24C7.81 10.89 6.27 11.73 5 13v.01L6.99 15c1.36-1.36 3.14-2.04 4.92-2.06L18.98 20l1.27-1.26L3.29 1.79zM9 17l3 3 3-3c-1.65-1.66-4.34-1.66-6 0"}),"WifiOff")},9845:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(58168),o=n(9950);const i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"};var a=n(61187),s=function(e,t){return o.createElement(a.A,(0,r.A)({},e,{ref:t,icon:i}))};const l=o.forwardRef(s)},9950:(e,t,n)=>{"use strict";e.exports=n(32049)},10031:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(11942),o=n.n(r);const i=(e,t)=>{switch(t){case"secondary":return e.customShadows.secondary;case"error":return e.customShadows.error;case"warning":return e.customShadows.warning;case"info":return e.customShadows.info;case"success":return e.customShadows.success;case"primaryButton":return e.customShadows.primaryButton;case"secondaryButton":return e.customShadows.secondaryButton;case"errorButton":return e.customShadows.errorButton;case"warningButton":return e.customShadows.warningButton;case"infoButton":return e.customShadows.infoButton;case"successButton":return e.customShadows.successButton;default:return e.customShadows.primary}};i.propTypes={theme:o().object,shadow:o().string};const a=i},11359:(e,t,n)=>{"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:f(e)?2:p(e)?3:0}function l(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===s(e)?e.get(t):e[t]}function u(e,t,n){var r=s(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e){return W&&e instanceof Map}function p(e){return U&&e instanceof Set}function h(e){return e.o||e.t}function m(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Q(e);delete t[K];for(var n=Y(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=v),Object.freeze(e),t&&a(e,(function(e,t){return g(t,!0)}),!0)),e}function v(){r(2)}function y(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function b(e){var t=Z[e];return t||r(18,e),t}function w(e,t){Z[e]||(Z[e]=t)}function A(){return F}function x(e,t){t&&(b("Patches"),e.u=[],e.s=[],e.v=t)}function S(e){E(e),e.p.forEach(C),e.p=null}function E(e){e===F&&(F=e.l)}function k(e){return F={p:[],l:F,h:e,m:!0,_:0}}function C(e){var t=e[K];0===t.i||1===t.i?t.j():t.g=!0}function O(e,t){t._=t.p.length;var n=t.p[0],o=void 0!==e&&e!==n;return t.h.O||b("ES5").S(t,e,o),o?(n[K].P&&(S(t),r(4)),i(e)&&(e=T(t,e),t.l||_(t,e)),t.u&&b("Patches").M(n[K].t,e,t.u,t.s)):e=T(t,n,[]),S(t),t.u&&t.v(t.u,t.s),e!==G?e:void 0}function T(e,t,n){if(y(t))return t;var r=t[K];if(!r)return a(t,(function(o,i){return R(e,r,t,o,i,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return _(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=m(r.k):r.o,i=o,s=!1;3===r.i&&(i=new Set(o),o.clear(),s=!0),a(i,(function(t,i){return R(e,r,o,t,i,n,s)})),_(e,o,!1),n&&e.u&&b("Patches").N(r,n,e.u,e.s)}return r.o}function R(e,t,n,r,a,s,c){if(o(a)){var d=T(e,a,s&&t&&3!==t.i&&!l(t.R,r)?s.concat(r):void 0);if(u(n,r,d),!o(d))return;e.m=!1}else c&&n.add(a);if(i(a)&&!y(a)){if(!e.h.D&&e._<1)return;T(e,a),t&&t.A.l||_(e,a)}}function _(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&g(t,n)}function M(e,t){var n=e[K];return(n?h(n):e)[t]}function P(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function I(e){e.P||(e.P=!0,e.l&&I(e.l))}function j(e){e.o||(e.o=m(e.t))}function L(e,t,n){var r=f(t)?b("MapSet").F(t,n):p(t)?b("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:A(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,i=J;n&&(o=[r],i=$);var a=Proxy.revocable(o,i),s=a.revoke,l=a.proxy;return r.k=l,r.j=s,l}(t,n):b("ES5").J(t,n);return(n?n.A:A()).p.push(r),r}function N(e){return o(e)||r(22,e),function e(t){if(!i(t))return t;var n,r=t[K],o=s(t);if(r){if(!r.P&&(r.i<4||!b("ES5").K(r)))return r.t;r.I=!0,n=B(t,o),r.I=!1}else n=B(t,o);return a(n,(function(t,o){r&&c(r.t,t)===o||u(n,t,e(o))})),3===o?new Set(n):n}(e)}function B(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return m(e)}function z(){function e(e,t){var n=i[e];return n?n.enumerable=t:i[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[K];return J.get(t,e)},set:function(t){var n=this[K];J.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var o=e[t][K];if(!o.P)switch(o.i){case 5:r(o)&&I(o);break;case 4:n(o)&&I(o)}}}function n(e){for(var t=e.t,n=e.k,r=Y(n),o=r.length-1;o>=0;o--){var i=r[o];if(i!==K){var a=t[i];if(void 0===a&&!l(t,i))return!0;var s=n[i],c=s&&s[K];if(c?c.t!==a:!d(s,a))return!0}}var u=!!t[K];return r.length!==Y(t).length+(u?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;rTe,zD:()=>Be,Z0:()=>Me});var D,F,H="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),W="undefined"!=typeof Map,U="undefined"!=typeof Set,V="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,G=H?Symbol.for("immer-nothing"):((D={})["immer-nothing"]=!0,D),q=H?Symbol.for("immer-draftable"):"__$immer_draftable",K=H?Symbol.for("immer-state"):"__$immer_state",X=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),Y="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Q=Object.getOwnPropertyDescriptors||function(e){var t={};return Y(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Z={},J={get:function(e,t){if(t===K)return e;var n=h(e);if(!l(n,t))return function(e,t,n){var r,o=P(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!i(r)?r:r===M(e.t,t)?(j(e),e.o[t]=L(e.A.h,r,e)):r},has:function(e,t){return t in h(e)},ownKeys:function(e){return Reflect.ownKeys(h(e))},set:function(e,t,n){var r=P(h(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=M(h(e),t),i=null==o?void 0:o[K];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(d(n,o)&&(void 0!==n||l(e.t,t)))return!0;j(e),I(e)}return e.o[t]===n&&(void 0!==n||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==M(e.t,t)||t in e.t?(e.R[t]=!1,j(e),I(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=h(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){r(12)}},$={};a(J,(function(e,t){$[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),$.deleteProperty=function(e,t){return $.set.call(this,e,t,void 0)},$.set=function(e,t,n){return J.set.call(this,e[0],t,n,e[0])};var ee=function(){function e(e){var t=this;this.O=V,this.D=!0,this.produce=function(e,n,o){if("function"==typeof e&&"function"!=typeof n){var a=n;n=e;var s=t;return function(e){var t=this;void 0===e&&(e=a);for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i1?r-1:0),i=1;i=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=b("Patches").$;return o(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),te=new ee,ne=te.produce;te.produceWithPatches.bind(te),te.setAutoFreeze.bind(te),te.setUseProxies.bind(te),te.applyPatches.bind(te),te.createDraft.bind(te),te.finishDraft.bind(te);const re=ne;var oe=n(58522);function ie(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"===typeof o?o(n,r,e):t(o)}}}}var ae=ie();ae.withExtraArgument=ie;const se=ae;n(85224);var le=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ce=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{e.exports=n(43488)()},12620:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}},12703:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,BO:()=>a,Yn:()=>i});var r=n(74840),o=n(28286);function i(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){const n="vars.".concat(t).split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function a(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||o:i(e,n)||o,t&&(r=t(r,o,e)),r}const s=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=i(e.theme,s)||{};return(0,o.NI)(e,c,(e=>{let o=a(u,l,e);return e===o&&"string"===typeof e&&(o=a(u,l,"".concat(t).concat("default"===e?"":(0,r.A)(e)),e)),!1===n?o:{[n]:o}}))};return c.propTypes={},c.filterProps=[t],c}},12860:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(58168),o=n(98587),i=n(22382),a=n(83628);const s={borderRadius:4};var l=n(47937);var c=n(70505),u=n(98076),d=n(30086);const f=["breakpoints","palette","spacing","shape"];const p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:p,shape:h={}}=e,m=(0,o.A)(e,f),g=(0,a.A)(t),v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,l.LX)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r{const n=t(e);return"number"===typeof n?"".concat(n,"px"):n})).join(" ")};return n.mui=!0,n}(p);let y=(0,i.A)({breakpoints:g,direction:"ltr",components:{},palette:(0,r.A)({mode:"light"},n),spacing:v,shape:(0,r.A)({},s,h)},m);y.applyStyles=d.A;for(var b=arguments.length,w=new Array(b>1?b-1:0),A=1;A(0,i.A)(e,t)),y),y.unstable_sxConfig=(0,r.A)({},u.A,null==m?void 0:m.unstable_sxConfig),y.unstable_sx=function(e){return(0,c.A)({sx:e,theme:this})},y}},13292:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9950);const o=e=>{const t=r.useRef({});return r.useEffect((()=>{t.current=e})),t.current}},13372:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9950).createContext({})},14195:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(3484),l=n(59254),c=n(18463),u=n(92455),d=n(13372),f=n(44414);const p=["className"],h=(0,l.Ay)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===n.alignItems&&{marginTop:8})})),m=i.forwardRef((function(e,t){const n=(0,c.b)({props:e,name:"MuiListItemIcon"}),{className:l}=n,m=(0,r.A)(n,p),g=i.useContext(d.A),v=(0,o.A)({},n,{alignItems:g.alignItems}),y=(e=>{const{alignItems:t,classes:n}=e,r={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,s.A)(r,u.f,n)})(v);return(0,f.jsx)(h,(0,o.A)({className:(0,a.A)(y.root,l),ownerState:v,ref:t},m))}))},14387:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(58168),o=n(98587),i=n(9950);const a=["getTrigger","target"];function s(e,t){const{disableHysteresis:n=!1,threshold:r=100,target:o}=t,i=e.current;return o&&(e.current=void 0!==o.pageYOffset?o.pageYOffset:o.scrollTop),!(!n&&void 0!==i&&e.currentr}const l="undefined"!==typeof window?window:null;function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{getTrigger:t=s,target:n=l}=e,c=(0,o.A)(e,a),u=i.useRef(),[d,f]=i.useState((()=>t(u,c)));return i.useEffect((()=>{const e=()=>{f(t(u,(0,r.A)({target:n},c)))};return e(),n.addEventListener("scroll",e,{passive:!0}),()=>{n.removeEventListener("scroll",e,{passive:!0})}}),[n,t,JSON.stringify(c)]),d}},14759:(e,t,n)=>{var r=n(16658),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},14857:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(9950);var r=n(7148),o=n(60195),i=n(67550);function a(){const e=(0,r.A)(o.A);return e[i.A]||e}},14919:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,getFunctionName:()=>i});var r=n(86879);const o=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function i(e){const t="".concat(e).match(o);return t&&t[1]||""}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||i(e)||t}function s(e,t,n){const r=a(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function l(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return a(e,"Component");if("object"===typeof e)switch(e.$$typeof){case r.vM:return s(e,e.render,"ForwardRef");case r.lD:return s(e,e.type,"memo");default:return}}}},15368:(e,t,n)=>{"use strict";n.d(t,{II:()=>u,v_:()=>s,wm:()=>c});var r=n(90698),o=n(98067),i=n(61664);function a(e){return Math.min(1e3*2**e,3e4)}function s(e){return"online"!==(null!==e&&void 0!==e?e:"online")||o.t.isOnline()}var l=class{constructor(e){this.revert=null===e||void 0===e?void 0:e.revert,this.silent=null===e||void 0===e?void 0:e.silent}};function c(e){return e instanceof l}function u(e){let t,n,c,u=!1,d=0,f=!1;const p=new Promise(((e,t)=>{n=e,c=t})),h=()=>!r.m.isFocused()||"always"!==e.networkMode&&!o.t.isOnline(),m=r=>{var o,i;f||(f=!0,null===(o=e.onSuccess)||void 0===o||o.call(e,r),null===(i=t)||void 0===i||i(),n(r))},g=n=>{var r,o;f||(f=!0,null===(r=e.onError)||void 0===r||r.call(e,n),null===(o=t)||void 0===o||o(),c(n))},v=()=>new Promise((n=>{var r;t=e=>{const t=f||!h();return t&&n(e),t},null===(r=e.onPause)||void 0===r||r.call(e)})).then((()=>{var n;(t=void 0,f)||(null===(n=e.onContinue)||void 0===n||n.call(e))})),y=()=>{if(f)return;let t;try{t=e.fn()}catch(n){t=Promise.reject(n)}Promise.resolve(t).then(m).catch((t=>{var n,r,o;if(f)return;const s=null!==(n=e.retry)&&void 0!==n?n:i.S$?0:3,l=null!==(r=e.retryDelay)&&void 0!==r?r:a,c="function"===typeof l?l(d,t):l,p=!0===s||"number"===typeof s&&d{if(h())return v()})).then((()=>{u?g(t):y()}))):g(t)}))};return s(e.networkMode)?y():v().then(y),{promise:p,cancel:t=>{var n;f||(g(new l(t)),null===(n=e.abort)||void 0===n||n.call(e))},continue:()=>{var e;return(null===(e=t)||void 0===e?void 0:e())?p:Promise.resolve()},cancelRetry:()=>{u=!0},continueRetry:()=>{u=!1}}}},15441:(e,t,n)=>{"use strict";n.d(t,{Ht:()=>a,jE:()=>i});var r=n(9950),o=r.createContext(void 0),i=e=>{const t=r.useContext(o);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},a=e=>{let{client:t,children:n}=e;return r.useEffect((()=>(t.mount(),()=>{t.unmount()})),[t]),r.createElement(o.Provider,{value:t},n)}},15941:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});var r=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},o=e=>setTimeout(e,0);const i=r=>{t?e.push(r):o((()=>{n(r)}))},a=()=>{const t=e;e=[],t.length&&o((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||a()}return n},batchCalls:e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r{e(...n)}))},schedule:i,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{o=e}}}()},16243:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>c,NL:()=>l,Ww:()=>s,dl:()=>i,ko:()=>o,lG:()=>a,qm:()=>r});const r="/sample-page",o=6,i=260,a={LIGHT:"light",DARK:"dark"},s={VERTICAL:"vertical",HORIZONTAL:"horizontal"},l={LTR:"ltr",RTL:"rtl"},c={fontFamily:"'Public Sans', sans-serif",i18n:"en",menuOrientation:s.VERTICAL,miniDrawer:!1,container:!0,mode:a.LIGHT,presetColor:"default",themeDirection:l.LTR}},16491:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(58168),o=n(98587),i=n(9950),a=n(72004),s=n(28843),l=n(70505),c=n(80237),u=n(7148),d=n(44414);const f=["className","component"];var p=n(41644),h=n(24436),m=n(67550);const g=(0,n(45558).A)("MuiBox",["root"]),v=(0,h.A)(),y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n,defaultClassName:p="MuiBox-root",generateClassName:h}=e,m=(0,s.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(l.A);return i.forwardRef((function(e,i){const s=(0,u.A)(n),l=(0,c.A)(e),{className:g,component:v="div"}=l,y=(0,o.A)(l,f);return(0,d.jsx)(m,(0,r.A)({as:v,ref:i,className:(0,a.A)(g,h?h(p):p),theme:t&&s[t]||s},y))}))}({themeId:m.A,defaultTheme:v,defaultClassName:g.root,generateClassName:p.A.generate}),b=y},16658:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},17119:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(38345)},17533:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var o=r(n(79526)),i=n(44414);t.A=(0,o.default)((0,i.jsx)("path",{d:"m17.27 6.73-4.24 10.13-1.32-3.42-.32-.83-.82-.32-3.43-1.33zM21 3 3 10.53v.98l6.84 2.65L12.48 21h.98z"}),"NearMeOutlined")},18463:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});n(9950);var r=n(6171);n(44414);function o(e){return(0,r.b)(e)}},19489:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(58168),o=n(98587),i=n(9950),a=n(67279),s=n(69688),l=n(14857),c=n(70576),u=n(31506),d=n(44414);const f=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],p={entering:{transform:"none"},entered:{transform:"none"}},h=i.forwardRef((function(e,t){const n=(0,l.A)(),h={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:m,appear:g=!0,children:v,easing:y,in:b,onEnter:w,onEntered:A,onEntering:x,onExit:S,onExited:E,onExiting:k,style:C,timeout:O=h,TransitionComponent:T=a.Ay}=e,R=(0,o.A)(e,f),_=i.useRef(null),M=(0,u.A)(_,(0,s.A)(v),t),P=e=>t=>{if(e){const n=_.current;void 0===t?e(n):e(n,t)}},I=P(x),j=P(((e,t)=>{(0,c.q)(e);const r=(0,c.c)({style:C,timeout:O,easing:y},{mode:"enter"});e.style.webkitTransition=n.transitions.create("transform",r),e.style.transition=n.transitions.create("transform",r),w&&w(e,t)})),L=P(A),N=P(k),B=P((e=>{const t=(0,c.c)({style:C,timeout:O,easing:y},{mode:"exit"});e.style.webkitTransition=n.transitions.create("transform",t),e.style.transition=n.transitions.create("transform",t),S&&S(e)})),z=P(E);return(0,d.jsx)(T,(0,r.A)({appear:g,in:b,nodeRef:_,onEnter:j,onEntered:L,onEntering:I,onExit:B,onExited:z,onExiting:N,addEndListener:e=>{m&&m(_.current,e)},timeout:O},R,{children:(e,t)=>i.cloneElement(v,(0,r.A)({style:(0,r.A)({transform:"scale(0)",visibility:"exited"!==e||b?void 0:"hidden"},p[e],C,v.props.style),ref:M},t))}))}))},19608:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(61960);const o=e=>(0,r.A)(e)&&"classes"!==e},19808:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(32228),l=n(51356),c=n(74840),u=n(62161),d=n(70146),f=n(12860),p=n(44414);const h=["className","component","disableGutters","fixed","maxWidth","classes"],m=(0,f.A)(),g=(0,d.A)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["maxWidth".concat((0,c.A)(String(n.maxWidth)))],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),v=e=>(0,u.A)({props:e,name:"MuiContainer",defaultTheme:m});var y=n(89548),b=n(59254),w=n(18463);const A=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=g,useThemeProps:n=v,componentName:u="MuiContainer"}=e,d=t((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!n.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}})}),(e=>{let{theme:t,ownerState:n}=e;return n.fixed&&Object.keys(t.breakpoints.values).reduce(((e,n)=>{const r=n,o=t.breakpoints.values[r];return 0!==o&&(e[t.breakpoints.up(r)]={maxWidth:"".concat(o).concat(t.breakpoints.unit)}),e}),{})}),(e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({},"xs"===n.maxWidth&&{[t.breakpoints.up("xs")]:{maxWidth:Math.max(t.breakpoints.values.xs,444)}},n.maxWidth&&"xs"!==n.maxWidth&&{[t.breakpoints.up(n.maxWidth)]:{maxWidth:"".concat(t.breakpoints.values[n.maxWidth]).concat(t.breakpoints.unit)}})})),f=i.forwardRef((function(e,t){const i=n(e),{className:f,component:m="div",disableGutters:g=!1,fixed:v=!1,maxWidth:y="lg"}=i,b=(0,r.A)(i,h),w=(0,o.A)({},i,{component:m,disableGutters:g,fixed:v,maxWidth:y}),A=((e,t)=>{const{classes:n,fixed:r,disableGutters:o,maxWidth:i}=e,a={root:["root",i&&"maxWidth".concat((0,c.A)(String(i))),r&&"fixed",o&&"disableGutters"]};return(0,l.A)(a,(e=>(0,s.Ay)(t,e)),n)})(w,u);return(0,p.jsx)(d,(0,o.A)({as:m,ownerState:w,className:(0,a.A)(A.root,f),ref:t},b))}));return f}({createStyledComponent:(0,b.Ay)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["maxWidth".concat((0,y.A)(String(n.maxWidth)))],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,w.b)({props:e,name:"MuiContainer"})}),x=A},19813:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,Y:()=>i});var r=n(45558),o=n(1614);function i(e){return(0,o.Ay)("MuiListItemButton",e)}const a=(0,r.A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"])},19831:(e,t,n)=>{"use strict";n.d(t,{JD:()=>p,M_:()=>f,d4:()=>h});var r=n(11359),o=n(82569),i=n(58522),a=n(68626),s=n(58662),l=n(34805),c=n(93970),u=n(68889);const d=(0,i.HY)({menu:a.Ay,snackbar:s.Ay,fcm:l.Ay,toastSlice:c.Ay,loginUserSlice:u.Ay}),f=(0,r.U1)({reducer:d}),{dispatch:p}=f,h=o.d4},20816:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(82284);function o(e){var t=function(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=(0,r.A)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,r.A)(t)?t:t+""}},21209:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(97654).A},21538:(e,t,n)=>{"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;nnull==t?e:function(){for(var n=arguments.length,r=new Array(n),o=0;o{}))}n.d(t,{A:()=>r})},22022:(e,t,n)=>{var r=n(4635),o=n(81581),i=n(65336),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},22382:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,Q:()=>i});var r=n(58168),o=n(9950);function i(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function a(e){if(o.isValidElement(e)||!i(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=a(e[n])})),t}function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const l=n.clone?(0,r.A)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((r=>{o.isValidElement(t[r])?l[r]=t[r]:i(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&i(e[r])?l[r]=s(e[r],t[r],n):n.clone?l[r]=i(t[r])?a(t[r]):t[r]:l[r]=t[r]})),l}},23199:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(72950)},23235:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(58168),o=n(9950),i=n(98587),a=n(72004),s=n(3484),l=n(89548),c=n(18463),u=n(59254),d=n(45558),f=n(1614);function p(e){return(0,f.Ay)("MuiSvgIcon",e)}(0,d.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var h=n(44414);const m=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=(0,u.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t["color".concat((0,l.A)(n.color))],t["fontSize".concat((0,l.A)(n.fontSize))]]}})((e=>{let{theme:t,ownerState:n}=e;var r,o,i,a,s,l,c,u,d,f,p,h,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:n.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(r=t.transitions)||null==(o=r.create)?void 0:o.call(r,"fill",{duration:null==(i=t.transitions)||null==(i=i.duration)?void 0:i.shorter}),fontSize:{inherit:"inherit",small:(null==(a=t.typography)||null==(s=a.pxToRem)?void 0:s.call(a,20))||"1.25rem",medium:(null==(l=t.typography)||null==(c=l.pxToRem)?void 0:c.call(l,24))||"1.5rem",large:(null==(u=t.typography)||null==(d=u.pxToRem)?void 0:d.call(u,35))||"2.1875rem"}[n.fontSize],color:null!=(f=null==(p=(t.vars||t).palette)||null==(p=p[n.color])?void 0:p.main)?f:{action:null==(h=(t.vars||t).palette)||null==(h=h.action)?void 0:h.active,disabled:null==(m=(t.vars||t).palette)||null==(m=m.action)?void 0:m.disabled,inherit:void 0}[n.color]}})),v=o.forwardRef((function(e,t){const n=(0,c.b)({props:e,name:"MuiSvgIcon"}),{children:u,className:d,color:f="inherit",component:v="svg",fontSize:y="medium",htmlColor:b,inheritViewBox:w=!1,titleAccess:A,viewBox:x="0 0 24 24"}=n,S=(0,i.A)(n,m),E=o.isValidElement(u)&&"svg"===u.type,k=(0,r.A)({},n,{color:f,component:v,fontSize:y,instanceFontSize:e.fontSize,inheritViewBox:w,viewBox:x,hasSvgAsChild:E}),C={};w||(C.viewBox=x);const O=(e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root","inherit"!==t&&"color".concat((0,l.A)(t)),"fontSize".concat((0,l.A)(n))]};return(0,s.A)(o,p,r)})(k);return(0,h.jsxs)(g,(0,r.A)({as:v,className:(0,a.A)(O.root,d),focusable:"false",color:b,"aria-hidden":!A||void 0,role:A?"img":void 0,ref:t},C,S,E&&u.props,{ownerState:k,children:[E?u.props.children:u,A?(0,h.jsx)("title",{children:A}):null]}))}));v.muiName="SvgIcon";const y=v;function b(e,t){function n(n,o){return(0,h.jsx)(y,(0,r.A)({"data-testid":"".concat(t,"Icon"),ref:o},n,{children:e}))}return n.muiName=y.muiName,o.memo(o.forwardRef(n))}},23876:(e,t,n)=>{"use strict";var r=n(50630),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g{"use strict";n.d(t,{A:()=>H});var r=n(58168),o=n(98587),i=n(9950),a=n(72004),s=n(3484),l=n(59254),c=n(18463),u=n(31506),d=n(1976),f=n(52695),p=n(57528),h=n(38166),m=n(88283),g=n(38528),v=n(44414);const y=function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:s,rippleSize:l,in:c,onExited:u,timeout:d}=e,[f,p]=i.useState(!1),h=(0,a.A)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:l,height:l,top:-l/2+s,left:-l/2+o},g=(0,a.A)(n.child,f&&n.childLeaving,r&&n.childPulsate);return c||f||p(!0),i.useEffect((()=>{if(!c&&null!=u){const e=setTimeout(u,d);return()=>{clearTimeout(e)}}}),[u,c,d]),(0,v.jsx)("span",{className:h,style:m,children:(0,v.jsx)("span",{className:g})})};var b=n(45558);const w=(0,b.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);var A,x,S,E;const k=["center","classes","className"];let C,O,T,R;const _=(0,m.i7)(C||(C=A||(A=(0,p.A)(["\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n"])))),M=(0,m.i7)(O||(O=x||(x=(0,p.A)(["\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n"])))),P=(0,m.i7)(T||(T=S||(S=(0,p.A)(["\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n"])))),I=(0,l.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),j=(0,l.Ay)(y,{name:"MuiTouchRipple",slot:"Ripple"})(R||(R=E||(E=(0,p.A)(["\n opacity: 0;\n position: absolute;\n\n &."," {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n &."," {\n animation-duration: ","ms;\n }\n\n & ."," {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & ."," {\n opacity: 0;\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n & ."," {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ",";\n animation-duration: 2500ms;\n animation-timing-function: ",";\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n"]))),w.rippleVisible,_,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),w.ripplePulsate,(e=>{let{theme:t}=e;return t.transitions.duration.shorter}),w.child,w.childLeaving,M,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),w.childPulsate,P,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut})),L=i.forwardRef((function(e,t){const n=(0,c.b)({props:e,name:"MuiTouchRipple"}),{center:s=!1,classes:l={},className:u}=n,d=(0,o.A)(n,k),[f,p]=i.useState([]),m=i.useRef(0),y=i.useRef(null);i.useEffect((()=>{y.current&&(y.current(),y.current=null)}),[f]);const b=i.useRef(!1),A=(0,g.A)(),x=i.useRef(null),S=i.useRef(null),E=i.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:i}=e;p((e=>[...e,(0,v.jsx)(j,{classes:{ripple:(0,a.A)(l.ripple,w.ripple),rippleVisible:(0,a.A)(l.rippleVisible,w.rippleVisible),ripplePulsate:(0,a.A)(l.ripplePulsate,w.ripplePulsate),child:(0,a.A)(l.child,w.child),childLeaving:(0,a.A)(l.childLeaving,w.childLeaving),childPulsate:(0,a.A)(l.childPulsate,w.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},m.current)])),m.current+=1,y.current=i}),[l]),C=i.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{pulsate:r=!1,center:o=s||t.pulsate,fakeElement:i=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&b.current)return void(b.current=!1);"touchstart"===(null==e?void 0:e.type)&&(b.current=!0);const a=i?null:S.current,l=a?a.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2===0&&(d+=1);else{const e=2*Math.max(Math.abs((a?a.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((a?a.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===x.current&&(x.current=()=>{E({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})},A.start(80,(()=>{x.current&&(x.current(),x.current=null)}))):E({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[s,E,A]),O=i.useCallback((()=>{C({},{pulsate:!0})}),[C]),T=i.useCallback(((e,t)=>{if(A.clear(),"touchend"===(null==e?void 0:e.type)&&x.current)return x.current(),x.current=null,void A.start(0,(()=>{T(e,t)}));x.current=null,p((e=>e.length>0?e.slice(1):e)),y.current=t}),[A]);return i.useImperativeHandle(t,(()=>({pulsate:O,start:C,stop:T})),[O,C,T]),(0,v.jsx)(I,(0,r.A)({className:(0,a.A)(w.root,l.root,u),ref:S},d,{children:(0,v.jsx)(h.A,{component:null,exit:!0,children:f})}))}));var N=n(1614);function B(e){return(0,N.Ay)("MuiButtonBase",e)}const z=(0,b.A)("MuiButtonBase",["root","disabled","focusVisible"]),D=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],F=(0,l.Ay)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(z.disabled)]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),H=i.forwardRef((function(e,t){const n=(0,c.b)({props:e,name:"MuiButtonBase"}),{action:l,centerRipple:p=!1,children:h,className:m,component:g="button",disabled:y=!1,disableRipple:b=!1,disableTouchRipple:w=!1,focusRipple:A=!1,LinkComponent:x="a",onBlur:S,onClick:E,onContextMenu:k,onDragLeave:C,onFocus:O,onFocusVisible:T,onKeyDown:R,onKeyUp:_,onMouseDown:M,onMouseLeave:P,onMouseUp:I,onTouchEnd:j,onTouchMove:N,onTouchStart:z,tabIndex:H=0,TouchRippleProps:W,touchRippleRef:U,type:V}=n,G=(0,o.A)(n,D),q=i.useRef(null),K=i.useRef(null),X=(0,u.A)(K,U),{isFocusVisibleRef:Y,onFocus:Q,onBlur:Z,ref:J}=(0,f.A)(),[$,ee]=i.useState(!1);y&&$&&ee(!1),i.useImperativeHandle(l,(()=>({focusVisible:()=>{ee(!0),q.current.focus()}})),[]);const[te,ne]=i.useState(!1);i.useEffect((()=>{ne(!0)}),[]);const re=te&&!b&&!y;function oe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;return(0,d.A)((r=>{t&&t(r);return!n&&K.current&&K.current[e](r),!0}))}i.useEffect((()=>{$&&A&&!b&&te&&K.current.pulsate()}),[b,A,$,te]);const ie=oe("start",M),ae=oe("stop",k),se=oe("stop",C),le=oe("stop",I),ce=oe("stop",(e=>{$&&e.preventDefault(),P&&P(e)})),ue=oe("start",z),de=oe("stop",j),fe=oe("stop",N),pe=oe("stop",(e=>{Z(e),!1===Y.current&&ee(!1),S&&S(e)}),!1),he=(0,d.A)((e=>{q.current||(q.current=e.currentTarget),Q(e),!0===Y.current&&(ee(!0),T&&T(e)),O&&O(e)})),me=()=>{const e=q.current;return g&&"button"!==g&&!("A"===e.tagName&&e.href)},ge=i.useRef(!1),ve=(0,d.A)((e=>{A&&!ge.current&&$&&K.current&&" "===e.key&&(ge.current=!0,K.current.stop(e,(()=>{K.current.start(e)}))),e.target===e.currentTarget&&me()&&" "===e.key&&e.preventDefault(),R&&R(e),e.target===e.currentTarget&&me()&&"Enter"===e.key&&!y&&(e.preventDefault(),E&&E(e))})),ye=(0,d.A)((e=>{A&&" "===e.key&&K.current&&$&&!e.defaultPrevented&&(ge.current=!1,K.current.stop(e,(()=>{K.current.pulsate(e)}))),_&&_(e),E&&e.target===e.currentTarget&&me()&&" "===e.key&&!e.defaultPrevented&&E(e)}));let be=g;"button"===be&&(G.href||G.to)&&(be=x);const we={};"button"===be?(we.type=void 0===V?"button":V,we.disabled=y):(G.href||G.to||(we.role="button"),y&&(we["aria-disabled"]=y));const Ae=(0,u.A)(t,J,q);const xe=(0,r.A)({},n,{centerRipple:p,component:g,disabled:y,disableRipple:b,disableTouchRipple:w,focusRipple:A,tabIndex:H,focusVisible:$}),Se=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i={root:["root",t&&"disabled",n&&"focusVisible"]},a=(0,s.A)(i,B,o);return n&&r&&(a.root+=" ".concat(r)),a})(xe);return(0,v.jsxs)(F,(0,r.A)({as:be,className:(0,a.A)(Se.root,m),ownerState:xe,onBlur:pe,onClick:E,onContextMenu:ae,onFocus:he,onKeyDown:ve,onKeyUp:ye,onMouseDown:ie,onMouseLeave:ce,onMouseUp:le,onDragLeave:se,onTouchEnd:de,onTouchMove:fe,onTouchStart:ue,ref:Ae,tabIndex:y?-1:H,type:V},we,G,{children:[h,re?(0,v.jsx)(L,(0,r.A)({ref:X,center:p},W)):null]}))}))},24386:(e,t,n)=>{"use strict";n.d(t,{J:()=>g});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function o(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var i=!1,a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!==typeof e},u=o((function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(s,(function(e,t,n){return h={name:t,styles:n,next:h},t}))}return 1===r[e]||l(e)||"number"!==typeof t||0===t?t:t+"px"},f="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function p(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return h={name:o.name,styles:o.styles,next:h},o.name;var a=n;if(void 0!==a.styles){var s=a.next;if(void 0!==s)for(;void 0!==s;)h={name:s.name,styles:s.styles,next:h},s=s.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:h}}},24436:(e,t,n)=>{"use strict";n.d(t,{A:()=>j});var r=n(58168),o=n(98587),i=n(37750),a=n(64750),s=n(98076),l=n(70505),c=n(12860);var u=n(99269);const d={black:"#000",white:"#fff"},f={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},p={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},h={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},m={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},g={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},v={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},y={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},b=["mode","contrastThreshold","tonalOffset"],w={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:d.white,default:d.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},A={text:{primary:d.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:d.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function x(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,u.a)(e.main,o):"dark"===t&&(e.dark=(0,u.e$)(e.main,i)))}function S(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:s=.2}=e,l=(0,o.A)(e,b),c=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g[200],light:g[50],dark:g[400]}:{main:g[700],light:g[400],dark:g[800]}}(t),S=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p[200],light:p[50],dark:p[400]}:{main:p[500],light:p[300],dark:p[700]}}(t),E=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:h[500],light:h[300],dark:h[700]}:{main:h[700],light:h[400],dark:h[800]}}(t),k=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(t),C=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:y[400],light:y[300],dark:y[700]}:{main:y[800],light:y[500],dark:y[900]}}(t),O=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m[400],light:m[300],dark:m[700]}:{main:"#ed6c02",light:m[500],dark:m[900]}}(t);function T(e){return(0,u.eM)(e,A.text.primary)>=n?A.text.primary:w.text.primary}const R=e=>{let{color:t,name:n,mainShade:o=500,lightShade:a=300,darkShade:l=700}=e;if(t=(0,r.A)({},t),!t.main&&t[o]&&(t.main=t[o]),!t.hasOwnProperty("main"))throw new Error((0,i.A)(11,n?" (".concat(n,")"):"",o));if("string"!==typeof t.main)throw new Error((0,i.A)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return x(t,"light",a,s),x(t,"dark",l,s),t.contrastText||(t.contrastText=T(t.main)),t},_={dark:A,light:w};return(0,a.A)((0,r.A)({common:(0,r.A)({},d),mode:t,primary:R({color:c,name:"primary"}),secondary:R({color:S,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:R({color:E,name:"error"}),warning:R({color:O,name:"warning"}),info:R({color:k,name:"info"}),success:R({color:C,name:"success"}),grey:f,contrastThreshold:n,getContrastText:T,augmentColor:R,tonalOffset:s},_[t]),l)}const E=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const k={textTransform:"uppercase"},C='"Roboto", "Helvetica", "Arial", sans-serif';function O(e,t){const n="function"===typeof t?t(e):t,{fontFamily:i=C,fontSize:s=14,fontWeightLight:l=300,fontWeightRegular:c=400,fontWeightMedium:u=500,fontWeightBold:d=700,htmlFontSize:f=16,allVariants:p,pxToRem:h}=n,m=(0,o.A)(n,E);const g=s/14,v=h||(e=>"".concat(e/f*g,"rem")),y=(e,t,n,o,a)=>{return(0,r.A)({fontFamily:i,fontWeight:e,fontSize:v(t),lineHeight:n},i===C?{letterSpacing:"".concat((s=o/t,Math.round(1e5*s)/1e5),"em")}:{},a,p);var s},b={h1:y(l,96,1.167,-1.5),h2:y(l,60,1.2,-.5),h3:y(c,48,1.167,0),h4:y(c,34,1.235,.25),h5:y(c,24,1.334,0),h6:y(u,20,1.6,.15),subtitle1:y(c,16,1.75,.15),subtitle2:y(u,14,1.57,.1),body1:y(c,16,1.5,.15),body2:y(c,14,1.43,.15),button:y(u,14,1.75,.4,k),caption:y(c,12,1.66,.4),overline:y(c,12,2.66,1,k),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,a.A)((0,r.A)({htmlFontSize:f,pxToRem:v,fontFamily:i,fontSize:s,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:u,fontWeightBold:d},b),m,{clone:!1})}function T(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const R=["none",T(0,2,1,-1,0,1,1,0,0,1,3,0),T(0,3,1,-2,0,2,2,0,0,1,5,0),T(0,3,3,-2,0,3,4,0,0,1,8,0),T(0,2,4,-1,0,4,5,0,0,1,10,0),T(0,3,5,-1,0,5,8,0,0,1,14,0),T(0,3,5,-1,0,6,10,0,0,1,18,0),T(0,4,5,-2,0,7,10,1,0,2,16,1),T(0,5,5,-3,0,8,10,1,0,3,14,2),T(0,5,6,-3,0,9,12,1,0,3,16,2),T(0,6,6,-3,0,10,14,1,0,4,18,3),T(0,6,7,-4,0,11,15,1,0,4,20,3),T(0,7,8,-4,0,12,17,2,0,5,22,4),T(0,7,8,-4,0,13,19,2,0,5,24,4),T(0,7,9,-4,0,14,21,2,0,5,26,4),T(0,8,9,-5,0,15,22,2,0,6,28,5),T(0,8,10,-5,0,16,24,2,0,6,30,5),T(0,8,11,-5,0,17,26,2,0,6,32,5),T(0,9,11,-5,0,18,28,2,0,7,34,6),T(0,9,12,-6,0,19,29,2,0,7,36,6),T(0,10,13,-6,0,20,31,3,0,8,38,7),T(0,10,13,-6,0,21,33,3,0,8,40,7),T(0,10,14,-6,0,22,35,3,0,8,42,7),T(0,11,14,-7,0,23,36,3,0,9,44,8),T(0,11,15,-7,0,24,38,3,0,9,46,8)];var _=n(75361);const M={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},P=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function I(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:n={},transitions:u={},typography:d={}}=e,f=(0,o.A)(e,P);if(e.vars)throw new Error((0,i.A)(18));const p=S(n),h=(0,c.A)(e);let m=(0,a.A)(h,{mixins:(g=h.breakpoints,v=t,(0,r.A)({toolbar:{minHeight:56,[g.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[g.up("sm")]:{minHeight:64}}},v)),palette:p,shadows:R.slice(),typography:O(p,d),transitions:(0,_.Ay)(u),zIndex:(0,r.A)({},M)});var g,v;m=(0,a.A)(m,f);for(var y=arguments.length,b=new Array(y>1?y-1:0),w=1;w(0,a.A)(e,t)),m),m.unstable_sxConfig=(0,r.A)({},s.A,null==f?void 0:f.unstable_sxConfig),m.unstable_sx=function(e){return(0,l.A)({sx:e,theme:this})},m}const j=I},24513:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(58168),o=n(9950);const i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};var a=n(61187),s=function(e,t){return o.createElement(a.A,(0,r.A)({},e,{ref:t,icon:i}))};const l=o.forwardRef(s)},24567:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},24763:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(58168),o=n(98587),i=n(49456),a=n(83792),s=n(26598),l=n(89449);const c=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],u=["component","slots","slotProps"],d=["component"];function f(e,t){const{className:n,elementType:f,ownerState:p,externalForwardedProps:h,getSlotOwnerState:m,internalForwardedProps:g}=t,v=(0,o.A)(t,c),{component:y,slots:b={[e]:void 0},slotProps:w={[e]:void 0}}=h,A=(0,o.A)(h,u),x=b[e]||f,S=(0,s.A)(w[e],p),E=(0,l.A)((0,r.A)({className:n},v,{externalForwardedProps:"root"===e?A:void 0,externalSlotProps:S})),{props:{component:k},internalRef:C}=E,O=(0,o.A)(E.props,d),T=(0,i.A)(C,null==S?void 0:S.ref,t.ref),R=m?m(O):{},_=(0,r.A)({},p,R),M="root"===e?k||y:k,P=(0,a.A)(x,(0,r.A)({},"root"===e&&!y&&!b[e]&&g,"root"!==e&&!b[e]&&g,O,M&&{as:M},{ref:T}),_);return Object.keys(R).forEach((e=>{delete P[e]})),[x,P]}},24994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},25277:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(3484),l=n(99269),c=n(23235),u=n(44414);const d=(0,c.A)((0,u.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");var f=n(31506),p=n(89548),h=n(24184),m=n(18463),g=n(59254),v=n(45558),y=n(1614);function b(e){return(0,y.Ay)("MuiChip",e)}const w=(0,v.A)("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),A=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],x=(0,g.Ay)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{["& .".concat(w.avatar)]:t.avatar},{["& .".concat(w.avatar)]:t["avatar".concat((0,p.A)(s))]},{["& .".concat(w.avatar)]:t["avatarColor".concat((0,p.A)(r))]},{["& .".concat(w.icon)]:t.icon},{["& .".concat(w.icon)]:t["icon".concat((0,p.A)(s))]},{["& .".concat(w.icon)]:t["iconColor".concat((0,p.A)(o))]},{["& .".concat(w.deleteIcon)]:t.deleteIcon},{["& .".concat(w.deleteIcon)]:t["deleteIcon".concat((0,p.A)(s))]},{["& .".concat(w.deleteIcon)]:t["deleteIconColor".concat((0,p.A)(r))]},{["& .".concat(w.deleteIcon)]:t["deleteIcon".concat((0,p.A)(l),"Color").concat((0,p.A)(r))]},t.root,t["size".concat((0,p.A)(s))],t["color".concat((0,p.A)(r))],i&&t.clickable,i&&"default"!==r&&t["clickableColor".concat((0,p.A)(r),")")],a&&t.deletable,a&&"default"!==r&&t["deletableColor".concat((0,p.A)(r))],t[l],t["".concat(l).concat((0,p.A)(r))]]}})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?t.palette.grey[700]:t.palette.grey[300];return(0,o.A)({maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",["&.".concat(w.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["& .".concat(w.avatar)]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:r,fontSize:t.typography.pxToRem(12)},["& .".concat(w.avatarColorPrimary)]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},["& .".concat(w.avatarColorSecondary)]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},["& .".concat(w.avatarSmall)]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},["& .".concat(w.icon)]:(0,o.A)({marginLeft:5,marginRight:-6},"small"===n.size&&{fontSize:18,marginLeft:4,marginRight:-4},n.iconColor===n.color&&(0,o.A)({color:t.vars?t.vars.palette.Chip.defaultIconColor:r},"default"!==n.color&&{color:"inherit"})),["& .".concat(w.deleteIcon)]:(0,o.A)({WebkitTapHighlightColor:"transparent",color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.26)"):(0,l.X4)(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.4)"):(0,l.X4)(t.palette.text.primary,.4)}},"small"===n.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==n.color&&{color:t.vars?"rgba(".concat(t.vars.palette[n.color].contrastTextChannel," / 0.7)"):(0,l.X4)(t.palette[n.color].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].contrastText}})},"small"===n.size&&{height:24},"default"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].main,color:(t.vars||t).palette[n.color].contrastText},n.onDelete&&{["&.".concat(w.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,l.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},n.onDelete&&"default"!==n.color&&{["&.".concat(w.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({},n.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,l.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},["&.".concat(w.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,l.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}},n.clickable&&"default"!==n.color&&{["&:hover, &.".concat(w.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({},"outlined"===n.variant&&{backgroundColor:"transparent",border:t.vars?"1px solid ".concat(t.vars.palette.Chip.defaultBorder):"1px solid ".concat("light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[700]),["&.".concat(w.clickable,":hover")]:{backgroundColor:(t.vars||t).palette.action.hover},["&.".concat(w.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["& .".concat(w.avatar)]:{marginLeft:4},["& .".concat(w.avatarSmall)]:{marginLeft:2},["& .".concat(w.icon)]:{marginLeft:4},["& .".concat(w.iconSmall)]:{marginLeft:2},["& .".concat(w.deleteIcon)]:{marginRight:5},["& .".concat(w.deleteIconSmall)]:{marginRight:3}},"outlined"===n.variant&&"default"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.7)"):(0,l.X4)(t.palette[n.color].main,.7)),["&.".concat(w.clickable,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity)},["&.".concat(w.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.focusOpacity,")"):(0,l.X4)(t.palette[n.color].main,t.palette.action.focusOpacity)},["& .".concat(w.deleteIcon)]:{color:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.7)"):(0,l.X4)(t.palette[n.color].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].main}}})})),S=(0,g.Ay)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t["label".concat((0,p.A)(r))]]}})((e=>{let{ownerState:t}=e;return(0,o.A)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"outlined"===t.variant&&{paddingLeft:11,paddingRight:11},"small"===t.size&&{paddingLeft:8,paddingRight:8},"small"===t.size&&"outlined"===t.variant&&{paddingLeft:7,paddingRight:7})}));function E(e){return"Backspace"===e.key||"Delete"===e.key}const k=i.forwardRef((function(e,t){const n=(0,m.b)({props:e,name:"MuiChip"}),{avatar:l,className:c,clickable:g,color:v="default",component:y,deleteIcon:w,disabled:k=!1,icon:C,label:O,onClick:T,onDelete:R,onKeyDown:_,onKeyUp:M,size:P="medium",variant:I="filled",tabIndex:j,skipFocusWhenDisabled:L=!1}=n,N=(0,r.A)(n,A),B=i.useRef(null),z=(0,f.A)(B,t),D=e=>{e.stopPropagation(),R&&R(e)},F=!(!1===g||!T)||g,H=F||R?h.A:y||"div",W=(0,o.A)({},n,{component:H,disabled:k,size:P,color:v,iconColor:i.isValidElement(C)&&C.props.color||v,onDelete:!!R,clickable:F,variant:I}),U=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:l,variant:c}=e,u={root:["root",c,n&&"disabled","size".concat((0,p.A)(r)),"color".concat((0,p.A)(o)),l&&"clickable",l&&"clickableColor".concat((0,p.A)(o)),a&&"deletable",a&&"deletableColor".concat((0,p.A)(o)),"".concat(c).concat((0,p.A)(o))],label:["label","label".concat((0,p.A)(r))],avatar:["avatar","avatar".concat((0,p.A)(r)),"avatarColor".concat((0,p.A)(o))],icon:["icon","icon".concat((0,p.A)(r)),"iconColor".concat((0,p.A)(i))],deleteIcon:["deleteIcon","deleteIcon".concat((0,p.A)(r)),"deleteIconColor".concat((0,p.A)(o)),"deleteIcon".concat((0,p.A)(c),"Color").concat((0,p.A)(o))]};return(0,s.A)(u,b,t)})(W),V=H===h.A?(0,o.A)({component:y||"div",focusVisibleClassName:U.focusVisible},R&&{disableRipple:!0}):{};let G=null;R&&(G=w&&i.isValidElement(w)?i.cloneElement(w,{className:(0,a.A)(w.props.className,U.deleteIcon),onClick:D}):(0,u.jsx)(d,{className:(0,a.A)(U.deleteIcon),onClick:D}));let q=null;l&&i.isValidElement(l)&&(q=i.cloneElement(l,{className:(0,a.A)(U.avatar,l.props.className)}));let K=null;return C&&i.isValidElement(C)&&(K=i.cloneElement(C,{className:(0,a.A)(U.icon,C.props.className)})),(0,u.jsxs)(x,(0,o.A)({as:H,className:(0,a.A)(U.root,c),disabled:!(!F||!k)||void 0,onClick:T,onKeyDown:e=>{e.currentTarget===e.target&&E(e)&&e.preventDefault(),_&&_(e)},onKeyUp:e=>{e.currentTarget===e.target&&(R&&E(e)?R(e):"Escape"===e.key&&B.current&&B.current.blur()),M&&M(e)},ref:z,tabIndex:L&&k?-1:j,ownerState:W},V,N,{children:[q||K,(0,u.jsx)(S,{className:(0,a.A)(U.label),ownerState:W,children:O}),G]}))}))},25329:(e,t,n)=>{"use strict";t.A=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}(n(9950)),o=n(28843);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}t.A=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=r.useContext(o.ThemeContext);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}},25333:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(3484),l=n(99269),c=n(59254),u=n(18463),d=n(24184),f=n(89548),p=n(45558),h=n(1614);function m(e){return(0,h.Ay)("MuiIconButton",e)}const g=(0,p.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);var v=n(44414);const y=["edge","children","className","color","disabled","disableFocusRipple","size"],b=(0,c.Ay)(d.A,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t["color".concat((0,f.A)(n.color))],n.edge&&t["edge".concat((0,f.A)(n.edge))],t["size".concat((0,f.A)(n.size))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})}),(e=>{let{theme:t,ownerState:n}=e;var r;const i=null==(r=(t.vars||t).palette)?void 0:r[n.color];return(0,o.A)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,o.A)({color:null==i?void 0:i.main},!n.disableRipple&&{"&:hover":(0,o.A)({},i&&{backgroundColor:t.vars?"rgba(".concat(i.mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.X4)(i.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{["&.".concat(g.disabled)]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})})),w=i.forwardRef((function(e,t){const n=(0,u.b)({props:e,name:"MuiIconButton"}),{edge:i=!1,children:l,className:c,color:d="default",disabled:p=!1,disableFocusRipple:h=!1,size:g="medium"}=n,w=(0,r.A)(n,y),A=(0,o.A)({},n,{edge:i,color:d,disabled:p,disableFocusRipple:h,size:g}),x=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,a={root:["root",n&&"disabled","default"!==r&&"color".concat((0,f.A)(r)),o&&"edge".concat((0,f.A)(o)),"size".concat((0,f.A)(i))]};return(0,s.A)(a,m,t)})(A);return(0,v.jsx)(b,(0,o.A)({className:(0,a.A)(x.root,c),centerRipple:!0,focusRipple:!h,disabled:p,ref:t},w,{ownerState:A,children:l}))}))},26562:(e,t,n)=>{"use strict";function r(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}n.d(t,{A:()=>r})},26590:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,n))}},26598:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e,t,n){return"function"===typeof e?e(t,n):e}},26910:(e,t,n)=>{"use strict";n.d(t,{A:()=>Mt});var r={};function o(e,t){return function(){return e.apply(t,arguments)}}n.r(r),n.d(r,{hasBrowserEnv:()=>fe,hasStandardBrowserEnv:()=>he,hasStandardBrowserWebWorkerEnv:()=>me,navigator:()=>pe,origin:()=>ge});var i=n(85224);const{toString:a}=Object.prototype,{getPrototypeOf:s}=Object,l=(c=Object.create(null),e=>{const t=a.call(e);return c[t]||(c[t]=t.slice(8,-1).toLowerCase())});var c;const u=e=>(e=e.toLowerCase(),t=>l(t)===e),d=e=>t=>typeof t===e,{isArray:f}=Array,p=d("undefined");const h=u("ArrayBuffer");const m=d("string"),g=d("function"),v=d("number"),y=e=>null!==e&&"object"===typeof e,b=e=>{if("object"!==l(e))return!1;const t=s(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},w=u("Date"),A=u("File"),x=u("Blob"),S=u("FileList"),E=u("URLSearchParams"),[k,C,O,T]=["ReadableStream","Request","Response","Headers"].map(u);function R(e,t){let n,r,{allOwnKeys:o=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),f(e))for(n=0,r=e.length;n0;)if(r=n[o],t===r.toLowerCase())return r;return null}const M="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,P=e=>!p(e)&&e!==M;const I=(j="undefined"!==typeof Uint8Array&&s(Uint8Array),e=>j&&e instanceof j);var j;const L=u("HTMLFormElement"),N=(e=>{let{hasOwnProperty:t}=e;return(e,n)=>t.call(e,n)})(Object.prototype),B=u("RegExp"),z=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};R(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},D="abcdefghijklmnopqrstuvwxyz",F="0123456789",H={DIGIT:F,ALPHA:D,ALPHA_DIGIT:D+D.toUpperCase()+F};const W=u("AsyncFunction"),U=((e,t)=>{return e?setImmediate:t?(n="axios@".concat(Math.random()),r=[],M.addEventListener("message",(e=>{let{source:t,data:o}=e;t===M&&o===n&&r.length&&r.shift()()}),!1),e=>{r.push(e),M.postMessage(n,"*")}):e=>setTimeout(e);var n,r})("function"===typeof setImmediate,g(M.postMessage)),V="undefined"!==typeof queueMicrotask?queueMicrotask.bind(M):"undefined"!==typeof i&&i.nextTick||U,G={isArray:f,isArrayBuffer:h,isBuffer:function(e){return null!==e&&!p(e)&&null!==e.constructor&&!p(e.constructor)&&g(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||g(e.append)&&("formdata"===(t=l(e))||"object"===t&&g(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer),t},isString:m,isNumber:v,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:b,isReadableStream:k,isRequest:C,isResponse:O,isHeaders:T,isUndefined:p,isDate:w,isFile:A,isBlob:x,isRegExp:B,isFunction:g,isStream:e=>y(e)&&g(e.pipe),isURLSearchParams:E,isTypedArray:I,isFileList:S,forEach:R,merge:function e(){const{caseless:t}=P(this)&&this||{},n={},r=(r,o)=>{const i=t&&_(n,o)||o;b(n[i])&&b(r)?n[i]=e(n[i],r):b(r)?n[i]=e({},r):f(r)?n[i]=r.slice():n[i]=r};for(let o=0,i=arguments.length;o3&&void 0!==arguments[3]?arguments[3]:{};return R(t,((t,r)=>{n&&g(t)?e[r]=o(t,n):e[r]=t}),{allOwnKeys:r}),e},trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const l={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:u,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!v(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:L,hasOwnProperty:N,hasOwnProp:N,reduceDescriptors:z,freezeMethods:e=>{z(e,((t,n)=>{if(g(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];g(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return f(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:_,global:M,isContextDefined:P,ALPHABET:H,generateString:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H.ALPHA_DIGIT,n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&g(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=f(e)?[]:{};return R(e,((e,t)=>{const i=n(e,r+1);!p(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:W,isThenable:e=>e&&(y(e)||g(e))&&g(e.then)&&g(e.catch),setImmediate:U,asap:V};function q(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}G.inherits(q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.status}}});const K=q.prototype,X={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{X[e]={value:e}})),Object.defineProperties(q,X),Object.defineProperty(K,"isAxiosError",{value:!0}),q.from=(e,t,n,r,o,i)=>{const a=Object.create(K);return G.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),q.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const Y=q;var Q=n(93325).hp;function Z(e){return G.isPlainObject(e)||G.isArray(e)}function J(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function $(e,t,n){return e?e.concat(t).map((function(e,t){return e=J(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const ee=G.toFlatObject(G,{},null,(function(e){return/^is[A-Z]/.test(e)}));const te=function(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!G.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!==typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(!s&&G.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(e)||G.isTypedArray(e)?s&&"function"===typeof Blob?new Blob([e]):Q.from(e):e}function c(e,n,o){let s=e;if(e&&!o&&"object"===typeof e)if(G.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(G.isArray(e)&&function(e){return G.isArray(e)&&!e.some(Z)}(e)||(G.isFileList(e)||G.endsWith(n,"[]"))&&(s=G.toArray(e)))return n=J(n),s.forEach((function(e,r){!G.isUndefined(e)&&null!==e&&t.append(!0===a?$([n],r,i):null===a?n:n+"[]",l(e))})),!1;return!!Z(e)||(t.append($(o,n,i),l(e)),!1)}const u=[],d=Object.assign(ee,{defaultVisitor:c,convertValue:l,isVisitable:Z});if(!G.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!G.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),G.forEach(n,(function(n,i){!0===(!(G.isUndefined(n)||null===n)&&o.call(t,n,G.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),u.pop()}}(e),t};function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function re(e,t){this._pairs=[],e&&te(e,this,t)}const oe=re.prototype;oe.append=function(e,t){this._pairs.push([e,t])},oe.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ie=re;function ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function se(e,t,n){if(!t)return e;const r=n&&n.encode||ae;G.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):G.isURLSearchParams(t)?t.toString():new ie(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const le=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){G.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var ue=n(89379);const de={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:ie,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},fe="undefined"!==typeof window&&"undefined"!==typeof document,pe="object"===typeof navigator&&navigator||void 0,he=fe&&(!pe||["ReactNative","NativeScript","NS"].indexOf(pe.product)<0),me="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,ge=fe&&window.location.href||"http://localhost",ve=(0,ue.A)((0,ue.A)({},r),de);const ye=function(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&G.isArray(r)?r.length:i,s)return G.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&G.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&G.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r{t(function(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const be={transitional:ce,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=G.isObject(e);o&&G.isHTMLForm(e)&&(e=new FormData(e));if(G.isFormData(e))return r?JSON.stringify(ye(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e)||G.isReadableStream(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new ve.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ve.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=G.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||be.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(G.isResponse(e)||G.isReadableStream(e))return e;if(e&&G.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(o){if(n){if("SyntaxError"===o.name)throw Y.from(o,Y.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ve.classes.FormData,Blob:ve.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],(e=>{be.headers[e]={}}));const we=be,Ae=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xe=Symbol("internals");function Se(e){return e&&String(e).trim().toLowerCase()}function Ee(e){return!1===e||null==e?e:G.isArray(e)?e.map(Ee):String(e)}function ke(e,t,n,r,o){return G.isFunction(r)?r.call(this,t,n):(o&&(t=n),G.isString(t)?G.isString(r)?-1!==t.indexOf(r):G.isRegExp(r)?r.test(t):void 0:void 0)}class Ce{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Se(t);if(!o)throw new Error("header name must be a non-empty string");const i=G.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Ee(e))}const i=(e,t)=>G.forEach(e,((e,n)=>o(e,n,t)));if(G.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(G.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Ae[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(G.isHeaders(e))for(const[a,s]of e.entries())o(s,a,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=Se(e)){const n=G.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(G.isFunction(t))return t.call(this,e,n);if(G.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Se(e)){const n=G.findKey(this,e);return!(!n||void 0===this[n]||t&&!ke(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Se(e)){const o=G.findKey(n,e);!o||t&&!ke(0,n[o],o,t)||(delete n[o],r=!0)}}return G.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ke(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return G.forEach(this,((r,o)=>{const i=G.findKey(n,o);if(i)return t[i]=Ee(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Ee(r),n[a]=!0})),this}concat(){for(var e=arguments.length,t=new Array(e),n=0;n{null!=n&&!1!==n&&(t[r]=e&&G.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((e=>{let[t,n]=e;return t+": "+n})).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e){const t=new this(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;ot.set(e))),t}static accessor(e){const t=(this[xe]=this[xe]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Se(e);t[r]||(!function(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return G.isArray(e)?e.forEach(r):r(e),this}}Ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(Ce.prototype,((e,t)=>{let{value:n}=e,r=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(e){this[r]=e}}})),G.freezeMethods(Ce);const Oe=Ce;function Te(e,t){const n=this||we,r=t||n,o=Oe.from(r.headers);let i=r.data;return G.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Re(e){return!(!e||!e.__CANCEL__)}function _e(e,t,n){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(_e,Y,{__CANCEL__:!0});const Me=_e;function Pe(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Ie=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];o||(o=l),n[i]=s,r[i]=l;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o1&&void 0!==arguments[1]?arguments[1]:Date.now();o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[function(){const e=Date.now(),t=e-o;for(var s=arguments.length,l=new Array(s),c=0;c=i?a(l,e):(n=l,r||(r=setTimeout((()=>{r=null,a(n)}),i-t)))},()=>n&&a(n)]},Le=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0;const o=Ie(50,250);return je((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,l=o(s);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},Ne=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Be=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;re(...n)))},ze=ve.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ve.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ve.origin),ve.navigator&&/(msie|trident)/i.test(ve.navigator.userAgent)):()=>!0,De=ve.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];G.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),G.isString(r)&&a.push("path="+r),G.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Fe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const He=e=>e instanceof Oe?(0,ue.A)({},e):e;function We(e,t){t=t||{};const n={};function r(e,t,n,r){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:r},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function o(e,t,n,o){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!G.isUndefined(t))return r(void 0,t)}function a(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(He(e),He(t),0,!0)};return G.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=l[r]||o,a=i(e[r],t[r],r);G.isUndefined(a)&&i!==s||(n[r]=a)})),n}const Ue=e=>{const t=We({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=Oe.from(s),t.url=se(Fe(t.baseURL,t.url),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),G.isFormData(r))if(ve.hasStandardBrowserEnv||ve.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(ve.hasStandardBrowserEnv&&(o&&G.isFunction(o)&&(o=o(t)),o||!1!==o&&ze(t.url))){const e=i&&a&&De.read(a);e&&s.set(i,e)}return t},Ve="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Ue(e);let o=r.data;const i=Oe.from(r.headers).normalize();let a,s,l,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function h(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=Oe.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Pe((function(e){t(e),h()}),(function(e){n(e),h()}),{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new Y("Request aborted",Y.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new Y("Network Error",Y.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ce;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Y(t,o.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&G.forEach(i.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),G.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([l,u]=Le(p,!0),m.addEventListener("progress",l)),f&&m.upload&&([s,c]=Le(f),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new Me(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);v&&-1===ve.protocols.indexOf(v)?n(new Y("Unsupported protocol "+v+":",Y.ERR_BAD_REQUEST,e)):m.send(o||null)}))},Ge=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Y?t:new Me(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new Y("timeout ".concat(t," of ms exceeded"),Y.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=r;return s.unsubscribe=()=>G.asap(a),s}};function qe(e,t){this.v=e,this.k=t}function Ke(e){return function(){return new Xe(e.apply(this,arguments))}}function Xe(e){var t,n;function r(t,n){try{var i=e[t](n),a=i.value,s=a instanceof qe;Promise.resolve(s?a.v:a).then((function(n){if(s){var l="return"===t?"return":"next";if(!a.k||n.done)return r(l,n);n=e[l](n).value}o(i.done?"return":"normal",n)}),(function(e){r("throw",e)}))}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise((function(i,a){var s={key:e,arg:o,resolve:i,reject:a,next:null};n?n=n.next=s:(t=n=s,r(e,o))}))},"function"!=typeof e.return&&(this.return=void 0)}function Ye(e){return new qe(e,0)}function Qe(e){var t={},n=!1;function r(t,r){return n=!0,r=new Promise((function(n){n(e[t](r))})),{done:!1,value:new qe(r,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):r("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return r("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):r("return",e)}),t}function Ze(e){var t,n,r,o=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);o--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new Je(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Je(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return Je=function(e){this.s=e,this.n=e.next},Je.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new Je(e)}Xe.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Xe.prototype.next=function(e){return this._invoke("next",e)},Xe.prototype.throw=function(e){return this._invoke("throw",e)},Xe.prototype.return=function(e){return this._invoke("return",e)};const $e=function*(e,t){let n=e.byteLength;if(!t||n{const o=et(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw s(t),t}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},rt="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,ot=rt&&"function"===typeof ReadableStream,it=rt&&("function"===typeof TextEncoder?(at=new TextEncoder,e=>at.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var at;const st=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{let e=!1;const t=new Request(ve.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),ct=ot&&st((()=>G.isReadableStream(new Response("").body))),ut={stream:ct&&(e=>e.body)};var dt;rt&&(dt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!ut[e]&&(ut[e]=G.isFunction(dt[e])?t=>t[e]():(t,n)=>{throw new Y("Response type '".concat(e,"' is not supported"),Y.ERR_NOT_SUPPORT,n)})})));const ft=async(e,t)=>{const n=G.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(G.isBlob(e))return e.size;if(G.isSpecCompliantForm(e)){const t=new Request(ve.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return G.isArrayBufferView(e)||G.isArrayBuffer(e)?e.byteLength:(G.isURLSearchParams(e)&&(e+=""),G.isString(e)?(await it(e)).byteLength:void 0)})(t):n},pt={http:null,xhr:Ve,fetch:rt&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=Ue(e);c=c?(c+"").toLowerCase():"text";let p,h=Ge([o,i&&i.toAbortSignal()],a);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(l&<&&"get"!==n&&"head"!==n&&0!==(g=await ft(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(G.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Ne(g,Le(Be(l)));r=nt(n.body,65536,e,t)}}G.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,(0,ue.A)((0,ue.A)({},f),{},{signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:o?d:void 0}));let i=await fetch(p);const a=ct&&("stream"===c||"response"===c);if(ct&&(s||a&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=G.toFiniteNumber(i.headers.get("content-length")),[n,r]=s&&Ne(t,Le(Be(s),!0))||[];i=new Response(nt(i.body,65536,n,(()=>{r&&r(),m&&m()})),e)}c=c||"text";let v=await ut[G.findKey(ut,c)||"text"](i,e);return!a&&m&&m(),await new Promise(((t,n)=>{Pe(t,n,{data:v,headers:Oe.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})}))}catch(v){if(m&&m(),v&&"TypeError"===v.name&&/fetch/i.test(v.message))throw Object.assign(new Y("Network Error",Y.ERR_NETWORK,e,p),{cause:v.cause||v});throw Y.from(v,v&&v.code,e,p)}})};G.forEach(pt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const ht=e=>"- ".concat(e),mt=e=>G.isFunction(e)||null===e||!1===e,gt=e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i{let[t,n]=e;return"adapter ".concat(t," ")+(!1===n?"is not supported by the environment":"is not available in the build")}));let n=t?e.length>1?"since :\n"+e.map(ht).join("\n"):" "+ht(e[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function vt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Me(null,e)}function yt(e){vt(e),e.headers=Oe.from(e.headers),e.data=Te.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return gt(e.adapter||we.adapter)(e).then((function(t){return vt(e),t.data=Te.call(e,e.transformResponse,t),t.headers=Oe.from(t.headers),t}),(function(t){return Re(t)||(vt(e),t&&t.response&&(t.response.data=Te.call(e,e.transformResponse,t.response),t.response.headers=Oe.from(t.response.headers))),Promise.reject(t)}))}const bt="1.7.9",wt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{wt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const At={};wt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.9] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Y(r(o," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!At[o]&&(At[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},wt.spelling=function(e){return(t,n)=>(console.warn("".concat(n," is likely a misspelling of ").concat(e)),!0)};const xt={assertOptions:function(e,t,n){if("object"!==typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new Y("option "+i+" must be "+n,Y.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Y("Unknown option "+i,Y.ERR_BAD_OPTION)}},validators:wt},St=xt.validators;class Et{constructor(e){this.defaults=e,this.interceptors={request:new le,response:new le}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(r){}}throw n}}_request(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},t=We(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&xt.assertOptions(n,{silentJSONParsing:St.transitional(St.boolean),forcedJSONParsing:St.transitional(St.boolean),clarifyTimeoutError:St.transitional(St.boolean)},!1),null!=r&&(G.isFunction(r)?t.paramsSerializer={serialize:r}:xt.assertOptions(r,{encode:St.function,serialize:St.function},!0)),xt.assertOptions(t,{baseUrl:St.spelling("baseURL"),withXsrfToken:St.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&G.merge(o.common,o[t.method]);o&&G.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Oe.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!s){const e=[yt.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Me(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Ct((function(t){e=t})),cancel:e}}}const Ot=Ct;const Tt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Tt).forEach((e=>{let[t,n]=e;Tt[n]=t}));const Rt=Tt;const _t=function e(t){const n=new kt(t),r=o(kt.prototype.request,n);return G.extend(r,kt.prototype,n,{allOwnKeys:!0}),G.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(We(t,n))},r}(we);_t.Axios=kt,_t.CanceledError=Me,_t.CancelToken=Ot,_t.isCancel=Re,_t.VERSION=bt,_t.toFormData=te,_t.AxiosError=Y,_t.Cancel=_t.CanceledError,_t.all=function(e){return Promise.all(e)},_t.spread=function(e){return function(t){return e.apply(null,t)}},_t.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},_t.mergeConfig=We,_t.AxiosHeaders=Oe,_t.formToJSON=e=>ye(G.isHTMLForm(e)?new FormData(e):e),_t.getAdapter=gt,_t.HttpStatusCode=Rt,_t.default=_t;const Mt=_t},27402:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(61262).A},27800:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(43145);function o(e,t){if(e){if("string"==typeof e)return(0,r.A)(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.A)(e,t):void 0}}},28286:(e,t,n)=>{"use strict";n.d(t,{EU:()=>s,NI:()=>a,iZ:()=>c,kW:()=>u,vf:()=>l,zu:()=>o});var r=n(22382);const o={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:e=>"@media (min-width:".concat(o[e],"px)")};function a(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||i;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"===typeof t){const e=r.breakpoints||i;return Object.keys(t).reduce(((r,i)=>{if(-1!==Object.keys(e.values||o).indexOf(i)){r[e.up(i)]=n(t[i],i)}else{const e=i;r[e]=t[e]}return r}),{})}return n(t)}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}function l(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function c(e){const t=s(e);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i(0,r.A)(e,t)),{});return l(Object.keys(t),a)}function u(e){let{values:t,breakpoints:n,base:r}=e;const o=r||function(e,t){if("object"!==typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r{null!=e[t]&&(n[t]=!0)})),n}(t,n),i=Object.keys(o);if(0===i.length)return t;let a;return i.reduce(((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[a],a=r):"object"===typeof t?(e[n]=null!=t[n]?t[n]:t[a],a=n):e[n]=t,e)),{})}},28429:(e,t,n)=>{"use strict";var r;n.d(t,{$P:()=>p,Ix:()=>N,V8:()=>j,Ye:()=>w,Zp:()=>v,jb:()=>c,sv:()=>L,x$:()=>b,zy:()=>m});var o=n(9950),i=n(1018);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current=!0})),o.useCallback((function(r,o){void 0===o&&(o={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,a({fromRouteId:t},o)))}),[e,t])}():function(){h()||(0,i.Oi)(!1);let e=o.useContext(s),{basename:t,future:n,navigator:r}=o.useContext(c),{matches:a}=o.useContext(d),{pathname:l}=m(),u=JSON.stringify((0,i.yD)(a,n.v7_relativeSplatPath)),f=o.useRef(!1);return g((()=>{f.current=!0})),o.useCallback((function(n,o){if(void 0===o&&(o={}),!f.current)return;if("number"===typeof n)return void r.go(n);let a=(0,i.Gh)(n,JSON.parse(u),l,"path"===o.relative);null==e&&"/"!==t&&(a.pathname="/"===a.pathname?t:(0,i.HS)([t,a.pathname])),(o.replace?r.replace:r.push)(a,o.state,o)}),[t,r,u,l,e])}()}const y=o.createContext(null);function b(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=o.useContext(c),{matches:a}=o.useContext(d),{pathname:s}=m(),l=JSON.stringify((0,i.yD)(a,r.v7_relativeSplatPath));return o.useMemo((()=>(0,i.Gh)(e,JSON.parse(l),s,"path"===n)),[e,l,s,n])}function w(e,t){return A(e,t)}function A(e,t,n,r){h()||(0,i.Oi)(!1);let{navigator:s,static:l}=o.useContext(c),{matches:f}=o.useContext(d),p=f[f.length-1],g=p?p.params:{},v=(p&&p.pathname,p?p.pathnameBase:"/");p&&p.route;let y,b=m();if(t){var w;let e="string"===typeof t?(0,i.Rr)(t):t;"/"===v||(null==(w=e.pathname)?void 0:w.startsWith(v))||(0,i.Oi)(!1),y=e}else y=b;let A=y.pathname||"/",x=A;if("/"!==v){let e=v.replace(/^\//,"").split("/");x="/"+A.replace(/^\//,"").split("/").slice(e.length).join("/")}let S=!l&&n&&n.matches&&n.matches.length>0?n.matches:(0,i.ue)(e,{pathname:x});let E=C(S&&S.map((e=>Object.assign({},e,{params:Object.assign({},g,e.params),pathname:(0,i.HS)([v,s.encodeLocation?s.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?v:(0,i.HS)([v,s.encodeLocation?s.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),f,n,r);return t&&E?o.createElement(u.Provider,{value:{location:a({pathname:"/",search:"",hash:"",state:null,key:"default"},y),navigationType:i.rc.Pop}},E):E}function x(){let e=function(){var e;let t=o.useContext(f),n=_(T.UseRouteError),r=M(T.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=(0,i.pX)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r};return o.createElement(o.Fragment,null,o.createElement("h2",null,"Unexpected Application Error!"),o.createElement("h3",{style:{fontStyle:"italic"}},t),n?o.createElement("pre",{style:a},n):null,null)}const S=o.createElement(x,null);class E extends o.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?o.createElement(d.Provider,{value:this.props.routeContext},o.createElement(f.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function k(e){let{routeContext:t,match:n,children:r}=e,i=o.useContext(s);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),o.createElement(d.Provider,{value:t},r)}function C(e,t,n,r){var a;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var s;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(s=r)&&s.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let l=e,c=null==(a=n)?void 0:a.errors;if(null!=c){let e=l.findIndex((e=>e.route.id&&void 0!==(null==c?void 0:c[e.route.id])));e>=0||(0,i.Oi)(!1),l=l.slice(0,Math.min(l.length,e+1))}let u=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let o=0;o=0?l.slice(0,d+1):[l[0]];break}}}return l.reduceRight(((e,r,i)=>{let a,s=!1,f=null,p=null;var h;n&&(a=c&&r.route.id?c[r.route.id]:void 0,f=r.route.errorElement||S,u&&(d<0&&0===i?(h="route-fallback",!1||P[h]||(P[h]=!0),s=!0,p=null):d===i&&(s=!0,p=r.route.hydrateFallbackElement||null)));let m=t.concat(l.slice(0,i+1)),g=()=>{let t;return t=a?f:s?p:r.route.Component?o.createElement(r.route.Component,null):r.route.element?r.route.element:e,o.createElement(k,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?o.createElement(E,{location:n.location,revalidation:n.revalidation,component:f,error:a,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()}),null)}var O=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(O||{}),T=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(T||{});function R(e){let t=o.useContext(s);return t||(0,i.Oi)(!1),t}function _(e){let t=o.useContext(l);return t||(0,i.Oi)(!1),t}function M(e){let t=function(){let e=o.useContext(d);return e||(0,i.Oi)(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||(0,i.Oi)(!1),n.route.id}const P={};const I=(e,t,n)=>{};function j(e,t){void 0===(null==e?void 0:e.v7_startTransition)&&I("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),void 0!==(null==e?void 0:e.v7_relativeSplatPath)||t&&t.v7_relativeSplatPath||I("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(void 0===t.v7_fetcherPersist&&I("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),void 0===t.v7_normalizeFormMethod&&I("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),void 0===t.v7_partialHydration&&I("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),void 0===t.v7_skipActionErrorRevalidation&&I("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}(r||(r=n.t(o,2))).startTransition;function L(e){return function(e){let t=o.useContext(d).outlet;return t?o.createElement(y.Provider,{value:e},t):t}(e.context)}function N(e){let{basename:t="/",children:n=null,location:r,navigationType:s=i.rc.Pop,navigator:l,static:d=!1,future:f}=e;h()&&(0,i.Oi)(!1);let p=t.replace(/^\/*/,"/"),m=o.useMemo((()=>({basename:p,navigator:l,static:d,future:a({v7_relativeSplatPath:!1},f)})),[p,f,l,d]);"string"===typeof r&&(r=(0,i.Rr)(r));let{pathname:g="/",search:v="",hash:y="",state:b=null,key:w="default"}=r,A=o.useMemo((()=>{let e=(0,i.pb)(g,p);return null==e?null:{location:{pathname:e,search:v,hash:y,state:b,key:w},navigationType:s}}),[p,g,v,y,b,w,s]);return null==A?null:o.createElement(c.Provider,{value:m},o.createElement(u.Provider,{children:n,value:A}))}new Promise((()=>{}));o.Component},28555:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9950).createContext(null)},28807:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,extendSxProp:()=>o.A,unstable_createStyleFunctionSx:()=>r.k,unstable_defaultSxConfig:()=>i.A});var r=n(70505),o=n(80237),i=n(98076)},28810:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var r=n(58168),o=n(98587),i=n(9950),a=n(72004),s=n(13292),l=n(3484),c=n(70134);const u=function(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=(0,s.A)({badgeContent:t,max:r});let a=n;!1!==n||0!==t||o||(a=!0);const{badgeContent:l,max:c=r}=a?i:e;return{badgeContent:l,invisible:a,max:c,displayValue:l&&Number(l)>c?"".concat(c,"+"):l}};var d=n(59254),f=n(18463),p=n(89548),h=n(45558),m=n(1614);function g(e){return(0,m.Ay)("MuiBadge",e)}const v=(0,h.A)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]);var y=n(44414);const b=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],w=(0,d.Ay)("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),A=(0,d.Ay)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t["anchorOrigin".concat((0,p.A)(n.anchorOrigin.vertical)).concat((0,p.A)(n.anchorOrigin.horizontal)).concat((0,p.A)(n.overlap))],"default"!==n.color&&t["color".concat((0,p.A)(n.color))],n.invisible&&t.invisible]}})((e=>{let{theme:t}=e;var n;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen}),variants:[...Object.keys((null!=(n=t.vars)?n:t).palette).filter((e=>{var n,r;return(null!=(n=t.vars)?n:t).palette[e].main&&(null!=(r=t.vars)?r:t).palette[e].contrastText})).map((e=>({props:{color:e},style:{backgroundColor:(t.vars||t).palette[e].main,color:(t.vars||t).palette[e].contrastText}}))),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",["&.".concat(v.invisible)]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})}}]}})),x=i.forwardRef((function(e,t){var n,i,d,h,m,v;const x=(0,f.b)({props:e,name:"MuiBadge"}),{anchorOrigin:S={vertical:"top",horizontal:"right"},className:E,component:k,components:C={},componentsProps:O={},children:T,overlap:R="rectangular",color:_="default",invisible:M=!1,max:P=99,badgeContent:I,slots:j,slotProps:L,showZero:N=!1,variant:B="standard"}=x,z=(0,o.A)(x,b),{badgeContent:D,invisible:F,max:H,displayValue:W}=u({max:P,invisible:M,badgeContent:I,showZero:N}),U=(0,s.A)({anchorOrigin:S,color:_,overlap:R,variant:B,badgeContent:I}),V=F||null==D&&"dot"!==B,{color:G=_,overlap:q=R,anchorOrigin:K=S,variant:X=B}=V?U:x,Y="dot"!==X?W:void 0,Q=(0,r.A)({},x,{badgeContent:D,invisible:V,max:H,displayValue:Y,showZero:N,anchorOrigin:K,color:G,overlap:q,variant:X}),Z=(e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,r&&"invisible","anchorOrigin".concat((0,p.A)(n.vertical)).concat((0,p.A)(n.horizontal)),"anchorOrigin".concat((0,p.A)(n.vertical)).concat((0,p.A)(n.horizontal)).concat((0,p.A)(o)),"overlap".concat((0,p.A)(o)),"default"!==t&&"color".concat((0,p.A)(t))]};return(0,l.A)(s,g,a)})(Q),J=null!=(n=null!=(i=null==j?void 0:j.root)?i:C.Root)?n:w,$=null!=(d=null!=(h=null==j?void 0:j.badge)?h:C.Badge)?d:A,ee=null!=(m=null==L?void 0:L.root)?m:O.root,te=null!=(v=null==L?void 0:L.badge)?v:O.badge,ne=(0,c.A)({elementType:J,externalSlotProps:ee,externalForwardedProps:z,additionalProps:{ref:t,as:k},ownerState:Q,className:(0,a.A)(null==ee?void 0:ee.className,Z.root,E)}),re=(0,c.A)({elementType:$,externalSlotProps:te,ownerState:Q,className:(0,a.A)(Z.badge,null==te?void 0:te.className)});return(0,y.jsxs)(J,(0,r.A)({},ne,{children:[T,(0,y.jsx)($,(0,r.A)({},re,{children:Y}))]}))}))},28843:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GlobalStyles:()=>A.A,StyledEngineProvider:()=>w.A,ThemeContext:()=>s.T,css:()=>b.AH,default:()=>x,internal_processStyles:()=>S,keyframes:()=>b.i7});var r=n(9950),o=n(58168);var i=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;const a=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return i.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var s=n(70151),l=n(71783),c=n(24386),u=n(96477),d=a,f=function(e){return"theme"!==e},p=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?d:f},h=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;(0,l.SF)(t,n,r);(0,u.s)((function(){return(0,l.sk)(t,n,r)}));return null};const g=function e(t,n){var i,a,u=t.__emotion_real===t,d=u&&t.__emotion_base||t;void 0!==n&&(i=n.label,a=n.target);var f=h(t,n,u),g=f||p(d),v=!g("as");return function(){var y=arguments,b=u&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&b.push("label:"+i+";"),null==y[0]||void 0===y[0].raw)b.push.apply(b,y);else{0,b.push(y[0][0]);for(var w=y.length,A=1;A{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},29120:(e,t,n)=>{"use strict";n.d(t,{A:()=>L});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(3484),l=n(70134),c=n(98370),u=n(96039),d=n(59254),f=n(18463),p=n(55158),h=n(49456),m=n(61262),g=n(59520),v=n(21538),y=n(12620),b=n(89222),w=n(52478);function A(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function x(e){return parseInt((0,b.A)(e).getComputedStyle(e).paddingRight,10)||0}function S(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&A(e,o)}))}function E(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function k(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,m.A)(e);return t.body===e?(0,b.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=(0,w.A)((0,m.A)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight="".concat(x(r)+e,"px");const t=(0,m.A)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight="".concat(x(t)+e,"px")}))}let e;if(r.parentNode instanceof DocumentFragment)e=(0,m.A)(r).body;else{const t=r.parentElement,n=(0,b.A)(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((e=>{let{value:t,el:n,property:r}=e;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}const C=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&A(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);S(t,e.mount,e.modalRef,r,!0);const o=E(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=E(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=k(r,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.modals.indexOf(e);if(-1===n)return n;const r=E(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&A(e.modalRef,t),S(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&A(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const O=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:a=C,closeAfterTransition:s=!1,onTransitionEnter:l,onTransitionExited:c,children:u,onClose:d,open:f,rootRef:p}=e,b=i.useRef({}),w=i.useRef(null),x=i.useRef(null),S=(0,h.A)(x,p),[E,k]=i.useState(!f),O=function(e){return!!e&&e.props.hasOwnProperty("in")}(u);let T=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(T=!1);const R=()=>(b.current.modalRef=x.current,b.current.mount=w.current,b.current),_=()=>{a.mount(R(),{disableScrollLock:r}),x.current&&(x.current.scrollTop=0)},M=(0,g.A)((()=>{const e=function(e){return"function"===typeof e?e():e}(t)||(0,m.A)(w.current).body;a.add(R(),e),x.current&&_()})),P=i.useCallback((()=>a.isTopModal(R())),[a]),I=(0,g.A)((e=>{w.current=e,e&&(f&&P()?_():x.current&&A(x.current,T))})),j=i.useCallback((()=>{a.remove(R(),T)}),[T,a]);i.useEffect((()=>()=>{j()}),[j]),i.useEffect((()=>{f?M():O&&s||j()}),[f,j,O,s,M]);const L=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&P()&&(n||(t.stopPropagation(),d&&d(t,"escapeKeyDown")))},N=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&d&&d(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,y.A)(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=(0,o.A)({},n,t);return(0,o.A)({role:"presentation"},r,{onKeyDown:L(r),ref:S})},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.A)({"aria-hidden":!0},e,{onClick:N(e),open:f})},getTransitionProps:()=>({onEnter:(0,v.A)((()=>{k(!1),l&&l()}),null==u?void 0:u.props.onEnter),onExited:(0,v.A)((()=>{k(!0),c&&c(),s&&j()}),null==u?void 0:u.props.onExited)}),rootRef:S,portalRef:I,isTopModal:P,exited:E,hasTransition:O}};var T=n(45558),R=n(1614);function _(e){return(0,R.Ay)("MuiModal",e)}(0,T.A)("MuiModal",["root","hidden","backdrop"]);var M=n(44414);const P=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],I=(0,d.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})})),j=(0,d.Ay)(p.A,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),L=i.forwardRef((function(e,t){var n,d,p,h,m,g;const v=(0,f.b)({name:"MuiModal",props:e}),{BackdropComponent:y=j,BackdropProps:b,className:w,closeAfterTransition:A=!1,children:x,container:S,component:E,components:k={},componentsProps:C={},disableAutoFocus:T=!1,disableEnforceFocus:R=!1,disableEscapeKeyDown:L=!1,disablePortal:N=!1,disableRestoreFocus:B=!1,disableScrollLock:z=!1,hideBackdrop:D=!1,keepMounted:F=!1,onBackdropClick:H,open:W,slotProps:U,slots:V}=v,G=(0,r.A)(v,P),q=(0,o.A)({},v,{closeAfterTransition:A,disableAutoFocus:T,disableEnforceFocus:R,disableEscapeKeyDown:L,disablePortal:N,disableRestoreFocus:B,disableScrollLock:z,hideBackdrop:D,keepMounted:F}),{getRootProps:K,getBackdropProps:X,getTransitionProps:Y,portalRef:Q,isTopModal:Z,exited:J,hasTransition:$}=O((0,o.A)({},q,{rootRef:t})),ee=(0,o.A)({},q,{exited:J}),te=(e=>{const{open:t,exited:n,classes:r}=e,o={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,s.A)(o,_,r)})(ee),ne={};if(void 0===x.props.tabIndex&&(ne.tabIndex="-1"),$){const{onEnter:e,onExited:t}=Y();ne.onEnter=e,ne.onExited=t}const re=null!=(n=null!=(d=null==V?void 0:V.root)?d:k.Root)?n:I,oe=null!=(p=null!=(h=null==V?void 0:V.backdrop)?h:k.Backdrop)?p:y,ie=null!=(m=null==U?void 0:U.root)?m:C.root,ae=null!=(g=null==U?void 0:U.backdrop)?g:C.backdrop,se=(0,l.A)({elementType:re,externalSlotProps:ie,externalForwardedProps:G,getSlotProps:K,additionalProps:{ref:t,as:E},ownerState:ee,className:(0,a.A)(w,null==ie?void 0:ie.className,null==te?void 0:te.root,!ee.open&&ee.exited&&(null==te?void 0:te.hidden))}),le=(0,l.A)({elementType:oe,externalSlotProps:ae,additionalProps:b,getSlotProps:e=>X((0,o.A)({},e,{onClick:t=>{H&&H(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,a.A)(null==ae?void 0:ae.className,null==b?void 0:b.className,null==te?void 0:te.backdrop),ownerState:ee});return F||W||$&&!J?(0,M.jsx)(u.A,{ref:Q,container:S,disablePortal:N,children:(0,M.jsxs)(re,(0,o.A)({},se,{children:[!D&&y?(0,M.jsx)(oe,(0,o.A)({},le)):null,(0,M.jsx)(c.A,{disableEnforceFocus:R,disableAutoFocus:T,disableRestoreFocus:B,isEnabled:Z,open:W,children:i.cloneElement(x,ne)})]}))}):null}))},30086:(e,t,n)=>{"use strict";function r(e,t){const n=this;if(n.vars&&"function"===typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}n.d(t,{A:()=>r})},30099:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});n(9950);var r=n(23235),o=n(44414);const i=(0,r.A)((0,o.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")},31014:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(95014).A},31506:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(49456).A},31761:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0>>1,o=e[r];if(!(0>>1;ri(l,n))ci(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(ci(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,f=null,p=3,h=!1,m=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function A(e){if(g=!1,w(e),!m)if(null!==r(c))m=!0,I(x);else{var t=r(u);null!==t&&j(A,t.startTime-e)}}function x(e,n){m=!1,g&&(g=!1,y(C),C=-1),h=!0;var i=p;try{for(w(n),f=r(c);null!==f&&(!(f.expirationTime>n)||e&&!R());){var a=f.callback;if("function"===typeof a){f.callback=null,p=f.priorityLevel;var s=a(f.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?f.callback=s:f===r(c)&&o(c),w(n)}else o(c);f=r(c)}if(null!==f)var l=!0;else{var d=r(u);null!==d&&j(A,d.startTime-n),l=!1}return l}finally{f=null,p=i,h=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,E=!1,k=null,C=-1,O=5,T=-1;function R(){return!(t.unstable_now()-Te||125a?(e.sortIndex=i,n(u,e),null===r(c)&&e===r(u)&&(g?(y(C),C=-1):g=!0,j(A,i-a))):(e.sortIndex=s,n(c,e),m||h||(m=!0,I(x))),e},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},32049:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var w=b.prototype=new y;w.constructor=b,m(w,v.prototype),w.isPureReactComponent=!0;var A=Array.isArray,x=Object.prototype.hasOwnProperty,S={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,r){var o,i={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)x.call(t,o)&&!E.hasOwnProperty(o)&&(i[o]=t[o]);var l=arguments.length-2;if(1===l)i.children=r;else if(1{"use strict";n.d(t,{Ay:()=>a});const r=e=>e,o=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})(),i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const r=i[t];return r?"".concat(n,"-").concat(r):"".concat(o.generate(e),"-").concat(t)}},32654:(e,t,n)=>{"use strict";var r=n(9950),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},33158:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});n(9950);var r=n(88283),o=n(44414);function i(e){const{styles:t,defaultTheme:n={}}=e,i="function"===typeof t?e=>{return t(void 0===(r=e)||null===r||0===Object.keys(r).length?n:e);var r}:t;return(0,o.jsx)(r.mL,{styles:i})}},33738:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var r=n(98587),o=n(58168),i=n(9950),a=n(72004),s=n(67279),l=n(38528),c=n(3484),u=n(59254),d=n(18463),f=n(75361),p=n(70576),h=n(14857),m=n(31506),g=n(45558),v=n(1614);function y(e){return(0,v.Ay)("MuiCollapse",e)}(0,g.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var b=n(44414);const w=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],A=(0,u.Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({height:0,overflow:"hidden",transition:t.transitions.create("height")},"horizontal"===n.orientation&&{height:"auto",width:0,transition:t.transitions.create("width")},"entered"===n.state&&(0,o.A)({height:"auto",overflow:"visible"},"horizontal"===n.orientation&&{width:"auto"}),"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&{visibility:"hidden"})})),x=(0,u.Ay)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})((e=>{let{ownerState:t}=e;return(0,o.A)({display:"flex",width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),S=(0,u.Ay)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})((e=>{let{ownerState:t}=e;return(0,o.A)({width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),E=i.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiCollapse"}),{addEndListener:u,children:g,className:v,collapsedSize:E="0px",component:k,easing:C,in:O,onEnter:T,onEntered:R,onEntering:_,onExit:M,onExited:P,onExiting:I,orientation:j="vertical",style:L,timeout:N=f.p0.standard,TransitionComponent:B=s.Ay}=n,z=(0,r.A)(n,w),D=(0,o.A)({},n,{orientation:j,collapsedSize:E}),F=(e=>{const{orientation:t,classes:n}=e,r={root:["root","".concat(t)],entered:["entered"],hidden:["hidden"],wrapper:["wrapper","".concat(t)],wrapperInner:["wrapperInner","".concat(t)]};return(0,c.A)(r,y,n)})(D),H=(0,h.A)(),W=(0,l.A)(),U=i.useRef(null),V=i.useRef(),G="number"===typeof E?"".concat(E,"px"):E,q="horizontal"===j,K=q?"width":"height",X=i.useRef(null),Y=(0,m.A)(t,X),Q=e=>t=>{if(e){const n=X.current;void 0===t?e(n):e(n,t)}},Z=()=>U.current?U.current[q?"clientWidth":"clientHeight"]:0,J=Q(((e,t)=>{U.current&&q&&(U.current.style.position="absolute"),e.style[K]=G,T&&T(e,t)})),$=Q(((e,t)=>{const n=Z();U.current&&q&&(U.current.style.position="");const{duration:r,easing:o}=(0,p.c)({style:L,timeout:N,easing:C},{mode:"enter"});if("auto"===N){const t=H.transitions.getAutoHeightDuration(n);e.style.transitionDuration="".concat(t,"ms"),V.current=t}else e.style.transitionDuration="string"===typeof r?r:"".concat(r,"ms");e.style[K]="".concat(n,"px"),e.style.transitionTimingFunction=o,_&&_(e,t)})),ee=Q(((e,t)=>{e.style[K]="auto",R&&R(e,t)})),te=Q((e=>{e.style[K]="".concat(Z(),"px"),M&&M(e)})),ne=Q(P),re=Q((e=>{const t=Z(),{duration:n,easing:r}=(0,p.c)({style:L,timeout:N,easing:C},{mode:"exit"});if("auto"===N){const n=H.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(n,"ms"),V.current=n}else e.style.transitionDuration="string"===typeof n?n:"".concat(n,"ms");e.style[K]=G,e.style.transitionTimingFunction=r,I&&I(e)}));return(0,b.jsx)(B,(0,o.A)({in:O,onEnter:J,onEntered:ee,onEntering:$,onExit:te,onExited:ne,onExiting:re,addEndListener:e=>{"auto"===N&&W.start(V.current||0,e),u&&u(X.current,e)},nodeRef:X,timeout:"auto"===N?null:N},z,{children:(e,t)=>(0,b.jsx)(A,(0,o.A)({as:k,className:(0,a.A)(F.root,v,{entered:F.entered,exited:!O&&"0px"===G&&F.hidden}[e]),style:(0,o.A)({[q?"minWidth":"minHeight"]:G},L),ref:Y},t,{ownerState:(0,o.A)({},D,{state:e}),children:(0,b.jsx)(x,{ownerState:(0,o.A)({},D,{state:e}),className:F.wrapper,ref:U,children:(0,b.jsx)(S,{ownerState:(0,o.A)({},D,{state:e}),className:F.wrapperInner,children:g})})}))}))}));E.muiSupportAuto=!0;const k=E},34378:(e,t,n)=>{var r=n(14759);e.exports=function(){return r.Date.now()}},34677:(e,t,n)=>{"use strict";n.d(t,{Y:()=>l});var r=n(64467);const o=Math.round;function i(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map((e=>parseFloat(e)));for(let o=0;o<3;o+=1)r[o]=t(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const a=(e,t,n)=>0===n?e:e/100;function s(e,t){const n=t||255;return e>n?n:e<0?0:e}class l{constructor(e){function t(t){return t[0]in e&&t[1]in e&&t[2]in e}if((0,r.A)(this,"isValid",!0),(0,r.A)(this,"r",0),(0,r.A)(this,"g",0),(0,r.A)(this,"b",0),(0,r.A)(this,"a",1),(0,r.A)(this,"_h",void 0),(0,r.A)(this,"_s",void 0),(0,r.A)(this,"_l",void 0),(0,r.A)(this,"_v",void 0),(0,r.A)(this,"_max",void 0),(0,r.A)(this,"_min",void 0),(0,r.A)(this,"_brightness",void 0),e)if("string"===typeof e){const n=e.trim();function o(e){return n.startsWith(e)}/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):o("rgb")?this.fromRgbString(n):o("hsl")?this.fromHslString(n):(o("hsv")||o("hsb"))&&this.fromHsvString(n)}else if(e instanceof l)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=s(e.r),this.g=s(e.g),this.b=s(e.b),this.a="number"===typeof e.a?s(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else{if(!t("hsv"))throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e));this.fromHsv(e)}else;}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}return.2126*e(this.r)+.7152*e(this.g)+.0722*e(this.b)}getHue(){if("undefined"===typeof this._h){const e=this.getMax()-this.getMin();this._h=0===e?0:o(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g0&&void 0!==arguments[0]?arguments[0]:10;const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:t,s:n,l:r,a:this.a})}lighten(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:t,s:n,l:r,a:this.a})}mix(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;const n=this._c(e),r=t/100,i=e=>(n[e]-this[e])*r+this[e],a={r:o(i("r")),g:o(i("g")),b:o(i("b")),a:o(100*i("a"))/100};return this._c(a)}tint(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this.mix({r:255,g:255,b:255,a:1},e)}shade(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),r=e=>o((this[e]*this.a+t[e]*t.a*(1-this.a))/n);return this._c({r:r("r"),g:r("g"),b:r("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=2===t.length?t:"0"+t;const n=(this.g||0).toString(16);e+=2===n.length?n:"0"+n;const r=(this.b||0).toString(16);if(e+=2===r.length?r:"0"+r,"number"===typeof this.a&&this.a>=0&&this.a<1){const t=o(255*this.a).toString(16);e+=2===t.length?t:"0"+t}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=o(100*this.getSaturation()),n=o(100*this.getLightness());return 1!==this.a?"hsla(".concat(e,",").concat(t,"%,").concat(n,"%,").concat(this.a,")"):"hsl(".concat(e,",").concat(t,"%,").concat(n,"%)")}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return 1!==this.a?"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.a,")"):"rgb(".concat(this.r,",").concat(this.g,",").concat(this.b,")")}toString(){return this.toRgbString()}_sc(e,t,n){const r=this.clone();return r[e]=s(t,n),r}_c(e){return new this.constructor(e)}getMax(){return"undefined"===typeof this._max&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return"undefined"===typeof this._min&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(e,n){return parseInt(t[e]+t[n||e],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl(e){let{h:t,s:n,l:r,a:i}=e;if(this._h=t%360,this._s=n,this._l=r,this.a="number"===typeof i?i:1,n<=0){const e=o(255*r);this.r=e,this.g=e,this.b=e}let a=0,s=0,l=0;const c=t/60,u=(1-Math.abs(2*r-1))*n,d=u*(1-Math.abs(c%2-1));c>=0&&c<1?(a=u,s=d):c>=1&&c<2?(a=d,s=u):c>=2&&c<3?(s=u,l=d):c>=3&&c<4?(s=d,l=u):c>=4&&c<5?(a=d,l=u):c>=5&&c<6&&(a=u,l=d);const f=r-u/2;this.r=o(255*(a+f)),this.g=o(255*(s+f)),this.b=o(255*(l+f))}fromHsv(e){let{h:t,s:n,v:r,a:i}=e;this._h=t%360,this._s=n,this._v=r,this.a="number"===typeof i?i:1;const a=o(255*r);if(this.r=a,this.g=a,this.b=a,n<=0)return;const s=t/60,l=Math.floor(s),c=s-l,u=o(r*(1-n)*255),d=o(r*(1-n*c)*255),f=o(r*(1-n*(1-c))*255);switch(l){case 0:this.g=f,this.b=u;break;case 1:this.r=d,this.b=u;break;case 2:this.r=u,this.b=f;break;case 3:this.r=u,this.g=d;break;case 4:this.r=f,this.g=u;break;default:this.g=u,this.b=d}}fromHsvString(e){const t=i(e,a);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=i(e,a);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=i(e,((e,t)=>t.includes("%")?o(e/100*255):e));this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}},34805:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,MR:()=>o,Rg:()=>i,cR:()=>a});const r=(0,n(11359).Z0)({name:"fcm",initialState:{permission:null,token:null},reducers:{setFcmToken(e,t){e.token=t.payload},clearFcmToken(e){e.token=null},setFcmPermission(e,t){e.permission=t.payload}}}),{setFcmToken:o,clearFcmToken:i,setFcmPermission:a}=r.actions,s=r.reducer},36658:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9950);const o=function(e,t){var n,o;return r.isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(o=e.type)||null==(o=o._payload)||null==(o=o.value)?void 0:o.muiName)}},36889:(e,t,n)=>{"use strict";n.d(t,{z1:()=>k,cM:()=>m,u$:()=>V,UA:()=>_,uy:()=>g});var r=n(34677),o=2,i=.16,a=.05,s=.05,l=.15,c=5,u=4,d=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function f(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-o*t:Math.round(e.h)+o*t:n?Math.round(e.h)+o*t:Math.round(e.h)-o*t)<0?r+=360:r>=360&&(r-=360),r}function p(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-i*t:t===u?e.s+i:e.s+a*t)>1&&(r=1),n&&t===c&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(100*r)/100);var r}function h(e,t,n){var r;return r=n?e.v+s*t:e.v-l*t,r=Math.max(0,Math.min(1,r)),Math.round(100*r)/100}function m(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],o=new r.Y(e),i=o.toHsv(),a=c;a>0;a-=1){var s=new r.Y({h:f(i,a,!0),s:p(i,a,!0),v:h(i,a,!0)});n.push(s)}n.push(o);for(var l=1;l<=u;l+=1){var m=new r.Y({h:f(i,l),s:p(i,l),v:h(i,l)});n.push(m)}return"dark"===t.theme?d.map((function(e){var o=e.index,i=e.amount;return new r.Y(t.backgroundColor||"#141414").mix(n[o],i).toHexString()})):n.map((function(e){return e.toHexString()}))}var g={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},v=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];v.primary=v[5];var y=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];y.primary=y[5];var b=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];b.primary=b[5];var w=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];w.primary=w[5];var A=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];A.primary=A[5];var x=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];x.primary=x[5];var S=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];S.primary=S[5];var E=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];E.primary=E[5];var k=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];k.primary=k[5];var C=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];C.primary=C[5];var O=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];O.primary=O[5];var T=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];T.primary=T[5];var R=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];R.primary=R[5];var _={red:v,volcano:y,orange:b,gold:w,yellow:A,lime:x,green:S,cyan:E,blue:k,geekblue:C,purple:O,magenta:T,grey:R},M=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];M.primary=M[5];var P=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];P.primary=P[5];var I=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];I.primary=I[5];var j=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];j.primary=j[5];var L=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];L.primary=L[5];var N=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];N.primary=N[5];var B=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];B.primary=B[5];var z=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];z.primary=z[5];var D=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];D.primary=D[5];var F=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];F.primary=F[5];var H=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];H.primary=H[5];var W=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];W.primary=W[5];var U=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];U.primary=U[5];var V={red:M,volcano:P,orange:I,gold:j,yellow:L,lime:N,green:B,cyan:z,blue:D,geekblue:F,purple:H,magenta:W,grey:U}},37295:(e,t,n)=>{"use strict";var r=n(24994);t.Ay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=m,rootShouldForwardProp:r=h,slotShouldForwardProp:l=h}=e,u=e=>(0,c.default)((0,o.default)({},e,{theme:v((0,o.default)({},e,{defaultTheme:n,themeId:t}))}));return u.__mui_systemSx=!0,function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:d,slot:p,skipVariantsResolver:m,skipSx:w,overridesResolver:A=y(g(p))}=c,x=(0,i.default)(c,f),S=void 0!==m?m:p&&"Root"!==p&&"root"!==p||!1,E=w||!1;let k=h;"Root"===p||"root"===p?k=r:p?k=l:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(k=void 0);const C=(0,a.default)(e,(0,o.default)({shouldForwardProp:k,label:undefined},x)),O=e=>"function"===typeof e&&e.__emotion_real!==e||(0,s.isPlainObject)(e)?r=>b(e,(0,o.default)({},r,{theme:v({theme:r.theme,defaultTheme:n,themeId:t})})):e,T=function(r){let i=O(r);for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l{const r=v((0,o.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[d]||!r.components[d].styleOverrides)return null;const i=r.components[d].styleOverrides,a={};return Object.entries(i).forEach((t=>{let[n,i]=t;a[n]=b(i,(0,o.default)({},e,{theme:r}))})),A(e,a)})),d&&!S&&c.push((e=>{var r;const i=v((0,o.default)({},e,{defaultTheme:n,themeId:t}));return b({variants:null==i||null==(r=i.components)||null==(r=r[d])?void 0:r.variants},(0,o.default)({},e,{theme:i}))})),E||c.push(u);const f=c.length-s.length;if(Array.isArray(r)&&f>0){const e=new Array(f).fill("");i=[...r,...e],i.raw=[...r.raw,...e]}const p=C(i,...c);return e.muiName&&(p.muiName=e.muiName),p};return C.withConfig&&(T.withConfig=C.withConfig),T}};var o=r(n(94634)),i=r(n(54893)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(28843)),s=n(78600),l=(r(n(69848)),r(n(14919)),r(n(49904))),c=r(n(28807));const u=["ownerState"],d=["variants"],f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const m=(0,l.default)(),g=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function v(e){let{defaultTheme:t,theme:n,themeId:r}=e;return o=n,0===Object.keys(o).length?t:n[r]||n;var o}function y(e){return e?(t,n)=>n[e]:null}function b(e,t){let{ownerState:n}=t,r=(0,i.default)(t,u);const a="function"===typeof e?e((0,o.default)({ownerState:n},r)):e;if(Array.isArray(a))return a.flatMap((e=>b(e,(0,o.default)({ownerState:n},r))));if(a&&"object"===typeof a&&Array.isArray(a.variants)){const{variants:e=[]}=a;let t=(0,i.default)(a,d);return e.forEach((e=>{let i=!0;"function"===typeof e.props?i=e.props((0,o.default)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(i=!1)})),i&&(Array.isArray(t)||(t=[t]),t.push("function"===typeof e.style?e.style((0,o.default)({ownerState:n},r,n)):e.style))})),t}return a}},37476:(e,t,n)=>{"use strict";n.d(t,{A:()=>h,s:()=>m});var r=n(89379),o=n(80045),i=n(9950),a=n(16491),s=n(40165),l=n(33738),c=n(57191),u=n(48205),d=n(19489),f=n(44414);const p=["children","position","type","direction"],h=(0,i.forwardRef)(((e,t)=>{let{children:n,position:i="top-left",type:h="grow",direction:m="up"}=e,g=(0,o.A)(e,p),v={transformOrigin:"0 0 0"};switch(i){case"top-right":v={transformOrigin:"top right"};break;case"top":v={transformOrigin:"top"};break;case"bottom-left":v={transformOrigin:"bottom left"};break;case"bottom-right":v={transformOrigin:"bottom right"};break;case"bottom":v={transformOrigin:"bottom"};break;default:v={transformOrigin:"0 0 0"}}return(0,f.jsxs)(a.A,{ref:t,children:["grow"===h&&(0,f.jsx)(s.A,(0,r.A)((0,r.A)({},g),{},{timeout:{appear:0,enter:150,exit:150},children:(0,f.jsx)(a.A,{sx:v,children:n})})),"collapse"===h&&(0,f.jsx)(l.A,(0,r.A)((0,r.A)({},g),{},{sx:v,children:n})),"fade"===h&&(0,f.jsx)(c.A,(0,r.A)((0,r.A)({},g),{},{timeout:{appear:0,enter:300,exit:150},children:(0,f.jsx)(a.A,{sx:v,children:n})})),"slide"===h&&(0,f.jsx)(u.A,(0,r.A)((0,r.A)({},g),{},{timeout:{appear:0,enter:150,exit:150},direction:m,children:(0,f.jsx)(a.A,{sx:v,children:n})})),"zoom"===h&&(0,f.jsx)(d.A,(0,r.A)((0,r.A)({},g),{},{children:(0,f.jsx)(a.A,{sx:v,children:n})}))]})})),m=(0,i.forwardRef)((function(e,t){return(0,f.jsx)(d.A,(0,r.A)({ref:t,timeout:200},e))}))},37750:(e,t,n)=>{"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;nr})},38166:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(98587),o=n(58168),i=n(9417),a=n(77387),s=n(9950),l=n(28555);function c(e,t){var n=Object.create(null);return e&&s.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,s.isValidElement)(e)?t(e):e}(e)})),n}function u(e,t,n){return null!=n[t]?n[t]:e.props[t]}function d(e,t,n){var r=c(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r{"use strict";var r=n(9950),o=n(75340);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n