From bb36ebb8c347664bc77fbca491c9b5d2fe87c78d Mon Sep 17 00:00:00 2001 From: K7ZVX Date: Tue, 12 May 2026 22:48:49 +0000 Subject: [PATCH] fix: remove hardcoded fallbacks + add missing config UI sections --- dashboard-frontend/src/pages/Config.tsx | 95 +++++++++++++++++++ ...{index-D5w3LcwM.css => index-DvM_5H7j.css} | 2 +- .../{index-B6VnC_vh.js => index-Lqo8lYVT.js} | 64 ++++++------- meshai/dashboard/static/index.html | 4 +- meshai/env/avalanche.py | 2 +- meshai/env/ducting.py | 4 +- meshai/env/fires.py | 2 +- 7 files changed, 134 insertions(+), 39 deletions(-) rename meshai/dashboard/static/assets/{index-D5w3LcwM.css => index-DvM_5H7j.css} (63%) rename meshai/dashboard/static/assets/{index-B6VnC_vh.js => index-Lqo8lYVT.js} (88%) diff --git a/dashboard-frontend/src/pages/Config.tsx b/dashboard-frontend/src/pages/Config.tsx index caf2d0b..bc13a1d 100644 --- a/dashboard-frontend/src/pages/Config.tsx +++ b/dashboard-frontend/src/pages/Config.tsx @@ -186,6 +186,9 @@ interface EnvironmentalConfig { ducting: { enabled: boolean; tick_seconds: number; latitude: number; longitude: number } fires: { enabled: boolean; tick_seconds: number; state: string } avalanche: { enabled: boolean; tick_seconds: number; center_ids: string[]; season_months: number[] } + usgs: { enabled: boolean; tick_seconds: number; sites: string[] } + traffic: { enabled: boolean; tick_seconds: number; api_key: string; corridors: { name: string; lat: number; lon: number }[] } + roads511: { enabled: boolean; tick_seconds: number; api_key: string; base_url: string; endpoints: string[]; bbox: number[] } } interface DashboardConfig { @@ -975,6 +978,98 @@ function EnvironmentalSection({ data, onChange }: { data: EnvironmentalConfig; o )} + +
+
+ USGS Stream Gauges + onChange({ ...data, usgs: { ...data.usgs, enabled: v, tick_seconds: data.usgs?.tick_seconds || 900, sites: data.usgs?.sites || [] } })} /> +
+ {data.usgs?.enabled && ( + <> + onChange({ ...data, usgs: { ...data.usgs, tick_seconds: v } })} min={900} /> + onChange({ ...data, usgs: { ...data.usgs, sites: v } })} helper="Find IDs at waterdata.usgs.gov/nwis" /> + + )} +
+ +
+
+ TomTom Traffic + onChange({ ...data, traffic: { ...data.traffic, enabled: v, tick_seconds: data.traffic?.tick_seconds || 300, api_key: data.traffic?.api_key || '', corridors: data.traffic?.corridors || [] } })} /> +
+ {data.traffic?.enabled && ( + <> + onChange({ ...data, traffic: { ...data.traffic, api_key: v } })} type="password" helper="Get key at developer.tomtom.com" /> + onChange({ ...data, traffic: { ...data.traffic, tick_seconds: v } })} min={60} /> +
Corridors (each with name, lat, lon):
+ {(data.traffic.corridors || []).map((c, i) => ( +
+ { + const newCorridors = [...data.traffic.corridors] + newCorridors[i] = { ...c, name: v } + onChange({ ...data, traffic: { ...data.traffic, corridors: newCorridors } }) + }} /> + { + const newCorridors = [...data.traffic.corridors] + newCorridors[i] = { ...c, lat: v } + onChange({ ...data, traffic: { ...data.traffic, corridors: newCorridors } }) + }} step={0.01} /> + { + const newCorridors = [...data.traffic.corridors] + newCorridors[i] = { ...c, lon: v } + onChange({ ...data, traffic: { ...data.traffic, corridors: newCorridors } }) + }} step={0.01} /> + +
+ ))} + + + )} +
+ +
+
+ 511 Road Conditions + onChange({ ...data, roads511: { ...data.roads511, enabled: v, tick_seconds: data.roads511?.tick_seconds || 300, api_key: data.roads511?.api_key || '', base_url: data.roads511?.base_url || '', endpoints: data.roads511?.endpoints || ['/get/event'], bbox: data.roads511?.bbox || [] } })} /> +
+ {data.roads511?.enabled && ( + <> + onChange({ ...data, roads511: { ...data.roads511, base_url: v } })} placeholder="https://511.yourstate.gov/api/v2" /> + onChange({ ...data, roads511: { ...data.roads511, api_key: v } })} type="password" helper="Leave empty if not required" /> + onChange({ ...data, roads511: { ...data.roads511, tick_seconds: v } })} min={60} /> + onChange({ ...data, roads511: { ...data.roads511, endpoints: v } })} helper="e.g., /get/event, /get/mountainpasses" /> +
+ { + const bbox = [...(data.roads511.bbox || [0, 0, 0, 0])] + bbox[0] = v + onChange({ ...data, roads511: { ...data.roads511, bbox } }) + }} step={0.01} /> + { + const bbox = [...(data.roads511.bbox || [0, 0, 0, 0])] + bbox[1] = v + onChange({ ...data, roads511: { ...data.roads511, bbox } }) + }} step={0.01} /> + { + const bbox = [...(data.roads511.bbox || [0, 0, 0, 0])] + bbox[2] = v + onChange({ ...data, roads511: { ...data.roads511, bbox } }) + }} step={0.01} /> + { + const bbox = [...(data.roads511.bbox || [0, 0, 0, 0])] + bbox[3] = v + onChange({ ...data, roads511: { ...data.roads511, bbox } }) + }} step={0.01} /> +
+
Bounding box filter (leave all 0 to disable)
+ + )} +
)} diff --git a/meshai/dashboard/static/assets/index-D5w3LcwM.css b/meshai/dashboard/static/assets/index-DvM_5H7j.css similarity index 63% rename from meshai/dashboard/static/assets/index-D5w3LcwM.css rename to meshai/dashboard/static/assets/index-DvM_5H7j.css index 9d8bbe1..503df11 100644 --- a/meshai/dashboard/static/assets/index-D5w3LcwM.css +++ b/meshai/dashboard/static/assets/index-DvM_5H7j.css @@ -1 +1 @@ -.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.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{width:0;height:0;box-sizing:border-box;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{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.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-zoom-anim .leaflet-tile,.leaflet-pan-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-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.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{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{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-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height: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{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.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);width:36px;height: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{width:44px;height: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{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;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{height:0;border-top:1px solid #ddd;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{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.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{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.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{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.left-0{left:0}.left-1{left:.25rem}.left-3{left:.75rem}.left-4{left:1rem}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-4{top:1rem}.z-0{z-index:0}.col-span-2{grid-column:span 2 / span 2}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.h-0\.5{height:.125rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-\[540px\]{height:540px}.h-\[60vh\]{height:60vh}.h-\[calc\(100vh-8rem\)\]{height:calc(100vh - 8rem)}.h-full{height:100%}.h-screen{height:100vh}.w-0\.5{width:.125rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-4{width:1rem}.w-48{width:12rem}.w-8{width:2rem}.w-\[220px\]{width:220px}.w-\[250px\]{width:250px}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[200px\]{min-width:200px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(30 42 58 / var(--tw-divide-opacity, 1))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[\#1e2a3a\]{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-amber-500\/30{border-color:#f59e0b4d}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-border{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-green-500\/30{border-color:#22c55e4d}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-red-500\/30{border-color:#ef44444d}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-500{--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.bg-\[\#0a0e17\]{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-\[\#1e2a3a\]{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-accent{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-accent\/10{background-color:#3b82f61a}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.bg-bg{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-bg-card{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-bg-card\/90{background-color:#111827e6}.bg-bg-hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-border{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-cyan-500\/20{background-color:#06b6d433}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-500\/20{background-color:#22c55e33}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.bg-slate-500\/10{background-color:#64748b1a}.bg-slate-500\/20{background-color:#64748b33}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-yellow-500\/20{background-color:#eab30833}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-blue-500{--tw-gradient-from: #3b82f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-blue-700{--tw-gradient-to: #1d4ed8 var(--tw-gradient-to-position)}.fill-slate-100{fill:#f1f5f9}.fill-slate-400{fill:#94a3b8}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pl-9{padding-left:2.25rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tracking-wide{letter-spacing:.025em}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.placeholder-slate-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}body{background:#0a0e17;margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#0a0e17}::-webkit-scrollbar-thumb{background:#2d3a4d;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#3b4a5d}.font-mono{font-family:JetBrains Mono,monospace}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.animate-pulse-slow{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.hover\:border-accent:hover{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.hover\:bg-accent\/80:hover{background-color:#3b82f6cc}.hover\:bg-amber-600:hover{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.hover\:bg-bg-hover:hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:text-blue-300:hover{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\:text-slate-200:hover{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.hover\:text-slate-300:hover{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-accent:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width: 768px){.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}} +.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.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{width:0;height:0;box-sizing:border-box;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{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.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-zoom-anim .leaflet-tile,.leaflet-pan-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-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.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{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{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-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height: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{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.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);width:36px;height: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{width:44px;height: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{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;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{height:0;border-top:1px solid #ddd;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{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.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{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.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{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.left-0{left:0}.left-1{left:.25rem}.left-3{left:.75rem}.left-4{left:1rem}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-4{top:1rem}.z-0{z-index:0}.col-span-2{grid-column:span 2 / span 2}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.h-0\.5{height:.125rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-\[540px\]{height:540px}.h-\[60vh\]{height:60vh}.h-\[calc\(100vh-8rem\)\]{height:calc(100vh - 8rem)}.h-full{height:100%}.h-screen{height:100vh}.w-0\.5{width:.125rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-4{width:1rem}.w-48{width:12rem}.w-8{width:2rem}.w-\[220px\]{width:220px}.w-\[250px\]{width:250px}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[200px\]{min-width:200px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(30 42 58 / var(--tw-divide-opacity, 1))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[\#1e2a3a\]{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-amber-500\/30{border-color:#f59e0b4d}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-border{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-green-500\/30{border-color:#22c55e4d}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-red-500\/30{border-color:#ef44444d}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-500{--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.bg-\[\#0a0e17\]{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-\[\#1e2a3a\]{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-accent{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-accent\/10{background-color:#3b82f61a}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.bg-bg{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-bg-card{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-bg-card\/90{background-color:#111827e6}.bg-bg-hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-border{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-cyan-500\/20{background-color:#06b6d433}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-500\/20{background-color:#22c55e33}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.bg-slate-500\/10{background-color:#64748b1a}.bg-slate-500\/20{background-color:#64748b33}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-yellow-500\/20{background-color:#eab30833}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-blue-500{--tw-gradient-from: #3b82f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-blue-700{--tw-gradient-to: #1d4ed8 var(--tw-gradient-to-position)}.fill-slate-100{fill:#f1f5f9}.fill-slate-400{fill:#94a3b8}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pl-9{padding-left:2.25rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tracking-wide{letter-spacing:.025em}.text-accent{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.placeholder-slate-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}body{background:#0a0e17;margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#0a0e17}::-webkit-scrollbar-thumb{background:#2d3a4d;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#3b4a5d}.font-mono{font-family:JetBrains Mono,monospace}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.animate-pulse-slow{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.hover\:border-accent:hover{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.hover\:bg-accent\/80:hover{background-color:#3b82f6cc}.hover\:bg-amber-600:hover{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.hover\:bg-bg-hover:hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:text-blue-300:hover{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\:text-slate-200:hover{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.hover\:text-slate-300:hover{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-accent:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width: 768px){.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}} diff --git a/meshai/dashboard/static/assets/index-B6VnC_vh.js b/meshai/dashboard/static/assets/index-Lqo8lYVT.js similarity index 88% rename from meshai/dashboard/static/assets/index-B6VnC_vh.js rename to meshai/dashboard/static/assets/index-Lqo8lYVT.js index e89e629..7061359 100644 --- a/meshai/dashboard/static/assets/index-B6VnC_vh.js +++ b/meshai/dashboard/static/assets/index-Lqo8lYVT.js @@ -1,4 +1,4 @@ -function OW(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var zW=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function eC(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e5={exports:{}},n0={},t5={exports:{}},at={};/** +function OW(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var zW=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function eC(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e5={exports:{}},n0={},t5={exports:{}},ot={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function OW(t,e){for(var r=0;r>>1,K=V[Y];if(0>>1;Yi(ue,H))dei(Fe,ue)?(V[Y]=Fe,V[de]=H,Y=de):(V[Y]=ue,V[ie]=H,Y=ie);else if(dei(Fe,H))V[Y]=Fe,V[de]=H,Y=de;else break e}}return W}function i(V,W){var H=V.sortIndex-W.sortIndex;return H!==0?H:V.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,h=3,v=!1,p=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(V){for(var W=r(u);W!==null;){if(W.callback===null)n(u);else if(W.startTime<=V)n(u),W.sortIndex=W.expirationTime,e(l,W);else break;W=r(u)}}function b(V){if(g=!1,S(V),!p)if(r(l)!==null)p=!0,G(T);else{var W=r(u);W!==null&&Z(b,W.startTime-V)}}function T(V,W){p=!1,g&&(g=!1,y(D),D=-1),v=!0;var H=h;try{for(S(W),f=r(l);f!==null&&(!(f.expirationTime>W)||V&&!E());){var Y=f.callback;if(typeof Y=="function"){f.callback=null,h=f.priorityLevel;var K=Y(f.expirationTime<=W);W=t.unstable_now(),typeof K=="function"?f.callback=K:f===r(l)&&n(l),S(W)}else n(l);f=r(l)}if(f!==null)var ne=!0;else{var ie=r(u);ie!==null&&Z(b,ie.startTime-W),ne=!1}return ne}finally{f=null,h=H,v=!1}}var C=!1,M=null,D=-1,I=5,k=-1;function E(){return!(t.unstable_now()-kV||125Y?(V.sortIndex=H,e(u,V),r(l)===null&&V===r(u)&&(g?(y(D),D=-1):g=!0,Z(b,H-Y))):(V.sortIndex=K,e(l,V),p||v||(p=!0,G(T))),V},t.unstable_shouldYield=E,t.unstable_wrapCallback=function(V){var W=h;return function(){var H=h;h=W;try{return V.apply(this,arguments)}finally{h=H}}}})(v5);h5.exports=v5;var oU=h5.exports;/** + */(function(t){function e(V,W){var H=V.length;V.push(W);e:for(;0>>1,K=V[Y];if(0>>1;Yi(ue,H))dei(Fe,ue)?(V[Y]=Fe,V[de]=H,Y=de):(V[Y]=ue,V[ie]=H,Y=ie);else if(dei(Fe,H))V[Y]=Fe,V[de]=H,Y=de;else break e}}return W}function i(V,W){var H=V.sortIndex-W.sortIndex;return H!==0?H:V.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,h=3,v=!1,p=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(V){for(var W=r(u);W!==null;){if(W.callback===null)n(u);else if(W.startTime<=V)n(u),W.sortIndex=W.expirationTime,e(l,W);else break;W=r(u)}}function b(V){if(g=!1,S(V),!p)if(r(l)!==null)p=!0,j(T);else{var W=r(u);W!==null&&Z(b,W.startTime-V)}}function T(V,W){p=!1,g&&(g=!1,y(D),D=-1),v=!0;var H=h;try{for(S(W),f=r(l);f!==null&&(!(f.expirationTime>W)||V&&!E());){var Y=f.callback;if(typeof Y=="function"){f.callback=null,h=f.priorityLevel;var K=Y(f.expirationTime<=W);W=t.unstable_now(),typeof K=="function"?f.callback=K:f===r(l)&&n(l),S(W)}else n(l);f=r(l)}if(f!==null)var ne=!0;else{var ie=r(u);ie!==null&&Z(b,ie.startTime-W),ne=!1}return ne}finally{f=null,h=H,v=!1}}var C=!1,M=null,D=-1,I=5,k=-1;function E(){return!(t.unstable_now()-kV||125Y?(V.sortIndex=H,e(u,V),r(l)===null&&V===r(u)&&(g?(y(D),D=-1):g=!0,Z(b,H-Y))):(V.sortIndex=K,e(l,V),p||v||(p=!0,j(T))),V},t.unstable_shouldYield=E,t.unstable_wrapCallback=function(V){var W=h;return function(){var H=h;h=W;try{return V.apply(this,arguments)}finally{h=H}}}})(v5);h5.exports=v5;var oU=h5.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function OW(t,e){for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),HS=Object.prototype.hasOwnProperty,lU=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,qA={},KA={};function uU(t){return HS.call(KA,t)?!0:HS.call(qA,t)?!1:lU.test(t)?KA[t]=!0:(qA[t]=!0,!1)}function cU(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function fU(t,e,r,n){if(e===null||typeof e>"u"||cU(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function on(t,e,r,n,i,a,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var kr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){kr[t]=new on(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];kr[e]=new on(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){kr[t]=new on(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){kr[t]=new on(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){kr[t]=new on(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){kr[t]=new on(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){kr[t]=new on(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){kr[t]=new on(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){kr[t]=new on(t,5,!1,t.toLowerCase(),null,!1,!1)});var aC=/[\-:]([a-z])/g;function oC(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(aC,oC);kr[e]=new on(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(aC,oC);kr[e]=new on(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(aC,oC);kr[e]=new on(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){kr[t]=new on(t,1,!1,t.toLowerCase(),null,!1,!1)});kr.xlinkHref=new on("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){kr[t]=new on(t,1,!1,t.toLowerCase(),null,!0,!0)});function sC(t,e,r,n){var i=kr.hasOwnProperty(e)?kr[e]:null;(i!==null?i.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),HS=Object.prototype.hasOwnProperty,lU=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,qA={},KA={};function uU(t){return HS.call(KA,t)?!0:HS.call(qA,t)?!1:lU.test(t)?KA[t]=!0:(qA[t]=!0,!1)}function cU(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function fU(t,e,r,n){if(e===null||typeof e>"u"||cU(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function on(t,e,r,n,i,a,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var kr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){kr[t]=new on(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];kr[e]=new on(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){kr[t]=new on(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){kr[t]=new on(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){kr[t]=new on(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){kr[t]=new on(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){kr[t]=new on(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){kr[t]=new on(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){kr[t]=new on(t,5,!1,t.toLowerCase(),null,!1,!1)});var aC=/[\-:]([a-z])/g;function oC(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(aC,oC);kr[e]=new on(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(aC,oC);kr[e]=new on(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(aC,oC);kr[e]=new on(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){kr[t]=new on(t,1,!1,t.toLowerCase(),null,!1,!1)});kr.xlinkHref=new on("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){kr[t]=new on(t,1,!1,t.toLowerCase(),null,!0,!0)});function sC(t,e,r,n){var i=kr.hasOwnProperty(e)?kr[e]:null;(i!==null?i.type!==0:n||!(2s||i[o]!==a[s]){var l=` -`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=s);break}}}finally{H_=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Ph(t):""}function hU(t){switch(t.tag){case 5:return Ph(t.type);case 16:return Ph("Lazy");case 13:return Ph("Suspense");case 19:return Ph("SuspenseList");case 0:case 2:case 15:return t=W_(t.type,!1),t;case 11:return t=W_(t.type.render,!1),t;case 1:return t=W_(t.type,!0),t;default:return""}}function $S(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case nc:return"Fragment";case rc:return"Portal";case WS:return"Profiler";case lC:return"StrictMode";case US:return"Suspense";case ZS:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case g5:return(t.displayName||"Context")+".Consumer";case p5:return(t._context.displayName||"Context")+".Provider";case uC:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case cC:return e=t.displayName||null,e!==null?e:$S(t.type)||"Memo";case Po:e=t._payload,t=t._init;try{return $S(t(e))}catch{}}return null}function vU(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $S(e);case 8:return e===lC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function us(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function y5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function dU(t){var e=y5(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function cp(t){t._valueTracker||(t._valueTracker=dU(t))}function _5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=y5(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Sm(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function YS(t,e){var r=e.checked;return zt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function JA(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=us(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function x5(t,e){e=e.checked,e!=null&&sC(t,"checked",e,!1)}function XS(t,e){x5(t,e);var r=us(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?qS(t,e.type,r):e.hasOwnProperty("defaultValue")&&qS(t,e.type,us(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function eP(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function qS(t,e,r){(e!=="number"||Sm(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Dh=Array.isArray;function Sc(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=fp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function _v(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Zh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pU=["Webkit","ms","Moz","O"];Object.keys(Zh).forEach(function(t){pU.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Zh[e]=Zh[t]})});function T5(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Zh.hasOwnProperty(t)&&Zh[t]?(""+e).trim():e+"px"}function C5(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=T5(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var gU=zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function JS(t,e){if(e){if(gU[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ce(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ce(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ce(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ce(62))}}function ew(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tw=null;function fC(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var rw=null,wc=null,bc=null;function nP(t){if(t=yd(t)){if(typeof rw!="function")throw Error(ce(280));var e=t.stateNode;e&&(e=l0(e),rw(t.stateNode,t.type,e))}}function M5(t){wc?bc?bc.push(t):bc=[t]:wc=t}function L5(){if(wc){var t=wc,e=bc;if(bc=wc=null,nP(t),e)for(t=0;t>>=0,t===0?32:31-(LU(t)/AU|0)|0}var hp=64,vp=4194304;function kh(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Cm(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,a=t.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=kh(s):(a&=o,a!==0&&(n=kh(a)))}else o=r&~i,o!==0?n=kh(o):a!==0&&(n=kh(a));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,a=e&-e,i>=a||i===16&&(a&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function gd(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ci(e),t[e]=r}function IU(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=Yh),hP=" ",vP=!1;function $5(t,e){switch(t){case"keyup":return o7.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Y5(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ic=!1;function l7(t,e){switch(t){case"compositionend":return Y5(e);case"keypress":return e.which!==32?null:(vP=!0,hP);case"textInput":return t=e.data,t===hP&&vP?null:t;default:return null}}function u7(t,e){if(ic)return t==="compositionend"||!_C&&$5(t,e)?(t=U5(),Wg=gC=No=null,ic=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=mP(r)}}function Q5(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Q5(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function J5(){for(var t=window,e=Sm();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Sm(t.document)}return e}function xC(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function y7(t){var e=J5(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&Q5(r.ownerDocument.documentElement,r)){if(n!==null&&xC(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!t.extend&&a>n&&(i=n,n=a,a=i),i=yP(r,a);var o=yP(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),a>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,ac=null,lw=null,qh=null,uw=!1;function _P(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;uw||ac==null||ac!==Sm(n)||(n=ac,"selectionStart"in n&&xC(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),qh&&Cv(qh,n)||(qh=n,n=Am(lw,"onSelect"),0lc||(t.current=pw[lc],pw[lc]=null,lc--)}function Mt(t,e){lc++,pw[lc]=t.current,t.current=e}var cs={},$r=ys(cs),dn=ys(!1),Ol=cs;function Nc(t,e){var r=t.type.contextTypes;if(!r)return cs;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=e[a];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function pn(t){return t=t.childContextTypes,t!=null}function Dm(){At(dn),At($r)}function MP(t,e,r){if($r.current!==cs)throw Error(ce(168));Mt($r,e),Mt(dn,r)}function lB(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(ce(108,vU(t)||"Unknown",i));return zt({},r,n)}function km(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||cs,Ol=$r.current,Mt($r,t),Mt(dn,dn.current),!0}function LP(t,e,r){var n=t.stateNode;if(!n)throw Error(ce(169));r?(t=lB(t,e,Ol),n.__reactInternalMemoizedMergedChildContext=t,At(dn),At($r),Mt($r,t)):At(dn),Mt(dn,r)}var za=null,u0=!1,ix=!1;function uB(t){za===null?za=[t]:za.push(t)}function D7(t){u0=!0,uB(t)}function _s(){if(!ix&&za!==null){ix=!0;var t=0,e=_t;try{var r=za;for(_t=1;t>=o,i-=o,Va=1<<32-Ci(e)+i|r<D?(I=M,M=null):I=M.sibling;var k=h(y,M,S[D],b);if(k===null){M===null&&(M=I);break}t&&M&&k.alternate===null&&e(y,M),x=a(k,x,D),C===null?T=k:C.sibling=k,C=k,M=I}if(D===S.length)return r(y,M),Pt&&nl(y,D),T;if(M===null){for(;DD?(I=M,M=null):I=M.sibling;var E=h(y,M,k.value,b);if(E===null){M===null&&(M=I);break}t&&M&&E.alternate===null&&e(y,M),x=a(E,x,D),C===null?T=E:C.sibling=E,C=E,M=I}if(k.done)return r(y,M),Pt&&nl(y,D),T;if(M===null){for(;!k.done;D++,k=S.next())k=f(y,k.value,b),k!==null&&(x=a(k,x,D),C===null?T=k:C.sibling=k,C=k);return Pt&&nl(y,D),T}for(M=n(y,M);!k.done;D++,k=S.next())k=v(M,y,D,k.value,b),k!==null&&(t&&k.alternate!==null&&M.delete(k.key===null?D:k.key),x=a(k,x,D),C===null?T=k:C.sibling=k,C=k);return t&&M.forEach(function(z){return e(y,z)}),Pt&&nl(y,D),T}function m(y,x,S,b){if(typeof S=="object"&&S!==null&&S.type===nc&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case up:e:{for(var T=S.key,C=x;C!==null;){if(C.key===T){if(T=S.type,T===nc){if(C.tag===7){r(y,C.sibling),x=i(C,S.props.children),x.return=y,y=x;break e}}else if(C.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Po&&DP(T)===C.type){r(y,C.sibling),x=i(C,S.props),x.ref=Yf(y,C,S),x.return=y,y=x;break e}r(y,C);break}else e(y,C);C=C.sibling}S.type===nc?(x=Ml(S.props.children,y.mode,b,S.key),x.return=y,y=x):(b=Qg(S.type,S.key,S.props,null,y.mode,b),b.ref=Yf(y,x,S),b.return=y,y=b)}return o(y);case rc:e:{for(C=S.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){r(y,x.sibling),x=i(x,S.children||[]),x.return=y,y=x;break e}else{r(y,x);break}else e(y,x);x=x.sibling}x=hx(S,y.mode,b),x.return=y,y=x}return o(y);case Po:return C=S._init,m(y,x,C(S._payload),b)}if(Dh(S))return p(y,x,S,b);if(Hf(S))return g(y,x,S,b);xp(y,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,x!==null&&x.tag===6?(r(y,x.sibling),x=i(x,S),x.return=y,y=x):(r(y,x),x=fx(S,y.mode,b),x.return=y,y=x),o(y)):r(y,x)}return m}var zc=vB(!0),dB=vB(!1),Rm=ys(null),Nm=null,fc=null,TC=null;function CC(){TC=fc=Nm=null}function MC(t){var e=Rm.current;At(Rm),t._currentValue=e}function yw(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Cc(t,e){Nm=t,TC=fc=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(vn=!0),t.firstContext=null)}function ni(t){var e=t._currentValue;if(TC!==t)if(t={context:t,memoizedValue:e,next:null},fc===null){if(Nm===null)throw Error(ce(308));fc=t,Nm.dependencies={lanes:0,firstContext:t}}else fc=fc.next=t;return e}var gl=null;function LC(t){gl===null?gl=[t]:gl.push(t)}function pB(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,LC(e)):(r.next=i.next,i.next=r),e.interleaved=r,to(t,n)}function to(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var Do=!1;function AC(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function gB(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Za(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Xo(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ft&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,to(t,r)}return i=n.interleaved,i===null?(e.next=e,LC(n)):(e.next=i.next,i.next=e),n.interleaved=e,to(t,r)}function Zg(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,vC(t,r)}}function kP(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=e:a=a.next=e}else i=a=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Om(t,e,r,n){var i=t.updateQueue;Do=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var f=i.baseState;o=0,c=u=l=null,s=a;do{var h=s.lane,v=s.eventTime;if((n&h)===h){c!==null&&(c=c.next={eventTime:v,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=t,g=s;switch(h=e,v=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){f=p.call(v,f,h);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,h=typeof p=="function"?p.call(v,f,h):p,h==null)break e;f=zt({},f,h);break e;case 2:Do=!0}}s.callback!==null&&s.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else v={eventTime:v,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=v,l=f):c=c.next=v,o|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else a===null&&(i.shared.lanes=0);Vl|=o,t.lanes=o,t.memoizedState=f}}function IP(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=ox.transition;ox.transition={};try{t(!1),e()}finally{_t=r,ox.transition=n}}function EB(){return ii().memoizedState}function R7(t,e,r){var n=Ko(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},RB(t))NB(e,r);else if(r=pB(t,e,r,n),r!==null){var i=en();Mi(r,t,n,i),OB(r,e,n)}}function N7(t,e,r){var n=Ko(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(RB(t))NB(e,i);else{var a=t.alternate;if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var o=e.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,ki(s,o)){var l=e.interleaved;l===null?(i.next=i,LC(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=pB(t,e,i,n),r!==null&&(i=en(),Mi(r,t,n,i),OB(r,e,n))}}function RB(t){var e=t.alternate;return t===Rt||e!==null&&e===Rt}function NB(t,e){Kh=Bm=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function OB(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,vC(t,r)}}var Vm={readContext:ni,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useInsertionEffect:Br,useLayoutEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useMutableSource:Br,useSyncExternalStore:Br,useId:Br,unstable_isNewReconciler:!1},O7={readContext:ni,useCallback:function(t,e){return Ji().memoizedState=[t,e===void 0?null:e],t},useContext:ni,useEffect:RP,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Yg(4194308,4,AB.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Yg(4194308,4,t,e)},useInsertionEffect:function(t,e){return Yg(4,2,t,e)},useMemo:function(t,e){var r=Ji();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Ji();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=R7.bind(null,Rt,t),[n.memoizedState,t]},useRef:function(t){var e=Ji();return t={current:t},e.memoizedState=t},useState:EP,useDebugValue:OC,useDeferredValue:function(t){return Ji().memoizedState=t},useTransition:function(){var t=EP(!1),e=t[0];return t=E7.bind(null,t[1]),Ji().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Rt,i=Ji();if(Pt){if(r===void 0)throw Error(ce(407));r=r()}else{if(r=e(),wr===null)throw Error(ce(349));Bl&30||xB(n,e,r)}i.memoizedState=r;var a={value:r,getSnapshot:e};return i.queue=a,RP(wB.bind(null,n,a,t),[t]),n.flags|=2048,Ev(9,SB.bind(null,n,a,r,e),void 0,null),r},useId:function(){var t=Ji(),e=wr.identifierPrefix;if(Pt){var r=Fa,n=Va;r=(n&~(1<<32-Ci(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=kv++,0")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=s);break}}}finally{H_=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Ph(t):""}function hU(t){switch(t.tag){case 5:return Ph(t.type);case 16:return Ph("Lazy");case 13:return Ph("Suspense");case 19:return Ph("SuspenseList");case 0:case 2:case 15:return t=W_(t.type,!1),t;case 11:return t=W_(t.type.render,!1),t;case 1:return t=W_(t.type,!0),t;default:return""}}function $S(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case nc:return"Fragment";case rc:return"Portal";case WS:return"Profiler";case lC:return"StrictMode";case US:return"Suspense";case ZS:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case g5:return(t.displayName||"Context")+".Consumer";case p5:return(t._context.displayName||"Context")+".Provider";case uC:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case cC:return e=t.displayName||null,e!==null?e:$S(t.type)||"Memo";case Do:e=t._payload,t=t._init;try{return $S(t(e))}catch{}}return null}function vU(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $S(e);case 8:return e===lC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function cs(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function y5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function dU(t){var e=y5(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function cp(t){t._valueTracker||(t._valueTracker=dU(t))}function _5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=y5(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Sm(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function YS(t,e){var r=e.checked;return zt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function JA(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=cs(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function x5(t,e){e=e.checked,e!=null&&sC(t,"checked",e,!1)}function XS(t,e){x5(t,e);var r=cs(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?qS(t,e.type,r):e.hasOwnProperty("defaultValue")&&qS(t,e.type,cs(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function eP(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function qS(t,e,r){(e!=="number"||Sm(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Dh=Array.isArray;function Sc(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=fp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function _v(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Zh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pU=["Webkit","ms","Moz","O"];Object.keys(Zh).forEach(function(t){pU.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Zh[e]=Zh[t]})});function T5(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Zh.hasOwnProperty(t)&&Zh[t]?(""+e).trim():e+"px"}function C5(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=T5(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var gU=zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function JS(t,e){if(e){if(gU[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ce(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ce(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ce(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ce(62))}}function ew(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tw=null;function fC(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var rw=null,wc=null,bc=null;function nP(t){if(t=yd(t)){if(typeof rw!="function")throw Error(ce(280));var e=t.stateNode;e&&(e=l0(e),rw(t.stateNode,t.type,e))}}function M5(t){wc?bc?bc.push(t):bc=[t]:wc=t}function L5(){if(wc){var t=wc,e=bc;if(bc=wc=null,nP(t),e)for(t=0;t>>=0,t===0?32:31-(LU(t)/AU|0)|0}var hp=64,vp=4194304;function kh(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Cm(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,a=t.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=kh(s):(a&=o,a!==0&&(n=kh(a)))}else o=r&~i,o!==0?n=kh(o):a!==0&&(n=kh(a));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,a=e&-e,i>=a||i===16&&(a&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function gd(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ci(e),t[e]=r}function IU(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=Yh),hP=" ",vP=!1;function $5(t,e){switch(t){case"keyup":return o7.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Y5(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ic=!1;function l7(t,e){switch(t){case"compositionend":return Y5(e);case"keypress":return e.which!==32?null:(vP=!0,hP);case"textInput":return t=e.data,t===hP&&vP?null:t;default:return null}}function u7(t,e){if(ic)return t==="compositionend"||!_C&&$5(t,e)?(t=U5(),Wg=gC=Oo=null,ic=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=mP(r)}}function Q5(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Q5(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function J5(){for(var t=window,e=Sm();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Sm(t.document)}return e}function xC(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function y7(t){var e=J5(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&Q5(r.ownerDocument.documentElement,r)){if(n!==null&&xC(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!t.extend&&a>n&&(i=n,n=a,a=i),i=yP(r,a);var o=yP(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),a>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,ac=null,lw=null,qh=null,uw=!1;function _P(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;uw||ac==null||ac!==Sm(n)||(n=ac,"selectionStart"in n&&xC(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),qh&&Cv(qh,n)||(qh=n,n=Am(lw,"onSelect"),0lc||(t.current=pw[lc],pw[lc]=null,lc--)}function Mt(t,e){lc++,pw[lc]=t.current,t.current=e}var fs={},$r=_s(fs),dn=_s(!1),Ol=fs;function Nc(t,e){var r=t.type.contextTypes;if(!r)return fs;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=e[a];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function pn(t){return t=t.childContextTypes,t!=null}function Dm(){At(dn),At($r)}function MP(t,e,r){if($r.current!==fs)throw Error(ce(168));Mt($r,e),Mt(dn,r)}function lB(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(ce(108,vU(t)||"Unknown",i));return zt({},r,n)}function km(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||fs,Ol=$r.current,Mt($r,t),Mt(dn,dn.current),!0}function LP(t,e,r){var n=t.stateNode;if(!n)throw Error(ce(169));r?(t=lB(t,e,Ol),n.__reactInternalMemoizedMergedChildContext=t,At(dn),At($r),Mt($r,t)):At(dn),Mt(dn,r)}var za=null,u0=!1,ix=!1;function uB(t){za===null?za=[t]:za.push(t)}function D7(t){u0=!0,uB(t)}function xs(){if(!ix&&za!==null){ix=!0;var t=0,e=xt;try{var r=za;for(xt=1;t>=o,i-=o,Va=1<<32-Ci(e)+i|r<D?(I=M,M=null):I=M.sibling;var k=h(y,M,S[D],b);if(k===null){M===null&&(M=I);break}t&&M&&k.alternate===null&&e(y,M),x=a(k,x,D),C===null?T=k:C.sibling=k,C=k,M=I}if(D===S.length)return r(y,M),Pt&&il(y,D),T;if(M===null){for(;DD?(I=M,M=null):I=M.sibling;var E=h(y,M,k.value,b);if(E===null){M===null&&(M=I);break}t&&M&&E.alternate===null&&e(y,M),x=a(E,x,D),C===null?T=E:C.sibling=E,C=E,M=I}if(k.done)return r(y,M),Pt&&il(y,D),T;if(M===null){for(;!k.done;D++,k=S.next())k=f(y,k.value,b),k!==null&&(x=a(k,x,D),C===null?T=k:C.sibling=k,C=k);return Pt&&il(y,D),T}for(M=n(y,M);!k.done;D++,k=S.next())k=v(M,y,D,k.value,b),k!==null&&(t&&k.alternate!==null&&M.delete(k.key===null?D:k.key),x=a(k,x,D),C===null?T=k:C.sibling=k,C=k);return t&&M.forEach(function(z){return e(y,z)}),Pt&&il(y,D),T}function m(y,x,S,b){if(typeof S=="object"&&S!==null&&S.type===nc&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case up:e:{for(var T=S.key,C=x;C!==null;){if(C.key===T){if(T=S.type,T===nc){if(C.tag===7){r(y,C.sibling),x=i(C,S.props.children),x.return=y,y=x;break e}}else if(C.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Do&&DP(T)===C.type){r(y,C.sibling),x=i(C,S.props),x.ref=Yf(y,C,S),x.return=y,y=x;break e}r(y,C);break}else e(y,C);C=C.sibling}S.type===nc?(x=Ll(S.props.children,y.mode,b,S.key),x.return=y,y=x):(b=Qg(S.type,S.key,S.props,null,y.mode,b),b.ref=Yf(y,x,S),b.return=y,y=b)}return o(y);case rc:e:{for(C=S.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){r(y,x.sibling),x=i(x,S.children||[]),x.return=y,y=x;break e}else{r(y,x);break}else e(y,x);x=x.sibling}x=hx(S,y.mode,b),x.return=y,y=x}return o(y);case Do:return C=S._init,m(y,x,C(S._payload),b)}if(Dh(S))return p(y,x,S,b);if(Hf(S))return g(y,x,S,b);xp(y,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,x!==null&&x.tag===6?(r(y,x.sibling),x=i(x,S),x.return=y,y=x):(r(y,x),x=fx(S,y.mode,b),x.return=y,y=x),o(y)):r(y,x)}return m}var zc=vB(!0),dB=vB(!1),Rm=_s(null),Nm=null,fc=null,TC=null;function CC(){TC=fc=Nm=null}function MC(t){var e=Rm.current;At(Rm),t._currentValue=e}function yw(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Cc(t,e){Nm=t,TC=fc=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(vn=!0),t.firstContext=null)}function ni(t){var e=t._currentValue;if(TC!==t)if(t={context:t,memoizedValue:e,next:null},fc===null){if(Nm===null)throw Error(ce(308));fc=t,Nm.dependencies={lanes:0,firstContext:t}}else fc=fc.next=t;return e}var ml=null;function LC(t){ml===null?ml=[t]:ml.push(t)}function pB(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,LC(e)):(r.next=i.next,i.next=r),e.interleaved=r,ro(t,n)}function ro(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var ko=!1;function AC(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function gB(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function $a(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function qo(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ft&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,ro(t,r)}return i=n.interleaved,i===null?(e.next=e,LC(n)):(e.next=i.next,i.next=e),n.interleaved=e,ro(t,r)}function Zg(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,vC(t,r)}}function kP(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=e:a=a.next=e}else i=a=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Om(t,e,r,n){var i=t.updateQueue;ko=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var f=i.baseState;o=0,c=u=l=null,s=a;do{var h=s.lane,v=s.eventTime;if((n&h)===h){c!==null&&(c=c.next={eventTime:v,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=t,g=s;switch(h=e,v=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){f=p.call(v,f,h);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,h=typeof p=="function"?p.call(v,f,h):p,h==null)break e;f=zt({},f,h);break e;case 2:ko=!0}}s.callback!==null&&s.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else v={eventTime:v,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=v,l=f):c=c.next=v,o|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else a===null&&(i.shared.lanes=0);Vl|=o,t.lanes=o,t.memoizedState=f}}function IP(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=ox.transition;ox.transition={};try{t(!1),e()}finally{xt=r,ox.transition=n}}function EB(){return ii().memoizedState}function R7(t,e,r){var n=Qo(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},RB(t))NB(e,r);else if(r=pB(t,e,r,n),r!==null){var i=en();Mi(r,t,n,i),OB(r,e,n)}}function N7(t,e,r){var n=Qo(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(RB(t))NB(e,i);else{var a=t.alternate;if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var o=e.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,ki(s,o)){var l=e.interleaved;l===null?(i.next=i,LC(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=pB(t,e,i,n),r!==null&&(i=en(),Mi(r,t,n,i),OB(r,e,n))}}function RB(t){var e=t.alternate;return t===Rt||e!==null&&e===Rt}function NB(t,e){Kh=Bm=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function OB(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,vC(t,r)}}var Vm={readContext:ni,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useInsertionEffect:Br,useLayoutEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useMutableSource:Br,useSyncExternalStore:Br,useId:Br,unstable_isNewReconciler:!1},O7={readContext:ni,useCallback:function(t,e){return Ji().memoizedState=[t,e===void 0?null:e],t},useContext:ni,useEffect:RP,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Yg(4194308,4,AB.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Yg(4194308,4,t,e)},useInsertionEffect:function(t,e){return Yg(4,2,t,e)},useMemo:function(t,e){var r=Ji();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Ji();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=R7.bind(null,Rt,t),[n.memoizedState,t]},useRef:function(t){var e=Ji();return t={current:t},e.memoizedState=t},useState:EP,useDebugValue:OC,useDeferredValue:function(t){return Ji().memoizedState=t},useTransition:function(){var t=EP(!1),e=t[0];return t=E7.bind(null,t[1]),Ji().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Rt,i=Ji();if(Pt){if(r===void 0)throw Error(ce(407));r=r()}else{if(r=e(),wr===null)throw Error(ce(349));Bl&30||xB(n,e,r)}i.memoizedState=r;var a={value:r,getSnapshot:e};return i.queue=a,RP(wB.bind(null,n,a,t),[t]),n.flags|=2048,Ev(9,SB.bind(null,n,a,r,e),void 0,null),r},useId:function(){var t=Ji(),e=wr.identifierPrefix;if(Pt){var r=Fa,n=Va;r=(n&~(1<<32-Ci(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=kv++,0<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[ta]=e,t[Av]=n,ZB(t,e,!1,!1),e.stateNode=t;e:{switch(o=ew(r,n),r){case"dialog":Lt("cancel",t),Lt("close",t),i=n;break;case"iframe":case"object":case"embed":Lt("load",t),i=n;break;case"video":case"audio":for(i=0;iFc&&(e.flags|=128,n=!0,Xf(a,!1),e.lanes=4194304)}else{if(!n)if(t=zm(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Xf(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Pt)return Vr(e),null}else 2*Yt()-a.renderingStartTime>Fc&&r!==1073741824&&(e.flags|=128,n=!0,Xf(a,!1),e.lanes=4194304);a.isBackwards?(o.sibling=e.child,e.child=o):(r=a.last,r!==null?r.sibling=o:e.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Yt(),e.sibling=null,r=Et.current,Mt(Et,n?r&1|2:r&1),e):(Vr(e),null);case 22:case 23:return jC(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?xn&1073741824&&(Vr(e),e.subtreeFlags&6&&(e.flags|=8192)):Vr(e),null;case 24:return null;case 25:return null}throw Error(ce(156,e.tag))}function W7(t,e){switch(wC(e),e.tag){case 1:return pn(e.type)&&Dm(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Bc(),At(dn),At($r),kC(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return DC(e),null;case 13:if(At(Et),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ce(340));Oc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return At(Et),null;case 4:return Bc(),null;case 10:return MC(e.type._context),null;case 22:case 23:return jC(),null;case 24:return null;default:return null}}var wp=!1,Hr=!1,U7=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function hc(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ft(t,e,n)}else r.current=null}function Lw(t,e,r){try{r()}catch(n){Ft(t,e,n)}}var UP=!1;function Z7(t,e){if(cw=Mm,t=J5(),xC(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=t,h=null;t:for(;;){for(var v;f!==r||i!==0&&f.nodeType!==3||(s=o+i),f!==a||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(v=f.firstChild)!==null;)h=f,f=v;for(;;){if(f===t)break t;if(h===r&&++u===i&&(s=o),h===a&&++c===n&&(l=o),(v=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=v}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(fw={focusedElem:t,selectionRange:r},Mm=!1,Pe=e;Pe!==null;)if(e=Pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Pe=t;else for(;Pe!==null;){e=Pe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,m=p.memoizedState,y=e.stateNode,x=y.getSnapshotBeforeUpdate(e.elementType===e.type?g:_i(e.type,g),m);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(b){Ft(e,e.return,b)}if(t=e.sibling,t!==null){t.return=e.return,Pe=t;break}Pe=e.return}return p=UP,UP=!1,p}function Qh(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var a=i.destroy;i.destroy=void 0,a!==void 0&&Lw(e,r,a)}i=i.next}while(i!==n)}}function h0(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Aw(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function XB(t){var e=t.alternate;e!==null&&(t.alternate=null,XB(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ta],delete e[Av],delete e[dw],delete e[A7],delete e[P7])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function qB(t){return t.tag===5||t.tag===3||t.tag===4}function ZP(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||qB(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Pw(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Pm));else if(n!==4&&(t=t.child,t!==null))for(Pw(t,e,r),t=t.sibling;t!==null;)Pw(t,e,r),t=t.sibling}function Dw(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Dw(t,e,r),t=t.sibling;t!==null;)Dw(t,e,r),t=t.sibling}var Mr=null,Si=!1;function yo(t,e,r){for(r=r.child;r!==null;)KB(t,e,r),r=r.sibling}function KB(t,e,r){if(ca&&typeof ca.onCommitFiberUnmount=="function")try{ca.onCommitFiberUnmount(i0,r)}catch{}switch(r.tag){case 5:Hr||hc(r,e);case 6:var n=Mr,i=Si;Mr=null,yo(t,e,r),Mr=n,Si=i,Mr!==null&&(Si?(t=Mr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Mr.removeChild(r.stateNode));break;case 18:Mr!==null&&(Si?(t=Mr,r=r.stateNode,t.nodeType===8?nx(t.parentNode,r):t.nodeType===1&&nx(t,r),bv(t)):nx(Mr,r.stateNode));break;case 4:n=Mr,i=Si,Mr=r.stateNode.containerInfo,Si=!0,yo(t,e,r),Mr=n,Si=i;break;case 0:case 11:case 14:case 15:if(!Hr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Lw(r,e,o),i=i.next}while(i!==n)}yo(t,e,r);break;case 1:if(!Hr&&(hc(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Ft(r,e,s)}yo(t,e,r);break;case 21:yo(t,e,r);break;case 22:r.mode&1?(Hr=(n=Hr)||r.memoizedState!==null,yo(t,e,r),Hr=n):yo(t,e,r);break;default:yo(t,e,r)}}function $P(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new U7),e.forEach(function(n){var i=t9.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function di(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=Yt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Y7(n/1960))-n,10t?16:t,Oo===null)var n=!1;else{if(t=Oo,Oo=null,jm=0,ft&6)throw Error(ce(331));var i=ft;for(ft|=4,Pe=t.current;Pe!==null;){var a=Pe,o=a.child;if(Pe.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lYt()-FC?Cl(t,0):VC|=r),gn(t,e)}function a3(t,e){e===0&&(t.mode&1?(e=vp,vp<<=1,!(vp&130023424)&&(vp=4194304)):e=1);var r=en();t=to(t,e),t!==null&&(gd(t,e,r),gn(t,r))}function e9(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),a3(t,r)}function t9(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(ce(314))}n!==null&&n.delete(e),a3(t,r)}var o3;o3=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||dn.current)vn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return vn=!1,j7(t,e,r);vn=!!(t.flags&131072)}else vn=!1,Pt&&e.flags&1048576&&cB(e,Em,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Xg(t,e),t=e.pendingProps;var i=Nc(e,$r.current);Cc(e,r),i=EC(null,e,n,t,i,r);var a=RC();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,pn(n)?(a=!0,km(e)):a=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,AC(e),i.updater=f0,e.stateNode=i,i._reactInternals=e,xw(e,n,t,r),e=bw(null,e,n,!0,a,r)):(e.tag=0,Pt&&a&&SC(e),qr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Xg(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=n9(n),t=_i(n,t),i){case 0:e=ww(null,e,n,t,r);break e;case 1:e=jP(null,e,n,t,r);break e;case 11:e=FP(null,e,n,t,r);break e;case 14:e=GP(null,e,n,_i(n.type,t),r);break e}throw Error(ce(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),ww(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),jP(t,e,n,i,r);case 3:e:{if(HB(e),t===null)throw Error(ce(387));n=e.pendingProps,a=e.memoizedState,i=a.element,gB(t,e),Om(e,n,null,r);var o=e.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=a,e.memoizedState=a,e.flags&256){i=Vc(Error(ce(423)),e),e=HP(t,e,n,r,i);break e}else if(n!==i){i=Vc(Error(ce(424)),e),e=HP(t,e,n,r,i);break e}else for(Cn=Yo(e.stateNode.containerInfo.firstChild),Dn=e,Pt=!0,wi=null,r=dB(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Oc(),n===i){e=ro(t,e,r);break e}qr(t,e,n,r)}e=e.child}return e;case 5:return mB(e),t===null&&mw(e),n=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,hw(n,i)?o=null:a!==null&&hw(n,a)&&(e.flags|=32),jB(t,e),qr(t,e,o,r),e.child;case 6:return t===null&&mw(e),null;case 13:return WB(t,e,r);case 4:return PC(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=zc(e,null,n,r):qr(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),FP(t,e,n,i,r);case 7:return qr(t,e,e.pendingProps,r),e.child;case 8:return qr(t,e,e.pendingProps.children,r),e.child;case 12:return qr(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,a=e.memoizedProps,o=i.value,Mt(Rm,n._currentValue),n._currentValue=o,a!==null)if(ki(a.value,o)){if(a.children===i.children&&!dn.current){e=ro(t,e,r);break e}}else for(a=e.child,a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=Za(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),yw(a.return,r,e),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===e.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(ce(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),yw(o,r,e),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}qr(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Cc(e,r),i=ni(i),n=n(i),e.flags|=1,qr(t,e,n,r),e.child;case 14:return n=e.type,i=_i(n,e.pendingProps),i=_i(n.type,i),GP(t,e,n,i,r);case 15:return FB(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),Xg(t,e),e.tag=1,pn(n)?(t=!0,km(e)):t=!1,Cc(e,r),zB(e,n,i),xw(e,n,i,r),bw(null,e,n,!0,t,r);case 19:return UB(t,e,r);case 22:return GB(t,e,r)}throw Error(ce(156,e.tag))};function s3(t,e){return R5(t,e)}function r9(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jn(t,e,r,n){return new r9(t,e,r,n)}function WC(t){return t=t.prototype,!(!t||!t.isReactComponent)}function n9(t){if(typeof t=="function")return WC(t)?1:0;if(t!=null){if(t=t.$$typeof,t===uC)return 11;if(t===cC)return 14}return 2}function Qo(t,e){var r=t.alternate;return r===null?(r=Jn(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Qg(t,e,r,n,i,a){var o=2;if(n=t,typeof t=="function")WC(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case nc:return Ml(r.children,i,a,e);case lC:o=8,i|=8;break;case WS:return t=Jn(12,r,e,i|2),t.elementType=WS,t.lanes=a,t;case US:return t=Jn(13,r,e,i),t.elementType=US,t.lanes=a,t;case ZS:return t=Jn(19,r,e,i),t.elementType=ZS,t.lanes=a,t;case m5:return d0(r,i,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case p5:o=10;break e;case g5:o=9;break e;case uC:o=11;break e;case cC:o=14;break e;case Po:o=16,n=null;break e}throw Error(ce(130,t==null?t:typeof t,""))}return e=Jn(o,r,e,i),e.elementType=t,e.type=n,e.lanes=a,e}function Ml(t,e,r,n){return t=Jn(7,t,n,e),t.lanes=r,t}function d0(t,e,r,n){return t=Jn(22,t,n,e),t.elementType=m5,t.lanes=r,t.stateNode={isHidden:!1},t}function fx(t,e,r){return t=Jn(6,t,null,e),t.lanes=r,t}function hx(t,e,r){return e=Jn(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function i9(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Z_(0),this.expirationTimes=Z_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Z_(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function UC(t,e,r,n,i,a,o,s,l){return t=new i9(t,e,r,s,l),e===1?(e=1,a===!0&&(e|=8)):e=0,a=Jn(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},AC(a),t}function a9(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f3)}catch(t){console.error(t)}}f3(),f5.exports=En;var h3=f5.exports,tD=h3;jS.createRoot=tD.createRoot,jS.hydrateRoot=tD.hydrateRoot;/** +`+a.stack}return{value:t,source:e,stack:i,digest:null}}function ux(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Sw(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var V7=typeof WeakMap=="function"?WeakMap:Map;function BB(t,e,r){r=$a(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){jm||(jm=!0,kw=n),Sw(t,e)},r}function VB(t,e,r){r=$a(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){Sw(t,e)}}var a=t.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Sw(t,e),typeof n!="function"&&(Ko===null?Ko=new Set([this]):Ko.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function zP(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new V7;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=J7.bind(null,t,e,r),e.then(t,t))}function BP(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function VP(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=$a(-1,1),e.tag=2,qo(r,e,1))),r.lanes|=1),t)}var F7=ho.ReactCurrentOwner,vn=!1;function qr(t,e,r,n){e.child=t===null?dB(e,null,r,n):zc(e,t.child,r,n)}function FP(t,e,r,n,i){r=r.render;var a=e.ref;return Cc(e,i),n=EC(t,e,r,n,a,i),r=RC(),t!==null&&!vn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,no(t,e,i)):(Pt&&r&&SC(e),e.flags|=1,qr(t,e,n,i),e.child)}function jP(t,e,r,n,i){if(t===null){var a=r.type;return typeof a=="function"&&!WC(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=a,FB(t,e,a,n,i)):(t=Qg(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(a=t.child,!(t.lanes&i)){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:Cv,r(o,n)&&t.ref===e.ref)return no(t,e,i)}return e.flags|=1,t=Jo(a,n),t.ref=e.ref,t.return=e,e.child=t}function FB(t,e,r,n,i){if(t!==null){var a=t.memoizedProps;if(Cv(a,n)&&t.ref===e.ref)if(vn=!1,e.pendingProps=n=a,(t.lanes&i)!==0)t.flags&131072&&(vn=!0);else return e.lanes=t.lanes,no(t,e,i)}return ww(t,e,r,n,i)}function jB(t,e,r){var n=e.pendingProps,i=n.children,a=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Mt(vc,xn),xn|=r;else{if(!(r&1073741824))return t=a!==null?a.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Mt(vc,xn),xn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Mt(vc,xn),xn|=n}else a!==null?(n=a.baseLanes|r,e.memoizedState=null):n=r,Mt(vc,xn),xn|=n;return qr(t,e,i,r),e.child}function GB(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function ww(t,e,r,n,i){var a=pn(r)?Ol:$r.current;return a=Nc(e,a),Cc(e,i),r=EC(t,e,r,n,a,i),n=RC(),t!==null&&!vn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,no(t,e,i)):(Pt&&n&&SC(e),e.flags|=1,qr(t,e,r,i),e.child)}function GP(t,e,r,n,i){if(pn(r)){var a=!0;km(e)}else a=!1;if(Cc(e,i),e.stateNode===null)Xg(t,e),zB(e,r,n),xw(e,r,n,i),n=!0;else if(t===null){var o=e.stateNode,s=e.memoizedProps;o.props=s;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=ni(u):(u=pn(r)?Ol:$r.current,u=Nc(e,u));var c=r.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||l!==u)&&OP(e,o,n,u),ko=!1;var h=e.memoizedState;o.state=h,Om(e,n,o,i),l=e.memoizedState,s!==n||h!==l||dn.current||ko?(typeof c=="function"&&(_w(e,r,c,n),l=e.memoizedState),(s=ko||NP(e,r,s,n,h,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=u,n=s):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,gB(t,e),s=e.memoizedProps,u=e.type===e.elementType?s:_i(e.type,s),o.props=u,f=e.pendingProps,h=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=ni(l):(l=pn(r)?Ol:$r.current,l=Nc(e,l));var v=r.getDerivedStateFromProps;(c=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==f||h!==l)&&OP(e,o,n,l),ko=!1,h=e.memoizedState,o.state=h,Om(e,n,o,i);var p=e.memoizedState;s!==f||h!==p||dn.current||ko?(typeof v=="function"&&(_w(e,r,v,n),p=e.memoizedState),(u=ko||NP(e,r,u,n,h,p,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,p,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,p,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=p),o.props=n,o.state=p,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),n=!1)}return bw(t,e,r,n,a,i)}function bw(t,e,r,n,i,a){GB(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return i&&LP(e,r,!1),no(t,e,a);n=e.stateNode,F7.current=e;var s=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=zc(e,t.child,null,a),e.child=zc(e,null,s,a)):qr(t,e,s,a),e.memoizedState=n.state,i&&LP(e,r,!0),e.child}function HB(t){var e=t.stateNode;e.pendingContext?MP(t,e.pendingContext,e.pendingContext!==e.context):e.context&&MP(t,e.context,!1),PC(t,e.containerInfo)}function HP(t,e,r,n,i){return Oc(),bC(i),e.flags|=256,qr(t,e,r,n),e.child}var Tw={dehydrated:null,treeContext:null,retryLane:0};function Cw(t){return{baseLanes:t,cachePool:null,transitions:null}}function WB(t,e,r){var n=e.pendingProps,i=Et.current,a=!1,o=(e.flags&128)!==0,s;if((s=o)||(s=t!==null&&t.memoizedState===null?!1:(i&2)!==0),s?(a=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Mt(Et,i&1),t===null)return mw(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,a?(n=e.mode,a=e.child,o={mode:"hidden",children:o},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=d0(o,n,0,null),t=Ll(t,n,r,null),a.return=e,t.return=e,a.sibling=t,e.child=a,e.child.memoizedState=Cw(r),e.memoizedState=Tw,t):zC(e,o));if(i=t.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return j7(t,e,o,n,s,i,r);if(a){a=n.fallback,o=e.mode,i=t.child,s=i.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=Jo(i,l),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=Jo(s,a):(a=Ll(a,o,r,null),a.flags|=2),a.return=e,n.return=e,n.sibling=a,e.child=n,n=a,a=e.child,o=t.child.memoizedState,o=o===null?Cw(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=t.childLanes&~r,e.memoizedState=Tw,n}return a=t.child,t=a.sibling,n=Jo(a,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function zC(t,e){return e=d0({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Sp(t,e,r,n){return n!==null&&bC(n),zc(e,t.child,null,r),t=zC(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function j7(t,e,r,n,i,a,o){if(r)return e.flags&256?(e.flags&=-257,n=ux(Error(ce(422))),Sp(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(a=n.fallback,i=e.mode,n=d0({mode:"visible",children:n.children},i,0,null),a=Ll(a,i,o,null),a.flags|=2,n.return=e,a.return=e,n.sibling=a,e.child=n,e.mode&1&&zc(e,t.child,null,o),e.child.memoizedState=Cw(o),e.memoizedState=Tw,a);if(!(e.mode&1))return Sp(t,e,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var s=n.dgst;return n=s,a=Error(ce(419)),n=ux(a,n,void 0),Sp(t,e,o,n)}if(s=(o&t.childLanes)!==0,vn||s){if(n=wr,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,ro(t,i),Mi(n,t,i,-1))}return HC(),n=ux(Error(ce(421))),Sp(t,e,o,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=e9.bind(null,t),i._reactRetry=e,null):(t=a.treeContext,Cn=Xo(i.nextSibling),Dn=e,Pt=!0,wi=null,t!==null&&(Yn[Xn++]=Va,Yn[Xn++]=Fa,Yn[Xn++]=zl,Va=t.id,Fa=t.overflow,zl=e),e=zC(e,n.children),e.flags|=4096,e)}function WP(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),yw(t.return,e,r)}function cx(t,e,r,n,i){var a=t.memoizedState;a===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i)}function UB(t,e,r){var n=e.pendingProps,i=n.revealOrder,a=n.tail;if(qr(t,e,n.children,r),n=Et.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&WP(t,r,e);else if(t.tag===19)WP(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(Mt(Et,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&zm(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),cx(e,!1,i,r,a);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&zm(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}cx(e,!0,r,null,a);break;case"together":cx(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Xg(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function no(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Vl|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(ce(153));if(e.child!==null){for(t=e.child,r=Jo(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=Jo(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function G7(t,e,r){switch(e.tag){case 3:HB(e),Oc();break;case 5:mB(e);break;case 1:pn(e.type)&&km(e);break;case 4:PC(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;Mt(Rm,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(Mt(Et,Et.current&1),e.flags|=128,null):r&e.child.childLanes?WB(t,e,r):(Mt(Et,Et.current&1),t=no(t,e,r),t!==null?t.sibling:null);Mt(Et,Et.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return UB(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Mt(Et,Et.current),n)break;return null;case 22:case 23:return e.lanes=0,jB(t,e,r)}return no(t,e,r)}var ZB,Mw,$B,YB;ZB=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Mw=function(){};$B=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,yl(fa.current);var a=null;switch(r){case"input":i=YS(t,i),n=YS(t,n),a=[];break;case"select":i=zt({},i,{value:void 0}),n=zt({},n,{value:void 0}),a=[];break;case"textarea":i=KS(t,i),n=KS(t,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Pm)}JS(r,n);var o;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(o in s)s.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(yv.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var l=n[u];if(s=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(a||(a=[]),a.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(a=a||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(yv.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Lt("scroll",t),a||s===l||(a=[])):(a=a||[]).push(u,l))}r&&(a=a||[]).push("style",r);var u=a;(e.updateQueue=u)&&(e.flags|=4)}};YB=function(t,e,r,n){r!==n&&(e.flags|=4)};function Xf(t,e){if(!Pt)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function Vr(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function H7(t,e,r){var n=e.pendingProps;switch(wC(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vr(e),null;case 1:return pn(e.type)&&Dm(),Vr(e),null;case 3:return n=e.stateNode,Bc(),At(dn),At($r),kC(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(_p(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,wi!==null&&(Rw(wi),wi=null))),Mw(t,e),Vr(e),null;case 5:DC(e);var i=yl(Dv.current);if(r=e.type,t!==null&&e.stateNode!=null)$B(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(ce(166));return Vr(e),null}if(t=yl(fa.current),_p(e)){n=e.stateNode,r=e.type;var a=e.memoizedProps;switch(n[ta]=e,n[Av]=a,t=(e.mode&1)!==0,r){case"dialog":Lt("cancel",n),Lt("close",n);break;case"iframe":case"object":case"embed":Lt("load",n);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[ta]=e,t[Av]=n,ZB(t,e,!1,!1),e.stateNode=t;e:{switch(o=ew(r,n),r){case"dialog":Lt("cancel",t),Lt("close",t),i=n;break;case"iframe":case"object":case"embed":Lt("load",t),i=n;break;case"video":case"audio":for(i=0;iFc&&(e.flags|=128,n=!0,Xf(a,!1),e.lanes=4194304)}else{if(!n)if(t=zm(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Xf(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Pt)return Vr(e),null}else 2*Yt()-a.renderingStartTime>Fc&&r!==1073741824&&(e.flags|=128,n=!0,Xf(a,!1),e.lanes=4194304);a.isBackwards?(o.sibling=e.child,e.child=o):(r=a.last,r!==null?r.sibling=o:e.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Yt(),e.sibling=null,r=Et.current,Mt(Et,n?r&1|2:r&1),e):(Vr(e),null);case 22:case 23:return GC(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?xn&1073741824&&(Vr(e),e.subtreeFlags&6&&(e.flags|=8192)):Vr(e),null;case 24:return null;case 25:return null}throw Error(ce(156,e.tag))}function W7(t,e){switch(wC(e),e.tag){case 1:return pn(e.type)&&Dm(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Bc(),At(dn),At($r),kC(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return DC(e),null;case 13:if(At(Et),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ce(340));Oc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return At(Et),null;case 4:return Bc(),null;case 10:return MC(e.type._context),null;case 22:case 23:return GC(),null;case 24:return null;default:return null}}var wp=!1,Hr=!1,U7=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function hc(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ft(t,e,n)}else r.current=null}function Lw(t,e,r){try{r()}catch(n){Ft(t,e,n)}}var UP=!1;function Z7(t,e){if(cw=Mm,t=J5(),xC(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=t,h=null;t:for(;;){for(var v;f!==r||i!==0&&f.nodeType!==3||(s=o+i),f!==a||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(v=f.firstChild)!==null;)h=f,f=v;for(;;){if(f===t)break t;if(h===r&&++u===i&&(s=o),h===a&&++c===n&&(l=o),(v=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=v}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(fw={focusedElem:t,selectionRange:r},Mm=!1,Pe=e;Pe!==null;)if(e=Pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Pe=t;else for(;Pe!==null;){e=Pe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,m=p.memoizedState,y=e.stateNode,x=y.getSnapshotBeforeUpdate(e.elementType===e.type?g:_i(e.type,g),m);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(b){Ft(e,e.return,b)}if(t=e.sibling,t!==null){t.return=e.return,Pe=t;break}Pe=e.return}return p=UP,UP=!1,p}function Qh(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var a=i.destroy;i.destroy=void 0,a!==void 0&&Lw(e,r,a)}i=i.next}while(i!==n)}}function h0(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Aw(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function XB(t){var e=t.alternate;e!==null&&(t.alternate=null,XB(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ta],delete e[Av],delete e[dw],delete e[A7],delete e[P7])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function qB(t){return t.tag===5||t.tag===3||t.tag===4}function ZP(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||qB(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Pw(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Pm));else if(n!==4&&(t=t.child,t!==null))for(Pw(t,e,r),t=t.sibling;t!==null;)Pw(t,e,r),t=t.sibling}function Dw(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Dw(t,e,r),t=t.sibling;t!==null;)Dw(t,e,r),t=t.sibling}var Mr=null,Si=!1;function _o(t,e,r){for(r=r.child;r!==null;)KB(t,e,r),r=r.sibling}function KB(t,e,r){if(ca&&typeof ca.onCommitFiberUnmount=="function")try{ca.onCommitFiberUnmount(i0,r)}catch{}switch(r.tag){case 5:Hr||hc(r,e);case 6:var n=Mr,i=Si;Mr=null,_o(t,e,r),Mr=n,Si=i,Mr!==null&&(Si?(t=Mr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Mr.removeChild(r.stateNode));break;case 18:Mr!==null&&(Si?(t=Mr,r=r.stateNode,t.nodeType===8?nx(t.parentNode,r):t.nodeType===1&&nx(t,r),bv(t)):nx(Mr,r.stateNode));break;case 4:n=Mr,i=Si,Mr=r.stateNode.containerInfo,Si=!0,_o(t,e,r),Mr=n,Si=i;break;case 0:case 11:case 14:case 15:if(!Hr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Lw(r,e,o),i=i.next}while(i!==n)}_o(t,e,r);break;case 1:if(!Hr&&(hc(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Ft(r,e,s)}_o(t,e,r);break;case 21:_o(t,e,r);break;case 22:r.mode&1?(Hr=(n=Hr)||r.memoizedState!==null,_o(t,e,r),Hr=n):_o(t,e,r);break;default:_o(t,e,r)}}function $P(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new U7),e.forEach(function(n){var i=t9.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function di(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=Yt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Y7(n/1960))-n,10t?16:t,zo===null)var n=!1;else{if(t=zo,zo=null,Gm=0,ft&6)throw Error(ce(331));var i=ft;for(ft|=4,Pe=t.current;Pe!==null;){var a=Pe,o=a.child;if(Pe.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lYt()-FC?Ml(t,0):VC|=r),gn(t,e)}function a3(t,e){e===0&&(t.mode&1?(e=vp,vp<<=1,!(vp&130023424)&&(vp=4194304)):e=1);var r=en();t=ro(t,e),t!==null&&(gd(t,e,r),gn(t,r))}function e9(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),a3(t,r)}function t9(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(ce(314))}n!==null&&n.delete(e),a3(t,r)}var o3;o3=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||dn.current)vn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return vn=!1,G7(t,e,r);vn=!!(t.flags&131072)}else vn=!1,Pt&&e.flags&1048576&&cB(e,Em,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Xg(t,e),t=e.pendingProps;var i=Nc(e,$r.current);Cc(e,r),i=EC(null,e,n,t,i,r);var a=RC();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,pn(n)?(a=!0,km(e)):a=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,AC(e),i.updater=f0,e.stateNode=i,i._reactInternals=e,xw(e,n,t,r),e=bw(null,e,n,!0,a,r)):(e.tag=0,Pt&&a&&SC(e),qr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Xg(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=n9(n),t=_i(n,t),i){case 0:e=ww(null,e,n,t,r);break e;case 1:e=GP(null,e,n,t,r);break e;case 11:e=FP(null,e,n,t,r);break e;case 14:e=jP(null,e,n,_i(n.type,t),r);break e}throw Error(ce(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),ww(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),GP(t,e,n,i,r);case 3:e:{if(HB(e),t===null)throw Error(ce(387));n=e.pendingProps,a=e.memoizedState,i=a.element,gB(t,e),Om(e,n,null,r);var o=e.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=a,e.memoizedState=a,e.flags&256){i=Vc(Error(ce(423)),e),e=HP(t,e,n,r,i);break e}else if(n!==i){i=Vc(Error(ce(424)),e),e=HP(t,e,n,r,i);break e}else for(Cn=Xo(e.stateNode.containerInfo.firstChild),Dn=e,Pt=!0,wi=null,r=dB(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Oc(),n===i){e=no(t,e,r);break e}qr(t,e,n,r)}e=e.child}return e;case 5:return mB(e),t===null&&mw(e),n=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,hw(n,i)?o=null:a!==null&&hw(n,a)&&(e.flags|=32),GB(t,e),qr(t,e,o,r),e.child;case 6:return t===null&&mw(e),null;case 13:return WB(t,e,r);case 4:return PC(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=zc(e,null,n,r):qr(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),FP(t,e,n,i,r);case 7:return qr(t,e,e.pendingProps,r),e.child;case 8:return qr(t,e,e.pendingProps.children,r),e.child;case 12:return qr(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,a=e.memoizedProps,o=i.value,Mt(Rm,n._currentValue),n._currentValue=o,a!==null)if(ki(a.value,o)){if(a.children===i.children&&!dn.current){e=no(t,e,r);break e}}else for(a=e.child,a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=$a(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),yw(a.return,r,e),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===e.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(ce(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),yw(o,r,e),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}qr(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Cc(e,r),i=ni(i),n=n(i),e.flags|=1,qr(t,e,n,r),e.child;case 14:return n=e.type,i=_i(n,e.pendingProps),i=_i(n.type,i),jP(t,e,n,i,r);case 15:return FB(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),Xg(t,e),e.tag=1,pn(n)?(t=!0,km(e)):t=!1,Cc(e,r),zB(e,n,i),xw(e,n,i,r),bw(null,e,n,!0,t,r);case 19:return UB(t,e,r);case 22:return jB(t,e,r)}throw Error(ce(156,e.tag))};function s3(t,e){return R5(t,e)}function r9(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jn(t,e,r,n){return new r9(t,e,r,n)}function WC(t){return t=t.prototype,!(!t||!t.isReactComponent)}function n9(t){if(typeof t=="function")return WC(t)?1:0;if(t!=null){if(t=t.$$typeof,t===uC)return 11;if(t===cC)return 14}return 2}function Jo(t,e){var r=t.alternate;return r===null?(r=Jn(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Qg(t,e,r,n,i,a){var o=2;if(n=t,typeof t=="function")WC(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case nc:return Ll(r.children,i,a,e);case lC:o=8,i|=8;break;case WS:return t=Jn(12,r,e,i|2),t.elementType=WS,t.lanes=a,t;case US:return t=Jn(13,r,e,i),t.elementType=US,t.lanes=a,t;case ZS:return t=Jn(19,r,e,i),t.elementType=ZS,t.lanes=a,t;case m5:return d0(r,i,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case p5:o=10;break e;case g5:o=9;break e;case uC:o=11;break e;case cC:o=14;break e;case Do:o=16,n=null;break e}throw Error(ce(130,t==null?t:typeof t,""))}return e=Jn(o,r,e,i),e.elementType=t,e.type=n,e.lanes=a,e}function Ll(t,e,r,n){return t=Jn(7,t,n,e),t.lanes=r,t}function d0(t,e,r,n){return t=Jn(22,t,n,e),t.elementType=m5,t.lanes=r,t.stateNode={isHidden:!1},t}function fx(t,e,r){return t=Jn(6,t,null,e),t.lanes=r,t}function hx(t,e,r){return e=Jn(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function i9(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Z_(0),this.expirationTimes=Z_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Z_(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function UC(t,e,r,n,i,a,o,s,l){return t=new i9(t,e,r,s,l),e===1?(e=1,a===!0&&(e|=8)):e=0,a=Jn(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},AC(a),t}function a9(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f3)}catch(t){console.error(t)}}f3(),f5.exports=En;var h3=f5.exports,tD=h3;GS.createRoot=tD.createRoot,GS.hydrateRoot=tD.hydrateRoot;/** * @remix-run/router v1.23.2 * * Copyright (c) Remix Software Inc. @@ -46,7 +46,7 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Nv(){return Nv=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function XC(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function f9(){return Math.random().toString(36).substr(2,8)}function nD(t,e){return{usr:t.state,key:t.key,idx:e}}function Nw(t,e,r,n){return r===void 0&&(r=null),Nv({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?lf(e):e,{state:r,key:e&&e.key||n||f9()})}function Um(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function lf(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function h9(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=zo.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Nv({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=zo.Pop;let m=c(),y=m==null?null:m-u;u=m,l&&l({action:s,location:g.location,delta:y})}function h(m,y){s=zo.Push;let x=Nw(g.location,m,y);u=c()+1;let S=nD(x,u),b=g.createHref(x);try{o.pushState(S,"",b)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;i.location.assign(b)}a&&l&&l({action:s,location:g.location,delta:1})}function v(m,y){s=zo.Replace;let x=Nw(g.location,m,y);u=c();let S=nD(x,u),b=g.createHref(x);o.replaceState(S,"",b),a&&l&&l({action:s,location:g.location,delta:0})}function p(m){let y=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof m=="string"?m:Um(m);return x=x.replace(/ $/,"%20"),nr(y,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,y)}let g={get action(){return s},get location(){return t(i,o)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(rD,f),l=m,()=>{i.removeEventListener(rD,f),l=null}},createHref(m){return e(i,m)},createURL:p,encodeLocation(m){let y=p(m);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:v,go(m){return o.go(m)}};return g}var iD;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(iD||(iD={}));function v9(t,e,r){return r===void 0&&(r="/"),d9(t,e,r)}function d9(t,e,r,n){let i=typeof e=="string"?lf(e):e,a=qC(i.pathname||"/",r);if(a==null)return null;let o=v3(t);p9(o);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(nr(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Jo([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(nr(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),v3(a.children,e,c,u)),!(a.path==null&&!a.index)&&e.push({path:u,score:w9(u,a.index),routesMeta:c})};return t.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of d3(a.path))i(a,o,l)}),e}function d3(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=d3(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>t.startsWith("/")&&l===""?"/":l)}function p9(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:b9(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const g9=/^:[\w-]+$/,m9=3,y9=2,_9=1,x9=10,S9=-2,aD=t=>t==="*";function w9(t,e){let r=t.split("/"),n=r.length;return r.some(aD)&&(n+=S9),e&&(n+=y9),r.filter(i=>!aD(i)).reduce((i,a)=>i+(g9.test(a)?m9:a===""?_9:x9),n)}function b9(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function T9(t,e,r){let{routesMeta:n}=t,i={},a="/",o=[];for(let s=0;s{let{paramName:h,isOptional:v}=c;if(h==="*"){let g=s[f]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const p=s[f];return v&&!p?u[h]=void 0:u[h]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:t}}function M9(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),XC(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function L9(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return XC(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function qC(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}const A9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,P9=t=>A9.test(t);function D9(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?lf(t):t,a;if(r)if(P9(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),XC(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=oD(r.substring(1),"/"):a=oD(r,e)}else a=e;return{pathname:a,search:E9(n),hash:R9(i)}}function oD(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function vx(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function k9(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function p3(t,e){let r=k9(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function g3(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=lf(t):(i=Nv({},t),nr(!i.pathname||!i.pathname.includes("?"),vx("?","pathname","search",i)),nr(!i.pathname||!i.pathname.includes("#"),vx("#","pathname","hash",i)),nr(!i.search||!i.search.includes("#"),vx("#","search","hash",i)));let a=t===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let f=e.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?e[f]:"/"}let l=D9(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Jo=t=>t.join("/").replace(/\/\/+/g,"/"),I9=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),E9=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,R9=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function N9(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const m3=["post","put","patch","delete"];new Set(m3);const O9=["get",...m3];new Set(O9);/** + */function Nv(){return Nv=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function XC(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function f9(){return Math.random().toString(36).substr(2,8)}function nD(t,e){return{usr:t.state,key:t.key,idx:e}}function Nw(t,e,r,n){return r===void 0&&(r=null),Nv({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?lf(e):e,{state:r,key:e&&e.key||n||f9()})}function Um(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function lf(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function h9(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Bo.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Nv({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=Bo.Pop;let m=c(),y=m==null?null:m-u;u=m,l&&l({action:s,location:g.location,delta:y})}function h(m,y){s=Bo.Push;let x=Nw(g.location,m,y);u=c()+1;let S=nD(x,u),b=g.createHref(x);try{o.pushState(S,"",b)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;i.location.assign(b)}a&&l&&l({action:s,location:g.location,delta:1})}function v(m,y){s=Bo.Replace;let x=Nw(g.location,m,y);u=c();let S=nD(x,u),b=g.createHref(x);o.replaceState(S,"",b),a&&l&&l({action:s,location:g.location,delta:0})}function p(m){let y=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof m=="string"?m:Um(m);return x=x.replace(/ $/,"%20"),nr(y,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,y)}let g={get action(){return s},get location(){return t(i,o)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(rD,f),l=m,()=>{i.removeEventListener(rD,f),l=null}},createHref(m){return e(i,m)},createURL:p,encodeLocation(m){let y=p(m);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:v,go(m){return o.go(m)}};return g}var iD;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(iD||(iD={}));function v9(t,e,r){return r===void 0&&(r="/"),d9(t,e,r)}function d9(t,e,r,n){let i=typeof e=="string"?lf(e):e,a=qC(i.pathname||"/",r);if(a==null)return null;let o=v3(t);p9(o);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(nr(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=es([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(nr(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),v3(a.children,e,c,u)),!(a.path==null&&!a.index)&&e.push({path:u,score:w9(u,a.index),routesMeta:c})};return t.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of d3(a.path))i(a,o,l)}),e}function d3(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=d3(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>t.startsWith("/")&&l===""?"/":l)}function p9(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:b9(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const g9=/^:[\w-]+$/,m9=3,y9=2,_9=1,x9=10,S9=-2,aD=t=>t==="*";function w9(t,e){let r=t.split("/"),n=r.length;return r.some(aD)&&(n+=S9),e&&(n+=y9),r.filter(i=>!aD(i)).reduce((i,a)=>i+(g9.test(a)?m9:a===""?_9:x9),n)}function b9(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function T9(t,e,r){let{routesMeta:n}=t,i={},a="/",o=[];for(let s=0;s{let{paramName:h,isOptional:v}=c;if(h==="*"){let g=s[f]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const p=s[f];return v&&!p?u[h]=void 0:u[h]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:t}}function M9(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),XC(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function L9(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return XC(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function qC(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}const A9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,P9=t=>A9.test(t);function D9(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?lf(t):t,a;if(r)if(P9(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),XC(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=oD(r.substring(1),"/"):a=oD(r,e)}else a=e;return{pathname:a,search:E9(n),hash:R9(i)}}function oD(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function vx(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function k9(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function p3(t,e){let r=k9(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function g3(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=lf(t):(i=Nv({},t),nr(!i.pathname||!i.pathname.includes("?"),vx("?","pathname","search",i)),nr(!i.pathname||!i.pathname.includes("#"),vx("#","pathname","hash",i)),nr(!i.search||!i.search.includes("#"),vx("#","search","hash",i)));let a=t===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let f=e.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?e[f]:"/"}let l=D9(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const es=t=>t.join("/").replace(/\/\/+/g,"/"),I9=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),E9=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,R9=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function N9(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const m3=["post","put","patch","delete"];new Set(m3);const O9=["get",...m3];new Set(O9);/** * React Router v6.30.3 * * Copyright (c) Remix Software Inc. @@ -55,7 +55,7 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ov(){return Ov=Object.assign?Object.assign.bind():function(t){for(var e=1;e{s.current=!0}),q.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=g3(u,JSON.parse(o),a,c.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Jo([e,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[e,n,o,a,t])}function x3(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=q.useContext(tu),{matches:i}=q.useContext(ru),{pathname:a}=Sd(),o=JSON.stringify(p3(i,n.v7_relativeSplatPath));return q.useMemo(()=>g3(t,JSON.parse(o),a,r==="path"),[t,o,a,r])}function G9(t,e){return j9(t,e)}function j9(t,e,r,n){xd()||nr(!1);let{navigator:i}=q.useContext(tu),{matches:a}=q.useContext(ru),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Sd(),c;if(e){var f;let m=typeof e=="string"?lf(e):e;l==="/"||(f=m.pathname)!=null&&f.startsWith(l)||nr(!1),c=m}else c=u;let h=c.pathname||"/",v=h;if(l!=="/"){let m=l.replace(/^\//,"").split("/");v="/"+h.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=v9(t,{pathname:v}),g=$9(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:Jo([l,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:Jo([l,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),a,r,n);return e&&g?q.createElement(_0.Provider,{value:{location:Ov({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:zo.Pop}},g):g}function H9(){let t=K9(),e=N9(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return q.createElement(q.Fragment,null,q.createElement("h2",null,"Unexpected Application Error!"),q.createElement("h3",{style:{fontStyle:"italic"}},e),r?q.createElement("pre",{style:i},r):null,null)}const W9=q.createElement(H9,null);class U9 extends q.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,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?q.createElement(ru.Provider,{value:this.props.routeContext},q.createElement(y3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Z9(t){let{routeContext:e,match:r,children:n}=t,i=q.useContext(KC);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),q.createElement(ru.Provider,{value:e},n)}function $9(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var a;if(!r)return null;if(r.errors)t=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);c>=0||nr(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,h)=>{let v,p=!1,g=null,m=null;r&&(v=s&&f.route.id?s[f.route.id]:void 0,g=f.route.errorElement||W9,l&&(u<0&&h===0?(J9("route-fallback"),p=!0,m=null):u===h&&(p=!0,m=f.route.hydrateFallbackElement||null)));let y=e.concat(o.slice(0,h+1)),x=()=>{let S;return v?S=g:p?S=m:f.route.Component?S=q.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=c,q.createElement(Z9,{match:f,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:S})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?q.createElement(U9,{location:r.location,revalidation:r.revalidation,component:g,error:v,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):x()},null)}var S3=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(S3||{}),w3=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(w3||{});function Y9(t){let e=q.useContext(KC);return e||nr(!1),e}function X9(t){let e=q.useContext(z9);return e||nr(!1),e}function q9(t){let e=q.useContext(ru);return e||nr(!1),e}function b3(t){let e=q9(),r=e.matches[e.matches.length-1];return r.route.id||nr(!1),r.route.id}function K9(){var t;let e=q.useContext(y3),r=X9(),n=b3();return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function Q9(){let{router:t}=Y9(S3.UseNavigateStable),e=b3(w3.UseNavigateStable),r=q.useRef(!1);return _3(()=>{r.current=!0}),q.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Ov({fromRouteId:e},a)))},[t,e])}const sD={};function J9(t,e,r){sD[t]||(sD[t]=!0)}function eZ(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function Ku(t){nr(!1)}function tZ(t){let{basename:e="/",children:r=null,location:n,navigationType:i=zo.Pop,navigator:a,static:o=!1,future:s}=t;xd()&&nr(!1);let l=e.replace(/^\/*/,"/"),u=q.useMemo(()=>({basename:l,navigator:a,static:o,future:Ov({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=lf(n));let{pathname:c="/",search:f="",hash:h="",state:v=null,key:p="default"}=n,g=q.useMemo(()=>{let m=qC(c,l);return m==null?null:{location:{pathname:m,search:f,hash:h,state:v,key:p},navigationType:i}},[l,c,f,h,v,p,i]);return g==null?null:q.createElement(tu.Provider,{value:u},q.createElement(_0.Provider,{children:r,value:g}))}function rZ(t){let{children:e,location:r}=t;return G9(Ow(e),r)}new Promise(()=>{});function Ow(t,e){e===void 0&&(e=[]);let r=[];return q.Children.forEach(t,(n,i)=>{if(!q.isValidElement(n))return;let a=[...e,i];if(n.type===q.Fragment){r.push.apply(r,Ow(n.props.children,a));return}n.type!==Ku&&nr(!1),!n.props.index||!n.props.children||nr(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Ow(n.props.children,a)),r.push(o)}),r}/** + */function Ov(){return Ov=Object.assign?Object.assign.bind():function(t){for(var e=1;e{s.current=!0}),q.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=g3(u,JSON.parse(o),a,c.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:es([e,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[e,n,o,a,t])}function x3(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=q.useContext(tu),{matches:i}=q.useContext(ru),{pathname:a}=Sd(),o=JSON.stringify(p3(i,n.v7_relativeSplatPath));return q.useMemo(()=>g3(t,JSON.parse(o),a,r==="path"),[t,o,a,r])}function j9(t,e){return G9(t,e)}function G9(t,e,r,n){xd()||nr(!1);let{navigator:i}=q.useContext(tu),{matches:a}=q.useContext(ru),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Sd(),c;if(e){var f;let m=typeof e=="string"?lf(e):e;l==="/"||(f=m.pathname)!=null&&f.startsWith(l)||nr(!1),c=m}else c=u;let h=c.pathname||"/",v=h;if(l!=="/"){let m=l.replace(/^\//,"").split("/");v="/"+h.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=v9(t,{pathname:v}),g=$9(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:es([l,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:es([l,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),a,r,n);return e&&g?q.createElement(_0.Provider,{value:{location:Ov({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Bo.Pop}},g):g}function H9(){let t=K9(),e=N9(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return q.createElement(q.Fragment,null,q.createElement("h2",null,"Unexpected Application Error!"),q.createElement("h3",{style:{fontStyle:"italic"}},e),r?q.createElement("pre",{style:i},r):null,null)}const W9=q.createElement(H9,null);class U9 extends q.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,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?q.createElement(ru.Provider,{value:this.props.routeContext},q.createElement(y3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Z9(t){let{routeContext:e,match:r,children:n}=t,i=q.useContext(KC);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),q.createElement(ru.Provider,{value:e},n)}function $9(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var a;if(!r)return null;if(r.errors)t=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);c>=0||nr(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,h)=>{let v,p=!1,g=null,m=null;r&&(v=s&&f.route.id?s[f.route.id]:void 0,g=f.route.errorElement||W9,l&&(u<0&&h===0?(J9("route-fallback"),p=!0,m=null):u===h&&(p=!0,m=f.route.hydrateFallbackElement||null)));let y=e.concat(o.slice(0,h+1)),x=()=>{let S;return v?S=g:p?S=m:f.route.Component?S=q.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=c,q.createElement(Z9,{match:f,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:S})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?q.createElement(U9,{location:r.location,revalidation:r.revalidation,component:g,error:v,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):x()},null)}var S3=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(S3||{}),w3=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(w3||{});function Y9(t){let e=q.useContext(KC);return e||nr(!1),e}function X9(t){let e=q.useContext(z9);return e||nr(!1),e}function q9(t){let e=q.useContext(ru);return e||nr(!1),e}function b3(t){let e=q9(),r=e.matches[e.matches.length-1];return r.route.id||nr(!1),r.route.id}function K9(){var t;let e=q.useContext(y3),r=X9(),n=b3();return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function Q9(){let{router:t}=Y9(S3.UseNavigateStable),e=b3(w3.UseNavigateStable),r=q.useRef(!1);return _3(()=>{r.current=!0}),q.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Ov({fromRouteId:e},a)))},[t,e])}const sD={};function J9(t,e,r){sD[t]||(sD[t]=!0)}function eZ(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function Ku(t){nr(!1)}function tZ(t){let{basename:e="/",children:r=null,location:n,navigationType:i=Bo.Pop,navigator:a,static:o=!1,future:s}=t;xd()&&nr(!1);let l=e.replace(/^\/*/,"/"),u=q.useMemo(()=>({basename:l,navigator:a,static:o,future:Ov({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=lf(n));let{pathname:c="/",search:f="",hash:h="",state:v=null,key:p="default"}=n,g=q.useMemo(()=>{let m=qC(c,l);return m==null?null:{location:{pathname:m,search:f,hash:h,state:v,key:p},navigationType:i}},[l,c,f,h,v,p,i]);return g==null?null:q.createElement(tu.Provider,{value:u},q.createElement(_0.Provider,{children:r,value:g}))}function rZ(t){let{children:e,location:r}=t;return j9(Ow(e),r)}new Promise(()=>{});function Ow(t,e){e===void 0&&(e=[]);let r=[];return q.Children.forEach(t,(n,i)=>{if(!q.isValidElement(n))return;let a=[...e,i];if(n.type===q.Fragment){r.push.apply(r,Ow(n.props.children,a));return}n.type!==Ku&&nr(!1),!n.props.index||!n.props.children||nr(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Ow(n.props.children,a)),r.push(o)}),r}/** * React Router DOM v6.30.3 * * Copyright (c) Remix Software Inc. @@ -304,12 +304,12 @@ Error generating stack: `+a.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const GZ=Ze("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** + */const jZ=Ze("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const R3=Ze("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);async function Or(t){const e=await fetch(t);if(!e.ok)throw new Error(`API error: ${e.status} ${e.statusText}`);return e.json()}async function vD(){return Or("/api/status")}async function jZ(){return Or("/api/health")}async function HZ(){return Or("/api/nodes")}async function WZ(){return Or("/api/edges")}async function UZ(){return Or("/api/sources")}async function ZZ(){return Or("/api/alerts/active")}async function N3(){return Or("/api/env/status")}async function $Z(){return Or("/api/env/active")}async function YZ(){return Or("/api/env/propagation")}async function XZ(){return Or("/api/env/swpc")}async function qZ(){return Or("/api/env/ducting")}async function KZ(){return Or("/api/env/fires")}async function QZ(){return Or("/api/env/avalanche")}async function JZ(){return Or("/api/env/streams")}async function e$(){return Or("/api/env/traffic")}async function t$(){return Or("/api/env/roads")}async function r$(){return Or("/api/regions")}function O3(){const[t,e]=q.useState(!1),[r,n]=q.useState(null),[i,a]=q.useState(null),o=q.useRef(null),s=q.useRef(null),l=q.useRef(1e3),u=q.useCallback(()=>{var h;if(((h=o.current)==null?void 0:h.readyState)===WebSocket.OPEN)return;const f=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/live`;try{const v=new WebSocket(f);o.current=v,v.onopen=()=>{e(!0),l.current=1e3},v.onmessage=g=>{try{const m=JSON.parse(g.data);switch(m.type){case"health_update":n(m.data);break;case"alert_fired":a(m.data);break}}catch(m){console.error("Failed to parse WebSocket message:",m)}},v.onclose=()=>{e(!1),o.current=null;const g=Math.min(l.current,3e4);s.current=window.setTimeout(()=>{l.current=Math.min(g*2,3e4),u()},g)},v.onerror=()=>{v.close()};const p=setInterval(()=>{v.readyState===WebSocket.OPEN&&v.send("ping")},3e4);v.addEventListener("close",()=>{clearInterval(p)})}catch(v){console.error("Failed to create WebSocket:",v)}},[]);return q.useEffect(()=>(u(),()=>{s.current&&clearTimeout(s.current),o.current&&o.current.close()}),[u]),{connected:t,lastHealth:r,lastAlert:i}}const z3=[{path:"/",label:"Dashboard",icon:k3},{path:"/mesh",label:"Mesh",icon:x0},{path:"/environment",label:"Environment",icon:e2},{path:"/config",label:"Config",icon:E3},{path:"/alerts",label:"Alerts",icon:C3}];function n$(t){const e=Math.floor(t/86400),r=Math.floor(t%86400/3600),n=Math.floor(t%3600/60);return e>0?`${e}d ${r}h`:r>0?`${r}h ${n}m`:`${n}m`}function i$(t){const e=z3.find(r=>r.path===t);return(e==null?void 0:e.label)||"Dashboard"}function a$({children:t}){var l;const e=Sd(),{connected:r}=O3(),[n,i]=q.useState(null),[a,o]=q.useState(new Date);q.useEffect(()=>{vD().then(i).catch(console.error);const u=setInterval(()=>{vD().then(i).catch(console.error)},3e4);return()=>clearInterval(u)},[]),q.useEffect(()=>{const u=setInterval(()=>o(new Date),1e3);return()=>clearInterval(u)},[]);const s=a.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return A.jsxs("div",{className:"flex h-screen overflow-hidden bg-bg text-slate-200",children:[A.jsxs("aside",{className:"w-[220px] flex-shrink-0 bg-bg-card border-r border-border flex flex-col overflow-y-auto",children:[A.jsx("div",{className:"p-5 border-b border-border",children:A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center text-white font-bold text-xl",children:"M"}),A.jsxs("div",{children:[A.jsx("div",{className:"font-semibold text-lg",children:"MeshAI"}),A.jsxs("div",{className:"text-xs text-slate-500 font-mono",children:["v",(n==null?void 0:n.version)||"..."]})]})]})}),A.jsx("nav",{className:"flex-1 py-4",children:z3.map(u=>{const c=e.pathname===u.path,f=u.icon;return A.jsxs(hZ,{to:u.path,className:`flex items-center gap-3 px-5 py-3 text-sm transition-colors relative ${c?"text-blue-400 bg-blue-500/10":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[c&&A.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500"}),A.jsx(f,{size:18}),u.label]},u.path)})}),A.jsxs("div",{className:"p-5 border-t border-border",children:[A.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[A.jsx("div",{className:`w-2 h-2 rounded-full ${n!=null&&n.connected?"bg-green-500":"bg-red-500"}`}),A.jsx("span",{className:"text-xs text-slate-400",children:n!=null&&n.connected?"Connected":"Disconnected"})]}),A.jsxs("div",{className:"text-xs text-slate-500 font-mono truncate",children:[(l=n==null?void 0:n.connection_type)==null?void 0:l.toUpperCase(),": ",n==null?void 0:n.connection_target]}),A.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:["Uptime: ",n?n$(n.uptime_seconds):"..."]})]})]}),A.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[A.jsxs("header",{className:"h-14 flex-shrink-0 border-b border-border bg-bg-card flex items-center justify-between px-6",children:[A.jsx("h1",{className:"text-lg font-semibold",children:i$(e.pathname)}),A.jsxs("div",{className:"flex items-center gap-6",children:[A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("div",{className:`w-2 h-2 rounded-full ${r?"bg-green-500 animate-pulse-slow":"bg-slate-500"}`}),A.jsx("span",{className:"text-xs text-slate-400",children:r?"Live":"Offline"})]}),A.jsxs("div",{className:"text-sm font-mono text-slate-400",children:[s," MT"]})]})]}),A.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:t})]})]})}function o$({health:t}){const e=t.score,r=t.tier,i=(s=>s>=80?"#22c55e":s>=60?"#f59e0b":"#ef4444")(e),a=2*Math.PI*45,o=e/100*a;return A.jsx("div",{className:"flex flex-col items-center",children:A.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 100 100",children:[A.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#1e2a3a",strokeWidth:"8"}),A.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:i,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:a-o,transform:"rotate(-90 50 50)",className:"transition-all duration-500"}),A.jsx("text",{x:"50",y:"46",textAnchor:"middle",className:"fill-slate-100 font-mono text-2xl font-bold",style:{fontSize:"24px"},children:e.toFixed(1)}),A.jsx("text",{x:"50",y:"62",textAnchor:"middle",className:"fill-slate-400 text-xs",style:{fontSize:"10px"},children:r})]})})}function Cp({label:t,value:e}){const r=n=>n>=80?"bg-green-500":n>=60?"bg-amber-500":"bg-red-500";return A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsx("div",{className:"w-24 text-xs text-slate-400 truncate",children:t}),A.jsx("div",{className:"flex-1 h-2 bg-border rounded-full overflow-hidden",children:A.jsx("div",{className:`h-full ${r(e)} transition-all duration-300`,style:{width:`${e}%`}})}),A.jsx("div",{className:"w-12 text-right text-xs font-mono text-slate-300",children:e.toFixed(1)})]})}function s$({alert:t}){const r=(i=>{switch(i.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:L3,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:S0,iconColor:"text-amber-500"};default:return{bg:"bg-green-500/10",border:"border-green-500",icon:Bw,iconColor:"text-green-500"}}})(t.severity),n=r.icon;return A.jsxs("div",{className:`p-3 rounded-lg ${r.bg} border-l-2 ${r.border} flex items-start gap-3`,children:[A.jsx(n,{size:16,className:r.iconColor}),A.jsxs("div",{className:"flex-1 min-w-0",children:[A.jsx("div",{className:"text-sm text-slate-200",children:t.message}),A.jsx("div",{className:"text-xs text-slate-500 mt-1",children:t.timestamp||"Just now"})]})]})}function l$({source:t}){const e=()=>t.is_loaded?t.last_error?"bg-amber-500":"bg-green-500":"bg-red-500";return A.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-bg-hover",children:[A.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),A.jsxs("div",{className:"flex-1 min-w-0",children:[A.jsx("div",{className:"text-sm text-slate-200 truncate",children:t.name}),A.jsxs("div",{className:"text-xs text-slate-500",children:[t.node_count," nodes * ",t.type]})]})]})}function Mp({icon:t,label:e,value:r,subvalue:n}){return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4",children:[A.jsxs("div",{className:"flex items-center gap-2 text-slate-400 mb-2",children:[A.jsx(t,{size:14}),A.jsx("span",{className:"text-xs",children:e})]}),A.jsx("div",{className:"font-mono text-xl text-slate-100",children:r}),n&&A.jsx("div",{className:"text-xs text-slate-500 mt-1",children:n})]})}function u$({propagation:t}){var o,s,l;if(!t)return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"RF Propagation"}),A.jsx("div",{className:"text-slate-500",children:A.jsx("p",{children:"Loading propagation data..."})})]});const e=t.hf,r=t.uhf_ducting,n=u=>{if(!u)return"text-slate-400";switch(u){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},i=e&&(e.sfi||e.kp_current!==void 0),a=r&&r.condition;return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(R3,{size:14}),"RF Propagation"]}),A.jsxs("div",{className:"mb-4",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar/Geomagnetic"}),i?A.jsxs("div",{className:"space-y-1",children:[A.jsxs("div",{className:"text-sm font-mono text-slate-200",children:["SFI ",((o=e.sfi)==null?void 0:o.toFixed(0))||"?"," / Kp ",((s=e.kp_current)==null?void 0:s.toFixed(1))||"?"]}),A.jsxs("div",{className:"text-xs text-slate-400",children:["R",e.r_scale??0," / S",e.s_scale??0," / G",e.g_scale??0]}),e.r_scale!==void 0&&e.r_scale>0&&A.jsxs("div",{className:"text-xs text-amber-500",children:["R",e.r_scale," Radio Blackout"]})]}):A.jsx("div",{className:"text-sm text-slate-500",children:"No data"})]}),A.jsxs("div",{children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Tropospheric"}),a?A.jsxs("div",{className:"space-y-1",children:[A.jsx("div",{className:`text-sm font-medium ${n(r.condition)}`,children:r.condition==="normal"?"Normal":(l=r.condition)==null?void 0:l.replace("_"," ").replace(/\b\w/g,u=>u.toUpperCase())}),A.jsxs("div",{className:"text-xs text-slate-400 font-mono",children:["dM/dz: ",r.min_gradient??"?"," M-units/km"]}),r.duct_thickness_m&&A.jsxs("div",{className:"text-xs text-slate-400",children:["Duct: ~",r.duct_thickness_m,"m thick"]})]}):A.jsx("div",{className:"text-sm text-slate-500",children:"No ducting data"})]})]})}function c$(){var g,m,y,x,S;const[t,e]=q.useState(null),[r,n]=q.useState([]),[i,a]=q.useState([]),[o,s]=q.useState(null),[l,u]=q.useState(null),[c,f]=q.useState(!0),[h,v]=q.useState(null),{lastHealth:p}=O3();return q.useEffect(()=>{Promise.all([jZ(),UZ(),ZZ(),N3(),YZ().catch(()=>null)]).then(([b,T,C,M,D])=>{e(b),n(T),a(C),s(M),u(D),f(!1)}).catch(b=>{v(b.message),f(!1)})},[]),q.useEffect(()=>{p&&e(p)},[p]),c?A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsx("div",{className:"text-slate-400",children:"Loading..."})}):h?A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsxs("div",{className:"text-red-400",children:["Error: ",h]})}):A.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Mesh Health"}),t&&A.jsxs(A.Fragment,{children:[A.jsx(o$,{health:t}),A.jsxs("div",{className:"mt-6 space-y-3",children:[A.jsx(Cp,{label:"Infrastructure",value:((g=t.pillars)==null?void 0:g.infrastructure)??0}),A.jsx(Cp,{label:"Utilization",value:((m=t.pillars)==null?void 0:m.utilization)??0}),A.jsx(Cp,{label:"Behavior",value:((y=t.pillars)==null?void 0:y.behavior)??0}),A.jsx(Cp,{label:"Power",value:((x=t.pillars)==null?void 0:x.power)??0})]})]})]}),A.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Active Alerts"}),i.length>0?A.jsx("div",{className:"space-y-3",children:i.map((b,T)=>A.jsx(s$,{alert:b},T))}):A.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[A.jsx(Jg,{size:16,className:"text-green-500"}),A.jsx("span",{children:"No active alerts"})]})]}),A.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[A.jsx(Mp,{icon:x0,label:"Nodes Online",value:(t==null?void 0:t.total_nodes)||0,subvalue:`${(t==null?void 0:t.unlocated_count)||0} unlocated`}),A.jsx(Mp,{icon:A3,label:"Infrastructure",value:`${(t==null?void 0:t.infra_online)||0}/${(t==null?void 0:t.infra_total)||0}`,subvalue:(t==null?void 0:t.infra_online)===(t==null?void 0:t.infra_total)?"All online":"Some offline"}),A.jsx(Mp,{icon:QC,label:"Utilization",value:`${((S=t==null?void 0:t.util_percent)==null?void 0:S.toFixed(1))||0}%`,subvalue:`${(t==null?void 0:t.flagged_nodes)||0} flagged`}),A.jsx(Mp,{icon:I3,label:"Regions",value:(t==null?void 0:t.total_regions)||0,subvalue:`${(t==null?void 0:t.battery_warnings)||0} battery warnings`})]})]}),A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:["Mesh Sources (",r.length,")"]}),r.length>0?A.jsx("div",{className:"space-y-2",children:r.map((b,T)=>A.jsx(l$,{source:b},T))}):A.jsx("div",{className:"text-slate-500 py-4",children:"No sources configured"})]}),A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Environmental Feeds"}),o!=null&&o.enabled?A.jsxs("div",{className:"text-slate-400",children:[o.feeds.length," feeds active"]}):A.jsxs("div",{className:"text-slate-500",children:[A.jsx("p",{children:"Environmental feeds not enabled."}),A.jsx("p",{className:"text-xs mt-2",children:"Enable in config.yaml"})]})]}),A.jsx(u$,{propagation:l})]})}/*! ***************************************************************************** + */const R3=Ze("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);async function Or(t){const e=await fetch(t);if(!e.ok)throw new Error(`API error: ${e.status} ${e.statusText}`);return e.json()}async function vD(){return Or("/api/status")}async function GZ(){return Or("/api/health")}async function HZ(){return Or("/api/nodes")}async function WZ(){return Or("/api/edges")}async function UZ(){return Or("/api/sources")}async function ZZ(){return Or("/api/alerts/active")}async function N3(){return Or("/api/env/status")}async function $Z(){return Or("/api/env/active")}async function YZ(){return Or("/api/env/propagation")}async function XZ(){return Or("/api/env/swpc")}async function qZ(){return Or("/api/env/ducting")}async function KZ(){return Or("/api/env/fires")}async function QZ(){return Or("/api/env/avalanche")}async function JZ(){return Or("/api/env/streams")}async function e$(){return Or("/api/env/traffic")}async function t$(){return Or("/api/env/roads")}async function r$(){return Or("/api/regions")}function O3(){const[t,e]=q.useState(!1),[r,n]=q.useState(null),[i,a]=q.useState(null),o=q.useRef(null),s=q.useRef(null),l=q.useRef(1e3),u=q.useCallback(()=>{var h;if(((h=o.current)==null?void 0:h.readyState)===WebSocket.OPEN)return;const f=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/live`;try{const v=new WebSocket(f);o.current=v,v.onopen=()=>{e(!0),l.current=1e3},v.onmessage=g=>{try{const m=JSON.parse(g.data);switch(m.type){case"health_update":n(m.data);break;case"alert_fired":a(m.data);break}}catch(m){console.error("Failed to parse WebSocket message:",m)}},v.onclose=()=>{e(!1),o.current=null;const g=Math.min(l.current,3e4);s.current=window.setTimeout(()=>{l.current=Math.min(g*2,3e4),u()},g)},v.onerror=()=>{v.close()};const p=setInterval(()=>{v.readyState===WebSocket.OPEN&&v.send("ping")},3e4);v.addEventListener("close",()=>{clearInterval(p)})}catch(v){console.error("Failed to create WebSocket:",v)}},[]);return q.useEffect(()=>(u(),()=>{s.current&&clearTimeout(s.current),o.current&&o.current.close()}),[u]),{connected:t,lastHealth:r,lastAlert:i}}const z3=[{path:"/",label:"Dashboard",icon:k3},{path:"/mesh",label:"Mesh",icon:x0},{path:"/environment",label:"Environment",icon:e2},{path:"/config",label:"Config",icon:E3},{path:"/alerts",label:"Alerts",icon:C3}];function n$(t){const e=Math.floor(t/86400),r=Math.floor(t%86400/3600),n=Math.floor(t%3600/60);return e>0?`${e}d ${r}h`:r>0?`${r}h ${n}m`:`${n}m`}function i$(t){const e=z3.find(r=>r.path===t);return(e==null?void 0:e.label)||"Dashboard"}function a$({children:t}){var l;const e=Sd(),{connected:r}=O3(),[n,i]=q.useState(null),[a,o]=q.useState(new Date);q.useEffect(()=>{vD().then(i).catch(console.error);const u=setInterval(()=>{vD().then(i).catch(console.error)},3e4);return()=>clearInterval(u)},[]),q.useEffect(()=>{const u=setInterval(()=>o(new Date),1e3);return()=>clearInterval(u)},[]);const s=a.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return A.jsxs("div",{className:"flex h-screen overflow-hidden bg-bg text-slate-200",children:[A.jsxs("aside",{className:"w-[220px] flex-shrink-0 bg-bg-card border-r border-border flex flex-col overflow-y-auto",children:[A.jsx("div",{className:"p-5 border-b border-border",children:A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center text-white font-bold text-xl",children:"M"}),A.jsxs("div",{children:[A.jsx("div",{className:"font-semibold text-lg",children:"MeshAI"}),A.jsxs("div",{className:"text-xs text-slate-500 font-mono",children:["v",(n==null?void 0:n.version)||"..."]})]})]})}),A.jsx("nav",{className:"flex-1 py-4",children:z3.map(u=>{const c=e.pathname===u.path,f=u.icon;return A.jsxs(hZ,{to:u.path,className:`flex items-center gap-3 px-5 py-3 text-sm transition-colors relative ${c?"text-blue-400 bg-blue-500/10":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[c&&A.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500"}),A.jsx(f,{size:18}),u.label]},u.path)})}),A.jsxs("div",{className:"p-5 border-t border-border",children:[A.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[A.jsx("div",{className:`w-2 h-2 rounded-full ${n!=null&&n.connected?"bg-green-500":"bg-red-500"}`}),A.jsx("span",{className:"text-xs text-slate-400",children:n!=null&&n.connected?"Connected":"Disconnected"})]}),A.jsxs("div",{className:"text-xs text-slate-500 font-mono truncate",children:[(l=n==null?void 0:n.connection_type)==null?void 0:l.toUpperCase(),": ",n==null?void 0:n.connection_target]}),A.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:["Uptime: ",n?n$(n.uptime_seconds):"..."]})]})]}),A.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[A.jsxs("header",{className:"h-14 flex-shrink-0 border-b border-border bg-bg-card flex items-center justify-between px-6",children:[A.jsx("h1",{className:"text-lg font-semibold",children:i$(e.pathname)}),A.jsxs("div",{className:"flex items-center gap-6",children:[A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("div",{className:`w-2 h-2 rounded-full ${r?"bg-green-500 animate-pulse-slow":"bg-slate-500"}`}),A.jsx("span",{className:"text-xs text-slate-400",children:r?"Live":"Offline"})]}),A.jsxs("div",{className:"text-sm font-mono text-slate-400",children:[s," MT"]})]})]}),A.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:t})]})]})}function o$({health:t}){const e=t.score,r=t.tier,i=(s=>s>=80?"#22c55e":s>=60?"#f59e0b":"#ef4444")(e),a=2*Math.PI*45,o=e/100*a;return A.jsx("div",{className:"flex flex-col items-center",children:A.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 100 100",children:[A.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#1e2a3a",strokeWidth:"8"}),A.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:i,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:a-o,transform:"rotate(-90 50 50)",className:"transition-all duration-500"}),A.jsx("text",{x:"50",y:"46",textAnchor:"middle",className:"fill-slate-100 font-mono text-2xl font-bold",style:{fontSize:"24px"},children:e.toFixed(1)}),A.jsx("text",{x:"50",y:"62",textAnchor:"middle",className:"fill-slate-400 text-xs",style:{fontSize:"10px"},children:r})]})})}function Cp({label:t,value:e}){const r=n=>n>=80?"bg-green-500":n>=60?"bg-amber-500":"bg-red-500";return A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsx("div",{className:"w-24 text-xs text-slate-400 truncate",children:t}),A.jsx("div",{className:"flex-1 h-2 bg-border rounded-full overflow-hidden",children:A.jsx("div",{className:`h-full ${r(e)} transition-all duration-300`,style:{width:`${e}%`}})}),A.jsx("div",{className:"w-12 text-right text-xs font-mono text-slate-300",children:e.toFixed(1)})]})}function s$({alert:t}){const r=(i=>{switch(i.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:L3,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:S0,iconColor:"text-amber-500"};default:return{bg:"bg-green-500/10",border:"border-green-500",icon:Bw,iconColor:"text-green-500"}}})(t.severity),n=r.icon;return A.jsxs("div",{className:`p-3 rounded-lg ${r.bg} border-l-2 ${r.border} flex items-start gap-3`,children:[A.jsx(n,{size:16,className:r.iconColor}),A.jsxs("div",{className:"flex-1 min-w-0",children:[A.jsx("div",{className:"text-sm text-slate-200",children:t.message}),A.jsx("div",{className:"text-xs text-slate-500 mt-1",children:t.timestamp||"Just now"})]})]})}function l$({source:t}){const e=()=>t.is_loaded?t.last_error?"bg-amber-500":"bg-green-500":"bg-red-500";return A.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-bg-hover",children:[A.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),A.jsxs("div",{className:"flex-1 min-w-0",children:[A.jsx("div",{className:"text-sm text-slate-200 truncate",children:t.name}),A.jsxs("div",{className:"text-xs text-slate-500",children:[t.node_count," nodes * ",t.type]})]})]})}function Mp({icon:t,label:e,value:r,subvalue:n}){return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4",children:[A.jsxs("div",{className:"flex items-center gap-2 text-slate-400 mb-2",children:[A.jsx(t,{size:14}),A.jsx("span",{className:"text-xs",children:e})]}),A.jsx("div",{className:"font-mono text-xl text-slate-100",children:r}),n&&A.jsx("div",{className:"text-xs text-slate-500 mt-1",children:n})]})}function u$({propagation:t}){var o,s,l;if(!t)return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"RF Propagation"}),A.jsx("div",{className:"text-slate-500",children:A.jsx("p",{children:"Loading propagation data..."})})]});const e=t.hf,r=t.uhf_ducting,n=u=>{if(!u)return"text-slate-400";switch(u){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},i=e&&(e.sfi||e.kp_current!==void 0),a=r&&r.condition;return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(R3,{size:14}),"RF Propagation"]}),A.jsxs("div",{className:"mb-4",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar/Geomagnetic"}),i?A.jsxs("div",{className:"space-y-1",children:[A.jsxs("div",{className:"text-sm font-mono text-slate-200",children:["SFI ",((o=e.sfi)==null?void 0:o.toFixed(0))||"?"," / Kp ",((s=e.kp_current)==null?void 0:s.toFixed(1))||"?"]}),A.jsxs("div",{className:"text-xs text-slate-400",children:["R",e.r_scale??0," / S",e.s_scale??0," / G",e.g_scale??0]}),e.r_scale!==void 0&&e.r_scale>0&&A.jsxs("div",{className:"text-xs text-amber-500",children:["R",e.r_scale," Radio Blackout"]})]}):A.jsx("div",{className:"text-sm text-slate-500",children:"No data"})]}),A.jsxs("div",{children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Tropospheric"}),a?A.jsxs("div",{className:"space-y-1",children:[A.jsx("div",{className:`text-sm font-medium ${n(r.condition)}`,children:r.condition==="normal"?"Normal":(l=r.condition)==null?void 0:l.replace("_"," ").replace(/\b\w/g,u=>u.toUpperCase())}),A.jsxs("div",{className:"text-xs text-slate-400 font-mono",children:["dM/dz: ",r.min_gradient??"?"," M-units/km"]}),r.duct_thickness_m&&A.jsxs("div",{className:"text-xs text-slate-400",children:["Duct: ~",r.duct_thickness_m,"m thick"]})]}):A.jsx("div",{className:"text-sm text-slate-500",children:"No ducting data"})]})]})}function c$(){var g,m,y,x,S;const[t,e]=q.useState(null),[r,n]=q.useState([]),[i,a]=q.useState([]),[o,s]=q.useState(null),[l,u]=q.useState(null),[c,f]=q.useState(!0),[h,v]=q.useState(null),{lastHealth:p}=O3();return q.useEffect(()=>{Promise.all([GZ(),UZ(),ZZ(),N3(),YZ().catch(()=>null)]).then(([b,T,C,M,D])=>{e(b),n(T),a(C),s(M),u(D),f(!1)}).catch(b=>{v(b.message),f(!1)})},[]),q.useEffect(()=>{p&&e(p)},[p]),c?A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsx("div",{className:"text-slate-400",children:"Loading..."})}):h?A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsxs("div",{className:"text-red-400",children:["Error: ",h]})}):A.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Mesh Health"}),t&&A.jsxs(A.Fragment,{children:[A.jsx(o$,{health:t}),A.jsxs("div",{className:"mt-6 space-y-3",children:[A.jsx(Cp,{label:"Infrastructure",value:((g=t.pillars)==null?void 0:g.infrastructure)??0}),A.jsx(Cp,{label:"Utilization",value:((m=t.pillars)==null?void 0:m.utilization)??0}),A.jsx(Cp,{label:"Behavior",value:((y=t.pillars)==null?void 0:y.behavior)??0}),A.jsx(Cp,{label:"Power",value:((x=t.pillars)==null?void 0:x.power)??0})]})]})]}),A.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Active Alerts"}),i.length>0?A.jsx("div",{className:"space-y-3",children:i.map((b,T)=>A.jsx(s$,{alert:b},T))}):A.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[A.jsx(Jg,{size:16,className:"text-green-500"}),A.jsx("span",{children:"No active alerts"})]})]}),A.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[A.jsx(Mp,{icon:x0,label:"Nodes Online",value:(t==null?void 0:t.total_nodes)||0,subvalue:`${(t==null?void 0:t.unlocated_count)||0} unlocated`}),A.jsx(Mp,{icon:A3,label:"Infrastructure",value:`${(t==null?void 0:t.infra_online)||0}/${(t==null?void 0:t.infra_total)||0}`,subvalue:(t==null?void 0:t.infra_online)===(t==null?void 0:t.infra_total)?"All online":"Some offline"}),A.jsx(Mp,{icon:QC,label:"Utilization",value:`${((S=t==null?void 0:t.util_percent)==null?void 0:S.toFixed(1))||0}%`,subvalue:`${(t==null?void 0:t.flagged_nodes)||0} flagged`}),A.jsx(Mp,{icon:I3,label:"Regions",value:(t==null?void 0:t.total_regions)||0,subvalue:`${(t==null?void 0:t.battery_warnings)||0} battery warnings`})]})]}),A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:["Mesh Sources (",r.length,")"]}),r.length>0?A.jsx("div",{className:"space-y-2",children:r.map((b,T)=>A.jsx(l$,{source:b},T))}):A.jsx("div",{className:"text-slate-500 py-4",children:"No sources configured"})]}),A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Environmental Feeds"}),o!=null&&o.enabled?A.jsxs("div",{className:"text-slate-400",children:[o.feeds.length," feeds active"]}):A.jsxs("div",{className:"text-slate-500",children:[A.jsx("p",{children:"Environmental feeds not enabled."}),A.jsx("p",{className:"text-xs mt-2",children:"Enable in config.yaml"})]})]}),A.jsx(u$,{propagation:l})]})}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -322,8 +322,8 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Vw=function(t,e){return Vw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Vw(t,e)};function $(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Vw(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var tv=function(){return tv=Object.assign||function(e){for(var r,n=1,i=arguments.length;n0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]"u"&&typeof self<"u"?We.worker=!0:!We.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(We.node=!0,We.svgSupported=!0):d$(navigator.userAgent,We);function d$(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}}var t2=12,B3="sans-serif",no=t2+"px "+B3,p$=20,g$=100,m$="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function y$(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return e.clearMarkers=function(){N(r,function(c){c.parentNode&&c.parentNode.removeChild(c)})},r}function j$(t,e,r){for(var n=r?"invTrans":"trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),f=2*u,h=c.left,v=c.top;o.push(h,v),l=l&&a&&h===a[f]&&v===a[f+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=r?mD(s,o):mD(o,s))}function Y3(t){return t.nodeName.toUpperCase()==="CANVAS"}var H$=/([&<>"'])/g,W$={"&":"&","<":"<",">":">",'"':""","'":"'"};function Wr(t){return t==null?"":(t+"").replace(H$,function(e,r){return W$[r]})}var U$=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,px=[],Z$=We.browser.firefox&&+We.browser.version.split(".")[0]<39;function Ww(t,e,r,n){return r=r||{},n?yD(t,e,r):Z$&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):yD(t,e,r),r}function yD(t,e,r){if(We.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(Y3(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(Hw(px,t,n,i)){r.zrX=px[0],r.zrY=px[1];return}}r.zrX=r.zrY=0}function l2(t){return t||window.event}function Wn(t,e,r){if(e=l2(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Ww(t,o,e,r)}else{Ww(t,e,e,r);var a=$$(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&U$.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function $$(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,n=t.deltaY;if(r==null||n==null)return e;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function Uw(t,e,r,n){t.addEventListener(e,r,n)}function Y$(t,e,r,n){t.removeEventListener(e,r,n)}var io=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function _D(t){return t.which===2||t.which===3}var X$=function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,n){return this._doTrack(e,r,n),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:r,event:e},o=0,s=i.length;o1&&n&&n.length>1){var a=xD(n)/xD(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=q$(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function fr(){return[1,0,0,1,0,0]}function Cd(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Md(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Li(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function Ii(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function ho(t,e,r,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(r),f=Math.cos(r);return t[0]=i*f+s*c,t[1]=-i*c+s*f,t[2]=a*f+l*c,t[3]=-a*c+f*l,t[4]=f*(o-n[0])+c*(u-n[1])+n[0],t[5]=f*(u-n[1])-c*(o-n[0])+n[1],t}function L0(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t}function oi(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=r*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=r*l,t[4]=(n*s-o*i)*l,t[5]=(a*i-r*s)*l,t):null}function X3(t){var e=fr();return Md(e,t),e}const K$=Object.freeze(Object.defineProperty({__proto__:null,clone:X3,copy:Md,create:fr,identity:Cd,invert:oi,mul:Li,rotate:ho,scale:L0,translate:Ii},Symbol.toStringTag,{value:"Module"}));var Te=function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,i){e.x=r.x+n.x*i,e.y=r.y+n.y*i},t.lerp=function(e,r,n,i){var a=1-i;e.x=a*r.x+i*n.x,e.y=a*r.y+i*n.y},t}(),yl=Math.min,dc=Math.max,Zw=Math.abs,SD=["x","y"],Q$=["width","height"],ks=new Te,Is=new Te,Es=new Te,Rs=new Te,wn=q3(),Eh=wn.minTv,$w=wn.maxTv,av=[0,0],Ce=function(){function t(e,r,n,i){t.set(this,e,r,n,i)}return t.set=function(e,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),e.x=r,e.y=n,e.width=i,e.height=a,e},t.prototype.union=function(e){var r=yl(e.x,this.x),n=yl(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=dc(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=dc(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,n=e.width/r.width,i=e.height/r.height,a=fr();return Ii(a,a,[-r.x,-r.y]),L0(a,a,[n,i]),Ii(a,a,[e.x,e.y]),a},t.prototype.intersect=function(e,r,n){return t.intersect(this,e,r,n)},t.intersect=function(e,r,n,i){n&&Te.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!e||!r)return!1;e instanceof t||(e=t.set(J$,e.x,e.y,e.width,e.height)),r instanceof t||(r=t.set(eY,r.x,r.y,r.width,r.height));var s=!!n;wn.reset(i,s);var l=wn.touchThreshold,u=e.x+l,c=e.x+e.width-l,f=e.y+l,h=e.y+e.height-l,v=r.x+l,p=r.x+r.width-l,g=r.y+l,m=r.y+r.height-l;if(u>c||f>h||v>p||g>m)return!1;var y=!(c=e.x&&r<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},t.prototype.contain=function(e,r){return t.contain(this,e,r)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){return e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height,e},t.applyTransform=function(e,r,n){if(!n){e!==r&&t.copy(e,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=r.x*i+o,e.y=r.y*a+s,e.width=r.width*i,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}ks.x=Es.x=r.x,ks.y=Rs.y=r.y,Is.x=Rs.x=r.x+r.width,Is.y=Es.y=r.y+r.height,ks.transform(n),Rs.transform(n),Is.transform(n),Es.transform(n),e.x=yl(ks.x,Is.x,Es.x,Rs.x),e.y=yl(ks.y,Is.y,Es.y,Rs.y);var l=dc(ks.x,Is.x,Es.x,Rs.x),u=dc(ks.y,Is.y,Es.y,Rs.y);e.width=l-e.x,e.height=u-e.y},t}(),J$=new Ce(0,0,0,0),eY=new Ce(0,0,0,0);function wD(t,e,r,n,i,a,o,s){var l=Zw(e-r),u=Zw(n-t),c=yl(l,u),f=SD[i],h=SD[1-i],v=Q$[i];e=u||!wn.bidirectional)&&(Eh[f]=-u,Eh[h]=0,wn.useDir&&wn.calcDirMTV())))}function q3(){var t=0,e=new Te,r=new Te,n={minTv:new Te,maxTv:new Te,useDir:!1,dirMinTv:new Te,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=dc(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),t=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(t),u=Math.cos(t),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*u/c,r.y=s*l/c,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||e.dot(r)>0)&&r.len()=0;f--){var h=a[f];h!==i&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(mx.copy(h.getBoundingRect()),h.transform&&mx.applyTransform(h.transform),mx.intersect(c)&&s.push(h))}if(s.length)for(var v=4,p=Math.PI/12,g=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,t,e)}});function aY(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var n=t,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?K3:!0}return!1}function bD(t,e,r,n,i){for(var a=t.length-1;a>=0;a--){var o=t[a],s=void 0;if(o!==i&&!o.ignore&&(s=aY(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==K3)){e.target=o;break}}}function J3(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var e4=32,Qf=7;function oY(t){for(var e=0;t>=e4;)e|=t&1,t>>=1;return t+e}function TD(t,e,r,n){var i=e+1;if(i===r)return 1;if(n(t[i++],t[e])<0){for(;i=0;)i++;return i-e}function sY(t,e,r){for(r--;e>>1,i(a,t[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=a}}function yx(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(t,e[r+c])>0?o=c+1:l=c}return l}function _x(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(t,e[r+c])<0?l=c:o=c+1}return l}function lY(t,e){var r=Qf,n,i,a=0,o=[];n=[],i=[];function s(v,p){n[a]=v,i[a]=p,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]i[v+1])break;c(v)}}function u(){for(;a>1;){var v=a-2;v>0&&i[v-1]=Qf||M>=Qf);if(D)break;T<0&&(T=0),T+=2}if(r=T,r<1&&(r=1),p===1){for(y=0;y=0;y--)t[C+y]=t[T+y];t[b]=o[S];return}for(var M=r;;){var D=0,I=0,k=!1;do if(e(o[S],t[x])<0){if(t[b--]=t[x--],D++,I=0,--p===0){k=!0;break}}else if(t[b--]=o[S--],I++,D=0,--m===1){k=!0;break}while((D|I)=0;y--)t[C+y]=t[T+y];if(p===0){k=!0;break}}if(t[b--]=o[S--],--m===1){k=!0;break}if(I=m-yx(t[x],o,0,m,m-1,e),I!==0){for(b-=I,S-=I,m-=I,C=b+1,T=S+1,y=0;y=Qf||I>=Qf);if(k)break;M<0&&(M=0),M+=2}if(r=M,r<1&&(r=1),m===1){for(b-=p,x-=p,C=b+1,T=x+1,y=p-1;y>=0;y--)t[C+y]=t[T+y];t[b]=o[S]}else{if(m===0)throw new Error;for(T=b-(m-1),y=0;ys&&(l=s),CD(t,r,r+l,r+a,e),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var bn=1,Rh=2,Qu=4,MD=!1;function xx(){MD||(MD=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function LD(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var uY=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=LD}return t.prototype.traverse=function(e,r){for(var n=0;n=0&&this._roots.splice(i,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),Km;Km=We.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var ov={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-ov.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?ov.bounceIn(t*2)*.5:ov.bounceOut(t*2-1)*.5+.5}},Ap=Math.pow,ts=Math.sqrt,Qm=1e-8,t4=1e-4,AD=ts(3),Pp=1/3,ra=Ss(),qn=Ss(),Ac=Ss();function Vo(t){return t>-Qm&&tQm||t<-Qm}function lr(t,e,r,n,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*n+3*a*r)}function PD(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function Jm(t,e,r,n,i,a){var o=n+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,v=0;if(Vo(c)&&Vo(f))if(Vo(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[v++]=p)}else{var g=f*f-4*c*h;if(Vo(g)){var m=f/c,p=-s/o+m,y=-m/2;p>=0&&p<=1&&(a[v++]=p),y>=0&&y<=1&&(a[v++]=y)}else if(g>0){var x=ts(g),S=c*s+1.5*o*(-f+x),b=c*s+1.5*o*(-f-x);S<0?S=-Ap(-S,Pp):S=Ap(S,Pp),b<0?b=-Ap(-b,Pp):b=Ap(b,Pp);var p=(-s-(S+b))/(3*o);p>=0&&p<=1&&(a[v++]=p)}else{var T=(2*c*s-3*o*f)/(2*ts(c*c*c)),C=Math.acos(T)/3,M=ts(c),D=Math.cos(C),p=(-s-2*M*D)/(3*o),y=(-s+M*(D+AD*Math.sin(C)))/(3*o),I=(-s+M*(D-AD*Math.sin(C)))/(3*o);p>=0&&p<=1&&(a[v++]=p),y>=0&&y<=1&&(a[v++]=y),I>=0&&I<=1&&(a[v++]=I)}}return v}function n4(t,e,r,n,i){var a=6*r-12*e+6*t,o=9*e+3*n-3*t-9*r,s=3*e-3*t,l=0;if(Vo(o)){if(r4(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Vo(c))i[0]=-a/(2*o);else if(c>0){var f=ts(c),u=(-a+f)/(2*o),h=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function fs(t,e,r,n,i,a){var o=(e-t)*i+t,s=(r-e)*i+e,l=(n-r)*i+r,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=t,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function i4(t,e,r,n,i,a,o,s,l,u,c){var f,h=.005,v=1/0,p,g,m,y;ra[0]=l,ra[1]=u;for(var x=0;x<1;x+=.05)qn[0]=lr(t,r,i,o,x),qn[1]=lr(e,n,a,s,x),m=es(ra,qn),m=0&&m=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Vo(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=ts(c),u=(-o+f)/(2*a),h=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function a4(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function Vv(t,e,r,n,i){var a=(e-t)*n+t,o=(r-e)*n+e,s=(o-a)*n+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function o4(t,e,r,n,i,a,o,s,l){var u,c=.005,f=1/0;ra[0]=o,ra[1]=s;for(var h=0;h<1;h+=.05){qn[0]=xr(t,r,i,h),qn[1]=xr(e,n,a,h);var v=es(ra,qn);v=0&&v=1?1:Jm(0,n,a,1,l,s)&&lr(0,i,o,1,s[0])}}}var dY=function(){function t(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Nt,this.ondestroy=e.ondestroy||Nt,this.onrestart=e.onrestart||Nt,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=me(e)?e:ov[e]||u2(e)},t}(),s4=function(){function t(e){this.value=e}return t}(),pY=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new s4(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),jc=function(){function t(e){this._list=new pY,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new s4(r),s.key=e,n.insertEntry(s),i[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),DD={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ai(t){return t=Math.round(t),t<0?0:t>255?255:t}function gY(t){return t=Math.round(t),t<0?0:t>360?360:t}function Fv(t){return t<0?0:t>1?1:t}function tm(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Ai(parseFloat(e)/100*255):Ai(parseInt(e,10))}function $a(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Fv(parseFloat(e)/100):Fv(parseFloat(e))}function Sx(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function Fo(t,e,r){return t+(e-t)*r}function Hn(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function Xw(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var l4=new jc(20),Dp=null;function Cu(t,e){Dp&&Xw(Dp,e),Dp=l4.put(t,Dp||e.slice())}function Ur(t,e){if(t){e=e||[];var r=l4.get(t);if(r)return Xw(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in DD)return Xw(e,DD[n]),Cu(t,e),e;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Hn(e,0,0,0,1);return}return Hn(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Cu(t,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Hn(e,0,0,0,1);return}return Hn(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Cu(t,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Hn(e,+u[0],+u[1],+u[2],1):Hn(e,0,0,0,1);c=$a(u.pop());case"rgb":if(u.length>=3)return Hn(e,tm(u[0]),tm(u[1]),tm(u[2]),u.length===3?c:$a(u[3])),Cu(t,e),e;Hn(e,0,0,0,1);return;case"hsla":if(u.length!==4){Hn(e,0,0,0,1);return}return u[3]=$a(u[3]),qw(u,e),Cu(t,e),e;case"hsl":if(u.length!==3){Hn(e,0,0,0,1);return}return qw(u,e),Cu(t,e),e;default:return}}Hn(e,0,0,0,1)}}function qw(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=$a(t[1]),i=$a(t[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],Hn(e,Ai(Sx(o,a,r+1/3)*255),Ai(Sx(o,a,r)*255),Ai(Sx(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function mY(t){if(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-e)/6+o/2)/o,f=((a-r)/6+o/2)/o,h=((a-n)/6+o/2)/o;e===a?l=h-f:r===a?l=1/3+c-h:n===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return t[3]!=null&&v.push(t[3]),v}}function ey(t,e){var r=Ur(t);if(r){for(var n=0;n<3;n++)e<0?r[n]=r[n]*(1-e)|0:r[n]=(255-r[n])*e+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return ti(r,r.length===4?"rgba":"rgb")}}function yY(t){var e=Ur(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function sv(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=e[i],s=e[a],l=n-i;return r[0]=Ai(Fo(o[0],s[0],l)),r[1]=Ai(Fo(o[1],s[1],l)),r[2]=Ai(Fo(o[2],s[2],l)),r[3]=Fv(Fo(o[3],s[3],l)),r}}var _Y=sv;function c2(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=Ur(e[i]),s=Ur(e[a]),l=n-i,u=ti([Ai(Fo(o[0],s[0],l)),Ai(Fo(o[1],s[1],l)),Ai(Fo(o[2],s[2],l)),Fv(Fo(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}var xY=c2;function Ya(t,e,r,n){var i=Ur(t);if(t)return i=mY(i),e!=null&&(i[0]=gY(me(e)?e(i[0]):e)),r!=null&&(i[1]=$a(me(r)?r(i[1]):r)),n!=null&&(i[2]=$a(me(n)?n(i[2]):n)),ti(qw(i),"rgba")}function Gv(t,e){var r=Ur(t);if(r&&e!=null)return r[3]=Fv(e),ti(r,"rgba")}function ti(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function jv(t,e){var r=Ur(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}function SY(){return ti([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var kD=new jc(100);function ty(t){if(se(t)){var e=kD.get(t);return e||(e=ey(t,-.1),kD.put(t,e)),e}else if(wd(t)){var r=J({},t);return r.colorStops=re(t.colorStops,function(n){return{offset:n.offset,color:ey(n.color,-.1)}}),r}return t}const wY=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:sv,fastMapToColor:_Y,lerp:c2,lift:ey,liftColor:ty,lum:jv,mapToColor:xY,modifyAlpha:Gv,modifyHSL:Ya,parse:Ur,parseCssFloat:$a,parseCssInt:tm,random:SY,stringify:ti,toHex:yY},Symbol.toStringTag,{value:"Module"}));var ry=Math.round;function Hv(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=Ur(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e??1}}var ID=1e-4;function Go(t){return t-ID}function kp(t){return ry(t*1e3)/1e3}function Kw(t){return ry(t*1e4)/1e4}function bY(t){return"matrix("+kp(t[0])+","+kp(t[1])+","+kp(t[2])+","+kp(t[3])+","+Kw(t[4])+","+Kw(t[5])+")"}var TY={left:"start",right:"end",center:"middle",middle:"middle"};function CY(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function MY(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function LY(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function u4(t){return t&&!!t.image}function AY(t){return t&&!!t.svgElement}function f2(t){return u4(t)||AY(t)}function c4(t){return t.type==="linear"}function f4(t){return t.type==="radial"}function h4(t){return t&&(t.type==="linear"||t.type==="radial")}function A0(t){return"url(#"+t+")"}function v4(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function d4(t){var e=t.x||0,r=t.y||0,n=(t.rotation||0)*rv,i=pe(t.scaleX,1),a=pe(t.scaleY,1),o=t.skewX||0,s=t.skewY||0,l=[];return(e||r)&&l.push("translate("+e+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+ry(o*rv)+"deg, "+ry(s*rv)+"deg)"),l.join(" ")}var PY=function(){return We.hasGlobalWindow&&me(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}}(),Qw=Array.prototype.slice;function Na(t,e,r){return(e-t)*r+t}function bx(t,e,r,n){for(var i=e.length,a=0;an?e:t,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=RD,l=r;if(Ir(r)){var u=EY(r);s=u,(u===1&&!Xe(r[0])||u===2&&!Xe(r[0][0]))&&(o=!0)}else if(Xe(r)&&!Dr(r))s=Ep;else if(se(r))if(!isNaN(+r))s=Ep;else{var c=Ur(r);c&&(l=c,s=Nh)}else if(wd(r)){var f=J({},l);f.colorStops=re(r.colorStops,function(v){return{offset:v.offset,color:Ur(v.color)}}),c4(r)?s=Jw:f4(r)&&(s=eb),l=f}a===0?this.valType=s:(s!==this.valType||s===RD)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:r,percent:0};return n&&(h.easing=n,h.easingFunc=me(n)?n:ov[n]||u2(n)),i.push(h),h},t.prototype.prepare=function(e,r){var n=this.keyframes;this._needsSort&&n.sort(function(g,m){return g.time-m.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Rp(i),u=ND(i),c=0;c=0&&!(o[c].percent<=r);c--);c=h(c,s-2)}else{for(c=f;cr);c++);c=h(c-1,s-2)}p=o[c+1],v=o[c]}if(v&&p){this._lastFr=c,this._lastFrP=r;var m=p.percent-v.percent,y=m===0?1:h((r-v.percent)/m,1);p.easingFunc&&(y=p.easingFunc(y));var x=n?this._additiveValue:u?Jf:e[l];if((Rp(a)||u)&&!x&&(x=this._additiveValue=[]),this.discrete)e[l]=y<1?v.rawValue:p.rawValue;else if(Rp(a))a===nm?bx(x,v[i],p[i],y):DY(x,v[i],p[i],y);else if(ND(a)){var S=v[i],b=p[i],T=a===Jw;e[l]={type:T?"linear":"radial",x:Na(S.x,b.x,y),y:Na(S.y,b.y,y),colorStops:re(S.colorStops,function(M,D){var I=b.colorStops[D];return{offset:Na(M.offset,I.offset,y),color:rm(bx([],M.color,I.color,y))}}),global:b.global},T?(e[l].x2=Na(S.x2,b.x2,y),e[l].y2=Na(S.y2,b.y2,y)):e[l].r=Na(S.r,b.r,y)}else if(u)bx(x,v[i],p[i],y),n||(e[l]=rm(x));else{var C=Na(v[i],p[i],y);n?this._additiveValue=C:e[l]=C}n&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,n=this.propName,i=this._additiveValue;r===Ep?e[n]=e[n]+i:r===Nh?(Ur(e[n],Jf),Ip(Jf,Jf,i,1),e[n]=rm(Jf)):r===nm?Ip(e[n],e[n],i,1):r===p4&&ED(e[n],e[n],i,1)},t}(),h2=function(){function t(e,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&i){b0("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,n){return this.whenWithKeys(e,r,Ue(r),n)},t.prototype.whenWithKeys=function(e,r,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,lv(u),i),this._trackKeys.push(s)}l.addKeyframe(e,lv(r[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,n=0;n0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},t}();function pc(){return new Date().getTime()}var NY=function(t){$(e,t);function e(r){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return e.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},e.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},e.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},e.prototype.update=function(r){for(var n=pc()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(Km(n),!r._paused&&r.update())}Km(n)},e.prototype.start=function(){this._running||(this._time=pc(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=pc(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=pc()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,n){n=n||{},this.start();var i=new h2(r,n.loop);return this.addAnimator(i),i},e}(ui),OY=300,Tx=We.domSupported,Cx=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=re(t,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:t,touch:e,pointer:n}}(),OD={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},zD=!1;function tb(t){var e=t.pointerType;return e==="pen"||e==="touch"}function zY(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Mx(t){t&&(t.zrByTouch=!0)}function BY(t,e){return Wn(t.dom,new VY(t,e),!0)}function g4(t,e){for(var r=e,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return n}var VY=function(){function t(e,r){this.stopPropagation=Nt,this.stopImmediatePropagation=Nt,this.preventDefault=Nt,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t}(),mi={mousedown:function(t){t=Wn(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Wn(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Wn(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=Wn(this.dom,t);var e=t.toElement||t.relatedTarget;g4(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){zD=!0,t=Wn(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){zD||(t=Wn(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=Wn(this.dom,t),Mx(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),mi.mousemove.call(this,t),mi.mousedown.call(this,t)},touchmove:function(t){t=Wn(this.dom,t),Mx(t),this.handler.processGesture(t,"change"),mi.mousemove.call(this,t)},touchend:function(t){t=Wn(this.dom,t),Mx(t),this.handler.processGesture(t,"end"),mi.mouseup.call(this,t),+new Date-+this.__lastTouchMomentFD||t<-FD}var Os=[],Mu=[],Ax=fr(),Px=Math.abs,Wa=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return Ns(this.rotation)||Ns(this.x)||Ns(this.y)||Ns(this.scaleX-1)||Ns(this.scaleY-1)||Ns(this.skewX)||Ns(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&(VD(n),this.invTransform=null);return}n=n||fr(),r?this.getLocalTransform(n):VD(n),e&&(r?Li(n,e,n):Md(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Os);var n=Os[0]<0?-1:1,i=Os[1]<0?-1:1,a=((Os[0]-n)*r+n)/Os[0]||0,o=((Os[1]-i)*r+i)/Os[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||fr(),oi(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var r=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||fr(),Li(Mu,e.invTransform,r),r=Mu);var n=this.originX,i=this.originY;(n||i)&&(Ax[4]=n,Ax[5]=i,Li(Mu,r,Ax),Mu[4]-=n,Mu[5]-=i,r=Mu),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var n=[e,r],i=this.invTransform;return i&&Ot(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,r){var n=[e,r],i=this.transform;return i&&Ot(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&Px(e[0]-1)>1e-10&&Px(e[3]-1)>1e-10?Math.sqrt(Px(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){iy(this,e)},t.getLocalTransform=function(e,r){r=r||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,h=e.skewX?Math.tan(e.skewX):0,v=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var p=n+s,g=i+l;r[4]=-p*a-h*g*o,r[5]=-g*o-v*p*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=v*a,r[2]=h*o,u&&ho(r,r,u),r[4]+=n+c,r[5]+=i+f,r},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),ga=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function iy(t,e){for(var r=0;r=GD)){t=t||no;for(var e=[],r=+new Date,n=0;n<=127;n++)e[n]=yn.measureText(String.fromCharCode(n),t).width;var i=+new Date-r;return i>16?Dx=GD:i>2&&Dx++,e}}var Dx=0,GD=5;function y4(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=WY(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?t.asciiWidthMap!=null?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function da(t,e){var r=t.strWidthCache,n=r.get(e);return n==null&&(n=yn.measureText(e,t.font).width,r.put(e,n)),n}function jD(t,e,r,n){var i=da(va(e),t),a=Ld(e),o=Hc(0,i,r),s=Ll(0,a,n),l=new Ce(o,s,i,a);return l}function P0(t,e,r,n){var i=((t||"")+"").split(` -`),a=i.length;if(a===1)return jD(i[0],e,r,n);for(var o=new Ce(0,0,0,0),s=0;s=0?parseFloat(t)/100*e:parseFloat(t):t}function ay(t,e,r){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,c="left",f="top";if(n instanceof Array)l+=Ei(n[0],r.width),u+=Ei(n[1],r.height),c=null,f=null;else switch(n){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=c,t.verticalAlign=f,t}var kx="__zr_normal__",Ix=ga.concat(["ignore"]),UY=ai(ga,function(t,e){return t[e]=!0,t},{ignore:!1}),Lu={},ZY=new Ce(0,0,0,0),Op=[],D0=function(){function t(e){this.id=i2(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(r);var c=n.position!=null,f=n.autoOverflowArea,h=void 0;if((f||c)&&(h=ZY,n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),i||h.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(Lu,n,h):ay(Lu,n,h),a.x=Lu.x,a.y=Lu.y,o=Lu.align,s=Lu.verticalAlign;var v=n.origin;if(v&&n.rotation!=null){var p=void 0,g=void 0;v==="center"?(p=h.width*.5,g=h.height*.5):(p=Ei(v[0],h.width),g=Ei(v[1],h.height)),u=!0,a.originX=-a.x+p+(i?0:h.x),a.originY=-a.y+g+(i?0:h.y)}}n.rotation!=null&&(a.rotation=n.rotation);var m=n.offset;m&&(a.x+=m[0],a.y+=m[1],u||(a.originX=-m[0],a.originY=-m[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var x=y.overflowRect=y.overflowRect||new Ce(0,0,0,0);a.getLocalTransform(Op),oi(Op,Op),Ce.copy(x,h),x.applyTransform(Op)}else y.overflowRect=null;var S=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,b=void 0,T=void 0,C=void 0;S&&this.canBeInsideText()?(b=n.insideFill,T=n.insideStroke,(b==null||b==="auto")&&(b=this.getInsideTextFill()),(T==null||T==="auto")&&(T=this.getInsideTextStroke(b),C=!0)):(b=n.outsideFill,T=n.outsideStroke,(b==null||b==="auto")&&(b=this.getOutsideFill()),(T==null||T==="auto")&&(T=this.getOutsideStroke(b),C=!0)),b=b||"#000",(b!==y.fill||T!==y.stroke||C!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=b,y.stroke=T,y.autoStroke=C,y.align=o,y.verticalAlign=s,r.setDefaultTextStyle(y)),r.__dirty|=bn,l&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ab:ib},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&Ur(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,ti(n,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},J(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(we(e))for(var n=e,i=Ue(n),a=0;a0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(kx,!1,e)},t.prototype.useState=function(e,r,n,i){var a=e===kx,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(Ee(s,e)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){b0("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,h=this._textGuide;return f&&f.useState(e,r,n,c),h&&h.useState(e,r,n,c),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~bn),u}}},t.prototype.useStates=function(e,r,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l0,p);var g=this._textContent,m=this._textGuide;g&&g.useStates(e,r,h),m&&m.useStates(e,r,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~bn)}},t.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var r=e.__hostTarget;e=r?e.ignoreHostSilent?null:r:e.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},t.prototype.replaceState=function(e,r,n){var i=this.currentStates.slice(),a=Ee(i,e),o=Ee(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var n=this.animators,i=n.length,a=[],o=0;o0&&r.during&&a[0].during(function(p,g){r.during(g)});for(var h=0;h0||i.force&&!o.length){var D=void 0,I=void 0,k=void 0;if(s){I={},h&&(D={});for(var b=0;b=0&&(i.splice(a,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,n){var i=Ee(this._children,r);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},e.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(r){var n=this.__zr,i=this._children,a=Ee(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]"u"&&typeof self<"u"?We.worker=!0:!We.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(We.node=!0,We.svgSupported=!0):d$(navigator.userAgent,We);function d$(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}}var t2=12,B3="sans-serif",io=t2+"px "+B3,p$=20,g$=100,m$="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function y$(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return e.clearMarkers=function(){N(r,function(c){c.parentNode&&c.parentNode.removeChild(c)})},r}function G$(t,e,r){for(var n=r?"invTrans":"trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),f=2*u,h=c.left,v=c.top;o.push(h,v),l=l&&a&&h===a[f]&&v===a[f+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=r?mD(s,o):mD(o,s))}function Y3(t){return t.nodeName.toUpperCase()==="CANVAS"}var H$=/([&<>"'])/g,W$={"&":"&","<":"<",">":">",'"':""","'":"'"};function Wr(t){return t==null?"":(t+"").replace(H$,function(e,r){return W$[r]})}var U$=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,px=[],Z$=We.browser.firefox&&+We.browser.version.split(".")[0]<39;function Ww(t,e,r,n){return r=r||{},n?yD(t,e,r):Z$&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):yD(t,e,r),r}function yD(t,e,r){if(We.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(Y3(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(Hw(px,t,n,i)){r.zrX=px[0],r.zrY=px[1];return}}r.zrX=r.zrY=0}function l2(t){return t||window.event}function Wn(t,e,r){if(e=l2(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Ww(t,o,e,r)}else{Ww(t,e,e,r);var a=$$(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&U$.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function $$(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,n=t.deltaY;if(r==null||n==null)return e;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function Uw(t,e,r,n){t.addEventListener(e,r,n)}function Y$(t,e,r,n){t.removeEventListener(e,r,n)}var ao=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function _D(t){return t.which===2||t.which===3}var X$=function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,n){return this._doTrack(e,r,n),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:r,event:e},o=0,s=i.length;o1&&n&&n.length>1){var a=xD(n)/xD(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=q$(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function fr(){return[1,0,0,1,0,0]}function Cd(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Md(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Li(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function Ii(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function vo(t,e,r,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(r),f=Math.cos(r);return t[0]=i*f+s*c,t[1]=-i*c+s*f,t[2]=a*f+l*c,t[3]=-a*c+f*l,t[4]=f*(o-n[0])+c*(u-n[1])+n[0],t[5]=f*(u-n[1])-c*(o-n[0])+n[1],t}function L0(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t}function oi(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=r*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=r*l,t[4]=(n*s-o*i)*l,t[5]=(a*i-r*s)*l,t):null}function X3(t){var e=fr();return Md(e,t),e}const K$=Object.freeze(Object.defineProperty({__proto__:null,clone:X3,copy:Md,create:fr,identity:Cd,invert:oi,mul:Li,rotate:vo,scale:L0,translate:Ii},Symbol.toStringTag,{value:"Module"}));var Te=function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,i){e.x=r.x+n.x*i,e.y=r.y+n.y*i},t.lerp=function(e,r,n,i){var a=1-i;e.x=a*r.x+i*n.x,e.y=a*r.y+i*n.y},t}(),_l=Math.min,dc=Math.max,Zw=Math.abs,SD=["x","y"],Q$=["width","height"],Is=new Te,Es=new Te,Rs=new Te,Ns=new Te,wn=q3(),Eh=wn.minTv,$w=wn.maxTv,av=[0,0],Ce=function(){function t(e,r,n,i){t.set(this,e,r,n,i)}return t.set=function(e,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),e.x=r,e.y=n,e.width=i,e.height=a,e},t.prototype.union=function(e){var r=_l(e.x,this.x),n=_l(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=dc(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=dc(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,n=e.width/r.width,i=e.height/r.height,a=fr();return Ii(a,a,[-r.x,-r.y]),L0(a,a,[n,i]),Ii(a,a,[e.x,e.y]),a},t.prototype.intersect=function(e,r,n){return t.intersect(this,e,r,n)},t.intersect=function(e,r,n,i){n&&Te.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!e||!r)return!1;e instanceof t||(e=t.set(J$,e.x,e.y,e.width,e.height)),r instanceof t||(r=t.set(eY,r.x,r.y,r.width,r.height));var s=!!n;wn.reset(i,s);var l=wn.touchThreshold,u=e.x+l,c=e.x+e.width-l,f=e.y+l,h=e.y+e.height-l,v=r.x+l,p=r.x+r.width-l,g=r.y+l,m=r.y+r.height-l;if(u>c||f>h||v>p||g>m)return!1;var y=!(c=e.x&&r<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},t.prototype.contain=function(e,r){return t.contain(this,e,r)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){return e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height,e},t.applyTransform=function(e,r,n){if(!n){e!==r&&t.copy(e,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=r.x*i+o,e.y=r.y*a+s,e.width=r.width*i,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Is.x=Rs.x=r.x,Is.y=Ns.y=r.y,Es.x=Ns.x=r.x+r.width,Es.y=Rs.y=r.y+r.height,Is.transform(n),Ns.transform(n),Es.transform(n),Rs.transform(n),e.x=_l(Is.x,Es.x,Rs.x,Ns.x),e.y=_l(Is.y,Es.y,Rs.y,Ns.y);var l=dc(Is.x,Es.x,Rs.x,Ns.x),u=dc(Is.y,Es.y,Rs.y,Ns.y);e.width=l-e.x,e.height=u-e.y},t}(),J$=new Ce(0,0,0,0),eY=new Ce(0,0,0,0);function wD(t,e,r,n,i,a,o,s){var l=Zw(e-r),u=Zw(n-t),c=_l(l,u),f=SD[i],h=SD[1-i],v=Q$[i];e=u||!wn.bidirectional)&&(Eh[f]=-u,Eh[h]=0,wn.useDir&&wn.calcDirMTV())))}function q3(){var t=0,e=new Te,r=new Te,n={minTv:new Te,maxTv:new Te,useDir:!1,dirMinTv:new Te,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=dc(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),t=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(t),u=Math.cos(t),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*u/c,r.y=s*l/c,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||e.dot(r)>0)&&r.len()=0;f--){var h=a[f];h!==i&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(mx.copy(h.getBoundingRect()),h.transform&&mx.applyTransform(h.transform),mx.intersect(c)&&s.push(h))}if(s.length)for(var v=4,p=Math.PI/12,g=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,t,e)}});function aY(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var n=t,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?K3:!0}return!1}function bD(t,e,r,n,i){for(var a=t.length-1;a>=0;a--){var o=t[a],s=void 0;if(o!==i&&!o.ignore&&(s=aY(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==K3)){e.target=o;break}}}function J3(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var e4=32,Qf=7;function oY(t){for(var e=0;t>=e4;)e|=t&1,t>>=1;return t+e}function TD(t,e,r,n){var i=e+1;if(i===r)return 1;if(n(t[i++],t[e])<0){for(;i=0;)i++;return i-e}function sY(t,e,r){for(r--;e>>1,i(a,t[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=a}}function yx(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(t,e[r+c])>0?o=c+1:l=c}return l}function _x(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(t,e[r+c])<0?l=c:o=c+1}return l}function lY(t,e){var r=Qf,n,i,a=0,o=[];n=[],i=[];function s(v,p){n[a]=v,i[a]=p,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]i[v+1])break;c(v)}}function u(){for(;a>1;){var v=a-2;v>0&&i[v-1]=Qf||M>=Qf);if(D)break;T<0&&(T=0),T+=2}if(r=T,r<1&&(r=1),p===1){for(y=0;y=0;y--)t[C+y]=t[T+y];t[b]=o[S];return}for(var M=r;;){var D=0,I=0,k=!1;do if(e(o[S],t[x])<0){if(t[b--]=t[x--],D++,I=0,--p===0){k=!0;break}}else if(t[b--]=o[S--],I++,D=0,--m===1){k=!0;break}while((D|I)=0;y--)t[C+y]=t[T+y];if(p===0){k=!0;break}}if(t[b--]=o[S--],--m===1){k=!0;break}if(I=m-yx(t[x],o,0,m,m-1,e),I!==0){for(b-=I,S-=I,m-=I,C=b+1,T=S+1,y=0;y=Qf||I>=Qf);if(k)break;M<0&&(M=0),M+=2}if(r=M,r<1&&(r=1),m===1){for(b-=p,x-=p,C=b+1,T=x+1,y=p-1;y>=0;y--)t[C+y]=t[T+y];t[b]=o[S]}else{if(m===0)throw new Error;for(T=b-(m-1),y=0;ys&&(l=s),CD(t,r,r+l,r+a,e),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var bn=1,Rh=2,Qu=4,MD=!1;function xx(){MD||(MD=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function LD(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var uY=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=LD}return t.prototype.traverse=function(e,r){for(var n=0;n=0&&this._roots.splice(i,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),Km;Km=We.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var ov={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-ov.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?ov.bounceIn(t*2)*.5:ov.bounceOut(t*2-1)*.5+.5}},Ap=Math.pow,rs=Math.sqrt,Qm=1e-8,t4=1e-4,AD=rs(3),Pp=1/3,ra=ws(),qn=ws(),Ac=ws();function Fo(t){return t>-Qm&&tQm||t<-Qm}function lr(t,e,r,n,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*n+3*a*r)}function PD(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function Jm(t,e,r,n,i,a){var o=n+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,v=0;if(Fo(c)&&Fo(f))if(Fo(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[v++]=p)}else{var g=f*f-4*c*h;if(Fo(g)){var m=f/c,p=-s/o+m,y=-m/2;p>=0&&p<=1&&(a[v++]=p),y>=0&&y<=1&&(a[v++]=y)}else if(g>0){var x=rs(g),S=c*s+1.5*o*(-f+x),b=c*s+1.5*o*(-f-x);S<0?S=-Ap(-S,Pp):S=Ap(S,Pp),b<0?b=-Ap(-b,Pp):b=Ap(b,Pp);var p=(-s-(S+b))/(3*o);p>=0&&p<=1&&(a[v++]=p)}else{var T=(2*c*s-3*o*f)/(2*rs(c*c*c)),C=Math.acos(T)/3,M=rs(c),D=Math.cos(C),p=(-s-2*M*D)/(3*o),y=(-s+M*(D+AD*Math.sin(C)))/(3*o),I=(-s+M*(D-AD*Math.sin(C)))/(3*o);p>=0&&p<=1&&(a[v++]=p),y>=0&&y<=1&&(a[v++]=y),I>=0&&I<=1&&(a[v++]=I)}}return v}function n4(t,e,r,n,i){var a=6*r-12*e+6*t,o=9*e+3*n-3*t-9*r,s=3*e-3*t,l=0;if(Fo(o)){if(r4(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Fo(c))i[0]=-a/(2*o);else if(c>0){var f=rs(c),u=(-a+f)/(2*o),h=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function hs(t,e,r,n,i,a){var o=(e-t)*i+t,s=(r-e)*i+e,l=(n-r)*i+r,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=t,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function i4(t,e,r,n,i,a,o,s,l,u,c){var f,h=.005,v=1/0,p,g,m,y;ra[0]=l,ra[1]=u;for(var x=0;x<1;x+=.05)qn[0]=lr(t,r,i,o,x),qn[1]=lr(e,n,a,s,x),m=ts(ra,qn),m=0&&m=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Fo(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=rs(c),u=(-o+f)/(2*a),h=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function a4(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function Vv(t,e,r,n,i){var a=(e-t)*n+t,o=(r-e)*n+e,s=(o-a)*n+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function o4(t,e,r,n,i,a,o,s,l){var u,c=.005,f=1/0;ra[0]=o,ra[1]=s;for(var h=0;h<1;h+=.05){qn[0]=xr(t,r,i,h),qn[1]=xr(e,n,a,h);var v=ts(ra,qn);v=0&&v=1?1:Jm(0,n,a,1,l,s)&&lr(0,i,o,1,s[0])}}}var dY=function(){function t(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Nt,this.ondestroy=e.ondestroy||Nt,this.onrestart=e.onrestart||Nt,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=me(e)?e:ov[e]||u2(e)},t}(),s4=function(){function t(e){this.value=e}return t}(),pY=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new s4(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Gc=function(){function t(e){this._list=new pY,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new s4(r),s.key=e,n.insertEntry(s),i[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),DD={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ai(t){return t=Math.round(t),t<0?0:t>255?255:t}function gY(t){return t=Math.round(t),t<0?0:t>360?360:t}function Fv(t){return t<0?0:t>1?1:t}function tm(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Ai(parseFloat(e)/100*255):Ai(parseInt(e,10))}function Ya(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Fv(parseFloat(e)/100):Fv(parseFloat(e))}function Sx(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function jo(t,e,r){return t+(e-t)*r}function Hn(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function Xw(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var l4=new Gc(20),Dp=null;function Cu(t,e){Dp&&Xw(Dp,e),Dp=l4.put(t,Dp||e.slice())}function Ur(t,e){if(t){e=e||[];var r=l4.get(t);if(r)return Xw(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in DD)return Xw(e,DD[n]),Cu(t,e),e;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Hn(e,0,0,0,1);return}return Hn(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Cu(t,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Hn(e,0,0,0,1);return}return Hn(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Cu(t,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Hn(e,+u[0],+u[1],+u[2],1):Hn(e,0,0,0,1);c=Ya(u.pop());case"rgb":if(u.length>=3)return Hn(e,tm(u[0]),tm(u[1]),tm(u[2]),u.length===3?c:Ya(u[3])),Cu(t,e),e;Hn(e,0,0,0,1);return;case"hsla":if(u.length!==4){Hn(e,0,0,0,1);return}return u[3]=Ya(u[3]),qw(u,e),Cu(t,e),e;case"hsl":if(u.length!==3){Hn(e,0,0,0,1);return}return qw(u,e),Cu(t,e),e;default:return}}Hn(e,0,0,0,1)}}function qw(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=Ya(t[1]),i=Ya(t[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],Hn(e,Ai(Sx(o,a,r+1/3)*255),Ai(Sx(o,a,r)*255),Ai(Sx(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function mY(t){if(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-e)/6+o/2)/o,f=((a-r)/6+o/2)/o,h=((a-n)/6+o/2)/o;e===a?l=h-f:r===a?l=1/3+c-h:n===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return t[3]!=null&&v.push(t[3]),v}}function ey(t,e){var r=Ur(t);if(r){for(var n=0;n<3;n++)e<0?r[n]=r[n]*(1-e)|0:r[n]=(255-r[n])*e+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return ti(r,r.length===4?"rgba":"rgb")}}function yY(t){var e=Ur(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function sv(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=e[i],s=e[a],l=n-i;return r[0]=Ai(jo(o[0],s[0],l)),r[1]=Ai(jo(o[1],s[1],l)),r[2]=Ai(jo(o[2],s[2],l)),r[3]=Fv(jo(o[3],s[3],l)),r}}var _Y=sv;function c2(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=Ur(e[i]),s=Ur(e[a]),l=n-i,u=ti([Ai(jo(o[0],s[0],l)),Ai(jo(o[1],s[1],l)),Ai(jo(o[2],s[2],l)),Fv(jo(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}var xY=c2;function Xa(t,e,r,n){var i=Ur(t);if(t)return i=mY(i),e!=null&&(i[0]=gY(me(e)?e(i[0]):e)),r!=null&&(i[1]=Ya(me(r)?r(i[1]):r)),n!=null&&(i[2]=Ya(me(n)?n(i[2]):n)),ti(qw(i),"rgba")}function jv(t,e){var r=Ur(t);if(r&&e!=null)return r[3]=Fv(e),ti(r,"rgba")}function ti(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function Gv(t,e){var r=Ur(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}function SY(){return ti([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var kD=new Gc(100);function ty(t){if(se(t)){var e=kD.get(t);return e||(e=ey(t,-.1),kD.put(t,e)),e}else if(wd(t)){var r=J({},t);return r.colorStops=re(t.colorStops,function(n){return{offset:n.offset,color:ey(n.color,-.1)}}),r}return t}const wY=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:sv,fastMapToColor:_Y,lerp:c2,lift:ey,liftColor:ty,lum:Gv,mapToColor:xY,modifyAlpha:jv,modifyHSL:Xa,parse:Ur,parseCssFloat:Ya,parseCssInt:tm,random:SY,stringify:ti,toHex:yY},Symbol.toStringTag,{value:"Module"}));var ry=Math.round;function Hv(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=Ur(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e??1}}var ID=1e-4;function Go(t){return t-ID}function kp(t){return ry(t*1e3)/1e3}function Kw(t){return ry(t*1e4)/1e4}function bY(t){return"matrix("+kp(t[0])+","+kp(t[1])+","+kp(t[2])+","+kp(t[3])+","+Kw(t[4])+","+Kw(t[5])+")"}var TY={left:"start",right:"end",center:"middle",middle:"middle"};function CY(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function MY(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function LY(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function u4(t){return t&&!!t.image}function AY(t){return t&&!!t.svgElement}function f2(t){return u4(t)||AY(t)}function c4(t){return t.type==="linear"}function f4(t){return t.type==="radial"}function h4(t){return t&&(t.type==="linear"||t.type==="radial")}function A0(t){return"url(#"+t+")"}function v4(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function d4(t){var e=t.x||0,r=t.y||0,n=(t.rotation||0)*rv,i=pe(t.scaleX,1),a=pe(t.scaleY,1),o=t.skewX||0,s=t.skewY||0,l=[];return(e||r)&&l.push("translate("+e+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+ry(o*rv)+"deg, "+ry(s*rv)+"deg)"),l.join(" ")}var PY=function(){return We.hasGlobalWindow&&me(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}}(),Qw=Array.prototype.slice;function Na(t,e,r){return(e-t)*r+t}function bx(t,e,r,n){for(var i=e.length,a=0;an?e:t,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=RD,l=r;if(Ir(r)){var u=EY(r);s=u,(u===1&&!qe(r[0])||u===2&&!qe(r[0][0]))&&(o=!0)}else if(qe(r)&&!Dr(r))s=Ep;else if(se(r))if(!isNaN(+r))s=Ep;else{var c=Ur(r);c&&(l=c,s=Nh)}else if(wd(r)){var f=J({},l);f.colorStops=re(r.colorStops,function(v){return{offset:v.offset,color:Ur(v.color)}}),c4(r)?s=Jw:f4(r)&&(s=eb),l=f}a===0?this.valType=s:(s!==this.valType||s===RD)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:r,percent:0};return n&&(h.easing=n,h.easingFunc=me(n)?n:ov[n]||u2(n)),i.push(h),h},t.prototype.prepare=function(e,r){var n=this.keyframes;this._needsSort&&n.sort(function(g,m){return g.time-m.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Rp(i),u=ND(i),c=0;c=0&&!(o[c].percent<=r);c--);c=h(c,s-2)}else{for(c=f;cr);c++);c=h(c-1,s-2)}p=o[c+1],v=o[c]}if(v&&p){this._lastFr=c,this._lastFrP=r;var m=p.percent-v.percent,y=m===0?1:h((r-v.percent)/m,1);p.easingFunc&&(y=p.easingFunc(y));var x=n?this._additiveValue:u?Jf:e[l];if((Rp(a)||u)&&!x&&(x=this._additiveValue=[]),this.discrete)e[l]=y<1?v.rawValue:p.rawValue;else if(Rp(a))a===nm?bx(x,v[i],p[i],y):DY(x,v[i],p[i],y);else if(ND(a)){var S=v[i],b=p[i],T=a===Jw;e[l]={type:T?"linear":"radial",x:Na(S.x,b.x,y),y:Na(S.y,b.y,y),colorStops:re(S.colorStops,function(M,D){var I=b.colorStops[D];return{offset:Na(M.offset,I.offset,y),color:rm(bx([],M.color,I.color,y))}}),global:b.global},T?(e[l].x2=Na(S.x2,b.x2,y),e[l].y2=Na(S.y2,b.y2,y)):e[l].r=Na(S.r,b.r,y)}else if(u)bx(x,v[i],p[i],y),n||(e[l]=rm(x));else{var C=Na(v[i],p[i],y);n?this._additiveValue=C:e[l]=C}n&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,n=this.propName,i=this._additiveValue;r===Ep?e[n]=e[n]+i:r===Nh?(Ur(e[n],Jf),Ip(Jf,Jf,i,1),e[n]=rm(Jf)):r===nm?Ip(e[n],e[n],i,1):r===p4&&ED(e[n],e[n],i,1)},t}(),h2=function(){function t(e,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&i){b0("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,n){return this.whenWithKeys(e,r,Ue(r),n)},t.prototype.whenWithKeys=function(e,r,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,lv(u),i),this._trackKeys.push(s)}l.addKeyframe(e,lv(r[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,n=0;n0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},t}();function pc(){return new Date().getTime()}var NY=function(t){$(e,t);function e(r){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return e.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},e.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},e.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},e.prototype.update=function(r){for(var n=pc()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(Km(n),!r._paused&&r.update())}Km(n)},e.prototype.start=function(){this._running||(this._time=pc(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=pc(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=pc()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,n){n=n||{},this.start();var i=new h2(r,n.loop);return this.addAnimator(i),i},e}(ui),OY=300,Tx=We.domSupported,Cx=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=re(t,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:t,touch:e,pointer:n}}(),OD={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},zD=!1;function tb(t){var e=t.pointerType;return e==="pen"||e==="touch"}function zY(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Mx(t){t&&(t.zrByTouch=!0)}function BY(t,e){return Wn(t.dom,new VY(t,e),!0)}function g4(t,e){for(var r=e,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return n}var VY=function(){function t(e,r){this.stopPropagation=Nt,this.stopImmediatePropagation=Nt,this.preventDefault=Nt,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t}(),mi={mousedown:function(t){t=Wn(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Wn(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Wn(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=Wn(this.dom,t);var e=t.toElement||t.relatedTarget;g4(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){zD=!0,t=Wn(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){zD||(t=Wn(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=Wn(this.dom,t),Mx(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),mi.mousemove.call(this,t),mi.mousedown.call(this,t)},touchmove:function(t){t=Wn(this.dom,t),Mx(t),this.handler.processGesture(t,"change"),mi.mousemove.call(this,t)},touchend:function(t){t=Wn(this.dom,t),Mx(t),this.handler.processGesture(t,"end"),mi.mouseup.call(this,t),+new Date-+this.__lastTouchMomentFD||t<-FD}var zs=[],Mu=[],Ax=fr(),Px=Math.abs,Wa=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return Os(this.rotation)||Os(this.x)||Os(this.y)||Os(this.scaleX-1)||Os(this.scaleY-1)||Os(this.skewX)||Os(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&(VD(n),this.invTransform=null);return}n=n||fr(),r?this.getLocalTransform(n):VD(n),e&&(r?Li(n,e,n):Md(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(zs);var n=zs[0]<0?-1:1,i=zs[1]<0?-1:1,a=((zs[0]-n)*r+n)/zs[0]||0,o=((zs[1]-i)*r+i)/zs[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||fr(),oi(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var r=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||fr(),Li(Mu,e.invTransform,r),r=Mu);var n=this.originX,i=this.originY;(n||i)&&(Ax[4]=n,Ax[5]=i,Li(Mu,r,Ax),Mu[4]-=n,Mu[5]-=i,r=Mu),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var n=[e,r],i=this.invTransform;return i&&Ot(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,r){var n=[e,r],i=this.transform;return i&&Ot(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&Px(e[0]-1)>1e-10&&Px(e[3]-1)>1e-10?Math.sqrt(Px(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){iy(this,e)},t.getLocalTransform=function(e,r){r=r||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,h=e.skewX?Math.tan(e.skewX):0,v=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var p=n+s,g=i+l;r[4]=-p*a-h*g*o,r[5]=-g*o-v*p*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=v*a,r[2]=h*o,u&&vo(r,r,u),r[4]+=n+c,r[5]+=i+f,r},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),ga=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function iy(t,e){for(var r=0;r=jD)){t=t||io;for(var e=[],r=+new Date,n=0;n<=127;n++)e[n]=yn.measureText(String.fromCharCode(n),t).width;var i=+new Date-r;return i>16?Dx=jD:i>2&&Dx++,e}}var Dx=0,jD=5;function y4(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=WY(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?t.asciiWidthMap!=null?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function da(t,e){var r=t.strWidthCache,n=r.get(e);return n==null&&(n=yn.measureText(e,t.font).width,r.put(e,n)),n}function GD(t,e,r,n){var i=da(va(e),t),a=Ld(e),o=Hc(0,i,r),s=Al(0,a,n),l=new Ce(o,s,i,a);return l}function P0(t,e,r,n){var i=((t||"")+"").split(` +`),a=i.length;if(a===1)return GD(i[0],e,r,n);for(var o=new Ce(0,0,0,0),s=0;s=0?parseFloat(t)/100*e:parseFloat(t):t}function ay(t,e,r){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,c="left",f="top";if(n instanceof Array)l+=Ei(n[0],r.width),u+=Ei(n[1],r.height),c=null,f=null;else switch(n){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=c,t.verticalAlign=f,t}var kx="__zr_normal__",Ix=ga.concat(["ignore"]),UY=ai(ga,function(t,e){return t[e]=!0,t},{ignore:!1}),Lu={},ZY=new Ce(0,0,0,0),Op=[],D0=function(){function t(e){this.id=i2(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(r);var c=n.position!=null,f=n.autoOverflowArea,h=void 0;if((f||c)&&(h=ZY,n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),i||h.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(Lu,n,h):ay(Lu,n,h),a.x=Lu.x,a.y=Lu.y,o=Lu.align,s=Lu.verticalAlign;var v=n.origin;if(v&&n.rotation!=null){var p=void 0,g=void 0;v==="center"?(p=h.width*.5,g=h.height*.5):(p=Ei(v[0],h.width),g=Ei(v[1],h.height)),u=!0,a.originX=-a.x+p+(i?0:h.x),a.originY=-a.y+g+(i?0:h.y)}}n.rotation!=null&&(a.rotation=n.rotation);var m=n.offset;m&&(a.x+=m[0],a.y+=m[1],u||(a.originX=-m[0],a.originY=-m[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var x=y.overflowRect=y.overflowRect||new Ce(0,0,0,0);a.getLocalTransform(Op),oi(Op,Op),Ce.copy(x,h),x.applyTransform(Op)}else y.overflowRect=null;var S=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,b=void 0,T=void 0,C=void 0;S&&this.canBeInsideText()?(b=n.insideFill,T=n.insideStroke,(b==null||b==="auto")&&(b=this.getInsideTextFill()),(T==null||T==="auto")&&(T=this.getInsideTextStroke(b),C=!0)):(b=n.outsideFill,T=n.outsideStroke,(b==null||b==="auto")&&(b=this.getOutsideFill()),(T==null||T==="auto")&&(T=this.getOutsideStroke(b),C=!0)),b=b||"#000",(b!==y.fill||T!==y.stroke||C!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=b,y.stroke=T,y.autoStroke=C,y.align=o,y.verticalAlign=s,r.setDefaultTextStyle(y)),r.__dirty|=bn,l&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ab:ib},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&Ur(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,ti(n,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},J(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(we(e))for(var n=e,i=Ue(n),a=0;a0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(kx,!1,e)},t.prototype.useState=function(e,r,n,i){var a=e===kx,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(Ee(s,e)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){b0("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,h=this._textGuide;return f&&f.useState(e,r,n,c),h&&h.useState(e,r,n,c),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~bn),u}}},t.prototype.useStates=function(e,r,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l0,p);var g=this._textContent,m=this._textGuide;g&&g.useStates(e,r,h),m&&m.useStates(e,r,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~bn)}},t.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var r=e.__hostTarget;e=r?e.ignoreHostSilent?null:r:e.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},t.prototype.replaceState=function(e,r,n){var i=this.currentStates.slice(),a=Ee(i,e),o=Ee(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var n=this.animators,i=n.length,a=[],o=0;o0&&r.during&&a[0].during(function(p,g){r.during(g)});for(var h=0;h0||i.force&&!o.length){var D=void 0,I=void 0,k=void 0;if(s){I={},h&&(D={});for(var b=0;b=0&&(i.splice(a,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,n){var i=Ee(this._children,r);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},e.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(r){var n=this.__zr,i=this._children,a=Ee(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},t.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){if(!this._disposed)return this.handler.findHover(e,r)},t.prototype.on=function(e,r,n){return this._disposed||this.handler.on(e,r,n),this},t.prototype.off=function(e,r){this._disposed||this.handler.off(e,r)},t.prototype.trigger=function(e,r){this._disposed||this.handler.trigger(e,r)},t.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),r=0;r0){if(t<=i)return o;if(t>=a)return s}else{if(t>=i)return o;if(t<=a)return s}else{if(t===i)return o;if(t===a)return s}return(t-i)/l*u+o}var oe=oX;function oX(t,e,r){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return oy(t,e,r)}function oy(t,e,r){return se(t)?aX(t).match(/%$/)?parseFloat(t)/100*e+(r||0):parseFloat(t):t==null?NaN:+t}function Ht(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),b4),t=(+t).toFixed(e),r?t:+t}function Ln(t){return t.sort(function(e,r){return e-r}),t}function bi(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return T4(t)}function T4(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),n=r>0?+e.slice(r+1):0,i=r>0?r:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function v2(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(aa(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function sX(t,e,r){if(!t[e])return 0;var n=C4(t,r);return n[e]||0}function C4(t,e){var r=ai(t,function(v,p){return v+(isNaN(p)?0:p)},0);if(r===0)return[];for(var n=Math.pow(10,e),i=re(t,function(v){return(isNaN(v)?0:v)/r*n*100}),a=n*100,o=re(i,function(v){return Math.floor(v)}),s=ai(o,function(v,p){return v+p},0),l=re(i,function(v,p){return v-o[p]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return re(o,function(v){return v/n})}function lX(t,e){var r=Math.max(bi(t),bi(e)),n=t+e;return r>b4?n:Ht(n,r)}var lb=9007199254740991;function d2(t){var e=Math.PI*2;return(t%e+e)%e}function Wc(t){return t>-HD&&t=10&&e++,e}function p2(t,e){var r=k0(t),n=Math.pow(10,r),i=t/n,a;return e?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,t=a*n,r>=-20?+t.toFixed(r<0?-r:0):t}function om(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i}function ub(t){t.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,r=1,n=0;n0?e.length:0),this.item=null,this.key=NaN,this},t.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},t}();function Nx(t){t.option=t.parentModel=t.ecModel=null}var AX=".",zs="___EC__COMPONENT__CONTAINER___",O4="___EC__EXTENDED_CLASS___";function oa(t){var e={main:"",sub:""};if(t){var r=t.split(AX);e.main=r[0]||"",e.sub=r[1]||""}return e}function PX(t){Er(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function DX(t){return!!(t&&t[O4])}function _2(t,e){t.$constructor=t,t.extend=function(r){var n=this,i;return kX(n)?i=function(a){$(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(r.$constructor||n).apply(this,arguments)},a2(i,this)),J(i.prototype,r),i[O4]=!0,i.extend=this.extend,i.superCall=RX,i.superApply=NX,i.superClass=n,i}}function kX(t){return me(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function z4(t,e){t.extend=e.extend}var IX=Math.round(Math.random()*10);function EX(t){var e=["__\0is_clz",IX++].join("_");t.prototype[e]=!0,t.isInstance=function(r){return!!(r&&r[e])}}function RX(t,e){for(var r=[],n=2;n=0||a&&Ee(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[t[s][0]]=u)}}return o}}var OX=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],zX=Wl(OX),BX=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return zX(this,e,r)},t}(),fb=new jc(50);function VX(t){if(typeof t=="string"){var e=fb.get(t);return e&&e.image}else return t}function x2(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=fb.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!E0(e)&&a.pending.push(o)):(e=yn.loadImage(t,$D,$D),e.__zrImageSrc=t,fb.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function $D(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},t.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){if(!this._disposed)return this.handler.findHover(e,r)},t.prototype.on=function(e,r,n){return this._disposed||this.handler.on(e,r,n),this},t.prototype.off=function(e,r){this._disposed||this.handler.off(e,r)},t.prototype.trigger=function(e,r){this._disposed||this.handler.trigger(e,r)},t.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),r=0;r0){if(t<=i)return o;if(t>=a)return s}else{if(t>=i)return o;if(t<=a)return s}else{if(t===i)return o;if(t===a)return s}return(t-i)/l*u+o}var oe=oX;function oX(t,e,r){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return oy(t,e,r)}function oy(t,e,r){return se(t)?aX(t).match(/%$/)?parseFloat(t)/100*e+(r||0):parseFloat(t):t==null?NaN:+t}function Ht(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),b4),t=(+t).toFixed(e),r?t:+t}function Ln(t){return t.sort(function(e,r){return e-r}),t}function bi(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return T4(t)}function T4(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),n=r>0?+e.slice(r+1):0,i=r>0?r:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function v2(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(aa(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function sX(t,e,r){if(!t[e])return 0;var n=C4(t,r);return n[e]||0}function C4(t,e){var r=ai(t,function(v,p){return v+(isNaN(p)?0:p)},0);if(r===0)return[];for(var n=Math.pow(10,e),i=re(t,function(v){return(isNaN(v)?0:v)/r*n*100}),a=n*100,o=re(i,function(v){return Math.floor(v)}),s=ai(o,function(v,p){return v+p},0),l=re(i,function(v,p){return v-o[p]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return re(o,function(v){return v/n})}function lX(t,e){var r=Math.max(bi(t),bi(e)),n=t+e;return r>b4?n:Ht(n,r)}var lb=9007199254740991;function d2(t){var e=Math.PI*2;return(t%e+e)%e}function Wc(t){return t>-HD&&t=10&&e++,e}function p2(t,e){var r=k0(t),n=Math.pow(10,r),i=t/n,a;return e?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,t=a*n,r>=-20?+t.toFixed(r<0?-r:0):t}function om(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i}function ub(t){t.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,r=1,n=0;n0?e.length:0),this.item=null,this.key=NaN,this},t.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},t}();function Nx(t){t.option=t.parentModel=t.ecModel=null}var AX=".",Bs="___EC__COMPONENT__CONTAINER___",O4="___EC__EXTENDED_CLASS___";function oa(t){var e={main:"",sub:""};if(t){var r=t.split(AX);e.main=r[0]||"",e.sub=r[1]||""}return e}function PX(t){Er(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function DX(t){return!!(t&&t[O4])}function _2(t,e){t.$constructor=t,t.extend=function(r){var n=this,i;return kX(n)?i=function(a){$(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(r.$constructor||n).apply(this,arguments)},a2(i,this)),J(i.prototype,r),i[O4]=!0,i.extend=this.extend,i.superCall=RX,i.superApply=NX,i.superClass=n,i}}function kX(t){return me(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function z4(t,e){t.extend=e.extend}var IX=Math.round(Math.random()*10);function EX(t){var e=["__\0is_clz",IX++].join("_");t.prototype[e]=!0,t.isInstance=function(r){return!!(r&&r[e])}}function RX(t,e){for(var r=[],n=2;n=0||a&&Ee(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[t[s][0]]=u)}}return o}}var OX=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],zX=Wl(OX),BX=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return zX(this,e,r)},t}(),fb=new Gc(50);function VX(t){if(typeof t=="string"){var e=fb.get(t);return e&&e.image}else return t}function x2(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=fb.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!E0(e)&&a.pending.push(o)):(e=yn.loadImage(t,$D,$D),e.__zrImageSrc=t,fb.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function $D(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=s;u++)l-=s;var c=da(o,r);return c>l&&(r="",c=0),l=t-c,i.ellipsis=r,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=t,i}function F4(t,e,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){t.textLine="",t.isTruncated=!1;return}var o=da(a,e);if(o<=n){t.textLine=e,t.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=r.maxIterations){e+=r.ellipsis;break}var l=s===0?GX(e,i,a):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=da(a,e)}e===""&&(e=r.placeholder),t.textLine=e,t.isTruncated=!0}function GX(t,e,r){for(var n=0,i=0,a=t.length;im&&v){var S=Math.floor(m/h);p=p||y.length>S,y=y.slice(0,S),x=y.length*h}if(i&&c&&g!=null)for(var b=V4(g,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),T={},C=0;Cp&&zx(a,o.substring(p,m),e,v),zx(a,g[2],e,v,g[1]),p=Ox.lastIndex}pf){var W=a.lines.length;z>0?(I.tokens=I.tokens.slice(0,z),M(I,E,k),a.lines=a.lines.slice(0,D+1)):a.lines=a.lines.slice(0,D),a.isTruncated=a.isTruncated||a.lines.length0&&p+n.accumWidth>n.width&&(c=e.split(` -`),u=!0),n.accumWidth=p}else{var g=G4(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+v,f=g.linesWidths,c=g.lines}}c||(c=e.split(` -`));for(var m=va(l),y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var $X=ai(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function YX(t){return ZX(t)?!!$X[t]:!0}function G4(t,e,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,f=va(e),h=0;hr:i+c+p>r){c?(s||l)&&(g?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=v,u+=p,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=v,c=p)):g?(a.push(l),o.push(u),l=v,u=p):(a.push(v),o.push(p));continue}c+=p,g?(l+=v,u+=p):(l&&(s+=l,l="",u=0),s+=v)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}function XD(t,e,r,n,i,a){if(t.baseX=r,t.baseY=n,t.outerWidth=t.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;Ce.set(qD,Hc(r,o,i),Ll(n,s,a),o,s),Ce.intersect(e,qD,null,KD);var l=KD.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=Hc(l.x,l.width,i,!0),t.baseY=Ll(l.y,l.height,a,!0)}}var qD=new Ce(0,0,0,0),KD={outIntersectRect:{},clamp:!0};function S2(t){return t!=null?t+="":t=""}function XX(t){var e=S2(t.text),r=t.font,n=da(va(r),e),i=Ld(r);return hb(t,n,i,null)}function hb(t,e,r,n){var i=new Ce(Hc(t.x||0,e,t.textAlign),Ll(t.y||0,r,t.textBaseline),e,r),a=n??(j4(t)?t.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function j4(t){var e=t.stroke;return e!=null&&e!=="none"&&t.lineWidth>0}var vb="__zr_style_"+Math.round(Math.random()*10),Al={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},R0={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Al[vb]=!0;var QD=["z","z2","invisible"],qX=["invisible"],si=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=Ue(r),i=0;i1e-4){s[0]=t-r,s[1]=e-n,l[0]=t+r,l[1]=e+n;return}if(zp[0]=Gx(i)*r+t,zp[1]=Fx(i)*n+e,Bp[0]=Gx(a)*r+t,Bp[1]=Fx(a)*n+e,u(s,zp,Bp),c(l,zp,Bp),i=i%Bs,i<0&&(i=i+Bs),a=a%Bs,a<0&&(a=a+Bs),i>a&&!o?a+=Bs:ii&&(Vp[0]=Gx(v)*r+t,Vp[1]=Fx(v)*n+e,u(s,Vp,s),c(l,Vp,l))}var mt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Vs=[],Fs=[],Wi=[],_o=[],Ui=[],Zi=[],jx=Math.min,Hx=Math.max,Gs=Math.cos,js=Math.sin,Pa=Math.abs,db=Math.PI,Lo=db*2,Wx=typeof Float32Array<"u",eh=[];function Ux(t){var e=Math.round(t/db*1e8)/1e8;return e%2*db}function O0(t,e){var r=Ux(t[0]);r<0&&(r+=Lo);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=Lo?i=r+Lo:e&&r-i>=Lo?i=r-Lo:!e&&r>i?i=r+(Lo-Ux(r-i)):e&&r0&&(this._ux=Pa(n/ny/e)||0,this._uy=Pa(n/ny/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(mt.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=Pa(e-this._xi),i=Pa(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(mt.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){return this._drawPendingPt(),this.addData(mt.C,e,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,i,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,i){return this._drawPendingPt(),this.addData(mt.Q,e,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,r,n,i,a,o){this._drawPendingPt(),eh[0]=i,eh[1]=a,O0(eh,o),i=eh[0],a=eh[1];var s=a-i;return this.addData(mt.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=Gs(a)*n+e,this._yi=js(a)*n+r,this},t.prototype.arcTo=function(e,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,i,a),this},t.prototype.rect=function(e,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,i),this.addData(mt.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(mt.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){if(this._saveData){var r=e.length;!(this.data&&this.data.length===r)&&Wx&&(this.data=new Float32Array(r));for(var n=0;n0&&o))for(var s=0;sc.length&&(this._expandData(),c=this.data);for(var f=0;f0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){Wi[0]=Wi[1]=Ui[0]=Ui[1]=Number.MAX_VALUE,_o[0]=_o[1]=Zi[0]=Zi[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||Pa(S)>i||h===r-1)&&(g=Math.sqrt(x*x+S*S),a=m,o=y);break}case mt.C:{var b=e[h++],T=e[h++],m=e[h++],y=e[h++],C=e[h++],M=e[h++];g=cY(a,o,b,T,m,y,C,M,10),a=C,o=M;break}case mt.Q:{var b=e[h++],T=e[h++],m=e[h++],y=e[h++];g=hY(a,o,b,T,m,y,10),a=m,o=y;break}case mt.A:var D=e[h++],I=e[h++],k=e[h++],E=e[h++],z=e[h++],O=e[h++],F=O+z;h+=1,p&&(s=Gs(z)*k+D,l=js(z)*E+I),g=Hx(k,E)*jx(Lo,Math.abs(O)),a=Gs(F)*k+D,o=js(F)*E+I;break;case mt.R:{s=a=e[h++],l=o=e[h++];var j=e[h++],G=e[h++];g=j*2+G*2;break}case mt.Z:{var x=s-a,S=l-o;g=Math.sqrt(x*x+S*S),a=s,o=l;break}}g>=0&&(u[f++]=g,c+=g)}return this._pathLen=c,c},t.prototype.rebuildPath=function(e,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,f,h,v=r<1,p,g,m=0,y=0,x,S=0,b,T;if(!(v&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,x=r*g,!x)))e:for(var C=0;C0&&(e.lineTo(b,T),S=0),M){case mt.M:s=u=n[C++],l=c=n[C++],e.moveTo(u,c);break;case mt.L:{f=n[C++],h=n[C++];var I=Pa(f-u),k=Pa(h-c);if(I>i||k>a){if(v){var E=p[y++];if(m+E>x){var z=(x-m)/E;e.lineTo(u*(1-z)+f*z,c*(1-z)+h*z);break e}m+=E}e.lineTo(f,h),u=f,c=h,S=0}else{var O=I*I+k*k;O>S&&(b=f,T=h,S=O)}break}case mt.C:{var F=n[C++],j=n[C++],G=n[C++],Z=n[C++],V=n[C++],W=n[C++];if(v){var E=p[y++];if(m+E>x){var z=(x-m)/E;fs(u,F,G,V,z,Vs),fs(c,j,Z,W,z,Fs),e.bezierCurveTo(Vs[1],Fs[1],Vs[2],Fs[2],Vs[3],Fs[3]);break e}m+=E}e.bezierCurveTo(F,j,G,Z,V,W),u=V,c=W;break}case mt.Q:{var F=n[C++],j=n[C++],G=n[C++],Z=n[C++];if(v){var E=p[y++];if(m+E>x){var z=(x-m)/E;Vv(u,F,G,z,Vs),Vv(c,j,Z,z,Fs),e.quadraticCurveTo(Vs[1],Fs[1],Vs[2],Fs[2]);break e}m+=E}e.quadraticCurveTo(F,j,G,Z),u=G,c=Z;break}case mt.A:var H=n[C++],Y=n[C++],K=n[C++],ne=n[C++],ie=n[C++],ue=n[C++],de=n[C++],Fe=!n[C++],xe=K>ne?K:ne,ge=Pa(K-ne)>.001,De=ie+ue,he=!1;if(v){var E=p[y++];m+E>x&&(De=ie+ue*(x-m)/E,he=!0),m+=E}if(ge&&e.ellipse?e.ellipse(H,Y,K,ne,de,ie,De,Fe):e.arc(H,Y,xe,ie,De,Fe),he)break e;D&&(s=Gs(ie)*K+H,l=js(ie)*ne+Y),u=Gs(De)*K+H,c=js(De)*ne+Y;break;case mt.R:s=u=n[C],l=c=n[C+1],f=n[C++],h=n[C++];var Me=n[C++],ot=n[C++];if(v){var E=p[y++];if(m+E>x){var $e=x-m;e.moveTo(f,h),e.lineTo(f+jx($e,Me),h),$e-=Me,$e>0&&e.lineTo(f+Me,h+jx($e,ot)),$e-=ot,$e>0&&e.lineTo(f+Hx(Me-$e,0),h+ot),$e-=Me,$e>0&&e.lineTo(f,h+Hx(ot-$e,0));break e}m+=E}e.rect(f,h,Me,ot);break;case mt.Z:if(v){var E=p[y++];if(m+E>x){var z=(x-m)/E;e.lineTo(u*(1-z)+s*z,c*(1-z)+l*z);break e}m+=E}e.closePath(),u=s,c=l}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.prototype.canSave=function(){return!!this._saveData},t.CMD=mt,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function ko(t,e,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>n+s||ot+s&&a>r+s||ae+f&&c>n+f&&c>a+f&&c>s+f||ct+f&&u>r+f&&u>i+f&&u>o+f||ue+u&&l>n+u&&l>a+u||lt+u&&s>r+u&&s>i+u||sr||c+ui&&(i+=th);var h=Math.atan2(l,s);return h<0&&(h+=th),h>=n&&h<=i||h+th>=n&&h+th<=i}function Oa(t,e,r,n,i,a){if(a>e&&a>n||ai?s:0}var xo=ya.CMD,Hs=Math.PI*2,nq=1e-4;function iq(t,e){return Math.abs(t-e)e&&u>n&&u>a&&u>s||u1&&aq(),v=lr(e,n,a,s,Zn[0]),h>1&&(p=lr(e,n,a,s,Zn[1]))),h===2?me&&s>n&&s>a||s=0&&u<=1){for(var c=0,f=xr(e,n,a,u),h=0;hr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Kr[0]=-l,Kr[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Hs-1e-4){n=0,i=Hs;var c=a?1:-1;return o>=Kr[0]+t&&o<=Kr[1]+t?c:0}if(n>i){var f=n;n=i,i=f}n<0&&(n+=Hs,i+=Hs);for(var h=0,v=0;v<2;v++){var p=Kr[v];if(p+t>o){var g=Math.atan2(s,p),c=a?1:-1;g<0&&(g=Hs+g),(g>=n&&g<=i||g+Hs>=n&&g+Hs<=i)&&(g>Math.PI/2&&g1&&(r||(s+=Oa(l,u,c,f,n,i))),m&&(l=a[p],u=a[p+1],c=l,f=u),g){case xo.M:c=a[p++],f=a[p++],l=c,u=f;break;case xo.L:if(r){if(ko(l,u,a[p],a[p+1],e,n,i))return!0}else s+=Oa(l,u,a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case xo.C:if(r){if(tq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=oq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case xo.Q:if(r){if(H4(l,u,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=sq(l,u,a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case xo.A:var y=a[p++],x=a[p++],S=a[p++],b=a[p++],T=a[p++],C=a[p++];p+=1;var M=!!(1-a[p++]);h=Math.cos(T)*S+y,v=Math.sin(T)*b+x,m?(c=h,f=v):s+=Oa(l,u,h,v,n,i);var D=(n-y)*b/S+y;if(r){if(rq(y,x,b,T,T+C,M,e,D,i))return!0}else s+=lq(y,x,b,T,T+C,M,D,i);l=Math.cos(T+C)*S+y,u=Math.sin(T+C)*b+x;break;case xo.R:c=l=a[p++],f=u=a[p++];var I=a[p++],k=a[p++];if(h=c+I,v=f+k,r){if(ko(c,f,h,f,e,n,i)||ko(h,f,h,v,e,n,i)||ko(h,v,c,v,e,n,i)||ko(c,v,c,f,e,n,i))return!0}else s+=Oa(h,f,h,v,n,i),s+=Oa(c,v,c,f,n,i);break;case xo.Z:if(r){if(ko(l,u,c,f,e,n,i))return!0}else s+=Oa(l,u,c,f,n,i);l=c,u=f;break}}return!r&&!iq(u,f)&&(s+=Oa(l,u,c,f,n,i)||0),s!==0}function uq(t,e,r){return W4(t,0,!1,e,r)}function cq(t,e,r,n){return W4(t,e,!0,r,n)}var sy=Se({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Al),fq={style:Se({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},R0.style)},Zx=ga.concat(["invisible","culling","z","z2","zlevel","parent"]),He=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?ib:n>.2?HY:ab}else if(r)return ab}return ib},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(se(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=jv(r,0)0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Qu)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),cq(s,l/u,r,n)))return!0}if(this.hasFill())return uq(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Qu,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:J(i,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Qu)},e.prototype.createStyle=function(r){return Td(sy,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=J({},this.shape))},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=J({},i.shape),J(u,n.shape)):(u=J({},a?this.shape:i.shape),J(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=J({},this.shape);for(var c={},f=Ue(u),h=0;hi&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),t.moveTo(r+s,n),t.lineTo(r+i-l,n),l!==0&&t.arc(r+i-l,n+l,l,-Math.PI/2,0),t.lineTo(r+i,n+a-u),u!==0&&t.arc(r+i-u,n+a-u,u,0,Math.PI/2),t.lineTo(r+c,n+a),c!==0&&t.arc(r+c,n+a-c,c,Math.PI/2,Math.PI),t.lineTo(r,n+s),s!==0&&t.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var gc=Math.round;function z0(t,e,r){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=i,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(gc(n*2)===gc(i*2)&&(t.x1=t.x2=Pn(n,s,!0)),gc(a*2)===gc(o*2)&&(t.y1=t.y2=Pn(a,s,!0))),t}}function U4(t,e,r){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;t.x=n,t.y=i,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=Pn(n,s,!0),t.y=Pn(i,s,!0),t.width=Math.max(Pn(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(Pn(i+o,s,!1)-t.y,o===0?0:1)),t}}function Pn(t,e,r){if(!e)return t;var n=gc(t*2);return(n+gc(e))%2===0?n/2:(n+(r?1:-1))/2}var mq=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),yq={},ze=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new mq},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=U4(yq,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?gq(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(He);ze.prototype.type="rect";var nk={fill:"#000"},ik=2,$i={},_q={style:Se({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},R0.style)},Ye=function(t){$(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=nk,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,z=0;z=0&&(F=C[O],F.align==="right");)this._placeToken(F,r,D,y,z,"right",S),I-=F.width,z-=F.width,O--;for(E+=(c-(E-m)-(x-z)-I)/2;k<=O;)F=C[k],this._placeToken(F,r,D,y,E+F.width/2,"center",S),E+=F.width,k++;y+=D}},e.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,f=a+i/2;c==="top"?f=a+r.height/2:c==="bottom"&&(f=a+i-r.height/2);var h=!r.isLineHolder&&$x(u);h&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,f-r.height/2,r.width,r.height);var v=!!u.backgroundColor,p=r.textPadding;p&&(o=ck(o,s,p),f-=r.height/2-p[0]-r.innerHeight/2);var g=this._getOrCreateChild(Uc),m=g.createStyle();g.useStyle(m);var y=this._defaultStyle,x=!1,S=0,b=!1,T=uk("fill"in u?u.fill:"fill"in n?n.fill:(x=!0,y.fill)),C=lk("stroke"in u?u.stroke:"stroke"in n?n.stroke:!v&&!l&&(!y.autoStroke||x)?(S=ik,b=!0,y.stroke):null),M=u.textShadowBlur>0||n.textShadowBlur>0;m.text=r.text,m.x=o,m.y=f,M&&(m.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,m.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=r.font||no,m.opacity=mn(u.opacity,n.opacity,1),ok(m,u),C&&(m.lineWidth=mn(u.lineWidth,n.lineWidth,S),m.lineDash=pe(u.lineDash,n.lineDash),m.lineDashOffset=n.lineDashOffset||0,m.stroke=C),T&&(m.fill=T),g.setBoundingRect(hb(m,r.contentWidth,r.contentHeight,b?0:null))},e.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,f=l&&l.image,h=l&&!f,v=r.borderRadius,p=this,g,m;if(h||r.lineHeight||u&&c){g=this._getOrCreateChild(ze),g.useStyle(g.createStyle()),g.style.fill=null;var y=g.shape;y.x=i,y.y=a,y.width=o,y.height=s,y.r=v,g.dirtyShape()}if(h){var x=g.style;x.fill=l||null,x.fillOpacity=pe(r.fillOpacity,1)}else if(f){m=this._getOrCreateChild(dr),m.onload=function(){p.dirtyStyle()};var S=m.style;S.image=l.image,S.x=i,S.y=a,S.width=o,S.height=s}if(u&&c){var x=g.style;x.lineWidth=u,x.stroke=c,x.strokeOpacity=pe(r.strokeOpacity,1),x.lineDash=r.borderDash,x.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(x.strokeFirst=!0,x.lineWidth*=2)}var b=(g||m).style;b.shadowBlur=r.shadowBlur||0,b.shadowColor=r.shadowColor||"transparent",b.shadowOffsetX=r.shadowOffsetX||0,b.shadowOffsetY=r.shadowOffsetY||0,b.opacity=mn(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return $4(r)&&(n=[r.fontStyle,r.fontWeight,Z4(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Mn(n)||r.textFont||r.font},e}(si),xq={left:!0,right:1,center:1},Sq={top:1,bottom:1,middle:1},ak=["fontStyle","fontWeight","fontSize","fontFamily"];function Z4(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?t2+"px":t+"px"}function ok(t,e){for(var r=0;r=0,a=!1;if(t instanceof He){var o=Y4(t),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Au(s)||Au(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=J({},n),u=J({},u),u.fill=s):!Au(u.fill)&&Au(s)?(a=!0,n=J({},n),u=J({},u),u.fill=ty(s)):!Au(u.stroke)&&Au(l)&&(a||(n=J({},n),u=J({},u)),u.stroke=ty(l)),n.style=u}}if(n&&n.z2==null){a||(n=J({},n));var c=t.z2EmphasisLift;n.z2=t.z2+(c??hf)}return n}function Aq(t,e,r){if(r&&r.z2==null){r=J({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??bq)}return r}function Pq(t,e,r){var n=Ee(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:Mq(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=J({},r),o=J({opacity:n?i:a.opacity*.1},o),r.style=o),r}function Yx(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return Lq(this,t,e,r);if(t==="blur")return Pq(this,t,r);if(t==="select")return Aq(this,t,r)}return r}function Ul(t){t.stateProxy=Yx;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=Yx),r&&(r.stateProxy=Yx)}function pk(t,e){!tV(t,e)&&!t.__highByOuter&&vo(t,X4)}function gk(t,e){!tV(t,e)&&!t.__highByOuter&&vo(t,q4)}function ao(t,e){t.__highByOuter|=1<<(e||0),vo(t,X4)}function oo(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&vo(t,q4)}function Q4(t){vo(t,C2)}function M2(t){vo(t,K4)}function J4(t){vo(t,Tq)}function eV(t){vo(t,Cq)}function tV(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function rV(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=w2(a),s=i==="series",l=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){K4(u)}),s&&r.push(a)),o.isBlured=!1}),N(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function mb(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function ns(t,e,r){xl(t,!0),vo(t,Ul),_b(t,e,r)}function Nq(t){xl(t,!1)}function bt(t,e,r,n){n?Nq(t):ns(t,e,r)}function _b(t,e,r){var n=Ae(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var yk=["emphasis","blur","select"],Oq={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ir(t,e,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=Xx(p),s*=Xx(p));var g=(i===a?-1:1)*Xx((o*o*(s*s)-o*o*(v*v)-s*s*(h*h))/(o*o*(v*v)+s*s*(h*h)))||0,m=g*o*v/s,y=g*-s*h/o,x=(t+r)/2+Gp(f)*m-Fp(f)*y,S=(e+n)/2+Fp(f)*m+Gp(f)*y,b=wk([1,0],[(h-m)/o,(v-y)/s]),T=[(h-m)/o,(v-y)/s],C=[(-1*h-m)/o,(-1*v-y)/s],M=wk(T,C);if(Sb(T,C)<=-1&&(M=rh),Sb(T,C)>=1&&(M=0),M<0){var D=Math.round(M/rh*1e6)/1e6;M=rh*2+D%2*rh}c.addData(u,x,S,o,s,b,M,f,a)}var jq=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Hq=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Wq(t){var e=new ya;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=ya.CMD,l=t.match(jq);if(!l)return e;for(var u=0;uF*F+j*j&&(D=k,I=E),{cx:D,cy:I,x0:-c,y0:-f,x1:D*(i/T-1),y1:I*(i/T-1)}}function Kq(t){var e;if(ee(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function Qq(t,e){var r,n=Oh(e.r,0),i=Oh(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,h=!!e.clockwise,v=Tk(u-l),p=v>qx&&v%qx;if(p>gi&&(v=p),!(n>gi))t.moveTo(c,f);else if(v>qx-gi)t.moveTo(c+n*Du(l),f+n*Ws(l)),t.arc(c,f,n,l,u,!h),i>gi&&(t.moveTo(c+i*Du(u),f+i*Ws(u)),t.arc(c,f,i,u,l,h));else{var g=void 0,m=void 0,y=void 0,x=void 0,S=void 0,b=void 0,T=void 0,C=void 0,M=void 0,D=void 0,I=void 0,k=void 0,E=void 0,z=void 0,O=void 0,F=void 0,j=n*Du(l),G=n*Ws(l),Z=i*Du(u),V=i*Ws(u),W=v>gi;if(W){var H=e.cornerRadius;H&&(r=Kq(H),g=r[0],m=r[1],y=r[2],x=r[3]);var Y=Tk(n-i)/2;if(S=Yi(Y,y),b=Yi(Y,x),T=Yi(Y,g),C=Yi(Y,m),I=M=Oh(S,b),k=D=Oh(T,C),(M>gi||D>gi)&&(E=n*Du(u),z=n*Ws(u),O=i*Du(l),F=i*Ws(l),vgi){var ge=Yi(y,I),De=Yi(x,I),he=jp(O,F,j,G,n,ge,h),Me=jp(E,z,Z,V,n,De,h);t.moveTo(c+he.cx+he.x0,f+he.cy+he.y0),I0&&t.arc(c+he.cx,f+he.cy,ge,Fr(he.y0,he.x0),Fr(he.y1,he.x1),!h),t.arc(c,f,n,Fr(he.cy+he.y1,he.cx+he.x1),Fr(Me.cy+Me.y1,Me.cx+Me.x1),!h),De>0&&t.arc(c+Me.cx,f+Me.cy,De,Fr(Me.y1,Me.x1),Fr(Me.y0,Me.x0),!h))}else t.moveTo(c+j,f+G),t.arc(c,f,n,l,u,!h);if(!(i>gi)||!W)t.lineTo(c+Z,f+V);else if(k>gi){var ge=Yi(g,k),De=Yi(m,k),he=jp(Z,V,E,z,i,-De,h),Me=jp(j,G,O,F,i,-ge,h);t.lineTo(c+he.cx+he.x0,f+he.cy+he.y0),k0&&t.arc(c+he.cx,f+he.cy,De,Fr(he.y0,he.x0),Fr(he.y1,he.x1),!h),t.arc(c,f,i,Fr(he.cy+he.y1,he.cx+he.x1),Fr(Me.cy+Me.y1,Me.cx+Me.x1),h),ge>0&&t.arc(c+Me.cx,f+Me.cy,ge,Fr(Me.y1,Me.x1),Fr(Me.y0,Me.x0),!h))}else t.lineTo(c+Z,f+V),t.arc(c,f,i,u,l,h)}t.closePath()}}}var Jq=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return t}(),Rr=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Jq},e.prototype.buildPath=function(r,n){Qq(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(He);Rr.prototype.type="sector";var eK=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),vf=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new eK},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},e}(He);vf.prototype.type="ring";function tK(t,e,r,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,v=t.length;h=2){if(n){var a=tK(i,n,r,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{t.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;sZs[1]){if(a=!1,yr.negativeSize||n)return a;var l=Hp(Zs[0]-Us[1]),u=Hp(Us[0]-Zs[1]);Kx(l,u)>Up.len()&&(l=u||!yr.bidirectional)&&(Te.scale(Wp,s,-u*i),yr.useDir&&yr.calcDirMTV()))}}return a},t.prototype._getProjMinMaxOnAxis=function(e,r,n){for(var i=this._axes[e],a=this._origin,o=r[0].dot(i)+a[e],s=o,l=o,u=1;u0){var f=c.duration,h=c.delay,v=c.easing,p={duration:f,delay:h||0,easing:v,done:a,force:!!a||!!o,setToFinal:!u,scope:t,during:o};s?e.animateFrom(r,p):e.animateTo(r,p)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function Ke(t,e,r,n,i,a){D2("update",t,e,r,n,i,a)}function xt(t,e,r,n,i,a){D2("enter",t,e,r,n,i,a)}function Dc(t){if(!t.__zr)return!0;for(var e=0;eaa(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Lk(t){return!t.isGroup}function vK(t){return t.shape!=null}function Id(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(l){Lk(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return vK(o)&&(s.shape=ye(o.shape)),s}var a=n(t);e.traverse(function(o){if(Lk(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Ke(o,l,r,Ae(o).dataIndex)}}})}function E2(t,e){return re(t,function(r){var n=r[0];n=jt(n,e.x),n=kn(n,e.x+e.width);var i=r[1];return i=jt(i,e.y),i=kn(i,e.y+e.height),[n,i]})}function mV(t,e){var r=jt(t.x,e.x),n=kn(t.x+t.width,e.x+e.width),i=jt(t.y,e.y),a=kn(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function gf(t,e,r){var n=J({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(i.image=t.slice(8),Se(i,r),new dr(n)):Zc(t.replace("path://",""),n,r,"center")}function zh(t,e,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var m=Qx(v,p,c,f)/h;return!(m<0||m>1)}function Qx(t,e,r,n){return t*n-r*e}function dK(t){return t<=1e-6&&t>=-1e-6}function Zl(t,e,r,n,i){return e==null||(Xe(e)?Ct[0]=Ct[1]=Ct[2]=Ct[3]=e:(Ct[0]=e[0],Ct[1]=e[1],Ct[2]=e[2],Ct[3]=e[3]),n&&(Ct[0]=jt(0,Ct[0]),Ct[1]=jt(0,Ct[1]),Ct[2]=jt(0,Ct[2]),Ct[3]=jt(0,Ct[3])),r&&(Ct[0]=-Ct[0],Ct[1]=-Ct[1],Ct[2]=-Ct[2],Ct[3]=-Ct[3]),Ak(t,Ct,"x","width",3,1,i&&i[0]||0),Ak(t,Ct,"y","height",0,2,i&&i[1]||0)),t}var Ct=[0,0,0,0];function Ak(t,e,r,n,i,a,o){var s=e[a]+e[i],l=t[n];t[n]+=s,o=jt(0,kn(o,l)),t[n]=0?-e[i]:e[a]>=0?l+e[a]:aa(s)>1e-8?(l-o)*e[i]/s:0):t[r]-=e[i]}function po(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,i=se(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=t.formatterParamsExtra;l&&N(Ue(l),function(c){fe(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Ae(t.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:Se({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function bb(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function ws(t,e){if(t)if(ee(t))for(var r=0;re&&(e=o),oe&&(r=e=0),{min:r,max:e}}function G0(t,e,r){xV(t,e,r,-1/0)}function xV(t,e,r,n){if(t.ignoreModelZ)return n;var i=t.getTextContent(),a=t.getTextGuideLine(),o=t.isGroup;if(o)for(var s=t.childrenRef(),l=0;l=0&&s.push(l)}),s}}function bs(t,e){return Re(Re({},t,!0),e,!0)}const MK={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},LK={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var hy="ZH",z2="EN",kc=z2,um={},B2={},MV=We.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||kc).toUpperCase();return t.indexOf(hy)>-1?hy:kc}():kc;function V2(t,e){t=t.toUpperCase(),B2[t]=new je(e),um[t]=e}function AK(t){if(se(t)){var e=um[t.toUpperCase()]||{};return t===hy||t===z2?ye(e):Re(ye(e),ye(um[kc]),!1)}else return Re(ye(t),ye(um[kc]),!1)}function Cb(t){return B2[t]}function PK(){return B2[kc]}V2(z2,MK);V2(hy,LK);var Mb=null;function DK(t){Mb||(Mb=t)}function Xt(){return Mb}var F2=1e3,G2=F2*60,fv=G2*60,Qn=fv*24,Ek=Qn*365,kK={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},cm={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},IK="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",$p="{yyyy}-{MM}-{dd}",Rk={year:"{yyyy}",month:"{yyyy}-{MM}",day:$p,hour:$p+" "+cm.hour,minute:$p+" "+cm.minute,second:$p+" "+cm.second,millisecond:IK},Sn=["year","month","day","hour","minute","second","millisecond"],EK=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function RK(t){return!se(t)&&!me(t)?NK(t):t}function NK(t){t=t||{};var e={},r=!0;return N(Sn,function(n){r&&(r=t[n]==null)}),N(Sn,function(n,i){var a=t[n];e[n]={};for(var o=null,s=i;s>=0;s--){var l=Sn[s],u=we(a)&&!ee(a)?a[l]:a,c=void 0;ee(u)?(c=u.slice(),o=c[0]||""):se(u)?(o=u,c=[o]):(o==null?o=cm[n]:kK[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],r&&(c[1]="{primary|"+o+"}")),e[n][l]=c}}),e}function Qr(t,e){return t+="","0000".substr(0,e-t.length)+t}function hv(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function OK(t){return t===hv(t)}function zK(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Ed(t,e,r,n){var i=wa(t),a=i[LV(r)](),o=i[j2(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[H2(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[W2(r)](),f=(c-1)%12+1,h=i[U2(r)](),v=i[Z2(r)](),p=i[$2(r)](),g=c>=12?"pm":"am",m=g.toUpperCase(),y=n instanceof je?n:Cb(n||MV)||PK(),x=y.getModel("time"),S=x.get("month"),b=x.get("monthAbbr"),T=x.get("dayOfWeek"),C=x.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Qr(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,S[o-1]).replace(/{MMM}/g,b[o-1]).replace(/{MM}/g,Qr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Qr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,T[u]).replace(/{ee}/g,C[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Qr(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Qr(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Qr(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Qr(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Qr(p,3)).replace(/{S}/g,p+"")}function BK(t,e,r,n,i){var a=null;if(se(r))a=r;else if(me(r)){var o={time:t.time,level:t.time.level},s=Xt();s&&s.makeAxisLabelFormatterParamBreak(o,t.break),a=r(t.value,e,o)}else{var l=t.time;if(l){var u=r[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=yc(t.value,i);a=r[c][c][0]}}return Ed(new Date(t.value),a,i,n)}function yc(t,e){var r=wa(t),n=r[j2(e)]()+1,i=r[H2(e)](),a=r[W2(e)](),o=r[U2(e)](),s=r[Z2(e)](),l=r[$2(e)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&a===0,v=h&&i===1,p=v&&n===1;return p?"year":v?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function vy(t,e,r){switch(e){case"year":t[AV(r)](0);case"month":t[PV(r)](1);case"day":t[DV(r)](0);case"hour":t[kV(r)](0);case"minute":t[IV(r)](0);case"second":t[EV(r)](0)}return t}function LV(t){return t?"getUTCFullYear":"getFullYear"}function j2(t){return t?"getUTCMonth":"getMonth"}function H2(t){return t?"getUTCDate":"getDate"}function W2(t){return t?"getUTCHours":"getHours"}function U2(t){return t?"getUTCMinutes":"getMinutes"}function Z2(t){return t?"getUTCSeconds":"getSeconds"}function $2(t){return t?"getUTCMilliseconds":"getMilliseconds"}function VK(t){return t?"setUTCFullYear":"setFullYear"}function AV(t){return t?"setUTCMonth":"setMonth"}function PV(t){return t?"setUTCDate":"setDate"}function DV(t){return t?"setUTCHours":"setHours"}function kV(t){return t?"setUTCMinutes":"setMinutes"}function IV(t){return t?"setUTCSeconds":"setSeconds"}function EV(t){return t?"setUTCMilliseconds":"setMilliseconds"}function FK(t,e,r,n,i,a,o,s){var l=new Ye({style:{text:t,font:e,align:r,verticalAlign:n,padding:i,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function Y2(t){if(!g2(t))return se(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function X2(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var _f=bd;function Lb(t,e,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&Mn(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=t instanceof Date;if(o||s){var l=o?wa(t):t;if(isNaN(+l)){if(s)return"-"}else return Ed(l,n,r)}if(e==="ordinal")return $m(t)?i(t):Xe(t)&&a(t)?t+"":"-";var u=ma(t);return a(u)?Y2(u):$m(t)?i(t):typeof t=="boolean"?t+"":"-"}var Nk=["a","b","c","d","e","f","g"],t1=function(t,e){return"{"+t+(e??"")+"}"};function q2(t,e,r){ee(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function jK(t,e,r){(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year")&&(t=`MM-dd -yyyy`);var n=wa(e),i=r?"getUTC":"get",a=n[i+"FullYear"](),o=n[i+"Month"]()+1,s=n[i+"Date"](),l=n[i+"Hours"](),u=n[i+"Minutes"](),c=n[i+"Seconds"](),f=n[i+"Milliseconds"]();return t=t.replace("MM",Qr(o,2)).replace("M",o).replace("yyyy",a).replace("yy",Qr(a%100+"",2)).replace("dd",Qr(s,2)).replace("d",s).replace("hh",Qr(l,2)).replace("h",l).replace("mm",Qr(u,2)).replace("m",u).replace("ss",Qr(c,2)).replace("s",c).replace("SSS",Qr(f,3)),t}function HK(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}function Yl(t,e){return e=e||"transparent",se(t)?t:we(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function dy(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var fm={},r1={},xf=function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(e,r){this._nonSeriesBoxMasterList=n(fm),this._normalMasterList=n(r1);function n(i,a){var o=[];return N(i,function(s,l){var u=s.create(e,r);o=o.concat(u||[])}),o}},t.prototype.update=function(e,r){N(this._normalMasterList,function(n){n.update&&n.update(e,r)})},t.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},t.register=function(e,r){if(e==="matrix"||e==="calendar"){fm[e]=r;return}r1[e]=r},t.get=function(e){return r1[e]||fm[e]},t}();function WK(t){return!!fm[t]}var Ab={coord:1,coord2:2};function UK(t){NV.set(t.fullType,{getCoord2:void 0}).getCoord2=t.getCoord2}var NV=ve();function ZK(t){var e=t.getShallow("coord",!0),r=Ab.coord;if(e==null){var n=NV.get(t.type);n&&n.getCoord2&&(r=Ab.coord2,e=n.getCoord2(t))}return{coord:e,from:r}}var na={none:0,dataCoordSys:1,boxCoordSys:2};function OV(t,e){var r=t.getShallow("coordinateSystem"),n=t.getShallow("coordinateSystemUsage",!0),i=na.none;if(r){var a=t.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=na.dataCoordSys,a||(i=na.none)):n==="box"&&(i=na.boxCoordSys,!a&&!WK(r)&&(i=na.none))}return{coordSysType:r,kind:i}}function Rd(t){var e=t.targetModel,r=t.coordSysType,n=t.coordSysProvider,i=t.isDefaultDataCoordSys;t.allowNotFound;var a=OV(e),o=a.kind,s=a.coordSysType;if(i&&o!==na.dataCoordSys&&(o=na.dataCoordSys,s=r),o===na.none||s!==r)return!1;var l=n(r,e);return l?(o===na.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var zV=function(t,e){var r=e.getReferringComponents(t,Dt).models[0];return r&&r.coordinateSystem},hm=N,BV=["left","right","top","bottom","width","height"],Sl=[["width","left","right"],["height","top","bottom"]];function K2(t,e,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),f=e.childAt(u+1),h=f&&f.getBoundingRect(),v,p;if(t==="horizontal"){var g=c.width+(h?-h.x+c.x:0);v=a+g,v>n||l.newline?(a=0,v=g,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(h?-h.y+c.y:0);p=o+m,p>i||l.newline?(a+=s+r,o=0,p=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),t==="horizontal"?a=v+r:o=p+r)})}var Dl=K2;Ie(K2,"vertical");Ie(K2,"horizontal");function VV(t,e){return{left:t.getShallow("left",e),top:t.getShallow("top",e),right:t.getShallow("right",e),bottom:t.getShallow("bottom",e),width:t.getShallow("width",e),height:t.getShallow("height",e)}}function $K(t,e){var r=or(t,e,{enableLayoutOnlyByCenter:!0}),n=t.getBoxLayoutParams(),i,a;if(r.type===Bh.point)a=r.refPoint,i=St(n,{width:e.getWidth(),height:e.getHeight()});else{var o=t.get("center"),s=ee(o)?o:[o,o];i=St(n,r.refContainer),a=r.boxCoordFrom===Ab.coord2?r.refPoint:[oe(s[0],i.width)+i.x,oe(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function FV(t,e){var r=$K(t,e),n=r.viewRect,i=r.center,a=t.get("radius");ee(a)||(a=[0,a]);var o=oe(n.width,e.getWidth()),s=oe(n.height,e.getHeight()),l=Math.min(o,s),u=oe(a[0],l/2),c=oe(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:n}}function St(t,e,r){r=_f(r||0);var n=e.width,i=e.height,a=oe(t.left,n),o=oe(t.top,i),s=oe(t.right,n),l=oe(t.bottom,i),u=oe(t.width,n),c=oe(t.height,i),f=r[2]+r[0],h=r[1]+r[3],v=t.aspect;switch(isNaN(u)&&(u=n-s-h-a),isNaN(c)&&(c=i-l-f-o),v!=null&&(isNaN(u)&&isNaN(c)&&(v>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=v*c),isNaN(c)&&(c=u/v)),isNaN(a)&&(a=n-s-u-h),isNaN(o)&&(o=i-l-c-f),t.left||t.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-h;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-h-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var p=new Ce((e.x||0)+a+r[3],(e.y||0)+o+r[0],u,c);return p.margin=r,p}function GV(t,e,r){var n=t.getShallow("preserveAspect",!0);if(!n)return e;var i=e.width/e.height;if(Math.abs(Math.atan(r)-Math.atan(i))<1e-9)return e;var a=t.getShallow("preserveAspectAlign",!0),o=t.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=n==="cover";return i>r&&!l||i=g)return f;for(var m=0;m=0;l--)s=Re(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return ff(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){return VV(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(je);z4(Be,je);I0(Be);TK(Be);CK(Be,qK);function qK(t){var e=[];return N(Be.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=re(e,function(r){return oa(r).main}),t!=="dataset"&&Ee(e,"dataset")<=0&&e.unshift("dataset"),e}var X={color:{},darkColor:{},size:{}},Vt=X.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};J(Vt,{primary:Vt.neutral80,secondary:Vt.neutral70,tertiary:Vt.neutral60,quaternary:Vt.neutral50,disabled:Vt.neutral20,border:Vt.neutral30,borderTint:Vt.neutral20,borderShade:Vt.neutral40,background:Vt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Vt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Vt.neutral70,axisLineTint:Vt.neutral40,axisTick:Vt.neutral70,axisTickMinor:Vt.neutral60,axisLabel:Vt.neutral70,axisSplitLine:Vt.neutral15,axisMinorSplitLine:Vt.neutral05});for(var $s in Vt)if(Vt.hasOwnProperty($s)){var Ok=Vt[$s];$s==="theme"?X.darkColor.theme=Vt.theme.slice():$s==="highlight"?X.darkColor.highlight="rgba(255,231,130,0.4)":$s.indexOf("accent")===0?X.darkColor[$s]=Ya(Ok,null,function(t){return t*.5},function(t){return Math.min(1,1.3-t)}):X.darkColor[$s]=Ya(Ok,null,function(t){return t*.9},function(t){return 1-Math.pow(t,1.5)})}X.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var HV="";typeof navigator<"u"&&(HV=navigator.platform||"");var ku="rgba(0, 0, 0, 0.2)",WV=X.color.theme[0],KK=Ya(WV,null,null,.9);const QK={darkMode:"auto",colorBy:"series",color:X.color.theme,gradientColor:[KK,WV],aria:{decal:{decals:[{color:ku,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ku,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ku,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ku,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ku,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ku,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:HV.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var UV=ve(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Nn="original",Tr="arrayRows",On="objectRows",Ni="keyedColumns",as="typedArray",ZV="unknown",Di="column",su="row",Lr={Must:1,Might:2,Not:3},$V=Ve();function JK(t){$V(t).datasetMap=ve()}function YV(t,e,r){var n={},i=J2(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,l=$V(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,f;t=t.slice(),N(t,function(g,m){var y=we(g)?g:t[m]={name:g};y.type==="ordinal"&&c==null&&(c=m,f=p(y)),n[y.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});N(t,function(g,m){var y=g.name,x=p(g);if(c==null){var S=h.valueWayDim;v(n[y],S,x),v(o,S,x),h.valueWayDim+=x}else if(c===m)v(n[y],0,x),v(a,0,x);else{var S=h.categoryWayDim;v(n[y],S,x),v(o,S,x),h.categoryWayDim+=x}});function v(g,m,y){for(var x=0;xe)return t[n];return t[r-1]}function KV(t,e,r,n,i,a,o){a=a||t;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?r:iQ(n,o);if(c=c||r,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function aQ(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var Yp,nh,Bk,Vk="\0_ec_inner",oQ=1,tM=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new je(a),this._locale=new je(o),this._optionManager=s},e.prototype.setOption=function(r,n,i){var a=jk(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,jk(n))},e.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?Bk(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&N(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=ve(),u=n&&n.replaceMergeMainTypeMap;JK(this),N(r,function(f,h){f!=null&&(Be.hasClass(h)?h&&(s.push(h),l.set(h,!0)):i[h]=i[h]==null?ye(f):Re(i[h],f,!0))}),u&&u.each(function(f,h){Be.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),Be.topologicalTravel(s,Be.getAllClassMainTypes(),c,this);function c(f){var h=rQ(this,f,pt(r[f])),v=a.get(f),p=v?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",g=I4(v,h,p);SX(g,f,Be),i[f]=null,a.set(f,null),o.set(f,0);var m=[],y=[],x=0,S;N(g,function(b,T){var C=b.existing,M=b.newOption;if(!M)C&&(C.mergeOption({},this),C.optionUpdated({},!1));else{var D=f==="series",I=Be.getClass(f,b.keyInfo.subType,!D);if(!I)return;if(f==="tooltip"){if(S)return;S=!0}if(C&&C.constructor===I)C.name=b.keyInfo.name,C.mergeOption(M,this),C.optionUpdated(M,!1);else{var k=J({componentIndex:T},b.keyInfo);C=new I(M,this,this,k),J(C,k),b.brandNew&&(C.__requireNewView=!0),C.init(M,this,this),C.optionUpdated(null,!0)}}C?(m.push(C.option),y.push(C),x++):(m.push(void 0),y.push(void 0))},this),i[f]=m,a.set(f,y),o.set(f,x),f==="series"&&Yp(this)}this._seriesIndices||Yp(this)},e.prototype.getOption=function(){var r=ye(this.option);return N(r,function(n,i){if(Be.hasClass(i)){for(var a=pt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Wv(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[Vk],r},e.prototype.setTheme=function(r){this._theme=new je(r),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=e:r==="max"?t<=e:t===e}function pQ(t,e){return t.join(",")===e.join(",")}var pi=N,qv=we,Hk=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function n1(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=Hk.length;r0?r[o-1].seriesModel:null)}),TQ(r)}})}function TQ(t){N(t,function(e,r){var n=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,f){var h=o.get(e.stackedDimension,f);if(isNaN(h))return i;var v,p;s?p=o.getRawIndex(f):v=o.get(e.stackedByDimension,f);for(var g=NaN,m=r-1;m>=0;m--){var y=t[m];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,v)),p>=0){var x=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&x>0||l==="negative"&&x<0||l==="samesign"&&h>=0&&x>0||l==="samesign"&&h<=0&&x<0){h=lX(h,x),g=x;break}}}return n[0]=h,n[1]=g,n})})}var W0=function(){function t(e){this.data=e.data||(e.sourceFormat===Ni?{}:[]),this.sourceFormat=e.sourceFormat||ZV,this.seriesLayoutBy=e.seriesLayoutBy||Di,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;ng&&(g=S)}v[0]=p,v[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};qk=(e={},e[Tr+"_"+Di]={pure:!0,appendData:a},e[Tr+"_"+su]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[On]={pure:!0,appendData:a},e[Ni]={pure:!0,appendData:function(o){var s=this._data;N(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[Nn]={appendData:a},e[as]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[m])}return g!=null?g+"":""})}},t.prototype.getRawValue=function(e,r){return Yc(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function eI(t){var e,r;return we(t)?t.type&&(r=t):e=t,{text:e,frag:r}}function vv(t){return new IQ(t)}var IQ=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(x){return!(x>=1)&&(x=1),x}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,p=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(f||v1&&n>0?s:o}};return a;function o(){return e=t?null:le},gte:function(t,e){return t>=e}},RQ=function(){function t(e,r){if(!Xe(r)){var n="";nt(n)}this._opFn=lF[e],this._rvalFloat=ma(r)}return t.prototype.evaluate=function(e){return Xe(e)?this._opFn(e,this._rvalFloat):this._opFn(ma(e),this._rvalFloat)},t}(),uF=function(){function t(e,r){var n=e==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,r){var n=Xe(e)?e:ma(e),i=Xe(r)?r:ma(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=se(e),l=se(r);s&&(n=l?e:0),l&&(i=s?r:0)}return ni?-this._resultLT:0},t}(),NQ=function(){function t(e,r){this._rval=r,this._isEQ=e,this._rvalTypeof=typeof r,this._rvalFloat=ma(r)}return t.prototype.evaluate=function(e){var r=e===this._rval;if(!r){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=ma(e)===this._rvalFloat)}return this._isEQ?r:!r},t}();function OQ(t,e){return t==="eq"||t==="ne"?new NQ(t==="eq",e):fe(lF,t)?new RQ(t,e):null}var zQ=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return os(e,r)},t}();function BQ(t,e){var r=new zQ,n=t.data,i=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==Di&&nt(o);var s=[],l={},u=t.dimensionsDefine;if(u)N(u,function(g,m){var y=g.name,x={index:m,name:y,displayName:g.displayName};if(s.push(x),y!=null){var S="";fe(l,y)&&nt(S),l[y]=x}});else for(var c=0;c65535?ZQ:$Q}function Eu(){return[1/0,-1/0]}function YQ(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function nI(t,e,r,n,i){var a=hF[r||"float"];if(i){var o=t[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;um[1]&&(m[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(e,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=re(o,function(x){return x.property}),c=0;cy[1]&&(y[1]=m)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r=0&&r=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&ne)a=o-1;else return o}return-1},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a=f&&x<=h||isNaN(x))&&(l[u++]=g),g++}p=!0}else if(a===2){for(var m=v[i[0]],S=v[i[1]],b=e[i[1]][0],T=e[i[1]][1],y=0;y=f&&x<=h||isNaN(x))&&(C>=b&&C<=T||isNaN(C))&&(l[u++]=g),g++}p=!0}}if(!p)if(a===1)for(var y=0;y=f&&x<=h||isNaN(x))&&(l[u++]=M)}else for(var y=0;ye[k][1])&&(D=!1)}D&&(l[u++]=r.getRawIndex(y))}return uy[1]&&(y[1]=m)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,f,h,v=new(Iu(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var p=1;pc&&(c=f,h=b)}E>0&&Es&&(g=s-c);for(var m=0;mp&&(p=x,v=c+m)}var S=this.getRawIndex(f),b=this.getRawIndex(v);fc-p&&(l=c-p,s.length=l);for(var g=0;gf[1]&&(f[1]=y),h[v++]=x}return a._count=v,a._indices=h,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();al&&(l=f)}return o=[s,l],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,i,a){return os(r[a],this._dimensions[a])}o1={arrayRows:e,objectRows:function(r,n,i,a){return os(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return os(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),vF=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(qp(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=rn(s)?as:Nn,a=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},v=pe(f.seriesLayoutBy,h.seriesLayoutBy)||null,p=pe(f.sourceHeader,h.sourceHeader),g=pe(f.dimensions,h.dimensions),m=v!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||g;i=m?[kb(s,{seriesLayoutBy:v,sourceHeader:p,dimensions:g},l)]:[]}else{var y=e;if(n){var x=this._applyTransform(r);i=x.sourceList,a=x.upstreamSignList}else{var S=y.get("source",!0);i=[kb(S,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";e.length!==1&&aI(a)}var o,s=[],l=[];return N(e,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&aI(f),s.push(c),l.push(u._getVersionSign())}),n?o=WQ(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[CQ(s[0])]),{sourceList:o,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r=s;u++)l-=s;var c=da(o,r);return c>l&&(r="",c=0),l=t-c,i.ellipsis=r,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=t,i}function F4(t,e,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){t.textLine="",t.isTruncated=!1;return}var o=da(a,e);if(o<=n){t.textLine=e,t.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=r.maxIterations){e+=r.ellipsis;break}var l=s===0?jX(e,i,a):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=da(a,e)}e===""&&(e=r.placeholder),t.textLine=e,t.isTruncated=!0}function jX(t,e,r){for(var n=0,i=0,a=t.length;im&&v){var S=Math.floor(m/h);p=p||y.length>S,y=y.slice(0,S),x=y.length*h}if(i&&c&&g!=null)for(var b=V4(g,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),T={},C=0;Cp&&zx(a,o.substring(p,m),e,v),zx(a,g[2],e,v,g[1]),p=Ox.lastIndex}pf){var W=a.lines.length;z>0?(I.tokens=I.tokens.slice(0,z),M(I,E,k),a.lines=a.lines.slice(0,D+1)):a.lines=a.lines.slice(0,D),a.isTruncated=a.isTruncated||a.lines.length0&&p+n.accumWidth>n.width&&(c=e.split(` +`),u=!0),n.accumWidth=p}else{var g=j4(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+v,f=g.linesWidths,c=g.lines}}c||(c=e.split(` +`));for(var m=va(l),y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var $X=ai(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function YX(t){return ZX(t)?!!$X[t]:!0}function j4(t,e,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,f=va(e),h=0;hr:i+c+p>r){c?(s||l)&&(g?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=v,u+=p,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=v,c=p)):g?(a.push(l),o.push(u),l=v,u=p):(a.push(v),o.push(p));continue}c+=p,g?(l+=v,u+=p):(l&&(s+=l,l="",u=0),s+=v)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}function XD(t,e,r,n,i,a){if(t.baseX=r,t.baseY=n,t.outerWidth=t.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;Ce.set(qD,Hc(r,o,i),Al(n,s,a),o,s),Ce.intersect(e,qD,null,KD);var l=KD.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=Hc(l.x,l.width,i,!0),t.baseY=Al(l.y,l.height,a,!0)}}var qD=new Ce(0,0,0,0),KD={outIntersectRect:{},clamp:!0};function S2(t){return t!=null?t+="":t=""}function XX(t){var e=S2(t.text),r=t.font,n=da(va(r),e),i=Ld(r);return hb(t,n,i,null)}function hb(t,e,r,n){var i=new Ce(Hc(t.x||0,e,t.textAlign),Al(t.y||0,r,t.textBaseline),e,r),a=n??(G4(t)?t.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function G4(t){var e=t.stroke;return e!=null&&e!=="none"&&t.lineWidth>0}var vb="__zr_style_"+Math.round(Math.random()*10),Pl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},R0={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Pl[vb]=!0;var QD=["z","z2","invisible"],qX=["invisible"],si=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=Ue(r),i=0;i1e-4){s[0]=t-r,s[1]=e-n,l[0]=t+r,l[1]=e+n;return}if(zp[0]=jx(i)*r+t,zp[1]=Fx(i)*n+e,Bp[0]=jx(a)*r+t,Bp[1]=Fx(a)*n+e,u(s,zp,Bp),c(l,zp,Bp),i=i%Vs,i<0&&(i=i+Vs),a=a%Vs,a<0&&(a=a+Vs),i>a&&!o?a+=Vs:ii&&(Vp[0]=jx(v)*r+t,Vp[1]=Fx(v)*n+e,u(s,Vp,s),c(l,Vp,l))}var yt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Fs=[],js=[],Wi=[],xo=[],Ui=[],Zi=[],Gx=Math.min,Hx=Math.max,Gs=Math.cos,Hs=Math.sin,Pa=Math.abs,db=Math.PI,Ao=db*2,Wx=typeof Float32Array<"u",eh=[];function Ux(t){var e=Math.round(t/db*1e8)/1e8;return e%2*db}function O0(t,e){var r=Ux(t[0]);r<0&&(r+=Ao);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=Ao?i=r+Ao:e&&r-i>=Ao?i=r-Ao:!e&&r>i?i=r+(Ao-Ux(r-i)):e&&r0&&(this._ux=Pa(n/ny/e)||0,this._uy=Pa(n/ny/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(yt.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=Pa(e-this._xi),i=Pa(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(yt.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){return this._drawPendingPt(),this.addData(yt.C,e,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,i,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,i){return this._drawPendingPt(),this.addData(yt.Q,e,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,r,n,i,a,o){this._drawPendingPt(),eh[0]=i,eh[1]=a,O0(eh,o),i=eh[0],a=eh[1];var s=a-i;return this.addData(yt.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=Gs(a)*n+e,this._yi=Hs(a)*n+r,this},t.prototype.arcTo=function(e,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,i,a),this},t.prototype.rect=function(e,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,i),this.addData(yt.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(yt.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){if(this._saveData){var r=e.length;!(this.data&&this.data.length===r)&&Wx&&(this.data=new Float32Array(r));for(var n=0;n0&&o))for(var s=0;sc.length&&(this._expandData(),c=this.data);for(var f=0;f0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){Wi[0]=Wi[1]=Ui[0]=Ui[1]=Number.MAX_VALUE,xo[0]=xo[1]=Zi[0]=Zi[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||Pa(S)>i||h===r-1)&&(g=Math.sqrt(x*x+S*S),a=m,o=y);break}case yt.C:{var b=e[h++],T=e[h++],m=e[h++],y=e[h++],C=e[h++],M=e[h++];g=cY(a,o,b,T,m,y,C,M,10),a=C,o=M;break}case yt.Q:{var b=e[h++],T=e[h++],m=e[h++],y=e[h++];g=hY(a,o,b,T,m,y,10),a=m,o=y;break}case yt.A:var D=e[h++],I=e[h++],k=e[h++],E=e[h++],z=e[h++],O=e[h++],F=O+z;h+=1,p&&(s=Gs(z)*k+D,l=Hs(z)*E+I),g=Hx(k,E)*Gx(Ao,Math.abs(O)),a=Gs(F)*k+D,o=Hs(F)*E+I;break;case yt.R:{s=a=e[h++],l=o=e[h++];var G=e[h++],j=e[h++];g=G*2+j*2;break}case yt.Z:{var x=s-a,S=l-o;g=Math.sqrt(x*x+S*S),a=s,o=l;break}}g>=0&&(u[f++]=g,c+=g)}return this._pathLen=c,c},t.prototype.rebuildPath=function(e,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,f,h,v=r<1,p,g,m=0,y=0,x,S=0,b,T;if(!(v&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,x=r*g,!x)))e:for(var C=0;C0&&(e.lineTo(b,T),S=0),M){case yt.M:s=u=n[C++],l=c=n[C++],e.moveTo(u,c);break;case yt.L:{f=n[C++],h=n[C++];var I=Pa(f-u),k=Pa(h-c);if(I>i||k>a){if(v){var E=p[y++];if(m+E>x){var z=(x-m)/E;e.lineTo(u*(1-z)+f*z,c*(1-z)+h*z);break e}m+=E}e.lineTo(f,h),u=f,c=h,S=0}else{var O=I*I+k*k;O>S&&(b=f,T=h,S=O)}break}case yt.C:{var F=n[C++],G=n[C++],j=n[C++],Z=n[C++],V=n[C++],W=n[C++];if(v){var E=p[y++];if(m+E>x){var z=(x-m)/E;hs(u,F,j,V,z,Fs),hs(c,G,Z,W,z,js),e.bezierCurveTo(Fs[1],js[1],Fs[2],js[2],Fs[3],js[3]);break e}m+=E}e.bezierCurveTo(F,G,j,Z,V,W),u=V,c=W;break}case yt.Q:{var F=n[C++],G=n[C++],j=n[C++],Z=n[C++];if(v){var E=p[y++];if(m+E>x){var z=(x-m)/E;Vv(u,F,j,z,Fs),Vv(c,G,Z,z,js),e.quadraticCurveTo(Fs[1],js[1],Fs[2],js[2]);break e}m+=E}e.quadraticCurveTo(F,G,j,Z),u=j,c=Z;break}case yt.A:var H=n[C++],Y=n[C++],K=n[C++],ne=n[C++],ie=n[C++],ue=n[C++],de=n[C++],Fe=!n[C++],xe=K>ne?K:ne,ge=Pa(K-ne)>.001,De=ie+ue,he=!1;if(v){var E=p[y++];m+E>x&&(De=ie+ue*(x-m)/E,he=!0),m+=E}if(ge&&e.ellipse?e.ellipse(H,Y,K,ne,de,ie,De,Fe):e.arc(H,Y,xe,ie,De,Fe),he)break e;D&&(s=Gs(ie)*K+H,l=Hs(ie)*ne+Y),u=Gs(De)*K+H,c=Hs(De)*ne+Y;break;case yt.R:s=u=n[C],l=c=n[C+1],f=n[C++],h=n[C++];var Me=n[C++],st=n[C++];if(v){var E=p[y++];if(m+E>x){var $e=x-m;e.moveTo(f,h),e.lineTo(f+Gx($e,Me),h),$e-=Me,$e>0&&e.lineTo(f+Me,h+Gx($e,st)),$e-=st,$e>0&&e.lineTo(f+Hx(Me-$e,0),h+st),$e-=Me,$e>0&&e.lineTo(f,h+Hx(st-$e,0));break e}m+=E}e.rect(f,h,Me,st);break;case yt.Z:if(v){var E=p[y++];if(m+E>x){var z=(x-m)/E;e.lineTo(u*(1-z)+s*z,c*(1-z)+l*z);break e}m+=E}e.closePath(),u=s,c=l}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.prototype.canSave=function(){return!!this._saveData},t.CMD=yt,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function Io(t,e,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>n+s||ot+s&&a>r+s||ae+f&&c>n+f&&c>a+f&&c>s+f||ct+f&&u>r+f&&u>i+f&&u>o+f||ue+u&&l>n+u&&l>a+u||lt+u&&s>r+u&&s>i+u||sr||c+ui&&(i+=th);var h=Math.atan2(l,s);return h<0&&(h+=th),h>=n&&h<=i||h+th>=n&&h+th<=i}function Oa(t,e,r,n,i,a){if(a>e&&a>n||ai?s:0}var So=ya.CMD,Ws=Math.PI*2,nq=1e-4;function iq(t,e){return Math.abs(t-e)e&&u>n&&u>a&&u>s||u1&&aq(),v=lr(e,n,a,s,Zn[0]),h>1&&(p=lr(e,n,a,s,Zn[1]))),h===2?me&&s>n&&s>a||s=0&&u<=1){for(var c=0,f=xr(e,n,a,u),h=0;hr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Kr[0]=-l,Kr[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Ws-1e-4){n=0,i=Ws;var c=a?1:-1;return o>=Kr[0]+t&&o<=Kr[1]+t?c:0}if(n>i){var f=n;n=i,i=f}n<0&&(n+=Ws,i+=Ws);for(var h=0,v=0;v<2;v++){var p=Kr[v];if(p+t>o){var g=Math.atan2(s,p),c=a?1:-1;g<0&&(g=Ws+g),(g>=n&&g<=i||g+Ws>=n&&g+Ws<=i)&&(g>Math.PI/2&&g1&&(r||(s+=Oa(l,u,c,f,n,i))),m&&(l=a[p],u=a[p+1],c=l,f=u),g){case So.M:c=a[p++],f=a[p++],l=c,u=f;break;case So.L:if(r){if(Io(l,u,a[p],a[p+1],e,n,i))return!0}else s+=Oa(l,u,a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case So.C:if(r){if(tq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=oq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case So.Q:if(r){if(H4(l,u,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=sq(l,u,a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case So.A:var y=a[p++],x=a[p++],S=a[p++],b=a[p++],T=a[p++],C=a[p++];p+=1;var M=!!(1-a[p++]);h=Math.cos(T)*S+y,v=Math.sin(T)*b+x,m?(c=h,f=v):s+=Oa(l,u,h,v,n,i);var D=(n-y)*b/S+y;if(r){if(rq(y,x,b,T,T+C,M,e,D,i))return!0}else s+=lq(y,x,b,T,T+C,M,D,i);l=Math.cos(T+C)*S+y,u=Math.sin(T+C)*b+x;break;case So.R:c=l=a[p++],f=u=a[p++];var I=a[p++],k=a[p++];if(h=c+I,v=f+k,r){if(Io(c,f,h,f,e,n,i)||Io(h,f,h,v,e,n,i)||Io(h,v,c,v,e,n,i)||Io(c,v,c,f,e,n,i))return!0}else s+=Oa(h,f,h,v,n,i),s+=Oa(c,v,c,f,n,i);break;case So.Z:if(r){if(Io(l,u,c,f,e,n,i))return!0}else s+=Oa(l,u,c,f,n,i);l=c,u=f;break}}return!r&&!iq(u,f)&&(s+=Oa(l,u,c,f,n,i)||0),s!==0}function uq(t,e,r){return W4(t,0,!1,e,r)}function cq(t,e,r,n){return W4(t,e,!0,r,n)}var sy=Se({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Pl),fq={style:Se({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},R0.style)},Zx=ga.concat(["invisible","culling","z","z2","zlevel","parent"]),He=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?ib:n>.2?HY:ab}else if(r)return ab}return ib},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(se(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Gv(r,0)0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Qu)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),cq(s,l/u,r,n)))return!0}if(this.hasFill())return uq(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Qu,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:J(i,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Qu)},e.prototype.createStyle=function(r){return Td(sy,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=J({},this.shape))},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=J({},i.shape),J(u,n.shape)):(u=J({},a?this.shape:i.shape),J(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=J({},this.shape);for(var c={},f=Ue(u),h=0;hi&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),t.moveTo(r+s,n),t.lineTo(r+i-l,n),l!==0&&t.arc(r+i-l,n+l,l,-Math.PI/2,0),t.lineTo(r+i,n+a-u),u!==0&&t.arc(r+i-u,n+a-u,u,0,Math.PI/2),t.lineTo(r+c,n+a),c!==0&&t.arc(r+c,n+a-c,c,Math.PI/2,Math.PI),t.lineTo(r,n+s),s!==0&&t.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var gc=Math.round;function z0(t,e,r){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=i,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(gc(n*2)===gc(i*2)&&(t.x1=t.x2=Pn(n,s,!0)),gc(a*2)===gc(o*2)&&(t.y1=t.y2=Pn(a,s,!0))),t}}function U4(t,e,r){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;t.x=n,t.y=i,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=Pn(n,s,!0),t.y=Pn(i,s,!0),t.width=Math.max(Pn(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(Pn(i+o,s,!1)-t.y,o===0?0:1)),t}}function Pn(t,e,r){if(!e)return t;var n=gc(t*2);return(n+gc(e))%2===0?n/2:(n+(r?1:-1))/2}var mq=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),yq={},ze=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new mq},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=U4(yq,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?gq(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(He);ze.prototype.type="rect";var nk={fill:"#000"},ik=2,$i={},_q={style:Se({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},R0.style)},Xe=function(t){$(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=nk,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,z=0;z=0&&(F=C[O],F.align==="right");)this._placeToken(F,r,D,y,z,"right",S),I-=F.width,z-=F.width,O--;for(E+=(c-(E-m)-(x-z)-I)/2;k<=O;)F=C[k],this._placeToken(F,r,D,y,E+F.width/2,"center",S),E+=F.width,k++;y+=D}},e.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,f=a+i/2;c==="top"?f=a+r.height/2:c==="bottom"&&(f=a+i-r.height/2);var h=!r.isLineHolder&&$x(u);h&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,f-r.height/2,r.width,r.height);var v=!!u.backgroundColor,p=r.textPadding;p&&(o=ck(o,s,p),f-=r.height/2-p[0]-r.innerHeight/2);var g=this._getOrCreateChild(Uc),m=g.createStyle();g.useStyle(m);var y=this._defaultStyle,x=!1,S=0,b=!1,T=uk("fill"in u?u.fill:"fill"in n?n.fill:(x=!0,y.fill)),C=lk("stroke"in u?u.stroke:"stroke"in n?n.stroke:!v&&!l&&(!y.autoStroke||x)?(S=ik,b=!0,y.stroke):null),M=u.textShadowBlur>0||n.textShadowBlur>0;m.text=r.text,m.x=o,m.y=f,M&&(m.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,m.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=r.font||io,m.opacity=mn(u.opacity,n.opacity,1),ok(m,u),C&&(m.lineWidth=mn(u.lineWidth,n.lineWidth,S),m.lineDash=pe(u.lineDash,n.lineDash),m.lineDashOffset=n.lineDashOffset||0,m.stroke=C),T&&(m.fill=T),g.setBoundingRect(hb(m,r.contentWidth,r.contentHeight,b?0:null))},e.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,f=l&&l.image,h=l&&!f,v=r.borderRadius,p=this,g,m;if(h||r.lineHeight||u&&c){g=this._getOrCreateChild(ze),g.useStyle(g.createStyle()),g.style.fill=null;var y=g.shape;y.x=i,y.y=a,y.width=o,y.height=s,y.r=v,g.dirtyShape()}if(h){var x=g.style;x.fill=l||null,x.fillOpacity=pe(r.fillOpacity,1)}else if(f){m=this._getOrCreateChild(dr),m.onload=function(){p.dirtyStyle()};var S=m.style;S.image=l.image,S.x=i,S.y=a,S.width=o,S.height=s}if(u&&c){var x=g.style;x.lineWidth=u,x.stroke=c,x.strokeOpacity=pe(r.strokeOpacity,1),x.lineDash=r.borderDash,x.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(x.strokeFirst=!0,x.lineWidth*=2)}var b=(g||m).style;b.shadowBlur=r.shadowBlur||0,b.shadowColor=r.shadowColor||"transparent",b.shadowOffsetX=r.shadowOffsetX||0,b.shadowOffsetY=r.shadowOffsetY||0,b.opacity=mn(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return $4(r)&&(n=[r.fontStyle,r.fontWeight,Z4(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Mn(n)||r.textFont||r.font},e}(si),xq={left:!0,right:1,center:1},Sq={top:1,bottom:1,middle:1},ak=["fontStyle","fontWeight","fontSize","fontFamily"];function Z4(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?t2+"px":t+"px"}function ok(t,e){for(var r=0;r=0,a=!1;if(t instanceof He){var o=Y4(t),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Au(s)||Au(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=J({},n),u=J({},u),u.fill=s):!Au(u.fill)&&Au(s)?(a=!0,n=J({},n),u=J({},u),u.fill=ty(s)):!Au(u.stroke)&&Au(l)&&(a||(n=J({},n),u=J({},u)),u.stroke=ty(l)),n.style=u}}if(n&&n.z2==null){a||(n=J({},n));var c=t.z2EmphasisLift;n.z2=t.z2+(c??hf)}return n}function Aq(t,e,r){if(r&&r.z2==null){r=J({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??bq)}return r}function Pq(t,e,r){var n=Ee(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:Mq(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=J({},r),o=J({opacity:n?i:a.opacity*.1},o),r.style=o),r}function Yx(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return Lq(this,t,e,r);if(t==="blur")return Pq(this,t,r);if(t==="select")return Aq(this,t,r)}return r}function Ul(t){t.stateProxy=Yx;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=Yx),r&&(r.stateProxy=Yx)}function pk(t,e){!tV(t,e)&&!t.__highByOuter&&po(t,X4)}function gk(t,e){!tV(t,e)&&!t.__highByOuter&&po(t,q4)}function oo(t,e){t.__highByOuter|=1<<(e||0),po(t,X4)}function so(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&po(t,q4)}function Q4(t){po(t,C2)}function M2(t){po(t,K4)}function J4(t){po(t,Tq)}function eV(t){po(t,Cq)}function tV(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function rV(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=w2(a),s=i==="series",l=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){K4(u)}),s&&r.push(a)),o.isBlured=!1}),N(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function mb(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function is(t,e,r){Sl(t,!0),po(t,Ul),_b(t,e,r)}function Nq(t){Sl(t,!1)}function bt(t,e,r,n){n?Nq(t):is(t,e,r)}function _b(t,e,r){var n=Ae(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var yk=["emphasis","blur","select"],Oq={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ir(t,e,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=Xx(p),s*=Xx(p));var g=(i===a?-1:1)*Xx((o*o*(s*s)-o*o*(v*v)-s*s*(h*h))/(o*o*(v*v)+s*s*(h*h)))||0,m=g*o*v/s,y=g*-s*h/o,x=(t+r)/2+jp(f)*m-Fp(f)*y,S=(e+n)/2+Fp(f)*m+jp(f)*y,b=wk([1,0],[(h-m)/o,(v-y)/s]),T=[(h-m)/o,(v-y)/s],C=[(-1*h-m)/o,(-1*v-y)/s],M=wk(T,C);if(Sb(T,C)<=-1&&(M=rh),Sb(T,C)>=1&&(M=0),M<0){var D=Math.round(M/rh*1e6)/1e6;M=rh*2+D%2*rh}c.addData(u,x,S,o,s,b,M,f,a)}var Gq=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Hq=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Wq(t){var e=new ya;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=ya.CMD,l=t.match(Gq);if(!l)return e;for(var u=0;uF*F+G*G&&(D=k,I=E),{cx:D,cy:I,x0:-c,y0:-f,x1:D*(i/T-1),y1:I*(i/T-1)}}function Kq(t){var e;if(ee(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function Qq(t,e){var r,n=Oh(e.r,0),i=Oh(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,h=!!e.clockwise,v=Tk(u-l),p=v>qx&&v%qx;if(p>gi&&(v=p),!(n>gi))t.moveTo(c,f);else if(v>qx-gi)t.moveTo(c+n*Du(l),f+n*Us(l)),t.arc(c,f,n,l,u,!h),i>gi&&(t.moveTo(c+i*Du(u),f+i*Us(u)),t.arc(c,f,i,u,l,h));else{var g=void 0,m=void 0,y=void 0,x=void 0,S=void 0,b=void 0,T=void 0,C=void 0,M=void 0,D=void 0,I=void 0,k=void 0,E=void 0,z=void 0,O=void 0,F=void 0,G=n*Du(l),j=n*Us(l),Z=i*Du(u),V=i*Us(u),W=v>gi;if(W){var H=e.cornerRadius;H&&(r=Kq(H),g=r[0],m=r[1],y=r[2],x=r[3]);var Y=Tk(n-i)/2;if(S=Yi(Y,y),b=Yi(Y,x),T=Yi(Y,g),C=Yi(Y,m),I=M=Oh(S,b),k=D=Oh(T,C),(M>gi||D>gi)&&(E=n*Du(u),z=n*Us(u),O=i*Du(l),F=i*Us(l),vgi){var ge=Yi(y,I),De=Yi(x,I),he=Gp(O,F,G,j,n,ge,h),Me=Gp(E,z,Z,V,n,De,h);t.moveTo(c+he.cx+he.x0,f+he.cy+he.y0),I0&&t.arc(c+he.cx,f+he.cy,ge,Fr(he.y0,he.x0),Fr(he.y1,he.x1),!h),t.arc(c,f,n,Fr(he.cy+he.y1,he.cx+he.x1),Fr(Me.cy+Me.y1,Me.cx+Me.x1),!h),De>0&&t.arc(c+Me.cx,f+Me.cy,De,Fr(Me.y1,Me.x1),Fr(Me.y0,Me.x0),!h))}else t.moveTo(c+G,f+j),t.arc(c,f,n,l,u,!h);if(!(i>gi)||!W)t.lineTo(c+Z,f+V);else if(k>gi){var ge=Yi(g,k),De=Yi(m,k),he=Gp(Z,V,E,z,i,-De,h),Me=Gp(G,j,O,F,i,-ge,h);t.lineTo(c+he.cx+he.x0,f+he.cy+he.y0),k0&&t.arc(c+he.cx,f+he.cy,De,Fr(he.y0,he.x0),Fr(he.y1,he.x1),!h),t.arc(c,f,i,Fr(he.cy+he.y1,he.cx+he.x1),Fr(Me.cy+Me.y1,Me.cx+Me.x1),h),ge>0&&t.arc(c+Me.cx,f+Me.cy,ge,Fr(Me.y1,Me.x1),Fr(Me.y0,Me.x0),!h))}else t.lineTo(c+Z,f+V),t.arc(c,f,i,u,l,h)}t.closePath()}}}var Jq=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return t}(),Rr=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Jq},e.prototype.buildPath=function(r,n){Qq(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(He);Rr.prototype.type="sector";var eK=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),vf=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new eK},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},e}(He);vf.prototype.type="ring";function tK(t,e,r,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,v=t.length;h=2){if(n){var a=tK(i,n,r,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{t.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;s$s[1]){if(a=!1,yr.negativeSize||n)return a;var l=Hp($s[0]-Zs[1]),u=Hp(Zs[0]-$s[1]);Kx(l,u)>Up.len()&&(l=u||!yr.bidirectional)&&(Te.scale(Wp,s,-u*i),yr.useDir&&yr.calcDirMTV()))}}return a},t.prototype._getProjMinMaxOnAxis=function(e,r,n){for(var i=this._axes[e],a=this._origin,o=r[0].dot(i)+a[e],s=o,l=o,u=1;u0){var f=c.duration,h=c.delay,v=c.easing,p={duration:f,delay:h||0,easing:v,done:a,force:!!a||!!o,setToFinal:!u,scope:t,during:o};s?e.animateFrom(r,p):e.animateTo(r,p)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function Qe(t,e,r,n,i,a){D2("update",t,e,r,n,i,a)}function St(t,e,r,n,i,a){D2("enter",t,e,r,n,i,a)}function Dc(t){if(!t.__zr)return!0;for(var e=0;eaa(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Lk(t){return!t.isGroup}function vK(t){return t.shape!=null}function Id(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(l){Lk(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return vK(o)&&(s.shape=ye(o.shape)),s}var a=n(t);e.traverse(function(o){if(Lk(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Qe(o,l,r,Ae(o).dataIndex)}}})}function E2(t,e){return re(t,function(r){var n=r[0];n=Gt(n,e.x),n=kn(n,e.x+e.width);var i=r[1];return i=Gt(i,e.y),i=kn(i,e.y+e.height),[n,i]})}function mV(t,e){var r=Gt(t.x,e.x),n=kn(t.x+t.width,e.x+e.width),i=Gt(t.y,e.y),a=kn(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function gf(t,e,r){var n=J({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(i.image=t.slice(8),Se(i,r),new dr(n)):Zc(t.replace("path://",""),n,r,"center")}function zh(t,e,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var m=Qx(v,p,c,f)/h;return!(m<0||m>1)}function Qx(t,e,r,n){return t*n-r*e}function dK(t){return t<=1e-6&&t>=-1e-6}function Zl(t,e,r,n,i){return e==null||(qe(e)?Ct[0]=Ct[1]=Ct[2]=Ct[3]=e:(Ct[0]=e[0],Ct[1]=e[1],Ct[2]=e[2],Ct[3]=e[3]),n&&(Ct[0]=Gt(0,Ct[0]),Ct[1]=Gt(0,Ct[1]),Ct[2]=Gt(0,Ct[2]),Ct[3]=Gt(0,Ct[3])),r&&(Ct[0]=-Ct[0],Ct[1]=-Ct[1],Ct[2]=-Ct[2],Ct[3]=-Ct[3]),Ak(t,Ct,"x","width",3,1,i&&i[0]||0),Ak(t,Ct,"y","height",0,2,i&&i[1]||0)),t}var Ct=[0,0,0,0];function Ak(t,e,r,n,i,a,o){var s=e[a]+e[i],l=t[n];t[n]+=s,o=Gt(0,kn(o,l)),t[n]=0?-e[i]:e[a]>=0?l+e[a]:aa(s)>1e-8?(l-o)*e[i]/s:0):t[r]-=e[i]}function go(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,i=se(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=t.formatterParamsExtra;l&&N(Ue(l),function(c){fe(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Ae(t.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:Se({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function bb(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function bs(t,e){if(t)if(ee(t))for(var r=0;re&&(e=o),oe&&(r=e=0),{min:r,max:e}}function j0(t,e,r){xV(t,e,r,-1/0)}function xV(t,e,r,n){if(t.ignoreModelZ)return n;var i=t.getTextContent(),a=t.getTextGuideLine(),o=t.isGroup;if(o)for(var s=t.childrenRef(),l=0;l=0&&s.push(l)}),s}}function Ts(t,e){return Re(Re({},t,!0),e,!0)}const MK={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},LK={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var hy="ZH",z2="EN",kc=z2,um={},B2={},MV=We.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||kc).toUpperCase();return t.indexOf(hy)>-1?hy:kc}():kc;function V2(t,e){t=t.toUpperCase(),B2[t]=new Ge(e),um[t]=e}function AK(t){if(se(t)){var e=um[t.toUpperCase()]||{};return t===hy||t===z2?ye(e):Re(ye(e),ye(um[kc]),!1)}else return Re(ye(t),ye(um[kc]),!1)}function Cb(t){return B2[t]}function PK(){return B2[kc]}V2(z2,MK);V2(hy,LK);var Mb=null;function DK(t){Mb||(Mb=t)}function Xt(){return Mb}var F2=1e3,j2=F2*60,fv=j2*60,Qn=fv*24,Ek=Qn*365,kK={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},cm={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},IK="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",$p="{yyyy}-{MM}-{dd}",Rk={year:"{yyyy}",month:"{yyyy}-{MM}",day:$p,hour:$p+" "+cm.hour,minute:$p+" "+cm.minute,second:$p+" "+cm.second,millisecond:IK},Sn=["year","month","day","hour","minute","second","millisecond"],EK=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function RK(t){return!se(t)&&!me(t)?NK(t):t}function NK(t){t=t||{};var e={},r=!0;return N(Sn,function(n){r&&(r=t[n]==null)}),N(Sn,function(n,i){var a=t[n];e[n]={};for(var o=null,s=i;s>=0;s--){var l=Sn[s],u=we(a)&&!ee(a)?a[l]:a,c=void 0;ee(u)?(c=u.slice(),o=c[0]||""):se(u)?(o=u,c=[o]):(o==null?o=cm[n]:kK[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],r&&(c[1]="{primary|"+o+"}")),e[n][l]=c}}),e}function Qr(t,e){return t+="","0000".substr(0,e-t.length)+t}function hv(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function OK(t){return t===hv(t)}function zK(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Ed(t,e,r,n){var i=wa(t),a=i[LV(r)](),o=i[G2(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[H2(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[W2(r)](),f=(c-1)%12+1,h=i[U2(r)](),v=i[Z2(r)](),p=i[$2(r)](),g=c>=12?"pm":"am",m=g.toUpperCase(),y=n instanceof Ge?n:Cb(n||MV)||PK(),x=y.getModel("time"),S=x.get("month"),b=x.get("monthAbbr"),T=x.get("dayOfWeek"),C=x.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Qr(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,S[o-1]).replace(/{MMM}/g,b[o-1]).replace(/{MM}/g,Qr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Qr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,T[u]).replace(/{ee}/g,C[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Qr(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Qr(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Qr(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Qr(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Qr(p,3)).replace(/{S}/g,p+"")}function BK(t,e,r,n,i){var a=null;if(se(r))a=r;else if(me(r)){var o={time:t.time,level:t.time.level},s=Xt();s&&s.makeAxisLabelFormatterParamBreak(o,t.break),a=r(t.value,e,o)}else{var l=t.time;if(l){var u=r[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=yc(t.value,i);a=r[c][c][0]}}return Ed(new Date(t.value),a,i,n)}function yc(t,e){var r=wa(t),n=r[G2(e)]()+1,i=r[H2(e)](),a=r[W2(e)](),o=r[U2(e)](),s=r[Z2(e)](),l=r[$2(e)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&a===0,v=h&&i===1,p=v&&n===1;return p?"year":v?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function vy(t,e,r){switch(e){case"year":t[AV(r)](0);case"month":t[PV(r)](1);case"day":t[DV(r)](0);case"hour":t[kV(r)](0);case"minute":t[IV(r)](0);case"second":t[EV(r)](0)}return t}function LV(t){return t?"getUTCFullYear":"getFullYear"}function G2(t){return t?"getUTCMonth":"getMonth"}function H2(t){return t?"getUTCDate":"getDate"}function W2(t){return t?"getUTCHours":"getHours"}function U2(t){return t?"getUTCMinutes":"getMinutes"}function Z2(t){return t?"getUTCSeconds":"getSeconds"}function $2(t){return t?"getUTCMilliseconds":"getMilliseconds"}function VK(t){return t?"setUTCFullYear":"setFullYear"}function AV(t){return t?"setUTCMonth":"setMonth"}function PV(t){return t?"setUTCDate":"setDate"}function DV(t){return t?"setUTCHours":"setHours"}function kV(t){return t?"setUTCMinutes":"setMinutes"}function IV(t){return t?"setUTCSeconds":"setSeconds"}function EV(t){return t?"setUTCMilliseconds":"setMilliseconds"}function FK(t,e,r,n,i,a,o,s){var l=new Xe({style:{text:t,font:e,align:r,verticalAlign:n,padding:i,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function Y2(t){if(!g2(t))return se(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function X2(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var _f=bd;function Lb(t,e,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&Mn(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=t instanceof Date;if(o||s){var l=o?wa(t):t;if(isNaN(+l)){if(s)return"-"}else return Ed(l,n,r)}if(e==="ordinal")return $m(t)?i(t):qe(t)&&a(t)?t+"":"-";var u=ma(t);return a(u)?Y2(u):$m(t)?i(t):typeof t=="boolean"?t+"":"-"}var Nk=["a","b","c","d","e","f","g"],t1=function(t,e){return"{"+t+(e??"")+"}"};function q2(t,e,r){ee(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function GK(t,e,r){(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year")&&(t=`MM-dd +yyyy`);var n=wa(e),i=r?"getUTC":"get",a=n[i+"FullYear"](),o=n[i+"Month"]()+1,s=n[i+"Date"](),l=n[i+"Hours"](),u=n[i+"Minutes"](),c=n[i+"Seconds"](),f=n[i+"Milliseconds"]();return t=t.replace("MM",Qr(o,2)).replace("M",o).replace("yyyy",a).replace("yy",Qr(a%100+"",2)).replace("dd",Qr(s,2)).replace("d",s).replace("hh",Qr(l,2)).replace("h",l).replace("mm",Qr(u,2)).replace("m",u).replace("ss",Qr(c,2)).replace("s",c).replace("SSS",Qr(f,3)),t}function HK(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}function Yl(t,e){return e=e||"transparent",se(t)?t:we(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function dy(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var fm={},r1={},xf=function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(e,r){this._nonSeriesBoxMasterList=n(fm),this._normalMasterList=n(r1);function n(i,a){var o=[];return N(i,function(s,l){var u=s.create(e,r);o=o.concat(u||[])}),o}},t.prototype.update=function(e,r){N(this._normalMasterList,function(n){n.update&&n.update(e,r)})},t.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},t.register=function(e,r){if(e==="matrix"||e==="calendar"){fm[e]=r;return}r1[e]=r},t.get=function(e){return r1[e]||fm[e]},t}();function WK(t){return!!fm[t]}var Ab={coord:1,coord2:2};function UK(t){NV.set(t.fullType,{getCoord2:void 0}).getCoord2=t.getCoord2}var NV=ve();function ZK(t){var e=t.getShallow("coord",!0),r=Ab.coord;if(e==null){var n=NV.get(t.type);n&&n.getCoord2&&(r=Ab.coord2,e=n.getCoord2(t))}return{coord:e,from:r}}var na={none:0,dataCoordSys:1,boxCoordSys:2};function OV(t,e){var r=t.getShallow("coordinateSystem"),n=t.getShallow("coordinateSystemUsage",!0),i=na.none;if(r){var a=t.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=na.dataCoordSys,a||(i=na.none)):n==="box"&&(i=na.boxCoordSys,!a&&!WK(r)&&(i=na.none))}return{coordSysType:r,kind:i}}function Rd(t){var e=t.targetModel,r=t.coordSysType,n=t.coordSysProvider,i=t.isDefaultDataCoordSys;t.allowNotFound;var a=OV(e),o=a.kind,s=a.coordSysType;if(i&&o!==na.dataCoordSys&&(o=na.dataCoordSys,s=r),o===na.none||s!==r)return!1;var l=n(r,e);return l?(o===na.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var zV=function(t,e){var r=e.getReferringComponents(t,Dt).models[0];return r&&r.coordinateSystem},hm=N,BV=["left","right","top","bottom","width","height"],wl=[["width","left","right"],["height","top","bottom"]];function K2(t,e,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),f=e.childAt(u+1),h=f&&f.getBoundingRect(),v,p;if(t==="horizontal"){var g=c.width+(h?-h.x+c.x:0);v=a+g,v>n||l.newline?(a=0,v=g,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(h?-h.y+c.y:0);p=o+m,p>i||l.newline?(a+=s+r,o=0,p=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),t==="horizontal"?a=v+r:o=p+r)})}var kl=K2;Ie(K2,"vertical");Ie(K2,"horizontal");function VV(t,e){return{left:t.getShallow("left",e),top:t.getShallow("top",e),right:t.getShallow("right",e),bottom:t.getShallow("bottom",e),width:t.getShallow("width",e),height:t.getShallow("height",e)}}function $K(t,e){var r=or(t,e,{enableLayoutOnlyByCenter:!0}),n=t.getBoxLayoutParams(),i,a;if(r.type===Bh.point)a=r.refPoint,i=wt(n,{width:e.getWidth(),height:e.getHeight()});else{var o=t.get("center"),s=ee(o)?o:[o,o];i=wt(n,r.refContainer),a=r.boxCoordFrom===Ab.coord2?r.refPoint:[oe(s[0],i.width)+i.x,oe(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function FV(t,e){var r=$K(t,e),n=r.viewRect,i=r.center,a=t.get("radius");ee(a)||(a=[0,a]);var o=oe(n.width,e.getWidth()),s=oe(n.height,e.getHeight()),l=Math.min(o,s),u=oe(a[0],l/2),c=oe(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:n}}function wt(t,e,r){r=_f(r||0);var n=e.width,i=e.height,a=oe(t.left,n),o=oe(t.top,i),s=oe(t.right,n),l=oe(t.bottom,i),u=oe(t.width,n),c=oe(t.height,i),f=r[2]+r[0],h=r[1]+r[3],v=t.aspect;switch(isNaN(u)&&(u=n-s-h-a),isNaN(c)&&(c=i-l-f-o),v!=null&&(isNaN(u)&&isNaN(c)&&(v>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=v*c),isNaN(c)&&(c=u/v)),isNaN(a)&&(a=n-s-u-h),isNaN(o)&&(o=i-l-c-f),t.left||t.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-h;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-h-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var p=new Ce((e.x||0)+a+r[3],(e.y||0)+o+r[0],u,c);return p.margin=r,p}function jV(t,e,r){var n=t.getShallow("preserveAspect",!0);if(!n)return e;var i=e.width/e.height;if(Math.abs(Math.atan(r)-Math.atan(i))<1e-9)return e;var a=t.getShallow("preserveAspectAlign",!0),o=t.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=n==="cover";return i>r&&!l||i=g)return f;for(var m=0;m=0;l--)s=Re(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return ff(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){return VV(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(Ge);z4(Be,Ge);I0(Be);TK(Be);CK(Be,qK);function qK(t){var e=[];return N(Be.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=re(e,function(r){return oa(r).main}),t!=="dataset"&&Ee(e,"dataset")<=0&&e.unshift("dataset"),e}var X={color:{},darkColor:{},size:{}},Vt=X.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};J(Vt,{primary:Vt.neutral80,secondary:Vt.neutral70,tertiary:Vt.neutral60,quaternary:Vt.neutral50,disabled:Vt.neutral20,border:Vt.neutral30,borderTint:Vt.neutral20,borderShade:Vt.neutral40,background:Vt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Vt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Vt.neutral70,axisLineTint:Vt.neutral40,axisTick:Vt.neutral70,axisTickMinor:Vt.neutral60,axisLabel:Vt.neutral70,axisSplitLine:Vt.neutral15,axisMinorSplitLine:Vt.neutral05});for(var Ys in Vt)if(Vt.hasOwnProperty(Ys)){var Ok=Vt[Ys];Ys==="theme"?X.darkColor.theme=Vt.theme.slice():Ys==="highlight"?X.darkColor.highlight="rgba(255,231,130,0.4)":Ys.indexOf("accent")===0?X.darkColor[Ys]=Xa(Ok,null,function(t){return t*.5},function(t){return Math.min(1,1.3-t)}):X.darkColor[Ys]=Xa(Ok,null,function(t){return t*.9},function(t){return 1-Math.pow(t,1.5)})}X.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var HV="";typeof navigator<"u"&&(HV=navigator.platform||"");var ku="rgba(0, 0, 0, 0.2)",WV=X.color.theme[0],KK=Xa(WV,null,null,.9);const QK={darkMode:"auto",colorBy:"series",color:X.color.theme,gradientColor:[KK,WV],aria:{decal:{decals:[{color:ku,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ku,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ku,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ku,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ku,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ku,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:HV.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var UV=ve(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Nn="original",Tr="arrayRows",On="objectRows",Ni="keyedColumns",os="typedArray",ZV="unknown",Di="column",su="row",Lr={Must:1,Might:2,Not:3},$V=Ve();function JK(t){$V(t).datasetMap=ve()}function YV(t,e,r){var n={},i=J2(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,l=$V(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,f;t=t.slice(),N(t,function(g,m){var y=we(g)?g:t[m]={name:g};y.type==="ordinal"&&c==null&&(c=m,f=p(y)),n[y.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});N(t,function(g,m){var y=g.name,x=p(g);if(c==null){var S=h.valueWayDim;v(n[y],S,x),v(o,S,x),h.valueWayDim+=x}else if(c===m)v(n[y],0,x),v(a,0,x);else{var S=h.categoryWayDim;v(n[y],S,x),v(o,S,x),h.categoryWayDim+=x}});function v(g,m,y){for(var x=0;xe)return t[n];return t[r-1]}function KV(t,e,r,n,i,a,o){a=a||t;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?r:iQ(n,o);if(c=c||r,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function aQ(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var Yp,nh,Bk,Vk="\0_ec_inner",oQ=1,tM=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new Ge(a),this._locale=new Ge(o),this._optionManager=s},e.prototype.setOption=function(r,n,i){var a=Gk(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,Gk(n))},e.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?Bk(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&N(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=ve(),u=n&&n.replaceMergeMainTypeMap;JK(this),N(r,function(f,h){f!=null&&(Be.hasClass(h)?h&&(s.push(h),l.set(h,!0)):i[h]=i[h]==null?ye(f):Re(i[h],f,!0))}),u&&u.each(function(f,h){Be.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),Be.topologicalTravel(s,Be.getAllClassMainTypes(),c,this);function c(f){var h=rQ(this,f,gt(r[f])),v=a.get(f),p=v?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",g=I4(v,h,p);SX(g,f,Be),i[f]=null,a.set(f,null),o.set(f,0);var m=[],y=[],x=0,S;N(g,function(b,T){var C=b.existing,M=b.newOption;if(!M)C&&(C.mergeOption({},this),C.optionUpdated({},!1));else{var D=f==="series",I=Be.getClass(f,b.keyInfo.subType,!D);if(!I)return;if(f==="tooltip"){if(S)return;S=!0}if(C&&C.constructor===I)C.name=b.keyInfo.name,C.mergeOption(M,this),C.optionUpdated(M,!1);else{var k=J({componentIndex:T},b.keyInfo);C=new I(M,this,this,k),J(C,k),b.brandNew&&(C.__requireNewView=!0),C.init(M,this,this),C.optionUpdated(null,!0)}}C?(m.push(C.option),y.push(C),x++):(m.push(void 0),y.push(void 0))},this),i[f]=m,a.set(f,y),o.set(f,x),f==="series"&&Yp(this)}this._seriesIndices||Yp(this)},e.prototype.getOption=function(){var r=ye(this.option);return N(r,function(n,i){if(Be.hasClass(i)){for(var a=gt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Wv(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[Vk],r},e.prototype.setTheme=function(r){this._theme=new Ge(r),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=e:r==="max"?t<=e:t===e}function pQ(t,e){return t.join(",")===e.join(",")}var pi=N,qv=we,Hk=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function n1(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=Hk.length;r0?r[o-1].seriesModel:null)}),TQ(r)}})}function TQ(t){N(t,function(e,r){var n=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,f){var h=o.get(e.stackedDimension,f);if(isNaN(h))return i;var v,p;s?p=o.getRawIndex(f):v=o.get(e.stackedByDimension,f);for(var g=NaN,m=r-1;m>=0;m--){var y=t[m];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,v)),p>=0){var x=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&x>0||l==="negative"&&x<0||l==="samesign"&&h>=0&&x>0||l==="samesign"&&h<=0&&x<0){h=lX(h,x),g=x;break}}}return n[0]=h,n[1]=g,n})})}var W0=function(){function t(e){this.data=e.data||(e.sourceFormat===Ni?{}:[]),this.sourceFormat=e.sourceFormat||ZV,this.seriesLayoutBy=e.seriesLayoutBy||Di,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;ng&&(g=S)}v[0]=p,v[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};qk=(e={},e[Tr+"_"+Di]={pure:!0,appendData:a},e[Tr+"_"+su]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[On]={pure:!0,appendData:a},e[Ni]={pure:!0,appendData:function(o){var s=this._data;N(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[Nn]={appendData:a},e[os]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[m])}return g!=null?g+"":""})}},t.prototype.getRawValue=function(e,r){return Yc(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function eI(t){var e,r;return we(t)?t.type&&(r=t):e=t,{text:e,frag:r}}function vv(t){return new IQ(t)}var IQ=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(x){return!(x>=1)&&(x=1),x}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,p=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(f||v1&&n>0?s:o}};return a;function o(){return e=t?null:le},gte:function(t,e){return t>=e}},RQ=function(){function t(e,r){if(!qe(r)){var n="";at(n)}this._opFn=lF[e],this._rvalFloat=ma(r)}return t.prototype.evaluate=function(e){return qe(e)?this._opFn(e,this._rvalFloat):this._opFn(ma(e),this._rvalFloat)},t}(),uF=function(){function t(e,r){var n=e==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,r){var n=qe(e)?e:ma(e),i=qe(r)?r:ma(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=se(e),l=se(r);s&&(n=l?e:0),l&&(i=s?r:0)}return ni?-this._resultLT:0},t}(),NQ=function(){function t(e,r){this._rval=r,this._isEQ=e,this._rvalTypeof=typeof r,this._rvalFloat=ma(r)}return t.prototype.evaluate=function(e){var r=e===this._rval;if(!r){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=ma(e)===this._rvalFloat)}return this._isEQ?r:!r},t}();function OQ(t,e){return t==="eq"||t==="ne"?new NQ(t==="eq",e):fe(lF,t)?new RQ(t,e):null}var zQ=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return ss(e,r)},t}();function BQ(t,e){var r=new zQ,n=t.data,i=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==Di&&at(o);var s=[],l={},u=t.dimensionsDefine;if(u)N(u,function(g,m){var y=g.name,x={index:m,name:y,displayName:g.displayName};if(s.push(x),y!=null){var S="";fe(l,y)&&at(S),l[y]=x}});else for(var c=0;c65535?ZQ:$Q}function Eu(){return[1/0,-1/0]}function YQ(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function nI(t,e,r,n,i){var a=hF[r||"float"];if(i){var o=t[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;um[1]&&(m[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(e,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=re(o,function(x){return x.property}),c=0;cy[1]&&(y[1]=m)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r=0&&r=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&ne)a=o-1;else return o}return-1},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a=f&&x<=h||isNaN(x))&&(l[u++]=g),g++}p=!0}else if(a===2){for(var m=v[i[0]],S=v[i[1]],b=e[i[1]][0],T=e[i[1]][1],y=0;y=f&&x<=h||isNaN(x))&&(C>=b&&C<=T||isNaN(C))&&(l[u++]=g),g++}p=!0}}if(!p)if(a===1)for(var y=0;y=f&&x<=h||isNaN(x))&&(l[u++]=M)}else for(var y=0;ye[k][1])&&(D=!1)}D&&(l[u++]=r.getRawIndex(y))}return uy[1]&&(y[1]=m)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,f,h,v=new(Iu(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var p=1;pc&&(c=f,h=b)}E>0&&Es&&(g=s-c);for(var m=0;mp&&(p=x,v=c+m)}var S=this.getRawIndex(f),b=this.getRawIndex(v);fc-p&&(l=c-p,s.length=l);for(var g=0;gf[1]&&(f[1]=y),h[v++]=x}return a._count=v,a._indices=h,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();al&&(l=f)}return o=[s,l],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,i,a){return ss(r[a],this._dimensions[a])}o1={arrayRows:e,objectRows:function(r,n,i,a){return ss(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return ss(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),vF=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(qp(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=rn(s)?os:Nn,a=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},v=pe(f.seriesLayoutBy,h.seriesLayoutBy)||null,p=pe(f.sourceHeader,h.sourceHeader),g=pe(f.dimensions,h.dimensions),m=v!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||g;i=m?[kb(s,{seriesLayoutBy:v,sourceHeader:p,dimensions:g},l)]:[]}else{var y=e;if(n){var x=this._applyTransform(r);i=x.sourceList,a=x.upstreamSignList}else{var S=y.get("source",!0);i=[kb(S,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";e.length!==1&&aI(a)}var o,s=[],l=[];return N(e,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&aI(f),s.push(c),l.push(u._getVersionSign())}),n?o=WQ(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[CQ(s[0])]),{sourceList:o,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r1||r>0&&!t.noHeader;return N(t.blocks,function(i){var a=mF(i);a>=e&&(e=a+ +(n&&(!a||Eb(i)&&!i.noHeader)))}),e}return 0}function QQ(t,e,r,n){var i=e.noHeader,a=eJ(mF(e)),o=[],s=e.blocks||[];Er(!s||ee(s)),s=s||[];var l=t.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(fe(u,l)){var c=new uF(u[l],null);s.sort(function(g,m){return c.evaluate(g.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}N(s,function(g,m){var y=e.valueFormatter,x=gF(g)(y?J(J({},t),{valueFormatter:y}):t,g,m>0?a.html:0,n);x!=null&&o.push(x)});var f=t.renderMode==="richText"?o.join(a.richText):Rb(n,o.join(""),i?r:a.html);if(i)return f;var h=Lb(e.header,"ordinal",t.useUTC),v=pF(n,t.renderMode).nameStyle,p=dF(n);return t.renderMode==="richText"?yF(t,h,v)+a.richText+f:Rb(n,'
'+Wr(h)+"
"+f,r)}function JQ(t,e,r,n){var i=t.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,c=e.valueFormatter||t.valueFormatter||function(b){return b=ee(b)?b:[b],re(b,function(T,C){return Lb(T,ee(v)?v[C]:v,u)})};if(!(a&&o)){var f=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||X.color.secondary,i),h=a?"":Lb(l,"ordinal",u),v=e.valueType,p=o?[]:c(e.value,e.dataIndex),g=!s||!a,m=!s&&a,y=pF(n,i),x=y.nameStyle,S=y.valueStyle;return i==="richText"?(s?"":f)+(a?"":yF(t,h,x))+(o?"":nJ(t,p,g,m,S)):Rb(n,(s?"":f)+(a?"":tJ(h,!s,x))+(o?"":rJ(p,g,m,S)),r)}}function oI(t,e,r,n,i,a){if(t){var o=gF(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function eJ(t){return{html:qQ[t],richText:KQ[t]}}function Rb(t,e,r){var n='
',i="margin: "+r+"px 0 0",a=dF(t);return'
'+e+n+"
"}function tJ(t,e,r){var n=e?"margin-left:2px":"";return''+Wr(t)+""}function rJ(t,e,r,n){var i=r?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return t=ee(t)?t:[t],''+re(t,function(o){return Wr(o)}).join("  ")+""}function yF(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function nJ(t,e,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(ee(e)?e.join(" "):e,a)}function _F(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return Yl(n)}function xF(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var s1=function(){function t(){this.richTextStyles={},this._nextStyleNameId=L4()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,n){var i=n==="richText"?this._generateStyleName():null,a=RV({color:r,type:e,renderMode:n,markerId:i});return se(a)?a:(this.richTextStyles[i]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(e,r){var n={};ee(r)?N(r,function(a){return J(n,a)}):J(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},t}();function SF(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),l=ee(s),u=_F(e,r),c,f,h,v;if(o>1||l&&!o){var p=iJ(s,e,r,a,u);c=p.inlineValues,f=p.inlineValueTypes,h=p.blocks,v=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);v=c=Yc(i,r,a[0]),f=g.type}else v=c=l?s[0]:s;var m=m2(e),y=m&&e.name||"",x=i.getName(r),S=n?y:x;return Kt("section",{header:y,noHeader:n||!m,sortParam:v,blocks:[Kt("nameValue",{markerType:"item",markerColor:u,name:S,noName:!Mn(S),value:c,valueType:f,dataIndex:r})].concat(h||[])})}function iJ(t,e,r,n,i){var a=e.getData(),o=ai(t,function(f,h,v){var p=a.getDimensionInfo(v);return f=f||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?N(n,function(f){c(Yc(a,r,f),f)}):N(t,c);function c(f,h){var v=a.getDimensionInfo(h);!v||v.otherDims.tooltip===!1||(o?u.push(Kt("nameValue",{markerType:"subItem",markerColor:i,name:v.displayName,value:f,valueType:v.type})):(s.push(f),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var So=Ve();function Kp(t,e){return t.getName(e)||t.getId(e)}var vm="__universalTransitionEnabled",ht=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=vv({count:oJ,reset:sJ}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=So(this).sourceManager=new vF(this);a.prepareSource();var o=this.getInitialData(r,i);lI(o,this),this.dataTask.context.data=o,So(this).dataBeforeProcessed=o,sI(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=Xv(this),a=i?ou(r):{},o=this.subType;Be.hasClass(o)&&(o+="Series"),Re(r,n.getTheme().get(this.subType)),Re(r,this.getDefaultOption()),jl(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&_a(r,a,i)},e.prototype.mergeOption=function(r,n){r=Re(this.option,r,!0),this.fillDataTextStyle(r.data);var i=Xv(this);i&&_a(this.option,r,i);var a=So(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);lI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,So(this).dataBeforeProcessed=o,sI(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!rn(r))for(var n=["show"],i=0;i=0&&h<0)&&(f=x,h=y,v=0),y===h&&(c[v++]=g))}),c.length=v,c},e.prototype.formatTooltip=function(r,n,i){return SF({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(We.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=eM.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Kp(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[vm])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){we(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(r,n)}},e.registerClass=function(r){return Be.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Be);Bt(ht,U0);Bt(ht,eM);z4(ht,Be);function sI(t){var e=t.name;m2(t)||(t.name=aJ(t)||e)}function aJ(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return N(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function oJ(t){return t.model.getRawData().count()}function sJ(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),lJ}function lJ(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function lI(t,e){N(Gc(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,Ie(uJ,e))})}function uJ(t,e){var r=Nb(t);return r&&r.setOutputEnd((e||this).count()),e}function Nb(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}var gt=function(){function t(){this.group=new _e,this.uid=yf("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();_2(gt);I0(gt);function Sf(){var t=Ve();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var wF=Ve(),cJ=Sf(),lt=function(){function t(){this.group=new _e,this.uid=yf("viewChart"),this.renderTask=vv({plan:fJ,reset:hJ}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&cI(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&cI(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){ws(this.group,e)},t.markUpdateMethod=function(e,r){wF(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function uI(t,e,r){t&&Zv(t)&&(e==="emphasis"?ao:oo)(t,r)}function cI(t,e,r){var n=Hl(t,e),i=e&&e.highlightKey!=null?Bq(e.highlightKey):null;n!=null?N(pt(n),function(a){uI(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){uI(a,r,i)})}_2(lt);I0(lt);function fJ(t){return cJ(t.model)}function hJ(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&wF(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,n,i),vJ[l]}var vJ={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},py="\0__throttleOriginMethod",fI="\0__throttleRate",hI="\0__throttleType";function $0(t,e,r){var n,i=0,a=0,o=null,s,l,u,c;e=e||0;function f(){a=new Date().getTime(),o=null,t.apply(l,u||[])}var h=function(){for(var v=[],p=0;p=0?f():o=setTimeout(f,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(v){c=v},h}function wf(t,e,r,n){var i=t[e];if(i){var a=i[py]||i,o=i[hI],s=i[fI];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=$0(a,r,n==="debounce"),i[py]=a,i[hI]=n,i[fI]=r}return i}}function Kv(t,e){var r=t[e];r&&r[py]&&(r.clear&&r.clear(),t[e]=r[py])}var vI=Ve(),dI={itemStyle:Wl(CV,!0),lineStyle:Wl(TV,!0)},dJ={lineStyle:"stroke",itemStyle:"fill"};function bF(t,e){var r=t.visualStyleMapper||dI[e];return r||(console.warn("Unknown style type '"+e+"'."),dI.itemStyle)}function TF(t,e){var r=t.visualDrawType||dJ[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var pJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=bF(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=TF(t,n),u=o[l],c=me(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||me(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||me(o.stroke)?h:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(v,p){var g=t.getDataParams(p),m=J({},o);m[l]=c(g),v.setItemVisual(p,"style",m)}}}},ah=new je,gJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=bF(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){ah.option=l[n];var u=i(ah),c=o.ensureUniqueItemVisual(s,"style");J(c,u),ah.option.decal&&(o.setItemVisual(s,"decal",ah.option.decal),ah.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},mJ={performRawSeries:!0,overallReset:function(t){var e=ve();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),vI(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=vI(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=TF(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var h=a.ensureUniqueItemVisual(c,"style"),v=n.getName(u)||u+"",p=n.count();h[l]=r.getColorFromPalette(v,o,p)}})}})}},Qp=Math.PI;function yJ(t,e){e=e||{},Se(e,{text:"loading",textColor:X.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:X.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new _e,n=new ze({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new Ye({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new ze({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new Dd({shape:{startAngle:-Qp/2,endAngle:-Qp/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Qp*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Qp*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var CF=function(){function t(e,r,n,i){this._stageTaskMap=ve(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=ve();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;N(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";Er(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;N(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var v,p=h.agentStubMap;p.each(function(m){s(i,m)&&(m.dirty(),v=!0)}),v&&h.dirty(),o.updatePayload(h,n);var g=o.getPerformArgs(h,i.block);p.each(function(m){m.perform(g)}),h.perform(g)&&(a=!0)}else f&&f.each(function(m,y){s(i,m)&&m.dirty();var x=o.getPerformArgs(m,i.block);x.skip=!l.performRawSeries&&r.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(x)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=ve(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var h=f.uid,v=s.set(h,o&&o.get(h)||vv({plan:bJ,reset:TJ,count:MJ}));v.context={model:f,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(f,v)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||vv({reset:_J});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=ve(),u=e.seriesType,c=e.getTargetSeries,f=!0,h=!1,v="";Er(!e.createOnAllSeries,v),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(f=!1,N(n.getSeries(),p));function p(g){var m=g.uid,y=l.set(m,s&&s.get(m)||(h=!0,vv({reset:xJ,onDirty:wJ})));y.context={model:g,overallProgress:f},y.agent=o,y.__block=f,a._pipe(g,y)}h&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return me(e)&&(e={overallReset:e,seriesType:LJ(e)}),e.uid=yf("stageHandler"),r&&(e.visualType=r),e},t}();function _J(t){t.overallReset(t.ecModel,t.api,t.payload)}function xJ(t){return t.overallProgress&&SJ}function SJ(){this.agent.dirty(),this.getDownstream().dirty()}function wJ(){this.agent&&this.agent.dirty()}function bJ(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function TJ(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=pt(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?re(e,function(r,n){return MF(n)}):CJ}var CJ=MF(0);function MF(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a0&&v===u.length-h.length){var p=u.slice(0,v);p!=="data"&&(r.mainType=p,r[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,i,a));function c(f,h,v,p){return f[v]==null||h[p||v]===f[v]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Ob=["symbol","symbolSize","symbolRotate","symbolOffset"],gI=Ob.concat(["symbolKeepAspect"]),DJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&bl(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function zb(t,e,r){for(var n=e.type==="radial"?UJ(t,e,r):WJ(t,e,r),i=e.colorStops,a=0;a0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:Xe(t)?[t]:ee(t)?t:null}function sM(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&$J(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=re(r,function(a){return a/i}),n/=i)}return[r,n]}var YJ=new ya(!0);function yy(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function mI(t){return typeof t=="string"&&t!=="none"}function _y(t){var e=t.fill;return e!=null&&e!=="none"}function yI(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function _I(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function Bb(t,e,r){var n=x2(e.image,e.__image,r);if(E0(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*rv),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function XJ(t,e,r,n){var i,a=yy(r),o=_y(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||YJ,f=e.__dirty;if(!n){var h=r.fill,v=r.stroke,p=o&&!!h.colorStops,g=a&&!!v.colorStops,m=o&&!!h.image,y=a&&!!v.image,x=void 0,S=void 0,b=void 0,T=void 0,C=void 0;(p||g)&&(C=e.getBoundingRect()),p&&(x=f?zb(t,h,C):e.__canvasFillGradient,e.__canvasFillGradient=x),g&&(S=f?zb(t,v,C):e.__canvasStrokeGradient,e.__canvasStrokeGradient=S),m&&(b=f||!e.__canvasFillPattern?Bb(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=b),y&&(T=f||!e.__canvasStrokePattern?Bb(t,v,e):e.__canvasStrokePattern,e.__canvasStrokePattern=T),p?t.fillStyle=x:m&&(b?t.fillStyle=b:o=!1),g?t.strokeStyle=S:y&&(T?t.strokeStyle=T:a=!1)}var M=e.getGlobalScale();c.setScale(M[0],M[1],e.segmentIgnoreThreshold);var D,I;t.setLineDash&&r.lineDash&&(i=sM(e),D=i[0],I=i[1]);var k=!0;(u||f&Qu)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),k=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),k&&c.rebuildPath(t,l?s:1),D&&(t.setLineDash(D),t.lineDashOffset=I),n||(r.strokeFirst?(a&&_I(t,r),o&&yI(t,r)):(o&&yI(t,r),a&&_I(t,r))),D&&t.setLineDash([])}function qJ(t,e,r){var n=e.__image=x2(r.image,e.__image,e,e.onload);if(!(!n||!E0(n))){var i=r.x||0,a=r.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;t.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,f=o-u,h=s-c;t.drawImage(n,u,c,f,h,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function KJ(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||no,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=sM(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(yy(r)&&t.strokeText(i,r.x,r.y),_y(r)&&t.fillText(i,r.x,r.y)):(_y(r)&&t.fillText(i,r.x,r.y),yy(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var xI=["shadowBlur","shadowOffsetX","shadowOffsetY"],SI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function IF(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){hn(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?Al.opacity:o}(n||e.blend!==r.blend)&&(a||(hn(t,i),a=!0),t.globalCompositeOperation=e.blend||Al.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,i){if(!this[er]){if(this._disposed){this.id;return}var a,o,s;if(we(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[er]=!0,zu(this),!this._model||n){var l=new fQ(this._api),u=this._theme,c=this._model=new tM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},jb);var f={seriesTransition:s,optionChanged:!0};if(i)this[mr]={silent:a,updateParams:f},this[er]=!1,this.getZr().wakeUp();else{try{Qs(this),ka.update.call(this,null,f)}catch(h){throw this[mr]=null,this[er]=!1,h}this._ssr||this._zr.flush(),this[mr]=null,this[er]=!1,Nu.call(this,a),Ou.call(this,a)}}},e.prototype.setTheme=function(r,n){if(!this[er]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[mr]&&(a==null&&(a=this[mr].silent),o=this[mr].updateParams,this[mr]=null),this[er]=!0,zu(this);try{this._updateTheme(r),i.setTheme(this._theme),Qs(this),ka.update.call(this,{type:"setTheme"},o)}catch(s){throw this[er]=!1,s}this[er]=!1,Nu.call(this,a),Ou.call(this,a)}}},e.prototype._updateTheme=function(r){se(r)&&(r=KF[r]),r&&(r=ye(r),r&&eF(r,!0),this._theme=r)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||We.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return N(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},e.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;N(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return N(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(by[i]){var l=s,u=s,c=-s,f=-s,h=[],v=r&&r.pixelRatio||this.getDevicePixelRatio();N(kl,function(S,b){if(S.group===i){var T=n?S.getZr().painter.getSvgDom().innerHTML:S.renderToCanvas(ye(r)),C=S.getDom().getBoundingClientRect();l=a(C.left,l),u=a(C.top,u),c=o(C.right,c),f=o(C.bottom,f),h.push({dom:T,left:C.left,top:C.top})}}),l*=v,u*=v,c*=v,f*=v;var p=c-l,g=f-u,m=yn.createCanvas(),y=ob(m,{renderer:n?"svg":"canvas"});if(y.resize({width:p,height:g}),n){var x="";return N(h,function(S){var b=S.left-l,T=S.top-u;x+=''+S.dom+""}),y.painter.getSvgRoot().innerHTML=x,r.connectedBackgroundColor&&y.painter.setBackgroundColor(r.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return r.connectedBackgroundColor&&y.add(new ze({shape:{x:0,y:0,width:p,height:g},style:{fill:r.connectedBackgroundColor}})),N(h,function(S){var b=new dr({style:{x:S.left*v-l,y:S.top*v-u,image:S.dom}});y.add(b)}),y.refreshImmediately(),m.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n,i){return rg(this,"convertToPixel",r,n,i)},e.prototype.convertToLayout=function(r,n,i){return rg(this,"convertToLayout",r,n,i)},e.prototype.convertFromPixel=function(r,n,i){return rg(this,"convertFromPixel",r,n,i)},e.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Pc(i,r);return N(o,function(s,l){l.indexOf("Models")>=0&&N(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=Pc(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?oM(s,l,n):Nd(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;N(bee,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&wl(l,function(g){var m=Ae(g);if(m&&m.dataIndex!=null){var y=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=y&&y.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=J({},m.eventData),!0},!0),u){var f=u.componentType,h=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=u.seriesIndex);var v=f&&h!=null&&s.getComponent(f,h),p=v&&r[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:v,view:p},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;N(Fb,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),IJ(n,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&R4(this.getDom(),fM,"");var n=this,i=n._api,a=n._model;N(n._componentsViews,function(o){o.dispose(a,i)}),N(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete kl[n.id]},e.prototype.resize=function(r){if(!this[er]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[mr]&&(a==null&&(a=this[mr].silent),i=!0,this[mr]=null),this[er]=!0,zu(this);try{i&&Qs(this),ka.update.call(this,{type:"resize",animation:J({duration:0},r&&r.animation)})}catch(o){throw this[er]=!1,o}this[er]=!1,Nu.call(this,a),Ou.call(this,a)}}},e.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(we(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!Hb[r]){var i=Hb[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=J({},r);return n.type=Vb[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(we(n)||(n={silent:!!n}),!!Sy[r.type]&&this._model){if(this[er]){this._pendingActions.push(r);return}var i=n.silent;v1.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&We.browser.weChat&&this._throttledZrFlush(),Nu.call(this,i),Ou.call(this,i)}},e.prototype.updateLabelLayout=function(){yi.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){Qs=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),f1(f,!0),f1(f,!1),h.plan()},f1=function(f,h){for(var v=f._model,p=f._scheduler,g=h?f._componentsViews:f._chartsViews,m=h?f._componentsMap:f._chartsMap,y=f._zr,x=f._api,S=0;Sh.get("hoverLayerThreshold")&&!We.node&&!We.worker&&h.eachSeries(function(m){if(!m.preventUsingHoverLayer){var y=f._chartsMap[m.__viewId];y.__alive&&y.eachRendered(function(x){x.states.emphasis&&(x.states.emphasis.hoverLayer=!0)})}})}function s(f,h){var v=f.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=v)})}function l(f,h){if(!f.preventAutoZ){var v=$l(f);h.eachRendered(function(p){return G0(p,v.z,v.zlevel),!0})}}function u(f,h){h.eachRendered(function(v){if(!Dc(v)){var p=v.getTextContent(),g=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function c(f,h){var v=f.getModel("stateAnimation"),p=f.isAnimationEnabled(),g=v.get("duration"),m=g>0?{duration:g,delay:v.get("delay"),easing:v.get("easing")}:null;h.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Dc(y))return;if(y instanceof He&&Vq(y),y.__dirty){var x=y.prevStates;x&&y.useStates(x)}if(p){y.stateTransition=m;var S=y.getTextContent(),b=y.getTextGuideLine();S&&(S.stateTransition=m),b&&(b.stateTransition=m)}y.__dirty&&a(y)}})}RI=function(f){return new(function(h){$(v,h);function v(){return h!==null&&h.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return f._model.getComponent(g.mainType,g.index);p=p.parent}},v.prototype.enterEmphasis=function(p,g){ao(p,g),Fn(f)},v.prototype.leaveEmphasis=function(p,g){oo(p,g),Fn(f)},v.prototype.enterBlur=function(p){Q4(p),Fn(f)},v.prototype.leaveBlur=function(p){M2(p),Fn(f)},v.prototype.enterSelect=function(p){J4(p),Fn(f)},v.prototype.leaveSelect=function(p){eV(p),Fn(f)},v.prototype.getModel=function(){return f.getModel()},v.prototype.getViewOfComponentModel=function(p){return f.getViewOfComponentModel(p)},v.prototype.getViewOfSeriesModel=function(p){return f.getViewOfSeriesModel(p)},v.prototype.getMainProcessVersion=function(){return f[eg]},v}(QV))(f)},qF=function(f){function h(v,p){for(var g=0;g=0)){OI.push(r);var a=CF.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function mM(t,e){Hb[t]=e}function Eee(t){V3({createCanvas:t})}function nG(t,e,r){var n=BF("registerMap");n&&n(t,e,r)}function Ree(t){var e=BF("getMap");return e&&e(t)}var iG=HQ;Ts(uM,pJ);Ts(Y0,gJ);Ts(Y0,mJ);Ts(uM,DJ);Ts(Y0,kJ);Ts(HF,aee);dM(eF);pM(hee,bQ);mM("default",yJ);Oi({type:Pl,event:Pl,update:Pl},Nt);Oi({type:sm,event:sm,update:sm},Nt);Oi({type:ly,event:T2,update:ly,action:Nt,refineEvent:yM,publishNonRefinedEvent:!0});Oi({type:gb,event:T2,update:gb,action:Nt,refineEvent:yM,publishNonRefinedEvent:!0});Oi({type:uy,event:T2,update:uy,action:Nt,refineEvent:yM,publishNonRefinedEvent:!0});function yM(t,e,r,n){return{eventContent:{selected:Rq(r),isFromClick:e.isFromClick||!1}}}vM("default",{});vM("dark",PF);var Nee={},zI=[],Oee={registerPreprocessor:dM,registerProcessor:pM,registerPostInit:JF,registerPostUpdate:eG,registerUpdateLifecycle:X0,registerAction:Oi,registerCoordinateSystem:tG,registerLayout:rG,registerVisual:Ts,registerTransform:iG,registerLoading:mM,registerMap:nG,registerImpl:oee,PRIORITY:WF,ComponentModel:Be,ComponentView:gt,SeriesModel:ht,ChartView:lt,registerComponentModel:function(t){Be.registerClass(t)},registerComponentView:function(t){gt.registerClass(t)},registerSeriesModel:function(t){ht.registerClass(t)},registerChartView:function(t){lt.registerClass(t)},registerCustomSeries:function(t,e){FF(t,e)},registerSubTypeDefaulter:function(t,e){Be.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){x4(t,e)}};function Oe(t){if(ee(t)){N(t,function(e){Oe(e)});return}Ee(zI,t)>=0||(zI.push(t),me(t)&&(t={install:t}),t.install(Oee))}function sh(t){return t==null?0:t.length||1}function BI(t){return t}var so=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||BI,this._newKeyGetter=i||BI,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var v=0;v1)for(var s=0;s30}var lh=we,wo=re,jee=typeof Int32Array>"u"?Array:Int32Array,Hee="e\0\0",VI=-1,Wee=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Uee=["_approximateExtent"],FI,ig,uh,ch,g1,fh,m1,Zr=function(){function t(e,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;oG(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Nn;if(l&&!i.pure)for(var u=[],c=e;c0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),ee(a)?a=a.slice():lh(a)&&(a=J({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,lh(r)?J(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){lh(e)?J(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?J(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;pb(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){N(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:wo(this.dimensions,this._getDimInfo,this),this.hostModel)),g1(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(C0(arguments)))})},t.internalField=function(){FI=function(e){var r=e._invertedIndicesMap;N(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new jee(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),i[r]=l}}}(),t}();function Zee(t,e){return Tf(t,e).dimensions}function Tf(t,e){rM(t)||(t=nM(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=ve(),a=[],o=Yee(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&uG(o),l=n===t.dimensionsDefine,u=l?lG(t):sG(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,o));for(var f=ve(c),h=new fF(o),v=0;v0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function Yee(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return N(e,function(a){var o;we(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function Xee(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var qee=function(){function t(e){this.coordSysDims=[],this.axisMap=ve(),this.categoryAxisMap=ve(),this.coordSysName=e}return t}();function Kee(t){var e=t.get("coordinateSystem"),r=new qee(e),n=Qee[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var Qee={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",Dt).models[0],a=t.getReferringComponents("yAxis",Dt).models[0];e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),Bu(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),Bu(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",Dt).models[0];e.coordSysDims=["single"],r.set("single",i),Bu(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",Dt).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),Bu(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Bu(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();N(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),Bu(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(t,e,r,n){var i=t.getReferringComponents("matrix",Dt).models[0];e.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function Bu(t){return t.get("type")==="category"}function cG(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;Jee(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,c,f,h;if(N(a,function(x,S){se(x)&&(a[S]=x={name:x}),l&&!x.isExtraCoord&&(!n&&!u&&x.ordinalMeta&&(u=x),!c&&x.type!=="ordinal"&&x.type!=="time"&&(!i||i===x.coordDim)&&(c=x))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var v=c.coordDim,p=c.type,g=0;N(a,function(x){x.coordDim===v&&g++});var m={name:f,coordDim:v,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:h,coordDim:h,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(h,p),y.storeDimIndex=s.ensureCalculationDimension(f,p)),o.appendCalculationDimension(m),o.appendCalculationDimension(y)):(a.push(m),a.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function Jee(t){return!oG(t.schema)}function lo(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function _M(t,e){return lo(t,e)?t.getCalculationInfo("stackResultDimension"):e}function ete(t,e){var r=t.get("coordinateSystem"),n=xf.get(r),i;return e&&e.coordSysDims&&(i=re(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=Ty(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function tte(t,e,r){var n,i;return r&&N(t,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function Ta(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;t?(a=!0,i=nM(t)):(i=n.getSource(),a=i.sourceFormat===Nn);var o=Kee(e),s=ete(e,o),l=r.useEncodeDefaulter,u=me(l)?l:l?Ie(YV,s,e):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=Tf(i,c),h=tte(f.dimensions,r.createInvertedIndices,o),v=a?null:n.getSharedDataStore(f),p=cG(e,{schema:f,store:v}),g=new Zr(f,e);g.setCalculationInfo(p);var m=h!=null&&rte(i)?function(y,x,S,b){return b===h?S:this.defaultDimValueGetter(y,x,S,b)}:null;return g.hasItemOption=!1,g.initData(a?i:v,null,m),g}function rte(t){if(t.sourceFormat===Nn){var e=nte(t.data||[]);return!ee(cf(e))}}function nte(t){for(var e=0;ei&&(o=a.interval=i);var s=a.intervalPrecision=ed(o),l=a.niceTickExtent=[Ht(Math.ceil(t[0]/o)*o,s),Ht(Math.floor(t[1]/o)*o,s)];return ate(l,t),a}function y1(t){var e=Math.pow(10,k0(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ht(r*e)}function ed(t){return bi(t)+2}function GI(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function ate(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),GI(t,0,e),GI(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function xM(t,e){return t>=e[0]&&t<=e[1]}var ote=function(){function t(){this.normalize=jI,this.scale=HI}return t.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=le(e.normalize,e),this.scale=le(e.scale,e)):(this.normalize=jI,this.scale=HI)},t}();function jI(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function HI(t,e){return t*(e[1]-e[0])+e[0]}function Ub(t,e,r){var n=Math.log(t);return[Math.log(r?e[0]:Math.max(0,e[0]))/n,Math.log(r?e[1]:Math.max(0,e[1]))/n]}var Cs=function(){function t(e){this._calculator=new ote,this._setting=e||{},this._extent=[1/0,-1/0];var r=Xt();r&&(this._brkCtx=r.createScaleBreakContext(),this._brkCtx.update(this._extent))}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype._innerUnionExtent=function(e){var r=this._extent;this._innerSetExtent(e[0]r[1]?e[1]:r[1])},t.prototype.unionExtentFromData=function(e,r){this._innerUnionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){this._innerSetExtent(e,r)},t.prototype._innerSetExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},t.prototype.setBreaksFromOption=function(e){var r=Xt();r&&this._innerSetBreak(r.parseAxisBreakOption(e,le(this.parse,this)))},t.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},t.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},t.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();I0(Cs);var ste=0,td=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++ste,this._onCollect=e.onCollect}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&re(n,lte);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!se(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,this._onCollect&&this._onCollect(e,r),r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r),this._onCollect&&this._onCollect(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=ve(this.categories))},t}();function lte(t){return we(t)&&t.value!=null?t.value:t+""}var qc=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new td({})),ee(i)&&(i=new td({categories:re(i,function(a){return we(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:se(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return xM(r,this._extent)&&r>=0&&r=0&&r=0&&r=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Cs);Cs.registerClass(qc);var bo=Ht,uo=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},e.prototype.contain=function(r){return xM(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=ed(r)},e.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=Xt(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]=0&&(f=bo(f+h*n,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var v=l.length?l[l.length-1].value:a[1];return i[1]>v&&(r.expandToNicedExtent?l.push({value:bo(v+n,o)}):l.push({value:i[1]})),s&&s.pruneTicksByBreak(r.pruneByBreak,l,this._brkCtx.breaks,function(p){return p.value},this._interval,this._extent),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;oa[0]&&p0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function dG(t){var e=fte(t),r=[];return N(t,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var p=oe(n.get("barWidth"),s),g=oe(n.get("barMaxWidth"),s),m=oe(n.get("barMinWidth")||(_G(n)?.5:1),s),y=n.get("barGap"),x=n.get("barCategoryGap"),S=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:m,barGap:y,barCategoryGap:x,defaultBarGap:S,axisKey:SM(a),stackId:hG(n)})}),pG(r)}function pG(t){var e={};N(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);var v=n.barGap;v!=null&&(s.gap=v);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var r={};return N(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Ue(a).length;s=Math.max(35-l*4,15)+"%"}var u=oe(s,o),c=oe(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,v=(f-u)/(h+(h-1)*c);v=Math.max(v,0),N(a,function(y){var x=y.maxWidth,S=y.minWidth;if(y.width){var b=y.width;x&&(b=Math.min(b,x)),S&&(b=Math.max(b,S)),y.width=b,f-=b+c*b,h--}else{var b=v;x&&xb&&(b=S),b!==v&&(y.width=b,f-=b+c*b,h--)}}),v=(f-u)/(h+(h-1)*c),v=Math.max(v,0);var p=0,g;N(a,function(y,x){y.width||(y.width=v),g=y,p+=y.width*(1+c)}),g&&(p-=g.width*c);var m=-p/2;N(a,function(y,x){r[i][x]=r[i][x]||{bandWidth:o,offset:m,width:y.width},m+=y.width*(1+c)})}),r}function hte(t,e,r){if(t&&e){var n=t[SM(e)];return n}}function gG(t,e){var r=vG(t,e),n=dG(r);N(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=hG(i),u=n[SM(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function mG(t){return{seriesType:t,plan:Sf(),reset:function(e){if(yG(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=e.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),f=lo(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),v=vte(i,a),p=_G(e),g=e.get("barMinHeight")||0,m=c&&r.getDimensionIndex(c),y=r.getLayout("size"),x=r.getLayout("offset");return{progress:function(S,b){for(var T=S.count,C=p&&sa(T*3),M=p&&l&&sa(T*3),D=p&&sa(T),I=n.master.getRect(),k=h?I.width:I.height,E,z=b.getStore(),O=0;(E=S.next())!=null;){var F=z.get(f?m:o,E),j=z.get(s,E),G=v,Z=void 0;f&&(Z=+F-z.get(o,E));var V=void 0,W=void 0,H=void 0,Y=void 0;if(h){var K=n.dataToPoint([F,j]);if(f){var ne=n.dataToPoint([Z,j]);G=ne[0]}V=G,W=K[1]+x,H=K[0]-G,Y=y,Math.abs(H)0?r:1:r))}var dte=function(t,e,r,n){for(;r>>1;t[i][1]i&&(this._approxInterval=i);var o=ag.length,s=Math.min(dte(ag,this._approxInterval,0,o),o-1);this._interval=ag[s][1],this._intervalPrecision=ed(this._interval),this._minLevelUnit=ag[Math.max(s-1,0)][0]},e.prototype.parse=function(r){return Xe(r)?r:+wa(r)},e.prototype.contain=function(r){return xM(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.type="time",e}(uo),ag=[["second",F2],["minute",G2],["hour",fv],["quarter-day",fv*6],["half-day",fv*12],["day",Qn*1.2],["half-week",Qn*3.5],["week",Qn*7],["month",Qn*31],["quarter",Qn*95],["half-year",Ek/2],["year",Ek]];function xG(t,e,r,n){return vy(new Date(e),t,n).getTime()===vy(new Date(r),t,n).getTime()}function pte(t,e){return t/=Qn,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function gte(t){var e=30*Qn;return t/=e,t>6?6:t>3?3:t>2?2:1}function mte(t){return t/=fv,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function WI(t,e){return t/=e?G2:F2,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function yte(t){return p2(t,!0)}function _te(t,e,r){var n=Math.max(0,Ee(Sn,e)-1);return vy(new Date(t),Sn[n],r).getTime()}function xte(t,e){var r=new Date(0);r[t](1);var n=r.getTime();r[t](1+e);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function Ste(t,e,r,n,i,a){var o=1e4,s=EK,l=0;function u(O,F,j,G,Z,V,W){for(var H=xte(Z,O),Y=F,K=new Date(Y);Yo));)if(K[Z](K[G]()+O),Y=K.getTime(),a){var ne=a.calcNiceTickMultiple(Y,H);ne>0&&(K[Z](K[G]()+ne*O),Y=K.getTime())}W.push({value:Y,notAdd:!0})}function c(O,F,j){var G=[],Z=!F.length;if(!xG(hv(O),n[0],n[1],r)){Z&&(F=[{value:_te(n[0],O,r)},{value:n[1]}]);for(var V=0;V=n[0]&&W<=n[1]&&u(Y,W,H,K,ne,ie,G),O==="year"&&j.length>1&&V===0&&j.unshift({value:j[0].value-Y})}}for(var V=0;V=n[0]&&b<=n[1]&&v++)}var T=i/e;if(v>T*1.5&&p>T/1.5||(f.push(x),v>T||t===s[g]))break}h=[]}}}for(var C=Je(re(f,function(O){return Je(O,function(F){return F.value>=n[0]&&F.value<=n[1]&&!F.notAdd})}),function(O){return O.length>0}),M=[],D=C.length-1,g=0;g0;)a*=10;var s=[$b(bte(n[0]/a)*a),$b(wte(n[1]/a)*a)];this._interval=a,this._intervalPrecision=ed(a),this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){t.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.contain=function(r){return r=sg(r)/sg(this.base),t.prototype.contain.call(this,r)},e.prototype.normalize=function(r){return r=sg(r)/sg(this.base),t.prototype.normalize.call(this,r)},e.prototype.scale=function(r){return r=t.prototype.scale.call(this,r),og(this.base,r)},e.prototype.setBreaksFromOption=function(r){var n=Xt();if(n){var i=n.logarithmicParseBreaksFromOption(r,this.base,le(this.parse,this)),a=i.parsedOriginal,o=i.parsedLogged;this._originalScale._innerSetBreak(a),this._innerSetBreak(o)}},e.type="log",e}(uo);function lg(t,e){return $b(t,bi(e))}Cs.registerClass(SG);var Tte=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,v=this._determinedMax;return h!=null&&(s=h,u=!0),v!=null&&(l=v,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},t.prototype.modifyDataMinMax=function(e,r){this[Mte[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=Cte[e];this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),Cte={min:"_determinedMin",max:"_determinedMax"},Mte={min:"_dataMin",max:"_dataMax"};function wG(t,e,r){var n=t.rawExtentInfo;return n||(n=new Tte(t,e,r),t.rawExtentInfo=n,n)}function ug(t,e){return e==null?null:Dr(e)?NaN:t.parse(e)}function bG(t,e){var r=t.type,n=wG(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=vG("bar",o),l=!1;if(N(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=dG(s),c=Lte(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function Lte(t,e,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=hte(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;N(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;N(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-t,f=1-(s+l)/a,h=c/f-c;return e+=h*(l/u),t-=h*(s/u),{min:t,max:e}}function Xl(t,e){var r=e,n=bG(t,r),i=n.extent,a=r.get("splitNumber");t instanceof SG&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setBreaksFromOption(CG(r)),t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function Od(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new qc({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new wM({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Cs.getClass(e)||uo)}}function Ate(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function Cf(t){var e=t.getLabelModel().get("formatter");if(t.type==="time"){var r=RK(e);return function(i,a){return t.scale.getFormattedLabel(i,a,r)}}else{if(se(e))return function(i){var a=t.scale.getLabel(i),o=e.replace("{value}",a??"");return o};if(me(e)){if(t.type==="category")return function(i,a){return e(Cy(t,i),i.value-t.scale.getExtent()[0],null)};var n=Xt();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),e(Cy(t,i),a,o)}}else return function(i){return t.scale.getLabel(i)}}}function Cy(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function bM(t){var e=t.get("interval");return e??"auto"}function TG(t){return t.type==="category"&&bM(t.getLabelModel())===0}function My(t,e){var r={};return N(t.mapDimensionsAll(e),function(n){r[_M(t,n)]=!0}),Ue(r)}function Pte(t,e,r){e&&N(My(e,r),function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])})}function Kc(t){return t==="middle"||t==="center"}function rd(t){return t.getShallow("show")}function CG(t){var e=t.get("breaks",!0);if(e!=null)return!Xt()||!Dte(t.axis)?void 0:e}function Dte(t){return(t.dim==="x"||t.dim==="y"||t.dim==="z"||t.dim==="single")&&t.type!=="category"}var Mf=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}();function kte(t){return Ta(null,t)}var Ite={isDimensionStacked:lo,enableDataStack:cG,getStackedDimension:_M};function Ete(t,e){var r=e;e instanceof je||(r=new je(e));var n=Od(r);return n.setExtent(t[0],t[1]),Xl(n,r),n}function Rte(t){Bt(t,Mf)}function Nte(t,e){return e=e||{},dt(t,null,null,e.state!=="normal")}const Ote=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:Zee,createList:kte,createScale:Ete,createSymbol:Ut,createTextStyle:Nte,dataStack:Ite,enableHoverEmphasis:ns,getECData:Ae,getLayoutRect:St,mixinAxisModelCommonMethods:Rte},Symbol.toStringTag,{value:"Module"}));var zte=1e-8;function UI(t,e){return Math.abs(t-e)i&&(n=o,i=l)}if(n)return Vte(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return N(o,function(s){s.type==="polygon"?ZI(s.exterior,i,a,r):N(s.points,function(l){ZI(l,i,a,r)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},e.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;e:for(var a=0,o=i.length;a>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function Yb(t,e){return t=Gte(t),re(Je(t.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,i=r.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new $I(o[0],o.slice(1)));break;case"MultiPolygon":N(i.coordinates,function(l){l[0]&&a.push(new $I(l[0],l.slice(1)))});break;case"LineString":a.push(new YI([i.coordinates]));break;case"MultiLineString":a.push(new YI(i.coordinates))}var s=new LG(n[e||"name"],a,n.cp);return s.properties=n,s})}const jte=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:lb,asc:Ln,getPercentWithPrecision:sX,getPixelPrecision:v2,getPrecision:bi,getPrecisionSafe:T4,isNumeric:g2,isRadianAroundZero:Wc,linearMap:rt,nice:p2,numericToNumber:ma,parseDate:wa,parsePercent:oe,quantile:om,quantity:M4,quantityExponent:k0,reformIntervals:ub,remRadian:d2,round:Ht},Symbol.toStringTag,{value:"Module"})),Hte=Object.freeze(Object.defineProperty({__proto__:null,format:Ed,parse:wa,roundTime:vy},Symbol.toStringTag,{value:"Module"})),Wte=Object.freeze(Object.defineProperty({__proto__:null,Arc:Dd,BezierCurve:df,BoundingRect:Ce,Circle:ba,CompoundPath:kd,Ellipse:Pd,Group:_e,Image:dr,IncrementalDisplayable:hV,Line:Wt,LinearGradient:iu,Polygon:Nr,Polyline:br,RadialGradient:P2,Rect:ze,Ring:vf,Sector:Rr,Text:Ye,clipPointsByRect:E2,clipRectByRect:mV,createIcon:gf,extendPath:pV,extendShape:dV,getShapeClass:$v,getTransform:is,initProps:xt,makeImage:k2,makePath:Zc,mergePath:Tn,registerShape:ci,resizePath:I2,updateProps:Ke},Symbol.toStringTag,{value:"Module"})),Ute=Object.freeze(Object.defineProperty({__proto__:null,addCommas:Y2,capitalFirst:HK,encodeHTML:Wr,formatTime:jK,formatTpl:q2,getTextRect:FK,getTooltipMarker:RV,normalizeCssArray:_f,toCamelCase:X2,truncateText:FX},Symbol.toStringTag,{value:"Module"})),Zte=Object.freeze(Object.defineProperty({__proto__:null,bind:le,clone:ye,curry:Ie,defaults:Se,each:N,extend:J,filter:Je,indexOf:Ee,inherits:a2,isArray:ee,isFunction:me,isObject:we,isString:se,map:re,merge:Re,reduce:ai},Symbol.toStringTag,{value:"Module"}));var $te=Ve(),dv=Ve(),Ri={estimate:1,determine:2};function Ly(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function PG(t,e){var r=re(e,function(n){return t.scale.parse(n)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function Yte(t,e){var r=t.getLabelModel().get("customValues");if(r){var n=Cf(t),i=t.scale.getExtent(),a=PG(t,r),o=Je(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:re(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:t.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return t.type==="category"?qte(t,e):Qte(t)}function Xte(t,e,r){var n=t.getTickModel().get("customValues");if(n){var i=t.scale.getExtent(),a=PG(t,n);return{ticks:Je(a,function(o){return o>=i[0]&&o<=i[1]})}}return t.type==="category"?Kte(t,e):{ticks:re(t.scale.getTicks(r),function(o){return o.value})}}function qte(t,e){var r=t.getLabelModel(),n=DG(t,r,e);return!r.get("show")||t.scale.isBlank()?{labels:[]}:n}function DG(t,e,r){var n=ere(t),i=bM(e),a=r.kind===Ri.estimate;if(!a){var o=IG(n,i);if(o)return o}var s,l;me(i)?s=NG(t,i):(l=i==="auto"?tre(t,r):i,s=RG(t,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return Xb(n,i,u),!0}):Xb(n,i,u),u}function Kte(t,e){var r=Jte(t),n=bM(e),i=IG(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),me(n))a=NG(t,n,!0);else if(n==="auto"){var s=DG(t,t.getLabelModel(),Ly(Ri.determine));o=s.labelCategoryInterval,a=re(s.labels,function(l){return l.tickValue})}else o=n,a=RG(t,o,!0);return Xb(r,n,{ticks:a,tickCategoryInterval:o})}function Qte(t){var e=t.scale.getTicks(),r=Cf(t);return{labels:re(e,function(n,i){return{formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var Jte=kG("axisTick"),ere=kG("axisLabel");function kG(t){return function(r){return dv(r)[t]||(dv(r)[t]={list:[]})}}function IG(t,e){for(var r=0;rc&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],h=t.dataToCoord(f+1)-t.dataToCoord(f),v=Math.abs(h*Math.cos(a)),p=Math.abs(h*Math.sin(a)),g=0,m=0;f<=s[1];f+=u){var y=0,x=0,S=P0(i({value:f}),n.font,"center","top");y=S.width*1.3,x=S.height*1.3,g=Math.max(g,y,7),m=Math.max(m,x,7)}var b=g/v,T=m/p;isNaN(b)&&(b=1/0),isNaN(T)&&(T=1/0);var C=Math.max(0,Math.floor(Math.min(b,T)));if(r===Ri.estimate)return e.out.noPxChangeTryDetermine.push(le(nre,null,t,C,l)),C;var M=EG(t,C,l);return M??C}function nre(t,e,r){return EG(t,e,r)==null}function EG(t,e,r){var n=$te(t.model),i=t.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-e)<=1&&Math.abs(o-r)<=1&&a>e&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=e,n.axisExtent0=i[0],n.axisExtent1=i[1]}function ire(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function RG(t,e,r){var n=Cf(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=TG(t),h=o.get("showMinLabel")||f,v=o.get("showMaxLabel")||f;h&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);v&&p-l!==a[1]&&g(a[1]);function g(m){var y={value:m};s.push(r?m:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:m,time:void 0,break:void 0})}return s}function NG(t,e,r){var n=t.scale,i=Cf(t),a=[];return N(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var XI=[0,1],fi=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return v2(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(i.parse(e)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),qI(n,i.count())),rt(e,XI,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),qI(n,i.count()));var a=rt(e,n,XI,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=Xte(this,r,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),i=n.ticks,a=re(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return are(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=re(n,function(a){return re(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(e){return e=e||Ly(Ri.determine),Yte(this,e).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(e){return e=e||Ly(Ri.determine),rre(this,e)},t}();function qI(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function are(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],e[0].onBand=!0,o=e[1]={coord:a[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;N(e,function(v){v.coord-=u/2,v.onBand=!0});var c=t.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var f=a[0]>a[1];h(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&h(a[0],e[0].coord)&&e.unshift({coord:a[0],onBand:!0}),h(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&h(o.coord,a[1])&&e.push({coord:a[1],onBand:!0});function h(v,p){return v=Ht(v),p=Ht(p),f?v>p:vi&&(i+=hh);var v=Math.atan2(s,o);if(v<0&&(v+=hh),v>=n&&v<=i||v+hh>=n&&v+hh<=i)return l[0]=c,l[1]=f,u-r;var p=r*Math.cos(n)+t,g=r*Math.sin(n)+e,m=r*Math.cos(i)+t,y=r*Math.sin(i)+e,x=(p-o)*(p-o)+(g-s)*(g-s),S=(m-o)*(m-o)+(y-s)*(y-s);return x0){e=e/180*Math.PI,Ti.fromArray(t[0]),yt.fromArray(t[1]),Gt.fromArray(t[2]),Te.sub(la,Ti,yt),Te.sub(ia,Gt,yt);var r=la.len(),n=ia.len();if(!(r<.001||n<.001)){la.scale(1/r),ia.scale(1/n);var i=la.dot(ia),a=Math.cos(e);if(a1&&Te.copy(Jr,Gt),Jr.toArray(t[1])}}}}function pre(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,Ti.fromArray(t[0]),yt.fromArray(t[1]),Gt.fromArray(t[2]),Te.sub(la,yt,Ti),Te.sub(ia,Gt,yt);var n=la.len(),i=ia.len();if(!(n<.001||i<.001)){la.scale(1/n),ia.scale(1/i);var a=la.dot(e),o=Math.cos(r);if(a=l)Te.copy(Jr,Gt);else{Jr.scaleAndAdd(ia,s/Math.tan(Math.PI/2-c));var f=Gt.x!==yt.x?(Jr.x-yt.x)/(Gt.x-yt.x):(Jr.y-yt.y)/(Gt.y-yt.y);if(isNaN(f))return;f<0?Te.copy(Jr,yt):f>1&&Te.copy(Jr,Gt)}Jr.toArray(t[1])}}}}function S1(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?t.useStyle(s):a.style=s}function gre(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=Ga(n[0],n[1]),a=Ga(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=iv([],n[1],n[0],o/i),l=iv([],n[1],n[2],o/a),u=iv([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c0){b(k*I,0,a);var E=k+M;E<0&&T(-E*I,1)}else T(-M*I,1)}}function b(M,D,I){M!==0&&(c=!0);for(var k=D;k0)for(var E=0;E0;E--){var j=I[E-1]*F;b(-j,E,a)}}}function C(M){var D=M<0?-1:1;M=Math.abs(M);for(var I=Math.ceil(M/(a-1)),k=0;k0?b(I,0,k+1):b(-I,a-k-1,a),M-=I,M<=0)return}return c}function _re(t){for(var e=0;e=0&&n.attr(a.oldLayoutSelect),Ee(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Ke(n,u,r,l)}else if(n.attr(u),!mf(n).valueAnimation){var f=pe(n.style.opacity,1);n.style.opacity=0,xt(n,{style:{opacity:f}},r,l)}if(a.oldLayout=u,n.states.select){var v=a.oldLayoutSelect={};cg(v,u,fg),cg(v,n.states.select,fg)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};cg(p,u,fg),cg(p,n.states.emphasis,fg)}bV(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=wre(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Ke(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,xt(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},t}(),T1=Ve();function Tre(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=T1(r).labelManager;i||(i=T1(r).labelManager=new bre),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=T1(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var C1=Math.sin,M1=Math.cos,jG=Math.PI,el=Math.PI*2,Cre=180/jG,HG=function(){function t(){}return t.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},t.prototype.moveTo=function(e,r){this._add("M",e,r)},t.prototype.lineTo=function(e,r){this._add("L",e,r)},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){this._add("C",e,r,n,i,a,o)},t.prototype.quadraticCurveTo=function(e,r,n,i){this._add("Q",e,r,n,i)},t.prototype.arc=function(e,r,n,i,a,o){this.ellipse(e,r,n,n,0,i,a,o)},t.prototype.ellipse=function(e,r,n,i,a,o,s,l){var u=s-o,c=!l,f=Math.abs(u),h=Go(f-el)||(c?u>=el:-u>=el),v=u>0?u%el:u%el+el,p=!1;h?p=!0:Go(f)?p=!1:p=v>=jG==!!c;var g=e+n*M1(o),m=r+i*C1(o);this._start&&this._add("M",g,m);var y=Math.round(a*Cre);if(h){var x=1/this._p,S=(c?1:-1)*(el-x);this._add("A",n,i,y,1,+c,e+n*M1(o+S),r+i*C1(o+S)),x>.01&&this._add("A",n,i,y,0,+c,g,m)}else{var b=e+n*M1(s),T=r+i*C1(s);this._add("A",n,i,y,+p,+c,b,T)}},t.prototype.rect=function(e,r,n,i){this._add("M",e,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(e,r,n,i,a,o,s,l,u){for(var c=[],f=this._p,h=1;h"}function Rre(t){return""}function LM(t,e){e=e||{};var r=e.newline?` +`];function Kt(t,e){return e.type=t,e}function Eb(t){return t.type==="section"}function gF(t){return Eb(t)?QQ:JQ}function mF(t){if(Eb(t)){var e=0,r=t.blocks.length,n=r>1||r>0&&!t.noHeader;return N(t.blocks,function(i){var a=mF(i);a>=e&&(e=a+ +(n&&(!a||Eb(i)&&!i.noHeader)))}),e}return 0}function QQ(t,e,r,n){var i=e.noHeader,a=eJ(mF(e)),o=[],s=e.blocks||[];Er(!s||ee(s)),s=s||[];var l=t.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(fe(u,l)){var c=new uF(u[l],null);s.sort(function(g,m){return c.evaluate(g.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}N(s,function(g,m){var y=e.valueFormatter,x=gF(g)(y?J(J({},t),{valueFormatter:y}):t,g,m>0?a.html:0,n);x!=null&&o.push(x)});var f=t.renderMode==="richText"?o.join(a.richText):Rb(n,o.join(""),i?r:a.html);if(i)return f;var h=Lb(e.header,"ordinal",t.useUTC),v=pF(n,t.renderMode).nameStyle,p=dF(n);return t.renderMode==="richText"?yF(t,h,v)+a.richText+f:Rb(n,'
'+Wr(h)+"
"+f,r)}function JQ(t,e,r,n){var i=t.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,c=e.valueFormatter||t.valueFormatter||function(b){return b=ee(b)?b:[b],re(b,function(T,C){return Lb(T,ee(v)?v[C]:v,u)})};if(!(a&&o)){var f=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||X.color.secondary,i),h=a?"":Lb(l,"ordinal",u),v=e.valueType,p=o?[]:c(e.value,e.dataIndex),g=!s||!a,m=!s&&a,y=pF(n,i),x=y.nameStyle,S=y.valueStyle;return i==="richText"?(s?"":f)+(a?"":yF(t,h,x))+(o?"":nJ(t,p,g,m,S)):Rb(n,(s?"":f)+(a?"":tJ(h,!s,x))+(o?"":rJ(p,g,m,S)),r)}}function oI(t,e,r,n,i,a){if(t){var o=gF(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function eJ(t){return{html:qQ[t],richText:KQ[t]}}function Rb(t,e,r){var n='
',i="margin: "+r+"px 0 0",a=dF(t);return'
'+e+n+"
"}function tJ(t,e,r){var n=e?"margin-left:2px":"";return''+Wr(t)+""}function rJ(t,e,r,n){var i=r?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return t=ee(t)?t:[t],''+re(t,function(o){return Wr(o)}).join("  ")+""}function yF(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function nJ(t,e,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(ee(e)?e.join(" "):e,a)}function _F(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return Yl(n)}function xF(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var s1=function(){function t(){this.richTextStyles={},this._nextStyleNameId=L4()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,n){var i=n==="richText"?this._generateStyleName():null,a=RV({color:r,type:e,renderMode:n,markerId:i});return se(a)?a:(this.richTextStyles[i]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(e,r){var n={};ee(r)?N(r,function(a){return J(n,a)}):J(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},t}();function SF(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),l=ee(s),u=_F(e,r),c,f,h,v;if(o>1||l&&!o){var p=iJ(s,e,r,a,u);c=p.inlineValues,f=p.inlineValueTypes,h=p.blocks,v=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);v=c=Yc(i,r,a[0]),f=g.type}else v=c=l?s[0]:s;var m=m2(e),y=m&&e.name||"",x=i.getName(r),S=n?y:x;return Kt("section",{header:y,noHeader:n||!m,sortParam:v,blocks:[Kt("nameValue",{markerType:"item",markerColor:u,name:S,noName:!Mn(S),value:c,valueType:f,dataIndex:r})].concat(h||[])})}function iJ(t,e,r,n,i){var a=e.getData(),o=ai(t,function(f,h,v){var p=a.getDimensionInfo(v);return f=f||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?N(n,function(f){c(Yc(a,r,f),f)}):N(t,c);function c(f,h){var v=a.getDimensionInfo(h);!v||v.otherDims.tooltip===!1||(o?u.push(Kt("nameValue",{markerType:"subItem",markerColor:i,name:v.displayName,value:f,valueType:v.type})):(s.push(f),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var wo=Ve();function Kp(t,e){return t.getName(e)||t.getId(e)}var vm="__universalTransitionEnabled",ht=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=vv({count:oJ,reset:sJ}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=wo(this).sourceManager=new vF(this);a.prepareSource();var o=this.getInitialData(r,i);lI(o,this),this.dataTask.context.data=o,wo(this).dataBeforeProcessed=o,sI(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=Xv(this),a=i?ou(r):{},o=this.subType;Be.hasClass(o)&&(o+="Series"),Re(r,n.getTheme().get(this.subType)),Re(r,this.getDefaultOption()),Gl(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&_a(r,a,i)},e.prototype.mergeOption=function(r,n){r=Re(this.option,r,!0),this.fillDataTextStyle(r.data);var i=Xv(this);i&&_a(this.option,r,i);var a=wo(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);lI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,wo(this).dataBeforeProcessed=o,sI(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!rn(r))for(var n=["show"],i=0;i=0&&h<0)&&(f=x,h=y,v=0),y===h&&(c[v++]=g))}),c.length=v,c},e.prototype.formatTooltip=function(r,n,i){return SF({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(We.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=eM.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Kp(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[vm])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){we(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(r,n)}},e.registerClass=function(r){return Be.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Be);Bt(ht,U0);Bt(ht,eM);z4(ht,Be);function sI(t){var e=t.name;m2(t)||(t.name=aJ(t)||e)}function aJ(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return N(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function oJ(t){return t.model.getRawData().count()}function sJ(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),lJ}function lJ(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function lI(t,e){N(jc(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,Ie(uJ,e))})}function uJ(t,e){var r=Nb(t);return r&&r.setOutputEnd((e||this).count()),e}function Nb(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}var mt=function(){function t(){this.group=new _e,this.uid=yf("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();_2(mt);I0(mt);function Sf(){var t=Ve();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var wF=Ve(),cJ=Sf(),lt=function(){function t(){this.group=new _e,this.uid=yf("viewChart"),this.renderTask=vv({plan:fJ,reset:hJ}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&cI(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&cI(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){bs(this.group,e)},t.markUpdateMethod=function(e,r){wF(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function uI(t,e,r){t&&Zv(t)&&(e==="emphasis"?oo:so)(t,r)}function cI(t,e,r){var n=Hl(t,e),i=e&&e.highlightKey!=null?Bq(e.highlightKey):null;n!=null?N(gt(n),function(a){uI(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){uI(a,r,i)})}_2(lt);I0(lt);function fJ(t){return cJ(t.model)}function hJ(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&wF(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,n,i),vJ[l]}var vJ={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},py="\0__throttleOriginMethod",fI="\0__throttleRate",hI="\0__throttleType";function $0(t,e,r){var n,i=0,a=0,o=null,s,l,u,c;e=e||0;function f(){a=new Date().getTime(),o=null,t.apply(l,u||[])}var h=function(){for(var v=[],p=0;p=0?f():o=setTimeout(f,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(v){c=v},h}function wf(t,e,r,n){var i=t[e];if(i){var a=i[py]||i,o=i[hI],s=i[fI];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=$0(a,r,n==="debounce"),i[py]=a,i[hI]=n,i[fI]=r}return i}}function Kv(t,e){var r=t[e];r&&r[py]&&(r.clear&&r.clear(),t[e]=r[py])}var vI=Ve(),dI={itemStyle:Wl(CV,!0),lineStyle:Wl(TV,!0)},dJ={lineStyle:"stroke",itemStyle:"fill"};function bF(t,e){var r=t.visualStyleMapper||dI[e];return r||(console.warn("Unknown style type '"+e+"'."),dI.itemStyle)}function TF(t,e){var r=t.visualDrawType||dJ[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var pJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=bF(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=TF(t,n),u=o[l],c=me(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||me(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||me(o.stroke)?h:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(v,p){var g=t.getDataParams(p),m=J({},o);m[l]=c(g),v.setItemVisual(p,"style",m)}}}},ah=new Ge,gJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=bF(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){ah.option=l[n];var u=i(ah),c=o.ensureUniqueItemVisual(s,"style");J(c,u),ah.option.decal&&(o.setItemVisual(s,"decal",ah.option.decal),ah.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},mJ={performRawSeries:!0,overallReset:function(t){var e=ve();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),vI(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=vI(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=TF(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var h=a.ensureUniqueItemVisual(c,"style"),v=n.getName(u)||u+"",p=n.count();h[l]=r.getColorFromPalette(v,o,p)}})}})}},Qp=Math.PI;function yJ(t,e){e=e||{},Se(e,{text:"loading",textColor:X.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:X.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new _e,n=new ze({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new Xe({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new ze({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new Dd({shape:{startAngle:-Qp/2,endAngle:-Qp/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Qp*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Qp*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var CF=function(){function t(e,r,n,i){this._stageTaskMap=ve(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=ve();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;N(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";Er(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;N(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var v,p=h.agentStubMap;p.each(function(m){s(i,m)&&(m.dirty(),v=!0)}),v&&h.dirty(),o.updatePayload(h,n);var g=o.getPerformArgs(h,i.block);p.each(function(m){m.perform(g)}),h.perform(g)&&(a=!0)}else f&&f.each(function(m,y){s(i,m)&&m.dirty();var x=o.getPerformArgs(m,i.block);x.skip=!l.performRawSeries&&r.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(x)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=ve(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var h=f.uid,v=s.set(h,o&&o.get(h)||vv({plan:bJ,reset:TJ,count:MJ}));v.context={model:f,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(f,v)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||vv({reset:_J});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=ve(),u=e.seriesType,c=e.getTargetSeries,f=!0,h=!1,v="";Er(!e.createOnAllSeries,v),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(f=!1,N(n.getSeries(),p));function p(g){var m=g.uid,y=l.set(m,s&&s.get(m)||(h=!0,vv({reset:xJ,onDirty:wJ})));y.context={model:g,overallProgress:f},y.agent=o,y.__block=f,a._pipe(g,y)}h&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return me(e)&&(e={overallReset:e,seriesType:LJ(e)}),e.uid=yf("stageHandler"),r&&(e.visualType=r),e},t}();function _J(t){t.overallReset(t.ecModel,t.api,t.payload)}function xJ(t){return t.overallProgress&&SJ}function SJ(){this.agent.dirty(),this.getDownstream().dirty()}function wJ(){this.agent&&this.agent.dirty()}function bJ(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function TJ(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=gt(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?re(e,function(r,n){return MF(n)}):CJ}var CJ=MF(0);function MF(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a0&&v===u.length-h.length){var p=u.slice(0,v);p!=="data"&&(r.mainType=p,r[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,i,a));function c(f,h,v,p){return f[v]==null||h[p||v]===f[v]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Ob=["symbol","symbolSize","symbolRotate","symbolOffset"],gI=Ob.concat(["symbolKeepAspect"]),DJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&Tl(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function zb(t,e,r){for(var n=e.type==="radial"?UJ(t,e,r):WJ(t,e,r),i=e.colorStops,a=0;a0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:qe(t)?[t]:ee(t)?t:null}function sM(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&$J(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=re(r,function(a){return a/i}),n/=i)}return[r,n]}var YJ=new ya(!0);function yy(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function mI(t){return typeof t=="string"&&t!=="none"}function _y(t){var e=t.fill;return e!=null&&e!=="none"}function yI(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function _I(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function Bb(t,e,r){var n=x2(e.image,e.__image,r);if(E0(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*rv),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function XJ(t,e,r,n){var i,a=yy(r),o=_y(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||YJ,f=e.__dirty;if(!n){var h=r.fill,v=r.stroke,p=o&&!!h.colorStops,g=a&&!!v.colorStops,m=o&&!!h.image,y=a&&!!v.image,x=void 0,S=void 0,b=void 0,T=void 0,C=void 0;(p||g)&&(C=e.getBoundingRect()),p&&(x=f?zb(t,h,C):e.__canvasFillGradient,e.__canvasFillGradient=x),g&&(S=f?zb(t,v,C):e.__canvasStrokeGradient,e.__canvasStrokeGradient=S),m&&(b=f||!e.__canvasFillPattern?Bb(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=b),y&&(T=f||!e.__canvasStrokePattern?Bb(t,v,e):e.__canvasStrokePattern,e.__canvasStrokePattern=T),p?t.fillStyle=x:m&&(b?t.fillStyle=b:o=!1),g?t.strokeStyle=S:y&&(T?t.strokeStyle=T:a=!1)}var M=e.getGlobalScale();c.setScale(M[0],M[1],e.segmentIgnoreThreshold);var D,I;t.setLineDash&&r.lineDash&&(i=sM(e),D=i[0],I=i[1]);var k=!0;(u||f&Qu)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),k=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),k&&c.rebuildPath(t,l?s:1),D&&(t.setLineDash(D),t.lineDashOffset=I),n||(r.strokeFirst?(a&&_I(t,r),o&&yI(t,r)):(o&&yI(t,r),a&&_I(t,r))),D&&t.setLineDash([])}function qJ(t,e,r){var n=e.__image=x2(r.image,e.__image,e,e.onload);if(!(!n||!E0(n))){var i=r.x||0,a=r.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;t.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,f=o-u,h=s-c;t.drawImage(n,u,c,f,h,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function KJ(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||io,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=sM(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(yy(r)&&t.strokeText(i,r.x,r.y),_y(r)&&t.fillText(i,r.x,r.y)):(_y(r)&&t.fillText(i,r.x,r.y),yy(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var xI=["shadowBlur","shadowOffsetX","shadowOffsetY"],SI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function IF(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){hn(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?Pl.opacity:o}(n||e.blend!==r.blend)&&(a||(hn(t,i),a=!0),t.globalCompositeOperation=e.blend||Pl.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,i){if(!this[er]){if(this._disposed){this.id;return}var a,o,s;if(we(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[er]=!0,zu(this),!this._model||n){var l=new fQ(this._api),u=this._theme,c=this._model=new tM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},Gb);var f={seriesTransition:s,optionChanged:!0};if(i)this[mr]={silent:a,updateParams:f},this[er]=!1,this.getZr().wakeUp();else{try{Js(this),ka.update.call(this,null,f)}catch(h){throw this[mr]=null,this[er]=!1,h}this._ssr||this._zr.flush(),this[mr]=null,this[er]=!1,Nu.call(this,a),Ou.call(this,a)}}},e.prototype.setTheme=function(r,n){if(!this[er]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[mr]&&(a==null&&(a=this[mr].silent),o=this[mr].updateParams,this[mr]=null),this[er]=!0,zu(this);try{this._updateTheme(r),i.setTheme(this._theme),Js(this),ka.update.call(this,{type:"setTheme"},o)}catch(s){throw this[er]=!1,s}this[er]=!1,Nu.call(this,a),Ou.call(this,a)}}},e.prototype._updateTheme=function(r){se(r)&&(r=KF[r]),r&&(r=ye(r),r&&eF(r,!0),this._theme=r)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||We.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return N(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},e.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;N(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return N(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(by[i]){var l=s,u=s,c=-s,f=-s,h=[],v=r&&r.pixelRatio||this.getDevicePixelRatio();N(Il,function(S,b){if(S.group===i){var T=n?S.getZr().painter.getSvgDom().innerHTML:S.renderToCanvas(ye(r)),C=S.getDom().getBoundingClientRect();l=a(C.left,l),u=a(C.top,u),c=o(C.right,c),f=o(C.bottom,f),h.push({dom:T,left:C.left,top:C.top})}}),l*=v,u*=v,c*=v,f*=v;var p=c-l,g=f-u,m=yn.createCanvas(),y=ob(m,{renderer:n?"svg":"canvas"});if(y.resize({width:p,height:g}),n){var x="";return N(h,function(S){var b=S.left-l,T=S.top-u;x+=''+S.dom+""}),y.painter.getSvgRoot().innerHTML=x,r.connectedBackgroundColor&&y.painter.setBackgroundColor(r.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return r.connectedBackgroundColor&&y.add(new ze({shape:{x:0,y:0,width:p,height:g},style:{fill:r.connectedBackgroundColor}})),N(h,function(S){var b=new dr({style:{x:S.left*v-l,y:S.top*v-u,image:S.dom}});y.add(b)}),y.refreshImmediately(),m.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n,i){return rg(this,"convertToPixel",r,n,i)},e.prototype.convertToLayout=function(r,n,i){return rg(this,"convertToLayout",r,n,i)},e.prototype.convertFromPixel=function(r,n,i){return rg(this,"convertFromPixel",r,n,i)},e.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Pc(i,r);return N(o,function(s,l){l.indexOf("Models")>=0&&N(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=Pc(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?oM(s,l,n):Nd(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;N(bee,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&bl(l,function(g){var m=Ae(g);if(m&&m.dataIndex!=null){var y=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=y&&y.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=J({},m.eventData),!0},!0),u){var f=u.componentType,h=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=u.seriesIndex);var v=f&&h!=null&&s.getComponent(f,h),p=v&&r[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:v,view:p},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;N(Fb,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),IJ(n,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&R4(this.getDom(),fM,"");var n=this,i=n._api,a=n._model;N(n._componentsViews,function(o){o.dispose(a,i)}),N(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Il[n.id]},e.prototype.resize=function(r){if(!this[er]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[mr]&&(a==null&&(a=this[mr].silent),i=!0,this[mr]=null),this[er]=!0,zu(this);try{i&&Js(this),ka.update.call(this,{type:"resize",animation:J({duration:0},r&&r.animation)})}catch(o){throw this[er]=!1,o}this[er]=!1,Nu.call(this,a),Ou.call(this,a)}}},e.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(we(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!Hb[r]){var i=Hb[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=J({},r);return n.type=Vb[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(we(n)||(n={silent:!!n}),!!Sy[r.type]&&this._model){if(this[er]){this._pendingActions.push(r);return}var i=n.silent;v1.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&We.browser.weChat&&this._throttledZrFlush(),Nu.call(this,i),Ou.call(this,i)}},e.prototype.updateLabelLayout=function(){yi.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){Js=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),f1(f,!0),f1(f,!1),h.plan()},f1=function(f,h){for(var v=f._model,p=f._scheduler,g=h?f._componentsViews:f._chartsViews,m=h?f._componentsMap:f._chartsMap,y=f._zr,x=f._api,S=0;Sh.get("hoverLayerThreshold")&&!We.node&&!We.worker&&h.eachSeries(function(m){if(!m.preventUsingHoverLayer){var y=f._chartsMap[m.__viewId];y.__alive&&y.eachRendered(function(x){x.states.emphasis&&(x.states.emphasis.hoverLayer=!0)})}})}function s(f,h){var v=f.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=v)})}function l(f,h){if(!f.preventAutoZ){var v=$l(f);h.eachRendered(function(p){return j0(p,v.z,v.zlevel),!0})}}function u(f,h){h.eachRendered(function(v){if(!Dc(v)){var p=v.getTextContent(),g=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function c(f,h){var v=f.getModel("stateAnimation"),p=f.isAnimationEnabled(),g=v.get("duration"),m=g>0?{duration:g,delay:v.get("delay"),easing:v.get("easing")}:null;h.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Dc(y))return;if(y instanceof He&&Vq(y),y.__dirty){var x=y.prevStates;x&&y.useStates(x)}if(p){y.stateTransition=m;var S=y.getTextContent(),b=y.getTextGuideLine();S&&(S.stateTransition=m),b&&(b.stateTransition=m)}y.__dirty&&a(y)}})}RI=function(f){return new(function(h){$(v,h);function v(){return h!==null&&h.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return f._model.getComponent(g.mainType,g.index);p=p.parent}},v.prototype.enterEmphasis=function(p,g){oo(p,g),Fn(f)},v.prototype.leaveEmphasis=function(p,g){so(p,g),Fn(f)},v.prototype.enterBlur=function(p){Q4(p),Fn(f)},v.prototype.leaveBlur=function(p){M2(p),Fn(f)},v.prototype.enterSelect=function(p){J4(p),Fn(f)},v.prototype.leaveSelect=function(p){eV(p),Fn(f)},v.prototype.getModel=function(){return f.getModel()},v.prototype.getViewOfComponentModel=function(p){return f.getViewOfComponentModel(p)},v.prototype.getViewOfSeriesModel=function(p){return f.getViewOfSeriesModel(p)},v.prototype.getMainProcessVersion=function(){return f[eg]},v}(QV))(f)},qF=function(f){function h(v,p){for(var g=0;g=0)){OI.push(r);var a=CF.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function mM(t,e){Hb[t]=e}function Eee(t){V3({createCanvas:t})}function nj(t,e,r){var n=BF("registerMap");n&&n(t,e,r)}function Ree(t){var e=BF("getMap");return e&&e(t)}var ij=HQ;Cs(uM,pJ);Cs(Y0,gJ);Cs(Y0,mJ);Cs(uM,DJ);Cs(Y0,kJ);Cs(HF,aee);dM(eF);pM(hee,bQ);mM("default",yJ);Oi({type:Dl,event:Dl,update:Dl},Nt);Oi({type:sm,event:sm,update:sm},Nt);Oi({type:ly,event:T2,update:ly,action:Nt,refineEvent:yM,publishNonRefinedEvent:!0});Oi({type:gb,event:T2,update:gb,action:Nt,refineEvent:yM,publishNonRefinedEvent:!0});Oi({type:uy,event:T2,update:uy,action:Nt,refineEvent:yM,publishNonRefinedEvent:!0});function yM(t,e,r,n){return{eventContent:{selected:Rq(r),isFromClick:e.isFromClick||!1}}}vM("default",{});vM("dark",PF);var Nee={},zI=[],Oee={registerPreprocessor:dM,registerProcessor:pM,registerPostInit:JF,registerPostUpdate:ej,registerUpdateLifecycle:X0,registerAction:Oi,registerCoordinateSystem:tj,registerLayout:rj,registerVisual:Cs,registerTransform:ij,registerLoading:mM,registerMap:nj,registerImpl:oee,PRIORITY:WF,ComponentModel:Be,ComponentView:mt,SeriesModel:ht,ChartView:lt,registerComponentModel:function(t){Be.registerClass(t)},registerComponentView:function(t){mt.registerClass(t)},registerSeriesModel:function(t){ht.registerClass(t)},registerChartView:function(t){lt.registerClass(t)},registerCustomSeries:function(t,e){FF(t,e)},registerSubTypeDefaulter:function(t,e){Be.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){x4(t,e)}};function Oe(t){if(ee(t)){N(t,function(e){Oe(e)});return}Ee(zI,t)>=0||(zI.push(t),me(t)&&(t={install:t}),t.install(Oee))}function sh(t){return t==null?0:t.length||1}function BI(t){return t}var lo=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||BI,this._newKeyGetter=i||BI,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var v=0;v1)for(var s=0;s30}var lh=we,bo=re,Gee=typeof Int32Array>"u"?Array:Int32Array,Hee="e\0\0",VI=-1,Wee=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Uee=["_approximateExtent"],FI,ig,uh,ch,g1,fh,m1,Zr=function(){function t(e,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;oj(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Nn;if(l&&!i.pure)for(var u=[],c=e;c0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),ee(a)?a=a.slice():lh(a)&&(a=J({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,lh(r)?J(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){lh(e)?J(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?J(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;pb(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){N(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:bo(this.dimensions,this._getDimInfo,this),this.hostModel)),g1(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(C0(arguments)))})},t.internalField=function(){FI=function(e){var r=e._invertedIndicesMap;N(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new Gee(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),i[r]=l}}}(),t}();function Zee(t,e){return Tf(t,e).dimensions}function Tf(t,e){rM(t)||(t=nM(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=ve(),a=[],o=Yee(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&uj(o),l=n===t.dimensionsDefine,u=l?lj(t):sj(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,o));for(var f=ve(c),h=new fF(o),v=0;v0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function Yee(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return N(e,function(a){var o;we(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function Xee(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var qee=function(){function t(e){this.coordSysDims=[],this.axisMap=ve(),this.categoryAxisMap=ve(),this.coordSysName=e}return t}();function Kee(t){var e=t.get("coordinateSystem"),r=new qee(e),n=Qee[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var Qee={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",Dt).models[0],a=t.getReferringComponents("yAxis",Dt).models[0];e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),Bu(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),Bu(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",Dt).models[0];e.coordSysDims=["single"],r.set("single",i),Bu(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",Dt).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),Bu(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Bu(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();N(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),Bu(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(t,e,r,n){var i=t.getReferringComponents("matrix",Dt).models[0];e.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function Bu(t){return t.get("type")==="category"}function cj(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;Jee(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,c,f,h;if(N(a,function(x,S){se(x)&&(a[S]=x={name:x}),l&&!x.isExtraCoord&&(!n&&!u&&x.ordinalMeta&&(u=x),!c&&x.type!=="ordinal"&&x.type!=="time"&&(!i||i===x.coordDim)&&(c=x))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var v=c.coordDim,p=c.type,g=0;N(a,function(x){x.coordDim===v&&g++});var m={name:f,coordDim:v,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:h,coordDim:h,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(h,p),y.storeDimIndex=s.ensureCalculationDimension(f,p)),o.appendCalculationDimension(m),o.appendCalculationDimension(y)):(a.push(m),a.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function Jee(t){return!oj(t.schema)}function uo(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function _M(t,e){return uo(t,e)?t.getCalculationInfo("stackResultDimension"):e}function ete(t,e){var r=t.get("coordinateSystem"),n=xf.get(r),i;return e&&e.coordSysDims&&(i=re(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=Ty(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function tte(t,e,r){var n,i;return r&&N(t,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function Ta(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;t?(a=!0,i=nM(t)):(i=n.getSource(),a=i.sourceFormat===Nn);var o=Kee(e),s=ete(e,o),l=r.useEncodeDefaulter,u=me(l)?l:l?Ie(YV,s,e):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=Tf(i,c),h=tte(f.dimensions,r.createInvertedIndices,o),v=a?null:n.getSharedDataStore(f),p=cj(e,{schema:f,store:v}),g=new Zr(f,e);g.setCalculationInfo(p);var m=h!=null&&rte(i)?function(y,x,S,b){return b===h?S:this.defaultDimValueGetter(y,x,S,b)}:null;return g.hasItemOption=!1,g.initData(a?i:v,null,m),g}function rte(t){if(t.sourceFormat===Nn){var e=nte(t.data||[]);return!ee(cf(e))}}function nte(t){for(var e=0;ei&&(o=a.interval=i);var s=a.intervalPrecision=ed(o),l=a.niceTickExtent=[Ht(Math.ceil(t[0]/o)*o,s),Ht(Math.floor(t[1]/o)*o,s)];return ate(l,t),a}function y1(t){var e=Math.pow(10,k0(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ht(r*e)}function ed(t){return bi(t)+2}function jI(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function ate(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),jI(t,0,e),jI(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function xM(t,e){return t>=e[0]&&t<=e[1]}var ote=function(){function t(){this.normalize=GI,this.scale=HI}return t.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=le(e.normalize,e),this.scale=le(e.scale,e)):(this.normalize=GI,this.scale=HI)},t}();function GI(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function HI(t,e){return t*(e[1]-e[0])+e[0]}function Ub(t,e,r){var n=Math.log(t);return[Math.log(r?e[0]:Math.max(0,e[0]))/n,Math.log(r?e[1]:Math.max(0,e[1]))/n]}var Ms=function(){function t(e){this._calculator=new ote,this._setting=e||{},this._extent=[1/0,-1/0];var r=Xt();r&&(this._brkCtx=r.createScaleBreakContext(),this._brkCtx.update(this._extent))}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype._innerUnionExtent=function(e){var r=this._extent;this._innerSetExtent(e[0]r[1]?e[1]:r[1])},t.prototype.unionExtentFromData=function(e,r){this._innerUnionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){this._innerSetExtent(e,r)},t.prototype._innerSetExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},t.prototype.setBreaksFromOption=function(e){var r=Xt();r&&this._innerSetBreak(r.parseAxisBreakOption(e,le(this.parse,this)))},t.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},t.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},t.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();I0(Ms);var ste=0,td=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++ste,this._onCollect=e.onCollect}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&re(n,lte);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!se(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,this._onCollect&&this._onCollect(e,r),r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r),this._onCollect&&this._onCollect(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=ve(this.categories))},t}();function lte(t){return we(t)&&t.value!=null?t.value:t+""}var qc=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new td({})),ee(i)&&(i=new td({categories:re(i,function(a){return we(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:se(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return xM(r,this._extent)&&r>=0&&r=0&&r=0&&r=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Ms);Ms.registerClass(qc);var To=Ht,co=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},e.prototype.contain=function(r){return xM(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=ed(r)},e.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=Xt(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]=0&&(f=To(f+h*n,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var v=l.length?l[l.length-1].value:a[1];return i[1]>v&&(r.expandToNicedExtent?l.push({value:To(v+n,o)}):l.push({value:i[1]})),s&&s.pruneTicksByBreak(r.pruneByBreak,l,this._brkCtx.breaks,function(p){return p.value},this._interval,this._extent),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;oa[0]&&p0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function dj(t){var e=fte(t),r=[];return N(t,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var p=oe(n.get("barWidth"),s),g=oe(n.get("barMaxWidth"),s),m=oe(n.get("barMinWidth")||(_j(n)?.5:1),s),y=n.get("barGap"),x=n.get("barCategoryGap"),S=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:m,barGap:y,barCategoryGap:x,defaultBarGap:S,axisKey:SM(a),stackId:hj(n)})}),pj(r)}function pj(t){var e={};N(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);var v=n.barGap;v!=null&&(s.gap=v);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var r={};return N(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Ue(a).length;s=Math.max(35-l*4,15)+"%"}var u=oe(s,o),c=oe(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,v=(f-u)/(h+(h-1)*c);v=Math.max(v,0),N(a,function(y){var x=y.maxWidth,S=y.minWidth;if(y.width){var b=y.width;x&&(b=Math.min(b,x)),S&&(b=Math.max(b,S)),y.width=b,f-=b+c*b,h--}else{var b=v;x&&xb&&(b=S),b!==v&&(y.width=b,f-=b+c*b,h--)}}),v=(f-u)/(h+(h-1)*c),v=Math.max(v,0);var p=0,g;N(a,function(y,x){y.width||(y.width=v),g=y,p+=y.width*(1+c)}),g&&(p-=g.width*c);var m=-p/2;N(a,function(y,x){r[i][x]=r[i][x]||{bandWidth:o,offset:m,width:y.width},m+=y.width*(1+c)})}),r}function hte(t,e,r){if(t&&e){var n=t[SM(e)];return n}}function gj(t,e){var r=vj(t,e),n=dj(r);N(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=hj(i),u=n[SM(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function mj(t){return{seriesType:t,plan:Sf(),reset:function(e){if(yj(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=e.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),f=uo(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),v=vte(i,a),p=_j(e),g=e.get("barMinHeight")||0,m=c&&r.getDimensionIndex(c),y=r.getLayout("size"),x=r.getLayout("offset");return{progress:function(S,b){for(var T=S.count,C=p&&sa(T*3),M=p&&l&&sa(T*3),D=p&&sa(T),I=n.master.getRect(),k=h?I.width:I.height,E,z=b.getStore(),O=0;(E=S.next())!=null;){var F=z.get(f?m:o,E),G=z.get(s,E),j=v,Z=void 0;f&&(Z=+F-z.get(o,E));var V=void 0,W=void 0,H=void 0,Y=void 0;if(h){var K=n.dataToPoint([F,G]);if(f){var ne=n.dataToPoint([Z,G]);j=ne[0]}V=j,W=K[1]+x,H=K[0]-j,Y=y,Math.abs(H)0?r:1:r))}var dte=function(t,e,r,n){for(;r>>1;t[i][1]i&&(this._approxInterval=i);var o=ag.length,s=Math.min(dte(ag,this._approxInterval,0,o),o-1);this._interval=ag[s][1],this._intervalPrecision=ed(this._interval),this._minLevelUnit=ag[Math.max(s-1,0)][0]},e.prototype.parse=function(r){return qe(r)?r:+wa(r)},e.prototype.contain=function(r){return xM(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.type="time",e}(co),ag=[["second",F2],["minute",j2],["hour",fv],["quarter-day",fv*6],["half-day",fv*12],["day",Qn*1.2],["half-week",Qn*3.5],["week",Qn*7],["month",Qn*31],["quarter",Qn*95],["half-year",Ek/2],["year",Ek]];function xj(t,e,r,n){return vy(new Date(e),t,n).getTime()===vy(new Date(r),t,n).getTime()}function pte(t,e){return t/=Qn,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function gte(t){var e=30*Qn;return t/=e,t>6?6:t>3?3:t>2?2:1}function mte(t){return t/=fv,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function WI(t,e){return t/=e?j2:F2,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function yte(t){return p2(t,!0)}function _te(t,e,r){var n=Math.max(0,Ee(Sn,e)-1);return vy(new Date(t),Sn[n],r).getTime()}function xte(t,e){var r=new Date(0);r[t](1);var n=r.getTime();r[t](1+e);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function Ste(t,e,r,n,i,a){var o=1e4,s=EK,l=0;function u(O,F,G,j,Z,V,W){for(var H=xte(Z,O),Y=F,K=new Date(Y);Yo));)if(K[Z](K[j]()+O),Y=K.getTime(),a){var ne=a.calcNiceTickMultiple(Y,H);ne>0&&(K[Z](K[j]()+ne*O),Y=K.getTime())}W.push({value:Y,notAdd:!0})}function c(O,F,G){var j=[],Z=!F.length;if(!xj(hv(O),n[0],n[1],r)){Z&&(F=[{value:_te(n[0],O,r)},{value:n[1]}]);for(var V=0;V=n[0]&&W<=n[1]&&u(Y,W,H,K,ne,ie,j),O==="year"&&G.length>1&&V===0&&G.unshift({value:G[0].value-Y})}}for(var V=0;V=n[0]&&b<=n[1]&&v++)}var T=i/e;if(v>T*1.5&&p>T/1.5||(f.push(x),v>T||t===s[g]))break}h=[]}}}for(var C=tt(re(f,function(O){return tt(O,function(F){return F.value>=n[0]&&F.value<=n[1]&&!F.notAdd})}),function(O){return O.length>0}),M=[],D=C.length-1,g=0;g0;)a*=10;var s=[$b(bte(n[0]/a)*a),$b(wte(n[1]/a)*a)];this._interval=a,this._intervalPrecision=ed(a),this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){t.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.contain=function(r){return r=sg(r)/sg(this.base),t.prototype.contain.call(this,r)},e.prototype.normalize=function(r){return r=sg(r)/sg(this.base),t.prototype.normalize.call(this,r)},e.prototype.scale=function(r){return r=t.prototype.scale.call(this,r),og(this.base,r)},e.prototype.setBreaksFromOption=function(r){var n=Xt();if(n){var i=n.logarithmicParseBreaksFromOption(r,this.base,le(this.parse,this)),a=i.parsedOriginal,o=i.parsedLogged;this._originalScale._innerSetBreak(a),this._innerSetBreak(o)}},e.type="log",e}(co);function lg(t,e){return $b(t,bi(e))}Ms.registerClass(Sj);var Tte=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,v=this._determinedMax;return h!=null&&(s=h,u=!0),v!=null&&(l=v,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},t.prototype.modifyDataMinMax=function(e,r){this[Mte[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=Cte[e];this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),Cte={min:"_determinedMin",max:"_determinedMax"},Mte={min:"_dataMin",max:"_dataMax"};function wj(t,e,r){var n=t.rawExtentInfo;return n||(n=new Tte(t,e,r),t.rawExtentInfo=n,n)}function ug(t,e){return e==null?null:Dr(e)?NaN:t.parse(e)}function bj(t,e){var r=t.type,n=wj(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=vj("bar",o),l=!1;if(N(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=dj(s),c=Lte(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function Lte(t,e,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=hte(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;N(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;N(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-t,f=1-(s+l)/a,h=c/f-c;return e+=h*(l/u),t-=h*(s/u),{min:t,max:e}}function Xl(t,e){var r=e,n=bj(t,r),i=n.extent,a=r.get("splitNumber");t instanceof Sj&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setBreaksFromOption(Cj(r)),t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function Od(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new qc({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new wM({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Ms.getClass(e)||co)}}function Ate(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function Cf(t){var e=t.getLabelModel().get("formatter");if(t.type==="time"){var r=RK(e);return function(i,a){return t.scale.getFormattedLabel(i,a,r)}}else{if(se(e))return function(i){var a=t.scale.getLabel(i),o=e.replace("{value}",a??"");return o};if(me(e)){if(t.type==="category")return function(i,a){return e(Cy(t,i),i.value-t.scale.getExtent()[0],null)};var n=Xt();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),e(Cy(t,i),a,o)}}else return function(i){return t.scale.getLabel(i)}}}function Cy(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function bM(t){var e=t.get("interval");return e??"auto"}function Tj(t){return t.type==="category"&&bM(t.getLabelModel())===0}function My(t,e){var r={};return N(t.mapDimensionsAll(e),function(n){r[_M(t,n)]=!0}),Ue(r)}function Pte(t,e,r){e&&N(My(e,r),function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])})}function Kc(t){return t==="middle"||t==="center"}function rd(t){return t.getShallow("show")}function Cj(t){var e=t.get("breaks",!0);if(e!=null)return!Xt()||!Dte(t.axis)?void 0:e}function Dte(t){return(t.dim==="x"||t.dim==="y"||t.dim==="z"||t.dim==="single")&&t.type!=="category"}var Mf=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}();function kte(t){return Ta(null,t)}var Ite={isDimensionStacked:uo,enableDataStack:cj,getStackedDimension:_M};function Ete(t,e){var r=e;e instanceof Ge||(r=new Ge(e));var n=Od(r);return n.setExtent(t[0],t[1]),Xl(n,r),n}function Rte(t){Bt(t,Mf)}function Nte(t,e){return e=e||{},pt(t,null,null,e.state!=="normal")}const Ote=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:Zee,createList:kte,createScale:Ete,createSymbol:Ut,createTextStyle:Nte,dataStack:Ite,enableHoverEmphasis:is,getECData:Ae,getLayoutRect:wt,mixinAxisModelCommonMethods:Rte},Symbol.toStringTag,{value:"Module"}));var zte=1e-8;function UI(t,e){return Math.abs(t-e)i&&(n=o,i=l)}if(n)return Vte(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return N(o,function(s){s.type==="polygon"?ZI(s.exterior,i,a,r):N(s.points,function(l){ZI(l,i,a,r)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},e.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;e:for(var a=0,o=i.length;a>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function Yb(t,e){return t=jte(t),re(tt(t.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,i=r.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new $I(o[0],o.slice(1)));break;case"MultiPolygon":N(i.coordinates,function(l){l[0]&&a.push(new $I(l[0],l.slice(1)))});break;case"LineString":a.push(new YI([i.coordinates]));break;case"MultiLineString":a.push(new YI(i.coordinates))}var s=new Lj(n[e||"name"],a,n.cp);return s.properties=n,s})}const Gte=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:lb,asc:Ln,getPercentWithPrecision:sX,getPixelPrecision:v2,getPrecision:bi,getPrecisionSafe:T4,isNumeric:g2,isRadianAroundZero:Wc,linearMap:it,nice:p2,numericToNumber:ma,parseDate:wa,parsePercent:oe,quantile:om,quantity:M4,quantityExponent:k0,reformIntervals:ub,remRadian:d2,round:Ht},Symbol.toStringTag,{value:"Module"})),Hte=Object.freeze(Object.defineProperty({__proto__:null,format:Ed,parse:wa,roundTime:vy},Symbol.toStringTag,{value:"Module"})),Wte=Object.freeze(Object.defineProperty({__proto__:null,Arc:Dd,BezierCurve:df,BoundingRect:Ce,Circle:ba,CompoundPath:kd,Ellipse:Pd,Group:_e,Image:dr,IncrementalDisplayable:hV,Line:Wt,LinearGradient:iu,Polygon:Nr,Polyline:br,RadialGradient:P2,Rect:ze,Ring:vf,Sector:Rr,Text:Xe,clipPointsByRect:E2,clipRectByRect:mV,createIcon:gf,extendPath:pV,extendShape:dV,getShapeClass:$v,getTransform:as,initProps:St,makeImage:k2,makePath:Zc,mergePath:Tn,registerShape:ci,resizePath:I2,updateProps:Qe},Symbol.toStringTag,{value:"Module"})),Ute=Object.freeze(Object.defineProperty({__proto__:null,addCommas:Y2,capitalFirst:HK,encodeHTML:Wr,formatTime:GK,formatTpl:q2,getTextRect:FK,getTooltipMarker:RV,normalizeCssArray:_f,toCamelCase:X2,truncateText:FX},Symbol.toStringTag,{value:"Module"})),Zte=Object.freeze(Object.defineProperty({__proto__:null,bind:le,clone:ye,curry:Ie,defaults:Se,each:N,extend:J,filter:tt,indexOf:Ee,inherits:a2,isArray:ee,isFunction:me,isObject:we,isString:se,map:re,merge:Re,reduce:ai},Symbol.toStringTag,{value:"Module"}));var $te=Ve(),dv=Ve(),Ri={estimate:1,determine:2};function Ly(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function Pj(t,e){var r=re(e,function(n){return t.scale.parse(n)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function Yte(t,e){var r=t.getLabelModel().get("customValues");if(r){var n=Cf(t),i=t.scale.getExtent(),a=Pj(t,r),o=tt(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:re(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:t.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return t.type==="category"?qte(t,e):Qte(t)}function Xte(t,e,r){var n=t.getTickModel().get("customValues");if(n){var i=t.scale.getExtent(),a=Pj(t,n);return{ticks:tt(a,function(o){return o>=i[0]&&o<=i[1]})}}return t.type==="category"?Kte(t,e):{ticks:re(t.scale.getTicks(r),function(o){return o.value})}}function qte(t,e){var r=t.getLabelModel(),n=Dj(t,r,e);return!r.get("show")||t.scale.isBlank()?{labels:[]}:n}function Dj(t,e,r){var n=ere(t),i=bM(e),a=r.kind===Ri.estimate;if(!a){var o=Ij(n,i);if(o)return o}var s,l;me(i)?s=Nj(t,i):(l=i==="auto"?tre(t,r):i,s=Rj(t,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return Xb(n,i,u),!0}):Xb(n,i,u),u}function Kte(t,e){var r=Jte(t),n=bM(e),i=Ij(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),me(n))a=Nj(t,n,!0);else if(n==="auto"){var s=Dj(t,t.getLabelModel(),Ly(Ri.determine));o=s.labelCategoryInterval,a=re(s.labels,function(l){return l.tickValue})}else o=n,a=Rj(t,o,!0);return Xb(r,n,{ticks:a,tickCategoryInterval:o})}function Qte(t){var e=t.scale.getTicks(),r=Cf(t);return{labels:re(e,function(n,i){return{formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var Jte=kj("axisTick"),ere=kj("axisLabel");function kj(t){return function(r){return dv(r)[t]||(dv(r)[t]={list:[]})}}function Ij(t,e){for(var r=0;rc&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],h=t.dataToCoord(f+1)-t.dataToCoord(f),v=Math.abs(h*Math.cos(a)),p=Math.abs(h*Math.sin(a)),g=0,m=0;f<=s[1];f+=u){var y=0,x=0,S=P0(i({value:f}),n.font,"center","top");y=S.width*1.3,x=S.height*1.3,g=Math.max(g,y,7),m=Math.max(m,x,7)}var b=g/v,T=m/p;isNaN(b)&&(b=1/0),isNaN(T)&&(T=1/0);var C=Math.max(0,Math.floor(Math.min(b,T)));if(r===Ri.estimate)return e.out.noPxChangeTryDetermine.push(le(nre,null,t,C,l)),C;var M=Ej(t,C,l);return M??C}function nre(t,e,r){return Ej(t,e,r)==null}function Ej(t,e,r){var n=$te(t.model),i=t.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-e)<=1&&Math.abs(o-r)<=1&&a>e&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=e,n.axisExtent0=i[0],n.axisExtent1=i[1]}function ire(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function Rj(t,e,r){var n=Cf(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=Tj(t),h=o.get("showMinLabel")||f,v=o.get("showMaxLabel")||f;h&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);v&&p-l!==a[1]&&g(a[1]);function g(m){var y={value:m};s.push(r?m:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:m,time:void 0,break:void 0})}return s}function Nj(t,e,r){var n=t.scale,i=Cf(t),a=[];return N(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var XI=[0,1],fi=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return v2(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(i.parse(e)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),qI(n,i.count())),it(e,XI,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),qI(n,i.count()));var a=it(e,n,XI,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=Xte(this,r,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),i=n.ticks,a=re(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return are(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=re(n,function(a){return re(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(e){return e=e||Ly(Ri.determine),Yte(this,e).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(e){return e=e||Ly(Ri.determine),rre(this,e)},t}();function qI(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function are(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],e[0].onBand=!0,o=e[1]={coord:a[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;N(e,function(v){v.coord-=u/2,v.onBand=!0});var c=t.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var f=a[0]>a[1];h(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&h(a[0],e[0].coord)&&e.unshift({coord:a[0],onBand:!0}),h(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&h(o.coord,a[1])&&e.push({coord:a[1],onBand:!0});function h(v,p){return v=Ht(v),p=Ht(p),f?v>p:vi&&(i+=hh);var v=Math.atan2(s,o);if(v<0&&(v+=hh),v>=n&&v<=i||v+hh>=n&&v+hh<=i)return l[0]=c,l[1]=f,u-r;var p=r*Math.cos(n)+t,g=r*Math.sin(n)+e,m=r*Math.cos(i)+t,y=r*Math.sin(i)+e,x=(p-o)*(p-o)+(g-s)*(g-s),S=(m-o)*(m-o)+(y-s)*(y-s);return x0){e=e/180*Math.PI,Ti.fromArray(t[0]),_t.fromArray(t[1]),jt.fromArray(t[2]),Te.sub(la,Ti,_t),Te.sub(ia,jt,_t);var r=la.len(),n=ia.len();if(!(r<.001||n<.001)){la.scale(1/r),ia.scale(1/n);var i=la.dot(ia),a=Math.cos(e);if(a1&&Te.copy(Jr,jt),Jr.toArray(t[1])}}}}function pre(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,Ti.fromArray(t[0]),_t.fromArray(t[1]),jt.fromArray(t[2]),Te.sub(la,_t,Ti),Te.sub(ia,jt,_t);var n=la.len(),i=ia.len();if(!(n<.001||i<.001)){la.scale(1/n),ia.scale(1/i);var a=la.dot(e),o=Math.cos(r);if(a=l)Te.copy(Jr,jt);else{Jr.scaleAndAdd(ia,s/Math.tan(Math.PI/2-c));var f=jt.x!==_t.x?(Jr.x-_t.x)/(jt.x-_t.x):(Jr.y-_t.y)/(jt.y-_t.y);if(isNaN(f))return;f<0?Te.copy(Jr,_t):f>1&&Te.copy(Jr,jt)}Jr.toArray(t[1])}}}}function S1(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?t.useStyle(s):a.style=s}function gre(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=ja(n[0],n[1]),a=ja(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=iv([],n[1],n[0],o/i),l=iv([],n[1],n[2],o/a),u=iv([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c0){b(k*I,0,a);var E=k+M;E<0&&T(-E*I,1)}else T(-M*I,1)}}function b(M,D,I){M!==0&&(c=!0);for(var k=D;k0)for(var E=0;E0;E--){var G=I[E-1]*F;b(-G,E,a)}}}function C(M){var D=M<0?-1:1;M=Math.abs(M);for(var I=Math.ceil(M/(a-1)),k=0;k0?b(I,0,k+1):b(-I,a-k-1,a),M-=I,M<=0)return}return c}function _re(t){for(var e=0;e=0&&n.attr(a.oldLayoutSelect),Ee(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Qe(n,u,r,l)}else if(n.attr(u),!mf(n).valueAnimation){var f=pe(n.style.opacity,1);n.style.opacity=0,St(n,{style:{opacity:f}},r,l)}if(a.oldLayout=u,n.states.select){var v=a.oldLayoutSelect={};cg(v,u,fg),cg(v,n.states.select,fg)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};cg(p,u,fg),cg(p,n.states.emphasis,fg)}bV(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=wre(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Qe(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,St(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},t}(),T1=Ve();function Tre(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=T1(r).labelManager;i||(i=T1(r).labelManager=new bre),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=T1(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var C1=Math.sin,M1=Math.cos,Gj=Math.PI,tl=Math.PI*2,Cre=180/Gj,Hj=function(){function t(){}return t.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},t.prototype.moveTo=function(e,r){this._add("M",e,r)},t.prototype.lineTo=function(e,r){this._add("L",e,r)},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){this._add("C",e,r,n,i,a,o)},t.prototype.quadraticCurveTo=function(e,r,n,i){this._add("Q",e,r,n,i)},t.prototype.arc=function(e,r,n,i,a,o){this.ellipse(e,r,n,n,0,i,a,o)},t.prototype.ellipse=function(e,r,n,i,a,o,s,l){var u=s-o,c=!l,f=Math.abs(u),h=Go(f-tl)||(c?u>=tl:-u>=tl),v=u>0?u%tl:u%tl+tl,p=!1;h?p=!0:Go(f)?p=!1:p=v>=Gj==!!c;var g=e+n*M1(o),m=r+i*C1(o);this._start&&this._add("M",g,m);var y=Math.round(a*Cre);if(h){var x=1/this._p,S=(c?1:-1)*(tl-x);this._add("A",n,i,y,1,+c,e+n*M1(o+S),r+i*C1(o+S)),x>.01&&this._add("A",n,i,y,0,+c,g,m)}else{var b=e+n*M1(s),T=r+i*C1(s);this._add("A",n,i,y,+p,+c,b,T)}},t.prototype.rect=function(e,r,n,i){this._add("M",e,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(e,r,n,i,a,o,s,l,u){for(var c=[],f=this._p,h=1;h"}function Rre(t){return""}function LM(t,e){e=e||{};var r=e.newline?` `:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return Ere(o,s)+(o!=="style"?Wr(l):l||"")+(a?""+r+re(a,function(u){return n(u)}).join(r)+r:"")+Rre(o)}return n(t)}function Nre(t,e,r){r=r||{};var n=r.newline?` -`:"",i=" {"+n,a=n+"}",o=re(Ue(t),function(l){return l+i+re(Ue(t[l]),function(u){return u+":"+t[l][u]+";"}).join(n)+a}).join(n),s=re(Ue(e),function(l){return"@keyframes "+l+i+re(Ue(e[l]),function(u){return u+i+re(Ue(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":[""].join(n)}function eT(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function rE(t,e,r,n){return cr("svg","root",{width:t,height:e,xmlns:WG,"xmlns:xlink":UG,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var Ore=0;function $G(){return Ore++}var nE={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},al="transform-origin";function zre(t,e,r){var n=J({},t.shape);J(n,e),t.buildPath(r,n);var i=new HG;return i.reset(v4(t)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function Bre(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[al]=r+"px "+n+"px")}var Vre={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function YG(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function Fre(t,e,r){var n=t.shape.paths,i={},a,o;if(N(n,function(l){var u=eT(r.zrId);u.animation=!0,K0(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,h=Ue(c),v=h.length;if(v){o=h[v-1];var p=c[o];for(var g in p){var m=p[g];i[g]=i[g]||{d:""},i[g].d+=m.d||""}for(var y in f){var x=f[y].animation;x.indexOf(o)>=0&&(a=x)}}}),!!a){e.d=!1;var s=YG(i,r);return a.replace(o,s)}}function iE(t){return se(t)?nE[t]?"cubic-bezier("+nE[t]+")":u2(t)?t:"":""}function K0(t,e,r,n){var i=t.animators,a=i.length,o=[];if(t instanceof kd){var s=Fre(t,e,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var Fe=YG(M,r);return Fe+" "+x[0]+" both"}}for(var m in l){var s=g(l[m]);s&&o.push(s)}if(o.length){var y=r.zrId+"-cls-"+$G();r.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function Gre(t,e,r){if(!t.ignore)if(t.isSilent()){var n={"pointer-events":"none"};aE(n,e,r)}else{var i=t.states.emphasis&&t.states.emphasis.style?t.states.emphasis.style:{},a=i.fill;if(!a){var o=t.style&&t.style.fill,s=t.states.select&&t.states.select.style&&t.states.select.style.fill,l=t.currentStates.indexOf("select")>=0&&s||o;l&&(a=ty(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&t.transform?t.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),aE(n,e,r)}}function aE(t,e,r,n){var i=JSON.stringify(t),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+$G(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=t),e.class=e.class?e.class+" "+a:a}var nd=Math.round;function XG(t){return t&&se(t.src)}function qG(t){return t&&me(t.toDataURL)}function AM(t,e,r,n){Dre(function(i,a){var o=i==="fill"||i==="stroke";o&&h4(a)?QG(e,t,i,n):o&&f2(a)?JG(r,t,i,n):t[i]=a,o&&n.ssr&&a==="none"&&(t["pointer-events"]="visible")},e,r,!1),Yre(r,t,n)}function PM(t,e){var r=S4(e);r&&(r.each(function(n,i){n!=null&&(t[(tE+i).toLowerCase()]=n+"")}),e.isSilent()&&(t[tE+"silent"]="true"))}function oE(t){return Go(t[0]-1)&&Go(t[1])&&Go(t[2])&&Go(t[3]-1)}function jre(t){return Go(t[4])&&Go(t[5])}function DM(t,e,r){if(e&&!(jre(e)&&oE(e))){var n=1e4;t.transform=oE(e)?"translate("+nd(e[4]*n)/n+" "+nd(e[5]*n)/n+")":bY(e)}}function sE(t,e,r){for(var n=t.points,i=[],a=0;a"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";Er(h,m),Er(v,m)}else if(h==null||v==null){var y=function(k,E){if(k){var z=k.elm,O=h||E.width,F=v||E.height;k.tag==="pattern"&&(u?(F=1,O/=a.width):c&&(O=1,F/=a.height)),k.attrs.width=O,k.attrs.height=F,z&&(z.setAttribute("width",O),z.setAttribute("height",F))}},x=x2(p,null,t,function(k){l||y(C,k),y(f,k)});x&&x.width&&x.height&&(h=h||x.width,v=v||x.height)}f=cr("image","img",{href:p,width:h,height:v}),o.width=h,o.height=v}else i.svgElement&&(f=ye(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var S,b;l?S=b=1:u?(b=1,S=o.width/a.width):c?(S=1,b=o.height/a.height):o.patternUnits="userSpaceOnUse",S!=null&&!isNaN(S)&&(o.width=S),b!=null&&!isNaN(b)&&(o.height=b);var T=d4(i);T&&(o.patternTransform=T);var C=cr("pattern","",o,[f]),M=LM(C),D=n.patternCache,I=D[M];I||(I=n.zrId+"-p"+n.patternIdx++,D[M]=I,o.id=I,C=n.defs[I]=cr("pattern",I,o,[f])),e[r]=A0(I)}}function Xre(t,e,r){var n=r.clipPathCache,i=r.defs,a=n[t.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[t.id]=a,i[a]=cr("clipPath",a,o,[KG(t,r)])}e["clip-path"]=A0(a)}function cE(t){return document.createTextNode(t)}function hl(t,e,r){t.insertBefore(e,r)}function fE(t,e){t.removeChild(e)}function hE(t,e){t.appendChild(e)}function ej(t){return t.parentNode}function tj(t){return t.nextSibling}function L1(t,e){t.textContent=e}var vE=58,qre=120,Kre=cr("","");function tT(t){return t===void 0}function ea(t){return t!==void 0}function Qre(t,e,r){for(var n={},i=e;i<=r;++i){var a=t[i].key;a!==void 0&&(n[a]=i)}return n}function Fh(t,e){var r=t.key===e.key,n=t.tag===e.tag;return n&&r}function id(t){var e,r=t.children,n=t.tag;if(ea(n)){var i=t.elm=ZG(n);if(kM(Kre,t),ee(r))for(e=0;ea?(p=r[l+1]==null?null:r[l+1].elm,rj(t,p,r,i,l)):Iy(t,e,n,a))}function Ju(t,e){var r=e.elm=t.elm,n=t.children,i=e.children;t!==e&&(kM(t,e),tT(e.text)?ea(n)&&ea(i)?n!==i&&Jre(r,n,i):ea(i)?(ea(t.text)&&L1(r,""),rj(r,null,i,0,i.length-1)):ea(n)?Iy(r,n,0,n.length-1):ea(t.text)&&L1(r,""):t.text!==e.text&&(ea(n)&&Iy(r,n,0,n.length-1),L1(r,e.text)))}function ene(t,e){if(Fh(t,e))Ju(t,e);else{var r=t.elm,n=ej(r);id(e),n!==null&&(hl(n,e.elm,tj(r)),Iy(n,[t],0,0))}return e}var tne=0,rne=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=dE(),this.configLayer=dE(),this.storage=r,this._opts=n=J({},n),this.root=e,this._id="zr"+tne++,this._oldVNode=rE(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=ZG("svg");kM(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",ene(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return uE(e,eT(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=eT(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=nne(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=cr("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=re(Ue(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(cr("defs","defs",{},u)),e.animation){var c=Nre(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=cr("style","stl",{},[],c);o.push(f)}}return rE(n,i,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},LM(this.renderToVNode({animation:pe(e.cssAnimation,!0),emphasis:pe(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:pe(e.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(e,r,n){for(var i=e.length,a=[],o=0,s,l,u=0,c=0;c=0&&!(h&&l&&h[g]===l[g]);g--);for(var m=p-1;m>g;m--)o--,s=a[o-1];for(var y=g+1;y=s)}}for(var f=this.__startIndex;f15)break}}F.prevElClipPaths&&y.restore()};if(x)if(x.length===0)D=m.__endIndex;else for(var k=v.dpr,E=0;E0&&e>i[0]){for(l=0;le);l++);s=n[i[l]]}if(i.splice(l+1,0,e),n[e]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},t.prototype.eachLayer=function(e,r){for(var n=this._zlevelList,i=0;i0?hg:0),this._needsManuallyCompositing),c.__builtin__||b0("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),a=c),i.__dirty&bn&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(f,h){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,N(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var n=this._layerConfig;n[e]?Re(n[e],r,!0):n[e]=r;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill=X.color.neutral00,u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(ht);function Qc(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=Yc(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(e[a])}return n.join(" ")}var zd=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=Ut(r,-1,-1,2,2,null,s);l.attr({z2:pe(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=fne,this._symbolType=r,this.add(l)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){ao(this.childAt(0))},e.prototype.downplay=function(){oo(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=e.getSymbolSize(r,n),u=e.getSymbolZ2(r,n),c=o!==this._symbolType,f=a&&a.disableAnimation;if(c){var h=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,h)}else{var v=this.childAt(0);v.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};f?v.attr(p):Ke(v,p,s,n),li(v)}if(this._updateCommon(r,n,l,i,a),c){var v=this.childAt(0);if(!f){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,xt(v,p,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,f,h,v,p,g,m,y;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,h=a.focus,v=a.blurScope,g=a.labelStatesModels,m=a.hoverScale,y=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var x=a&&a.itemModel?a.itemModel:r.getItemModel(n),S=x.getModel("emphasis");u=S.getModel("itemStyle").getItemStyle(),f=x.getModel(["select","itemStyle"]).getItemStyle(),c=x.getModel(["blur","itemStyle"]).getItemStyle(),h=S.get("focus"),v=S.get("blurScope"),p=S.get("disabled"),g=ar(x),m=S.getShallow("scale"),y=x.getShallow("cursor")}var b=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(b||0)*Math.PI/180||0);var T=lu(r.getItemVisual(n,"symbolOffset"),i);T&&(s.x=T[0],s.y=T[1]),y&&s.attr("cursor",y);var C=r.getItemVisual(n,"style"),M=C.fill;if(s instanceof dr){var D=s.style;s.useStyle(J({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},C))}else s.__isEmptyBrush?s.useStyle(J({},C)):s.useStyle(C),s.style.decal=null,s.setColor(M,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var I=r.getItemVisual(n,"liftZ"),k=this._z2;I!=null?k==null&&(this._z2=s.z2,s.z2+=I):k!=null&&(s.z2=k,this._z2=null);var E=o&&o.useNameLabel;vr(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:z,inheritColor:M,defaultOpacity:C.opacity});function z(j){return E?r.getName(j):Qc(r,j)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var O=s.ensureState("emphasis");O.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var F=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;O.scaleX=this._sizeX*F,O.scaleY=this._sizeY*F,this.setSymbolScale(1),bt(this,h,v,p)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=Ae(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&hs(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();hs(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return bf(r.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},e}(_e);function fne(t,e){this.parent.drift(t,e)}function P1(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function mE(t){return t!=null&&!we(t)&&(t={isIgnore:t}),t||{}}function yE(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:ar(e),cursorStyle:e.get("cursor")}}var Bd=function(){function t(e){this.group=new _e,this._SymbolCtor=e||zd}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=mE(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=yE(e),u={disableAnimation:s},c=r.getSymbolPoint||function(f){return e.getItemLayout(f)};a||n.removeAll(),e.diff(a).add(function(f){var h=c(f);if(P1(e,h,f,r)){var v=new o(e,f,l,u);v.setPosition(h),e.setItemGraphicEl(f,v),n.add(v)}}).update(function(f,h){var v=a.getItemGraphicEl(h),p=c(f);if(!P1(e,p,f,r)){n.remove(v);return}var g=e.getItemVisual(f,"symbol")||"circle",m=v&&v.getSymbolType&&v.getSymbolType();if(!v||m&&m!==g)n.remove(v),v=new o(e,f,l,u),v.setPosition(p);else{v.updateData(e,f,l,u);var y={x:p[0],y:p[1]};s?v.attr(y):Ke(v,y,i)}n.add(v),e.setItemGraphicEl(f,v)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=c,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=yE(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=mE(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0?r=n[0]:n[1]<0&&(r=n[1]),r}function aj(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function vne(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function dne(t,e,r,n,i,a,o,s){for(var l=vne(t,e),u=[],c=[],f=[],h=[],v=[],p=[],g=[],m=ij(i,e,o),y=t.getLayout("points")||[],x=e.getLayout("points")||[],S=0;S=i||g<0)break;if(Il(y,x)){if(l){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](y,x),f=y,h=x;else{var S=y-u,b=x-c;if(S*S+b*b<.5){g+=a;continue}if(o>0){for(var T=g+a,C=e[T*2],M=e[T*2+1];C===y&&M===x&&m=n||Il(C,M))v=y,p=x;else{k=C-u,E=M-c;var F=y-u,j=C-y,G=x-c,Z=M-x,V=void 0,W=void 0;if(s==="x"){V=Math.abs(F),W=Math.abs(j);var H=k>0?1:-1;v=y-H*V*o,p=x,z=y+H*W*o,O=x}else if(s==="y"){V=Math.abs(G),W=Math.abs(Z);var Y=E>0?1:-1;v=y,p=x-Y*V*o,z=y,O=x+Y*W*o}else V=Math.sqrt(F*F+G*G),W=Math.sqrt(j*j+Z*Z),I=W/(W+V),v=y-k*o*(1-I),p=x-E*o*(1-I),z=y+k*o*I,O=x+E*o*I,z=To(z,Co(C,y)),O=To(O,Co(M,x)),z=Co(z,To(C,y)),O=Co(O,To(M,x)),k=z-y,E=O-x,v=y-k*V/W,p=x-E*V/W,v=To(v,Co(u,y)),p=To(p,Co(c,x)),v=Co(v,To(u,y)),p=Co(p,To(c,x)),k=y-v,E=x-p,z=y+k*W/V,O=x+E*W/V}t.bezierCurveTo(f,h,v,p,y,x),f=z,h=O}else t.lineTo(y,x)}u=y,c=x,g+=a}return m}var oj=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),pne=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:X.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new oj},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Il(i[o*2-2],i[o*2-1]);o--);for(;a=0){var b=u?(p-l)*S+l:(v-s)*S+s;return u?[r,b]:[b,r]}s=v,l=p;break;case o.C:v=a[f++],p=a[f++],g=a[f++],m=a[f++],y=a[f++],x=a[f++];var T=u?Jm(s,v,g,y,r,c):Jm(l,p,m,x,r,c);if(T>0)for(var C=0;C=0){var b=u?lr(l,p,m,x,M):lr(s,v,g,y,M);return u?[r,b]:[b,r]}}s=y,l=x;break}}},e}(He),gne=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(oj),sj=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new gne},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Il(i[s*2-2],i[s*2-1]);s--);for(;oe){a?r.push(o(a,l,e)):i&&r.push(o(i,l,0),o(i,l,e));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function _ne(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())&&e.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=e.getAxis(i),u=re(a.stops,function(S){return{coord:l.toGlobalCoord(l.dataToCoord(S.value)),color:S.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=yne(u,i==="x"?r.getWidth():r.getHeight()),v=h.length;if(!v&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var p=10,g=h[0].coord-p,m=h[v-1].coord+p,y=m-g;if(y<.001)return"transparent";N(h,function(S){S.offset=(S.coord-g)/y}),h.push({offset:v?h[v-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:v?h[0].offset:.5,color:f[0]||"transparent"});var x=new iu(0,0,0,0,h,!0);return x[i]=g,x[i+"2"]=m,x}}}function xne(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&Sne(a,e))){var o=e.mapDimension(a.dim),s={};return N(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function Sne(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function wne(t,e){return isNaN(t)||isNaN(e)}function bne(t){for(var e=t.length/2;e>0&&wne(t[e*2-2],t[e*2-1]);e--);return e-1}function bE(t,e){return[t[e*2],t[e*2+1]]}function Tne(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function cj(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var W=p.getState("emphasis").style;W.lineWidth=+p.style.lineWidth+1}Ae(p).seriesIndex=r.seriesIndex,bt(p,G,Z,V);var H=wE(r.get("smooth")),Y=r.get("smoothMonotone");if(p.setShape({smooth:H,smoothMonotone:Y,connectNulls:M}),g){var K=s.getCalculationInfo("stackedOnSeries"),ne=0;g.useStyle(Se(u.getAreaStyle(),{fill:z,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),K&&(ne=wE(K.get("smooth"))),g.setShape({smooth:H,stackedOnSmooth:ne,smoothMonotone:Y,connectNulls:M}),ir(g,r,"areaStyle"),Ae(g).seriesIndex=r.seriesIndex,bt(g,G,Z,V)}var ie=this._changePolyState;s.eachItemGraphicEl(function(ue){ue&&(ue.onHoverStateChange=ie)}),this._polyline.onHoverStateChange=ie,this._data=s,this._coordSys=a,this._stackedOnPoints=T,this._points=c,this._step=k,this._valueOrigin=S,r.get("triggerLineEvent")&&(this.packEventData(r,p),g&&this.packEventData(r,g))},e.prototype.packEventData=function(r,n){Ae(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Hl(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=r.get("zlevel")||0,v=r.get("z")||0;u=new zd(o,s),u.x=c,u.y=f,u.setZ(h,v);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=v,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else lt.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Hl(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else lt.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;cy(this._polyline,r),n&&cy(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new pne({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new sj({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");me(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=me(f)?f(null):f;r.eachItemGraphicEl(function(v,p){var g=v;if(g){var m=[v.x,v.y],y=void 0,x=void 0,S=void 0;if(i)if(o){var b=i,T=n.pointToCoord(m);a?(y=b.startAngle,x=b.endAngle,S=-T[1]/180*Math.PI):(y=b.r0,x=b.r,S=T[0])}else{var C=i;a?(y=C.x,x=C.x+C.width,S=v.x):(y=C.y+C.height,x=C.y,S=v.y)}var M=x===y?0:(S-y)/(x-y);l&&(M=1-M);var D=me(f)?f(p):c*M+h,I=g.getSymbolPath(),k=I.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:D}),k&&k.animateFrom({style:{opacity:0}},{duration:300,delay:D}),I.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(cj(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Ye({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=bne(l);c>=0&&(vr(s,ar(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(f,h,v){return v!=null?nj(o,v):Qc(o,f)},enableTextSetter:!0},Cne(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=i.getLayout("points"),h=i.hostModel,v=h.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,m=l.getBaseAxis(),y=m.isHorizontal(),x=m.inverse,S=n.shape,b=x?y?S.x:S.y+S.height:y?S.x+S.width:S.y,T=(y?g:0)*(x?-1:1),C=(y?0:-g)*(x?-1:1),M=y?"x":"y",D=Tne(f,b,M),I=D.range,k=I[1]-I[0],E=void 0;if(k>=1){if(k>1&&!v){var z=bE(f,I[0]);u.attr({x:z[0]+T,y:z[1]+C}),o&&(E=h.getRawValue(I[0]))}else{var z=c.getPointOn(b,M);z&&u.attr({x:z[0]+T,y:z[1]+C});var O=h.getRawValue(I[0]),F=h.getRawValue(I[1]);o&&(E=N4(i,p,O,F,D.t))}a.lastFrameIndex=I[0]}else{var j=r===1||a.lastFrameIndex>0?I[0]:0,z=bE(f,j);o&&(E=h.getRawValue(j)),u.attr({x:z[0]+T,y:z[1]+C})}if(o){var G=mf(u);typeof G.setLabelText=="function"&&G.setLabelText(E)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=r.hostModel,h=dne(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),v=h.current,p=h.stackedOnCurrent,g=h.next,m=h.stackedOnNext;if(o&&(p=Mo(h.stackedOnCurrent,h.current,i,o,l),v=Mo(h.current,null,i,o,l),m=Mo(h.stackedOnNext,h.next,i,o,l),g=Mo(h.next,null,i,o,l)),SE(v,g)>3e3||c&&SE(p,m)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:m}));return}u.shape.__points=h.current,u.shape.points=v;var y={shape:{points:g}};h.current!==v&&(y.shape.__points=h.next),u.stopAnimation(),Ke(u,y,f),c&&(c.setShape({points:v,stackedOnPoints:p}),c.stopAnimation(),Ke(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var x=[],S=h.status,b=0;be&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),v=Math.round(s/h);if(isFinite(v)&&v>1){a==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/v)):a==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/v));var p=void 0;se(a)?p=Lne[a]:me(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/v,p,Ane))}}}}}function Pne(t){t.registerChartView(Mne),t.registerSeriesModel(cne),t.registerLayout(Fd("line",!0)),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,fj("line"))}var ad=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return Ta(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)N(a.getAxes(),function(h,v){if(h.type==="category"&&n!=null){var p=h.getTicksCoords(),g=h.getTickModel().get("alignWithLabel"),m=o[v],y=n[v]==="x1"||n[v]==="y1";if(y&&!g&&(m+=1),p.length<2)return;if(p.length===2){s[v]=h.toGlobalCoord(h.getExtent()[y?1:0]);return}for(var x=void 0,S=void 0,b=1,T=0;Tm){S=(C+x)/2;break}T===1&&(b=M-p[0].tickValue)}S==null&&(x?x&&(S=p[p.length-1].coord):S=p[0].coord),s[v]=h.toGlobalCoord(S)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e}(ht);ht.registerClass(ad);var Dne=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return Ta(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=bs(ad.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:X.color.primary,borderWidth:2}},realtimeSort:!1}),e}(ad),kne=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),Ey=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new kne},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,h=n.clockwise,v=Math.PI*2,p=h?f-cMath.PI/2&&cs)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Xa(a,r,Ae(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(lt),TE={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=k1(e.x,t.x),s=I1(e.x+e.width,i),l=k1(e.y,t.y),u=I1(e.y+e.height,a),c=si?s:o,e.y=f&&l>a?u:l,e.width=c?0:s-o,e.height=f?0:u-l,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=I1(e.r,t.r),a=k1(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},CE={cartesian2d:function(t,e,r,n,i,a,o,s,l){var u=new ze({shape:J({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(t,e,r,n,i,a,o,s,l){var u=!i&&l?Ey:Rr,c=new u({shape:n,z2:1});c.name="item";var f=hj(i);if(c.calculateTextPosition=Ine(f,{isRoundCap:u===Ey}),a){var h=c.shape,v=i?"r":"endAngle",p={};h[v]=i?n.r0:n.startAngle,p[v]=n[v],(s?Ke:xt)(c,{shape:p},a)}return c}};function One(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function ME(t,e,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Ke:xt)(r,{shape:l},e,i,null);var c=e?t.baseAxis.model:null;(o?Ke:xt)(r,{shape:u},c,i)}function LE(t,e){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function Vne(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function hj(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function PE(t,e,r,n,i,a,o,s){var l=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=t.shape,f=ua(n.getModel("itemStyle"),c,!0);J(c,f),t.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var h=n.getShallow("cursor");h&&t.attr("cursor",h);var v=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=ar(n);vr(t,p,{labelFetcher:a,labelDataIndex:r,defaultText:Qc(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var g=t.getTextContent();if(s&&g){var m=n.get(["label","position"]);t.textConfig.inside=m==="middle"?!0:null,Ene(t,m==="outside"?v:m,hj(o),n.get(["label","rotate"]))}wV(g,p,a.getRawValue(r),function(x){return nj(e,x)});var y=n.getModel(["emphasis"]);bt(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),ir(t,n),Vne(i)&&(t.style.fill="none",t.style.stroke="none",N(t.states,function(x){x.style&&(x.style.fill=x.style.stroke="none")}))}function Fne(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var Gne=function(){function t(){}return t}(),DE=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new Gne},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?r:null},30,!1);function jne(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],l=[],u=t.barWidth,c=0,f=a.length/3;c=s[0]&&e<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function vj(t,e,r){if(vs(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function Hne(t,e,r){var n=t.type==="polar"?Rr:ze;return new n({shape:vj(e,r,t),silent:!0,z2:0})}function Wne(t){t.registerChartView(Nne),t.registerSeriesModel(Dne),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(gG,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,mG("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,fj("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var EE=Math.PI*2,gg=Math.PI/180;function Une(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=FV(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,h=-n.get("startAngle")*gg,v=n.get("endAngle"),p=n.get("padAngle")*gg;v=v==="auto"?h-EE:-v*gg;var g=n.get("minAngle")*gg,m=g+p,y=0;i.each(a,function(Z){!isNaN(Z)&&y++});var x=i.getSum(a),S=Math.PI/(x||y)*2,b=n.get("clockwise"),T=n.get("roseType"),C=n.get("stillShowZeroSum"),M=i.getDataExtent(a);M[0]=0;var D=b?1:-1,I=[h,v],k=D*p/2;O0(I,!b),h=I[0],v=I[1];var E=dj(n);E.startAngle=h,E.endAngle=v,E.clockwise=b,E.cx=s,E.cy=l,E.r=u,E.r0=c;var z=Math.abs(v-h),O=z,F=0,j=h;if(i.setLayout({viewRect:f,r:u}),i.each(a,function(Z,V){var W;if(isNaN(Z)){i.setItemLayout(V,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:b,cx:s,cy:l,r0:c,r:T?NaN:u});return}T!=="area"?W=x===0&&C?S:Z*S:W=z/y,WW?(Y=j+D*W/2,K=Y):(Y=j+k,K=H-k),i.setItemLayout(V,{angle:W,startAngle:Y,endAngle:K,clockwise:b,cx:s,cy:l,r0:c,r:T?rt(Z,M,[c,u]):u}),j=H}),Or?y:m,T=Math.abs(S.label.y-r);if(T>=b.maxY){var C=S.label.x-e-S.len2*i,M=n+S.len,D=Math.abs(C)t.unconstrainedWidth?null:h:null;n.setStyle("width",v)}gj(a,n)}}}function gj(t,e){NE.rect=t,FG(NE,e,Yne)}var Yne={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},NE={};function E1(t){return t.position==="center"}function Xne(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*Zne,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function v(C){C.ignore=!0}function p(C){if(!C.ignore)return!0;for(var M in C.states)if(C.states[M].ignore===!1)return!0;return!1}e.each(function(C){var M=e.getItemGraphicEl(C),D=M.shape,I=M.getTextContent(),k=M.getTextGuideLine(),E=e.getItemModel(C),z=E.getModel("label"),O=z.get("position")||E.get(["emphasis","label","position"]),F=z.get("distanceToLabelLine"),j=z.get("alignTo"),G=oe(z.get("edgeDistance"),u),Z=z.get("bleedMargin");Z==null&&(Z=Math.min(u,h)>200?10:2);var V=E.getModel("labelLine"),W=V.get("length");W=oe(W,u);var H=V.get("length2");if(H=oe(H,u),Math.abs(D.endAngle-D.startAngle)0?"right":"left":K>0?"left":"right"}var et=Math.PI,ut=0,kt=z.get("rotate");if(Xe(kt))ut=kt*(et/180);else if(O==="center")ut=0;else if(kt==="radial"||kt===!0){var pr=K<0?-Y+et:-Y;ut=pr}else if(kt==="tangential"&&O!=="outside"&&O!=="outer"){var zr=Math.atan2(K,ne);zr<0&&(zr=et*2+zr);var zi=ne>0;zi&&(zr=et+zr),ut=zr-et}if(a=!!ut,I.x=ie,I.y=ue,I.rotation=ut,I.setStyle({verticalAlign:"middle"}),xe){I.setStyle({align:Fe});var vu=I.states.select;vu&&(vu.x+=I.x,vu.y+=I.y)}else{var Bi=new Ce(0,0,0,0);gj(Bi,I),r.push({label:I,labelLine:k,position:O,len:W,len2:H,minTurnAngle:V.get("minTurnAngle"),maxSurfaceAngle:V.get("maxSurfaceAngle"),surfaceNormal:new Te(K,ne),linePoints:de,textAlign:Fe,labelDistance:F,labelAlignTo:j,edgeDistance:G,bleedMargin:Z,rect:Bi,unconstrainedWidth:Bi.width,labelStyleWidth:I.style.width})}M.setTextConfig({inside:xe})}}),!a&&t.get("avoidLabelOverlap")&&$ne(r,n,i,l,u,h,c,f);for(var g=0;g0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=a.r0}},e.type="pie",e}(lt);function Af(t,e,r){e=ee(e)&&{coordDimensions:e}||J({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=Tf(n,e).dimensions,a=new Zr(i,t);return a.initData(n,r),a}var Pf=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),Qne=Ve(),mj=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Pf(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Af(this,{coordDimensions:["value"],encodeDefaulter:Ie(Q2,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=Qne(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=C4(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){jl(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(ht);UK({fullType:mj.type,getCoord2:function(t){return t.getShallow("center")}});function Jne(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(Xe(o)&&!isNaN(o)&&o<0)})}}}function eie(t){t.registerChartView(Kne),t.registerSeriesModel(mj),kF("pie",t.registerAction),t.registerLayout(Ie(Une,"pie")),t.registerProcessor(Lf("pie")),t.registerProcessor(Jne("pie"))}var tie=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,n){return Ta(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:X.color.primary}},universalTransition:{divideShape:"clone"}},e}(ht),yj=4,rie=function(){function t(){}return t}(),nie=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new rie},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]=0;u--){var c=u*2,f=a[c]-s/2,h=a[c+1]-l/2;if(r>=f&&n>=h&&r<=f+s&&n<=h+l)return u}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,h=0;h=0&&(u.dataIndex=f+(e.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),aie=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},e.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=Fd("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},e.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new iie:new Bd,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(lt),_j={left:0,right:0,top:0,bottom:0},Ry=["25%","25%"],oie=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(r,n){var i=ou(r.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&_a(r.outerBounds,i)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&_a(this.option.outerBounds,r.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:_j,outerBoundsContain:"all",outerBoundsClampWidth:Ry[0],outerBoundsClampHeight:Ry[1],backgroundColor:X.color.transparent,borderWidth:1,borderColor:X.color.neutral30},e}(Be),nT=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Dt).models[0]},e.type="cartesian2dAxis",e}(Be);Bt(nT,Mf);var xj={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:X.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:X.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:X.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[X.color.backgroundTint,X.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:X.color.neutral00,borderColor:X.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},sie=Re({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},xj),IM=Re({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:X.color.axisMinorSplitLine,width:1}}},xj),lie=Re({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},IM),uie=Se({logBase:10},IM);const Sj={category:sie,value:IM,time:lie,log:uie};var cie={value:1,category:1,time:1,log:1},iT=null;function fie(t){iT||(iT=t)}function Gd(){return iT}function Jc(t,e,r,n){N(cie,function(i,a){var o=Re(Re({},Sj[a],!0),n,!0),s=function(l){$(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=Xv(this),v=h?ou(c):{},p=f.getTheme();Re(c,p.get(a+"Axis")),Re(c,this.getDefaultOption()),c.type=OE(c),h&&_a(c,v,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=td.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=Gd();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",OE)}function OE(t){return t.type||(t.data?"category":"value")}var hie=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return re(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Je(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),aT=["x","y"];function zE(t){return(t.type==="interval"||t.type==="time")&&!t.hasBreaks()}var vie=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=aT,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!zE(r)||!zE(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-i[0]*c,v=o[1]-a[0]*f,p=this._transform=[c,0,0,f,h,v];this._invTransform=oi([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Ot(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return Ot(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new Ce(a,o,s,l)},e}(hie),wj=function(t){$(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(fi),Q0="expandAxisBreak",bj="collapseAxisBreak",Tj="toggleAxisBreak",EM="axisbreakchanged",die={type:Q0,event:EM,update:"update",refineEvent:RM},pie={type:bj,event:EM,update:"update",refineEvent:RM},gie={type:Tj,event:EM,update:"update",refineEvent:RM};function RM(t,e,r,n){var i=[];return N(t,function(a){i=i.concat(a.eventBreaks)}),{eventContent:{breaks:i}}}function mie(t){t.registerAction(die,e),t.registerAction(pie,e),t.registerAction(gie,e);function e(r,n){var i=[],a=Pc(n,r);function o(s,l){N(a[s],function(u){var c=u.updateAxisBreaks(r);N(c.breaks,function(f){var h;i.push(Se((h={},h[l]=u.componentIndex,h),f))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var jo=Math.PI,yie=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],_ie=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],ef=Ve(),Cj=Ve(),Mj=function(){function t(e){this.recordMap={},this.resolveAxisNameOverlap=e}return t.prototype.ensureRecord=function(e){var r=e.axis.dim,n=e.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},t}();function xie(t,e,r,n){var i=r.axis,a=e.ensureRecord(r),o=[],s,l=NM(t.axisName)&&Kc(t.nameLocation);N(n,function(p){var g=xa(p);if(!(!g||g.label.ignore)){o.push(g);var m=a.transGroup;l&&(m.transform?oi(vh,m.transform):Cd(vh),g.transform&&Li(vh,vh,g.transform),Ce.copy(mg,g.localRect),mg.applyTransform(vh),s?s.union(mg):Ce.copy(s=new Ce(0,0,0,0),mg))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(p,g){return Math.abs(p.label[u]-c)-Math.abs(g.label[u]-c)}),l&&s){var f=i.getExtent(),h=Math.min(f[0],f[1]),v=Math.max(f[0],f[1])-h;s.union(new Ce(h,0,v,1))}a.stOccupiedRect=s,a.labelInfoList=o}var vh=fr(),mg=new Ce(0,0,0,0),Lj=function(t,e,r,n,i,a){if(Kc(t.nameLocation)){var o=a.stOccupiedRect;o&&Aj(yre({},o,a.transGroup.transform),n,i)}else Pj(a.labelInfoList,a.dirVec,n,i)};function Aj(t,e,r){var n=new Te;q0(t,e,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&qb(e,n)}function Pj(t,e,r,n){for(var i=Te.dot(n,e)>=0,a=0,o=t.length;a0?"top":"bottom",a="center"):Wc(i-jo)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),Sie=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],wie={axisLine:function(t,e,r,n,i,a,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,t.raw.axisLineAutoShow!=null&&(s=!!t.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=a.transform,c=[l[0],0],f=[l[1],0],h=c[0]>f[0];u&&(Ot(c,c,u),Ot(f,f,u));var v=J({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())Gd().buildAxisBreakLine(n,i,a,p);else{var g=new Wt(J({shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]}},p));$c(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var y=n.get(["axisLine","symbolSize"]);se(m)&&(m=[m,m]),(se(y)||Xe(y))&&(y=[y,y]);var x=lu(n.get(["axisLine","symbolOffset"])||0,y),S=y[0],b=y[1];N([{rotate:t.rotation+Math.PI/2,offset:x[0],r:0},{rotate:t.rotation-Math.PI/2,offset:x[1],r:Math.sqrt((c[0]-f[0])*(c[0]-f[0])+(c[1]-f[1])*(c[1]-f[1]))}],function(T,C){if(m[C]!=="none"&&m[C]!=null){var M=Ut(m[C],-S/2,-b/2,S,b,v.stroke,!0),D=T.r+T.offset,I=h?f:c;M.attr({rotation:T.rotate,x:I[0]+D*Math.cos(t.rotation),y:I[1]-D*Math.sin(t.rotation),silent:!0,z2:11}),i.add(M)}})}}},axisTickLabelEstimate:function(t,e,r,n,i,a,o,s){var l=VE(e,i,s);l&&BE(t,e,r,n,i,a,o,Ri.estimate)},axisTickLabelDetermine:function(t,e,r,n,i,a,o,s){var l=VE(e,i,s);l&&BE(t,e,r,n,i,a,o,Ri.determine);var u=Mie(t,i,a,n);Cie(t,e.labelLayoutList,u),Lie(t,i,a,n,t.tickDirection)},axisName:function(t,e,r,n,i,a,o,s){var l=r.ensureRecord(n);e.nameEl&&(i.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=t.axisName;if(NM(u)){var c=t.nameLocation,f=t.nameDirection,h=n.getModel("nameTextStyle"),v=n.get("nameGap")||0,p=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new Te(0,0),y=new Te(0,0);c==="start"?(m.x=p[0]-g*v,y.x=-g):c==="end"?(m.x=p[1]+g*v,y.x=g):(m.x=(p[0]+p[1])/2,m.y=t.labelOffset+f*v,y.y=f);var x=fr();y.transform(ho(x,x,t.rotation));var S=n.get("nameRotate");S!=null&&(S=S*jo/180);var b,T;Kc(c)?b=tn.innerTextLayout(t.rotation,S??t.rotation,f):(b=bie(t.rotation,c,S||0,p),T=t.raw.axisNameAvailableWidth,T!=null&&(T=Math.abs(T/Math.sin(b.rotation)),!isFinite(T)&&(T=null)));var C=h.getFont(),M=n.get("nameTruncate",!0)||{},D=M.ellipsis,I=Sr(t.raw.nameTruncateMaxWidth,M.maxWidth,T),k=s.nameMarginLevel||0,E=new Ye({x:m.x,y:m.y,rotation:b.rotation,silent:tn.isLabelSilent(n),style:dt(h,{text:u,font:C,overflow:"truncate",width:I,ellipsis:D,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||b.textAlign,verticalAlign:h.get("verticalAlign")||b.textVerticalAlign}),z2:1});if(po({el:E,componentModel:n,itemName:u}),E.__fullText=u,E.anid="name",n.get("triggerEvent")){var z=tn.makeAxisEventDataBase(n);z.targetType="axisName",z.name=u,Ae(E).eventData=z}a.add(E),E.updateTransform(),e.nameEl=E;var O=l.nameLayout=xa({label:E,priority:E.z2,defaultAttr:{ignore:E.ignore},marginDefault:Kc(c)?yie[k]:_ie[k]});if(l.nameLocation=c,i.add(E),E.decomposeTransform(),t.shouldNameMoveOverlap&&O){var F=r.ensureRecord(n);r.resolveAxisNameOverlap(t,r,n,O,y,F)}}}};function BE(t,e,r,n,i,a,o,s){kj(e)||Aie(t,e,i,s,n,o);var l=e.labelLayoutList;Pie(t,n,l,a),Iie(n,t.rotation,l);var u=t.optionHideOverlap;Tie(n,l,u),u&&GG(Je(l,function(c){return c&&!c.label.ignore})),xie(t,r,n,l)}function bie(t,e,r,n){var i=d2(r-t),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return Wc(i-jo/2)?(o=l?"bottom":"top",a="center"):Wc(i-jo*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",ijo/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function Tie(t,e,r){if(TG(t.axis))return;function n(s,l,u){var c=xa(e[l]),f=xa(e[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){Gh(c.label);return}if(f.suggestIgnore){Gh(f.label);return}var h=.1;if(!r){var v=[0,0,0,0];c=Kb({marginForce:v},c),f=Kb({marginForce:v},f)}q0(c,f,null,{touchThreshold:h})&&Gh(s?f.label:c.label)}}var i=t.get(["axisLabel","showMinLabel"]),a=t.get(["axisLabel","showMaxLabel"]),o=e.length;n(i,0,1),n(a,o-1,o-2)}function Cie(t,e,r){t.showMinorTicks||N(e,function(n){if(n&&n.label.ignore)for(var i=0;iu[0]&&isFinite(p)&&isFinite(u[0]);)v=y1(v),p=u[1]-v*o;else{var m=t.getTicks().length-1;m>o&&(v=y1(v));var y=v*o;g=Math.ceil(u[1]/v)*v,p=Ht(g-y),p<0&&u[0]>=0?(p=0,g=Ht(y)):g>0&&u[1]<=0&&(g=0,p=-Ht(y))}var x=(i[0].value-a[0].value)/s,S=(i[o].value-a[o].value)/s;n.setExtent.call(t,p+v*x,g+v*S),n.setInterval.call(t,v),(x||S)&&n.setNiceExtent.call(t,p+v,g-v)}var GE=[[3,1],[0,2]],Oie=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=aT,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=Ue(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],v=o[h],p=v.model,g=v.scale;Wb(g)&&p.get("alignTicks")&&p.get("interval")==null?c.push(v):(Xl(g,p),Wb(g)&&(s=v))}c.length&&(s||(s=c.pop(),Xl(s.scale,s.model)),N(c,function(m){Ij(m.scale,m.model,s.scale)}))}}i(n.x),i(n.y);var a={};N(n.x,function(o){jE(n,"y",o,a)}),N(n.y,function(o){jE(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=or(e,r),a=this._rect=St(e.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(sT(o,a),!n){var u=Vie(a,s,o,l,r),c=void 0;if(l)lT?(lT(this._axesList,a),sT(o,a)):c=UE(a.clone(),"axisLabel",null,a,o,u,i);else{var f=Fie(e,a,i),h=f.outerBoundsRect,v=f.parsedOuterBoundsContain,p=f.outerBoundsClamp;h&&(c=UE(h,v,p,a,o,u,i))}Ej(a,o,Ri.determine,null,c,i)}N(this._coordsList,function(g){g.calcAffineTransform()})},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}we(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i0})==null;return Zl(n,s,!0,!0,r),sT(i,n),l;function u(h){N(i[ke[h]],function(v){if(rd(v.model)){var p=a.ensureRecord(v.model),g=p.labelInfoList;if(g)for(var m=0;m0&&!Dr(v)&&v>1e-4&&(h/=v),h}}function Vie(t,e,r,n,i){var a=new Mj(Gie);return N(r,function(o){return N(o,function(s){if(rd(s.model)){var l=!n;s.axisBuilder=Rie(t,e,s.model,i,a,l)}})}),a}function Ej(t,e,r,n,i,a){var o=r===Ri.determine;N(e,function(u){return N(u,function(c){rd(c.model)&&(Nie(c.axisBuilder,t,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[ke[1-u]]=t[qt[u]]<=a.refContainer[qt[u]]*.5?0:1-u===1?2:1}N(e,function(u,c){return N(u,function(f){rd(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function Fie(t,e,r){var n,i=t.get("outerBoundsMode",!0);i==="same"?n=e.clone():(i==null||i==="auto")&&(n=St(t.get("outerBounds",!0)||_j,r.refContainer));var a=t.get("outerBoundsContain",!0),o;a==null||a==="auto"||Ee(["all","axisLabel"],a)<0?o="all":o=a;var s=[oy(pe(t.get("outerBoundsClampWidth",!0),Ry[0]),e.width),oy(pe(t.get("outerBoundsClampHeight",!0),Ry[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var Gie=function(t,e,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";Lj(t,e,r,n,i,a),Kc(t.nameLocation)||N(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&Pj(s.labelInfoList,s.dirVec,n,i)})};function jie(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return Hie(r,t,e),r.seriesInvolved&&Uie(r,t),r}function Hie(t,e,r){var n=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];N(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=od(s.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(N(s.getAxes(),Ie(g,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var h=f.get("trigger")==="axis",v=f.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||v)&&N(p.baseAxes,Ie(g,v?"cross":!0,h)),v&&N(p.otherAxes,Ie(g,"cross",!1))}function g(m,y,x){var S=x.model.getModel("axisPointer",i),b=S.get("show");if(!(!b||b==="auto"&&!m&&!uT(S))){y==null&&(y=S.get("triggerTooltip")),S=m?Wie(x,f,i,e,m,y):S;var T=S.get("snap"),C=S.get("triggerEmphasis"),M=od(x.model),D=y||T||x.type==="category",I=t.axesInfo[M]={key:M,axis:x,coordSys:s,axisPointerModel:S,triggerTooltip:y,triggerEmphasis:C,involveSeries:D,snap:T,useHandle:uT(S),seriesModels:[],linkGroup:null};u[M]=I,t.seriesInvolved=t.seriesInvolved||D;var k=Zie(a,x);if(k!=null){var E=o[k]||(o[k]={axesInfo:{}});E.axesInfo[M]=I,E.mapper=a[k].mapper,I.linkGroup=E}}}})}function Wie(t,e,r,n,i,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};N(s,function(h){l[h]=ye(o.get(h))}),l.snap=t.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var f=l.lineStyle=o.get("crossStyle");f&&Se(u,f.textStyle)}}return t.model.getModel("axisPointer",new je(l,r,n))}function Uie(t,e){e.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||N(t.coordSysAxesInfo[od(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function Zie(t,e){for(var r=e.model,n=e.dim,i=0;i=0||t===e}function $ie(t){var e=OM(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=uT(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var eae=Ve();function YE(t,e,r,n){if(t instanceof wj){var i=t.scale.type;if(i!=="category"&&i!=="ordinal")return r}var a=t.model,o=a.get("jitter"),s=a.get("jitterOverlap"),l=a.get("jitterMargin")||0,u=t.scale.type==="ordinal"?t.getBandWidth():null;return o>0?s?Vj(r,o,u,n):tae(t,e,r,n,o,l):r}function Vj(t,e,r,n){if(r===null)return t+(Math.random()-.5)*e;var i=r-n*2,a=Math.min(Math.max(0,e),i);return t+(Math.random()-.5)*a}function tae(t,e,r,n,i,a){var o=eae(t);o.items||(o.items=[]);var s=o.items,l=XE(s,e,r,n,i,a,1),u=XE(s,e,r,n,i,a,-1),c=Math.abs(l-r)i/2||f&&h>f/2-n?Vj(r,i,f,n):(s.push({fixedCoord:e,floatCoord:c,r:n}),c)}function XE(t,e,r,n,i,a,o){for(var s=r,l=0;li/2)return Number.MAX_VALUE;if(o===1&&p>s||o===-1&&p0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var g=l;p.color!=null&&(g=Se({color:p.color},l));var m=Re(ye(p),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:g,triggerEvent:h},!1);if(se(c)){var y=m.name;m.name=c.replace("{value}",y??"")}else me(c)&&(m.name=c(m.name,m));var x=new je(m,null,this.ecModel);return Bt(x,Mf.prototype),x.mainType="radar",x.componentIndex=this.componentIndex,x},this);this._indicatorModels=v},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:X.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Re({lineStyle:{color:X.color.neutral20}},dh.axisLine),axisLabel:yg(dh.axisLabel,!1),axisTick:yg(dh.axisTick,!1),splitLine:yg(dh.splitLine,!0),splitArea:yg(dh.splitArea,!0),indicator:[]},e}(Be),cae=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},e.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=re(a,function(s){var l=s.model.get("showName")?s.name:"",u=new tn(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});N(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),h=l.get("color"),v=u.get("color"),p=ee(h)?h:[h],g=ee(v)?v:[v],m=[],y=[];function x(j,G,Z){var V=Z%G.length;return j[V]=j[V]||[],V}if(a==="circle")for(var S=i[0].getTicksCoords(),b=n.cx,T=n.cy,C=0;C3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",r,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var f=Math.abs(a),h=(a>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(r){if(!(QE(this._zr,"globalPan")||ph(r))){var n=r.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(r,n,i,a,o){r._checkPointer(a,o.originX,o.originY)&&(io(a.event),a.__ecRoamConsumed=!0,JE(r,n,i,a,o))},e}(ui);function ph(t){return t.__ecRoamConsumed}var yae=Ve();function J0(t){var e=yae(t);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function gh(t,e,r,n){for(var i=J0(t),a=i.roam,o=a[e]=a[e]||[],s=0;s=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(f=Uj(c,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var v=i;i=new _e,i.add(v),v.scaleX=v.scaleY=f.scale,v.x=f.x,v.y=f.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new ze({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:a}},t.prototype._parseNode=function(e,r,n,i,a,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var c=O1[s];if(c&&fe(O1,s)){l=c.call(this,e,r);var f=e.getAttribute("name");if(f){var h={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var v=nR[s];if(v&&fe(nR,s)){var p=v.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=p)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,n,u,a,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},t.prototype._parseText=function(e,r){var n=new Uc({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Gn(r,n),_n(e,n,this._defsUsePending,!1,!1),wae(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},t.internalField=function(){O1={g:function(e,r){var n=new _e;return Gn(r,n),_n(e,n,this._defsUsePending,!1,!1),n},rect:function(e,r){var n=new ze;return Gn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,r){var n=new ba;return Gn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,r){var n=new Wt;return Gn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,r){var n=new Pd;return Gn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,r){var n=e.getAttribute("points"),i;n&&(i=oR(n));var a=new Nr({shape:{points:i||[]},silent:!0});return Gn(r,a),_n(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,r){var n=e.getAttribute("points"),i;n&&(i=oR(n));var a=new br({shape:{points:i||[]},silent:!0});return Gn(r,a),_n(e,a,this._defsUsePending,!1,!1),a},image:function(e,r){var n=new dr;return Gn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,r){var n=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new _e;return Gn(r,s),_n(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,r){var n=e.getAttribute("x"),i=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new _e;return Gn(r,s),_n(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,r){var n=e.getAttribute("d")||"",i=sV(n);return Gn(r,i),_n(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),t}(),nR={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),r=parseInt(t.getAttribute("y1")||"0",10),n=parseInt(t.getAttribute("x2")||"10",10),i=parseInt(t.getAttribute("y2")||"0",10),a=new iu(e,r,n,i);return iR(t,a),aR(t,a),a},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),r=parseInt(t.getAttribute("cy")||"0",10),n=parseInt(t.getAttribute("r")||"0",10),i=new P2(e,r,n);return iR(t,i),aR(t,i),i}};function iR(t,e){var r=t.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(e.global=!0)}function aR(t,e){for(var r=t.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};Wj(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000",s=a.stopOpacity||r.getAttribute("stop-opacity");if(s){var l=Ur(o),u=l&&l[3];u&&(l[3]*=$a(s),o=ti(l,"rgba"))}e.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function Gn(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Se(e.__inheritedStyle,t.__inheritedStyle))}function oR(t){for(var e=t_(t),r=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=t_(o);switch(i=i||fr(),s){case"translate":Ii(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":L0(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":ho(i,i,-parseFloat(l[0])*z1,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*z1);Li(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*z1);Li(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var lR=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Wj(t,e,r){var n=t.getAttribute("style");if(n){lR.lastIndex=0;for(var i;(i=lR.exec(n))!=null;){var a=i[1],o=fe(Oy,a)?Oy[a]:null;o&&(e[o]=i[2]);var s=fe(zy,a)?zy[a]:null;s&&(r[s]=i[2])}}}function Aae(t,e,r){for(var n=0;n0,x={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(x):l.resourceType==="geoSVG"&&this._buildSVG(x),this._updateController(e,m,r,n),this._updateMapSelectHandler(e,u,n,i)},t.prototype._buildGeoJSON=function(e){var r=this._regionsGroupByName=ve(),n=ve(),i=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(v,p){return p&&(v=p(v)),v&&[v[0]*a.scaleX+a.x,v[1]*a.scaleY+a.y]}function f(v){for(var p=[],g=!u&&l&&l.project,m=0;m=0)&&(h=i);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;vr(e,ar(n),{labelFetcher:h,labelDataIndex:f,defaultText:r},v);var p=e.getTextContent();if(p&&(Zj(p).ignore=p.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function vR(t,e,r,n,i,a){t.data?t.data.setItemGraphicEl(a,e):Ae(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function dR(t,e,r,n,i){t.data||po({el:e,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function pR(t,e,r,n,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return bt(e,o,a.get("blurScope"),a.get("disabled")),t.isGeo&&zq(e,i,r),o}function gR(t,e,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),N(t,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill=X.color.neutral00,i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:X.color.tertiary},itemStyle:{borderWidth:.5,borderColor:X.color.border,areaColor:X.color.background},emphasis:{label:{show:!0,color:X.color.primary},itemStyle:{areaColor:X.color.highlight}},select:{label:{show:!0,color:X.color.primary},itemStyle:{color:X.color.highlight}},nameProperty:"name"},e}(ht);function Yae(t,e){var r={};return N(t,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),t[0].map(t[0].mapDimension("value"),function(n,i){for(var a="ec-"+t[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,c=0;c1?(S.width=x,S.height=x/g):(S.height=x,S.width=x*g),S.y=y[1]-S.height/2,S.x=y[0]-S.width/2;else{var b=t.getBoxLayoutParams();b.aspect=g,S=St(b,p),S=GV(t,S,g)}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Qae(t,e){N(e.get("geoCoord"),function(r,n){t.addGeoCoord(n,r)})}var Jae=function(){function t(){this.dimensions=Yj}return t.prototype.create=function(e,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new hT(l+s,l,J({nameMap:o.get("nameMap"),api:r,ecModel:e},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=xR,u.resize(o,r)}),e.eachSeries(function(o){Rd({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Dt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),N(a,function(o,s){var l=re(o,function(c){return c.get("nameMap")}),u=new hT(s,s,J({nameMap:T0(l),api:r,ecModel:e},i(o[0])));u.zoomLimit=Sr.apply(null,re(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=xR,u.resize(o[0],r),N(o,function(c){c.coordinateSystem=u,Qae(u,c)})}),n},t.prototype.getFilledRegions=function(e,r,n,i){for(var a=(e||[]).slice(),o=ve(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function aoe(t,e){var r=t.isExpand?t.children:[],n=t.parentNode.children,i=t.hierNode.i?n[t.hierNode.i-1]:null;if(r.length){soe(t);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(t.hierNode.prelim=i.hierNode.prelim+e(t,i),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else i&&(t.hierNode.prelim=i.hierNode.prelim+e(t,i));t.parentNode.hierNode.defaultAncestor=loe(t,i,t.parentNode.hierNode.defaultAncestor||n[0],e)}function ooe(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function SR(t){return arguments.length?t:foe}function jh(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function soe(t){for(var e=t.children,r=e.length,n=0,i=0;--r>=0;){var a=e[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function loe(t,e,r,n){if(e){for(var i=t,a=t,o=a.parentNode.children[0],s=e,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=B1(s),a=V1(a),s&&a;){i=B1(i),o=V1(o),i.hierNode.ancestor=t;var h=s.hierNode.prelim+f-a.hierNode.prelim-u+n(s,a);h>0&&(coe(uoe(s,t,r),t,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!B1(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),a&&!V1(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,r=t)}return r}function B1(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function V1(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function uoe(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function coe(t,e,r){var n=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=r,e.hierNode.modifier+=r,e.hierNode.prelim+=r,t.hierNode.change+=n}function foe(t,e){return t.parentNode===e.parentNode?1:2}var hoe=function(){function t(){this.parentPoint=[],this.childPoints=[]}return t}(),voe=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:X.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new hoe},e.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,h=oe(n.forkPosition,1),v=[];v[c]=o[c],v[f]=o[f]+(l[f]-o[f])*h,r.moveTo(o[0],o[1]),r.lineTo(v[0],v[1]),r.moveTo(s[0],s[1]),v[c]=s[c],r.lineTo(v[0],v[1]),v[c]=l[c],r.lineTo(v[0],v[1]),r.lineTo(l[0],l[1]);for(var p=1;px.x,T||(b=b-Math.PI));var M=T?"left":"right",D=s.getModel("label"),I=D.get("rotate"),k=I*(Math.PI/180),E=m.getTextContent();E&&(m.setTextConfig({position:D.get("position")||M,rotation:I==null?-b:k,origin:"center"}),E.setStyle("verticalAlign","middle"))}var z=s.get(["emphasis","focus"]),O=z==="relative"?Gc(o.getAncestorsIndices(),o.getDescendantIndices()):z==="ancestor"?o.getAncestorsIndices():z==="descendant"?o.getDescendantIndices():null;O&&(Ae(r).focus=O),poe(i,o,c,r,p,v,g,n),r.__edge&&(r.onHoverStateChange=function(F){if(F!=="blur"){var j=o.parentNode&&t.getItemGraphicEl(o.parentNode.dataIndex);j&&j.hoverState===Ad||cy(r.__edge,F)}})}function poe(t,e,r,n,i,a,o,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),f=t.getOrient(),h=t.get(["lineStyle","curveness"]),v=t.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==r&&(g||(g=n.__edge=new df({shape:vT(c,f,h,i,i)})),Ke(g,{shape:vT(c,f,h,a,o)},t));else if(u==="polyline"&&c==="orthogonal"&&e!==r&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,y=[],x=0;xr&&(r=i.height)}this.height=r+1},t.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var r=0,n=this.children,i=n.length;r=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,r)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(e,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,r)},t.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,r=0;r=0){var n=r.getData().tree.root,i=t.targetNode;if(se(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=t.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function e6(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function WM(t,e){var r=e6(t);return Ee(r,e)>=0}function r_(t,e){for(var r=[];t;){var n=t.dataIndex;r.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return r.reverse(),r}var Toe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new je(i,this,this.ecModel),o=HM.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(h,v){var p=o.getNodeByDataIndex(v);return p&&p.children.length&&p.isExpand||(h.parentModel=a),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=r.expandAndCollapse,c=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.depth<=c}),o.data},e.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Kt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=r_(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:X.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(ht);function Coe(t,e,r){for(var n=[t],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)r.push(i[a])}}function Moe(t,e){t.eachSeriesByType("tree",function(r){Loe(r,e)})}function Loe(t,e){var r=or(t,e).refContainer,n=St(t.getBoxLayoutParams(),r);t.layoutInfo=n;var i=t.get("layout"),a=0,o=0,s=null;i==="radial"?(a=2*Math.PI,o=Math.min(n.height,n.width)/2,s=SR(function(b,T){return(b.parentNode===T.parentNode?1:2)/b.depth})):(a=n.width,o=n.height,s=SR());var l=t.getData().tree.root,u=l.children[0];if(u){ioe(l),Coe(u,aoe,s),l.hierNode.modifier=-u.hierNode.prelim,_h(u,ooe);var c=u,f=u,h=u;_h(u,function(b){var T=b.getLayout().x;Tf.getLayout().x&&(f=b),b.depth>h.depth&&(h=b)});var v=c===f?1:s(c,f)/2,p=v-c.getLayout().x,g=0,m=0,y=0,x=0;if(i==="radial")g=a/(f.getLayout().x+v+p),m=o/(h.depth-1||1),_h(u,function(b){y=(b.getLayout().x+p)*g,x=(b.depth-1)*m;var T=jh(y,x);b.setLayout({x:T.x,y:T.y,rawX:y,rawY:x},!0)});else{var S=t.getOrient();S==="RL"||S==="LR"?(m=o/(f.getLayout().x+v+p),g=a/(h.depth-1||1),_h(u,function(b){x=(b.getLayout().x+p)*m,y=S==="LR"?(b.depth-1)*g:a-(b.depth-1)*g,b.setLayout({x:y,y:x},!0)})):(S==="TB"||S==="BT")&&(g=a/(f.getLayout().x+v+p),m=o/(h.depth-1||1),_h(u,function(b){y=(b.getLayout().x+p)*g,x=S==="TB"?(b.depth-1)*m:o-(b.depth-1)*m,b.setLayout({x:y,y:x},!0)}))}}}function Aoe(t){t.eachSeriesByType("tree",function(e){var r=e.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");J(s,o)})})}function Poe(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=e.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var a=i.coordinateSystem,o=e_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function Doe(t){t.registerChartView(doe),t.registerSeriesModel(Toe),t.registerLayout(Moe),t.registerVisual(Aoe),Poe(t)}var MR=["treemapZoomToNode","treemapRender","treemapMove"];function koe(t){for(var e=0;e1;)a=a.parentNode;var o=Db(t.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var Ioe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventUsingHoverLayer=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};r6(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new je({itemStyle:o},this,n);a=r.levels=Eoe(a,n);var l=re(a||[],function(f){return new je(f,s,n)},this),u=HM.createTree(i,this,c);function c(f){f.wrapMethod("getItemModel",function(h,v){var p=u.getNodeByDataIndex(v),g=p?l[p.depth]:null;return h.parentModel=g||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return Kt("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=r_(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},J(this.layoutInfo,r)},e.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=ve(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){t6(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:X.size.l,top:X.size.xxxl,right:X.size.l,bottom:X.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:X.size.m,emptyItemWidth:25,itemStyle:{color:X.color.backgroundShade,textStyle:{color:X.color.secondary}},emphasis:{itemStyle:{color:X.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:X.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:X.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(ht);function r6(t){var e=0;N(t.children,function(n){r6(n);var i=n.value;ee(i)&&(i=i[0]),e+=i});var r=t.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),ee(t.value)?t.value[0]=r:t.value=r}function Eoe(t,e){var r=pt(e.get("color")),n=pt(e.get(["aria","decal","decals"]));if(r){t=t||[];var i,a;N(t,function(s){var l=new je(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=t[0]||(t[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),t}}var Roe=8,LR=8,F1=5,Noe=function(){function t(e){this.group=new _e,e.add(this.group)}return t.prototype.render=function(e,r,n,i){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f=or(e,r).refContainer,h={left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},v={emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},p=St(h,f);this._prepare(n,v,u),this._renderContent(e,v,p,s,l,u,c,i),H0(o,h,f)}},t.prototype._prepare=function(e,r,n){for(var i=e;i;i=i.parentNode){var a=rr(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+Roe*2,r.emptyItemWidth);r.totalWidth+=s+LR,r.renderList.push({node:i,text:a,width:s})}},t.prototype._renderContent=function(e,r,n,i,a,o,s,l){for(var u=0,c=r.emptyItemWidth,f=e.get(["breadcrumb","height"]),h=r.totalWidth,v=r.renderList,p=a.getModel("itemStyle").getItemStyle(),g=v.length-1;g>=0;g--){var m=v[g],y=m.node,x=m.width,S=m.text;h>n.width&&(h-=x-c,x=c,S=null);var b=new Nr({shape:{points:Ooe(u,0,x,f,g===v.length-1,g===0)},style:Se(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ye({style:dt(o,{text:S})}),textConfig:{position:"inside"},z2:hf*1e4,onclick:Ie(l,y)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=dt(s,{text:S}),b.ensureState("emphasis").style=p,bt(b,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(b),zoe(b,e,y),u+=x+LR}},t.prototype.remove=function(){this.group.removeAll()},t}();function Ooe(t,e,r,n,i,a){var o=[[i?t:t-F1,e],[t+r,e],[t+r,e+n],[i?t:t-F1,e+n]];return!a&&o.splice(2,0,[t+r+F1,e+n/2]),!i&&o.push([t,e+n/2]),o}function zoe(t,e,r){Ae(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&r_(r,e)}}var Boe=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(e,r,n,i,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:r,duration:n,delay:i,easing:a}),!0)},t.prototype.finished=function(e){return this._finishedCallback=e,this},t.prototype.start=function(){for(var e=this,r=this._storage.length,n=function(){r--,r<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,a=this._storage.length;iPR||Math.abs(r.dy)>PR)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(r){var n=r.originX,i=r.originY,a=r.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Ce(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var f=c.zoom=c.zoom||1;if(f*=a,u){var h=u.min||0,v=u.max||1/0;f=Math.max(Math.min(v,f),h)}var p=f/c.zoom;c.zoom=f;var g=this.seriesModel.layoutInfo;n-=g.x,i-=g.y;var m=fr();Ii(m,m,[-n,-i]),L0(m,m,[p,p]),Ii(m,m,[n,i]),l.applyTransform(m),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&dy(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Noe(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(WM(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=xh(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype.findTarget=function(r,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(lt);function xh(){return{nodeGroup:[],background:[],content:[]}}function Woe(t,e,r,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),f=t.getData(),h=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var v=c.width,p=c.height,g=c.borderWidth,m=c.invisible,y=o.getRawIndex(),x=s&&s.getRawIndex(),S=o.viewChildren,b=c.upperHeight,T=S&&S.length,C=h.getModel("itemStyle"),M=h.getModel(["emphasis","itemStyle"]),D=h.getModel(["blur","itemStyle"]),I=h.getModel(["select","itemStyle"]),k=C.get("borderRadius")||0,E=ue("nodeGroup",dT);if(!E)return;if(l.add(E),E.x=c.x||0,E.y=c.y||0,E.markRedraw(),By(E).nodeWidth=v,By(E).nodeHeight=p,c.isAboveViewRoot)return E;var z=ue("background",AR,u,Goe);z&&H(E,z,T&&c.upperLabelHeight);var O=h.getModel("emphasis"),F=O.get("focus"),j=O.get("blurScope"),G=O.get("disabled"),Z=F==="ancestor"?o.getAncestorsIndices():F==="descendant"?o.getDescendantIndices():F;if(T)Zv(E)&&xl(E,!1),z&&(xl(z,!G),f.setItemGraphicEl(o.dataIndex,z),_b(z,Z,j));else{var V=ue("content",AR,u,joe);V&&Y(E,V),z.disableMorphing=!0,z&&Zv(z)&&xl(z,!1),xl(E,!G),f.setItemGraphicEl(o.dataIndex,E);var W=h.getShallow("cursor");W&&V.attr("cursor",W),_b(E,Z,j)}return E;function H(xe,ge,De){var he=Ae(ge);if(he.dataIndex=o.dataIndex,he.seriesIndex=t.seriesIndex,ge.setShape({x:0,y:0,width:v,height:p,r:k}),m)K(ge);else{ge.invisible=!1;var Me=o.getVisual("style"),ot=Me.stroke,$e=IR(C);$e.fill=ot;var et=sl(M);et.fill=M.get("borderColor");var ut=sl(D);ut.fill=D.get("borderColor");var kt=sl(I);if(kt.fill=I.get("borderColor"),De){var pr=v-2*g;ne(ge,ot,Me.opacity,{x:g,y:0,width:pr,height:b})}else ge.removeTextContent();ge.setStyle($e),ge.ensureState("emphasis").style=et,ge.ensureState("blur").style=ut,ge.ensureState("select").style=kt,Ul(ge)}xe.add(ge)}function Y(xe,ge){var De=Ae(ge);De.dataIndex=o.dataIndex,De.seriesIndex=t.seriesIndex;var he=Math.max(v-2*g,0),Me=Math.max(p-2*g,0);if(ge.culling=!0,ge.setShape({x:g,y:g,width:he,height:Me,r:k}),m)K(ge);else{ge.invisible=!1;var ot=o.getVisual("style"),$e=ot.fill,et=IR(C);et.fill=$e,et.decal=ot.decal;var ut=sl(M),kt=sl(D),pr=sl(I);ne(ge,$e,ot.opacity,null),ge.setStyle(et),ge.ensureState("emphasis").style=ut,ge.ensureState("blur").style=kt,ge.ensureState("select").style=pr,Ul(ge)}xe.add(ge)}function K(xe){!xe.invisible&&a.push(xe)}function ne(xe,ge,De,he){var Me=h.getModel(he?kR:DR),ot=rr(h.get("name"),null),$e=Me.getShallow("show");vr(xe,ar(h,he?kR:DR),{defaultText:$e?ot:null,inheritColor:ge,defaultOpacity:De,labelFetcher:t,labelDataIndex:o.dataIndex});var et=xe.getTextContent();if(et){var ut=et.style,kt=bd(ut.padding||0);he&&(xe.setTextConfig({layoutRect:he}),et.disableLabelLayout=!0),et.beforeUpdate=function(){var zr=Math.max((he?he.width:xe.shape.width)-kt[1]-kt[3],0),zi=Math.max((he?he.height:xe.shape.height)-kt[0]-kt[2],0);(ut.width!==zr||ut.height!==zi)&&et.setStyle({width:zr,height:zi})},ut.truncateMinChar=2,ut.lineOverflow="truncate",ie(ut,he,c);var pr=et.getState("emphasis");ie(pr?pr.style:null,he,c)}}function ie(xe,ge,De){var he=xe?xe.text:null;if(!ge&&De.isLeafRoot&&he!=null){var Me=t.get("drillDownIcon",!0);xe.text=Me?Me+" "+he:he}}function ue(xe,ge,De,he){var Me=x!=null&&r[xe][x],ot=i[xe];return Me?(r[xe][x]=null,de(ot,Me)):m||(Me=new ge,Me instanceof si&&(Me.z2=Uoe(De,he)),Fe(ot,Me)),e[xe][y]=Me}function de(xe,ge){var De=xe[y]={};ge instanceof dT?(De.oldX=ge.x,De.oldY=ge.y):De.oldShape=J({},ge.shape)}function Fe(xe,ge){var De=xe[y]={},he=o.parentNode,Me=ge instanceof _e;if(he&&(!n||n.direction==="drillDown")){var ot=0,$e=0,et=i.background[he.getRawIndex()];!n&&et&&et.oldShape&&(ot=et.oldShape.width,$e=et.oldShape.height),Me?(De.oldX=0,De.oldY=$e):De.oldShape={x:ot,y:$e,width:0,height:0}}De.fadein=!Me}}function Uoe(t,e){return t*Foe+e}var ld=N,Zoe=we,Vy=-1,hr=function(){function t(e){var r=e.mappingMethod,n=e.type,i=this.option=ye(e);this.type=n,this.mappingMethod=r,this._normalizeData=Xoe[r];var a=t.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(G1(i),$oe(i)):r==="category"?i.categories?Yoe(i):G1(i,!0):(Er(r!=="linear"||i.dataExtent),G1(i))}return t.prototype.mapValueToVisual=function(e){var r=this._normalizeData(e);return this._normalizedToVisual(r,e)},t.prototype.getNormalizer=function(){return le(this._normalizeData,this)},t.listVisualTypes=function(){return Ue(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(e,r,n){we(e)?N(e,r,n):r.call(n,e)},t.mapVisual=function(e,r,n){var i,a=ee(e)?[]:we(e)?{}:(i=!0,null);return t.eachVisual(e,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},t.retrieveVisuals=function(e){var r={},n;return e&&ld(t.visualHandlers,function(i,a){e.hasOwnProperty(a)&&(r[a]=e[a],n=!0)}),n?r:null},t.prepareVisualTypes=function(e){if(ee(e))e=e.slice();else if(Zoe(e)){var r=[];ld(e,function(n,i){r.push(i)}),e=r}else return[];return e.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},t.dependsOn=function(e,r){return r==="color"?!!(e&&e.indexOf(r)===0):e===r},t.findPieceIndex=function(e,r,n){for(var i,a=1/0,o=0,s=r.length;o=0;a--)n[a]==null&&(delete r[e[a]],e.pop())}function G1(t,e){var r=t.visual,n=[];we(r)?ld(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!e&&n.length===1&&!i.hasOwnProperty(t.type)&&(n[1]=n[0]),n6(t,n)}function xg(t){return{applyVisual:function(e,r,n){var i=this.mapValueToVisual(e);n("color",t(r("color"),i))},_normalizedToVisual:pT([0,1])}}function ER(t){var e=this.option.visual;return e[Math.round(rt(t,[0,1],[0,e.length-1],!0))]||{}}function Sh(t){return function(e,r,n){n(t,this.mapValueToVisual(e))}}function Hh(t){var e=this.option.visual;return e[this.option.loop&&t!==Vy?t%e.length:t]}function ll(){return this.option.visual[0]}function pT(t){return{linear:function(e){return rt(e,t,this.option.visual,!0)},category:Hh,piecewise:function(e,r){var n=gT.call(this,r);return n==null&&(n=rt(e,t,this.option.visual,!0)),n},fixed:ll}}function gT(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var n=hr.findPieceIndex(t,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function n6(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=re(e,function(r){var n=Ur(r);return n||[0,0,0,1]})),e}var Xoe={linear:function(t){return rt(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=hr.findPieceIndex(t,e,!0);if(r!=null)return rt(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??Vy},fixed:Nt};function Sg(t,e,r){return t?e<=r:e=r.length||g===r[g.depth]){var y=tse(i,l,g,m,p,n);a6(g,y,r,n)}})}}}function Qoe(t,e,r){var n=J({},e),i=r.designatedVisualItemStyle;return N(["color","colorAlpha","colorSaturation"],function(a){i[a]=e[a];var o=t.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function RR(t){var e=j1(t,"color");if(e){var r=j1(t,"colorAlpha"),n=j1(t,"colorSaturation");return n&&(e=Ya(e,null,null,n)),r&&(e=Gv(e,r)),e}}function Joe(t,e){return e!=null?Ya(e,null,null,t):null}function j1(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function ese(t,e,r,n,i,a){if(!(!a||!a.length)){var o=H1(e,"color")||i.color!=null&&i.color!=="none"&&(H1(e,"colorAlpha")||H1(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=r.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new hr(f);return i6(h).drColorMappingBy=c,h}}}function H1(t,e){var r=t.get(e);return ee(r)&&r.length?{name:e,range:r}:null}function tse(t,e,r,n,i,a){var o=J({},e);if(i){var s=i.type,l=s==="color"&&i6(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var ud=Math.max,Fy=Math.min,NR=Sr,UM=N,o6=["itemStyle","borderWidth"],rse=["itemStyle","gapWidth"],nse=["upperLabel","show"],ise=["upperLabel","height"];const ase={seriesType:"treemap",reset:function(t,e,r,n){var i=t.option,a=or(t,r).refContainer,o=St(t.getBoxLayoutParams(),a),s=i.size||[],l=oe(NR(o.width,s[0]),a.width),u=oe(NR(o.height,s[1]),a.height),c=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],h=sd(n,f,t),v=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,p=t.getViewRoot(),g=e6(p);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?fse(t,h,p,l,u):v?[v.width,v.height]:[l,u],y=i.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var x={squareRatio:i.squareRatio,sort:y,leafDepth:i.leafDepth};p.hostTree.clearLayouts();var S={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(S),s6(p,x,!1,0),S=p.getLayout(),UM(g,function(T,C){var M=(g[C+1]||p).getValue();T.setLayout(J({dataExtent:[M,M],borderWidth:0,upperHeight:0},S))})}var b=t.getData().tree.root;b.setLayout(hse(o,v,h),!0),t.setLayoutInfo(o),l6(b,new Ce(-o.x,-o.y,r.getWidth(),r.getHeight()),g,p,0)}};function s6(t,e,r,n){var i,a;if(!t.isRemoved()){var o=t.getLayout();i=o.width,a=o.height;var s=t.getModel(),l=s.get(o6),u=s.get(rse)/2,c=u6(s),f=Math.max(l,c),h=l-u,v=f-u;t.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),i=ud(i-2*h,0),a=ud(a-h-v,0);var p=i*a,g=ose(t,s,p,e,r,n);if(g.length){var m={x:h,y:v,width:i,height:a},y=Fy(i,a),x=1/0,S=[];S.area=0;for(var b=0,T=g.length;b=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*es[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function cse(t,e,r){for(var n=0,i=1/0,a=0,o=void 0,s=t.length;an&&(n=o));var l=t.area*t.area,u=e*e*r;return l?ud(u*n/l,l/(u*i)):1/0}function OR(t,e,r,n,i){var a=e===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],c=e?t.area/e:0;(i||c>r[l[o]])&&(c=r[l[o]]);for(var f=0,h=t.length;flb&&(u=lb),a=s}un&&(n=e);var a=n%2?n+2:n+3;i=[];for(var o=0;o0&&(T[0]=-T[0],T[1]=-T[1]);var M=b[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var D=-Math.atan2(b[1],b[0]);f[0].8?"left":h[0]<-.8?"right":"center",g=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*y+c[0],a.y=-h[1]*x+c[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",g=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*M+c[0],a.y=c[1]+I,p=b[0]<0?"right":"left",a.originX=-y*M,a.originY=-I;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=C[0],a.y=C[1]+I,p="center",a.originY=-I;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-y*M+f[0],a.y=f[1]+I,p=b[0]>=0?"right":"left",a.originX=y*M,a.originY=-I;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||p})}},e}(_e),qM=function(){function t(e){this.group=new _e,this._LineCtor=e||XM}return t.prototype.updateData=function(e){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=e,a||i.removeAll();var o=jR(e);e.diff(a).add(function(s){r._doAdd(e,s,o)}).update(function(s,l){r._doUpdate(a,e,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},t.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(r,n){r.updateLayout(e,n)},this)},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=jR(e),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r){this._progressiveEls=[];function n(s){!s.isGroup&&!Pse(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function jR(t){var e=t.hostModel,r=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:ar(e)}}function HR(t){return isNaN(t[0])||isNaN(t[1])}function Y1(t){return t&&!HR(t[0])&&!HR(t[1])}var X1=[],q1=[],K1=[],Gu=xr,Q1=es,WR=Math.abs;function UR(t,e,r){for(var n=t[0],i=t[1],a=t[2],o=1/0,s,l=r*r,u=.1,c=.1;c<=.9;c+=.1){X1[0]=Gu(n[0],i[0],a[0],c),X1[1]=Gu(n[1],i[1],a[1],c);var f=WR(Q1(X1,e)-l);f=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function J1(t,e){var r=[],n=Vv,i=[[],[],[]],a=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[ha(u[0]),ha(u[1])],u[2]&&u.__original.push(ha(u[2])));var h=u.__original;if(u[2]!=null){if(Gr(i[0],h[0]),Gr(i[1],h[2]),Gr(i[2],h[1]),c&&c!=="none"){var v=Uh(s.node1),p=UR(i,h[0],v*e);n(i[0][0],i[1][0],i[2][0],p,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],p,r),i[0][1]=r[3],i[1][1]=r[4]}if(f&&f!=="none"){var v=Uh(s.node2),p=UR(i,h[1],v*e);n(i[0][0],i[1][0],i[2][0],p,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],p,r),i[1][1]=r[1],i[2][1]=r[2]}Gr(u[0],i[0]),Gr(u[1],i[2]),Gr(u[2],i[1])}else{if(Gr(a[0],h[0]),Gr(a[1],h[1]),Bo(o,a[1],a[0]),nu(o,o),c&&c!=="none"){var v=Uh(s.node1);Ym(a[0],a[0],o,v*e)}if(f&&f!=="none"){var v=Uh(s.node2);Ym(a[1],a[1],o,-v*e)}Gr(u[0],a[0]),Gr(u[1],a[1])}})}var g6=Ve();function Dse(t){if(t)return g6(t).bridge}function ZR(t,e){t&&(g6(t).bridge=e)}function $R(t){return t.type==="view"}var kse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){var i=new Bd,a=new qM,o=this.group,s=new _e;this._controller=new cu(n.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(a.group),o.add(s),this._symbolDraw=i,this._lineDraw=a,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=!1;this._model=r,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,c=this._lineDraw;if($R(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(f):Ke(this._mainGroup,f,r)}J1(r.getGraph(),Wh(r));var h=r.getData();u.updateData(h);var v=r.getEdgeData();c.updateData(v),this._updateNodeAndLinkScale(),this._updateController(null,r,i),clearTimeout(this._layoutTimeout);var p=r.forceLayout,g=r.get(["force","layoutAnimation"]);p&&(s=!0,this._startForceLayoutIteration(p,i,g));var m=r.get("layout");h.graph.eachNode(function(b){var T=b.dataIndex,C=b.getGraphicEl(),M=b.getModel();if(C){C.off("drag").off("dragend");var D=M.get("draggable");D&&C.on("drag",function(k){switch(m){case"force":p.warmUp(),!a._layouting&&a._startForceLayoutIteration(p,i,g),p.setFixed(T),h.setItemLayout(T,[C.x,C.y]);break;case"circular":h.setItemLayout(T,[C.x,C.y]),b.setLayout({fixed:!0},!0),YM(r,"symbolSize",b,[k.offsetX,k.offsetY]),a.updateLayout(r);break;case"none":default:h.setItemLayout(T,[C.x,C.y]),$M(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){p&&p.setUnfixed(T)}),C.setDraggable(D,!!M.get("cursor"));var I=M.get(["emphasis","focus"]);I==="adjacency"&&(Ae(C).focus=b.getAdjacentDataIndices())}}),h.graph.eachEdge(function(b){var T=b.getGraphicEl(),C=b.getModel().get(["emphasis","focus"]);T&&C==="adjacency"&&(Ae(T).focus={edge:[b.dataIndex],node:[b.node1.dataIndex,b.node2.dataIndex]})});var y=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),x=h.getLayout("cx"),S=h.getLayout("cy");h.graph.eachNode(function(b){v6(b,y,x,S)}),this._firstRender=!1,s||this._renderThumbnail(r,i,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(r,n,i){var a=this,o=!1;(function s(){r.step(function(l){a.updateLayout(a._model),(l||!o)&&(o=!0,a._renderThumbnail(a._model,n,a._symbolDraw,a._lineDraw)),(a._layouting=!l)&&(i?a._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(r,n,i){var a=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!$R(s)){a.disable();return}a.enable(n.get("roam"),{api:i,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!r||r.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),a.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(r,n,i){this._active&&(BM(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(r,n,i){this._active&&(VM(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),J1(r.getGraph(),Wh(r)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=Wh(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},e.prototype.updateLayout=function(r){this._active&&(J1(r.getGraph(),Wh(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var r=this._model,n=r.coordinateSystem;if(n.type==="view"){var i=Dse(r);if(i)return{bridge:i,coordSys:n}}},e.prototype._updateThumbnailWindow=function(){var r=this._getThumbnailInfo();r&&r.bridge.updateWindow(r.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(r,n,i,a){var o=this._getThumbnailInfo();if(o){var s=new _e,l=i.group.children(),u=a.group.children(),c=new _e,f=new _e;s.add(f),s.add(c);for(var h=0;h=0&&e.call(r,n[a],a)},t.prototype.eachEdge=function(e,r){for(var n=this.edges,i=n.length,a=0;a=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(r,n[a],a)},t.prototype.breadthFirstTraverse=function(e,r,n,i){if(r instanceof ul||(r=this._nodesMap[ju(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a=0&&!e.hasKey(p)&&(e.set(p,!0),o.push(v.node1))}for(l=0;l=0&&!e.hasKey(S)&&(e.set(S,!0),s.push(x.node2))}}}return{edge:e.keys(),node:r.keys()}},t}(),m6=function(){function t(e,r,n){this.dataIndex=-1,this.node1=e,this.node2=r,this.dataIndex=n??-1}return t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.edgeData.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},t.prototype.getTrajectoryDataIndices=function(){var e=ve(),r=ve();e.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a=0&&!e.hasKey(f)&&(e.set(f,!0),n.push(c.node1))}for(a=0;a=0&&!e.hasKey(g)&&(e.set(g,!0),i.push(p.node2))}return{edge:e.keys(),node:r.keys()}},t}();function y6(t,e){return{getValue:function(r){var n=this[t][e];return n.getStore().get(n.getDimensionIndex(r||"value"),this.dataIndex)},setVisual:function(r,n){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[t][e].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}Bt(ul,y6("hostGraph","data"));Bt(m6,y6("hostGraph","edgeData"));function KM(t,e,r,n,i){for(var a=new Ise(n),o=0;o "+h)),u++)}var v=r.get("coordinateSystem"),p;if(v==="cartesian2d"||v==="polar"||v==="matrix")p=Ta(t,r);else{var g=xf.get(v),m=g?g.dimensions||[]:[];Ee(m,"value")<0&&m.concat(["value"]);var y=Tf(t,{coordDimensions:m,encodeDefine:r.getEncode()}).dimensions;p=new Zr(y,r),p.initData(t)}var x=new Zr(["value"],r);return x.initData(l,s),i&&i(p,x),Qj({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var Ese=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new Pf(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(r){t.prototype.mergeDefaultAndTheme.apply(this,arguments),jl(r,"edgeLabel",["show"])},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){_se(this);var s=KM(a,i,this,!0,l);return N(s.edges,function(u){xse(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var g=o._categoriesModels,m=p.getShallow("category"),y=g[m];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var f=je.prototype.getModel;function h(p,g){var m=f.call(this,p,g);return m.resolveParentPath=v,m}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=v,p.getModel=h,p});function v(p){if(p&&(p[0]==="label"||p[1]==="label")){var g=p.slice();return p[0]==="label"?g[0]="edgeLabel":p[1]==="label"&&(g[1]="edgeLabel"),g}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(r,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=SF({series:this,dataIndex:r,multipleSeries:n});return f},e.prototype._updateCategoriesData=function(){var r=re(this.option.categories||[],function(i){return i.value!=null?i:J({value:0},i)}),n=new Zr(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:X.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:X.color.primary}}},e}(ht);function Rse(t){t.registerChartView(kse),t.registerSeriesModel(Ese),t.registerProcessor(dse),t.registerVisual(pse),t.registerVisual(gse),t.registerLayout(Sse),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,bse),t.registerLayout(Cse),t.registerCoordinateSystem("graphView",{dimensions:fu.dimensions,create:Lse}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Nt),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Nt),t.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",query:e},function(i){var a=n.getViewOfSeriesModel(i);a&&(e.dx!=null&&e.dy!=null&&a.updateViewOnPan(i,n,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&a.updateViewOnZoom(i,n,e));var o=i.coordinateSystem,s=e_(o,e,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var YR=function(t){$(e,t);function e(r,n,i){var a=t.call(this)||this;Ae(a).dataType="node",a.z2=2;var o=new Ye;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return e.prototype.updateData=function(r,n,i,a){var o=this,s=r.graph.getNodeByIndex(n),l=r.hostModel,u=s.getModel(),c=u.getModel("emphasis"),f=r.getItemLayout(n),h=J(ua(u.getModel("itemStyle"),f,!0),f),v=this;if(isNaN(h.startAngle)){v.setShape(h);return}a?v.setShape(h):Ke(v,{shape:h},l,n);var p=J(ua(u.getModel("itemStyle"),f,!0),f);o.setShape(p),o.useStyle(r.getItemVisual(n,"style")),ir(o,u),this._updateLabel(l,u,s),r.setItemGraphicEl(n,v),ir(v,u,"itemStyle");var g=c.get("focus");bt(this,g==="adjacency"?s.getAdjacentDataIndices():g,c.get("blurScope"),c.get("disabled"))},e.prototype._updateLabel=function(r,n,i){var a=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");a.ignore=!c.get("show");var f=ar(n),h=i.getVisual("style");vr(a,f,{labelFetcher:{getFormattedLabel:function(x,S,b,T,C,M){return r.getFormattedLabel(x,S,"node",T,mn(C,f.normal&&f.normal.get("formatter"),n.get("name")),M)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:h.fill,defaultOpacity:h.opacity,defaultOutsidePosition:"startArc"});var v=c.get("position")||"outside",p=c.get("distance")||0,g;v==="outside"?g=o.r+p:g=(o.r+o.r0)/2,this.textConfig={inside:v!=="outside"};var m=v!=="outside"?c.get("align")||"center":l>0?"left":"right",y=v!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";a.attr({x:l*g+o.cx,y:u*g+o.cy,rotation:0,style:{align:m,verticalAlign:y}})},e}(Rr),Nse=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this)||this;return Ae(o).dataType="edge",o.updateData(r,n,i,a,!0),o}return e.prototype.buildPath=function(r,n){r.moveTo(n.s1[0],n.s1[1]);var i=.7,a=n.clockwise;r.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!a),r.bezierCurveTo((n.cx-n.s2[0])*i+n.s2[0],(n.cy-n.s2[1])*i+n.s2[1],(n.cx-n.t1[0])*i+n.t1[0],(n.cy-n.t1[1])*i+n.t1[1],n.t1[0],n.t1[1]),r.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!a),r.bezierCurveTo((n.cx-n.t2[0])*i+n.t2[0],(n.cy-n.t2[1])*i+n.t2[1],(n.cx-n.s1[0])*i+n.s1[0],(n.cy-n.s1[1])*i+n.s1[1],n.s1[0],n.s1[1]),r.closePath()},e.prototype.updateData=function(r,n,i,a,o){var s=r.hostModel,l=n.graph.getEdgeByIndex(i),u=l.getLayout(),c=l.node1.getModel(),f=n.getItemModel(l.dataIndex),h=f.getModel("lineStyle"),v=f.getModel("emphasis"),p=v.get("focus"),g=J(ua(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(g.sStartAngle)||isNaN(g.tStartAngle)){m.setShape(g);return}o?(m.setShape(g),XR(m,l,r,h)):(li(m),XR(m,l,r,h),Ke(m,{shape:g},s,i)),bt(this,p==="adjacency"?l.getAdjacentDataIndices():p,v.get("blurScope"),v.get("disabled")),ir(m,f,"lineStyle"),n.setItemGraphicEl(l.dataIndex,m)},e}(He);function XR(t,e,r,n){var i=e.node1,a=e.node2,o=t.style;t.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=r.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=r.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"gradient":var l=r.getItemVisual(i.dataIndex,"style").fill,u=r.getItemVisual(a.dataIndex,"style").fill;if(se(l)&&se(u)){var c=t.shape,f=(c.s1[0]+c.s2[0])/2,h=(c.s1[1]+c.s2[1])/2,v=(c.t1[0]+c.t2[0])/2,p=(c.t1[1]+c.t2[1])/2;o.fill=new iu(f,h,v,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var Ose=Math.PI/180,zse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){},e.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group,l=-r.get("startAngle")*Ose;if(a.diff(o).add(function(c){var f=a.getItemLayout(c);if(f){var h=new YR(a,c,l);Ae(h).dataIndex=c,s.add(h)}}).update(function(c,f){var h=o.getItemGraphicEl(f),v=a.getItemLayout(c);if(!v){h&&Xa(h,r,f);return}h?h.updateData(a,c,l):h=new YR(a,c,l),s.add(h)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&Xa(f,r,c)}).execute(),!o){var u=r.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=oe(u[0],i.getWidth()),this.group.originY=oe(u[1],i.getHeight()),xt(this.group,{scaleX:1,scaleY:1},r)}this._data=a,this.renderEdges(r,l)},e.prototype.renderEdges=function(r,n){var i=r.getData(),a=r.getEdgeData(),o=this._edgeData,s=this.group;a.diff(o).add(function(l){var u=new Nse(i,a,l,n);Ae(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,a,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&Xa(u,r,l)}).execute(),this._edgeData=a},e.prototype.dispose=function(){},e.type="chord",e}(lt),Bse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this.legendVisualProvider=new Pf(le(this.getData,this),le(this.getRawData,this))},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links)},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[];if(a&&i){var o=KM(a,i,this,!0,s);return o.data}function s(l,u){var c=je.prototype.getModel;function f(v,p){var g=c.call(this,v,p);return g.resolveParentPath=h,g}u.wrapMethod("getItemModel",function(v){return v.resolveParentPath=h,v.getModel=f,v});function h(v){if(v&&(v[0]==="label"||v[1]==="label")){var p=v.slice();return v[0]==="label"?p[0]="edgeLabel":v[1]==="label"&&(p[1]="edgeLabel"),p}return v}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){var a=this.getDataParams(r,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(r),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:a.value,noValue:a.value==null})}return Kt("nameValue",{name:a.name,value:a.value,noValue:a.value==null})},e.prototype.getDataParams=function(r,n){var i=t.prototype.getDataParams.call(this,r,n);if(n==="node"){var a=this.getData(),o=this.getGraph().getNodeByIndex(r);if(i.name==null&&(i.name=a.getName(r)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},e.type="series.chord",e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e}(ht),eS=Math.PI/180;function Vse(t,e){t.eachSeriesByType("chord",function(r){Fse(r,e)})}function Fse(t,e){var r=t.getData(),n=r.graph,i=t.getEdgeData(),a=i.count();if(a){var o=FV(t,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=Math.max((t.get("padAngle")||0)*eS,0),h=Math.max((t.get("minAngle")||0)*eS,0),v=-t.get("startAngle")*eS,p=v+Math.PI*2,g=t.get("clockwise"),m=g?1:-1,y=[v,p];O0(y,!g);var x=y[0],S=y[1],b=S-x,T=r.getSum("value")===0&&i.getSum("value")===0,C=[],M=0;n.eachEdge(function(V){var W=T?1:V.getValue("value");T&&(W>0||h)&&(M+=2);var H=V.node1.dataIndex,Y=V.node2.dataIndex;C[H]=(C[H]||0)+W,C[Y]=(C[Y]||0)+W});var D=0;if(n.eachNode(function(V){var W=V.getValue("value");isNaN(W)||(C[V.dataIndex]=Math.max(W,C[V.dataIndex]||0)),!T&&(C[V.dataIndex]>0||h)&&M++,D+=C[V.dataIndex]||0}),!(M===0||D===0)){f*M>=Math.abs(b)&&(f=Math.max(0,(Math.abs(b)-h*M)/M)),(f+h)*M>=Math.abs(b)&&(h=(Math.abs(b)-f*M)/M);var I=(b-f*M*m)/D,k=0,E=0,z=0;n.eachNode(function(V){var W=C[V.dataIndex]||0,H=I*(D?W:1)*m;Math.abs(H)E){var F=k/E;n.eachNode(function(V){var W=V.getLayout().angle;Math.abs(W)>=h?V.setLayout({angle:W*F,ratio:F},!0):V.setLayout({angle:h,ratio:h===0?1:W/h},!0)})}else n.eachNode(function(V){if(!O){var W=V.getLayout().angle,H=Math.min(W/z,1),Y=H*k;W-Yh&&h>0){var H=O?1:Math.min(W/z,1),Y=W-h,K=Math.min(Y,Math.min(j,k*H));j-=K,V.setLayout({angle:W-K,ratio:(W-K)/W},!0)}else h>0&&V.setLayout({angle:h,ratio:W===0?1:h/W},!0)}});var G=x,Z=[];n.eachNode(function(V){var W=Math.max(V.getLayout().angle,h);V.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:G,endAngle:G+W*m,clockwise:g},!0),Z[V.dataIndex]=G,G+=(W+f)*m}),n.eachEdge(function(V){var W=T?1:V.getValue("value"),H=I*(D?W:1)*m,Y=V.node1.dataIndex,K=Z[Y]||0,ne=Math.abs((V.node1.getLayout().ratio||1)*H),ie=K+ne*m,ue=[s+c*Math.cos(K),l+c*Math.sin(K)],de=[s+c*Math.cos(ie),l+c*Math.sin(ie)],Fe=V.node2.dataIndex,xe=Z[Fe]||0,ge=Math.abs((V.node2.getLayout().ratio||1)*H),De=xe+ge*m,he=[s+c*Math.cos(xe),l+c*Math.sin(xe)],Me=[s+c*Math.cos(De),l+c*Math.sin(De)];V.setLayout({s1:ue,s2:de,sStartAngle:K,sEndAngle:ie,t1:he,t2:Me,tStartAngle:xe,tEndAngle:De,cx:s,cy:l,r:c,value:W,clockwise:g}),Z[Y]=ie,Z[Fe]=De})}}}function Gse(t){t.registerChartView(zse),t.registerSeriesModel(Bse),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,Vse),t.registerProcessor(Lf("chord"))}var jse=function(){function t(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return t}(),Hse=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new jse},e.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,c),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,c)},e}(He);function Wse(t,e){var r=t.get("center"),n=e.getWidth(),i=e.getHeight(),a=Math.min(n,i),o=oe(r[0],e.getWidth()),s=oe(r[1],e.getHeight()),l=oe(t.get("radius"),a/2);return{cx:o,cy:s,r:l}}function bg(t,e){var r=t==null?"":t+"";return e&&(se(e)?r=e.replace("{value}",r):me(e)&&(r=e(t))),r}var Use=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=Wse(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,c=-r.get("endAngle")/180*Math.PI,f=r.getModel("axisLine"),h=f.get("roundCap"),v=h?Ey:Rr,p=f.get("show"),g=f.getModel("lineStyle"),m=g.get("width"),y=[u,c];O0(y,!l),u=y[0],c=y[1];for(var x=c-u,S=u,b=[],T=0;p&&T=I&&(k===0?0:a[k-1][0])Math.PI/2&&(ie+=Math.PI)):ne==="tangential"?ie=-D-Math.PI/2:Xe(ne)&&(ie=ne*Math.PI/180),ie===0?f.add(new Ye({style:dt(S,{text:W,x:Y,y:K,verticalAlign:j<-.8?"top":j>.8?"bottom":"middle",align:F<-.4?"left":F>.4?"right":"center"},{inheritColor:H}),silent:!0})):f.add(new Ye({style:dt(S,{text:W,x:Y,y:K,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:Y,originY:K,rotation:ie}))}if(x.get("show")&&G!==b){var Z=x.get("distance");Z=Z?Z+c:c;for(var ue=0;ue<=T;ue++){F=Math.cos(D),j=Math.sin(D);var de=new Wt({shape:{x1:F*(p-Z)+h,y1:j*(p-Z)+v,x2:F*(p-M-Z)+h,y2:j*(p-M-Z)+v},silent:!0,style:z});z.stroke==="auto"&&de.setStyle({stroke:a((G+ue/T)/b)}),f.add(de),D+=k}D-=k}else D+=I}},e.prototype._renderPointer=function(r,n,i,a,o,s,l,u,c){var f=this.group,h=this._data,v=this._progressEls,p=[],g=r.get(["pointer","show"]),m=r.getModel("progress"),y=m.get("show"),x=r.getData(),S=x.mapDimension("value"),b=+r.get("min"),T=+r.get("max"),C=[b,T],M=[s,l];function D(k,E){var z=x.getItemModel(k),O=z.getModel("pointer"),F=oe(O.get("width"),o.r),j=oe(O.get("length"),o.r),G=r.get(["pointer","icon"]),Z=O.get("offsetCenter"),V=oe(Z[0],o.r),W=oe(Z[1],o.r),H=O.get("keepAspect"),Y;return G?Y=Ut(G,V-F/2,W-j,F,j,null,H):Y=new Hse({shape:{angle:-Math.PI/2,width:F,r:j,x:V,y:W}}),Y.rotation=-(E+Math.PI/2),Y.x=o.cx,Y.y=o.cy,Y}function I(k,E){var z=m.get("roundCap"),O=z?Ey:Rr,F=m.get("overlap"),j=F?m.get("width"):c/x.count(),G=F?o.r-j:o.r-(k+1)*j,Z=F?o.r:o.r-k*j,V=new O({shape:{startAngle:s,endAngle:E,cx:o.cx,cy:o.cy,clockwise:u,r0:G,r:Z}});return F&&(V.z2=rt(x.get(S,k),[b,T],[100,0],!0)),V}(y||g)&&(x.diff(h).add(function(k){var E=x.get(S,k);if(g){var z=D(k,s);xt(z,{rotation:-((isNaN(+E)?M[0]:rt(E,C,M,!0))+Math.PI/2)},r),f.add(z),x.setItemGraphicEl(k,z)}if(y){var O=I(k,s),F=m.get("clip");xt(O,{shape:{endAngle:rt(E,C,M,F)}},r),f.add(O),pb(r.seriesIndex,x.dataType,k,O),p[k]=O}}).update(function(k,E){var z=x.get(S,k);if(g){var O=h.getItemGraphicEl(E),F=O?O.rotation:s,j=D(k,F);j.rotation=F,Ke(j,{rotation:-((isNaN(+z)?M[0]:rt(z,C,M,!0))+Math.PI/2)},r),f.add(j),x.setItemGraphicEl(k,j)}if(y){var G=v[E],Z=G?G.shape.endAngle:s,V=I(k,Z),W=m.get("clip");Ke(V,{shape:{endAngle:rt(z,C,M,W)}},r),f.add(V),pb(r.seriesIndex,x.dataType,k,V),p[k]=V}}).execute(),x.each(function(k){var E=x.getItemModel(k),z=E.getModel("emphasis"),O=z.get("focus"),F=z.get("blurScope"),j=z.get("disabled");if(g){var G=x.getItemGraphicEl(k),Z=x.getItemVisual(k,"style"),V=Z.fill;if(G instanceof dr){var W=G.style;G.useStyle(J({image:W.image,x:W.x,y:W.y,width:W.width,height:W.height},Z))}else G.useStyle(Z),G.type!=="pointer"&&G.setColor(V);G.setStyle(E.getModel(["pointer","itemStyle"]).getItemStyle()),G.style.fill==="auto"&&G.setStyle("fill",a(rt(x.get(S,k),C,[0,1],!0))),G.z2EmphasisLift=0,ir(G,E),bt(G,O,F,j)}if(y){var H=p[k];H.useStyle(x.getItemVisual(k,"style")),H.setStyle(E.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,ir(H,E),bt(H,O,F,j)}}),this._progressEls=p)},e.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=Ut(s,n.cx-o/2+oe(l[0],n.r),n.cy-o/2+oe(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),c=+r.get("min"),f=+r.get("max"),h=new _e,v=[],p=[],g=r.isAnimationEnabled(),m=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){v[y]=new Ye({silent:!0}),p[y]=new Ye({silent:!0})}).update(function(y,x){v[y]=s._titleEls[x],p[y]=s._detailEls[x]}).execute(),l.each(function(y){var x=l.getItemModel(y),S=l.get(u,y),b=new _e,T=a(rt(S,[c,f],[0,1],!0)),C=x.getModel("title");if(C.get("show")){var M=C.get("offsetCenter"),D=o.cx+oe(M[0],o.r),I=o.cy+oe(M[1],o.r),k=v[y];k.attr({z2:m?0:2,style:dt(C,{x:D,y:I,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:T})}),b.add(k)}var E=x.getModel("detail");if(E.get("show")){var z=E.get("offsetCenter"),O=o.cx+oe(z[0],o.r),F=o.cy+oe(z[1],o.r),j=oe(E.get("width"),o.r),G=oe(E.get("height"),o.r),Z=r.get(["progress","show"])?l.getItemVisual(y,"style").fill:T,k=p[y],V=E.get("formatter");k.attr({z2:m?0:2,style:dt(E,{x:O,y:F,text:bg(S,V),width:isNaN(j)?null:j,height:isNaN(G)?null:G,align:"center",verticalAlign:"middle"},{inheritColor:Z})}),wV(k,{normal:E},S,function(H){return bg(H,V)}),g&&bV(k,y,l,r,{getFormattedLabel:function(H,Y,K,ne,ie,ue){return bg(ue?ue.interpolatedValue:S,V)}}),b.add(k)}h.add(b)}),this.group.add(h),this._titleEls=v,this._detailEls=p},e.type="gauge",e}(lt),Zse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="itemStyle",r}return e.prototype.getInitialData=function(r,n){return Af(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,X.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:X.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:X.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:X.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:X.color.neutral00,borderWidth:0,borderColor:X.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:X.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:X.color.transparent,borderWidth:0,borderColor:X.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:X.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(ht);function $se(t){t.registerChartView(Use),t.registerSeriesModel(Zse)}var Yse=["itemStyle","opacity"],Xse=function(t){$(e,t);function e(r,n){var i=t.call(this)||this,a=i,o=new br,s=new Ye;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return e.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(Yse);c=c??1,i||li(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,xt(a,{style:{opacity:c}},o,n)):Ke(a,{style:{opacity:c},shape:{points:l.points}},o,n),ir(a,s),this._updateLabel(r,n),bt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),c=u.label,f=r.getItemVisual(n,"style"),h=f.fill;vr(o,ar(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:r.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var v=l.getModel("label"),p=v.get("color"),g=p==="inherit"?h:null;i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:g,outsideFill:g});var m=c.linePoints;a.setShape({points:m}),i.textGuideLineConfig={anchor:m?new Te(m[0][0],m[0][1]):null},Ke(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),TM(i,CM(l),{stroke:h})},e}(Nr),qse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new Xse(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);Xa(u,r,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(lt),Kse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Pf(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.getInitialData=function(r,n){return Af(this,{coordDimensions:["value"],encodeDefaulter:Ie(Q2,this)})},e.prototype._defaultLabelLine=function(r){jl(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.prototype.getDataParams=function(r){var n=this.getData(),i=t.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:X.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:X.color.primary}}},e}(ht);function Qse(t,e){for(var r=t.mapDimension("value"),n=t.mapArray(r,function(l){return l}),i=[],a=e==="ascending",o=0,s=t.count();odle)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!(this._mouseDownPoint||!rS(this,"mousemove"))){var e=this._model,r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function rS(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}var mle=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(r){var n=this.option;r&&Re(n,r,!0),this._initDimensions()},e.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(r){N(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},e.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=Je(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);N(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Be),yle=function(t){$(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(fi);function ds(t,e,r,n,i,a){t=t||0;var o=r[1]-r[0];if(i!=null&&(i=Hu(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Hu(s,[0,o]),i=a=Hu(s,[i,a]),n=0}e[0]=Hu(e[0],r),e[1]=Hu(e[1],r);var l=nS(e,n);e[n]+=t;var u=i||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Hu(e[n],c);var f;return f=nS(e,n),i!=null&&(f.sign!==l.sign||f.spana&&(e[1-n]=e[n]+f.sign*a),e}function nS(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function Hu(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var iS=N,x6=Math.min,S6=Math.max,QR=Math.floor,_le=Math.ceil,JR=Ht,xle=Math.PI,Sle=function(){function t(e,r,n){this.type="parallel",this._axesMap=ve(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,r,n)}return t.prototype._init=function(e,r,n){var i=e.dimensions,a=e.parallelAxisIndex;iS(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new yle(o,Od(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},t.prototype.update=function(e,r){this._updateAxesFromSeries(this._model,e)},t.prototype.containPoint=function(e){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=e[1-a],s=e[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(e,r){r.eachSeries(function(n){if(e.contains(n,r)){var i=n.getData();iS(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),Xl(o.scale,o.model)},this)}},this)},t.prototype.resize=function(e,r){var n=or(e,r).refContainer;this._rect=St(e.getBoxLayoutParams(),n),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var e=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,c=Tg(e.get("axisExpandWidth"),l),f=Tg(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,v=e.get("axisExpandWindow"),p;if(v)p=Tg(v[1]-v[0],l),v[1]=v[0]+p;else{p=Tg(c*(f-1),l);var g=e.get("axisExpandCenter")||QR(u/2);v=[c*g-p/2],v[1]=v[0]+p}var m=(s-p)/(u-f);m<3&&(m=0);var y=[QR(JR(v[0]/c,1))+1,_le(JR(v[1]/c,1))-1],x=m/c*v[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:v,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:x}},t.prototype._layoutAxes=function(){var e=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),iS(n,function(o,s){var l=(i.axisExpandable?ble:wle)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:xle/2,vertical:0},f=[u[a].x+e.x,u[a].y+e.y],h=c[a],v=fr();ho(v,v,h),Ii(v,v,f),this._axesLayout[o]={position:f,rotation:h,transform:v,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(e){return this._axesMap.get(e)},t.prototype.dataToPoint=function(e,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(e),r)},t.prototype.eachActiveState=function(e,r,n,i){n==null&&(n=0),i==null&&(i=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];N(o,function(m){s.push(e.mapDimension(m)),l.push(a.get(m).model)});for(var u=this.hasAxisBrushed(),c=n;ca*(1-f[0])?(u="jump",l=s-a*(1-f[2])):(l=s-a*f[1])>=0&&(l=s-a*(1-f[1]))<=0&&(l=0),l*=r.axisExpandWidth/c,l?ds(l,i,o,"all"):u="none";else{var v=i[1]-i[0],p=o[1]*s/v;i=[S6(0,p-v/2)],i[1]=x6(o[1],i[0]+v),i[0]=i[1]-v}return{axisExpandWindow:i,behavior:u}},t}();function Tg(t,e){return x6(S6(t,e[0]),e[1])}function wle(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function ble(t,e){var r=e.layoutLength,n=e.axisExpandWidth,i=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,c;return t=0;i--)Ln(n[i])},e.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;aAle}function L6(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function A6(t,e,r,n){var i=new _e;return i.add(new ze({name:"main",style:rL(r),silent:!0,draggable:!0,cursor:"move",drift:Ie(rN,t,e,i,["n","s","w","e"]),ondragend:Ie(Kl,e,{isEnd:!0})})),N(n,function(a){i.add(new ze({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ie(rN,t,e,i,a),ondragend:Ie(Kl,e,{isEnd:!0})}))}),i}function P6(t,e,r,n){var i=n.brushStyle.lineWidth||0,a=tf(i,Ple),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,c=r[0][1],f=r[1][1],h=c-a+i/2,v=f-a+i/2,p=c-o,g=f-s,m=p+i,y=g+i;Ea(t,e,"main",o,s,p,g),n.transformable&&(Ea(t,e,"w",l,u,a,y),Ea(t,e,"e",h,u,a,y),Ea(t,e,"n",l,u,m,a),Ea(t,e,"s",l,v,m,a),Ea(t,e,"nw",l,u,a,a),Ea(t,e,"ne",h,u,a,a),Ea(t,e,"sw",l,v,a,a),Ea(t,e,"se",h,v,a,a))}function wT(t,e){var r=e.__brushOption,n=r.transformable,i=e.childAt(0);i.useStyle(rL(r)),i.attr({silent:!n,cursor:n?"move":"default"}),N([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?bT(t,a[0]):Nle(t,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?kle[s]+"-resize":null})})}function Ea(t,e,r,n,i,a,o){var s=e.childOfName(r);s&&s.setShape(zle(nL(t,e,[[n,i],[n+a,i+o]])))}function rL(t){return Se({strokeNoScale:!0},t.brushStyle)}function D6(t,e,r,n){var i=[fd(t,r),fd(e,n)],a=[tf(t,r),tf(e,n)];return[[i[0],a[0]],[i[1],a[1]]]}function Rle(t){return is(t.group)}function bT(t,e){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=F0(r[e],Rle(t));return n[i]}function Nle(t,e){var r=[bT(t,e[0]),bT(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function rN(t,e,r,n,i,a){var o=r.__brushOption,s=t.toRectRange(o.range),l=k6(e,i,a);N(n,function(u){var c=Dle[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=t.fromRectRange(D6(s[0][0],s[1][0],s[0][1],s[1][1])),JM(e,r),Kl(e,{isEnd:!1})}function Ole(t,e,r,n){var i=e.__brushOption.range,a=k6(t,r,n);N(i,function(o){o[0]+=a[0],o[1]+=a[1]}),JM(t,e),Kl(t,{isEnd:!1})}function k6(t,e,r){var n=t.group,i=n.transformCoordToLocal(e,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function nL(t,e,r){var n=M6(t,e);return n&&n!==ql?n.clipPath(r,t._transform):ye(r)}function zle(t){var e=fd(t[0][0],t[1][0]),r=fd(t[0][1],t[1][1]),n=tf(t[0][0],t[1][0]),i=tf(t[0][1],t[1][1]);return{x:e,y:r,width:n-e,height:i-r}}function Ble(t,e,r){if(!(!t._brushType||Fle(t,e.offsetX,e.offsetY))){var n=t._zr,i=t._covers,a=tL(t,e,r);if(!t._dragging)for(var o=0;on.getWidth()||r<0||r>n.getHeight()}var i_={lineX:aN(0),lineY:aN(1),rect:{createCover:function(t,e){function r(n){return n}return A6({toRectRange:r,fromRectRange:r},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=L6(t);return D6(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,n){P6(t,e,r,n)},updateCommon:wT,contain:CT},polygon:{createCover:function(t,e){var r=new _e;return r.add(new br({name:"main",style:rL(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Nr({name:"main",draggable:!0,drift:Ie(Ole,t,e),ondragend:Ie(Kl,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,n){e.childAt(0).setShape({points:nL(t,e,r)})},updateCommon:wT,contain:CT}};function aN(t){return{createCover:function(e,r){return A6({toRectRange:function(n){var i=[n,[0,100]];return t&&i.reverse(),i},fromRectRange:function(n){return n[t]}},e,r,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var r=L6(e),n=fd(r[0][t],r[1][t]),i=tf(r[0][t],r[1][t]);return[n,i]},updateCoverShape:function(e,r,n,i){var a,o=M6(e,r);if(o!==ql&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(t);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,a];t&&l.reverse(),P6(e,r,l,i)},updateCommon:wT,contain:CT}}function E6(t){return t=iL(t),function(e){return E2(e,t)}}function R6(t,e){return t=iL(t),function(r){var n=e??r,i=n?t.width:t.height,a=n?t.x:t.y;return[a,a+(i||0)]}}function N6(t,e,r){var n=iL(t);return function(i,a){return n.contain(a[0],a[1])&&!Fj(i,e,r)}}function iL(t){return Ce.create(t)}var Gle=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){t.prototype.init.apply(this,arguments),(this._brushController=new QM(n.getZr())).on("brush",le(this._onBrush,this))},e.prototype.render=function(r,n,i,a){if(!jle(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new _e,this.group.add(this._axisGroup),!!r.get("show")){var s=Wle(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),c=u.width,f=r.axis.dim,h=l.getAxisLayout(f),v=J({strokeContainThreshold:c},h),p=new tn(r,i,v);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(v,u,r,s,c,i),Id(o,this._axisGroup,r)}}},e.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=Ce.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:E6(f),isTargetByCursor:N6(f,s,a),getLinearBrushOtherExtent:R6(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(Hle(i))},e.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=re(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(gt);function jle(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function Hle(t){var e=t.axis;return re(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function Wle(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var Ule={type:"axisAreaSelect",event:"axisAreaSelected"};function Zle(t){t.registerAction(Ule,function(e,r){r.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),t.registerAction("parallelAxisExpand",function(e,r){r.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var $le={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function O6(t){t.registerComponentView(ple),t.registerComponentModel(mle),t.registerCoordinateSystem("parallel",Cle),t.registerPreprocessor(fle),t.registerComponentModel(xT),t.registerComponentView(Gle),Jc(t,"parallel",xT,$le),Zle(t)}function Yle(t){Oe(O6),t.registerChartView(nle),t.registerSeriesModel(ole),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,cle)}var Xle=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return t}(),qle=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Xle},e.prototype.buildPath=function(r,n){var i=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},e.prototype.highlight=function(){ao(this)},e.prototype.downplay=function(){oo(this)},e}(He),Kle=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._mainGroup=new _e,r._focusAdjacencyDisabled=!1,r}return e.prototype.init=function(r,n){this._controller=new cu(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this._mainGroup,l=r.layoutInfo,u=l.width,c=l.height,f=r.getData(),h=r.getData("edge"),v=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(r,i),Gj(r,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(p){var g=new qle,m=Ae(g);m.dataIndex=p.dataIndex,m.seriesIndex=r.seriesIndex,m.dataType="edge";var y=p.getModel(),x=y.getModel("lineStyle"),S=x.get("curveness"),b=p.node1.getLayout(),T=p.node1.getModel(),C=T.get("localX"),M=T.get("localY"),D=p.node2.getLayout(),I=p.node2.getModel(),k=I.get("localX"),E=I.get("localY"),z=p.getLayout(),O,F,j,G,Z,V,W,H;g.shape.extent=Math.max(1,z.dy),g.shape.orient=v,v==="vertical"?(O=(C!=null?C*u:b.x)+z.sy,F=(M!=null?M*c:b.y)+b.dy,j=(k!=null?k*u:D.x)+z.ty,G=E!=null?E*c:D.y,Z=O,V=F*(1-S)+G*S,W=j,H=F*S+G*(1-S)):(O=(C!=null?C*u:b.x)+b.dx,F=(M!=null?M*c:b.y)+z.sy,j=k!=null?k*u:D.x,G=(E!=null?E*c:D.y)+z.ty,Z=O*(1-S)+j*S,V=F,W=O*S+j*(1-S),H=G),g.setShape({x1:O,y1:F,x2:j,y2:G,cpx1:Z,cpy1:V,cpx2:W,cpy2:H}),g.useStyle(x.getItemStyle()),oN(g.style,v,p);var Y=""+y.get("value"),K=ar(y,"edgeLabel");vr(g,K,{labelFetcher:{getFormattedLabel:function(ue,de,Fe,xe,ge,De){return r.getFormattedLabel(ue,de,"edge",xe,mn(ge,K.normal&&K.normal.get("formatter"),Y),De)}},labelDataIndex:p.dataIndex,defaultText:Y}),g.setTextConfig({position:"inside"});var ne=y.getModel("emphasis");ir(g,y,"lineStyle",function(ue){var de=ue.getItemStyle();return oN(de,v,p),de}),s.add(g),h.setItemGraphicEl(p.dataIndex,g);var ie=ne.get("focus");bt(g,ie==="adjacency"?p.getAdjacentDataIndices():ie==="trajectory"?p.getTrajectoryDataIndices():ie,ne.get("blurScope"),ne.get("disabled"))}),o.eachNode(function(p){var g=p.getLayout(),m=p.getModel(),y=m.get("localX"),x=m.get("localY"),S=m.getModel("emphasis"),b=m.get(["itemStyle","borderRadius"])||0,T=new ze({shape:{x:y!=null?y*u:g.x,y:x!=null?x*c:g.y,width:g.dx,height:g.dy,r:b},style:m.getModel("itemStyle").getItemStyle(),z2:10});vr(T,ar(m),{labelFetcher:{getFormattedLabel:function(M,D){return r.getFormattedLabel(M,D,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),T.disableLabelAnimation=!0,T.setStyle("fill",p.getVisual("color")),T.setStyle("decal",p.getVisual("style").decal),ir(T,m),s.add(T),f.setItemGraphicEl(p.dataIndex,T),Ae(T).dataType="node";var C=S.get("focus");bt(T,C==="adjacency"?p.getAdjacentDataIndices():C==="trajectory"?p.getTrajectoryDataIndices():C,S.get("blurScope"),S.get("disabled"))}),f.eachItemGraphicEl(function(p,g){var m=f.getItemModel(g);m.get("draggable")&&(p.drift=function(y,x){a._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=x,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:f.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(Qle(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(r,n){var i=r.layoutInfo,a=i.width,o=i.height,s=r.coordinateSystem=new fu(null,{api:n,ecModel:r.ecModel});s.zoomLimit=r.get("scaleLimit"),s.setBoundingRect(0,0,a,o),s.setCenter(r.get("center")),s.setZoom(r.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e}(lt);function oN(t,e,r){switch(t.fill){case"source":t.fill=r.node1.getVisual("color"),t.decal=r.node1.getVisual("style").decal;break;case"target":t.fill=r.node2.getVisual("color"),t.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");se(n)&&se(i)&&(t.fill=new iu(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function Qle(t,e,r){var n=new ze({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return xt(n,{shape:{width:t.width+20}},e,r),n}var Jle=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=r.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new je(o[l],this,n));var u=KM(a,i,this,!0,c);return u.data;function c(f,h){f.wrapMethod("getItemModel",function(v,p){var g=v.parentModel,m=g.getData().getItemLayout(p);if(m){var y=m.depth,x=g.levelModels[y];x&&(v.parentModel=x)}return v}),h.wrapMethod("getItemModel",function(v,p){var g=v.parentModel,m=g.getGraph().getEdgeByIndex(p),y=m.node1.getLayout();if(y){var x=y.depth,S=g.levelModels[x];S&&(v.parentModel=S)}return v})}},e.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){function a(v){return isNaN(v)||v==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Kt("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(r),f=c.getLayout().value,h=this.getDataParams(r,i).data.name;return Kt("nameValue",{name:h!=null?h+"":null,value:f,noValue:a(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(r,n){var i=t.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},e.type="series.sankey",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:X.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:X.color.primary}},animationEasing:"linear",animationDuration:1e3},e}(ht);function eue(t,e){t.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=or(r,e).refContainer,o=St(r.getBoxLayoutParams(),a);r.layoutInfo=o;var s=o.width,l=o.height,u=r.getGraph(),c=u.nodes,f=u.edges;rue(c);var h=Je(c,function(m){return m.getLayout().value===0}),v=h.length!==0?0:r.get("layoutIterations"),p=r.get("orient"),g=r.get("nodeAlign");tue(c,f,n,i,s,l,v,p,g)})}function tue(t,e,r,n,i,a,o,s,l){nue(t,e,r,i,a,s,l),sue(t,e,a,i,n,o,s),gue(t,s)}function rue(t){N(t,function(e){var r=ss(e.outEdges,Gy),n=ss(e.inEdges,Gy),i=e.getValue()||0,a=Math.max(r,n,i);e.setLayout({value:a},!0)})}function nue(t,e,r,n,i,a,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h=0;y&&m.depth>v&&(v=m.depth),g.setLayout({depth:y?m.depth:f},!0),a==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var x=0;xf-1?v:f-1;o&&o!=="left"&&iue(t,o,a,M);var D=a==="vertical"?(i-r)/M:(n-r)/M;oue(t,D,a)}function z6(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function iue(t,e,r,n){if(e==="right"){for(var i=[],a=t,o=0;a.length;){for(var s=0;s0;a--)l*=.99,cue(s,l,o),aS(s,i,r,n,o),pue(s,l,o),aS(s,i,r,n,o)}function lue(t,e){var r=[],n=e==="vertical"?"y":"x",i=cb(t,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),N(i.keys,function(a){r.push(i.buckets.get(a))}),r}function uue(t,e,r,n,i,a){var o=1/0;N(t,function(s){var l=s.length,u=0;N(s,function(f){u+=f.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;c0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[h]+e;var p=i==="vertical"?n:r;if(u=c-e-p,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var v=f-2;v>=0;--v)l=o[v],u=l.getLayout()[a]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function cue(t,e,r){N(t.slice().reverse(),function(n){N(n,function(i){if(i.outEdges.length){var a=ss(i.outEdges,fue,r)/ss(i.outEdges,Gy);if(isNaN(a)){var o=i.outEdges.length;a=o?ss(i.outEdges,hue,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-ps(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-ps(i,r))*e;i.setLayout({y:l},!0)}}})})}function fue(t,e){return ps(t.node2,e)*t.getValue()}function hue(t,e){return ps(t.node2,e)}function vue(t,e){return ps(t.node1,e)*t.getValue()}function due(t,e){return ps(t.node1,e)}function ps(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Gy(t){return t.getValue()}function ss(t,e,r){for(var n=0,i=t.length,a=-1;++ao&&(o=l)}),N(n,function(s){var l=new hr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&N(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function yue(t){t.registerChartView(Kle),t.registerSeriesModel(Jle),t.registerLayout(eue),t.registerVisual(mue),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),t.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){var a=i.coordinateSystem,o=e_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var B6=function(){function t(){}return t.prototype._hasEncodeRule=function(e){var r=this.getEncode();return r&&r.get(e)!=null},t.prototype.getInitialData=function(e,r){var n,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],v=[i,a],p=v[c].get("type"),g=v[1-c].get("type"),m=e.data;if(m&&l){var y=[];N(m,function(b,T){var C;ee(b)?(C=b.slice(),b.unshift(T)):ee(b.value)?(C=J({},b),C.value=C.value.slice(),b.value.unshift(T)):C=b,y.push(C)}),e.data=y}var x=this.defaultValueDimensions,S=[{name:f,type:Ty(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Ty(g),dimsDef:x.slice()}];return Af(this,{coordDimensions:S,dimensionsCount:x.length+1,encodeDefaulter:Ie(YV,S,this)})},t.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},t}(),V6=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:X.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:X.color.shadow}},animationDuration:800},e}(ht);Bt(V6,B6,!0);var _ue=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),f=sN(c,a,u,l,!0);a.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(f);return}var h=a.getItemLayout(u);f?(li(f),F6(h,f,a,u)):f=sN(h,a,u,l),o.add(f),a.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},e.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},e.type="boxplot",e}(lt),xue=function(){function t(){}return t}(),Sue=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new xue},e.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();ag){var b=[y,S];n.push(b)}}}return{boxData:r,outliers:n}}var Aue={type:"echarts:boxplot",transform:function(e){var r=e.upstream;if(r.sourceFormat!==Tr){var n="";nt(n)}var i=Lue(r.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function Pue(t){t.registerSeriesModel(V6),t.registerChartView(_ue),t.registerLayout(bue),t.registerTransform(Aue)}var Due=["itemStyle","borderColor"],kue=["itemStyle","borderColor0"],Iue=["itemStyle","borderColorDoji"],Eue=["itemStyle","color"],Rue=["itemStyle","color0"];function aL(t,e){return e.get(t>0?Eue:Rue)}function oL(t,e){return e.get(t===0?Iue:t>0?Due:kue)}var Nue={seriesType:"candlestick",plan:Sf(),performRawSeries:!0,reset:function(t,e){if(!e.isSeriesFiltered(t)){var r=t.pipelineContext.large;return!r&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=aL(s,o),l.stroke=oL(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");J(u,l)}}}}}},Oue=["color","borderColor"],zue=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},e.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},e.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},e.prototype.eachRendered=function(r){ws(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r){var n=r.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&lN(u,f))return;var h=oS(f,c,!0);xt(h,{shape:{points:f.ends}},r,c),sS(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=i.getItemGraphicEl(f);if(!n.hasValue(c)){a.remove(h);return}var v=n.getItemLayout(c);if(s&&lN(u,v)){a.remove(h);return}h?(Ke(h,{shape:{points:v.ends}},r,c),li(h)):h=oS(v),sS(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=i.getItemGraphicEl(c);f&&a.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(r){this._clear(),uN(r,this.group);var n=r.get("clip",!0)?Vd(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=oS(s);sS(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(r,n){uN(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(r){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(lt),Bue=function(){function t(){}return t}(),Vue=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new Bue},e.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},e}(He);function oS(t,e,r){var n=t.ends;return new Vue({shape:{points:r?Fue(n,t):n},z2:100})}function lN(t,e){for(var r=!0,n=0;nT?E[a]:k[a],ends:F,brushRect:W(C,M,S)})}function Z(Y,K){var ne=[];return ne[i]=K,ne[a]=Y,isNaN(K)||isNaN(Y)?[NaN,NaN]:e.dataToPoint(ne)}function V(Y,K,ne){var ie=K.slice(),ue=K.slice();ie[i]=lm(ie[i]+n/2,1,!1),ue[i]=lm(ue[i]-n/2,1,!0),ne?Y.push(ie,ue):Y.push(ue,ie)}function W(Y,K,ne){var ie=Z(Y,ne),ue=Z(K,ne);return ie[i]-=n/2,ue[i]-=n/2,{x:ie[0],y:ie[1],width:n,height:ue[1]-ie[1]}}function H(Y){return Y[i]=lm(Y[i],1),Y}}function p(g,m){for(var y=sa(g.count*4),x=0,S,b=[],T=[],C,M=m.getStore(),D=!!t.get(["itemStyle","borderColorDoji"]);(C=g.next())!=null;){var I=M.get(s,C),k=M.get(u,C),E=M.get(c,C),z=M.get(f,C),O=M.get(h,C);if(isNaN(I)||isNaN(z)||isNaN(O)){y[x++]=NaN,x+=3;continue}y[x++]=cN(M,C,k,E,c,D),b[i]=I,b[a]=z,S=e.dataToPoint(b,null,T),y[x++]=S?S[0]:NaN,y[x++]=S?S[1]:NaN,b[a]=O,S=e.dataToPoint(b,null,T),y[x++]=S?S[1]:NaN}m.setLayout("largePoints",y)}}};function cN(t,e,r,n,i,a){var o;return r>n?o=-1:r0?t.get(i,e-1)<=n?1:-1:1,o}function Wue(t,e){var r=t.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/e.count()),a=oe(pe(t.get("barMaxWidth"),i),i),o=oe(pe(t.get("barMinWidth"),1),i),s=t.get("barWidth");return s!=null?oe(s,i):Math.max(Math.min(i/2,a),o)}function Uue(t){t.registerChartView(zue),t.registerSeriesModel(G6),t.registerPreprocessor(jue),t.registerVisual(Nue),t.registerLayout(Hue)}function fN(t,e){var r=e.rippleEffectColor||e.color;t.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?r:null,fill:e.brushType==="fill"?r:null}})})}var Zue=function(t){$(e,t);function e(r,n){var i=t.call(this)||this,a=new zd(r,n),o=new _e;return i.add(a),i.add(o),i.updateData(r,n),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var h=void 0;me(f)?h=f(i):h=f,a.__t>0&&(h=-s*a.__t),this._animateSymbol(a,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},e.prototype._getLineLength=function(r){return Ga(r.__p1,r.__cp1)+Ga(r.__cp1,r.__p2)},e.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},e.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=xr,c=Yw;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var f=r.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),h=r.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(h,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),f=i[l],h=i[l+1];r.x=f[0]*(1-c)+c*h[0],r.y=f[1]*(1-c)+c*h[1];var v=r.__t<1?h[0]-f[0]:f[0]-h[0],p=r.__t<1?h[1]-f[1]:f[1]-h[1];r.rotation=-Math.atan2(p,v)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},e}(j6),Kue=function(){function t(){this.polyline=!1,this.curveness=0,this.segs=[]}return t}(),Que=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:X.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Kue},e.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o0){r.moveTo(i[o++],i[o++]);for(var l=1;l0){var v=(u+f)/2-(c-h)*a,p=(c+h)/2-(f-u)*a;r.quadraticCurveTo(v,p,f,h)}else r.lineTo(f,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var f=a[u++],h=a[u++],v=1;v0){var m=(f+p)/2-(h-g)*o,y=(h+g)/2-(p-f)*o;if(H4(f,h,m,y,p,g,s,r,n))return l}else if(ko(f,h,p,g,s,r,n))return l;l++}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),W6={seriesType:"lines",plan:Sf(),reset:function(t){var e=t.coordinateSystem;if(e){var r=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,c=i.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var f=r.get("clip",!0)&&Vd(r.coordinateSystem,!1,r);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},e.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},e.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=W6.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new Jue:new qM(o?a?que:H6:a?j6:XM),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(r){return!!r.get(["effect","show"])},e.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(r,n){this.remove(r,n)},e.type="lines",e}(lt),tce=typeof Uint32Array>"u"?Array:Uint32Array,rce=typeof Float64Array>"u"?Array:Float64Array;function hN(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=re(e,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),T0([i,r[0],r[1]])}))}var nce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return e.prototype.init=function(r){r.data=r.data||[],hN(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(r){if(hN(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=Gc(this._flatCoords,n.flatCoords),this._flatCoordsOffset=Gc(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},e.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},e.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(ht);function Cg(t){return t instanceof Array||(t=[t,t]),t}var ice={seriesType:"lines",reset:function(t){var e=Cg(t.get("symbol")),r=Cg(t.get("symbolSize")),n=t.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=Cg(s.getShallow("symbol",!0)),u=Cg(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};function ace(t){t.registerChartView(ece),t.registerSeriesModel(nce),t.registerLayout(W6),t.registerVisual(ice)}var oce=256,sce=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=yn.createCanvas();this.canvas=e}return t.prototype.update=function(e,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,h=f.getContext("2d"),v=e.length;f.width=r,f.height=n;for(var p=0;p0){var z=o(S)?l:u;S>0&&(S=S*k+D),T[C++]=z[E],T[C++]=z[E+1],T[C++]=z[E+2],T[C++]=z[E+3]*S*256}else C+=4}return h.putImageData(b,0,0),f},t.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=yn.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor=X.color.neutral99,i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},t.prototype._getGradient=function(e,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},t}();function lce(t,e,r){var n=t[1]-t[0];e=re(e,function(o){return{interval:[(o.interval[0]-t[0])/n,(o.interval[1]-t[0])/n]}});var i=e.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=e[0]&&n<=e[1]}}function vN(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}var cce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(r,i,0,r.getData().count()):vN(o)&&this._renderOnGeo(o,r,a,i)},e.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},e.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(vN(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,r.start,r.end,!0)))},e.prototype.eachRendered=function(r){ws(this._progressiveEls||this.group,r)},e.prototype._renderOnGridLike=function(r,n,i,a,o){var s=r.coordinateSystem,l=vs(s,"cartesian2d"),u=vs(s,"matrix"),c,f,h,v;if(l){var p=s.getAxis("x"),g=s.getAxis("y");c=p.getBandWidth()+.5,f=g.getBandWidth()+.5,h=p.scale.getExtent(),v=g.scale.getExtent()}for(var m=this.group,y=r.getData(),x=r.getModel(["emphasis","itemStyle"]).getItemStyle(),S=r.getModel(["blur","itemStyle"]).getItemStyle(),b=r.getModel(["select","itemStyle"]).getItemStyle(),T=r.get(["itemStyle","borderRadius"]),C=ar(r),M=r.getModel("emphasis"),D=M.get("focus"),I=M.get("blurScope"),k=M.get("disabled"),E=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],z=i;zh[1]||Gv[1])continue;var Z=s.dataToPoint([j,G]);O=new ze({shape:{x:Z[0]-c/2,y:Z[1]-f/2,width:c,height:f},style:F})}else if(u){var V=s.dataToLayout([y.get(E[0],z),y.get(E[1],z)]).rect;if(Dr(V.x))continue;O=new ze({z2:1,shape:V,style:F})}else{if(isNaN(y.get(E[1],z)))continue;var W=s.dataToLayout([y.get(E[0],z)]),V=W.contentRect||W.rect;if(Dr(V.x)||Dr(V.y))continue;O=new ze({z2:1,shape:V,style:F})}if(y.hasItemOption){var H=y.getItemModel(z),Y=H.getModel("emphasis");x=Y.getModel("itemStyle").getItemStyle(),S=H.getModel(["blur","itemStyle"]).getItemStyle(),b=H.getModel(["select","itemStyle"]).getItemStyle(),T=H.get(["itemStyle","borderRadius"]),D=Y.get("focus"),I=Y.get("blurScope"),k=Y.get("disabled"),C=ar(H)}O.shape.r=T;var K=r.getRawValue(z),ne="-";K&&K[2]!=null&&(ne=K[2]+""),vr(O,C,{labelFetcher:r,labelDataIndex:z,defaultOpacity:F.opacity,defaultText:ne}),O.ensureState("emphasis").style=x,O.ensureState("blur").style=S,O.ensureState("select").style=b,bt(O,D,I,k),O.incremental=o,o&&(O.states.emphasis.hoverLayer=!0),m.add(O),y.setItemGraphicEl(z,O),this._progressiveEls&&this._progressiveEls.push(O)}},e.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new sce;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=r.getViewRect().clone(),f=r.getRoamTransform();c.applyTransform(f);var h=Math.max(c.x,0),v=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),g=Math.min(c.height+c.y,a.getHeight()),m=p-h,y=g-v,x=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],S=l.mapArray(x,function(M,D,I){var k=r.dataToPoint([M,D]);return k[0]-=h,k[1]-=v,k.push(I),k}),b=i.getExtent(),T=i.type==="visualMap.continuous"?uce(b,i.option.range):lce(b,i.getPieceList(),i.option.selected);u.update(S,m,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},T);var C=new dr({style:{width:m,height:y,x:h,y:v,image:u.canvas},silent:!0});this.group.add(C)},e.type="heatmap",e}(lt),fce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return Ta(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var r=xf.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:X.color.primary}}},e}(ht);function hce(t){t.registerChartView(cce),t.registerSeriesModel(fce)}var vce=["itemStyle","borderWidth"],dN=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],cS=new ba,dce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:dN[+c],categoryDim:dN[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var g=gN(o,p),m=pN(o,p,g,h),y=mN(o,h,m);o.setItemGraphicEl(p,y),a.add(y),_N(y,h,m)}}).update(function(p,g){var m=s.getItemGraphicEl(g);if(!o.hasValue(p)){a.remove(m);return}var y=gN(o,p),x=pN(o,p,y,h),S=q6(o,x);m&&S!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(p,null),m=null),m?Sce(m,h,x):m=mN(o,h,x,!0),o.setItemGraphicEl(p,m),m.__pictorialSymbolMeta=x,a.add(m),_N(m,h,x)}).remove(function(p){var g=s.getItemGraphicEl(p);g&&yN(s,p,g.__pictorialSymbolMeta.animationModel,g)}).execute();var v=r.get("clip",!0)?Vd(r.coordinateSystem,!1,r):null;return v?a.setClipPath(v):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){yN(a,Ae(o).dataIndex,r,o)}):i.removeAll()},e.type="pictorialBar",e}(lt);function pN(t,e,r,n){var i=t.getItemLayout(e),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=r.get("symbolPatternSize")||2,f=r.isAnimationEnabled(),h={dataIndex:e,layout:i,itemModel:r,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?r:null,hoverScale:f&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};pce(r,a,i,n,h),gce(t,e,i,a,o,h.boundingLength,h.pxSign,c,n,h),mce(r,h.symbolScale,u,n,h);var v=h.symbolSize,p=lu(r.get("symbolOffset"),v);return yce(r,v,i,a,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function pce(t,e,r,n,i){var a=n.valueDim,o=t.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),c;if(ee(o)){var f=[fS(s,o[0])-l,fS(s,o[1])-l];f[1]=0?1:-1:c>0?1:-1}function fS(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function gce(t,e,r,n,i,a,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(r[f.wh]),v=t.getItemVisual(e,"symbolSize"),p;ee(v)?p=v.slice():v==null?p=["100%","100%"]:p=[v,v],p[f.index]=oe(p[f.index],h),p[c.index]=oe(p[c.index],n?h:Math.abs(a)),u.symbolSize=p;var g=u.symbolScale=[p[0]/s,p[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*o}function mce(t,e,r,n,i){var a=t.get(vce)||0;a&&(cS.attr({scaleX:e[0],scaleY:e[1],rotation:r}),cS.updateTransform(),a/=cS.getLineScale(),a*=e[n.valueDim.index]),i.valueLineWidth=a||0}function yce(t,e,r,n,i,a,o,s,l,u,c,f){var h=c.categoryDim,v=c.valueDim,p=f.pxSign,g=Math.max(e[v.index]+s,0),m=g;if(n){var y=Math.abs(l),x=Sr(t.get("symbolMargin"),"15%")+"",S=!1;x.lastIndexOf("!")===x.length-1&&(S=!0,x=x.slice(0,x.length-1));var b=oe(x,e[v.index]),T=Math.max(g+b*2,0),C=S?0:b*2,M=g2(n),D=M?n:xN((y+C)/T),I=y-D*g;b=I/2/(S?D:Math.max(D-1,1)),T=g+b*2,C=S?0:b*2,!M&&n!=="fixed"&&(D=u?xN((Math.abs(u)+C)/T):0),m=D*T-C,f.repeatTimes=D,f.symbolMargin=b}var k=p*(m/2),E=f.pathPosition=[];E[h.index]=r[h.wh]/2,E[v.index]=o==="start"?k:o==="end"?l-k:l/2,a&&(E[0]+=a[0],E[1]+=a[1]);var z=f.bundlePosition=[];z[h.index]=r[h.xy],z[v.index]=r[v.xy];var O=f.barRectShape=J({},r);O[v.wh]=p*Math.max(Math.abs(r[v.wh]),Math.abs(E[v.index]+k)),O[h.wh]=r[h.wh];var F=f.clipShape={};F[h.xy]=-r[h.xy],F[h.wh]=c.ecSize[h.wh],F[v.xy]=0,F[v.wh]=r[v.wh]}function U6(t){var e=t.symbolPatternSize,r=Ut(t.symbolType,-e/2,-e/2,e,e);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function Z6(t,e,r,n){var i=t.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=e.valueDim,u=r.repeatTimes||0,c=0,f=a[e.valueDim.index]+o+r.symbolMargin*2;for(sL(t,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c0:y<0)&&(x=u-1-g),m[l.index]=f*(x-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function $6(t,e,r,n){var i=t.__pictorialBundle,a=t.__pictorialMainPath;a?Ic(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=t.__pictorialMainPath=U6(r),i.add(a),Ic(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function Y6(t,e,r){var n=J({},e.barRectShape),i=t.__pictorialBarRect;i?Ic(i,null,{shape:n},e,r):(i=t.__pictorialBarRect=new ze({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,t.add(i))}function X6(t,e,r,n){if(r.symbolClip){var i=t.__pictorialClipPath,a=J({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(i)Ke(i,{shape:a},s,l);else{a[o.wh]=0,i=new ze({shape:a}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],au[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function gN(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=_ce,r.isAnimationEnabled=xce,r}function _ce(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function xce(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function mN(t,e,r,n){var i=new _e,a=new _e;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?Z6(i,e,r):$6(i,e,r),Y6(i,r,n),X6(i,e,r,n),i.__pictorialShapeStr=q6(t,r),i.__pictorialSymbolMeta=r,i}function Sce(t,e,r){var n=r.animationModel,i=r.dataIndex,a=t.__pictorialBundle;Ke(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?Z6(t,e,r,!0):$6(t,e,r,!0),Y6(t,r,!0),X6(t,e,r,!0)}function yN(t,e,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];sL(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),N(a,function(o){hs(o,{scaleX:0,scaleY:0},r,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function q6(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function sL(t,e,r){N(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(r,n)})}function Ic(t,e,r,n,i,a){e&&t.attr(e),n.symbolClip&&!i?r&&t.attr(r):r&&au[i?"updateProps":"initProps"](t,r,n.animationModel,n.dataIndex,a)}function _N(t,e,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),f=a.get("blurScope"),h=a.get("scale");sL(t,function(g){if(g instanceof dr){var m=g.style;g.useStyle(J({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},r.style))}else g.useStyle(r.style);var y=g.ensureState("emphasis");y.style=o,h&&(y.scaleX=g.scaleX*1.1,y.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=r.z2});var v=e.valueDim.posDesc[+(r.boundingLength>0)],p=t.__pictorialBarRect;p.ignoreClip=!0,vr(p,ar(i),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:Qc(e.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:v}),bt(t,c,f,a.get("disabled"))}function xN(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var wce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return e.prototype.getInitialData=function(r){return r.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=bs(ad.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:X.color.primary}}}),e}(ad);function bce(t){t.registerChartView(dce),t.registerSeriesModel(wce),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(gG,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,mG("pictorialBar"))}var Tce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._layers=[],r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(m){return m.name}var v=new so(this._layersSeries||[],l,h,h),p=[];v.add(le(g,this,"add")).update(le(g,this,"update")).remove(le(g,this,"remove")).execute();function g(m,y,x){var S=o._layers;if(m==="remove"){s.remove(S[y]);return}for(var b=[],T=[],C,M=l[y].indices,D=0;Da&&(a=s),n.push(s)}for(var u=0;ua&&(a=f)}return{y0:i,max:a}}function Pce(t){t.registerChartView(Tce),t.registerSeriesModel(Mce),t.registerLayout(Lce),t.registerProcessor(Lf("themeRiver"))}var Dce=2,kce=4,wN=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this)||this;o.z2=Dce,o.textConfig={inside:!0},Ae(o).seriesIndex=n.seriesIndex;var s=new Ye({z2:kce,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return e.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;Ae(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=J({},c);f.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var v=n.getVisual("decal");v&&(h.decal=Xc(v,o));var p=ua(l.getModel("itemStyle"),f,!0);J(f,p),N(nn,function(x){var S=s.ensureState(x),b=l.getModel([x,"itemStyle"]);S.style=b.getItemStyle();var T=ua(b,f);T&&(S.shape=T)}),r?(s.setShape(f),s.shape.r=c.r0,xt(s,{shape:{r:c.r}},i,n.dataIndex)):(Ke(s,{shape:f},i),li(s)),s.useStyle(h),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var m=u.get("focus"),y=m==="relative"?Gc(n.getAncestorsIndices(),n.getDescendantIndices()):m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;bt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,h=f.getTextContent(),v=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(p!=null&&Math.abs(s)F&&!Wc(G-F)&&G0?(o.virtualPiece?o.virtualPiece.updateData(!1,x,r,n,i):(o.virtualPiece=new wN(x,r,n,i),c.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(b){o._rootToNode(S.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";dy(u,c)}}i=!0}})})},e.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:MT,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},e.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(lt),Nce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};K6(i);var a=this._levelModels=re(r.levels||[],function(l){return new je(l,this,n)},this),o=HM.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=a[f.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=r_(i,this),n},e.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){t6(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(ht);function K6(t){var e=0;N(t.children,function(n){K6(n);var i=n.value;ee(i)&&(i=i[0]),e+=i});var r=t.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),ee(t.value)?t.value[0]=r:t.value=r}var TN=Math.PI/180;function Oce(t,e,r){e.eachSeriesByType(t,function(n){var i=n.get("center"),a=n.get("radius");ee(a)||(a=[0,a]),ee(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=oe(i[0],o),c=oe(i[1],s),f=oe(a[0],l/2),h=oe(a[1],l/2),v=-n.get("startAngle")*TN,p=n.get("minAngle")*TN,g=n.getData().tree.root,m=n.getViewRoot(),y=m.depth,x=n.get("sort");x!=null&&Q6(m,x);var S=0;N(m.children,function(G){!isNaN(G.getValue())&&S++});var b=m.getValue(),T=Math.PI/(b||S)*2,C=m.depth>0,M=m.height-(C?-1:1),D=(h-f)/(M||1),I=n.get("clockwise"),k=n.get("stillShowZeroSum"),E=I?1:-1,z=function(G,Z){if(G){var V=Z;if(G!==g){var W=G.getValue(),H=b===0&&k?T:W*T;H1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&se(s)&&(s=ey(s,(n.depth-1)/(a-1)*.5)),s}t.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");J(u,l)})})}function Vce(t){t.registerChartView(Rce),t.registerSeriesModel(Nce),t.registerLayout(Ie(Oce,"sunburst")),t.registerProcessor(Ie(Lf,"sunburst")),t.registerVisual(Bce),Ece(t)}var CN={color:"fill",borderColor:"stroke"},Fce={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},qa=Ve(),Gce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(r,n){return Ta(null,this)},e.prototype.getDataParams=function(r,n,i){var a=t.prototype.getDataParams.call(this,r,n);return i&&(a.info=qa(i).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(ht);function jce(t,e){return e=e||[0,0],re(["x","y"],function(r,n){var i=this.getAxis(r),a=e[n],o=t[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function Hce(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:le(jce,t)}}}function Wce(t,e){return e=e||[0,0],re([0,1],function(r){var n=e[r],i=t[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=e[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function Uce(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(r){return t.dataToPoint(r)},size:le(Wce,t)}}}function Zce(t,e){var r=this.getAxis(),n=e instanceof Array?e[0]:e,i=(t instanceof Array?t[0]:t)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function $ce(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:le(Zce,t)}}}function Yce(t,e){return e=e||[0,0],re(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=e[n],s=t[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function Xce(t){var e=t.getRadiusAxis(),r=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=e.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=t.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:le(Yce,t)}}}function qce(t){var e=t.getRect(),r=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return t.dataToPoint(n,i)},layout:function(n,i){return t.dataToLayout(n,i)}}}}function Kce(t){var e=t.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r,n){return t.dataToPoint(r,n)},layout:function(r,n){return t.dataToLayout(r,n)}}}}function J6(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||fe(t,"text")))}function eH(t,e,r){var n=t,i,a,o;if(e==="text")o=n;else{o={},fe(n,"text")&&(o.text=n.text),fe(n,"rich")&&(o.rich=n.rich),fe(n,"textFill")&&(o.fill=n.textFill),fe(n,"textStroke")&&(o.stroke=n.textStroke),fe(n,"fontFamily")&&(o.fontFamily=n.fontFamily),fe(n,"fontSize")&&(o.fontSize=n.fontSize),fe(n,"fontStyle")&&(o.fontStyle=n.fontStyle),fe(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=fe(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),fe(n,"textPosition")&&(i.position=n.textPosition),fe(n,"textOffset")&&(i.offset=n.textOffset),fe(n,"textRotation")&&(i.rotation=n.textRotation),fe(n,"textDistance")&&(i.distance=n.textDistance)}return MN(o,t),N(o.rich,function(l){MN(l,l)}),{textConfig:i,textContent:a}}function MN(t,e){e&&(e.font=e.textFont||e.font,fe(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),fe(e,"textAlign")&&(t.align=e.textAlign),fe(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),fe(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),fe(e,"textWidth")&&(t.width=e.textWidth),fe(e,"textHeight")&&(t.height=e.textHeight),fe(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),fe(e,"textPadding")&&(t.padding=e.textPadding),fe(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),fe(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),fe(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),fe(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),fe(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),fe(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),fe(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function LN(t,e,r){var n=t;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var i=n.textPosition.indexOf("inside")>=0,a=t.fill||X.color.neutral99;AN(n,e);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||X.color.neutral00,!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=t.fill||r.outsideFill||X.color.neutral00),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=e.text,n.rich=e.rich,N(e.rich,function(s){AN(s,s)}),n}function AN(t,e){e&&(fe(e,"fill")&&(t.textFill=e.fill),fe(e,"stroke")&&(t.textStroke=e.fill),fe(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),fe(e,"font")&&(t.font=e.font),fe(e,"fontStyle")&&(t.fontStyle=e.fontStyle),fe(e,"fontWeight")&&(t.fontWeight=e.fontWeight),fe(e,"fontSize")&&(t.fontSize=e.fontSize),fe(e,"fontFamily")&&(t.fontFamily=e.fontFamily),fe(e,"align")&&(t.textAlign=e.align),fe(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),fe(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),fe(e,"width")&&(t.textWidth=e.width),fe(e,"height")&&(t.textHeight=e.height),fe(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),fe(e,"padding")&&(t.textPadding=e.padding),fe(e,"borderColor")&&(t.textBorderColor=e.borderColor),fe(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),fe(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),fe(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),fe(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),fe(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),fe(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),fe(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),fe(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),fe(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),fe(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var tH={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},PN=Ue(tH);ai(ga,function(t,e){return t[e]=1,t},{});ga.join(", ");var jy=["","style","shape","extra"],rf=Ve();function lL(t,e,r,n,i){var a=t+"Animation",o=pf(t,n,i)||{},s=rf(e).userDuring;return o.duration>0&&(o.during=s?le(rfe,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),J(o,r[a]),o}function gm(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=rf(t),u=e.style;l.userDuring=e.during;var c={},f={};if(ife(t,e,f),t.type==="compound")for(var h=t.shape.paths,v=e.shape.paths,p=0;p0&&t.animateFrom(m,y)}else Jce(t,e,i||0,r,c);rH(t,e),u?t.dirty():t.markRedraw()}function rH(t,e){for(var r=rf(t).leaveToProps,n=0;n0&&t.animateFrom(i,a)}}function efe(t,e){fe(e,"silent")&&(t.silent=e.silent),fe(e,"ignore")&&(t.ignore=e.ignore),t instanceof si&&fe(e,"invisible")&&(t.invisible=e.invisible),t instanceof He&&fe(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var Ki={},tfe={setTransform:function(t,e){return Ki.el[t]=e,this},getTransform:function(t){return Ki.el[t]},setShape:function(t,e){var r=Ki.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){var e=Ki.el.shape;if(e)return e[t]},setStyle:function(t,e){var r=Ki.el,n=r.style;return n&&(n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){var e=Ki.el.style;if(e)return e[t]},setExtra:function(t,e){var r=Ki.el.extra||(Ki.el.extra={});return r[t]=e,this},getExtra:function(t){var e=Ki.el.extra;if(e)return e[t]}};function rfe(){var t=this,e=t.el;if(e){var r=rf(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}Ki.el=e,n(tfe)}}function DN(t,e,r,n){var i=r[t];if(i){var a=e[t],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[t]={}),El(l))J(o,a);else for(var u=pt(l),c=0;c=0){!o&&(o=n[t]={});for(var v=Ue(a),c=0;c=0)){var h=t.getAnimationStyleProps(),v=h?h.style:null;if(v){!a&&(a=n.style={});for(var p=Ue(r),u=0;u=0?e.getStore().get(V,G):void 0}var W=e.get(Z.name,G),H=Z&&Z.ordinalMeta;return H?H.categories[W]:W}function M(j,G){G==null&&(G=c);var Z=e.getItemVisual(G,"style"),V=Z&&Z.fill,W=Z&&Z.opacity,H=S(G,Ho).getItemStyle();V!=null&&(H.fill=V),W!=null&&(H.opacity=W);var Y={inheritColor:se(V)?V:X.color.neutral99},K=b(G,Ho),ne=dt(K,null,Y,!1,!0);ne.text=K.getShallow("show")?pe(t.getFormattedLabel(G,Ho),Qc(e,G)):null;var ie=fy(K,Y,!1);return k(j,H),H=LN(H,ne,ie),j&&I(H,j),H.legacy=!0,H}function D(j,G){G==null&&(G=c);var Z=S(G,Ka).getItemStyle(),V=b(G,Ka),W=dt(V,null,null,!0,!0);W.text=V.getShallow("show")?mn(t.getFormattedLabel(G,Ka),t.getFormattedLabel(G,Ho),Qc(e,G)):null;var H=fy(V,null,!0);return k(j,Z),Z=LN(Z,W,H),j&&I(Z,j),Z.legacy=!0,Z}function I(j,G){for(var Z in G)fe(G,Z)&&(j[Z]=G[Z])}function k(j,G){j&&(j.textFill&&(G.textFill=j.textFill),j.textPosition&&(G.textPosition=j.textPosition))}function E(j,G){if(G==null&&(G=c),fe(CN,j)){var Z=e.getItemVisual(G,"style");return Z?Z[CN[j]]:null}if(fe(Fce,j))return e.getItemVisual(G,j)}function z(j){if(o.type==="cartesian2d"){var G=o.getBaseAxis();return cte(Se({axis:G},j))}}function O(){return r.getCurrentSeriesIndices()}function F(j){return O2(j,r)}}function pfe(t){var e={};return N(t.dimensions,function(r){var n=t.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=e[i]=e[i]||[];a[n.coordDimIndex]=t.getDimensionIndex(r)}}),e}function gS(t,e,r,n,i,a,o){if(!n){a.remove(e);return}var s=vL(t,e,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&bt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function vL(t,e,r,n,i,a){var o=-1,s=e;e&&oH(e,n,i)&&(o=Ee(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=fL(n),s&&ffe(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),jn.normal.cfg=jn.normal.conOpt=jn.emphasis.cfg=jn.emphasis.conOpt=jn.blur.cfg=jn.blur.conOpt=jn.select.cfg=jn.select.conOpt=null,jn.isLegacy=!1,mfe(u,r,n,i,l,jn),gfe(u,r,n,i,l),hL(t,u,r,n,jn,i,l),fe(n,"info")&&(qa(u).info=n.info);for(var c=0;c=0?a.replaceAt(u,o):a.add(u),u}function oH(t,e,r){var n=qa(t),i=e.type,a=e.shape,o=e.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&wfe(a)&&sH(a)!==n.customPathData||i==="image"&&fe(o,"image")&&o.image!==n.customImagePath}function gfe(t,e,r,n,i){var a=r.clipPath;if(a===!1)t&&t.getClipPath()&&t.removeClipPath();else if(a){var o=t.getClipPath();o&&oH(o,a,n)&&(o=null),o||(o=fL(a),t.setClipPath(o)),hL(null,o,e,a,null,n,i)}}function mfe(t,e,r,n,i,a){if(!(t.isGroup||t.type==="compoundPath")){IN(r,null,a),IN(r,Ka,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=t.getTextContent();if(o===!1)c&&t.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=fL(o),t.setTextContent(c)),hL(null,c,e,o,null,n,i);for(var f=o&&o.style,h=0;h=c;v--){var p=e.childAt(v);_fe(e,p,i)}}}function _fe(t,e,r){e&&a_(e,qa(t).option,r)}function xfe(t){new so(t.oldChildren,t.newChildren,EN,EN,t).add(RN).update(RN).remove(Sfe).execute()}function EN(t,e){var r=t&&t.name;return r??ufe+e}function RN(t,e){var r=this.context,n=t!=null?r.newChildren[t]:null,i=e!=null?r.oldChildren[e]:null;vL(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function Sfe(t){var e=this.context,r=e.oldChildren[t];r&&a_(r,qa(r).option,e.seriesModel)}function sH(t){return t&&(t.pathData||t.d)}function wfe(t){return t&&(fe(t,"pathData")||fe(t,"d"))}function bfe(t){t.registerChartView(hfe),t.registerSeriesModel(Gce)}var vl=Ve(),NN=ye,mS=le,pL=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,r,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new _e,this.createPointerEl(s,u,e,r),this.createLabelEl(s,u,e,r),n.getZr().add(s);else{var h=Ie(ON,r,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,r)}BN(s,r,!0),this._renderHandle(a)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var n=r.get("animation"),i=e.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=OM(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},t.prototype.makeElOption=function(e,r,n,i,a){},t.prototype.createPointerEl=function(e,r,n,i){var a=r.pointer;if(a){var o=vl(e).pointerEl=new au[a.type](NN(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=vl(e).labelEl=new Ye(NN(r.label));e.add(a),zN(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=vl(e).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,n,i){var a=vl(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),zN(a,i))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=gf(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){io(u.event)},onmousedown:mS(this._onHandleDragMove,this,0,0),drift:mS(this._onHandleDragMove,this),ondragend:mS(this._onHandleDragEnd,this)}),n.add(i)),BN(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");ee(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,wf(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){ON(this._axisPointerModel,!r&&this._moveAnimation,this._handle,yS(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(yS(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(yS(i)),vl(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Kv(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,n){return n=n||0,{x:e[n],y:e[1-n],width:r[n],height:r[1-n]}},t}();function ON(t,e,r,n){lH(vl(r).lastProp,n)||(vl(r).lastProp=n,e?Ke(r,n,t):(r.stopAnimation(),r.attr(n)))}function lH(t,e){if(we(t)&&we(e)){var r=!0;return N(e,function(n,i){r=r&&lH(t[i],n)}),!!r}else return t===e}function zN(t,e){t[e.get(["label","show"])?"show":"hide"]()}function yS(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function BN(t,e,r){var n=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function gL(t){var e=t.get("type"),r=t.getModel(e+"Style"),n;return e==="line"?(n=r.getLineStyle(),n.fill=null):e==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function uH(t,e,r,n,i){var a=r.get("value"),o=cH(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=_f(s.get("padding")||0),u=s.getFont(),c=P0(o,u),f=i.position,h=c.width+l[1]+l[3],v=c.height+l[0]+l[2],p=i.align;p==="right"&&(f[0]-=h),p==="center"&&(f[0]-=h/2);var g=i.verticalAlign;g==="bottom"&&(f[1]-=v),g==="middle"&&(f[1]-=v/2),Tfe(f,h,v,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),t.label={x:f[0],y:f[1],style:dt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function Tfe(t,e,r,n){var i=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,a)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function cH(t,e,r,n,i){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:i.precision}),o=i.formatter;if(o){var s={value:Cy(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};N(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),se(o)?a=o.replace("{value}",a):me(o)&&(a=o(s))}return a}function mL(t,e,r){var n=fr();return ho(n,n,r.rotation),Ii(n,n,r.position),Pi([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function fH(t,e,r,n,i,a){var o=tn.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),uH(e,n,i,a,{position:mL(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function yL(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function hH(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function VN(t,e,r,n,i,a){return{cx:t,cy:e,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var Cfe=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=FN(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=gL(a),v=Mfe[u](s,f,c);v.style=h,r.graphicKey=v.type,r.pointer=v}var p=Ny(l.getRect(),i);fH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=Ny(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=mL(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=FN(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[r.x,r.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,v=[h,h];v[c]=f[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:r.rotation,cursorPoint:v,tooltipOption:p[c]}},e}(pL);function FN(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var Mfe={line:function(t,e,r){var n=yL([e,r[0]],[e,r[1]],GN(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:hH([e-n/2,r[0]],[n,i],GN(t))}}};function GN(t){return t.dim==="x"?0:1}var Lfe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:X.color.border,width:1,type:"dashed"},shadowStyle:{color:X.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:X.color.neutral00,padding:[5,7,5,7],backgroundColor:X.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:X.color.accent40,throttle:40}},e}(Be),Ua=Ve(),Afe=N;function vH(t,e,r){if(!We.node){var n=e.getZr();Ua(n).records||(Ua(n).records={}),Pfe(n,e);var i=Ua(n).records[t]||(Ua(n).records[t]={});i.handler=r}}function Pfe(t,e){if(Ua(t).initialized)return;Ua(t).initialized=!0,r("click",Ie(jN,"click")),r("mousemove",Ie(jN,"mousemove")),r("globalout",kfe);function r(n,i){t.on(n,function(a){var o=Ife(e);Afe(Ua(t).records,function(s){s&&i(s,a,o.dispatchAction)}),Dfe(o.pendings,e)})}}function Dfe(t,e){var r=t.showTip.length,n=t.hideTip.length,i;r?i=t.showTip[r-1]:n&&(i=t.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function kfe(t,e,r){t.handler("leave",null,r)}function jN(t,e,r,n){e.handler(t,r,n)}function Ife(t){var e={showTip:[],hideTip:[]},r=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=r,t.dispatchAction(n))};return{dispatchAction:r,pendings:e}}function PT(t,e){if(!We.node){var r=e.getZr(),n=(Ua(r).records||{})[t];n&&(Ua(r).records[t]=null)}}var Efe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";vH("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(r,n){PT("axisPointer",n)},e.prototype.dispose=function(r,n){PT("axisPointer",n)},e.type="axisPointer",e}(gt);function dH(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Hl(a,t);if(o==null||o<0||ee(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,v=f==="x"||f==="radius"?1:0,p=a.mapDimension(h),g=[];g[v]=a.get(p,o),g[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(g)||[]}else r=l.dataToPoint(a.getValues(re(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var HN=Ve();function Rfe(t,e,r){var n=t.currTrigger,i=[t.x,t.y],a=t,o=t.dispatchAction||le(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){mm(i)&&(i=dH({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=mm(i),u=a.axesInfo,c=s.axesInfo,f=n==="leave"||mm(i),h={},v={},p={list:[],map:{}},g={showPointer:Ie(Ofe,v),showTooltip:Ie(zfe,p)};N(s.coordSysMap,function(y,x){var S=l||y.containPoint(i);N(s.coordSysAxesInfo[x],function(b,T){var C=b.axis,M=Gfe(u,b);if(!f&&S&&(!u||M)){var D=M&&M.value;D==null&&!l&&(D=C.pointToData(i)),D!=null&&WN(b,D,g,!1,h)}})});var m={};return N(c,function(y,x){var S=y.linkGroup;S&&!v[x]&&N(S.axesInfo,function(b,T){var C=v[T];if(b!==y&&C){var M=C.value;S.mapper&&(M=y.axis.scale.parse(S.mapper(M,UN(b),UN(y)))),m[y.key]=M}})}),N(m,function(y,x){WN(c[x],y,g,!0,h)}),Bfe(v,c,h),Vfe(p,i,t,o),Ffe(c,o,r),h}}function WN(t,e,r,n,i){var a=t.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=Nfe(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&J(i,s[0]),!n&&t.snap&&a.containData(l)&&l!=null&&(e=l),r.showPointer(t,e,s),r.showTooltip(t,o,l)}}function Nfe(t,e){var r=e.axis,n=r.dim,i=t,a=[],o=Number.MAX_VALUE,s=-1;return N(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(c,t,r);h=v.dataIndices,f=v.nestestValue}else{if(h=l.indicesOfNearest(n,c[0],t,r.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var p=t-f,g=Math.abs(p);g<=o&&((g=0&&s<0)&&(o=g,s=p,i=f,a.length=0),N(h,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:i}}function Ofe(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function zfe(t,e,r,n){var i=r.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=od(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function Bfe(t,e,r){var n=r.axesInfo=[];N(e,function(i,a){var o=i.axisPointerModel.option,s=t[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function Vfe(t,e,r,n){if(mm(e)||!t.list.length){n({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function Ffe(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=HN(n)[i]||{},o=HN(n)[i]={};N(t,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&N(f.seriesDataIndices,function(h){var v=h.seriesIndex+" | "+h.dataIndex;o[v]=h})});var s=[],l=[];N(a,function(u,c){!o[c]&&l.push(u)}),N(o,function(u,c){!a[c]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Gfe(t,e){for(var r=0;r<(t||[]).length;r++){var n=t[r];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function UN(t){var e=t.axis.model,r={},n=r.axisDim=t.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=e.componentIndex,r.axisName=r[n+"AxisName"]=e.name,r.axisId=r[n+"AxisId"]=e.id,r}function mm(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function jd(t){uu.registerAxisPointerClass("CartesianAxisPointer",Cfe),t.registerComponentModel(Lfe),t.registerComponentView(Efe),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!ee(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=jie(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Rfe)}function jfe(t){Oe(Bj),Oe(jd)}var Hfe=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),h=a.get("type");if(h&&h!=="none"){var v=gL(a),p=Ufe[h](s,l,f,c);p.style=v,r.graphicKey=p.type,r.pointer=p}var g=a.get(["label","margin"]),m=Wfe(n,i,a,l,g);uH(r,i,a,o,m)},e}(pL);function Wfe(t,e,r,n,i){var a=e.axis,o=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(a.dim==="radius"){var h=fr();ho(h,h,s),Ii(h,h,[n.cx,n.cy]),u=Pi([o,-i],h);var v=e.getModel("axisLabel").get("rotate")||0,p=tn.innerTextLayout(s,v*Math.PI/180,-1);c=p.textAlign,f=p.textVerticalAlign}else{var g=l[1];u=n.coordToPoint([g+i,o]);var m=n.cx,y=n.cy;c=Math.abs(u[0]-m)/g<.3?"center":u[0]>m?"left":"right",f=Math.abs(u[1]-y)/g<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var Ufe={line:function(t,e,r,n){return t.dim==="angle"?{type:"Line",shape:yL(e.coordToPoint([n[0],r]),e.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r}}},shadow:function(t,e,r,n){var i=Math.max(1,t.getBandWidth()),a=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:VN(e.cx,e.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:VN(e.cx,e.cy,r-i/2,r+i/2,0,Math.PI*2)}}},Zfe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Be),_L=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Dt).models[0]},e.type="polarAxis",e}(Be);Bt(_L,Mf);var $fe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="angleAxis",e}(_L),Yfe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="radiusAxis",e}(_L),xL=function(t){$(e,t);function e(r,n){return t.call(this,"radius",r,n)||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e}(fi);xL.prototype.dataToRadius=fi.prototype.dataToCoord;xL.prototype.radiusToData=fi.prototype.coordToData;var Xfe=Ve(),SL=function(t){$(e,t);function e(r,n){return t.call(this,"angle",r,n||[0,360])||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),c=P0(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var v=Math.max(0,Math.floor(h)),p=Xfe(r.model),g=p.lastAutoInterval,m=p.lastTickCount;return g!=null&&m!=null&&Math.abs(g-v)<=1&&Math.abs(m-o)<=1&&g>v?v=g:(p.lastTickCount=o,p.lastAutoInterval=v),v},e}(fi);SL.prototype.dataToAngle=fi.prototype.dataToCoord;SL.prototype.angleToData=fi.prototype.coordToData;var pH=["radius","angle"],qfe=function(){function t(e){this.dimensions=pH,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new xL,this._angleAxis=new SL,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(e){var r=this.pointToCoord(e);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},t.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},t.prototype.getAxis=function(e){var r="_"+e+"Axis";return this[r]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(e){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&r.push(n),i.scale.type===e&&r.push(i),r},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(e){var r=this._angleAxis;return e===r?this._radiusAxis:r},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(e){var r=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},t.prototype.dataToPoint=function(e,r,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],r),this._angleAxis.dataToAngle(e[1],r)],n)},t.prototype.pointToData=function(e,r,n){n=n||[];var i=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(i[0],r),n[1]=this._angleAxis.angleToData(i[1],r),n},t.prototype.pointToCoord=function(e){var r=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,c=us;)u+=c*360;return[l,u]},t.prototype.coordToPoint=function(e,r){r=r||[];var n=e[0],i=e[1]/180*Math.PI;return r[0]=Math.cos(i)*n+this.cx,r[1]=-Math.sin(i)*n+this.cy,r},t.prototype.getArea=function(){var e=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=e.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,f=u*u+c*c,h=this.r,v=this.r0;return h!==v&&f-o<=h*h&&f+o>=v*v},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},t.prototype.convertToPixel=function(e,r,n){var i=ZN(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=ZN(r);return i===this?this.pointToData(n):null},t}();function ZN(t){var e=t.seriesModel,r=t.polarModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function Kfe(t,e,r){var n=e.get("center"),i=or(e,r).refContainer;t.cx=oe(n[0],i.width)+i.x,t.cy=oe(n[1],i.height)+i.y;var a=t.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:ee(s)||(s=[0,s]);var l=[oe(s[0],o),oe(s[1],o)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}function Qfe(t,e){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),t.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();N(My(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),N(My(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),Xl(n.scale,n.model),Xl(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function Jfe(t){return t.mainType==="angleAxis"}function $N(t,e){var r;if(t.type=e.get("type"),t.scale=Od(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),Jfe(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle"),i=(r=e.get("endAngle"))!==null&&r!==void 0?r:n+(t.inverse?-360:360);t.setExtent(n,i)}e.axis=t,t.model=e}var ehe={dimensions:pH,create:function(t,e){var r=[];return t.eachComponent("polar",function(n,i){var a=new qfe(i+"");a.update=Qfe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");$N(o,l),$N(s,u),Kfe(a,n,e),r.push(a),n.coordinateSystem=a,a.model=n}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",Dt).models[0];n.coordinateSystem=i.coordinateSystem}}),r}},the=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Mg(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],r]),i=t.coordToPoint([e[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function Lg(t){var e=t.getRadiusAxis();return e.inverse?0:1}function YN(t){var e=t[0],r=t[t.length-1];e&&r&&Math.abs(Math.abs(e.coord-r.coord)-360)<1e-4&&t.pop()}var rhe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="PolarAxisPointer",r}return e.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=re(i.getViewLabels(),function(c){c=ye(c);var f=i.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(h),c});YN(u),YN(s),N(the,function(c){r.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&nhe[c](this.group,r,a,s,l,o,u)},this)}},e.type="angleAxis",e}(uu),nhe={axisLine:function(t,e,r,n,i,a){var o=e.getModel(["axisLine","lineStyle"]),s=r.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=Lg(r),f=c?0:1,h,v=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[f]===0?h=new au[v]({shape:{cx:r.cx,cy:r.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new vf({shape:{cx:r.cx,cy:r.cy,r:a[c],r0:a[f]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,t.add(h)},axisTick:function(t,e,r,n,i,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[Lg(r)],u=re(n,function(c){return new Wt({shape:Mg(r,[l,l+s],c.coord)})});t.add(Tn(u,{style:Se(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,r,n,i,a){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[Lg(r)],c=[],f=0;fy?"left":"right",b=Math.abs(m[1]-x)/g<.3?"middle":m[1]>x?"top":"bottom";if(s&&s[p]){var T=s[p];we(T)&&T.textStyle&&(v=new je(T.textStyle,l,l.ecModel))}var C=new Ye({silent:tn.isLabelSilent(e),style:dt(v,{x:m[0],y:m[1],fill:v.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:S,verticalAlign:b})});if(t.add(C),po({el:C,componentModel:e,itemName:f.formattedLabel,formatterParamsExtra:{isTruncated:function(){return C.isTruncated},value:f.rawLabel,tickIndex:h}}),c){var M=tn.makeAxisEventDataBase(e);M.targetType="axisLabel",M.value=f.rawLabel,Ae(C).eventData=M}},this)},splitLine:function(t,e,r,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f=0?"p":"n",j=I;T&&(n[c][O]||(n[c][O]={p:I,n:I}),j=n[c][O][F]);var G=void 0,Z=void 0,V=void 0,W=void 0;if(p.dim==="radius"){var H=p.dataToCoord(z)-I,Y=l.dataToCoord(O);Math.abs(H)=W})}}})}function uhe(t){var e={};N(t,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=mH(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;e[l]=f;var v=gH(n);h[v]||f.autoWidthCount++,h[v]=h[v]||{width:0,maxWidth:0};var p=oe(n.get("barWidth"),c),g=oe(n.get("barMaxWidth"),c),m=n.get("barGap"),y=n.get("barCategoryGap");p&&!h[v].width&&(p=Math.min(f.remainedWidth,p),h[v].width=p,f.remainedWidth-=p),g&&(h[v].maxWidth=g),m!=null&&(f.gap=m),y!=null&&(f.categoryGap=y)});var r={};return N(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=oe(n.categoryGap,o),l=oe(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),N(a,function(g,m){var y=g.maxWidth;y&&y=r.y&&e[1]<=r.y+r.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=r.y&&e[0]<=r.y+r.height},t.prototype.pointToData=function(e,r,n){n=n||[];var i=this.getAxis();return n[0]=i.coordToData(i.toLocalCoord(e[i.orient==="horizontal"?0:1])),n},t.prototype.dataToPoint=function(e,r,n){var i=this.getAxis(),a=this.getRect();n=n||[];var o=i.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[o]=i.toGlobalCoord(i.dataToCoord(+e)),n[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,n},t.prototype.convertToPixel=function(e,r,n){var i=XN(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=XN(r);return i===this?this.pointToData(n):null},t}();function XN(t){var e=t.seriesModel,r=t.singleAxisModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function _he(t,e){var r=[];return t.eachComponent("singleAxis",function(n,i){var a=new yhe(n,t,e);a.name="single_"+i,a.resize(n,e),n.coordinateSystem=a,r.push(a)}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",Dt).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var xhe={create:_he,dimensions:yH},qN=["x","y"],She=["width","height"],whe=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=_S(l,1-Uy(s)),c=l.dataToPoint(n)[0],f=a.get("type");if(f&&f!=="none"){var h=gL(a),v=bhe[f](s,c,u);v.style=h,r.graphicKey=v.type,r.pointer=v}var p=DT(i);fH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=DT(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=mL(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=Uy(o),u=_S(s,l),c=[r.x,r.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=_S(s,1-l),h=(f[1]+f[0])/2,v=[h,h];return v[l]=c[l],{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:v,tooltipOption:{verticalAlign:"middle"}}},e}(pL),bhe={line:function(t,e,r){var n=yL([e,r[0]],[e,r[1]],Uy(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=t.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:hH([e-n/2,r[0]],[n,i],Uy(t))}}};function Uy(t){return t.isHorizontal()?0:1}function _S(t,e){var r=t.getRect();return[r[qN[e]],r[qN[e]]+r[She[e]]]}var The=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="single",e}(gt);function Che(t){Oe(jd),uu.registerAxisPointerClass("SingleAxisPointer",whe),t.registerComponentView(The),t.registerComponentView(phe),t.registerComponentModel(ym),Jc(t,"single",ym,ym.defaultOption),t.registerCoordinateSystem("single",xhe)}var Mhe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n,i){var a=ou(r);t.prototype.init.apply(this,arguments),KN(r,a)},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),KN(this.option,r)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:X.color.axisLine,width:1,type:"solid"}},itemStyle:{color:X.color.neutral00,borderWidth:1,borderColor:X.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:X.size.s,color:X.color.secondary},monthLabel:{show:!0,position:"start",margin:X.size.s,align:"center",formatter:null,color:X.color.secondary},yearLabel:{show:!0,position:null,margin:X.size.xl,formatter:null,color:X.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Be);function KN(t,e){var r=t.cellSize,n;ee(r)?n=r:n=t.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=re([0,1],function(a){return YK(e,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});_a(t,e,{type:"box",ignoreSize:i})}var Lhe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},e.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToCalendarLayout([u],!1).tl,f=new ze({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(f)}},e.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,h=0;f.time<=n.end.time;h++){p(f.formatedDate),h===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var v=f.date;v.setMonth(v.getMonth()+1),f=s.getDateInfo(v)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToCalendarLayout([g],!1).tl);var m=o._getLinePointsOfOneWeek(r,g,i);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},e.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},e.prototype._drawSplitline=function(r,n,i){var a=new br({z2:20,shape:{points:r},style:n});i.add(a)},e.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(r,n){return se(r)&&r?GK(r,n):me(r)?r(n):n.nameMap},e.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,h=i==="horizontal"?0:1,v={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var g=o.get("formatter"),m={start:n.start.y,end:n.end.y,nameMap:p},y=this._formatterLabel(g,m),x=new Ye({z2:30,style:dt(o,{text:y}),silent:o.get("silent")});x.attr(this._yearTextPositionControl(x,v[l],i,l,s)),a.add(x)}},e.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],c=r[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||se(s))&&(s&&(n=Cb(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,v=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",g=o.get("silent"),m=0;m=a.start.time&&i.times.end.time&&r.reverse(),r},t.prototype._getRangeInfo=function(e){var r=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/xS)-Math.floor(r[0].time/xS)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+r[0].day+6)/7),f=n?-c+1:c-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:c,nthWeek:f,fweek:r[0].day,lweek:r[1].day}},t.prototype._getDateByWeeksAndDay=function(e,r,n){var i=this._getRangeInfo(n);if(e>i.weeks||e===0&&ri.lweek)return null;var a=(e-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},t.create=function(e,r){var n=[];return e.eachComponent("calendar",function(i){var a=new t(i,e,r);n.push(a),i.coordinateSystem=a}),e.eachComponent(function(i,a){Rd({targetModel:a,coordSysType:"calendar",coordSysProvider:zV})}),n},t.dimensions=["time","value"],t}();function SS(t){var e=t.calendarModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}function Phe(t){t.registerComponentModel(Mhe),t.registerComponentView(Lhe),t.registerCoordinateSystem("calendar",Ahe)}var Ba={level:1,leaf:2,nonLeaf:3},Qa={none:0,all:1,body:2,corner:3};function kT(t,e,r){var n=e[ke[r]].getCell(t);return!n&&Xe(t)&&t<0&&(n=e[ke[1-r]].getUnitLayoutInfo(r,Math.round(t))),n}function _H(t){var e=t||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function xH(t,e,r,n,i){QN(t[0],e,i,r,n,0),QN(t[1],e,i,r,n,1)}function QN(t,e,r,n,i,a){t[0]=1/0,t[1]=-1/0;var o=n[a],s=ee(o)?o:[o],l=s.length,u=!!r;if(l>=1?(JN(t,e,s,u,i,a,0),l>1&&JN(t,e,s,u,i,a,l-1)):t[0]=t[1]=NaN,u){var c=-i[ke[1-a]].getLocatorCount(a),f=i[ke[a]].getLocatorCount(a)-1;r===Qa.body?c=jt(0,c):r===Qa.corner&&(f=kn(-1,f)),f=e[0]&&t[0]<=e[1]}function rO(t,e){t.id.set(e[0][0],e[1][0]),t.span.set(e[0][1]-t.id.x+1,e[1][1]-t.id.y+1)}function Ihe(t,e){t[0][0]=e[0][0],t[0][1]=e[0][1],t[1][0]=e[1][0],t[1][1]=e[1][1]}function nO(t,e,r,n){var i=kT(e[n][0],r,n),a=kT(e[n][1],r,n);t[ke[n]]=t[qt[n]]=NaN,i&&a&&(t[ke[n]]=i.xy,t[qt[n]]=a.xy+a.wh-i.xy)}function wh(t,e,r,n){return t[ke[e]]=r,t[ke[1-e]]=n,t}function Ehe(t){return t&&(t.type===Ba.leaf||t.type===Ba.nonLeaf)?t:null}function Zy(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var iO=function(){function t(e,r){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=r,this._uniqueValueGen=Rhe(e);var n=r.get("data",!0);n!=null&&!ee(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return t.prototype._initByDimModelData=function(e){var r=this,n=r._cells,i=r._levels,a=[],o=0;r._leavesCount=s(e,0,0),l();return;function s(u,c,f){var h=0;return u&&N(u,function(v,p){var g;se(v)?g={value:v}:we(v)?(g=v,v.value!=null&&!se(v.value)&&(g={value:null})):g={value:null};var m={type:Ba.nonLeaf,ordinal:NaN,level:f,firstLeafLocator:c,id:new Te,span:wh(new Te,r.dimIdx,1,1),option:g,xy:NaN,wh:NaN,dim:r,rect:Zy()};o++,(a[c]||(a[c]=[])).push(m),i[f]||(i[f]={type:Ba.level,xy:NaN,wh:NaN,option:null,id:new Te,dim:r});var y=s(g.children,c,f+1),x=Math.max(1,y);m.span[ke[r.dimIdx]]=x,h+=x,c+=x}),h}function l(){for(var u=[];n.length=1,S=r[ke[n]],b=a.getLocatorCount(n)-1,T=new rs;for(o.resetLayoutIterator(T,n);T.next();)C(T.item);for(a.resetLayoutIterator(T,n);T.next();)C(T.item);function C(M){Dr(M.wh)&&(M.wh=y),M.xy=S,M.id[ke[n]]===b&&!x&&(M.wh=r[ke[n]]+r[qt[n]]-M.xy),S+=M.wh}}function fO(t,e){for(var r=e[ke[t]].resetCellIterator();r.next();){var n=r.item;$y(n.rect,t,n.id,n.span,e),$y(n.rect,1-t,n.id,n.span,e),n.type===Ba.nonLeaf&&(n.xy=n.rect[ke[t]],n.wh=n.rect[qt[t]])}}function hO(t,e){t.travelExistingCells(function(r){var n=r.span;if(n){var i=r.spanRect,a=r.id;$y(i,0,a,n,e),$y(i,1,a,n,e)}})}function $y(t,e,r,n,i){t[qt[e]]=0;var a=r[ke[e]],o=a<0?i[ke[1-e]]:i[ke[e]],s=o.getUnitLayoutInfo(e,r[ke[e]]);if(t[ke[e]]=s.xy,t[qt[e]]=s.wh,n[ke[e]]>1){var l=o.getUnitLayoutInfo(e,r[ke[e]]+n[ke[e]]-1);t[qt[e]]=l.xy+l.wh-s.xy}}function $he(t,e,r){var n=oy(t,r[qt[e]]);return ET(n,r[qt[e]])}function ET(t,e){return Math.max(Math.min(t,pe(e,1/0)),0)}function TS(t){var e=t.matrixModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}var Ar={inBody:1,inCorner:2,outside:3},Xi={x:null,y:null,point:[]};function vO(t,e,r,n,i){var a=r[ke[e]],o=r[ke[1-e]],s=a.getUnitLayoutInfo(e,a.getLocatorCount(e)-1),l=a.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),c=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,f=t.point[e]=n[e];if(!l&&!c){t[ke[e]]=Ar.outside;return}if(i===Qa.body){l?(t[ke[e]]=Ar.inBody,f=kn(s.xy+s.wh,jt(l.xy,f)),t.point[e]=f):t[ke[e]]=Ar.outside;return}else if(i===Qa.corner){c?(t[ke[e]]=Ar.inCorner,f=kn(c.xy+c.wh,jt(u.xy,f)),t.point[e]=f):t[ke[e]]=Ar.outside;return}var h=l?l.xy:c?c.xy+c.wh:NaN,v=u?u.xy:h,p=s?s.xy+s.wh:h;if(fp){if(!i){t[ke[e]]=Ar.outside;return}f=p}t.point[e]=f,t[ke[e]]=h<=f&&f<=p?Ar.inBody:v<=f&&f<=h?Ar.inCorner:Ar.outside}function dO(t,e,r,n){var i=1-r;if(t[ke[r]]!==Ar.outside)for(n[ke[r]].resetCellIterator(bS);bS.next();){var a=bS.item;if(gO(t.point[r],a.rect,r)&&gO(t.point[i],a.rect,i)){e[r]=a.ordinal,e[i]=a.id[ke[i]];return}}}function pO(t,e,r,n){if(t[ke[r]]!==Ar.outside){var i=t[ke[r]]===Ar.inCorner?n[ke[1-r]]:n[ke[r]];for(i.resetLayoutIterator(Ig,r);Ig.next();)if(Yhe(t.point[r],Ig.item)){e[r]=Ig.item.id[ke[r]];return}}}function Yhe(t,e){return e.xy<=t&&t<=e.xy+e.wh}function gO(t,e,r){return e[ke[r]]<=t&&t<=e[ke[r]]+e[qt[r]]}function Xhe(t){t.registerComponentModel(Bhe),t.registerComponentView(Hhe),t.registerCoordinateSystem("matrix",Zhe)}function qhe(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function mO(t,e){var r;return N(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function Khe(t,e,r){var n=J({},r),i=t[e],a=r.$action||"merge";a==="merge"?i?(Re(i,n,!0),_a(i,n,{ignoreSize:!0}),jV(r,i),Eg(r,i),Eg(r,i,"shape"),Eg(r,i,"style"),Eg(r,i,"extra"),r.clipPath=i.clipPath):t[e]=n:a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var wH=["transition","enterFrom","leaveTo"],Qhe=wH.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Eg(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?wH:Qhe,i=0;i=0;c--){var f=i[c],h=rr(f.id,null),v=h!=null?o.get(h):null;if(v){var p=v.parent,y=$n(p),x=p===a?{width:s,height:l}:{width:y.width,height:y.height},S={},b=H0(v,f,x,null,{hv:f.hv,boundingMode:f.bounding},S);if(!$n(v).isNew&&b){for(var T=f.transition,C={},M=0;M=0)?C[D]=I:v[D]=I}Ke(v,C,r,0)}else v.attr(S)}}},e.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){_m(i,$n(i).option,n,r._lastGraphicModel)}),this._elMap=ve()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(gt);function RT(t){var e=fe(yO,t)?yO[t]:$v(t),r=new e({});return $n(r).type=t,r}function _O(t,e,r,n){var i=RT(r);return e.add(i),n.set(t,i),$n(i).id=t,$n(i).isNew=!0,i}function _m(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){_m(a,e,r,n)}),a_(t,e,n),r.removeKey($n(t).id))}function xO(t,e,r,n){t.isGroup||N([["cursor",si.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];fe(e,a)?t[a]=pe(e[a],i[1]):t[a]==null&&(t[a]=i[1])}),N(Ue(e),function(i){if(i.indexOf("on")===0){var a=e[i];t[i]=me(a)?a:null}}),fe(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function rve(t){return t=J({},t),N(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(BV),function(e){delete t[e]}),t}function nve(t,e,r){var n=Ae(t).eventData;!t.silent&&!t.ignore&&!n&&(n=Ae(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=r.info)}function ive(t){t.registerComponentModel(eve),t.registerComponentView(tve),t.registerPreprocessor(function(e){var r=e.graphic;ee(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}var SO=["x","y","radius","angle","single"],ave=["cartesian2d","polar","singleAxis"];function ove(t){var e=t.get("coordinateSystem");return Ee(ave,e)>=0}function Wo(t){return t+"Axis"}function sve(t,e){var r=ve(),n=[],i=ve();t.eachComponent({mainType:"dataZoom",query:e},function(c){i.get(c.uid)||s(c)});var a;do a=!1,t.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,v){var p=r.get(h);p&&p[v]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(r.get(f)||r.set(f,[]))[h]=!0})}return n}function bH(t){var e=t.ecModel,r={infoList:[],infoMap:ve()};return t.eachTargetAxis(function(n,i){var a=e.getComponent(Wo(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var CS=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},t}(),hd=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return e.prototype.init=function(r,n,i){var a=wO(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},e.prototype.mergeOption=function(r){var n=wO(r);Re(this.option,r,!0),Re(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;N([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=ve(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return N(SO,function(i){var a=this.getReferringComponents(Wo(i),CX);if(a.specified){n=!0;var o=new CS;N(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new CS;if(h.add(f.componentIndex),r.set(c,h),a=!1,c==="x"||c==="y"){var v=f.getReferringComponents("grid",Dt).models[0];v&&N(u,function(p){f.componentIndex!==p.componentIndex&&v===p.getReferringComponents("grid",Dt).models[0]&&h.add(p.componentIndex)})}}}a&&N(SO,function(u){if(a){var c=i.findComponents({mainType:Wo(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new CS;f.add(c[0].componentIndex),r.set(u,f),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");N([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(Wo(n),i))},this),r},e.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){N(i.indexList,function(o){r.call(n,a,o)})})},e.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(r,n){var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(Wo(r),n)},e.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;N([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},e.prototype.setCalculatedRange=function(r){var n=this.option;N(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},e.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},e.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(S&&!b&&!T)return!0;S&&(m=!0),b&&(p=!0),T&&(g=!0)}return m&&p&&g})}else ec(c,function(v){if(a==="empty")l.setData(u=u.map(v,function(g){return s(g)?g:NaN}));else{var p={};p[v]=o,u.selectRange(p)}});ec(c,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},t.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;ec(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=rt(n[0]+o,n,[0,100],!0):a!=null&&(o=rt(a,[0,100],n,!0)-n[0]),e[i+"Span"]=a,e[i+"ValueSpan"]=o},this)},t.prototype._setAxisModel=function(){var e=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=v2(n,[0,500]);i=Math.min(i,20);var a=e.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},t}();function fve(t,e,r){var n=[1/0,-1/0];ec(r,function(o){Pte(n,o.getData(),e)});var i=t.getAxisModel(),a=wG(i.axis.scale,i,n).calculate();return[a.min,a.max]}var hve={getTargetSeries:function(t){function e(i){t.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=t.getComponent(Wo(o),s);i(o,s,l,a)})})}e(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];e(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new cve(i,a,s,t),r.push(o.__dzAxisProxy))});var n=ve();return N(r,function(i){N(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(t,e){t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,e)})}),t.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function vve(t){t.registerAction("dataZoom",function(e,r){var n=sve(r,e);N(n,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var TO=!1;function CL(t){TO||(TO=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,hve),vve(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function dve(t){t.registerComponentModel(lve),t.registerComponentView(uve),CL(t)}var Kn=function(){function t(){}return t}(),TH={};function tc(t,e){TH[t]=e}function CH(t){return TH[t]}var pve=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;N(this.option.feature,function(n,i){var a=CH(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),Re(n,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:X.color.border,borderRadius:0,borderWidth:0,padding:X.size.m,itemSize:15,itemGap:X.size.s,showTitle:!0,iconStyle:{borderColor:X.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:X.color.accent50}},tooltip:{show:!1,position:"bottom"}},e}(Be);function MH(t,e){var r=_f(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var i=new ze({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var gve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},c=this._features||(this._features={}),f=[];N(u,function(x,S){f.push(S)}),new so(this._featureNames||[],f).add(h).update(h).remove(Ie(h,null)).execute(),this._featureNames=f;function h(x,S){var b=f[x],T=f[S],C=u[b],M=new je(C,r,r.ecModel),D;if(a&&a.newTitle!=null&&a.featureName===b&&(C.title=a.newTitle),b&&!T){if(mve(b))D={onclick:M.option.onclick,featureName:b};else{var I=CH(b);if(!I)return;D=new I}c[b]=D}else if(D=c[T],!D)return;D.uid=yf("toolbox-feature"),D.model=M,D.ecModel=n,D.api=i;var k=D instanceof Kn;if(!b&&T){k&&D.dispose&&D.dispose(n,i);return}if(!M.get("show")||k&&D.unusable){k&&D.remove&&D.remove(n,i);return}v(M,D,b),M.setIconStatus=function(E,z){var O=this.option,F=this.iconPaths;O.iconStatus=O.iconStatus||{},O.iconStatus[E]=z,F[E]&&(z==="emphasis"?ao:oo)(F[E])},D instanceof Kn&&D.render&&D.render(M,n,i,a)}function v(x,S,b){var T=x.getModel("iconStyle"),C=x.getModel(["emphasis","iconStyle"]),M=S instanceof Kn&&S.getIcons?S.getIcons():x.get("icon"),D=x.get("title")||{},I,k;se(M)?(I={},I[b]=M):I=M,se(D)?(k={},k[b]=D):k=D;var E=x.iconPaths={};N(I,function(z,O){var F=gf(z,{},{x:-s/2,y:-s/2,width:s,height:s});F.setStyle(T.getItemStyle());var j=F.ensureState("emphasis");j.style=C.getItemStyle();var G=new Ye({style:{text:k[O],align:C.get("textAlign"),borderRadius:C.get("textBorderRadius"),padding:C.get("textPadding"),fill:null,font:O2({fontStyle:C.get("textFontStyle"),fontFamily:C.get("textFontFamily"),fontSize:C.get("textFontSize"),fontWeight:C.get("textFontWeight")},n)},ignore:!0});F.setTextContent(G),po({el:F,componentModel:r,itemName:O,formatterParamsExtra:{title:k[O]}}),F.__title=k[O],F.on("mouseover",function(){var Z=C.getItemStyle(),V=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";G.setStyle({fill:C.get("textFill")||Z.fill||Z.stroke||X.color.neutral99,backgroundColor:C.get("textBackgroundColor")}),F.setTextConfig({position:C.get("textPosition")||V}),G.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){x.get(["iconStatus",O])!=="emphasis"&&i.leaveEmphasis(this),G.hide()}),(x.get(["iconStatus",O])==="emphasis"?ao:oo)(F),o.add(F),F.on("click",le(S.onclick,S,n,i,O)),E[O]=F})}var p=or(r,i).refContainer,g=r.getBoxLayoutParams(),m=r.get("padding"),y=St(g,p,m);Dl(r.get("orient"),o,r.get("itemGap"),y.width,y.height),H0(o,g,p,m),o.add(MH(o.getBoundingRect(),r)),l||o.eachChild(function(x){var S=x.__title,b=x.ensureState("emphasis"),T=b.textConfig||(b.textConfig={}),C=x.getTextContent(),M=C&&C.ensureState("emphasis");if(M&&!me(M)&&S){var D=M.style||(M.style={}),I=P0(S,Ye.makeFont(D)),k=x.x+o.x,E=x.y+o.y+s,z=!1;E+I.height>i.getHeight()&&(T.position="top",z=!0);var O=z?-5-I.height:s+10;k+I.width/2>i.getWidth()?(T.position=["100%",O],D.align="right"):k-I.width/2<0&&(T.position=[0,O],D.align="left")}})},e.prototype.updateView=function(r,n,i,a){N(this._features,function(o){o instanceof Kn&&o.updateView&&o.updateView(o.model,n,i,a)})},e.prototype.remove=function(r,n){N(this._features,function(i){i instanceof Kn&&i.remove&&i.remove(r,n)}),this.group.removeAll()},e.prototype.dispose=function(r,n){N(this._features,function(i){i instanceof Kn&&i.dispose&&i.dispose(r,n)})},e.type="toolbox",e}(gt);function mve(t){return t.indexOf("my")===0}var yve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||X.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=We.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),v=h[0].indexOf("base64")>-1,p=o?decodeURIComponent(h[1]):h[1];v&&(p=window.atob(p));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=p.length,y=new Uint8Array(m);m--;)y[m]=p.charCodeAt(m);var x=new Blob([y]);window.navigator.msSaveOrOpenBlob(x,g)}else{var S=document.createElement("iframe");document.body.appendChild(S);var b=S.contentWindow,T=b.document;T.open("image/svg+xml","replace"),T.write(p),T.close(),b.focus(),T.execCommand("SaveAs",!0,g),document.body.removeChild(S)}}else{var C=i.get("lang"),M='',D=window.open();D.document.write(M),D.document.title=a}},e.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:X.color.neutral00,name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(Kn),CO="__ec_magicType_stack__",_ve=[["line","bar"],["stack"]],xve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return N(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},e.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(MO[i]){var s={series:[]},l=function(f){var h=f.subType,v=f.id,p=MO[i](h,v,f,a);p&&(Se(p,f.option),s.series.push(p));var g=f.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var m=g.getAxesByScale("ordinal")[0];if(m){var y=m.dim,x=y+"Axis",S=f.getReferringComponents(x,Dt).models[0],b=S.componentIndex;s[x]=s[x]||[];for(var T=0;T<=b;T++)s[x][b]=s[x][b]||{};s[x][b].boundaryGap=i==="bar"}}};N(_ve,function(f){Ee(f,i)>=0&&N(f,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=Re({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Kn),MO={line:function(t,e,r,n){if(t==="bar")return Re({id:e,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(t,e,r,n){if(t==="line")return Re({id:e,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(t,e,r,n){var i=r.get("stack")===CO;if(t==="line"||t==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Re({id:e,stack:i?"":CO},n.get(["option","stack"])||{},!0)}};Oi({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var o_=new Array(60).join("-"),nf=" ";function Sve(t){var e={},r=[],n=[];return t.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:e,other:r,meta:n}}function wve(t){var e=[];return N(t,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(re(r.series,function(v){return v.name})),l=[i.model.getCategories()];N(r.series,function(v){var p=v.getRawData();l.push(v.getRawData().mapArray(p.mapDimension(o),function(g){return g}))});for(var u=[s.join(nf)],c=0;c"].join(n)}function eT(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function rE(t,e,r,n){return cr("svg","root",{width:t,height:e,xmlns:Wj,"xmlns:xlink":Uj,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var Ore=0;function $j(){return Ore++}var nE={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},ol="transform-origin";function zre(t,e,r){var n=J({},t.shape);J(n,e),t.buildPath(r,n);var i=new Hj;return i.reset(v4(t)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function Bre(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[ol]=r+"px "+n+"px")}var Vre={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Yj(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function Fre(t,e,r){var n=t.shape.paths,i={},a,o;if(N(n,function(l){var u=eT(r.zrId);u.animation=!0,K0(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,h=Ue(c),v=h.length;if(v){o=h[v-1];var p=c[o];for(var g in p){var m=p[g];i[g]=i[g]||{d:""},i[g].d+=m.d||""}for(var y in f){var x=f[y].animation;x.indexOf(o)>=0&&(a=x)}}}),!!a){e.d=!1;var s=Yj(i,r);return a.replace(o,s)}}function iE(t){return se(t)?nE[t]?"cubic-bezier("+nE[t]+")":u2(t)?t:"":""}function K0(t,e,r,n){var i=t.animators,a=i.length,o=[];if(t instanceof kd){var s=Fre(t,e,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var Fe=Yj(M,r);return Fe+" "+x[0]+" both"}}for(var m in l){var s=g(l[m]);s&&o.push(s)}if(o.length){var y=r.zrId+"-cls-"+$j();r.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function jre(t,e,r){if(!t.ignore)if(t.isSilent()){var n={"pointer-events":"none"};aE(n,e,r)}else{var i=t.states.emphasis&&t.states.emphasis.style?t.states.emphasis.style:{},a=i.fill;if(!a){var o=t.style&&t.style.fill,s=t.states.select&&t.states.select.style&&t.states.select.style.fill,l=t.currentStates.indexOf("select")>=0&&s||o;l&&(a=ty(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&t.transform?t.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),aE(n,e,r)}}function aE(t,e,r,n){var i=JSON.stringify(t),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+$j(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=t),e.class=e.class?e.class+" "+a:a}var nd=Math.round;function Xj(t){return t&&se(t.src)}function qj(t){return t&&me(t.toDataURL)}function AM(t,e,r,n){Dre(function(i,a){var o=i==="fill"||i==="stroke";o&&h4(a)?Qj(e,t,i,n):o&&f2(a)?Jj(r,t,i,n):t[i]=a,o&&n.ssr&&a==="none"&&(t["pointer-events"]="visible")},e,r,!1),Yre(r,t,n)}function PM(t,e){var r=S4(e);r&&(r.each(function(n,i){n!=null&&(t[(tE+i).toLowerCase()]=n+"")}),e.isSilent()&&(t[tE+"silent"]="true"))}function oE(t){return Go(t[0]-1)&&Go(t[1])&&Go(t[2])&&Go(t[3]-1)}function Gre(t){return Go(t[4])&&Go(t[5])}function DM(t,e,r){if(e&&!(Gre(e)&&oE(e))){var n=1e4;t.transform=oE(e)?"translate("+nd(e[4]*n)/n+" "+nd(e[5]*n)/n+")":bY(e)}}function sE(t,e,r){for(var n=t.points,i=[],a=0;a"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";Er(h,m),Er(v,m)}else if(h==null||v==null){var y=function(k,E){if(k){var z=k.elm,O=h||E.width,F=v||E.height;k.tag==="pattern"&&(u?(F=1,O/=a.width):c&&(O=1,F/=a.height)),k.attrs.width=O,k.attrs.height=F,z&&(z.setAttribute("width",O),z.setAttribute("height",F))}},x=x2(p,null,t,function(k){l||y(C,k),y(f,k)});x&&x.width&&x.height&&(h=h||x.width,v=v||x.height)}f=cr("image","img",{href:p,width:h,height:v}),o.width=h,o.height=v}else i.svgElement&&(f=ye(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var S,b;l?S=b=1:u?(b=1,S=o.width/a.width):c?(S=1,b=o.height/a.height):o.patternUnits="userSpaceOnUse",S!=null&&!isNaN(S)&&(o.width=S),b!=null&&!isNaN(b)&&(o.height=b);var T=d4(i);T&&(o.patternTransform=T);var C=cr("pattern","",o,[f]),M=LM(C),D=n.patternCache,I=D[M];I||(I=n.zrId+"-p"+n.patternIdx++,D[M]=I,o.id=I,C=n.defs[I]=cr("pattern",I,o,[f])),e[r]=A0(I)}}function Xre(t,e,r){var n=r.clipPathCache,i=r.defs,a=n[t.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[t.id]=a,i[a]=cr("clipPath",a,o,[Kj(t,r)])}e["clip-path"]=A0(a)}function cE(t){return document.createTextNode(t)}function vl(t,e,r){t.insertBefore(e,r)}function fE(t,e){t.removeChild(e)}function hE(t,e){t.appendChild(e)}function eG(t){return t.parentNode}function tG(t){return t.nextSibling}function L1(t,e){t.textContent=e}var vE=58,qre=120,Kre=cr("","");function tT(t){return t===void 0}function ea(t){return t!==void 0}function Qre(t,e,r){for(var n={},i=e;i<=r;++i){var a=t[i].key;a!==void 0&&(n[a]=i)}return n}function Fh(t,e){var r=t.key===e.key,n=t.tag===e.tag;return n&&r}function id(t){var e,r=t.children,n=t.tag;if(ea(n)){var i=t.elm=Zj(n);if(kM(Kre,t),ee(r))for(e=0;ea?(p=r[l+1]==null?null:r[l+1].elm,rG(t,p,r,i,l)):Iy(t,e,n,a))}function Ju(t,e){var r=e.elm=t.elm,n=t.children,i=e.children;t!==e&&(kM(t,e),tT(e.text)?ea(n)&&ea(i)?n!==i&&Jre(r,n,i):ea(i)?(ea(t.text)&&L1(r,""),rG(r,null,i,0,i.length-1)):ea(n)?Iy(r,n,0,n.length-1):ea(t.text)&&L1(r,""):t.text!==e.text&&(ea(n)&&Iy(r,n,0,n.length-1),L1(r,e.text)))}function ene(t,e){if(Fh(t,e))Ju(t,e);else{var r=t.elm,n=eG(r);id(e),n!==null&&(vl(n,e.elm,tG(r)),Iy(n,[t],0,0))}return e}var tne=0,rne=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=dE(),this.configLayer=dE(),this.storage=r,this._opts=n=J({},n),this.root=e,this._id="zr"+tne++,this._oldVNode=rE(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=Zj("svg");kM(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",ene(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return uE(e,eT(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=eT(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=nne(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=cr("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=re(Ue(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(cr("defs","defs",{},u)),e.animation){var c=Nre(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=cr("style","stl",{},[],c);o.push(f)}}return rE(n,i,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},LM(this.renderToVNode({animation:pe(e.cssAnimation,!0),emphasis:pe(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:pe(e.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(e,r,n){for(var i=e.length,a=[],o=0,s,l,u=0,c=0;c=0&&!(h&&l&&h[g]===l[g]);g--);for(var m=p-1;m>g;m--)o--,s=a[o-1];for(var y=g+1;y=s)}}for(var f=this.__startIndex;f15)break}}F.prevElClipPaths&&y.restore()};if(x)if(x.length===0)D=m.__endIndex;else for(var k=v.dpr,E=0;E0&&e>i[0]){for(l=0;le);l++);s=n[i[l]]}if(i.splice(l+1,0,e),n[e]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},t.prototype.eachLayer=function(e,r){for(var n=this._zlevelList,i=0;i0?hg:0),this._needsManuallyCompositing),c.__builtin__||b0("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),a=c),i.__dirty&bn&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(f,h){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,N(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var n=this._layerConfig;n[e]?Re(n[e],r,!0):n[e]=r;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill=X.color.neutral00,u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(ht);function Qc(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=Yc(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(e[a])}return n.join(" ")}var zd=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=Ut(r,-1,-1,2,2,null,s);l.attr({z2:pe(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=fne,this._symbolType=r,this.add(l)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){oo(this.childAt(0))},e.prototype.downplay=function(){so(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=e.getSymbolSize(r,n),u=e.getSymbolZ2(r,n),c=o!==this._symbolType,f=a&&a.disableAnimation;if(c){var h=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,h)}else{var v=this.childAt(0);v.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};f?v.attr(p):Qe(v,p,s,n),li(v)}if(this._updateCommon(r,n,l,i,a),c){var v=this.childAt(0);if(!f){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,St(v,p,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,f,h,v,p,g,m,y;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,h=a.focus,v=a.blurScope,g=a.labelStatesModels,m=a.hoverScale,y=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var x=a&&a.itemModel?a.itemModel:r.getItemModel(n),S=x.getModel("emphasis");u=S.getModel("itemStyle").getItemStyle(),f=x.getModel(["select","itemStyle"]).getItemStyle(),c=x.getModel(["blur","itemStyle"]).getItemStyle(),h=S.get("focus"),v=S.get("blurScope"),p=S.get("disabled"),g=ar(x),m=S.getShallow("scale"),y=x.getShallow("cursor")}var b=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(b||0)*Math.PI/180||0);var T=lu(r.getItemVisual(n,"symbolOffset"),i);T&&(s.x=T[0],s.y=T[1]),y&&s.attr("cursor",y);var C=r.getItemVisual(n,"style"),M=C.fill;if(s instanceof dr){var D=s.style;s.useStyle(J({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},C))}else s.__isEmptyBrush?s.useStyle(J({},C)):s.useStyle(C),s.style.decal=null,s.setColor(M,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var I=r.getItemVisual(n,"liftZ"),k=this._z2;I!=null?k==null&&(this._z2=s.z2,s.z2+=I):k!=null&&(s.z2=k,this._z2=null);var E=o&&o.useNameLabel;vr(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:z,inheritColor:M,defaultOpacity:C.opacity});function z(G){return E?r.getName(G):Qc(r,G)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var O=s.ensureState("emphasis");O.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var F=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;O.scaleX=this._sizeX*F,O.scaleY=this._sizeY*F,this.setSymbolScale(1),bt(this,h,v,p)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=Ae(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&vs(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();vs(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return bf(r.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},e}(_e);function fne(t,e){this.parent.drift(t,e)}function P1(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function mE(t){return t!=null&&!we(t)&&(t={isIgnore:t}),t||{}}function yE(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:ar(e),cursorStyle:e.get("cursor")}}var Bd=function(){function t(e){this.group=new _e,this._SymbolCtor=e||zd}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=mE(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=yE(e),u={disableAnimation:s},c=r.getSymbolPoint||function(f){return e.getItemLayout(f)};a||n.removeAll(),e.diff(a).add(function(f){var h=c(f);if(P1(e,h,f,r)){var v=new o(e,f,l,u);v.setPosition(h),e.setItemGraphicEl(f,v),n.add(v)}}).update(function(f,h){var v=a.getItemGraphicEl(h),p=c(f);if(!P1(e,p,f,r)){n.remove(v);return}var g=e.getItemVisual(f,"symbol")||"circle",m=v&&v.getSymbolType&&v.getSymbolType();if(!v||m&&m!==g)n.remove(v),v=new o(e,f,l,u),v.setPosition(p);else{v.updateData(e,f,l,u);var y={x:p[0],y:p[1]};s?v.attr(y):Qe(v,y,i)}n.add(v),e.setItemGraphicEl(f,v)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=c,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=yE(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=mE(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0?r=n[0]:n[1]<0&&(r=n[1]),r}function aG(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function vne(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function dne(t,e,r,n,i,a,o,s){for(var l=vne(t,e),u=[],c=[],f=[],h=[],v=[],p=[],g=[],m=iG(i,e,o),y=t.getLayout("points")||[],x=e.getLayout("points")||[],S=0;S=i||g<0)break;if(El(y,x)){if(l){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](y,x),f=y,h=x;else{var S=y-u,b=x-c;if(S*S+b*b<.5){g+=a;continue}if(o>0){for(var T=g+a,C=e[T*2],M=e[T*2+1];C===y&&M===x&&m=n||El(C,M))v=y,p=x;else{k=C-u,E=M-c;var F=y-u,G=C-y,j=x-c,Z=M-x,V=void 0,W=void 0;if(s==="x"){V=Math.abs(F),W=Math.abs(G);var H=k>0?1:-1;v=y-H*V*o,p=x,z=y+H*W*o,O=x}else if(s==="y"){V=Math.abs(j),W=Math.abs(Z);var Y=E>0?1:-1;v=y,p=x-Y*V*o,z=y,O=x+Y*W*o}else V=Math.sqrt(F*F+j*j),W=Math.sqrt(G*G+Z*Z),I=W/(W+V),v=y-k*o*(1-I),p=x-E*o*(1-I),z=y+k*o*I,O=x+E*o*I,z=Co(z,Mo(C,y)),O=Co(O,Mo(M,x)),z=Mo(z,Co(C,y)),O=Mo(O,Co(M,x)),k=z-y,E=O-x,v=y-k*V/W,p=x-E*V/W,v=Co(v,Mo(u,y)),p=Co(p,Mo(c,x)),v=Mo(v,Co(u,y)),p=Mo(p,Co(c,x)),k=y-v,E=x-p,z=y+k*W/V,O=x+E*W/V}t.bezierCurveTo(f,h,v,p,y,x),f=z,h=O}else t.lineTo(y,x)}u=y,c=x,g+=a}return m}var oG=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),pne=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:X.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new oG},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&El(i[o*2-2],i[o*2-1]);o--);for(;a=0){var b=u?(p-l)*S+l:(v-s)*S+s;return u?[r,b]:[b,r]}s=v,l=p;break;case o.C:v=a[f++],p=a[f++],g=a[f++],m=a[f++],y=a[f++],x=a[f++];var T=u?Jm(s,v,g,y,r,c):Jm(l,p,m,x,r,c);if(T>0)for(var C=0;C=0){var b=u?lr(l,p,m,x,M):lr(s,v,g,y,M);return u?[r,b]:[b,r]}}s=y,l=x;break}}},e}(He),gne=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(oG),sG=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new gne},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&El(i[s*2-2],i[s*2-1]);s--);for(;oe){a?r.push(o(a,l,e)):i&&r.push(o(i,l,0),o(i,l,e));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function _ne(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())&&e.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=e.getAxis(i),u=re(a.stops,function(S){return{coord:l.toGlobalCoord(l.dataToCoord(S.value)),color:S.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=yne(u,i==="x"?r.getWidth():r.getHeight()),v=h.length;if(!v&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var p=10,g=h[0].coord-p,m=h[v-1].coord+p,y=m-g;if(y<.001)return"transparent";N(h,function(S){S.offset=(S.coord-g)/y}),h.push({offset:v?h[v-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:v?h[0].offset:.5,color:f[0]||"transparent"});var x=new iu(0,0,0,0,h,!0);return x[i]=g,x[i+"2"]=m,x}}}function xne(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&Sne(a,e))){var o=e.mapDimension(a.dim),s={};return N(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function Sne(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function wne(t,e){return isNaN(t)||isNaN(e)}function bne(t){for(var e=t.length/2;e>0&&wne(t[e*2-2],t[e*2-1]);e--);return e-1}function bE(t,e){return[t[e*2],t[e*2+1]]}function Tne(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function cG(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var W=p.getState("emphasis").style;W.lineWidth=+p.style.lineWidth+1}Ae(p).seriesIndex=r.seriesIndex,bt(p,j,Z,V);var H=wE(r.get("smooth")),Y=r.get("smoothMonotone");if(p.setShape({smooth:H,smoothMonotone:Y,connectNulls:M}),g){var K=s.getCalculationInfo("stackedOnSeries"),ne=0;g.useStyle(Se(u.getAreaStyle(),{fill:z,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),K&&(ne=wE(K.get("smooth"))),g.setShape({smooth:H,stackedOnSmooth:ne,smoothMonotone:Y,connectNulls:M}),ir(g,r,"areaStyle"),Ae(g).seriesIndex=r.seriesIndex,bt(g,j,Z,V)}var ie=this._changePolyState;s.eachItemGraphicEl(function(ue){ue&&(ue.onHoverStateChange=ie)}),this._polyline.onHoverStateChange=ie,this._data=s,this._coordSys=a,this._stackedOnPoints=T,this._points=c,this._step=k,this._valueOrigin=S,r.get("triggerLineEvent")&&(this.packEventData(r,p),g&&this.packEventData(r,g))},e.prototype.packEventData=function(r,n){Ae(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Hl(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=r.get("zlevel")||0,v=r.get("z")||0;u=new zd(o,s),u.x=c,u.y=f,u.setZ(h,v);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=v,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else lt.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Hl(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else lt.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;cy(this._polyline,r),n&&cy(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new pne({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new sG({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");me(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=me(f)?f(null):f;r.eachItemGraphicEl(function(v,p){var g=v;if(g){var m=[v.x,v.y],y=void 0,x=void 0,S=void 0;if(i)if(o){var b=i,T=n.pointToCoord(m);a?(y=b.startAngle,x=b.endAngle,S=-T[1]/180*Math.PI):(y=b.r0,x=b.r,S=T[0])}else{var C=i;a?(y=C.x,x=C.x+C.width,S=v.x):(y=C.y+C.height,x=C.y,S=v.y)}var M=x===y?0:(S-y)/(x-y);l&&(M=1-M);var D=me(f)?f(p):c*M+h,I=g.getSymbolPath(),k=I.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:D}),k&&k.animateFrom({style:{opacity:0}},{duration:300,delay:D}),I.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(cG(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Xe({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=bne(l);c>=0&&(vr(s,ar(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(f,h,v){return v!=null?nG(o,v):Qc(o,f)},enableTextSetter:!0},Cne(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=i.getLayout("points"),h=i.hostModel,v=h.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,m=l.getBaseAxis(),y=m.isHorizontal(),x=m.inverse,S=n.shape,b=x?y?S.x:S.y+S.height:y?S.x+S.width:S.y,T=(y?g:0)*(x?-1:1),C=(y?0:-g)*(x?-1:1),M=y?"x":"y",D=Tne(f,b,M),I=D.range,k=I[1]-I[0],E=void 0;if(k>=1){if(k>1&&!v){var z=bE(f,I[0]);u.attr({x:z[0]+T,y:z[1]+C}),o&&(E=h.getRawValue(I[0]))}else{var z=c.getPointOn(b,M);z&&u.attr({x:z[0]+T,y:z[1]+C});var O=h.getRawValue(I[0]),F=h.getRawValue(I[1]);o&&(E=N4(i,p,O,F,D.t))}a.lastFrameIndex=I[0]}else{var G=r===1||a.lastFrameIndex>0?I[0]:0,z=bE(f,G);o&&(E=h.getRawValue(G)),u.attr({x:z[0]+T,y:z[1]+C})}if(o){var j=mf(u);typeof j.setLabelText=="function"&&j.setLabelText(E)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=r.hostModel,h=dne(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),v=h.current,p=h.stackedOnCurrent,g=h.next,m=h.stackedOnNext;if(o&&(p=Lo(h.stackedOnCurrent,h.current,i,o,l),v=Lo(h.current,null,i,o,l),m=Lo(h.stackedOnNext,h.next,i,o,l),g=Lo(h.next,null,i,o,l)),SE(v,g)>3e3||c&&SE(p,m)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:m}));return}u.shape.__points=h.current,u.shape.points=v;var y={shape:{points:g}};h.current!==v&&(y.shape.__points=h.next),u.stopAnimation(),Qe(u,y,f),c&&(c.setShape({points:v,stackedOnPoints:p}),c.stopAnimation(),Qe(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var x=[],S=h.status,b=0;be&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),v=Math.round(s/h);if(isFinite(v)&&v>1){a==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/v)):a==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/v));var p=void 0;se(a)?p=Lne[a]:me(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/v,p,Ane))}}}}}function Pne(t){t.registerChartView(Mne),t.registerSeriesModel(cne),t.registerLayout(Fd("line",!0)),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,fG("line"))}var ad=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return Ta(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)N(a.getAxes(),function(h,v){if(h.type==="category"&&n!=null){var p=h.getTicksCoords(),g=h.getTickModel().get("alignWithLabel"),m=o[v],y=n[v]==="x1"||n[v]==="y1";if(y&&!g&&(m+=1),p.length<2)return;if(p.length===2){s[v]=h.toGlobalCoord(h.getExtent()[y?1:0]);return}for(var x=void 0,S=void 0,b=1,T=0;Tm){S=(C+x)/2;break}T===1&&(b=M-p[0].tickValue)}S==null&&(x?x&&(S=p[p.length-1].coord):S=p[0].coord),s[v]=h.toGlobalCoord(S)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e}(ht);ht.registerClass(ad);var Dne=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return Ta(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Ts(ad.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:X.color.primary,borderWidth:2}},realtimeSort:!1}),e}(ad),kne=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),Ey=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new kne},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,h=n.clockwise,v=Math.PI*2,p=h?f-cMath.PI/2&&cs)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){qa(a,r,Ae(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(lt),TE={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=k1(e.x,t.x),s=I1(e.x+e.width,i),l=k1(e.y,t.y),u=I1(e.y+e.height,a),c=si?s:o,e.y=f&&l>a?u:l,e.width=c?0:s-o,e.height=f?0:u-l,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=I1(e.r,t.r),a=k1(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},CE={cartesian2d:function(t,e,r,n,i,a,o,s,l){var u=new ze({shape:J({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(t,e,r,n,i,a,o,s,l){var u=!i&&l?Ey:Rr,c=new u({shape:n,z2:1});c.name="item";var f=hG(i);if(c.calculateTextPosition=Ine(f,{isRoundCap:u===Ey}),a){var h=c.shape,v=i?"r":"endAngle",p={};h[v]=i?n.r0:n.startAngle,p[v]=n[v],(s?Qe:St)(c,{shape:p},a)}return c}};function One(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function ME(t,e,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Qe:St)(r,{shape:l},e,i,null);var c=e?t.baseAxis.model:null;(o?Qe:St)(r,{shape:u},c,i)}function LE(t,e){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function Vne(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function hG(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function PE(t,e,r,n,i,a,o,s){var l=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=t.shape,f=ua(n.getModel("itemStyle"),c,!0);J(c,f),t.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var h=n.getShallow("cursor");h&&t.attr("cursor",h);var v=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=ar(n);vr(t,p,{labelFetcher:a,labelDataIndex:r,defaultText:Qc(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var g=t.getTextContent();if(s&&g){var m=n.get(["label","position"]);t.textConfig.inside=m==="middle"?!0:null,Ene(t,m==="outside"?v:m,hG(o),n.get(["label","rotate"]))}wV(g,p,a.getRawValue(r),function(x){return nG(e,x)});var y=n.getModel(["emphasis"]);bt(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),ir(t,n),Vne(i)&&(t.style.fill="none",t.style.stroke="none",N(t.states,function(x){x.style&&(x.style.fill=x.style.stroke="none")}))}function Fne(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var jne=function(){function t(){}return t}(),DE=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new jne},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?r:null},30,!1);function Gne(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],l=[],u=t.barWidth,c=0,f=a.length/3;c=s[0]&&e<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function vG(t,e,r){if(ds(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function Hne(t,e,r){var n=t.type==="polar"?Rr:ze;return new n({shape:vG(e,r,t),silent:!0,z2:0})}function Wne(t){t.registerChartView(Nne),t.registerSeriesModel(Dne),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(gj,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,mj("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,fG("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var EE=Math.PI*2,gg=Math.PI/180;function Une(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=FV(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,h=-n.get("startAngle")*gg,v=n.get("endAngle"),p=n.get("padAngle")*gg;v=v==="auto"?h-EE:-v*gg;var g=n.get("minAngle")*gg,m=g+p,y=0;i.each(a,function(Z){!isNaN(Z)&&y++});var x=i.getSum(a),S=Math.PI/(x||y)*2,b=n.get("clockwise"),T=n.get("roseType"),C=n.get("stillShowZeroSum"),M=i.getDataExtent(a);M[0]=0;var D=b?1:-1,I=[h,v],k=D*p/2;O0(I,!b),h=I[0],v=I[1];var E=dG(n);E.startAngle=h,E.endAngle=v,E.clockwise=b,E.cx=s,E.cy=l,E.r=u,E.r0=c;var z=Math.abs(v-h),O=z,F=0,G=h;if(i.setLayout({viewRect:f,r:u}),i.each(a,function(Z,V){var W;if(isNaN(Z)){i.setItemLayout(V,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:b,cx:s,cy:l,r0:c,r:T?NaN:u});return}T!=="area"?W=x===0&&C?S:Z*S:W=z/y,WW?(Y=G+D*W/2,K=Y):(Y=G+k,K=H-k),i.setItemLayout(V,{angle:W,startAngle:Y,endAngle:K,clockwise:b,cx:s,cy:l,r0:c,r:T?it(Z,M,[c,u]):u}),G=H}),Or?y:m,T=Math.abs(S.label.y-r);if(T>=b.maxY){var C=S.label.x-e-S.len2*i,M=n+S.len,D=Math.abs(C)t.unconstrainedWidth?null:h:null;n.setStyle("width",v)}gG(a,n)}}}function gG(t,e){NE.rect=t,Fj(NE,e,Yne)}var Yne={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},NE={};function E1(t){return t.position==="center"}function Xne(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*Zne,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function v(C){C.ignore=!0}function p(C){if(!C.ignore)return!0;for(var M in C.states)if(C.states[M].ignore===!1)return!0;return!1}e.each(function(C){var M=e.getItemGraphicEl(C),D=M.shape,I=M.getTextContent(),k=M.getTextGuideLine(),E=e.getItemModel(C),z=E.getModel("label"),O=z.get("position")||E.get(["emphasis","label","position"]),F=z.get("distanceToLabelLine"),G=z.get("alignTo"),j=oe(z.get("edgeDistance"),u),Z=z.get("bleedMargin");Z==null&&(Z=Math.min(u,h)>200?10:2);var V=E.getModel("labelLine"),W=V.get("length");W=oe(W,u);var H=V.get("length2");if(H=oe(H,u),Math.abs(D.endAngle-D.startAngle)0?"right":"left":K>0?"left":"right"}var rt=Math.PI,ut=0,kt=z.get("rotate");if(qe(kt))ut=kt*(rt/180);else if(O==="center")ut=0;else if(kt==="radial"||kt===!0){var pr=K<0?-Y+rt:-Y;ut=pr}else if(kt==="tangential"&&O!=="outside"&&O!=="outer"){var zr=Math.atan2(K,ne);zr<0&&(zr=rt*2+zr);var zi=ne>0;zi&&(zr=rt+zr),ut=zr-rt}if(a=!!ut,I.x=ie,I.y=ue,I.rotation=ut,I.setStyle({verticalAlign:"middle"}),xe){I.setStyle({align:Fe});var vu=I.states.select;vu&&(vu.x+=I.x,vu.y+=I.y)}else{var Bi=new Ce(0,0,0,0);gG(Bi,I),r.push({label:I,labelLine:k,position:O,len:W,len2:H,minTurnAngle:V.get("minTurnAngle"),maxSurfaceAngle:V.get("maxSurfaceAngle"),surfaceNormal:new Te(K,ne),linePoints:de,textAlign:Fe,labelDistance:F,labelAlignTo:G,edgeDistance:j,bleedMargin:Z,rect:Bi,unconstrainedWidth:Bi.width,labelStyleWidth:I.style.width})}M.setTextConfig({inside:xe})}}),!a&&t.get("avoidLabelOverlap")&&$ne(r,n,i,l,u,h,c,f);for(var g=0;g0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=a.r0}},e.type="pie",e}(lt);function Af(t,e,r){e=ee(e)&&{coordDimensions:e}||J({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=Tf(n,e).dimensions,a=new Zr(i,t);return a.initData(n,r),a}var Pf=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),Qne=Ve(),mG=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Pf(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Af(this,{coordDimensions:["value"],encodeDefaulter:Ie(Q2,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=Qne(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=C4(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){Gl(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(ht);UK({fullType:mG.type,getCoord2:function(t){return t.getShallow("center")}});function Jne(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(qe(o)&&!isNaN(o)&&o<0)})}}}function eie(t){t.registerChartView(Kne),t.registerSeriesModel(mG),kF("pie",t.registerAction),t.registerLayout(Ie(Une,"pie")),t.registerProcessor(Lf("pie")),t.registerProcessor(Jne("pie"))}var tie=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,n){return Ta(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:X.color.primary}},universalTransition:{divideShape:"clone"}},e}(ht),yG=4,rie=function(){function t(){}return t}(),nie=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new rie},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]=0;u--){var c=u*2,f=a[c]-s/2,h=a[c+1]-l/2;if(r>=f&&n>=h&&r<=f+s&&n<=h+l)return u}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,h=0;h=0&&(u.dataIndex=f+(e.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),aie=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},e.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=Fd("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},e.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new iie:new Bd,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(lt),_G={left:0,right:0,top:0,bottom:0},Ry=["25%","25%"],oie=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(r,n){var i=ou(r.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&_a(r.outerBounds,i)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&_a(this.option.outerBounds,r.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:_G,outerBoundsContain:"all",outerBoundsClampWidth:Ry[0],outerBoundsClampHeight:Ry[1],backgroundColor:X.color.transparent,borderWidth:1,borderColor:X.color.neutral30},e}(Be),nT=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Dt).models[0]},e.type="cartesian2dAxis",e}(Be);Bt(nT,Mf);var xG={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:X.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:X.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:X.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[X.color.backgroundTint,X.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:X.color.neutral00,borderColor:X.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},sie=Re({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},xG),IM=Re({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:X.color.axisMinorSplitLine,width:1}}},xG),lie=Re({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},IM),uie=Se({logBase:10},IM);const SG={category:sie,value:IM,time:lie,log:uie};var cie={value:1,category:1,time:1,log:1},iT=null;function fie(t){iT||(iT=t)}function jd(){return iT}function Jc(t,e,r,n){N(cie,function(i,a){var o=Re(Re({},SG[a],!0),n,!0),s=function(l){$(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=Xv(this),v=h?ou(c):{},p=f.getTheme();Re(c,p.get(a+"Axis")),Re(c,this.getDefaultOption()),c.type=OE(c),h&&_a(c,v,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=td.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=jd();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",OE)}function OE(t){return t.type||(t.data?"category":"value")}var hie=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return re(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),tt(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),aT=["x","y"];function zE(t){return(t.type==="interval"||t.type==="time")&&!t.hasBreaks()}var vie=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=aT,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!zE(r)||!zE(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-i[0]*c,v=o[1]-a[0]*f,p=this._transform=[c,0,0,f,h,v];this._invTransform=oi([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Ot(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return Ot(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new Ce(a,o,s,l)},e}(hie),wG=function(t){$(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(fi),Q0="expandAxisBreak",bG="collapseAxisBreak",TG="toggleAxisBreak",EM="axisbreakchanged",die={type:Q0,event:EM,update:"update",refineEvent:RM},pie={type:bG,event:EM,update:"update",refineEvent:RM},gie={type:TG,event:EM,update:"update",refineEvent:RM};function RM(t,e,r,n){var i=[];return N(t,function(a){i=i.concat(a.eventBreaks)}),{eventContent:{breaks:i}}}function mie(t){t.registerAction(die,e),t.registerAction(pie,e),t.registerAction(gie,e);function e(r,n){var i=[],a=Pc(n,r);function o(s,l){N(a[s],function(u){var c=u.updateAxisBreaks(r);N(c.breaks,function(f){var h;i.push(Se((h={},h[l]=u.componentIndex,h),f))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var Ho=Math.PI,yie=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],_ie=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],ef=Ve(),CG=Ve(),MG=function(){function t(e){this.recordMap={},this.resolveAxisNameOverlap=e}return t.prototype.ensureRecord=function(e){var r=e.axis.dim,n=e.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},t}();function xie(t,e,r,n){var i=r.axis,a=e.ensureRecord(r),o=[],s,l=NM(t.axisName)&&Kc(t.nameLocation);N(n,function(p){var g=xa(p);if(!(!g||g.label.ignore)){o.push(g);var m=a.transGroup;l&&(m.transform?oi(vh,m.transform):Cd(vh),g.transform&&Li(vh,vh,g.transform),Ce.copy(mg,g.localRect),mg.applyTransform(vh),s?s.union(mg):Ce.copy(s=new Ce(0,0,0,0),mg))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(p,g){return Math.abs(p.label[u]-c)-Math.abs(g.label[u]-c)}),l&&s){var f=i.getExtent(),h=Math.min(f[0],f[1]),v=Math.max(f[0],f[1])-h;s.union(new Ce(h,0,v,1))}a.stOccupiedRect=s,a.labelInfoList=o}var vh=fr(),mg=new Ce(0,0,0,0),LG=function(t,e,r,n,i,a){if(Kc(t.nameLocation)){var o=a.stOccupiedRect;o&&AG(yre({},o,a.transGroup.transform),n,i)}else PG(a.labelInfoList,a.dirVec,n,i)};function AG(t,e,r){var n=new Te;q0(t,e,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&qb(e,n)}function PG(t,e,r,n){for(var i=Te.dot(n,e)>=0,a=0,o=t.length;a0?"top":"bottom",a="center"):Wc(i-Ho)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),Sie=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],wie={axisLine:function(t,e,r,n,i,a,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,t.raw.axisLineAutoShow!=null&&(s=!!t.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=a.transform,c=[l[0],0],f=[l[1],0],h=c[0]>f[0];u&&(Ot(c,c,u),Ot(f,f,u));var v=J({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())jd().buildAxisBreakLine(n,i,a,p);else{var g=new Wt(J({shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]}},p));$c(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var y=n.get(["axisLine","symbolSize"]);se(m)&&(m=[m,m]),(se(y)||qe(y))&&(y=[y,y]);var x=lu(n.get(["axisLine","symbolOffset"])||0,y),S=y[0],b=y[1];N([{rotate:t.rotation+Math.PI/2,offset:x[0],r:0},{rotate:t.rotation-Math.PI/2,offset:x[1],r:Math.sqrt((c[0]-f[0])*(c[0]-f[0])+(c[1]-f[1])*(c[1]-f[1]))}],function(T,C){if(m[C]!=="none"&&m[C]!=null){var M=Ut(m[C],-S/2,-b/2,S,b,v.stroke,!0),D=T.r+T.offset,I=h?f:c;M.attr({rotation:T.rotate,x:I[0]+D*Math.cos(t.rotation),y:I[1]-D*Math.sin(t.rotation),silent:!0,z2:11}),i.add(M)}})}}},axisTickLabelEstimate:function(t,e,r,n,i,a,o,s){var l=VE(e,i,s);l&&BE(t,e,r,n,i,a,o,Ri.estimate)},axisTickLabelDetermine:function(t,e,r,n,i,a,o,s){var l=VE(e,i,s);l&&BE(t,e,r,n,i,a,o,Ri.determine);var u=Mie(t,i,a,n);Cie(t,e.labelLayoutList,u),Lie(t,i,a,n,t.tickDirection)},axisName:function(t,e,r,n,i,a,o,s){var l=r.ensureRecord(n);e.nameEl&&(i.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=t.axisName;if(NM(u)){var c=t.nameLocation,f=t.nameDirection,h=n.getModel("nameTextStyle"),v=n.get("nameGap")||0,p=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new Te(0,0),y=new Te(0,0);c==="start"?(m.x=p[0]-g*v,y.x=-g):c==="end"?(m.x=p[1]+g*v,y.x=g):(m.x=(p[0]+p[1])/2,m.y=t.labelOffset+f*v,y.y=f);var x=fr();y.transform(vo(x,x,t.rotation));var S=n.get("nameRotate");S!=null&&(S=S*Ho/180);var b,T;Kc(c)?b=tn.innerTextLayout(t.rotation,S??t.rotation,f):(b=bie(t.rotation,c,S||0,p),T=t.raw.axisNameAvailableWidth,T!=null&&(T=Math.abs(T/Math.sin(b.rotation)),!isFinite(T)&&(T=null)));var C=h.getFont(),M=n.get("nameTruncate",!0)||{},D=M.ellipsis,I=Sr(t.raw.nameTruncateMaxWidth,M.maxWidth,T),k=s.nameMarginLevel||0,E=new Xe({x:m.x,y:m.y,rotation:b.rotation,silent:tn.isLabelSilent(n),style:pt(h,{text:u,font:C,overflow:"truncate",width:I,ellipsis:D,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||b.textAlign,verticalAlign:h.get("verticalAlign")||b.textVerticalAlign}),z2:1});if(go({el:E,componentModel:n,itemName:u}),E.__fullText=u,E.anid="name",n.get("triggerEvent")){var z=tn.makeAxisEventDataBase(n);z.targetType="axisName",z.name=u,Ae(E).eventData=z}a.add(E),E.updateTransform(),e.nameEl=E;var O=l.nameLayout=xa({label:E,priority:E.z2,defaultAttr:{ignore:E.ignore},marginDefault:Kc(c)?yie[k]:_ie[k]});if(l.nameLocation=c,i.add(E),E.decomposeTransform(),t.shouldNameMoveOverlap&&O){var F=r.ensureRecord(n);r.resolveAxisNameOverlap(t,r,n,O,y,F)}}}};function BE(t,e,r,n,i,a,o,s){kG(e)||Aie(t,e,i,s,n,o);var l=e.labelLayoutList;Pie(t,n,l,a),Iie(n,t.rotation,l);var u=t.optionHideOverlap;Tie(n,l,u),u&&jj(tt(l,function(c){return c&&!c.label.ignore})),xie(t,r,n,l)}function bie(t,e,r,n){var i=d2(r-t),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return Wc(i-Ho/2)?(o=l?"bottom":"top",a="center"):Wc(i-Ho*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",iHo/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function Tie(t,e,r){if(Tj(t.axis))return;function n(s,l,u){var c=xa(e[l]),f=xa(e[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){jh(c.label);return}if(f.suggestIgnore){jh(f.label);return}var h=.1;if(!r){var v=[0,0,0,0];c=Kb({marginForce:v},c),f=Kb({marginForce:v},f)}q0(c,f,null,{touchThreshold:h})&&jh(s?f.label:c.label)}}var i=t.get(["axisLabel","showMinLabel"]),a=t.get(["axisLabel","showMaxLabel"]),o=e.length;n(i,0,1),n(a,o-1,o-2)}function Cie(t,e,r){t.showMinorTicks||N(e,function(n){if(n&&n.label.ignore)for(var i=0;iu[0]&&isFinite(p)&&isFinite(u[0]);)v=y1(v),p=u[1]-v*o;else{var m=t.getTicks().length-1;m>o&&(v=y1(v));var y=v*o;g=Math.ceil(u[1]/v)*v,p=Ht(g-y),p<0&&u[0]>=0?(p=0,g=Ht(y)):g>0&&u[1]<=0&&(g=0,p=-Ht(y))}var x=(i[0].value-a[0].value)/s,S=(i[o].value-a[o].value)/s;n.setExtent.call(t,p+v*x,g+v*S),n.setInterval.call(t,v),(x||S)&&n.setNiceExtent.call(t,p+v,g-v)}var jE=[[3,1],[0,2]],Oie=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=aT,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=Ue(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],v=o[h],p=v.model,g=v.scale;Wb(g)&&p.get("alignTicks")&&p.get("interval")==null?c.push(v):(Xl(g,p),Wb(g)&&(s=v))}c.length&&(s||(s=c.pop(),Xl(s.scale,s.model)),N(c,function(m){IG(m.scale,m.model,s.scale)}))}}i(n.x),i(n.y);var a={};N(n.x,function(o){GE(n,"y",o,a)}),N(n.y,function(o){GE(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=or(e,r),a=this._rect=wt(e.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(sT(o,a),!n){var u=Vie(a,s,o,l,r),c=void 0;if(l)lT?(lT(this._axesList,a),sT(o,a)):c=UE(a.clone(),"axisLabel",null,a,o,u,i);else{var f=Fie(e,a,i),h=f.outerBoundsRect,v=f.parsedOuterBoundsContain,p=f.outerBoundsClamp;h&&(c=UE(h,v,p,a,o,u,i))}EG(a,o,Ri.determine,null,c,i)}N(this._coordsList,function(g){g.calcAffineTransform()})},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}we(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i0})==null;return Zl(n,s,!0,!0,r),sT(i,n),l;function u(h){N(i[ke[h]],function(v){if(rd(v.model)){var p=a.ensureRecord(v.model),g=p.labelInfoList;if(g)for(var m=0;m0&&!Dr(v)&&v>1e-4&&(h/=v),h}}function Vie(t,e,r,n,i){var a=new MG(jie);return N(r,function(o){return N(o,function(s){if(rd(s.model)){var l=!n;s.axisBuilder=Rie(t,e,s.model,i,a,l)}})}),a}function EG(t,e,r,n,i,a){var o=r===Ri.determine;N(e,function(u){return N(u,function(c){rd(c.model)&&(Nie(c.axisBuilder,t,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[ke[1-u]]=t[qt[u]]<=a.refContainer[qt[u]]*.5?0:1-u===1?2:1}N(e,function(u,c){return N(u,function(f){rd(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function Fie(t,e,r){var n,i=t.get("outerBoundsMode",!0);i==="same"?n=e.clone():(i==null||i==="auto")&&(n=wt(t.get("outerBounds",!0)||_G,r.refContainer));var a=t.get("outerBoundsContain",!0),o;a==null||a==="auto"||Ee(["all","axisLabel"],a)<0?o="all":o=a;var s=[oy(pe(t.get("outerBoundsClampWidth",!0),Ry[0]),e.width),oy(pe(t.get("outerBoundsClampHeight",!0),Ry[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var jie=function(t,e,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";LG(t,e,r,n,i,a),Kc(t.nameLocation)||N(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&PG(s.labelInfoList,s.dirVec,n,i)})};function Gie(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return Hie(r,t,e),r.seriesInvolved&&Uie(r,t),r}function Hie(t,e,r){var n=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];N(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=od(s.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(N(s.getAxes(),Ie(g,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var h=f.get("trigger")==="axis",v=f.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||v)&&N(p.baseAxes,Ie(g,v?"cross":!0,h)),v&&N(p.otherAxes,Ie(g,"cross",!1))}function g(m,y,x){var S=x.model.getModel("axisPointer",i),b=S.get("show");if(!(!b||b==="auto"&&!m&&!uT(S))){y==null&&(y=S.get("triggerTooltip")),S=m?Wie(x,f,i,e,m,y):S;var T=S.get("snap"),C=S.get("triggerEmphasis"),M=od(x.model),D=y||T||x.type==="category",I=t.axesInfo[M]={key:M,axis:x,coordSys:s,axisPointerModel:S,triggerTooltip:y,triggerEmphasis:C,involveSeries:D,snap:T,useHandle:uT(S),seriesModels:[],linkGroup:null};u[M]=I,t.seriesInvolved=t.seriesInvolved||D;var k=Zie(a,x);if(k!=null){var E=o[k]||(o[k]={axesInfo:{}});E.axesInfo[M]=I,E.mapper=a[k].mapper,I.linkGroup=E}}}})}function Wie(t,e,r,n,i,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};N(s,function(h){l[h]=ye(o.get(h))}),l.snap=t.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var f=l.lineStyle=o.get("crossStyle");f&&Se(u,f.textStyle)}}return t.model.getModel("axisPointer",new Ge(l,r,n))}function Uie(t,e){e.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||N(t.coordSysAxesInfo[od(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function Zie(t,e){for(var r=e.model,n=e.dim,i=0;i=0||t===e}function $ie(t){var e=OM(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=uT(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var eae=Ve();function YE(t,e,r,n){if(t instanceof wG){var i=t.scale.type;if(i!=="category"&&i!=="ordinal")return r}var a=t.model,o=a.get("jitter"),s=a.get("jitterOverlap"),l=a.get("jitterMargin")||0,u=t.scale.type==="ordinal"?t.getBandWidth():null;return o>0?s?VG(r,o,u,n):tae(t,e,r,n,o,l):r}function VG(t,e,r,n){if(r===null)return t+(Math.random()-.5)*e;var i=r-n*2,a=Math.min(Math.max(0,e),i);return t+(Math.random()-.5)*a}function tae(t,e,r,n,i,a){var o=eae(t);o.items||(o.items=[]);var s=o.items,l=XE(s,e,r,n,i,a,1),u=XE(s,e,r,n,i,a,-1),c=Math.abs(l-r)i/2||f&&h>f/2-n?VG(r,i,f,n):(s.push({fixedCoord:e,floatCoord:c,r:n}),c)}function XE(t,e,r,n,i,a,o){for(var s=r,l=0;li/2)return Number.MAX_VALUE;if(o===1&&p>s||o===-1&&p0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var g=l;p.color!=null&&(g=Se({color:p.color},l));var m=Re(ye(p),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:g,triggerEvent:h},!1);if(se(c)){var y=m.name;m.name=c.replace("{value}",y??"")}else me(c)&&(m.name=c(m.name,m));var x=new Ge(m,null,this.ecModel);return Bt(x,Mf.prototype),x.mainType="radar",x.componentIndex=this.componentIndex,x},this);this._indicatorModels=v},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:X.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Re({lineStyle:{color:X.color.neutral20}},dh.axisLine),axisLabel:yg(dh.axisLabel,!1),axisTick:yg(dh.axisTick,!1),splitLine:yg(dh.splitLine,!0),splitArea:yg(dh.splitArea,!0),indicator:[]},e}(Be),cae=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},e.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=re(a,function(s){var l=s.model.get("showName")?s.name:"",u=new tn(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});N(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),h=l.get("color"),v=u.get("color"),p=ee(h)?h:[h],g=ee(v)?v:[v],m=[],y=[];function x(G,j,Z){var V=Z%j.length;return G[V]=G[V]||[],V}if(a==="circle")for(var S=i[0].getTicksCoords(),b=n.cx,T=n.cy,C=0;C3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",r,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var f=Math.abs(a),h=(a>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(r){if(!(QE(this._zr,"globalPan")||ph(r))){var n=r.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(r,n,i,a,o){r._checkPointer(a,o.originX,o.originY)&&(ao(a.event),a.__ecRoamConsumed=!0,JE(r,n,i,a,o))},e}(ui);function ph(t){return t.__ecRoamConsumed}var yae=Ve();function J0(t){var e=yae(t);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function gh(t,e,r,n){for(var i=J0(t),a=i.roam,o=a[e]=a[e]||[],s=0;s=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(f=UG(c,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var v=i;i=new _e,i.add(v),v.scaleX=v.scaleY=f.scale,v.x=f.x,v.y=f.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new ze({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:a}},t.prototype._parseNode=function(e,r,n,i,a,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var c=O1[s];if(c&&fe(O1,s)){l=c.call(this,e,r);var f=e.getAttribute("name");if(f){var h={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var v=nR[s];if(v&&fe(nR,s)){var p=v.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=p)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,n,u,a,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},t.prototype._parseText=function(e,r){var n=new Uc({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});jn(r,n),_n(e,n,this._defsUsePending,!1,!1),wae(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},t.internalField=function(){O1={g:function(e,r){var n=new _e;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n},rect:function(e,r){var n=new ze;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,r){var n=new ba;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,r){var n=new Wt;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,r){var n=new Pd;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,r){var n=e.getAttribute("points"),i;n&&(i=oR(n));var a=new Nr({shape:{points:i||[]},silent:!0});return jn(r,a),_n(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,r){var n=e.getAttribute("points"),i;n&&(i=oR(n));var a=new br({shape:{points:i||[]},silent:!0});return jn(r,a),_n(e,a,this._defsUsePending,!1,!1),a},image:function(e,r){var n=new dr;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,r){var n=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new _e;return jn(r,s),_n(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,r){var n=e.getAttribute("x"),i=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new _e;return jn(r,s),_n(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,r){var n=e.getAttribute("d")||"",i=sV(n);return jn(r,i),_n(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),t}(),nR={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),r=parseInt(t.getAttribute("y1")||"0",10),n=parseInt(t.getAttribute("x2")||"10",10),i=parseInt(t.getAttribute("y2")||"0",10),a=new iu(e,r,n,i);return iR(t,a),aR(t,a),a},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),r=parseInt(t.getAttribute("cy")||"0",10),n=parseInt(t.getAttribute("r")||"0",10),i=new P2(e,r,n);return iR(t,i),aR(t,i),i}};function iR(t,e){var r=t.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(e.global=!0)}function aR(t,e){for(var r=t.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};WG(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000",s=a.stopOpacity||r.getAttribute("stop-opacity");if(s){var l=Ur(o),u=l&&l[3];u&&(l[3]*=Ya(s),o=ti(l,"rgba"))}e.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function jn(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Se(e.__inheritedStyle,t.__inheritedStyle))}function oR(t){for(var e=t_(t),r=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=t_(o);switch(i=i||fr(),s){case"translate":Ii(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":L0(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":vo(i,i,-parseFloat(l[0])*z1,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*z1);Li(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*z1);Li(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var lR=/([^\s:;]+)\s*:\s*([^:;]+)/g;function WG(t,e,r){var n=t.getAttribute("style");if(n){lR.lastIndex=0;for(var i;(i=lR.exec(n))!=null;){var a=i[1],o=fe(Oy,a)?Oy[a]:null;o&&(e[o]=i[2]);var s=fe(zy,a)?zy[a]:null;s&&(r[s]=i[2])}}}function Aae(t,e,r){for(var n=0;n0,x={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(x):l.resourceType==="geoSVG"&&this._buildSVG(x),this._updateController(e,m,r,n),this._updateMapSelectHandler(e,u,n,i)},t.prototype._buildGeoJSON=function(e){var r=this._regionsGroupByName=ve(),n=ve(),i=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(v,p){return p&&(v=p(v)),v&&[v[0]*a.scaleX+a.x,v[1]*a.scaleY+a.y]}function f(v){for(var p=[],g=!u&&l&&l.project,m=0;m=0)&&(h=i);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;vr(e,ar(n),{labelFetcher:h,labelDataIndex:f,defaultText:r},v);var p=e.getTextContent();if(p&&(ZG(p).ignore=p.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function vR(t,e,r,n,i,a){t.data?t.data.setItemGraphicEl(a,e):Ae(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function dR(t,e,r,n,i){t.data||go({el:e,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function pR(t,e,r,n,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return bt(e,o,a.get("blurScope"),a.get("disabled")),t.isGeo&&zq(e,i,r),o}function gR(t,e,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),N(t,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill=X.color.neutral00,i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:X.color.tertiary},itemStyle:{borderWidth:.5,borderColor:X.color.border,areaColor:X.color.background},emphasis:{label:{show:!0,color:X.color.primary},itemStyle:{areaColor:X.color.highlight}},select:{label:{show:!0,color:X.color.primary},itemStyle:{color:X.color.highlight}},nameProperty:"name"},e}(ht);function Yae(t,e){var r={};return N(t,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),t[0].map(t[0].mapDimension("value"),function(n,i){for(var a="ec-"+t[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,c=0;c1?(S.width=x,S.height=x/g):(S.height=x,S.width=x*g),S.y=y[1]-S.height/2,S.x=y[0]-S.width/2;else{var b=t.getBoxLayoutParams();b.aspect=g,S=wt(b,p),S=jV(t,S,g)}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Qae(t,e){N(e.get("geoCoord"),function(r,n){t.addGeoCoord(n,r)})}var Jae=function(){function t(){this.dimensions=YG}return t.prototype.create=function(e,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new hT(l+s,l,J({nameMap:o.get("nameMap"),api:r,ecModel:e},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=xR,u.resize(o,r)}),e.eachSeries(function(o){Rd({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Dt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),N(a,function(o,s){var l=re(o,function(c){return c.get("nameMap")}),u=new hT(s,s,J({nameMap:T0(l),api:r,ecModel:e},i(o[0])));u.zoomLimit=Sr.apply(null,re(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=xR,u.resize(o[0],r),N(o,function(c){c.coordinateSystem=u,Qae(u,c)})}),n},t.prototype.getFilledRegions=function(e,r,n,i){for(var a=(e||[]).slice(),o=ve(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function aoe(t,e){var r=t.isExpand?t.children:[],n=t.parentNode.children,i=t.hierNode.i?n[t.hierNode.i-1]:null;if(r.length){soe(t);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(t.hierNode.prelim=i.hierNode.prelim+e(t,i),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else i&&(t.hierNode.prelim=i.hierNode.prelim+e(t,i));t.parentNode.hierNode.defaultAncestor=loe(t,i,t.parentNode.hierNode.defaultAncestor||n[0],e)}function ooe(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function SR(t){return arguments.length?t:foe}function Gh(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function soe(t){for(var e=t.children,r=e.length,n=0,i=0;--r>=0;){var a=e[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function loe(t,e,r,n){if(e){for(var i=t,a=t,o=a.parentNode.children[0],s=e,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=B1(s),a=V1(a),s&&a;){i=B1(i),o=V1(o),i.hierNode.ancestor=t;var h=s.hierNode.prelim+f-a.hierNode.prelim-u+n(s,a);h>0&&(coe(uoe(s,t,r),t,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!B1(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),a&&!V1(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,r=t)}return r}function B1(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function V1(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function uoe(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function coe(t,e,r){var n=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=r,e.hierNode.modifier+=r,e.hierNode.prelim+=r,t.hierNode.change+=n}function foe(t,e){return t.parentNode===e.parentNode?1:2}var hoe=function(){function t(){this.parentPoint=[],this.childPoints=[]}return t}(),voe=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:X.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new hoe},e.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,h=oe(n.forkPosition,1),v=[];v[c]=o[c],v[f]=o[f]+(l[f]-o[f])*h,r.moveTo(o[0],o[1]),r.lineTo(v[0],v[1]),r.moveTo(s[0],s[1]),v[c]=s[c],r.lineTo(v[0],v[1]),v[c]=l[c],r.lineTo(v[0],v[1]),r.lineTo(l[0],l[1]);for(var p=1;px.x,T||(b=b-Math.PI));var M=T?"left":"right",D=s.getModel("label"),I=D.get("rotate"),k=I*(Math.PI/180),E=m.getTextContent();E&&(m.setTextConfig({position:D.get("position")||M,rotation:I==null?-b:k,origin:"center"}),E.setStyle("verticalAlign","middle"))}var z=s.get(["emphasis","focus"]),O=z==="relative"?jc(o.getAncestorsIndices(),o.getDescendantIndices()):z==="ancestor"?o.getAncestorsIndices():z==="descendant"?o.getDescendantIndices():null;O&&(Ae(r).focus=O),poe(i,o,c,r,p,v,g,n),r.__edge&&(r.onHoverStateChange=function(F){if(F!=="blur"){var G=o.parentNode&&t.getItemGraphicEl(o.parentNode.dataIndex);G&&G.hoverState===Ad||cy(r.__edge,F)}})}function poe(t,e,r,n,i,a,o,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),f=t.getOrient(),h=t.get(["lineStyle","curveness"]),v=t.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==r&&(g||(g=n.__edge=new df({shape:vT(c,f,h,i,i)})),Qe(g,{shape:vT(c,f,h,a,o)},t));else if(u==="polyline"&&c==="orthogonal"&&e!==r&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,y=[],x=0;xr&&(r=i.height)}this.height=r+1},t.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var r=0,n=this.children,i=n.length;r=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,r)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(e,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,r)},t.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,r=0;r=0){var n=r.getData().tree.root,i=t.targetNode;if(se(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=t.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function e6(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function WM(t,e){var r=e6(t);return Ee(r,e)>=0}function r_(t,e){for(var r=[];t;){var n=t.dataIndex;r.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return r.reverse(),r}var Toe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new Ge(i,this,this.ecModel),o=HM.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(h,v){var p=o.getNodeByDataIndex(v);return p&&p.children.length&&p.isExpand||(h.parentModel=a),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=r.expandAndCollapse,c=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.depth<=c}),o.data},e.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Kt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=r_(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:X.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(ht);function Coe(t,e,r){for(var n=[t],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)r.push(i[a])}}function Moe(t,e){t.eachSeriesByType("tree",function(r){Loe(r,e)})}function Loe(t,e){var r=or(t,e).refContainer,n=wt(t.getBoxLayoutParams(),r);t.layoutInfo=n;var i=t.get("layout"),a=0,o=0,s=null;i==="radial"?(a=2*Math.PI,o=Math.min(n.height,n.width)/2,s=SR(function(b,T){return(b.parentNode===T.parentNode?1:2)/b.depth})):(a=n.width,o=n.height,s=SR());var l=t.getData().tree.root,u=l.children[0];if(u){ioe(l),Coe(u,aoe,s),l.hierNode.modifier=-u.hierNode.prelim,_h(u,ooe);var c=u,f=u,h=u;_h(u,function(b){var T=b.getLayout().x;Tf.getLayout().x&&(f=b),b.depth>h.depth&&(h=b)});var v=c===f?1:s(c,f)/2,p=v-c.getLayout().x,g=0,m=0,y=0,x=0;if(i==="radial")g=a/(f.getLayout().x+v+p),m=o/(h.depth-1||1),_h(u,function(b){y=(b.getLayout().x+p)*g,x=(b.depth-1)*m;var T=Gh(y,x);b.setLayout({x:T.x,y:T.y,rawX:y,rawY:x},!0)});else{var S=t.getOrient();S==="RL"||S==="LR"?(m=o/(f.getLayout().x+v+p),g=a/(h.depth-1||1),_h(u,function(b){x=(b.getLayout().x+p)*m,y=S==="LR"?(b.depth-1)*g:a-(b.depth-1)*g,b.setLayout({x:y,y:x},!0)})):(S==="TB"||S==="BT")&&(g=a/(f.getLayout().x+v+p),m=o/(h.depth-1||1),_h(u,function(b){y=(b.getLayout().x+p)*g,x=S==="TB"?(b.depth-1)*m:o-(b.depth-1)*m,b.setLayout({x:y,y:x},!0)}))}}}function Aoe(t){t.eachSeriesByType("tree",function(e){var r=e.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");J(s,o)})})}function Poe(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=e.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var a=i.coordinateSystem,o=e_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function Doe(t){t.registerChartView(doe),t.registerSeriesModel(Toe),t.registerLayout(Moe),t.registerVisual(Aoe),Poe(t)}var MR=["treemapZoomToNode","treemapRender","treemapMove"];function koe(t){for(var e=0;e1;)a=a.parentNode;var o=Db(t.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var Ioe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventUsingHoverLayer=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};r6(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new Ge({itemStyle:o},this,n);a=r.levels=Eoe(a,n);var l=re(a||[],function(f){return new Ge(f,s,n)},this),u=HM.createTree(i,this,c);function c(f){f.wrapMethod("getItemModel",function(h,v){var p=u.getNodeByDataIndex(v),g=p?l[p.depth]:null;return h.parentModel=g||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return Kt("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=r_(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},J(this.layoutInfo,r)},e.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=ve(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){t6(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:X.size.l,top:X.size.xxxl,right:X.size.l,bottom:X.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:X.size.m,emptyItemWidth:25,itemStyle:{color:X.color.backgroundShade,textStyle:{color:X.color.secondary}},emphasis:{itemStyle:{color:X.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:X.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:X.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(ht);function r6(t){var e=0;N(t.children,function(n){r6(n);var i=n.value;ee(i)&&(i=i[0]),e+=i});var r=t.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),ee(t.value)?t.value[0]=r:t.value=r}function Eoe(t,e){var r=gt(e.get("color")),n=gt(e.get(["aria","decal","decals"]));if(r){t=t||[];var i,a;N(t,function(s){var l=new Ge(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=t[0]||(t[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),t}}var Roe=8,LR=8,F1=5,Noe=function(){function t(e){this.group=new _e,e.add(this.group)}return t.prototype.render=function(e,r,n,i){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f=or(e,r).refContainer,h={left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},v={emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},p=wt(h,f);this._prepare(n,v,u),this._renderContent(e,v,p,s,l,u,c,i),H0(o,h,f)}},t.prototype._prepare=function(e,r,n){for(var i=e;i;i=i.parentNode){var a=rr(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+Roe*2,r.emptyItemWidth);r.totalWidth+=s+LR,r.renderList.push({node:i,text:a,width:s})}},t.prototype._renderContent=function(e,r,n,i,a,o,s,l){for(var u=0,c=r.emptyItemWidth,f=e.get(["breadcrumb","height"]),h=r.totalWidth,v=r.renderList,p=a.getModel("itemStyle").getItemStyle(),g=v.length-1;g>=0;g--){var m=v[g],y=m.node,x=m.width,S=m.text;h>n.width&&(h-=x-c,x=c,S=null);var b=new Nr({shape:{points:Ooe(u,0,x,f,g===v.length-1,g===0)},style:Se(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Xe({style:pt(o,{text:S})}),textConfig:{position:"inside"},z2:hf*1e4,onclick:Ie(l,y)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=pt(s,{text:S}),b.ensureState("emphasis").style=p,bt(b,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(b),zoe(b,e,y),u+=x+LR}},t.prototype.remove=function(){this.group.removeAll()},t}();function Ooe(t,e,r,n,i,a){var o=[[i?t:t-F1,e],[t+r,e],[t+r,e+n],[i?t:t-F1,e+n]];return!a&&o.splice(2,0,[t+r+F1,e+n/2]),!i&&o.push([t,e+n/2]),o}function zoe(t,e,r){Ae(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&r_(r,e)}}var Boe=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(e,r,n,i,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:r,duration:n,delay:i,easing:a}),!0)},t.prototype.finished=function(e){return this._finishedCallback=e,this},t.prototype.start=function(){for(var e=this,r=this._storage.length,n=function(){r--,r<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,a=this._storage.length;iPR||Math.abs(r.dy)>PR)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(r){var n=r.originX,i=r.originY,a=r.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Ce(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var f=c.zoom=c.zoom||1;if(f*=a,u){var h=u.min||0,v=u.max||1/0;f=Math.max(Math.min(v,f),h)}var p=f/c.zoom;c.zoom=f;var g=this.seriesModel.layoutInfo;n-=g.x,i-=g.y;var m=fr();Ii(m,m,[-n,-i]),L0(m,m,[p,p]),Ii(m,m,[n,i]),l.applyTransform(m),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&dy(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Noe(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(WM(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=xh(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype.findTarget=function(r,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(lt);function xh(){return{nodeGroup:[],background:[],content:[]}}function Woe(t,e,r,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),f=t.getData(),h=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var v=c.width,p=c.height,g=c.borderWidth,m=c.invisible,y=o.getRawIndex(),x=s&&s.getRawIndex(),S=o.viewChildren,b=c.upperHeight,T=S&&S.length,C=h.getModel("itemStyle"),M=h.getModel(["emphasis","itemStyle"]),D=h.getModel(["blur","itemStyle"]),I=h.getModel(["select","itemStyle"]),k=C.get("borderRadius")||0,E=ue("nodeGroup",dT);if(!E)return;if(l.add(E),E.x=c.x||0,E.y=c.y||0,E.markRedraw(),By(E).nodeWidth=v,By(E).nodeHeight=p,c.isAboveViewRoot)return E;var z=ue("background",AR,u,joe);z&&H(E,z,T&&c.upperLabelHeight);var O=h.getModel("emphasis"),F=O.get("focus"),G=O.get("blurScope"),j=O.get("disabled"),Z=F==="ancestor"?o.getAncestorsIndices():F==="descendant"?o.getDescendantIndices():F;if(T)Zv(E)&&Sl(E,!1),z&&(Sl(z,!j),f.setItemGraphicEl(o.dataIndex,z),_b(z,Z,G));else{var V=ue("content",AR,u,Goe);V&&Y(E,V),z.disableMorphing=!0,z&&Zv(z)&&Sl(z,!1),Sl(E,!j),f.setItemGraphicEl(o.dataIndex,E);var W=h.getShallow("cursor");W&&V.attr("cursor",W),_b(E,Z,G)}return E;function H(xe,ge,De){var he=Ae(ge);if(he.dataIndex=o.dataIndex,he.seriesIndex=t.seriesIndex,ge.setShape({x:0,y:0,width:v,height:p,r:k}),m)K(ge);else{ge.invisible=!1;var Me=o.getVisual("style"),st=Me.stroke,$e=IR(C);$e.fill=st;var rt=ll(M);rt.fill=M.get("borderColor");var ut=ll(D);ut.fill=D.get("borderColor");var kt=ll(I);if(kt.fill=I.get("borderColor"),De){var pr=v-2*g;ne(ge,st,Me.opacity,{x:g,y:0,width:pr,height:b})}else ge.removeTextContent();ge.setStyle($e),ge.ensureState("emphasis").style=rt,ge.ensureState("blur").style=ut,ge.ensureState("select").style=kt,Ul(ge)}xe.add(ge)}function Y(xe,ge){var De=Ae(ge);De.dataIndex=o.dataIndex,De.seriesIndex=t.seriesIndex;var he=Math.max(v-2*g,0),Me=Math.max(p-2*g,0);if(ge.culling=!0,ge.setShape({x:g,y:g,width:he,height:Me,r:k}),m)K(ge);else{ge.invisible=!1;var st=o.getVisual("style"),$e=st.fill,rt=IR(C);rt.fill=$e,rt.decal=st.decal;var ut=ll(M),kt=ll(D),pr=ll(I);ne(ge,$e,st.opacity,null),ge.setStyle(rt),ge.ensureState("emphasis").style=ut,ge.ensureState("blur").style=kt,ge.ensureState("select").style=pr,Ul(ge)}xe.add(ge)}function K(xe){!xe.invisible&&a.push(xe)}function ne(xe,ge,De,he){var Me=h.getModel(he?kR:DR),st=rr(h.get("name"),null),$e=Me.getShallow("show");vr(xe,ar(h,he?kR:DR),{defaultText:$e?st:null,inheritColor:ge,defaultOpacity:De,labelFetcher:t,labelDataIndex:o.dataIndex});var rt=xe.getTextContent();if(rt){var ut=rt.style,kt=bd(ut.padding||0);he&&(xe.setTextConfig({layoutRect:he}),rt.disableLabelLayout=!0),rt.beforeUpdate=function(){var zr=Math.max((he?he.width:xe.shape.width)-kt[1]-kt[3],0),zi=Math.max((he?he.height:xe.shape.height)-kt[0]-kt[2],0);(ut.width!==zr||ut.height!==zi)&&rt.setStyle({width:zr,height:zi})},ut.truncateMinChar=2,ut.lineOverflow="truncate",ie(ut,he,c);var pr=rt.getState("emphasis");ie(pr?pr.style:null,he,c)}}function ie(xe,ge,De){var he=xe?xe.text:null;if(!ge&&De.isLeafRoot&&he!=null){var Me=t.get("drillDownIcon",!0);xe.text=Me?Me+" "+he:he}}function ue(xe,ge,De,he){var Me=x!=null&&r[xe][x],st=i[xe];return Me?(r[xe][x]=null,de(st,Me)):m||(Me=new ge,Me instanceof si&&(Me.z2=Uoe(De,he)),Fe(st,Me)),e[xe][y]=Me}function de(xe,ge){var De=xe[y]={};ge instanceof dT?(De.oldX=ge.x,De.oldY=ge.y):De.oldShape=J({},ge.shape)}function Fe(xe,ge){var De=xe[y]={},he=o.parentNode,Me=ge instanceof _e;if(he&&(!n||n.direction==="drillDown")){var st=0,$e=0,rt=i.background[he.getRawIndex()];!n&&rt&&rt.oldShape&&(st=rt.oldShape.width,$e=rt.oldShape.height),Me?(De.oldX=0,De.oldY=$e):De.oldShape={x:st,y:$e,width:0,height:0}}De.fadein=!Me}}function Uoe(t,e){return t*Foe+e}var ld=N,Zoe=we,Vy=-1,hr=function(){function t(e){var r=e.mappingMethod,n=e.type,i=this.option=ye(e);this.type=n,this.mappingMethod=r,this._normalizeData=Xoe[r];var a=t.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(j1(i),$oe(i)):r==="category"?i.categories?Yoe(i):j1(i,!0):(Er(r!=="linear"||i.dataExtent),j1(i))}return t.prototype.mapValueToVisual=function(e){var r=this._normalizeData(e);return this._normalizedToVisual(r,e)},t.prototype.getNormalizer=function(){return le(this._normalizeData,this)},t.listVisualTypes=function(){return Ue(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(e,r,n){we(e)?N(e,r,n):r.call(n,e)},t.mapVisual=function(e,r,n){var i,a=ee(e)?[]:we(e)?{}:(i=!0,null);return t.eachVisual(e,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},t.retrieveVisuals=function(e){var r={},n;return e&&ld(t.visualHandlers,function(i,a){e.hasOwnProperty(a)&&(r[a]=e[a],n=!0)}),n?r:null},t.prepareVisualTypes=function(e){if(ee(e))e=e.slice();else if(Zoe(e)){var r=[];ld(e,function(n,i){r.push(i)}),e=r}else return[];return e.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},t.dependsOn=function(e,r){return r==="color"?!!(e&&e.indexOf(r)===0):e===r},t.findPieceIndex=function(e,r,n){for(var i,a=1/0,o=0,s=r.length;o=0;a--)n[a]==null&&(delete r[e[a]],e.pop())}function j1(t,e){var r=t.visual,n=[];we(r)?ld(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!e&&n.length===1&&!i.hasOwnProperty(t.type)&&(n[1]=n[0]),n6(t,n)}function xg(t){return{applyVisual:function(e,r,n){var i=this.mapValueToVisual(e);n("color",t(r("color"),i))},_normalizedToVisual:pT([0,1])}}function ER(t){var e=this.option.visual;return e[Math.round(it(t,[0,1],[0,e.length-1],!0))]||{}}function Sh(t){return function(e,r,n){n(t,this.mapValueToVisual(e))}}function Hh(t){var e=this.option.visual;return e[this.option.loop&&t!==Vy?t%e.length:t]}function ul(){return this.option.visual[0]}function pT(t){return{linear:function(e){return it(e,t,this.option.visual,!0)},category:Hh,piecewise:function(e,r){var n=gT.call(this,r);return n==null&&(n=it(e,t,this.option.visual,!0)),n},fixed:ul}}function gT(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var n=hr.findPieceIndex(t,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function n6(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=re(e,function(r){var n=Ur(r);return n||[0,0,0,1]})),e}var Xoe={linear:function(t){return it(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=hr.findPieceIndex(t,e,!0);if(r!=null)return it(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??Vy},fixed:Nt};function Sg(t,e,r){return t?e<=r:e=r.length||g===r[g.depth]){var y=tse(i,l,g,m,p,n);a6(g,y,r,n)}})}}}function Qoe(t,e,r){var n=J({},e),i=r.designatedVisualItemStyle;return N(["color","colorAlpha","colorSaturation"],function(a){i[a]=e[a];var o=t.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function RR(t){var e=G1(t,"color");if(e){var r=G1(t,"colorAlpha"),n=G1(t,"colorSaturation");return n&&(e=Xa(e,null,null,n)),r&&(e=jv(e,r)),e}}function Joe(t,e){return e!=null?Xa(e,null,null,t):null}function G1(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function ese(t,e,r,n,i,a){if(!(!a||!a.length)){var o=H1(e,"color")||i.color!=null&&i.color!=="none"&&(H1(e,"colorAlpha")||H1(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=r.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new hr(f);return i6(h).drColorMappingBy=c,h}}}function H1(t,e){var r=t.get(e);return ee(r)&&r.length?{name:e,range:r}:null}function tse(t,e,r,n,i,a){var o=J({},e);if(i){var s=i.type,l=s==="color"&&i6(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var ud=Math.max,Fy=Math.min,NR=Sr,UM=N,o6=["itemStyle","borderWidth"],rse=["itemStyle","gapWidth"],nse=["upperLabel","show"],ise=["upperLabel","height"];const ase={seriesType:"treemap",reset:function(t,e,r,n){var i=t.option,a=or(t,r).refContainer,o=wt(t.getBoxLayoutParams(),a),s=i.size||[],l=oe(NR(o.width,s[0]),a.width),u=oe(NR(o.height,s[1]),a.height),c=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],h=sd(n,f,t),v=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,p=t.getViewRoot(),g=e6(p);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?fse(t,h,p,l,u):v?[v.width,v.height]:[l,u],y=i.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var x={squareRatio:i.squareRatio,sort:y,leafDepth:i.leafDepth};p.hostTree.clearLayouts();var S={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(S),s6(p,x,!1,0),S=p.getLayout(),UM(g,function(T,C){var M=(g[C+1]||p).getValue();T.setLayout(J({dataExtent:[M,M],borderWidth:0,upperHeight:0},S))})}var b=t.getData().tree.root;b.setLayout(hse(o,v,h),!0),t.setLayoutInfo(o),l6(b,new Ce(-o.x,-o.y,r.getWidth(),r.getHeight()),g,p,0)}};function s6(t,e,r,n){var i,a;if(!t.isRemoved()){var o=t.getLayout();i=o.width,a=o.height;var s=t.getModel(),l=s.get(o6),u=s.get(rse)/2,c=u6(s),f=Math.max(l,c),h=l-u,v=f-u;t.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),i=ud(i-2*h,0),a=ud(a-h-v,0);var p=i*a,g=ose(t,s,p,e,r,n);if(g.length){var m={x:h,y:v,width:i,height:a},y=Fy(i,a),x=1/0,S=[];S.area=0;for(var b=0,T=g.length;b=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*es[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function cse(t,e,r){for(var n=0,i=1/0,a=0,o=void 0,s=t.length;an&&(n=o));var l=t.area*t.area,u=e*e*r;return l?ud(u*n/l,l/(u*i)):1/0}function OR(t,e,r,n,i){var a=e===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],c=e?t.area/e:0;(i||c>r[l[o]])&&(c=r[l[o]]);for(var f=0,h=t.length;flb&&(u=lb),a=s}un&&(n=e);var a=n%2?n+2:n+3;i=[];for(var o=0;o0&&(T[0]=-T[0],T[1]=-T[1]);var M=b[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var D=-Math.atan2(b[1],b[0]);f[0].8?"left":h[0]<-.8?"right":"center",g=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*y+c[0],a.y=-h[1]*x+c[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",g=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*M+c[0],a.y=c[1]+I,p=b[0]<0?"right":"left",a.originX=-y*M,a.originY=-I;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=C[0],a.y=C[1]+I,p="center",a.originY=-I;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-y*M+f[0],a.y=f[1]+I,p=b[0]>=0?"right":"left",a.originX=y*M,a.originY=-I;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||p})}},e}(_e),qM=function(){function t(e){this.group=new _e,this._LineCtor=e||XM}return t.prototype.updateData=function(e){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=e,a||i.removeAll();var o=GR(e);e.diff(a).add(function(s){r._doAdd(e,s,o)}).update(function(s,l){r._doUpdate(a,e,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},t.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(r,n){r.updateLayout(e,n)},this)},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=GR(e),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r){this._progressiveEls=[];function n(s){!s.isGroup&&!Pse(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function GR(t){var e=t.hostModel,r=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:ar(e)}}function HR(t){return isNaN(t[0])||isNaN(t[1])}function Y1(t){return t&&!HR(t[0])&&!HR(t[1])}var X1=[],q1=[],K1=[],ju=xr,Q1=ts,WR=Math.abs;function UR(t,e,r){for(var n=t[0],i=t[1],a=t[2],o=1/0,s,l=r*r,u=.1,c=.1;c<=.9;c+=.1){X1[0]=ju(n[0],i[0],a[0],c),X1[1]=ju(n[1],i[1],a[1],c);var f=WR(Q1(X1,e)-l);f=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function J1(t,e){var r=[],n=Vv,i=[[],[],[]],a=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[ha(u[0]),ha(u[1])],u[2]&&u.__original.push(ha(u[2])));var h=u.__original;if(u[2]!=null){if(jr(i[0],h[0]),jr(i[1],h[2]),jr(i[2],h[1]),c&&c!=="none"){var v=Uh(s.node1),p=UR(i,h[0],v*e);n(i[0][0],i[1][0],i[2][0],p,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],p,r),i[0][1]=r[3],i[1][1]=r[4]}if(f&&f!=="none"){var v=Uh(s.node2),p=UR(i,h[1],v*e);n(i[0][0],i[1][0],i[2][0],p,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],p,r),i[1][1]=r[1],i[2][1]=r[2]}jr(u[0],i[0]),jr(u[1],i[2]),jr(u[2],i[1])}else{if(jr(a[0],h[0]),jr(a[1],h[1]),Vo(o,a[1],a[0]),nu(o,o),c&&c!=="none"){var v=Uh(s.node1);Ym(a[0],a[0],o,v*e)}if(f&&f!=="none"){var v=Uh(s.node2);Ym(a[1],a[1],o,-v*e)}jr(u[0],a[0]),jr(u[1],a[1])}})}var g6=Ve();function Dse(t){if(t)return g6(t).bridge}function ZR(t,e){t&&(g6(t).bridge=e)}function $R(t){return t.type==="view"}var kse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){var i=new Bd,a=new qM,o=this.group,s=new _e;this._controller=new cu(n.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(a.group),o.add(s),this._symbolDraw=i,this._lineDraw=a,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=!1;this._model=r,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,c=this._lineDraw;if($R(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(f):Qe(this._mainGroup,f,r)}J1(r.getGraph(),Wh(r));var h=r.getData();u.updateData(h);var v=r.getEdgeData();c.updateData(v),this._updateNodeAndLinkScale(),this._updateController(null,r,i),clearTimeout(this._layoutTimeout);var p=r.forceLayout,g=r.get(["force","layoutAnimation"]);p&&(s=!0,this._startForceLayoutIteration(p,i,g));var m=r.get("layout");h.graph.eachNode(function(b){var T=b.dataIndex,C=b.getGraphicEl(),M=b.getModel();if(C){C.off("drag").off("dragend");var D=M.get("draggable");D&&C.on("drag",function(k){switch(m){case"force":p.warmUp(),!a._layouting&&a._startForceLayoutIteration(p,i,g),p.setFixed(T),h.setItemLayout(T,[C.x,C.y]);break;case"circular":h.setItemLayout(T,[C.x,C.y]),b.setLayout({fixed:!0},!0),YM(r,"symbolSize",b,[k.offsetX,k.offsetY]),a.updateLayout(r);break;case"none":default:h.setItemLayout(T,[C.x,C.y]),$M(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){p&&p.setUnfixed(T)}),C.setDraggable(D,!!M.get("cursor"));var I=M.get(["emphasis","focus"]);I==="adjacency"&&(Ae(C).focus=b.getAdjacentDataIndices())}}),h.graph.eachEdge(function(b){var T=b.getGraphicEl(),C=b.getModel().get(["emphasis","focus"]);T&&C==="adjacency"&&(Ae(T).focus={edge:[b.dataIndex],node:[b.node1.dataIndex,b.node2.dataIndex]})});var y=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),x=h.getLayout("cx"),S=h.getLayout("cy");h.graph.eachNode(function(b){v6(b,y,x,S)}),this._firstRender=!1,s||this._renderThumbnail(r,i,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(r,n,i){var a=this,o=!1;(function s(){r.step(function(l){a.updateLayout(a._model),(l||!o)&&(o=!0,a._renderThumbnail(a._model,n,a._symbolDraw,a._lineDraw)),(a._layouting=!l)&&(i?a._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(r,n,i){var a=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!$R(s)){a.disable();return}a.enable(n.get("roam"),{api:i,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!r||r.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),a.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(r,n,i){this._active&&(BM(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(r,n,i){this._active&&(VM(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),J1(r.getGraph(),Wh(r)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=Wh(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},e.prototype.updateLayout=function(r){this._active&&(J1(r.getGraph(),Wh(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var r=this._model,n=r.coordinateSystem;if(n.type==="view"){var i=Dse(r);if(i)return{bridge:i,coordSys:n}}},e.prototype._updateThumbnailWindow=function(){var r=this._getThumbnailInfo();r&&r.bridge.updateWindow(r.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(r,n,i,a){var o=this._getThumbnailInfo();if(o){var s=new _e,l=i.group.children(),u=a.group.children(),c=new _e,f=new _e;s.add(f),s.add(c);for(var h=0;h=0&&e.call(r,n[a],a)},t.prototype.eachEdge=function(e,r){for(var n=this.edges,i=n.length,a=0;a=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(r,n[a],a)},t.prototype.breadthFirstTraverse=function(e,r,n,i){if(r instanceof cl||(r=this._nodesMap[Gu(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a=0&&!e.hasKey(p)&&(e.set(p,!0),o.push(v.node1))}for(l=0;l=0&&!e.hasKey(S)&&(e.set(S,!0),s.push(x.node2))}}}return{edge:e.keys(),node:r.keys()}},t}(),m6=function(){function t(e,r,n){this.dataIndex=-1,this.node1=e,this.node2=r,this.dataIndex=n??-1}return t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.edgeData.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},t.prototype.getTrajectoryDataIndices=function(){var e=ve(),r=ve();e.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a=0&&!e.hasKey(f)&&(e.set(f,!0),n.push(c.node1))}for(a=0;a=0&&!e.hasKey(g)&&(e.set(g,!0),i.push(p.node2))}return{edge:e.keys(),node:r.keys()}},t}();function y6(t,e){return{getValue:function(r){var n=this[t][e];return n.getStore().get(n.getDimensionIndex(r||"value"),this.dataIndex)},setVisual:function(r,n){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[t][e].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}Bt(cl,y6("hostGraph","data"));Bt(m6,y6("hostGraph","edgeData"));function KM(t,e,r,n,i){for(var a=new Ise(n),o=0;o "+h)),u++)}var v=r.get("coordinateSystem"),p;if(v==="cartesian2d"||v==="polar"||v==="matrix")p=Ta(t,r);else{var g=xf.get(v),m=g?g.dimensions||[]:[];Ee(m,"value")<0&&m.concat(["value"]);var y=Tf(t,{coordDimensions:m,encodeDefine:r.getEncode()}).dimensions;p=new Zr(y,r),p.initData(t)}var x=new Zr(["value"],r);return x.initData(l,s),i&&i(p,x),QG({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var Ese=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new Pf(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(r){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Gl(r,"edgeLabel",["show"])},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){_se(this);var s=KM(a,i,this,!0,l);return N(s.edges,function(u){xse(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var g=o._categoriesModels,m=p.getShallow("category"),y=g[m];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var f=Ge.prototype.getModel;function h(p,g){var m=f.call(this,p,g);return m.resolveParentPath=v,m}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=v,p.getModel=h,p});function v(p){if(p&&(p[0]==="label"||p[1]==="label")){var g=p.slice();return p[0]==="label"?g[0]="edgeLabel":p[1]==="label"&&(g[1]="edgeLabel"),g}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(r,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=SF({series:this,dataIndex:r,multipleSeries:n});return f},e.prototype._updateCategoriesData=function(){var r=re(this.option.categories||[],function(i){return i.value!=null?i:J({value:0},i)}),n=new Zr(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:X.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:X.color.primary}}},e}(ht);function Rse(t){t.registerChartView(kse),t.registerSeriesModel(Ese),t.registerProcessor(dse),t.registerVisual(pse),t.registerVisual(gse),t.registerLayout(Sse),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,bse),t.registerLayout(Cse),t.registerCoordinateSystem("graphView",{dimensions:fu.dimensions,create:Lse}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Nt),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Nt),t.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",query:e},function(i){var a=n.getViewOfSeriesModel(i);a&&(e.dx!=null&&e.dy!=null&&a.updateViewOnPan(i,n,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&a.updateViewOnZoom(i,n,e));var o=i.coordinateSystem,s=e_(o,e,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var YR=function(t){$(e,t);function e(r,n,i){var a=t.call(this)||this;Ae(a).dataType="node",a.z2=2;var o=new Xe;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return e.prototype.updateData=function(r,n,i,a){var o=this,s=r.graph.getNodeByIndex(n),l=r.hostModel,u=s.getModel(),c=u.getModel("emphasis"),f=r.getItemLayout(n),h=J(ua(u.getModel("itemStyle"),f,!0),f),v=this;if(isNaN(h.startAngle)){v.setShape(h);return}a?v.setShape(h):Qe(v,{shape:h},l,n);var p=J(ua(u.getModel("itemStyle"),f,!0),f);o.setShape(p),o.useStyle(r.getItemVisual(n,"style")),ir(o,u),this._updateLabel(l,u,s),r.setItemGraphicEl(n,v),ir(v,u,"itemStyle");var g=c.get("focus");bt(this,g==="adjacency"?s.getAdjacentDataIndices():g,c.get("blurScope"),c.get("disabled"))},e.prototype._updateLabel=function(r,n,i){var a=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");a.ignore=!c.get("show");var f=ar(n),h=i.getVisual("style");vr(a,f,{labelFetcher:{getFormattedLabel:function(x,S,b,T,C,M){return r.getFormattedLabel(x,S,"node",T,mn(C,f.normal&&f.normal.get("formatter"),n.get("name")),M)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:h.fill,defaultOpacity:h.opacity,defaultOutsidePosition:"startArc"});var v=c.get("position")||"outside",p=c.get("distance")||0,g;v==="outside"?g=o.r+p:g=(o.r+o.r0)/2,this.textConfig={inside:v!=="outside"};var m=v!=="outside"?c.get("align")||"center":l>0?"left":"right",y=v!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";a.attr({x:l*g+o.cx,y:u*g+o.cy,rotation:0,style:{align:m,verticalAlign:y}})},e}(Rr),Nse=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this)||this;return Ae(o).dataType="edge",o.updateData(r,n,i,a,!0),o}return e.prototype.buildPath=function(r,n){r.moveTo(n.s1[0],n.s1[1]);var i=.7,a=n.clockwise;r.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!a),r.bezierCurveTo((n.cx-n.s2[0])*i+n.s2[0],(n.cy-n.s2[1])*i+n.s2[1],(n.cx-n.t1[0])*i+n.t1[0],(n.cy-n.t1[1])*i+n.t1[1],n.t1[0],n.t1[1]),r.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!a),r.bezierCurveTo((n.cx-n.t2[0])*i+n.t2[0],(n.cy-n.t2[1])*i+n.t2[1],(n.cx-n.s1[0])*i+n.s1[0],(n.cy-n.s1[1])*i+n.s1[1],n.s1[0],n.s1[1]),r.closePath()},e.prototype.updateData=function(r,n,i,a,o){var s=r.hostModel,l=n.graph.getEdgeByIndex(i),u=l.getLayout(),c=l.node1.getModel(),f=n.getItemModel(l.dataIndex),h=f.getModel("lineStyle"),v=f.getModel("emphasis"),p=v.get("focus"),g=J(ua(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(g.sStartAngle)||isNaN(g.tStartAngle)){m.setShape(g);return}o?(m.setShape(g),XR(m,l,r,h)):(li(m),XR(m,l,r,h),Qe(m,{shape:g},s,i)),bt(this,p==="adjacency"?l.getAdjacentDataIndices():p,v.get("blurScope"),v.get("disabled")),ir(m,f,"lineStyle"),n.setItemGraphicEl(l.dataIndex,m)},e}(He);function XR(t,e,r,n){var i=e.node1,a=e.node2,o=t.style;t.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=r.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=r.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"gradient":var l=r.getItemVisual(i.dataIndex,"style").fill,u=r.getItemVisual(a.dataIndex,"style").fill;if(se(l)&&se(u)){var c=t.shape,f=(c.s1[0]+c.s2[0])/2,h=(c.s1[1]+c.s2[1])/2,v=(c.t1[0]+c.t2[0])/2,p=(c.t1[1]+c.t2[1])/2;o.fill=new iu(f,h,v,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var Ose=Math.PI/180,zse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){},e.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group,l=-r.get("startAngle")*Ose;if(a.diff(o).add(function(c){var f=a.getItemLayout(c);if(f){var h=new YR(a,c,l);Ae(h).dataIndex=c,s.add(h)}}).update(function(c,f){var h=o.getItemGraphicEl(f),v=a.getItemLayout(c);if(!v){h&&qa(h,r,f);return}h?h.updateData(a,c,l):h=new YR(a,c,l),s.add(h)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&qa(f,r,c)}).execute(),!o){var u=r.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=oe(u[0],i.getWidth()),this.group.originY=oe(u[1],i.getHeight()),St(this.group,{scaleX:1,scaleY:1},r)}this._data=a,this.renderEdges(r,l)},e.prototype.renderEdges=function(r,n){var i=r.getData(),a=r.getEdgeData(),o=this._edgeData,s=this.group;a.diff(o).add(function(l){var u=new Nse(i,a,l,n);Ae(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,a,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&qa(u,r,l)}).execute(),this._edgeData=a},e.prototype.dispose=function(){},e.type="chord",e}(lt),Bse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this.legendVisualProvider=new Pf(le(this.getData,this),le(this.getRawData,this))},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links)},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[];if(a&&i){var o=KM(a,i,this,!0,s);return o.data}function s(l,u){var c=Ge.prototype.getModel;function f(v,p){var g=c.call(this,v,p);return g.resolveParentPath=h,g}u.wrapMethod("getItemModel",function(v){return v.resolveParentPath=h,v.getModel=f,v});function h(v){if(v&&(v[0]==="label"||v[1]==="label")){var p=v.slice();return v[0]==="label"?p[0]="edgeLabel":v[1]==="label"&&(p[1]="edgeLabel"),p}return v}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){var a=this.getDataParams(r,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(r),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:a.value,noValue:a.value==null})}return Kt("nameValue",{name:a.name,value:a.value,noValue:a.value==null})},e.prototype.getDataParams=function(r,n){var i=t.prototype.getDataParams.call(this,r,n);if(n==="node"){var a=this.getData(),o=this.getGraph().getNodeByIndex(r);if(i.name==null&&(i.name=a.getName(r)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},e.type="series.chord",e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e}(ht),eS=Math.PI/180;function Vse(t,e){t.eachSeriesByType("chord",function(r){Fse(r,e)})}function Fse(t,e){var r=t.getData(),n=r.graph,i=t.getEdgeData(),a=i.count();if(a){var o=FV(t,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=Math.max((t.get("padAngle")||0)*eS,0),h=Math.max((t.get("minAngle")||0)*eS,0),v=-t.get("startAngle")*eS,p=v+Math.PI*2,g=t.get("clockwise"),m=g?1:-1,y=[v,p];O0(y,!g);var x=y[0],S=y[1],b=S-x,T=r.getSum("value")===0&&i.getSum("value")===0,C=[],M=0;n.eachEdge(function(V){var W=T?1:V.getValue("value");T&&(W>0||h)&&(M+=2);var H=V.node1.dataIndex,Y=V.node2.dataIndex;C[H]=(C[H]||0)+W,C[Y]=(C[Y]||0)+W});var D=0;if(n.eachNode(function(V){var W=V.getValue("value");isNaN(W)||(C[V.dataIndex]=Math.max(W,C[V.dataIndex]||0)),!T&&(C[V.dataIndex]>0||h)&&M++,D+=C[V.dataIndex]||0}),!(M===0||D===0)){f*M>=Math.abs(b)&&(f=Math.max(0,(Math.abs(b)-h*M)/M)),(f+h)*M>=Math.abs(b)&&(h=(Math.abs(b)-f*M)/M);var I=(b-f*M*m)/D,k=0,E=0,z=0;n.eachNode(function(V){var W=C[V.dataIndex]||0,H=I*(D?W:1)*m;Math.abs(H)E){var F=k/E;n.eachNode(function(V){var W=V.getLayout().angle;Math.abs(W)>=h?V.setLayout({angle:W*F,ratio:F},!0):V.setLayout({angle:h,ratio:h===0?1:W/h},!0)})}else n.eachNode(function(V){if(!O){var W=V.getLayout().angle,H=Math.min(W/z,1),Y=H*k;W-Yh&&h>0){var H=O?1:Math.min(W/z,1),Y=W-h,K=Math.min(Y,Math.min(G,k*H));G-=K,V.setLayout({angle:W-K,ratio:(W-K)/W},!0)}else h>0&&V.setLayout({angle:h,ratio:W===0?1:h/W},!0)}});var j=x,Z=[];n.eachNode(function(V){var W=Math.max(V.getLayout().angle,h);V.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:j,endAngle:j+W*m,clockwise:g},!0),Z[V.dataIndex]=j,j+=(W+f)*m}),n.eachEdge(function(V){var W=T?1:V.getValue("value"),H=I*(D?W:1)*m,Y=V.node1.dataIndex,K=Z[Y]||0,ne=Math.abs((V.node1.getLayout().ratio||1)*H),ie=K+ne*m,ue=[s+c*Math.cos(K),l+c*Math.sin(K)],de=[s+c*Math.cos(ie),l+c*Math.sin(ie)],Fe=V.node2.dataIndex,xe=Z[Fe]||0,ge=Math.abs((V.node2.getLayout().ratio||1)*H),De=xe+ge*m,he=[s+c*Math.cos(xe),l+c*Math.sin(xe)],Me=[s+c*Math.cos(De),l+c*Math.sin(De)];V.setLayout({s1:ue,s2:de,sStartAngle:K,sEndAngle:ie,t1:he,t2:Me,tStartAngle:xe,tEndAngle:De,cx:s,cy:l,r:c,value:W,clockwise:g}),Z[Y]=ie,Z[Fe]=De})}}}function jse(t){t.registerChartView(zse),t.registerSeriesModel(Bse),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,Vse),t.registerProcessor(Lf("chord"))}var Gse=function(){function t(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return t}(),Hse=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new Gse},e.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,c),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,c)},e}(He);function Wse(t,e){var r=t.get("center"),n=e.getWidth(),i=e.getHeight(),a=Math.min(n,i),o=oe(r[0],e.getWidth()),s=oe(r[1],e.getHeight()),l=oe(t.get("radius"),a/2);return{cx:o,cy:s,r:l}}function bg(t,e){var r=t==null?"":t+"";return e&&(se(e)?r=e.replace("{value}",r):me(e)&&(r=e(t))),r}var Use=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=Wse(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,c=-r.get("endAngle")/180*Math.PI,f=r.getModel("axisLine"),h=f.get("roundCap"),v=h?Ey:Rr,p=f.get("show"),g=f.getModel("lineStyle"),m=g.get("width"),y=[u,c];O0(y,!l),u=y[0],c=y[1];for(var x=c-u,S=u,b=[],T=0;p&&T=I&&(k===0?0:a[k-1][0])Math.PI/2&&(ie+=Math.PI)):ne==="tangential"?ie=-D-Math.PI/2:qe(ne)&&(ie=ne*Math.PI/180),ie===0?f.add(new Xe({style:pt(S,{text:W,x:Y,y:K,verticalAlign:G<-.8?"top":G>.8?"bottom":"middle",align:F<-.4?"left":F>.4?"right":"center"},{inheritColor:H}),silent:!0})):f.add(new Xe({style:pt(S,{text:W,x:Y,y:K,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:Y,originY:K,rotation:ie}))}if(x.get("show")&&j!==b){var Z=x.get("distance");Z=Z?Z+c:c;for(var ue=0;ue<=T;ue++){F=Math.cos(D),G=Math.sin(D);var de=new Wt({shape:{x1:F*(p-Z)+h,y1:G*(p-Z)+v,x2:F*(p-M-Z)+h,y2:G*(p-M-Z)+v},silent:!0,style:z});z.stroke==="auto"&&de.setStyle({stroke:a((j+ue/T)/b)}),f.add(de),D+=k}D-=k}else D+=I}},e.prototype._renderPointer=function(r,n,i,a,o,s,l,u,c){var f=this.group,h=this._data,v=this._progressEls,p=[],g=r.get(["pointer","show"]),m=r.getModel("progress"),y=m.get("show"),x=r.getData(),S=x.mapDimension("value"),b=+r.get("min"),T=+r.get("max"),C=[b,T],M=[s,l];function D(k,E){var z=x.getItemModel(k),O=z.getModel("pointer"),F=oe(O.get("width"),o.r),G=oe(O.get("length"),o.r),j=r.get(["pointer","icon"]),Z=O.get("offsetCenter"),V=oe(Z[0],o.r),W=oe(Z[1],o.r),H=O.get("keepAspect"),Y;return j?Y=Ut(j,V-F/2,W-G,F,G,null,H):Y=new Hse({shape:{angle:-Math.PI/2,width:F,r:G,x:V,y:W}}),Y.rotation=-(E+Math.PI/2),Y.x=o.cx,Y.y=o.cy,Y}function I(k,E){var z=m.get("roundCap"),O=z?Ey:Rr,F=m.get("overlap"),G=F?m.get("width"):c/x.count(),j=F?o.r-G:o.r-(k+1)*G,Z=F?o.r:o.r-k*G,V=new O({shape:{startAngle:s,endAngle:E,cx:o.cx,cy:o.cy,clockwise:u,r0:j,r:Z}});return F&&(V.z2=it(x.get(S,k),[b,T],[100,0],!0)),V}(y||g)&&(x.diff(h).add(function(k){var E=x.get(S,k);if(g){var z=D(k,s);St(z,{rotation:-((isNaN(+E)?M[0]:it(E,C,M,!0))+Math.PI/2)},r),f.add(z),x.setItemGraphicEl(k,z)}if(y){var O=I(k,s),F=m.get("clip");St(O,{shape:{endAngle:it(E,C,M,F)}},r),f.add(O),pb(r.seriesIndex,x.dataType,k,O),p[k]=O}}).update(function(k,E){var z=x.get(S,k);if(g){var O=h.getItemGraphicEl(E),F=O?O.rotation:s,G=D(k,F);G.rotation=F,Qe(G,{rotation:-((isNaN(+z)?M[0]:it(z,C,M,!0))+Math.PI/2)},r),f.add(G),x.setItemGraphicEl(k,G)}if(y){var j=v[E],Z=j?j.shape.endAngle:s,V=I(k,Z),W=m.get("clip");Qe(V,{shape:{endAngle:it(z,C,M,W)}},r),f.add(V),pb(r.seriesIndex,x.dataType,k,V),p[k]=V}}).execute(),x.each(function(k){var E=x.getItemModel(k),z=E.getModel("emphasis"),O=z.get("focus"),F=z.get("blurScope"),G=z.get("disabled");if(g){var j=x.getItemGraphicEl(k),Z=x.getItemVisual(k,"style"),V=Z.fill;if(j instanceof dr){var W=j.style;j.useStyle(J({image:W.image,x:W.x,y:W.y,width:W.width,height:W.height},Z))}else j.useStyle(Z),j.type!=="pointer"&&j.setColor(V);j.setStyle(E.getModel(["pointer","itemStyle"]).getItemStyle()),j.style.fill==="auto"&&j.setStyle("fill",a(it(x.get(S,k),C,[0,1],!0))),j.z2EmphasisLift=0,ir(j,E),bt(j,O,F,G)}if(y){var H=p[k];H.useStyle(x.getItemVisual(k,"style")),H.setStyle(E.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,ir(H,E),bt(H,O,F,G)}}),this._progressEls=p)},e.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=Ut(s,n.cx-o/2+oe(l[0],n.r),n.cy-o/2+oe(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),c=+r.get("min"),f=+r.get("max"),h=new _e,v=[],p=[],g=r.isAnimationEnabled(),m=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){v[y]=new Xe({silent:!0}),p[y]=new Xe({silent:!0})}).update(function(y,x){v[y]=s._titleEls[x],p[y]=s._detailEls[x]}).execute(),l.each(function(y){var x=l.getItemModel(y),S=l.get(u,y),b=new _e,T=a(it(S,[c,f],[0,1],!0)),C=x.getModel("title");if(C.get("show")){var M=C.get("offsetCenter"),D=o.cx+oe(M[0],o.r),I=o.cy+oe(M[1],o.r),k=v[y];k.attr({z2:m?0:2,style:pt(C,{x:D,y:I,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:T})}),b.add(k)}var E=x.getModel("detail");if(E.get("show")){var z=E.get("offsetCenter"),O=o.cx+oe(z[0],o.r),F=o.cy+oe(z[1],o.r),G=oe(E.get("width"),o.r),j=oe(E.get("height"),o.r),Z=r.get(["progress","show"])?l.getItemVisual(y,"style").fill:T,k=p[y],V=E.get("formatter");k.attr({z2:m?0:2,style:pt(E,{x:O,y:F,text:bg(S,V),width:isNaN(G)?null:G,height:isNaN(j)?null:j,align:"center",verticalAlign:"middle"},{inheritColor:Z})}),wV(k,{normal:E},S,function(H){return bg(H,V)}),g&&bV(k,y,l,r,{getFormattedLabel:function(H,Y,K,ne,ie,ue){return bg(ue?ue.interpolatedValue:S,V)}}),b.add(k)}h.add(b)}),this.group.add(h),this._titleEls=v,this._detailEls=p},e.type="gauge",e}(lt),Zse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="itemStyle",r}return e.prototype.getInitialData=function(r,n){return Af(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,X.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:X.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:X.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:X.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:X.color.neutral00,borderWidth:0,borderColor:X.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:X.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:X.color.transparent,borderWidth:0,borderColor:X.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:X.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(ht);function $se(t){t.registerChartView(Use),t.registerSeriesModel(Zse)}var Yse=["itemStyle","opacity"],Xse=function(t){$(e,t);function e(r,n){var i=t.call(this)||this,a=i,o=new br,s=new Xe;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return e.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(Yse);c=c??1,i||li(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,St(a,{style:{opacity:c}},o,n)):Qe(a,{style:{opacity:c},shape:{points:l.points}},o,n),ir(a,s),this._updateLabel(r,n),bt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),c=u.label,f=r.getItemVisual(n,"style"),h=f.fill;vr(o,ar(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:r.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var v=l.getModel("label"),p=v.get("color"),g=p==="inherit"?h:null;i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:g,outsideFill:g});var m=c.linePoints;a.setShape({points:m}),i.textGuideLineConfig={anchor:m?new Te(m[0][0],m[0][1]):null},Qe(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),TM(i,CM(l),{stroke:h})},e}(Nr),qse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new Xse(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);qa(u,r,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(lt),Kse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Pf(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.getInitialData=function(r,n){return Af(this,{coordDimensions:["value"],encodeDefaulter:Ie(Q2,this)})},e.prototype._defaultLabelLine=function(r){Gl(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.prototype.getDataParams=function(r){var n=this.getData(),i=t.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:X.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:X.color.primary}}},e}(ht);function Qse(t,e){for(var r=t.mapDimension("value"),n=t.mapArray(r,function(l){return l}),i=[],a=e==="ascending",o=0,s=t.count();odle)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!(this._mouseDownPoint||!rS(this,"mousemove"))){var e=this._model,r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function rS(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}var mle=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(r){var n=this.option;r&&Re(n,r,!0),this._initDimensions()},e.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(r){N(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},e.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=tt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);N(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Be),yle=function(t){$(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(fi);function ps(t,e,r,n,i,a){t=t||0;var o=r[1]-r[0];if(i!=null&&(i=Hu(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Hu(s,[0,o]),i=a=Hu(s,[i,a]),n=0}e[0]=Hu(e[0],r),e[1]=Hu(e[1],r);var l=nS(e,n);e[n]+=t;var u=i||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Hu(e[n],c);var f;return f=nS(e,n),i!=null&&(f.sign!==l.sign||f.spana&&(e[1-n]=e[n]+f.sign*a),e}function nS(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function Hu(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var iS=N,x6=Math.min,S6=Math.max,QR=Math.floor,_le=Math.ceil,JR=Ht,xle=Math.PI,Sle=function(){function t(e,r,n){this.type="parallel",this._axesMap=ve(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,r,n)}return t.prototype._init=function(e,r,n){var i=e.dimensions,a=e.parallelAxisIndex;iS(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new yle(o,Od(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},t.prototype.update=function(e,r){this._updateAxesFromSeries(this._model,e)},t.prototype.containPoint=function(e){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=e[1-a],s=e[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(e,r){r.eachSeries(function(n){if(e.contains(n,r)){var i=n.getData();iS(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),Xl(o.scale,o.model)},this)}},this)},t.prototype.resize=function(e,r){var n=or(e,r).refContainer;this._rect=wt(e.getBoxLayoutParams(),n),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var e=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,c=Tg(e.get("axisExpandWidth"),l),f=Tg(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,v=e.get("axisExpandWindow"),p;if(v)p=Tg(v[1]-v[0],l),v[1]=v[0]+p;else{p=Tg(c*(f-1),l);var g=e.get("axisExpandCenter")||QR(u/2);v=[c*g-p/2],v[1]=v[0]+p}var m=(s-p)/(u-f);m<3&&(m=0);var y=[QR(JR(v[0]/c,1))+1,_le(JR(v[1]/c,1))-1],x=m/c*v[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:v,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:x}},t.prototype._layoutAxes=function(){var e=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),iS(n,function(o,s){var l=(i.axisExpandable?ble:wle)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:xle/2,vertical:0},f=[u[a].x+e.x,u[a].y+e.y],h=c[a],v=fr();vo(v,v,h),Ii(v,v,f),this._axesLayout[o]={position:f,rotation:h,transform:v,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(e){return this._axesMap.get(e)},t.prototype.dataToPoint=function(e,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(e),r)},t.prototype.eachActiveState=function(e,r,n,i){n==null&&(n=0),i==null&&(i=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];N(o,function(m){s.push(e.mapDimension(m)),l.push(a.get(m).model)});for(var u=this.hasAxisBrushed(),c=n;ca*(1-f[0])?(u="jump",l=s-a*(1-f[2])):(l=s-a*f[1])>=0&&(l=s-a*(1-f[1]))<=0&&(l=0),l*=r.axisExpandWidth/c,l?ps(l,i,o,"all"):u="none";else{var v=i[1]-i[0],p=o[1]*s/v;i=[S6(0,p-v/2)],i[1]=x6(o[1],i[0]+v),i[0]=i[1]-v}return{axisExpandWindow:i,behavior:u}},t}();function Tg(t,e){return x6(S6(t,e[0]),e[1])}function wle(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function ble(t,e){var r=e.layoutLength,n=e.axisExpandWidth,i=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,c;return t=0;i--)Ln(n[i])},e.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;aAle}function L6(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function A6(t,e,r,n){var i=new _e;return i.add(new ze({name:"main",style:rL(r),silent:!0,draggable:!0,cursor:"move",drift:Ie(rN,t,e,i,["n","s","w","e"]),ondragend:Ie(Kl,e,{isEnd:!0})})),N(n,function(a){i.add(new ze({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ie(rN,t,e,i,a),ondragend:Ie(Kl,e,{isEnd:!0})}))}),i}function P6(t,e,r,n){var i=n.brushStyle.lineWidth||0,a=tf(i,Ple),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,c=r[0][1],f=r[1][1],h=c-a+i/2,v=f-a+i/2,p=c-o,g=f-s,m=p+i,y=g+i;Ea(t,e,"main",o,s,p,g),n.transformable&&(Ea(t,e,"w",l,u,a,y),Ea(t,e,"e",h,u,a,y),Ea(t,e,"n",l,u,m,a),Ea(t,e,"s",l,v,m,a),Ea(t,e,"nw",l,u,a,a),Ea(t,e,"ne",h,u,a,a),Ea(t,e,"sw",l,v,a,a),Ea(t,e,"se",h,v,a,a))}function wT(t,e){var r=e.__brushOption,n=r.transformable,i=e.childAt(0);i.useStyle(rL(r)),i.attr({silent:!n,cursor:n?"move":"default"}),N([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?bT(t,a[0]):Nle(t,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?kle[s]+"-resize":null})})}function Ea(t,e,r,n,i,a,o){var s=e.childOfName(r);s&&s.setShape(zle(nL(t,e,[[n,i],[n+a,i+o]])))}function rL(t){return Se({strokeNoScale:!0},t.brushStyle)}function D6(t,e,r,n){var i=[fd(t,r),fd(e,n)],a=[tf(t,r),tf(e,n)];return[[i[0],a[0]],[i[1],a[1]]]}function Rle(t){return as(t.group)}function bT(t,e){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=F0(r[e],Rle(t));return n[i]}function Nle(t,e){var r=[bT(t,e[0]),bT(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function rN(t,e,r,n,i,a){var o=r.__brushOption,s=t.toRectRange(o.range),l=k6(e,i,a);N(n,function(u){var c=Dle[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=t.fromRectRange(D6(s[0][0],s[1][0],s[0][1],s[1][1])),JM(e,r),Kl(e,{isEnd:!1})}function Ole(t,e,r,n){var i=e.__brushOption.range,a=k6(t,r,n);N(i,function(o){o[0]+=a[0],o[1]+=a[1]}),JM(t,e),Kl(t,{isEnd:!1})}function k6(t,e,r){var n=t.group,i=n.transformCoordToLocal(e,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function nL(t,e,r){var n=M6(t,e);return n&&n!==ql?n.clipPath(r,t._transform):ye(r)}function zle(t){var e=fd(t[0][0],t[1][0]),r=fd(t[0][1],t[1][1]),n=tf(t[0][0],t[1][0]),i=tf(t[0][1],t[1][1]);return{x:e,y:r,width:n-e,height:i-r}}function Ble(t,e,r){if(!(!t._brushType||Fle(t,e.offsetX,e.offsetY))){var n=t._zr,i=t._covers,a=tL(t,e,r);if(!t._dragging)for(var o=0;on.getWidth()||r<0||r>n.getHeight()}var i_={lineX:aN(0),lineY:aN(1),rect:{createCover:function(t,e){function r(n){return n}return A6({toRectRange:r,fromRectRange:r},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=L6(t);return D6(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,n){P6(t,e,r,n)},updateCommon:wT,contain:CT},polygon:{createCover:function(t,e){var r=new _e;return r.add(new br({name:"main",style:rL(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Nr({name:"main",draggable:!0,drift:Ie(Ole,t,e),ondragend:Ie(Kl,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,n){e.childAt(0).setShape({points:nL(t,e,r)})},updateCommon:wT,contain:CT}};function aN(t){return{createCover:function(e,r){return A6({toRectRange:function(n){var i=[n,[0,100]];return t&&i.reverse(),i},fromRectRange:function(n){return n[t]}},e,r,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var r=L6(e),n=fd(r[0][t],r[1][t]),i=tf(r[0][t],r[1][t]);return[n,i]},updateCoverShape:function(e,r,n,i){var a,o=M6(e,r);if(o!==ql&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(t);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,a];t&&l.reverse(),P6(e,r,l,i)},updateCommon:wT,contain:CT}}function E6(t){return t=iL(t),function(e){return E2(e,t)}}function R6(t,e){return t=iL(t),function(r){var n=e??r,i=n?t.width:t.height,a=n?t.x:t.y;return[a,a+(i||0)]}}function N6(t,e,r){var n=iL(t);return function(i,a){return n.contain(a[0],a[1])&&!FG(i,e,r)}}function iL(t){return Ce.create(t)}var jle=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){t.prototype.init.apply(this,arguments),(this._brushController=new QM(n.getZr())).on("brush",le(this._onBrush,this))},e.prototype.render=function(r,n,i,a){if(!Gle(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new _e,this.group.add(this._axisGroup),!!r.get("show")){var s=Wle(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),c=u.width,f=r.axis.dim,h=l.getAxisLayout(f),v=J({strokeContainThreshold:c},h),p=new tn(r,i,v);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(v,u,r,s,c,i),Id(o,this._axisGroup,r)}}},e.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=Ce.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:E6(f),isTargetByCursor:N6(f,s,a),getLinearBrushOtherExtent:R6(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(Hle(i))},e.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=re(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(mt);function Gle(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function Hle(t){var e=t.axis;return re(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function Wle(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var Ule={type:"axisAreaSelect",event:"axisAreaSelected"};function Zle(t){t.registerAction(Ule,function(e,r){r.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),t.registerAction("parallelAxisExpand",function(e,r){r.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var $le={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function O6(t){t.registerComponentView(ple),t.registerComponentModel(mle),t.registerCoordinateSystem("parallel",Cle),t.registerPreprocessor(fle),t.registerComponentModel(xT),t.registerComponentView(jle),Jc(t,"parallel",xT,$le),Zle(t)}function Yle(t){Oe(O6),t.registerChartView(nle),t.registerSeriesModel(ole),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,cle)}var Xle=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return t}(),qle=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Xle},e.prototype.buildPath=function(r,n){var i=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},e.prototype.highlight=function(){oo(this)},e.prototype.downplay=function(){so(this)},e}(He),Kle=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._mainGroup=new _e,r._focusAdjacencyDisabled=!1,r}return e.prototype.init=function(r,n){this._controller=new cu(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this._mainGroup,l=r.layoutInfo,u=l.width,c=l.height,f=r.getData(),h=r.getData("edge"),v=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(r,i),jG(r,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(p){var g=new qle,m=Ae(g);m.dataIndex=p.dataIndex,m.seriesIndex=r.seriesIndex,m.dataType="edge";var y=p.getModel(),x=y.getModel("lineStyle"),S=x.get("curveness"),b=p.node1.getLayout(),T=p.node1.getModel(),C=T.get("localX"),M=T.get("localY"),D=p.node2.getLayout(),I=p.node2.getModel(),k=I.get("localX"),E=I.get("localY"),z=p.getLayout(),O,F,G,j,Z,V,W,H;g.shape.extent=Math.max(1,z.dy),g.shape.orient=v,v==="vertical"?(O=(C!=null?C*u:b.x)+z.sy,F=(M!=null?M*c:b.y)+b.dy,G=(k!=null?k*u:D.x)+z.ty,j=E!=null?E*c:D.y,Z=O,V=F*(1-S)+j*S,W=G,H=F*S+j*(1-S)):(O=(C!=null?C*u:b.x)+b.dx,F=(M!=null?M*c:b.y)+z.sy,G=k!=null?k*u:D.x,j=(E!=null?E*c:D.y)+z.ty,Z=O*(1-S)+G*S,V=F,W=O*S+G*(1-S),H=j),g.setShape({x1:O,y1:F,x2:G,y2:j,cpx1:Z,cpy1:V,cpx2:W,cpy2:H}),g.useStyle(x.getItemStyle()),oN(g.style,v,p);var Y=""+y.get("value"),K=ar(y,"edgeLabel");vr(g,K,{labelFetcher:{getFormattedLabel:function(ue,de,Fe,xe,ge,De){return r.getFormattedLabel(ue,de,"edge",xe,mn(ge,K.normal&&K.normal.get("formatter"),Y),De)}},labelDataIndex:p.dataIndex,defaultText:Y}),g.setTextConfig({position:"inside"});var ne=y.getModel("emphasis");ir(g,y,"lineStyle",function(ue){var de=ue.getItemStyle();return oN(de,v,p),de}),s.add(g),h.setItemGraphicEl(p.dataIndex,g);var ie=ne.get("focus");bt(g,ie==="adjacency"?p.getAdjacentDataIndices():ie==="trajectory"?p.getTrajectoryDataIndices():ie,ne.get("blurScope"),ne.get("disabled"))}),o.eachNode(function(p){var g=p.getLayout(),m=p.getModel(),y=m.get("localX"),x=m.get("localY"),S=m.getModel("emphasis"),b=m.get(["itemStyle","borderRadius"])||0,T=new ze({shape:{x:y!=null?y*u:g.x,y:x!=null?x*c:g.y,width:g.dx,height:g.dy,r:b},style:m.getModel("itemStyle").getItemStyle(),z2:10});vr(T,ar(m),{labelFetcher:{getFormattedLabel:function(M,D){return r.getFormattedLabel(M,D,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),T.disableLabelAnimation=!0,T.setStyle("fill",p.getVisual("color")),T.setStyle("decal",p.getVisual("style").decal),ir(T,m),s.add(T),f.setItemGraphicEl(p.dataIndex,T),Ae(T).dataType="node";var C=S.get("focus");bt(T,C==="adjacency"?p.getAdjacentDataIndices():C==="trajectory"?p.getTrajectoryDataIndices():C,S.get("blurScope"),S.get("disabled"))}),f.eachItemGraphicEl(function(p,g){var m=f.getItemModel(g);m.get("draggable")&&(p.drift=function(y,x){a._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=x,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:f.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(Qle(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(r,n){var i=r.layoutInfo,a=i.width,o=i.height,s=r.coordinateSystem=new fu(null,{api:n,ecModel:r.ecModel});s.zoomLimit=r.get("scaleLimit"),s.setBoundingRect(0,0,a,o),s.setCenter(r.get("center")),s.setZoom(r.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e}(lt);function oN(t,e,r){switch(t.fill){case"source":t.fill=r.node1.getVisual("color"),t.decal=r.node1.getVisual("style").decal;break;case"target":t.fill=r.node2.getVisual("color"),t.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");se(n)&&se(i)&&(t.fill=new iu(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function Qle(t,e,r){var n=new ze({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return St(n,{shape:{width:t.width+20}},e,r),n}var Jle=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=r.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Ge(o[l],this,n));var u=KM(a,i,this,!0,c);return u.data;function c(f,h){f.wrapMethod("getItemModel",function(v,p){var g=v.parentModel,m=g.getData().getItemLayout(p);if(m){var y=m.depth,x=g.levelModels[y];x&&(v.parentModel=x)}return v}),h.wrapMethod("getItemModel",function(v,p){var g=v.parentModel,m=g.getGraph().getEdgeByIndex(p),y=m.node1.getLayout();if(y){var x=y.depth,S=g.levelModels[x];S&&(v.parentModel=S)}return v})}},e.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){function a(v){return isNaN(v)||v==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Kt("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(r),f=c.getLayout().value,h=this.getDataParams(r,i).data.name;return Kt("nameValue",{name:h!=null?h+"":null,value:f,noValue:a(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(r,n){var i=t.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},e.type="series.sankey",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:X.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:X.color.primary}},animationEasing:"linear",animationDuration:1e3},e}(ht);function eue(t,e){t.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=or(r,e).refContainer,o=wt(r.getBoxLayoutParams(),a);r.layoutInfo=o;var s=o.width,l=o.height,u=r.getGraph(),c=u.nodes,f=u.edges;rue(c);var h=tt(c,function(m){return m.getLayout().value===0}),v=h.length!==0?0:r.get("layoutIterations"),p=r.get("orient"),g=r.get("nodeAlign");tue(c,f,n,i,s,l,v,p,g)})}function tue(t,e,r,n,i,a,o,s,l){nue(t,e,r,i,a,s,l),sue(t,e,a,i,n,o,s),gue(t,s)}function rue(t){N(t,function(e){var r=ls(e.outEdges,jy),n=ls(e.inEdges,jy),i=e.getValue()||0,a=Math.max(r,n,i);e.setLayout({value:a},!0)})}function nue(t,e,r,n,i,a,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h=0;y&&m.depth>v&&(v=m.depth),g.setLayout({depth:y?m.depth:f},!0),a==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var x=0;xf-1?v:f-1;o&&o!=="left"&&iue(t,o,a,M);var D=a==="vertical"?(i-r)/M:(n-r)/M;oue(t,D,a)}function z6(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function iue(t,e,r,n){if(e==="right"){for(var i=[],a=t,o=0;a.length;){for(var s=0;s0;a--)l*=.99,cue(s,l,o),aS(s,i,r,n,o),pue(s,l,o),aS(s,i,r,n,o)}function lue(t,e){var r=[],n=e==="vertical"?"y":"x",i=cb(t,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),N(i.keys,function(a){r.push(i.buckets.get(a))}),r}function uue(t,e,r,n,i,a){var o=1/0;N(t,function(s){var l=s.length,u=0;N(s,function(f){u+=f.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;c0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[h]+e;var p=i==="vertical"?n:r;if(u=c-e-p,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var v=f-2;v>=0;--v)l=o[v],u=l.getLayout()[a]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function cue(t,e,r){N(t.slice().reverse(),function(n){N(n,function(i){if(i.outEdges.length){var a=ls(i.outEdges,fue,r)/ls(i.outEdges,jy);if(isNaN(a)){var o=i.outEdges.length;a=o?ls(i.outEdges,hue,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-gs(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-gs(i,r))*e;i.setLayout({y:l},!0)}}})})}function fue(t,e){return gs(t.node2,e)*t.getValue()}function hue(t,e){return gs(t.node2,e)}function vue(t,e){return gs(t.node1,e)*t.getValue()}function due(t,e){return gs(t.node1,e)}function gs(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function jy(t){return t.getValue()}function ls(t,e,r){for(var n=0,i=t.length,a=-1;++ao&&(o=l)}),N(n,function(s){var l=new hr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&N(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function yue(t){t.registerChartView(Kle),t.registerSeriesModel(Jle),t.registerLayout(eue),t.registerVisual(mue),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),t.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){var a=i.coordinateSystem,o=e_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var B6=function(){function t(){}return t.prototype._hasEncodeRule=function(e){var r=this.getEncode();return r&&r.get(e)!=null},t.prototype.getInitialData=function(e,r){var n,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],v=[i,a],p=v[c].get("type"),g=v[1-c].get("type"),m=e.data;if(m&&l){var y=[];N(m,function(b,T){var C;ee(b)?(C=b.slice(),b.unshift(T)):ee(b.value)?(C=J({},b),C.value=C.value.slice(),b.value.unshift(T)):C=b,y.push(C)}),e.data=y}var x=this.defaultValueDimensions,S=[{name:f,type:Ty(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Ty(g),dimsDef:x.slice()}];return Af(this,{coordDimensions:S,dimensionsCount:x.length+1,encodeDefaulter:Ie(YV,S,this)})},t.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},t}(),V6=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:X.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:X.color.shadow}},animationDuration:800},e}(ht);Bt(V6,B6,!0);var _ue=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),f=sN(c,a,u,l,!0);a.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(f);return}var h=a.getItemLayout(u);f?(li(f),F6(h,f,a,u)):f=sN(h,a,u,l),o.add(f),a.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},e.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},e.type="boxplot",e}(lt),xue=function(){function t(){}return t}(),Sue=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new xue},e.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();ag){var b=[y,S];n.push(b)}}}return{boxData:r,outliers:n}}var Aue={type:"echarts:boxplot",transform:function(e){var r=e.upstream;if(r.sourceFormat!==Tr){var n="";at(n)}var i=Lue(r.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function Pue(t){t.registerSeriesModel(V6),t.registerChartView(_ue),t.registerLayout(bue),t.registerTransform(Aue)}var Due=["itemStyle","borderColor"],kue=["itemStyle","borderColor0"],Iue=["itemStyle","borderColorDoji"],Eue=["itemStyle","color"],Rue=["itemStyle","color0"];function aL(t,e){return e.get(t>0?Eue:Rue)}function oL(t,e){return e.get(t===0?Iue:t>0?Due:kue)}var Nue={seriesType:"candlestick",plan:Sf(),performRawSeries:!0,reset:function(t,e){if(!e.isSeriesFiltered(t)){var r=t.pipelineContext.large;return!r&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=aL(s,o),l.stroke=oL(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");J(u,l)}}}}}},Oue=["color","borderColor"],zue=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},e.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},e.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},e.prototype.eachRendered=function(r){bs(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r){var n=r.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&lN(u,f))return;var h=oS(f,c,!0);St(h,{shape:{points:f.ends}},r,c),sS(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=i.getItemGraphicEl(f);if(!n.hasValue(c)){a.remove(h);return}var v=n.getItemLayout(c);if(s&&lN(u,v)){a.remove(h);return}h?(Qe(h,{shape:{points:v.ends}},r,c),li(h)):h=oS(v),sS(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=i.getItemGraphicEl(c);f&&a.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(r){this._clear(),uN(r,this.group);var n=r.get("clip",!0)?Vd(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=oS(s);sS(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(r,n){uN(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(r){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(lt),Bue=function(){function t(){}return t}(),Vue=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new Bue},e.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},e}(He);function oS(t,e,r){var n=t.ends;return new Vue({shape:{points:r?Fue(n,t):n},z2:100})}function lN(t,e){for(var r=!0,n=0;nT?E[a]:k[a],ends:F,brushRect:W(C,M,S)})}function Z(Y,K){var ne=[];return ne[i]=K,ne[a]=Y,isNaN(K)||isNaN(Y)?[NaN,NaN]:e.dataToPoint(ne)}function V(Y,K,ne){var ie=K.slice(),ue=K.slice();ie[i]=lm(ie[i]+n/2,1,!1),ue[i]=lm(ue[i]-n/2,1,!0),ne?Y.push(ie,ue):Y.push(ue,ie)}function W(Y,K,ne){var ie=Z(Y,ne),ue=Z(K,ne);return ie[i]-=n/2,ue[i]-=n/2,{x:ie[0],y:ie[1],width:n,height:ue[1]-ie[1]}}function H(Y){return Y[i]=lm(Y[i],1),Y}}function p(g,m){for(var y=sa(g.count*4),x=0,S,b=[],T=[],C,M=m.getStore(),D=!!t.get(["itemStyle","borderColorDoji"]);(C=g.next())!=null;){var I=M.get(s,C),k=M.get(u,C),E=M.get(c,C),z=M.get(f,C),O=M.get(h,C);if(isNaN(I)||isNaN(z)||isNaN(O)){y[x++]=NaN,x+=3;continue}y[x++]=cN(M,C,k,E,c,D),b[i]=I,b[a]=z,S=e.dataToPoint(b,null,T),y[x++]=S?S[0]:NaN,y[x++]=S?S[1]:NaN,b[a]=O,S=e.dataToPoint(b,null,T),y[x++]=S?S[1]:NaN}m.setLayout("largePoints",y)}}};function cN(t,e,r,n,i,a){var o;return r>n?o=-1:r0?t.get(i,e-1)<=n?1:-1:1,o}function Wue(t,e){var r=t.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/e.count()),a=oe(pe(t.get("barMaxWidth"),i),i),o=oe(pe(t.get("barMinWidth"),1),i),s=t.get("barWidth");return s!=null?oe(s,i):Math.max(Math.min(i/2,a),o)}function Uue(t){t.registerChartView(zue),t.registerSeriesModel(j6),t.registerPreprocessor(Gue),t.registerVisual(Nue),t.registerLayout(Hue)}function fN(t,e){var r=e.rippleEffectColor||e.color;t.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?r:null,fill:e.brushType==="fill"?r:null}})})}var Zue=function(t){$(e,t);function e(r,n){var i=t.call(this)||this,a=new zd(r,n),o=new _e;return i.add(a),i.add(o),i.updateData(r,n),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var h=void 0;me(f)?h=f(i):h=f,a.__t>0&&(h=-s*a.__t),this._animateSymbol(a,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},e.prototype._getLineLength=function(r){return ja(r.__p1,r.__cp1)+ja(r.__cp1,r.__p2)},e.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},e.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=xr,c=Yw;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var f=r.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),h=r.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(h,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),f=i[l],h=i[l+1];r.x=f[0]*(1-c)+c*h[0],r.y=f[1]*(1-c)+c*h[1];var v=r.__t<1?h[0]-f[0]:f[0]-h[0],p=r.__t<1?h[1]-f[1]:f[1]-h[1];r.rotation=-Math.atan2(p,v)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},e}(G6),Kue=function(){function t(){this.polyline=!1,this.curveness=0,this.segs=[]}return t}(),Que=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:X.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Kue},e.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o0){r.moveTo(i[o++],i[o++]);for(var l=1;l0){var v=(u+f)/2-(c-h)*a,p=(c+h)/2-(f-u)*a;r.quadraticCurveTo(v,p,f,h)}else r.lineTo(f,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var f=a[u++],h=a[u++],v=1;v0){var m=(f+p)/2-(h-g)*o,y=(h+g)/2-(p-f)*o;if(H4(f,h,m,y,p,g,s,r,n))return l}else if(Io(f,h,p,g,s,r,n))return l;l++}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),W6={seriesType:"lines",plan:Sf(),reset:function(t){var e=t.coordinateSystem;if(e){var r=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,c=i.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var f=r.get("clip",!0)&&Vd(r.coordinateSystem,!1,r);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},e.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},e.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=W6.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new Jue:new qM(o?a?que:H6:a?G6:XM),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(r){return!!r.get(["effect","show"])},e.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(r,n){this.remove(r,n)},e.type="lines",e}(lt),tce=typeof Uint32Array>"u"?Array:Uint32Array,rce=typeof Float64Array>"u"?Array:Float64Array;function hN(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=re(e,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),T0([i,r[0],r[1]])}))}var nce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return e.prototype.init=function(r){r.data=r.data||[],hN(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(r){if(hN(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=jc(this._flatCoords,n.flatCoords),this._flatCoordsOffset=jc(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},e.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},e.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(ht);function Cg(t){return t instanceof Array||(t=[t,t]),t}var ice={seriesType:"lines",reset:function(t){var e=Cg(t.get("symbol")),r=Cg(t.get("symbolSize")),n=t.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=Cg(s.getShallow("symbol",!0)),u=Cg(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};function ace(t){t.registerChartView(ece),t.registerSeriesModel(nce),t.registerLayout(W6),t.registerVisual(ice)}var oce=256,sce=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=yn.createCanvas();this.canvas=e}return t.prototype.update=function(e,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,h=f.getContext("2d"),v=e.length;f.width=r,f.height=n;for(var p=0;p0){var z=o(S)?l:u;S>0&&(S=S*k+D),T[C++]=z[E],T[C++]=z[E+1],T[C++]=z[E+2],T[C++]=z[E+3]*S*256}else C+=4}return h.putImageData(b,0,0),f},t.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=yn.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor=X.color.neutral99,i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},t.prototype._getGradient=function(e,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},t}();function lce(t,e,r){var n=t[1]-t[0];e=re(e,function(o){return{interval:[(o.interval[0]-t[0])/n,(o.interval[1]-t[0])/n]}});var i=e.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=e[0]&&n<=e[1]}}function vN(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}var cce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(r,i,0,r.getData().count()):vN(o)&&this._renderOnGeo(o,r,a,i)},e.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},e.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(vN(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,r.start,r.end,!0)))},e.prototype.eachRendered=function(r){bs(this._progressiveEls||this.group,r)},e.prototype._renderOnGridLike=function(r,n,i,a,o){var s=r.coordinateSystem,l=ds(s,"cartesian2d"),u=ds(s,"matrix"),c,f,h,v;if(l){var p=s.getAxis("x"),g=s.getAxis("y");c=p.getBandWidth()+.5,f=g.getBandWidth()+.5,h=p.scale.getExtent(),v=g.scale.getExtent()}for(var m=this.group,y=r.getData(),x=r.getModel(["emphasis","itemStyle"]).getItemStyle(),S=r.getModel(["blur","itemStyle"]).getItemStyle(),b=r.getModel(["select","itemStyle"]).getItemStyle(),T=r.get(["itemStyle","borderRadius"]),C=ar(r),M=r.getModel("emphasis"),D=M.get("focus"),I=M.get("blurScope"),k=M.get("disabled"),E=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],z=i;zh[1]||jv[1])continue;var Z=s.dataToPoint([G,j]);O=new ze({shape:{x:Z[0]-c/2,y:Z[1]-f/2,width:c,height:f},style:F})}else if(u){var V=s.dataToLayout([y.get(E[0],z),y.get(E[1],z)]).rect;if(Dr(V.x))continue;O=new ze({z2:1,shape:V,style:F})}else{if(isNaN(y.get(E[1],z)))continue;var W=s.dataToLayout([y.get(E[0],z)]),V=W.contentRect||W.rect;if(Dr(V.x)||Dr(V.y))continue;O=new ze({z2:1,shape:V,style:F})}if(y.hasItemOption){var H=y.getItemModel(z),Y=H.getModel("emphasis");x=Y.getModel("itemStyle").getItemStyle(),S=H.getModel(["blur","itemStyle"]).getItemStyle(),b=H.getModel(["select","itemStyle"]).getItemStyle(),T=H.get(["itemStyle","borderRadius"]),D=Y.get("focus"),I=Y.get("blurScope"),k=Y.get("disabled"),C=ar(H)}O.shape.r=T;var K=r.getRawValue(z),ne="-";K&&K[2]!=null&&(ne=K[2]+""),vr(O,C,{labelFetcher:r,labelDataIndex:z,defaultOpacity:F.opacity,defaultText:ne}),O.ensureState("emphasis").style=x,O.ensureState("blur").style=S,O.ensureState("select").style=b,bt(O,D,I,k),O.incremental=o,o&&(O.states.emphasis.hoverLayer=!0),m.add(O),y.setItemGraphicEl(z,O),this._progressiveEls&&this._progressiveEls.push(O)}},e.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new sce;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=r.getViewRect().clone(),f=r.getRoamTransform();c.applyTransform(f);var h=Math.max(c.x,0),v=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),g=Math.min(c.height+c.y,a.getHeight()),m=p-h,y=g-v,x=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],S=l.mapArray(x,function(M,D,I){var k=r.dataToPoint([M,D]);return k[0]-=h,k[1]-=v,k.push(I),k}),b=i.getExtent(),T=i.type==="visualMap.continuous"?uce(b,i.option.range):lce(b,i.getPieceList(),i.option.selected);u.update(S,m,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},T);var C=new dr({style:{width:m,height:y,x:h,y:v,image:u.canvas},silent:!0});this.group.add(C)},e.type="heatmap",e}(lt),fce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return Ta(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var r=xf.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:X.color.primary}}},e}(ht);function hce(t){t.registerChartView(cce),t.registerSeriesModel(fce)}var vce=["itemStyle","borderWidth"],dN=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],cS=new ba,dce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:dN[+c],categoryDim:dN[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var g=gN(o,p),m=pN(o,p,g,h),y=mN(o,h,m);o.setItemGraphicEl(p,y),a.add(y),_N(y,h,m)}}).update(function(p,g){var m=s.getItemGraphicEl(g);if(!o.hasValue(p)){a.remove(m);return}var y=gN(o,p),x=pN(o,p,y,h),S=q6(o,x);m&&S!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(p,null),m=null),m?Sce(m,h,x):m=mN(o,h,x,!0),o.setItemGraphicEl(p,m),m.__pictorialSymbolMeta=x,a.add(m),_N(m,h,x)}).remove(function(p){var g=s.getItemGraphicEl(p);g&&yN(s,p,g.__pictorialSymbolMeta.animationModel,g)}).execute();var v=r.get("clip",!0)?Vd(r.coordinateSystem,!1,r):null;return v?a.setClipPath(v):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){yN(a,Ae(o).dataIndex,r,o)}):i.removeAll()},e.type="pictorialBar",e}(lt);function pN(t,e,r,n){var i=t.getItemLayout(e),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=r.get("symbolPatternSize")||2,f=r.isAnimationEnabled(),h={dataIndex:e,layout:i,itemModel:r,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?r:null,hoverScale:f&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};pce(r,a,i,n,h),gce(t,e,i,a,o,h.boundingLength,h.pxSign,c,n,h),mce(r,h.symbolScale,u,n,h);var v=h.symbolSize,p=lu(r.get("symbolOffset"),v);return yce(r,v,i,a,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function pce(t,e,r,n,i){var a=n.valueDim,o=t.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),c;if(ee(o)){var f=[fS(s,o[0])-l,fS(s,o[1])-l];f[1]=0?1:-1:c>0?1:-1}function fS(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function gce(t,e,r,n,i,a,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(r[f.wh]),v=t.getItemVisual(e,"symbolSize"),p;ee(v)?p=v.slice():v==null?p=["100%","100%"]:p=[v,v],p[f.index]=oe(p[f.index],h),p[c.index]=oe(p[c.index],n?h:Math.abs(a)),u.symbolSize=p;var g=u.symbolScale=[p[0]/s,p[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*o}function mce(t,e,r,n,i){var a=t.get(vce)||0;a&&(cS.attr({scaleX:e[0],scaleY:e[1],rotation:r}),cS.updateTransform(),a/=cS.getLineScale(),a*=e[n.valueDim.index]),i.valueLineWidth=a||0}function yce(t,e,r,n,i,a,o,s,l,u,c,f){var h=c.categoryDim,v=c.valueDim,p=f.pxSign,g=Math.max(e[v.index]+s,0),m=g;if(n){var y=Math.abs(l),x=Sr(t.get("symbolMargin"),"15%")+"",S=!1;x.lastIndexOf("!")===x.length-1&&(S=!0,x=x.slice(0,x.length-1));var b=oe(x,e[v.index]),T=Math.max(g+b*2,0),C=S?0:b*2,M=g2(n),D=M?n:xN((y+C)/T),I=y-D*g;b=I/2/(S?D:Math.max(D-1,1)),T=g+b*2,C=S?0:b*2,!M&&n!=="fixed"&&(D=u?xN((Math.abs(u)+C)/T):0),m=D*T-C,f.repeatTimes=D,f.symbolMargin=b}var k=p*(m/2),E=f.pathPosition=[];E[h.index]=r[h.wh]/2,E[v.index]=o==="start"?k:o==="end"?l-k:l/2,a&&(E[0]+=a[0],E[1]+=a[1]);var z=f.bundlePosition=[];z[h.index]=r[h.xy],z[v.index]=r[v.xy];var O=f.barRectShape=J({},r);O[v.wh]=p*Math.max(Math.abs(r[v.wh]),Math.abs(E[v.index]+k)),O[h.wh]=r[h.wh];var F=f.clipShape={};F[h.xy]=-r[h.xy],F[h.wh]=c.ecSize[h.wh],F[v.xy]=0,F[v.wh]=r[v.wh]}function U6(t){var e=t.symbolPatternSize,r=Ut(t.symbolType,-e/2,-e/2,e,e);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function Z6(t,e,r,n){var i=t.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=e.valueDim,u=r.repeatTimes||0,c=0,f=a[e.valueDim.index]+o+r.symbolMargin*2;for(sL(t,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c0:y<0)&&(x=u-1-g),m[l.index]=f*(x-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function $6(t,e,r,n){var i=t.__pictorialBundle,a=t.__pictorialMainPath;a?Ic(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=t.__pictorialMainPath=U6(r),i.add(a),Ic(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function Y6(t,e,r){var n=J({},e.barRectShape),i=t.__pictorialBarRect;i?Ic(i,null,{shape:n},e,r):(i=t.__pictorialBarRect=new ze({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,t.add(i))}function X6(t,e,r,n){if(r.symbolClip){var i=t.__pictorialClipPath,a=J({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(i)Qe(i,{shape:a},s,l);else{a[o.wh]=0,i=new ze({shape:a}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],au[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function gN(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=_ce,r.isAnimationEnabled=xce,r}function _ce(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function xce(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function mN(t,e,r,n){var i=new _e,a=new _e;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?Z6(i,e,r):$6(i,e,r),Y6(i,r,n),X6(i,e,r,n),i.__pictorialShapeStr=q6(t,r),i.__pictorialSymbolMeta=r,i}function Sce(t,e,r){var n=r.animationModel,i=r.dataIndex,a=t.__pictorialBundle;Qe(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?Z6(t,e,r,!0):$6(t,e,r,!0),Y6(t,r,!0),X6(t,e,r,!0)}function yN(t,e,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];sL(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),N(a,function(o){vs(o,{scaleX:0,scaleY:0},r,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function q6(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function sL(t,e,r){N(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(r,n)})}function Ic(t,e,r,n,i,a){e&&t.attr(e),n.symbolClip&&!i?r&&t.attr(r):r&&au[i?"updateProps":"initProps"](t,r,n.animationModel,n.dataIndex,a)}function _N(t,e,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),f=a.get("blurScope"),h=a.get("scale");sL(t,function(g){if(g instanceof dr){var m=g.style;g.useStyle(J({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},r.style))}else g.useStyle(r.style);var y=g.ensureState("emphasis");y.style=o,h&&(y.scaleX=g.scaleX*1.1,y.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=r.z2});var v=e.valueDim.posDesc[+(r.boundingLength>0)],p=t.__pictorialBarRect;p.ignoreClip=!0,vr(p,ar(i),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:Qc(e.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:v}),bt(t,c,f,a.get("disabled"))}function xN(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var wce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return e.prototype.getInitialData=function(r){return r.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Ts(ad.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:X.color.primary}}}),e}(ad);function bce(t){t.registerChartView(dce),t.registerSeriesModel(wce),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(gj,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,mj("pictorialBar"))}var Tce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._layers=[],r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(m){return m.name}var v=new lo(this._layersSeries||[],l,h,h),p=[];v.add(le(g,this,"add")).update(le(g,this,"update")).remove(le(g,this,"remove")).execute();function g(m,y,x){var S=o._layers;if(m==="remove"){s.remove(S[y]);return}for(var b=[],T=[],C,M=l[y].indices,D=0;Da&&(a=s),n.push(s)}for(var u=0;ua&&(a=f)}return{y0:i,max:a}}function Pce(t){t.registerChartView(Tce),t.registerSeriesModel(Mce),t.registerLayout(Lce),t.registerProcessor(Lf("themeRiver"))}var Dce=2,kce=4,wN=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this)||this;o.z2=Dce,o.textConfig={inside:!0},Ae(o).seriesIndex=n.seriesIndex;var s=new Xe({z2:kce,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return e.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;Ae(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=J({},c);f.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var v=n.getVisual("decal");v&&(h.decal=Xc(v,o));var p=ua(l.getModel("itemStyle"),f,!0);J(f,p),N(nn,function(x){var S=s.ensureState(x),b=l.getModel([x,"itemStyle"]);S.style=b.getItemStyle();var T=ua(b,f);T&&(S.shape=T)}),r?(s.setShape(f),s.shape.r=c.r0,St(s,{shape:{r:c.r}},i,n.dataIndex)):(Qe(s,{shape:f},i),li(s)),s.useStyle(h),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var m=u.get("focus"),y=m==="relative"?jc(n.getAncestorsIndices(),n.getDescendantIndices()):m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;bt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,h=f.getTextContent(),v=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(p!=null&&Math.abs(s)F&&!Wc(j-F)&&j0?(o.virtualPiece?o.virtualPiece.updateData(!1,x,r,n,i):(o.virtualPiece=new wN(x,r,n,i),c.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(b){o._rootToNode(S.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";dy(u,c)}}i=!0}})})},e.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:MT,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},e.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(lt),Nce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};K6(i);var a=this._levelModels=re(r.levels||[],function(l){return new Ge(l,this,n)},this),o=HM.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=a[f.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=r_(i,this),n},e.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){t6(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(ht);function K6(t){var e=0;N(t.children,function(n){K6(n);var i=n.value;ee(i)&&(i=i[0]),e+=i});var r=t.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),ee(t.value)?t.value[0]=r:t.value=r}var TN=Math.PI/180;function Oce(t,e,r){e.eachSeriesByType(t,function(n){var i=n.get("center"),a=n.get("radius");ee(a)||(a=[0,a]),ee(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=oe(i[0],o),c=oe(i[1],s),f=oe(a[0],l/2),h=oe(a[1],l/2),v=-n.get("startAngle")*TN,p=n.get("minAngle")*TN,g=n.getData().tree.root,m=n.getViewRoot(),y=m.depth,x=n.get("sort");x!=null&&Q6(m,x);var S=0;N(m.children,function(j){!isNaN(j.getValue())&&S++});var b=m.getValue(),T=Math.PI/(b||S)*2,C=m.depth>0,M=m.height-(C?-1:1),D=(h-f)/(M||1),I=n.get("clockwise"),k=n.get("stillShowZeroSum"),E=I?1:-1,z=function(j,Z){if(j){var V=Z;if(j!==g){var W=j.getValue(),H=b===0&&k?T:W*T;H1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&se(s)&&(s=ey(s,(n.depth-1)/(a-1)*.5)),s}t.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");J(u,l)})})}function Vce(t){t.registerChartView(Rce),t.registerSeriesModel(Nce),t.registerLayout(Ie(Oce,"sunburst")),t.registerProcessor(Ie(Lf,"sunburst")),t.registerVisual(Bce),Ece(t)}var CN={color:"fill",borderColor:"stroke"},Fce={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ka=Ve(),jce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(r,n){return Ta(null,this)},e.prototype.getDataParams=function(r,n,i){var a=t.prototype.getDataParams.call(this,r,n);return i&&(a.info=Ka(i).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(ht);function Gce(t,e){return e=e||[0,0],re(["x","y"],function(r,n){var i=this.getAxis(r),a=e[n],o=t[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function Hce(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:le(Gce,t)}}}function Wce(t,e){return e=e||[0,0],re([0,1],function(r){var n=e[r],i=t[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=e[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function Uce(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(r){return t.dataToPoint(r)},size:le(Wce,t)}}}function Zce(t,e){var r=this.getAxis(),n=e instanceof Array?e[0]:e,i=(t instanceof Array?t[0]:t)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function $ce(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:le(Zce,t)}}}function Yce(t,e){return e=e||[0,0],re(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=e[n],s=t[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function Xce(t){var e=t.getRadiusAxis(),r=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=e.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=t.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:le(Yce,t)}}}function qce(t){var e=t.getRect(),r=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return t.dataToPoint(n,i)},layout:function(n,i){return t.dataToLayout(n,i)}}}}function Kce(t){var e=t.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r,n){return t.dataToPoint(r,n)},layout:function(r,n){return t.dataToLayout(r,n)}}}}function J6(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||fe(t,"text")))}function eH(t,e,r){var n=t,i,a,o;if(e==="text")o=n;else{o={},fe(n,"text")&&(o.text=n.text),fe(n,"rich")&&(o.rich=n.rich),fe(n,"textFill")&&(o.fill=n.textFill),fe(n,"textStroke")&&(o.stroke=n.textStroke),fe(n,"fontFamily")&&(o.fontFamily=n.fontFamily),fe(n,"fontSize")&&(o.fontSize=n.fontSize),fe(n,"fontStyle")&&(o.fontStyle=n.fontStyle),fe(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=fe(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),fe(n,"textPosition")&&(i.position=n.textPosition),fe(n,"textOffset")&&(i.offset=n.textOffset),fe(n,"textRotation")&&(i.rotation=n.textRotation),fe(n,"textDistance")&&(i.distance=n.textDistance)}return MN(o,t),N(o.rich,function(l){MN(l,l)}),{textConfig:i,textContent:a}}function MN(t,e){e&&(e.font=e.textFont||e.font,fe(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),fe(e,"textAlign")&&(t.align=e.textAlign),fe(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),fe(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),fe(e,"textWidth")&&(t.width=e.textWidth),fe(e,"textHeight")&&(t.height=e.textHeight),fe(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),fe(e,"textPadding")&&(t.padding=e.textPadding),fe(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),fe(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),fe(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),fe(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),fe(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),fe(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),fe(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function LN(t,e,r){var n=t;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var i=n.textPosition.indexOf("inside")>=0,a=t.fill||X.color.neutral99;AN(n,e);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||X.color.neutral00,!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=t.fill||r.outsideFill||X.color.neutral00),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=e.text,n.rich=e.rich,N(e.rich,function(s){AN(s,s)}),n}function AN(t,e){e&&(fe(e,"fill")&&(t.textFill=e.fill),fe(e,"stroke")&&(t.textStroke=e.fill),fe(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),fe(e,"font")&&(t.font=e.font),fe(e,"fontStyle")&&(t.fontStyle=e.fontStyle),fe(e,"fontWeight")&&(t.fontWeight=e.fontWeight),fe(e,"fontSize")&&(t.fontSize=e.fontSize),fe(e,"fontFamily")&&(t.fontFamily=e.fontFamily),fe(e,"align")&&(t.textAlign=e.align),fe(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),fe(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),fe(e,"width")&&(t.textWidth=e.width),fe(e,"height")&&(t.textHeight=e.height),fe(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),fe(e,"padding")&&(t.textPadding=e.padding),fe(e,"borderColor")&&(t.textBorderColor=e.borderColor),fe(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),fe(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),fe(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),fe(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),fe(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),fe(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),fe(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),fe(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),fe(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),fe(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var tH={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},PN=Ue(tH);ai(ga,function(t,e){return t[e]=1,t},{});ga.join(", ");var Gy=["","style","shape","extra"],rf=Ve();function lL(t,e,r,n,i){var a=t+"Animation",o=pf(t,n,i)||{},s=rf(e).userDuring;return o.duration>0&&(o.during=s?le(rfe,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),J(o,r[a]),o}function gm(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=rf(t),u=e.style;l.userDuring=e.during;var c={},f={};if(ife(t,e,f),t.type==="compound")for(var h=t.shape.paths,v=e.shape.paths,p=0;p0&&t.animateFrom(m,y)}else Jce(t,e,i||0,r,c);rH(t,e),u?t.dirty():t.markRedraw()}function rH(t,e){for(var r=rf(t).leaveToProps,n=0;n0&&t.animateFrom(i,a)}}function efe(t,e){fe(e,"silent")&&(t.silent=e.silent),fe(e,"ignore")&&(t.ignore=e.ignore),t instanceof si&&fe(e,"invisible")&&(t.invisible=e.invisible),t instanceof He&&fe(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var Ki={},tfe={setTransform:function(t,e){return Ki.el[t]=e,this},getTransform:function(t){return Ki.el[t]},setShape:function(t,e){var r=Ki.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){var e=Ki.el.shape;if(e)return e[t]},setStyle:function(t,e){var r=Ki.el,n=r.style;return n&&(n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){var e=Ki.el.style;if(e)return e[t]},setExtra:function(t,e){var r=Ki.el.extra||(Ki.el.extra={});return r[t]=e,this},getExtra:function(t){var e=Ki.el.extra;if(e)return e[t]}};function rfe(){var t=this,e=t.el;if(e){var r=rf(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}Ki.el=e,n(tfe)}}function DN(t,e,r,n){var i=r[t];if(i){var a=e[t],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[t]={}),Rl(l))J(o,a);else for(var u=gt(l),c=0;c=0){!o&&(o=n[t]={});for(var v=Ue(a),c=0;c=0)){var h=t.getAnimationStyleProps(),v=h?h.style:null;if(v){!a&&(a=n.style={});for(var p=Ue(r),u=0;u=0?e.getStore().get(V,j):void 0}var W=e.get(Z.name,j),H=Z&&Z.ordinalMeta;return H?H.categories[W]:W}function M(G,j){j==null&&(j=c);var Z=e.getItemVisual(j,"style"),V=Z&&Z.fill,W=Z&&Z.opacity,H=S(j,Wo).getItemStyle();V!=null&&(H.fill=V),W!=null&&(H.opacity=W);var Y={inheritColor:se(V)?V:X.color.neutral99},K=b(j,Wo),ne=pt(K,null,Y,!1,!0);ne.text=K.getShallow("show")?pe(t.getFormattedLabel(j,Wo),Qc(e,j)):null;var ie=fy(K,Y,!1);return k(G,H),H=LN(H,ne,ie),G&&I(H,G),H.legacy=!0,H}function D(G,j){j==null&&(j=c);var Z=S(j,Qa).getItemStyle(),V=b(j,Qa),W=pt(V,null,null,!0,!0);W.text=V.getShallow("show")?mn(t.getFormattedLabel(j,Qa),t.getFormattedLabel(j,Wo),Qc(e,j)):null;var H=fy(V,null,!0);return k(G,Z),Z=LN(Z,W,H),G&&I(Z,G),Z.legacy=!0,Z}function I(G,j){for(var Z in j)fe(j,Z)&&(G[Z]=j[Z])}function k(G,j){G&&(G.textFill&&(j.textFill=G.textFill),G.textPosition&&(j.textPosition=G.textPosition))}function E(G,j){if(j==null&&(j=c),fe(CN,G)){var Z=e.getItemVisual(j,"style");return Z?Z[CN[G]]:null}if(fe(Fce,G))return e.getItemVisual(j,G)}function z(G){if(o.type==="cartesian2d"){var j=o.getBaseAxis();return cte(Se({axis:j},G))}}function O(){return r.getCurrentSeriesIndices()}function F(G){return O2(G,r)}}function pfe(t){var e={};return N(t.dimensions,function(r){var n=t.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=e[i]=e[i]||[];a[n.coordDimIndex]=t.getDimensionIndex(r)}}),e}function gS(t,e,r,n,i,a,o){if(!n){a.remove(e);return}var s=vL(t,e,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&bt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function vL(t,e,r,n,i,a){var o=-1,s=e;e&&oH(e,n,i)&&(o=Ee(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=fL(n),s&&ffe(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),Gn.normal.cfg=Gn.normal.conOpt=Gn.emphasis.cfg=Gn.emphasis.conOpt=Gn.blur.cfg=Gn.blur.conOpt=Gn.select.cfg=Gn.select.conOpt=null,Gn.isLegacy=!1,mfe(u,r,n,i,l,Gn),gfe(u,r,n,i,l),hL(t,u,r,n,Gn,i,l),fe(n,"info")&&(Ka(u).info=n.info);for(var c=0;c=0?a.replaceAt(u,o):a.add(u),u}function oH(t,e,r){var n=Ka(t),i=e.type,a=e.shape,o=e.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&wfe(a)&&sH(a)!==n.customPathData||i==="image"&&fe(o,"image")&&o.image!==n.customImagePath}function gfe(t,e,r,n,i){var a=r.clipPath;if(a===!1)t&&t.getClipPath()&&t.removeClipPath();else if(a){var o=t.getClipPath();o&&oH(o,a,n)&&(o=null),o||(o=fL(a),t.setClipPath(o)),hL(null,o,e,a,null,n,i)}}function mfe(t,e,r,n,i,a){if(!(t.isGroup||t.type==="compoundPath")){IN(r,null,a),IN(r,Qa,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=t.getTextContent();if(o===!1)c&&t.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=fL(o),t.setTextContent(c)),hL(null,c,e,o,null,n,i);for(var f=o&&o.style,h=0;h=c;v--){var p=e.childAt(v);_fe(e,p,i)}}}function _fe(t,e,r){e&&a_(e,Ka(t).option,r)}function xfe(t){new lo(t.oldChildren,t.newChildren,EN,EN,t).add(RN).update(RN).remove(Sfe).execute()}function EN(t,e){var r=t&&t.name;return r??ufe+e}function RN(t,e){var r=this.context,n=t!=null?r.newChildren[t]:null,i=e!=null?r.oldChildren[e]:null;vL(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function Sfe(t){var e=this.context,r=e.oldChildren[t];r&&a_(r,Ka(r).option,e.seriesModel)}function sH(t){return t&&(t.pathData||t.d)}function wfe(t){return t&&(fe(t,"pathData")||fe(t,"d"))}function bfe(t){t.registerChartView(hfe),t.registerSeriesModel(jce)}var dl=Ve(),NN=ye,mS=le,pL=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,r,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new _e,this.createPointerEl(s,u,e,r),this.createLabelEl(s,u,e,r),n.getZr().add(s);else{var h=Ie(ON,r,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,r)}BN(s,r,!0),this._renderHandle(a)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var n=r.get("animation"),i=e.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=OM(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},t.prototype.makeElOption=function(e,r,n,i,a){},t.prototype.createPointerEl=function(e,r,n,i){var a=r.pointer;if(a){var o=dl(e).pointerEl=new au[a.type](NN(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=dl(e).labelEl=new Xe(NN(r.label));e.add(a),zN(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=dl(e).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,n,i){var a=dl(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),zN(a,i))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=gf(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){ao(u.event)},onmousedown:mS(this._onHandleDragMove,this,0,0),drift:mS(this._onHandleDragMove,this),ondragend:mS(this._onHandleDragEnd,this)}),n.add(i)),BN(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");ee(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,wf(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){ON(this._axisPointerModel,!r&&this._moveAnimation,this._handle,yS(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(yS(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(yS(i)),dl(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Kv(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,n){return n=n||0,{x:e[n],y:e[1-n],width:r[n],height:r[1-n]}},t}();function ON(t,e,r,n){lH(dl(r).lastProp,n)||(dl(r).lastProp=n,e?Qe(r,n,t):(r.stopAnimation(),r.attr(n)))}function lH(t,e){if(we(t)&&we(e)){var r=!0;return N(e,function(n,i){r=r&&lH(t[i],n)}),!!r}else return t===e}function zN(t,e){t[e.get(["label","show"])?"show":"hide"]()}function yS(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function BN(t,e,r){var n=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function gL(t){var e=t.get("type"),r=t.getModel(e+"Style"),n;return e==="line"?(n=r.getLineStyle(),n.fill=null):e==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function uH(t,e,r,n,i){var a=r.get("value"),o=cH(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=_f(s.get("padding")||0),u=s.getFont(),c=P0(o,u),f=i.position,h=c.width+l[1]+l[3],v=c.height+l[0]+l[2],p=i.align;p==="right"&&(f[0]-=h),p==="center"&&(f[0]-=h/2);var g=i.verticalAlign;g==="bottom"&&(f[1]-=v),g==="middle"&&(f[1]-=v/2),Tfe(f,h,v,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),t.label={x:f[0],y:f[1],style:pt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function Tfe(t,e,r,n){var i=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,a)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function cH(t,e,r,n,i){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:i.precision}),o=i.formatter;if(o){var s={value:Cy(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};N(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),se(o)?a=o.replace("{value}",a):me(o)&&(a=o(s))}return a}function mL(t,e,r){var n=fr();return vo(n,n,r.rotation),Ii(n,n,r.position),Pi([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function fH(t,e,r,n,i,a){var o=tn.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),uH(e,n,i,a,{position:mL(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function yL(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function hH(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function VN(t,e,r,n,i,a){return{cx:t,cy:e,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var Cfe=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=FN(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=gL(a),v=Mfe[u](s,f,c);v.style=h,r.graphicKey=v.type,r.pointer=v}var p=Ny(l.getRect(),i);fH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=Ny(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=mL(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=FN(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[r.x,r.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,v=[h,h];v[c]=f[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:r.rotation,cursorPoint:v,tooltipOption:p[c]}},e}(pL);function FN(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var Mfe={line:function(t,e,r){var n=yL([e,r[0]],[e,r[1]],jN(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:hH([e-n/2,r[0]],[n,i],jN(t))}}};function jN(t){return t.dim==="x"?0:1}var Lfe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:X.color.border,width:1,type:"dashed"},shadowStyle:{color:X.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:X.color.neutral00,padding:[5,7,5,7],backgroundColor:X.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:X.color.accent40,throttle:40}},e}(Be),Ua=Ve(),Afe=N;function vH(t,e,r){if(!We.node){var n=e.getZr();Ua(n).records||(Ua(n).records={}),Pfe(n,e);var i=Ua(n).records[t]||(Ua(n).records[t]={});i.handler=r}}function Pfe(t,e){if(Ua(t).initialized)return;Ua(t).initialized=!0,r("click",Ie(GN,"click")),r("mousemove",Ie(GN,"mousemove")),r("globalout",kfe);function r(n,i){t.on(n,function(a){var o=Ife(e);Afe(Ua(t).records,function(s){s&&i(s,a,o.dispatchAction)}),Dfe(o.pendings,e)})}}function Dfe(t,e){var r=t.showTip.length,n=t.hideTip.length,i;r?i=t.showTip[r-1]:n&&(i=t.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function kfe(t,e,r){t.handler("leave",null,r)}function GN(t,e,r,n){e.handler(t,r,n)}function Ife(t){var e={showTip:[],hideTip:[]},r=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=r,t.dispatchAction(n))};return{dispatchAction:r,pendings:e}}function PT(t,e){if(!We.node){var r=e.getZr(),n=(Ua(r).records||{})[t];n&&(Ua(r).records[t]=null)}}var Efe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";vH("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(r,n){PT("axisPointer",n)},e.prototype.dispose=function(r,n){PT("axisPointer",n)},e.type="axisPointer",e}(mt);function dH(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Hl(a,t);if(o==null||o<0||ee(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,v=f==="x"||f==="radius"?1:0,p=a.mapDimension(h),g=[];g[v]=a.get(p,o),g[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(g)||[]}else r=l.dataToPoint(a.getValues(re(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var HN=Ve();function Rfe(t,e,r){var n=t.currTrigger,i=[t.x,t.y],a=t,o=t.dispatchAction||le(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){mm(i)&&(i=dH({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=mm(i),u=a.axesInfo,c=s.axesInfo,f=n==="leave"||mm(i),h={},v={},p={list:[],map:{}},g={showPointer:Ie(Ofe,v),showTooltip:Ie(zfe,p)};N(s.coordSysMap,function(y,x){var S=l||y.containPoint(i);N(s.coordSysAxesInfo[x],function(b,T){var C=b.axis,M=jfe(u,b);if(!f&&S&&(!u||M)){var D=M&&M.value;D==null&&!l&&(D=C.pointToData(i)),D!=null&&WN(b,D,g,!1,h)}})});var m={};return N(c,function(y,x){var S=y.linkGroup;S&&!v[x]&&N(S.axesInfo,function(b,T){var C=v[T];if(b!==y&&C){var M=C.value;S.mapper&&(M=y.axis.scale.parse(S.mapper(M,UN(b),UN(y)))),m[y.key]=M}})}),N(m,function(y,x){WN(c[x],y,g,!0,h)}),Bfe(v,c,h),Vfe(p,i,t,o),Ffe(c,o,r),h}}function WN(t,e,r,n,i){var a=t.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=Nfe(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&J(i,s[0]),!n&&t.snap&&a.containData(l)&&l!=null&&(e=l),r.showPointer(t,e,s),r.showTooltip(t,o,l)}}function Nfe(t,e){var r=e.axis,n=r.dim,i=t,a=[],o=Number.MAX_VALUE,s=-1;return N(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(c,t,r);h=v.dataIndices,f=v.nestestValue}else{if(h=l.indicesOfNearest(n,c[0],t,r.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var p=t-f,g=Math.abs(p);g<=o&&((g=0&&s<0)&&(o=g,s=p,i=f,a.length=0),N(h,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:i}}function Ofe(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function zfe(t,e,r,n){var i=r.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=od(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function Bfe(t,e,r){var n=r.axesInfo=[];N(e,function(i,a){var o=i.axisPointerModel.option,s=t[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function Vfe(t,e,r,n){if(mm(e)||!t.list.length){n({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function Ffe(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=HN(n)[i]||{},o=HN(n)[i]={};N(t,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&N(f.seriesDataIndices,function(h){var v=h.seriesIndex+" | "+h.dataIndex;o[v]=h})});var s=[],l=[];N(a,function(u,c){!o[c]&&l.push(u)}),N(o,function(u,c){!a[c]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function jfe(t,e){for(var r=0;r<(t||[]).length;r++){var n=t[r];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function UN(t){var e=t.axis.model,r={},n=r.axisDim=t.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=e.componentIndex,r.axisName=r[n+"AxisName"]=e.name,r.axisId=r[n+"AxisId"]=e.id,r}function mm(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function Gd(t){uu.registerAxisPointerClass("CartesianAxisPointer",Cfe),t.registerComponentModel(Lfe),t.registerComponentView(Efe),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!ee(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=Gie(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Rfe)}function Gfe(t){Oe(BG),Oe(Gd)}var Hfe=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),h=a.get("type");if(h&&h!=="none"){var v=gL(a),p=Ufe[h](s,l,f,c);p.style=v,r.graphicKey=p.type,r.pointer=p}var g=a.get(["label","margin"]),m=Wfe(n,i,a,l,g);uH(r,i,a,o,m)},e}(pL);function Wfe(t,e,r,n,i){var a=e.axis,o=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(a.dim==="radius"){var h=fr();vo(h,h,s),Ii(h,h,[n.cx,n.cy]),u=Pi([o,-i],h);var v=e.getModel("axisLabel").get("rotate")||0,p=tn.innerTextLayout(s,v*Math.PI/180,-1);c=p.textAlign,f=p.textVerticalAlign}else{var g=l[1];u=n.coordToPoint([g+i,o]);var m=n.cx,y=n.cy;c=Math.abs(u[0]-m)/g<.3?"center":u[0]>m?"left":"right",f=Math.abs(u[1]-y)/g<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var Ufe={line:function(t,e,r,n){return t.dim==="angle"?{type:"Line",shape:yL(e.coordToPoint([n[0],r]),e.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r}}},shadow:function(t,e,r,n){var i=Math.max(1,t.getBandWidth()),a=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:VN(e.cx,e.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:VN(e.cx,e.cy,r-i/2,r+i/2,0,Math.PI*2)}}},Zfe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Be),_L=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Dt).models[0]},e.type="polarAxis",e}(Be);Bt(_L,Mf);var $fe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="angleAxis",e}(_L),Yfe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="radiusAxis",e}(_L),xL=function(t){$(e,t);function e(r,n){return t.call(this,"radius",r,n)||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e}(fi);xL.prototype.dataToRadius=fi.prototype.dataToCoord;xL.prototype.radiusToData=fi.prototype.coordToData;var Xfe=Ve(),SL=function(t){$(e,t);function e(r,n){return t.call(this,"angle",r,n||[0,360])||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),c=P0(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var v=Math.max(0,Math.floor(h)),p=Xfe(r.model),g=p.lastAutoInterval,m=p.lastTickCount;return g!=null&&m!=null&&Math.abs(g-v)<=1&&Math.abs(m-o)<=1&&g>v?v=g:(p.lastTickCount=o,p.lastAutoInterval=v),v},e}(fi);SL.prototype.dataToAngle=fi.prototype.dataToCoord;SL.prototype.angleToData=fi.prototype.coordToData;var pH=["radius","angle"],qfe=function(){function t(e){this.dimensions=pH,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new xL,this._angleAxis=new SL,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(e){var r=this.pointToCoord(e);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},t.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},t.prototype.getAxis=function(e){var r="_"+e+"Axis";return this[r]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(e){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&r.push(n),i.scale.type===e&&r.push(i),r},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(e){var r=this._angleAxis;return e===r?this._radiusAxis:r},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(e){var r=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},t.prototype.dataToPoint=function(e,r,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],r),this._angleAxis.dataToAngle(e[1],r)],n)},t.prototype.pointToData=function(e,r,n){n=n||[];var i=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(i[0],r),n[1]=this._angleAxis.angleToData(i[1],r),n},t.prototype.pointToCoord=function(e){var r=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,c=us;)u+=c*360;return[l,u]},t.prototype.coordToPoint=function(e,r){r=r||[];var n=e[0],i=e[1]/180*Math.PI;return r[0]=Math.cos(i)*n+this.cx,r[1]=-Math.sin(i)*n+this.cy,r},t.prototype.getArea=function(){var e=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=e.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,f=u*u+c*c,h=this.r,v=this.r0;return h!==v&&f-o<=h*h&&f+o>=v*v},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},t.prototype.convertToPixel=function(e,r,n){var i=ZN(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=ZN(r);return i===this?this.pointToData(n):null},t}();function ZN(t){var e=t.seriesModel,r=t.polarModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function Kfe(t,e,r){var n=e.get("center"),i=or(e,r).refContainer;t.cx=oe(n[0],i.width)+i.x,t.cy=oe(n[1],i.height)+i.y;var a=t.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:ee(s)||(s=[0,s]);var l=[oe(s[0],o),oe(s[1],o)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}function Qfe(t,e){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),t.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();N(My(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),N(My(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),Xl(n.scale,n.model),Xl(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function Jfe(t){return t.mainType==="angleAxis"}function $N(t,e){var r;if(t.type=e.get("type"),t.scale=Od(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),Jfe(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle"),i=(r=e.get("endAngle"))!==null&&r!==void 0?r:n+(t.inverse?-360:360);t.setExtent(n,i)}e.axis=t,t.model=e}var ehe={dimensions:pH,create:function(t,e){var r=[];return t.eachComponent("polar",function(n,i){var a=new qfe(i+"");a.update=Qfe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");$N(o,l),$N(s,u),Kfe(a,n,e),r.push(a),n.coordinateSystem=a,a.model=n}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",Dt).models[0];n.coordinateSystem=i.coordinateSystem}}),r}},the=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Mg(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],r]),i=t.coordToPoint([e[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function Lg(t){var e=t.getRadiusAxis();return e.inverse?0:1}function YN(t){var e=t[0],r=t[t.length-1];e&&r&&Math.abs(Math.abs(e.coord-r.coord)-360)<1e-4&&t.pop()}var rhe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="PolarAxisPointer",r}return e.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=re(i.getViewLabels(),function(c){c=ye(c);var f=i.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(h),c});YN(u),YN(s),N(the,function(c){r.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&nhe[c](this.group,r,a,s,l,o,u)},this)}},e.type="angleAxis",e}(uu),nhe={axisLine:function(t,e,r,n,i,a){var o=e.getModel(["axisLine","lineStyle"]),s=r.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=Lg(r),f=c?0:1,h,v=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[f]===0?h=new au[v]({shape:{cx:r.cx,cy:r.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new vf({shape:{cx:r.cx,cy:r.cy,r:a[c],r0:a[f]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,t.add(h)},axisTick:function(t,e,r,n,i,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[Lg(r)],u=re(n,function(c){return new Wt({shape:Mg(r,[l,l+s],c.coord)})});t.add(Tn(u,{style:Se(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,r,n,i,a){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[Lg(r)],c=[],f=0;fy?"left":"right",b=Math.abs(m[1]-x)/g<.3?"middle":m[1]>x?"top":"bottom";if(s&&s[p]){var T=s[p];we(T)&&T.textStyle&&(v=new Ge(T.textStyle,l,l.ecModel))}var C=new Xe({silent:tn.isLabelSilent(e),style:pt(v,{x:m[0],y:m[1],fill:v.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:S,verticalAlign:b})});if(t.add(C),go({el:C,componentModel:e,itemName:f.formattedLabel,formatterParamsExtra:{isTruncated:function(){return C.isTruncated},value:f.rawLabel,tickIndex:h}}),c){var M=tn.makeAxisEventDataBase(e);M.targetType="axisLabel",M.value=f.rawLabel,Ae(C).eventData=M}},this)},splitLine:function(t,e,r,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f=0?"p":"n",G=I;T&&(n[c][O]||(n[c][O]={p:I,n:I}),G=n[c][O][F]);var j=void 0,Z=void 0,V=void 0,W=void 0;if(p.dim==="radius"){var H=p.dataToCoord(z)-I,Y=l.dataToCoord(O);Math.abs(H)=W})}}})}function uhe(t){var e={};N(t,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=mH(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;e[l]=f;var v=gH(n);h[v]||f.autoWidthCount++,h[v]=h[v]||{width:0,maxWidth:0};var p=oe(n.get("barWidth"),c),g=oe(n.get("barMaxWidth"),c),m=n.get("barGap"),y=n.get("barCategoryGap");p&&!h[v].width&&(p=Math.min(f.remainedWidth,p),h[v].width=p,f.remainedWidth-=p),g&&(h[v].maxWidth=g),m!=null&&(f.gap=m),y!=null&&(f.categoryGap=y)});var r={};return N(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=oe(n.categoryGap,o),l=oe(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),N(a,function(g,m){var y=g.maxWidth;y&&y=r.y&&e[1]<=r.y+r.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=r.y&&e[0]<=r.y+r.height},t.prototype.pointToData=function(e,r,n){n=n||[];var i=this.getAxis();return n[0]=i.coordToData(i.toLocalCoord(e[i.orient==="horizontal"?0:1])),n},t.prototype.dataToPoint=function(e,r,n){var i=this.getAxis(),a=this.getRect();n=n||[];var o=i.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[o]=i.toGlobalCoord(i.dataToCoord(+e)),n[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,n},t.prototype.convertToPixel=function(e,r,n){var i=XN(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=XN(r);return i===this?this.pointToData(n):null},t}();function XN(t){var e=t.seriesModel,r=t.singleAxisModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function _he(t,e){var r=[];return t.eachComponent("singleAxis",function(n,i){var a=new yhe(n,t,e);a.name="single_"+i,a.resize(n,e),n.coordinateSystem=a,r.push(a)}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",Dt).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var xhe={create:_he,dimensions:yH},qN=["x","y"],She=["width","height"],whe=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=_S(l,1-Uy(s)),c=l.dataToPoint(n)[0],f=a.get("type");if(f&&f!=="none"){var h=gL(a),v=bhe[f](s,c,u);v.style=h,r.graphicKey=v.type,r.pointer=v}var p=DT(i);fH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=DT(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=mL(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=Uy(o),u=_S(s,l),c=[r.x,r.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=_S(s,1-l),h=(f[1]+f[0])/2,v=[h,h];return v[l]=c[l],{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:v,tooltipOption:{verticalAlign:"middle"}}},e}(pL),bhe={line:function(t,e,r){var n=yL([e,r[0]],[e,r[1]],Uy(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=t.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:hH([e-n/2,r[0]],[n,i],Uy(t))}}};function Uy(t){return t.isHorizontal()?0:1}function _S(t,e){var r=t.getRect();return[r[qN[e]],r[qN[e]]+r[She[e]]]}var The=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="single",e}(mt);function Che(t){Oe(Gd),uu.registerAxisPointerClass("SingleAxisPointer",whe),t.registerComponentView(The),t.registerComponentView(phe),t.registerComponentModel(ym),Jc(t,"single",ym,ym.defaultOption),t.registerCoordinateSystem("single",xhe)}var Mhe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n,i){var a=ou(r);t.prototype.init.apply(this,arguments),KN(r,a)},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),KN(this.option,r)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:X.color.axisLine,width:1,type:"solid"}},itemStyle:{color:X.color.neutral00,borderWidth:1,borderColor:X.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:X.size.s,color:X.color.secondary},monthLabel:{show:!0,position:"start",margin:X.size.s,align:"center",formatter:null,color:X.color.secondary},yearLabel:{show:!0,position:null,margin:X.size.xl,formatter:null,color:X.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Be);function KN(t,e){var r=t.cellSize,n;ee(r)?n=r:n=t.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=re([0,1],function(a){return YK(e,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});_a(t,e,{type:"box",ignoreSize:i})}var Lhe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},e.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToCalendarLayout([u],!1).tl,f=new ze({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(f)}},e.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,h=0;f.time<=n.end.time;h++){p(f.formatedDate),h===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var v=f.date;v.setMonth(v.getMonth()+1),f=s.getDateInfo(v)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToCalendarLayout([g],!1).tl);var m=o._getLinePointsOfOneWeek(r,g,i);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},e.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},e.prototype._drawSplitline=function(r,n,i){var a=new br({z2:20,shape:{points:r},style:n});i.add(a)},e.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(r,n){return se(r)&&r?jK(r,n):me(r)?r(n):n.nameMap},e.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,h=i==="horizontal"?0:1,v={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var g=o.get("formatter"),m={start:n.start.y,end:n.end.y,nameMap:p},y=this._formatterLabel(g,m),x=new Xe({z2:30,style:pt(o,{text:y}),silent:o.get("silent")});x.attr(this._yearTextPositionControl(x,v[l],i,l,s)),a.add(x)}},e.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],c=r[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||se(s))&&(s&&(n=Cb(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,v=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",g=o.get("silent"),m=0;m=a.start.time&&i.times.end.time&&r.reverse(),r},t.prototype._getRangeInfo=function(e){var r=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/xS)-Math.floor(r[0].time/xS)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+r[0].day+6)/7),f=n?-c+1:c-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:c,nthWeek:f,fweek:r[0].day,lweek:r[1].day}},t.prototype._getDateByWeeksAndDay=function(e,r,n){var i=this._getRangeInfo(n);if(e>i.weeks||e===0&&ri.lweek)return null;var a=(e-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},t.create=function(e,r){var n=[];return e.eachComponent("calendar",function(i){var a=new t(i,e,r);n.push(a),i.coordinateSystem=a}),e.eachComponent(function(i,a){Rd({targetModel:a,coordSysType:"calendar",coordSysProvider:zV})}),n},t.dimensions=["time","value"],t}();function SS(t){var e=t.calendarModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}function Phe(t){t.registerComponentModel(Mhe),t.registerComponentView(Lhe),t.registerCoordinateSystem("calendar",Ahe)}var Ba={level:1,leaf:2,nonLeaf:3},Ja={none:0,all:1,body:2,corner:3};function kT(t,e,r){var n=e[ke[r]].getCell(t);return!n&&qe(t)&&t<0&&(n=e[ke[1-r]].getUnitLayoutInfo(r,Math.round(t))),n}function _H(t){var e=t||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function xH(t,e,r,n,i){QN(t[0],e,i,r,n,0),QN(t[1],e,i,r,n,1)}function QN(t,e,r,n,i,a){t[0]=1/0,t[1]=-1/0;var o=n[a],s=ee(o)?o:[o],l=s.length,u=!!r;if(l>=1?(JN(t,e,s,u,i,a,0),l>1&&JN(t,e,s,u,i,a,l-1)):t[0]=t[1]=NaN,u){var c=-i[ke[1-a]].getLocatorCount(a),f=i[ke[a]].getLocatorCount(a)-1;r===Ja.body?c=Gt(0,c):r===Ja.corner&&(f=kn(-1,f)),f=e[0]&&t[0]<=e[1]}function rO(t,e){t.id.set(e[0][0],e[1][0]),t.span.set(e[0][1]-t.id.x+1,e[1][1]-t.id.y+1)}function Ihe(t,e){t[0][0]=e[0][0],t[0][1]=e[0][1],t[1][0]=e[1][0],t[1][1]=e[1][1]}function nO(t,e,r,n){var i=kT(e[n][0],r,n),a=kT(e[n][1],r,n);t[ke[n]]=t[qt[n]]=NaN,i&&a&&(t[ke[n]]=i.xy,t[qt[n]]=a.xy+a.wh-i.xy)}function wh(t,e,r,n){return t[ke[e]]=r,t[ke[1-e]]=n,t}function Ehe(t){return t&&(t.type===Ba.leaf||t.type===Ba.nonLeaf)?t:null}function Zy(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var iO=function(){function t(e,r){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=r,this._uniqueValueGen=Rhe(e);var n=r.get("data",!0);n!=null&&!ee(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return t.prototype._initByDimModelData=function(e){var r=this,n=r._cells,i=r._levels,a=[],o=0;r._leavesCount=s(e,0,0),l();return;function s(u,c,f){var h=0;return u&&N(u,function(v,p){var g;se(v)?g={value:v}:we(v)?(g=v,v.value!=null&&!se(v.value)&&(g={value:null})):g={value:null};var m={type:Ba.nonLeaf,ordinal:NaN,level:f,firstLeafLocator:c,id:new Te,span:wh(new Te,r.dimIdx,1,1),option:g,xy:NaN,wh:NaN,dim:r,rect:Zy()};o++,(a[c]||(a[c]=[])).push(m),i[f]||(i[f]={type:Ba.level,xy:NaN,wh:NaN,option:null,id:new Te,dim:r});var y=s(g.children,c,f+1),x=Math.max(1,y);m.span[ke[r.dimIdx]]=x,h+=x,c+=x}),h}function l(){for(var u=[];n.length=1,S=r[ke[n]],b=a.getLocatorCount(n)-1,T=new ns;for(o.resetLayoutIterator(T,n);T.next();)C(T.item);for(a.resetLayoutIterator(T,n);T.next();)C(T.item);function C(M){Dr(M.wh)&&(M.wh=y),M.xy=S,M.id[ke[n]]===b&&!x&&(M.wh=r[ke[n]]+r[qt[n]]-M.xy),S+=M.wh}}function fO(t,e){for(var r=e[ke[t]].resetCellIterator();r.next();){var n=r.item;$y(n.rect,t,n.id,n.span,e),$y(n.rect,1-t,n.id,n.span,e),n.type===Ba.nonLeaf&&(n.xy=n.rect[ke[t]],n.wh=n.rect[qt[t]])}}function hO(t,e){t.travelExistingCells(function(r){var n=r.span;if(n){var i=r.spanRect,a=r.id;$y(i,0,a,n,e),$y(i,1,a,n,e)}})}function $y(t,e,r,n,i){t[qt[e]]=0;var a=r[ke[e]],o=a<0?i[ke[1-e]]:i[ke[e]],s=o.getUnitLayoutInfo(e,r[ke[e]]);if(t[ke[e]]=s.xy,t[qt[e]]=s.wh,n[ke[e]]>1){var l=o.getUnitLayoutInfo(e,r[ke[e]]+n[ke[e]]-1);t[qt[e]]=l.xy+l.wh-s.xy}}function $he(t,e,r){var n=oy(t,r[qt[e]]);return ET(n,r[qt[e]])}function ET(t,e){return Math.max(Math.min(t,pe(e,1/0)),0)}function TS(t){var e=t.matrixModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}var Ar={inBody:1,inCorner:2,outside:3},Xi={x:null,y:null,point:[]};function vO(t,e,r,n,i){var a=r[ke[e]],o=r[ke[1-e]],s=a.getUnitLayoutInfo(e,a.getLocatorCount(e)-1),l=a.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),c=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,f=t.point[e]=n[e];if(!l&&!c){t[ke[e]]=Ar.outside;return}if(i===Ja.body){l?(t[ke[e]]=Ar.inBody,f=kn(s.xy+s.wh,Gt(l.xy,f)),t.point[e]=f):t[ke[e]]=Ar.outside;return}else if(i===Ja.corner){c?(t[ke[e]]=Ar.inCorner,f=kn(c.xy+c.wh,Gt(u.xy,f)),t.point[e]=f):t[ke[e]]=Ar.outside;return}var h=l?l.xy:c?c.xy+c.wh:NaN,v=u?u.xy:h,p=s?s.xy+s.wh:h;if(fp){if(!i){t[ke[e]]=Ar.outside;return}f=p}t.point[e]=f,t[ke[e]]=h<=f&&f<=p?Ar.inBody:v<=f&&f<=h?Ar.inCorner:Ar.outside}function dO(t,e,r,n){var i=1-r;if(t[ke[r]]!==Ar.outside)for(n[ke[r]].resetCellIterator(bS);bS.next();){var a=bS.item;if(gO(t.point[r],a.rect,r)&&gO(t.point[i],a.rect,i)){e[r]=a.ordinal,e[i]=a.id[ke[i]];return}}}function pO(t,e,r,n){if(t[ke[r]]!==Ar.outside){var i=t[ke[r]]===Ar.inCorner?n[ke[1-r]]:n[ke[r]];for(i.resetLayoutIterator(Ig,r);Ig.next();)if(Yhe(t.point[r],Ig.item)){e[r]=Ig.item.id[ke[r]];return}}}function Yhe(t,e){return e.xy<=t&&t<=e.xy+e.wh}function gO(t,e,r){return e[ke[r]]<=t&&t<=e[ke[r]]+e[qt[r]]}function Xhe(t){t.registerComponentModel(Bhe),t.registerComponentView(Hhe),t.registerCoordinateSystem("matrix",Zhe)}function qhe(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function mO(t,e){var r;return N(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function Khe(t,e,r){var n=J({},r),i=t[e],a=r.$action||"merge";a==="merge"?i?(Re(i,n,!0),_a(i,n,{ignoreSize:!0}),GV(r,i),Eg(r,i),Eg(r,i,"shape"),Eg(r,i,"style"),Eg(r,i,"extra"),r.clipPath=i.clipPath):t[e]=n:a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var wH=["transition","enterFrom","leaveTo"],Qhe=wH.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Eg(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?wH:Qhe,i=0;i=0;c--){var f=i[c],h=rr(f.id,null),v=h!=null?o.get(h):null;if(v){var p=v.parent,y=$n(p),x=p===a?{width:s,height:l}:{width:y.width,height:y.height},S={},b=H0(v,f,x,null,{hv:f.hv,boundingMode:f.bounding},S);if(!$n(v).isNew&&b){for(var T=f.transition,C={},M=0;M=0)?C[D]=I:v[D]=I}Qe(v,C,r,0)}else v.attr(S)}}},e.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){_m(i,$n(i).option,n,r._lastGraphicModel)}),this._elMap=ve()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(mt);function RT(t){var e=fe(yO,t)?yO[t]:$v(t),r=new e({});return $n(r).type=t,r}function _O(t,e,r,n){var i=RT(r);return e.add(i),n.set(t,i),$n(i).id=t,$n(i).isNew=!0,i}function _m(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){_m(a,e,r,n)}),a_(t,e,n),r.removeKey($n(t).id))}function xO(t,e,r,n){t.isGroup||N([["cursor",si.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];fe(e,a)?t[a]=pe(e[a],i[1]):t[a]==null&&(t[a]=i[1])}),N(Ue(e),function(i){if(i.indexOf("on")===0){var a=e[i];t[i]=me(a)?a:null}}),fe(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function rve(t){return t=J({},t),N(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(BV),function(e){delete t[e]}),t}function nve(t,e,r){var n=Ae(t).eventData;!t.silent&&!t.ignore&&!n&&(n=Ae(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=r.info)}function ive(t){t.registerComponentModel(eve),t.registerComponentView(tve),t.registerPreprocessor(function(e){var r=e.graphic;ee(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}var SO=["x","y","radius","angle","single"],ave=["cartesian2d","polar","singleAxis"];function ove(t){var e=t.get("coordinateSystem");return Ee(ave,e)>=0}function Uo(t){return t+"Axis"}function sve(t,e){var r=ve(),n=[],i=ve();t.eachComponent({mainType:"dataZoom",query:e},function(c){i.get(c.uid)||s(c)});var a;do a=!1,t.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,v){var p=r.get(h);p&&p[v]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(r.get(f)||r.set(f,[]))[h]=!0})}return n}function bH(t){var e=t.ecModel,r={infoList:[],infoMap:ve()};return t.eachTargetAxis(function(n,i){var a=e.getComponent(Uo(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var CS=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},t}(),hd=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return e.prototype.init=function(r,n,i){var a=wO(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},e.prototype.mergeOption=function(r){var n=wO(r);Re(this.option,r,!0),Re(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;N([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=ve(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return N(SO,function(i){var a=this.getReferringComponents(Uo(i),CX);if(a.specified){n=!0;var o=new CS;N(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new CS;if(h.add(f.componentIndex),r.set(c,h),a=!1,c==="x"||c==="y"){var v=f.getReferringComponents("grid",Dt).models[0];v&&N(u,function(p){f.componentIndex!==p.componentIndex&&v===p.getReferringComponents("grid",Dt).models[0]&&h.add(p.componentIndex)})}}}a&&N(SO,function(u){if(a){var c=i.findComponents({mainType:Uo(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new CS;f.add(c[0].componentIndex),r.set(u,f),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");N([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(Uo(n),i))},this),r},e.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){N(i.indexList,function(o){r.call(n,a,o)})})},e.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(r,n){var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(Uo(r),n)},e.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;N([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},e.prototype.setCalculatedRange=function(r){var n=this.option;N(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},e.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},e.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(S&&!b&&!T)return!0;S&&(m=!0),b&&(p=!0),T&&(g=!0)}return m&&p&&g})}else ec(c,function(v){if(a==="empty")l.setData(u=u.map(v,function(g){return s(g)?g:NaN}));else{var p={};p[v]=o,u.selectRange(p)}});ec(c,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},t.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;ec(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=it(n[0]+o,n,[0,100],!0):a!=null&&(o=it(a,[0,100],n,!0)-n[0]),e[i+"Span"]=a,e[i+"ValueSpan"]=o},this)},t.prototype._setAxisModel=function(){var e=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=v2(n,[0,500]);i=Math.min(i,20);var a=e.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},t}();function fve(t,e,r){var n=[1/0,-1/0];ec(r,function(o){Pte(n,o.getData(),e)});var i=t.getAxisModel(),a=wj(i.axis.scale,i,n).calculate();return[a.min,a.max]}var hve={getTargetSeries:function(t){function e(i){t.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=t.getComponent(Uo(o),s);i(o,s,l,a)})})}e(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];e(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new cve(i,a,s,t),r.push(o.__dzAxisProxy))});var n=ve();return N(r,function(i){N(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(t,e){t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,e)})}),t.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function vve(t){t.registerAction("dataZoom",function(e,r){var n=sve(r,e);N(n,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var TO=!1;function CL(t){TO||(TO=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,hve),vve(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function dve(t){t.registerComponentModel(lve),t.registerComponentView(uve),CL(t)}var Kn=function(){function t(){}return t}(),TH={};function tc(t,e){TH[t]=e}function CH(t){return TH[t]}var pve=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;N(this.option.feature,function(n,i){var a=CH(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),Re(n,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:X.color.border,borderRadius:0,borderWidth:0,padding:X.size.m,itemSize:15,itemGap:X.size.s,showTitle:!0,iconStyle:{borderColor:X.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:X.color.accent50}},tooltip:{show:!1,position:"bottom"}},e}(Be);function MH(t,e){var r=_f(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var i=new ze({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var gve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},c=this._features||(this._features={}),f=[];N(u,function(x,S){f.push(S)}),new lo(this._featureNames||[],f).add(h).update(h).remove(Ie(h,null)).execute(),this._featureNames=f;function h(x,S){var b=f[x],T=f[S],C=u[b],M=new Ge(C,r,r.ecModel),D;if(a&&a.newTitle!=null&&a.featureName===b&&(C.title=a.newTitle),b&&!T){if(mve(b))D={onclick:M.option.onclick,featureName:b};else{var I=CH(b);if(!I)return;D=new I}c[b]=D}else if(D=c[T],!D)return;D.uid=yf("toolbox-feature"),D.model=M,D.ecModel=n,D.api=i;var k=D instanceof Kn;if(!b&&T){k&&D.dispose&&D.dispose(n,i);return}if(!M.get("show")||k&&D.unusable){k&&D.remove&&D.remove(n,i);return}v(M,D,b),M.setIconStatus=function(E,z){var O=this.option,F=this.iconPaths;O.iconStatus=O.iconStatus||{},O.iconStatus[E]=z,F[E]&&(z==="emphasis"?oo:so)(F[E])},D instanceof Kn&&D.render&&D.render(M,n,i,a)}function v(x,S,b){var T=x.getModel("iconStyle"),C=x.getModel(["emphasis","iconStyle"]),M=S instanceof Kn&&S.getIcons?S.getIcons():x.get("icon"),D=x.get("title")||{},I,k;se(M)?(I={},I[b]=M):I=M,se(D)?(k={},k[b]=D):k=D;var E=x.iconPaths={};N(I,function(z,O){var F=gf(z,{},{x:-s/2,y:-s/2,width:s,height:s});F.setStyle(T.getItemStyle());var G=F.ensureState("emphasis");G.style=C.getItemStyle();var j=new Xe({style:{text:k[O],align:C.get("textAlign"),borderRadius:C.get("textBorderRadius"),padding:C.get("textPadding"),fill:null,font:O2({fontStyle:C.get("textFontStyle"),fontFamily:C.get("textFontFamily"),fontSize:C.get("textFontSize"),fontWeight:C.get("textFontWeight")},n)},ignore:!0});F.setTextContent(j),go({el:F,componentModel:r,itemName:O,formatterParamsExtra:{title:k[O]}}),F.__title=k[O],F.on("mouseover",function(){var Z=C.getItemStyle(),V=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";j.setStyle({fill:C.get("textFill")||Z.fill||Z.stroke||X.color.neutral99,backgroundColor:C.get("textBackgroundColor")}),F.setTextConfig({position:C.get("textPosition")||V}),j.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){x.get(["iconStatus",O])!=="emphasis"&&i.leaveEmphasis(this),j.hide()}),(x.get(["iconStatus",O])==="emphasis"?oo:so)(F),o.add(F),F.on("click",le(S.onclick,S,n,i,O)),E[O]=F})}var p=or(r,i).refContainer,g=r.getBoxLayoutParams(),m=r.get("padding"),y=wt(g,p,m);kl(r.get("orient"),o,r.get("itemGap"),y.width,y.height),H0(o,g,p,m),o.add(MH(o.getBoundingRect(),r)),l||o.eachChild(function(x){var S=x.__title,b=x.ensureState("emphasis"),T=b.textConfig||(b.textConfig={}),C=x.getTextContent(),M=C&&C.ensureState("emphasis");if(M&&!me(M)&&S){var D=M.style||(M.style={}),I=P0(S,Xe.makeFont(D)),k=x.x+o.x,E=x.y+o.y+s,z=!1;E+I.height>i.getHeight()&&(T.position="top",z=!0);var O=z?-5-I.height:s+10;k+I.width/2>i.getWidth()?(T.position=["100%",O],D.align="right"):k-I.width/2<0&&(T.position=[0,O],D.align="left")}})},e.prototype.updateView=function(r,n,i,a){N(this._features,function(o){o instanceof Kn&&o.updateView&&o.updateView(o.model,n,i,a)})},e.prototype.remove=function(r,n){N(this._features,function(i){i instanceof Kn&&i.remove&&i.remove(r,n)}),this.group.removeAll()},e.prototype.dispose=function(r,n){N(this._features,function(i){i instanceof Kn&&i.dispose&&i.dispose(r,n)})},e.type="toolbox",e}(mt);function mve(t){return t.indexOf("my")===0}var yve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||X.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=We.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),v=h[0].indexOf("base64")>-1,p=o?decodeURIComponent(h[1]):h[1];v&&(p=window.atob(p));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=p.length,y=new Uint8Array(m);m--;)y[m]=p.charCodeAt(m);var x=new Blob([y]);window.navigator.msSaveOrOpenBlob(x,g)}else{var S=document.createElement("iframe");document.body.appendChild(S);var b=S.contentWindow,T=b.document;T.open("image/svg+xml","replace"),T.write(p),T.close(),b.focus(),T.execCommand("SaveAs",!0,g),document.body.removeChild(S)}}else{var C=i.get("lang"),M='',D=window.open();D.document.write(M),D.document.title=a}},e.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:X.color.neutral00,name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(Kn),CO="__ec_magicType_stack__",_ve=[["line","bar"],["stack"]],xve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return N(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},e.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(MO[i]){var s={series:[]},l=function(f){var h=f.subType,v=f.id,p=MO[i](h,v,f,a);p&&(Se(p,f.option),s.series.push(p));var g=f.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var m=g.getAxesByScale("ordinal")[0];if(m){var y=m.dim,x=y+"Axis",S=f.getReferringComponents(x,Dt).models[0],b=S.componentIndex;s[x]=s[x]||[];for(var T=0;T<=b;T++)s[x][b]=s[x][b]||{};s[x][b].boundaryGap=i==="bar"}}};N(_ve,function(f){Ee(f,i)>=0&&N(f,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=Re({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Kn),MO={line:function(t,e,r,n){if(t==="bar")return Re({id:e,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(t,e,r,n){if(t==="line")return Re({id:e,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(t,e,r,n){var i=r.get("stack")===CO;if(t==="line"||t==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Re({id:e,stack:i?"":CO},n.get(["option","stack"])||{},!0)}};Oi({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var o_=new Array(60).join("-"),nf=" ";function Sve(t){var e={},r=[],n=[];return t.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:e,other:r,meta:n}}function wve(t){var e=[];return N(t,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(re(r.series,function(v){return v.name})),l=[i.model.getCategories()];N(r.series,function(v){var p=v.getRawData();l.push(v.getRawData().mapArray(p.mapDimension(o),function(g){return g}))});for(var u=[s.join(nf)],c=0;c=0)return!0}var NT=new RegExp("["+nf+"]+","g");function Mve(t){for(var e=t.split(/\n+/g),r=Yy(e.shift()).split(NT),n=[],i=re(r,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(e)}function Ive(t){var e=ML(t),r=e[e.length-1];e.length>1&&e.pop();var n={};return LH(r,function(i,a){for(var o=e.length-1;o>=0;o--)if(i=e[o][a],i){n[a]=i;break}}),n}function Eve(t){AH(t).snapshots=null}function Rve(t){return ML(t).length}function ML(t){var e=AH(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var Nve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){Eve(r),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},e}(Kn);Oi({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var Ove=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],LL=function(){function t(e,r,n){var i=this;this._targetInfoList=[];var a=LO(r,e);N(zve,function(o,s){(!n||!n.include||Ee(n.include,s)>=0)&&o(a,i._targetInfoList)})}return t.prototype.setOutputRanges=function(e,r){return this.matchOutputRanges(e,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=MS[n.brushType](0,a,i);n.__rangeOffset={offset:kO[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},t.prototype.matchOutputRanges=function(e,r,n){N(e,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&N(a.coordSyses,function(o){var s=MS[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},t.prototype.setInputRanges=function(e,r){N(e,function(n){var i=this.findTargetInfo(n,r);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=MS[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?kO[n.brushType](a.values,o.offset,Bve(a.xyMinMax,o.xyMinMax)):a.values}},this)},t.prototype.makePanelOpts=function(e,r){return re(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:E6(i),isTargetByCursor:N6(i,e,n.coordSysModel),getLinearBrushOtherExtent:R6(i)}})},t.prototype.controlSeries=function(e,r,n){var i=this.findTargetInfo(e,n);return i===!0||i&&Ee(i.coordSyses,r.coordinateSystem)>=0},t.prototype.findTargetInfo=function(e,r){for(var n=this._targetInfoList,i=LO(r,e),a=0;at[1]&&t.reverse(),t}function LO(t,e){return Pc(t,e,{includeMainTypes:Ove})}var zve={grid:function(t,e){var r=t.xAxisModels,n=t.yAxisModels,i=t.gridModels,a=ve(),o={},s={};!r&&!n&&!i||(N(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),N(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),N(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];N(u.getCartesians(),function(f,h){(Ee(r,f.getAxis("x").model)>=0||Ee(n,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:PO.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){N(t.geoModels,function(r){var n=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:PO.geo})})}},AO=[function(t,e){var r=t.xAxisModel,n=t.yAxisModel,i=t.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}],PO={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(is(t)),e}},MS={lineX:Ie(DO,0),lineY:Ie(DO,1),rect:function(t,e,r,n){var i=t?e.pointToData([r[0][0],r[1][0]],n):e.dataToPoint([r[0][0],r[1][0]],n),a=t?e.pointToData([r[0][1],r[1][1]],n):e.dataToPoint([r[0][1],r[1][1]],n),o=[OT([i[0],a[0]]),OT([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=re(r,function(o){var s=t?e.pointToData(o,n):e.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function DO(t,e,r,n){var i=r.getAxis(["x","y"][t]),a=OT(re([0,1],function(s){return e?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[t]=a,o[1-t]=[NaN,NaN],{values:a,xyMinMax:o}}var kO={lineX:Ie(IO,0),lineY:Ie(IO,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,e,r){return re(t,function(n,i){return[n[0]-r[0]*e[i][0],n[1]-r[1]*e[i][1]]})}};function IO(t,e,r,n){return[e[0]-n[t]*r[0],e[1]-n[t]*r[1]]}function Bve(t,e){var r=EO(t),n=EO(e),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function EO(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var zT=N,Vve=xX("toolbox-dataZoom_"),Fve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new QM(i.getZr()),this._brushController.on("brush",le(this._onBrush,this)).mount()),Hve(r,n,this,a,i),jve(r,n)},e.prototype.onclick=function(r,n,i){Gve[i].call(this)},e.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new LL(AL(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),kve(a,i),this._dispatchZoomAction(i);function s(u,c,f){var h=c.getAxis(u),v=h.model,p=l(u,v,a),g=p.findRepresentativeAxisProxy(v).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(f=ds(0,f.slice(),h.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var p=v.getAxisModel(u,c.componentIndex);p&&(h=v)}),h}},e.prototype._dispatchZoomAction=function(r){var n=[];zT(r,function(i,a){n.push(ye(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:X.color.backgroundTint}};return n},e}(Kn),Gve={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Ive(this.ecModel))}};function AL(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function jve(t,e){t.setIconStatus("back",Rve(e)>1?"emphasis":"normal")}function Hve(t,e,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var o=new LL(AL(t),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()}:!1)}tQ("dataZoom",function(t){var e=t.getComponent("toolbox",0),r=["feature","dataZoom"];if(!e||e.get(r)==null)return;var n=e.getModel(r),i=[],a=AL(n),o=Pc(t,a);zT(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),zT(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:Vve+u+f};h[c]=f,i.push(h)}return i});function Wve(t){t.registerComponentModel(pve),t.registerComponentView(gve),tc("saveAsImage",yve),tc("magicType",xve),tc("dataView",Pve),tc("dataZoom",Fve),tc("restore",Nve),Oe(dve)}var Uve=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:X.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:X.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:X.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:X.color.tertiary,fontSize:14}},e}(Be);function PH(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function DH(t){if(We.domSupported){for(var e=document.documentElement.style,r=0,n=t.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+i,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),v=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-f)/2)*100)/100;s+=";"+a+":-"+v+"px";var p=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'
'}function Qve(t,e,r){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return r&&(i=" "+t/2+"s "+n,a="opacity"+i+",visibility"+i),e||(i=" "+t+"s "+n,a+=(a.length?",":"")+(We.transformSupported?""+PL+i:",left"+i+",top"+i)),Yve+":"+a}function RO(t,e,r){var n=t.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!We.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=We.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+PL+":"+o+";":[["top",0],["left",0],[kH,o]]}function Jve(t){var e=[],r=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont());var i=pe(t.get("lineHeight"),Math.round(r*3/2));r&&e.push("line-height:"+i+"px");var a=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return a&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),N(["decoration","align"],function(u){var c=t.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function ede(t,e,r,n){var i=[],a=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.get("shadowBlur"),l=t.get("shadowColor"),u=t.get("shadowOffsetX"),c=t.get("shadowOffsetY"),f=t.getModel("textStyle"),h=xF(t,"html"),v=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+v),e&&a>0&&i.push(Qve(a,r,n)),o&&i.push("background-color:"+o),N(["width","color","radius"],function(p){var g="border-"+p,m=X2(g),y=t.get(m);y!=null&&i.push(g+":"+y+(p==="color"?"":"px"))}),i.push(Jve(f)),h!=null&&i.push("padding:"+_f(h).join("px ")+"px"),i.join(";")+";"}function NO(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&V$(t,o,r,n,i)}else{t[0]=n,t[1]=i;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var tde=function(){function t(e,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,We.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=r.appendTo,o=a&&(se(a)?document.querySelector(a):Gl(a)?a:me(a)&&a(e.getDom()));NO(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();Wn(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){if(!this._container){var r=this._api.getDom(),n=$ve(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=Xve+ede(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+RO(a[0],a[1],!0)+("border-color:"+Yl(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(se(a)&&n.get("trigger")==="item"&&!PH(n)&&(s=Kve(n,i,a)),se(e))o.innerHTML=e+s;else if(e){o.innerHTML="",ee(e)||(e=[e]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||We.node||!i.getDom())){var o=BO(a,i);this._ticket="";var s=a.dataByCoordSys,l=lde(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=nde;c.x=a.x,c.y=a.y,c.update(),Ae(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var f=dH(a,n),h=f.point[0],v=f.point[1];h!=null&&v!=null&&this._tryShow({offsetX:h,offsetY:v,target:f.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(BO(a,i))},e.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),f=Th([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=Ae(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;wl(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(Ae(c).dataIndex!=null?l=c:Ae(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(r,l,n):u?this._showComponentItemTooltip(r,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=le(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Th([n.tooltipOption],a),l=this._renderMode,u=[],c=Kt("section",{blocks:[],noHeader:!0}),f=[],h=new s1;N(r,function(x){N(x.dataByAxis,function(S){var b=i.getComponent(S.axisDim+"Axis",S.axisIndex),T=S.value;if(!(!b||T==null)){var C=cH(T,b.axis,i,S.seriesDataIndices,S.valueLabelOpt),M=Kt("section",{header:C,noHeader:!Mn(C),sortBlocks:!0,blocks:[]});c.blocks.push(M),N(S.seriesDataIndices,function(D){var I=i.getSeriesByIndex(D.seriesIndex),k=D.dataIndexInside,E=I.getDataParams(k);if(!(E.dataIndex<0)){E.axisDim=S.axisDim,E.axisIndex=S.axisIndex,E.axisType=S.axisType,E.axisId=S.axisId,E.axisValue=Cy(b.axis,{value:T}),E.axisValueLabel=C,E.marker=h.makeTooltipMarker("item",Yl(E.color),l);var z=eI(I.formatTooltip(k,!0,null)),O=z.frag;if(O){var F=Th([I],a).get("valueFormatter");M.blocks.push(F?J({valueFormatter:F},O):O)}z.text&&f.push(z.text),u.push(E)}})}})}),c.blocks.reverse(),f.reverse();var v=n.position,p=s.get("order"),g=oI(c,h,l,p,i.get("useUTC"),s.get("textStyle"));g&&f.unshift(g);var m=l==="richText"?` +*`,"g")),n={series:[]};return N(r,function(i,a){if(Cve(i)){var o=Mve(i),s=e[a],l=s.axisDim+"Axis";s&&(n[l]=n[l]||[],n[l][s.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else{var o=Lve(i);n.series.push(o)}}),n}var Pve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var i=n.getDom(),a=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=a.get("backgroundColor")||X.color.neutral00;var s=document.createElement("h4"),l=a.get("lang")||[];s.innerHTML=l[0]||a.get("title"),s.style.cssText="margin:10px 20px",s.style.color=a.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var f=a.get("optionToContent"),h=a.get("contentToOption"),v=Tve(r);if(me(f)){var p=f(n.getOption());se(p)?u.innerHTML=p:jl(p)&&u.appendChild(p)}else{c.readOnly=a.get("readOnly");var g=c.style;g.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",g.color=a.get("textColor"),g.borderColor=a.get("textareaBorderColor"),g.backgroundColor=a.get("textareaColor"),c.value=v.value,u.appendChild(c)}var m=v.meta,y=document.createElement("div");y.style.cssText="position:absolute;bottom:5px;left:0;right:0";var x="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",S=document.createElement("div"),b=document.createElement("div");x+=";background-color:"+a.get("buttonColor"),x+=";color:"+a.get("buttonTextColor");var T=this;function C(){i.removeChild(o),T._dom=null}Uw(S,"click",C),Uw(b,"click",function(){if(h==null&&f!=null||h!=null&&f==null){C();return}var M;try{me(h)?M=h(u,n.getOption()):M=Ave(c.value,m)}catch(D){throw C(),new Error("Data view format error "+D)}M&&n.dispatchAction({type:"changeDataView",newOption:M}),C()}),S.innerHTML=l[1],b.innerHTML=l[2],b.style.cssText=S.style.cssText=x,!a.get("readOnly")&&y.appendChild(b),y.appendChild(S),o.appendChild(s),o.appendChild(u),o.appendChild(y),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},e.prototype.remove=function(r,n){this._dom&&n.getDom().removeChild(this._dom)},e.prototype.dispose=function(r,n){this.remove(r,n)},e.getDefaultOption=function(r){var n={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:r.getLocaleModel().get(["toolbox","dataView","title"]),lang:r.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:X.color.background,textColor:X.color.primary,textareaColor:X.color.background,textareaBorderColor:X.color.border,buttonColor:X.color.accent50,buttonTextColor:X.color.neutral00};return n},e}(Kn);function Dve(t,e){return re(t,function(r,n){var i=e&&e[n];if(we(i)&&!ee(i)){var a=we(r)&&!ee(r);a||(r={value:r});var o=i.name!=null&&r.name==null;return r=Se(r,i),o&&delete r.name,r}else return r})}Oi({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var r=[];N(t.newOption.series,function(n){var i=e.getSeriesByName(n.name)[0];if(!i)r.push(J({type:"scatter"},n));else{var a=i.get("data");r.push({name:n.name,data:Dve(n.data,a)})}}),e.mergeOption(Se({series:r},t.newOption))});var LH=N,AH=Ve();function kve(t,e){var r=ML(t);LH(e,function(n,i){for(var a=r.length-1;a>=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(e)}function Ive(t){var e=ML(t),r=e[e.length-1];e.length>1&&e.pop();var n={};return LH(r,function(i,a){for(var o=e.length-1;o>=0;o--)if(i=e[o][a],i){n[a]=i;break}}),n}function Eve(t){AH(t).snapshots=null}function Rve(t){return ML(t).length}function ML(t){var e=AH(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var Nve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){Eve(r),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},e}(Kn);Oi({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var Ove=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],LL=function(){function t(e,r,n){var i=this;this._targetInfoList=[];var a=LO(r,e);N(zve,function(o,s){(!n||!n.include||Ee(n.include,s)>=0)&&o(a,i._targetInfoList)})}return t.prototype.setOutputRanges=function(e,r){return this.matchOutputRanges(e,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=MS[n.brushType](0,a,i);n.__rangeOffset={offset:kO[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},t.prototype.matchOutputRanges=function(e,r,n){N(e,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&N(a.coordSyses,function(o){var s=MS[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},t.prototype.setInputRanges=function(e,r){N(e,function(n){var i=this.findTargetInfo(n,r);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=MS[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?kO[n.brushType](a.values,o.offset,Bve(a.xyMinMax,o.xyMinMax)):a.values}},this)},t.prototype.makePanelOpts=function(e,r){return re(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:E6(i),isTargetByCursor:N6(i,e,n.coordSysModel),getLinearBrushOtherExtent:R6(i)}})},t.prototype.controlSeries=function(e,r,n){var i=this.findTargetInfo(e,n);return i===!0||i&&Ee(i.coordSyses,r.coordinateSystem)>=0},t.prototype.findTargetInfo=function(e,r){for(var n=this._targetInfoList,i=LO(r,e),a=0;at[1]&&t.reverse(),t}function LO(t,e){return Pc(t,e,{includeMainTypes:Ove})}var zve={grid:function(t,e){var r=t.xAxisModels,n=t.yAxisModels,i=t.gridModels,a=ve(),o={},s={};!r&&!n&&!i||(N(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),N(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),N(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];N(u.getCartesians(),function(f,h){(Ee(r,f.getAxis("x").model)>=0||Ee(n,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:PO.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){N(t.geoModels,function(r){var n=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:PO.geo})})}},AO=[function(t,e){var r=t.xAxisModel,n=t.yAxisModel,i=t.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}],PO={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(as(t)),e}},MS={lineX:Ie(DO,0),lineY:Ie(DO,1),rect:function(t,e,r,n){var i=t?e.pointToData([r[0][0],r[1][0]],n):e.dataToPoint([r[0][0],r[1][0]],n),a=t?e.pointToData([r[0][1],r[1][1]],n):e.dataToPoint([r[0][1],r[1][1]],n),o=[OT([i[0],a[0]]),OT([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=re(r,function(o){var s=t?e.pointToData(o,n):e.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function DO(t,e,r,n){var i=r.getAxis(["x","y"][t]),a=OT(re([0,1],function(s){return e?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[t]=a,o[1-t]=[NaN,NaN],{values:a,xyMinMax:o}}var kO={lineX:Ie(IO,0),lineY:Ie(IO,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,e,r){return re(t,function(n,i){return[n[0]-r[0]*e[i][0],n[1]-r[1]*e[i][1]]})}};function IO(t,e,r,n){return[e[0]-n[t]*r[0],e[1]-n[t]*r[1]]}function Bve(t,e){var r=EO(t),n=EO(e),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function EO(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var zT=N,Vve=xX("toolbox-dataZoom_"),Fve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new QM(i.getZr()),this._brushController.on("brush",le(this._onBrush,this)).mount()),Hve(r,n,this,a,i),Gve(r,n)},e.prototype.onclick=function(r,n,i){jve[i].call(this)},e.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new LL(AL(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),kve(a,i),this._dispatchZoomAction(i);function s(u,c,f){var h=c.getAxis(u),v=h.model,p=l(u,v,a),g=p.findRepresentativeAxisProxy(v).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(f=ps(0,f.slice(),h.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var p=v.getAxisModel(u,c.componentIndex);p&&(h=v)}),h}},e.prototype._dispatchZoomAction=function(r){var n=[];zT(r,function(i,a){n.push(ye(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:X.color.backgroundTint}};return n},e}(Kn),jve={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Ive(this.ecModel))}};function AL(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function Gve(t,e){t.setIconStatus("back",Rve(e)>1?"emphasis":"normal")}function Hve(t,e,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var o=new LL(AL(t),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()}:!1)}tQ("dataZoom",function(t){var e=t.getComponent("toolbox",0),r=["feature","dataZoom"];if(!e||e.get(r)==null)return;var n=e.getModel(r),i=[],a=AL(n),o=Pc(t,a);zT(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),zT(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:Vve+u+f};h[c]=f,i.push(h)}return i});function Wve(t){t.registerComponentModel(pve),t.registerComponentView(gve),tc("saveAsImage",yve),tc("magicType",xve),tc("dataView",Pve),tc("dataZoom",Fve),tc("restore",Nve),Oe(dve)}var Uve=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:X.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:X.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:X.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:X.color.tertiary,fontSize:14}},e}(Be);function PH(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function DH(t){if(We.domSupported){for(var e=document.documentElement.style,r=0,n=t.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+i,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),v=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-f)/2)*100)/100;s+=";"+a+":-"+v+"px";var p=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'
'}function Qve(t,e,r){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return r&&(i=" "+t/2+"s "+n,a="opacity"+i+",visibility"+i),e||(i=" "+t+"s "+n,a+=(a.length?",":"")+(We.transformSupported?""+PL+i:",left"+i+",top"+i)),Yve+":"+a}function RO(t,e,r){var n=t.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!We.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=We.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+PL+":"+o+";":[["top",0],["left",0],[kH,o]]}function Jve(t){var e=[],r=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont());var i=pe(t.get("lineHeight"),Math.round(r*3/2));r&&e.push("line-height:"+i+"px");var a=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return a&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),N(["decoration","align"],function(u){var c=t.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function ede(t,e,r,n){var i=[],a=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.get("shadowBlur"),l=t.get("shadowColor"),u=t.get("shadowOffsetX"),c=t.get("shadowOffsetY"),f=t.getModel("textStyle"),h=xF(t,"html"),v=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+v),e&&a>0&&i.push(Qve(a,r,n)),o&&i.push("background-color:"+o),N(["width","color","radius"],function(p){var g="border-"+p,m=X2(g),y=t.get(m);y!=null&&i.push(g+":"+y+(p==="color"?"":"px"))}),i.push(Jve(f)),h!=null&&i.push("padding:"+_f(h).join("px ")+"px"),i.join(";")+";"}function NO(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&V$(t,o,r,n,i)}else{t[0]=n,t[1]=i;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var tde=function(){function t(e,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,We.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=r.appendTo,o=a&&(se(a)?document.querySelector(a):jl(a)?a:me(a)&&a(e.getDom()));NO(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();Wn(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){if(!this._container){var r=this._api.getDom(),n=$ve(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=Xve+ede(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+RO(a[0],a[1],!0)+("border-color:"+Yl(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(se(a)&&n.get("trigger")==="item"&&!PH(n)&&(s=Kve(n,i,a)),se(e))o.innerHTML=e+s;else if(e){o.innerHTML="",ee(e)||(e=[e]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||We.node||!i.getDom())){var o=BO(a,i);this._ticket="";var s=a.dataByCoordSys,l=lde(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=nde;c.x=a.x,c.y=a.y,c.update(),Ae(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var f=dH(a,n),h=f.point[0],v=f.point[1];h!=null&&v!=null&&this._tryShow({offsetX:h,offsetY:v,target:f.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(BO(a,i))},e.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),f=Th([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=Ae(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;bl(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(Ae(c).dataIndex!=null?l=c:Ae(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(r,l,n):u?this._showComponentItemTooltip(r,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=le(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Th([n.tooltipOption],a),l=this._renderMode,u=[],c=Kt("section",{blocks:[],noHeader:!0}),f=[],h=new s1;N(r,function(x){N(x.dataByAxis,function(S){var b=i.getComponent(S.axisDim+"Axis",S.axisIndex),T=S.value;if(!(!b||T==null)){var C=cH(T,b.axis,i,S.seriesDataIndices,S.valueLabelOpt),M=Kt("section",{header:C,noHeader:!Mn(C),sortBlocks:!0,blocks:[]});c.blocks.push(M),N(S.seriesDataIndices,function(D){var I=i.getSeriesByIndex(D.seriesIndex),k=D.dataIndexInside,E=I.getDataParams(k);if(!(E.dataIndex<0)){E.axisDim=S.axisDim,E.axisIndex=S.axisIndex,E.axisType=S.axisType,E.axisId=S.axisId,E.axisValue=Cy(b.axis,{value:T}),E.axisValueLabel=C,E.marker=h.makeTooltipMarker("item",Yl(E.color),l);var z=eI(I.formatTooltip(k,!0,null)),O=z.frag;if(O){var F=Th([I],a).get("valueFormatter");M.blocks.push(F?J({valueFormatter:F},O):O)}z.text&&f.push(z.text),u.push(E)}})}})}),c.blocks.reverse(),f.reverse();var v=n.position,p=s.get("order"),g=oI(c,h,l,p,i.get("useUTC"),s.get("textStyle"));g&&f.unshift(g);var m=l==="richText"?` -`:"
",y=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],v,null,h)})},e.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=Ae(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),v=this._renderMode,p=r.positionDefault,g=Th([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),m=g.get("trigger");if(!(m!=null&&m!=="item")){var y=u.getDataParams(c,f),x=new s1;y.marker=x.makeTooltipMarker("item",Yl(y.color),v);var S=eI(u.formatTooltip(c,!1,f)),b=g.get("order"),T=g.get("valueFormatter"),C=S.frag,M=C?oI(T?J({valueFormatter:T},C):C,x,v,b,a.get("useUTC"),g.get("textStyle")):S.text,D="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,M,y,D,r.offsetX,r.offsetY,r.position,r.target,x)}),i({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=Ae(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(se(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=ye(l),l.content=Wr(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var v=r.positionDefault,p=Th(f,this._tooltipModel,v?{position:v}:null),g=p.get("content"),m=Math.random()+"",y=new s1;this._showOrMove(p,function(){var x=ye(p.get("formatterParams")||{});this._showTooltipContent(p,g,x,m,r.offsetX,r.offsetY,r.position,n,y)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var f=this._tooltipContent;f.setEnterable(r.get("enterable"));var h=r.get("formatter");l=l||r.get("position");var v=n,p=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),g=p.color;if(h)if(se(h)){var m=r.ecModel.get("useUTC"),y=ee(i)?i[0]:i,x=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=h,x&&(v=Ed(y.axisValue,v,m)),v=q2(v,i,!0)}else if(me(h)){var S=le(function(b,T){b===this._ticket&&(f.setContent(T,c,r,g,l),this._updatePosition(r,l,o,s,f,i,u))},this);this._ticket=a,v=h(i,a,S)}else v=h;f.setContent(v,c,r,g,l),f.show(r,g),this._updatePosition(r,l,o,s,f,i,u)}},e.prototype._getNearestPoint=function(r,n,i,a,o){if(i==="axis"||ee(n))return{color:a||o};if(!ee(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var f=o.getSize(),h=r.get("align"),v=r.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),me(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:f.slice()})),ee(n))i=oe(n[0],u),a=oe(n[1],c);else if(we(n)){var g=n;g.width=f[0],g.height=f[1];var m=St(g,{width:u,height:c});i=m.x,a=m.y,h=null,v=null}else if(se(n)&&l){var y=sde(n,p,f,r.get("borderWidth"));i=y[0],a=y[1]}else{var y=ade(i,a,o,u,c,h?null:20,v?null:20);i=y[0],a=y[1]}if(h&&(i-=VO(h)?f[0]/2:h==="right"?f[0]:0),v&&(a-=VO(v)?f[1]/2:v==="bottom"?f[1]:0),PH(r)){var y=ode(i,a,o,u,c);i=y[0],a=y[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&N(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&N(u,function(h,v){var p=f[v]||{},g=h.seriesDataIndices||[],m=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&g.length===m.length,o&&N(g,function(y,x){var S=m[x];o=o&&y.seriesIndex===S.seriesIndex&&y.dataIndex===S.dataIndex}),a&&N(h.seriesDataIndices,function(y){var x=y.seriesIndex,S=n[x],b=a[x];S&&b&&b.data!==S.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,n){We.node||!n.getDom()||(Kv(this,"_updatePosition"),this._tooltipContent.dispose(),PT("itemTooltip",n))},e.type="tooltip",e}(gt);function Th(t,e,r){var n=e.ecModel,i;r?(i=new je(r,n,n),i=new je(e.option,i,n)):i=e;for(var a=t.length-1;a>=0;a--){var o=t[a];o&&(o instanceof je&&(o=o.get("tooltip",!0)),se(o)&&(o={formatter:o}),o&&(i=new je(o,i,n)))}return i}function BO(t,e){return t.dispatchAction||le(e.dispatchAction,e)}function ade(t,e,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(t+l+a+2>n?t-=l+a:t+=a),o!=null&&(e+u+o>i?e-=u+o:e+=o),[t,e]}function ode(t,e,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return t=Math.min(t+o,n)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function sde(t,e,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(t){case"inside":s=e.x+u/2-i/2,l=e.y+c/2-a/2;break;case"top":s=e.x+u/2-i/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+c+o;break;case"left":s=e.x-i-o,l=e.y+c/2-a/2;break;case"right":s=e.x+u+o,l=e.y+c/2-a/2}return[s,l]}function VO(t){return t==="center"||t==="middle"}function lde(t,e,r){var n=y2(t).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=ff(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Ae(u).tooltipConfig;if(c&&c.name===t.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function ude(t){Oe(jd),t.registerComponentModel(Uve),t.registerComponentView(ide),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Nt),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Nt)}var cde=["rect","polygon","keep","clear"];function fde(t,e){var r=pt(t?t.brush:[]);if(r.length){var n=[];N(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=t&&t.toolbox;ee(i)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),hde(s),e&&!s.length&&s.push.apply(s,cde)}}function hde(t){var e={};N(t,function(r){e[r]=1}),t.length=0,N(e,function(r,n){t.push(n)})}var FO=N;function GO(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function BT(t,e,r){var n={};return FO(e,function(a){var o=n[a]=i();FO(t[a],function(s,l){if(hr.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new hr(u),l==="opacity"&&(u=ye(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new hr(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function EH(t,e,r){var n;N(r,function(i){e.hasOwnProperty(i)&&GO(e[i])&&(n=!0)}),n&&N(r,function(i){e.hasOwnProperty(i)&&GO(e[i])?t[i]=ye(e[i]):delete t[i]})}function vde(t,e,r,n,i,a){var o={};N(t,function(f){var h=hr.prepareVisualTypes(e[f]);o[f]=h});var s;function l(f){return oM(r,s,f)}function u(f,h){DF(r,s,f,h)}r.each(c);function c(f,h){s=f;var v=r.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var p=n.call(i,f),g=e[p],m=o[p],y=0,x=m.length;ye[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&ZO(e)}};function ZO(t){return new Ce(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var Sde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new QM(n.getZr())).on("brush",le(this._onBrush,this)).mount()},e.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},e.prototype.updateTransform=function(r,n,i,a){RH(n),this._updateController(r,n,i,a)},e.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},e.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},e.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:ye(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:ye(i),$from:n})},e.type="brush",e}(gt),wde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.areas=[],r.brushOption={},r}return e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&EH(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(r){r&&(this.areas=re(r,function(n){return $O(this.option,n)},this))},e.prototype.setBrushOption=function(r){this.brushOption=$O(this.option,r),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:X.color.backgroundTint,borderColor:X.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:X.color.disabled},e}(Be);function $O(t,e){return Re({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new je(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var bde=["rect","polygon","lineX","lineY","keep","clear"],Tde=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,N(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(r,n,i){this.render(r,n,i)},e.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return N(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},e.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(r){var n={show:!0,type:bde.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return n},e}(Kn);function Cde(t){t.registerComponentView(Sde),t.registerComponentModel(wde),t.registerPreprocessor(fde),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,gde),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,r){r.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Nt),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Nt),tc("brush",Tde)}var Mde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:X.size.m,backgroundColor:X.color.transparent,borderColor:X.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:X.color.primary},subtextStyle:{fontSize:12,color:X.color.quaternary}},e}(Be),Lde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=pe(r.get("textBaseline"),r.get("textVerticalAlign")),c=new Ye({style:dt(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=r.get("subtext"),v=new Ye({style:dt(s,{text:h,fill:s.getTextColor(),y:f.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=r.get("link"),g=r.get("sublink"),m=r.get("triggerEvent",!0);c.silent=!p&&!m,v.silent=!g&&!m,p&&c.on("click",function(){dy(p,"_"+r.get("target"))}),g&&v.on("click",function(){dy(g,"_"+r.get("subtarget"))}),Ae(c).eventData=Ae(v).eventData=m?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),h&&a.add(v);var y=a.getBoundingRect(),x=r.getBoxLayoutParams();x.width=y.width,x.height=y.height;var S=or(r,i),b=St(x,S.refContainer,r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?b.x+=b.width:l==="center"&&(b.x+=b.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?b.y+=b.height:u==="middle"&&(b.y+=b.height/2),u=u||"top"),a.x=b.x,a.y=b.y,a.markRedraw();var T={align:l,verticalAlign:u};c.setStyle(T),v.setStyle(T),y=a.getBoundingRect();var C=b.margin,M=r.getItemStyle(["color","opacity"]);M.fill=r.get("backgroundColor");var D=new ze({shape:{x:y.x-C[3],y:y.y-C[0],width:y.width+C[1]+C[3],height:y.height+C[0]+C[2],r:r.get("borderRadius")},style:M,subPixelOptimize:!0,silent:!0});a.add(D)}},e.type="title",e}(gt);function Ade(t){t.registerComponentModel(Mde),t.registerComponentView(Lde)}var YO=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode="box",r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(r){this.option.autoPlay=!!r},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],N(n,function(u,c){var f=rr(cf(u),""),h;we(u)?(h=ye(u),h.value=c):h=c,o.push(h),a.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Zr([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:X.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:X.color.secondary},data:[]},e}(Be),NH=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline.slider",e.defaultOption=bs(YO.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:X.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:X.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:X.color.tertiary},itemStyle:{color:X.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:X.color.accent50,borderColor:X.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:X.color.accent50,borderColor:X.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:X.color.accent60},itemStyle:{color:X.color.accent60,borderColor:X.color.accent60},controlStyle:{color:X.color.accent70,borderColor:X.color.accent70}},progress:{lineStyle:{color:X.color.accent30},itemStyle:{color:X.color.accent40}},data:[]}),e}(YO);Bt(NH,U0.prototype);var Pde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline",e}(gt),Dde=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this,r,n,i)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(fi),AS=Math.PI,XO=Ve(),kde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.api=n},e.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Kt("nameValue",{noName:!0,value:c})},N(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=Ede(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:AS/2},f=a==="vertical"?o.height:o.width,h=r.getModel("controlStyle"),v=h.get("show",!0),p=v?h.get("itemSize"):0,g=v?h.get("itemGap"):0,m=p+g,y=r.get(["label","rotate"])||0;y=y*AS/180;var x,S,b,T=h.get("position",!0),C=v&&h.get("showPlayBtn",!0),M=v&&h.get("showPrevBtn",!0),D=v&&h.get("showNextBtn",!0),I=0,k=f;T==="left"||T==="bottom"?(C&&(x=[0,0],I+=m),M&&(S=[I,0],I+=m),D&&(b=[k-p,0],k-=m)):(C&&(x=[k-p,0],k-=m),M&&(S=[0,0],I+=m),D&&(b=[k-p,0],k-=m));var E=[I,k];return r.get("inverse")&&E.reverse(),{viewRect:o,mainLength:f,orient:a,rotation:c[a],labelRotation:y,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:x,prevBtnPosition:S,nextBtnPosition:b,axisExtent:E,controlSize:p,controlGap:g}},e.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=fr(),l=o.x,u=o.y+o.height;Ii(s,s,[-l,-u]),ho(s,s,-AS/2),Ii(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=x(o),f=x(i.getBoundingRect()),h=x(a.getBoundingRect()),v=[i.x,i.y],p=[a.x,a.y];p[0]=v[0]=c[0][0];var g=r.labelPosOpt;if(g==null||se(g)){var m=g==="+"?0:1;S(v,f,c,1,m),S(p,h,c,1,1-m)}else{var m=g>=0?0:1;S(v,f,c,1,m),p[1]=v[1]+g}i.setPosition(v),a.setPosition(p),i.rotation=a.rotation=r.rotation,y(i),y(a);function y(b){b.originX=c[0][0]-b.x,b.originY=c[1][0]-b.y}function x(b){return[[b.x,b.x+b.width],[b.y,b.y+b.height]]}function S(b,T,C,M,D){b[M]+=C[M][D]-T[M][D]}},e.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=Ide(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Dde("value",o,r.axisExtent,a);return l.model=n,l},e.prototype._createGroup=function(r){var n=this[r]=new _e;return this.group.add(n),n},e.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new Wt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:J({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Wt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Se({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],N(l,function(u){var c=i.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),v=f.getModel(["emphasis","itemStyle"]),p=f.getModel(["progress","itemStyle"]),g={x:c,y:0,onclick:le(o._changeTimeline,o,u.value)},m=qO(f,h,n,g);m.ensureState("emphasis").style=v.getItemStyle(),m.ensureState("progress").style=p.getItemStyle(),ns(m);var y=Ae(m);f.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(m)})},e.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],N(u,function(c){var f=c.tickValue,h=l.getItemModel(f),v=h.getModel("label"),p=h.getModel(["emphasis","label"]),g=h.getModel(["progress","label"]),m=i.dataToCoord(c.tickValue),y=new Ye({x:m,y:0,rotation:r.labelRotation-r.rotation,onclick:le(o._changeTimeline,o,f),silent:!1,style:dt(v,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});y.ensureState("emphasis").style=dt(p),y.ensureState("progress").style=dt(g),n.add(y),ns(y),XO(y).dataIndex=f,o._tickLabels.push(y)})}},e.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),f=a.get("inverse",!0);h(r.nextBtnPosition,"next",le(this._changeTimeline,this,f?"-":"+")),h(r.prevBtnPosition,"prev",le(this._changeTimeline,this,f?"+":"-")),h(r.playPosition,c?"stop":"play",le(this._handlePlayClick,this,!c),!0);function h(v,p,g,m){if(v){var y=Ei(pe(a.get(["controlStyle",p+"BtnSize"]),o),o),x=[0,-y/2,y,y],S=Rde(a,p+"Icon",x,{x:v[0],y:v[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:g});S.ensureState("emphasis").style=u,n.add(S),ns(S)}}},e.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=le(u._handlePointerDrag,u),f.ondragend=le(u._handlePointerDragend,u),KO(f,u._progressLine,s,i,a,!0)},onUpdate:function(f){KO(f,u._progressLine,s,i,a)}};this._currentPointer=qO(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},e.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},e.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=Ln(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(s[o]=+s[o].toFixed(p)),[s,v]}var zg={min:Ie(Og,"min"),max:Ie(Og,"max"),average:Ie(Og,"average"),median:Ie(Og,"median")};function vd(t,e){if(e){var r=t.getData(),n=t.coordinateSystem,i=n&&n.dimensions;if(!Fde(e)&&!ee(e.coord)&&ee(i)){var a=OH(e,r,n,t);if(e=ye(e),e.type&&zg[e.type]&&a.baseAxis&&a.valueAxis){var o=Ee(i,a.baseAxis.dim),s=Ee(i,a.valueAxis.dim),l=zg[e.type](r,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!ee(i)){e.coord=[];var u=t.getBaseAxis();if(u&&e.type&&zg[e.type]){var c=n.getOtherAxis(u);c&&(e.value=Xy(r,r.mapDimension(c.dim),e.type))}}else for(var f=e.coord,h=0;h<2;h++)zg[f[h]]&&(f[h]=Xy(r,r.mapDimension(i[h]),f[h]));return e}}function OH(t,e,r,n){var i={};return t.valueIndex!=null||t.valueDim!=null?(i.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,i.valueAxis=r.getAxis(Gde(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function Gde(t,e){var r=t.getData().getDimensionInfo(e);return r&&r.coordDim}function dd(t,e){return t&&t.containData&&e.coord&&!FT(e)?t.containData(e.coord):!0}function jde(t,e,r){return t&&t.containZone&&e.coord&&r.coord&&!FT(e)&&!FT(r)?t.containZone(e.coord,r.coord):!0}function zH(t,e){return t?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return os(o,e[a])}:function(r,n,i,a){return os(r.value,e[a])}}function Xy(t,e,r){if(r==="average"){var n=0,i=0;return t.each(e,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?t.getMedian(e):t.getDataExtent(e)[r==="max"?1:0]}var PS=Ve(),kL=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this.markerGroupMap=ve()},e.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){PS(s).keep=!1}),n.eachSeries(function(s){var l=Sa.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!PS(s).keep&&a.group.remove(s.group)}),Hde(n,o,this.type)},e.prototype.markKeep=function(r){PS(r).keep=!0},e.prototype.toggleBlurSeries=function(r,n){var i=this;N(r,function(a){var o=Sa.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?Q4(l):M2(l))})}})},e.type="marker",e}(gt);function Hde(t,e,r){t.eachSeries(function(n){var i=Sa.getMarkerModelFromSeries(n,r),a=e.get(n.id);if(i&&a&&a.group){var o=$l(i),s=o.z,l=o.zlevel;G0(a.group,s,l)}})}function JO(t,e,r){var n=e.coordinateSystem,i=r.getWidth(),a=r.getHeight(),o=n&&n.getArea&&n.getArea();t.each(function(s){var l=t.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:i,f=u?o?o.height:0:a,h=u&&o?o.x:0,v=u&&o?o.y:0,p,g=oe(l.get("x"),c)+h,m=oe(l.get("y"),f)+v;if(!isNaN(g)&&!isNaN(m))p=[g,m];else if(e.getMarkerPosition)p=e.getMarkerPosition(t.getValues(t.dimensions,s));else if(n){var y=t.get(n.dimensions[0],s),x=t.get(n.dimensions[1],s);p=n.dataToPoint([y,x])}isNaN(g)||(p[0]=g),isNaN(m)||(p[1]=m),t.setItemLayout(s,p)})}var Wde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Sa.getMarkerModelFromSeries(a,"markPoint");o&&(JO(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Bd),f=Ude(o,r,n);n.setData(f),JO(n.getData(),r,a),f.each(function(h){var v=f.getItemModel(h),p=v.getShallow("symbol"),g=v.getShallow("symbolSize"),m=v.getShallow("symbolRotate"),y=v.getShallow("symbolOffset"),x=v.getShallow("symbolKeepAspect");if(me(p)||me(g)||me(m)||me(y)){var S=n.getRawValue(h),b=n.getDataParams(h);me(p)&&(p=p(S,b)),me(g)&&(g=g(S,b)),me(m)&&(m=m(S,b)),me(y)&&(y=y(S,b))}var T=v.getModel("itemStyle").getItemStyle(),C=v.get("z2"),M=Nd(l,"color");T.fill||(T.fill=M),f.setItemVisual(h,{z2:pe(C,0),symbol:p,symbolSize:g,symbolRotate:m,symbolOffset:y,symbolKeepAspect:x,style:T})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(v){Ae(v).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markPoint",e}(kL);function Ude(t,e,r){var n;t?n=re(t&&t.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return J(J({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Zr(n,r),a=re(r.get("data"),Ie(vd,e));t&&(a=Je(a,Ie(dd,t)));var o=zH(!!t,n);return i.initData(a,null,o),i}function Zde(t){t.registerComponentModel(Vde),t.registerComponentView(Wde),t.registerPreprocessor(function(e){DL(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var $de=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Sa),Bg=Ve(),Yde=function(t,e,r,n){var i=t.getData(),a;if(ee(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=Sr(n.yAxis,n.xAxis);else{var u=OH(n,i,e,t);s=u.valueAxis;var c=_M(i,u.valueDataDim);l=Xy(i,c,o)}var f=s.dim==="x"?0:1,h=1-f,v=ye(n),p={coord:[]};v.type=null,v.coord=[],v.coord[h]=-1/0,p.coord[h]=1/0;var g=r.get("precision");g>=0&&Xe(l)&&(l=+l.toFixed(Math.min(g,20))),v.coord[f]=p.coord[f]=l,a=[v,p,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var m=[vd(t,a[0]),vd(t,a[1]),J({},a[2])];return m[2].type=m[2].type||null,Re(m[2],m[0]),Re(m[2],m[1]),m};function qy(t){return!isNaN(t)&&!isFinite(t)}function ez(t,e,r,n){var i=1-t,a=n.dimensions[t];return qy(e[i])&&qy(r[i])&&e[t]===r[t]&&n.getAxis(a).containData(e[t])}function Xde(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,n=e[1].coord;if(r&&n&&(ez(1,r,n,t)||ez(0,r,n,t)))return!0}return dd(t,e[0])&&dd(t,e[1])}function DS(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=oe(o.get("x"),i.getWidth()),u=oe(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=a.dimensions,f=t.get(c[0],e),h=t.get(c[1],e);s=a.dataToPoint([f,h])}if(vs(a,"cartesian2d")){var v=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;qy(t.get(c[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[r?0:1]):qy(t.get(c[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}t.setItemLayout(e,s)}var qde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Sa.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Bg(o).from,u=Bg(o).to;l.each(function(c){DS(l,c,!0,a,i),DS(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new qM);this.group.add(c.group);var f=Kde(o,r,n),h=f.from,v=f.to,p=f.line;Bg(n).from=h,Bg(n).to=v,n.setData(p);var g=n.get("symbol"),m=n.get("symbolSize"),y=n.get("symbolRotate"),x=n.get("symbolOffset");ee(g)||(g=[g,g]),ee(m)||(m=[m,m]),ee(y)||(y=[y,y]),ee(x)||(x=[x,x]),f.from.each(function(b){S(h,b,!0),S(v,b,!1)}),p.each(function(b){var T=p.getItemModel(b),C=T.getModel("lineStyle").getLineStyle();p.setItemLayout(b,[h.getItemLayout(b),v.getItemLayout(b)]);var M=T.get("z2");C.stroke==null&&(C.stroke=h.getItemVisual(b,"style").fill),p.setItemVisual(b,{z2:pe(M,0),fromSymbolKeepAspect:h.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(b,"symbolOffset"),fromSymbolRotate:h.getItemVisual(b,"symbolRotate"),fromSymbolSize:h.getItemVisual(b,"symbolSize"),fromSymbol:h.getItemVisual(b,"symbol"),toSymbolKeepAspect:v.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(b,"symbolOffset"),toSymbolRotate:v.getItemVisual(b,"symbolRotate"),toSymbolSize:v.getItemVisual(b,"symbolSize"),toSymbol:v.getItemVisual(b,"symbol"),style:C})}),c.updateData(p),f.line.eachItemGraphicEl(function(b){Ae(b).dataModel=n,b.traverse(function(T){Ae(T).dataModel=n})});function S(b,T,C){var M=b.getItemModel(T);DS(b,T,C,r,a);var D=M.getModel("itemStyle").getItemStyle();D.fill==null&&(D.fill=Nd(l,"color")),b.setItemVisual(T,{symbolKeepAspect:M.get("symbolKeepAspect"),symbolOffset:pe(M.get("symbolOffset",!0),x[C?0:1]),symbolRotate:pe(M.get("symbolRotate",!0),y[C?0:1]),symbolSize:pe(M.get("symbolSize"),m[C?0:1]),symbol:pe(M.get("symbol",!0),g[C?0:1]),style:D})}this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markLine",e}(kL);function Kde(t,e,r){var n;t?n=re(t&&t.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return J(J({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Zr(n,r),a=new Zr(n,r),o=new Zr([],r),s=re(r.get("data"),Ie(Yde,e,t,r));t&&(s=Je(s,Ie(Xde,t)));var l=zH(!!t,n);return i.initData(re(s,function(u){return u[0]}),null,l),a.initData(re(s,function(u){return u[1]}),null,l),o.initData(re(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function Qde(t){t.registerComponentModel($de),t.registerComponentView(qde),t.registerPreprocessor(function(e){DL(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Jde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Sa),Vg=Ve(),epe=function(t,e,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=vd(t,i),s=vd(t,a),l=o.coord,u=s.coord;l[0]=Sr(l[0],-1/0),l[1]=Sr(l[1],-1/0),u[0]=Sr(u[0],1/0),u[1]=Sr(u[1],1/0);var c=T0([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function Ky(t){return!isNaN(t)&&!isFinite(t)}function tz(t,e,r,n){var i=1-t;return Ky(e[i])&&Ky(r[i])}function tpe(t,e){var r=e.coord[0],n=e.coord[1],i={coord:r,x:e.x0,y:e.y0},a={coord:n,x:e.x1,y:e.y1};return vs(t,"cartesian2d")?r&&n&&(tz(1,r,n)||tz(0,r,n))?!0:jde(t,i,a):dd(t,i)||dd(t,a)}function rz(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=oe(o.get(r[0]),i.getWidth()),u=oe(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=t.getValues(["x0","y0"],e),f=t.getValues(["x1","y1"],e),h=a.clampData(c),v=a.clampData(f),p=[];r[0]==="x0"?p[0]=h[0]>v[0]?f[0]:c[0]:p[0]=h[0]>v[0]?c[0]:f[0],r[1]==="y0"?p[1]=h[1]>v[1]?f[1]:c[1]:p[1]=h[1]>v[1]?c[1]:f[1],s=n.getMarkerPosition(p,r,!0)}else{var g=t.get(r[0],e),m=t.get(r[1],e),y=[g,m];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(vs(a,"cartesian2d")){var x=a.getAxis("x"),S=a.getAxis("y"),g=t.get(r[0],e),m=t.get(r[1],e);Ky(g)?s[0]=x.toGlobalCoord(x.getExtent()[r[0]==="x0"?0:1]):Ky(m)&&(s[1]=S.toGlobalCoord(S.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var nz=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],rpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Sa.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=re(nz,function(f){return rz(s,l,f,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new _e});this.group.add(c.group),this.markKeep(c);var f=npe(o,r,n);n.setData(f),f.each(function(h){var v=re(nz,function(k){return rz(f,h,k,r,a)}),p=o.getAxis("x").scale,g=o.getAxis("y").scale,m=p.getExtent(),y=g.getExtent(),x=[p.parse(f.get("x0",h)),p.parse(f.get("x1",h))],S=[g.parse(f.get("y0",h)),g.parse(f.get("y1",h))];Ln(x),Ln(S);var b=!(m[0]>x[1]||m[1]S[1]||y[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:X.size.m,align:"auto",backgroundColor:X.color.transparent,borderColor:X.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:X.color.disabled,inactiveBorderColor:X.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:X.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:X.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:X.color.tertiary,borderWidth:1,borderColor:X.color.border},emphasis:{selectorLabel:{show:!0,color:X.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e}(Be),Zu=Ie,jT=N,Fg=_e,BH=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new Fg),this.group.add(this._selectorGroup=new Fg),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=or(r,i).refContainer,f=r.getBoxLayoutParams(),h=r.get("padding"),v=St(f,c,h),p=this.layoutInner(r,o,v,a,l,u),g=St(Se({width:p.width,height:p.height},f),c,h);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=MH(p,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=ve(),f=n.get("selectedMode"),h=n.get("triggerEvent"),v=[];i.eachRawSeries(function(p){!p.get("legendHoverLink")&&v.push(p.id)}),jT(n.getData(),function(p,g){var m=this,y=p.get("name");if(!this.newlineDisabled&&(y===""||y===` -`)){var x=new Fg;x.newline=!0,u.add(x);return}var S=i.getSeriesByName(y)[0];if(!c.get(y))if(S){var b=S.getData(),T=b.getVisual("legendLineStyle")||{},C=b.getVisual("legendIcon"),M=b.getVisual("style"),D=this._createItem(S,y,g,p,n,r,T,M,C,f,a);D.on("click",Zu(iz,y,null,a,v)).on("mouseover",Zu(HT,S.name,null,a,v)).on("mouseout",Zu(WT,S.name,null,a,v)),i.ssr&&D.eachChild(function(I){var k=Ae(I);k.seriesIndex=S.seriesIndex,k.dataIndex=g,k.ssrType="legend"}),h&&D.eachChild(function(I){m.packEventData(I,n,S,g,y)}),c.set(y,!0)}else i.eachRawSeries(function(I){var k=this;if(!c.get(y)&&I.legendVisualProvider){var E=I.legendVisualProvider;if(!E.containName(y))return;var z=E.indexOfName(y),O=E.getItemVisual(z,"style"),F=E.getItemVisual(z,"legendIcon"),j=Ur(O.fill);j&&j[3]===0&&(j[3]=.2,O=J(J({},O),{fill:ti(j,"rgba")}));var G=this._createItem(I,y,g,p,n,r,{},O,F,f,a);G.on("click",Zu(iz,null,y,a,v)).on("mouseover",Zu(HT,null,y,a,v)).on("mouseout",Zu(WT,null,y,a,v)),i.ssr&&G.eachChild(function(Z){var V=Ae(Z);V.seriesIndex=I.seriesIndex,V.dataIndex=g,V.ssrType="legend"}),h&&G.eachChild(function(Z){k.packEventData(Z,n,I,g,y)}),c.set(y,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},e.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};Ae(r).eventData=s},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();jT(r,function(u){var c=u.type,f=new Ye({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var h=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);vr(f,{normal:h,emphasis:v},{defaultText:u.title}),ns(f)})},e.prototype._createItem=function(r,n,i,a,o,s,l,u,c,f,h){var v=r.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),m=o.isSelected(n),y=a.get("symbolRotate"),x=a.get("symbolKeepAspect"),S=a.get("icon");c=S||c||"roundRect";var b=ope(c,a,l,u,v,m,h),T=new Fg,C=a.getModel("textStyle");if(me(r.getLegendIcon)&&(!S||S==="inherit"))T.add(r.getLegendIcon({itemWidth:p,itemHeight:g,icon:c,iconRotate:y,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:x}));else{var M=S==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;T.add(spe({itemWidth:p,itemHeight:g,icon:c,iconRotate:M,itemStyle:b.itemStyle,symbolKeepAspect:x}))}var D=s==="left"?p+5:-5,I=s,k=o.get("formatter"),E=n;se(k)&&k?E=k.replace("{name}",n??""):me(k)&&(E=k(n));var z=m?C.getTextColor():a.get("inactiveColor");T.add(new Ye({style:dt(C,{text:E,x:D,y:g/2,fill:z,align:I,verticalAlign:"middle"},{inheritColor:z})}));var O=new ze({shape:T.getBoundingRect(),style:{fill:"transparent"}}),F=a.getModel("tooltip");return F.get("show")&&po({el:O,componentModel:o,itemName:n,itemTooltipOption:F.option}),T.add(O),T.eachChild(function(j){j.silent=!0}),O.silent=!f,this.getContentGroup().add(T),ns(T),T.__legendDataIndex=i,T},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Dl(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Dl("horizontal",u,r.get("selectorItemGap",!0));var h=u.getBoundingRect(),v=[-h.x,-h.y],p=r.get("selectorButtonGap",!0),g=r.getOrient().index,m=g===0?"width":"height",y=g===0?"height":"width",x=g===0?"y":"x";s==="end"?v[g]+=c[m]+p:f[g]+=h[m]+p,v[1-g]+=c[y]/2-h[y]/2,u.x=v[0],u.y=v[1],l.x=f[0],l.y=f[1];var S={x:0,y:0};return S[m]=c[m]+p+h[m],S[y]=Math.max(c[y],h[y]),S[x]=Math.min(0,h[x]+v[1-g]),S}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(gt);function ope(t,e,r,n,i,a,o){function s(m,y){m.lineWidth==="auto"&&(m.lineWidth=y.lineWidth>0?2:0),jT(m,function(x,S){m[S]==="inherit"&&(m[S]=y[S])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=t.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:Xc(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var h=e.getModel("lineStyle"),v=h.getLineStyle();if(s(v,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!a){var p=e.get("inactiveBorderWidth"),g=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),v.stroke=h.get("inactiveColor"),v.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function spe(t){var e=t.icon||"roundRect",r=Ut(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=X.color.neutral00,r.style.lineWidth=2),r}function iz(t,e,r,n){WT(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),HT(t,e,r,n)}function VH(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,i=e.length;ni[o],m=[-v.x,-v.y];n||(m[a]=c[u]);var y=[0,0],x=[-p.x,-p.y],S=pe(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var b=r.get("pageButtonPosition",!0);b==="end"?x[a]+=i[o]-p[o]:y[a]+=p[o]+S}x[1-a]+=v[s]/2-p[s]/2,c.setPosition(m),f.setPosition(y),h.setPosition(x);var T={x:0,y:0};if(T[o]=g?i[o]:v[o],T[s]=Math.max(v[s],p[s]),T[l]=Math.min(0,p[l]+x[1-a]),f.__rectSize=i[o],g){var C={x:0,y:0};C[o]=Math.max(i[o]-p[o]-S,0),C[s]=T[s],f.setClipPath(new ze({shape:C})),f.__rectSize=C[o]}else h.eachChild(function(D){D.attr({invisible:!0,silent:!0})});var M=this._getPageInfo(r);return M.pageIndex!=null&&Ke(c,{x:M.contentPosition[0],y:M.contentPosition[1]},g?r:null),this._updatePageInfoView(r,M),T},e.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;N(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,v=i.childOfName(c);v&&(v.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",se(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=kS[o],l=IS[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],h=c.length,v=h?1:0,p={contentPosition:[i.x,i.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var g=b(f);p.contentPosition[o]=-g.s;for(var m=u+1,y=g,x=g,S=null;m<=h;++m)S=b(c[m]),(!S&&x.e>y.s+a||S&&!T(S,y.s))&&(x.i>y.i?y=x:y=S,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),x=S;for(var m=u-1,y=g,x=g,S=null;m>=-1;--m)S=b(c[m]),(!S||!T(x,S.s))&&y.i=M&&C.s<=M+a}},e.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},e.type="legend.scroll",e}(BH);function hpe(t){t.registerAction("legendScroll","legendscroll",function(e,r){var n=e.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function vpe(t){Oe(FH),t.registerComponentModel(cpe),t.registerComponentView(fpe),hpe(t)}function dpe(t){Oe(FH),Oe(vpe)}var ppe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.inside",e.defaultOption=bs(hd.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(hd),IL=Ve();function gpe(t,e,r){IL(t).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=r)})}function mpe(t,e){for(var r=IL(t).coordSysRecordMap,n=r.keys(),i=0;ia[i+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:r,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function wpe(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(e,r){var n=IL(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=ve());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=bH(a);N(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,ype(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=ve());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){GH(i,a);return}var c=Spe(l,a,r);o.enable(c.controlType,c.opt),wf(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var bpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return e.prototype.render=function(r,n,i){if(t.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),gpe(i,r,{pan:le(ES.pan,this),zoom:le(ES.zoom,this),scrollMove:le(ES.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){mpe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(TL),ES={zoom:function(t,e,r,n){var i=this.range,a=i.slice(),o=t.axisModels[0];if(o){var s=RS[e](null,[n.originX,n.originY],o,r,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(ds(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:lz(function(t,e,r,n,i,a){var o=RS[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:lz(function(t,e,r,n,i,a){var o=RS[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*a.scrollDelta})};function lz(t){return function(e,r,n,i){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=t(o,s,e,r,n,i);if(ds(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var RS={grid:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return t=t||[0,0],a.dim==="x"?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),r.mainType==="radiusAxis"?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(t,e,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return t=t||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function jH(t){CL(t),t.registerComponentModel(ppe),t.registerComponentView(bpe),wpe(t)}var Tpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=bs(hd.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:X.color.accent10,borderRadius:0,backgroundColor:X.color.transparent,dataBackground:{lineStyle:{color:X.color.accent30,width:.5},areaStyle:{color:X.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:X.color.accent40,width:.5},areaStyle:{color:X.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:X.color.neutral00,borderColor:X.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:X.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:X.color.tertiary},brushSelect:!0,brushStyle:{color:X.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:X.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e}(hd),Lh=ze,Cpe=1,NS=30,Mpe=7,Ah="horizontal",uz="vertical",Lpe=5,Ape=["line","bar","candlestick","scatter"],Ppe={easing:"cubicOut",duration:100,delay:0},Dpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._displayables={},r}return e.prototype.init=function(r,n){this.api=n,this._onBrush=le(this._onBrush,this),this._onBrushEnd=le(this._onBrushEnd,this)},e.prototype.render=function(r,n,i,a){if(t.prototype.render.apply(this,arguments),wf(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Kv(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new _e;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?Mpe:0,o=or(r,n).refContainer,s=this._findCoordRect(),l=r.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Ah?{right:o.width-s.x-s.width,top:o.height-NS-l-a,width:s.width,height:NS}:{right:l,top:s.y,width:NS,height:s.height},c=ou(r.option);N(["right","top","width","height"],function(h){c[h]==="ph"&&(c[h]=u[h])});var f=St(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===uz&&this._size.reverse()},e.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Ah&&!o?{scaleY:l?1:-1,scaleX:1}:i===Ah&&o?{scaleY:l?1:-1,scaleX:-1}:i===uz&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new Lh({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new Lh({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:le(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(r.thisDim),h=o.getDataExtent(l),v=(h[1]-h[0])*.3;h=[h[0]-v,h[1]+v];var p=[0,n[1]],g=[0,n[0]],m=[[n[0],0],[0,0]],y=[],x=g[1]/Math.max(1,o.count()-1),S=n[0]/(f[1]-f[0]),b=r.thisAxis.type==="time",T=-x,C=Math.round(o.count()/n[0]),M;o.each([r.thisDim,l],function(z,O,F){if(C>0&&F%C){b||(T+=x);return}T=b?(+z-f[0])*S:T+x;var j=O==null||isNaN(O)||O==="",G=j?0:rt(O,h,p,!0);j&&!M&&F?(m.push([m[m.length-1][0],0]),y.push([y[y.length-1][0],0])):!j&&M&&(m.push([T,0]),y.push([T,0])),j||(m.push([T,G]),y.push([T,G])),M=j}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var D=this.dataZoomModel;function I(z){var O=D.getModel(z?"selectedDataBackground":"dataBackground"),F=new _e,j=new Nr({shape:{points:u},segmentIgnoreThreshold:1,style:O.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),G=new br({shape:{points:c},segmentIgnoreThreshold:1,style:O.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return F.add(j),F.add(G),F}for(var k=0;k<3;k++){var E=I(k===1);this._displayables.sliderGroup.add(E),this._displayables.dataShadowSegs.push(E)}},e.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();N(l,function(u){if(!i&&!(n!==!0&&Ee(Ape,u.get("type"))<0)){var c=a.getComponent(Wo(o),s).axis,f=kpe(o),h,v=u.coordinateSystem;f!=null&&v.getOtherAxis&&(h=v.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var p=u.getData().mapDimension(o);i={thisAxis:c,series:u,thisDim:p,otherDim:f,otherAxisInverse:h}}},this)},this),i}},e.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new Lh({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Lh({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Cpe,fill:X.color.transparent}})),N([0,1],function(S){var b=l.get("handleIcon");!my[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var T=Ut(b,-1,0,2,2,null,!0);T.attr({cursor:Ipe(this._orient),draggable:!0,drift:le(this._onDragMove,this,S),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1),z2:5});var C=T.getBoundingRect(),M=l.get("handleSize");this._handleHeight=oe(M,this._size[1]),this._handleWidth=C.width/C.height*this._handleHeight,T.setStyle(l.getModel("handleStyle").getItemStyle()),T.style.strokeNoScale=!0,T.rectHover=!0,T.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),ns(T);var D=l.get("handleColor");D!=null&&(T.style.fill=D),o.add(i[S]=T);var I=l.getModel("textStyle"),k=l.get("handleLabel")||{},E=k.show||!1;r.add(a[S]=new Ye({silent:!0,invisible:!E,style:dt(I,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:I.getTextColor(),font:I.getFont()}),z2:10}))},this);var v=h;if(f){var p=oe(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new ze({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),m=p*.8,y=n.moveHandleIcon=Ut(l.get("moveHandleIcon"),-m/2,-m/2,m,m,X.color.neutral00,!0);y.silent=!0,y.y=s[1]+p/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var x=Math.min(s[1]/2,Math.max(p,10));v=n.moveZone=new ze({invisible:!0,shape:{y:s[1]-x,height:p+x}}),v.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:"default",drift:le(this._onDragMove,this,"all"),ondragstart:le(this._showDataInfo,this,!0),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[rt(r[0],[0,100],n,!0),rt(r[1],[0,100],n,!0)]},e.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];ds(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?rt(s.minSpan,l,o,!0):null,s.maxSpan!=null?rt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Ln([rt(a[0],o,l,!0),rt(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=Ln(i.slice()),o=this._size;N([0,1],function(v){var p=n.handles[v],g=this._handleHeight;p.attr({scaleX:g/2,scaleY:g/2,x:i[v]+(v?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;cn[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new Te(n,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();ds(0,l,o,0,u.minSpan!=null?rt(u.minSpan,s,o,!0):null,u.maxSpan!=null?rt(u.maxSpan,s,o,!0):null),this._range=Ln([rt(l[0],o,s,!0),rt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(r){this._brushing&&(io(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},e.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Lh({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?Ppe:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var r,n=bH(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},e.type="dataZoom.slider",e}(TL);function kpe(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function Ipe(t){return t==="vertical"?"ns-resize":"ew-resize"}function HH(t){t.registerComponentModel(Tpe),t.registerComponentView(Dpe),CL(t)}function Epe(t){Oe(jH),Oe(HH)}var WH={get:function(t,e,r){var n=ye((Rpe[t]||{})[e]);return r&&ee(n)?n[n.length-1]:n}},Rpe={color:{active:["#006edd","#e0ffff"],inactive:[X.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},cz=hr.mapVisual,Npe=hr.eachVisual,Ope=ee,fz=N,zpe=Ln,Bpe=rt,Qy=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&EH(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(r){var n=this.stateList;r=le(r,this),this.controllerVisuals=BT(this.option.controller,n,r),this.targetVisuals=BT(this.option.target,n,r)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesId,n=this.option.seriesIndex;n==null&&r==null&&(n="all");var i=ff(this.ecModel,"series",{index:n,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return re(i,function(a){return a.componentIndex})},e.prototype.eachTargetSeries=function(r,n){N(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},e.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},e.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],ee(r)&&(r=r.slice(),u=!0);var c=n?r:u?[f(r[0]),f(r[1])]:f(r);if(se(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(me(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+c[1]:r[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var r=this.option,n=zpe([r.min,r.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Re(a,i),Re(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){Ope(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:r.get("gradientColor")}}function u(f,h,v){var p=f[h],g=f[v];p&&!g&&(g=f[v]={},fz(p,function(m,y){if(hr.isValidType(y)){var x=WH.get(y,"inactive",s);x!=null&&(g[y]=x,y==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,v=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),g=this.getItemSymbol(),m=g||"roundRect";fz(this.stateList,function(y){var x=this.itemSize,S=f[y];S||(S=f[y]={color:s?p:[p]}),S.symbol==null&&(S.symbol=h&&ye(h)||(s?m:[m])),S.symbolSize==null&&(S.symbolSize=v&&ye(v)||(s?x[0]:[x[0],x[0]])),S.symbol=cz(S.symbol,function(C){return C==="none"?m:C});var b=S.symbolSize;if(b!=null){var T=-1/0;Npe(b,function(C){C>T&&(T=C)}),S.symbolSize=cz(b,function(C){return Bpe(C,[0,T],[0,x[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(r){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(r){return null},e.prototype.getVisualMeta=function(r){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:X.color.transparent,borderColor:X.color.borderTint,contentColor:X.color.theme[0],inactiveColor:X.color.disabled,borderWidth:0,padding:X.size.m,textGap:10,precision:0,textStyle:{color:X.color.secondary}},e}(Be),hz=[20,140],Vpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=hz[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=hz[1])},e.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):ee(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),N(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},e.prototype.getSelected=function(){var r=this.getExtent(),n=Ln((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]=i[1]||r<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},e.prototype.getVisualMeta=function(r){var n=vz(this,"outOfRange",this.getExtent()),i=vz(this,"inRange",this.option.range.slice()),a=[];function o(v,p){a.push({value:v,color:r(v,p)})}for(var s=0,l=0,u=i.length,c=n.length;lr[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},e.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},e.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new _e(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},e.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent(),c=this._applyTransform("left",i.mainGroup);Fpe([0,1],function(f){var h=o[f];h.setStyle("fill",n.handlesColor[f]),h.y=r[f];var v=Qi(r[f],[0,l[1]],u,!0),p=this.getControllerVisual(v,"symbolSize");h.scaleX=h.scaleY=p/l[0],h.x=l[0]-p/2;var g=Pi(i.handleLabelPoints[f],is(h,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;g[1]+=m}s[f].setStyle({x:g[0],y:g[1],text:a.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},v=this.getControllerVisual(r,"color",h),p=this.getControllerVisual(r,"symbolSize"),g=Qi(r,s,u,!0),m=l[0]-p/2,y={x:f.x,y:f.y};f.y=g,f.x=m;var x=Pi(c.indicatorLabelPoint,is(f,this.group)),S=c.indicatorLabel;S.attr("invisible",!1);var b=this._applyTransform("left",c.mainGroup),T=this._orient,C=T==="horizontal";S.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:C?b:"middle",align:C?"center":b});var M={x:m,y:g,style:{fill:v}},D={style:{x:x[0],y:x[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var I={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(M,I),S.animateTo(D,I)}else f.attr(M),S.attr(D);this._firstShowIndicator=!1;var k=this._shapes.handleLabels;if(k)for(var E=0;Eo[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,v=[];(n||mz(i))&&(v=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var p=bX(h,v);this._dispatchHighDown("downplay",xm(p[0],i)),this._dispatchHighDown("highlight",xm(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(wl(r.target,function(l){var u=Ae(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i=0&&(a.dimension=o,n.push(a))}}),t.getData().setVisual("visualMeta",n)}}];function Ype(t,e,r,n){for(var i=e.targetVisuals[n],a=hr.prepareVisualTypes(i),o={color:Nd(t.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),t.registerAction(Upe,Zpe),N($pe,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(Xpe))}function YH(t){t.registerComponentModel(Vpe),t.registerComponentView(Hpe),$H(t)}var qpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._pieceList=[],r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Kpe[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=ye(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=re(this._pieceList,function(l){return l=ye(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var r=this.option,n={},i=hr.listVisualTypes(),a=this.isCategory();N(r.pieces,function(s){N(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),N(n,function(s,l){var u=!1;N(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&N(this.stateList,function(c){(r[c]||(r[c]={}))[l]=WH.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,N(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;N(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(r){this.option.selected=ye(r)},e.prototype.getValueState=function(r){var n=hr.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=hr.findPieceIndex(l,i);c===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},e.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,f){var h=a.getRepresentValue({interval:c});f||(f=a.getValueState(h));var v=r(h,f);c[0]===-1/0?i[0]=v:c[1]===1/0?i[1]=v:n.push({value:c[0],color:v},{value:c[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return N(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=bs(Qy.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Qy),Kpe={splitNumber:function(t){var e=this.option,r=Math.min(e.precision,20),n=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;e.precision=r,a=+a.toFixed(r),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function Sz(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var Qpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,c=Sr(n.get("showLabel",!0),!u),f=!n.get("selectedMode");u&&this._renderEndsText(r,u[0],s,c,o),N(l.viewPieceList,function(h){var v=h.piece,p=new _e;p.onclick=le(this._onItemClick,this,v),this._enableHoverLink(p,h.indexInModelPieceList);var g=n.getRepresentValue(v);if(this._createItemSymbol(p,g,[0,0,s[0],s[1]],f),c){var m=this.visualMapModel.getValueState(g),y=a.get("align")||o;p.add(new Ye({style:dt(a,{x:y==="right"?-i:s[0]+i,y:s[1]/2,text:v.text,verticalAlign:a.get("verticalAlign")||"middle",align:y,opacity:pe(a.get("opacity"),m==="outOfRange"?.5:1)}),silent:f}))}r.add(p)},this),u&&this._renderEndsText(r,u[1],s,c,o),Dl(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},e.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:xm(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return ZH(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new _e,l=this.visualMapModel.textStyleModel;s.add(new Ye({style:dt(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},e.prototype._getViewData=function(){var r=this.visualMapModel,n=re(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},e.prototype._createItemSymbol=function(r,n,i,a){var o=Ut(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color"));o.silent=a,r.add(o)},e.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=ye(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,N(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(UH);function XH(t){t.registerComponentModel(qpe),t.registerComponentView(Qpe),$H(t)}function Jpe(t){Oe(YH),Oe(XH)}var ege=function(){function t(e){this._thumbnailModel=e}return t.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},t.prototype.renderContent=function(e){var r=e.api.getViewOfComponentModel(this._thumbnailModel);r&&(e.group.silent=!0,r.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:_V(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},t.prototype.updateWindow=function(e,r){var n=r.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},t}(),tge=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventAutoZ=!0,r}return e.prototype.optionUpdated=function(r,n){this._updateBridge()},e.prototype._updateBridge=function(){var r=this._birdge=this._birdge||new ege(this);if(this._target=null,this.ecModel.eachSeries(function(i){ZR(i,null)}),this.shouldShow()){var n=this.getTarget();ZR(n.baseMapProvider,r)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var r=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return r?r.subType!=="graph"&&(r=null):r=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:r},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:X.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:X.color.neutral30,borderColor:X.color.neutral40,opacity:.3},z:10},e}(Be),rge=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this._api=i,this._model=r,this._coordSys||(this._coordSys=new fu),!this._isEnabled()){this._clear();return}this._renderVersion=i.getMainProcessVersion();var a=this.group;a.removeAll();var o=r.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||X.color.neutral00);var l=or(r,i).refContainer,u=St(VV(r,!0),l),c=s.lineWidth||0,f=this._contentRect=Zl(u.clone(),c/2,!0,!0),h=new _e;a.add(h),h.setClipPath(new ze({shape:f.plain()}));var v=this._targetGroup=new _e;h.add(v);var p=u.plain();p.r=o.getShallow("borderRadius",!0),a.add(this._bgRect=new ze({style:s,shape:p,silent:!1,cursor:"grab"}));var g=r.getModel("windowStyle"),m=g.getShallow("borderRadius",!0);h.add(this._windowRect=new ze({shape:{x:0,y:0,width:0,height:0,r:m},style:g.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),bz(r,this)},e.prototype.renderContent=function(r){this._bridgeRendered=r,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),bz(this._model,this))},e.prototype._dealRenderContent=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=this._targetGroup,i=this._coordSys,a=this._contentRect;if(n.removeAll(),!!r){var o=r.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=r.z2Range.min-10,i.setBoundingRect(s.x,s.y,s.width,s.height);var l=St({left:"center",top:"center",aspect:s.width/s.height},a);i.setViewRect(l.x,l.y,l.width,l.height),o.attr(i.getTransformInfo().raw),this._windowRect.z2=r.z2Range.max+10,this._resetRoamController(r.roamType)}}},e.prototype.updateWindow=function(r){var n=this._bridgeRendered;n&&n.renderVersion===r.renderVersion&&(n.targetTrans=r.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=oi([],r.targetTrans),i=Li([],this._coordSys.transform,n);this._transThisToTarget=oi([],i);var a=r.viewportRect;a?a=a.clone():a=new Ce(0,0,this._api.getWidth(),this._api.getHeight()),a.applyTransform(i);var o=this._windowRect,s=o.shape.r;o.setShape(Se({r:s},a))}},e.prototype._resetRoamController=function(r){var n=this,i=this._api,a=this._roamController;if(a||(a=this._roamController=new cu(i.getZr())),!r||!this._isEnabled()){a.disable();return}a.enable(r,{api:i,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),a.off("pan").off("zoom").on("pan",le(this._onPan,this)).on("zoom",le(this._onZoom,this))},e.prototype._onPan=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.oldX,r.oldY],n),a=Ot([],[r.oldX-r.dx,r.oldY-r.dy],n);this._api.dispatchAction(wz(this._model.getTarget().baseMapProvider,{dx:a[0]-i[0],dy:a[1]-i[1]}))}},e.prototype._onZoom=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.originX,r.originY],n);this._api.dispatchAction(wz(this._model.getTarget().baseMapProvider,{zoom:1/r.scale,originX:i[0],originY:i[1]}))}},e.prototype._isEnabled=function(){var r=this._model;if(!r||!r.shouldShow())return!1;var n=r.getTarget().baseMapProvider;return!!n},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e}(gt);function wz(t,e){var r=t.mainType==="series"?t.subType+"Roam":t.mainType+"Roam",n={type:r};return n[t.mainType+"Id"]=t.id,J(n,e),n}function bz(t,e){var r=$l(t);G0(e.group,r.z,r.zlevel)}function nge(t){t.registerComponentModel(tge),t.registerComponentView(rge)}var ige={label:{enabled:!0},decal:{show:!1}},Tz=Ve(),age={};function oge(t,e){var r=t.getModel("aria");if(!r.get("enabled"))return;var n=ye(ige);Re(n.label,t.getLocaleModel().get("aria"),!1),Re(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),c=u.get("show");if(c){var f=ve();t.eachSeries(function(h){if(!h.isColorBySeries()){var v=f.get(h.type);v||(v={},f.set(h.type,v)),Tz(h).scope=v}}),t.eachRawSeries(function(h){if(t.isSeriesFiltered(h))return;if(me(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var x=Db(h.ecModel,h.name,age,t.getSeriesCount()),S=v.getVisual("decal");v.setVisual("decal",b(S,x))}else{var p=h.getRawData(),g={},m=Tz(h).scope;v.each(function(T){var C=v.getRawIndex(T);g[C]=T});var y=p.count();p.each(function(T){var C=g[T],M=p.getName(T)||T+"",D=Db(h.ecModel,M,m,y),I=v.getItemVisual(C,"decal");v.setItemVisual(C,"decal",b(I,D))})}function b(T,C){var M=T?J(J({},C),T):C;return M.dirty=!0,M}})}}function a(){var u=e.getZr().dom;if(u){var c=t.getLocaleModel().get("aria"),f=r.getModel("label");if(f.option=Se(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var h=t.getSeriesCount(),v=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,g=Math.min(h,p),m;if(!(h<1)){var y=s();if(y){var x=f.get(["general","withTitle"]);m=o(x,{title:y})}else m=f.get(["general","withoutTitle"]);var S=[],b=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=o(b,{seriesCount:h}),t.eachSeries(function(D,I){if(I1?f.get(["series","multiple",z]):f.get(["series","single",z]),k=o(k,{seriesId:D.seriesIndex,seriesName:D.get("name"),seriesType:l(D.subType)});var O=D.getData();if(O.count()>v){var F=f.get(["data","partialData"]);k+=o(F,{displayCnt:v})}else k+=f.get(["data","allData"]);for(var j=f.get(["data","separator","middle"]),G=f.get(["data","separator","end"]),Z=f.get(["data","excludeDimensionId"]),V=[],W=0;W":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},uge=function(){function t(e){var r=this._condVal=se(e)?new RegExp(e):H3(e)?e:null;if(r==null){var n="";nt(n)}}return t.prototype.evaluate=function(e){var r=typeof e;return se(r)?this._condVal.test(e):Xe(r)?this._condVal.test(e+""):!1},t}(),cge=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),fge=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r2&&n.push(i),i=[O,F]}function c(O,F,j,G){xc(O,j)&&xc(F,G)||i.push(O,F,j,G,j,G)}function f(O,F,j,G,Z,V){var W=Math.abs(F-O),H=Math.tan(W/4)*4/3,Y=FD:E2&&n.push(i),n}function ZT(t,e,r,n,i,a,o,s,l,u){if(xc(t,r)&&xc(e,n)&&xc(i,o)&&xc(a,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-t,v=s-e,p=Math.sqrt(h*h+v*v);h/=p,v/=p;var g=r-t,m=n-e,y=i-o,x=a-s,S=g*g+m*m,b=y*y+x*x;if(S=0&&D=0){l.push(o,s);return}var I=[],k=[];fs(t,r,i,o,.5,I),fs(e,n,a,s,.5,k),ZT(I[0],k[0],I[1],k[1],I[2],k[2],I[3],k[3],l,u),ZT(I[4],k[4],I[5],k[5],I[6],k[6],I[7],k[7],l,u)}function Cge(t,e){var r=UT(t),n=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),f=KH([l,u],c?0:1,e),h=(c?s:u)/f.length,v=0;vi,o=KH([n,i],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=t[s]/o.length,h=0;h1?null:new Te(g*l+t,g*u+e)}function Age(t,e,r){var n=new Te;Te.sub(n,r,e),n.normalize();var i=new Te;Te.sub(i,t,e);var a=i.dot(n);return a}function Yu(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function Pge(t,e,r){for(var n=t.length,i=[],a=0;ao?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),Pge(e,u,c)}function Jy(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);Jy(t,a[0],i,n),Jy(t,a[1],r-i,n)}return n}function Dge(t,e){for(var r=[],n=0;n0;u/=2){var c=0,f=0;(t&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(t=u-1-t,e=u-1-e),l=t,t=e,e=l)}return s}function r0(t){var e=1/0,r=1/0,n=-1/0,i=-1/0,a=re(t,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),r=Math.min(f,r),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=re(a,function(s,l){return{cp:s,z:Vge(s[0],s[1],e,r,n,i),path:t[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function e8(t){return Ege(t.path,t.count)}function $T(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Fge(t,e,r){var n=[];function i(T){for(var C=0;C=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var jge={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;Ez(t)&&(u=t,c=e),Ez(e)&&(u=e,c=t);function f(y,x,S,b,T){var C=y.many,M=y.one;if(C.length===1&&!T){var D=x?C[0]:M,I=x?M:C[0];if(e0(D))f({many:[D],one:I},!0,S,b,!0);else{var k=s?Se({delay:s(S,b)},l):l;RL(D,I,k),a(D,I,D,I,k)}}else for(var E=Se({dividePath:jge[r],individualDelay:s&&function(Z,V,W,H){return s(Z+S,b)}},l),z=x?Fge(C,M,E):Gge(M,C,E),O=z.fromIndividuals,F=z.toIndividuals,j=O.length,G=0;Ge.length,v=u?Rz(c,u):Rz(h?e:t,[h?t:e]),p=0,g=0;gt8))for(var a=n.getIndices(),o=0;o0&&C.group.traverse(function(D){D instanceof He&&!D.animators.length&&D.animateFrom({style:{opacity:0}},M)})})}function Vz(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function Fz(t){return ee(t)?t.sort().join(","):t}function Io(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function Xge(t,e){var r=ve(),n=ve(),i=ve();return N(t.oldSeries,function(a,o){var s=t.oldDataGroupIds[o],l=t.oldData[o],u=Vz(a),c=Fz(u);n.set(c,{dataGroupId:s,data:l}),ee(u)&&N(u,function(f){i.set(f,{key:c,dataGroupId:s,data:l})})}),N(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=Vz(a),u=Fz(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Io(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Io(s),data:s}]});else if(ee(l)){var f=[];N(l,function(p){var g=n.get(p);g.data&&f.push({dataGroupId:g.dataGroupId,divide:Io(g.data),data:g.data})}),f.length&&r.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Io(s)}]})}else{var h=i.get(l);if(h){var v=r.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Io(h.data)}],newSeries:[]},r.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Io(s)})}}}}),r}function Gz(t,e){for(var r=0;r=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Io(e.oldData[s]),groupIdDim:o.dimension})}),N(pt(t.to),function(o){var s=Gz(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Io(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&r8(i,a,n)}function Kge(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){N(pt(n.seriesTransition),function(i){N(pt(i.to),function(a){for(var o=n.updatedSeries,s=0;so.vmin?r+=o.vmin-n+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:r+=e-n,n=o.vmax,i=!1;break}r+=o.vmin-n+o.gapReal,n=o.vmax}return i&&(r+=e-n),r},t.prototype.unelapse=function(e){for(var r=jz,n=Hz,i=!0,a=0,o=0;ol?a=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):a=n+e-r,n=s.vmax,i=!1;break}r=u,n=s.vmax}return i&&(a=n+e-r),a},t}();function Jge(){return new Qge}var jz=0,Hz=0;function eme(t,e){var r=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};N(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(r+=l.val);var u=NL(s,e);if(u){var c=u.vmin!==s.vmin,f=u.vmax!==s.vmax,h=u.vmax-u.vmin;if(!(c&&f))if(c||f){var v=c?"S":"E";a[v][l.type].has=!0,a[v][l.type].span=h,a[v][l.type].inExtFrac=h/(s.vmax-s.vmin),a[v][l.type].val=l.val}else n[l.type].span+=h,n[l.type].val+=l.val}});var o=r*(0+(e[1]-e[0])+(n.tpAbs.val-n.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));N(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=r!==0?Math.max(o,0)*l.val/r:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function tme(t,e,r,n,i,a){t!=="no"&&N(r,function(o){var s=NL(o,a);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],c=n(u),f=i*3/4;c>s.vmin-f&&ce[0]&&r=0&&o<1-1e-5}N(t,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:ye(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(se(o.gap)){var u=Mn(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;i(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var f=e(o.gap);(!isFinite(f)||f<0)&&(f=0),s.gapParsed.type="tpAbs",s.gapParsed.val=f}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),r&&r.noNegative&&N(["vmin","vmax"],function(v){s[v]<0&&(s[v]=0)}),s.vmin>s.vmax){var h=s.vmax;s.vmax=s.vmin,s.vmin=h}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var a=-1/0;return N(n,function(o,s){a>o.vmin&&(n[s]=null),a=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function OL(t,e){return XT(e)===XT(t)}function XT(t){return t.start+"_\0_"+t.end}function nme(t,e,r){var n=[];N(t,function(a,o){var s=e(a);s&&s.type==="vmin"&&n.push([o])}),N(t,function(a,o){var s=e(a);if(s&&s.type==="vmax"){var l=xs(n,function(u){return OL(e(t[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return N(n,function(a){a.length===2&&i.push(r?a:[t[a[0]],t[a[1]]])}),i}function ime(t,e,r,n){var i,a;if(t.break){var o=t.break.parsedBreak,s=xs(r,function(f){return OL(f.breakOption,t.break.parsedBreak.breakOption)}),l=n(Math.pow(e,o.vmin),s.vmin),u=n(Math.pow(e,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?Ht(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:t.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},a=s[t.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function ame(t,e,r){var n={noNegative:!0},i=YT(t,r,n),a=YT(t,r,n),o=Math.log(e);return a.breaks=re(a.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var ome={vmin:"start",vmax:"end"};function sme(t,e){return e&&(t=t||{},t.break={type:ome[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),t}function lme(){DK({createScaleBreakContext:Jge,pruneTicksByBreak:tme,addBreaksToTicks:rme,parseAxisBreakOption:YT,identifyAxisBreak:OL,serializeAxisBreakIdentifier:XT,retrieveAxisBreakPairs:nme,getTicksLogTransformBreak:ime,logarithmicParseBreaksFromOption:ame,makeAxisLabelFormatterParamBreak:sme})}var Wz=Ve();function ume(t,e){var r=xs(t,function(n){return Xt().identifyAxisBreak(n.parsedBreak.breakOption,e.breakOption)});return r||t.push(r={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),r}function cme(t){N(t,function(e){return e.shouldRemove=!0})}function fme(t){for(var e=t.length-1;e>=0;e--)t[e].shouldRemove&&t.splice(e,1)}function hme(t,e,r,n,i){var a=r.axis;if(a.scale.isBlank()||!Xt())return;var o=Xt().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(I){return I.break},!1);if(!o.length)return;var s=r.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var f=s.get("expandOnClick"),h=s.get("zigzagZ"),v=s.getModel("itemStyle"),p=v.getItemStyle(),g=p.stroke,m=p.lineWidth,y=p.lineDash,x=p.fill,S=new _e({ignoreModelZ:!0}),b=a.isHorizontal(),T=Wz(e).visualList||(Wz(e).visualList=[]);cme(T);for(var C=function(I){var k=o[I][0].break.parsedBreak,E=[];E[0]=a.toGlobalCoord(a.dataToCoord(k.vmin,!0)),E[1]=a.toGlobalCoord(a.dataToCoord(k.vmax,!0)),E[1]=V;de&&(ne=V);var Fe=[],xe=[];Fe[G]=E,xe[G]=z,!ue&&!de&&(Fe[G]+=K?-l:l,xe[G]-=K?l:-l),Fe[Z]=ne,xe[Z]=ne,H.push(Fe),Y.push(xe);var ge=void 0;if(iex[1]&&x.reverse(),{coordPair:x,brkId:Xt().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(m,y){return m.coordPair[0]-y.coordPair[0]});for(var u=o[0],c=null,f=0;f=0?l[0].width:l[1].width),h=(f+c.x)/2-u.x,v=Math.min(h,h-c.x),p=Math.max(h,h-c.x),g=p<0?p:v>0?v:0;s=(h-g)/c.x}var m=new Te,y=new Te;Te.scale(m,n,-s),Te.scale(y,n,1-s),qb(r[0],m),qb(r[1],y)}function pme(t,e){var r={breaks:[]};return N(e.breaks,function(n){if(n){var i=xs(t.get("breaks",!0),function(s){return Xt().identifyAxisBreak(s,n)});if(i){var a=e.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===Q0?!0:a===bj?!1:a===Tj?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),r}function gme(){fie({adjustBreakLabelPair:dme,buildAxisBreakLine:vme,rectCoordBuildBreakAxis:hme,updateModelAxisBreak:pme})}function mme(t){mie(t),lme(),gme()}function yme(){Bie(_me)}function _me(t,e){N(t,function(r){if(!r.model.get(["axisLabel","inside"])){var n=xme(r);if(n){var i=r.isHorizontal()?"height":"width",a=r.model.get(["axisLabel","margin"]);e[i]-=n[i]+a,r.position==="top"?e.y+=n.height+a:r.position==="left"&&(e.x+=n.width+a)}}})}function xme(t){var e=t.model,r=t.scale;if(!e.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof qc?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=Cf(t),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:60,i=null;return function(){for(var a=this,o=arguments.length,s=new Array(o),l=0;l12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function zme(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function Bme(t){return t==="ROUTER"||t==="ROUTER_LATE"?30:t==="REPEATER"||t==="TRACKER"?25:t==="CLIENT_MUTE"?7:t==="CLIENT_BASE"?12:15}function Vme({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=q.useRef(null),[a,o]=q.useState("connected"),s=q.useMemo(()=>{const m=new Set;return e.forEach(y=>{m.add(y.from_node),m.add(y.to_node)}),m},[e]),l=q.useMemo(()=>{let m=t;return a==="connected"?m=m.filter(y=>s.has(y.node_num)):a==="infra"&&(m=m.filter(y=>$z.includes(y.role))),m},[t,a,s]),u=q.useMemo(()=>new Map(l.map(m=>[m.node_num,m])),[l]),c=q.useMemo(()=>e.filter(m=>u.has(m.from_node)&&u.has(m.to_node)),[e,u]),f=q.useMemo(()=>{const m=new Set;return r!==null&&c.forEach(y=>{y.from_node===r&&m.add(y.to_node),y.to_node===r&&m.add(y.from_node)}),m},[r,c]),h=q.useMemo(()=>{const m=l.map(x=>{const S=zme(x.latitude),b=Zz[S%Zz.length],T=$z.includes(x.role),C=x.node_num===r,M=f.has(x.node_num),D=r===null||C||M;return{id:String(x.node_num),name:x.short_name,value:x.node_num,symbolSize:Bme(x.role),itemStyle:{color:T?b:"#111827",borderColor:b,borderWidth:T?0:2,opacity:D?1:.15},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace",color:D?"#94a3b8":"#94a3b820"},nodeNum:x.node_num,longName:x.long_name,role:x.role}}),y=c.map(x=>{const S=r===null||x.from_node===r||x.to_node===r;return{source:String(x.from_node),target:String(x.to_node),value:x.snr,lineStyle:{color:Ome(x.snr),width:S&&r!==null?2:1,opacity:r===null?.4:S?.6:.04}}});return{nodes:m,links:y}},[l,c,r,f]),v=q.useMemo(()=>({backgroundColor:"#111827",tooltip:{trigger:"item",backgroundColor:"#1e293b",borderColor:"#334155",textStyle:{color:"#e2e8f0",fontFamily:"JetBrains Mono, monospace",fontSize:11},formatter:m=>{if(m.data&&m.data.longName){const y=m.data;return`${y.name}
${y.longName}
Role: ${y.role}`}return""}},series:[{type:"graph",layout:"force",roam:!0,draggable:!0,animation:!1,data:h.nodes,links:h.links,force:{repulsion:200,edgeLength:[80,120],gravity:.1},emphasis:{focus:"adjacency",blurScope:"coordinateSystem",scale:1.1,lineStyle:{width:2}},blur:{itemStyle:{opacity:.15},lineStyle:{opacity:.04}},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace"},edgeLabel:{show:!1},edgeSymbol:["none","none"]}]}),[h]),p=q.useCallback(m=>{if(m.data&&"nodeNum"in m.data){const y=m.data.nodeNum;n(r===y?null:y??null)}},[r,n]),g=q.useMemo(()=>({click:p}),[p]);return q.useEffect(()=>{var y;const m=(y=i.current)==null?void 0:y.getEchartsInstance();m&&m.setOption(v,{notMerge:!1,lazyUpdate:!0})},[v]),A.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[A.jsx(Nme,{ref:i,option:v,style:{height:"540px",width:"100%"},onEvents:g,opts:{renderer:"canvas"}}),A.jsxs("div",{className:"absolute top-4 left-4 flex items-center gap-2 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2",children:[A.jsx(D3,{size:14,className:"text-slate-500"}),A.jsx("div",{className:"flex gap-1",children:[{key:"connected",label:"Connected"},{key:"infra",label:"Infra"},{key:"all",label:"All"}].map(({key:m,label:y})=>A.jsx("button",{onClick:()=>o(m),className:`px-2 py-1 text-xs rounded transition-colors ${a===m?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:y},m))}),A.jsxs("span",{className:"text-xs text-slate-500 ml-2",children:[l.length," nodes • ",c.length," edges"]})]}),A.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[A.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Edge Quality (SNR)"}),A.jsx("div",{className:"space-y-1",children:[{label:"Excellent (>12)",color:"#22c55e"},{label:"Good (8-12)",color:"#4ade80"},{label:"Fair (5-8)",color:"#f59e0b"},{label:"Marginal (3-5)",color:"#f97316"},{label:"Poor (<3)",color:"#ef4444"}].map(m=>A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("div",{className:"w-4 h-0.5",style:{backgroundColor:m.color}}),A.jsx("span",{className:"text-xs text-slate-500",children:m.label})]},m.label))})]}),A.jsxs("div",{className:"absolute bottom-4 right-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[A.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Node Type"}),A.jsxs("div",{className:"space-y-2",children:[A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-500"}),A.jsx("span",{className:"text-xs text-slate-500",children:"Infrastructure"})]}),A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("div",{className:"w-3 h-3 rounded-full bg-gray-900 border-2 border-blue-500"}),A.jsx("span",{className:"text-xs text-slate-500",children:"Client"})]})]})]})]})}function a8(t,e){const r=q.useRef(e);q.useEffect(function(){e!==r.current&&t.attributionControl!=null&&(r.current!=null&&t.attributionControl.removeAttribution(r.current),e!=null&&t.attributionControl.addAttribution(e)),r.current=e},[t,e])}function Fme(t,e,r){e.center!==r.center&&t.setLatLng(e.center),e.radius!=null&&e.radius!==r.radius&&t.setRadius(e.radius)}const Gme=1;function jme(t){return Object.freeze({__version:Gme,map:t})}function o8(t,e){return Object.freeze({...t,...e})}const s8=q.createContext(null),l8=s8.Provider;function c_(){const t=q.useContext(s8);if(t==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return t}function Hme(t){function e(r,n){const{instance:i,context:a}=t(r).current;return q.useImperativeHandle(n,()=>i),r.children==null?null:Ec.createElement(l8,{value:a},r.children)}return q.forwardRef(e)}function Wme(t){function e(r,n){const[i,a]=q.useState(!1),{instance:o}=t(r,a).current;q.useImperativeHandle(n,()=>o),q.useEffect(function(){i&&o.update()},[o,i,r.children]);const s=o._contentNode;return s?h3.createPortal(r.children,s):null}return q.forwardRef(e)}function Ume(t){function e(r,n){const{instance:i}=t(r).current;return q.useImperativeHandle(n,()=>i),null}return q.forwardRef(e)}function FL(t,e){const r=q.useRef();q.useEffect(function(){return e!=null&&t.instance.on(e),r.current=e,function(){r.current!=null&&t.instance.off(r.current),r.current=null}},[t,e])}function f_(t,e){const r=t.pane??e.pane;return r?{...t,pane:r}:t}function Zme(t,e){return function(n,i){const a=c_(),o=t(f_(n,a),a);return a8(a.map,n.attribution),FL(o.current,n.eventHandlers),e(o.current,a,n,i),o}}var QT={exports:{}};/* @preserve +`:"
",y=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],v,null,h)})},e.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=Ae(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),v=this._renderMode,p=r.positionDefault,g=Th([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),m=g.get("trigger");if(!(m!=null&&m!=="item")){var y=u.getDataParams(c,f),x=new s1;y.marker=x.makeTooltipMarker("item",Yl(y.color),v);var S=eI(u.formatTooltip(c,!1,f)),b=g.get("order"),T=g.get("valueFormatter"),C=S.frag,M=C?oI(T?J({valueFormatter:T},C):C,x,v,b,a.get("useUTC"),g.get("textStyle")):S.text,D="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,M,y,D,r.offsetX,r.offsetY,r.position,r.target,x)}),i({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=Ae(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(se(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=ye(l),l.content=Wr(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var v=r.positionDefault,p=Th(f,this._tooltipModel,v?{position:v}:null),g=p.get("content"),m=Math.random()+"",y=new s1;this._showOrMove(p,function(){var x=ye(p.get("formatterParams")||{});this._showTooltipContent(p,g,x,m,r.offsetX,r.offsetY,r.position,n,y)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var f=this._tooltipContent;f.setEnterable(r.get("enterable"));var h=r.get("formatter");l=l||r.get("position");var v=n,p=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),g=p.color;if(h)if(se(h)){var m=r.ecModel.get("useUTC"),y=ee(i)?i[0]:i,x=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=h,x&&(v=Ed(y.axisValue,v,m)),v=q2(v,i,!0)}else if(me(h)){var S=le(function(b,T){b===this._ticket&&(f.setContent(T,c,r,g,l),this._updatePosition(r,l,o,s,f,i,u))},this);this._ticket=a,v=h(i,a,S)}else v=h;f.setContent(v,c,r,g,l),f.show(r,g),this._updatePosition(r,l,o,s,f,i,u)}},e.prototype._getNearestPoint=function(r,n,i,a,o){if(i==="axis"||ee(n))return{color:a||o};if(!ee(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var f=o.getSize(),h=r.get("align"),v=r.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),me(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:f.slice()})),ee(n))i=oe(n[0],u),a=oe(n[1],c);else if(we(n)){var g=n;g.width=f[0],g.height=f[1];var m=wt(g,{width:u,height:c});i=m.x,a=m.y,h=null,v=null}else if(se(n)&&l){var y=sde(n,p,f,r.get("borderWidth"));i=y[0],a=y[1]}else{var y=ade(i,a,o,u,c,h?null:20,v?null:20);i=y[0],a=y[1]}if(h&&(i-=VO(h)?f[0]/2:h==="right"?f[0]:0),v&&(a-=VO(v)?f[1]/2:v==="bottom"?f[1]:0),PH(r)){var y=ode(i,a,o,u,c);i=y[0],a=y[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&N(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&N(u,function(h,v){var p=f[v]||{},g=h.seriesDataIndices||[],m=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&g.length===m.length,o&&N(g,function(y,x){var S=m[x];o=o&&y.seriesIndex===S.seriesIndex&&y.dataIndex===S.dataIndex}),a&&N(h.seriesDataIndices,function(y){var x=y.seriesIndex,S=n[x],b=a[x];S&&b&&b.data!==S.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,n){We.node||!n.getDom()||(Kv(this,"_updatePosition"),this._tooltipContent.dispose(),PT("itemTooltip",n))},e.type="tooltip",e}(mt);function Th(t,e,r){var n=e.ecModel,i;r?(i=new Ge(r,n,n),i=new Ge(e.option,i,n)):i=e;for(var a=t.length-1;a>=0;a--){var o=t[a];o&&(o instanceof Ge&&(o=o.get("tooltip",!0)),se(o)&&(o={formatter:o}),o&&(i=new Ge(o,i,n)))}return i}function BO(t,e){return t.dispatchAction||le(e.dispatchAction,e)}function ade(t,e,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(t+l+a+2>n?t-=l+a:t+=a),o!=null&&(e+u+o>i?e-=u+o:e+=o),[t,e]}function ode(t,e,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return t=Math.min(t+o,n)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function sde(t,e,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(t){case"inside":s=e.x+u/2-i/2,l=e.y+c/2-a/2;break;case"top":s=e.x+u/2-i/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+c+o;break;case"left":s=e.x-i-o,l=e.y+c/2-a/2;break;case"right":s=e.x+u+o,l=e.y+c/2-a/2}return[s,l]}function VO(t){return t==="center"||t==="middle"}function lde(t,e,r){var n=y2(t).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=ff(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Ae(u).tooltipConfig;if(c&&c.name===t.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function ude(t){Oe(Gd),t.registerComponentModel(Uve),t.registerComponentView(ide),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Nt),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Nt)}var cde=["rect","polygon","keep","clear"];function fde(t,e){var r=gt(t?t.brush:[]);if(r.length){var n=[];N(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=t&&t.toolbox;ee(i)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),hde(s),e&&!s.length&&s.push.apply(s,cde)}}function hde(t){var e={};N(t,function(r){e[r]=1}),t.length=0,N(e,function(r,n){t.push(n)})}var FO=N;function jO(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function BT(t,e,r){var n={};return FO(e,function(a){var o=n[a]=i();FO(t[a],function(s,l){if(hr.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new hr(u),l==="opacity"&&(u=ye(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new hr(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function EH(t,e,r){var n;N(r,function(i){e.hasOwnProperty(i)&&jO(e[i])&&(n=!0)}),n&&N(r,function(i){e.hasOwnProperty(i)&&jO(e[i])?t[i]=ye(e[i]):delete t[i]})}function vde(t,e,r,n,i,a){var o={};N(t,function(f){var h=hr.prepareVisualTypes(e[f]);o[f]=h});var s;function l(f){return oM(r,s,f)}function u(f,h){DF(r,s,f,h)}r.each(c);function c(f,h){s=f;var v=r.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var p=n.call(i,f),g=e[p],m=o[p],y=0,x=m.length;ye[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&ZO(e)}};function ZO(t){return new Ce(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var Sde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new QM(n.getZr())).on("brush",le(this._onBrush,this)).mount()},e.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},e.prototype.updateTransform=function(r,n,i,a){RH(n),this._updateController(r,n,i,a)},e.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},e.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},e.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:ye(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:ye(i),$from:n})},e.type="brush",e}(mt),wde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.areas=[],r.brushOption={},r}return e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&EH(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(r){r&&(this.areas=re(r,function(n){return $O(this.option,n)},this))},e.prototype.setBrushOption=function(r){this.brushOption=$O(this.option,r),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:X.color.backgroundTint,borderColor:X.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:X.color.disabled},e}(Be);function $O(t,e){return Re({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Ge(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var bde=["rect","polygon","lineX","lineY","keep","clear"],Tde=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,N(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(r,n,i){this.render(r,n,i)},e.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return N(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},e.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(r){var n={show:!0,type:bde.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return n},e}(Kn);function Cde(t){t.registerComponentView(Sde),t.registerComponentModel(wde),t.registerPreprocessor(fde),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,gde),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,r){r.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Nt),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Nt),tc("brush",Tde)}var Mde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:X.size.m,backgroundColor:X.color.transparent,borderColor:X.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:X.color.primary},subtextStyle:{fontSize:12,color:X.color.quaternary}},e}(Be),Lde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=pe(r.get("textBaseline"),r.get("textVerticalAlign")),c=new Xe({style:pt(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=r.get("subtext"),v=new Xe({style:pt(s,{text:h,fill:s.getTextColor(),y:f.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=r.get("link"),g=r.get("sublink"),m=r.get("triggerEvent",!0);c.silent=!p&&!m,v.silent=!g&&!m,p&&c.on("click",function(){dy(p,"_"+r.get("target"))}),g&&v.on("click",function(){dy(g,"_"+r.get("subtarget"))}),Ae(c).eventData=Ae(v).eventData=m?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),h&&a.add(v);var y=a.getBoundingRect(),x=r.getBoxLayoutParams();x.width=y.width,x.height=y.height;var S=or(r,i),b=wt(x,S.refContainer,r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?b.x+=b.width:l==="center"&&(b.x+=b.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?b.y+=b.height:u==="middle"&&(b.y+=b.height/2),u=u||"top"),a.x=b.x,a.y=b.y,a.markRedraw();var T={align:l,verticalAlign:u};c.setStyle(T),v.setStyle(T),y=a.getBoundingRect();var C=b.margin,M=r.getItemStyle(["color","opacity"]);M.fill=r.get("backgroundColor");var D=new ze({shape:{x:y.x-C[3],y:y.y-C[0],width:y.width+C[1]+C[3],height:y.height+C[0]+C[2],r:r.get("borderRadius")},style:M,subPixelOptimize:!0,silent:!0});a.add(D)}},e.type="title",e}(mt);function Ade(t){t.registerComponentModel(Mde),t.registerComponentView(Lde)}var YO=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode="box",r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(r){this.option.autoPlay=!!r},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],N(n,function(u,c){var f=rr(cf(u),""),h;we(u)?(h=ye(u),h.value=c):h=c,o.push(h),a.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Zr([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:X.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:X.color.secondary},data:[]},e}(Be),NH=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline.slider",e.defaultOption=Ts(YO.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:X.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:X.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:X.color.tertiary},itemStyle:{color:X.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:X.color.accent50,borderColor:X.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:X.color.accent50,borderColor:X.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:X.color.accent60},itemStyle:{color:X.color.accent60,borderColor:X.color.accent60},controlStyle:{color:X.color.accent70,borderColor:X.color.accent70}},progress:{lineStyle:{color:X.color.accent30},itemStyle:{color:X.color.accent40}},data:[]}),e}(YO);Bt(NH,U0.prototype);var Pde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline",e}(mt),Dde=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this,r,n,i)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(fi),AS=Math.PI,XO=Ve(),kde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.api=n},e.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Kt("nameValue",{noName:!0,value:c})},N(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=Ede(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:AS/2},f=a==="vertical"?o.height:o.width,h=r.getModel("controlStyle"),v=h.get("show",!0),p=v?h.get("itemSize"):0,g=v?h.get("itemGap"):0,m=p+g,y=r.get(["label","rotate"])||0;y=y*AS/180;var x,S,b,T=h.get("position",!0),C=v&&h.get("showPlayBtn",!0),M=v&&h.get("showPrevBtn",!0),D=v&&h.get("showNextBtn",!0),I=0,k=f;T==="left"||T==="bottom"?(C&&(x=[0,0],I+=m),M&&(S=[I,0],I+=m),D&&(b=[k-p,0],k-=m)):(C&&(x=[k-p,0],k-=m),M&&(S=[0,0],I+=m),D&&(b=[k-p,0],k-=m));var E=[I,k];return r.get("inverse")&&E.reverse(),{viewRect:o,mainLength:f,orient:a,rotation:c[a],labelRotation:y,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:x,prevBtnPosition:S,nextBtnPosition:b,axisExtent:E,controlSize:p,controlGap:g}},e.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=fr(),l=o.x,u=o.y+o.height;Ii(s,s,[-l,-u]),vo(s,s,-AS/2),Ii(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=x(o),f=x(i.getBoundingRect()),h=x(a.getBoundingRect()),v=[i.x,i.y],p=[a.x,a.y];p[0]=v[0]=c[0][0];var g=r.labelPosOpt;if(g==null||se(g)){var m=g==="+"?0:1;S(v,f,c,1,m),S(p,h,c,1,1-m)}else{var m=g>=0?0:1;S(v,f,c,1,m),p[1]=v[1]+g}i.setPosition(v),a.setPosition(p),i.rotation=a.rotation=r.rotation,y(i),y(a);function y(b){b.originX=c[0][0]-b.x,b.originY=c[1][0]-b.y}function x(b){return[[b.x,b.x+b.width],[b.y,b.y+b.height]]}function S(b,T,C,M,D){b[M]+=C[M][D]-T[M][D]}},e.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=Ide(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Dde("value",o,r.axisExtent,a);return l.model=n,l},e.prototype._createGroup=function(r){var n=this[r]=new _e;return this.group.add(n),n},e.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new Wt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:J({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Wt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Se({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],N(l,function(u){var c=i.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),v=f.getModel(["emphasis","itemStyle"]),p=f.getModel(["progress","itemStyle"]),g={x:c,y:0,onclick:le(o._changeTimeline,o,u.value)},m=qO(f,h,n,g);m.ensureState("emphasis").style=v.getItemStyle(),m.ensureState("progress").style=p.getItemStyle(),is(m);var y=Ae(m);f.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(m)})},e.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],N(u,function(c){var f=c.tickValue,h=l.getItemModel(f),v=h.getModel("label"),p=h.getModel(["emphasis","label"]),g=h.getModel(["progress","label"]),m=i.dataToCoord(c.tickValue),y=new Xe({x:m,y:0,rotation:r.labelRotation-r.rotation,onclick:le(o._changeTimeline,o,f),silent:!1,style:pt(v,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});y.ensureState("emphasis").style=pt(p),y.ensureState("progress").style=pt(g),n.add(y),is(y),XO(y).dataIndex=f,o._tickLabels.push(y)})}},e.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),f=a.get("inverse",!0);h(r.nextBtnPosition,"next",le(this._changeTimeline,this,f?"-":"+")),h(r.prevBtnPosition,"prev",le(this._changeTimeline,this,f?"+":"-")),h(r.playPosition,c?"stop":"play",le(this._handlePlayClick,this,!c),!0);function h(v,p,g,m){if(v){var y=Ei(pe(a.get(["controlStyle",p+"BtnSize"]),o),o),x=[0,-y/2,y,y],S=Rde(a,p+"Icon",x,{x:v[0],y:v[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:g});S.ensureState("emphasis").style=u,n.add(S),is(S)}}},e.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=le(u._handlePointerDrag,u),f.ondragend=le(u._handlePointerDragend,u),KO(f,u._progressLine,s,i,a,!0)},onUpdate:function(f){KO(f,u._progressLine,s,i,a)}};this._currentPointer=qO(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},e.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},e.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=Ln(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(s[o]=+s[o].toFixed(p)),[s,v]}var zg={min:Ie(Og,"min"),max:Ie(Og,"max"),average:Ie(Og,"average"),median:Ie(Og,"median")};function vd(t,e){if(e){var r=t.getData(),n=t.coordinateSystem,i=n&&n.dimensions;if(!Fde(e)&&!ee(e.coord)&&ee(i)){var a=OH(e,r,n,t);if(e=ye(e),e.type&&zg[e.type]&&a.baseAxis&&a.valueAxis){var o=Ee(i,a.baseAxis.dim),s=Ee(i,a.valueAxis.dim),l=zg[e.type](r,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!ee(i)){e.coord=[];var u=t.getBaseAxis();if(u&&e.type&&zg[e.type]){var c=n.getOtherAxis(u);c&&(e.value=Xy(r,r.mapDimension(c.dim),e.type))}}else for(var f=e.coord,h=0;h<2;h++)zg[f[h]]&&(f[h]=Xy(r,r.mapDimension(i[h]),f[h]));return e}}function OH(t,e,r,n){var i={};return t.valueIndex!=null||t.valueDim!=null?(i.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,i.valueAxis=r.getAxis(jde(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function jde(t,e){var r=t.getData().getDimensionInfo(e);return r&&r.coordDim}function dd(t,e){return t&&t.containData&&e.coord&&!FT(e)?t.containData(e.coord):!0}function Gde(t,e,r){return t&&t.containZone&&e.coord&&r.coord&&!FT(e)&&!FT(r)?t.containZone(e.coord,r.coord):!0}function zH(t,e){return t?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return ss(o,e[a])}:function(r,n,i,a){return ss(r.value,e[a])}}function Xy(t,e,r){if(r==="average"){var n=0,i=0;return t.each(e,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?t.getMedian(e):t.getDataExtent(e)[r==="max"?1:0]}var PS=Ve(),kL=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this.markerGroupMap=ve()},e.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){PS(s).keep=!1}),n.eachSeries(function(s){var l=Sa.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!PS(s).keep&&a.group.remove(s.group)}),Hde(n,o,this.type)},e.prototype.markKeep=function(r){PS(r).keep=!0},e.prototype.toggleBlurSeries=function(r,n){var i=this;N(r,function(a){var o=Sa.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?Q4(l):M2(l))})}})},e.type="marker",e}(mt);function Hde(t,e,r){t.eachSeries(function(n){var i=Sa.getMarkerModelFromSeries(n,r),a=e.get(n.id);if(i&&a&&a.group){var o=$l(i),s=o.z,l=o.zlevel;j0(a.group,s,l)}})}function JO(t,e,r){var n=e.coordinateSystem,i=r.getWidth(),a=r.getHeight(),o=n&&n.getArea&&n.getArea();t.each(function(s){var l=t.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:i,f=u?o?o.height:0:a,h=u&&o?o.x:0,v=u&&o?o.y:0,p,g=oe(l.get("x"),c)+h,m=oe(l.get("y"),f)+v;if(!isNaN(g)&&!isNaN(m))p=[g,m];else if(e.getMarkerPosition)p=e.getMarkerPosition(t.getValues(t.dimensions,s));else if(n){var y=t.get(n.dimensions[0],s),x=t.get(n.dimensions[1],s);p=n.dataToPoint([y,x])}isNaN(g)||(p[0]=g),isNaN(m)||(p[1]=m),t.setItemLayout(s,p)})}var Wde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Sa.getMarkerModelFromSeries(a,"markPoint");o&&(JO(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Bd),f=Ude(o,r,n);n.setData(f),JO(n.getData(),r,a),f.each(function(h){var v=f.getItemModel(h),p=v.getShallow("symbol"),g=v.getShallow("symbolSize"),m=v.getShallow("symbolRotate"),y=v.getShallow("symbolOffset"),x=v.getShallow("symbolKeepAspect");if(me(p)||me(g)||me(m)||me(y)){var S=n.getRawValue(h),b=n.getDataParams(h);me(p)&&(p=p(S,b)),me(g)&&(g=g(S,b)),me(m)&&(m=m(S,b)),me(y)&&(y=y(S,b))}var T=v.getModel("itemStyle").getItemStyle(),C=v.get("z2"),M=Nd(l,"color");T.fill||(T.fill=M),f.setItemVisual(h,{z2:pe(C,0),symbol:p,symbolSize:g,symbolRotate:m,symbolOffset:y,symbolKeepAspect:x,style:T})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(v){Ae(v).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markPoint",e}(kL);function Ude(t,e,r){var n;t?n=re(t&&t.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return J(J({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Zr(n,r),a=re(r.get("data"),Ie(vd,e));t&&(a=tt(a,Ie(dd,t)));var o=zH(!!t,n);return i.initData(a,null,o),i}function Zde(t){t.registerComponentModel(Vde),t.registerComponentView(Wde),t.registerPreprocessor(function(e){DL(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var $de=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Sa),Bg=Ve(),Yde=function(t,e,r,n){var i=t.getData(),a;if(ee(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=Sr(n.yAxis,n.xAxis);else{var u=OH(n,i,e,t);s=u.valueAxis;var c=_M(i,u.valueDataDim);l=Xy(i,c,o)}var f=s.dim==="x"?0:1,h=1-f,v=ye(n),p={coord:[]};v.type=null,v.coord=[],v.coord[h]=-1/0,p.coord[h]=1/0;var g=r.get("precision");g>=0&&qe(l)&&(l=+l.toFixed(Math.min(g,20))),v.coord[f]=p.coord[f]=l,a=[v,p,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var m=[vd(t,a[0]),vd(t,a[1]),J({},a[2])];return m[2].type=m[2].type||null,Re(m[2],m[0]),Re(m[2],m[1]),m};function qy(t){return!isNaN(t)&&!isFinite(t)}function ez(t,e,r,n){var i=1-t,a=n.dimensions[t];return qy(e[i])&&qy(r[i])&&e[t]===r[t]&&n.getAxis(a).containData(e[t])}function Xde(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,n=e[1].coord;if(r&&n&&(ez(1,r,n,t)||ez(0,r,n,t)))return!0}return dd(t,e[0])&&dd(t,e[1])}function DS(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=oe(o.get("x"),i.getWidth()),u=oe(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=a.dimensions,f=t.get(c[0],e),h=t.get(c[1],e);s=a.dataToPoint([f,h])}if(ds(a,"cartesian2d")){var v=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;qy(t.get(c[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[r?0:1]):qy(t.get(c[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}t.setItemLayout(e,s)}var qde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Sa.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Bg(o).from,u=Bg(o).to;l.each(function(c){DS(l,c,!0,a,i),DS(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new qM);this.group.add(c.group);var f=Kde(o,r,n),h=f.from,v=f.to,p=f.line;Bg(n).from=h,Bg(n).to=v,n.setData(p);var g=n.get("symbol"),m=n.get("symbolSize"),y=n.get("symbolRotate"),x=n.get("symbolOffset");ee(g)||(g=[g,g]),ee(m)||(m=[m,m]),ee(y)||(y=[y,y]),ee(x)||(x=[x,x]),f.from.each(function(b){S(h,b,!0),S(v,b,!1)}),p.each(function(b){var T=p.getItemModel(b),C=T.getModel("lineStyle").getLineStyle();p.setItemLayout(b,[h.getItemLayout(b),v.getItemLayout(b)]);var M=T.get("z2");C.stroke==null&&(C.stroke=h.getItemVisual(b,"style").fill),p.setItemVisual(b,{z2:pe(M,0),fromSymbolKeepAspect:h.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(b,"symbolOffset"),fromSymbolRotate:h.getItemVisual(b,"symbolRotate"),fromSymbolSize:h.getItemVisual(b,"symbolSize"),fromSymbol:h.getItemVisual(b,"symbol"),toSymbolKeepAspect:v.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(b,"symbolOffset"),toSymbolRotate:v.getItemVisual(b,"symbolRotate"),toSymbolSize:v.getItemVisual(b,"symbolSize"),toSymbol:v.getItemVisual(b,"symbol"),style:C})}),c.updateData(p),f.line.eachItemGraphicEl(function(b){Ae(b).dataModel=n,b.traverse(function(T){Ae(T).dataModel=n})});function S(b,T,C){var M=b.getItemModel(T);DS(b,T,C,r,a);var D=M.getModel("itemStyle").getItemStyle();D.fill==null&&(D.fill=Nd(l,"color")),b.setItemVisual(T,{symbolKeepAspect:M.get("symbolKeepAspect"),symbolOffset:pe(M.get("symbolOffset",!0),x[C?0:1]),symbolRotate:pe(M.get("symbolRotate",!0),y[C?0:1]),symbolSize:pe(M.get("symbolSize"),m[C?0:1]),symbol:pe(M.get("symbol",!0),g[C?0:1]),style:D})}this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markLine",e}(kL);function Kde(t,e,r){var n;t?n=re(t&&t.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return J(J({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Zr(n,r),a=new Zr(n,r),o=new Zr([],r),s=re(r.get("data"),Ie(Yde,e,t,r));t&&(s=tt(s,Ie(Xde,t)));var l=zH(!!t,n);return i.initData(re(s,function(u){return u[0]}),null,l),a.initData(re(s,function(u){return u[1]}),null,l),o.initData(re(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function Qde(t){t.registerComponentModel($de),t.registerComponentView(qde),t.registerPreprocessor(function(e){DL(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Jde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Sa),Vg=Ve(),epe=function(t,e,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=vd(t,i),s=vd(t,a),l=o.coord,u=s.coord;l[0]=Sr(l[0],-1/0),l[1]=Sr(l[1],-1/0),u[0]=Sr(u[0],1/0),u[1]=Sr(u[1],1/0);var c=T0([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function Ky(t){return!isNaN(t)&&!isFinite(t)}function tz(t,e,r,n){var i=1-t;return Ky(e[i])&&Ky(r[i])}function tpe(t,e){var r=e.coord[0],n=e.coord[1],i={coord:r,x:e.x0,y:e.y0},a={coord:n,x:e.x1,y:e.y1};return ds(t,"cartesian2d")?r&&n&&(tz(1,r,n)||tz(0,r,n))?!0:Gde(t,i,a):dd(t,i)||dd(t,a)}function rz(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=oe(o.get(r[0]),i.getWidth()),u=oe(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=t.getValues(["x0","y0"],e),f=t.getValues(["x1","y1"],e),h=a.clampData(c),v=a.clampData(f),p=[];r[0]==="x0"?p[0]=h[0]>v[0]?f[0]:c[0]:p[0]=h[0]>v[0]?c[0]:f[0],r[1]==="y0"?p[1]=h[1]>v[1]?f[1]:c[1]:p[1]=h[1]>v[1]?c[1]:f[1],s=n.getMarkerPosition(p,r,!0)}else{var g=t.get(r[0],e),m=t.get(r[1],e),y=[g,m];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(ds(a,"cartesian2d")){var x=a.getAxis("x"),S=a.getAxis("y"),g=t.get(r[0],e),m=t.get(r[1],e);Ky(g)?s[0]=x.toGlobalCoord(x.getExtent()[r[0]==="x0"?0:1]):Ky(m)&&(s[1]=S.toGlobalCoord(S.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var nz=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],rpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Sa.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=re(nz,function(f){return rz(s,l,f,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new _e});this.group.add(c.group),this.markKeep(c);var f=npe(o,r,n);n.setData(f),f.each(function(h){var v=re(nz,function(k){return rz(f,h,k,r,a)}),p=o.getAxis("x").scale,g=o.getAxis("y").scale,m=p.getExtent(),y=g.getExtent(),x=[p.parse(f.get("x0",h)),p.parse(f.get("x1",h))],S=[g.parse(f.get("y0",h)),g.parse(f.get("y1",h))];Ln(x),Ln(S);var b=!(m[0]>x[1]||m[1]S[1]||y[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:X.size.m,align:"auto",backgroundColor:X.color.transparent,borderColor:X.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:X.color.disabled,inactiveBorderColor:X.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:X.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:X.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:X.color.tertiary,borderWidth:1,borderColor:X.color.border},emphasis:{selectorLabel:{show:!0,color:X.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e}(Be),Zu=Ie,GT=N,Fg=_e,BH=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new Fg),this.group.add(this._selectorGroup=new Fg),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=or(r,i).refContainer,f=r.getBoxLayoutParams(),h=r.get("padding"),v=wt(f,c,h),p=this.layoutInner(r,o,v,a,l,u),g=wt(Se({width:p.width,height:p.height},f),c,h);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=MH(p,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=ve(),f=n.get("selectedMode"),h=n.get("triggerEvent"),v=[];i.eachRawSeries(function(p){!p.get("legendHoverLink")&&v.push(p.id)}),GT(n.getData(),function(p,g){var m=this,y=p.get("name");if(!this.newlineDisabled&&(y===""||y===` +`)){var x=new Fg;x.newline=!0,u.add(x);return}var S=i.getSeriesByName(y)[0];if(!c.get(y))if(S){var b=S.getData(),T=b.getVisual("legendLineStyle")||{},C=b.getVisual("legendIcon"),M=b.getVisual("style"),D=this._createItem(S,y,g,p,n,r,T,M,C,f,a);D.on("click",Zu(iz,y,null,a,v)).on("mouseover",Zu(HT,S.name,null,a,v)).on("mouseout",Zu(WT,S.name,null,a,v)),i.ssr&&D.eachChild(function(I){var k=Ae(I);k.seriesIndex=S.seriesIndex,k.dataIndex=g,k.ssrType="legend"}),h&&D.eachChild(function(I){m.packEventData(I,n,S,g,y)}),c.set(y,!0)}else i.eachRawSeries(function(I){var k=this;if(!c.get(y)&&I.legendVisualProvider){var E=I.legendVisualProvider;if(!E.containName(y))return;var z=E.indexOfName(y),O=E.getItemVisual(z,"style"),F=E.getItemVisual(z,"legendIcon"),G=Ur(O.fill);G&&G[3]===0&&(G[3]=.2,O=J(J({},O),{fill:ti(G,"rgba")}));var j=this._createItem(I,y,g,p,n,r,{},O,F,f,a);j.on("click",Zu(iz,null,y,a,v)).on("mouseover",Zu(HT,null,y,a,v)).on("mouseout",Zu(WT,null,y,a,v)),i.ssr&&j.eachChild(function(Z){var V=Ae(Z);V.seriesIndex=I.seriesIndex,V.dataIndex=g,V.ssrType="legend"}),h&&j.eachChild(function(Z){k.packEventData(Z,n,I,g,y)}),c.set(y,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},e.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};Ae(r).eventData=s},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();GT(r,function(u){var c=u.type,f=new Xe({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var h=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);vr(f,{normal:h,emphasis:v},{defaultText:u.title}),is(f)})},e.prototype._createItem=function(r,n,i,a,o,s,l,u,c,f,h){var v=r.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),m=o.isSelected(n),y=a.get("symbolRotate"),x=a.get("symbolKeepAspect"),S=a.get("icon");c=S||c||"roundRect";var b=ope(c,a,l,u,v,m,h),T=new Fg,C=a.getModel("textStyle");if(me(r.getLegendIcon)&&(!S||S==="inherit"))T.add(r.getLegendIcon({itemWidth:p,itemHeight:g,icon:c,iconRotate:y,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:x}));else{var M=S==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;T.add(spe({itemWidth:p,itemHeight:g,icon:c,iconRotate:M,itemStyle:b.itemStyle,symbolKeepAspect:x}))}var D=s==="left"?p+5:-5,I=s,k=o.get("formatter"),E=n;se(k)&&k?E=k.replace("{name}",n??""):me(k)&&(E=k(n));var z=m?C.getTextColor():a.get("inactiveColor");T.add(new Xe({style:pt(C,{text:E,x:D,y:g/2,fill:z,align:I,verticalAlign:"middle"},{inheritColor:z})}));var O=new ze({shape:T.getBoundingRect(),style:{fill:"transparent"}}),F=a.getModel("tooltip");return F.get("show")&&go({el:O,componentModel:o,itemName:n,itemTooltipOption:F.option}),T.add(O),T.eachChild(function(G){G.silent=!0}),O.silent=!f,this.getContentGroup().add(T),is(T),T.__legendDataIndex=i,T},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();kl(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){kl("horizontal",u,r.get("selectorItemGap",!0));var h=u.getBoundingRect(),v=[-h.x,-h.y],p=r.get("selectorButtonGap",!0),g=r.getOrient().index,m=g===0?"width":"height",y=g===0?"height":"width",x=g===0?"y":"x";s==="end"?v[g]+=c[m]+p:f[g]+=h[m]+p,v[1-g]+=c[y]/2-h[y]/2,u.x=v[0],u.y=v[1],l.x=f[0],l.y=f[1];var S={x:0,y:0};return S[m]=c[m]+p+h[m],S[y]=Math.max(c[y],h[y]),S[x]=Math.min(0,h[x]+v[1-g]),S}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(mt);function ope(t,e,r,n,i,a,o){function s(m,y){m.lineWidth==="auto"&&(m.lineWidth=y.lineWidth>0?2:0),GT(m,function(x,S){m[S]==="inherit"&&(m[S]=y[S])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=t.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:Xc(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var h=e.getModel("lineStyle"),v=h.getLineStyle();if(s(v,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!a){var p=e.get("inactiveBorderWidth"),g=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),v.stroke=h.get("inactiveColor"),v.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function spe(t){var e=t.icon||"roundRect",r=Ut(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=X.color.neutral00,r.style.lineWidth=2),r}function iz(t,e,r,n){WT(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),HT(t,e,r,n)}function VH(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,i=e.length;ni[o],m=[-v.x,-v.y];n||(m[a]=c[u]);var y=[0,0],x=[-p.x,-p.y],S=pe(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var b=r.get("pageButtonPosition",!0);b==="end"?x[a]+=i[o]-p[o]:y[a]+=p[o]+S}x[1-a]+=v[s]/2-p[s]/2,c.setPosition(m),f.setPosition(y),h.setPosition(x);var T={x:0,y:0};if(T[o]=g?i[o]:v[o],T[s]=Math.max(v[s],p[s]),T[l]=Math.min(0,p[l]+x[1-a]),f.__rectSize=i[o],g){var C={x:0,y:0};C[o]=Math.max(i[o]-p[o]-S,0),C[s]=T[s],f.setClipPath(new ze({shape:C})),f.__rectSize=C[o]}else h.eachChild(function(D){D.attr({invisible:!0,silent:!0})});var M=this._getPageInfo(r);return M.pageIndex!=null&&Qe(c,{x:M.contentPosition[0],y:M.contentPosition[1]},g?r:null),this._updatePageInfoView(r,M),T},e.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;N(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,v=i.childOfName(c);v&&(v.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",se(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=kS[o],l=IS[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],h=c.length,v=h?1:0,p={contentPosition:[i.x,i.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var g=b(f);p.contentPosition[o]=-g.s;for(var m=u+1,y=g,x=g,S=null;m<=h;++m)S=b(c[m]),(!S&&x.e>y.s+a||S&&!T(S,y.s))&&(x.i>y.i?y=x:y=S,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),x=S;for(var m=u-1,y=g,x=g,S=null;m>=-1;--m)S=b(c[m]),(!S||!T(x,S.s))&&y.i=M&&C.s<=M+a}},e.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},e.type="legend.scroll",e}(BH);function hpe(t){t.registerAction("legendScroll","legendscroll",function(e,r){var n=e.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function vpe(t){Oe(FH),t.registerComponentModel(cpe),t.registerComponentView(fpe),hpe(t)}function dpe(t){Oe(FH),Oe(vpe)}var ppe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.inside",e.defaultOption=Ts(hd.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(hd),IL=Ve();function gpe(t,e,r){IL(t).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=r)})}function mpe(t,e){for(var r=IL(t).coordSysRecordMap,n=r.keys(),i=0;ia[i+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:r,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function wpe(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(e,r){var n=IL(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=ve());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=bH(a);N(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,ype(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=ve());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){jH(i,a);return}var c=Spe(l,a,r);o.enable(c.controlType,c.opt),wf(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var bpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return e.prototype.render=function(r,n,i){if(t.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),gpe(i,r,{pan:le(ES.pan,this),zoom:le(ES.zoom,this),scrollMove:le(ES.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){mpe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(TL),ES={zoom:function(t,e,r,n){var i=this.range,a=i.slice(),o=t.axisModels[0];if(o){var s=RS[e](null,[n.originX,n.originY],o,r,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(ps(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:lz(function(t,e,r,n,i,a){var o=RS[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:lz(function(t,e,r,n,i,a){var o=RS[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*a.scrollDelta})};function lz(t){return function(e,r,n,i){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=t(o,s,e,r,n,i);if(ps(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var RS={grid:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return t=t||[0,0],a.dim==="x"?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),r.mainType==="radiusAxis"?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(t,e,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return t=t||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function GH(t){CL(t),t.registerComponentModel(ppe),t.registerComponentView(bpe),wpe(t)}var Tpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Ts(hd.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:X.color.accent10,borderRadius:0,backgroundColor:X.color.transparent,dataBackground:{lineStyle:{color:X.color.accent30,width:.5},areaStyle:{color:X.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:X.color.accent40,width:.5},areaStyle:{color:X.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:X.color.neutral00,borderColor:X.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:X.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:X.color.tertiary},brushSelect:!0,brushStyle:{color:X.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:X.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e}(hd),Lh=ze,Cpe=1,NS=30,Mpe=7,Ah="horizontal",uz="vertical",Lpe=5,Ape=["line","bar","candlestick","scatter"],Ppe={easing:"cubicOut",duration:100,delay:0},Dpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._displayables={},r}return e.prototype.init=function(r,n){this.api=n,this._onBrush=le(this._onBrush,this),this._onBrushEnd=le(this._onBrushEnd,this)},e.prototype.render=function(r,n,i,a){if(t.prototype.render.apply(this,arguments),wf(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Kv(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new _e;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?Mpe:0,o=or(r,n).refContainer,s=this._findCoordRect(),l=r.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Ah?{right:o.width-s.x-s.width,top:o.height-NS-l-a,width:s.width,height:NS}:{right:l,top:s.y,width:NS,height:s.height},c=ou(r.option);N(["right","top","width","height"],function(h){c[h]==="ph"&&(c[h]=u[h])});var f=wt(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===uz&&this._size.reverse()},e.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Ah&&!o?{scaleY:l?1:-1,scaleX:1}:i===Ah&&o?{scaleY:l?1:-1,scaleX:-1}:i===uz&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new Lh({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new Lh({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:le(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(r.thisDim),h=o.getDataExtent(l),v=(h[1]-h[0])*.3;h=[h[0]-v,h[1]+v];var p=[0,n[1]],g=[0,n[0]],m=[[n[0],0],[0,0]],y=[],x=g[1]/Math.max(1,o.count()-1),S=n[0]/(f[1]-f[0]),b=r.thisAxis.type==="time",T=-x,C=Math.round(o.count()/n[0]),M;o.each([r.thisDim,l],function(z,O,F){if(C>0&&F%C){b||(T+=x);return}T=b?(+z-f[0])*S:T+x;var G=O==null||isNaN(O)||O==="",j=G?0:it(O,h,p,!0);G&&!M&&F?(m.push([m[m.length-1][0],0]),y.push([y[y.length-1][0],0])):!G&&M&&(m.push([T,0]),y.push([T,0])),G||(m.push([T,j]),y.push([T,j])),M=G}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var D=this.dataZoomModel;function I(z){var O=D.getModel(z?"selectedDataBackground":"dataBackground"),F=new _e,G=new Nr({shape:{points:u},segmentIgnoreThreshold:1,style:O.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),j=new br({shape:{points:c},segmentIgnoreThreshold:1,style:O.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return F.add(G),F.add(j),F}for(var k=0;k<3;k++){var E=I(k===1);this._displayables.sliderGroup.add(E),this._displayables.dataShadowSegs.push(E)}},e.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();N(l,function(u){if(!i&&!(n!==!0&&Ee(Ape,u.get("type"))<0)){var c=a.getComponent(Uo(o),s).axis,f=kpe(o),h,v=u.coordinateSystem;f!=null&&v.getOtherAxis&&(h=v.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var p=u.getData().mapDimension(o);i={thisAxis:c,series:u,thisDim:p,otherDim:f,otherAxisInverse:h}}},this)},this),i}},e.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new Lh({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Lh({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Cpe,fill:X.color.transparent}})),N([0,1],function(S){var b=l.get("handleIcon");!my[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var T=Ut(b,-1,0,2,2,null,!0);T.attr({cursor:Ipe(this._orient),draggable:!0,drift:le(this._onDragMove,this,S),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1),z2:5});var C=T.getBoundingRect(),M=l.get("handleSize");this._handleHeight=oe(M,this._size[1]),this._handleWidth=C.width/C.height*this._handleHeight,T.setStyle(l.getModel("handleStyle").getItemStyle()),T.style.strokeNoScale=!0,T.rectHover=!0,T.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),is(T);var D=l.get("handleColor");D!=null&&(T.style.fill=D),o.add(i[S]=T);var I=l.getModel("textStyle"),k=l.get("handleLabel")||{},E=k.show||!1;r.add(a[S]=new Xe({silent:!0,invisible:!E,style:pt(I,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:I.getTextColor(),font:I.getFont()}),z2:10}))},this);var v=h;if(f){var p=oe(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new ze({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),m=p*.8,y=n.moveHandleIcon=Ut(l.get("moveHandleIcon"),-m/2,-m/2,m,m,X.color.neutral00,!0);y.silent=!0,y.y=s[1]+p/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var x=Math.min(s[1]/2,Math.max(p,10));v=n.moveZone=new ze({invisible:!0,shape:{y:s[1]-x,height:p+x}}),v.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:"default",drift:le(this._onDragMove,this,"all"),ondragstart:le(this._showDataInfo,this,!0),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[it(r[0],[0,100],n,!0),it(r[1],[0,100],n,!0)]},e.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];ps(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?it(s.minSpan,l,o,!0):null,s.maxSpan!=null?it(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Ln([it(a[0],o,l,!0),it(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=Ln(i.slice()),o=this._size;N([0,1],function(v){var p=n.handles[v],g=this._handleHeight;p.attr({scaleX:g/2,scaleY:g/2,x:i[v]+(v?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;cn[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new Te(n,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();ps(0,l,o,0,u.minSpan!=null?it(u.minSpan,s,o,!0):null,u.maxSpan!=null?it(u.maxSpan,s,o,!0):null),this._range=Ln([it(l[0],o,s,!0),it(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(r){this._brushing&&(ao(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},e.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Lh({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?Ppe:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var r,n=bH(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},e.type="dataZoom.slider",e}(TL);function kpe(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function Ipe(t){return t==="vertical"?"ns-resize":"ew-resize"}function HH(t){t.registerComponentModel(Tpe),t.registerComponentView(Dpe),CL(t)}function Epe(t){Oe(GH),Oe(HH)}var WH={get:function(t,e,r){var n=ye((Rpe[t]||{})[e]);return r&&ee(n)?n[n.length-1]:n}},Rpe={color:{active:["#006edd","#e0ffff"],inactive:[X.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},cz=hr.mapVisual,Npe=hr.eachVisual,Ope=ee,fz=N,zpe=Ln,Bpe=it,Qy=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&EH(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(r){var n=this.stateList;r=le(r,this),this.controllerVisuals=BT(this.option.controller,n,r),this.targetVisuals=BT(this.option.target,n,r)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesId,n=this.option.seriesIndex;n==null&&r==null&&(n="all");var i=ff(this.ecModel,"series",{index:n,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return re(i,function(a){return a.componentIndex})},e.prototype.eachTargetSeries=function(r,n){N(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},e.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},e.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],ee(r)&&(r=r.slice(),u=!0);var c=n?r:u?[f(r[0]),f(r[1])]:f(r);if(se(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(me(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+c[1]:r[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var r=this.option,n=zpe([r.min,r.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Re(a,i),Re(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){Ope(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:r.get("gradientColor")}}function u(f,h,v){var p=f[h],g=f[v];p&&!g&&(g=f[v]={},fz(p,function(m,y){if(hr.isValidType(y)){var x=WH.get(y,"inactive",s);x!=null&&(g[y]=x,y==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,v=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),g=this.getItemSymbol(),m=g||"roundRect";fz(this.stateList,function(y){var x=this.itemSize,S=f[y];S||(S=f[y]={color:s?p:[p]}),S.symbol==null&&(S.symbol=h&&ye(h)||(s?m:[m])),S.symbolSize==null&&(S.symbolSize=v&&ye(v)||(s?x[0]:[x[0],x[0]])),S.symbol=cz(S.symbol,function(C){return C==="none"?m:C});var b=S.symbolSize;if(b!=null){var T=-1/0;Npe(b,function(C){C>T&&(T=C)}),S.symbolSize=cz(b,function(C){return Bpe(C,[0,T],[0,x[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(r){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(r){return null},e.prototype.getVisualMeta=function(r){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:X.color.transparent,borderColor:X.color.borderTint,contentColor:X.color.theme[0],inactiveColor:X.color.disabled,borderWidth:0,padding:X.size.m,textGap:10,precision:0,textStyle:{color:X.color.secondary}},e}(Be),hz=[20,140],Vpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=hz[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=hz[1])},e.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):ee(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),N(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},e.prototype.getSelected=function(){var r=this.getExtent(),n=Ln((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]=i[1]||r<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},e.prototype.getVisualMeta=function(r){var n=vz(this,"outOfRange",this.getExtent()),i=vz(this,"inRange",this.option.range.slice()),a=[];function o(v,p){a.push({value:v,color:r(v,p)})}for(var s=0,l=0,u=i.length,c=n.length;lr[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},e.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},e.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new _e(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},e.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent(),c=this._applyTransform("left",i.mainGroup);Fpe([0,1],function(f){var h=o[f];h.setStyle("fill",n.handlesColor[f]),h.y=r[f];var v=Qi(r[f],[0,l[1]],u,!0),p=this.getControllerVisual(v,"symbolSize");h.scaleX=h.scaleY=p/l[0],h.x=l[0]-p/2;var g=Pi(i.handleLabelPoints[f],as(h,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;g[1]+=m}s[f].setStyle({x:g[0],y:g[1],text:a.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},v=this.getControllerVisual(r,"color",h),p=this.getControllerVisual(r,"symbolSize"),g=Qi(r,s,u,!0),m=l[0]-p/2,y={x:f.x,y:f.y};f.y=g,f.x=m;var x=Pi(c.indicatorLabelPoint,as(f,this.group)),S=c.indicatorLabel;S.attr("invisible",!1);var b=this._applyTransform("left",c.mainGroup),T=this._orient,C=T==="horizontal";S.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:C?b:"middle",align:C?"center":b});var M={x:m,y:g,style:{fill:v}},D={style:{x:x[0],y:x[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var I={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(M,I),S.animateTo(D,I)}else f.attr(M),S.attr(D);this._firstShowIndicator=!1;var k=this._shapes.handleLabels;if(k)for(var E=0;Eo[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,v=[];(n||mz(i))&&(v=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var p=bX(h,v);this._dispatchHighDown("downplay",xm(p[0],i)),this._dispatchHighDown("highlight",xm(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(bl(r.target,function(l){var u=Ae(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i=0&&(a.dimension=o,n.push(a))}}),t.getData().setVisual("visualMeta",n)}}];function Ype(t,e,r,n){for(var i=e.targetVisuals[n],a=hr.prepareVisualTypes(i),o={color:Nd(t.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),t.registerAction(Upe,Zpe),N($pe,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(Xpe))}function YH(t){t.registerComponentModel(Vpe),t.registerComponentView(Hpe),$H(t)}var qpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._pieceList=[],r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Kpe[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=ye(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=re(this._pieceList,function(l){return l=ye(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var r=this.option,n={},i=hr.listVisualTypes(),a=this.isCategory();N(r.pieces,function(s){N(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),N(n,function(s,l){var u=!1;N(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&N(this.stateList,function(c){(r[c]||(r[c]={}))[l]=WH.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,N(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;N(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(r){this.option.selected=ye(r)},e.prototype.getValueState=function(r){var n=hr.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=hr.findPieceIndex(l,i);c===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},e.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,f){var h=a.getRepresentValue({interval:c});f||(f=a.getValueState(h));var v=r(h,f);c[0]===-1/0?i[0]=v:c[1]===1/0?i[1]=v:n.push({value:c[0],color:v},{value:c[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return N(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=Ts(Qy.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Qy),Kpe={splitNumber:function(t){var e=this.option,r=Math.min(e.precision,20),n=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;e.precision=r,a=+a.toFixed(r),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function Sz(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var Qpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,c=Sr(n.get("showLabel",!0),!u),f=!n.get("selectedMode");u&&this._renderEndsText(r,u[0],s,c,o),N(l.viewPieceList,function(h){var v=h.piece,p=new _e;p.onclick=le(this._onItemClick,this,v),this._enableHoverLink(p,h.indexInModelPieceList);var g=n.getRepresentValue(v);if(this._createItemSymbol(p,g,[0,0,s[0],s[1]],f),c){var m=this.visualMapModel.getValueState(g),y=a.get("align")||o;p.add(new Xe({style:pt(a,{x:y==="right"?-i:s[0]+i,y:s[1]/2,text:v.text,verticalAlign:a.get("verticalAlign")||"middle",align:y,opacity:pe(a.get("opacity"),m==="outOfRange"?.5:1)}),silent:f}))}r.add(p)},this),u&&this._renderEndsText(r,u[1],s,c,o),kl(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},e.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:xm(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return ZH(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new _e,l=this.visualMapModel.textStyleModel;s.add(new Xe({style:pt(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},e.prototype._getViewData=function(){var r=this.visualMapModel,n=re(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},e.prototype._createItemSymbol=function(r,n,i,a){var o=Ut(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color"));o.silent=a,r.add(o)},e.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=ye(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,N(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(UH);function XH(t){t.registerComponentModel(qpe),t.registerComponentView(Qpe),$H(t)}function Jpe(t){Oe(YH),Oe(XH)}var ege=function(){function t(e){this._thumbnailModel=e}return t.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},t.prototype.renderContent=function(e){var r=e.api.getViewOfComponentModel(this._thumbnailModel);r&&(e.group.silent=!0,r.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:_V(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},t.prototype.updateWindow=function(e,r){var n=r.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},t}(),tge=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventAutoZ=!0,r}return e.prototype.optionUpdated=function(r,n){this._updateBridge()},e.prototype._updateBridge=function(){var r=this._birdge=this._birdge||new ege(this);if(this._target=null,this.ecModel.eachSeries(function(i){ZR(i,null)}),this.shouldShow()){var n=this.getTarget();ZR(n.baseMapProvider,r)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var r=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return r?r.subType!=="graph"&&(r=null):r=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:r},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:X.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:X.color.neutral30,borderColor:X.color.neutral40,opacity:.3},z:10},e}(Be),rge=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this._api=i,this._model=r,this._coordSys||(this._coordSys=new fu),!this._isEnabled()){this._clear();return}this._renderVersion=i.getMainProcessVersion();var a=this.group;a.removeAll();var o=r.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||X.color.neutral00);var l=or(r,i).refContainer,u=wt(VV(r,!0),l),c=s.lineWidth||0,f=this._contentRect=Zl(u.clone(),c/2,!0,!0),h=new _e;a.add(h),h.setClipPath(new ze({shape:f.plain()}));var v=this._targetGroup=new _e;h.add(v);var p=u.plain();p.r=o.getShallow("borderRadius",!0),a.add(this._bgRect=new ze({style:s,shape:p,silent:!1,cursor:"grab"}));var g=r.getModel("windowStyle"),m=g.getShallow("borderRadius",!0);h.add(this._windowRect=new ze({shape:{x:0,y:0,width:0,height:0,r:m},style:g.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),bz(r,this)},e.prototype.renderContent=function(r){this._bridgeRendered=r,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),bz(this._model,this))},e.prototype._dealRenderContent=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=this._targetGroup,i=this._coordSys,a=this._contentRect;if(n.removeAll(),!!r){var o=r.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=r.z2Range.min-10,i.setBoundingRect(s.x,s.y,s.width,s.height);var l=wt({left:"center",top:"center",aspect:s.width/s.height},a);i.setViewRect(l.x,l.y,l.width,l.height),o.attr(i.getTransformInfo().raw),this._windowRect.z2=r.z2Range.max+10,this._resetRoamController(r.roamType)}}},e.prototype.updateWindow=function(r){var n=this._bridgeRendered;n&&n.renderVersion===r.renderVersion&&(n.targetTrans=r.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=oi([],r.targetTrans),i=Li([],this._coordSys.transform,n);this._transThisToTarget=oi([],i);var a=r.viewportRect;a?a=a.clone():a=new Ce(0,0,this._api.getWidth(),this._api.getHeight()),a.applyTransform(i);var o=this._windowRect,s=o.shape.r;o.setShape(Se({r:s},a))}},e.prototype._resetRoamController=function(r){var n=this,i=this._api,a=this._roamController;if(a||(a=this._roamController=new cu(i.getZr())),!r||!this._isEnabled()){a.disable();return}a.enable(r,{api:i,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),a.off("pan").off("zoom").on("pan",le(this._onPan,this)).on("zoom",le(this._onZoom,this))},e.prototype._onPan=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.oldX,r.oldY],n),a=Ot([],[r.oldX-r.dx,r.oldY-r.dy],n);this._api.dispatchAction(wz(this._model.getTarget().baseMapProvider,{dx:a[0]-i[0],dy:a[1]-i[1]}))}},e.prototype._onZoom=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.originX,r.originY],n);this._api.dispatchAction(wz(this._model.getTarget().baseMapProvider,{zoom:1/r.scale,originX:i[0],originY:i[1]}))}},e.prototype._isEnabled=function(){var r=this._model;if(!r||!r.shouldShow())return!1;var n=r.getTarget().baseMapProvider;return!!n},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e}(mt);function wz(t,e){var r=t.mainType==="series"?t.subType+"Roam":t.mainType+"Roam",n={type:r};return n[t.mainType+"Id"]=t.id,J(n,e),n}function bz(t,e){var r=$l(t);j0(e.group,r.z,r.zlevel)}function nge(t){t.registerComponentModel(tge),t.registerComponentView(rge)}var ige={label:{enabled:!0},decal:{show:!1}},Tz=Ve(),age={};function oge(t,e){var r=t.getModel("aria");if(!r.get("enabled"))return;var n=ye(ige);Re(n.label,t.getLocaleModel().get("aria"),!1),Re(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),c=u.get("show");if(c){var f=ve();t.eachSeries(function(h){if(!h.isColorBySeries()){var v=f.get(h.type);v||(v={},f.set(h.type,v)),Tz(h).scope=v}}),t.eachRawSeries(function(h){if(t.isSeriesFiltered(h))return;if(me(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var x=Db(h.ecModel,h.name,age,t.getSeriesCount()),S=v.getVisual("decal");v.setVisual("decal",b(S,x))}else{var p=h.getRawData(),g={},m=Tz(h).scope;v.each(function(T){var C=v.getRawIndex(T);g[C]=T});var y=p.count();p.each(function(T){var C=g[T],M=p.getName(T)||T+"",D=Db(h.ecModel,M,m,y),I=v.getItemVisual(C,"decal");v.setItemVisual(C,"decal",b(I,D))})}function b(T,C){var M=T?J(J({},C),T):C;return M.dirty=!0,M}})}}function a(){var u=e.getZr().dom;if(u){var c=t.getLocaleModel().get("aria"),f=r.getModel("label");if(f.option=Se(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var h=t.getSeriesCount(),v=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,g=Math.min(h,p),m;if(!(h<1)){var y=s();if(y){var x=f.get(["general","withTitle"]);m=o(x,{title:y})}else m=f.get(["general","withoutTitle"]);var S=[],b=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=o(b,{seriesCount:h}),t.eachSeries(function(D,I){if(I1?f.get(["series","multiple",z]):f.get(["series","single",z]),k=o(k,{seriesId:D.seriesIndex,seriesName:D.get("name"),seriesType:l(D.subType)});var O=D.getData();if(O.count()>v){var F=f.get(["data","partialData"]);k+=o(F,{displayCnt:v})}else k+=f.get(["data","allData"]);for(var G=f.get(["data","separator","middle"]),j=f.get(["data","separator","end"]),Z=f.get(["data","excludeDimensionId"]),V=[],W=0;W":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},uge=function(){function t(e){var r=this._condVal=se(e)?new RegExp(e):H3(e)?e:null;if(r==null){var n="";at(n)}}return t.prototype.evaluate=function(e){var r=typeof e;return se(r)?this._condVal.test(e):qe(r)?this._condVal.test(e+""):!1},t}(),cge=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),fge=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r2&&n.push(i),i=[O,F]}function c(O,F,G,j){xc(O,G)&&xc(F,j)||i.push(O,F,G,j,G,j)}function f(O,F,G,j,Z,V){var W=Math.abs(F-O),H=Math.tan(W/4)*4/3,Y=FD:E2&&n.push(i),n}function ZT(t,e,r,n,i,a,o,s,l,u){if(xc(t,r)&&xc(e,n)&&xc(i,o)&&xc(a,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-t,v=s-e,p=Math.sqrt(h*h+v*v);h/=p,v/=p;var g=r-t,m=n-e,y=i-o,x=a-s,S=g*g+m*m,b=y*y+x*x;if(S=0&&D=0){l.push(o,s);return}var I=[],k=[];hs(t,r,i,o,.5,I),hs(e,n,a,s,.5,k),ZT(I[0],k[0],I[1],k[1],I[2],k[2],I[3],k[3],l,u),ZT(I[4],k[4],I[5],k[5],I[6],k[6],I[7],k[7],l,u)}function Cge(t,e){var r=UT(t),n=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),f=KH([l,u],c?0:1,e),h=(c?s:u)/f.length,v=0;vi,o=KH([n,i],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=t[s]/o.length,h=0;h1?null:new Te(g*l+t,g*u+e)}function Age(t,e,r){var n=new Te;Te.sub(n,r,e),n.normalize();var i=new Te;Te.sub(i,t,e);var a=i.dot(n);return a}function Yu(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function Pge(t,e,r){for(var n=t.length,i=[],a=0;ao?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),Pge(e,u,c)}function Jy(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);Jy(t,a[0],i,n),Jy(t,a[1],r-i,n)}return n}function Dge(t,e){for(var r=[],n=0;n0;u/=2){var c=0,f=0;(t&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(t=u-1-t,e=u-1-e),l=t,t=e,e=l)}return s}function r0(t){var e=1/0,r=1/0,n=-1/0,i=-1/0,a=re(t,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),r=Math.min(f,r),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=re(a,function(s,l){return{cp:s,z:Vge(s[0],s[1],e,r,n,i),path:t[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function e8(t){return Ege(t.path,t.count)}function $T(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Fge(t,e,r){var n=[];function i(T){for(var C=0;C=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var Gge={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;Ez(t)&&(u=t,c=e),Ez(e)&&(u=e,c=t);function f(y,x,S,b,T){var C=y.many,M=y.one;if(C.length===1&&!T){var D=x?C[0]:M,I=x?M:C[0];if(e0(D))f({many:[D],one:I},!0,S,b,!0);else{var k=s?Se({delay:s(S,b)},l):l;RL(D,I,k),a(D,I,D,I,k)}}else for(var E=Se({dividePath:Gge[r],individualDelay:s&&function(Z,V,W,H){return s(Z+S,b)}},l),z=x?Fge(C,M,E):jge(M,C,E),O=z.fromIndividuals,F=z.toIndividuals,G=O.length,j=0;je.length,v=u?Rz(c,u):Rz(h?e:t,[h?t:e]),p=0,g=0;gt8))for(var a=n.getIndices(),o=0;o0&&C.group.traverse(function(D){D instanceof He&&!D.animators.length&&D.animateFrom({style:{opacity:0}},M)})})}function Vz(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function Fz(t){return ee(t)?t.sort().join(","):t}function Eo(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function Xge(t,e){var r=ve(),n=ve(),i=ve();return N(t.oldSeries,function(a,o){var s=t.oldDataGroupIds[o],l=t.oldData[o],u=Vz(a),c=Fz(u);n.set(c,{dataGroupId:s,data:l}),ee(u)&&N(u,function(f){i.set(f,{key:c,dataGroupId:s,data:l})})}),N(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=Vz(a),u=Fz(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Eo(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Eo(s),data:s}]});else if(ee(l)){var f=[];N(l,function(p){var g=n.get(p);g.data&&f.push({dataGroupId:g.dataGroupId,divide:Eo(g.data),data:g.data})}),f.length&&r.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Eo(s)}]})}else{var h=i.get(l);if(h){var v=r.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Eo(h.data)}],newSeries:[]},r.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Eo(s)})}}}}),r}function jz(t,e){for(var r=0;r=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Eo(e.oldData[s]),groupIdDim:o.dimension})}),N(gt(t.to),function(o){var s=jz(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Eo(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&r8(i,a,n)}function Kge(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){N(gt(n.seriesTransition),function(i){N(gt(i.to),function(a){for(var o=n.updatedSeries,s=0;so.vmin?r+=o.vmin-n+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:r+=e-n,n=o.vmax,i=!1;break}r+=o.vmin-n+o.gapReal,n=o.vmax}return i&&(r+=e-n),r},t.prototype.unelapse=function(e){for(var r=Gz,n=Hz,i=!0,a=0,o=0;ol?a=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):a=n+e-r,n=s.vmax,i=!1;break}r=u,n=s.vmax}return i&&(a=n+e-r),a},t}();function Jge(){return new Qge}var Gz=0,Hz=0;function eme(t,e){var r=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};N(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(r+=l.val);var u=NL(s,e);if(u){var c=u.vmin!==s.vmin,f=u.vmax!==s.vmax,h=u.vmax-u.vmin;if(!(c&&f))if(c||f){var v=c?"S":"E";a[v][l.type].has=!0,a[v][l.type].span=h,a[v][l.type].inExtFrac=h/(s.vmax-s.vmin),a[v][l.type].val=l.val}else n[l.type].span+=h,n[l.type].val+=l.val}});var o=r*(0+(e[1]-e[0])+(n.tpAbs.val-n.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));N(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=r!==0?Math.max(o,0)*l.val/r:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function tme(t,e,r,n,i,a){t!=="no"&&N(r,function(o){var s=NL(o,a);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],c=n(u),f=i*3/4;c>s.vmin-f&&ce[0]&&r=0&&o<1-1e-5}N(t,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:ye(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(se(o.gap)){var u=Mn(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;i(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var f=e(o.gap);(!isFinite(f)||f<0)&&(f=0),s.gapParsed.type="tpAbs",s.gapParsed.val=f}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),r&&r.noNegative&&N(["vmin","vmax"],function(v){s[v]<0&&(s[v]=0)}),s.vmin>s.vmax){var h=s.vmax;s.vmax=s.vmin,s.vmin=h}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var a=-1/0;return N(n,function(o,s){a>o.vmin&&(n[s]=null),a=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function OL(t,e){return XT(e)===XT(t)}function XT(t){return t.start+"_\0_"+t.end}function nme(t,e,r){var n=[];N(t,function(a,o){var s=e(a);s&&s.type==="vmin"&&n.push([o])}),N(t,function(a,o){var s=e(a);if(s&&s.type==="vmax"){var l=Ss(n,function(u){return OL(e(t[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return N(n,function(a){a.length===2&&i.push(r?a:[t[a[0]],t[a[1]]])}),i}function ime(t,e,r,n){var i,a;if(t.break){var o=t.break.parsedBreak,s=Ss(r,function(f){return OL(f.breakOption,t.break.parsedBreak.breakOption)}),l=n(Math.pow(e,o.vmin),s.vmin),u=n(Math.pow(e,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?Ht(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:t.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},a=s[t.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function ame(t,e,r){var n={noNegative:!0},i=YT(t,r,n),a=YT(t,r,n),o=Math.log(e);return a.breaks=re(a.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var ome={vmin:"start",vmax:"end"};function sme(t,e){return e&&(t=t||{},t.break={type:ome[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),t}function lme(){DK({createScaleBreakContext:Jge,pruneTicksByBreak:tme,addBreaksToTicks:rme,parseAxisBreakOption:YT,identifyAxisBreak:OL,serializeAxisBreakIdentifier:XT,retrieveAxisBreakPairs:nme,getTicksLogTransformBreak:ime,logarithmicParseBreaksFromOption:ame,makeAxisLabelFormatterParamBreak:sme})}var Wz=Ve();function ume(t,e){var r=Ss(t,function(n){return Xt().identifyAxisBreak(n.parsedBreak.breakOption,e.breakOption)});return r||t.push(r={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),r}function cme(t){N(t,function(e){return e.shouldRemove=!0})}function fme(t){for(var e=t.length-1;e>=0;e--)t[e].shouldRemove&&t.splice(e,1)}function hme(t,e,r,n,i){var a=r.axis;if(a.scale.isBlank()||!Xt())return;var o=Xt().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(I){return I.break},!1);if(!o.length)return;var s=r.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var f=s.get("expandOnClick"),h=s.get("zigzagZ"),v=s.getModel("itemStyle"),p=v.getItemStyle(),g=p.stroke,m=p.lineWidth,y=p.lineDash,x=p.fill,S=new _e({ignoreModelZ:!0}),b=a.isHorizontal(),T=Wz(e).visualList||(Wz(e).visualList=[]);cme(T);for(var C=function(I){var k=o[I][0].break.parsedBreak,E=[];E[0]=a.toGlobalCoord(a.dataToCoord(k.vmin,!0)),E[1]=a.toGlobalCoord(a.dataToCoord(k.vmax,!0)),E[1]=V;de&&(ne=V);var Fe=[],xe=[];Fe[j]=E,xe[j]=z,!ue&&!de&&(Fe[j]+=K?-l:l,xe[j]-=K?l:-l),Fe[Z]=ne,xe[Z]=ne,H.push(Fe),Y.push(xe);var ge=void 0;if(iex[1]&&x.reverse(),{coordPair:x,brkId:Xt().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(m,y){return m.coordPair[0]-y.coordPair[0]});for(var u=o[0],c=null,f=0;f=0?l[0].width:l[1].width),h=(f+c.x)/2-u.x,v=Math.min(h,h-c.x),p=Math.max(h,h-c.x),g=p<0?p:v>0?v:0;s=(h-g)/c.x}var m=new Te,y=new Te;Te.scale(m,n,-s),Te.scale(y,n,1-s),qb(r[0],m),qb(r[1],y)}function pme(t,e){var r={breaks:[]};return N(e.breaks,function(n){if(n){var i=Ss(t.get("breaks",!0),function(s){return Xt().identifyAxisBreak(s,n)});if(i){var a=e.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===Q0?!0:a===bG?!1:a===TG?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),r}function gme(){fie({adjustBreakLabelPair:dme,buildAxisBreakLine:vme,rectCoordBuildBreakAxis:hme,updateModelAxisBreak:pme})}function mme(t){mie(t),lme(),gme()}function yme(){Bie(_me)}function _me(t,e){N(t,function(r){if(!r.model.get(["axisLabel","inside"])){var n=xme(r);if(n){var i=r.isHorizontal()?"height":"width",a=r.model.get(["axisLabel","margin"]);e[i]-=n[i]+a,r.position==="top"?e.y+=n.height+a:r.position==="left"&&(e.x+=n.width+a)}}})}function xme(t){var e=t.model,r=t.scale;if(!e.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof qc?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=Cf(t),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:60,i=null;return function(){for(var a=this,o=arguments.length,s=new Array(o),l=0;l12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function zme(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function Bme(t){return t==="ROUTER"||t==="ROUTER_LATE"?30:t==="REPEATER"||t==="TRACKER"?25:t==="CLIENT_MUTE"?7:t==="CLIENT_BASE"?12:15}function Vme({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=q.useRef(null),[a,o]=q.useState("connected"),s=q.useMemo(()=>{const m=new Set;return e.forEach(y=>{m.add(y.from_node),m.add(y.to_node)}),m},[e]),l=q.useMemo(()=>{let m=t;return a==="connected"?m=m.filter(y=>s.has(y.node_num)):a==="infra"&&(m=m.filter(y=>$z.includes(y.role))),m},[t,a,s]),u=q.useMemo(()=>new Map(l.map(m=>[m.node_num,m])),[l]),c=q.useMemo(()=>e.filter(m=>u.has(m.from_node)&&u.has(m.to_node)),[e,u]),f=q.useMemo(()=>{const m=new Set;return r!==null&&c.forEach(y=>{y.from_node===r&&m.add(y.to_node),y.to_node===r&&m.add(y.from_node)}),m},[r,c]),h=q.useMemo(()=>{const m=l.map(x=>{const S=zme(x.latitude),b=Zz[S%Zz.length],T=$z.includes(x.role),C=x.node_num===r,M=f.has(x.node_num),D=r===null||C||M;return{id:String(x.node_num),name:x.short_name,value:x.node_num,symbolSize:Bme(x.role),itemStyle:{color:T?b:"#111827",borderColor:b,borderWidth:T?0:2,opacity:D?1:.15},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace",color:D?"#94a3b8":"#94a3b820"},nodeNum:x.node_num,longName:x.long_name,role:x.role}}),y=c.map(x=>{const S=r===null||x.from_node===r||x.to_node===r;return{source:String(x.from_node),target:String(x.to_node),value:x.snr,lineStyle:{color:Ome(x.snr),width:S&&r!==null?2:1,opacity:r===null?.4:S?.6:.04}}});return{nodes:m,links:y}},[l,c,r,f]),v=q.useMemo(()=>({backgroundColor:"#111827",tooltip:{trigger:"item",backgroundColor:"#1e293b",borderColor:"#334155",textStyle:{color:"#e2e8f0",fontFamily:"JetBrains Mono, monospace",fontSize:11},formatter:m=>{if(m.data&&m.data.longName){const y=m.data;return`${y.name}
${y.longName}
Role: ${y.role}`}return""}},series:[{type:"graph",layout:"force",roam:!0,draggable:!0,animation:!1,data:h.nodes,links:h.links,force:{repulsion:200,edgeLength:[80,120],gravity:.1},emphasis:{focus:"adjacency",blurScope:"coordinateSystem",scale:1.1,lineStyle:{width:2}},blur:{itemStyle:{opacity:.15},lineStyle:{opacity:.04}},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace"},edgeLabel:{show:!1},edgeSymbol:["none","none"]}]}),[h]),p=q.useCallback(m=>{if(m.data&&"nodeNum"in m.data){const y=m.data.nodeNum;n(r===y?null:y??null)}},[r,n]),g=q.useMemo(()=>({click:p}),[p]);return q.useEffect(()=>{var y;const m=(y=i.current)==null?void 0:y.getEchartsInstance();m&&m.setOption(v,{notMerge:!1,lazyUpdate:!0})},[v]),A.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[A.jsx(Nme,{ref:i,option:v,style:{height:"540px",width:"100%"},onEvents:g,opts:{renderer:"canvas"}}),A.jsxs("div",{className:"absolute top-4 left-4 flex items-center gap-2 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2",children:[A.jsx(D3,{size:14,className:"text-slate-500"}),A.jsx("div",{className:"flex gap-1",children:[{key:"connected",label:"Connected"},{key:"infra",label:"Infra"},{key:"all",label:"All"}].map(({key:m,label:y})=>A.jsx("button",{onClick:()=>o(m),className:`px-2 py-1 text-xs rounded transition-colors ${a===m?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:y},m))}),A.jsxs("span",{className:"text-xs text-slate-500 ml-2",children:[l.length," nodes • ",c.length," edges"]})]}),A.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[A.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Edge Quality (SNR)"}),A.jsx("div",{className:"space-y-1",children:[{label:"Excellent (>12)",color:"#22c55e"},{label:"Good (8-12)",color:"#4ade80"},{label:"Fair (5-8)",color:"#f59e0b"},{label:"Marginal (3-5)",color:"#f97316"},{label:"Poor (<3)",color:"#ef4444"}].map(m=>A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("div",{className:"w-4 h-0.5",style:{backgroundColor:m.color}}),A.jsx("span",{className:"text-xs text-slate-500",children:m.label})]},m.label))})]}),A.jsxs("div",{className:"absolute bottom-4 right-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[A.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Node Type"}),A.jsxs("div",{className:"space-y-2",children:[A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-500"}),A.jsx("span",{className:"text-xs text-slate-500",children:"Infrastructure"})]}),A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("div",{className:"w-3 h-3 rounded-full bg-gray-900 border-2 border-blue-500"}),A.jsx("span",{className:"text-xs text-slate-500",children:"Client"})]})]})]})]})}function a8(t,e){const r=q.useRef(e);q.useEffect(function(){e!==r.current&&t.attributionControl!=null&&(r.current!=null&&t.attributionControl.removeAttribution(r.current),e!=null&&t.attributionControl.addAttribution(e)),r.current=e},[t,e])}function Fme(t,e,r){e.center!==r.center&&t.setLatLng(e.center),e.radius!=null&&e.radius!==r.radius&&t.setRadius(e.radius)}const jme=1;function Gme(t){return Object.freeze({__version:jme,map:t})}function o8(t,e){return Object.freeze({...t,...e})}const s8=q.createContext(null),l8=s8.Provider;function c_(){const t=q.useContext(s8);if(t==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return t}function Hme(t){function e(r,n){const{instance:i,context:a}=t(r).current;return q.useImperativeHandle(n,()=>i),r.children==null?null:Ec.createElement(l8,{value:a},r.children)}return q.forwardRef(e)}function Wme(t){function e(r,n){const[i,a]=q.useState(!1),{instance:o}=t(r,a).current;q.useImperativeHandle(n,()=>o),q.useEffect(function(){i&&o.update()},[o,i,r.children]);const s=o._contentNode;return s?h3.createPortal(r.children,s):null}return q.forwardRef(e)}function Ume(t){function e(r,n){const{instance:i}=t(r).current;return q.useImperativeHandle(n,()=>i),null}return q.forwardRef(e)}function FL(t,e){const r=q.useRef();q.useEffect(function(){return e!=null&&t.instance.on(e),r.current=e,function(){r.current!=null&&t.instance.off(r.current),r.current=null}},[t,e])}function f_(t,e){const r=t.pane??e.pane;return r?{...t,pane:r}:t}function Zme(t,e){return function(n,i){const a=c_(),o=t(f_(n,a),a);return a8(a.map,n.attribution),FL(o.current,n.eventHandlers),e(o.current,a,n,i),o}}var QT={exports:{}};/* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(t,e){(function(r,n){n(e)})(zW,function(r){var n="1.9.4";function i(d){var _,w,P,R;for(w=1,P=arguments.length;w"u"||!L||!L.Mixin)){d=S(d)?d:[d];for(var _=0;_0?Math.floor(d):Math.ceil(d)};V.prototype={clone:function(){return new V(this.x,this.y)},add:function(d){return this.clone()._add(H(d))},_add:function(d){return this.x+=d.x,this.y+=d.y,this},subtract:function(d){return this.clone()._subtract(H(d))},_subtract:function(d){return this.x-=d.x,this.y-=d.y,this},divideBy:function(d){return this.clone()._divideBy(d)},_divideBy:function(d){return this.x/=d,this.y/=d,this},multiplyBy:function(d){return this.clone()._multiplyBy(d)},_multiplyBy:function(d){return this.x*=d,this.y*=d,this},scaleBy:function(d){return new V(this.x*d.x,this.y*d.y)},unscaleBy:function(d){return new V(this.x/d.x,this.y/d.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=W(this.x),this.y=W(this.y),this},distanceTo:function(d){d=H(d);var _=d.x-this.x,w=d.y-this.y;return Math.sqrt(_*_+w*w)},equals:function(d){return d=H(d),d.x===this.x&&d.y===this.y},contains:function(d){return d=H(d),Math.abs(d.x)<=Math.abs(this.x)&&Math.abs(d.y)<=Math.abs(this.y)},toString:function(){return"Point("+h(this.x)+", "+h(this.y)+")"}};function H(d,_,w){return d instanceof V?d:S(d)?new V(d[0],d[1]):d==null?d:typeof d=="object"&&"x"in d&&"y"in d?new V(d.x,d.y):new V(d,_,w)}function Y(d,_){if(d)for(var w=_?[d,_]:d,P=0,R=w.length;P=this.min.x&&w.x<=this.max.x&&_.y>=this.min.y&&w.y<=this.max.y},intersects:function(d){d=K(d);var _=this.min,w=this.max,P=d.min,R=d.max,B=R.x>=_.x&&P.x<=w.x,U=R.y>=_.y&&P.y<=w.y;return B&&U},overlaps:function(d){d=K(d);var _=this.min,w=this.max,P=d.min,R=d.max,B=R.x>_.x&&P.x_.y&&P.y=_.lat&&R.lat<=w.lat&&P.lng>=_.lng&&R.lng<=w.lng},intersects:function(d){d=ie(d);var _=this._southWest,w=this._northEast,P=d.getSouthWest(),R=d.getNorthEast(),B=R.lat>=_.lat&&P.lat<=w.lat,U=R.lng>=_.lng&&P.lng<=w.lng;return B&&U},overlaps:function(d){d=ie(d);var _=this._southWest,w=this._northEast,P=d.getSouthWest(),R=d.getNorthEast(),B=R.lat>_.lat&&P.lat_.lng&&P.lng1,C8=function(){var d=!1;try{var _=Object.defineProperty({},"passive",{get:function(){d=!0}});window.addEventListener("testPassiveEventSupport",f,_),window.removeEventListener("testPassiveEventSupport",f,_)}catch{}return d}(),M8=function(){return!!document.createElement("canvas").getContext}(),d_=!!(document.createElementNS&&et("svg").createSVGRect),L8=!!d_&&function(){var d=document.createElement("div");return d.innerHTML="",(d.firstChild&&d.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),A8=!d_&&function(){try{var d=document.createElement("div");d.innerHTML='';var _=d.firstChild;return _.style.behavior="url(#default#VML)",_&&typeof _.adj=="object"}catch{return!1}}(),P8=navigator.platform.indexOf("Mac")===0,D8=navigator.platform.indexOf("Linux")===0;function Vi(d){return navigator.userAgent.toLowerCase().indexOf(d)>=0}var Ne={ie:pr,ielt9:zr,edge:zi,webkit:Bi,android:vu,android23:jL,androidStock:p8,opera:h_,chrome:HL,gecko:WL,safari:g8,phantom:UL,opera12:ZL,win:m8,ie3d:$L,webkit3d:v_,gecko3d:YL,any3d:y8,mobile:Df,mobileWebkit:_8,mobileWebkit3d:x8,msPointer:XL,pointer:qL,touch:S8,touchNative:KL,mobileOpera:w8,mobileGecko:b8,retina:T8,passiveEvents:C8,canvas:M8,svg:d_,vml:A8,inlineSvg:L8,mac:P8,linux:D8},QL=Ne.msPointer?"MSPointerDown":"pointerdown",JL=Ne.msPointer?"MSPointerMove":"pointermove",eA=Ne.msPointer?"MSPointerUp":"pointerup",tA=Ne.msPointer?"MSPointerCancel":"pointercancel",p_={touchstart:QL,touchmove:JL,touchend:eA,touchcancel:tA},rA={touchstart:O8,touchmove:Wd,touchend:Wd,touchcancel:Wd},du={},nA=!1;function k8(d,_,w){return _==="touchstart"&&N8(),rA[_]?(w=rA[_].bind(this,w),d.addEventListener(p_[_],w,!1),w):(console.warn("wrong event specified:",_),f)}function I8(d,_,w){if(!p_[_]){console.warn("wrong event specified:",_);return}d.removeEventListener(p_[_],w,!1)}function E8(d){du[d.pointerId]=d}function R8(d){du[d.pointerId]&&(du[d.pointerId]=d)}function iA(d){delete du[d.pointerId]}function N8(){nA||(document.addEventListener(QL,E8,!0),document.addEventListener(JL,R8,!0),document.addEventListener(eA,iA,!0),document.addEventListener(tA,iA,!0),nA=!0)}function Wd(d,_){if(_.pointerType!==(_.MSPOINTER_TYPE_MOUSE||"mouse")){_.touches=[];for(var w in du)_.touches.push(du[w]);_.changedTouches=[_],d(_)}}function O8(d,_){_.MSPOINTER_TYPE_TOUCH&&_.pointerType===_.MSPOINTER_TYPE_TOUCH&&Cr(_),Wd(d,_)}function z8(d){var _={},w,P;for(P in d)w=d[P],_[P]=w&&w.bind?w.bind(d):w;return d=_,_.type="dblclick",_.detail=2,_.isTrusted=!1,_._simulated=!0,_}var B8=200;function V8(d,_){d.addEventListener("dblclick",_);var w=0,P;function R(B){if(B.detail!==1){P=B.detail;return}if(!(B.pointerType==="mouse"||B.sourceCapabilities&&!B.sourceCapabilities.firesTouchEvents)){var U=uA(B);if(!(U.some(function(te){return te instanceof HTMLLabelElement&&te.attributes.for})&&!U.some(function(te){return te instanceof HTMLInputElement||te instanceof HTMLSelectElement}))){var Q=Date.now();Q-w<=B8?(P++,P===2&&_(z8(B))):P=1,w=Q}}}return d.addEventListener("click",R),{dblclick:_,simDblclick:R}}function F8(d,_){d.removeEventListener("dblclick",_.dblclick),d.removeEventListener("click",_.simDblclick)}var g_=$d(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),kf=$d(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),aA=kf==="webkitTransition"||kf==="OTransition"?kf+"End":"transitionend";function oA(d){return typeof d=="string"?document.getElementById(d):d}function If(d,_){var w=d.style[_]||d.currentStyle&&d.currentStyle[_];if((!w||w==="auto")&&document.defaultView){var P=document.defaultView.getComputedStyle(d,null);w=P?P[_]:null}return w==="auto"?null:w}function vt(d,_,w){var P=document.createElement(d);return P.className=_||"",w&&w.appendChild(P),P}function It(d){var _=d.parentNode;_&&_.removeChild(d)}function Ud(d){for(;d.firstChild;)d.removeChild(d.firstChild)}function pu(d){var _=d.parentNode;_&&_.lastChild!==d&&_.appendChild(d)}function gu(d){var _=d.parentNode;_&&_.firstChild!==d&&_.insertBefore(d,_.firstChild)}function m_(d,_){if(d.classList!==void 0)return d.classList.contains(_);var w=Zd(d);return w.length>0&&new RegExp("(^|\\s)"+_+"(\\s|$)").test(w)}function Qe(d,_){if(d.classList!==void 0)for(var w=p(_),P=0,R=w.length;P0?2*window.devicePixelRatio:1;function fA(d){return Ne.edge?d.wheelDeltaY/2:d.deltaY&&d.deltaMode===0?-d.deltaY/H8:d.deltaY&&d.deltaMode===1?-d.deltaY*20:d.deltaY&&d.deltaMode===2?-d.deltaY*60:d.deltaX||d.deltaZ?0:d.wheelDelta?(d.wheelDeltaY||d.wheelDelta)/2:d.detail&&Math.abs(d.detail)<32765?-d.detail*20:d.detail?d.detail/-32765*60:0}function P_(d,_){var w=_.relatedTarget;if(!w)return!0;try{for(;w&&w!==d;)w=w.parentNode}catch{return!1}return w!==d}var W8={__proto__:null,on:qe,off:Tt,stopPropagation:As,disableScrollPropagation:A_,disableClickPropagation:Of,preventDefault:Cr,stop:Ps,getPropagationPath:uA,getMousePosition:cA,getWheelDelta:fA,isExternalTarget:P_,addListener:qe,removeListener:Tt},hA=Z.extend({run:function(d,_,w,P){this.stop(),this._el=d,this._inProgress=!0,this._duration=w||.25,this._easeOutPower=1/Math.max(P||.5,.2),this._startPos=Ls(d),this._offset=_.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=E(this._animate,this),this._step()},_step:function(d){var _=+new Date-this._startTime,w=this._duration*1e3;_this.options.maxZoom)?this.setZoom(d):this},panInsideBounds:function(d,_){this._enforcingBounds=!0;var w=this.getCenter(),P=this._limitCenter(w,this._zoom,ie(d));return w.equals(P)||this.panTo(P,_),this._enforcingBounds=!1,this},panInside:function(d,_){_=_||{};var w=H(_.paddingTopLeft||_.padding||[0,0]),P=H(_.paddingBottomRight||_.padding||[0,0]),R=this.project(this.getCenter()),B=this.project(d),U=this.getPixelBounds(),Q=K([U.min.add(w),U.max.subtract(P)]),te=Q.getSize();if(!Q.contains(B)){this._enforcingBounds=!0;var ae=B.subtract(Q.getCenter()),Le=Q.extend(B).getSize().subtract(te);R.x+=ae.x<0?-Le.x:Le.x,R.y+=ae.y<0?-Le.y:Le.y,this.panTo(this.unproject(R),_),this._enforcingBounds=!1}return this},invalidateSize:function(d){if(!this._loaded)return this;d=i({animate:!1,pan:!0},d===!0?{animate:!0}:d);var _=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var w=this.getSize(),P=_.divideBy(2).round(),R=w.divideBy(2).round(),B=P.subtract(R);return!B.x&&!B.y?this:(d.animate&&d.pan?this.panBy(B):(d.pan&&this._rawPanBy(B),this.fire("move"),d.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:_,newSize:w}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(d){if(d=this._locateOptions=i({timeout:1e4,watch:!1},d),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var _=o(this._handleGeolocationResponse,this),w=o(this._handleGeolocationError,this);return d.watch?this._locationWatchId=navigator.geolocation.watchPosition(_,w,d):navigator.geolocation.getCurrentPosition(_,w,d),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(d){if(this._container._leaflet_id){var _=d.code,w=d.message||(_===1?"permission denied":_===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:_,message:"Geolocation error: "+w+"."})}},_handleGeolocationResponse:function(d){if(this._container._leaflet_id){var _=d.coords.latitude,w=d.coords.longitude,P=new ue(_,w),R=P.toBounds(d.coords.accuracy*2),B=this._locateOptions;if(B.setView){var U=this.getBoundsZoom(R);this.setView(P,B.maxZoom?Math.min(U,B.maxZoom):U)}var Q={latlng:P,bounds:R,timestamp:d.timestamp};for(var te in d.coords)typeof d.coords[te]=="number"&&(Q[te]=d.coords[te]);this.fire("locationfound",Q)}},addHandler:function(d,_){if(!_)return this;var w=this[d]=new _(this);return this._handlers.push(w),this.options[d]&&w.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),It(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var d;for(d in this._layers)this._layers[d].remove();for(d in this._panes)It(this._panes[d]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(d,_){var w="leaflet-pane"+(d?" leaflet-"+d.replace("Pane","")+"-pane":""),P=vt("div",w,_||this._mapPane);return d&&(this._panes[d]=P),P},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var d=this.getPixelBounds(),_=this.unproject(d.getBottomLeft()),w=this.unproject(d.getTopRight());return new ne(_,w)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(d,_,w){d=ie(d),w=H(w||[0,0]);var P=this.getZoom()||0,R=this.getMinZoom(),B=this.getMaxZoom(),U=d.getNorthWest(),Q=d.getSouthEast(),te=this.getSize().subtract(w),ae=K(this.project(Q,P),this.project(U,P)).getSize(),Le=Ne.any3d?this.options.zoomSnap:1,Ge=te.x/ae.x,tt=te.y/ae.y,Yr=_?Math.max(Ge,tt):Math.min(Ge,tt);return P=this.getScaleZoom(Yr,P),Le&&(P=Math.round(P/(Le/100))*(Le/100),P=_?Math.ceil(P/Le)*Le:Math.floor(P/Le)*Le),Math.max(R,Math.min(B,P))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new V(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(d,_){var w=this._getTopLeftPoint(d,_);return new Y(w,w.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(d){return this.options.crs.getProjectedBounds(d===void 0?this.getZoom():d)},getPane:function(d){return typeof d=="string"?this._panes[d]:d},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(d,_){var w=this.options.crs;return _=_===void 0?this._zoom:_,w.scale(d)/w.scale(_)},getScaleZoom:function(d,_){var w=this.options.crs;_=_===void 0?this._zoom:_;var P=w.zoom(d*w.scale(_));return isNaN(P)?1/0:P},project:function(d,_){return _=_===void 0?this._zoom:_,this.options.crs.latLngToPoint(de(d),_)},unproject:function(d,_){return _=_===void 0?this._zoom:_,this.options.crs.pointToLatLng(H(d),_)},layerPointToLatLng:function(d){var _=H(d).add(this.getPixelOrigin());return this.unproject(_)},latLngToLayerPoint:function(d){var _=this.project(de(d))._round();return _._subtract(this.getPixelOrigin())},wrapLatLng:function(d){return this.options.crs.wrapLatLng(de(d))},wrapLatLngBounds:function(d){return this.options.crs.wrapLatLngBounds(ie(d))},distance:function(d,_){return this.options.crs.distance(de(d),de(_))},containerPointToLayerPoint:function(d){return H(d).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(d){return H(d).add(this._getMapPanePos())},containerPointToLatLng:function(d){var _=this.containerPointToLayerPoint(H(d));return this.layerPointToLatLng(_)},latLngToContainerPoint:function(d){return this.layerPointToContainerPoint(this.latLngToLayerPoint(de(d)))},mouseEventToContainerPoint:function(d){return cA(d,this._container)},mouseEventToLayerPoint:function(d){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(d))},mouseEventToLatLng:function(d){return this.layerPointToLatLng(this.mouseEventToLayerPoint(d))},_initContainer:function(d){var _=this._container=oA(d);if(_){if(_._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");qe(_,"scroll",this._onScroll,this),this._containerId=l(_)},_initLayout:function(){var d=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ne.any3d,Qe(d,"leaflet-container"+(Ne.touch?" leaflet-touch":"")+(Ne.retina?" leaflet-retina":"")+(Ne.ielt9?" leaflet-oldie":"")+(Ne.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var _=If(d,"position");_!=="absolute"&&_!=="relative"&&_!=="fixed"&&_!=="sticky"&&(d.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var d=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Qt(this._mapPane,new V(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Qe(d.markerPane,"leaflet-zoom-hide"),Qe(d.shadowPane,"leaflet-zoom-hide"))},_resetView:function(d,_,w){Qt(this._mapPane,new V(0,0));var P=!this._loaded;this._loaded=!0,_=this._limitZoom(_),this.fire("viewprereset");var R=this._zoom!==_;this._moveStart(R,w)._move(d,_)._moveEnd(R),this.fire("viewreset"),P&&this.fire("load")},_moveStart:function(d,_){return d&&this.fire("zoomstart"),_||this.fire("movestart"),this},_move:function(d,_,w,P){_===void 0&&(_=this._zoom);var R=this._zoom!==_;return this._zoom=_,this._lastCenter=d,this._pixelOrigin=this._getNewPixelOrigin(d),P?w&&w.pinch&&this.fire("zoom",w):((R||w&&w.pinch)&&this.fire("zoom",w),this.fire("move",w)),this},_moveEnd:function(d){return d&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(d){Qt(this._mapPane,this._getMapPanePos().subtract(d))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(d){this._targets={},this._targets[l(this._container)]=this;var _=d?Tt:qe;_(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&_(window,"resize",this._onResize,this),Ne.any3d&&this.options.transform3DLimit&&(d?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=E(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var d=this._getMapPanePos();Math.max(Math.abs(d.x),Math.abs(d.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(d,_){for(var w=[],P,R=_==="mouseout"||_==="mouseover",B=d.target||d.srcElement,U=!1;B;){if(P=this._targets[l(B)],P&&(_==="click"||_==="preclick")&&this._draggableMoved(P)){U=!0;break}if(P&&P.listens(_,!0)&&(R&&!P_(B,d)||(w.push(P),R))||B===this._container)break;B=B.parentNode}return!w.length&&!U&&!R&&this.listens(_,!0)&&(w=[this]),w},_isClickDisabled:function(d){for(;d&&d!==this._container;){if(d._leaflet_disable_click)return!0;d=d.parentNode}},_handleDOMEvent:function(d){var _=d.target||d.srcElement;if(!(!this._loaded||_._leaflet_disable_events||d.type==="click"&&this._isClickDisabled(_))){var w=d.type;w==="mousedown"&&b_(_),this._fireDOMEvent(d,w)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(d,_,w){if(d.type==="click"){var P=i({},d);P.type="preclick",this._fireDOMEvent(P,P.type,w)}var R=this._findEventTargets(d,_);if(w){for(var B=[],U=0;U0?Math.round(d-_)/2:Math.max(0,Math.ceil(d))-Math.max(0,Math.floor(_))},_limitZoom:function(d){var _=this.getMinZoom(),w=this.getMaxZoom(),P=Ne.any3d?this.options.zoomSnap:1;return P&&(d=Math.round(d/P)*P),Math.max(_,Math.min(w,d))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Zt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(d,_){var w=this._getCenterOffset(d)._trunc();return(_&&_.animate)!==!0&&!this.getSize().contains(w)?!1:(this.panBy(w,_),!0)},_createAnimProxy:function(){var d=this._proxy=vt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(d),this.on("zoomanim",function(_){var w=g_,P=this._proxy.style[w];Ms(this._proxy,this.project(_.center,_.zoom),this.getZoomScale(_.zoom,1)),P===this._proxy.style[w]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){It(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var d=this.getCenter(),_=this.getZoom();Ms(this._proxy,this.project(d,_),this.getZoomScale(_,1))},_catchTransitionEnd:function(d){this._animatingZoom&&d.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(d,_,w){if(this._animatingZoom)return!0;if(w=w||{},!this._zoomAnimated||w.animate===!1||this._nothingToAnimate()||Math.abs(_-this._zoom)>this.options.zoomAnimationThreshold)return!1;var P=this.getZoomScale(_),R=this._getCenterOffset(d)._divideBy(1-1/P);return w.animate!==!0&&!this.getSize().contains(R)?!1:(E(function(){this._moveStart(!0,w.noMoveStart||!1)._animateZoom(d,_,!0)},this),!0)},_animateZoom:function(d,_,w,P){this._mapPane&&(w&&(this._animatingZoom=!0,this._animateToCenter=d,this._animateToZoom=_,Qe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:d,zoom:_,noUpdate:P}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Zt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function U8(d,_){return new ct(d,_)}var hi=F.extend({options:{position:"topright"},initialize:function(d){g(this,d)},getPosition:function(){return this.options.position},setPosition:function(d){var _=this._map;return _&&_.removeControl(this),this.options.position=d,_&&_.addControl(this),this},getContainer:function(){return this._container},addTo:function(d){this.remove(),this._map=d;var _=this._container=this.onAdd(d),w=this.getPosition(),P=d._controlCorners[w];return Qe(_,"leaflet-control"),w.indexOf("bottom")!==-1?P.insertBefore(_,P.firstChild):P.appendChild(_),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(It(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(d){this._map&&d&&d.screenX>0&&d.screenY>0&&this._map.getContainer().focus()}}),zf=function(d){return new hi(d)};ct.include({addControl:function(d){return d.addTo(this),this},removeControl:function(d){return d.remove(),this},_initControlPos:function(){var d=this._controlCorners={},_="leaflet-",w=this._controlContainer=vt("div",_+"control-container",this._container);function P(R,B){var U=_+R+" "+_+B;d[R+B]=vt("div",U,w)}P("top","left"),P("top","right"),P("bottom","left"),P("bottom","right")},_clearControlPos:function(){for(var d in this._controlCorners)It(this._controlCorners[d]);It(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var vA=hi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(d,_,w,P){return w1,this._baseLayersList.style.display=d?"":"none"),this._separator.style.display=_&&d?"":"none",this},_onLayerChange:function(d){this._handlingClick||this._update();var _=this._getLayer(l(d.target)),w=_.overlay?d.type==="add"?"overlayadd":"overlayremove":d.type==="add"?"baselayerchange":null;w&&this._map.fire(w,_)},_createRadioElement:function(d,_){var w='",P=document.createElement("div");return P.innerHTML=w,P.firstChild},_addItem:function(d){var _=document.createElement("label"),w=this._map.hasLayer(d.layer),P;d.overlay?(P=document.createElement("input"),P.type="checkbox",P.className="leaflet-control-layers-selector",P.defaultChecked=w):P=this._createRadioElement("leaflet-base-layers_"+l(this),w),this._layerControlInputs.push(P),P.layerId=l(d.layer),qe(P,"click",this._onInputClick,this);var R=document.createElement("span");R.innerHTML=" "+d.name;var B=document.createElement("span");_.appendChild(B),B.appendChild(P),B.appendChild(R);var U=d.overlay?this._overlaysList:this._baseLayersList;return U.appendChild(_),this._checkDisabledLayers(),_},_onInputClick:function(){if(!this._preventClick){var d=this._layerControlInputs,_,w,P=[],R=[];this._handlingClick=!0;for(var B=d.length-1;B>=0;B--)_=d[B],w=this._getLayer(_.layerId).layer,_.checked?P.push(w):_.checked||R.push(w);for(B=0;B=0;R--)_=d[R],w=this._getLayer(_.layerId).layer,_.disabled=w.options.minZoom!==void 0&&Pw.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var d=this._section;this._preventClick=!0,qe(d,"click",Cr),this.expand();var _=this;setTimeout(function(){Tt(d,"click",Cr),_._preventClick=!1})}}),Z8=function(d,_,w){return new vA(d,_,w)},D_=hi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(d){var _="leaflet-control-zoom",w=vt("div",_+" leaflet-bar"),P=this.options;return this._zoomInButton=this._createButton(P.zoomInText,P.zoomInTitle,_+"-in",w,this._zoomIn),this._zoomOutButton=this._createButton(P.zoomOutText,P.zoomOutTitle,_+"-out",w,this._zoomOut),this._updateDisabled(),d.on("zoomend zoomlevelschange",this._updateDisabled,this),w},onRemove:function(d){d.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(d){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(d.shiftKey?3:1))},_createButton:function(d,_,w,P,R){var B=vt("a",w,P);return B.innerHTML=d,B.href="#",B.title=_,B.setAttribute("role","button"),B.setAttribute("aria-label",_),Of(B),qe(B,"click",Ps),qe(B,"click",R,this),qe(B,"click",this._refocusOnMap,this),B},_updateDisabled:function(){var d=this._map,_="leaflet-disabled";Zt(this._zoomInButton,_),Zt(this._zoomOutButton,_),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||d._zoom===d.getMinZoom())&&(Qe(this._zoomOutButton,_),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||d._zoom===d.getMaxZoom())&&(Qe(this._zoomInButton,_),this._zoomInButton.setAttribute("aria-disabled","true"))}});ct.mergeOptions({zoomControl:!0}),ct.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new D_,this.addControl(this.zoomControl))});var $8=function(d){return new D_(d)},dA=hi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(d){var _="leaflet-control-scale",w=vt("div",_),P=this.options;return this._addScales(P,_+"-line",w),d.on(P.updateWhenIdle?"moveend":"move",this._update,this),d.whenReady(this._update,this),w},onRemove:function(d){d.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(d,_,w){d.metric&&(this._mScale=vt("div",_,w)),d.imperial&&(this._iScale=vt("div",_,w))},_update:function(){var d=this._map,_=d.getSize().y/2,w=d.distance(d.containerPointToLatLng([0,_]),d.containerPointToLatLng([this.options.maxWidth,_]));this._updateScales(w)},_updateScales:function(d){this.options.metric&&d&&this._updateMetric(d),this.options.imperial&&d&&this._updateImperial(d)},_updateMetric:function(d){var _=this._getRoundNum(d),w=_<1e3?_+" m":_/1e3+" km";this._updateScale(this._mScale,w,_/d)},_updateImperial:function(d){var _=d*3.2808399,w,P,R;_>5280?(w=_/5280,P=this._getRoundNum(w),this._updateScale(this._iScale,P+" mi",P/w)):(R=this._getRoundNum(_),this._updateScale(this._iScale,R+" ft",R/_))},_updateScale:function(d,_,w){d.style.width=Math.round(this.options.maxWidth*w)+"px",d.innerHTML=_},_getRoundNum:function(d){var _=Math.pow(10,(Math.floor(d)+"").length-1),w=d/_;return w=w>=10?10:w>=5?5:w>=3?3:w>=2?2:1,_*w}}),Y8=function(d){return new dA(d)},X8='',k_=hi.extend({options:{position:"bottomright",prefix:''+(Ne.inlineSvg?X8+" ":"")+"Leaflet"},initialize:function(d){g(this,d),this._attributions={}},onAdd:function(d){d.attributionControl=this,this._container=vt("div","leaflet-control-attribution"),Of(this._container);for(var _ in d._layers)d._layers[_].getAttribution&&this.addAttribution(d._layers[_].getAttribution());return this._update(),d.on("layeradd",this._addAttribution,this),this._container},onRemove:function(d){d.off("layeradd",this._addAttribution,this)},_addAttribution:function(d){d.layer.getAttribution&&(this.addAttribution(d.layer.getAttribution()),d.layer.once("remove",function(){this.removeAttribution(d.layer.getAttribution())},this))},setPrefix:function(d){return this.options.prefix=d,this._update(),this},addAttribution:function(d){return d?(this._attributions[d]||(this._attributions[d]=0),this._attributions[d]++,this._update(),this):this},removeAttribution:function(d){return d?(this._attributions[d]&&(this._attributions[d]--,this._update()),this):this},_update:function(){if(this._map){var d=[];for(var _ in this._attributions)this._attributions[_]&&d.push(_);var w=[];this.options.prefix&&w.push(this.options.prefix),d.length&&w.push(d.join(", ")),this._container.innerHTML=w.join(' ')}}});ct.mergeOptions({attributionControl:!0}),ct.addInitHook(function(){this.options.attributionControl&&new k_().addTo(this)});var q8=function(d){return new k_(d)};hi.Layers=vA,hi.Zoom=D_,hi.Scale=dA,hi.Attribution=k_,zf.layers=Z8,zf.zoom=$8,zf.scale=Y8,zf.attribution=q8;var Gi=F.extend({initialize:function(d){this._map=d},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Gi.addTo=function(d,_){return d.addHandler(_,this),this};var K8={Events:G},pA=Ne.touch?"touchstart mousedown":"mousedown",go=Z.extend({options:{clickTolerance:3},initialize:function(d,_,w,P){g(this,P),this._element=d,this._dragStartTarget=_||d,this._preventOutline=w},enable:function(){this._enabled||(qe(this._dragStartTarget,pA,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(go._dragging===this&&this.finishDrag(!0),Tt(this._dragStartTarget,pA,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(d){if(this._enabled&&(this._moved=!1,!m_(this._element,"leaflet-zoom-anim"))){if(d.touches&&d.touches.length!==1){go._dragging===this&&this.finishDrag();return}if(!(go._dragging||d.shiftKey||d.which!==1&&d.button!==1&&!d.touches)&&(go._dragging=this,this._preventOutline&&b_(this._element),x_(),Ef(),!this._moving)){this.fire("down");var _=d.touches?d.touches[0]:d,w=sA(this._element);this._startPoint=new V(_.clientX,_.clientY),this._startPos=Ls(this._element),this._parentScale=T_(w);var P=d.type==="mousedown";qe(document,P?"mousemove":"touchmove",this._onMove,this),qe(document,P?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(d){if(this._enabled){if(d.touches&&d.touches.length>1){this._moved=!0;return}var _=d.touches&&d.touches.length===1?d.touches[0]:d,w=new V(_.clientX,_.clientY)._subtract(this._startPoint);!w.x&&!w.y||Math.abs(w.x)+Math.abs(w.y)B&&(U=Q,B=te);B>w&&(_[U]=1,E_(d,_,w,P,U),E_(d,_,w,U,R))}function tW(d,_){for(var w=[d[0]],P=1,R=0,B=d.length;P_&&(w.push(d[P]),R=P);return R_.max.x&&(w|=2),d.y<_.min.y?w|=4:d.y>_.max.y&&(w|=8),w}function rW(d,_){var w=_.x-d.x,P=_.y-d.y;return w*w+P*P}function Bf(d,_,w,P){var R=_.x,B=_.y,U=w.x-R,Q=w.y-B,te=U*U+Q*Q,ae;return te>0&&(ae=((d.x-R)*U+(d.y-B)*Q)/te,ae>1?(R=w.x,B=w.y):ae>0&&(R+=U*ae,B+=Q*ae)),U=d.x-R,Q=d.y-B,P?U*U+Q*Q:new V(R,B)}function Bn(d){return!S(d[0])||typeof d[0][0]!="object"&&typeof d[0][0]<"u"}function wA(d){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Bn(d)}function bA(d,_){var w,P,R,B,U,Q,te,ae;if(!d||d.length===0)throw new Error("latlngs not passed");Bn(d)||(console.warn("latlngs are not flat! Only the first ring will be used"),d=d[0]);var Le=de([0,0]),Ge=ie(d),tt=Ge.getNorthWest().distanceTo(Ge.getSouthWest())*Ge.getNorthEast().distanceTo(Ge.getNorthWest());tt<1700&&(Le=I_(d));var Yr=d.length,gr=[];for(w=0;wP){te=(B-P)/R,ae=[Q.x-te*(Q.x-U.x),Q.y-te*(Q.y-U.y)];break}var sn=_.unproject(H(ae));return de([sn.lat+Le.lat,sn.lng+Le.lng])}var nW={__proto__:null,simplify:yA,pointToSegmentDistance:_A,closestPointOnSegment:J8,clipSegment:SA,_getEdgeIntersection:qd,_getBitCode:Ds,_sqClosestPointOnSegment:Bf,isFlat:Bn,_flat:wA,polylineCenter:bA},R_={project:function(d){return new V(d.lng,d.lat)},unproject:function(d){return new ue(d.y,d.x)},bounds:new Y([-180,-90],[180,90])},N_={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Y([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(d){var _=Math.PI/180,w=this.R,P=d.lat*_,R=this.R_MINOR/w,B=Math.sqrt(1-R*R),U=B*Math.sin(P),Q=Math.tan(Math.PI/4-P/2)/Math.pow((1-U)/(1+U),B/2);return P=-w*Math.log(Math.max(Q,1e-10)),new V(d.lng*_*w,P)},unproject:function(d){for(var _=180/Math.PI,w=this.R,P=this.R_MINOR/w,R=Math.sqrt(1-P*P),B=Math.exp(-d.y/w),U=Math.PI/2-2*Math.atan(B),Q=0,te=.1,ae;Q<15&&Math.abs(te)>1e-7;Q++)ae=R*Math.sin(U),ae=Math.pow((1-ae)/(1+ae),R/2),te=Math.PI/2-2*Math.atan(B*ae)-U,U+=te;return new ue(U*_,d.x*_/w)}},iW={__proto__:null,LonLat:R_,Mercator:N_,SphericalMercator:De},aW=i({},xe,{code:"EPSG:3395",projection:N_,transformation:function(){var d=.5/(Math.PI*N_.R);return Me(d,.5,-d,.5)}()}),TA=i({},xe,{code:"EPSG:4326",projection:R_,transformation:Me(1/180,1,-1/180,.5)}),oW=i({},Fe,{projection:R_,transformation:Me(1,0,-1,0),scale:function(d){return Math.pow(2,d)},zoom:function(d){return Math.log(d)/Math.LN2},distance:function(d,_){var w=_.lng-d.lng,P=_.lat-d.lat;return Math.sqrt(w*w+P*P)},infinite:!0});Fe.Earth=xe,Fe.EPSG3395=aW,Fe.EPSG3857=ot,Fe.EPSG900913=$e,Fe.EPSG4326=TA,Fe.Simple=oW;var vi=Z.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(d){return d.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(d){return d&&d.removeLayer(this),this},getPane:function(d){return this._map.getPane(d?this.options[d]||d:this.options.pane)},addInteractiveTarget:function(d){return this._map._targets[l(d)]=this,this},removeInteractiveTarget:function(d){return delete this._map._targets[l(d)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(d){var _=d.target;if(_.hasLayer(this)){if(this._map=_,this._zoomAnimated=_._zoomAnimated,this.getEvents){var w=this.getEvents();_.on(w,this),this.once("remove",function(){_.off(w,this)},this)}this.onAdd(_),this.fire("add"),_.fire("layeradd",{layer:this})}}});ct.include({addLayer:function(d){if(!d._layerAdd)throw new Error("The provided object is not a Layer.");var _=l(d);return this._layers[_]?this:(this._layers[_]=d,d._mapToAdd=this,d.beforeAdd&&d.beforeAdd(this),this.whenReady(d._layerAdd,d),this)},removeLayer:function(d){var _=l(d);return this._layers[_]?(this._loaded&&d.onRemove(this),delete this._layers[_],this._loaded&&(this.fire("layerremove",{layer:d}),d.fire("remove")),d._map=d._mapToAdd=null,this):this},hasLayer:function(d){return l(d)in this._layers},eachLayer:function(d,_){for(var w in this._layers)d.call(_,this._layers[w]);return this},_addLayers:function(d){d=d?S(d)?d:[d]:[];for(var _=0,w=d.length;_this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&_[0]instanceof ue&&_[0].equals(_[w-1])&&_.pop(),_},_setLatLngs:function(d){Ma.prototype._setLatLngs.call(this,d),Bn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Bn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var d=this._renderer._bounds,_=this.options.weight,w=new V(_,_);if(d=new Y(d.min.subtract(w),d.max.add(w)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(d))){if(this.options.noClip){this._parts=this._rings;return}for(var P=0,R=this._rings.length,B;Pd.y!=R.y>d.y&&d.x<(R.x-P.x)*(d.y-P.y)/(R.y-P.y)+P.x&&(_=!_);return _||Ma.prototype._containsPoint.call(this,d,!0)}});function dW(d,_){return new _u(d,_)}var La=Ca.extend({initialize:function(d,_){g(this,_),this._layers={},d&&this.addData(d)},addData:function(d){var _=S(d)?d:d.features,w,P,R;if(_){for(w=0,P=_.length;w0&&R.push(R[0].slice()),R}function xu(d,_){return d.feature?i({},d.feature,{geometry:_}):rp(_)}function rp(d){return d.type==="Feature"||d.type==="FeatureCollection"?d:{type:"Feature",properties:{},geometry:d}}var V_={toGeoJSON:function(d){return xu(this,{type:"Point",coordinates:B_(this.getLatLng(),d)})}};Kd.include(V_),O_.include(V_),Qd.include(V_),Ma.include({toGeoJSON:function(d){var _=!Bn(this._latlngs),w=tp(this._latlngs,_?1:0,!1,d);return xu(this,{type:(_?"Multi":"")+"LineString",coordinates:w})}}),_u.include({toGeoJSON:function(d){var _=!Bn(this._latlngs),w=_&&!Bn(this._latlngs[0]),P=tp(this._latlngs,w?2:_?1:0,!0,d);return _||(P=[P]),xu(this,{type:(w?"Multi":"")+"Polygon",coordinates:P})}}),mu.include({toMultiPoint:function(d){var _=[];return this.eachLayer(function(w){_.push(w.toGeoJSON(d).geometry.coordinates)}),xu(this,{type:"MultiPoint",coordinates:_})},toGeoJSON:function(d){var _=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(_==="MultiPoint")return this.toMultiPoint(d);var w=_==="GeometryCollection",P=[];return this.eachLayer(function(R){if(R.toGeoJSON){var B=R.toGeoJSON(d);if(w)P.push(B.geometry);else{var U=rp(B);U.type==="FeatureCollection"?P.push.apply(P,U.features):P.push(U)}}}),w?xu(this,{geometries:P,type:"GeometryCollection"}):{type:"FeatureCollection",features:P}}});function LA(d,_){return new La(d,_)}var pW=LA,np=vi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(d,_,w){this._url=d,this._bounds=ie(_),g(this,w)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Qe(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){It(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(d){return this.options.opacity=d,this._image&&this._updateOpacity(),this},setStyle:function(d){return d.opacity&&this.setOpacity(d.opacity),this},bringToFront:function(){return this._map&&pu(this._image),this},bringToBack:function(){return this._map&&gu(this._image),this},setUrl:function(d){return this._url=d,this._image&&(this._image.src=d),this},setBounds:function(d){return this._bounds=ie(d),this._map&&this._reset(),this},getEvents:function(){var d={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(d.zoomanim=this._animateZoom),d},setZIndex:function(d){return this.options.zIndex=d,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var d=this._url.tagName==="IMG",_=this._image=d?this._url:vt("img");if(Qe(_,"leaflet-image-layer"),this._zoomAnimated&&Qe(_,"leaflet-zoom-animated"),this.options.className&&Qe(_,this.options.className),_.onselectstart=f,_.onmousemove=f,_.onload=o(this.fire,this,"load"),_.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(_.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),d){this._url=_.src;return}_.src=this._url,_.alt=this.options.alt},_animateZoom:function(d){var _=this._map.getZoomScale(d.zoom),w=this._map._latLngBoundsToNewLayerBounds(this._bounds,d.zoom,d.center).min;Ms(this._image,w,_)},_reset:function(){var d=this._image,_=new Y(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),w=_.getSize();Qt(d,_.min),d.style.width=w.x+"px",d.style.height=w.y+"px"},_updateOpacity:function(){zn(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var d=this.options.errorOverlayUrl;d&&this._url!==d&&(this._url=d,this._image.src=d)},getCenter:function(){return this._bounds.getCenter()}}),gW=function(d,_,w){return new np(d,_,w)},AA=np.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var d=this._url.tagName==="VIDEO",_=this._image=d?this._url:vt("video");if(Qe(_,"leaflet-image-layer"),this._zoomAnimated&&Qe(_,"leaflet-zoom-animated"),this.options.className&&Qe(_,this.options.className),_.onselectstart=f,_.onmousemove=f,_.onloadeddata=o(this.fire,this,"load"),d){for(var w=_.getElementsByTagName("source"),P=[],R=0;R0?P:[_.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(_.style,"objectFit")&&(_.style.objectFit="fill"),_.autoplay=!!this.options.autoplay,_.loop=!!this.options.loop,_.muted=!!this.options.muted,_.playsInline=!!this.options.playsInline;for(var B=0;BR?(_.height=R+"px",Qe(d,B)):Zt(d,B),this._containerWidth=this._container.offsetWidth},_animateZoom:function(d){var _=this._map._latLngToNewLayerPoint(this._latlng,d.zoom,d.center),w=this._getAnchor();Qt(this._container,_.add(w))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var d=this._map,_=parseInt(If(this._container,"marginBottom"),10)||0,w=this._container.offsetHeight+_,P=this._containerWidth,R=new V(this._containerLeft,-w-this._containerBottom);R._add(Ls(this._container));var B=d.layerPointToContainerPoint(R),U=H(this.options.autoPanPadding),Q=H(this.options.autoPanPaddingTopLeft||U),te=H(this.options.autoPanPaddingBottomRight||U),ae=d.getSize(),Le=0,Ge=0;B.x+P+te.x>ae.x&&(Le=B.x+P-ae.x+te.x),B.x-Le-Q.x<0&&(Le=B.x-Q.x),B.y+w+te.y>ae.y&&(Ge=B.y+w-ae.y+te.y),B.y-Ge-Q.y<0&&(Ge=B.y-Q.y),(Le||Ge)&&(this.options.keepInView&&(this._autopanning=!0),d.fire("autopanstart").panBy([Le,Ge]))}},_getAnchor:function(){return H(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),_W=function(d,_){return new ip(d,_)};ct.mergeOptions({closePopupOnClick:!0}),ct.include({openPopup:function(d,_,w){return this._initOverlay(ip,d,_,w).openOn(this),this},closePopup:function(d){return d=arguments.length?d:this._popup,d&&d.close(),this}}),vi.include({bindPopup:function(d,_){return this._popup=this._initOverlay(ip,this._popup,d,_),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(d){return this._popup&&(this instanceof Ca||(this._popup._source=this),this._popup._prepareOpen(d||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(d){return this._popup&&this._popup.setContent(d),this},getPopup:function(){return this._popup},_openPopup:function(d){if(!(!this._popup||!this._map)){Ps(d);var _=d.layer||d.target;if(this._popup._source===_&&!(_ instanceof mo)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(d.latlng);return}this._popup._source=_,this.openPopup(d.latlng)}},_movePopup:function(d){this._popup.setLatLng(d.latlng)},_onKeyPress:function(d){d.originalEvent.keyCode===13&&this._openPopup(d)}});var ap=ji.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(d){ji.prototype.onAdd.call(this,d),this.setOpacity(this.options.opacity),d.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(d){ji.prototype.onRemove.call(this,d),d.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var d=ji.prototype.getEvents.call(this);return this.options.permanent||(d.preclick=this.close),d},_initLayout:function(){var d="leaflet-tooltip",_=d+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=vt("div",_),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(d){var _,w,P=this._map,R=this._container,B=P.latLngToContainerPoint(P.getCenter()),U=P.layerPointToContainerPoint(d),Q=this.options.direction,te=R.offsetWidth,ae=R.offsetHeight,Le=H(this.options.offset),Ge=this._getAnchor();Q==="top"?(_=te/2,w=ae):Q==="bottom"?(_=te/2,w=0):Q==="center"?(_=te/2,w=ae/2):Q==="right"?(_=0,w=ae/2):Q==="left"?(_=te,w=ae/2):U.xthis.options.maxZoom||wP?this._retainParent(R,B,U,P):!1)},_retainChildren:function(d,_,w,P){for(var R=2*d;R<2*d+2;R++)for(var B=2*_;B<2*_+2;B++){var U=new V(R,B);U.z=w+1;var Q=this._tileCoordsToKey(U),te=this._tiles[Q];if(te&&te.active){te.retain=!0;continue}else te&&te.loaded&&(te.retain=!0);w+1this.options.maxZoom||this.options.minZoom!==void 0&&R1){this._setView(d,w);return}for(var Ge=R.min.y;Ge<=R.max.y;Ge++)for(var tt=R.min.x;tt<=R.max.x;tt++){var Yr=new V(tt,Ge);if(Yr.z=this._tileZoom,!!this._isValidTile(Yr)){var gr=this._tiles[this._tileCoordsToKey(Yr)];gr?gr.current=!0:U.push(Yr)}}if(U.sort(function(sn,wu){return sn.distanceTo(B)-wu.distanceTo(B)}),U.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Vn=document.createDocumentFragment();for(tt=0;ttw.max.x)||!_.wrapLat&&(d.yw.max.y))return!1}if(!this.options.bounds)return!0;var P=this._tileCoordsToBounds(d);return ie(this.options.bounds).overlaps(P)},_keyToBounds:function(d){return this._tileCoordsToBounds(this._keyToTileCoords(d))},_tileCoordsToNwSe:function(d){var _=this._map,w=this.getTileSize(),P=d.scaleBy(w),R=P.add(w),B=_.unproject(P,d.z),U=_.unproject(R,d.z);return[B,U]},_tileCoordsToBounds:function(d){var _=this._tileCoordsToNwSe(d),w=new ne(_[0],_[1]);return this.options.noWrap||(w=this._map.wrapLatLngBounds(w)),w},_tileCoordsToKey:function(d){return d.x+":"+d.y+":"+d.z},_keyToTileCoords:function(d){var _=d.split(":"),w=new V(+_[0],+_[1]);return w.z=+_[2],w},_removeTile:function(d){var _=this._tiles[d];_&&(It(_.el),delete this._tiles[d],this.fire("tileunload",{tile:_.el,coords:this._keyToTileCoords(d)}))},_initTile:function(d){Qe(d,"leaflet-tile");var _=this.getTileSize();d.style.width=_.x+"px",d.style.height=_.y+"px",d.onselectstart=f,d.onmousemove=f,Ne.ielt9&&this.options.opacity<1&&zn(d,this.options.opacity)},_addTile:function(d,_){var w=this._getTilePos(d),P=this._tileCoordsToKey(d),R=this.createTile(this._wrapCoords(d),o(this._tileReady,this,d));this._initTile(R),this.createTile.length<2&&E(o(this._tileReady,this,d,null,R)),Qt(R,w),this._tiles[P]={el:R,coords:d,current:!0},_.appendChild(R),this.fire("tileloadstart",{tile:R,coords:d})},_tileReady:function(d,_,w){_&&this.fire("tileerror",{error:_,tile:w,coords:d});var P=this._tileCoordsToKey(d);w=this._tiles[P],w&&(w.loaded=+new Date,this._map._fadeAnimated?(zn(w.el,0),z(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this)):(w.active=!0,this._pruneTiles()),_||(Qe(w.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:w.el,coords:d})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ne.ielt9||!this._map._fadeAnimated?E(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(d){return d.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(d){var _=new V(this._wrapX?c(d.x,this._wrapX):d.x,this._wrapY?c(d.y,this._wrapY):d.y);return _.z=d.z,_},_pxBoundsToTileRange:function(d){var _=this.getTileSize();return new Y(d.min.unscaleBy(_).floor(),d.max.unscaleBy(_).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var d in this._tiles)if(!this._tiles[d].loaded)return!1;return!0}});function wW(d){return new Ff(d)}var Su=Ff.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(d,_){this._url=d,_=g(this,_),_.detectRetina&&Ne.retina&&_.maxZoom>0?(_.tileSize=Math.floor(_.tileSize/2),_.zoomReverse?(_.zoomOffset--,_.minZoom=Math.min(_.maxZoom,_.minZoom+1)):(_.zoomOffset++,_.maxZoom=Math.max(_.minZoom,_.maxZoom-1)),_.minZoom=Math.max(0,_.minZoom)):_.zoomReverse?_.minZoom=Math.min(_.maxZoom,_.minZoom):_.maxZoom=Math.max(_.minZoom,_.maxZoom),typeof _.subdomains=="string"&&(_.subdomains=_.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(d,_){return this._url===d&&_===void 0&&(_=!0),this._url=d,_||this.redraw(),this},createTile:function(d,_){var w=document.createElement("img");return qe(w,"load",o(this._tileOnLoad,this,_,w)),qe(w,"error",o(this._tileOnError,this,_,w)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(w.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(w.referrerPolicy=this.options.referrerPolicy),w.alt="",w.src=this.getTileUrl(d),w},getTileUrl:function(d){var _={r:Ne.retina?"@2x":"",s:this._getSubdomain(d),x:d.x,y:d.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var w=this._globalTileRange.max.y-d.y;this.options.tms&&(_.y=w),_["-y"]=w}return x(this._url,i(_,this.options))},_tileOnLoad:function(d,_){Ne.ielt9?setTimeout(o(d,this,null,_),0):d(null,_)},_tileOnError:function(d,_,w){var P=this.options.errorTileUrl;P&&_.getAttribute("src")!==P&&(_.src=P),d(w,_)},_onTileRemove:function(d){d.tile.onload=null},_getZoomForUrl:function(){var d=this._tileZoom,_=this.options.maxZoom,w=this.options.zoomReverse,P=this.options.zoomOffset;return w&&(d=_-d),d+P},_getSubdomain:function(d){var _=Math.abs(d.x+d.y)%this.options.subdomains.length;return this.options.subdomains[_]},_abortLoading:function(){var d,_;for(d in this._tiles)if(this._tiles[d].coords.z!==this._tileZoom&&(_=this._tiles[d].el,_.onload=f,_.onerror=f,!_.complete)){_.src=T;var w=this._tiles[d].coords;It(_),delete this._tiles[d],this.fire("tileabort",{tile:_,coords:w})}},_removeTile:function(d){var _=this._tiles[d];if(_)return _.el.setAttribute("src",T),Ff.prototype._removeTile.call(this,d)},_tileReady:function(d,_,w){if(!(!this._map||w&&w.getAttribute("src")===T))return Ff.prototype._tileReady.call(this,d,_,w)}});function kA(d,_){return new Su(d,_)}var IA=Su.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(d,_){this._url=d;var w=i({},this.defaultWmsParams);for(var P in _)P in this.options||(w[P]=_[P]);_=g(this,_);var R=_.detectRetina&&Ne.retina?2:1,B=this.getTileSize();w.width=B.x*R,w.height=B.y*R,this.wmsParams=w},onAdd:function(d){this._crs=this.options.crs||d.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var _=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[_]=this._crs.code,Su.prototype.onAdd.call(this,d)},getTileUrl:function(d){var _=this._tileCoordsToNwSe(d),w=this._crs,P=K(w.project(_[0]),w.project(_[1])),R=P.min,B=P.max,U=(this._wmsVersion>=1.3&&this._crs===TA?[R.y,R.x,B.y,B.x]:[R.x,R.y,B.x,B.y]).join(","),Q=Su.prototype.getTileUrl.call(this,d);return Q+m(this.wmsParams,Q,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+U},setParams:function(d,_){return i(this.wmsParams,d),_||this.redraw(),this}});function bW(d,_){return new IA(d,_)}Su.WMS=IA,kA.wms=bW;var Aa=vi.extend({options:{padding:.1},initialize:function(d){g(this,d),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Qe(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var d={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(d.zoomanim=this._onAnimZoom),d},_onAnimZoom:function(d){this._updateTransform(d.center,d.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(d,_){var w=this._map.getZoomScale(_,this._zoom),P=this._map.getSize().multiplyBy(.5+this.options.padding),R=this._map.project(this._center,_),B=P.multiplyBy(-w).add(R).subtract(this._map._getNewPixelOrigin(d,_));Ne.any3d?Ms(this._container,B,w):Qt(this._container,B)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var d in this._layers)this._layers[d]._reset()},_onZoomEnd:function(){for(var d in this._layers)this._layers[d]._project()},_updatePaths:function(){for(var d in this._layers)this._layers[d]._update()},_update:function(){var d=this.options.padding,_=this._map.getSize(),w=this._map.containerPointToLayerPoint(_.multiplyBy(-d)).round();this._bounds=new Y(w,w.add(_.multiplyBy(1+d*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),EA=Aa.extend({options:{tolerance:0},getEvents:function(){var d=Aa.prototype.getEvents.call(this);return d.viewprereset=this._onViewPreReset,d},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Aa.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var d=this._container=document.createElement("canvas");qe(d,"mousemove",this._onMouseMove,this),qe(d,"click dblclick mousedown mouseup contextmenu",this._onClick,this),qe(d,"mouseout",this._handleMouseOut,this),d._leaflet_disable_events=!0,this._ctx=d.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,It(this._container),Tt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var d;this._redrawBounds=null;for(var _ in this._layers)d=this._layers[_],d._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Aa.prototype._update.call(this);var d=this._bounds,_=this._container,w=d.getSize(),P=Ne.retina?2:1;Qt(_,d.min),_.width=P*w.x,_.height=P*w.y,_.style.width=w.x+"px",_.style.height=w.y+"px",Ne.retina&&this._ctx.scale(2,2),this._ctx.translate(-d.min.x,-d.min.y),this.fire("update")}},_reset:function(){Aa.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(d){this._updateDashArray(d),this._layers[l(d)]=d;var _=d._order={layer:d,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=_),this._drawLast=_,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(d){this._requestRedraw(d)},_removePath:function(d){var _=d._order,w=_.next,P=_.prev;w?w.prev=P:this._drawLast=P,P?P.next=w:this._drawFirst=w,delete d._order,delete this._layers[l(d)],this._requestRedraw(d)},_updatePath:function(d){this._extendRedrawBounds(d),d._project(),d._update(),this._requestRedraw(d)},_updateStyle:function(d){this._updateDashArray(d),this._requestRedraw(d)},_updateDashArray:function(d){if(typeof d.options.dashArray=="string"){var _=d.options.dashArray.split(/[, ]+/),w=[],P,R;for(R=0;R<_.length;R++){if(P=Number(_[R]),isNaN(P))return;w.push(P)}d.options._dashArray=w}else d.options._dashArray=d.options.dashArray},_requestRedraw:function(d){this._map&&(this._extendRedrawBounds(d),this._redrawRequest=this._redrawRequest||E(this._redraw,this))},_extendRedrawBounds:function(d){if(d._pxBounds){var _=(d.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Y,this._redrawBounds.extend(d._pxBounds.min.subtract([_,_])),this._redrawBounds.extend(d._pxBounds.max.add([_,_]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var d=this._redrawBounds;if(d){var _=d.getSize();this._ctx.clearRect(d.min.x,d.min.y,_.x,_.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var d,_=this._redrawBounds;if(this._ctx.save(),_){var w=_.getSize();this._ctx.beginPath(),this._ctx.rect(_.min.x,_.min.y,w.x,w.y),this._ctx.clip()}this._drawing=!0;for(var P=this._drawFirst;P;P=P.next)d=P.layer,(!_||d._pxBounds&&d._pxBounds.intersects(_))&&d._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(d,_){if(this._drawing){var w,P,R,B,U=d._parts,Q=U.length,te=this._ctx;if(Q){for(te.beginPath(),w=0;w')}}catch{}return function(d){return document.createElement("<"+d+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),TW={_initContainer:function(){this._container=vt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Aa.prototype._update.call(this),this.fire("update"))},_initPath:function(d){var _=d._container=Gf("shape");Qe(_,"leaflet-vml-shape "+(this.options.className||"")),_.coordsize="1 1",d._path=Gf("path"),_.appendChild(d._path),this._updateStyle(d),this._layers[l(d)]=d},_addPath:function(d){var _=d._container;this._container.appendChild(_),d.options.interactive&&d.addInteractiveTarget(_)},_removePath:function(d){var _=d._container;It(_),d.removeInteractiveTarget(_),delete this._layers[l(d)]},_updateStyle:function(d){var _=d._stroke,w=d._fill,P=d.options,R=d._container;R.stroked=!!P.stroke,R.filled=!!P.fill,P.stroke?(_||(_=d._stroke=Gf("stroke")),R.appendChild(_),_.weight=P.weight+"px",_.color=P.color,_.opacity=P.opacity,P.dashArray?_.dashStyle=S(P.dashArray)?P.dashArray.join(" "):P.dashArray.replace(/( *, *)/g," "):_.dashStyle="",_.endcap=P.lineCap.replace("butt","flat"),_.joinstyle=P.lineJoin):_&&(R.removeChild(_),d._stroke=null),P.fill?(w||(w=d._fill=Gf("fill")),R.appendChild(w),w.color=P.fillColor||P.color,w.opacity=P.fillOpacity):w&&(R.removeChild(w),d._fill=null)},_updateCircle:function(d){var _=d._point.round(),w=Math.round(d._radius),P=Math.round(d._radiusY||w);this._setPath(d,d._empty()?"M0 0":"AL "+_.x+","+_.y+" "+w+","+P+" 0,"+65535*360)},_setPath:function(d,_){d._path.v=_},_bringToFront:function(d){pu(d._container)},_bringToBack:function(d){gu(d._container)}},op=Ne.vml?Gf:et,jf=Aa.extend({_initContainer:function(){this._container=op("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=op("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){It(this._container),Tt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Aa.prototype._update.call(this);var d=this._bounds,_=d.getSize(),w=this._container;(!this._svgSize||!this._svgSize.equals(_))&&(this._svgSize=_,w.setAttribute("width",_.x),w.setAttribute("height",_.y)),Qt(w,d.min),w.setAttribute("viewBox",[d.min.x,d.min.y,_.x,_.y].join(" ")),this.fire("update")}},_initPath:function(d){var _=d._path=op("path");d.options.className&&Qe(_,d.options.className),d.options.interactive&&Qe(_,"leaflet-interactive"),this._updateStyle(d),this._layers[l(d)]=d},_addPath:function(d){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(d._path),d.addInteractiveTarget(d._path)},_removePath:function(d){It(d._path),d.removeInteractiveTarget(d._path),delete this._layers[l(d)]},_updatePath:function(d){d._project(),d._update()},_updateStyle:function(d){var _=d._path,w=d.options;_&&(w.stroke?(_.setAttribute("stroke",w.color),_.setAttribute("stroke-opacity",w.opacity),_.setAttribute("stroke-width",w.weight),_.setAttribute("stroke-linecap",w.lineCap),_.setAttribute("stroke-linejoin",w.lineJoin),w.dashArray?_.setAttribute("stroke-dasharray",w.dashArray):_.removeAttribute("stroke-dasharray"),w.dashOffset?_.setAttribute("stroke-dashoffset",w.dashOffset):_.removeAttribute("stroke-dashoffset")):_.setAttribute("stroke","none"),w.fill?(_.setAttribute("fill",w.fillColor||w.color),_.setAttribute("fill-opacity",w.fillOpacity),_.setAttribute("fill-rule",w.fillRule||"evenodd")):_.setAttribute("fill","none"))},_updatePoly:function(d,_){this._setPath(d,ut(d._parts,_))},_updateCircle:function(d){var _=d._point,w=Math.max(Math.round(d._radius),1),P=Math.max(Math.round(d._radiusY),1)||w,R="a"+w+","+P+" 0 1,0 ",B=d._empty()?"M0 0":"M"+(_.x-w)+","+_.y+R+w*2+",0 "+R+-w*2+",0 ";this._setPath(d,B)},_setPath:function(d,_){d._path.setAttribute("d",_)},_bringToFront:function(d){pu(d._path)},_bringToBack:function(d){gu(d._path)}});Ne.vml&&jf.include(TW);function NA(d){return Ne.svg||Ne.vml?new jf(d):null}ct.include({getRenderer:function(d){var _=d.options.renderer||this._getPaneRenderer(d.options.pane)||this.options.renderer||this._renderer;return _||(_=this._renderer=this._createRenderer()),this.hasLayer(_)||this.addLayer(_),_},_getPaneRenderer:function(d){if(d==="overlayPane"||d===void 0)return!1;var _=this._paneRenderers[d];return _===void 0&&(_=this._createRenderer({pane:d}),this._paneRenderers[d]=_),_},_createRenderer:function(d){return this.options.preferCanvas&&RA(d)||NA(d)}});var OA=_u.extend({initialize:function(d,_){_u.prototype.initialize.call(this,this._boundsToLatLngs(d),_)},setBounds:function(d){return this.setLatLngs(this._boundsToLatLngs(d))},_boundsToLatLngs:function(d){return d=ie(d),[d.getSouthWest(),d.getNorthWest(),d.getNorthEast(),d.getSouthEast()]}});function CW(d,_){return new OA(d,_)}jf.create=op,jf.pointsToPath=ut,La.geometryToLayer=Jd,La.coordsToLatLng=z_,La.coordsToLatLngs=ep,La.latLngToCoords=B_,La.latLngsToCoords=tp,La.getFeature=xu,La.asFeature=rp,ct.mergeOptions({boxZoom:!0});var zA=Gi.extend({initialize:function(d){this._map=d,this._container=d._container,this._pane=d._panes.overlayPane,this._resetStateTimeout=0,d.on("unload",this._destroy,this)},addHooks:function(){qe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Tt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){It(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(d){if(!d.shiftKey||d.which!==1&&d.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Ef(),x_(),this._startPoint=this._map.mouseEventToContainerPoint(d),qe(document,{contextmenu:Ps,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(d){this._moved||(this._moved=!0,this._box=vt("div","leaflet-zoom-box",this._container),Qe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(d);var _=new Y(this._point,this._startPoint),w=_.getSize();Qt(this._box,_.min),this._box.style.width=w.x+"px",this._box.style.height=w.y+"px"},_finish:function(){this._moved&&(It(this._box),Zt(this._container,"leaflet-crosshair")),Rf(),S_(),Tt(document,{contextmenu:Ps,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(d){if(!(d.which!==1&&d.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var _=new ne(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(_).fire("boxzoomend",{boxZoomBounds:_})}},_onKeyDown:function(d){d.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ct.addInitHook("addHandler","boxZoom",zA),ct.mergeOptions({doubleClickZoom:!0});var BA=Gi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(d){var _=this._map,w=_.getZoom(),P=_.options.zoomDelta,R=d.originalEvent.shiftKey?w-P:w+P;_.options.doubleClickZoom==="center"?_.setZoom(R):_.setZoomAround(d.containerPoint,R)}});ct.addInitHook("addHandler","doubleClickZoom",BA),ct.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var VA=Gi.extend({addHooks:function(){if(!this._draggable){var d=this._map;this._draggable=new go(d._mapPane,d._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),d.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),d.on("zoomend",this._onZoomEnd,this),d.whenReady(this._onZoomEnd,this))}Qe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Zt(this._map._container,"leaflet-grab"),Zt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var d=this._map;if(d._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var _=ie(this._map.options.maxBounds);this._offsetLimit=K(this._map.latLngToContainerPoint(_.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(_.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;d.fire("movestart").fire("dragstart"),d.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(d){if(this._map.options.inertia){var _=this._lastTime=+new Date,w=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(w),this._times.push(_),this._prunePositions(_)}this._map.fire("move",d).fire("drag",d)},_prunePositions:function(d){for(;this._positions.length>1&&d-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var d=this._map.getSize().divideBy(2),_=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=_.subtract(d).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(d,_){return d-(d-_)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var d=this._draggable._newPos.subtract(this._draggable._startPos),_=this._offsetLimit;d.x<_.min.x&&(d.x=this._viscousLimit(d.x,_.min.x)),d.y<_.min.y&&(d.y=this._viscousLimit(d.y,_.min.y)),d.x>_.max.x&&(d.x=this._viscousLimit(d.x,_.max.x)),d.y>_.max.y&&(d.y=this._viscousLimit(d.y,_.max.y)),this._draggable._newPos=this._draggable._startPos.add(d)}},_onPreDragWrap:function(){var d=this._worldWidth,_=Math.round(d/2),w=this._initialWorldOffset,P=this._draggable._newPos.x,R=(P-_+w)%d+_-w,B=(P+_+w)%d-_-w,U=Math.abs(R+w)0?B:-B))-_;this._delta=0,this._startTime=null,U&&(d.options.scrollWheelZoom==="center"?d.setZoom(_+U):d.setZoomAround(this._lastMousePos,_+U))}});ct.addInitHook("addHandler","scrollWheelZoom",GA);var MW=600;ct.mergeOptions({tapHold:Ne.touchNative&&Ne.safari&&Ne.mobile,tapTolerance:15});var jA=Gi.extend({addHooks:function(){qe(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Tt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(d){if(clearTimeout(this._holdTimeout),d.touches.length===1){var _=d.touches[0];this._startPos=this._newPos=new V(_.clientX,_.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(qe(document,"touchend",Cr),qe(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",_))},this),MW),qe(document,"touchend touchcancel contextmenu",this._cancel,this),qe(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function d(){Tt(document,"touchend",Cr),Tt(document,"touchend touchcancel",d)},_cancel:function(){clearTimeout(this._holdTimeout),Tt(document,"touchend touchcancel contextmenu",this._cancel,this),Tt(document,"touchmove",this._onMove,this)},_onMove:function(d){var _=d.touches[0];this._newPos=new V(_.clientX,_.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(d,_){var w=new MouseEvent(d,{bubbles:!0,cancelable:!0,view:window,screenX:_.screenX,screenY:_.screenY,clientX:_.clientX,clientY:_.clientY});w._simulated=!0,_.target.dispatchEvent(w)}});ct.addInitHook("addHandler","tapHold",jA),ct.mergeOptions({touchZoom:Ne.touch,bounceAtZoomLimits:!0});var HA=Gi.extend({addHooks:function(){Qe(this._map._container,"leaflet-touch-zoom"),qe(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Zt(this._map._container,"leaflet-touch-zoom"),Tt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(d){var _=this._map;if(!(!d.touches||d.touches.length!==2||_._animatingZoom||this._zooming)){var w=_.mouseEventToContainerPoint(d.touches[0]),P=_.mouseEventToContainerPoint(d.touches[1]);this._centerPoint=_.getSize()._divideBy(2),this._startLatLng=_.containerPointToLatLng(this._centerPoint),_.options.touchZoom!=="center"&&(this._pinchStartLatLng=_.containerPointToLatLng(w.add(P)._divideBy(2))),this._startDist=w.distanceTo(P),this._startZoom=_.getZoom(),this._moved=!1,this._zooming=!0,_._stop(),qe(document,"touchmove",this._onTouchMove,this),qe(document,"touchend touchcancel",this._onTouchEnd,this),Cr(d)}},_onTouchMove:function(d){if(!(!d.touches||d.touches.length!==2||!this._zooming)){var _=this._map,w=_.mouseEventToContainerPoint(d.touches[0]),P=_.mouseEventToContainerPoint(d.touches[1]),R=w.distanceTo(P)/this._startDist;if(this._zoom=_.getScaleZoom(R,this._startZoom),!_.options.bounceAtZoomLimits&&(this._zoom<_.getMinZoom()&&R<1||this._zoom>_.getMaxZoom()&&R>1)&&(this._zoom=_._limitZoom(this._zoom)),_.options.touchZoom==="center"){if(this._center=this._startLatLng,R===1)return}else{var B=w._add(P)._divideBy(2)._subtract(this._centerPoint);if(R===1&&B.x===0&&B.y===0)return;this._center=_.unproject(_.project(this._pinchStartLatLng,this._zoom).subtract(B),this._zoom)}this._moved||(_._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var U=o(_._move,_,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=E(U,this,!0),Cr(d)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,z(this._animRequest),Tt(document,"touchmove",this._onTouchMove,this),Tt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ct.addInitHook("addHandler","touchZoom",HA),ct.BoxZoom=zA,ct.DoubleClickZoom=BA,ct.Drag=VA,ct.Keyboard=FA,ct.ScrollWheelZoom=GA,ct.TapHold=jA,ct.TouchZoom=HA,r.Bounds=Y,r.Browser=Ne,r.CRS=Fe,r.Canvas=EA,r.Circle=O_,r.CircleMarker=Qd,r.Class=F,r.Control=hi,r.DivIcon=DA,r.DivOverlay=ji,r.DomEvent=W8,r.DomUtil=j8,r.Draggable=go,r.Evented=Z,r.FeatureGroup=Ca,r.GeoJSON=La,r.GridLayer=Ff,r.Handler=Gi,r.Icon=yu,r.ImageOverlay=np,r.LatLng=ue,r.LatLngBounds=ne,r.Layer=vi,r.LayerGroup=mu,r.LineUtil=nW,r.Map=ct,r.Marker=Kd,r.Mixin=K8,r.Path=mo,r.Point=V,r.PolyUtil=Q8,r.Polygon=_u,r.Polyline=Ma,r.Popup=ip,r.PosAnimation=hA,r.Projection=iW,r.Rectangle=OA,r.Renderer=Aa,r.SVG=jf,r.SVGOverlay=PA,r.TileLayer=Su,r.Tooltip=ap,r.Transformation=he,r.Util=O,r.VideoOverlay=AA,r.bind=o,r.bounds=K,r.canvas=RA,r.circle=hW,r.circleMarker=fW,r.control=zf,r.divIcon=SW,r.extend=i,r.featureGroup=lW,r.geoJSON=LA,r.geoJson=pW,r.gridLayer=wW,r.icon=uW,r.imageOverlay=gW,r.latLng=de,r.latLngBounds=ie,r.layerGroup=sW,r.map=U8,r.marker=cW,r.point=H,r.polygon=dW,r.polyline=vW,r.popup=_W,r.rectangle=CW,r.setOptions=g,r.stamp=l,r.svg=NA,r.svgOverlay=yW,r.tileLayer=kA,r.tooltip=xW,r.transformation=Me,r.version=n,r.videoOverlay=mW;var LW=window.L;r.noConflict=function(){return window.L=LW,this},window.L=r})})(QT,QT.exports);var hu=QT.exports;const u8=eC(hu);function Hd(t,e,r){return Object.freeze({instance:t,context:e,container:r})}function GL(t,e){return e==null?function(n,i){const a=q.useRef();return a.current||(a.current=t(n,i)),a}:function(n,i){const a=q.useRef();a.current||(a.current=t(n,i));const o=q.useRef(n),{instance:s}=a.current;return q.useEffect(function(){o.current!==n&&(e(s,n,o.current),o.current=n)},[s,n,i]),a}}function c8(t,e){q.useEffect(function(){return(e.layerContainer??e.map).addLayer(t.instance),function(){var a;(a=e.layerContainer)==null||a.removeLayer(t.instance),e.map.removeLayer(t.instance)}},[e,t])}function $me(t){return function(r){const n=c_(),i=t(f_(r,n),n);return a8(n.map,r.attribution),FL(i.current,r.eventHandlers),c8(i.current,n),i}}function Yme(t,e){const r=q.useRef();q.useEffect(function(){if(e.pathOptions!==r.current){const i=e.pathOptions??{};t.instance.setStyle(i),r.current=i}},[t,e])}function Xme(t){return function(r){const n=c_(),i=t(f_(r,n),n);return FL(i.current,r.eventHandlers),c8(i.current,n),Yme(i.current,r),i}}function f8(t,e){const r=GL(t),n=Zme(r,e);return Wme(n)}function h8(t,e){const r=GL(t,e),n=Xme(r);return Hme(n)}function qme(t,e){const r=GL(t,e),n=$me(r);return Ume(n)}function Kme(t,e,r){const{opacity:n,zIndex:i}=e;n!=null&&n!==r.opacity&&t.setOpacity(n),i!=null&&i!==r.zIndex&&t.setZIndex(i)}function Qme(){return c_().map}const Jme=h8(function({center:e,children:r,...n},i){const a=new hu.CircleMarker(e,n);return Hd(a,o8(i,{overlayContainer:a}))},Fme);function JT(){return JT=Object.assign||function(t){for(var e=1;e(v==null?void 0:v.map)??null,[v]);const g=q.useCallback(y=>{if(y!==null&&v===null){const x=new hu.Map(y,c);r!=null&&u!=null?x.setView(r,u):t!=null&&x.fitBounds(t,e),l!=null&&x.whenReady(l),p(jme(x))}},[]);q.useEffect(()=>()=>{v==null||v.map.remove()},[v]);const m=v?Ec.createElement(l8,{value:v},n):o??null;return Ec.createElement("div",JT({},h,{ref:g}),m)}const tye=q.forwardRef(eye),rye=h8(function({positions:e,...r},n){const i=new hu.Polyline(e,r);return Hd(i,o8(n,{overlayContainer:i}))},function(e,r,n){r.positions!==n.positions&&e.setLatLngs(r.positions)}),nye=f8(function(e,r){const n=new hu.Popup(e,r.overlayContainer);return Hd(n,r)},function(e,r,{position:n},i){q.useEffect(function(){const{instance:o}=e;function s(u){u.popup===o&&(o.update(),i(!0))}function l(u){u.popup===o&&i(!1)}return r.map.on({popupopen:s,popupclose:l}),r.overlayContainer==null?(n!=null&&o.setLatLng(n),o.openOn(r.map)):r.overlayContainer.bindPopup(o),function(){var c;r.map.off({popupopen:s,popupclose:l}),(c=r.overlayContainer)==null||c.unbindPopup(),r.map.removeLayer(o)}},[e,r,i,n])}),iye=qme(function({url:e,...r},n){const i=new hu.TileLayer(e,f_(r,n));return Hd(i,n)},function(e,r,n){Kme(e,r,n);const{url:i}=r;i!=null&&i!==n.url&&e.setUrl(i)}),aye=f8(function(e,r){const n=new hu.Tooltip(e,r.overlayContainer);return Hd(n,r)},function(e,r,{position:n},i){q.useEffect(function(){const o=r.overlayContainer;if(o==null)return;const{instance:s}=e,l=c=>{c.tooltip===s&&(n!=null&&s.setLatLng(n),s.update(),i(!0))},u=c=>{c.tooltip===s&&i(!1)};return o.on({tooltipopen:l,tooltipclose:u}),o.bindTooltip(s),function(){o.off({tooltipopen:l,tooltipclose:u}),o._map!=null&&o.unbindTooltip()}},[e,r,i,n])}),oye="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=",sye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",lye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC";delete u8.Icon.Default.prototype._getIconUrl;u8.Icon.Default.mergeOptions({iconUrl:oye,iconRetinaUrl:sye,shadowUrl:lye});const Yz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],uye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function cye(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function fye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function hye(t){if(!t)return"Unknown";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function vye({bounds:t}){const e=Qme();return q.useEffect(()=>{t&&e.fitBounds(t,{padding:[50,50]})},[e,t]),null}function dye({node:t}){const e=t.latitude!==null&&t.longitude!==null,r=t.battery_level!==null?t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`:"Unknown";return A.jsxs("div",{className:"min-w-[200px]",children:[A.jsx("div",{className:"font-semibold text-slate-800",children:t.short_name}),A.jsx("div",{className:"text-xs text-slate-600 mb-2",children:t.long_name}),A.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[A.jsx("div",{className:"text-slate-500",children:"Role"}),A.jsx("div",{className:"text-slate-700 font-medium",children:t.role}),A.jsx("div",{className:"text-slate-500",children:"Hardware"}),A.jsx("div",{className:"text-slate-700",children:t.hardware||"Unknown"}),A.jsx("div",{className:"text-slate-500",children:"Battery"}),A.jsx("div",{className:"text-slate-700",children:r}),A.jsx("div",{className:"text-slate-500",children:"Last Heard"}),A.jsx("div",{className:"text-slate-700",children:hye(t.last_heard)})]}),e&&A.jsxs("div",{className:"mt-3 pt-2 border-t border-slate-200 flex gap-2",children:[A.jsxs("a",{href:`https://www.google.com/maps?q=${t.latitude},${t.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[A.jsx(Zm,{size:10}),"Google Maps"]}),A.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[A.jsx(Zm,{size:10}),"OSM"]})]})]})}function pye({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=q.useMemo(()=>t.filter(f=>f.latitude!==null&&f.longitude!==null),[t]),a=t.length-i.length,o=q.useMemo(()=>new Map(i.map(f=>[f.node_num,f])),[i]),s=q.useMemo(()=>e.filter(f=>o.has(f.from_node)&&o.has(f.to_node)),[e,o]),l=q.useMemo(()=>{if(i.length===0)return null;const f=i.map(v=>v.latitude),h=i.map(v=>v.longitude);return[[Math.min(...f),Math.min(...h)],[Math.max(...f),Math.max(...h)]]},[i]),u=[43.6,-114.4],c=q.useMemo(()=>{const f=new Set;return r!==null&&e.forEach(h=>{h.from_node===r&&f.add(h.to_node),h.to_node===r&&f.add(h.from_node)}),f},[r,e]);return A.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[A.jsxs(tye,{center:u,zoom:7,style:{width:"100%",height:"540px"},className:"z-0",children:[A.jsx(iye,{url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'© OpenStreetMap, © CARTO'}),A.jsx(vye,{bounds:l}),s.map((f,h)=>{const v=o.get(f.from_node),p=o.get(f.to_node),g=r===null||f.from_node===r||f.to_node===r;return A.jsx(rye,{positions:[[v.latitude,v.longitude],[p.latitude,p.longitude]],color:cye(f.snr),weight:g&&r!==null?2.5:1.5,opacity:r===null?.3:g?.6:.08},h)}),i.map(f=>{const h=f.node_num===r,v=c.has(f.node_num),p=r===null||h||v,g=uye.includes(f.role),m=fye(f.latitude),y=Yz[m%Yz.length];return A.jsxs(Jme,{center:[f.latitude,f.longitude],radius:g?8:5,fillColor:g?y:"#111827",fillOpacity:p?.9:.2,stroke:!0,color:h?"#ffffff":y,weight:h?3:g?0:2,opacity:p?1:.3,eventHandlers:{click:()=>n(h?null:f.node_num)},children:[A.jsx(aye,{direction:"top",offset:[0,-8],children:A.jsx("span",{className:"font-mono text-xs",children:f.short_name})}),A.jsx(nye,{children:A.jsx(dye,{node:f})})]},f.node_num)})]}),A.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2 text-xs text-slate-400 flex items-center gap-2",children:[A.jsx(I3,{size:12}),A.jsxs("span",{children:["Showing ",i.length," of ",t.length," nodes",a>0&&A.jsxs("span",{className:"text-slate-500",children:[" (",a," without coordinates)"]})]})]})]})}const Xz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],gye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function qz(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function mye(t){return t>12?"excellent":t>8?"good":t>5?"fair":t>3?"marginal":"poor"}function yye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function _ye(t){return["Northern ID","Central ID","SW Idaho","SC Idaho"][t]||"Unknown"}function xye(t){if(!t)return"Unknown";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Sye(t){if(!t)return"bg-slate-500";const e=new Date(t),n=(new Date().getTime()-e.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function wye({node:t,edges:e,nodes:r,onSelectNode:n}){const i=q.useMemo(()=>{if(!t)return[];const f=new Map(r.map(v=>[v.node_num,v])),h=[];return e.forEach(v=>{if(v.from_node===t.node_num){const p=f.get(v.to_node);p&&h.push({node:p,snr:v.snr,quality:v.quality})}else if(v.to_node===t.node_num){const p=f.get(v.from_node);p&&h.push({node:p,snr:v.snr,quality:v.quality})}}),h.sort((v,p)=>p.snr-v.snr)},[t,e,r]);if(!t)return A.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border p-4 flex flex-col items-center justify-center h-[540px]",children:[A.jsx("div",{className:"w-12 h-12 rounded-full bg-bg-hover border border-border flex items-center justify-center mb-3",children:A.jsx(x0,{size:24,className:"text-slate-500"})}),A.jsx("p",{className:"text-sm text-slate-500 text-center",children:"Click a node to inspect"})]});const a=gye.includes(t.role),o=yye(t.latitude),s=Xz[o%Xz.length],l=t.latitude!==null&&t.longitude!==null,u=t.battery_level!==null?t.battery_level>100||t.voltage&&t.voltage>4.1?"USB":`${t.battery_level.toFixed(0)}%`:"—",c=t.battery_level!==null&&(t.battery_level>100||t.voltage&&t.voltage>4.1);return A.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border flex flex-col h-[540px] overflow-hidden",children:[A.jsxs("div",{className:"p-4 border-b border-border",children:[A.jsx("div",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-mono mb-2",style:{backgroundColor:`${s}20`,color:s},children:t.node_id_hex}),A.jsx("div",{className:"font-mono text-lg text-slate-100",children:t.short_name}),A.jsx("div",{className:"text-xs text-slate-500 truncate",children:t.long_name})]}),A.jsxs("div",{className:"p-4 border-b border-border grid grid-cols-2 gap-3",children:[A.jsxs("div",{children:[A.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Role"}),A.jsx("div",{className:`text-sm font-medium ${a?"text-cyan-400":"text-slate-300"}`,children:t.role})]}),A.jsxs("div",{children:[A.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Region"}),A.jsx("div",{className:"text-sm text-slate-300",children:_ye(o)})]}),A.jsxs("div",{children:[A.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Battery"}),A.jsxs("div",{className:"text-sm text-slate-300 flex items-center gap-1",children:[c&&A.jsx(R3,{size:12,className:"text-amber-400"}),u]})]}),A.jsxs("div",{children:[A.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Status"}),A.jsxs("div",{className:"flex items-center gap-1.5",children:[A.jsx("div",{className:`w-2 h-2 rounded-full ${Sye(t.last_heard)}`}),A.jsx("span",{className:"text-sm text-slate-300",children:xye(t.last_heard)})]})]}),A.jsxs("div",{className:"col-span-2",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Hardware"}),A.jsx("div",{className:"text-sm text-slate-300 font-mono truncate",children:t.hardware||"Unknown"})]})]}),l&&A.jsxs("div",{className:"px-4 py-3 border-b border-border flex gap-3",children:[A.jsxs("a",{href:`https://www.google.com/maps?q=${t.latitude},${t.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[A.jsx(Zm,{size:10}),"Google Maps"]}),A.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[A.jsx(Zm,{size:10}),"OSM"]})]}),A.jsxs("div",{className:"flex-1 overflow-y-auto",children:[A.jsxs("div",{className:"px-4 py-2 text-xs text-slate-500 font-medium sticky top-0 bg-bg-card border-b border-border",children:["Neighbors (",i.length,")"]}),i.length>0?A.jsx("div",{className:"divide-y divide-border",children:i.map(f=>A.jsxs("button",{onClick:()=>n(f.node.node_num),className:"w-full px-4 py-2 text-left hover:bg-bg-hover transition-colors flex items-center gap-2",style:{borderLeftWidth:3,borderLeftColor:qz(f.snr)},children:[A.jsxs("div",{className:"flex-1 min-w-0",children:[A.jsx("div",{className:"text-sm text-slate-200 font-mono truncate",children:f.node.short_name}),A.jsx("div",{className:"text-xs text-slate-500 truncate",children:f.node.long_name})]}),A.jsxs("div",{className:"text-right flex-shrink-0",children:[A.jsxs("div",{className:"text-xs font-mono",style:{color:qz(f.snr)},children:[f.snr.toFixed(1)," dB"]}),A.jsx("div",{className:"text-xs text-slate-500",children:mye(f.snr)})]})]},f.node.node_num))}):A.jsx("div",{className:"px-4 py-6 text-center text-sm text-slate-500",children:"No known neighbors"})]})]})}const Kz=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function bye(t){if(!t)return"bg-slate-500";const e=new Date(t),n=(new Date().getTime()-e.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function Tye(t){if(!t)return"—";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Cye(t){return t.battery_level===null?"—":t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`}function Qz(t){return t===null?"—":t>46?"Northern":t>44.5?"Central":t>43?"SW Idaho":"SC Idaho"}function Mye({nodes:t,selectedNodeId:e,onSelectNode:r}){const[n,i]=q.useState(""),[a,o]=q.useState("short_name"),[s,l]=q.useState("asc"),[u,c]=q.useState("all"),f=q.useMemo(()=>{let p=[...t];if(u==="infra"?p=p.filter(g=>Kz.includes(g.role)):u==="online"&&(p=p.filter(g=>{if(!g.last_heard)return!1;const m=new Date(g.last_heard);return(new Date().getTime()-m.getTime())/36e5<1})),n){const g=n.toLowerCase();p=p.filter(m=>m.short_name.toLowerCase().includes(g)||m.long_name.toLowerCase().includes(g)||m.role.toLowerCase().includes(g)||Qz(m.latitude).toLowerCase().includes(g))}return p.sort((g,m)=>{let y="",x="";switch(a){case"short_name":y=g.short_name.toLowerCase(),x=m.short_name.toLowerCase();break;case"role":y=g.role,x=m.role;break;case"battery_level":y=g.battery_level??-1,x=m.battery_level??-1;break;case"last_heard":y=g.last_heard?new Date(g.last_heard).getTime():0,x=m.last_heard?new Date(m.last_heard).getTime():0;break;case"hardware":y=g.hardware.toLowerCase(),x=m.hardware.toLowerCase();break}return yx?s==="asc"?1:-1:0}),p},[t,n,a,s,u]),h=p=>{a===p?l(s==="asc"?"desc":"asc"):(o(p),l("asc"))},v=({field:p})=>a!==p?null:s==="asc"?A.jsx(wZ,{size:14,className:"inline ml-1"}):A.jsx(JC,{size:14,className:"inline ml-1"});return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg overflow-hidden",children:[A.jsxs("div",{className:"p-3 border-b border-border flex items-center gap-3",children:[A.jsxs("div",{className:"relative flex-1 max-w-xs",children:[A.jsx(OZ,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),A.jsx("input",{type:"text",placeholder:"Search nodes...",value:n,onChange:p=>i(p.target.value),className:"w-full pl-9 pr-3 py-1.5 bg-bg-hover border border-border rounded text-sm text-slate-200 placeholder-slate-500 focus:outline-none focus:border-accent"})]}),A.jsxs("div",{className:"flex items-center gap-1",children:[A.jsx(D3,{size:14,className:"text-slate-500 mr-1"}),["all","infra","online"].map(p=>A.jsx("button",{onClick:()=>c(p),className:`px-2 py-1 text-xs rounded transition-colors ${u===p?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:p==="all"?"All":p==="infra"?"Infra":"Online"},p))]}),A.jsxs("div",{className:"text-xs text-slate-500 ml-auto",children:[f.length," of ",t.length," nodes"]})]}),A.jsxs("div",{className:"overflow-x-auto",children:[A.jsxs("table",{className:"w-full text-sm",children:[A.jsx("thead",{children:A.jsxs("tr",{className:"bg-bg-hover text-slate-400 text-xs",children:[A.jsx("th",{className:"w-8 px-3 py-2"}),A.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("short_name"),children:["Name ",A.jsx(v,{field:"short_name"})]}),A.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("role"),children:["Role ",A.jsx(v,{field:"role"})]}),A.jsx("th",{className:"px-3 py-2 text-left",children:"Region"}),A.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("battery_level"),children:["Battery ",A.jsx(v,{field:"battery_level"})]}),A.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("last_heard"),children:["Last Heard ",A.jsx(v,{field:"last_heard"})]}),A.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("hardware"),children:["Hardware ",A.jsx(v,{field:"hardware"})]})]})}),A.jsx("tbody",{className:"divide-y divide-border",children:f.slice(0,100).map(p=>{const g=Kz.includes(p.role),m=p.node_num===e;return A.jsxs("tr",{onClick:()=>r(p.node_num),className:`cursor-pointer transition-colors ${m?"bg-accent/10":"hover:bg-bg-hover"}`,children:[A.jsx("td",{className:"px-3 py-2",children:A.jsx("div",{className:`w-2 h-2 rounded-full ${bye(p.last_heard)}`})}),A.jsxs("td",{className:"px-3 py-2",children:[A.jsx("div",{className:"font-mono text-slate-200",children:p.short_name}),A.jsx("div",{className:"text-xs text-slate-500 truncate max-w-[200px]",children:p.long_name})]}),A.jsx("td",{className:"px-3 py-2",children:A.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded text-xs font-medium ${g?"bg-cyan-500/20 text-cyan-400":"bg-slate-500/20 text-slate-400"}`,children:p.role})}),A.jsx("td",{className:"px-3 py-2 text-slate-400",children:Qz(p.latitude)}),A.jsx("td",{className:"px-3 py-2 font-mono text-slate-300",children:Cye(p)}),A.jsx("td",{className:"px-3 py-2 text-slate-400",children:Tye(p.last_heard)}),A.jsx("td",{className:"px-3 py-2 font-mono text-xs text-slate-400 truncate max-w-[150px]",children:p.hardware||"—"})]},p.node_num)})})]}),f.length>100&&A.jsxs("div",{className:"px-3 py-2 text-xs text-slate-500 text-center border-t border-border",children:["Showing first 100 of ",f.length," nodes"]}),f.length===0&&A.jsx("div",{className:"px-3 py-8 text-sm text-slate-500 text-center",children:"No nodes match your filters"})]})]})}function Lye(){const[t,e]=q.useState([]),[r,n]=q.useState([]),[i,a]=q.useState([]),[o,s]=q.useState(null),[l,u]=q.useState("topo"),[c,f]=q.useState(!0),[h,v]=q.useState(null);q.useEffect(()=>{Promise.all([HZ(),WZ(),r$()]).then(([m,y,x])=>{e(m),n(y),a(x),f(!1)}).catch(m=>{v(m.message),f(!1)})},[]);const p=q.useMemo(()=>t.find(m=>m.node_num===o)||null,[t,o]),g=q.useCallback(m=>{s(m)},[]);return c?A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsx("div",{className:"text-slate-400",children:"Loading mesh data..."})}):h?A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsxs("div",{className:"text-red-400",children:["Error: ",h]})}):A.jsxs("div",{className:"space-y-6",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsxs("div",{className:"text-sm text-slate-400",children:[t.length," nodes • ",r.length," edges"]}),A.jsxs("div",{className:"flex items-center bg-bg-card border border-border rounded-lg p-1",children:[A.jsxs("button",{onClick:()=>u("topo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="topo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[A.jsx(kZ,{size:14}),"Topology"]}),A.jsxs("button",{onClick:()=>u("geo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="geo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[A.jsx(AZ,{size:14}),"Geographic"]})]})]}),A.jsxs("div",{className:"flex gap-0",children:[A.jsx("div",{className:"flex-1 min-w-0",children:l==="topo"?A.jsx(Vme,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g}):A.jsx(pye,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g})}),A.jsx(wye,{node:p,edges:r,nodes:t,onSelectNode:g})]}),A.jsx(Mye,{nodes:t,selectedNodeId:o,onSelectNode:g})]})}function Aye({feed:t}){const e=()=>t.is_loaded?t.consecutive_errors>0?"bg-amber-500":"bg-green-500":"bg-red-500",r=()=>t.is_loaded?t.consecutive_errors>0?`${t.consecutive_errors} errors`:"Healthy":"Not loaded",n=i=>i?new Date(i*1e3).toLocaleTimeString():"Never";return A.jsxs("div",{className:"bg-bg-hover rounded-lg p-4",children:[A.jsxs("div",{className:"flex items-center justify-between mb-2",children:[A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),A.jsx("span",{className:"text-sm font-medium text-slate-200 uppercase",children:t.source})]}),A.jsx("span",{className:"text-xs text-slate-400",children:r()})]}),A.jsxs("div",{className:"text-xs text-slate-500 space-y-1",children:[A.jsxs("div",{children:["Events: ",t.event_count]}),A.jsxs("div",{children:["Last fetch: ",n(t.last_fetch)]}),t.last_error&&A.jsx("div",{className:"text-amber-500 truncate",children:t.last_error})]})]})}function Pye({event:t}){const r=(a=>{switch(a.toLowerCase()){case"extreme":case"severe":return{bg:"bg-red-500/10",border:"border-red-500",icon:L3,iconColor:"text-red-500"};case"moderate":case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:S0,iconColor:"text-amber-500"};case"minor":return{bg:"bg-yellow-500/10",border:"border-yellow-500",icon:Bw,iconColor:"text-yellow-500"};default:return{bg:"bg-slate-500/10",border:"border-slate-500",icon:Bw,iconColor:"text-slate-400"}}})(t.severity),n=r.icon,i=a=>a?new Date(a*1e3).toLocaleString():null;return A.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-2 ${r.border}`,children:A.jsxs("div",{className:"flex items-start gap-3",children:[A.jsx(n,{size:18,className:r.iconColor}),A.jsxs("div",{className:"flex-1 min-w-0",children:[A.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[A.jsx("span",{className:"text-sm font-medium text-slate-200",children:t.event_type}),A.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${r.bg} ${r.iconColor}`,children:t.severity})]}),A.jsx("div",{className:"text-sm text-slate-300 mb-2",children:t.headline}),t.description&&A.jsx("div",{className:"text-xs text-slate-400 mb-2 line-clamp-2",children:t.description}),A.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500",children:[A.jsx("span",{className:"uppercase",children:t.source}),t.expires&&A.jsxs("span",{children:["Expires: ",i(t.expires)]})]})]})]})})}function Dye({swpc:t}){var n,i;if(!t||!t.enabled)return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(fD,{size:14}),"Solar/Geomagnetic Indices"]}),A.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const e=a=>a===void 0?"text-slate-400":a<=2?"text-green-500":a<=4?"text-amber-500":a<=6?"text-orange-500":"text-red-500",r=a=>a===void 0||a===0?"text-green-500":a<=2?"text-amber-500":a<=3?"text-orange-500":"text-red-500";return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(fD,{size:14}),"Solar/Geomagnetic Indices"]}),A.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[A.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar Flux Index"}),A.jsx("div",{className:"text-2xl font-mono text-slate-100",children:((n=t.sfi)==null?void 0:n.toFixed(0))??"—"}),A.jsx("div",{className:"text-xs text-slate-500",children:"SFI (10.7 cm)"})]}),A.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Planetary K-Index"}),A.jsx("div",{className:`text-2xl font-mono ${e(t.kp_current)}`,children:((i=t.kp_current)==null?void 0:i.toFixed(1))??"—"}),A.jsx("div",{className:"text-xs text-slate-500",children:"Kp"})]})]}),A.jsxs("div",{className:"bg-bg-hover rounded-lg p-3 mb-4",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-2",children:"NOAA Space Weather Scales"}),A.jsxs("div",{className:"flex items-center gap-4",children:[A.jsxs("div",{className:"flex items-center gap-1",children:[A.jsx("span",{className:"text-xs text-slate-400",children:"R:"}),A.jsx("span",{className:`text-sm font-mono ${r(t.r_scale)}`,children:t.r_scale??0})]}),A.jsxs("div",{className:"flex items-center gap-1",children:[A.jsx("span",{className:"text-xs text-slate-400",children:"S:"}),A.jsx("span",{className:`text-sm font-mono ${r(t.s_scale)}`,children:t.s_scale??0})]}),A.jsxs("div",{className:"flex items-center gap-1",children:[A.jsx("span",{className:"text-xs text-slate-400",children:"G:"}),A.jsx("span",{className:`text-sm font-mono ${r(t.g_scale)}`,children:t.g_scale??0})]})]}),A.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Radio Blackout / Solar Radiation / Geomagnetic Storm"})]}),t.active_warnings&&t.active_warnings.length>0&&A.jsxs("div",{className:"space-y-2",children:[A.jsx("div",{className:"text-xs text-slate-500",children:"Active Warnings"}),t.active_warnings.slice(0,3).map((a,o)=>A.jsx("div",{className:"text-xs text-amber-400 bg-amber-500/10 rounded p-2",children:a},o))]})]})}function kye({ducting:t}){if(!t||!t.enabled)return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(hD,{size:14}),"Tropospheric Ducting"]}),A.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const e=n=>{switch(n){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},r=n=>n?n.replace("_"," ").replace(/\b\w/g,i=>i.toUpperCase()):"Unknown";return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(hD,{size:14}),"Tropospheric Ducting"]}),A.jsxs("div",{className:"bg-bg-hover rounded-lg p-4 mb-4",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Condition"}),A.jsx("div",{className:`text-xl font-medium ${e(t.condition)}`,children:r(t.condition)})]}),A.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[A.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Min Gradient"}),A.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.min_gradient??"—"}),A.jsx("div",{className:"text-xs text-slate-500",children:"M-units/km"})]}),t.duct_thickness_m&&A.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Thickness"}),A.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_thickness_m}),A.jsx("div",{className:"text-xs text-slate-500",children:"meters"})]}),t.duct_base_m&&A.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Base"}),A.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_base_m}),A.jsx("div",{className:"text-xs text-slate-500",children:"meters AGL"})]})]}),A.jsxs("div",{className:"text-xs text-slate-500 bg-bg-hover rounded p-2",children:[A.jsx("div",{children:"dM/dz reference:"}),A.jsxs("div",{className:"mt-1 space-y-0.5",children:[A.jsx("div",{children:">79: Normal propagation"}),A.jsx("div",{children:"0–79: Super-refraction"}),A.jsx("div",{children:"<0: Ducting (trapping layer)"})]})]}),t.last_update&&A.jsxs("div",{className:"text-xs text-slate-500 mt-3",children:["Last update: ",t.last_update]})]})}function Iye(){var C;const[t,e]=q.useState(null),[r,n]=q.useState([]),[i,a]=q.useState(null),[o,s]=q.useState(null),[l,u]=q.useState([]),[c,f]=q.useState(null),[h,v]=q.useState([]),[p,g]=q.useState([]),[m,y]=q.useState([]),[x,S]=q.useState(!0),[b,T]=q.useState(null);return q.useEffect(()=>{Promise.all([N3().catch(()=>null),$Z().catch(()=>[]),XZ().catch(()=>null),qZ().catch(()=>null),KZ().catch(()=>[]),QZ().catch(()=>null),JZ().catch(()=>[]),e$().catch(()=>[]),t$().catch(()=>[])]).then(([M,D,I,k,E,z,O,F,j])=>{e(M),n(D),a(I),s(k),u(E),f(z),v(O||[]),g(F||[]),y(j||[]),S(!1)}).catch(M=>{T(M.message),S(!1)})},[]),x?A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsx("div",{className:"text-slate-400",children:"Loading environmental data..."})}):b?A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsxs("div",{className:"text-red-400",children:["Error: ",b]})}):t!=null&&t.enabled?A.jsxs("div",{className:"space-y-6",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("h1",{className:"text-xl font-semibold text-slate-200",children:"Environment"}),A.jsxs("div",{className:"text-xs text-slate-500",children:[r.length," active event",r.length!==1?"s":""]})]}),A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(QC,{size:14}),"Feed Status"]}),A.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:t.feeds.map(M=>A.jsx(Aye,{feed:M},M.source))})]}),A.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[A.jsx(Dye,{swpc:i}),A.jsx(kye,{ducting:o})]}),A.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(MZ,{size:14}),"Active Wildfires (",l.length,")"]}),l.length>0?A.jsx("div",{className:"space-y-3",children:l.map(M=>A.jsxs("div",{className:`p-3 rounded-lg ${M.severity==="warning"?"bg-red-500/10 border-l-2 border-red-500":M.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-slate-500/10 border-l-2 border-slate-500"}`,children:[A.jsxs("div",{className:"flex items-center justify-between mb-1",children:[A.jsx("span",{className:"text-sm font-medium text-slate-200",children:M.name}),A.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${M.severity==="warning"?"bg-red-500/20 text-red-400":M.severity==="watch"?"bg-amber-500/20 text-amber-400":"bg-slate-500/20 text-slate-400"}`,children:M.severity})]}),A.jsxs("div",{className:"text-xs text-slate-400 space-y-1",children:[A.jsxs("div",{children:[M.acres.toLocaleString()," acres, ",M.pct_contained,"% contained"]}),M.distance_km&&M.nearest_anchor&&A.jsxs("div",{children:[Math.round(M.distance_km)," km from ",M.nearest_anchor]})]})]},M.event_id))}):A.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[A.jsx(Jg,{size:16,className:"text-green-500"}),A.jsx("span",{children:"No active wildfires in the area"})]})]}),A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(DZ,{size:14}),"Avalanche Advisories"]}),c!=null&&c.off_season?A.jsx("div",{className:"text-slate-500 py-4",children:A.jsx("p",{children:"Off season - check back in December"})}):c&&c.advisories.length>0?A.jsxs("div",{className:"space-y-3",children:[c.advisories.map(M=>A.jsxs("div",{className:`p-3 rounded-lg ${M.danger_level>=4?"bg-red-500/10 border-l-2 border-red-500":M.danger_level>=3?"bg-amber-500/10 border-l-2 border-amber-500":M.danger_level>=2?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[A.jsxs("div",{className:"flex items-center justify-between mb-1",children:[A.jsx("span",{className:"text-sm font-medium text-slate-200",children:M.zone_name}),A.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${M.danger_level>=4?"bg-red-500/20 text-red-400":M.danger_level>=3?"bg-amber-500/20 text-amber-400":M.danger_level>=2?"bg-yellow-500/20 text-yellow-400":"bg-green-500/20 text-green-400"}`,children:M.danger_name})]}),A.jsx("div",{className:"text-xs text-slate-400",children:M.center}),M.travel_advice&&A.jsx("div",{className:"text-xs text-slate-500 mt-2 line-clamp-2",children:M.travel_advice})]},M.event_id)),((C=c.advisories[0])==null?void 0:C.center_link)&&A.jsx("a",{href:c.advisories[0].center_link,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-400 hover:underline",children:"View full forecast"})]}):A.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[A.jsx(Jg,{size:16,className:"text-green-500"}),A.jsx("span",{children:"No avalanche advisories"})]})]})]}),h.length>0&&A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(TZ,{size:14}),"Stream Gauges (",h.length,")"]}),A.jsx("div",{className:"space-y-2",children:h.map(M=>{var D,I,k,E,z;return A.jsxs("div",{className:`p-3 rounded-lg ${M.severity==="warning"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-blue-500/10 border-l-2 border-blue-500"}`,children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm text-slate-200",children:((D=M.properties)==null?void 0:D.site_name)||"Unknown Site"}),A.jsxs("span",{className:"text-sm font-mono text-slate-300",children:[(k=(I=M.properties)==null?void 0:I.value)==null?void 0:k.toLocaleString()," ",(E=M.properties)==null?void 0:E.unit]})]}),A.jsx("div",{className:"text-xs text-slate-500 mt-1",children:(z=M.properties)==null?void 0:z.parameter})]},M.event_id)})})]}),(p.length>0||m.length>0)&&A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(xZ,{size:14}),"Road Conditions"]}),p.length>0&&A.jsxs("div",{className:"mb-4",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Traffic Flow"}),A.jsx("div",{className:"space-y-2",children:p.map(M=>{var D,I,k,E,z,O,F,j,G;return A.jsxs("div",{className:`p-3 rounded-lg ${(D=M.properties)!=null&&D.roadClosure?"bg-red-500/10 border-l-2 border-red-500":((I=M.properties)==null?void 0:I.speedRatio)<.5?"bg-amber-500/10 border-l-2 border-amber-500":((k=M.properties)==null?void 0:k.speedRatio)<.8?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm text-slate-200",children:((E=M.properties)==null?void 0:E.corridor)||"Unknown"}),A.jsx("span",{className:"text-sm font-mono text-slate-300",children:(z=M.properties)!=null&&z.roadClosure?"CLOSED":`${Math.round(((O=M.properties)==null?void 0:O.currentSpeed)||0)}mph`})]}),!((F=M.properties)!=null&&F.roadClosure)&&A.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[Math.round((((j=M.properties)==null?void 0:j.speedRatio)||1)*100),"% of free flow (",Math.round(((G=M.properties)==null?void 0:G.freeFlowSpeed)||0),"mph)"]})]},M.event_id)})})]}),m.length>0&&A.jsxs("div",{children:[A.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Road Events"}),A.jsx("div",{className:"space-y-2",children:m.map(M=>{var D,I;return A.jsxs("div",{className:`p-3 rounded-lg ${(D=M.properties)!=null&&D.is_closure?"bg-red-500/10 border-l-2 border-red-500":"bg-amber-500/10 border-l-2 border-amber-500"}`,children:[A.jsxs("div",{className:"flex items-center gap-2",children:[((I=M.properties)==null?void 0:I.is_closure)&&A.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"CLOSURE"}),A.jsx("span",{className:"text-sm text-slate-200 line-clamp-1",children:M.headline})]}),A.jsx("div",{className:"text-xs text-slate-500 mt-1 uppercase",children:M.event_type})]},M.event_id)})})]})]}),A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(S0,{size:14}),"Active Events (",r.length,")"]}),r.length>0?A.jsx("div",{className:"space-y-3",children:r.map(M=>A.jsx(Pye,{event:M},M.event_id))}):A.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[A.jsx(Jg,{size:16,className:"text-green-500"}),A.jsx("span",{children:"No active environmental events"})]})]})]}):A.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center",children:[A.jsx("div",{className:"w-16 h-16 rounded-full bg-bg-card border border-border flex items-center justify-center mb-6",children:A.jsx(e2,{size:32,className:"text-slate-500"})}),A.jsx("h2",{className:"text-xl font-semibold text-slate-300 mb-2",children:"Environmental Feeds Disabled"}),A.jsx("p",{className:"text-slate-500 max-w-md",children:"Enable environmental feeds in config.yaml to see weather alerts, space weather indices, and tropospheric ducting data."})]})}const Jz=[{key:"bot",label:"Bot",icon:yZ},{key:"connection",label:"Connection",icon:FZ},{key:"response",label:"Response",icon:PZ},{key:"history",label:"History",icon:bZ},{key:"memory",label:"Memory",icon:_Z},{key:"context",label:"Context",icon:P3},{key:"commands",label:"Commands",icon:zZ},{key:"llm",label:"LLM",icon:A3},{key:"weather",label:"Weather",icon:e2},{key:"meshmonitor",label:"MeshMonitor",icon:x0},{key:"knowledge",label:"Knowledge",icon:mZ},{key:"mesh_sources",label:"Mesh Sources",icon:LZ},{key:"mesh_intelligence",label:"Intelligence",icon:QC},{key:"environmental",label:"Environmental",icon:BZ},{key:"dashboard",label:"Dashboard",icon:k3}];function wt({label:t,value:e,onChange:r,type:n="text",placeholder:i="",helper:a=""}){const[o,s]=q.useState(!1),l=n==="password";return A.jsxs("div",{className:"space-y-1",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),A.jsxs("div",{className:"relative",children:[A.jsx("input",{type:l&&!o?"password":"text",value:e,onChange:u=>r(u.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),l&&A.jsx("button",{type:"button",onClick:()=>s(!o),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:o?A.jsx(CZ,{size:16}):A.jsx(P3,{size:16})})]}),a&&A.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function st({label:t,value:e,onChange:r,min:n,max:i,step:a=1,helper:o=""}){return A.jsxs("div",{className:"space-y-1",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),A.jsx("input",{type:"number",value:e,onChange:s=>r(Number(s.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&A.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function it({label:t,checked:e,onChange:r,helper:n=""}){return A.jsxs("div",{className:"flex items-center justify-between py-2",children:[A.jsxs("div",{children:[A.jsx("span",{className:"text-sm text-slate-300",children:t}),n&&A.jsx("p",{className:"text-xs text-slate-600",children:n})]}),A.jsx("button",{type:"button",onClick:()=>r(!e),className:`relative w-11 h-6 rounded-full transition-colors ${e?"bg-accent":"bg-[#1e2a3a]"}`,children:A.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${e?"translate-x-5":""}`})})]})}function Ql({label:t,value:e,onChange:r,options:n,helper:i=""}){return A.jsxs("div",{className:"space-y-1",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),A.jsx("select",{value:e,onChange:a=>r(a.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:n.map(a=>A.jsx("option",{value:a.value,children:a.label},a.value))}),i&&A.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function Eye({label:t,value:e,onChange:r,rows:n=4,helper:i=""}){return A.jsxs("div",{className:"space-y-1",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),A.jsx("textarea",{value:e,onChange:a=>r(a.target.value),rows:n,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent resize-y"}),i&&A.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function Nl({label:t,value:e,onChange:r,helper:n=""}){const[i,a]=q.useState(e.join(", "));q.useEffect(()=>{a(e.join(", "))},[e]);const o=()=>{const s=i.split(",").map(l=>l.trim()).filter(Boolean);r(s)};return A.jsxs("div",{className:"space-y-1",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),A.jsx("input",{type:"text",value:i,onChange:s=>a(s.target.value),onBlur:o,placeholder:"item1, item2, item3",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&A.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function v8({label:t,value:e,onChange:r,helper:n=""}){const[i,a]=q.useState(e.join(", "));q.useEffect(()=>{a(e.join(", "))},[e]);const o=()=>{const s=i.split(",").map(l=>parseInt(l.trim(),10)).filter(l=>!isNaN(l));r(s)};return A.jsxs("div",{className:"space-y-1",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),A.jsx("input",{type:"text",value:i,onChange:s=>a(s.target.value),onBlur:o,placeholder:"0, 1, 2",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&A.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function Rye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(wt,{label:"Bot Name",value:t.name,onChange:r=>e({...t,name:r})}),A.jsx(wt,{label:"Owner",value:t.owner,onChange:r=>e({...t,owner:r})})]}),A.jsx(it,{label:"Respond to DMs",checked:t.respond_to_dms,onChange:r=>e({...t,respond_to_dms:r})}),A.jsx(it,{label:"Filter BBS Protocols",checked:t.filter_bbs_protocols,onChange:r=>e({...t,filter_bbs_protocols:r})})]})}function Nye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(Ql,{label:"Connection Type",value:t.type,onChange:r=>e({...t,type:r}),options:[{value:"serial",label:"Serial"},{value:"tcp",label:"TCP"}]}),t.type==="serial"?A.jsx(wt,{label:"Serial Port",value:t.serial_port,onChange:r=>e({...t,serial_port:r}),placeholder:"/dev/ttyUSB0"}):A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(wt,{label:"TCP Host",value:t.tcp_host,onChange:r=>e({...t,tcp_host:r}),placeholder:"192.168.1.100"}),A.jsx(st,{label:"TCP Port",value:t.tcp_port,onChange:r=>e({...t,tcp_port:r}),min:1,max:65535})]})]})}function Oye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(st,{label:"Delay Min (sec)",value:t.delay_min,onChange:r=>e({...t,delay_min:r}),min:0,step:.1}),A.jsx(st,{label:"Delay Max (sec)",value:t.delay_max,onChange:r=>e({...t,delay_max:r}),min:0,step:.1})]}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(st,{label:"Max Length",value:t.max_length,onChange:r=>e({...t,max_length:r}),min:50,max:500}),A.jsx(st,{label:"Max Messages",value:t.max_messages,onChange:r=>e({...t,max_messages:r}),min:1,max:10})]})]})}function zye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(wt,{label:"Database Path",value:t.database,onChange:r=>e({...t,database:r})}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(st,{label:"Max Messages Per User",value:t.max_messages_per_user,onChange:r=>e({...t,max_messages_per_user:r}),min:0,helper:"0 = unlimited"}),A.jsx(st,{label:"Conversation Timeout (sec)",value:t.conversation_timeout,onChange:r=>e({...t,conversation_timeout:r}),min:0})]}),A.jsx(it,{label:"Auto Cleanup",checked:t.auto_cleanup,onChange:r=>e({...t,auto_cleanup:r})}),t.auto_cleanup&&A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(st,{label:"Cleanup Interval (hours)",value:t.cleanup_interval_hours,onChange:r=>e({...t,cleanup_interval_hours:r}),min:1}),A.jsx(st,{label:"Max Age (days)",value:t.max_age_days,onChange:r=>e({...t,max_age_days:r}),min:1})]})]})}function Bye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(it,{label:"Enable Memory Optimization",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(st,{label:"Window Size",value:t.window_size,onChange:r=>e({...t,window_size:r}),min:1,helper:"Recent message pairs to keep in full"}),A.jsx(st,{label:"Summarize Threshold",value:t.summarize_threshold,onChange:r=>e({...t,summarize_threshold:r}),min:1,helper:"Messages before re-summarizing"})]})]})}function Vye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(it,{label:"Enable Passive Context",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&A.jsxs(A.Fragment,{children:[A.jsx(v8,{label:"Observe Channels",value:t.observe_channels,onChange:r=>e({...t,observe_channels:r}),helper:"Empty = all channels"}),A.jsx(Nl,{label:"Ignore Nodes",value:t.ignore_nodes,onChange:r=>e({...t,ignore_nodes:r}),helper:"Node IDs to ignore"}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(st,{label:"Max Age (sec)",value:t.max_age,onChange:r=>e({...t,max_age:r}),min:0}),A.jsx(st,{label:"Max Context Items",value:t.max_context_items,onChange:r=>e({...t,max_context_items:r}),min:1})]})]})]})}function Fye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(it,{label:"Enable Commands",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&A.jsxs(A.Fragment,{children:[A.jsx(wt,{label:"Command Prefix",value:t.prefix,onChange:r=>e({...t,prefix:r})}),A.jsx(Nl,{label:"Disabled Commands",value:t.disabled_commands,onChange:r=>e({...t,disabled_commands:r}),helper:"Commands to disable"})]})]})}function Gye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ql,{label:"Backend",value:t.backend,onChange:r=>e({...t,backend:r}),options:[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"google",label:"Google (Gemini)"}]}),A.jsx(wt,{label:"Model",value:t.model,onChange:r=>e({...t,model:r}),placeholder:"gpt-4o-mini"})]}),A.jsx(wt,{label:"API Key",value:t.api_key,onChange:r=>e({...t,api_key:r}),type:"password",helper:"Supports ${ENV_VAR} syntax"}),A.jsx(wt,{label:"Base URL",value:t.base_url,onChange:r=>e({...t,base_url:r}),placeholder:"https://api.openai.com/v1"}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(st,{label:"Timeout (sec)",value:t.timeout,onChange:r=>e({...t,timeout:r}),min:5,max:120}),A.jsx(st,{label:"Max Response Tokens",value:t.max_response_tokens,onChange:r=>e({...t,max_response_tokens:r}),min:100})]}),A.jsx(it,{label:"Use System Prompt",checked:t.use_system_prompt,onChange:r=>e({...t,use_system_prompt:r})}),t.use_system_prompt&&A.jsx(Eye,{label:"System Prompt",value:t.system_prompt,onChange:r=>e({...t,system_prompt:r}),rows:6}),A.jsx(it,{label:"Web Search",checked:t.web_search,onChange:r=>e({...t,web_search:r}),helper:"Open WebUI feature"}),A.jsx(it,{label:"Google Grounding",checked:t.google_grounding,onChange:r=>e({...t,google_grounding:r}),helper:"Gemini only"})]})}function jye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ql,{label:"Primary Provider",value:t.primary,onChange:r=>e({...t,primary:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"}]}),A.jsx(Ql,{label:"Fallback Provider",value:t.fallback,onChange:r=>e({...t,fallback:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"},{value:"none",label:"None"}]})]}),A.jsx(wt,{label:"Default Location",value:t.default_location,onChange:r=>e({...t,default_location:r}),placeholder:"Twin Falls, ID"})]})}function Hye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(it,{label:"Enable MeshMonitor",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&A.jsxs(A.Fragment,{children:[A.jsx(wt,{label:"URL",value:t.url,onChange:r=>e({...t,url:r}),placeholder:"http://192.168.1.100:8080"}),A.jsx(it,{label:"Inject Into Prompt",checked:t.inject_into_prompt,onChange:r=>e({...t,inject_into_prompt:r}),helper:"Tell LLM about MeshMonitor commands"}),A.jsx(st,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:r=>e({...t,refresh_interval:r}),min:10}),A.jsx(it,{label:"Polite Mode",checked:t.polite_mode,onChange:r=>e({...t,polite_mode:r}),helper:"Reduces polling frequency for shared instances"})]})]})}function Wye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(it,{label:"Enable Knowledge Base",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&A.jsxs(A.Fragment,{children:[A.jsx(Ql,{label:"Backend",value:t.backend,onChange:r=>e({...t,backend:r}),options:[{value:"auto",label:"Auto (Qdrant -> SQLite)"},{value:"qdrant",label:"Qdrant"},{value:"sqlite",label:"SQLite"}]}),(t.backend==="qdrant"||t.backend==="auto")&&A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(wt,{label:"Qdrant Host",value:t.qdrant_host,onChange:r=>e({...t,qdrant_host:r})}),A.jsx(st,{label:"Qdrant Port",value:t.qdrant_port,onChange:r=>e({...t,qdrant_port:r})})]}),A.jsx(wt,{label:"Collection",value:t.qdrant_collection,onChange:r=>e({...t,qdrant_collection:r})}),A.jsx(it,{label:"Use Sparse Embeddings",checked:t.use_sparse,onChange:r=>e({...t,use_sparse:r})})]}),A.jsx(wt,{label:"SQLite DB Path",value:t.db_path,onChange:r=>e({...t,db_path:r})}),A.jsx(st,{label:"Top K Results",value:t.top_k,onChange:r=>e({...t,top_k:r}),min:1,max:20})]})]})}function Uye({source:t,onChange:e,onDelete:r}){const[n,i]=q.useState(!1);return A.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[A.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>i(!n),children:[A.jsxs("div",{className:"flex items-center gap-3",children:[n?A.jsx(JC,{size:16}):A.jsx(M3,{size:16}),A.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`}),A.jsx("span",{className:"font-mono text-sm text-slate-200",children:t.name||"Unnamed Source"}),A.jsx("span",{className:"text-xs text-slate-500 bg-[#1e2a3a] px-2 py-0.5 rounded",children:t.type})]}),A.jsx("button",{onClick:a=>{a.stopPropagation(),r()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:A.jsx(VZ,{size:14})})]}),n&&A.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(wt,{label:"Name",value:t.name,onChange:a=>e({...t,name:a})}),A.jsx(Ql,{label:"Type",value:t.type,onChange:a=>e({...t,type:a}),options:[{value:"meshview",label:"MeshView"},{value:"meshmonitor",label:"MeshMonitor"},{value:"mqtt",label:"MQTT Broker"}]})]}),t.type!=="mqtt"&&A.jsx(wt,{label:"URL",value:t.url,onChange:a=>e({...t,url:a})}),t.type==="meshmonitor"&&A.jsx(wt,{label:"API Token",value:t.api_token,onChange:a=>e({...t,api_token:a}),type:"password"}),t.type==="mqtt"&&A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(wt,{label:"Host",value:t.host||"",onChange:a=>e({...t,host:a})}),A.jsx(st,{label:"Port",value:t.port||1883,onChange:a=>e({...t,port:a}),min:1,max:65535})]}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(wt,{label:"Username",value:t.username||"",onChange:a=>e({...t,username:a})}),A.jsx(wt,{label:"Password",value:t.password||"",onChange:a=>e({...t,password:a}),type:"password"})]}),A.jsx(wt,{label:"Topic Root",value:t.topic_root||"msh/US",onChange:a=>e({...t,topic_root:a})}),A.jsx(it,{label:"Use TLS",checked:t.use_tls||!1,onChange:a=>e({...t,use_tls:a})})]}),A.jsx(st,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:a=>e({...t,refresh_interval:a}),min:10}),A.jsx(it,{label:"Enabled",checked:t.enabled,onChange:a=>e({...t,enabled:a})}),A.jsx(it,{label:"Polite Mode",checked:t.polite_mode,onChange:a=>e({...t,polite_mode:a})})]})]})}function Zye({data:t,onChange:e}){const r=()=>{e([...t,{name:"New Source",type:"meshview",url:"",api_token:"",refresh_interval:30,polite_mode:!1,enabled:!0,host:"",port:1883,username:"",password:"",topic_root:"msh/US",use_tls:!1}])};return A.jsxs("div",{className:"space-y-4",children:[t.map((n,i)=>A.jsx(Uye,{source:n,onChange:a=>{const o=[...t];o[i]=a,e(o)},onDelete:()=>{confirm(`Delete source "${n.name}"?`)&&e(t.filter((a,o)=>o!==i))}},i)),A.jsxs("button",{onClick:r,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[A.jsx(IZ,{size:16})," Add Source"]})]})}function $ye({data:t,onChange:e}){const[r,n]=q.useState(null);return A.jsxs("div",{className:"space-y-6",children:[A.jsx(it,{label:"Enable Mesh Intelligence",checked:t.enabled,onChange:i=>e({...t,enabled:i})}),t.enabled&&A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(st,{label:"Locality Radius (miles)",value:t.locality_radius_miles,onChange:i=>e({...t,locality_radius_miles:i}),min:1,step:.5}),A.jsx(st,{label:"Offline Threshold (hours)",value:t.offline_threshold_hours,onChange:i=>e({...t,offline_threshold_hours:i}),min:1})]}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(st,{label:"Packet Threshold",value:t.packet_threshold,onChange:i=>e({...t,packet_threshold:i}),min:0,helper:"Per 24h to flag"}),A.jsx(st,{label:"Battery Warning %",value:t.battery_warning_percent,onChange:i=>e({...t,battery_warning_percent:i}),min:1,max:100})]}),A.jsx(Nl,{label:"Critical Nodes",value:t.critical_nodes,onChange:i=>e({...t,critical_nodes:i}),helper:"Short names of critical nodes (e.g., MHR, HPR)"}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(st,{label:"Alert Channel",value:t.alert_channel,onChange:i=>e({...t,alert_channel:i}),min:-1,helper:"-1 = disabled"}),A.jsx(st,{label:"Alert Cooldown (min)",value:t.alert_cooldown_minutes,onChange:i=>e({...t,alert_cooldown_minutes:i}),min:1})]}),A.jsxs("div",{className:"space-y-2",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:"Regions"}),t.regions.map((i,a)=>A.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[A.jsx("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>n(r===a?null:a),children:A.jsxs("div",{className:"flex items-center gap-3",children:[r===a?A.jsx(JC,{size:16}):A.jsx(M3,{size:16}),A.jsx("span",{className:"font-medium text-slate-200",children:i.name}),A.jsx("span",{className:"text-xs text-slate-500",children:i.local_name})]})}),r===a&&A.jsxs("div",{className:"p-4 space-y-3 border-t border-[#1e2a3a]",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(wt,{label:"Name",value:i.name,onChange:o=>{const s=[...t.regions];s[a]={...i,name:o},e({...t,regions:s})}}),A.jsx(wt,{label:"Local Name",value:i.local_name,onChange:o=>{const s=[...t.regions];s[a]={...i,local_name:o},e({...t,regions:s})}})]}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(st,{label:"Latitude",value:i.lat,onChange:o=>{const s=[...t.regions];s[a]={...i,lat:o},e({...t,regions:s})},step:1e-4}),A.jsx(st,{label:"Longitude",value:i.lon,onChange:o=>{const s=[...t.regions];s[a]={...i,lon:o},e({...t,regions:s})},step:1e-4})]}),A.jsx(wt,{label:"Description",value:i.description,onChange:o=>{const s=[...t.regions];s[a]={...i,description:o},e({...t,regions:s})}}),A.jsx(Nl,{label:"Aliases",value:i.aliases,onChange:o=>{const s=[...t.regions];s[a]={...i,aliases:o},e({...t,regions:s})}}),A.jsx(Nl,{label:"Cities",value:i.cities,onChange:o=>{const s=[...t.regions];s[a]={...i,cities:o},e({...t,regions:s})}})]})]},a))]}),A.jsxs("div",{className:"space-y-2",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide mb-3",children:"Alert Rules"}),A.jsxs("div",{className:"grid grid-cols-2 gap-x-6 gap-y-1",children:[A.jsx(it,{label:"Infra Offline",checked:t.alert_rules.infra_offline,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_offline:i}})}),A.jsx(it,{label:"Infra Recovery",checked:t.alert_rules.infra_recovery,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_recovery:i}})}),A.jsx(it,{label:"New Router",checked:t.alert_rules.new_router,onChange:i=>e({...t,alert_rules:{...t.alert_rules,new_router:i}})}),A.jsx(it,{label:"Battery Warning",checked:t.alert_rules.battery_warning,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_warning:i}})}),A.jsx(it,{label:"Battery Critical",checked:t.alert_rules.battery_critical,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_critical:i}})}),A.jsx(it,{label:"Battery Emergency",checked:t.alert_rules.battery_emergency,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_emergency:i}})}),A.jsx(it,{label:"Power Source Change",checked:t.alert_rules.power_source_change,onChange:i=>e({...t,alert_rules:{...t.alert_rules,power_source_change:i}})}),A.jsx(it,{label:"Solar Not Charging",checked:t.alert_rules.solar_not_charging,onChange:i=>e({...t,alert_rules:{...t.alert_rules,solar_not_charging:i}})}),A.jsx(it,{label:"High Utilization",checked:t.alert_rules.sustained_high_util,onChange:i=>e({...t,alert_rules:{...t.alert_rules,sustained_high_util:i}})}),A.jsx(it,{label:"Packet Flood",checked:t.alert_rules.packet_flood,onChange:i=>e({...t,alert_rules:{...t.alert_rules,packet_flood:i}})}),A.jsx(it,{label:"Single Gateway",checked:t.alert_rules.infra_single_gateway,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_single_gateway:i}})}),A.jsx(it,{label:"Region Blackout",checked:t.alert_rules.region_total_blackout,onChange:i=>e({...t,alert_rules:{...t.alert_rules,region_total_blackout:i}})})]})]})]})]})}function Yye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-6",children:[A.jsx(it,{label:"Enable Environmental Feeds",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&A.jsxs(A.Fragment,{children:[A.jsx(Nl,{label:"NWS Zones",value:t.nws_zones,onChange:r=>e({...t,nws_zones:r}),helper:"Zone IDs like IDZ016, IDZ030"}),A.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NWS Weather Alerts"}),A.jsx(it,{label:"",checked:t.nws.enabled,onChange:r=>e({...t,nws:{...t.nws,enabled:r}})})]}),t.nws.enabled&&A.jsxs(A.Fragment,{children:[A.jsx(wt,{label:"User Agent",value:t.nws.user_agent,onChange:r=>e({...t,nws:{...t.nws,user_agent:r}}),helper:"Required format: (app_name, contact_email)"}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(st,{label:"Tick Seconds",value:t.nws.tick_seconds,onChange:r=>e({...t,nws:{...t.nws,tick_seconds:r}}),min:30}),A.jsx(Ql,{label:"Min Severity",value:t.nws.severity_min,onChange:r=>e({...t,nws:{...t.nws,severity_min:r}}),options:[{value:"minor",label:"Minor"},{value:"moderate",label:"Moderate"},{value:"severe",label:"Severe"},{value:"extreme",label:"Extreme"}]})]})]})]}),A.jsx("div",{className:"border border-[#1e2a3a] rounded-lg p-4",children:A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NOAA Space Weather (SWPC)"}),A.jsx(it,{label:"",checked:t.swpc.enabled,onChange:r=>e({...t,swpc:{...t.swpc,enabled:r}})})]})}),A.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Tropospheric Ducting"}),A.jsx(it,{label:"",checked:t.ducting.enabled,onChange:r=>e({...t,ducting:{...t.ducting,enabled:r}})})]}),t.ducting.enabled&&A.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[A.jsx(st,{label:"Tick Seconds",value:t.ducting.tick_seconds,onChange:r=>e({...t,ducting:{...t.ducting,tick_seconds:r}}),min:60}),A.jsx(st,{label:"Latitude",value:t.ducting.latitude,onChange:r=>e({...t,ducting:{...t.ducting,latitude:r}}),step:.01}),A.jsx(st,{label:"Longitude",value:t.ducting.longitude,onChange:r=>e({...t,ducting:{...t.ducting,longitude:r}}),step:.01})]})]}),A.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NIFC Fire Perimeters"}),A.jsx(it,{label:"",checked:t.fires.enabled,onChange:r=>e({...t,fires:{...t.fires,enabled:r}})})]}),t.fires.enabled&&A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(st,{label:"Tick Seconds",value:t.fires.tick_seconds,onChange:r=>e({...t,fires:{...t.fires,tick_seconds:r}}),min:60}),A.jsx(wt,{label:"State",value:t.fires.state,onChange:r=>e({...t,fires:{...t.fires,state:r}}),placeholder:"US-ID"})]})]}),A.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Avalanche Advisories"}),A.jsx(it,{label:"",checked:t.avalanche.enabled,onChange:r=>e({...t,avalanche:{...t.avalanche,enabled:r}})})]}),t.avalanche.enabled&&A.jsxs(A.Fragment,{children:[A.jsx(st,{label:"Tick Seconds",value:t.avalanche.tick_seconds,onChange:r=>e({...t,avalanche:{...t.avalanche,tick_seconds:r}}),min:60}),A.jsx(Nl,{label:"Center IDs",value:t.avalanche.center_ids,onChange:r=>e({...t,avalanche:{...t.avalanche,center_ids:r}})}),A.jsx(v8,{label:"Season Months",value:t.avalanche.season_months,onChange:r=>e({...t,avalanche:{...t.avalanche,season_months:r}}),helper:"e.g., 12, 1, 2, 3, 4"})]})]})]})]})}function Xye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(it,{label:"Enable Dashboard",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(wt,{label:"Host",value:t.host,onChange:r=>e({...t,host:r}),placeholder:"0.0.0.0"}),A.jsx(st,{label:"Port",value:t.port,onChange:r=>e({...t,port:r}),min:1,max:65535})]})]})}function qye(){var I;const[t,e]=q.useState(null),[r,n]=q.useState(null),[i,a]=q.useState("bot"),[o,s]=q.useState(!0),[l,u]=q.useState(!1),[c,f]=q.useState(null),[h,v]=q.useState(null),[p,g]=q.useState(!1),[m,y]=q.useState(!1),x=q.useCallback(async()=>{try{const k=await fetch("/api/config");if(!k.ok)throw new Error("Failed to fetch config");const E=await k.json();e(E),n(JSON.parse(JSON.stringify(E))),y(!1),f(null)}catch(k){f(k instanceof Error?k.message:"Unknown error")}finally{s(!1)}},[]);q.useEffect(()=>{x()},[x]),q.useEffect(()=>{t&&r&&y(JSON.stringify(t)!==JSON.stringify(r))},[t,r]);const S=async()=>{if(t){u(!0),f(null),v(null);try{const k=t[i],E=await fetch(`/api/config/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),z=await E.json();if(!E.ok)throw new Error(z.detail||"Save failed");v(`${i} saved successfully`),n(JSON.parse(JSON.stringify(t))),y(!1),z.restart_required&&g(!0),setTimeout(()=>v(null),3e3)}catch(k){f(k instanceof Error?k.message:"Save failed")}finally{u(!1)}}},b=()=>{r&&(e(JSON.parse(JSON.stringify(r))),y(!1))},T=async()=>{try{await fetch("/api/restart",{method:"POST"}),g(!1),v("Restart initiated")}catch{f("Restart failed")}},C=(k,E)=>{t&&e({...t,[k]:E})};if(o)return A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsx("div",{className:"text-slate-400",children:"Loading configuration..."})});if(!t)return A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsx("div",{className:"text-red-400",children:"Failed to load configuration"})});const M=()=>{switch(i){case"bot":return A.jsx(Rye,{data:t.bot,onChange:k=>C("bot",k)});case"connection":return A.jsx(Nye,{data:t.connection,onChange:k=>C("connection",k)});case"response":return A.jsx(Oye,{data:t.response,onChange:k=>C("response",k)});case"history":return A.jsx(zye,{data:t.history,onChange:k=>C("history",k)});case"memory":return A.jsx(Bye,{data:t.memory,onChange:k=>C("memory",k)});case"context":return A.jsx(Vye,{data:t.context,onChange:k=>C("context",k)});case"commands":return A.jsx(Fye,{data:t.commands,onChange:k=>C("commands",k)});case"llm":return A.jsx(Gye,{data:t.llm,onChange:k=>C("llm",k)});case"weather":return A.jsx(jye,{data:t.weather,onChange:k=>C("weather",k)});case"meshmonitor":return A.jsx(Hye,{data:t.meshmonitor,onChange:k=>C("meshmonitor",k)});case"knowledge":return A.jsx(Wye,{data:t.knowledge,onChange:k=>C("knowledge",k)});case"mesh_sources":return A.jsx(Zye,{data:t.mesh_sources,onChange:k=>C("mesh_sources",k)});case"mesh_intelligence":return A.jsx($ye,{data:t.mesh_intelligence,onChange:k=>C("mesh_intelligence",k)});case"environmental":return A.jsx(Yye,{data:t.environmental,onChange:k=>C("environmental",k)});case"dashboard":return A.jsx(Xye,{data:t.dashboard,onChange:k=>C("dashboard",k)});default:return null}},D=((I=Jz.find(k=>k.key===i))==null?void 0:I.label)||i;return A.jsxs("div",{className:"flex gap-6 h-[calc(100vh-8rem)]",children:[A.jsx("div",{className:"w-48 flex-shrink-0 space-y-1",children:Jz.map(({key:k,label:E,icon:z})=>A.jsxs("button",{onClick:()=>a(k),className:`w-full flex items-center gap-2 px-3 py-2 rounded text-sm transition-colors ${i===k?"bg-accent text-white":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[A.jsx(z,{size:16}),A.jsx("span",{children:E}),m&&i===k&&A.jsx("span",{className:"ml-auto w-2 h-2 bg-amber-500 rounded-full"})]},k))}),A.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[A.jsxs("div",{className:"flex items-center justify-between mb-6",children:[A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsx(E3,{size:20,className:"text-slate-500"}),A.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:D})]}),A.jsxs("div",{className:"flex items-center gap-2",children:[m&&A.jsxs("button",{onClick:b,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-slate-400 hover:text-slate-200 bg-bg-hover rounded transition-colors",children:[A.jsx(RZ,{size:14}),"Discard"]}),A.jsxs("button",{onClick:S,disabled:l||!m,className:"flex items-center gap-1.5 px-4 py-1.5 text-sm bg-accent text-white rounded hover:bg-accent/80 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[l?A.jsx(EZ,{size:14,className:"animate-spin"}):A.jsx(NZ,{size:14}),"Save"]})]})]}),p&&A.jsxs("div",{className:"flex items-center justify-between p-3 mb-4 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:[A.jsxs("div",{className:"flex items-center gap-2 text-amber-400",children:[A.jsx(S0,{size:16}),A.jsx("span",{className:"text-sm",children:"Restart required for changes to take effect"})]}),A.jsx("button",{onClick:T,className:"px-3 py-1 text-sm bg-amber-500 text-white rounded hover:bg-amber-600 transition-colors",children:"Restart Now"})]}),c&&A.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-red-500/10 border border-red-500/30 rounded-lg text-red-400",children:[A.jsx(GZ,{size:16}),A.jsx("span",{className:"text-sm",children:c})]}),h&&A.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-green-500/10 border border-green-500/30 rounded-lg text-green-400",children:[A.jsx(SZ,{size:16}),A.jsx("span",{className:"text-sm",children:h})]}),A.jsx("div",{className:"flex-1 overflow-y-auto pr-2",children:A.jsx("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:M()})})]})]})}function Kye(){return A.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center",children:[A.jsx("div",{className:"w-16 h-16 rounded-full bg-bg-card border border-border flex items-center justify-center mb-6",children:A.jsx(C3,{size:32,className:"text-slate-500"})}),A.jsx("h2",{className:"text-xl font-semibold text-slate-300 mb-2",children:"Alerts"}),A.jsx("p",{className:"text-slate-500 max-w-md",children:"Alert history and subscriptions coming in Phase 11"})]})}function Qye(){return A.jsx(a$,{children:A.jsxs(rZ,{children:[A.jsx(Ku,{path:"/",element:A.jsx(c$,{})}),A.jsx(Ku,{path:"/mesh",element:A.jsx(Lye,{})}),A.jsx(Ku,{path:"/environment",element:A.jsx(Iye,{})}),A.jsx(Ku,{path:"/config",element:A.jsx(qye,{})}),A.jsx(Ku,{path:"/alerts",element:A.jsx(Kye,{})})]})})}jS.createRoot(document.getElementById("root")).render(A.jsx(Ec.StrictMode,{children:A.jsx(uZ,{children:A.jsx(Qye,{})})})); + */(function(t,e){(function(r,n){n(e)})(zW,function(r){var n="1.9.4";function i(d){var _,w,P,R;for(w=1,P=arguments.length;w"u"||!L||!L.Mixin)){d=S(d)?d:[d];for(var _=0;_0?Math.floor(d):Math.ceil(d)};V.prototype={clone:function(){return new V(this.x,this.y)},add:function(d){return this.clone()._add(H(d))},_add:function(d){return this.x+=d.x,this.y+=d.y,this},subtract:function(d){return this.clone()._subtract(H(d))},_subtract:function(d){return this.x-=d.x,this.y-=d.y,this},divideBy:function(d){return this.clone()._divideBy(d)},_divideBy:function(d){return this.x/=d,this.y/=d,this},multiplyBy:function(d){return this.clone()._multiplyBy(d)},_multiplyBy:function(d){return this.x*=d,this.y*=d,this},scaleBy:function(d){return new V(this.x*d.x,this.y*d.y)},unscaleBy:function(d){return new V(this.x/d.x,this.y/d.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=W(this.x),this.y=W(this.y),this},distanceTo:function(d){d=H(d);var _=d.x-this.x,w=d.y-this.y;return Math.sqrt(_*_+w*w)},equals:function(d){return d=H(d),d.x===this.x&&d.y===this.y},contains:function(d){return d=H(d),Math.abs(d.x)<=Math.abs(this.x)&&Math.abs(d.y)<=Math.abs(this.y)},toString:function(){return"Point("+h(this.x)+", "+h(this.y)+")"}};function H(d,_,w){return d instanceof V?d:S(d)?new V(d[0],d[1]):d==null?d:typeof d=="object"&&"x"in d&&"y"in d?new V(d.x,d.y):new V(d,_,w)}function Y(d,_){if(d)for(var w=_?[d,_]:d,P=0,R=w.length;P=this.min.x&&w.x<=this.max.x&&_.y>=this.min.y&&w.y<=this.max.y},intersects:function(d){d=K(d);var _=this.min,w=this.max,P=d.min,R=d.max,B=R.x>=_.x&&P.x<=w.x,U=R.y>=_.y&&P.y<=w.y;return B&&U},overlaps:function(d){d=K(d);var _=this.min,w=this.max,P=d.min,R=d.max,B=R.x>_.x&&P.x_.y&&P.y=_.lat&&R.lat<=w.lat&&P.lng>=_.lng&&R.lng<=w.lng},intersects:function(d){d=ie(d);var _=this._southWest,w=this._northEast,P=d.getSouthWest(),R=d.getNorthEast(),B=R.lat>=_.lat&&P.lat<=w.lat,U=R.lng>=_.lng&&P.lng<=w.lng;return B&&U},overlaps:function(d){d=ie(d);var _=this._southWest,w=this._northEast,P=d.getSouthWest(),R=d.getNorthEast(),B=R.lat>_.lat&&P.lat_.lng&&P.lng1,C8=function(){var d=!1;try{var _=Object.defineProperty({},"passive",{get:function(){d=!0}});window.addEventListener("testPassiveEventSupport",f,_),window.removeEventListener("testPassiveEventSupport",f,_)}catch{}return d}(),M8=function(){return!!document.createElement("canvas").getContext}(),d_=!!(document.createElementNS&&rt("svg").createSVGRect),L8=!!d_&&function(){var d=document.createElement("div");return d.innerHTML="",(d.firstChild&&d.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),A8=!d_&&function(){try{var d=document.createElement("div");d.innerHTML='';var _=d.firstChild;return _.style.behavior="url(#default#VML)",_&&typeof _.adj=="object"}catch{return!1}}(),P8=navigator.platform.indexOf("Mac")===0,D8=navigator.platform.indexOf("Linux")===0;function Vi(d){return navigator.userAgent.toLowerCase().indexOf(d)>=0}var Ne={ie:pr,ielt9:zr,edge:zi,webkit:Bi,android:vu,android23:GL,androidStock:p8,opera:h_,chrome:HL,gecko:WL,safari:g8,phantom:UL,opera12:ZL,win:m8,ie3d:$L,webkit3d:v_,gecko3d:YL,any3d:y8,mobile:Df,mobileWebkit:_8,mobileWebkit3d:x8,msPointer:XL,pointer:qL,touch:S8,touchNative:KL,mobileOpera:w8,mobileGecko:b8,retina:T8,passiveEvents:C8,canvas:M8,svg:d_,vml:A8,inlineSvg:L8,mac:P8,linux:D8},QL=Ne.msPointer?"MSPointerDown":"pointerdown",JL=Ne.msPointer?"MSPointerMove":"pointermove",eA=Ne.msPointer?"MSPointerUp":"pointerup",tA=Ne.msPointer?"MSPointerCancel":"pointercancel",p_={touchstart:QL,touchmove:JL,touchend:eA,touchcancel:tA},rA={touchstart:O8,touchmove:Wd,touchend:Wd,touchcancel:Wd},du={},nA=!1;function k8(d,_,w){return _==="touchstart"&&N8(),rA[_]?(w=rA[_].bind(this,w),d.addEventListener(p_[_],w,!1),w):(console.warn("wrong event specified:",_),f)}function I8(d,_,w){if(!p_[_]){console.warn("wrong event specified:",_);return}d.removeEventListener(p_[_],w,!1)}function E8(d){du[d.pointerId]=d}function R8(d){du[d.pointerId]&&(du[d.pointerId]=d)}function iA(d){delete du[d.pointerId]}function N8(){nA||(document.addEventListener(QL,E8,!0),document.addEventListener(JL,R8,!0),document.addEventListener(eA,iA,!0),document.addEventListener(tA,iA,!0),nA=!0)}function Wd(d,_){if(_.pointerType!==(_.MSPOINTER_TYPE_MOUSE||"mouse")){_.touches=[];for(var w in du)_.touches.push(du[w]);_.changedTouches=[_],d(_)}}function O8(d,_){_.MSPOINTER_TYPE_TOUCH&&_.pointerType===_.MSPOINTER_TYPE_TOUCH&&Cr(_),Wd(d,_)}function z8(d){var _={},w,P;for(P in d)w=d[P],_[P]=w&&w.bind?w.bind(d):w;return d=_,_.type="dblclick",_.detail=2,_.isTrusted=!1,_._simulated=!0,_}var B8=200;function V8(d,_){d.addEventListener("dblclick",_);var w=0,P;function R(B){if(B.detail!==1){P=B.detail;return}if(!(B.pointerType==="mouse"||B.sourceCapabilities&&!B.sourceCapabilities.firesTouchEvents)){var U=uA(B);if(!(U.some(function(te){return te instanceof HTMLLabelElement&&te.attributes.for})&&!U.some(function(te){return te instanceof HTMLInputElement||te instanceof HTMLSelectElement}))){var Q=Date.now();Q-w<=B8?(P++,P===2&&_(z8(B))):P=1,w=Q}}}return d.addEventListener("click",R),{dblclick:_,simDblclick:R}}function F8(d,_){d.removeEventListener("dblclick",_.dblclick),d.removeEventListener("click",_.simDblclick)}var g_=$d(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),kf=$d(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),aA=kf==="webkitTransition"||kf==="OTransition"?kf+"End":"transitionend";function oA(d){return typeof d=="string"?document.getElementById(d):d}function If(d,_){var w=d.style[_]||d.currentStyle&&d.currentStyle[_];if((!w||w==="auto")&&document.defaultView){var P=document.defaultView.getComputedStyle(d,null);w=P?P[_]:null}return w==="auto"?null:w}function vt(d,_,w){var P=document.createElement(d);return P.className=_||"",w&&w.appendChild(P),P}function It(d){var _=d.parentNode;_&&_.removeChild(d)}function Ud(d){for(;d.firstChild;)d.removeChild(d.firstChild)}function pu(d){var _=d.parentNode;_&&_.lastChild!==d&&_.appendChild(d)}function gu(d){var _=d.parentNode;_&&_.firstChild!==d&&_.insertBefore(d,_.firstChild)}function m_(d,_){if(d.classList!==void 0)return d.classList.contains(_);var w=Zd(d);return w.length>0&&new RegExp("(^|\\s)"+_+"(\\s|$)").test(w)}function Je(d,_){if(d.classList!==void 0)for(var w=p(_),P=0,R=w.length;P0?2*window.devicePixelRatio:1;function fA(d){return Ne.edge?d.wheelDeltaY/2:d.deltaY&&d.deltaMode===0?-d.deltaY/H8:d.deltaY&&d.deltaMode===1?-d.deltaY*20:d.deltaY&&d.deltaMode===2?-d.deltaY*60:d.deltaX||d.deltaZ?0:d.wheelDelta?(d.wheelDeltaY||d.wheelDelta)/2:d.detail&&Math.abs(d.detail)<32765?-d.detail*20:d.detail?d.detail/-32765*60:0}function P_(d,_){var w=_.relatedTarget;if(!w)return!0;try{for(;w&&w!==d;)w=w.parentNode}catch{return!1}return w!==d}var W8={__proto__:null,on:Ke,off:Tt,stopPropagation:Ps,disableScrollPropagation:A_,disableClickPropagation:Of,preventDefault:Cr,stop:Ds,getPropagationPath:uA,getMousePosition:cA,getWheelDelta:fA,isExternalTarget:P_,addListener:Ke,removeListener:Tt},hA=Z.extend({run:function(d,_,w,P){this.stop(),this._el=d,this._inProgress=!0,this._duration=w||.25,this._easeOutPower=1/Math.max(P||.5,.2),this._startPos=As(d),this._offset=_.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=E(this._animate,this),this._step()},_step:function(d){var _=+new Date-this._startTime,w=this._duration*1e3;_this.options.maxZoom)?this.setZoom(d):this},panInsideBounds:function(d,_){this._enforcingBounds=!0;var w=this.getCenter(),P=this._limitCenter(w,this._zoom,ie(d));return w.equals(P)||this.panTo(P,_),this._enforcingBounds=!1,this},panInside:function(d,_){_=_||{};var w=H(_.paddingTopLeft||_.padding||[0,0]),P=H(_.paddingBottomRight||_.padding||[0,0]),R=this.project(this.getCenter()),B=this.project(d),U=this.getPixelBounds(),Q=K([U.min.add(w),U.max.subtract(P)]),te=Q.getSize();if(!Q.contains(B)){this._enforcingBounds=!0;var ae=B.subtract(Q.getCenter()),Le=Q.extend(B).getSize().subtract(te);R.x+=ae.x<0?-Le.x:Le.x,R.y+=ae.y<0?-Le.y:Le.y,this.panTo(this.unproject(R),_),this._enforcingBounds=!1}return this},invalidateSize:function(d){if(!this._loaded)return this;d=i({animate:!1,pan:!0},d===!0?{animate:!0}:d);var _=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var w=this.getSize(),P=_.divideBy(2).round(),R=w.divideBy(2).round(),B=P.subtract(R);return!B.x&&!B.y?this:(d.animate&&d.pan?this.panBy(B):(d.pan&&this._rawPanBy(B),this.fire("move"),d.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:_,newSize:w}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(d){if(d=this._locateOptions=i({timeout:1e4,watch:!1},d),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var _=o(this._handleGeolocationResponse,this),w=o(this._handleGeolocationError,this);return d.watch?this._locationWatchId=navigator.geolocation.watchPosition(_,w,d):navigator.geolocation.getCurrentPosition(_,w,d),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(d){if(this._container._leaflet_id){var _=d.code,w=d.message||(_===1?"permission denied":_===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:_,message:"Geolocation error: "+w+"."})}},_handleGeolocationResponse:function(d){if(this._container._leaflet_id){var _=d.coords.latitude,w=d.coords.longitude,P=new ue(_,w),R=P.toBounds(d.coords.accuracy*2),B=this._locateOptions;if(B.setView){var U=this.getBoundsZoom(R);this.setView(P,B.maxZoom?Math.min(U,B.maxZoom):U)}var Q={latlng:P,bounds:R,timestamp:d.timestamp};for(var te in d.coords)typeof d.coords[te]=="number"&&(Q[te]=d.coords[te]);this.fire("locationfound",Q)}},addHandler:function(d,_){if(!_)return this;var w=this[d]=new _(this);return this._handlers.push(w),this.options[d]&&w.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),It(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var d;for(d in this._layers)this._layers[d].remove();for(d in this._panes)It(this._panes[d]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(d,_){var w="leaflet-pane"+(d?" leaflet-"+d.replace("Pane","")+"-pane":""),P=vt("div",w,_||this._mapPane);return d&&(this._panes[d]=P),P},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var d=this.getPixelBounds(),_=this.unproject(d.getBottomLeft()),w=this.unproject(d.getTopRight());return new ne(_,w)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(d,_,w){d=ie(d),w=H(w||[0,0]);var P=this.getZoom()||0,R=this.getMinZoom(),B=this.getMaxZoom(),U=d.getNorthWest(),Q=d.getSouthEast(),te=this.getSize().subtract(w),ae=K(this.project(Q,P),this.project(U,P)).getSize(),Le=Ne.any3d?this.options.zoomSnap:1,je=te.x/ae.x,nt=te.y/ae.y,Yr=_?Math.max(je,nt):Math.min(je,nt);return P=this.getScaleZoom(Yr,P),Le&&(P=Math.round(P/(Le/100))*(Le/100),P=_?Math.ceil(P/Le)*Le:Math.floor(P/Le)*Le),Math.max(R,Math.min(B,P))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new V(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(d,_){var w=this._getTopLeftPoint(d,_);return new Y(w,w.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(d){return this.options.crs.getProjectedBounds(d===void 0?this.getZoom():d)},getPane:function(d){return typeof d=="string"?this._panes[d]:d},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(d,_){var w=this.options.crs;return _=_===void 0?this._zoom:_,w.scale(d)/w.scale(_)},getScaleZoom:function(d,_){var w=this.options.crs;_=_===void 0?this._zoom:_;var P=w.zoom(d*w.scale(_));return isNaN(P)?1/0:P},project:function(d,_){return _=_===void 0?this._zoom:_,this.options.crs.latLngToPoint(de(d),_)},unproject:function(d,_){return _=_===void 0?this._zoom:_,this.options.crs.pointToLatLng(H(d),_)},layerPointToLatLng:function(d){var _=H(d).add(this.getPixelOrigin());return this.unproject(_)},latLngToLayerPoint:function(d){var _=this.project(de(d))._round();return _._subtract(this.getPixelOrigin())},wrapLatLng:function(d){return this.options.crs.wrapLatLng(de(d))},wrapLatLngBounds:function(d){return this.options.crs.wrapLatLngBounds(ie(d))},distance:function(d,_){return this.options.crs.distance(de(d),de(_))},containerPointToLayerPoint:function(d){return H(d).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(d){return H(d).add(this._getMapPanePos())},containerPointToLatLng:function(d){var _=this.containerPointToLayerPoint(H(d));return this.layerPointToLatLng(_)},latLngToContainerPoint:function(d){return this.layerPointToContainerPoint(this.latLngToLayerPoint(de(d)))},mouseEventToContainerPoint:function(d){return cA(d,this._container)},mouseEventToLayerPoint:function(d){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(d))},mouseEventToLatLng:function(d){return this.layerPointToLatLng(this.mouseEventToLayerPoint(d))},_initContainer:function(d){var _=this._container=oA(d);if(_){if(_._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ke(_,"scroll",this._onScroll,this),this._containerId=l(_)},_initLayout:function(){var d=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ne.any3d,Je(d,"leaflet-container"+(Ne.touch?" leaflet-touch":"")+(Ne.retina?" leaflet-retina":"")+(Ne.ielt9?" leaflet-oldie":"")+(Ne.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var _=If(d,"position");_!=="absolute"&&_!=="relative"&&_!=="fixed"&&_!=="sticky"&&(d.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var d=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Qt(this._mapPane,new V(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Je(d.markerPane,"leaflet-zoom-hide"),Je(d.shadowPane,"leaflet-zoom-hide"))},_resetView:function(d,_,w){Qt(this._mapPane,new V(0,0));var P=!this._loaded;this._loaded=!0,_=this._limitZoom(_),this.fire("viewprereset");var R=this._zoom!==_;this._moveStart(R,w)._move(d,_)._moveEnd(R),this.fire("viewreset"),P&&this.fire("load")},_moveStart:function(d,_){return d&&this.fire("zoomstart"),_||this.fire("movestart"),this},_move:function(d,_,w,P){_===void 0&&(_=this._zoom);var R=this._zoom!==_;return this._zoom=_,this._lastCenter=d,this._pixelOrigin=this._getNewPixelOrigin(d),P?w&&w.pinch&&this.fire("zoom",w):((R||w&&w.pinch)&&this.fire("zoom",w),this.fire("move",w)),this},_moveEnd:function(d){return d&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(d){Qt(this._mapPane,this._getMapPanePos().subtract(d))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(d){this._targets={},this._targets[l(this._container)]=this;var _=d?Tt:Ke;_(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&_(window,"resize",this._onResize,this),Ne.any3d&&this.options.transform3DLimit&&(d?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=E(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var d=this._getMapPanePos();Math.max(Math.abs(d.x),Math.abs(d.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(d,_){for(var w=[],P,R=_==="mouseout"||_==="mouseover",B=d.target||d.srcElement,U=!1;B;){if(P=this._targets[l(B)],P&&(_==="click"||_==="preclick")&&this._draggableMoved(P)){U=!0;break}if(P&&P.listens(_,!0)&&(R&&!P_(B,d)||(w.push(P),R))||B===this._container)break;B=B.parentNode}return!w.length&&!U&&!R&&this.listens(_,!0)&&(w=[this]),w},_isClickDisabled:function(d){for(;d&&d!==this._container;){if(d._leaflet_disable_click)return!0;d=d.parentNode}},_handleDOMEvent:function(d){var _=d.target||d.srcElement;if(!(!this._loaded||_._leaflet_disable_events||d.type==="click"&&this._isClickDisabled(_))){var w=d.type;w==="mousedown"&&b_(_),this._fireDOMEvent(d,w)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(d,_,w){if(d.type==="click"){var P=i({},d);P.type="preclick",this._fireDOMEvent(P,P.type,w)}var R=this._findEventTargets(d,_);if(w){for(var B=[],U=0;U0?Math.round(d-_)/2:Math.max(0,Math.ceil(d))-Math.max(0,Math.floor(_))},_limitZoom:function(d){var _=this.getMinZoom(),w=this.getMaxZoom(),P=Ne.any3d?this.options.zoomSnap:1;return P&&(d=Math.round(d/P)*P),Math.max(_,Math.min(w,d))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Zt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(d,_){var w=this._getCenterOffset(d)._trunc();return(_&&_.animate)!==!0&&!this.getSize().contains(w)?!1:(this.panBy(w,_),!0)},_createAnimProxy:function(){var d=this._proxy=vt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(d),this.on("zoomanim",function(_){var w=g_,P=this._proxy.style[w];Ls(this._proxy,this.project(_.center,_.zoom),this.getZoomScale(_.zoom,1)),P===this._proxy.style[w]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){It(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var d=this.getCenter(),_=this.getZoom();Ls(this._proxy,this.project(d,_),this.getZoomScale(_,1))},_catchTransitionEnd:function(d){this._animatingZoom&&d.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(d,_,w){if(this._animatingZoom)return!0;if(w=w||{},!this._zoomAnimated||w.animate===!1||this._nothingToAnimate()||Math.abs(_-this._zoom)>this.options.zoomAnimationThreshold)return!1;var P=this.getZoomScale(_),R=this._getCenterOffset(d)._divideBy(1-1/P);return w.animate!==!0&&!this.getSize().contains(R)?!1:(E(function(){this._moveStart(!0,w.noMoveStart||!1)._animateZoom(d,_,!0)},this),!0)},_animateZoom:function(d,_,w,P){this._mapPane&&(w&&(this._animatingZoom=!0,this._animateToCenter=d,this._animateToZoom=_,Je(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:d,zoom:_,noUpdate:P}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Zt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function U8(d,_){return new ct(d,_)}var hi=F.extend({options:{position:"topright"},initialize:function(d){g(this,d)},getPosition:function(){return this.options.position},setPosition:function(d){var _=this._map;return _&&_.removeControl(this),this.options.position=d,_&&_.addControl(this),this},getContainer:function(){return this._container},addTo:function(d){this.remove(),this._map=d;var _=this._container=this.onAdd(d),w=this.getPosition(),P=d._controlCorners[w];return Je(_,"leaflet-control"),w.indexOf("bottom")!==-1?P.insertBefore(_,P.firstChild):P.appendChild(_),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(It(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(d){this._map&&d&&d.screenX>0&&d.screenY>0&&this._map.getContainer().focus()}}),zf=function(d){return new hi(d)};ct.include({addControl:function(d){return d.addTo(this),this},removeControl:function(d){return d.remove(),this},_initControlPos:function(){var d=this._controlCorners={},_="leaflet-",w=this._controlContainer=vt("div",_+"control-container",this._container);function P(R,B){var U=_+R+" "+_+B;d[R+B]=vt("div",U,w)}P("top","left"),P("top","right"),P("bottom","left"),P("bottom","right")},_clearControlPos:function(){for(var d in this._controlCorners)It(this._controlCorners[d]);It(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var vA=hi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(d,_,w,P){return w1,this._baseLayersList.style.display=d?"":"none"),this._separator.style.display=_&&d?"":"none",this},_onLayerChange:function(d){this._handlingClick||this._update();var _=this._getLayer(l(d.target)),w=_.overlay?d.type==="add"?"overlayadd":"overlayremove":d.type==="add"?"baselayerchange":null;w&&this._map.fire(w,_)},_createRadioElement:function(d,_){var w='",P=document.createElement("div");return P.innerHTML=w,P.firstChild},_addItem:function(d){var _=document.createElement("label"),w=this._map.hasLayer(d.layer),P;d.overlay?(P=document.createElement("input"),P.type="checkbox",P.className="leaflet-control-layers-selector",P.defaultChecked=w):P=this._createRadioElement("leaflet-base-layers_"+l(this),w),this._layerControlInputs.push(P),P.layerId=l(d.layer),Ke(P,"click",this._onInputClick,this);var R=document.createElement("span");R.innerHTML=" "+d.name;var B=document.createElement("span");_.appendChild(B),B.appendChild(P),B.appendChild(R);var U=d.overlay?this._overlaysList:this._baseLayersList;return U.appendChild(_),this._checkDisabledLayers(),_},_onInputClick:function(){if(!this._preventClick){var d=this._layerControlInputs,_,w,P=[],R=[];this._handlingClick=!0;for(var B=d.length-1;B>=0;B--)_=d[B],w=this._getLayer(_.layerId).layer,_.checked?P.push(w):_.checked||R.push(w);for(B=0;B=0;R--)_=d[R],w=this._getLayer(_.layerId).layer,_.disabled=w.options.minZoom!==void 0&&Pw.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var d=this._section;this._preventClick=!0,Ke(d,"click",Cr),this.expand();var _=this;setTimeout(function(){Tt(d,"click",Cr),_._preventClick=!1})}}),Z8=function(d,_,w){return new vA(d,_,w)},D_=hi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(d){var _="leaflet-control-zoom",w=vt("div",_+" leaflet-bar"),P=this.options;return this._zoomInButton=this._createButton(P.zoomInText,P.zoomInTitle,_+"-in",w,this._zoomIn),this._zoomOutButton=this._createButton(P.zoomOutText,P.zoomOutTitle,_+"-out",w,this._zoomOut),this._updateDisabled(),d.on("zoomend zoomlevelschange",this._updateDisabled,this),w},onRemove:function(d){d.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(d){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(d.shiftKey?3:1))},_createButton:function(d,_,w,P,R){var B=vt("a",w,P);return B.innerHTML=d,B.href="#",B.title=_,B.setAttribute("role","button"),B.setAttribute("aria-label",_),Of(B),Ke(B,"click",Ds),Ke(B,"click",R,this),Ke(B,"click",this._refocusOnMap,this),B},_updateDisabled:function(){var d=this._map,_="leaflet-disabled";Zt(this._zoomInButton,_),Zt(this._zoomOutButton,_),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||d._zoom===d.getMinZoom())&&(Je(this._zoomOutButton,_),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||d._zoom===d.getMaxZoom())&&(Je(this._zoomInButton,_),this._zoomInButton.setAttribute("aria-disabled","true"))}});ct.mergeOptions({zoomControl:!0}),ct.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new D_,this.addControl(this.zoomControl))});var $8=function(d){return new D_(d)},dA=hi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(d){var _="leaflet-control-scale",w=vt("div",_),P=this.options;return this._addScales(P,_+"-line",w),d.on(P.updateWhenIdle?"moveend":"move",this._update,this),d.whenReady(this._update,this),w},onRemove:function(d){d.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(d,_,w){d.metric&&(this._mScale=vt("div",_,w)),d.imperial&&(this._iScale=vt("div",_,w))},_update:function(){var d=this._map,_=d.getSize().y/2,w=d.distance(d.containerPointToLatLng([0,_]),d.containerPointToLatLng([this.options.maxWidth,_]));this._updateScales(w)},_updateScales:function(d){this.options.metric&&d&&this._updateMetric(d),this.options.imperial&&d&&this._updateImperial(d)},_updateMetric:function(d){var _=this._getRoundNum(d),w=_<1e3?_+" m":_/1e3+" km";this._updateScale(this._mScale,w,_/d)},_updateImperial:function(d){var _=d*3.2808399,w,P,R;_>5280?(w=_/5280,P=this._getRoundNum(w),this._updateScale(this._iScale,P+" mi",P/w)):(R=this._getRoundNum(_),this._updateScale(this._iScale,R+" ft",R/_))},_updateScale:function(d,_,w){d.style.width=Math.round(this.options.maxWidth*w)+"px",d.innerHTML=_},_getRoundNum:function(d){var _=Math.pow(10,(Math.floor(d)+"").length-1),w=d/_;return w=w>=10?10:w>=5?5:w>=3?3:w>=2?2:1,_*w}}),Y8=function(d){return new dA(d)},X8='',k_=hi.extend({options:{position:"bottomright",prefix:''+(Ne.inlineSvg?X8+" ":"")+"Leaflet"},initialize:function(d){g(this,d),this._attributions={}},onAdd:function(d){d.attributionControl=this,this._container=vt("div","leaflet-control-attribution"),Of(this._container);for(var _ in d._layers)d._layers[_].getAttribution&&this.addAttribution(d._layers[_].getAttribution());return this._update(),d.on("layeradd",this._addAttribution,this),this._container},onRemove:function(d){d.off("layeradd",this._addAttribution,this)},_addAttribution:function(d){d.layer.getAttribution&&(this.addAttribution(d.layer.getAttribution()),d.layer.once("remove",function(){this.removeAttribution(d.layer.getAttribution())},this))},setPrefix:function(d){return this.options.prefix=d,this._update(),this},addAttribution:function(d){return d?(this._attributions[d]||(this._attributions[d]=0),this._attributions[d]++,this._update(),this):this},removeAttribution:function(d){return d?(this._attributions[d]&&(this._attributions[d]--,this._update()),this):this},_update:function(){if(this._map){var d=[];for(var _ in this._attributions)this._attributions[_]&&d.push(_);var w=[];this.options.prefix&&w.push(this.options.prefix),d.length&&w.push(d.join(", ")),this._container.innerHTML=w.join(' ')}}});ct.mergeOptions({attributionControl:!0}),ct.addInitHook(function(){this.options.attributionControl&&new k_().addTo(this)});var q8=function(d){return new k_(d)};hi.Layers=vA,hi.Zoom=D_,hi.Scale=dA,hi.Attribution=k_,zf.layers=Z8,zf.zoom=$8,zf.scale=Y8,zf.attribution=q8;var ji=F.extend({initialize:function(d){this._map=d},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ji.addTo=function(d,_){return d.addHandler(_,this),this};var K8={Events:j},pA=Ne.touch?"touchstart mousedown":"mousedown",mo=Z.extend({options:{clickTolerance:3},initialize:function(d,_,w,P){g(this,P),this._element=d,this._dragStartTarget=_||d,this._preventOutline=w},enable:function(){this._enabled||(Ke(this._dragStartTarget,pA,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(mo._dragging===this&&this.finishDrag(!0),Tt(this._dragStartTarget,pA,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(d){if(this._enabled&&(this._moved=!1,!m_(this._element,"leaflet-zoom-anim"))){if(d.touches&&d.touches.length!==1){mo._dragging===this&&this.finishDrag();return}if(!(mo._dragging||d.shiftKey||d.which!==1&&d.button!==1&&!d.touches)&&(mo._dragging=this,this._preventOutline&&b_(this._element),x_(),Ef(),!this._moving)){this.fire("down");var _=d.touches?d.touches[0]:d,w=sA(this._element);this._startPoint=new V(_.clientX,_.clientY),this._startPos=As(this._element),this._parentScale=T_(w);var P=d.type==="mousedown";Ke(document,P?"mousemove":"touchmove",this._onMove,this),Ke(document,P?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(d){if(this._enabled){if(d.touches&&d.touches.length>1){this._moved=!0;return}var _=d.touches&&d.touches.length===1?d.touches[0]:d,w=new V(_.clientX,_.clientY)._subtract(this._startPoint);!w.x&&!w.y||Math.abs(w.x)+Math.abs(w.y)B&&(U=Q,B=te);B>w&&(_[U]=1,E_(d,_,w,P,U),E_(d,_,w,U,R))}function tW(d,_){for(var w=[d[0]],P=1,R=0,B=d.length;P_&&(w.push(d[P]),R=P);return R_.max.x&&(w|=2),d.y<_.min.y?w|=4:d.y>_.max.y&&(w|=8),w}function rW(d,_){var w=_.x-d.x,P=_.y-d.y;return w*w+P*P}function Bf(d,_,w,P){var R=_.x,B=_.y,U=w.x-R,Q=w.y-B,te=U*U+Q*Q,ae;return te>0&&(ae=((d.x-R)*U+(d.y-B)*Q)/te,ae>1?(R=w.x,B=w.y):ae>0&&(R+=U*ae,B+=Q*ae)),U=d.x-R,Q=d.y-B,P?U*U+Q*Q:new V(R,B)}function Bn(d){return!S(d[0])||typeof d[0][0]!="object"&&typeof d[0][0]<"u"}function wA(d){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Bn(d)}function bA(d,_){var w,P,R,B,U,Q,te,ae;if(!d||d.length===0)throw new Error("latlngs not passed");Bn(d)||(console.warn("latlngs are not flat! Only the first ring will be used"),d=d[0]);var Le=de([0,0]),je=ie(d),nt=je.getNorthWest().distanceTo(je.getSouthWest())*je.getNorthEast().distanceTo(je.getNorthWest());nt<1700&&(Le=I_(d));var Yr=d.length,gr=[];for(w=0;wP){te=(B-P)/R,ae=[Q.x-te*(Q.x-U.x),Q.y-te*(Q.y-U.y)];break}var sn=_.unproject(H(ae));return de([sn.lat+Le.lat,sn.lng+Le.lng])}var nW={__proto__:null,simplify:yA,pointToSegmentDistance:_A,closestPointOnSegment:J8,clipSegment:SA,_getEdgeIntersection:qd,_getBitCode:ks,_sqClosestPointOnSegment:Bf,isFlat:Bn,_flat:wA,polylineCenter:bA},R_={project:function(d){return new V(d.lng,d.lat)},unproject:function(d){return new ue(d.y,d.x)},bounds:new Y([-180,-90],[180,90])},N_={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Y([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(d){var _=Math.PI/180,w=this.R,P=d.lat*_,R=this.R_MINOR/w,B=Math.sqrt(1-R*R),U=B*Math.sin(P),Q=Math.tan(Math.PI/4-P/2)/Math.pow((1-U)/(1+U),B/2);return P=-w*Math.log(Math.max(Q,1e-10)),new V(d.lng*_*w,P)},unproject:function(d){for(var _=180/Math.PI,w=this.R,P=this.R_MINOR/w,R=Math.sqrt(1-P*P),B=Math.exp(-d.y/w),U=Math.PI/2-2*Math.atan(B),Q=0,te=.1,ae;Q<15&&Math.abs(te)>1e-7;Q++)ae=R*Math.sin(U),ae=Math.pow((1-ae)/(1+ae),R/2),te=Math.PI/2-2*Math.atan(B*ae)-U,U+=te;return new ue(U*_,d.x*_/w)}},iW={__proto__:null,LonLat:R_,Mercator:N_,SphericalMercator:De},aW=i({},xe,{code:"EPSG:3395",projection:N_,transformation:function(){var d=.5/(Math.PI*N_.R);return Me(d,.5,-d,.5)}()}),TA=i({},xe,{code:"EPSG:4326",projection:R_,transformation:Me(1/180,1,-1/180,.5)}),oW=i({},Fe,{projection:R_,transformation:Me(1,0,-1,0),scale:function(d){return Math.pow(2,d)},zoom:function(d){return Math.log(d)/Math.LN2},distance:function(d,_){var w=_.lng-d.lng,P=_.lat-d.lat;return Math.sqrt(w*w+P*P)},infinite:!0});Fe.Earth=xe,Fe.EPSG3395=aW,Fe.EPSG3857=st,Fe.EPSG900913=$e,Fe.EPSG4326=TA,Fe.Simple=oW;var vi=Z.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(d){return d.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(d){return d&&d.removeLayer(this),this},getPane:function(d){return this._map.getPane(d?this.options[d]||d:this.options.pane)},addInteractiveTarget:function(d){return this._map._targets[l(d)]=this,this},removeInteractiveTarget:function(d){return delete this._map._targets[l(d)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(d){var _=d.target;if(_.hasLayer(this)){if(this._map=_,this._zoomAnimated=_._zoomAnimated,this.getEvents){var w=this.getEvents();_.on(w,this),this.once("remove",function(){_.off(w,this)},this)}this.onAdd(_),this.fire("add"),_.fire("layeradd",{layer:this})}}});ct.include({addLayer:function(d){if(!d._layerAdd)throw new Error("The provided object is not a Layer.");var _=l(d);return this._layers[_]?this:(this._layers[_]=d,d._mapToAdd=this,d.beforeAdd&&d.beforeAdd(this),this.whenReady(d._layerAdd,d),this)},removeLayer:function(d){var _=l(d);return this._layers[_]?(this._loaded&&d.onRemove(this),delete this._layers[_],this._loaded&&(this.fire("layerremove",{layer:d}),d.fire("remove")),d._map=d._mapToAdd=null,this):this},hasLayer:function(d){return l(d)in this._layers},eachLayer:function(d,_){for(var w in this._layers)d.call(_,this._layers[w]);return this},_addLayers:function(d){d=d?S(d)?d:[d]:[];for(var _=0,w=d.length;_this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&_[0]instanceof ue&&_[0].equals(_[w-1])&&_.pop(),_},_setLatLngs:function(d){Ma.prototype._setLatLngs.call(this,d),Bn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Bn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var d=this._renderer._bounds,_=this.options.weight,w=new V(_,_);if(d=new Y(d.min.subtract(w),d.max.add(w)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(d))){if(this.options.noClip){this._parts=this._rings;return}for(var P=0,R=this._rings.length,B;Pd.y!=R.y>d.y&&d.x<(R.x-P.x)*(d.y-P.y)/(R.y-P.y)+P.x&&(_=!_);return _||Ma.prototype._containsPoint.call(this,d,!0)}});function dW(d,_){return new _u(d,_)}var La=Ca.extend({initialize:function(d,_){g(this,_),this._layers={},d&&this.addData(d)},addData:function(d){var _=S(d)?d:d.features,w,P,R;if(_){for(w=0,P=_.length;w0&&R.push(R[0].slice()),R}function xu(d,_){return d.feature?i({},d.feature,{geometry:_}):rp(_)}function rp(d){return d.type==="Feature"||d.type==="FeatureCollection"?d:{type:"Feature",properties:{},geometry:d}}var V_={toGeoJSON:function(d){return xu(this,{type:"Point",coordinates:B_(this.getLatLng(),d)})}};Kd.include(V_),O_.include(V_),Qd.include(V_),Ma.include({toGeoJSON:function(d){var _=!Bn(this._latlngs),w=tp(this._latlngs,_?1:0,!1,d);return xu(this,{type:(_?"Multi":"")+"LineString",coordinates:w})}}),_u.include({toGeoJSON:function(d){var _=!Bn(this._latlngs),w=_&&!Bn(this._latlngs[0]),P=tp(this._latlngs,w?2:_?1:0,!0,d);return _||(P=[P]),xu(this,{type:(w?"Multi":"")+"Polygon",coordinates:P})}}),mu.include({toMultiPoint:function(d){var _=[];return this.eachLayer(function(w){_.push(w.toGeoJSON(d).geometry.coordinates)}),xu(this,{type:"MultiPoint",coordinates:_})},toGeoJSON:function(d){var _=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(_==="MultiPoint")return this.toMultiPoint(d);var w=_==="GeometryCollection",P=[];return this.eachLayer(function(R){if(R.toGeoJSON){var B=R.toGeoJSON(d);if(w)P.push(B.geometry);else{var U=rp(B);U.type==="FeatureCollection"?P.push.apply(P,U.features):P.push(U)}}}),w?xu(this,{geometries:P,type:"GeometryCollection"}):{type:"FeatureCollection",features:P}}});function LA(d,_){return new La(d,_)}var pW=LA,np=vi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(d,_,w){this._url=d,this._bounds=ie(_),g(this,w)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Je(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){It(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(d){return this.options.opacity=d,this._image&&this._updateOpacity(),this},setStyle:function(d){return d.opacity&&this.setOpacity(d.opacity),this},bringToFront:function(){return this._map&&pu(this._image),this},bringToBack:function(){return this._map&&gu(this._image),this},setUrl:function(d){return this._url=d,this._image&&(this._image.src=d),this},setBounds:function(d){return this._bounds=ie(d),this._map&&this._reset(),this},getEvents:function(){var d={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(d.zoomanim=this._animateZoom),d},setZIndex:function(d){return this.options.zIndex=d,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var d=this._url.tagName==="IMG",_=this._image=d?this._url:vt("img");if(Je(_,"leaflet-image-layer"),this._zoomAnimated&&Je(_,"leaflet-zoom-animated"),this.options.className&&Je(_,this.options.className),_.onselectstart=f,_.onmousemove=f,_.onload=o(this.fire,this,"load"),_.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(_.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),d){this._url=_.src;return}_.src=this._url,_.alt=this.options.alt},_animateZoom:function(d){var _=this._map.getZoomScale(d.zoom),w=this._map._latLngBoundsToNewLayerBounds(this._bounds,d.zoom,d.center).min;Ls(this._image,w,_)},_reset:function(){var d=this._image,_=new Y(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),w=_.getSize();Qt(d,_.min),d.style.width=w.x+"px",d.style.height=w.y+"px"},_updateOpacity:function(){zn(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var d=this.options.errorOverlayUrl;d&&this._url!==d&&(this._url=d,this._image.src=d)},getCenter:function(){return this._bounds.getCenter()}}),gW=function(d,_,w){return new np(d,_,w)},AA=np.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var d=this._url.tagName==="VIDEO",_=this._image=d?this._url:vt("video");if(Je(_,"leaflet-image-layer"),this._zoomAnimated&&Je(_,"leaflet-zoom-animated"),this.options.className&&Je(_,this.options.className),_.onselectstart=f,_.onmousemove=f,_.onloadeddata=o(this.fire,this,"load"),d){for(var w=_.getElementsByTagName("source"),P=[],R=0;R0?P:[_.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(_.style,"objectFit")&&(_.style.objectFit="fill"),_.autoplay=!!this.options.autoplay,_.loop=!!this.options.loop,_.muted=!!this.options.muted,_.playsInline=!!this.options.playsInline;for(var B=0;BR?(_.height=R+"px",Je(d,B)):Zt(d,B),this._containerWidth=this._container.offsetWidth},_animateZoom:function(d){var _=this._map._latLngToNewLayerPoint(this._latlng,d.zoom,d.center),w=this._getAnchor();Qt(this._container,_.add(w))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var d=this._map,_=parseInt(If(this._container,"marginBottom"),10)||0,w=this._container.offsetHeight+_,P=this._containerWidth,R=new V(this._containerLeft,-w-this._containerBottom);R._add(As(this._container));var B=d.layerPointToContainerPoint(R),U=H(this.options.autoPanPadding),Q=H(this.options.autoPanPaddingTopLeft||U),te=H(this.options.autoPanPaddingBottomRight||U),ae=d.getSize(),Le=0,je=0;B.x+P+te.x>ae.x&&(Le=B.x+P-ae.x+te.x),B.x-Le-Q.x<0&&(Le=B.x-Q.x),B.y+w+te.y>ae.y&&(je=B.y+w-ae.y+te.y),B.y-je-Q.y<0&&(je=B.y-Q.y),(Le||je)&&(this.options.keepInView&&(this._autopanning=!0),d.fire("autopanstart").panBy([Le,je]))}},_getAnchor:function(){return H(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),_W=function(d,_){return new ip(d,_)};ct.mergeOptions({closePopupOnClick:!0}),ct.include({openPopup:function(d,_,w){return this._initOverlay(ip,d,_,w).openOn(this),this},closePopup:function(d){return d=arguments.length?d:this._popup,d&&d.close(),this}}),vi.include({bindPopup:function(d,_){return this._popup=this._initOverlay(ip,this._popup,d,_),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(d){return this._popup&&(this instanceof Ca||(this._popup._source=this),this._popup._prepareOpen(d||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(d){return this._popup&&this._popup.setContent(d),this},getPopup:function(){return this._popup},_openPopup:function(d){if(!(!this._popup||!this._map)){Ds(d);var _=d.layer||d.target;if(this._popup._source===_&&!(_ instanceof yo)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(d.latlng);return}this._popup._source=_,this.openPopup(d.latlng)}},_movePopup:function(d){this._popup.setLatLng(d.latlng)},_onKeyPress:function(d){d.originalEvent.keyCode===13&&this._openPopup(d)}});var ap=Gi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(d){Gi.prototype.onAdd.call(this,d),this.setOpacity(this.options.opacity),d.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(d){Gi.prototype.onRemove.call(this,d),d.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var d=Gi.prototype.getEvents.call(this);return this.options.permanent||(d.preclick=this.close),d},_initLayout:function(){var d="leaflet-tooltip",_=d+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=vt("div",_),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(d){var _,w,P=this._map,R=this._container,B=P.latLngToContainerPoint(P.getCenter()),U=P.layerPointToContainerPoint(d),Q=this.options.direction,te=R.offsetWidth,ae=R.offsetHeight,Le=H(this.options.offset),je=this._getAnchor();Q==="top"?(_=te/2,w=ae):Q==="bottom"?(_=te/2,w=0):Q==="center"?(_=te/2,w=ae/2):Q==="right"?(_=0,w=ae/2):Q==="left"?(_=te,w=ae/2):U.xthis.options.maxZoom||wP?this._retainParent(R,B,U,P):!1)},_retainChildren:function(d,_,w,P){for(var R=2*d;R<2*d+2;R++)for(var B=2*_;B<2*_+2;B++){var U=new V(R,B);U.z=w+1;var Q=this._tileCoordsToKey(U),te=this._tiles[Q];if(te&&te.active){te.retain=!0;continue}else te&&te.loaded&&(te.retain=!0);w+1this.options.maxZoom||this.options.minZoom!==void 0&&R1){this._setView(d,w);return}for(var je=R.min.y;je<=R.max.y;je++)for(var nt=R.min.x;nt<=R.max.x;nt++){var Yr=new V(nt,je);if(Yr.z=this._tileZoom,!!this._isValidTile(Yr)){var gr=this._tiles[this._tileCoordsToKey(Yr)];gr?gr.current=!0:U.push(Yr)}}if(U.sort(function(sn,wu){return sn.distanceTo(B)-wu.distanceTo(B)}),U.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Vn=document.createDocumentFragment();for(nt=0;ntw.max.x)||!_.wrapLat&&(d.yw.max.y))return!1}if(!this.options.bounds)return!0;var P=this._tileCoordsToBounds(d);return ie(this.options.bounds).overlaps(P)},_keyToBounds:function(d){return this._tileCoordsToBounds(this._keyToTileCoords(d))},_tileCoordsToNwSe:function(d){var _=this._map,w=this.getTileSize(),P=d.scaleBy(w),R=P.add(w),B=_.unproject(P,d.z),U=_.unproject(R,d.z);return[B,U]},_tileCoordsToBounds:function(d){var _=this._tileCoordsToNwSe(d),w=new ne(_[0],_[1]);return this.options.noWrap||(w=this._map.wrapLatLngBounds(w)),w},_tileCoordsToKey:function(d){return d.x+":"+d.y+":"+d.z},_keyToTileCoords:function(d){var _=d.split(":"),w=new V(+_[0],+_[1]);return w.z=+_[2],w},_removeTile:function(d){var _=this._tiles[d];_&&(It(_.el),delete this._tiles[d],this.fire("tileunload",{tile:_.el,coords:this._keyToTileCoords(d)}))},_initTile:function(d){Je(d,"leaflet-tile");var _=this.getTileSize();d.style.width=_.x+"px",d.style.height=_.y+"px",d.onselectstart=f,d.onmousemove=f,Ne.ielt9&&this.options.opacity<1&&zn(d,this.options.opacity)},_addTile:function(d,_){var w=this._getTilePos(d),P=this._tileCoordsToKey(d),R=this.createTile(this._wrapCoords(d),o(this._tileReady,this,d));this._initTile(R),this.createTile.length<2&&E(o(this._tileReady,this,d,null,R)),Qt(R,w),this._tiles[P]={el:R,coords:d,current:!0},_.appendChild(R),this.fire("tileloadstart",{tile:R,coords:d})},_tileReady:function(d,_,w){_&&this.fire("tileerror",{error:_,tile:w,coords:d});var P=this._tileCoordsToKey(d);w=this._tiles[P],w&&(w.loaded=+new Date,this._map._fadeAnimated?(zn(w.el,0),z(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this)):(w.active=!0,this._pruneTiles()),_||(Je(w.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:w.el,coords:d})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ne.ielt9||!this._map._fadeAnimated?E(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(d){return d.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(d){var _=new V(this._wrapX?c(d.x,this._wrapX):d.x,this._wrapY?c(d.y,this._wrapY):d.y);return _.z=d.z,_},_pxBoundsToTileRange:function(d){var _=this.getTileSize();return new Y(d.min.unscaleBy(_).floor(),d.max.unscaleBy(_).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var d in this._tiles)if(!this._tiles[d].loaded)return!1;return!0}});function wW(d){return new Ff(d)}var Su=Ff.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(d,_){this._url=d,_=g(this,_),_.detectRetina&&Ne.retina&&_.maxZoom>0?(_.tileSize=Math.floor(_.tileSize/2),_.zoomReverse?(_.zoomOffset--,_.minZoom=Math.min(_.maxZoom,_.minZoom+1)):(_.zoomOffset++,_.maxZoom=Math.max(_.minZoom,_.maxZoom-1)),_.minZoom=Math.max(0,_.minZoom)):_.zoomReverse?_.minZoom=Math.min(_.maxZoom,_.minZoom):_.maxZoom=Math.max(_.minZoom,_.maxZoom),typeof _.subdomains=="string"&&(_.subdomains=_.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(d,_){return this._url===d&&_===void 0&&(_=!0),this._url=d,_||this.redraw(),this},createTile:function(d,_){var w=document.createElement("img");return Ke(w,"load",o(this._tileOnLoad,this,_,w)),Ke(w,"error",o(this._tileOnError,this,_,w)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(w.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(w.referrerPolicy=this.options.referrerPolicy),w.alt="",w.src=this.getTileUrl(d),w},getTileUrl:function(d){var _={r:Ne.retina?"@2x":"",s:this._getSubdomain(d),x:d.x,y:d.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var w=this._globalTileRange.max.y-d.y;this.options.tms&&(_.y=w),_["-y"]=w}return x(this._url,i(_,this.options))},_tileOnLoad:function(d,_){Ne.ielt9?setTimeout(o(d,this,null,_),0):d(null,_)},_tileOnError:function(d,_,w){var P=this.options.errorTileUrl;P&&_.getAttribute("src")!==P&&(_.src=P),d(w,_)},_onTileRemove:function(d){d.tile.onload=null},_getZoomForUrl:function(){var d=this._tileZoom,_=this.options.maxZoom,w=this.options.zoomReverse,P=this.options.zoomOffset;return w&&(d=_-d),d+P},_getSubdomain:function(d){var _=Math.abs(d.x+d.y)%this.options.subdomains.length;return this.options.subdomains[_]},_abortLoading:function(){var d,_;for(d in this._tiles)if(this._tiles[d].coords.z!==this._tileZoom&&(_=this._tiles[d].el,_.onload=f,_.onerror=f,!_.complete)){_.src=T;var w=this._tiles[d].coords;It(_),delete this._tiles[d],this.fire("tileabort",{tile:_,coords:w})}},_removeTile:function(d){var _=this._tiles[d];if(_)return _.el.setAttribute("src",T),Ff.prototype._removeTile.call(this,d)},_tileReady:function(d,_,w){if(!(!this._map||w&&w.getAttribute("src")===T))return Ff.prototype._tileReady.call(this,d,_,w)}});function kA(d,_){return new Su(d,_)}var IA=Su.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(d,_){this._url=d;var w=i({},this.defaultWmsParams);for(var P in _)P in this.options||(w[P]=_[P]);_=g(this,_);var R=_.detectRetina&&Ne.retina?2:1,B=this.getTileSize();w.width=B.x*R,w.height=B.y*R,this.wmsParams=w},onAdd:function(d){this._crs=this.options.crs||d.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var _=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[_]=this._crs.code,Su.prototype.onAdd.call(this,d)},getTileUrl:function(d){var _=this._tileCoordsToNwSe(d),w=this._crs,P=K(w.project(_[0]),w.project(_[1])),R=P.min,B=P.max,U=(this._wmsVersion>=1.3&&this._crs===TA?[R.y,R.x,B.y,B.x]:[R.x,R.y,B.x,B.y]).join(","),Q=Su.prototype.getTileUrl.call(this,d);return Q+m(this.wmsParams,Q,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+U},setParams:function(d,_){return i(this.wmsParams,d),_||this.redraw(),this}});function bW(d,_){return new IA(d,_)}Su.WMS=IA,kA.wms=bW;var Aa=vi.extend({options:{padding:.1},initialize:function(d){g(this,d),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Je(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var d={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(d.zoomanim=this._onAnimZoom),d},_onAnimZoom:function(d){this._updateTransform(d.center,d.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(d,_){var w=this._map.getZoomScale(_,this._zoom),P=this._map.getSize().multiplyBy(.5+this.options.padding),R=this._map.project(this._center,_),B=P.multiplyBy(-w).add(R).subtract(this._map._getNewPixelOrigin(d,_));Ne.any3d?Ls(this._container,B,w):Qt(this._container,B)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var d in this._layers)this._layers[d]._reset()},_onZoomEnd:function(){for(var d in this._layers)this._layers[d]._project()},_updatePaths:function(){for(var d in this._layers)this._layers[d]._update()},_update:function(){var d=this.options.padding,_=this._map.getSize(),w=this._map.containerPointToLayerPoint(_.multiplyBy(-d)).round();this._bounds=new Y(w,w.add(_.multiplyBy(1+d*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),EA=Aa.extend({options:{tolerance:0},getEvents:function(){var d=Aa.prototype.getEvents.call(this);return d.viewprereset=this._onViewPreReset,d},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Aa.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var d=this._container=document.createElement("canvas");Ke(d,"mousemove",this._onMouseMove,this),Ke(d,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ke(d,"mouseout",this._handleMouseOut,this),d._leaflet_disable_events=!0,this._ctx=d.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,It(this._container),Tt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var d;this._redrawBounds=null;for(var _ in this._layers)d=this._layers[_],d._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Aa.prototype._update.call(this);var d=this._bounds,_=this._container,w=d.getSize(),P=Ne.retina?2:1;Qt(_,d.min),_.width=P*w.x,_.height=P*w.y,_.style.width=w.x+"px",_.style.height=w.y+"px",Ne.retina&&this._ctx.scale(2,2),this._ctx.translate(-d.min.x,-d.min.y),this.fire("update")}},_reset:function(){Aa.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(d){this._updateDashArray(d),this._layers[l(d)]=d;var _=d._order={layer:d,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=_),this._drawLast=_,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(d){this._requestRedraw(d)},_removePath:function(d){var _=d._order,w=_.next,P=_.prev;w?w.prev=P:this._drawLast=P,P?P.next=w:this._drawFirst=w,delete d._order,delete this._layers[l(d)],this._requestRedraw(d)},_updatePath:function(d){this._extendRedrawBounds(d),d._project(),d._update(),this._requestRedraw(d)},_updateStyle:function(d){this._updateDashArray(d),this._requestRedraw(d)},_updateDashArray:function(d){if(typeof d.options.dashArray=="string"){var _=d.options.dashArray.split(/[, ]+/),w=[],P,R;for(R=0;R<_.length;R++){if(P=Number(_[R]),isNaN(P))return;w.push(P)}d.options._dashArray=w}else d.options._dashArray=d.options.dashArray},_requestRedraw:function(d){this._map&&(this._extendRedrawBounds(d),this._redrawRequest=this._redrawRequest||E(this._redraw,this))},_extendRedrawBounds:function(d){if(d._pxBounds){var _=(d.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Y,this._redrawBounds.extend(d._pxBounds.min.subtract([_,_])),this._redrawBounds.extend(d._pxBounds.max.add([_,_]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var d=this._redrawBounds;if(d){var _=d.getSize();this._ctx.clearRect(d.min.x,d.min.y,_.x,_.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var d,_=this._redrawBounds;if(this._ctx.save(),_){var w=_.getSize();this._ctx.beginPath(),this._ctx.rect(_.min.x,_.min.y,w.x,w.y),this._ctx.clip()}this._drawing=!0;for(var P=this._drawFirst;P;P=P.next)d=P.layer,(!_||d._pxBounds&&d._pxBounds.intersects(_))&&d._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(d,_){if(this._drawing){var w,P,R,B,U=d._parts,Q=U.length,te=this._ctx;if(Q){for(te.beginPath(),w=0;w')}}catch{}return function(d){return document.createElement("<"+d+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),TW={_initContainer:function(){this._container=vt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Aa.prototype._update.call(this),this.fire("update"))},_initPath:function(d){var _=d._container=jf("shape");Je(_,"leaflet-vml-shape "+(this.options.className||"")),_.coordsize="1 1",d._path=jf("path"),_.appendChild(d._path),this._updateStyle(d),this._layers[l(d)]=d},_addPath:function(d){var _=d._container;this._container.appendChild(_),d.options.interactive&&d.addInteractiveTarget(_)},_removePath:function(d){var _=d._container;It(_),d.removeInteractiveTarget(_),delete this._layers[l(d)]},_updateStyle:function(d){var _=d._stroke,w=d._fill,P=d.options,R=d._container;R.stroked=!!P.stroke,R.filled=!!P.fill,P.stroke?(_||(_=d._stroke=jf("stroke")),R.appendChild(_),_.weight=P.weight+"px",_.color=P.color,_.opacity=P.opacity,P.dashArray?_.dashStyle=S(P.dashArray)?P.dashArray.join(" "):P.dashArray.replace(/( *, *)/g," "):_.dashStyle="",_.endcap=P.lineCap.replace("butt","flat"),_.joinstyle=P.lineJoin):_&&(R.removeChild(_),d._stroke=null),P.fill?(w||(w=d._fill=jf("fill")),R.appendChild(w),w.color=P.fillColor||P.color,w.opacity=P.fillOpacity):w&&(R.removeChild(w),d._fill=null)},_updateCircle:function(d){var _=d._point.round(),w=Math.round(d._radius),P=Math.round(d._radiusY||w);this._setPath(d,d._empty()?"M0 0":"AL "+_.x+","+_.y+" "+w+","+P+" 0,"+65535*360)},_setPath:function(d,_){d._path.v=_},_bringToFront:function(d){pu(d._container)},_bringToBack:function(d){gu(d._container)}},op=Ne.vml?jf:rt,Gf=Aa.extend({_initContainer:function(){this._container=op("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=op("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){It(this._container),Tt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Aa.prototype._update.call(this);var d=this._bounds,_=d.getSize(),w=this._container;(!this._svgSize||!this._svgSize.equals(_))&&(this._svgSize=_,w.setAttribute("width",_.x),w.setAttribute("height",_.y)),Qt(w,d.min),w.setAttribute("viewBox",[d.min.x,d.min.y,_.x,_.y].join(" ")),this.fire("update")}},_initPath:function(d){var _=d._path=op("path");d.options.className&&Je(_,d.options.className),d.options.interactive&&Je(_,"leaflet-interactive"),this._updateStyle(d),this._layers[l(d)]=d},_addPath:function(d){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(d._path),d.addInteractiveTarget(d._path)},_removePath:function(d){It(d._path),d.removeInteractiveTarget(d._path),delete this._layers[l(d)]},_updatePath:function(d){d._project(),d._update()},_updateStyle:function(d){var _=d._path,w=d.options;_&&(w.stroke?(_.setAttribute("stroke",w.color),_.setAttribute("stroke-opacity",w.opacity),_.setAttribute("stroke-width",w.weight),_.setAttribute("stroke-linecap",w.lineCap),_.setAttribute("stroke-linejoin",w.lineJoin),w.dashArray?_.setAttribute("stroke-dasharray",w.dashArray):_.removeAttribute("stroke-dasharray"),w.dashOffset?_.setAttribute("stroke-dashoffset",w.dashOffset):_.removeAttribute("stroke-dashoffset")):_.setAttribute("stroke","none"),w.fill?(_.setAttribute("fill",w.fillColor||w.color),_.setAttribute("fill-opacity",w.fillOpacity),_.setAttribute("fill-rule",w.fillRule||"evenodd")):_.setAttribute("fill","none"))},_updatePoly:function(d,_){this._setPath(d,ut(d._parts,_))},_updateCircle:function(d){var _=d._point,w=Math.max(Math.round(d._radius),1),P=Math.max(Math.round(d._radiusY),1)||w,R="a"+w+","+P+" 0 1,0 ",B=d._empty()?"M0 0":"M"+(_.x-w)+","+_.y+R+w*2+",0 "+R+-w*2+",0 ";this._setPath(d,B)},_setPath:function(d,_){d._path.setAttribute("d",_)},_bringToFront:function(d){pu(d._path)},_bringToBack:function(d){gu(d._path)}});Ne.vml&&Gf.include(TW);function NA(d){return Ne.svg||Ne.vml?new Gf(d):null}ct.include({getRenderer:function(d){var _=d.options.renderer||this._getPaneRenderer(d.options.pane)||this.options.renderer||this._renderer;return _||(_=this._renderer=this._createRenderer()),this.hasLayer(_)||this.addLayer(_),_},_getPaneRenderer:function(d){if(d==="overlayPane"||d===void 0)return!1;var _=this._paneRenderers[d];return _===void 0&&(_=this._createRenderer({pane:d}),this._paneRenderers[d]=_),_},_createRenderer:function(d){return this.options.preferCanvas&&RA(d)||NA(d)}});var OA=_u.extend({initialize:function(d,_){_u.prototype.initialize.call(this,this._boundsToLatLngs(d),_)},setBounds:function(d){return this.setLatLngs(this._boundsToLatLngs(d))},_boundsToLatLngs:function(d){return d=ie(d),[d.getSouthWest(),d.getNorthWest(),d.getNorthEast(),d.getSouthEast()]}});function CW(d,_){return new OA(d,_)}Gf.create=op,Gf.pointsToPath=ut,La.geometryToLayer=Jd,La.coordsToLatLng=z_,La.coordsToLatLngs=ep,La.latLngToCoords=B_,La.latLngsToCoords=tp,La.getFeature=xu,La.asFeature=rp,ct.mergeOptions({boxZoom:!0});var zA=ji.extend({initialize:function(d){this._map=d,this._container=d._container,this._pane=d._panes.overlayPane,this._resetStateTimeout=0,d.on("unload",this._destroy,this)},addHooks:function(){Ke(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Tt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){It(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(d){if(!d.shiftKey||d.which!==1&&d.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Ef(),x_(),this._startPoint=this._map.mouseEventToContainerPoint(d),Ke(document,{contextmenu:Ds,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(d){this._moved||(this._moved=!0,this._box=vt("div","leaflet-zoom-box",this._container),Je(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(d);var _=new Y(this._point,this._startPoint),w=_.getSize();Qt(this._box,_.min),this._box.style.width=w.x+"px",this._box.style.height=w.y+"px"},_finish:function(){this._moved&&(It(this._box),Zt(this._container,"leaflet-crosshair")),Rf(),S_(),Tt(document,{contextmenu:Ds,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(d){if(!(d.which!==1&&d.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var _=new ne(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(_).fire("boxzoomend",{boxZoomBounds:_})}},_onKeyDown:function(d){d.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ct.addInitHook("addHandler","boxZoom",zA),ct.mergeOptions({doubleClickZoom:!0});var BA=ji.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(d){var _=this._map,w=_.getZoom(),P=_.options.zoomDelta,R=d.originalEvent.shiftKey?w-P:w+P;_.options.doubleClickZoom==="center"?_.setZoom(R):_.setZoomAround(d.containerPoint,R)}});ct.addInitHook("addHandler","doubleClickZoom",BA),ct.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var VA=ji.extend({addHooks:function(){if(!this._draggable){var d=this._map;this._draggable=new mo(d._mapPane,d._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),d.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),d.on("zoomend",this._onZoomEnd,this),d.whenReady(this._onZoomEnd,this))}Je(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Zt(this._map._container,"leaflet-grab"),Zt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var d=this._map;if(d._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var _=ie(this._map.options.maxBounds);this._offsetLimit=K(this._map.latLngToContainerPoint(_.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(_.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;d.fire("movestart").fire("dragstart"),d.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(d){if(this._map.options.inertia){var _=this._lastTime=+new Date,w=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(w),this._times.push(_),this._prunePositions(_)}this._map.fire("move",d).fire("drag",d)},_prunePositions:function(d){for(;this._positions.length>1&&d-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var d=this._map.getSize().divideBy(2),_=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=_.subtract(d).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(d,_){return d-(d-_)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var d=this._draggable._newPos.subtract(this._draggable._startPos),_=this._offsetLimit;d.x<_.min.x&&(d.x=this._viscousLimit(d.x,_.min.x)),d.y<_.min.y&&(d.y=this._viscousLimit(d.y,_.min.y)),d.x>_.max.x&&(d.x=this._viscousLimit(d.x,_.max.x)),d.y>_.max.y&&(d.y=this._viscousLimit(d.y,_.max.y)),this._draggable._newPos=this._draggable._startPos.add(d)}},_onPreDragWrap:function(){var d=this._worldWidth,_=Math.round(d/2),w=this._initialWorldOffset,P=this._draggable._newPos.x,R=(P-_+w)%d+_-w,B=(P+_+w)%d-_-w,U=Math.abs(R+w)0?B:-B))-_;this._delta=0,this._startTime=null,U&&(d.options.scrollWheelZoom==="center"?d.setZoom(_+U):d.setZoomAround(this._lastMousePos,_+U))}});ct.addInitHook("addHandler","scrollWheelZoom",jA);var MW=600;ct.mergeOptions({tapHold:Ne.touchNative&&Ne.safari&&Ne.mobile,tapTolerance:15});var GA=ji.extend({addHooks:function(){Ke(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Tt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(d){if(clearTimeout(this._holdTimeout),d.touches.length===1){var _=d.touches[0];this._startPos=this._newPos=new V(_.clientX,_.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(Ke(document,"touchend",Cr),Ke(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",_))},this),MW),Ke(document,"touchend touchcancel contextmenu",this._cancel,this),Ke(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function d(){Tt(document,"touchend",Cr),Tt(document,"touchend touchcancel",d)},_cancel:function(){clearTimeout(this._holdTimeout),Tt(document,"touchend touchcancel contextmenu",this._cancel,this),Tt(document,"touchmove",this._onMove,this)},_onMove:function(d){var _=d.touches[0];this._newPos=new V(_.clientX,_.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(d,_){var w=new MouseEvent(d,{bubbles:!0,cancelable:!0,view:window,screenX:_.screenX,screenY:_.screenY,clientX:_.clientX,clientY:_.clientY});w._simulated=!0,_.target.dispatchEvent(w)}});ct.addInitHook("addHandler","tapHold",GA),ct.mergeOptions({touchZoom:Ne.touch,bounceAtZoomLimits:!0});var HA=ji.extend({addHooks:function(){Je(this._map._container,"leaflet-touch-zoom"),Ke(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Zt(this._map._container,"leaflet-touch-zoom"),Tt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(d){var _=this._map;if(!(!d.touches||d.touches.length!==2||_._animatingZoom||this._zooming)){var w=_.mouseEventToContainerPoint(d.touches[0]),P=_.mouseEventToContainerPoint(d.touches[1]);this._centerPoint=_.getSize()._divideBy(2),this._startLatLng=_.containerPointToLatLng(this._centerPoint),_.options.touchZoom!=="center"&&(this._pinchStartLatLng=_.containerPointToLatLng(w.add(P)._divideBy(2))),this._startDist=w.distanceTo(P),this._startZoom=_.getZoom(),this._moved=!1,this._zooming=!0,_._stop(),Ke(document,"touchmove",this._onTouchMove,this),Ke(document,"touchend touchcancel",this._onTouchEnd,this),Cr(d)}},_onTouchMove:function(d){if(!(!d.touches||d.touches.length!==2||!this._zooming)){var _=this._map,w=_.mouseEventToContainerPoint(d.touches[0]),P=_.mouseEventToContainerPoint(d.touches[1]),R=w.distanceTo(P)/this._startDist;if(this._zoom=_.getScaleZoom(R,this._startZoom),!_.options.bounceAtZoomLimits&&(this._zoom<_.getMinZoom()&&R<1||this._zoom>_.getMaxZoom()&&R>1)&&(this._zoom=_._limitZoom(this._zoom)),_.options.touchZoom==="center"){if(this._center=this._startLatLng,R===1)return}else{var B=w._add(P)._divideBy(2)._subtract(this._centerPoint);if(R===1&&B.x===0&&B.y===0)return;this._center=_.unproject(_.project(this._pinchStartLatLng,this._zoom).subtract(B),this._zoom)}this._moved||(_._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var U=o(_._move,_,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=E(U,this,!0),Cr(d)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,z(this._animRequest),Tt(document,"touchmove",this._onTouchMove,this),Tt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ct.addInitHook("addHandler","touchZoom",HA),ct.BoxZoom=zA,ct.DoubleClickZoom=BA,ct.Drag=VA,ct.Keyboard=FA,ct.ScrollWheelZoom=jA,ct.TapHold=GA,ct.TouchZoom=HA,r.Bounds=Y,r.Browser=Ne,r.CRS=Fe,r.Canvas=EA,r.Circle=O_,r.CircleMarker=Qd,r.Class=F,r.Control=hi,r.DivIcon=DA,r.DivOverlay=Gi,r.DomEvent=W8,r.DomUtil=G8,r.Draggable=mo,r.Evented=Z,r.FeatureGroup=Ca,r.GeoJSON=La,r.GridLayer=Ff,r.Handler=ji,r.Icon=yu,r.ImageOverlay=np,r.LatLng=ue,r.LatLngBounds=ne,r.Layer=vi,r.LayerGroup=mu,r.LineUtil=nW,r.Map=ct,r.Marker=Kd,r.Mixin=K8,r.Path=yo,r.Point=V,r.PolyUtil=Q8,r.Polygon=_u,r.Polyline=Ma,r.Popup=ip,r.PosAnimation=hA,r.Projection=iW,r.Rectangle=OA,r.Renderer=Aa,r.SVG=Gf,r.SVGOverlay=PA,r.TileLayer=Su,r.Tooltip=ap,r.Transformation=he,r.Util=O,r.VideoOverlay=AA,r.bind=o,r.bounds=K,r.canvas=RA,r.circle=hW,r.circleMarker=fW,r.control=zf,r.divIcon=SW,r.extend=i,r.featureGroup=lW,r.geoJSON=LA,r.geoJson=pW,r.gridLayer=wW,r.icon=uW,r.imageOverlay=gW,r.latLng=de,r.latLngBounds=ie,r.layerGroup=sW,r.map=U8,r.marker=cW,r.point=H,r.polygon=dW,r.polyline=vW,r.popup=_W,r.rectangle=CW,r.setOptions=g,r.stamp=l,r.svg=NA,r.svgOverlay=yW,r.tileLayer=kA,r.tooltip=xW,r.transformation=Me,r.version=n,r.videoOverlay=mW;var LW=window.L;r.noConflict=function(){return window.L=LW,this},window.L=r})})(QT,QT.exports);var hu=QT.exports;const u8=eC(hu);function Hd(t,e,r){return Object.freeze({instance:t,context:e,container:r})}function jL(t,e){return e==null?function(n,i){const a=q.useRef();return a.current||(a.current=t(n,i)),a}:function(n,i){const a=q.useRef();a.current||(a.current=t(n,i));const o=q.useRef(n),{instance:s}=a.current;return q.useEffect(function(){o.current!==n&&(e(s,n,o.current),o.current=n)},[s,n,i]),a}}function c8(t,e){q.useEffect(function(){return(e.layerContainer??e.map).addLayer(t.instance),function(){var a;(a=e.layerContainer)==null||a.removeLayer(t.instance),e.map.removeLayer(t.instance)}},[e,t])}function $me(t){return function(r){const n=c_(),i=t(f_(r,n),n);return a8(n.map,r.attribution),FL(i.current,r.eventHandlers),c8(i.current,n),i}}function Yme(t,e){const r=q.useRef();q.useEffect(function(){if(e.pathOptions!==r.current){const i=e.pathOptions??{};t.instance.setStyle(i),r.current=i}},[t,e])}function Xme(t){return function(r){const n=c_(),i=t(f_(r,n),n);return FL(i.current,r.eventHandlers),c8(i.current,n),Yme(i.current,r),i}}function f8(t,e){const r=jL(t),n=Zme(r,e);return Wme(n)}function h8(t,e){const r=jL(t,e),n=Xme(r);return Hme(n)}function qme(t,e){const r=jL(t,e),n=$me(r);return Ume(n)}function Kme(t,e,r){const{opacity:n,zIndex:i}=e;n!=null&&n!==r.opacity&&t.setOpacity(n),i!=null&&i!==r.zIndex&&t.setZIndex(i)}function Qme(){return c_().map}const Jme=h8(function({center:e,children:r,...n},i){const a=new hu.CircleMarker(e,n);return Hd(a,o8(i,{overlayContainer:a}))},Fme);function JT(){return JT=Object.assign||function(t){for(var e=1;e(v==null?void 0:v.map)??null,[v]);const g=q.useCallback(y=>{if(y!==null&&v===null){const x=new hu.Map(y,c);r!=null&&u!=null?x.setView(r,u):t!=null&&x.fitBounds(t,e),l!=null&&x.whenReady(l),p(Gme(x))}},[]);q.useEffect(()=>()=>{v==null||v.map.remove()},[v]);const m=v?Ec.createElement(l8,{value:v},n):o??null;return Ec.createElement("div",JT({},h,{ref:g}),m)}const tye=q.forwardRef(eye),rye=h8(function({positions:e,...r},n){const i=new hu.Polyline(e,r);return Hd(i,o8(n,{overlayContainer:i}))},function(e,r,n){r.positions!==n.positions&&e.setLatLngs(r.positions)}),nye=f8(function(e,r){const n=new hu.Popup(e,r.overlayContainer);return Hd(n,r)},function(e,r,{position:n},i){q.useEffect(function(){const{instance:o}=e;function s(u){u.popup===o&&(o.update(),i(!0))}function l(u){u.popup===o&&i(!1)}return r.map.on({popupopen:s,popupclose:l}),r.overlayContainer==null?(n!=null&&o.setLatLng(n),o.openOn(r.map)):r.overlayContainer.bindPopup(o),function(){var c;r.map.off({popupopen:s,popupclose:l}),(c=r.overlayContainer)==null||c.unbindPopup(),r.map.removeLayer(o)}},[e,r,i,n])}),iye=qme(function({url:e,...r},n){const i=new hu.TileLayer(e,f_(r,n));return Hd(i,n)},function(e,r,n){Kme(e,r,n);const{url:i}=r;i!=null&&i!==n.url&&e.setUrl(i)}),aye=f8(function(e,r){const n=new hu.Tooltip(e,r.overlayContainer);return Hd(n,r)},function(e,r,{position:n},i){q.useEffect(function(){const o=r.overlayContainer;if(o==null)return;const{instance:s}=e,l=c=>{c.tooltip===s&&(n!=null&&s.setLatLng(n),s.update(),i(!0))},u=c=>{c.tooltip===s&&i(!1)};return o.on({tooltipopen:l,tooltipclose:u}),o.bindTooltip(s),function(){o.off({tooltipopen:l,tooltipclose:u}),o._map!=null&&o.unbindTooltip()}},[e,r,i,n])}),oye="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=",sye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",lye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC";delete u8.Icon.Default.prototype._getIconUrl;u8.Icon.Default.mergeOptions({iconUrl:oye,iconRetinaUrl:sye,shadowUrl:lye});const Yz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],uye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function cye(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function fye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function hye(t){if(!t)return"Unknown";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function vye({bounds:t}){const e=Qme();return q.useEffect(()=>{t&&e.fitBounds(t,{padding:[50,50]})},[e,t]),null}function dye({node:t}){const e=t.latitude!==null&&t.longitude!==null,r=t.battery_level!==null?t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`:"Unknown";return A.jsxs("div",{className:"min-w-[200px]",children:[A.jsx("div",{className:"font-semibold text-slate-800",children:t.short_name}),A.jsx("div",{className:"text-xs text-slate-600 mb-2",children:t.long_name}),A.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[A.jsx("div",{className:"text-slate-500",children:"Role"}),A.jsx("div",{className:"text-slate-700 font-medium",children:t.role}),A.jsx("div",{className:"text-slate-500",children:"Hardware"}),A.jsx("div",{className:"text-slate-700",children:t.hardware||"Unknown"}),A.jsx("div",{className:"text-slate-500",children:"Battery"}),A.jsx("div",{className:"text-slate-700",children:r}),A.jsx("div",{className:"text-slate-500",children:"Last Heard"}),A.jsx("div",{className:"text-slate-700",children:hye(t.last_heard)})]}),e&&A.jsxs("div",{className:"mt-3 pt-2 border-t border-slate-200 flex gap-2",children:[A.jsxs("a",{href:`https://www.google.com/maps?q=${t.latitude},${t.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[A.jsx(Zm,{size:10}),"Google Maps"]}),A.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[A.jsx(Zm,{size:10}),"OSM"]})]})]})}function pye({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=q.useMemo(()=>t.filter(f=>f.latitude!==null&&f.longitude!==null),[t]),a=t.length-i.length,o=q.useMemo(()=>new Map(i.map(f=>[f.node_num,f])),[i]),s=q.useMemo(()=>e.filter(f=>o.has(f.from_node)&&o.has(f.to_node)),[e,o]),l=q.useMemo(()=>{if(i.length===0)return null;const f=i.map(v=>v.latitude),h=i.map(v=>v.longitude);return[[Math.min(...f),Math.min(...h)],[Math.max(...f),Math.max(...h)]]},[i]),u=[43.6,-114.4],c=q.useMemo(()=>{const f=new Set;return r!==null&&e.forEach(h=>{h.from_node===r&&f.add(h.to_node),h.to_node===r&&f.add(h.from_node)}),f},[r,e]);return A.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[A.jsxs(tye,{center:u,zoom:7,style:{width:"100%",height:"540px"},className:"z-0",children:[A.jsx(iye,{url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'© OpenStreetMap, © CARTO'}),A.jsx(vye,{bounds:l}),s.map((f,h)=>{const v=o.get(f.from_node),p=o.get(f.to_node),g=r===null||f.from_node===r||f.to_node===r;return A.jsx(rye,{positions:[[v.latitude,v.longitude],[p.latitude,p.longitude]],color:cye(f.snr),weight:g&&r!==null?2.5:1.5,opacity:r===null?.3:g?.6:.08},h)}),i.map(f=>{const h=f.node_num===r,v=c.has(f.node_num),p=r===null||h||v,g=uye.includes(f.role),m=fye(f.latitude),y=Yz[m%Yz.length];return A.jsxs(Jme,{center:[f.latitude,f.longitude],radius:g?8:5,fillColor:g?y:"#111827",fillOpacity:p?.9:.2,stroke:!0,color:h?"#ffffff":y,weight:h?3:g?0:2,opacity:p?1:.3,eventHandlers:{click:()=>n(h?null:f.node_num)},children:[A.jsx(aye,{direction:"top",offset:[0,-8],children:A.jsx("span",{className:"font-mono text-xs",children:f.short_name})}),A.jsx(nye,{children:A.jsx(dye,{node:f})})]},f.node_num)})]}),A.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2 text-xs text-slate-400 flex items-center gap-2",children:[A.jsx(I3,{size:12}),A.jsxs("span",{children:["Showing ",i.length," of ",t.length," nodes",a>0&&A.jsxs("span",{className:"text-slate-500",children:[" (",a," without coordinates)"]})]})]})]})}const Xz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],gye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function qz(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function mye(t){return t>12?"excellent":t>8?"good":t>5?"fair":t>3?"marginal":"poor"}function yye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function _ye(t){return["Northern ID","Central ID","SW Idaho","SC Idaho"][t]||"Unknown"}function xye(t){if(!t)return"Unknown";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Sye(t){if(!t)return"bg-slate-500";const e=new Date(t),n=(new Date().getTime()-e.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function wye({node:t,edges:e,nodes:r,onSelectNode:n}){const i=q.useMemo(()=>{if(!t)return[];const f=new Map(r.map(v=>[v.node_num,v])),h=[];return e.forEach(v=>{if(v.from_node===t.node_num){const p=f.get(v.to_node);p&&h.push({node:p,snr:v.snr,quality:v.quality})}else if(v.to_node===t.node_num){const p=f.get(v.from_node);p&&h.push({node:p,snr:v.snr,quality:v.quality})}}),h.sort((v,p)=>p.snr-v.snr)},[t,e,r]);if(!t)return A.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border p-4 flex flex-col items-center justify-center h-[540px]",children:[A.jsx("div",{className:"w-12 h-12 rounded-full bg-bg-hover border border-border flex items-center justify-center mb-3",children:A.jsx(x0,{size:24,className:"text-slate-500"})}),A.jsx("p",{className:"text-sm text-slate-500 text-center",children:"Click a node to inspect"})]});const a=gye.includes(t.role),o=yye(t.latitude),s=Xz[o%Xz.length],l=t.latitude!==null&&t.longitude!==null,u=t.battery_level!==null?t.battery_level>100||t.voltage&&t.voltage>4.1?"USB":`${t.battery_level.toFixed(0)}%`:"—",c=t.battery_level!==null&&(t.battery_level>100||t.voltage&&t.voltage>4.1);return A.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border flex flex-col h-[540px] overflow-hidden",children:[A.jsxs("div",{className:"p-4 border-b border-border",children:[A.jsx("div",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-mono mb-2",style:{backgroundColor:`${s}20`,color:s},children:t.node_id_hex}),A.jsx("div",{className:"font-mono text-lg text-slate-100",children:t.short_name}),A.jsx("div",{className:"text-xs text-slate-500 truncate",children:t.long_name})]}),A.jsxs("div",{className:"p-4 border-b border-border grid grid-cols-2 gap-3",children:[A.jsxs("div",{children:[A.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Role"}),A.jsx("div",{className:`text-sm font-medium ${a?"text-cyan-400":"text-slate-300"}`,children:t.role})]}),A.jsxs("div",{children:[A.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Region"}),A.jsx("div",{className:"text-sm text-slate-300",children:_ye(o)})]}),A.jsxs("div",{children:[A.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Battery"}),A.jsxs("div",{className:"text-sm text-slate-300 flex items-center gap-1",children:[c&&A.jsx(R3,{size:12,className:"text-amber-400"}),u]})]}),A.jsxs("div",{children:[A.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Status"}),A.jsxs("div",{className:"flex items-center gap-1.5",children:[A.jsx("div",{className:`w-2 h-2 rounded-full ${Sye(t.last_heard)}`}),A.jsx("span",{className:"text-sm text-slate-300",children:xye(t.last_heard)})]})]}),A.jsxs("div",{className:"col-span-2",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Hardware"}),A.jsx("div",{className:"text-sm text-slate-300 font-mono truncate",children:t.hardware||"Unknown"})]})]}),l&&A.jsxs("div",{className:"px-4 py-3 border-b border-border flex gap-3",children:[A.jsxs("a",{href:`https://www.google.com/maps?q=${t.latitude},${t.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[A.jsx(Zm,{size:10}),"Google Maps"]}),A.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[A.jsx(Zm,{size:10}),"OSM"]})]}),A.jsxs("div",{className:"flex-1 overflow-y-auto",children:[A.jsxs("div",{className:"px-4 py-2 text-xs text-slate-500 font-medium sticky top-0 bg-bg-card border-b border-border",children:["Neighbors (",i.length,")"]}),i.length>0?A.jsx("div",{className:"divide-y divide-border",children:i.map(f=>A.jsxs("button",{onClick:()=>n(f.node.node_num),className:"w-full px-4 py-2 text-left hover:bg-bg-hover transition-colors flex items-center gap-2",style:{borderLeftWidth:3,borderLeftColor:qz(f.snr)},children:[A.jsxs("div",{className:"flex-1 min-w-0",children:[A.jsx("div",{className:"text-sm text-slate-200 font-mono truncate",children:f.node.short_name}),A.jsx("div",{className:"text-xs text-slate-500 truncate",children:f.node.long_name})]}),A.jsxs("div",{className:"text-right flex-shrink-0",children:[A.jsxs("div",{className:"text-xs font-mono",style:{color:qz(f.snr)},children:[f.snr.toFixed(1)," dB"]}),A.jsx("div",{className:"text-xs text-slate-500",children:mye(f.snr)})]})]},f.node.node_num))}):A.jsx("div",{className:"px-4 py-6 text-center text-sm text-slate-500",children:"No known neighbors"})]})]})}const Kz=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function bye(t){if(!t)return"bg-slate-500";const e=new Date(t),n=(new Date().getTime()-e.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function Tye(t){if(!t)return"—";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Cye(t){return t.battery_level===null?"—":t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`}function Qz(t){return t===null?"—":t>46?"Northern":t>44.5?"Central":t>43?"SW Idaho":"SC Idaho"}function Mye({nodes:t,selectedNodeId:e,onSelectNode:r}){const[n,i]=q.useState(""),[a,o]=q.useState("short_name"),[s,l]=q.useState("asc"),[u,c]=q.useState("all"),f=q.useMemo(()=>{let p=[...t];if(u==="infra"?p=p.filter(g=>Kz.includes(g.role)):u==="online"&&(p=p.filter(g=>{if(!g.last_heard)return!1;const m=new Date(g.last_heard);return(new Date().getTime()-m.getTime())/36e5<1})),n){const g=n.toLowerCase();p=p.filter(m=>m.short_name.toLowerCase().includes(g)||m.long_name.toLowerCase().includes(g)||m.role.toLowerCase().includes(g)||Qz(m.latitude).toLowerCase().includes(g))}return p.sort((g,m)=>{let y="",x="";switch(a){case"short_name":y=g.short_name.toLowerCase(),x=m.short_name.toLowerCase();break;case"role":y=g.role,x=m.role;break;case"battery_level":y=g.battery_level??-1,x=m.battery_level??-1;break;case"last_heard":y=g.last_heard?new Date(g.last_heard).getTime():0,x=m.last_heard?new Date(m.last_heard).getTime():0;break;case"hardware":y=g.hardware.toLowerCase(),x=m.hardware.toLowerCase();break}return yx?s==="asc"?1:-1:0}),p},[t,n,a,s,u]),h=p=>{a===p?l(s==="asc"?"desc":"asc"):(o(p),l("asc"))},v=({field:p})=>a!==p?null:s==="asc"?A.jsx(wZ,{size:14,className:"inline ml-1"}):A.jsx(JC,{size:14,className:"inline ml-1"});return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg overflow-hidden",children:[A.jsxs("div",{className:"p-3 border-b border-border flex items-center gap-3",children:[A.jsxs("div",{className:"relative flex-1 max-w-xs",children:[A.jsx(OZ,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),A.jsx("input",{type:"text",placeholder:"Search nodes...",value:n,onChange:p=>i(p.target.value),className:"w-full pl-9 pr-3 py-1.5 bg-bg-hover border border-border rounded text-sm text-slate-200 placeholder-slate-500 focus:outline-none focus:border-accent"})]}),A.jsxs("div",{className:"flex items-center gap-1",children:[A.jsx(D3,{size:14,className:"text-slate-500 mr-1"}),["all","infra","online"].map(p=>A.jsx("button",{onClick:()=>c(p),className:`px-2 py-1 text-xs rounded transition-colors ${u===p?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:p==="all"?"All":p==="infra"?"Infra":"Online"},p))]}),A.jsxs("div",{className:"text-xs text-slate-500 ml-auto",children:[f.length," of ",t.length," nodes"]})]}),A.jsxs("div",{className:"overflow-x-auto",children:[A.jsxs("table",{className:"w-full text-sm",children:[A.jsx("thead",{children:A.jsxs("tr",{className:"bg-bg-hover text-slate-400 text-xs",children:[A.jsx("th",{className:"w-8 px-3 py-2"}),A.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("short_name"),children:["Name ",A.jsx(v,{field:"short_name"})]}),A.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("role"),children:["Role ",A.jsx(v,{field:"role"})]}),A.jsx("th",{className:"px-3 py-2 text-left",children:"Region"}),A.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("battery_level"),children:["Battery ",A.jsx(v,{field:"battery_level"})]}),A.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("last_heard"),children:["Last Heard ",A.jsx(v,{field:"last_heard"})]}),A.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("hardware"),children:["Hardware ",A.jsx(v,{field:"hardware"})]})]})}),A.jsx("tbody",{className:"divide-y divide-border",children:f.slice(0,100).map(p=>{const g=Kz.includes(p.role),m=p.node_num===e;return A.jsxs("tr",{onClick:()=>r(p.node_num),className:`cursor-pointer transition-colors ${m?"bg-accent/10":"hover:bg-bg-hover"}`,children:[A.jsx("td",{className:"px-3 py-2",children:A.jsx("div",{className:`w-2 h-2 rounded-full ${bye(p.last_heard)}`})}),A.jsxs("td",{className:"px-3 py-2",children:[A.jsx("div",{className:"font-mono text-slate-200",children:p.short_name}),A.jsx("div",{className:"text-xs text-slate-500 truncate max-w-[200px]",children:p.long_name})]}),A.jsx("td",{className:"px-3 py-2",children:A.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded text-xs font-medium ${g?"bg-cyan-500/20 text-cyan-400":"bg-slate-500/20 text-slate-400"}`,children:p.role})}),A.jsx("td",{className:"px-3 py-2 text-slate-400",children:Qz(p.latitude)}),A.jsx("td",{className:"px-3 py-2 font-mono text-slate-300",children:Cye(p)}),A.jsx("td",{className:"px-3 py-2 text-slate-400",children:Tye(p.last_heard)}),A.jsx("td",{className:"px-3 py-2 font-mono text-xs text-slate-400 truncate max-w-[150px]",children:p.hardware||"—"})]},p.node_num)})})]}),f.length>100&&A.jsxs("div",{className:"px-3 py-2 text-xs text-slate-500 text-center border-t border-border",children:["Showing first 100 of ",f.length," nodes"]}),f.length===0&&A.jsx("div",{className:"px-3 py-8 text-sm text-slate-500 text-center",children:"No nodes match your filters"})]})]})}function Lye(){const[t,e]=q.useState([]),[r,n]=q.useState([]),[i,a]=q.useState([]),[o,s]=q.useState(null),[l,u]=q.useState("topo"),[c,f]=q.useState(!0),[h,v]=q.useState(null);q.useEffect(()=>{Promise.all([HZ(),WZ(),r$()]).then(([m,y,x])=>{e(m),n(y),a(x),f(!1)}).catch(m=>{v(m.message),f(!1)})},[]);const p=q.useMemo(()=>t.find(m=>m.node_num===o)||null,[t,o]),g=q.useCallback(m=>{s(m)},[]);return c?A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsx("div",{className:"text-slate-400",children:"Loading mesh data..."})}):h?A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsxs("div",{className:"text-red-400",children:["Error: ",h]})}):A.jsxs("div",{className:"space-y-6",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsxs("div",{className:"text-sm text-slate-400",children:[t.length," nodes • ",r.length," edges"]}),A.jsxs("div",{className:"flex items-center bg-bg-card border border-border rounded-lg p-1",children:[A.jsxs("button",{onClick:()=>u("topo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="topo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[A.jsx(kZ,{size:14}),"Topology"]}),A.jsxs("button",{onClick:()=>u("geo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="geo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[A.jsx(AZ,{size:14}),"Geographic"]})]})]}),A.jsxs("div",{className:"flex gap-0",children:[A.jsx("div",{className:"flex-1 min-w-0",children:l==="topo"?A.jsx(Vme,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g}):A.jsx(pye,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g})}),A.jsx(wye,{node:p,edges:r,nodes:t,onSelectNode:g})]}),A.jsx(Mye,{nodes:t,selectedNodeId:o,onSelectNode:g})]})}function Aye({feed:t}){const e=()=>t.is_loaded?t.consecutive_errors>0?"bg-amber-500":"bg-green-500":"bg-red-500",r=()=>t.is_loaded?t.consecutive_errors>0?`${t.consecutive_errors} errors`:"Healthy":"Not loaded",n=i=>i?new Date(i*1e3).toLocaleTimeString():"Never";return A.jsxs("div",{className:"bg-bg-hover rounded-lg p-4",children:[A.jsxs("div",{className:"flex items-center justify-between mb-2",children:[A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),A.jsx("span",{className:"text-sm font-medium text-slate-200 uppercase",children:t.source})]}),A.jsx("span",{className:"text-xs text-slate-400",children:r()})]}),A.jsxs("div",{className:"text-xs text-slate-500 space-y-1",children:[A.jsxs("div",{children:["Events: ",t.event_count]}),A.jsxs("div",{children:["Last fetch: ",n(t.last_fetch)]}),t.last_error&&A.jsx("div",{className:"text-amber-500 truncate",children:t.last_error})]})]})}function Pye({event:t}){const r=(a=>{switch(a.toLowerCase()){case"extreme":case"severe":return{bg:"bg-red-500/10",border:"border-red-500",icon:L3,iconColor:"text-red-500"};case"moderate":case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:S0,iconColor:"text-amber-500"};case"minor":return{bg:"bg-yellow-500/10",border:"border-yellow-500",icon:Bw,iconColor:"text-yellow-500"};default:return{bg:"bg-slate-500/10",border:"border-slate-500",icon:Bw,iconColor:"text-slate-400"}}})(t.severity),n=r.icon,i=a=>a?new Date(a*1e3).toLocaleString():null;return A.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-2 ${r.border}`,children:A.jsxs("div",{className:"flex items-start gap-3",children:[A.jsx(n,{size:18,className:r.iconColor}),A.jsxs("div",{className:"flex-1 min-w-0",children:[A.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[A.jsx("span",{className:"text-sm font-medium text-slate-200",children:t.event_type}),A.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${r.bg} ${r.iconColor}`,children:t.severity})]}),A.jsx("div",{className:"text-sm text-slate-300 mb-2",children:t.headline}),t.description&&A.jsx("div",{className:"text-xs text-slate-400 mb-2 line-clamp-2",children:t.description}),A.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500",children:[A.jsx("span",{className:"uppercase",children:t.source}),t.expires&&A.jsxs("span",{children:["Expires: ",i(t.expires)]})]})]})]})})}function Dye({swpc:t}){var n,i;if(!t||!t.enabled)return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(fD,{size:14}),"Solar/Geomagnetic Indices"]}),A.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const e=a=>a===void 0?"text-slate-400":a<=2?"text-green-500":a<=4?"text-amber-500":a<=6?"text-orange-500":"text-red-500",r=a=>a===void 0||a===0?"text-green-500":a<=2?"text-amber-500":a<=3?"text-orange-500":"text-red-500";return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(fD,{size:14}),"Solar/Geomagnetic Indices"]}),A.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[A.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar Flux Index"}),A.jsx("div",{className:"text-2xl font-mono text-slate-100",children:((n=t.sfi)==null?void 0:n.toFixed(0))??"—"}),A.jsx("div",{className:"text-xs text-slate-500",children:"SFI (10.7 cm)"})]}),A.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Planetary K-Index"}),A.jsx("div",{className:`text-2xl font-mono ${e(t.kp_current)}`,children:((i=t.kp_current)==null?void 0:i.toFixed(1))??"—"}),A.jsx("div",{className:"text-xs text-slate-500",children:"Kp"})]})]}),A.jsxs("div",{className:"bg-bg-hover rounded-lg p-3 mb-4",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-2",children:"NOAA Space Weather Scales"}),A.jsxs("div",{className:"flex items-center gap-4",children:[A.jsxs("div",{className:"flex items-center gap-1",children:[A.jsx("span",{className:"text-xs text-slate-400",children:"R:"}),A.jsx("span",{className:`text-sm font-mono ${r(t.r_scale)}`,children:t.r_scale??0})]}),A.jsxs("div",{className:"flex items-center gap-1",children:[A.jsx("span",{className:"text-xs text-slate-400",children:"S:"}),A.jsx("span",{className:`text-sm font-mono ${r(t.s_scale)}`,children:t.s_scale??0})]}),A.jsxs("div",{className:"flex items-center gap-1",children:[A.jsx("span",{className:"text-xs text-slate-400",children:"G:"}),A.jsx("span",{className:`text-sm font-mono ${r(t.g_scale)}`,children:t.g_scale??0})]})]}),A.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Radio Blackout / Solar Radiation / Geomagnetic Storm"})]}),t.active_warnings&&t.active_warnings.length>0&&A.jsxs("div",{className:"space-y-2",children:[A.jsx("div",{className:"text-xs text-slate-500",children:"Active Warnings"}),t.active_warnings.slice(0,3).map((a,o)=>A.jsx("div",{className:"text-xs text-amber-400 bg-amber-500/10 rounded p-2",children:a},o))]})]})}function kye({ducting:t}){if(!t||!t.enabled)return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(hD,{size:14}),"Tropospheric Ducting"]}),A.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const e=n=>{switch(n){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},r=n=>n?n.replace("_"," ").replace(/\b\w/g,i=>i.toUpperCase()):"Unknown";return A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(hD,{size:14}),"Tropospheric Ducting"]}),A.jsxs("div",{className:"bg-bg-hover rounded-lg p-4 mb-4",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Condition"}),A.jsx("div",{className:`text-xl font-medium ${e(t.condition)}`,children:r(t.condition)})]}),A.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[A.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Min Gradient"}),A.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.min_gradient??"—"}),A.jsx("div",{className:"text-xs text-slate-500",children:"M-units/km"})]}),t.duct_thickness_m&&A.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Thickness"}),A.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_thickness_m}),A.jsx("div",{className:"text-xs text-slate-500",children:"meters"})]}),t.duct_base_m&&A.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Base"}),A.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_base_m}),A.jsx("div",{className:"text-xs text-slate-500",children:"meters AGL"})]})]}),A.jsxs("div",{className:"text-xs text-slate-500 bg-bg-hover rounded p-2",children:[A.jsx("div",{children:"dM/dz reference:"}),A.jsxs("div",{className:"mt-1 space-y-0.5",children:[A.jsx("div",{children:">79: Normal propagation"}),A.jsx("div",{children:"0–79: Super-refraction"}),A.jsx("div",{children:"<0: Ducting (trapping layer)"})]})]}),t.last_update&&A.jsxs("div",{className:"text-xs text-slate-500 mt-3",children:["Last update: ",t.last_update]})]})}function Iye(){var C;const[t,e]=q.useState(null),[r,n]=q.useState([]),[i,a]=q.useState(null),[o,s]=q.useState(null),[l,u]=q.useState([]),[c,f]=q.useState(null),[h,v]=q.useState([]),[p,g]=q.useState([]),[m,y]=q.useState([]),[x,S]=q.useState(!0),[b,T]=q.useState(null);return q.useEffect(()=>{Promise.all([N3().catch(()=>null),$Z().catch(()=>[]),XZ().catch(()=>null),qZ().catch(()=>null),KZ().catch(()=>[]),QZ().catch(()=>null),JZ().catch(()=>[]),e$().catch(()=>[]),t$().catch(()=>[])]).then(([M,D,I,k,E,z,O,F,G])=>{e(M),n(D),a(I),s(k),u(E),f(z),v(O||[]),g(F||[]),y(G||[]),S(!1)}).catch(M=>{T(M.message),S(!1)})},[]),x?A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsx("div",{className:"text-slate-400",children:"Loading environmental data..."})}):b?A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsxs("div",{className:"text-red-400",children:["Error: ",b]})}):t!=null&&t.enabled?A.jsxs("div",{className:"space-y-6",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("h1",{className:"text-xl font-semibold text-slate-200",children:"Environment"}),A.jsxs("div",{className:"text-xs text-slate-500",children:[r.length," active event",r.length!==1?"s":""]})]}),A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(QC,{size:14}),"Feed Status"]}),A.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:t.feeds.map(M=>A.jsx(Aye,{feed:M},M.source))})]}),A.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[A.jsx(Dye,{swpc:i}),A.jsx(kye,{ducting:o})]}),A.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(MZ,{size:14}),"Active Wildfires (",l.length,")"]}),l.length>0?A.jsx("div",{className:"space-y-3",children:l.map(M=>A.jsxs("div",{className:`p-3 rounded-lg ${M.severity==="warning"?"bg-red-500/10 border-l-2 border-red-500":M.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-slate-500/10 border-l-2 border-slate-500"}`,children:[A.jsxs("div",{className:"flex items-center justify-between mb-1",children:[A.jsx("span",{className:"text-sm font-medium text-slate-200",children:M.name}),A.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${M.severity==="warning"?"bg-red-500/20 text-red-400":M.severity==="watch"?"bg-amber-500/20 text-amber-400":"bg-slate-500/20 text-slate-400"}`,children:M.severity})]}),A.jsxs("div",{className:"text-xs text-slate-400 space-y-1",children:[A.jsxs("div",{children:[M.acres.toLocaleString()," acres, ",M.pct_contained,"% contained"]}),M.distance_km&&M.nearest_anchor&&A.jsxs("div",{children:[Math.round(M.distance_km)," km from ",M.nearest_anchor]})]})]},M.event_id))}):A.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[A.jsx(Jg,{size:16,className:"text-green-500"}),A.jsx("span",{children:"No active wildfires in the area"})]})]}),A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(DZ,{size:14}),"Avalanche Advisories"]}),c!=null&&c.off_season?A.jsx("div",{className:"text-slate-500 py-4",children:A.jsx("p",{children:"Off season - check back in December"})}):c&&c.advisories.length>0?A.jsxs("div",{className:"space-y-3",children:[c.advisories.map(M=>A.jsxs("div",{className:`p-3 rounded-lg ${M.danger_level>=4?"bg-red-500/10 border-l-2 border-red-500":M.danger_level>=3?"bg-amber-500/10 border-l-2 border-amber-500":M.danger_level>=2?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[A.jsxs("div",{className:"flex items-center justify-between mb-1",children:[A.jsx("span",{className:"text-sm font-medium text-slate-200",children:M.zone_name}),A.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${M.danger_level>=4?"bg-red-500/20 text-red-400":M.danger_level>=3?"bg-amber-500/20 text-amber-400":M.danger_level>=2?"bg-yellow-500/20 text-yellow-400":"bg-green-500/20 text-green-400"}`,children:M.danger_name})]}),A.jsx("div",{className:"text-xs text-slate-400",children:M.center}),M.travel_advice&&A.jsx("div",{className:"text-xs text-slate-500 mt-2 line-clamp-2",children:M.travel_advice})]},M.event_id)),((C=c.advisories[0])==null?void 0:C.center_link)&&A.jsx("a",{href:c.advisories[0].center_link,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-400 hover:underline",children:"View full forecast"})]}):A.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[A.jsx(Jg,{size:16,className:"text-green-500"}),A.jsx("span",{children:"No avalanche advisories"})]})]})]}),h.length>0&&A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(TZ,{size:14}),"Stream Gauges (",h.length,")"]}),A.jsx("div",{className:"space-y-2",children:h.map(M=>{var D,I,k,E,z;return A.jsxs("div",{className:`p-3 rounded-lg ${M.severity==="warning"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-blue-500/10 border-l-2 border-blue-500"}`,children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm text-slate-200",children:((D=M.properties)==null?void 0:D.site_name)||"Unknown Site"}),A.jsxs("span",{className:"text-sm font-mono text-slate-300",children:[(k=(I=M.properties)==null?void 0:I.value)==null?void 0:k.toLocaleString()," ",(E=M.properties)==null?void 0:E.unit]})]}),A.jsx("div",{className:"text-xs text-slate-500 mt-1",children:(z=M.properties)==null?void 0:z.parameter})]},M.event_id)})})]}),(p.length>0||m.length>0)&&A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(xZ,{size:14}),"Road Conditions"]}),p.length>0&&A.jsxs("div",{className:"mb-4",children:[A.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Traffic Flow"}),A.jsx("div",{className:"space-y-2",children:p.map(M=>{var D,I,k,E,z,O,F,G,j;return A.jsxs("div",{className:`p-3 rounded-lg ${(D=M.properties)!=null&&D.roadClosure?"bg-red-500/10 border-l-2 border-red-500":((I=M.properties)==null?void 0:I.speedRatio)<.5?"bg-amber-500/10 border-l-2 border-amber-500":((k=M.properties)==null?void 0:k.speedRatio)<.8?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm text-slate-200",children:((E=M.properties)==null?void 0:E.corridor)||"Unknown"}),A.jsx("span",{className:"text-sm font-mono text-slate-300",children:(z=M.properties)!=null&&z.roadClosure?"CLOSED":`${Math.round(((O=M.properties)==null?void 0:O.currentSpeed)||0)}mph`})]}),!((F=M.properties)!=null&&F.roadClosure)&&A.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[Math.round((((G=M.properties)==null?void 0:G.speedRatio)||1)*100),"% of free flow (",Math.round(((j=M.properties)==null?void 0:j.freeFlowSpeed)||0),"mph)"]})]},M.event_id)})})]}),m.length>0&&A.jsxs("div",{children:[A.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Road Events"}),A.jsx("div",{className:"space-y-2",children:m.map(M=>{var D,I;return A.jsxs("div",{className:`p-3 rounded-lg ${(D=M.properties)!=null&&D.is_closure?"bg-red-500/10 border-l-2 border-red-500":"bg-amber-500/10 border-l-2 border-amber-500"}`,children:[A.jsxs("div",{className:"flex items-center gap-2",children:[((I=M.properties)==null?void 0:I.is_closure)&&A.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"CLOSURE"}),A.jsx("span",{className:"text-sm text-slate-200 line-clamp-1",children:M.headline})]}),A.jsx("div",{className:"text-xs text-slate-500 mt-1 uppercase",children:M.event_type})]},M.event_id)})})]})]}),A.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[A.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[A.jsx(S0,{size:14}),"Active Events (",r.length,")"]}),r.length>0?A.jsx("div",{className:"space-y-3",children:r.map(M=>A.jsx(Pye,{event:M},M.event_id))}):A.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[A.jsx(Jg,{size:16,className:"text-green-500"}),A.jsx("span",{children:"No active environmental events"})]})]})]}):A.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center",children:[A.jsx("div",{className:"w-16 h-16 rounded-full bg-bg-card border border-border flex items-center justify-center mb-6",children:A.jsx(e2,{size:32,className:"text-slate-500"})}),A.jsx("h2",{className:"text-xl font-semibold text-slate-300 mb-2",children:"Environmental Feeds Disabled"}),A.jsx("p",{className:"text-slate-500 max-w-md",children:"Enable environmental feeds in config.yaml to see weather alerts, space weather indices, and tropospheric ducting data."})]})}const Jz=[{key:"bot",label:"Bot",icon:yZ},{key:"connection",label:"Connection",icon:FZ},{key:"response",label:"Response",icon:PZ},{key:"history",label:"History",icon:bZ},{key:"memory",label:"Memory",icon:_Z},{key:"context",label:"Context",icon:P3},{key:"commands",label:"Commands",icon:zZ},{key:"llm",label:"LLM",icon:A3},{key:"weather",label:"Weather",icon:e2},{key:"meshmonitor",label:"MeshMonitor",icon:x0},{key:"knowledge",label:"Knowledge",icon:mZ},{key:"mesh_sources",label:"Mesh Sources",icon:LZ},{key:"mesh_intelligence",label:"Intelligence",icon:QC},{key:"environmental",label:"Environmental",icon:BZ},{key:"dashboard",label:"Dashboard",icon:k3}];function dt({label:t,value:e,onChange:r,type:n="text",placeholder:i="",helper:a=""}){const[o,s]=q.useState(!1),l=n==="password";return A.jsxs("div",{className:"space-y-1",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),A.jsxs("div",{className:"relative",children:[A.jsx("input",{type:l&&!o?"password":"text",value:e,onChange:u=>r(u.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),l&&A.jsx("button",{type:"button",onClick:()=>s(!o),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:o?A.jsx(CZ,{size:16}):A.jsx(P3,{size:16})})]}),a&&A.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function Ye({label:t,value:e,onChange:r,min:n,max:i,step:a=1,helper:o=""}){return A.jsxs("div",{className:"space-y-1",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),A.jsx("input",{type:"number",value:e,onChange:s=>r(Number(s.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&A.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function et({label:t,checked:e,onChange:r,helper:n=""}){return A.jsxs("div",{className:"flex items-center justify-between py-2",children:[A.jsxs("div",{children:[A.jsx("span",{className:"text-sm text-slate-300",children:t}),n&&A.jsx("p",{className:"text-xs text-slate-600",children:n})]}),A.jsx("button",{type:"button",onClick:()=>r(!e),className:`relative w-11 h-6 rounded-full transition-colors ${e?"bg-accent":"bg-[#1e2a3a]"}`,children:A.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${e?"translate-x-5":""}`})})]})}function Ql({label:t,value:e,onChange:r,options:n,helper:i=""}){return A.jsxs("div",{className:"space-y-1",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),A.jsx("select",{value:e,onChange:a=>r(a.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:n.map(a=>A.jsx("option",{value:a.value,children:a.label},a.value))}),i&&A.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function Eye({label:t,value:e,onChange:r,rows:n=4,helper:i=""}){return A.jsxs("div",{className:"space-y-1",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),A.jsx("textarea",{value:e,onChange:a=>r(a.target.value),rows:n,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent resize-y"}),i&&A.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function Za({label:t,value:e,onChange:r,helper:n=""}){const[i,a]=q.useState(e.join(", "));q.useEffect(()=>{a(e.join(", "))},[e]);const o=()=>{const s=i.split(",").map(l=>l.trim()).filter(Boolean);r(s)};return A.jsxs("div",{className:"space-y-1",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),A.jsx("input",{type:"text",value:i,onChange:s=>a(s.target.value),onBlur:o,placeholder:"item1, item2, item3",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&A.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function v8({label:t,value:e,onChange:r,helper:n=""}){const[i,a]=q.useState(e.join(", "));q.useEffect(()=>{a(e.join(", "))},[e]);const o=()=>{const s=i.split(",").map(l=>parseInt(l.trim(),10)).filter(l=>!isNaN(l));r(s)};return A.jsxs("div",{className:"space-y-1",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),A.jsx("input",{type:"text",value:i,onChange:s=>a(s.target.value),onBlur:o,placeholder:"0, 1, 2",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&A.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function Rye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(dt,{label:"Bot Name",value:t.name,onChange:r=>e({...t,name:r})}),A.jsx(dt,{label:"Owner",value:t.owner,onChange:r=>e({...t,owner:r})})]}),A.jsx(et,{label:"Respond to DMs",checked:t.respond_to_dms,onChange:r=>e({...t,respond_to_dms:r})}),A.jsx(et,{label:"Filter BBS Protocols",checked:t.filter_bbs_protocols,onChange:r=>e({...t,filter_bbs_protocols:r})})]})}function Nye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(Ql,{label:"Connection Type",value:t.type,onChange:r=>e({...t,type:r}),options:[{value:"serial",label:"Serial"},{value:"tcp",label:"TCP"}]}),t.type==="serial"?A.jsx(dt,{label:"Serial Port",value:t.serial_port,onChange:r=>e({...t,serial_port:r}),placeholder:"/dev/ttyUSB0"}):A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(dt,{label:"TCP Host",value:t.tcp_host,onChange:r=>e({...t,tcp_host:r}),placeholder:"192.168.1.100"}),A.jsx(Ye,{label:"TCP Port",value:t.tcp_port,onChange:r=>e({...t,tcp_port:r}),min:1,max:65535})]})]})}function Oye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ye,{label:"Delay Min (sec)",value:t.delay_min,onChange:r=>e({...t,delay_min:r}),min:0,step:.1}),A.jsx(Ye,{label:"Delay Max (sec)",value:t.delay_max,onChange:r=>e({...t,delay_max:r}),min:0,step:.1})]}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ye,{label:"Max Length",value:t.max_length,onChange:r=>e({...t,max_length:r}),min:50,max:500}),A.jsx(Ye,{label:"Max Messages",value:t.max_messages,onChange:r=>e({...t,max_messages:r}),min:1,max:10})]})]})}function zye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(dt,{label:"Database Path",value:t.database,onChange:r=>e({...t,database:r})}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ye,{label:"Max Messages Per User",value:t.max_messages_per_user,onChange:r=>e({...t,max_messages_per_user:r}),min:0,helper:"0 = unlimited"}),A.jsx(Ye,{label:"Conversation Timeout (sec)",value:t.conversation_timeout,onChange:r=>e({...t,conversation_timeout:r}),min:0})]}),A.jsx(et,{label:"Auto Cleanup",checked:t.auto_cleanup,onChange:r=>e({...t,auto_cleanup:r})}),t.auto_cleanup&&A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ye,{label:"Cleanup Interval (hours)",value:t.cleanup_interval_hours,onChange:r=>e({...t,cleanup_interval_hours:r}),min:1}),A.jsx(Ye,{label:"Max Age (days)",value:t.max_age_days,onChange:r=>e({...t,max_age_days:r}),min:1})]})]})}function Bye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(et,{label:"Enable Memory Optimization",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ye,{label:"Window Size",value:t.window_size,onChange:r=>e({...t,window_size:r}),min:1,helper:"Recent message pairs to keep in full"}),A.jsx(Ye,{label:"Summarize Threshold",value:t.summarize_threshold,onChange:r=>e({...t,summarize_threshold:r}),min:1,helper:"Messages before re-summarizing"})]})]})}function Vye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(et,{label:"Enable Passive Context",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&A.jsxs(A.Fragment,{children:[A.jsx(v8,{label:"Observe Channels",value:t.observe_channels,onChange:r=>e({...t,observe_channels:r}),helper:"Empty = all channels"}),A.jsx(Za,{label:"Ignore Nodes",value:t.ignore_nodes,onChange:r=>e({...t,ignore_nodes:r}),helper:"Node IDs to ignore"}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ye,{label:"Max Age (sec)",value:t.max_age,onChange:r=>e({...t,max_age:r}),min:0}),A.jsx(Ye,{label:"Max Context Items",value:t.max_context_items,onChange:r=>e({...t,max_context_items:r}),min:1})]})]})]})}function Fye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(et,{label:"Enable Commands",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&A.jsxs(A.Fragment,{children:[A.jsx(dt,{label:"Command Prefix",value:t.prefix,onChange:r=>e({...t,prefix:r})}),A.jsx(Za,{label:"Disabled Commands",value:t.disabled_commands,onChange:r=>e({...t,disabled_commands:r}),helper:"Commands to disable"})]})]})}function jye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ql,{label:"Backend",value:t.backend,onChange:r=>e({...t,backend:r}),options:[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"google",label:"Google (Gemini)"}]}),A.jsx(dt,{label:"Model",value:t.model,onChange:r=>e({...t,model:r}),placeholder:"gpt-4o-mini"})]}),A.jsx(dt,{label:"API Key",value:t.api_key,onChange:r=>e({...t,api_key:r}),type:"password",helper:"Supports ${ENV_VAR} syntax"}),A.jsx(dt,{label:"Base URL",value:t.base_url,onChange:r=>e({...t,base_url:r}),placeholder:"https://api.openai.com/v1"}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ye,{label:"Timeout (sec)",value:t.timeout,onChange:r=>e({...t,timeout:r}),min:5,max:120}),A.jsx(Ye,{label:"Max Response Tokens",value:t.max_response_tokens,onChange:r=>e({...t,max_response_tokens:r}),min:100})]}),A.jsx(et,{label:"Use System Prompt",checked:t.use_system_prompt,onChange:r=>e({...t,use_system_prompt:r})}),t.use_system_prompt&&A.jsx(Eye,{label:"System Prompt",value:t.system_prompt,onChange:r=>e({...t,system_prompt:r}),rows:6}),A.jsx(et,{label:"Web Search",checked:t.web_search,onChange:r=>e({...t,web_search:r}),helper:"Open WebUI feature"}),A.jsx(et,{label:"Google Grounding",checked:t.google_grounding,onChange:r=>e({...t,google_grounding:r}),helper:"Gemini only"})]})}function Gye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ql,{label:"Primary Provider",value:t.primary,onChange:r=>e({...t,primary:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"}]}),A.jsx(Ql,{label:"Fallback Provider",value:t.fallback,onChange:r=>e({...t,fallback:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"},{value:"none",label:"None"}]})]}),A.jsx(dt,{label:"Default Location",value:t.default_location,onChange:r=>e({...t,default_location:r}),placeholder:"Twin Falls, ID"})]})}function Hye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(et,{label:"Enable MeshMonitor",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&A.jsxs(A.Fragment,{children:[A.jsx(dt,{label:"URL",value:t.url,onChange:r=>e({...t,url:r}),placeholder:"http://192.168.1.100:8080"}),A.jsx(et,{label:"Inject Into Prompt",checked:t.inject_into_prompt,onChange:r=>e({...t,inject_into_prompt:r}),helper:"Tell LLM about MeshMonitor commands"}),A.jsx(Ye,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:r=>e({...t,refresh_interval:r}),min:10}),A.jsx(et,{label:"Polite Mode",checked:t.polite_mode,onChange:r=>e({...t,polite_mode:r}),helper:"Reduces polling frequency for shared instances"})]})]})}function Wye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(et,{label:"Enable Knowledge Base",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&A.jsxs(A.Fragment,{children:[A.jsx(Ql,{label:"Backend",value:t.backend,onChange:r=>e({...t,backend:r}),options:[{value:"auto",label:"Auto (Qdrant -> SQLite)"},{value:"qdrant",label:"Qdrant"},{value:"sqlite",label:"SQLite"}]}),(t.backend==="qdrant"||t.backend==="auto")&&A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(dt,{label:"Qdrant Host",value:t.qdrant_host,onChange:r=>e({...t,qdrant_host:r})}),A.jsx(Ye,{label:"Qdrant Port",value:t.qdrant_port,onChange:r=>e({...t,qdrant_port:r})})]}),A.jsx(dt,{label:"Collection",value:t.qdrant_collection,onChange:r=>e({...t,qdrant_collection:r})}),A.jsx(et,{label:"Use Sparse Embeddings",checked:t.use_sparse,onChange:r=>e({...t,use_sparse:r})})]}),A.jsx(dt,{label:"SQLite DB Path",value:t.db_path,onChange:r=>e({...t,db_path:r})}),A.jsx(Ye,{label:"Top K Results",value:t.top_k,onChange:r=>e({...t,top_k:r}),min:1,max:20})]})]})}function Uye({source:t,onChange:e,onDelete:r}){const[n,i]=q.useState(!1);return A.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[A.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>i(!n),children:[A.jsxs("div",{className:"flex items-center gap-3",children:[n?A.jsx(JC,{size:16}):A.jsx(M3,{size:16}),A.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`}),A.jsx("span",{className:"font-mono text-sm text-slate-200",children:t.name||"Unnamed Source"}),A.jsx("span",{className:"text-xs text-slate-500 bg-[#1e2a3a] px-2 py-0.5 rounded",children:t.type})]}),A.jsx("button",{onClick:a=>{a.stopPropagation(),r()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:A.jsx(VZ,{size:14})})]}),n&&A.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(dt,{label:"Name",value:t.name,onChange:a=>e({...t,name:a})}),A.jsx(Ql,{label:"Type",value:t.type,onChange:a=>e({...t,type:a}),options:[{value:"meshview",label:"MeshView"},{value:"meshmonitor",label:"MeshMonitor"},{value:"mqtt",label:"MQTT Broker"}]})]}),t.type!=="mqtt"&&A.jsx(dt,{label:"URL",value:t.url,onChange:a=>e({...t,url:a})}),t.type==="meshmonitor"&&A.jsx(dt,{label:"API Token",value:t.api_token,onChange:a=>e({...t,api_token:a}),type:"password"}),t.type==="mqtt"&&A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(dt,{label:"Host",value:t.host||"",onChange:a=>e({...t,host:a})}),A.jsx(Ye,{label:"Port",value:t.port||1883,onChange:a=>e({...t,port:a}),min:1,max:65535})]}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(dt,{label:"Username",value:t.username||"",onChange:a=>e({...t,username:a})}),A.jsx(dt,{label:"Password",value:t.password||"",onChange:a=>e({...t,password:a}),type:"password"})]}),A.jsx(dt,{label:"Topic Root",value:t.topic_root||"msh/US",onChange:a=>e({...t,topic_root:a})}),A.jsx(et,{label:"Use TLS",checked:t.use_tls||!1,onChange:a=>e({...t,use_tls:a})})]}),A.jsx(Ye,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:a=>e({...t,refresh_interval:a}),min:10}),A.jsx(et,{label:"Enabled",checked:t.enabled,onChange:a=>e({...t,enabled:a})}),A.jsx(et,{label:"Polite Mode",checked:t.polite_mode,onChange:a=>e({...t,polite_mode:a})})]})]})}function Zye({data:t,onChange:e}){const r=()=>{e([...t,{name:"New Source",type:"meshview",url:"",api_token:"",refresh_interval:30,polite_mode:!1,enabled:!0,host:"",port:1883,username:"",password:"",topic_root:"msh/US",use_tls:!1}])};return A.jsxs("div",{className:"space-y-4",children:[t.map((n,i)=>A.jsx(Uye,{source:n,onChange:a=>{const o=[...t];o[i]=a,e(o)},onDelete:()=>{confirm(`Delete source "${n.name}"?`)&&e(t.filter((a,o)=>o!==i))}},i)),A.jsxs("button",{onClick:r,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[A.jsx(IZ,{size:16})," Add Source"]})]})}function $ye({data:t,onChange:e}){const[r,n]=q.useState(null);return A.jsxs("div",{className:"space-y-6",children:[A.jsx(et,{label:"Enable Mesh Intelligence",checked:t.enabled,onChange:i=>e({...t,enabled:i})}),t.enabled&&A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ye,{label:"Locality Radius (miles)",value:t.locality_radius_miles,onChange:i=>e({...t,locality_radius_miles:i}),min:1,step:.5}),A.jsx(Ye,{label:"Offline Threshold (hours)",value:t.offline_threshold_hours,onChange:i=>e({...t,offline_threshold_hours:i}),min:1})]}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ye,{label:"Packet Threshold",value:t.packet_threshold,onChange:i=>e({...t,packet_threshold:i}),min:0,helper:"Per 24h to flag"}),A.jsx(Ye,{label:"Battery Warning %",value:t.battery_warning_percent,onChange:i=>e({...t,battery_warning_percent:i}),min:1,max:100})]}),A.jsx(Za,{label:"Critical Nodes",value:t.critical_nodes,onChange:i=>e({...t,critical_nodes:i}),helper:"Short names of critical nodes (e.g., MHR, HPR)"}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ye,{label:"Alert Channel",value:t.alert_channel,onChange:i=>e({...t,alert_channel:i}),min:-1,helper:"-1 = disabled"}),A.jsx(Ye,{label:"Alert Cooldown (min)",value:t.alert_cooldown_minutes,onChange:i=>e({...t,alert_cooldown_minutes:i}),min:1})]}),A.jsxs("div",{className:"space-y-2",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:"Regions"}),t.regions.map((i,a)=>A.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[A.jsx("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>n(r===a?null:a),children:A.jsxs("div",{className:"flex items-center gap-3",children:[r===a?A.jsx(JC,{size:16}):A.jsx(M3,{size:16}),A.jsx("span",{className:"font-medium text-slate-200",children:i.name}),A.jsx("span",{className:"text-xs text-slate-500",children:i.local_name})]})}),r===a&&A.jsxs("div",{className:"p-4 space-y-3 border-t border-[#1e2a3a]",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(dt,{label:"Name",value:i.name,onChange:o=>{const s=[...t.regions];s[a]={...i,name:o},e({...t,regions:s})}}),A.jsx(dt,{label:"Local Name",value:i.local_name,onChange:o=>{const s=[...t.regions];s[a]={...i,local_name:o},e({...t,regions:s})}})]}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ye,{label:"Latitude",value:i.lat,onChange:o=>{const s=[...t.regions];s[a]={...i,lat:o},e({...t,regions:s})},step:1e-4}),A.jsx(Ye,{label:"Longitude",value:i.lon,onChange:o=>{const s=[...t.regions];s[a]={...i,lon:o},e({...t,regions:s})},step:1e-4})]}),A.jsx(dt,{label:"Description",value:i.description,onChange:o=>{const s=[...t.regions];s[a]={...i,description:o},e({...t,regions:s})}}),A.jsx(Za,{label:"Aliases",value:i.aliases,onChange:o=>{const s=[...t.regions];s[a]={...i,aliases:o},e({...t,regions:s})}}),A.jsx(Za,{label:"Cities",value:i.cities,onChange:o=>{const s=[...t.regions];s[a]={...i,cities:o},e({...t,regions:s})}})]})]},a))]}),A.jsxs("div",{className:"space-y-2",children:[A.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide mb-3",children:"Alert Rules"}),A.jsxs("div",{className:"grid grid-cols-2 gap-x-6 gap-y-1",children:[A.jsx(et,{label:"Infra Offline",checked:t.alert_rules.infra_offline,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_offline:i}})}),A.jsx(et,{label:"Infra Recovery",checked:t.alert_rules.infra_recovery,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_recovery:i}})}),A.jsx(et,{label:"New Router",checked:t.alert_rules.new_router,onChange:i=>e({...t,alert_rules:{...t.alert_rules,new_router:i}})}),A.jsx(et,{label:"Battery Warning",checked:t.alert_rules.battery_warning,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_warning:i}})}),A.jsx(et,{label:"Battery Critical",checked:t.alert_rules.battery_critical,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_critical:i}})}),A.jsx(et,{label:"Battery Emergency",checked:t.alert_rules.battery_emergency,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_emergency:i}})}),A.jsx(et,{label:"Power Source Change",checked:t.alert_rules.power_source_change,onChange:i=>e({...t,alert_rules:{...t.alert_rules,power_source_change:i}})}),A.jsx(et,{label:"Solar Not Charging",checked:t.alert_rules.solar_not_charging,onChange:i=>e({...t,alert_rules:{...t.alert_rules,solar_not_charging:i}})}),A.jsx(et,{label:"High Utilization",checked:t.alert_rules.sustained_high_util,onChange:i=>e({...t,alert_rules:{...t.alert_rules,sustained_high_util:i}})}),A.jsx(et,{label:"Packet Flood",checked:t.alert_rules.packet_flood,onChange:i=>e({...t,alert_rules:{...t.alert_rules,packet_flood:i}})}),A.jsx(et,{label:"Single Gateway",checked:t.alert_rules.infra_single_gateway,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_single_gateway:i}})}),A.jsx(et,{label:"Region Blackout",checked:t.alert_rules.region_total_blackout,onChange:i=>e({...t,alert_rules:{...t.alert_rules,region_total_blackout:i}})})]})]})]})]})}function Yye({data:t,onChange:e}){var r,n,i,a,o,s,l,u,c,f;return A.jsxs("div",{className:"space-y-6",children:[A.jsx(et,{label:"Enable Environmental Feeds",checked:t.enabled,onChange:h=>e({...t,enabled:h})}),t.enabled&&A.jsxs(A.Fragment,{children:[A.jsx(Za,{label:"NWS Zones",value:t.nws_zones,onChange:h=>e({...t,nws_zones:h}),helper:"Zone IDs like IDZ016, IDZ030"}),A.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NWS Weather Alerts"}),A.jsx(et,{label:"",checked:t.nws.enabled,onChange:h=>e({...t,nws:{...t.nws,enabled:h}})})]}),t.nws.enabled&&A.jsxs(A.Fragment,{children:[A.jsx(dt,{label:"User Agent",value:t.nws.user_agent,onChange:h=>e({...t,nws:{...t.nws,user_agent:h}}),helper:"Required format: (app_name, contact_email)"}),A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ye,{label:"Tick Seconds",value:t.nws.tick_seconds,onChange:h=>e({...t,nws:{...t.nws,tick_seconds:h}}),min:30}),A.jsx(Ql,{label:"Min Severity",value:t.nws.severity_min,onChange:h=>e({...t,nws:{...t.nws,severity_min:h}}),options:[{value:"minor",label:"Minor"},{value:"moderate",label:"Moderate"},{value:"severe",label:"Severe"},{value:"extreme",label:"Extreme"}]})]})]})]}),A.jsx("div",{className:"border border-[#1e2a3a] rounded-lg p-4",children:A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NOAA Space Weather (SWPC)"}),A.jsx(et,{label:"",checked:t.swpc.enabled,onChange:h=>e({...t,swpc:{...t.swpc,enabled:h}})})]})}),A.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Tropospheric Ducting"}),A.jsx(et,{label:"",checked:t.ducting.enabled,onChange:h=>e({...t,ducting:{...t.ducting,enabled:h}})})]}),t.ducting.enabled&&A.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[A.jsx(Ye,{label:"Tick Seconds",value:t.ducting.tick_seconds,onChange:h=>e({...t,ducting:{...t.ducting,tick_seconds:h}}),min:60}),A.jsx(Ye,{label:"Latitude",value:t.ducting.latitude,onChange:h=>e({...t,ducting:{...t.ducting,latitude:h}}),step:.01}),A.jsx(Ye,{label:"Longitude",value:t.ducting.longitude,onChange:h=>e({...t,ducting:{...t.ducting,longitude:h}}),step:.01})]})]}),A.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NIFC Fire Perimeters"}),A.jsx(et,{label:"",checked:t.fires.enabled,onChange:h=>e({...t,fires:{...t.fires,enabled:h}})})]}),t.fires.enabled&&A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(Ye,{label:"Tick Seconds",value:t.fires.tick_seconds,onChange:h=>e({...t,fires:{...t.fires,tick_seconds:h}}),min:60}),A.jsx(dt,{label:"State",value:t.fires.state,onChange:h=>e({...t,fires:{...t.fires,state:h}}),placeholder:"US-ID"})]})]}),A.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Avalanche Advisories"}),A.jsx(et,{label:"",checked:t.avalanche.enabled,onChange:h=>e({...t,avalanche:{...t.avalanche,enabled:h}})})]}),t.avalanche.enabled&&A.jsxs(A.Fragment,{children:[A.jsx(Ye,{label:"Tick Seconds",value:t.avalanche.tick_seconds,onChange:h=>e({...t,avalanche:{...t.avalanche,tick_seconds:h}}),min:60}),A.jsx(Za,{label:"Center IDs",value:t.avalanche.center_ids,onChange:h=>e({...t,avalanche:{...t.avalanche,center_ids:h}})}),A.jsx(v8,{label:"Season Months",value:t.avalanche.season_months,onChange:h=>e({...t,avalanche:{...t.avalanche,season_months:h}}),helper:"e.g., 12, 1, 2, 3, 4"})]})]}),A.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm font-medium text-slate-300",children:"USGS Stream Gauges"}),A.jsx(et,{label:"",checked:((r=t.usgs)==null?void 0:r.enabled)||!1,onChange:h=>{var v,p;return e({...t,usgs:{...t.usgs,enabled:h,tick_seconds:((v=t.usgs)==null?void 0:v.tick_seconds)||900,sites:((p=t.usgs)==null?void 0:p.sites)||[]}})}})]}),((n=t.usgs)==null?void 0:n.enabled)&&A.jsxs(A.Fragment,{children:[A.jsx(Ye,{label:"Tick Seconds",value:t.usgs.tick_seconds,onChange:h=>e({...t,usgs:{...t.usgs,tick_seconds:h}}),min:900}),A.jsx(Za,{label:"Site IDs",value:t.usgs.sites,onChange:h=>e({...t,usgs:{...t.usgs,sites:h}}),helper:"Find IDs at waterdata.usgs.gov/nwis"})]})]}),A.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm font-medium text-slate-300",children:"TomTom Traffic"}),A.jsx(et,{label:"",checked:((i=t.traffic)==null?void 0:i.enabled)||!1,onChange:h=>{var v,p,g;return e({...t,traffic:{...t.traffic,enabled:h,tick_seconds:((v=t.traffic)==null?void 0:v.tick_seconds)||300,api_key:((p=t.traffic)==null?void 0:p.api_key)||"",corridors:((g=t.traffic)==null?void 0:g.corridors)||[]}})}})]}),((a=t.traffic)==null?void 0:a.enabled)&&A.jsxs(A.Fragment,{children:[A.jsx(dt,{label:"API Key",value:t.traffic.api_key,onChange:h=>e({...t,traffic:{...t.traffic,api_key:h}}),type:"password",helper:"Get key at developer.tomtom.com"}),A.jsx(Ye,{label:"Tick Seconds",value:t.traffic.tick_seconds,onChange:h=>e({...t,traffic:{...t.traffic,tick_seconds:h}}),min:60}),A.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Corridors (each with name, lat, lon):"}),(t.traffic.corridors||[]).map((h,v)=>A.jsxs("div",{className:"grid grid-cols-4 gap-2 items-end",children:[A.jsx(dt,{label:"Name",value:h.name,onChange:p=>{const g=[...t.traffic.corridors];g[v]={...h,name:p},e({...t,traffic:{...t.traffic,corridors:g}})}}),A.jsx(Ye,{label:"Lat",value:h.lat,onChange:p=>{const g=[...t.traffic.corridors];g[v]={...h,lat:p},e({...t,traffic:{...t.traffic,corridors:g}})},step:.01}),A.jsx(Ye,{label:"Lon",value:h.lon,onChange:p=>{const g=[...t.traffic.corridors];g[v]={...h,lon:p},e({...t,traffic:{...t.traffic,corridors:g}})},step:.01}),A.jsx("button",{onClick:()=>e({...t,traffic:{...t.traffic,corridors:t.traffic.corridors.filter((p,g)=>g!==v)}}),className:"px-2 py-1 text-xs text-red-400 hover:text-red-300",children:"Remove"})]},v)),A.jsx("button",{onClick:()=>e({...t,traffic:{...t.traffic,corridors:[...t.traffic.corridors||[],{name:"",lat:0,lon:0}]}}),className:"text-xs text-accent hover:underline",children:"+ Add Corridor"})]})]}),A.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("span",{className:"text-sm font-medium text-slate-300",children:"511 Road Conditions"}),A.jsx(et,{label:"",checked:((o=t.roads511)==null?void 0:o.enabled)||!1,onChange:h=>{var v,p,g,m,y;return e({...t,roads511:{...t.roads511,enabled:h,tick_seconds:((v=t.roads511)==null?void 0:v.tick_seconds)||300,api_key:((p=t.roads511)==null?void 0:p.api_key)||"",base_url:((g=t.roads511)==null?void 0:g.base_url)||"",endpoints:((m=t.roads511)==null?void 0:m.endpoints)||["/get/event"],bbox:((y=t.roads511)==null?void 0:y.bbox)||[]}})}})]}),((s=t.roads511)==null?void 0:s.enabled)&&A.jsxs(A.Fragment,{children:[A.jsx(dt,{label:"Base URL",value:t.roads511.base_url,onChange:h=>e({...t,roads511:{...t.roads511,base_url:h}}),placeholder:"https://511.yourstate.gov/api/v2"}),A.jsx(dt,{label:"API Key",value:t.roads511.api_key,onChange:h=>e({...t,roads511:{...t.roads511,api_key:h}}),type:"password",helper:"Leave empty if not required"}),A.jsx(Ye,{label:"Tick Seconds",value:t.roads511.tick_seconds,onChange:h=>e({...t,roads511:{...t.roads511,tick_seconds:h}}),min:60}),A.jsx(Za,{label:"Endpoints",value:t.roads511.endpoints,onChange:h=>e({...t,roads511:{...t.roads511,endpoints:h}}),helper:"e.g., /get/event, /get/mountainpasses"}),A.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[A.jsx(Ye,{label:"West",value:((l=t.roads511.bbox)==null?void 0:l[0])||0,onChange:h=>{const v=[...t.roads511.bbox||[0,0,0,0]];v[0]=h,e({...t,roads511:{...t.roads511,bbox:v}})},step:.01}),A.jsx(Ye,{label:"South",value:((u=t.roads511.bbox)==null?void 0:u[1])||0,onChange:h=>{const v=[...t.roads511.bbox||[0,0,0,0]];v[1]=h,e({...t,roads511:{...t.roads511,bbox:v}})},step:.01}),A.jsx(Ye,{label:"East",value:((c=t.roads511.bbox)==null?void 0:c[2])||0,onChange:h=>{const v=[...t.roads511.bbox||[0,0,0,0]];v[2]=h,e({...t,roads511:{...t.roads511,bbox:v}})},step:.01}),A.jsx(Ye,{label:"North",value:((f=t.roads511.bbox)==null?void 0:f[3])||0,onChange:h=>{const v=[...t.roads511.bbox||[0,0,0,0]];v[3]=h,e({...t,roads511:{...t.roads511,bbox:v}})},step:.01})]}),A.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box filter (leave all 0 to disable)"})]})]})]})]})}function Xye({data:t,onChange:e}){return A.jsxs("div",{className:"space-y-4",children:[A.jsx(et,{label:"Enable Dashboard",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsx(dt,{label:"Host",value:t.host,onChange:r=>e({...t,host:r}),placeholder:"0.0.0.0"}),A.jsx(Ye,{label:"Port",value:t.port,onChange:r=>e({...t,port:r}),min:1,max:65535})]})]})}function qye(){var I;const[t,e]=q.useState(null),[r,n]=q.useState(null),[i,a]=q.useState("bot"),[o,s]=q.useState(!0),[l,u]=q.useState(!1),[c,f]=q.useState(null),[h,v]=q.useState(null),[p,g]=q.useState(!1),[m,y]=q.useState(!1),x=q.useCallback(async()=>{try{const k=await fetch("/api/config");if(!k.ok)throw new Error("Failed to fetch config");const E=await k.json();e(E),n(JSON.parse(JSON.stringify(E))),y(!1),f(null)}catch(k){f(k instanceof Error?k.message:"Unknown error")}finally{s(!1)}},[]);q.useEffect(()=>{x()},[x]),q.useEffect(()=>{t&&r&&y(JSON.stringify(t)!==JSON.stringify(r))},[t,r]);const S=async()=>{if(t){u(!0),f(null),v(null);try{const k=t[i],E=await fetch(`/api/config/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),z=await E.json();if(!E.ok)throw new Error(z.detail||"Save failed");v(`${i} saved successfully`),n(JSON.parse(JSON.stringify(t))),y(!1),z.restart_required&&g(!0),setTimeout(()=>v(null),3e3)}catch(k){f(k instanceof Error?k.message:"Save failed")}finally{u(!1)}}},b=()=>{r&&(e(JSON.parse(JSON.stringify(r))),y(!1))},T=async()=>{try{await fetch("/api/restart",{method:"POST"}),g(!1),v("Restart initiated")}catch{f("Restart failed")}},C=(k,E)=>{t&&e({...t,[k]:E})};if(o)return A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsx("div",{className:"text-slate-400",children:"Loading configuration..."})});if(!t)return A.jsx("div",{className:"flex items-center justify-center h-64",children:A.jsx("div",{className:"text-red-400",children:"Failed to load configuration"})});const M=()=>{switch(i){case"bot":return A.jsx(Rye,{data:t.bot,onChange:k=>C("bot",k)});case"connection":return A.jsx(Nye,{data:t.connection,onChange:k=>C("connection",k)});case"response":return A.jsx(Oye,{data:t.response,onChange:k=>C("response",k)});case"history":return A.jsx(zye,{data:t.history,onChange:k=>C("history",k)});case"memory":return A.jsx(Bye,{data:t.memory,onChange:k=>C("memory",k)});case"context":return A.jsx(Vye,{data:t.context,onChange:k=>C("context",k)});case"commands":return A.jsx(Fye,{data:t.commands,onChange:k=>C("commands",k)});case"llm":return A.jsx(jye,{data:t.llm,onChange:k=>C("llm",k)});case"weather":return A.jsx(Gye,{data:t.weather,onChange:k=>C("weather",k)});case"meshmonitor":return A.jsx(Hye,{data:t.meshmonitor,onChange:k=>C("meshmonitor",k)});case"knowledge":return A.jsx(Wye,{data:t.knowledge,onChange:k=>C("knowledge",k)});case"mesh_sources":return A.jsx(Zye,{data:t.mesh_sources,onChange:k=>C("mesh_sources",k)});case"mesh_intelligence":return A.jsx($ye,{data:t.mesh_intelligence,onChange:k=>C("mesh_intelligence",k)});case"environmental":return A.jsx(Yye,{data:t.environmental,onChange:k=>C("environmental",k)});case"dashboard":return A.jsx(Xye,{data:t.dashboard,onChange:k=>C("dashboard",k)});default:return null}},D=((I=Jz.find(k=>k.key===i))==null?void 0:I.label)||i;return A.jsxs("div",{className:"flex gap-6 h-[calc(100vh-8rem)]",children:[A.jsx("div",{className:"w-48 flex-shrink-0 space-y-1",children:Jz.map(({key:k,label:E,icon:z})=>A.jsxs("button",{onClick:()=>a(k),className:`w-full flex items-center gap-2 px-3 py-2 rounded text-sm transition-colors ${i===k?"bg-accent text-white":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[A.jsx(z,{size:16}),A.jsx("span",{children:E}),m&&i===k&&A.jsx("span",{className:"ml-auto w-2 h-2 bg-amber-500 rounded-full"})]},k))}),A.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[A.jsxs("div",{className:"flex items-center justify-between mb-6",children:[A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsx(E3,{size:20,className:"text-slate-500"}),A.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:D})]}),A.jsxs("div",{className:"flex items-center gap-2",children:[m&&A.jsxs("button",{onClick:b,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-slate-400 hover:text-slate-200 bg-bg-hover rounded transition-colors",children:[A.jsx(RZ,{size:14}),"Discard"]}),A.jsxs("button",{onClick:S,disabled:l||!m,className:"flex items-center gap-1.5 px-4 py-1.5 text-sm bg-accent text-white rounded hover:bg-accent/80 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[l?A.jsx(EZ,{size:14,className:"animate-spin"}):A.jsx(NZ,{size:14}),"Save"]})]})]}),p&&A.jsxs("div",{className:"flex items-center justify-between p-3 mb-4 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:[A.jsxs("div",{className:"flex items-center gap-2 text-amber-400",children:[A.jsx(S0,{size:16}),A.jsx("span",{className:"text-sm",children:"Restart required for changes to take effect"})]}),A.jsx("button",{onClick:T,className:"px-3 py-1 text-sm bg-amber-500 text-white rounded hover:bg-amber-600 transition-colors",children:"Restart Now"})]}),c&&A.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-red-500/10 border border-red-500/30 rounded-lg text-red-400",children:[A.jsx(jZ,{size:16}),A.jsx("span",{className:"text-sm",children:c})]}),h&&A.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-green-500/10 border border-green-500/30 rounded-lg text-green-400",children:[A.jsx(SZ,{size:16}),A.jsx("span",{className:"text-sm",children:h})]}),A.jsx("div",{className:"flex-1 overflow-y-auto pr-2",children:A.jsx("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:M()})})]})]})}function Kye(){return A.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center",children:[A.jsx("div",{className:"w-16 h-16 rounded-full bg-bg-card border border-border flex items-center justify-center mb-6",children:A.jsx(C3,{size:32,className:"text-slate-500"})}),A.jsx("h2",{className:"text-xl font-semibold text-slate-300 mb-2",children:"Alerts"}),A.jsx("p",{className:"text-slate-500 max-w-md",children:"Alert history and subscriptions coming in Phase 11"})]})}function Qye(){return A.jsx(a$,{children:A.jsxs(rZ,{children:[A.jsx(Ku,{path:"/",element:A.jsx(c$,{})}),A.jsx(Ku,{path:"/mesh",element:A.jsx(Lye,{})}),A.jsx(Ku,{path:"/environment",element:A.jsx(Iye,{})}),A.jsx(Ku,{path:"/config",element:A.jsx(qye,{})}),A.jsx(Ku,{path:"/alerts",element:A.jsx(Kye,{})})]})})}GS.createRoot(document.getElementById("root")).render(A.jsx(Ec.StrictMode,{children:A.jsx(uZ,{children:A.jsx(Qye,{})})})); diff --git a/meshai/dashboard/static/index.html b/meshai/dashboard/static/index.html index c05b5d2..0c5c8df 100644 --- a/meshai/dashboard/static/index.html +++ b/meshai/dashboard/static/index.html @@ -8,8 +8,8 @@ - - + +
diff --git a/meshai/env/avalanche.py b/meshai/env/avalanche.py index 17ee690..0e6330a 100644 --- a/meshai/env/avalanche.py +++ b/meshai/env/avalanche.py @@ -31,7 +31,7 @@ class AvalancheAdapter: } def __init__(self, config: "AvalancheConfig"): - self._center_ids = config.center_ids or ["SNFAC"] + self._center_ids = config.center_ids self._tick_interval = config.tick_seconds or 1800 self._season_months = config.season_months or [12, 1, 2, 3, 4] self._last_tick = 0.0 diff --git a/meshai/env/ducting.py b/meshai/env/ducting.py index ef5ea91..ce3571b 100644 --- a/meshai/env/ducting.py +++ b/meshai/env/ducting.py @@ -28,8 +28,8 @@ class DuctingAdapter: """Tropospheric ducting assessment from Open-Meteo GFS pressure levels.""" def __init__(self, config: "DuctingConfig"): - self._lat = config.latitude or 42.56 - self._lon = config.longitude or -114.47 + self._lat = config.latitude + self._lon = config.longitude self._tick_interval = config.tick_seconds or 10800 # 3 hours self._last_tick = 0.0 self._status = {} diff --git a/meshai/env/fires.py b/meshai/env/fires.py index 177cc79..83c7ed5 100644 --- a/meshai/env/fires.py +++ b/meshai/env/fires.py @@ -20,7 +20,7 @@ class NICFFiresAdapter: BASE_URL = "https://services3.arcgis.com/T4QMspbfLg3qTGWY/arcgis/rest/services/WFIGS_Interagency_Perimeters_Current/FeatureServer/0/query" def __init__(self, config: "NICFFiresConfig", region_anchors: list = None): - self._state = config.state or "US-ID" + self._state = config.state self._tick_interval = config.tick_seconds or 600 self._last_tick = 0.0 self._events = []