@iqworksai/common-components 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,159 +1 @@
1
- "use strict";var g1=Object.defineProperty;var p1=(e,t,n)=>t in e?g1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var W=(e,t,n)=>p1(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),S=require("react"),fn=require("react-dom");function Cp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const z=Cp(S),Xs=Cp(fn);var wp={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ld=S.createContext&&S.createContext(wp),m1=["attr","size","title"];function b1(e,t){if(e==null)return{};var n=v1(e,t),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)i=o[r],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function v1(e,t){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}function Ys(){return Ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ys.apply(this,arguments)}function Vd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function Zs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vd(Object(n),!0).forEach(function(i){x1(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vd(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function x1(e,t,n){return t=y1(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y1(e){var t=C1(e,"string");return typeof t=="symbol"?t:t+""}function C1(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sp(e){return e&&e.map((t,n)=>S.createElement(t.tag,Zs({key:n},t.attr),Sp(t.child)))}function de(e){return t=>S.createElement(w1,Ys({attr:Zs({},e.attr)},t),Sp(e.child))}function w1(e){var t=n=>{var{attr:i,size:r,title:o}=e,s=b1(e,m1),a=r||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),S.createElement("svg",Ys({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,s,{className:l,style:Zs(Zs({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&S.createElement("title",null,o),e.children)};return Ld!==void 0?S.createElement(Ld.Consumer,null,n=>t(n)):t(wp)}function S1(e){return de({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm108.25 138.29-134.4 160a16 16 0 0 1-12 5.71h-.27a16 16 0 0 1-11.89-5.3l-57.6-64a16 16 0 1 1 23.78-21.4l45.29 50.32 122.59-145.91a16 16 0 0 1 24.5 20.58z"},child:[]}]})(e)}function I1(e){return de({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm75.31 260.69a16 16 0 1 1-22.62 22.62L256 278.63l-52.69 52.68a16 16 0 0 1-22.62-22.62L233.37 256l-52.68-52.69a16 16 0 0 1 22.62-22.62L256 233.37l52.69-52.68a16 16 0 0 1 22.62 22.62L278.63 256z"},child:[]}]})(e)}function _1(e){return de({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 56C145.72 56 56 145.72 56 256s89.72 200 200 200 200-89.72 200-200S366.28 56 256 56zm0 82a26 26 0 1 1-26 26 26 26 0 0 1 26-26zm48 226h-88a16 16 0 0 1 0-32h28v-88h-16a16 16 0 0 1 0-32h32a16 16 0 0 1 16 16v104h28a16 16 0 0 1 0 32z"},child:[]}]})(e)}function E1(e){return de({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M449.07 399.08 278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0 0 80 446.25h340.89a32 32 0 0 0 28.18-47.17zm-198.6-1.83a20 20 0 1 1 20-20 20 20 0 0 1-20 20zm21.72-201.15-5.74 122a16 16 0 0 1-32 0l-5.74-121.95a21.73 21.73 0 0 1 21.5-22.69h.21a21.74 21.74 0 0 1 21.73 22.7z"},child:[]}]})(e)}const A1={info:"bg-brand-surface-subtle border-brand-primary",warning:"bg-amber-50 dark:bg-amber-900/20 border-amber-200 dark:border-amber-700 text-amber-800 dark:text-amber-200",success:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800 text-green-800 dark:text-green-200",error:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800 text-red-800 dark:text-red-200"},M1={info:_1,warning:E1,success:S1,error:I1},R1=({variant:e="info",title:t,children:n,compact:i=!1,className:r="",borderStyle:o="left",icon:s=!0})=>{const a=M1[e],l=i?"p-3":"p-4",c=o==="left"?"border-l-4":"border rounded-lg";return v.jsx("div",{className:`${A1[e]} ${c} ${l} ${r}`,children:v.jsxs("div",{className:s?"flex items-start":"",children:[s&&v.jsx(a,{className:`${i?"text-lg":"text-xl"} mr-3 flex-shrink-0 mt-0.5`}),v.jsxs("div",{className:"flex-1",children:[t&&v.jsx("p",{className:`font-semibold ${i?"text-sm":""} ${typeof n=="string"?"":"mb-1"}`,children:t}),typeof n=="string"?v.jsx("p",{className:i?"text-sm":"",children:n}):v.jsx("div",{className:i?"text-sm":"",children:n})]})]})})},P1=({isLoading:e,isRelative:t})=>e?v.jsxs("div",{"data-testid":"loader-overlay",role:"status","aria-live":"polite","aria-label":"Loading",className:`${t?"absolute":"fixed"} inset-0 flex items-center justify-center bg-black/50 dark:bg-black/70 z-[99990]`,children:[v.jsx("div",{"data-testid":"loader-spinner",className:"loader rounded-full w-12 h-12 animate-spin",style:{border:"4px solid var(--brand-light)",borderTopColor:"var(--brand-orange)"}}),v.jsx("span",{className:"sr-only",children:"Loading..."})]}):null;function Bd(e){return de({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z"},child:[]}]})(e)}function $d(e){return de({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},child:[]}]})(e)}function jd(e){return de({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"},child:[]}]})(e)}function Ip(e){return de({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},child:[]}]})(e)}function k1(e){return de({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"},child:[]}]})(e)}function Gd(e){return de({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64z"},child:[]}]})(e)}function F1(e){return de({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},child:[]}]})(e)}function O1(e){return de({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M202.021 0C122.202 0 70.503 32.703 29.914 91.026c-7.363 10.58-5.093 25.086 5.178 32.874l43.138 32.709c10.373 7.865 25.132 6.026 33.253-4.148 25.049-31.381 43.63-49.449 82.757-49.449 30.764 0 68.816 19.799 68.816 49.631 0 22.552-18.617 34.134-48.993 51.164-35.423 19.86-82.299 44.576-82.299 106.405V320c0 13.255 10.745 24 24 24h72.471c13.255 0 24-10.745 24-24v-5.773c0-42.86 125.268-44.645 125.268-160.627C377.504 66.256 286.902 0 202.021 0zM192 373.459c-38.196 0-69.271 31.075-69.271 69.271 0 38.195 31.075 69.27 69.271 69.27s69.271-31.075 69.271-69.271-31.075-69.27-69.271-69.27z"},child:[]}]})(e)}function T1(e){return de({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"},child:[]}]})(e)}function D1(e){return de({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"},child:[]}]})(e)}function _p(e){return de({attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"},child:[]}]})(e)}function kt(...e){const t=[];for(const n of e)if(n){if(typeof n=="string")t.push(n);else if(typeof n=="number")t.push(String(n));else if(Array.isArray(n)){const i=kt(...n);i&&t.push(i)}}return t.join(" ")}function N1(e,t,n=""){return e?t:n}function L1(e,t,n=""){return t[e]||n}const du=e=>{S.useEffect(()=>{if(!e)return;const t=document.body.style.overflow,n=document.body.style.paddingRight,i=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",i>0&&(document.body.style.paddingRight=`${i}px`),document.body.classList.add("overflow-hidden"),()=>{document.body.style.overflow=t,document.body.style.paddingRight=n,document.body.classList.remove("overflow-hidden")}},[e])},fu=({title:e,subtitle:t,isUuidSubtitle:n=!0,body:i,onClose:r,onConfirm:o,onDelete:s,showFooter:a=!0,customFooter:l,isOpen:c,confirmButtonText:u="Confirm",disableConfirm:d,deleteButtonText:f="Delete",cancelButtonText:h="Cancel",customWidth:g="max-w-screen-lg max-h-[90vh] lg:min-w-[600px]",wrapperClass:p})=>{if(du(c),!c)return null;const m=v.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-[40] p-4 overflow-y-auto",children:v.jsxs("div",{className:kt("relative py-4 rounded-lg shadow-lg modal","w-[95%] sm:w-[90%] md:w-[85%] lg:w-auto","min-w-[320px] sm:min-w-[400px] md:min-w-[500px]","max-h-[90vh] flex flex-col",g,p),style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},children:[v.jsx(V1,{title:e,onClose:r}),t&&v.jsx(B1,{subtitle:t,isUuidSubtitle:n}),i&&v.jsx($1,{body:i}),a&&v.jsx(j1,{customFooter:l,onClose:r,onConfirm:o,onDelete:s,cancelButtonText:h,confirmButtonText:u,deleteButtonText:f,disableConfirm:d})]})});return fn.createPortal(m,document.getElementById("modal-root")||document.body)},V1=({title:e,onClose:t})=>v.jsx("div",{className:"px-4 flex-shrink-0",children:v.jsxs("div",{className:"flex justify-between items-center",children:[v.jsx("h2",{className:"text-lg font-semibold",style:{color:"var(--text-color)",fontFamily:"var(--font-family-heading, 'Afacad', 'Rubik', sans-serif)"},children:typeof e=="string"?v.jsx("span",{children:e}):e}),v.jsx("button",{onClick:t,className:"text-brand-primary hover:opacity-80","aria-label":"Close",children:v.jsx(_p,{size:16})})]})}),B1=({subtitle:e,isUuidSubtitle:t})=>v.jsx("div",{className:"px-4 flex-shrink-0",children:v.jsxs("div",{className:kt("mt-1 p-2 text-xs rounded-md flex flex-wrap",t?"gap-1":"flex-col"),style:{backgroundColor:"var(--hover-bg-color)",color:"var(--text-color)"},children:[t&&v.jsx("b",{style:{color:"var(--text-color)"},children:"UUID:"}),typeof e=="string"?v.jsx("span",{className:"break-all",children:e}):e]})}),$1=({body:e})=>v.jsx("div",{className:kt("px-4 text-sm modal-body flex-1",typeof e=="string"?"pb-4 mt-2":"pb-1 mt-1"),children:typeof e=="string"?v.jsx("p",{className:"break-words",style:{color:"var(--text-color)"},children:e}):e}),j1=({customFooter:e,onClose:t,onConfirm:n,onDelete:i,cancelButtonText:r,confirmButtonText:o,deleteButtonText:s,disableConfirm:a})=>v.jsx("div",{className:"px-4 mt-1 flex-shrink-0",children:e||v.jsxs("div",{className:"flex flex-wrap justify-between gap-2 sm:space-x-2",children:[t&&r&&v.jsx("button",{"data-testid":"modal-cancel-button",onClick:t,className:"px-4 py-2 rounded footer-button",style:{backgroundColor:"var(--hover-bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)"},onMouseEnter:l=>l.currentTarget.style.backgroundColor="var(--brand-light)",onMouseLeave:l=>l.currentTarget.style.backgroundColor="var(--hover-bg-color)",children:r}),i&&v.jsx("button",{"data-testid":"modal-delete-button",onClick:i,className:kt("border border-red-600 text-red-600 px-4 py-2 rounded-md","hover:bg-red-200 dark:text-red-400","dark:hover:bg-red-700 dark:border-red-500","footer-button"),children:s}),n&&v.jsx("button",{"data-testid":"modal-save-button",onClick:n,disabled:a,className:kt("bg-brand-primary text-white px-4 py-2 rounded-md hover:bg-[var(--brand-orange)]/90","footer-button",a&&"opacity-50 cursor-not-allowed"),children:o})]})});function G1(e){return de({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C140.559 48 48 140.559 48 256c0 115.436 92.559 208 208 208 115.435 0 208-92.564 208-208 0-115.441-92.564-208-208-208zm104.002 282.881l-29.12 29.117L256 285.117l-74.881 74.881-29.121-29.117L226.881 256l-74.883-74.881 29.121-29.116L256 226.881l74.881-74.878 29.12 29.116L285.119 256l74.883 74.881z"},child:[]}]})(e)}function z1(e){return de({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"},child:[]}]})(e)}function H1(e){return de({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"},child:[]}]})(e)}function W1(e){return de({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"},child:[]}]})(e)}function X1(e){return de({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M9.836 3.244c.963-1.665 3.365-1.665 4.328 0l8.967 15.504c.963 1.667-.24 3.752-2.165 3.752H3.034c-1.926 0-3.128-2.085-2.165-3.752ZM12 8.5a.75.75 0 0 0-.75.75v4.5a.75.75 0 0 0 1.5 0v-4.5A.75.75 0 0 0 12 8.5Zm1 9a1 1 0 1 0-2 0 1 1 0 0 0 2 0Z"},child:[]}]})(e)}var Mt=(e=>(e.SUCCESS="success",e.ERROR="error",e.INFO="info",e.WARNING="warning",e))(Mt||{}),hu=(e=>(e.SCANS="scans",e.ATTRIBUTE="attributes",e.ENDPOINT="endpoint",e.DEPARTMENTS="departments",e.CONNECTORS="connectors",e.SHARED_DRIVE="shared_drive",e.ONE_DRIVE="one_drive",e.AWS_S3="aws_s3",e.OUTLOOK="outlook",e.SALESFORCE="salesforce",e.SCANRESULT="scansResult",e.PROCESSED="ProcessedResults",e.FILE="File",e.FILEBROWSER="fileBrowser",e.SCANCONNECTORS="scanConnectors",e.METADATA="metaData",e.FILTERED="filtered",e.LEGENDS="legends",e.REPORTS="reports",e.APPLICATION_CATALOG="application_catalog",e.CLASSIFICATION_LEVELS="classification_levels",e.CLASSIFICATION_RULES="classification_rules",e.AUDIT_TRAIL="audit_trail",e.RETENTION_RULES="retention_rules",e.RETENTION_AUDIT_TRAIL="retention_audit_trail",e))(hu||{}),mi=(e=>(e.LINEAR="Linear",e.LOG="logarithmic",e.NORMALISED="normalised",e))(mi||{}),Ep=(e=>(e.DEPARTMENTS="departments",e.GEOLOCATIONS="geolocations",e))(Ep||{}),Ap=(e=>(e.DATABASE="database",e.SHARED_DRIVE="shared_drive",e.ONE_DRIVE="one_drive",e.AWS_S3="aws_s3",e.SALESFORCE="salesforce",e))(Ap||{}),Mp=(e=>(e.SCAN_STATUS="scan_status",e))(Mp||{});const zd={[Mt.SUCCESS]:v.jsx(z1,{size:"1.5rem"}),[Mt.INFO]:v.jsx(W1,{size:"1.5rem"}),[Mt.ERROR]:v.jsx(H1,{size:"1.5rem"}),[Mt.WARNING]:v.jsx(X1,{size:"1.5rem"})},Y1=({message:e,type:t=Mt.INFO,duration:n=5e3,onClose:i})=>{S.useEffect(()=>{const o=setTimeout(()=>{i()},n);return()=>clearTimeout(o)},[n,i]);const r=o=>{o.stopPropagation(),i()};return v.jsxs("div",{className:`toast toast-${t}`,role:"alert","aria-live":"assertive",onClick:o=>o.stopPropagation(),children:[zd[t]&&v.jsx("span",{className:"toast-icon",children:zd[t]}),v.jsx("div",{className:"toast-message",children:e}),v.jsx("button",{onClick:r,"aria-label":"Close notification",className:"toast-close-button",children:v.jsx(G1,{size:"1.2rem"})})]})},La=({text:e,children:t,position:n="bottom",fixedWidth:i=!1,isVisible:r=!0})=>{const[o,s]=S.useState(!1),[a,l]=S.useState({}),[c,u]=S.useState({}),d=S.useRef(null),f=S.useRef(null);return S.useEffect(()=>{if(!r){s(!1);return}if(!o||!d.current)return;const h=d.current.getBoundingClientRect(),g=f.current;if(!g)return;const p=g.getBoundingClientRect(),m=window.innerWidth,b=window.innerHeight;let y=n,x=0,I=0,C=0,M=0;switch(n==="top"&&h.top-p.height<10?y="bottom":n==="bottom"&&h.bottom+p.height>b-10?y="top":n==="left"&&h.left-p.width<10?y="right":n==="right"&&h.right+p.width>m-10&&(y="left"),y){case"top":x=h.top-p.height-8,I=h.left+h.width/2-p.width/2,C=p.height-4,M=p.width/2-5;break;case"bottom":x=h.bottom+8,I=h.left+h.width/2-p.width/2,C=-5,M=p.width/2-5;break;case"left":x=h.top+h.height/2-p.height/2,I=h.left-p.width-8,C=p.height/2-5,M=p.width-4;break;case"right":x=h.top+h.height/2-p.height/2,I=h.right+8,C=p.height/2-5,M=-5;break}l({top:`${x}px`,left:`${I}px`,opacity:1,visibility:"visible"}),u({top:`${C}px`,left:`${M}px`,transform:"rotate(45deg)"})},[r,o,n]),v.jsxs("div",{className:"tooltip-wrapper",ref:d,onMouseEnter:()=>r&&s(!0),onMouseLeave:()=>r&&s(!1),children:[t,r&&o&&fn.createPortal(v.jsxs("div",{ref:f,className:`tooltip ${i?"fixed-width":""}`,style:a,children:[e,v.jsx("span",{className:"tooltip-arrow",style:c})]}),document.body)]})},Xt={failed:"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400",running:"bg-yellow-200 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400",partial_successful:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",successful:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",not_started:"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300",request_received:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",completed:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",suspended:"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400",cancelled:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400",scheduled:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400"},tc={scheduled:{icon:jd,label:"Scheduled",colorClass:Xt.scheduled||"bg-blue-100 text-blue-700"},completed:{icon:$d,label:"Completed",colorClass:Xt.completed||"bg-green-100 text-green-700"},successful:{icon:$d,label:"Successful",colorClass:Xt.successful||"bg-green-100 text-green-700"},failed:{icon:D1,label:"Failed",colorClass:Xt.failed||"bg-red-100 text-red-700"},partial_successful:{icon:Ip,label:"Partially Successful",colorClass:Xt.partial_successful||"bg-blue-100 text-blue-700"},running:{icon:T1,animation:"animate-spin",label:"Running",colorClass:Xt.running||"bg-yellow-200 text-yellow-700"},not_started:{icon:jd,label:"Not Started",colorClass:Xt.not_started||"bg-gray-100 text-gray-700"},request_received:{icon:Gd,label:"Request Received",colorClass:Xt.request_received||"bg-blue-100 text-blue-700"},queue:{icon:Gd,label:"In Queue",colorClass:"bg-blue-100 text-blue-700"},suspended:{icon:Bd,label:"Suspended",colorClass:Xt.suspended||"bg-orange-100 text-orange-700"},cancelled:{icon:Bd,label:"Cancelled",colorClass:Xt.cancelled||"bg-purple-100 text-purple-700"},unknown:{icon:O1,label:"Unknown",colorClass:"bg-gray-100 text-gray-700"}},gu=e=>tc[e]||tc.unknown,Z1=e=>["running","not_started","request_received"].includes(e),J1=e=>["failed","cancelled","suspended","unknown"].includes(e),U1=e=>["completed","successful"].includes(e),Js=S.memo(({statusKey:e})=>{const{icon:t,animation:n}=gu(e);return v.jsx(t,{className:kt("mr-1",n)})});Js.displayName="StatusIcon";const Q1=({statusKey:e,statusLabel:t,scheduledTime:n,recurrenceDetails:i,showScheduledInfo:r=!1,adjustWidth:o=!0})=>{const{colorClass:s}=gu(e);return r&&n?v.jsxs("div",{className:`flex flex-col items-center ${o?"w-max":""}`,children:[v.jsxs("span",{className:kt("inline-flex items-center px-2 py-1 text-xs font-medium rounded w-max",s),children:[v.jsx(Js,{statusKey:e}),t]}),v.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[v.jsx("span",{className:"text-[10px] text-gray-500",children:n}),i&&v.jsx(La,{text:i,position:"top",children:v.jsx(F1,{className:"text-xs cursor-pointer",style:{color:"var(--secondary-text-color)"}})})]})]}):v.jsxs("span",{className:kt("inline-flex items-center px-2 py-1 text-xs font-medium rounded",s),children:[v.jsx(Js,{statusKey:e}),t]})},K1=({enabled:e,setEnabled:t,id:n="toggle-switch",disabled:i=!1,ariaLabel:r})=>{const o=S.useCallback(()=>{i||t(!e)},[e,t,i]);return v.jsx("button",{id:n,type:"button",role:"switch","aria-checked":e,"aria-label":r,disabled:i,onClick:o,className:kt("toggle-switch",e?"toggle-on":"toggle-off",i&&"opacity-50 cursor-not-allowed"),children:v.jsx("span",{className:kt("toggle-knob",e?"knob-on":"knob-off")})})},q1=typeof document<"u"?S.useLayoutEffect:()=>{},oi=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},vi=e=>e&&"window"in e&&e.window===e?e:oi(e).defaultView||window;function ex(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function tx(e){return ex(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let nx=!1;function pu(){return nx}function Rp(e,t){if(!pu())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:tx(n)?n=n.host:n=n.parentNode}return!1}const nc=(e=document)=>{var t;if(!pu())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function Pp(e){return pu()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function ix(e){if(rx())e.focus({preventScroll:!0});else{let t=ox(e);e.focus(),sx(t)}}let Go=null;function rx(){if(Go==null){Go=!1;try{document.createElement("div").focus({get preventScroll(){return Go=!0,!0}})}catch{}}return Go}function ox(e){let t=e.parentNode,n=[],i=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==i;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return i instanceof HTMLElement&&n.push({element:i,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft}),n}function sx(e){for(let{element:t,scrollTop:n,scrollLeft:i}of e)t.scrollTop=n,t.scrollLeft=i}function Va(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let n=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(n)&&n.some(i=>e.test(i.brand))||e.test(window.navigator.userAgent)}function mu(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Vn(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const lo=Vn(function(){return mu(/^Mac/i)}),ax=Vn(function(){return mu(/^iPhone/i)}),kp=Vn(function(){return mu(/^iPad/i)||lo()&&navigator.maxTouchPoints>1}),lx=Vn(function(){return ax()||kp()});Vn(function(){return lo()||lx()});const cx=Vn(function(){return Va(/AppleWebKit/i)&&!ux()}),ux=Vn(function(){return Va(/Chrome/i)}),dx=Vn(function(){return Va(/Android/i)}),fx=Vn(function(){return Va(/Firefox/i)});function co(e,t,n=!0){var i,r;let{metaKey:o,ctrlKey:s,altKey:a,shiftKey:l}=t;fx()&&(!((r=window.event)===null||r===void 0||(i=r.type)===null||i===void 0)&&i.startsWith("key"))&&e.target==="_blank"&&(lo()?o=!0:s=!0);let c=cx()&&lo()&&!kp()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:s,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:s,altKey:a,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});co.isOpening=n,ix(e),e.dispatchEvent(c),co.isOpening=!1}co.isOpening=!1;function Fp(){let e=S.useRef(new Map),t=S.useCallback((r,o,s,a)=>{let l=a!=null&&a.once?(...c)=>{e.current.delete(s),s(...c)}:s;e.current.set(s,{type:o,eventTarget:r,fn:l,options:a}),r.addEventListener(o,l,a)},[]),n=S.useCallback((r,o,s,a)=>{var l;let c=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;r.removeEventListener(o,c,a),e.current.delete(s)},[]),i=S.useCallback(()=>{e.current.forEach((r,o)=>{n(r.eventTarget,r.type,o,r.options)})},[n]);return S.useEffect(()=>i,[i]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:i}}function hx(e){return e.pointerType===""&&e.isTrusted?!0:dx()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Op(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function gx(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Tp(e){let t=S.useRef({isFocused:!1,observer:null});return q1(()=>{const n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),S.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=n.target,r=o=>{if(t.current.isFocused=!1,i.disabled){let s=Op(o);e==null||e(s)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",r,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var o;(o=t.current.observer)===null||o===void 0||o.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let px=!1,Ro=null,ic=new Set,Xr=new Map,ki=!1,rc=!1;const mx={Tab:!0,Escape:!0};function bu(e,t){for(let n of ic)n(e,t)}function bx(e){return!(e.metaKey||!lo()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Us(e){ki=!0,!co.isOpening&&bx(e)&&(Ro="keyboard",bu("keyboard",e))}function Vt(e){Ro="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(ki=!0,bu("pointer",e))}function Dp(e){!co.isOpening&&hx(e)&&(ki=!0,Ro="virtual")}function Np(e){e.target===window||e.target===document||px||!e.isTrusted||(!ki&&!rc&&(Ro="virtual",bu("virtual",e)),ki=!1,rc=!1)}function Lp(){ki=!1,rc=!0}function oc(e){if(typeof window>"u"||typeof document>"u"||Xr.get(vi(e)))return;const t=vi(e),n=oi(e);let i=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){ki=!0,i.apply(this,arguments)},n.addEventListener("keydown",Us,!0),n.addEventListener("keyup",Us,!0),n.addEventListener("click",Dp,!0),t.addEventListener("focus",Np,!0),t.addEventListener("blur",Lp,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Vt,!0),n.addEventListener("pointermove",Vt,!0),n.addEventListener("pointerup",Vt,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Vt,!0),n.addEventListener("mousemove",Vt,!0),n.addEventListener("mouseup",Vt,!0)),t.addEventListener("beforeunload",()=>{Vp(e)},{once:!0}),Xr.set(t,{focus:i})}const Vp=(e,t)=>{const n=vi(e),i=oi(e);t&&i.removeEventListener("DOMContentLoaded",t),Xr.has(n)&&(n.HTMLElement.prototype.focus=Xr.get(n).focus,i.removeEventListener("keydown",Us,!0),i.removeEventListener("keyup",Us,!0),i.removeEventListener("click",Dp,!0),n.removeEventListener("focus",Np,!0),n.removeEventListener("blur",Lp,!1),typeof PointerEvent<"u"?(i.removeEventListener("pointerdown",Vt,!0),i.removeEventListener("pointermove",Vt,!0),i.removeEventListener("pointerup",Vt,!0)):process.env.NODE_ENV==="test"&&(i.removeEventListener("mousedown",Vt,!0),i.removeEventListener("mousemove",Vt,!0),i.removeEventListener("mouseup",Vt,!0)),Xr.delete(n))};function vx(e){const t=oi(e);let n;return t.readyState!=="loading"?oc(e):(n=()=>{oc(e)},t.addEventListener("DOMContentLoaded",n)),()=>Vp(e,n)}typeof document<"u"&&vx();function Bp(){return Ro!=="pointer"}const xx=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function yx(e,t,n){let i=oi(n==null?void 0:n.target);const r=typeof window<"u"?vi(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?vi(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?vi(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?vi(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||i.activeElement instanceof r&&!xx.has(i.activeElement.type)||i.activeElement instanceof o||i.activeElement instanceof s&&i.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof a&&!mx[n.key])}function Cx(e,t,n){oc(),S.useEffect(()=>{let i=(r,o)=>{yx(!!(n!=null&&n.isTextInput),r,o)&&e(Bp())};return ic.add(i),()=>{ic.delete(i)}},t)}function wx(e){let{isDisabled:t,onFocus:n,onBlur:i,onFocusChange:r}=e;const o=S.useCallback(l=>{if(l.target===l.currentTarget)return i&&i(l),r&&r(!1),!0},[i,r]),s=Tp(o),a=S.useCallback(l=>{const c=oi(l.target),u=c?nc(c):nc();l.target===l.currentTarget&&u===Pp(l.nativeEvent)&&(n&&n(l),r&&r(!0),s(l))},[r,n,s]);return{focusProps:{onFocus:!t&&(n||r||i)?a:void 0,onBlur:!t&&(i||r)?o:void 0}}}function Sx(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:i,onFocusWithinChange:r}=e,o=S.useRef({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:a}=Fp(),l=S.useCallback(d=>{d.currentTarget.contains(d.target)&&o.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(o.current.isFocusWithin=!1,a(),n&&n(d),r&&r(!1))},[n,r,o,a]),c=Tp(l),u=S.useCallback(d=>{if(!d.currentTarget.contains(d.target))return;const f=oi(d.target),h=nc(f);if(!o.current.isFocusWithin&&h===Pp(d.nativeEvent)){i&&i(d),r&&r(!0),o.current.isFocusWithin=!0,c(d);let g=d.currentTarget;s(f,"focus",p=>{if(o.current.isFocusWithin&&!Rp(g,p.target)){let m=new f.defaultView.FocusEvent("blur",{relatedTarget:p.target});gx(m,g);let b=Op(m);l(b)}},{capture:!0})}},[i,r,c,s,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}let Qs=!1,zo=0;function sc(){Qs=!0,setTimeout(()=>{Qs=!1},50)}function Hd(e){e.pointerType==="touch"&&sc()}function Ix(){if(!(typeof document>"u"))return zo===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Hd):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",sc)),zo++,()=>{zo--,!(zo>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Hd):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",sc))}}function _x(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:i,isDisabled:r}=e,[o,s]=S.useState(!1),a=S.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;S.useEffect(Ix,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=Fp(),{hoverProps:u,triggerHoverEnd:d}=S.useMemo(()=>{let f=(p,m)=>{if(a.pointerType=m,r||m==="touch"||a.isHovered||!p.currentTarget.contains(p.target))return;a.isHovered=!0;let b=p.currentTarget;a.target=b,l(oi(p.target),"pointerover",y=>{a.isHovered&&a.target&&!Rp(a.target,y.target)&&h(y,y.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:b,pointerType:m}),n&&n(!0),s(!0)},h=(p,m)=>{let b=a.target;a.pointerType="",a.target=null,!(m==="touch"||!a.isHovered||!b)&&(a.isHovered=!1,c(),i&&i({type:"hoverend",target:b,pointerType:m}),n&&n(!1),s(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=p=>{Qs&&p.pointerType==="mouse"||f(p,p.pointerType)},g.onPointerLeave=p=>{!r&&p.currentTarget.contains(p.target)&&h(p,p.pointerType)}):process.env.NODE_ENV==="test"&&(g.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=p=>{!a.ignoreEmulatedMouseEvents&&!Qs&&f(p,"mouse"),a.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=p=>{!r&&p.currentTarget.contains(p.target)&&h(p,"mouse")}),{hoverProps:g,triggerHoverEnd:h}},[t,n,i,r,a,l,c]);return S.useEffect(()=>{r&&d({currentTarget:a.target},a.pointerType)},[r]),{hoverProps:u,isHovered:o}}function Ex(e={}){let{autoFocus:t=!1,isTextInput:n,within:i}=e,r=S.useRef({isFocused:!1,isFocusVisible:t||Bp()}),[o,s]=S.useState(!1),[a,l]=S.useState(()=>r.current.isFocused&&r.current.isFocusVisible),c=S.useCallback(()=>l(r.current.isFocused&&r.current.isFocusVisible),[]),u=S.useCallback(h=>{r.current.isFocused=h,s(h),c()},[c]);Cx(h=>{r.current.isFocusVisible=h,c()},[],{isTextInput:n});let{focusProps:d}=wx({isDisabled:i,onFocusChange:u}),{focusWithinProps:f}=Sx({isDisabled:!i,onFocusWithinChange:u});return{isFocused:o,isFocusVisible:a,focusProps:i?f:d}}var Ax=Object.defineProperty,Mx=(e,t,n)=>t in e?Ax(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ll=(e,t,n)=>(Mx(e,typeof t!="symbol"?t+"":t,n),n);let Rx=class{constructor(){ll(this,"current",this.detect()),ll(this,"handoffState","pending"),ll(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Si=new Rx;function Po(e){var t;return Si.isServer?null:e==null?document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function Ks(e){var t,n;return Si.isServer?null:e==null?document:(n=(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))!=null?n:document}function vu(e){var t,n;return(n=(t=Ks(e))==null?void 0:t.activeElement)!=null?n:null}function Px(e){return vu(e)===e}function $p(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Et(){let e=[],t={addEventListener(n,i,r,o){return n.addEventListener(i,r,o),t.add(()=>n.removeEventListener(i,r,o))},requestAnimationFrame(...n){let i=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(i))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let i=setTimeout(...n);return t.add(()=>clearTimeout(i))},microTask(...n){let i={current:!0};return $p(()=>{i.current&&n[0]()}),t.add(()=>{i.current=!1})},style(n,i,r){let o=n.style.getPropertyValue(i);return Object.assign(n.style,{[i]:r}),this.add(()=>{Object.assign(n.style,{[i]:o})})},group(n){let i=Et();return n(i),this.add(()=>i.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let i=e.indexOf(n);if(i>=0)for(let r of e.splice(i,1))r()}},dispose(){for(let n of e.splice(0))n()}};return t}function ko(){let[e]=S.useState(Et);return S.useEffect(()=>()=>e.dispose(),[e]),e}let rt=(e,t)=>{Si.isServer?S.useEffect(e,t):S.useLayoutEffect(e,t)};function Fo(e){let t=S.useRef(e);return rt(()=>{t.current=e},[e]),t}let Pe=function(e){let t=Fo(e);return S.useCallback((...n)=>t.current(...n),[t])};function kx(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Fx(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Ox({disabled:e=!1}={}){let t=S.useRef(null),[n,i]=S.useState(!1),r=ko(),o=Pe(()=>{t.current=null,i(!1),r.dispose()}),s=Pe(a=>{if(r.dispose(),t.current===null){t.current=a.currentTarget,i(!0);{let l=Po(a.currentTarget);r.addEventListener(l,"pointerup",o,!1),r.addEventListener(l,"pointermove",c=>{if(t.current){let u=kx(c);i(Fx(u,t.current.getBoundingClientRect()))}},!1),r.addEventListener(l,"pointercancel",o,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:o,onClick:o}}}function gr(e){return S.useMemo(()=>e,Object.values(e))}let Tx=S.createContext(void 0);function jp(){return S.useContext(Tx)}function Wd(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function pr(e,t,...n){if(e in t){let r=t[e];return typeof r=="function"?r(...n):r}let i=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(r=>`"${r}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,pr),i}var ac=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ac||{}),Dx=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Dx||{});function zt(){let e=Lx();return S.useCallback(t=>Nx({mergeRefs:e,...t}),[e])}function Nx({ourProps:e,theirProps:t,slot:n,defaultTag:i,features:r,visible:o=!0,name:s,mergeRefs:a}){a=a??Vx;let l=Gp(t,e);if(o)return Ho(l,n,i,s,a);let c=r??0;if(c&2){let{static:u=!1,...d}=l;if(u)return Ho(d,n,i,s,a)}if(c&1){let{unmount:u=!0,...d}=l;return pr(u?0:1,{0(){return null},1(){return Ho({...d,hidden:!0,style:{display:"none"}},n,i,s,a)}})}return Ho(l,n,i,s,a)}function Ho(e,t={},n,i,r){let{as:o=n,children:s,refName:a="ref",...l}=cl(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},u=typeof s=="function"?s(t):s;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(t){let f=!1,h=[];for(let[g,p]of Object.entries(t))typeof p=="boolean"&&(f=!0),p===!0&&h.push(g.replace(/([A-Z])/g,m=>`-${m.toLowerCase()}`));if(f){d["data-headlessui-state"]=h.join(" ");for(let g of h)d[`data-${g}`]=""}}if(Ms(o)&&(Object.keys(Hi(l)).length>0||Object.keys(Hi(d)).length>0))if(!S.isValidElement(u)||Array.isArray(u)&&u.length>1||$x(u)){if(Object.keys(Hi(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${i} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Hi(l)).concat(Object.keys(Hi(d))).map(f=>` - ${f}`).join(`
2
- `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>` - ${f}`).join(`
3
- `)].join(`
4
- `))}else{let f=u.props,h=f==null?void 0:f.className,g=typeof h=="function"?(...b)=>Wd(h(...b),l.className):Wd(h,l.className),p=g?{className:g}:{},m=Gp(u.props,Hi(cl(l,["ref"])));for(let b in d)b in m&&delete d[b];return S.cloneElement(u,Object.assign({},m,d,c,{ref:r(Bx(u),c.ref)},p))}return S.createElement(o,Object.assign({},cl(l,["ref"]),!Ms(o)&&c,!Ms(o)&&d),u)}function Lx(){let e=S.useRef([]),t=S.useCallback(n=>{for(let i of e.current)i!=null&&(typeof i=="function"?i(n):i.current=n)},[]);return(...n)=>{if(!n.every(i=>i==null))return e.current=n,t}}function Vx(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function Gp(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let i of e)for(let r in i)r.startsWith("on")&&typeof i[r]=="function"?(n[r]!=null||(n[r]=[]),n[r].push(i[r])):t[r]=i[r];if(t.disabled||t["aria-disabled"])for(let i in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(i)&&(n[i]=[r=>{var o;return(o=r==null?void 0:r.preventDefault)==null?void 0:o.call(r)}]);for(let i in n)Object.assign(t,{[i](r,...o){let s=n[i];for(let a of s){if((r instanceof Event||(r==null?void 0:r.nativeEvent)instanceof Event)&&r.defaultPrevented)return;a(r,...o)}}});return t}function zp(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let i of e)for(let r in i)r.startsWith("on")&&typeof i[r]=="function"?(n[r]!=null||(n[r]=[]),n[r].push(i[r])):t[r]=i[r];for(let i in n)Object.assign(t,{[i](...r){let o=n[i];for(let s of o)s==null||s(...r)}});return t}function Ht(e){var t;return Object.assign(S.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Hi(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function cl(e,t=[]){let n=Object.assign({},e);for(let i of t)i in n&&delete n[i];return n}function Bx(e){return S.version.split(".")[0]>="19"?e.props.ref:e.ref}function Ms(e){return e===S.Fragment||e===Symbol.for("react.fragment")}function $x(e){return Ms(e.type)}let jx=S.createContext(void 0);function Gx(){return S.useContext(jx)}function Hp(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function Ba(e){return Hp(e)&&"tagName"in e}function Bn(e){return Ba(e)&&"accessKey"in e}function xi(e){return Ba(e)&&"tabIndex"in e}function zx(e){return Ba(e)&&"style"in e}function Hx(e){return Bn(e)&&e.nodeName==="IFRAME"}function Wp(e){return Bn(e)&&e.nodeName==="INPUT"}function Xd(e){return Bn(e)&&e.nodeName==="LABEL"}function Wx(e){return Bn(e)&&e.nodeName==="FIELDSET"}function Xp(e){return Bn(e)&&e.nodeName==="LEGEND"}function Xx(e){return Ba(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function Yd(e){let t=e.parentElement,n=null;for(;t&&!Wx(t);)Xp(t)&&(n=t),t=t.parentElement;let i=(t==null?void 0:t.getAttribute("disabled"))==="";return i&&Yx(n)?!1:i}function Yx(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(Xp(t))return!1;t=t.previousElementSibling}return!0}let Yp=Symbol();function Zx(e,t=!0){return Object.assign(e,{[Yp]:t})}function $n(...e){let t=S.useRef(e);S.useEffect(()=>{t.current=e},[e]);let n=Pe(i=>{for(let r of t.current)r!=null&&(typeof r=="function"?r(i):r.current=i)});return e.every(i=>i==null||(i==null?void 0:i[Yp]))?void 0:n}let xu=S.createContext(null);xu.displayName="DescriptionContext";function Zp(){let e=S.useContext(xu);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Zp),t}return e}function Jx(){let[e,t]=S.useState([]);return[e.length>0?e.join(" "):void 0,S.useMemo(()=>function(n){let i=Pe(o=>(t(s=>[...s,o]),()=>t(s=>{let a=s.slice(),l=a.indexOf(o);return l!==-1&&a.splice(l,1),a}))),r=S.useMemo(()=>({register:i,slot:n.slot,name:n.name,props:n.props,value:n.value}),[i,n.slot,n.name,n.props,n.value]);return S.createElement(xu.Provider,{value:r},n.children)},[t])]}let Ux="p";function Qx(e,t){let n=S.useId(),i=jp(),{id:r=`headlessui-description-${n}`,...o}=e,s=Zp(),a=$n(t);rt(()=>s.register(r),[r,s.register]);let l=gr({...s.slot,disabled:i||!1}),c={ref:a,...s.props,id:r};return zt()({ourProps:c,theirProps:o,slot:l,defaultTag:Ux,name:s.name||"Description"})}let Kx=Ht(Qx);Object.assign(Kx,{});var nt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(nt||{});let $a=S.createContext(null);$a.displayName="LabelContext";function yu(){let e=S.useContext($a);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,yu),t}return e}function qx(e){var t,n,i;let r=(n=(t=S.useContext($a))==null?void 0:t.value)!=null?n:void 0;return((i=void 0)!=null?i:0)>0?[r,...e].filter(Boolean).join(" "):r}function Jp({inherit:e=!1}={}){let t=qx(),[n,i]=S.useState([]),r=e?[t,...n].filter(Boolean):n;return[r.length>0?r.join(" "):void 0,S.useMemo(()=>function(o){let s=Pe(l=>(i(c=>[...c,l]),()=>i(c=>{let u=c.slice(),d=u.indexOf(l);return d!==-1&&u.splice(d,1),u}))),a=S.useMemo(()=>({register:s,slot:o.slot,name:o.name,props:o.props,value:o.value}),[s,o.slot,o.name,o.props,o.value]);return S.createElement($a.Provider,{value:a},o.children)},[i])]}let ey="label";function ty(e,t){var n;let i=S.useId(),r=yu(),o=Gx(),s=jp(),{id:a=`headlessui-label-${i}`,htmlFor:l=o??((n=r.props)==null?void 0:n.htmlFor),passive:c=!1,...u}=e,d=$n(t);rt(()=>r.register(a),[a,r.register]);let f=Pe(p=>{let m=p.currentTarget;if(!(p.target!==p.currentTarget&&Xx(p.target))&&(Xd(m)&&p.preventDefault(),r.props&&"onClick"in r.props&&typeof r.props.onClick=="function"&&r.props.onClick(p),Xd(m))){let b=document.getElementById(m.htmlFor);if(b){let y=b.getAttribute("disabled");if(y==="true"||y==="")return;let x=b.getAttribute("aria-disabled");if(x==="true"||x==="")return;(Wp(b)&&(b.type==="file"||b.type==="radio"||b.type==="checkbox")||b.role==="radio"||b.role==="checkbox"||b.role==="switch")&&b.click(),b.focus({preventScroll:!0})}}}),h=gr({...r.slot,disabled:s||!1}),g={ref:d,...r.props,id:a,htmlFor:l,onClick:f};return c&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in u&&delete u.onClick),zt()({ourProps:g,theirProps:u,slot:h,defaultTag:l?ey:"div",name:r.name||"Label"})}let ny=Ht(ty);Object.assign(ny,{});function Zd(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function iy(e,t,n=!1){let[i,r]=S.useState(()=>Zd(t));return rt(()=>{if(!t||!e)return;let o=Et();return o.requestAnimationFrame(function s(){o.requestAnimationFrame(s),r(a=>{let l=Zd(t);return l.width===a.width&&l.height===a.height?a:l})}),()=>{o.dispose()}},[t,e]),n?{width:`${i.width}px`,height:`${i.height}px`}:i}var Up=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Up||{});function ry(e){let t=S.useRef(null),n=Pe(r=>{t.current=r.pointerType,!Yd(r.currentTarget)&&r.pointerType==="mouse"&&r.button===Up.Left&&(r.preventDefault(),e(r))}),i=Pe(r=>{t.current!=="mouse"&&(Yd(r.currentTarget)||e(r))});return{onPointerDown:n,onClick:i}}let Qp=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};var oy=Object.defineProperty,sy=(e,t,n)=>t in e?oy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ay=(e,t,n)=>(sy(e,t+"",n),n),Kp=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Nt=(e,t,n)=>(Kp(e,t,"read from private field"),n?n.call(e):t.get(e)),ul=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Jd=(e,t,n,i)=>(Kp(e,t,"write to private field"),t.set(e,n),n),en,Or,Tr;let qp=class{constructor(t){ul(this,en,{}),ul(this,Or,new Qp(()=>new Set)),ul(this,Tr,new Set),ay(this,"disposables",Et()),Jd(this,en,t),Si.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return Nt(this,en)}subscribe(t,n){if(Si.isServer)return()=>{};let i={selector:t,callback:n,current:t(Nt(this,en))};return Nt(this,Tr).add(i),this.disposables.add(()=>{Nt(this,Tr).delete(i)})}on(t,n){return Si.isServer?()=>{}:(Nt(this,Or).get(t).add(n),this.disposables.add(()=>{Nt(this,Or).get(t).delete(n)}))}send(t){let n=this.reduce(Nt(this,en),t);if(n!==Nt(this,en)){Jd(this,en,n);for(let i of Nt(this,Tr)){let r=i.selector(Nt(this,en));e0(i.current,r)||(i.current=r,i.callback(r))}for(let i of Nt(this,Or).get(t.type))i(Nt(this,en),t)}}};en=new WeakMap,Or=new WeakMap,Tr=new WeakMap;function e0(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:dl(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:dl(e.entries(),t.entries()):Ud(e)&&Ud(t)?dl(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function dl(e,t){do{let n=e.next(),i=t.next();if(n.done&&i.done)return!0;if(n.done||i.done||!Object.is(n.value,i.value))return!1}while(!0)}function Ud(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function Qd(e){let[t,n]=e(),i=Et();return(...r)=>{t(...r),i.dispose(),i.microTask(n)}}var ly=Object.defineProperty,cy=(e,t,n)=>t in e?ly(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kd=(e,t,n)=>(cy(e,typeof t!="symbol"?t+"":t,n),n),t0=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(t0||{});let uy={0(e,t){let n=t.id,i=e.stack,r=e.stack.indexOf(n);if(r!==-1){let o=e.stack.slice();return o.splice(r,1),o.push(n),i=o,{...e,stack:i}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,i=e.stack.indexOf(n);if(i===-1)return e;let r=e.stack.slice();return r.splice(i,1),{...e,stack:r}}},dy=class n0 extends qp{constructor(){super(...arguments),Kd(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),Kd(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new n0({stack:[]})}reduce(t,n){return pr(n.type,uy,t,n)}};const Cu=new Qp(()=>dy.new());var wu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Su(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lc={exports:{}},fl={};/**
5
- * @license React
6
- * use-sync-external-store-with-selector.production.js
7
- *
8
- * Copyright (c) Meta Platforms, Inc. and affiliates.
9
- *
10
- * This source code is licensed under the MIT license found in the
11
- * LICENSE file in the root directory of this source tree.
12
- */var qd;function fy(){if(qd)return fl;qd=1;var e=S;function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:t,i=e.useSyncExternalStore,r=e.useRef,o=e.useEffect,s=e.useMemo,a=e.useDebugValue;return fl.useSyncExternalStoreWithSelector=function(l,c,u,d,f){var h=r(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=s(function(){function m(C){if(!b){if(b=!0,y=C,C=d(C),f!==void 0&&g.hasValue){var M=g.value;if(f(M,C))return x=M}return x=C}if(M=x,n(y,C))return M;var R=d(C);return f!==void 0&&f(M,R)?(y=C,M):(y=C,x=R)}var b=!1,y,x,I=u===void 0?null:u;return[function(){return m(c())},I===null?void 0:function(){return m(I())}]},[c,u,d,f]);var p=i(l,h[0],h[1]);return o(function(){g.hasValue=!0,g.value=p},[p]),a(p),p},fl}var hl={};/**
13
- * @license React
14
- * use-sync-external-store-with-selector.development.js
15
- *
16
- * Copyright (c) Meta Platforms, Inc. and affiliates.
17
- *
18
- * This source code is licensed under the MIT license found in the
19
- * LICENSE file in the root directory of this source tree.
20
- */var ef;function hy(){return ef||(ef=1,process.env.NODE_ENV!=="production"&&function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n=typeof Object.is=="function"?Object.is:e,i=t.useSyncExternalStore,r=t.useRef,o=t.useEffect,s=t.useMemo,a=t.useDebugValue;hl.useSyncExternalStoreWithSelector=function(l,c,u,d,f){var h=r(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=s(function(){function m(C){if(!b){if(b=!0,y=C,C=d(C),f!==void 0&&g.hasValue){var M=g.value;if(f(M,C))return x=M}return x=C}if(M=x,n(y,C))return M;var R=d(C);return f!==void 0&&f(M,R)?(y=C,M):(y=C,x=R)}var b=!1,y,x,I=u===void 0?null:u;return[function(){return m(c())},I===null?void 0:function(){return m(I())}]},[c,u,d,f]);var p=i(l,h[0],h[1]);return o(function(){g.hasValue=!0,g.value=p},[p]),a(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),hl}process.env.NODE_ENV==="production"?lc.exports=fy():lc.exports=hy();var gy=lc.exports;function Zt(e,t,n=e0){return gy.useSyncExternalStoreWithSelector(Pe(i=>e.subscribe(py,i)),Pe(()=>e.state),Pe(()=>e.state),Pe(t),n)}function py(e){return e}function i0(e,t){let n=S.useId(),i=Cu.get(t),[r,o]=Zt(i,S.useCallback(s=>[i.selectors.isTop(s,n),i.selectors.inStack(s,n)],[i,n]));return rt(()=>{if(e)return i.actions.push(n),()=>i.actions.pop(n)},[i,e,n]),e?o?r:!0:!1}let cc=new Map,Yr=new Map;function tf(e){var t;let n=(t=Yr.get(e))!=null?t:0;return Yr.set(e,n+1),n!==0?()=>nf(e):(cc.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>nf(e))}function nf(e){var t;let n=(t=Yr.get(e))!=null?t:1;if(n===1?Yr.delete(e):Yr.set(e,n-1),n!==1)return;let i=cc.get(e);i&&(i["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",i["aria-hidden"]),e.inert=i.inert,cc.delete(e))}function my(e,{allowed:t,disallowed:n}={}){let i=i0(e,"inert-others");rt(()=>{var r,o;if(!i)return;let s=Et();for(let l of(r=n==null?void 0:n())!=null?r:[])l&&s.add(tf(l));let a=(o=t==null?void 0:t())!=null?o:[];for(let l of a){if(!l)continue;let c=Po(l);if(!c)continue;let u=l.parentElement;for(;u&&u!==c.body;){for(let d of u.children)a.some(f=>d.contains(f))||s.add(tf(d));u=u.parentElement}}return s.dispose},[i,t,n])}function by(e,t,n){let i=Fo(r=>{let o=r.getBoundingClientRect();o.x===0&&o.y===0&&o.width===0&&o.height===0&&n()});S.useEffect(()=>{if(!e)return;let r=t===null?null:Bn(t)?t:t.current;if(!r)return;let o=Et();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>i.current(r));s.observe(r),o.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>i.current(r));s.observe(r),o.add(()=>s.disconnect())}return()=>o.dispose()},[t,i,e])}let uc=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),vy=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var dc=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(dc||{}),xy=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(xy||{}),yy=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(yy||{});function r0(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(uc)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function Cy(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(vy)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Iu=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Iu||{});function _u(e,t=0){var n;return e===((n=Po(e))==null?void 0:n.body)?!1:pr(t,{0(){return e.matches(uc)},1(){let i=e;for(;i!==null;){if(i.matches(uc))return!0;i=i.parentElement}return!1}})}function o0(e){Et().nextFrame(()=>{let t=vu(e);t&&xi(t)&&!_u(t,0)&&Sy(e)})}var wy=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(wy||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Sy(e){e==null||e.focus({preventScroll:!0})}let Iy=["textarea","input"].join(",");function _y(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Iy))!=null?n:!1}function s0(e,t=n=>n){return e.slice().sort((n,i)=>{let r=t(n),o=t(i);if(r===null||o===null)return 0;let s=r.compareDocumentPosition(o);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Ey(e,t,n=e===null?document.body:Ks(e)){return Ay(r0(n),t,{relativeTo:e})}function Ay(e,t,{sorted:n=!0,relativeTo:i=null,skipElements:r=[]}={}){let o=Array.isArray(e)?e.length>0?Ks(e[0]):document:Ks(e),s=Array.isArray(e)?n?s0(e):e:t&64?Cy(e):r0(e);r.length>0&&s.length>1&&(s=s.filter(h=>!r.some(g=>g!=null&&"current"in g?(g==null?void 0:g.current)===h:g===h))),i=i??(o==null?void 0:o.activeElement);let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(i))-1;if(t&4)return Math.max(0,s.indexOf(i))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},u=0,d=s.length,f;do{if(u>=d||u+d<=0)return 0;let h=l+u;if(t&16)h=(h+d)%d;else{if(h<0)return 3;if(h>=d)return 1}f=s[h],f==null||f.focus(c),u+=a}while(f!==vu(f));return t&6&&_y(f)&&f.select(),2}function a0(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function My(){return/Android/gi.test(window.navigator.userAgent)}function rf(){return a0()||My()}function Zi(e,t,n,i){let r=Fo(n);S.useEffect(()=>{if(!e)return;function o(s){r.current(s)}return document.addEventListener(t,o,i),()=>document.removeEventListener(t,o,i)},[e,t,i])}function Ry(e,t,n,i){let r=Fo(n);S.useEffect(()=>{if(!e)return;function o(s){r.current(s)}return window.addEventListener(t,o,i),()=>window.removeEventListener(t,o,i)},[e,t,i])}const of=30;function Py(e,t,n){let i=Fo(n),r=S.useCallback(function(a,l){if(a.defaultPrevented)return;let c=l(a);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let u=function d(f){return typeof f=="function"?d(f()):Array.isArray(f)||f instanceof Set?f:[f]}(t);for(let d of u)if(d!==null&&(d.contains(c)||a.composed&&a.composedPath().includes(d)))return;return!_u(c,Iu.Loose)&&c.tabIndex!==-1&&a.preventDefault(),i.current(a,c)},[i,t]),o=S.useRef(null);Zi(e,"pointerdown",a=>{var l,c;rf()||(o.current=((c=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:c[0])||a.target)},!0),Zi(e,"pointerup",a=>{if(rf()||!o.current)return;let l=o.current;return o.current=null,r(a,()=>l)},!0);let s=S.useRef({x:0,y:0});Zi(e,"touchstart",a=>{s.current.x=a.touches[0].clientX,s.current.y=a.touches[0].clientY},!0),Zi(e,"touchend",a=>{let l={x:a.changedTouches[0].clientX,y:a.changedTouches[0].clientY};if(!(Math.abs(l.x-s.current.x)>=of||Math.abs(l.y-s.current.y)>=of))return r(a,()=>xi(a.target)?a.target:null)},!0),Ry(e,"blur",a=>r(a,()=>Hx(window.document.activeElement)?window.document.activeElement:null),!0)}function fc(...e){return S.useMemo(()=>Po(...e),[...e])}var ky=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(ky||{});const Wo={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},Fy=200,sf=5;function Oy(e,{trigger:t,action:n,close:i,select:r}){let o=S.useRef(null),s=S.useRef(null),a=S.useRef(null);Zi(e&&t!==null,"pointerdown",l=>{Hp(l==null?void 0:l.target)&&t!=null&&t.contains(l.target)&&(s.current=l.x,a.current=l.y,o.current=l.timeStamp)}),Zi(e&&t!==null,"pointerup",l=>{var c,u;let d=o.current;if(d===null||(o.current=null,!xi(l.target))||Math.abs(l.x-((c=s.current)!=null?c:l.x))<sf&&Math.abs(l.y-((u=a.current)!=null?u:l.y))<sf)return;let f=n(l);switch(f.kind){case 0:return;case 1:{l.timeStamp-d>Fy&&(r(f.target),i());break}case 2:{i();break}}},{capture:!0})}function Ty(e,t){return S.useMemo(()=>{var n;if(e.type)return e.type;let i=(n=e.as)!=null?n:"button";if(typeof i=="string"&&i.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function Dy(e){return S.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function Ny(e,t){let n=e(),i=new Set;return{getSnapshot(){return n},subscribe(r){return i.add(r),()=>i.delete(r)},dispatch(r,...o){let s=t[r].call(n,...o);s&&(n=s,i.forEach(a=>a()))}}}function Ly(){let e;return{before({doc:t}){var n;let i=t.documentElement,r=(n=t.defaultView)!=null?n:window;e=Math.max(0,r.innerWidth-i.clientWidth)},after({doc:t,d:n}){let i=t.documentElement,r=Math.max(0,i.clientWidth-i.offsetWidth),o=Math.max(0,e-r);n.style(i,"paddingRight",`${o}px`)}}}function Vy(){return a0()?{before({doc:e,d:t,meta:n}){function i(r){for(let o of n().containers)for(let s of o())if(s.contains(r))return!0;return!1}t.microTask(()=>{var r;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=Et();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let o=(r=window.scrollY)!=null?r:window.pageYOffset,s=null;t.addEventListener(e,"click",a=>{if(xi(a.target))try{let l=a.target.closest("a");if(!l)return;let{hash:c}=new URL(l.href),u=e.querySelector(c);xi(u)&&!i(u)&&(s=u)}catch{}},!0),t.group(a=>{t.addEventListener(e,"touchstart",l=>{if(a.dispose(),xi(l.target)&&zx(l.target))if(i(l.target)){let c=l.target;for(;c.parentElement&&i(c.parentElement);)c=c.parentElement;a.style(c,"overscrollBehavior","contain")}else a.style(l.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",a=>{if(xi(a.target)){if(Wp(a.target))return;if(i(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;o!==l&&window.scrollTo(0,o),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function By(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function af(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let yi=Ny(()=>new Map,{PUSH(e,t){var n;let i=(n=this.get(e))!=null?n:{doc:e,count:0,d:Et(),meta:new Set,computedMeta:{}};return i.count++,i.meta.add(t),i.computedMeta=af(i.meta),this.set(e,i),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=af(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[Vy(),Ly(),By()];n.forEach(({before:i})=>i==null?void 0:i(t)),n.forEach(({after:i})=>i==null?void 0:i(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});yi.subscribe(()=>{let e=yi.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let i=t.get(n.doc)==="hidden",r=n.count!==0;(r&&!i||!r&&i)&&yi.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&yi.dispatch("TEARDOWN",n)}});function $y(e,t,n=()=>({containers:[]})){let i=Dy(yi),r=t?i.get(t):void 0,o=r?r.count>0:!1;return rt(()=>{if(!(!t||!e))return yi.dispatch("PUSH",t,n),()=>yi.dispatch("POP",t,n)},[e,t]),o}function jy(e,t,n=()=>[document.body]){let i=i0(e,"scroll-lock");$y(i,t,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],n]}})}function lf(e){return[e.screenX,e.screenY]}function Gy(){let e=S.useRef([-1,-1]);return{wasMoved(t){let n=lf(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=lf(t)}}}function zy(e=0){let[t,n]=S.useState(e),i=S.useCallback(l=>n(l),[]),r=S.useCallback(l=>n(c=>c|l),[]),o=S.useCallback(l=>(t&l)===l,[t]),s=S.useCallback(l=>n(c=>c&~l),[]),a=S.useCallback(l=>n(c=>c^l),[]);return{flags:t,setFlag:i,addFlag:r,hasFlag:o,removeFlag:s,toggleFlag:a}}var cf,uf;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((cf=process==null?void 0:process.env)==null?void 0:cf.NODE_ENV)==="test"&&typeof((uf=Element==null?void 0:Element.prototype)==null?void 0:uf.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
21
- `)),[]});var Hy=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Hy||{});function Wy(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function Xy(e,t,n,i){let[r,o]=S.useState(n),{hasFlag:s,addFlag:a,removeFlag:l}=zy(e&&r?3:0),c=S.useRef(!1),u=S.useRef(!1),d=ko();return rt(()=>{var f;if(e){if(n&&o(!0),!t){n&&a(3);return}return(f=void 0)==null||f.call(i,n),Yy(t,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){u.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var h;u.current&&Uy(t)||(c.current=!1,l(7),n||o(!1),(h=void 0)==null||h.call(i,n))}})}},[e,n,t,d]),e?[r,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Yy(e,{prepare:t,run:n,done:i,inFlight:r}){let o=Et();return Jy(e,{prepare:t,inFlight:r}),o.nextFrame(()=>{n(),o.requestAnimationFrame(()=>{o.add(Zy(e,i))})}),o.dispose}function Zy(e,t){var n,i;let r=Et();if(!e)return r.dispose;let o=!1;r.add(()=>{o=!0});let s=(i=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?i:[];return s.length===0?(t(),r.dispose):(Promise.allSettled(s.map(a=>a.finished)).then(()=>{o||t()}),r.dispose)}function Jy(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let i=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=i}function Uy(e){var t,n;return((n=(t=e.getAnimations)==null?void 0:t.call(e))!=null?n:[]).some(i=>i instanceof CSSTransition&&i.playState!=="finished")}function Qy(e,{container:t,accept:n,walk:i}){let r=S.useRef(n),o=S.useRef(i);S.useEffect(()=>{r.current=n,o.current=i},[n,i]),rt(()=>{if(!t||!e)return;let s=Po(t);if(!s)return;let a=r.current,l=o.current,c=Object.assign(d=>a(d),{acceptNode:a}),u=s.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,c,!1);for(;u.nextNode();)l(u.currentNode)},[t,e,r,o])}function ja(){return typeof window<"u"}function mr(e){return l0(e)?(e.nodeName||"").toLowerCase():"#document"}function Rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mn(e){var t;return(t=(l0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function l0(e){return ja()?e instanceof Node||e instanceof Rt(e).Node:!1}function gt(e){return ja()?e instanceof Element||e instanceof Rt(e).Element:!1}function hn(e){return ja()?e instanceof HTMLElement||e instanceof Rt(e).HTMLElement:!1}function df(e){return!ja()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rt(e).ShadowRoot}const Ky=new Set(["inline","contents"]);function Oo(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=Kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!Ky.has(r)}const qy=new Set(["table","td","th"]);function e2(e){return qy.has(mr(e))}const t2=[":popover-open",":modal"];function Ga(e){return t2.some(t=>{try{return e.matches(t)}catch{return!1}})}const n2=["transform","translate","scale","rotate","perspective"],i2=["transform","translate","scale","rotate","perspective","filter"],r2=["paint","layout","strict","content"];function Eu(e){const t=Au(),n=gt(e)?Kt(e):e;return n2.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||i2.some(i=>(n.willChange||"").includes(i))||r2.some(i=>(n.contain||"").includes(i))}function o2(e){let t=Kn(e);for(;hn(t)&&!rr(t);){if(Eu(t))return t;if(Ga(t))return null;t=Kn(t)}return null}function Au(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const s2=new Set(["html","body","#document"]);function rr(e){return s2.has(mr(e))}function Kt(e){return Rt(e).getComputedStyle(e)}function za(e){return gt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Kn(e){if(mr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||df(e)&&e.host||mn(e);return df(t)?t.host:t}function c0(e){const t=Kn(e);return rr(t)?e.ownerDocument?e.ownerDocument.body:e.body:hn(t)&&Oo(t)?t:c0(t)}function uo(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=c0(e),o=r===((i=e.ownerDocument)==null?void 0:i.body),s=Rt(r);if(o){const a=hc(s);return t.concat(s,s.visualViewport||[],Oo(r)?r:[],a&&n?uo(a):[])}return t.concat(r,uo(r,[],n))}function hc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function a2(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:i}=t;return n+"/"+i}).join(" "):navigator.userAgent}const Fi=Math.min,ht=Math.max,fo=Math.round,Xo=Math.floor,an=e=>({x:e,y:e}),l2={left:"right",right:"left",bottom:"top",top:"bottom"},c2={start:"end",end:"start"};function ff(e,t,n){return ht(e,Fi(t,n))}function br(e,t){return typeof e=="function"?e(t):e}function qn(e){return e.split("-")[0]}function To(e){return e.split("-")[1]}function u0(e){return e==="x"?"y":"x"}function d0(e){return e==="y"?"height":"width"}const u2=new Set(["top","bottom"]);function Mn(e){return u2.has(qn(e))?"y":"x"}function f0(e){return u0(Mn(e))}function d2(e,t,n){n===void 0&&(n=!1);const i=To(e),r=f0(e),o=d0(r);let s=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=qs(s)),[s,qs(s)]}function f2(e){const t=qs(e);return[gc(e),t,gc(t)]}function gc(e){return e.replace(/start|end/g,t=>c2[t])}const hf=["left","right"],gf=["right","left"],h2=["top","bottom"],g2=["bottom","top"];function p2(e,t,n){switch(e){case"top":case"bottom":return n?t?gf:hf:t?hf:gf;case"left":case"right":return t?h2:g2;default:return[]}}function m2(e,t,n,i){const r=To(e);let o=p2(qn(e),n==="start",i);return r&&(o=o.map(s=>s+"-"+r),t&&(o=o.concat(o.map(gc)))),o}function qs(e){return e.replace(/left|right|bottom|top/g,t=>l2[t])}function b2(e){return{top:0,right:0,bottom:0,left:0,...e}}function v2(e){return typeof e!="number"?b2(e):{top:e,right:e,bottom:e,left:e}}function ea(e){const{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function pf(e,t,n){let{reference:i,floating:r}=e;const o=Mn(t),s=f0(t),a=d0(s),l=qn(t),c=o==="y",u=i.x+i.width/2-r.width/2,d=i.y+i.height/2-r.height/2,f=i[a]/2-r[a]/2;let h;switch(l){case"top":h={x:u,y:i.y-r.height};break;case"bottom":h={x:u,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:d};break;case"left":h={x:i.x-r.width,y:d};break;default:h={x:i.x,y:i.y}}switch(To(t)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1);break}return h}const x2=async(e,t,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=pf(c,i,l),f=i,h={},g=0;for(let p=0;p<a.length;p++){const{name:m,fn:b}=a[p],{x:y,y:x,data:I,reset:C}=await b({x:u,y:d,initialPlacement:i,placement:f,strategy:r,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=y??u,d=x??d,h={...h,[m]:{...h[m],...I}},C&&g<=50&&(g++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(c=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):C.rects),{x:u,y:d}=pf(c,f,l)),p=-1)}return{x:u,y:d,placement:f,strategy:r,middlewareData:h}};async function Ha(e,t){var n;t===void 0&&(t={});const{x:i,y:r,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=br(t,e),g=v2(h),m=a[f?d==="floating"?"reference":"floating":d],b=ea(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(m)))==null||n?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:i,y:r,width:s.floating.width,height:s.floating.height}:s.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),I=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},C=ea(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:x,strategy:l}):y);return{top:(b.top-C.top+g.top)/I.y,bottom:(C.bottom-b.bottom+g.bottom)/I.y,left:(b.left-C.left+g.left)/I.x,right:(C.right-b.right+g.right)/I.x}}const y2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:r,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...m}=br(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=qn(r),y=Mn(a),x=qn(a)===a,I=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=f||(x||!p?[qs(a)]:f2(a)),M=g!=="none";!f&&M&&C.push(...m2(a,p,g,I));const R=[a,...C],w=await Ha(t,m),_=[];let A=((i=o.flip)==null?void 0:i.overflows)||[];if(u&&_.push(w[b]),d){const N=d2(r,s,I);_.push(w[N[0]],w[N[1]])}if(A=[...A,{placement:r,overflows:_}],!_.every(N=>N<=0)){var k,D;const N=(((k=o.flip)==null?void 0:k.index)||0)+1,P=R[N];if(P&&(!(d==="alignment"?y!==Mn(P):!1)||A.every(E=>Mn(E.placement)===y?E.overflows[0]>0:!0)))return{data:{index:N,overflows:A},reset:{placement:P}};let O=(D=A.filter(T=>T.overflows[0]<=0).sort((T,E)=>T.overflows[1]-E.overflows[1])[0])==null?void 0:D.placement;if(!O)switch(h){case"bestFit":{var B;const T=(B=A.filter(E=>{if(M){const F=Mn(E.placement);return F===y||F==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(F=>F>0).reduce((F,V)=>F+V,0)]).sort((E,F)=>E[1]-F[1])[0])==null?void 0:B[0];T&&(O=T);break}case"initialPlacement":O=a;break}if(r!==O)return{reset:{placement:O}}}return{}}}},C2=new Set(["left","top"]);async function w2(e,t){const{placement:n,platform:i,elements:r}=e,o=await(i.isRTL==null?void 0:i.isRTL(r.floating)),s=qn(n),a=To(n),l=Mn(n)==="y",c=C2.has(s)?-1:1,u=o&&l?-1:1,d=br(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const S2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:r,y:o,placement:s,middlewareData:a}=t,l=await w2(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:s}}}}},I2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:r}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:m=>{let{x:b,y}=m;return{x:b,y}}},...l}=br(e,t),c={x:n,y:i},u=await Ha(t,l),d=Mn(qn(r)),f=u0(d);let h=c[f],g=c[d];if(o){const m=f==="y"?"top":"left",b=f==="y"?"bottom":"right",y=h+u[m],x=h-u[b];h=ff(y,h,x)}if(s){const m=d==="y"?"top":"left",b=d==="y"?"bottom":"right",y=g+u[m],x=g-u[b];g=ff(y,g,x)}const p=a.fn({...t,[f]:h,[d]:g});return{...p,data:{x:p.x-n,y:p.y-i,enabled:{[f]:o,[d]:s}}}}}},_2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:r,rects:o,platform:s,elements:a}=t,{apply:l=()=>{},...c}=br(e,t),u=await Ha(t,c),d=qn(r),f=To(r),h=Mn(r)==="y",{width:g,height:p}=o.floating;let m,b;d==="top"||d==="bottom"?(m=d,b=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=d,m=f==="end"?"top":"bottom");const y=p-u.top-u.bottom,x=g-u.left-u.right,I=Fi(p-u[m],y),C=Fi(g-u[b],x),M=!t.middlewareData.shift;let R=I,w=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=x),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(R=y),M&&!f){const A=ht(u.left,0),k=ht(u.right,0),D=ht(u.top,0),B=ht(u.bottom,0);h?w=g-2*(A!==0||k!==0?A+k:ht(u.left,u.right)):R=p-2*(D!==0||B!==0?D+B:ht(u.top,u.bottom))}await l({...t,availableWidth:w,availableHeight:R});const _=await s.getDimensions(a.floating);return g!==_.width||p!==_.height?{reset:{rects:!0}}:{}}}};function h0(e){const t=Kt(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=hn(e),o=r?e.offsetWidth:n,s=r?e.offsetHeight:i,a=fo(n)!==o||fo(i)!==s;return a&&(n=o,i=s),{width:n,height:i,$:a}}function Mu(e){return gt(e)?e:e.contextElement}function Ki(e){const t=Mu(e);if(!hn(t))return an(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:o}=h0(t);let s=(o?fo(n.width):n.width)/i,a=(o?fo(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const E2=an(0);function g0(e){const t=Rt(e);return!Au()||!t.visualViewport?E2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function A2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rt(e)?!1:t}function Oi(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=Mu(e);let s=an(1);t&&(i?gt(i)&&(s=Ki(i)):s=Ki(e));const a=A2(o,n,i)?g0(o):an(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(o){const f=Rt(o),h=i&&gt(i)?Rt(i):i;let g=f,p=hc(g);for(;p&&i&&h!==g;){const m=Ki(p),b=p.getBoundingClientRect(),y=Kt(p),x=b.left+(p.clientLeft+parseFloat(y.paddingLeft))*m.x,I=b.top+(p.clientTop+parseFloat(y.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=x,c+=I,g=Rt(p),p=hc(g)}}return ea({width:u,height:d,x:l,y:c})}function Wa(e,t){const n=za(e).scrollLeft;return t?t.left+n:Oi(mn(e)).left+n}function p0(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-Wa(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function M2(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const o=r==="fixed",s=mn(i),a=t?Ga(t.floating):!1;if(i===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=an(1);const u=an(0),d=hn(i);if((d||!d&&!o)&&((mr(i)!=="body"||Oo(s))&&(l=za(i)),hn(i))){const h=Oi(i);c=Ki(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}const f=s&&!d&&!o?p0(s,l):an(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function R2(e){return Array.from(e.getClientRects())}function P2(e){const t=mn(e),n=za(e),i=e.ownerDocument.body,r=ht(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=ht(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-n.scrollLeft+Wa(e);const a=-n.scrollTop;return Kt(i).direction==="rtl"&&(s+=ht(t.clientWidth,i.clientWidth)-r),{width:r,height:o,x:s,y:a}}const mf=25;function k2(e,t){const n=Rt(e),i=mn(e),r=n.visualViewport;let o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;const u=Au();(!u||u&&t==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}const c=Wa(i);if(c<=0){const u=i.ownerDocument,d=u.body,f=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(i.clientWidth-d.clientWidth-h);g<=mf&&(o-=g)}else c<=mf&&(o+=c);return{width:o,height:s,x:a,y:l}}const F2=new Set(["absolute","fixed"]);function O2(e,t){const n=Oi(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,o=hn(e)?Ki(e):an(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=r*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function bf(e,t,n){let i;if(t==="viewport")i=k2(e,n);else if(t==="document")i=P2(mn(e));else if(gt(t))i=O2(t,n);else{const r=g0(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return ea(i)}function m0(e,t){const n=Kn(e);return n===t||!gt(n)||rr(n)?!1:Kt(n).position==="fixed"||m0(n,t)}function T2(e,t){const n=t.get(e);if(n)return n;let i=uo(e,[],!1).filter(a=>gt(a)&&mr(a)!=="body"),r=null;const o=Kt(e).position==="fixed";let s=o?Kn(e):e;for(;gt(s)&&!rr(s);){const a=Kt(s),l=Eu(s);!l&&a.position==="fixed"&&(r=null),(o?!l&&!r:!l&&a.position==="static"&&!!r&&F2.has(r.position)||Oo(s)&&!l&&m0(e,s))?i=i.filter(u=>u!==s):r=a,s=Kn(s)}return t.set(e,i),i}function D2(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const s=[...n==="clippingAncestors"?Ga(t)?[]:T2(t,this._c):[].concat(n),i],a=s[0],l=s.reduce((c,u)=>{const d=bf(t,u,r);return c.top=ht(d.top,c.top),c.right=Fi(d.right,c.right),c.bottom=Fi(d.bottom,c.bottom),c.left=ht(d.left,c.left),c},bf(t,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function N2(e){const{width:t,height:n}=h0(e);return{width:t,height:n}}function L2(e,t,n){const i=hn(t),r=mn(t),o=n==="fixed",s=Oi(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=an(0);function c(){l.x=Wa(r)}if(i||!i&&!o)if((mr(t)!=="body"||Oo(r))&&(a=za(t)),i){const h=Oi(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else r&&c();o&&!i&&r&&c();const u=r&&!i&&!o?p0(r,a):an(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function gl(e){return Kt(e).position==="static"}function vf(e,t){if(!hn(e)||Kt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return mn(e)===n&&(n=n.ownerDocument.body),n}function b0(e,t){const n=Rt(e);if(Ga(e))return n;if(!hn(e)){let r=Kn(e);for(;r&&!rr(r);){if(gt(r)&&!gl(r))return r;r=Kn(r)}return n}let i=vf(e,t);for(;i&&e2(i)&&gl(i);)i=vf(i,t);return i&&rr(i)&&gl(i)&&!Eu(i)?n:i||o2(e)||n}const V2=async function(e){const t=this.getOffsetParent||b0,n=this.getDimensions,i=await n(e.floating);return{reference:L2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function B2(e){return Kt(e).direction==="rtl"}const $2={convertOffsetParentRelativeRectToViewportRelativeRect:M2,getDocumentElement:mn,getClippingRect:D2,getOffsetParent:b0,getElementRects:V2,getClientRects:R2,getDimensions:N2,getScale:Ki,isElement:gt,isRTL:B2};function v0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function j2(e,t){let n=null,i;const r=mn(e);function o(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=c;if(a||t(),!f||!h)return;const g=Xo(d),p=Xo(r.clientWidth-(u+f)),m=Xo(r.clientHeight-(d+h)),b=Xo(u),x={rootMargin:-g+"px "+-p+"px "+-m+"px "+-b+"px",threshold:ht(0,Fi(1,l))||1};let I=!0;function C(M){const R=M[0].intersectionRatio;if(R!==l){if(!I)return s();R?s(!1,R):i=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!v0(c,e.getBoundingClientRect())&&s(),I=!1}try{n=new IntersectionObserver(C,{...x,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return s(!0),o}function x0(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=Mu(e),u=r||o?[...c?uo(c):[],...uo(t)]:[];u.forEach(b=>{r&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const d=c&&a?j2(c,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(b=>{let[y]=b;y&&y.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let g,p=l?Oi(e):null;l&&m();function m(){const b=Oi(e);p&&!v0(p,b)&&n(),p=b,g=requestAnimationFrame(m)}return n(),()=>{var b;u.forEach(y=>{r&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),d==null||d(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const pl=Ha,G2=S2,z2=I2,H2=y2,W2=_2,X2=(e,t,n)=>{const i=new Map,r={platform:$2,...n},o={...r.platform,_c:i};return x2(e,t,{...r,platform:o})};var Y2=typeof document<"u",Z2=function(){},Rs=Y2?S.useLayoutEffect:Z2;function ta(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!ta(e[i],t[i]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,r[i]))return!1;for(i=n;i--!==0;){const o=r[i];if(!(o==="_owner"&&e.$$typeof)&&!ta(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function y0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xf(e,t){const n=y0(e);return Math.round(t*n)/n}function ml(e){const t=z.useRef(e);return Rs(()=>{t.current=e}),t}function J2(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=z.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=z.useState(i);ta(f,i)||h(i);const[g,p]=z.useState(null),[m,b]=z.useState(null),y=z.useCallback(E=>{E!==M.current&&(M.current=E,p(E))},[]),x=z.useCallback(E=>{E!==R.current&&(R.current=E,b(E))},[]),I=o||g,C=s||m,M=z.useRef(null),R=z.useRef(null),w=z.useRef(u),_=l!=null,A=ml(l),k=ml(r),D=ml(c),B=z.useCallback(()=>{if(!M.current||!R.current)return;const E={placement:t,strategy:n,middleware:f};k.current&&(E.platform=k.current),X2(M.current,R.current,E).then(F=>{const V={...F,isPositioned:D.current!==!1};N.current&&!ta(w.current,V)&&(w.current=V,Xs.flushSync(()=>{d(V)}))})},[f,t,n,k,D]);Rs(()=>{c===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(E=>({...E,isPositioned:!1})))},[c]);const N=z.useRef(!1);Rs(()=>(N.current=!0,()=>{N.current=!1}),[]),Rs(()=>{if(I&&(M.current=I),C&&(R.current=C),I&&C){if(A.current)return A.current(I,C,B);B()}},[I,C,B,A,_]);const P=z.useMemo(()=>({reference:M,floating:R,setReference:y,setFloating:x}),[y,x]),O=z.useMemo(()=>({reference:I,floating:C}),[I,C]),T=z.useMemo(()=>{const E={position:n,left:0,top:0};if(!O.floating)return E;const F=xf(O.floating,u.x),V=xf(O.floating,u.y);return a?{...E,transform:"translate("+F+"px, "+V+"px)",...y0(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:V}},[n,a,O.floating,u.x,u.y]);return z.useMemo(()=>({...u,update:B,refs:P,elements:O,floatingStyles:T}),[u,B,P,O,T])}const C0=(e,t)=>({...G2(e),options:[e,t]}),U2=(e,t)=>({...z2(e),options:[e,t]}),Q2=(e,t)=>({...H2(e),options:[e,t]}),K2=(e,t)=>({...W2(e),options:[e,t]}),w0={...z},q2=w0.useInsertionEffect,eC=q2||(e=>e());function S0(e){const t=z.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return eC(()=>{t.current=e}),z.useCallback(function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return t.current==null?void 0:t.current(...i)},[])}var pc=typeof document<"u"?S.useLayoutEffect:S.useEffect;let yf=!1,tC=0;const Cf=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+tC++;function nC(){const[e,t]=z.useState(()=>yf?Cf():void 0);return pc(()=>{e==null&&t(Cf())},[]),z.useEffect(()=>{yf=!0},[]),e}const iC=w0.useId,rC=iC||nC;let ho;process.env.NODE_ENV!=="production"&&(ho=new Set);function oC(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const r="Floating UI: "+n.join(" ");if(!((e=ho)!=null&&e.has(r))){var o;(o=ho)==null||o.add(r),console.warn(r)}}function sC(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const r="Floating UI: "+n.join(" ");if(!((e=ho)!=null&&e.has(r))){var o;(o=ho)==null||o.add(r),console.error(r)}}function aC(){const e=new Map;return{emit(t,n){var i;(i=e.get(t))==null||i.forEach(r=>r(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var i;e.set(t,((i=e.get(t))==null?void 0:i.filter(r=>r!==n))||[])}}}const lC=z.createContext(null),cC=z.createContext(null),uC=()=>{var e;return((e=z.useContext(lC))==null?void 0:e.id)||null},dC=()=>z.useContext(cC),fC="data-floating-ui-focusable";function hC(e){const{open:t=!1,onOpenChange:n,elements:i}=e,r=rC(),o=z.useRef({}),[s]=z.useState(()=>aC()),a=uC()!=null;if(process.env.NODE_ENV!=="production"){const h=i.reference;h&&!gt(h)&&sC("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=z.useState(i.reference),u=S0((h,g,p)=>{o.current.openEvent=h?g:void 0,s.emit("openchange",{open:h,event:g,reason:p,nested:a}),n==null||n(h,g,p)}),d=z.useMemo(()=>({setPositionReference:c}),[]),f=z.useMemo(()=>({reference:l||i.reference||null,floating:i.floating||null,domReference:i.reference}),[l,i.reference,i.floating]);return z.useMemo(()=>({dataRef:o,open:t,onOpenChange:u,elements:f,events:s,floatingId:r,refs:d}),[t,u,f,s,r,d])}function gC(e){e===void 0&&(e={});const{nodeId:t}=e,n=hC({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||n,r=i.elements,[o,s]=z.useState(null),[a,l]=z.useState(null),u=(r==null?void 0:r.domReference)||o,d=z.useRef(null),f=dC();pc(()=>{u&&(d.current=u)},[u]);const h=J2({...e,elements:{...r,...a&&{reference:a}}}),g=z.useCallback(x=>{const I=gt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(I),h.refs.setReference(I)},[h.refs]),p=z.useCallback(x=>{(gt(x)||x===null)&&(d.current=x,s(x)),(gt(h.refs.reference.current)||h.refs.reference.current===null||x!==null&&!gt(x))&&h.refs.setReference(x)},[h.refs]),m=z.useMemo(()=>({...h.refs,setReference:p,setPositionReference:g,domReference:d}),[h.refs,p,g]),b=z.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),y=z.useMemo(()=>({...h,...i,refs:m,elements:b,nodeId:t}),[h,m,b,t,i]);return pc(()=>{i.dataRef.current.floatingContext=y;const x=f==null?void 0:f.nodesRef.current.find(I=>I.id===t);x&&(x.context=y)}),z.useMemo(()=>({...h,context:y,refs:m,elements:b}),[h,m,b,y])}const wf="active",Sf="selected";function bl(e,t,n){const i=new Map,r=n==="item";let o=e;if(r&&e){const{[wf]:s,[Sf]:a,...l}=e;o=l}return{...n==="floating"&&{tabIndex:-1,[fC]:""},...o,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(r&&[wf,Sf].includes(c)))if(c.indexOf("on")===0){if(i.has(c)||i.set(c,[]),typeof u=="function"){var d;(d=i.get(c))==null||d.push(u),s[c]=function(){for(var f,h=arguments.length,g=new Array(h),p=0;p<h;p++)g[p]=arguments[p];return(f=i.get(c))==null?void 0:f.map(m=>m(...g)).find(m=>m!==void 0)}}}else s[c]=u}),s),{})}}function pC(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),i=e.map(a=>a==null?void 0:a.item),r=z.useCallback(a=>bl(a,e,"reference"),t),o=z.useCallback(a=>bl(a,e,"floating"),n),s=z.useCallback(a=>bl(a,e,"item"),i);return z.useMemo(()=>({getReferenceProps:r,getFloatingProps:o,getItemProps:s}),[r,o,s])}function If(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const mC=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:i,onFallbackChange:r,offset:o=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:c,...u}=br(e,t),{rects:d,elements:{floating:f}}=t,h=n.current[s],g=(c==null?void 0:c.current)||f,p=f.clientTop||g.clientTop,m=f.clientTop!==0,b=g.clientTop!==0,y=f===g;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||oC('`placement` side must be "bottom" when using the `inner`',"middleware.")),!h)return{};const x={...t,...await C0(-h.offsetTop-f.clientTop-d.reference.height/2-h.offsetHeight/2-o).fn(t)},I=await pl(If(x,g.scrollHeight+p+f.clientTop),u),C=await pl(x,{...u,elementContext:"reference"}),M=ht(0,I.top),R=x.y+M,A=(g.scrollHeight>g.clientHeight?k=>k:fo)(ht(0,g.scrollHeight+(m&&y||b?p*2:0)-M-ht(0,I.bottom)));if(g.style.maxHeight=A+"px",g.scrollTop=M,r){const k=g.offsetHeight<h.offsetHeight*Fi(a,n.current.length)-1||C.top>=-l||C.bottom>=-l;Xs.flushSync(()=>r(k))}return i&&(i.current=await pl(If({...x,y:R},g.offsetHeight+p+f.clientTop),u)),{y:R}}});function bC(e,t){const{open:n,elements:i}=e,{enabled:r=!0,overflowRef:o,scrollRef:s,onChange:a}=t,l=S0(a),c=z.useRef(!1),u=z.useRef(null),d=z.useRef(null);z.useEffect(()=>{if(!r)return;function h(p){if(p.ctrlKey||!g||o.current==null)return;const m=p.deltaY,b=o.current.top>=-.5,y=o.current.bottom>=-.5,x=g.scrollHeight-g.clientHeight,I=m<0?-1:1,C=m<0?"max":"min";g.scrollHeight<=g.clientHeight||(!b&&m>0||!y&&m<0?(p.preventDefault(),Xs.flushSync(()=>{l(M=>M+Math[C](m,x*I))})):/firefox/i.test(a2())&&(g.scrollTop+=m))}const g=(s==null?void 0:s.current)||i.floating;if(n&&g)return g.addEventListener("wheel",h),requestAnimationFrame(()=>{u.current=g.scrollTop,o.current!=null&&(d.current={...o.current})}),()=>{u.current=null,d.current=null,g.removeEventListener("wheel",h)}},[r,n,i.floating,o,s,l]);const f=z.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const h=(s==null?void 0:s.current)||i.floating;if(!(!o.current||!h||!c.current)){if(u.current!==null){const g=h.scrollTop-u.current;(o.current.bottom<-.5&&g<-1||o.current.top<-.5&&g>1)&&Xs.flushSync(()=>l(p=>p+g))}requestAnimationFrame(()=>{u.current=h.scrollTop})}}}),[i.floating,l,o,s]);return z.useMemo(()=>r?{floating:f}:{},[r,f])}let vr=S.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});vr.displayName="FloatingContext";let Ru=S.createContext(null);Ru.displayName="PlacementContext";function vC(e){return S.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function xC(){return S.useContext(vr).setReference}function yC(){return S.useContext(vr).getReferenceProps}function CC(){let{getFloatingProps:e,slot:t}=S.useContext(vr);return S.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function wC(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=S.useContext(Ru),n=S.useMemo(()=>e,[JSON.stringify(e,(r,o)=>{var s;return(s=o==null?void 0:o.outerHTML)!=null?s:o})]);rt(()=>{t==null||t(n??null)},[t,n]);let i=S.useContext(vr);return S.useMemo(()=>[i.setFloating,e?i.styles:{}],[i.setFloating,e,i.styles])}let _f=4;function SC({children:e,enabled:t=!0}){let[n,i]=S.useState(null),[r,o]=S.useState(0),s=S.useRef(null),[a,l]=S.useState(null);IC(a);let c=t&&n!==null&&a!==null,{to:u="bottom",gap:d=0,offset:f=0,padding:h=0,inner:g}=_C(n,a),[p,m="center"]=u.split(" ");rt(()=>{c&&o(0)},[c]);let{refs:b,floatingStyles:y,context:x}=gC({open:c,placement:p==="selection"?m==="center"?"bottom":`bottom-${m}`:m==="center"?`${p}`:`${p}-${m}`,strategy:"absolute",transform:!1,middleware:[C0({mainAxis:p==="selection"?0:d,crossAxis:f}),U2({padding:h}),p!=="selection"&&Q2({padding:h}),p==="selection"&&g?mC({...g,padding:h,overflowRef:s,offset:r,minItemsVisible:_f,referenceOverflowThreshold:h,onFallbackChange(k){var D,B;if(!k)return;let N=x.elements.floating;if(!N)return;let P=parseFloat(getComputedStyle(N).scrollPaddingBottom)||0,O=Math.min(_f,N.childElementCount),T=0,E=0;for(let F of(B=(D=x.elements.floating)==null?void 0:D.childNodes)!=null?B:[])if(Bn(F)){let V=F.offsetTop,j=V+F.clientHeight+P,G=N.scrollTop,$=G+N.clientHeight;if(V>=G&&j<=$)O--;else{E=Math.max(0,Math.min(j,$)-Math.max(V,G)),T=F.clientHeight;break}}O>=1&&o(F=>{let V=T*O-E+P;return F>=V?F:V})}}):null,K2({padding:h,apply({availableWidth:k,availableHeight:D,elements:B}){Object.assign(B.floating.style,{overflow:"auto",maxWidth:`${k}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${D}px)`})}})].filter(Boolean),whileElementsMounted:x0}),[I=p,C=m]=x.placement.split("-");p==="selection"&&(I="selection");let M=S.useMemo(()=>({anchor:[I,C].filter(Boolean).join(" ")}),[I,C]),R=bC(x,{overflowRef:s,onChange:o}),{getReferenceProps:w,getFloatingProps:_}=pC([R]),A=Pe(k=>{l(k),b.setFloating(k)});return z.createElement(Ru.Provider,{value:i},z.createElement(vr.Provider,{value:{setFloating:A,setReference:b.setReference,styles:y,getReferenceProps:w,getFloatingProps:_,slot:M}},e))}function IC(e){rt(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,i=parseFloat(n);if(isNaN(i))return;let r=parseInt(n);isNaN(r)||i!==r&&(e.style.maxHeight=`${Math.ceil(i)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function _C(e,t){var n,i,r;let o=vl((n=e==null?void 0:e.gap)!=null?n:"var(--anchor-gap, 0)",t),s=vl((i=e==null?void 0:e.offset)!=null?i:"var(--anchor-offset, 0)",t),a=vl((r=e==null?void 0:e.padding)!=null?r:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:s,padding:a}}function vl(e,t,n=void 0){let i=ko(),r=Pe((l,c)=>{if(l==null)return[n,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!c)return[n,null];let u=Ef(l,c);return[u,d=>{let f=I0(l);{let h=f.map(g=>window.getComputedStyle(c).getPropertyValue(g));i.requestAnimationFrame(function g(){i.nextFrame(g);let p=!1;for(let[b,y]of f.entries()){let x=window.getComputedStyle(c).getPropertyValue(y);if(h[b]!==x){h[b]=x,p=!0;break}}if(!p)return;let m=Ef(l,c);u!==m&&(d(m),u=m)})}return i.dispose}]}return[n,null]}),o=S.useMemo(()=>r(e,t)[0],[e,t]),[s=o,a]=S.useState();return rt(()=>{let[l,c]=r(e,t);if(a(l),!!c)return c(a)},[e,t]),s}function I0(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let i=t[1].slice(0,n).trim(),r=t[1].slice(n+1).trim();return r?[i,...I0(r)]:[i]}return[]}function Ef(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let i=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),i}let Pu=S.createContext(null);Pu.displayName="OpenClosedContext";var go=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(go||{});function EC(){return S.useContext(Pu)}function AC({value:e,children:t}){return S.createElement(Pu.Provider,{value:e},t)}function MC(e){throw new Error("Unexpected object: "+e)}var Ze=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Ze||{});function Yo(e,t){let n=t.resolveItems();if(n.length<=0)return null;let i=t.resolveActiveIndex(),r=i??-1;switch(e.focus){case 0:{for(let o=0;o<n.length;++o)if(!t.resolveDisabled(n[o],o,n))return o;return i}case 1:{r===-1&&(r=n.length);for(let o=r-1;o>=0;--o)if(!t.resolveDisabled(n[o],o,n))return o;return i}case 2:{for(let o=r+1;o<n.length;++o)if(!t.resolveDisabled(n[o],o,n))return o;return i}case 3:{for(let o=n.length-1;o>=0;--o)if(!t.resolveDisabled(n[o],o,n))return o;return i}case 4:{for(let o=0;o<n.length;++o)if(t.resolveId(n[o],o,n)===e.id)return o;return i}case 5:return null;default:MC(e)}}function _0(e){let t=Pe(e),n=S.useRef(!1);S.useEffect(()=>(n.current=!1,()=>{n.current=!0,$p(()=>{n.current&&t()})}),[t])}let RC=S.createContext(!1);function PC(){return S.useContext(RC)}function kC(e){let t=PC(),n=S.useContext(A0),[i,r]=S.useState(()=>{var o;if(!t&&n!==null)return(o=n.current)!=null?o:null;if(Si.isServer)return null;let s=e==null?void 0:e.getElementById("headlessui-portal-root");if(s)return s;if(e===null)return null;let a=e.createElement("div");return a.setAttribute("id","headlessui-portal-root"),e.body.appendChild(a)});return S.useEffect(()=>{i!==null&&(e!=null&&e.body.contains(i)||e==null||e.body.appendChild(i))},[i,e]),S.useEffect(()=>{t||n!==null&&r(n.current)},[n,r,t]),i}let E0=S.Fragment,FC=Ht(function(e,t){let{ownerDocument:n=null,...i}=e,r=S.useRef(null),o=$n(Zx(f=>{r.current=f}),t),s=fc(r.current),a=n??s,l=kC(a),c=S.useContext(NC),u=ko(),d=zt();return _0(()=>{var f;l&&l.childNodes.length<=0&&((f=l.parentElement)==null||f.removeChild(l))}),l?fn.createPortal(S.createElement("div",{"data-headlessui-portal":"",ref:f=>{u.dispose(),c&&f&&u.add(c.register(f))}},d({ourProps:{ref:o},theirProps:i,slot:{},defaultTag:E0,name:"Portal"})),l):null});function OC(e,t){let n=$n(t),{enabled:i=!0,ownerDocument:r,...o}=e,s=zt();return i?S.createElement(FC,{...o,ownerDocument:r,ref:n}):s({ourProps:{ref:n},theirProps:o,slot:{},defaultTag:E0,name:"Portal"})}let TC=S.Fragment,A0=S.createContext(null);function DC(e,t){let{target:n,...i}=e,r={ref:$n(t)},o=zt();return S.createElement(A0.Provider,{value:n},o({ourProps:r,theirProps:i,defaultTag:TC,name:"Popover.Group"}))}let NC=S.createContext(null),LC=Ht(OC),VC=Ht(DC),BC=Object.assign(LC,{Group:VC});const Ps={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function M0(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function $C(e,t,n){let i=Et();if(t.kind==="Tracked"){let r=function(){o!==M0(e)&&(i.dispose(),n())},{position:o}=t,s=new ResizeObserver(r);s.observe(e),i.add(()=>s.disconnect()),i.addEventListener(window,"scroll",r,{passive:!0}),i.addEventListener(window,"resize",r)}return()=>i.dispose()}let Af=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Mf(e){var t,n;let i=(t=e.innerText)!=null?t:"",r=e.cloneNode(!0);if(!Bn(r))return i;let o=!1;for(let a of r.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),o=!0;let s=o?(n=r.innerText)!=null?n:"":i;return Af.test(s)&&(s=s.replace(Af,"")),s}function jC(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let i=n.split(" ").map(r=>{let o=document.getElementById(r);if(o){let s=o.getAttribute("aria-label");return typeof s=="string"?s.trim():Mf(o).trim()}return null}).filter(Boolean);if(i.length>0)return i.join(", ")}return Mf(e).trim()}function GC(e){let t=S.useRef(""),n=S.useRef("");return Pe(()=>{let i=e.current;if(!i)return"";let r=i.innerText;if(t.current===r)return n.current;let o=jC(i).trim().toLowerCase();return t.current=r,n.current=o,o})}var zC=Object.defineProperty,HC=(e,t,n)=>t in e?zC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rf=(e,t,n)=>(HC(e,typeof t!="symbol"?t+"":t,n),n),dt=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(dt||{}),na=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(na||{}),De=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItems=5]="RegisterItems",e[e.UnregisterItems=6]="UnregisterItems",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e[e.SortItems=9]="SortItems",e[e.MarkButtonAsMoved=10]="MarkButtonAsMoved",e))(De||{});function Pf(e,t=n=>n){let n=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,i=s0(t(e.items.slice()),o=>o.dataRef.current.domRef.current),r=n?i.indexOf(n):null;return r===-1&&(r=null),{items:i,activeItemIndex:r}}let WC={1(e){if(e.menuState===1)return e;let t=e.buttonElement?Ps.Tracked(M0(e.buttonElement)):e.buttonPositionState;return{...e,activeItemIndex:null,pendingFocus:{focus:Ze.Nothing},menuState:1,buttonPositionState:t}},0(e,t){return e.menuState===0?e:{...e,__demoMode:!1,pendingFocus:t.focus,menuState:0,buttonPositionState:Ps.Idle}},2:(e,t)=>{var n,i,r,o,s;if(e.menuState===1)return e;let a={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===Ze.Nothing)return{...a,activeItemIndex:null};if(t.focus===Ze.Specific)return{...a,activeItemIndex:e.items.findIndex(u=>u.id===t.id)};if(t.focus===Ze.Previous){let u=e.activeItemIndex;if(u!==null){let d=e.items[u].dataRef.current.domRef,f=Yo(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:h=>h.id,resolveDisabled:h=>h.dataRef.current.disabled});if(f!==null){let h=e.items[f].dataRef.current.domRef;if(((i=d.current)==null?void 0:i.previousElementSibling)===h.current||((r=h.current)==null?void 0:r.previousElementSibling)===null)return{...a,activeItemIndex:f}}}}else if(t.focus===Ze.Next){let u=e.activeItemIndex;if(u!==null){let d=e.items[u].dataRef.current.domRef,f=Yo(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:h=>h.id,resolveDisabled:h=>h.dataRef.current.disabled});if(f!==null){let h=e.items[f].dataRef.current.domRef;if(((o=d.current)==null?void 0:o.nextElementSibling)===h.current||((s=h.current)==null?void 0:s.nextElementSibling)===null)return{...a,activeItemIndex:f}}}}let l=Pf(e),c=Yo(t,{resolveItems:()=>l.items,resolveActiveIndex:()=>l.activeItemIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});return{...a,...l,activeItemIndex:c}},3:(e,t)=>{let n=e.searchQuery!==""?0:1,i=e.searchQuery+t.value.toLowerCase(),r=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(s=>{var a;return((a=s.dataRef.current.textValue)==null?void 0:a.startsWith(i))&&!s.dataRef.current.disabled}),o=r?e.items.indexOf(r):-1;return o===-1||o===e.activeItemIndex?{...e,searchQuery:i}:{...e,searchQuery:i,activeItemIndex:o,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,t)=>{let n=e.items.concat(t.items.map(r=>r)),i=e.activeItemIndex;return e.pendingFocus.focus!==Ze.Nothing&&(i=Yo(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeItemIndex,resolveId:r=>r.id,resolveDisabled:r=>r.dataRef.current.disabled})),{...e,items:n,activeItemIndex:i,pendingFocus:{focus:Ze.Nothing},pendingShouldSort:!0}},6:(e,t)=>{let n=e.items,i=[],r=new Set(t.items);for(let[o,s]of n.entries())if(r.has(s.id)&&(i.push(o),r.delete(s.id),r.size===0))break;if(i.length>0){n=n.slice();for(let o of i.reverse())n.splice(o,1)}return{...e,items:n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.itemsElement===t.element?e:{...e,itemsElement:t.element},9:e=>e.pendingShouldSort?{...e,...Pf(e),pendingShouldSort:!1}:e,10(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:Ps.Moved}}};class ku extends qp{constructor(t){super(t),Rf(this,"actions",{registerItem:Qd(()=>{let n=[],i=new Set;return[(r,o)=>{i.has(o)||(i.add(o),n.push({id:r,dataRef:o}))},()=>(i.clear(),this.send({type:5,items:n.splice(0)}))]}),unregisterItem:Qd(()=>{let n=[];return[i=>n.push(i),()=>this.send({type:6,items:n.splice(0)})]})}),Rf(this,"selectors",{activeDescendantId(n){var i;let r=n.activeItemIndex,o=n.items;return r===null||(i=o[r])==null?void 0:i.id},isActive(n,i){var r;let o=n.activeItemIndex,s=n.items;return o!==null?((r=s[o])==null?void 0:r.id)===i:!1},shouldScrollIntoView(n,i){return n.__demoMode||n.menuState!==0||n.activationTrigger===0?!1:this.isActive(n,i)},didButtonMove(n){return n.buttonPositionState.kind==="Moved"}}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let n=this.state.id,i=Cu.get(null);this.disposables.add(i.on(t0.Push,r=>{!i.selectors.isTop(r,n)&&this.state.menuState===0&&this.send({type:1})})),this.on(0,()=>i.actions.push(n)),this.on(1,()=>i.actions.pop(n))}this.disposables.group(n=>{this.on(1,i=>{i.buttonElement&&(n.dispose(),n.add($C(i.buttonElement,i.buttonPositionState,()=>{this.send({type:10})})))})})}static new({id:t,__demoMode:n=!1}){return new ku({id:t,__demoMode:n,menuState:n?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:Ze.Nothing},buttonPositionState:Ps.Idle})}reduce(t,n){return pr(n.type,WC,t,n)}}const R0=S.createContext(null);function Fu(e){let t=S.useContext(R0);if(t===null){let n=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,P0),n}return t}function P0({id:e,__demoMode:t=!1}){let n=S.useMemo(()=>ku.new({id:e,__demoMode:t}),[]);return _0(()=>n.dispose()),n}let XC=S.Fragment;function YC(e,t){let n=S.useId(),{__demoMode:i=!1,...r}=e,o=P0({id:n,__demoMode:i}),[s,a,l]=Zt(o,m=>[m.menuState,m.itemsElement,m.buttonElement]),c=$n(t),u=Cu.get(null),d=Zt(u,S.useCallback(m=>u.selectors.isTop(m,n),[u,n]));Py(d,[l,a],(m,b)=>{var y;o.send({type:De.CloseMenu}),_u(b,Iu.Loose)||(m.preventDefault(),(y=o.state.buttonElement)==null||y.focus())});let f=Pe(()=>{o.send({type:De.CloseMenu})}),h=gr({open:s===dt.Open,close:f}),g={ref:c},p=zt();return S.createElement(SC,null,S.createElement(R0.Provider,{value:o},S.createElement(AC,{value:pr(s,{[dt.Open]:go.Open,[dt.Closed]:go.Closed})},p({ourProps:g,theirProps:r,slot:h,defaultTag:XC,name:"Menu"}))))}let ZC="button";function JC(e,t){let n=Fu("Menu.Button"),i=S.useId(),{id:r=`headlessui-menu-button-${i}`,disabled:o=!1,autoFocus:s=!1,...a}=e,l=S.useRef(null),c=yC(),u=$n(t,l,xC(),Pe(A=>n.send({type:De.SetButtonElement,element:A}))),d=Pe(A=>{switch(A.key){case nt.Space:case nt.Enter:case nt.ArrowDown:A.preventDefault(),A.stopPropagation(),n.send({type:De.OpenMenu,focus:{focus:Ze.First}});break;case nt.ArrowUp:A.preventDefault(),A.stopPropagation(),n.send({type:De.OpenMenu,focus:{focus:Ze.Last}});break}}),f=Pe(A=>{switch(A.key){case nt.Space:A.preventDefault();break}}),[h,g,p]=Zt(n,A=>[A.menuState,A.buttonElement,A.itemsElement]),m=h===dt.Open;Oy(m,{trigger:g,action:S.useCallback(A=>{if(g!=null&&g.contains(A.target))return Wo.Ignore;let k=A.target.closest('[role="menuitem"]:not([data-disabled])');return Bn(k)?Wo.Select(k):p!=null&&p.contains(A.target)?Wo.Ignore:Wo.Close},[g,p]),close:S.useCallback(()=>n.send({type:De.CloseMenu}),[]),select:S.useCallback(A=>A.click(),[])});let b=ry(A=>{var k;o||(h===dt.Open?(fn.flushSync(()=>n.send({type:De.CloseMenu})),(k=l.current)==null||k.focus({preventScroll:!0})):(A.preventDefault(),n.send({type:De.OpenMenu,focus:{focus:Ze.Nothing},trigger:na.Pointer})))}),{isFocusVisible:y,focusProps:x}=Ex({autoFocus:s}),{isHovered:I,hoverProps:C}=_x({isDisabled:o}),{pressed:M,pressProps:R}=Ox({disabled:o}),w=gr({open:h===dt.Open,active:M||h===dt.Open,disabled:o,hover:I,focus:y,autofocus:s}),_=zp(c(),{ref:u,id:r,type:Ty(e,l.current),"aria-haspopup":"menu","aria-controls":p==null?void 0:p.id,"aria-expanded":h===dt.Open,disabled:o||void 0,autoFocus:s,onKeyDown:d,onKeyUp:f},b,x,C,R);return zt()({ourProps:_,theirProps:a,slot:w,defaultTag:ZC,name:"Menu.Button"})}let UC="div",QC=ac.RenderStrategy|ac.Static;function KC(e,t){let n=S.useId(),{id:i=`headlessui-menu-items-${n}`,anchor:r,portal:o=!1,modal:s=!0,transition:a=!1,...l}=e,c=vC(r),u=Fu("Menu.Items"),[d,f]=wC(c),h=CC(),[g,p]=S.useState(null),m=$n(t,c?d:null,Pe(E=>u.send({type:De.SetItemsElement,element:E})),p),[b,y]=Zt(u,E=>[E.menuState,E.buttonElement]),x=fc(y),I=fc(g);c&&(o=!0);let C=EC(),[M,R]=Xy(a,g,C!==null?(C&go.Open)===go.Open:b===dt.Open);by(M,y,()=>{u.send({type:De.CloseMenu})});let w=Zt(u,E=>E.__demoMode),_=w?!1:s&&b===dt.Open;jy(_,I);let A=w?!1:s&&b===dt.Open;my(A,{allowed:S.useCallback(()=>[y,g],[y,g])});let k=Zt(u,u.selectors.didButtonMove)?!1:M;S.useEffect(()=>{let E=g;E&&b===dt.Open&&(Px(E)||E.focus({preventScroll:!0}))},[b,g]),Qy(b===dt.Open,{container:g,accept(E){return E.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:E.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(E){E.setAttribute("role","none")}});let D=ko(),B=Pe(E=>{var F,V,j;switch(D.dispose(),E.key){case nt.Space:if(u.state.searchQuery!=="")return E.preventDefault(),E.stopPropagation(),u.send({type:De.Search,value:E.key});case nt.Enter:if(E.preventDefault(),E.stopPropagation(),u.state.activeItemIndex!==null){let{dataRef:G}=u.state.items[u.state.activeItemIndex];(V=(F=G.current)==null?void 0:F.domRef.current)==null||V.click()}u.send({type:De.CloseMenu}),o0(u.state.buttonElement);break;case nt.ArrowDown:return E.preventDefault(),E.stopPropagation(),u.send({type:De.GoToItem,focus:Ze.Next});case nt.ArrowUp:return E.preventDefault(),E.stopPropagation(),u.send({type:De.GoToItem,focus:Ze.Previous});case nt.Home:case nt.PageUp:return E.preventDefault(),E.stopPropagation(),u.send({type:De.GoToItem,focus:Ze.First});case nt.End:case nt.PageDown:return E.preventDefault(),E.stopPropagation(),u.send({type:De.GoToItem,focus:Ze.Last});case nt.Escape:E.preventDefault(),E.stopPropagation(),fn.flushSync(()=>u.send({type:De.CloseMenu})),(j=u.state.buttonElement)==null||j.focus({preventScroll:!0});break;case nt.Tab:E.preventDefault(),E.stopPropagation(),fn.flushSync(()=>u.send({type:De.CloseMenu})),Ey(u.state.buttonElement,E.shiftKey?dc.Previous:dc.Next);break;default:E.key.length===1&&(u.send({type:De.Search,value:E.key}),D.setTimeout(()=>u.send({type:De.ClearSearch}),350));break}}),N=Pe(E=>{switch(E.key){case nt.Space:E.preventDefault();break}}),P=gr({open:b===dt.Open}),O=zp(c?h():{},{"aria-activedescendant":Zt(u,u.selectors.activeDescendantId),"aria-labelledby":Zt(u,E=>{var F;return(F=E.buttonElement)==null?void 0:F.id}),id:i,onKeyDown:B,onKeyUp:N,role:"menu",tabIndex:b===dt.Open?0:void 0,ref:m,style:{...l.style,...f,"--button-width":iy(M,y,!0).width},...Wy(R)}),T=zt();return S.createElement(BC,{enabled:o?e.static||M:!1,ownerDocument:x},T({ourProps:O,theirProps:l,slot:P,defaultTag:UC,features:QC,visible:k,name:"Menu.Items"}))}let qC=S.Fragment;function ew(e,t){let n=S.useId(),{id:i=`headlessui-menu-item-${n}`,disabled:r=!1,...o}=e,s=Fu("Menu.Item"),a=Zt(s,k=>s.selectors.isActive(k,i)),l=S.useRef(null),c=$n(t,l),u=Zt(s,k=>s.selectors.shouldScrollIntoView(k,i));rt(()=>{if(u)return Et().requestAnimationFrame(()=>{var k,D;(D=(k=l.current)==null?void 0:k.scrollIntoView)==null||D.call(k,{block:"nearest"})})},[u,l]);let d=GC(l),f=S.useRef({disabled:r,domRef:l,get textValue(){return d()}});rt(()=>{f.current.disabled=r},[f,r]),rt(()=>(s.actions.registerItem(i,f),()=>s.actions.unregisterItem(i)),[f,i]);let h=Pe(()=>{s.send({type:De.CloseMenu})}),g=Pe(k=>{if(r)return k.preventDefault();s.send({type:De.CloseMenu}),o0(s.state.buttonElement)}),p=Pe(()=>{if(r)return s.send({type:De.GoToItem,focus:Ze.Nothing});s.send({type:De.GoToItem,focus:Ze.Specific,id:i})}),m=Gy(),b=Pe(k=>m.update(k)),y=Pe(k=>{m.wasMoved(k)&&(r||a||s.send({type:De.GoToItem,focus:Ze.Specific,id:i,trigger:na.Pointer}))}),x=Pe(k=>{m.wasMoved(k)&&(r||a&&s.state.activationTrigger===na.Pointer&&s.send({type:De.GoToItem,focus:Ze.Nothing}))}),[I,C]=Jp(),[M,R]=Jx(),w=gr({active:a,focus:a,disabled:r,close:h}),_={id:i,ref:c,role:"menuitem",tabIndex:r===!0?void 0:-1,"aria-disabled":r===!0?!0:void 0,"aria-labelledby":I,"aria-describedby":M,disabled:void 0,onClick:g,onFocus:p,onPointerEnter:b,onMouseEnter:b,onPointerMove:y,onMouseMove:y,onPointerLeave:x,onMouseLeave:x},A=zt();return S.createElement(C,null,S.createElement(R,null,A({ourProps:_,theirProps:o,slot:w,defaultTag:qC,name:"Menu.Item"})))}let tw="div";function nw(e,t){let[n,i]=Jp(),r=e,o={ref:t,"aria-labelledby":n,role:"group"},s=zt();return S.createElement(i,null,s({ourProps:o,theirProps:r,slot:{},defaultTag:tw,name:"Menu.Section"}))}let iw="header";function rw(e,t){let n=S.useId(),{id:i=`headlessui-menu-heading-${n}`,...r}=e,o=yu();rt(()=>o.register(i),[i,o.register]);let s={id:i,ref:t,role:"presentation",...o.props};return zt()({ourProps:s,theirProps:r,slot:{},defaultTag:iw,name:"Menu.Heading"})}let ow="div";function sw(e,t){let n=e,i={ref:t,role:"separator"};return zt()({ourProps:i,theirProps:n,slot:{},defaultTag:ow,name:"Menu.Separator"})}let aw=Ht(YC),k0=Ht(JC),F0=Ht(KC),O0=Ht(ew),lw=Ht(nw),cw=Ht(rw),uw=Ht(sw),dw=Object.assign(aw,{Button:k0,Items:F0,Item:O0,Section:lw,Heading:cw,Separator:uw});const fw=({menuButton:e,menuItems:t})=>{const[n,i]=S.useState(),[r,o]=S.useState(!1),s=a=>{const l=a.currentTarget.getBoundingClientRect(),c=160,d=window.innerWidth-l.right,f={top:l.bottom+window.scrollY};d>=c?f.left=l.left+window.scrollX:f.right=d+window.scrollX,i(f),o(!0)};return S.useEffect(()=>{const a=()=>o(!1);return window.addEventListener("scroll",a,!0),window.addEventListener("resize",a),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}},[]),v.jsxs(dw,{as:"div","data-open":r,className:"relative",children:[v.jsx(k0,{"data-testid":"dropdown-menu-button",onClick:s,className:"headlessui-menu-button",children:e}),r&&n&&v.jsx(F0,{className:"fixed min-w-30 shadow-lg rounded-md z-40 overflow-hidden",style:{top:`${n.top}px`,left:n.left!==void 0?`${n.left}px`:"auto",right:n.right!==void 0?`${n.right}px`:"auto",backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},children:t.map(({label:a,icon:l,action:c,disabled:u=!1},d)=>v.jsx(O0,{disabled:u,children:({close:f})=>v.jsxs("button",{"data-testid":`dropdown-menu-item-${a.toLowerCase().replace(/\s+/g,"-")}`,onClick:()=>{u||(c(),f(),o(!1))},disabled:u,className:`w-full px-4 py-2 text-xs text-left flex items-center gap-2 transition-colors ${u?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,style:{color:"var(--text-color)"},onMouseEnter:h=>{u||(h.currentTarget.style.backgroundColor="var(--hover-bg-color)")},onMouseLeave:h=>{h.currentTarget.style.backgroundColor="transparent"},children:[l,a]})},d))})]})};function Ti(e){"@babel/helpers - typeof";return Ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ti(e)}function hw(e,t){if(Ti(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(Ti(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function T0(e){var t=hw(e,"string");return Ti(t)=="symbol"?t:t+""}function Dr(e,t,n){return(t=T0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kf(Object(n),!0).forEach(function(i){Dr(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kf(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function gw(e){if(Array.isArray(e))return e}function pw(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(u){c=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}function mc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function D0(e,t){if(e){if(typeof e=="string")return mc(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mc(e,t):void 0}}function mw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
22
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dn(e,t){return gw(e)||pw(e,t)||D0(e,t)||mw()}function bw(e,t){if(e==null)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;n[i]=e[i]}return n}function bn(e,t){if(e==null)return{};var n,i,r=bw(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var vw=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function N0(e){var t=e.defaultInputValue,n=t===void 0?"":t,i=e.defaultMenuIsOpen,r=i===void 0?!1:i,o=e.defaultValue,s=o===void 0?null:o,a=e.inputValue,l=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,f=e.onMenuOpen,h=e.value,g=bn(e,vw),p=S.useState(a!==void 0?a:n),m=Dn(p,2),b=m[0],y=m[1],x=S.useState(l!==void 0?l:r),I=Dn(x,2),C=I[0],M=I[1],R=S.useState(h!==void 0?h:s),w=Dn(R,2),_=w[0],A=w[1],k=S.useCallback(function(E,F){typeof c=="function"&&c(E,F),A(E)},[c]),D=S.useCallback(function(E,F){var V;typeof u=="function"&&(V=u(E,F)),y(V!==void 0?V:E)},[u]),B=S.useCallback(function(){typeof f=="function"&&f(),M(!0)},[f]),N=S.useCallback(function(){typeof d=="function"&&d(),M(!1)},[d]),P=a!==void 0?a:b,O=l!==void 0?l:C,T=h!==void 0?h:_;return q(q({},g),{},{inputValue:P,menuIsOpen:O,onChange:k,onInputChange:D,onMenuClose:N,onMenuOpen:B,value:T})}function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},te.apply(null,arguments)}function xw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ff(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,T0(i.key),i)}}function yw(e,t,n){return t&&Ff(e.prototype,t),n&&Ff(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bc(e,t){return bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},bc(e,t)}function Cw(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bc(e,t)}function ia(e){return ia=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ia(e)}function L0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(L0=function(){return!!e})()}function ww(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sw(e,t){if(t&&(Ti(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ww(e)}function Iw(e){var t=L0();return function(){var n,i=ia(e);if(t){var r=ia(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Sw(this,n)}}function _w(e){if(Array.isArray(e))return mc(e)}function Ew(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Aw(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
23
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qi(e){return _w(e)||Ew(e)||D0(e)||Aw()}function Mw(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Rw(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Pw=function(){function e(n){var i=this;this._insertTag=function(r){var o;i.tags.length===0?i.insertionPoint?o=i.insertionPoint.nextSibling:i.prepend?o=i.container.firstChild:o=i.before:o=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(r,o),i.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(i){i.forEach(this._insertTag)},t.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Rw(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Mw(r);try{o.insertRule(i,o.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},t.flush=function(){this.tags.forEach(function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)}),this.tags=[],this.ctr=0},e}(),ct="-ms-",ra="-moz-",Se="-webkit-",V0="comm",Ou="rule",Tu="decl",kw="@import",B0="@keyframes",Fw="@layer",Ow=Math.abs,Xa=String.fromCharCode,Tw=Object.assign;function Dw(e,t){return it(e,0)^45?(((t<<2^it(e,0))<<2^it(e,1))<<2^it(e,2))<<2^it(e,3):0}function $0(e){return e.trim()}function Nw(e,t){return(e=t.exec(e))?e[0]:e}function Ie(e,t,n){return e.replace(t,n)}function vc(e,t){return e.indexOf(t)}function it(e,t){return e.charCodeAt(t)|0}function po(e,t,n){return e.slice(t,n)}function nn(e){return e.length}function Du(e){return e.length}function Zo(e,t){return t.push(e),e}function Lw(e,t){return e.map(t).join("")}var Ya=1,or=1,j0=0,_t=0,Je=0,xr="";function Za(e,t,n,i,r,o,s){return{value:e,root:t,parent:n,type:i,props:r,children:o,line:Ya,column:or,length:s,return:""}}function Ir(e,t){return Tw(Za("",null,null,"",null,null,0),e,{length:-e.length},t)}function Vw(){return Je}function Bw(){return Je=_t>0?it(xr,--_t):0,or--,Je===10&&(or=1,Ya--),Je}function Pt(){return Je=_t<j0?it(xr,_t++):0,or++,Je===10&&(or=1,Ya++),Je}function ln(){return it(xr,_t)}function ks(){return _t}function Do(e,t){return po(xr,e,t)}function mo(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function G0(e){return Ya=or=1,j0=nn(xr=e),_t=0,[]}function z0(e){return xr="",e}function Fs(e){return $0(Do(_t-1,xc(e===91?e+2:e===40?e+1:e)))}function $w(e){for(;(Je=ln())&&Je<33;)Pt();return mo(e)>2||mo(Je)>3?"":" "}function jw(e,t){for(;--t&&Pt()&&!(Je<48||Je>102||Je>57&&Je<65||Je>70&&Je<97););return Do(e,ks()+(t<6&&ln()==32&&Pt()==32))}function xc(e){for(;Pt();)switch(Je){case e:return _t;case 34:case 39:e!==34&&e!==39&&xc(Je);break;case 40:e===41&&xc(e);break;case 92:Pt();break}return _t}function Gw(e,t){for(;Pt()&&e+Je!==57;)if(e+Je===84&&ln()===47)break;return"/*"+Do(t,_t-1)+"*"+Xa(e===47?e:Pt())}function zw(e){for(;!mo(ln());)Pt();return Do(e,_t)}function Hw(e){return z0(Os("",null,null,null,[""],e=G0(e),0,[0],e))}function Os(e,t,n,i,r,o,s,a,l){for(var c=0,u=0,d=s,f=0,h=0,g=0,p=1,m=1,b=1,y=0,x="",I=r,C=o,M=i,R=x;m;)switch(g=y,y=Pt()){case 40:if(g!=108&&it(R,d-1)==58){vc(R+=Ie(Fs(y),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:R+=Fs(y);break;case 9:case 10:case 13:case 32:R+=$w(g);break;case 92:R+=jw(ks()-1,7);continue;case 47:switch(ln()){case 42:case 47:Zo(Ww(Gw(Pt(),ks()),t,n),l);break;default:R+="/"}break;case 123*p:a[c++]=nn(R)*b;case 125*p:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+u:b==-1&&(R=Ie(R,/\f/g,"")),h>0&&nn(R)-d&&Zo(h>32?Tf(R+";",i,n,d-1):Tf(Ie(R," ","")+";",i,n,d-2),l);break;case 59:R+=";";default:if(Zo(M=Of(R,t,n,c,u,r,a,x,I=[],C=[],d),o),y===123)if(u===0)Os(R,t,M,M,I,o,d,a,C);else switch(f===99&&it(R,3)===110?100:f){case 100:case 108:case 109:case 115:Os(e,M,M,i&&Zo(Of(e,M,M,0,0,r,a,x,r,I=[],d),C),r,C,d,a,i?I:C);break;default:Os(R,M,M,M,[""],C,0,a,C)}}c=u=h=0,p=b=1,x=R="",d=s;break;case 58:d=1+nn(R),h=g;default:if(p<1){if(y==123)--p;else if(y==125&&p++==0&&Bw()==125)continue}switch(R+=Xa(y),y*p){case 38:b=u>0?1:(R+="\f",-1);break;case 44:a[c++]=(nn(R)-1)*b,b=1;break;case 64:ln()===45&&(R+=Fs(Pt())),f=ln(),u=d=nn(x=R+=zw(ks())),y++;break;case 45:g===45&&nn(R)==2&&(p=0)}}return o}function Of(e,t,n,i,r,o,s,a,l,c,u){for(var d=r-1,f=r===0?o:[""],h=Du(f),g=0,p=0,m=0;g<i;++g)for(var b=0,y=po(e,d+1,d=Ow(p=s[g])),x=e;b<h;++b)(x=$0(p>0?f[b]+" "+y:Ie(y,/&\f/g,f[b])))&&(l[m++]=x);return Za(e,t,n,r===0?Ou:a,l,c,u)}function Ww(e,t,n){return Za(e,t,n,V0,Xa(Vw()),po(e,2,-2),0)}function Tf(e,t,n,i){return Za(e,t,n,Tu,po(e,0,i),po(e,i+1,-1),i)}function er(e,t){for(var n="",i=Du(e),r=0;r<i;r++)n+=t(e[r],r,e,t)||"";return n}function Xw(e,t,n,i){switch(e.type){case Fw:if(e.children.length)break;case kw:case Tu:return e.return=e.return||e.value;case V0:return"";case B0:return e.return=e.value+"{"+er(e.children,i)+"}";case Ou:e.value=e.props.join(",")}return nn(n=er(e.children,i))?e.return=e.value+"{"+n+"}":""}function Yw(e){var t=Du(e);return function(n,i,r,o){for(var s="",a=0;a<t;a++)s+=e[a](n,i,r,o)||"";return s}}function Zw(e){return function(t){t.root||(t=t.return)&&e(t)}}function Jw(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Uw=function(t,n,i){for(var r=0,o=0;r=o,o=ln(),r===38&&o===12&&(n[i]=1),!mo(o);)Pt();return Do(t,_t)},Qw=function(t,n){var i=-1,r=44;do switch(mo(r)){case 0:r===38&&ln()===12&&(n[i]=1),t[i]+=Uw(_t-1,n,i);break;case 2:t[i]+=Fs(r);break;case 4:if(r===44){t[++i]=ln()===58?"&\f":"",n[i]=t[i].length;break}default:t[i]+=Xa(r)}while(r=Pt());return t},Kw=function(t,n){return z0(Qw(G0(t),n))},Df=new WeakMap,qw=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,i=t.parent,r=t.column===i.column&&t.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Df.get(i))&&!r){Df.set(t,!0);for(var o=[],s=Kw(n,o),a=i.props,l=0,c=0;l<s.length;l++)for(var u=0;u<a.length;u++,c++)t.props[c]=o[l]?s[l].replace(/&\f/g,a[u]):a[u]+" "+s[l]}}},eS=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function H0(e,t){switch(Dw(e,t)){case 5103:return Se+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Se+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Se+e+ra+e+ct+e+e;case 6828:case 4268:return Se+e+ct+e+e;case 6165:return Se+e+ct+"flex-"+e+e;case 5187:return Se+e+Ie(e,/(\w+).+(:[^]+)/,Se+"box-$1$2"+ct+"flex-$1$2")+e;case 5443:return Se+e+ct+"flex-item-"+Ie(e,/flex-|-self/,"")+e;case 4675:return Se+e+ct+"flex-line-pack"+Ie(e,/align-content|flex-|-self/,"")+e;case 5548:return Se+e+ct+Ie(e,"shrink","negative")+e;case 5292:return Se+e+ct+Ie(e,"basis","preferred-size")+e;case 6060:return Se+"box-"+Ie(e,"-grow","")+Se+e+ct+Ie(e,"grow","positive")+e;case 4554:return Se+Ie(e,/([^-])(transform)/g,"$1"+Se+"$2")+e;case 6187:return Ie(Ie(Ie(e,/(zoom-|grab)/,Se+"$1"),/(image-set)/,Se+"$1"),e,"")+e;case 5495:case 3959:return Ie(e,/(image-set\([^]*)/,Se+"$1$`$1");case 4968:return Ie(Ie(e,/(.+:)(flex-)?(.*)/,Se+"box-pack:$3"+ct+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Se+e+e;case 4095:case 3583:case 4068:case 2532:return Ie(e,/(.+)-inline(.+)/,Se+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(nn(e)-1-t>6)switch(it(e,t+1)){case 109:if(it(e,t+4)!==45)break;case 102:return Ie(e,/(.+:)(.+)-([^]+)/,"$1"+Se+"$2-$3$1"+ra+(it(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~vc(e,"stretch")?H0(Ie(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(it(e,t+1)!==115)break;case 6444:switch(it(e,nn(e)-3-(~vc(e,"!important")&&10))){case 107:return Ie(e,":",":"+Se)+e;case 101:return Ie(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Se+(it(e,14)===45?"inline-":"")+"box$3$1"+Se+"$2$3$1"+ct+"$2box$3")+e}break;case 5936:switch(it(e,t+11)){case 114:return Se+e+ct+Ie(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Se+e+ct+Ie(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Se+e+ct+Ie(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Se+e+ct+e+e}return e}var tS=function(t,n,i,r){if(t.length>-1&&!t.return)switch(t.type){case Tu:t.return=H0(t.value,t.length);break;case B0:return er([Ir(t,{value:Ie(t.value,"@","@"+Se)})],r);case Ou:if(t.length)return Lw(t.props,function(o){switch(Nw(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return er([Ir(t,{props:[Ie(o,/:(read-\w+)/,":"+ra+"$1")]})],r);case"::placeholder":return er([Ir(t,{props:[Ie(o,/:(plac\w+)/,":"+Se+"input-$1")]}),Ir(t,{props:[Ie(o,/:(plac\w+)/,":"+ra+"$1")]}),Ir(t,{props:[Ie(o,/:(plac\w+)/,ct+"input-$1")]})],r)}return""})}},nS=[tS],iS=function(t){var n=t.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(p){var m=p.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var r=t.stylisPlugins||nS,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var m=p.getAttribute("data-emotion").split(" "),b=1;b<m.length;b++)o[m[b]]=!0;a.push(p)});var l,c=[qw,eS];{var u,d=[Xw,Zw(function(p){u.insert(p)})],f=Yw(c.concat(r,d)),h=function(m){return er(Hw(m),f)};l=function(m,b,y,x){u=y,h(m?m+"{"+b.styles+"}":b.styles),x&&(g.inserted[b.name]=!0)}}var g={key:n,sheet:new Pw({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return g.sheet.hydrate(a),g},yc={exports:{}},Ee={};/** @license React v16.13.1
24
- * react-is.production.min.js
25
- *
26
- * Copyright (c) Facebook, Inc. and its affiliates.
27
- *
28
- * This source code is licensed under the MIT license found in the
29
- * LICENSE file in the root directory of this source tree.
30
- */var Nf;function rS(){if(Nf)return Ee;Nf=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(C){if(typeof C=="object"&&C!==null){var M=C.$$typeof;switch(M){case t:switch(C=C.type,C){case l:case c:case i:case o:case r:case d:return C;default:switch(C=C&&C.$$typeof,C){case a:case u:case g:case h:case s:return C;default:return M}}case n:return M}}}function I(C){return x(C)===c}return Ee.AsyncMode=l,Ee.ConcurrentMode=c,Ee.ContextConsumer=a,Ee.ContextProvider=s,Ee.Element=t,Ee.ForwardRef=u,Ee.Fragment=i,Ee.Lazy=g,Ee.Memo=h,Ee.Portal=n,Ee.Profiler=o,Ee.StrictMode=r,Ee.Suspense=d,Ee.isAsyncMode=function(C){return I(C)||x(C)===l},Ee.isConcurrentMode=I,Ee.isContextConsumer=function(C){return x(C)===a},Ee.isContextProvider=function(C){return x(C)===s},Ee.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},Ee.isForwardRef=function(C){return x(C)===u},Ee.isFragment=function(C){return x(C)===i},Ee.isLazy=function(C){return x(C)===g},Ee.isMemo=function(C){return x(C)===h},Ee.isPortal=function(C){return x(C)===n},Ee.isProfiler=function(C){return x(C)===o},Ee.isStrictMode=function(C){return x(C)===r},Ee.isSuspense=function(C){return x(C)===d},Ee.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===i||C===c||C===o||C===r||C===d||C===f||typeof C=="object"&&C!==null&&(C.$$typeof===g||C.$$typeof===h||C.$$typeof===s||C.$$typeof===a||C.$$typeof===u||C.$$typeof===m||C.$$typeof===b||C.$$typeof===y||C.$$typeof===p)},Ee.typeOf=x,Ee}var Ae={};/** @license React v16.13.1
31
- * react-is.development.js
32
- *
33
- * Copyright (c) Facebook, Inc. and its affiliates.
34
- *
35
- * This source code is licensed under the MIT license found in the
36
- * LICENSE file in the root directory of this source tree.
37
- */var Lf;function oS(){return Lf||(Lf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function x(H){return typeof H=="string"||typeof H=="function"||H===i||H===c||H===o||H===r||H===d||H===f||typeof H=="object"&&H!==null&&(H.$$typeof===g||H.$$typeof===h||H.$$typeof===s||H.$$typeof===a||H.$$typeof===u||H.$$typeof===m||H.$$typeof===b||H.$$typeof===y||H.$$typeof===p)}function I(H){if(typeof H=="object"&&H!==null){var ye=H.$$typeof;switch(ye){case t:var Z=H.type;switch(Z){case l:case c:case i:case o:case r:case d:return Z;default:var pe=Z&&Z.$$typeof;switch(pe){case a:case u:case g:case h:case s:return pe;default:return ye}}case n:return ye}}}var C=l,M=c,R=a,w=s,_=t,A=u,k=i,D=g,B=h,N=n,P=o,O=r,T=d,E=!1;function F(H){return E||(E=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),V(H)||I(H)===l}function V(H){return I(H)===c}function j(H){return I(H)===a}function G(H){return I(H)===s}function $(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function Y(H){return I(H)===u}function U(H){return I(H)===i}function re(H){return I(H)===g}function ve(H){return I(H)===h}function Q(H){return I(H)===n}function ee(H){return I(H)===o}function ue(H){return I(H)===r}function J(H){return I(H)===d}Ae.AsyncMode=C,Ae.ConcurrentMode=M,Ae.ContextConsumer=R,Ae.ContextProvider=w,Ae.Element=_,Ae.ForwardRef=A,Ae.Fragment=k,Ae.Lazy=D,Ae.Memo=B,Ae.Portal=N,Ae.Profiler=P,Ae.StrictMode=O,Ae.Suspense=T,Ae.isAsyncMode=F,Ae.isConcurrentMode=V,Ae.isContextConsumer=j,Ae.isContextProvider=G,Ae.isElement=$,Ae.isForwardRef=Y,Ae.isFragment=U,Ae.isLazy=re,Ae.isMemo=ve,Ae.isPortal=Q,Ae.isProfiler=ee,Ae.isStrictMode=ue,Ae.isSuspense=J,Ae.isValidElementType=x,Ae.typeOf=I}()),Ae}process.env.NODE_ENV==="production"?yc.exports=rS():yc.exports=oS();var sS=yc.exports,W0=sS,aS={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},lS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},X0={};X0[W0.ForwardRef]=aS;X0[W0.Memo]=lS;var cS=!0;function uS(e,t,n){var i="";return n.split(" ").forEach(function(r){e[r]!==void 0?t.push(e[r]+";"):r&&(i+=r+" ")}),i}var Y0=function(t,n,i){var r=t.key+"-"+n.name;(i===!1||cS===!1)&&t.registered[r]===void 0&&(t.registered[r]=n.styles)},dS=function(t,n,i){Y0(t,n,i);var r=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+r:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function fS(e){for(var t=0,n,i=0,r=e.length;r>=4;++i,r-=4)n=e.charCodeAt(i)&255|(e.charCodeAt(++i)&255)<<8|(e.charCodeAt(++i)&255)<<16|(e.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(i+2)&255)<<16;case 2:t^=(e.charCodeAt(i+1)&255)<<8;case 1:t^=e.charCodeAt(i)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var hS={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},gS=/[A-Z]|^ms/g,pS=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Z0=function(t){return t.charCodeAt(1)===45},Vf=function(t){return t!=null&&typeof t!="boolean"},xl=Jw(function(e){return Z0(e)?e:e.replace(gS,"-$&").toLowerCase()}),Bf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(pS,function(i,r,o){return rn={name:r,styles:o,next:rn},r})}return hS[t]!==1&&!Z0(t)&&typeof n=="number"&&n!==0?n+"px":n};function bo(e,t,n){if(n==null)return"";var i=n;if(i.__emotion_styles!==void 0)return i;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return rn={name:r.name,styles:r.styles,next:rn},r.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)rn={name:s.name,styles:s.styles,next:rn},s=s.next;var a=o.styles+";";return a}return mS(e,t,n)}case"function":{if(e!==void 0){var l=rn,c=n(e);return rn=l,bo(e,t,c)}break}}var u=n;return u}function mS(e,t,n){var i="";if(Array.isArray(n))for(var r=0;r<n.length;r++)i+=bo(e,t,n[r])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;Vf(a)&&(i+=xl(o)+":"+Bf(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)Vf(s[l])&&(i+=xl(o)+":"+Bf(o,s[l])+";");else{var c=bo(e,t,s);switch(o){case"animation":case"animationName":{i+=xl(o)+":"+c+";";break}default:i+=o+"{"+c+"}"}}}return i}var $f=/label:\s*([^\s;{]+)\s*(;|$)/g,rn;function J0(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var i=!0,r="";rn=void 0;var o=e[0];if(o==null||o.raw===void 0)i=!1,r+=bo(n,t,o);else{var s=o;r+=s[0]}for(var a=1;a<e.length;a++)if(r+=bo(n,t,e[a]),i){var l=o;r+=l[a]}$f.lastIndex=0;for(var c="",u;(u=$f.exec(r))!==null;)c+="-"+u[1];var d=fS(r)+c;return{name:d,styles:r,next:rn}}var bS=function(t){return t()},vS=z.useInsertionEffect?z.useInsertionEffect:!1,xS=vS||bS,U0=z.createContext(typeof HTMLElement<"u"?iS({key:"css"}):null);U0.Provider;var yS=function(t){return S.forwardRef(function(n,i){var r=S.useContext(U0);return t(n,r,i)})},CS=z.createContext({}),Nu={}.hasOwnProperty,Cc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",wS=function(t,n){var i={};for(var r in n)Nu.call(n,r)&&(i[r]=n[r]);return i[Cc]=t,i},SS=function(t){var n=t.cache,i=t.serialized,r=t.isStringTag;return Y0(n,i,r),xS(function(){return dS(n,i,r)}),null},IS=yS(function(e,t,n){var i=e.css;typeof i=="string"&&t.registered[i]!==void 0&&(i=t.registered[i]);var r=e[Cc],o=[i],s="";typeof e.className=="string"?s=uS(t.registered,o,e.className):e.className!=null&&(s=e.className+" ");var a=J0(o,void 0,z.useContext(CS));s+=t.key+"-"+a.name;var l={};for(var c in e)Nu.call(e,c)&&c!=="css"&&c!==Cc&&(l[c]=e[c]);return l.className=s,n&&(l.ref=n),z.createElement(z.Fragment,null,z.createElement(SS,{cache:t,serialized:a,isStringTag:typeof r=="string"}),z.createElement(r,l))}),_S=IS,K=function(t,n){var i=arguments;if(n==null||!Nu.call(n,"css"))return z.createElement.apply(void 0,i);var r=i.length,o=new Array(r);o[0]=_S,o[1]=wS(t,n);for(var s=2;s<r;s++)o[s]=i[s];return z.createElement.apply(null,o)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(K||(K={}));function Lu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return J0(t)}function ES(){var e=Lu.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}function AS(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var wc=S.useLayoutEffect,MS=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],oa=function(){};function RS(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function PS(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];var o=[].concat(i);if(t&&e)for(var s in t)t.hasOwnProperty(s)&&t[s]&&o.push("".concat(RS(e,s)));return o.filter(function(a){return a}).map(function(a){return String(a).trim()}).join(" ")}var sa=function(t){return BS(t)?t.filter(Boolean):Ti(t)==="object"&&t!==null?[t]:[]},Q0=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=bn(t,MS);return q({},n)},We=function(t,n,i){var r=t.cx,o=t.getStyles,s=t.getClassNames,a=t.className;return{css:o(n,t),className:r(i??{},s(n,t),a)}};function Ja(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function kS(e){return Ja(e)?window.innerHeight:e.clientHeight}function K0(e){return Ja(e)?window.pageYOffset:e.scrollTop}function aa(e,t){if(Ja(e)){window.scrollTo(0,t);return}e.scrollTop=t}function FS(e){var t=getComputedStyle(e),n=t.position==="absolute",i=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var r=e;r=r.parentElement;)if(t=getComputedStyle(r),!(n&&t.position==="static")&&i.test(t.overflow+t.overflowY+t.overflowX))return r;return document.documentElement}function OS(e,t,n,i){return n*((e=e/i-1)*e*e+1)+t}function Jo(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:oa,r=K0(e),o=t-r,s=10,a=0;function l(){a+=s;var c=OS(a,r,o,n);aa(e,c),a<n?window.requestAnimationFrame(l):i(e)}l()}function jf(e,t){var n=e.getBoundingClientRect(),i=t.getBoundingClientRect(),r=t.offsetHeight/3;i.bottom+r>n.bottom?aa(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):i.top-r<n.top&&aa(e,Math.max(t.offsetTop-r,0))}function TS(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function Gf(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function DS(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var q0=!1,NS={get passive(){return q0=!0}},Uo=typeof window<"u"?window:{};Uo.addEventListener&&Uo.removeEventListener&&(Uo.addEventListener("p",oa,NS),Uo.removeEventListener("p",oa,!1));var LS=q0;function VS(e){return e!=null}function BS(e){return Array.isArray(e)}function Nr(e,t,n){return e?t:n}var $S=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];var o=Object.entries(t).filter(function(s){var a=Dn(s,1),l=a[0];return!i.includes(l)});return o.reduce(function(s,a){var l=Dn(a,2),c=l[0],u=l[1];return s[c]=u,s},{})},jS=["children","innerProps"],GS=["children","innerProps"];function zS(e){var t=e.maxHeight,n=e.menuEl,i=e.minHeight,r=e.placement,o=e.shouldScroll,s=e.isFixedPosition,a=e.controlHeight,l=FS(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect(),d=u.height,f=n.getBoundingClientRect(),h=f.bottom,g=f.height,p=f.top,m=n.offsetParent.getBoundingClientRect(),b=m.top,y=s?window.innerHeight:kS(l),x=K0(l),I=parseInt(getComputedStyle(n).marginBottom,10),C=parseInt(getComputedStyle(n).marginTop,10),M=b-C,R=y-p,w=M+x,_=d-x-p,A=h-y+x+I,k=x+p-C,D=160;switch(r){case"auto":case"bottom":if(R>=g)return{placement:"bottom",maxHeight:t};if(_>=g&&!s)return o&&Jo(l,A,D),{placement:"bottom",maxHeight:t};if(!s&&_>=i||s&&R>=i){o&&Jo(l,A,D);var B=s?R-I:_-I;return{placement:"bottom",maxHeight:B}}if(r==="auto"||s){var N=t,P=s?M:w;return P>=i&&(N=Math.min(P-I-a,t)),{placement:"top",maxHeight:N}}if(r==="bottom")return o&&aa(l,A),{placement:"bottom",maxHeight:t};break;case"top":if(M>=g)return{placement:"top",maxHeight:t};if(w>=g&&!s)return o&&Jo(l,k,D),{placement:"top",maxHeight:t};if(!s&&w>=i||s&&M>=i){var O=t;return(!s&&w>=i||s&&M>=i)&&(O=s?M-C:w-C),o&&Jo(l,k,D),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return c}function HS(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var em=function(t){return t==="auto"?"bottom":t},WS=function(t,n){var i,r=t.placement,o=t.theme,s=o.borderRadius,a=o.spacing,l=o.colors;return q((i={label:"menu"},Dr(i,HS(r),"100%"),Dr(i,"position","absolute"),Dr(i,"width","100%"),Dr(i,"zIndex",1),i),n?{}:{backgroundColor:l.neutral0,borderRadius:s,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},tm=S.createContext(null),XS=function(t){var n=t.children,i=t.minMenuHeight,r=t.maxMenuHeight,o=t.menuPlacement,s=t.menuPosition,a=t.menuShouldScrollIntoView,l=t.theme,c=S.useContext(tm)||{},u=c.setPortalPlacement,d=S.useRef(null),f=S.useState(r),h=Dn(f,2),g=h[0],p=h[1],m=S.useState(null),b=Dn(m,2),y=b[0],x=b[1],I=l.spacing.controlHeight;return wc(function(){var C=d.current;if(C){var M=s==="fixed",R=a&&!M,w=zS({maxHeight:r,menuEl:C,minHeight:i,placement:o,shouldScroll:R,isFixedPosition:M,controlHeight:I});p(w.maxHeight),x(w.placement),u==null||u(w.placement)}},[r,o,s,a,i,u,I]),n({ref:d,placerProps:q(q({},t),{},{placement:y||em(o),maxHeight:g})})},YS=function(t){var n=t.children,i=t.innerRef,r=t.innerProps;return K("div",te({},We(t,"menu",{menu:!0}),{ref:i},r),n)},ZS=YS,JS=function(t,n){var i=t.maxHeight,r=t.theme.spacing.baseUnit;return q({maxHeight:i,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:r,paddingTop:r})},US=function(t){var n=t.children,i=t.innerProps,r=t.innerRef,o=t.isMulti;return K("div",te({},We(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},i),n)},nm=function(t,n){var i=t.theme,r=i.spacing.baseUnit,o=i.colors;return q({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},QS=nm,KS=nm,qS=function(t){var n=t.children,i=n===void 0?"No options":n,r=t.innerProps,o=bn(t,jS);return K("div",te({},We(q(q({},o),{},{children:i,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),i)},e4=function(t){var n=t.children,i=n===void 0?"Loading...":n,r=t.innerProps,o=bn(t,GS);return K("div",te({},We(q(q({},o),{},{children:i,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),i)},t4=function(t){var n=t.rect,i=t.offset,r=t.position;return{left:n.left,position:r,top:i,width:n.width,zIndex:1}},n4=function(t){var n=t.appendTo,i=t.children,r=t.controlElement,o=t.innerProps,s=t.menuPlacement,a=t.menuPosition,l=S.useRef(null),c=S.useRef(null),u=S.useState(em(s)),d=Dn(u,2),f=d[0],h=d[1],g=S.useMemo(function(){return{setPortalPlacement:h}},[]),p=S.useState(null),m=Dn(p,2),b=m[0],y=m[1],x=S.useCallback(function(){if(r){var R=TS(r),w=a==="fixed"?0:window.pageYOffset,_=R[f]+w;(_!==(b==null?void 0:b.offset)||R.left!==(b==null?void 0:b.rect.left)||R.width!==(b==null?void 0:b.rect.width))&&y({offset:_,rect:R})}},[r,a,f,b==null?void 0:b.offset,b==null?void 0:b.rect.left,b==null?void 0:b.rect.width]);wc(function(){x()},[x]);var I=S.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),r&&l.current&&(c.current=x0(r,l.current,x,{elementResize:"ResizeObserver"in window}))},[r,x]);wc(function(){I()},[I]);var C=S.useCallback(function(R){l.current=R,I()},[I]);if(!n&&a!=="fixed"||!b)return null;var M=K("div",te({ref:C},We(q(q({},t),{},{offset:b.offset,position:a,rect:b.rect}),"menuPortal",{"menu-portal":!0}),o),i);return K(tm.Provider,{value:g},n?fn.createPortal(M,n):M)},i4=function(t){var n=t.isDisabled,i=t.isRtl;return{label:"container",direction:i?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},r4=function(t){var n=t.children,i=t.innerProps,r=t.isDisabled,o=t.isRtl;return K("div",te({},We(t,"container",{"--is-disabled":r,"--is-rtl":o}),i),n)},o4=function(t,n){var i=t.theme.spacing,r=t.isMulti,o=t.hasValue,s=t.selectProps.controlShouldRenderValue;return q({alignItems:"center",display:r&&o&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(i.baseUnit/2,"px ").concat(i.baseUnit*2,"px")})},s4=function(t){var n=t.children,i=t.innerProps,r=t.isMulti,o=t.hasValue;return K("div",te({},We(t,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),i),n)},a4=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},l4=function(t){var n=t.children,i=t.innerProps;return K("div",te({},We(t,"indicatorsContainer",{indicators:!0}),i),n)},zf,c4=["size"],u4=["innerProps","isRtl","size"];function d4(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var f4=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:d4},im=function(t){var n=t.size,i=bn(t,c4);return K("svg",te({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:f4},i))},Vu=function(t){return K(im,te({size:20},t),K("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},rm=function(t){return K(im,te({size:20},t),K("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},om=function(t,n){var i=t.isFocused,r=t.theme,o=r.spacing.baseUnit,s=r.colors;return q({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:i?s.neutral60:s.neutral20,padding:o*2,":hover":{color:i?s.neutral80:s.neutral40}})},h4=om,g4=function(t){var n=t.children,i=t.innerProps;return K("div",te({},We(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),i),n||K(rm,null))},p4=om,m4=function(t){var n=t.children,i=t.innerProps;return K("div",te({},We(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),i),n||K(Vu,null))},b4=function(t,n){var i=t.isDisabled,r=t.theme,o=r.spacing.baseUnit,s=r.colors;return q({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:i?s.neutral10:s.neutral20,marginBottom:o*2,marginTop:o*2})},v4=function(t){var n=t.innerProps;return K("span",te({},n,We(t,"indicatorSeparator",{"indicator-separator":!0})))},x4=ES(zf||(zf=AS([`
38
- 0%, 80%, 100% { opacity: 0; }
39
- 40% { opacity: 1; }
40
- `]))),y4=function(t,n){var i=t.isFocused,r=t.size,o=t.theme,s=o.colors,a=o.spacing.baseUnit;return q({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},n?{}:{color:i?s.neutral60:s.neutral20,padding:a*2})},yl=function(t){var n=t.delay,i=t.offset;return K("span",{css:Lu({animation:"".concat(x4," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:i?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},C4=function(t){var n=t.innerProps,i=t.isRtl,r=t.size,o=r===void 0?4:r,s=bn(t,u4);return K("div",te({},We(q(q({},s),{},{innerProps:n,isRtl:i,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),K(yl,{delay:0,offset:i}),K(yl,{delay:160,offset:!0}),K(yl,{delay:320,offset:!i}))},w4=function(t,n){var i=t.isDisabled,r=t.isFocused,o=t.theme,s=o.colors,a=o.borderRadius,l=o.spacing;return q({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:i?s.neutral5:s.neutral0,borderColor:i?s.neutral10:r?s.primary:s.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:r?s.primary:s.neutral30}})},S4=function(t){var n=t.children,i=t.isDisabled,r=t.isFocused,o=t.innerRef,s=t.innerProps,a=t.menuIsOpen;return K("div",te({ref:o},We(t,"control",{control:!0,"control--is-disabled":i,"control--is-focused":r,"control--menu-is-open":a}),s,{"aria-disabled":i||void 0}),n)},I4=S4,_4=["data"],E4=function(t,n){var i=t.theme.spacing;return n?{}:{paddingBottom:i.baseUnit*2,paddingTop:i.baseUnit*2}},A4=function(t){var n=t.children,i=t.cx,r=t.getStyles,o=t.getClassNames,s=t.Heading,a=t.headingProps,l=t.innerProps,c=t.label,u=t.theme,d=t.selectProps;return K("div",te({},We(t,"group",{group:!0}),l),K(s,te({},a,{selectProps:d,theme:u,getStyles:r,getClassNames:o,cx:i}),c),K("div",null,n))},M4=function(t,n){var i=t.theme,r=i.colors,o=i.spacing;return q({label:"group",cursor:"default",display:"block"},n?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},R4=function(t){var n=Q0(t);n.data;var i=bn(n,_4);return K("div",te({},We(t,"groupHeading",{"group-heading":!0}),i))},P4=A4,k4=["innerRef","isDisabled","isHidden","inputClassName"],F4=function(t,n){var i=t.isDisabled,r=t.value,o=t.theme,s=o.spacing,a=o.colors;return q(q({visibility:i?"hidden":"visible",transform:r?"translateZ(0)":""},O4),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:a.neutral80})},sm={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},O4={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":q({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},sm)},T4=function(t){return q({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},sm)},D4=function(t){var n=t.cx,i=t.value,r=Q0(t),o=r.innerRef,s=r.isDisabled,a=r.isHidden,l=r.inputClassName,c=bn(r,k4);return K("div",te({},We(t,"input",{"input-container":!0}),{"data-value":i||""}),K("input",te({className:n({input:!0},l),ref:o,style:T4(a),disabled:s},c)))},N4=D4,L4=function(t,n){var i=t.theme,r=i.spacing,o=i.borderRadius,s=i.colors;return q({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},V4=function(t,n){var i=t.theme,r=i.borderRadius,o=i.colors,s=t.cropWithEllipsis;return q({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},B4=function(t,n){var i=t.theme,r=i.spacing,o=i.borderRadius,s=i.colors,a=t.isFocused;return q({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:a?s.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},am=function(t){var n=t.children,i=t.innerProps;return K("div",i,n)},$4=am,j4=am;function G4(e){var t=e.children,n=e.innerProps;return K("div",te({role:"button"},n),t||K(Vu,{size:14}))}var z4=function(t){var n=t.children,i=t.components,r=t.data,o=t.innerProps,s=t.isDisabled,a=t.removeProps,l=t.selectProps,c=i.Container,u=i.Label,d=i.Remove;return K(c,{data:r,innerProps:q(q({},We(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),o),selectProps:l},K(u,{data:r,innerProps:q({},We(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),K(d,{data:r,innerProps:q(q({},We(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),selectProps:l}))},H4=z4,W4=function(t,n){var i=t.isDisabled,r=t.isFocused,o=t.isSelected,s=t.theme,a=s.spacing,l=s.colors;return q({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?l.primary:r?l.primary25:"transparent",color:i?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:i?void 0:o?l.primary:l.primary50}})},X4=function(t){var n=t.children,i=t.isDisabled,r=t.isFocused,o=t.isSelected,s=t.innerRef,a=t.innerProps;return K("div",te({},We(t,"option",{option:!0,"option--is-disabled":i,"option--is-focused":r,"option--is-selected":o}),{ref:s,"aria-disabled":i},a),n)},Y4=X4,Z4=function(t,n){var i=t.theme,r=i.spacing,o=i.colors;return q({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},J4=function(t){var n=t.children,i=t.innerProps;return K("div",te({},We(t,"placeholder",{placeholder:!0}),i),n)},U4=J4,Q4=function(t,n){var i=t.isDisabled,r=t.theme,o=r.spacing,s=r.colors;return q({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:i?s.neutral40:s.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},K4=function(t){var n=t.children,i=t.isDisabled,r=t.innerProps;return K("div",te({},We(t,"singleValue",{"single-value":!0,"single-value--is-disabled":i}),r),n)},q4=K4,Yt={ClearIndicator:m4,Control:I4,DropdownIndicator:g4,DownChevron:rm,CrossIcon:Vu,Group:P4,GroupHeading:R4,IndicatorsContainer:l4,IndicatorSeparator:v4,Input:N4,LoadingIndicator:C4,Menu:ZS,MenuList:US,MenuPortal:n4,LoadingMessage:e4,NoOptionsMessage:qS,MultiValue:H4,MultiValueContainer:$4,MultiValueLabel:j4,MultiValueRemove:G4,Option:Y4,Placeholder:U4,SelectContainer:r4,SingleValue:q4,ValueContainer:s4},eI=function(t){return q(q({},Yt),t.components)},Hf=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function tI(e,t){return!!(e===t||Hf(e)&&Hf(t))}function nI(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!tI(e[n],t[n]))return!1;return!0}function iI(e,t){t===void 0&&(t=nI);var n=null;function i(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var s=e.apply(this,r);return n={lastResult:s,lastArgs:r,lastThis:this},s}return i.clear=function(){n=null},i}function rI(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var oI=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:rI},sI=function(t){return K("span",te({css:oI},t))},Wf=sI,aI={guidance:function(t){var n=t.isSearchable,i=t.isMulti,r=t.tabSelectsValue,o=t.context,s=t.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return s?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(i?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,i=t.label,r=i===void 0?"":i,o=t.labels,s=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return s?"option ".concat(r," is disabled. Select another option."):"option ".concat(r,", selected.");default:return""}},onFocus:function(t){var n=t.context,i=t.focused,r=t.options,o=t.label,s=o===void 0?"":o,a=t.selectValue,l=t.isDisabled,c=t.isSelected,u=t.isAppleDevice,d=function(p,m){return p&&p.length?"".concat(p.indexOf(m)+1," of ").concat(p.length):""};if(n==="value"&&a)return"value ".concat(s," focused, ").concat(d(a,i),".");if(n==="menu"&&u){var f=l?" disabled":"",h="".concat(c?" selected":"").concat(f);return"".concat(s).concat(h,", ").concat(d(r,i),".")}return""},onFilter:function(t){var n=t.inputValue,i=t.resultsMessage;return"".concat(i).concat(n?" for search term "+n:"",".")}},lI=function(t){var n=t.ariaSelection,i=t.focusedOption,r=t.focusedValue,o=t.focusableOptions,s=t.isFocused,a=t.selectValue,l=t.selectProps,c=t.id,u=t.isAppleDevice,d=l.ariaLiveMessages,f=l.getOptionLabel,h=l.inputValue,g=l.isMulti,p=l.isOptionDisabled,m=l.isSearchable,b=l.menuIsOpen,y=l.options,x=l.screenReaderStatus,I=l.tabSelectsValue,C=l.isLoading,M=l["aria-label"],R=l["aria-live"],w=S.useMemo(function(){return q(q({},aI),d||{})},[d]),_=S.useMemo(function(){var P="";if(n&&w.onChange){var O=n.option,T=n.options,E=n.removedValue,F=n.removedValues,V=n.value,j=function(Q){return Array.isArray(Q)?null:Q},G=E||O||j(V),$=G?f(G):"",Y=T||F||void 0,U=Y?Y.map(f):[],re=q({isDisabled:G&&p(G,a),label:$,labels:U},n);P=w.onChange(re)}return P},[n,w,p,a,f]),A=S.useMemo(function(){var P="",O=i||r,T=!!(i&&a&&a.includes(i));if(O&&w.onFocus){var E={focused:O,label:f(O),isDisabled:p(O,a),isSelected:T,options:o,context:O===i?"menu":"value",selectValue:a,isAppleDevice:u};P=w.onFocus(E)}return P},[i,r,f,p,w,o,a,u]),k=S.useMemo(function(){var P="";if(b&&y.length&&!C&&w.onFilter){var O=x({count:o.length});P=w.onFilter({inputValue:h,resultsMessage:O})}return P},[o,h,b,w,y,x,C]),D=(n==null?void 0:n.action)==="initial-input-focus",B=S.useMemo(function(){var P="";if(w.guidance){var O=r?"value":b?"menu":"input";P=w.guidance({"aria-label":M,context:O,isDisabled:i&&p(i,a),isMulti:g,isSearchable:m,tabSelectsValue:I,isInitialFocus:D})}return P},[M,i,r,g,p,m,b,w,a,I,D]),N=K(S.Fragment,null,K("span",{id:"aria-selection"},_),K("span",{id:"aria-focused"},A),K("span",{id:"aria-results"},k),K("span",{id:"aria-guidance"},B));return K(S.Fragment,null,K(Wf,{id:c},D&&N),K(Wf,{"aria-live":R,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!D&&N))},cI=lI,Sc=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],uI=new RegExp("["+Sc.map(function(e){return e.letters}).join("")+"]","g"),lm={};for(var Cl=0;Cl<Sc.length;Cl++)for(var wl=Sc[Cl],Sl=0;Sl<wl.letters.length;Sl++)lm[wl.letters[Sl]]=wl.base;var cm=function(t){return t.replace(uI,function(n){return lm[n]})},dI=iI(cm),Xf=function(t){return t.replace(/^\s+|\s+$/g,"")},fI=function(t){return"".concat(t.label," ").concat(t.value)},hI=function(t){return function(n,i){if(n.data.__isNew__)return!0;var r=q({ignoreCase:!0,ignoreAccents:!0,stringify:fI,trim:!0,matchFrom:"any"},t),o=r.ignoreCase,s=r.ignoreAccents,a=r.stringify,l=r.trim,c=r.matchFrom,u=l?Xf(i):i,d=l?Xf(a(n)):a(n);return o&&(u=u.toLowerCase(),d=d.toLowerCase()),s&&(u=dI(u),d=cm(d)),c==="start"?d.substr(0,u.length)===u:d.indexOf(u)>-1}},gI=["innerRef"];function pI(e){var t=e.innerRef,n=bn(e,gI),i=$S(n,"onExited","in","enter","exit","appear");return K("input",te({ref:t},i,{css:Lu({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var mI=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function bI(e){var t=e.isEnabled,n=e.onBottomArrive,i=e.onBottomLeave,r=e.onTopArrive,o=e.onTopLeave,s=S.useRef(!1),a=S.useRef(!1),l=S.useRef(0),c=S.useRef(null),u=S.useCallback(function(m,b){if(c.current!==null){var y=c.current,x=y.scrollTop,I=y.scrollHeight,C=y.clientHeight,M=c.current,R=b>0,w=I-C-x,_=!1;w>b&&s.current&&(i&&i(m),s.current=!1),R&&a.current&&(o&&o(m),a.current=!1),R&&b>w?(n&&!s.current&&n(m),M.scrollTop=I,_=!0,s.current=!0):!R&&-b>x&&(r&&!a.current&&r(m),M.scrollTop=0,_=!0,a.current=!0),_&&mI(m)}},[n,i,r,o]),d=S.useCallback(function(m){u(m,m.deltaY)},[u]),f=S.useCallback(function(m){l.current=m.changedTouches[0].clientY},[]),h=S.useCallback(function(m){var b=l.current-m.changedTouches[0].clientY;u(m,b)},[u]),g=S.useCallback(function(m){if(m){var b=LS?{passive:!1}:!1;m.addEventListener("wheel",d,b),m.addEventListener("touchstart",f,b),m.addEventListener("touchmove",h,b)}},[h,f,d]),p=S.useCallback(function(m){m&&(m.removeEventListener("wheel",d,!1),m.removeEventListener("touchstart",f,!1),m.removeEventListener("touchmove",h,!1))},[h,f,d]);return S.useEffect(function(){if(t){var m=c.current;return g(m),function(){p(m)}}},[t,g,p]),function(m){c.current=m}}var Yf=["boxSizing","height","overflow","paddingRight","position"],Zf={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Jf(e){e.cancelable&&e.preventDefault()}function Uf(e){e.stopPropagation()}function Qf(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Kf(){return"ontouchstart"in window||navigator.maxTouchPoints}var qf=!!(typeof window<"u"&&window.document&&window.document.createElement),_r=0,Wi={capture:!1,passive:!1};function vI(e){var t=e.isEnabled,n=e.accountForScrollbars,i=n===void 0?!0:n,r=S.useRef({}),o=S.useRef(null),s=S.useCallback(function(l){if(qf){var c=document.body,u=c&&c.style;if(i&&Yf.forEach(function(g){var p=u&&u[g];r.current[g]=p}),i&&_r<1){var d=parseInt(r.current.paddingRight,10)||0,f=document.body?document.body.clientWidth:0,h=window.innerWidth-f+d||0;Object.keys(Zf).forEach(function(g){var p=Zf[g];u&&(u[g]=p)}),u&&(u.paddingRight="".concat(h,"px"))}c&&Kf()&&(c.addEventListener("touchmove",Jf,Wi),l&&(l.addEventListener("touchstart",Qf,Wi),l.addEventListener("touchmove",Uf,Wi))),_r+=1}},[i]),a=S.useCallback(function(l){if(qf){var c=document.body,u=c&&c.style;_r=Math.max(_r-1,0),i&&_r<1&&Yf.forEach(function(d){var f=r.current[d];u&&(u[d]=f)}),c&&Kf()&&(c.removeEventListener("touchmove",Jf,Wi),l&&(l.removeEventListener("touchstart",Qf,Wi),l.removeEventListener("touchmove",Uf,Wi)))}},[i]);return S.useEffect(function(){if(t){var l=o.current;return s(l),function(){a(l)}}},[t,s,a]),function(l){o.current=l}}function xI(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var yI=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},CI=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:xI};function wI(e){var t=e.children,n=e.lockEnabled,i=e.captureEnabled,r=i===void 0?!0:i,o=e.onBottomArrive,s=e.onBottomLeave,a=e.onTopArrive,l=e.onTopLeave,c=bI({isEnabled:r,onBottomArrive:o,onBottomLeave:s,onTopArrive:a,onTopLeave:l}),u=vI({isEnabled:n}),d=function(h){c(h),u(h)};return K(S.Fragment,null,n&&K("div",{onClick:yI,css:CI}),t(d))}function SI(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var II=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:SI},_I=function(t){var n=t.name,i=t.onFocus;return K("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:i,css:II,value:"",onChange:function(){}})},EI=_I;function Bu(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function AI(){return Bu(/^iPhone/i)}function um(){return Bu(/^Mac/i)}function MI(){return Bu(/^iPad/i)||um()&&navigator.maxTouchPoints>1}function RI(){return AI()||MI()}function PI(){return um()||RI()}var kI=function(t){return t.label},dm=function(t){return t.label},fm=function(t){return t.value},FI=function(t){return!!t.isDisabled},OI={clearIndicator:p4,container:i4,control:w4,dropdownIndicator:h4,group:E4,groupHeading:M4,indicatorsContainer:a4,indicatorSeparator:b4,input:F4,loadingIndicator:y4,loadingMessage:KS,menu:WS,menuList:JS,menuPortal:t4,multiValue:L4,multiValueLabel:V4,multiValueRemove:B4,noOptionsMessage:QS,option:W4,placeholder:Z4,singleValue:Q4,valueContainer:o4},TI={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},DI=4,hm=4,NI=38,LI=hm*2,VI={baseUnit:hm,controlHeight:NI,menuGutter:LI},Il={borderRadius:DI,colors:TI,spacing:VI},BI={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Gf(),captureMenuScroll:!Gf(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:hI(),formatGroupLabel:kI,getOptionLabel:dm,getOptionValue:fm,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:FI,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!DS(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function eh(e,t,n,i){var r=mm(e,t,n),o=bm(e,t,n),s=pm(e,t),a=la(e,t);return{type:"option",data:t,isDisabled:r,isSelected:o,label:s,value:a,index:i}}function Ts(e,t){return e.options.map(function(n,i){if("options"in n){var r=n.options.map(function(s,a){return eh(e,s,t,a)}).filter(function(s){return nh(e,s)});return r.length>0?{type:"group",data:n,options:r,index:i}:void 0}var o=eh(e,n,t,i);return nh(e,o)?o:void 0}).filter(VS)}function gm(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,qi(n.options.map(function(i){return i.data}))):t.push(n.data),t},[])}function th(e,t){return e.reduce(function(n,i){return i.type==="group"?n.push.apply(n,qi(i.options.map(function(r){return{data:r.data,id:"".concat(t,"-").concat(i.index,"-").concat(r.index)}}))):n.push({data:i.data,id:"".concat(t,"-").concat(i.index)}),n},[])}function $I(e,t){return gm(Ts(e,t))}function nh(e,t){var n=e.inputValue,i=n===void 0?"":n,r=t.data,o=t.isSelected,s=t.label,a=t.value;return(!xm(e)||!o)&&vm(e,{label:s,value:a,data:r},i)}function jI(e,t){var n=e.focusedValue,i=e.selectValue,r=i.indexOf(n);if(r>-1){var o=t.indexOf(n);if(o>-1)return n;if(r<t.length)return t[r]}return null}function GI(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var _l=function(t,n){var i,r=(i=t.find(function(o){return o.data===n}))===null||i===void 0?void 0:i.id;return r||null},pm=function(t,n){return t.getOptionLabel(n)},la=function(t,n){return t.getOptionValue(n)};function mm(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function bm(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var i=la(e,t);return n.some(function(r){return la(e,r)===i})}function vm(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var xm=function(t){var n=t.hideSelectedOptions,i=t.isMulti;return n===void 0?i:n},zI=1,$u=function(e){Cw(n,e);var t=Iw(n);function n(i){var r;if(xw(this,n),r=t.call(this,i),r.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(l){r.controlRef=l},r.focusedOptionRef=null,r.getFocusedOptionRef=function(l){r.focusedOptionRef=l},r.menuListRef=null,r.getMenuListRef=function(l){r.menuListRef=l},r.inputRef=null,r.getInputRef=function(l){r.inputRef=l},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(l,c){var u=r.props,d=u.onChange,f=u.name;c.name=f,r.ariaOnChange(l,c),d(l,c)},r.setValue=function(l,c,u){var d=r.props,f=d.closeMenuOnSelect,h=d.isMulti,g=d.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:g}),f&&(r.setState({inputIsHiddenAfterUpdate:!h}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(l,{action:c,option:u})},r.selectOption=function(l){var c=r.props,u=c.blurInputOnSelect,d=c.isMulti,f=c.name,h=r.state.selectValue,g=d&&r.isOptionSelected(l,h),p=r.isOptionDisabled(l,h);if(g){var m=r.getOptionValue(l);r.setValue(h.filter(function(b){return r.getOptionValue(b)!==m}),"deselect-option",l)}else if(!p)d?r.setValue([].concat(qi(h),[l]),"select-option",l):r.setValue(l,"select-option");else{r.ariaOnChange(l,{action:"select-option",option:l,name:f});return}u&&r.blurInput()},r.removeValue=function(l){var c=r.props.isMulti,u=r.state.selectValue,d=r.getOptionValue(l),f=u.filter(function(g){return r.getOptionValue(g)!==d}),h=Nr(c,f,f[0]||null);r.onChange(h,{action:"remove-value",removedValue:l}),r.focusInput()},r.clearValue=function(){var l=r.state.selectValue;r.onChange(Nr(r.props.isMulti,[],null),{action:"clear",removedValues:l})},r.popValue=function(){var l=r.props.isMulti,c=r.state.selectValue,u=c[c.length-1],d=c.slice(0,c.length-1),f=Nr(l,d,d[0]||null);u&&r.onChange(f,{action:"pop-value",removedValue:u})},r.getFocusedOptionId=function(l){return _l(r.state.focusableOptionsWithIds,l)},r.getFocusableOptionsWithIds=function(){return th(Ts(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return PS.apply(void 0,[r.props.classNamePrefix].concat(c))},r.getOptionLabel=function(l){return pm(r.props,l)},r.getOptionValue=function(l){return la(r.props,l)},r.getStyles=function(l,c){var u=r.props.unstyled,d=OI[l](c,u);d.boxSizing="border-box";var f=r.props.styles[l];return f?f(d,c):d},r.getClassNames=function(l,c){var u,d;return(u=(d=r.props.classNames)[l])===null||u===void 0?void 0:u.call(d,c)},r.getElementId=function(l){return"".concat(r.state.instancePrefix,"-").concat(l)},r.getComponents=function(){return eI(r.props)},r.buildCategorizedOptions=function(){return Ts(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return gm(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(l,c){r.setState({ariaSelection:q({value:l},c)})},r.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(l){r.blockOptionHover=!1},r.onControlMouseDown=function(l){if(!l.defaultPrevented){var c=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&r.onMenuClose():c&&r.openMenu("first"):(c&&(r.openAfterFocus=!0),r.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},r.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!r.props.isDisabled){var c=r.props,u=c.isMulti,d=c.menuIsOpen;r.focusInput(),d?(r.setState({inputIsHiddenAfterUpdate:!u}),r.onMenuClose()):r.openMenu("first"),l.preventDefault()}},r.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(r.clearValue(),l.preventDefault(),r.openAfterFocus=!1,l.type==="touchend"?r.focusInput():setTimeout(function(){return r.focusInput()}))},r.onScroll=function(l){typeof r.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&Ja(l.target)&&r.props.onMenuClose():typeof r.props.closeMenuOnScroll=="function"&&r.props.closeMenuOnScroll(l)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(l){var c=l.touches,u=c&&c.item(0);u&&(r.initialTouchX=u.clientX,r.initialTouchY=u.clientY,r.userIsDragging=!1)},r.onTouchMove=function(l){var c=l.touches,u=c&&c.item(0);if(u){var d=Math.abs(u.clientX-r.initialTouchX),f=Math.abs(u.clientY-r.initialTouchY),h=5;r.userIsDragging=d>h||f>h}},r.onTouchEnd=function(l){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(l.target)&&r.menuListRef&&!r.menuListRef.contains(l.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(l){r.userIsDragging||r.onControlMouseDown(l)},r.onClearIndicatorTouchEnd=function(l){r.userIsDragging||r.onClearIndicatorMouseDown(l)},r.onDropdownIndicatorTouchEnd=function(l){r.userIsDragging||r.onDropdownIndicatorMouseDown(l)},r.handleInputChange=function(l){var c=r.props.inputValue,u=l.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(u,{action:"input-change",prevInputValue:c}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(l){r.props.onFocus&&r.props.onFocus(l),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(l){var c=r.props.inputValue;if(r.menuListRef&&r.menuListRef.contains(document.activeElement)){r.inputRef.focus();return}r.props.onBlur&&r.props.onBlur(l),r.onInputChange("",{action:"input-blur",prevInputValue:c}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1})},r.onOptionHover=function(l){if(!(r.blockOptionHover||r.state.focusedOption===l)){var c=r.getFocusableOptions(),u=c.indexOf(l);r.setState({focusedOption:l,focusedOptionId:u>-1?r.getFocusedOptionId(l):null})}},r.shouldHideSelectedOptions=function(){return xm(r.props)},r.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),r.focus()},r.onKeyDown=function(l){var c=r.props,u=c.isMulti,d=c.backspaceRemovesValue,f=c.escapeClearsValue,h=c.inputValue,g=c.isClearable,p=c.isDisabled,m=c.menuIsOpen,b=c.onKeyDown,y=c.tabSelectsValue,x=c.openMenuOnFocus,I=r.state,C=I.focusedOption,M=I.focusedValue,R=I.selectValue;if(!p&&!(typeof b=="function"&&(b(l),l.defaultPrevented))){switch(r.blockOptionHover=!0,l.key){case"ArrowLeft":if(!u||h)return;r.focusValue("previous");break;case"ArrowRight":if(!u||h)return;r.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(M)r.removeValue(M);else{if(!d)return;u?r.popValue():g&&r.clearValue()}break;case"Tab":if(r.isComposing||l.shiftKey||!m||!y||!C||x&&r.isOptionSelected(C,R))return;r.selectOption(C);break;case"Enter":if(l.keyCode===229)break;if(m){if(!C||r.isComposing)return;r.selectOption(C);break}return;case"Escape":m?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:h}),r.onMenuClose()):g&&f&&r.clearValue();break;case" ":if(h)return;if(!m){r.openMenu("first");break}if(!C)return;r.selectOption(C);break;case"ArrowUp":m?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":m?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!m)return;r.focusOption("pageup");break;case"PageDown":if(!m)return;r.focusOption("pagedown");break;case"Home":if(!m)return;r.focusOption("first");break;case"End":if(!m)return;r.focusOption("last");break;default:return}l.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++zI),r.state.selectValue=sa(i.value),i.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),s=r.buildFocusableOptions(),a=s.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=s[a],r.state.focusedOptionId=_l(o,s[a])}return r}return yw(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&jf(this.menuListRef,this.focusedOptionRef),PI()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(r){var o=this.props,s=o.isDisabled,a=o.menuIsOpen,l=this.state.isFocused;(l&&!s&&r.isDisabled||l&&a&&!r.menuIsOpen)&&this.focusInput(),l&&s&&!r.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!s&&r.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(jf(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(r,o){this.props.onInputChange(r,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(r){var o=this,s=this.state,a=s.selectValue,l=s.isFocused,c=this.buildFocusableOptions(),u=r==="first"?0:c.length-1;if(!this.props.isMulti){var d=c.indexOf(a[0]);d>-1&&(u=d)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[u],focusedOptionId:this.getFocusedOptionId(c[u])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(r){var o=this.state,s=o.selectValue,a=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=s.indexOf(a);a||(l=-1);var c=s.length-1,u=-1;if(s.length){switch(r){case"previous":l===0?u=0:l===-1?u=c:u=l-1;break;case"next":l>-1&&l<c&&(u=l+1);break}this.setState({inputIsHidden:u!==-1,focusedValue:s[u]})}}}},{key:"focusOption",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,s=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var l=0,c=a.indexOf(s);s||(c=-1),r==="up"?l=c>0?c-1:a.length-1:r==="down"?l=(c+1)%a.length:r==="pageup"?(l=c-o,l<0&&(l=0)):r==="pagedown"?(l=c+o,l>a.length-1&&(l=a.length-1)):r==="last"&&(l=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Il):q(q({},Il),this.props.theme):Il}},{key:"getCommonProps",value:function(){var r=this.clearValue,o=this.cx,s=this.getStyles,a=this.getClassNames,l=this.getValue,c=this.selectOption,u=this.setValue,d=this.props,f=d.isMulti,h=d.isRtl,g=d.options,p=this.hasValue();return{clearValue:r,cx:o,getStyles:s,getClassNames:a,getValue:l,hasValue:p,isMulti:f,isRtl:h,options:g,selectOption:c,selectProps:d,setValue:u,theme:this.getTheme()}}},{key:"hasValue",value:function(){var r=this.state.selectValue;return r.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var r=this.props,o=r.isClearable,s=r.isMulti;return o===void 0?s:o}},{key:"isOptionDisabled",value:function(r,o){return mm(this.props,r,o)}},{key:"isOptionSelected",value:function(r,o){return bm(this.props,r,o)}},{key:"filterOption",value:function(r,o){return vm(this.props,r,o)}},{key:"formatOptionLabel",value:function(r,o){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(r,{context:o,inputValue:s,selectValue:a})}else return this.getOptionLabel(r)}},{key:"formatGroupLabel",value:function(r){return this.props.formatGroupLabel(r)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var r=this.props,o=r.isDisabled,s=r.isSearchable,a=r.inputId,l=r.inputValue,c=r.tabIndex,u=r.form,d=r.menuIsOpen,f=r.required,h=this.getComponents(),g=h.Input,p=this.state,m=p.inputIsHidden,b=p.ariaSelection,y=this.commonProps,x=a||this.getElementId("input"),I=q(q(q({"aria-autocomplete":"list","aria-expanded":d,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":f,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},d&&{"aria-controls":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?(b==null?void 0:b.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?z.createElement(g,te({},y,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:x,innerRef:this.getInputRef,isDisabled:o,isHidden:m,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:u,type:"text",value:l},I)):z.createElement(pI,te({id:x,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:oa,onFocus:this.onInputFocus,disabled:o,tabIndex:c,inputMode:"none",form:u,value:""},I))}},{key:"renderPlaceholderOrValue",value:function(){var r=this,o=this.getComponents(),s=o.MultiValue,a=o.MultiValueContainer,l=o.MultiValueLabel,c=o.MultiValueRemove,u=o.SingleValue,d=o.Placeholder,f=this.commonProps,h=this.props,g=h.controlShouldRenderValue,p=h.isDisabled,m=h.isMulti,b=h.inputValue,y=h.placeholder,x=this.state,I=x.selectValue,C=x.focusedValue,M=x.isFocused;if(!this.hasValue()||!g)return b?null:z.createElement(d,te({},f,{key:"placeholder",isDisabled:p,isFocused:M,innerProps:{id:this.getElementId("placeholder")}}),y);if(m)return I.map(function(w,_){var A=w===C,k="".concat(r.getOptionLabel(w),"-").concat(r.getOptionValue(w));return z.createElement(s,te({},f,{components:{Container:a,Label:l,Remove:c},isFocused:A,isDisabled:p,key:k,index:_,removeProps:{onClick:function(){return r.removeValue(w)},onTouchEnd:function(){return r.removeValue(w)},onMouseDown:function(B){B.preventDefault()}},data:w}),r.formatOptionLabel(w,"value"))});if(b)return null;var R=I[0];return z.createElement(u,te({},f,{data:R,isDisabled:p}),this.formatOptionLabel(R,"value"))}},{key:"renderClearIndicator",value:function(){var r=this.getComponents(),o=r.ClearIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,u=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||c)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return z.createElement(o,te({},s,{innerProps:d,isFocused:u}))}},{key:"renderLoadingIndicator",value:function(){var r=this.getComponents(),o=r.LoadingIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,u=this.state.isFocused;if(!o||!c)return null;var d={"aria-hidden":"true"};return z.createElement(o,te({},s,{innerProps:d,isDisabled:l,isFocused:u}))}},{key:"renderIndicatorSeparator",value:function(){var r=this.getComponents(),o=r.DropdownIndicator,s=r.IndicatorSeparator;if(!o||!s)return null;var a=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused;return z.createElement(s,te({},a,{isDisabled:l,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var r=this.getComponents(),o=r.DropdownIndicator;if(!o)return null;var s=this.commonProps,a=this.props.isDisabled,l=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return z.createElement(o,te({},s,{innerProps:c,isDisabled:a,isFocused:l}))}},{key:"renderMenu",value:function(){var r=this,o=this.getComponents(),s=o.Group,a=o.GroupHeading,l=o.Menu,c=o.MenuList,u=o.MenuPortal,d=o.LoadingMessage,f=o.NoOptionsMessage,h=o.Option,g=this.commonProps,p=this.state.focusedOption,m=this.props,b=m.captureMenuScroll,y=m.inputValue,x=m.isLoading,I=m.loadingMessage,C=m.minMenuHeight,M=m.maxMenuHeight,R=m.menuIsOpen,w=m.menuPlacement,_=m.menuPosition,A=m.menuPortalTarget,k=m.menuShouldBlockScroll,D=m.menuShouldScrollIntoView,B=m.noOptionsMessage,N=m.onMenuScrollToTop,P=m.onMenuScrollToBottom;if(!R)return null;var O=function($,Y){var U=$.type,re=$.data,ve=$.isDisabled,Q=$.isSelected,ee=$.label,ue=$.value,J=p===re,H=ve?void 0:function(){return r.onOptionHover(re)},ye=ve?void 0:function(){return r.selectOption(re)},Z="".concat(r.getElementId("option"),"-").concat(Y),pe={id:Z,onClick:ye,onMouseMove:H,onMouseOver:H,tabIndex:-1,role:"option","aria-selected":r.state.isAppleDevice?void 0:Q};return z.createElement(h,te({},g,{innerProps:pe,data:re,isDisabled:ve,isSelected:Q,key:Z,label:ee,type:U,value:ue,isFocused:J,innerRef:J?r.getFocusedOptionRef:void 0}),r.formatOptionLabel($.data,"menu"))},T;if(this.hasOptions())T=this.getCategorizedOptions().map(function(G){if(G.type==="group"){var $=G.data,Y=G.options,U=G.index,re="".concat(r.getElementId("group"),"-").concat(U),ve="".concat(re,"-heading");return z.createElement(s,te({},g,{key:re,data:$,options:Y,Heading:a,headingProps:{id:ve,data:G.data},label:r.formatGroupLabel(G.data)}),G.options.map(function(Q){return O(Q,"".concat(U,"-").concat(Q.index))}))}else if(G.type==="option")return O(G,"".concat(G.index))});else if(x){var E=I({inputValue:y});if(E===null)return null;T=z.createElement(d,g,E)}else{var F=B({inputValue:y});if(F===null)return null;T=z.createElement(f,g,F)}var V={minMenuHeight:C,maxMenuHeight:M,menuPlacement:w,menuPosition:_,menuShouldScrollIntoView:D},j=z.createElement(XS,te({},g,V),function(G){var $=G.ref,Y=G.placerProps,U=Y.placement,re=Y.maxHeight;return z.createElement(l,te({},g,V,{innerRef:$,innerProps:{onMouseDown:r.onMenuMouseDown,onMouseMove:r.onMenuMouseMove},isLoading:x,placement:U}),z.createElement(wI,{captureEnabled:b,onTopArrive:N,onBottomArrive:P,lockEnabled:k},function(ve){return z.createElement(c,te({},g,{innerRef:function(ee){r.getMenuListRef(ee),ve(ee)},innerProps:{role:"listbox","aria-multiselectable":g.isMulti,id:r.getElementId("listbox")},isLoading:x,maxHeight:re,focusedOption:p}),T)}))});return A||_==="fixed"?z.createElement(u,te({},g,{appendTo:A,controlElement:this.controlRef,menuPlacement:w,menuPosition:_}),j):j}},{key:"renderFormField",value:function(){var r=this,o=this.props,s=o.delimiter,a=o.isDisabled,l=o.isMulti,c=o.name,u=o.required,d=this.state.selectValue;if(u&&!this.hasValue()&&!a)return z.createElement(EI,{name:c,onFocus:this.onValueInputFocus});if(!(!c||a))if(l)if(s){var f=d.map(function(p){return r.getOptionValue(p)}).join(s);return z.createElement("input",{name:c,type:"hidden",value:f})}else{var h=d.length>0?d.map(function(p,m){return z.createElement("input",{key:"i-".concat(m),name:c,type:"hidden",value:r.getOptionValue(p)})}):z.createElement("input",{name:c,type:"hidden",value:""});return z.createElement("div",null,h)}else{var g=d[0]?this.getOptionValue(d[0]):"";return z.createElement("input",{name:c,type:"hidden",value:g})}}},{key:"renderLiveRegion",value:function(){var r=this.commonProps,o=this.state,s=o.ariaSelection,a=o.focusedOption,l=o.focusedValue,c=o.isFocused,u=o.selectValue,d=this.getFocusableOptions();return z.createElement(cI,te({},r,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:a,focusedValue:l,isFocused:c,selectValue:u,focusableOptions:d,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var r=this.getComponents(),o=r.Control,s=r.IndicatorsContainer,a=r.SelectContainer,l=r.ValueContainer,c=this.props,u=c.className,d=c.id,f=c.isDisabled,h=c.menuIsOpen,g=this.state.isFocused,p=this.commonProps=this.getCommonProps();return z.createElement(a,te({},p,{className:u,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:f,isFocused:g}),this.renderLiveRegion(),z.createElement(o,te({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:f,isFocused:g,menuIsOpen:h}),z.createElement(l,te({},p,{isDisabled:f}),this.renderPlaceholderOrValue(),this.renderInput()),z.createElement(s,te({},p,{isDisabled:f}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(r,o){var s=o.prevProps,a=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,c=o.ariaSelection,u=o.isFocused,d=o.prevWasFocused,f=o.instancePrefix,h=r.options,g=r.value,p=r.menuIsOpen,m=r.inputValue,b=r.isMulti,y=sa(g),x={};if(s&&(g!==s.value||h!==s.options||p!==s.menuIsOpen||m!==s.inputValue)){var I=p?$I(r,y):[],C=p?th(Ts(r,y),"".concat(f,"-option")):[],M=a?jI(o,y):null,R=GI(o,I),w=_l(C,R);x={selectValue:y,focusedOption:R,focusedOptionId:w,focusableOptionsWithIds:C,focusedValue:M,clearFocusValueOnUpdate:!1}}var _=l!=null&&r!==s?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},A=c,k=u&&d;return u&&!k&&(A={value:Nr(b,y,y[0]||null),options:y,action:"initial-input-focus"},k=!d),(c==null?void 0:c.action)==="initial-input-focus"&&(A=null),q(q(q({},x),_),{},{prevProps:r,ariaSelection:A,prevWasFocused:k})}}]),n}(S.Component);$u.defaultProps=BI;var HI=S.forwardRef(function(e,t){var n=N0(e);return z.createElement($u,te({ref:t},n))}),ym=HI,WI=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],ih=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=String(t).toLowerCase(),o=String(i.getOptionValue(n)).toLowerCase(),s=String(i.getOptionLabel(n)).toLowerCase();return o===r||s===r},El={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,i,r){return!(!t||n.some(function(o){return ih(t,o,r)})||i.some(function(o){return ih(t,o,r)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function XI(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,i=e.createOptionPosition,r=i===void 0?"last":i,o=e.formatCreateLabel,s=o===void 0?El.formatCreateLabel:o,a=e.isValidNewOption,l=a===void 0?El.isValidNewOption:a,c=e.getNewOptionData,u=c===void 0?El.getNewOptionData:c,d=e.onCreateOption,f=e.options,h=f===void 0?[]:f,g=e.onChange,p=bn(e,WI),m=p.getOptionValue,b=m===void 0?fm:m,y=p.getOptionLabel,x=y===void 0?dm:y,I=p.inputValue,C=p.isLoading,M=p.isMulti,R=p.value,w=p.name,_=S.useMemo(function(){return l(I,sa(R),h,{getOptionValue:b,getOptionLabel:x})?u(I,s(I)):void 0},[s,u,x,b,I,l,h,R]),A=S.useMemo(function(){return(n||!C)&&_?r==="first"?[_].concat(qi(h)):[].concat(qi(h),[_]):h},[n,r,C,_,h]),k=S.useCallback(function(D,B){if(B.action!=="select-option")return g(D,B);var N=Array.isArray(D)?D:[D];if(N[N.length-1]===_){if(d)d(I);else{var P=u(I,I),O={action:"create-option",name:w,option:P};g(Nr(M,[].concat(qi(sa(R)),[P]),P),O)}return}g(D,B)},[u,I,M,w,_,d,g,R]);return q(q({},p),{},{options:A,onChange:k})}var YI=S.forwardRef(function(e,t){var n=N0(e),i=XI(n);return z.createElement($u,te({ref:t},i))}),ZI=YI;const Cm=({label:e,placeholder:t,options:n,selectedOptions:i,handleChange:r,className:o="",creatable:s=!1,disabled:a,isMulti:l=!0,customStyles:c,menuPosition:u="fixed",alwaysShowPlaceholder:d=!1,isClearable:f=!1,selectInputClassname:h="",closeMenuOnSelect:g=!0,customOptionRenderer:p,menuPortalTarget:m,onInputChange:b,isLoading:y=!1,noOptionsMessage:x,includeApply:I,onApply:C})=>{const M=s?ZI:ym,[R,w]=S.useState(!1),_=S.useRef(null);S.useEffect(()=>{if(g)return;const E=F=>{var V;(V=_.current)!=null&&V.contains(F.target)?w(j=>!j):w(!1)};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[g]);const A=[...i,...n.filter(E=>!i.some(F=>F.value===E.value))],k=E=>v.jsxs(Yt.Control,{...E,children:[!E.getValue().length&&v.jsx(Yt.Placeholder,{...E,children:E.selectProps.placeholder}),E.children]}),D=E=>{const{data:F,isSelected:V}=E;if(p){const j=p;return v.jsx(Yt.Option,{...E,children:v.jsx(j,{data:F,isSelected:V})})}return I?v.jsx(Yt.Option,{...E,children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("input",{type:"checkbox",checked:V,readOnly:!0,style:{accentColor:"var(--brand-orange)",marginRight:8}}),F.icon&&v.jsx("span",{className:"",children:F.icon}),v.jsx("span",{children:F.label})]})}):v.jsx(Yt.Option,{...E,children:v.jsxs("div",{className:"flex items-center flex-1 gap-2",children:[F.icon&&v.jsx("span",{className:"option-icon",children:F.icon}),v.jsx("span",{children:F.label})]})})},B=E=>{const{data:F}=E;if(p){const V=p;return v.jsx(Yt.SingleValue,{...E,children:v.jsx(V,{data:F})})}return v.jsx(Yt.SingleValue,{...E,children:v.jsx("div",{className:"flex items-center gap-2",children:v.jsx("span",{children:F.label})})})},N=E=>{const{data:F}=E;return v.jsx(Yt.MultiValue,{...E,children:v.jsx("div",{className:"flex items-center gap-1",children:v.jsx("span",{children:F.label})})})},P=E=>{const{children:F}=E;return v.jsxs(Yt.Menu,{...E,children:[F,I&&v.jsx("div",{style:{padding:"8px"},children:v.jsx("button",{onClick:V=>{V.stopPropagation(),C==null||C(),w(!1)},style:{width:"100%",padding:"8px",background:"var(--brand-orange)",color:"white",border:"none",cursor:"pointer",borderRadius:"4px"},onMouseEnter:V=>V.currentTarget.style.opacity="0.9",onMouseLeave:V=>V.currentTarget.style.opacity="1",children:"Apply"})})]})},O=E=>v.jsx(Yt.DropdownIndicator,{...E}),T=()=>d?{Control:k,SingleValue:E=>E.selectProps.menuIsOpen?v.jsx(B,{...E}):v.jsx("div",{style:{position:"absolute",left:"10px"},children:t}),Option:D,MultiValue:N,DropdownIndicator:O,Menu:P}:{Option:D,SingleValue:B,MultiValue:N,DropdownIndicator:O,Menu:P};return v.jsxs("div",{ref:_,className:`${o} flex flex-col gap-1`,children:[e&&v.jsx("label",{className:"block text-sm font-medium",style:{color:"var(--text-color)"},children:e}),v.jsx(M,{isMulti:l,isClearable:f,value:i,onChange:r,options:A,placeholder:t,isDisabled:a,className:`${h} react-select-container w-full text-sm`,classNamePrefix:"react-select",menuPosition:u,menuPortalTarget:m,components:T(),...!g&&{menuIsOpen:R},onInputChange:b,isLoading:y,noOptionsMessage:x,styles:{control:(E,F)=>({...E,borderColor:F.isFocused?"var(--brand-orange)":"var(--border-color)",borderRadius:"0.25rem",cursor:"pointer",backgroundColor:"var(--bg-color)",color:"var(--text-color)",boxShadow:F.isFocused?"0 0 0 1px var(--brand-orange)":"none",":hover":{borderColor:"var(--brand-orange)"}}),input:E=>({...E,color:"var(--text-color)",boxShadow:"none",border:"none"}),singleValue:E=>({...E,color:"var(--text-color)"}),multiValue:E=>({...E,backgroundColor:"var(--brand-light)",borderRadius:"0.25rem"}),multiValueLabel:E=>({...E,color:"var(--brand-dark)"}),multiValueRemove:E=>({...E,color:"var(--brand-dark)",cursor:"pointer",":hover":{backgroundColor:"var(--brand-orange)",color:"white"}}),placeholder:E=>({...E,color:"var(--secondary-text-color)"}),option:(E,F)=>({...E,backgroundColor:F.isSelected?"var(--brand-orange)":F.isFocused?"var(--hover-bg-color)":"var(--bg-color)",color:F.isSelected?"white":"var(--text-color)",cursor:"pointer",":active":{backgroundColor:"var(--brand-orange)"}}),menu:E=>({...E,backgroundColor:"var(--bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)",zIndex:9999}),dropdownIndicator:E=>({...E,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),clearIndicator:E=>({...E,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),indicatorSeparator:E=>({...E,backgroundColor:"var(--border-color)"}),...c},...s&&{formatCreateLabel:E=>E.trim()?`Create "${E}"`:null,isValidNewOption:E=>E.trim().length>0,noOptionsMessage:()=>`Type to create a new ${e==null?void 0:e.toLowerCase()}`}})]})};/**
41
- * table-core
42
- *
43
- * Copyright (c) TanStack
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE.md file in the root directory of this source tree.
47
- *
48
- * @license MIT
49
- */function Wn(e,t){return typeof e=="function"?e(t):e}function Ft(e,t){return n=>{t.setState(i=>({...i,[e]:Wn(n,i[e])}))}}function Ua(e){return e instanceof Function}function JI(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function UI(e,t){const n=[],i=r=>{r.forEach(o=>{n.push(o);const s=t(o);s!=null&&s.length&&i(s)})};return i(e),n}function oe(e,t,n){let i=[],r;return o=>{let s;n.key&&n.debug&&(s=Date.now());const a=e(o);if(!(a.length!==i.length||a.some((u,d)=>i[d]!==u)))return r;i=a;let c;if(n.key&&n.debug&&(c=Date.now()),r=t(...a),n==null||n.onChange==null||n.onChange(r),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-s)*100)/100,d=Math.round((Date.now()-c)*100)/100,f=d/16,h=(g,p)=>{for(g=String(g);g.length<p;)g=" "+g;return g};console.info(`%c⏱ ${h(d,5)} /${h(u,5)} ms`,`
50
- font-size: .6rem;
51
- font-weight: bold;
52
- color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n==null?void 0:n.key)}return r}}function se(e,t,n,i){return{debug:()=>{var r;return(r=e==null?void 0:e.debugAll)!=null?r:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:i}}function QI(e,t,n,i){const r=()=>{var s;return(s=o.getValue())!=null?s:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:r,getContext:oe(()=>[e,n,t,o],(s,a,l,c)=>({table:s,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),se(e.options,"debugCells","cell.getContext"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(o,n,t,e)},{}),o}function KI(e,t,n,i){var r,o;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(r=(o=a.id)!=null?o:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?r:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=f=>{let h=f;for(const p of l.split(".")){var g;h=(g=h)==null?void 0:g[p],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${p}" in deeply nested key "${l}" returned undefined.`)}return h}:u=f=>f[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let d={id:`${String(c)}`,accessorFn:u,parent:i,depth:n,columnDef:a,columns:[],getFlatColumns:oe(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},se(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:oe(()=>[e._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let g=d.columns.flatMap(p=>p.getLeafColumns());return f(g)}return[d]},se(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(d,e);return d}const lt="debugHeaders";function rh(e,t,n){var i;let o={id:(i=n.id)!=null?i:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),s.push(l)};return a(o),s},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(o,e)}),o}const qI={createTable:e=>{e.getHeaderGroups=oe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,r)=>{var o,s;const a=(o=i==null?void 0:i.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?o:[],l=(s=r==null?void 0:r.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?s:[],c=n.filter(d=>!(i!=null&&i.includes(d.id))&&!(r!=null&&r.includes(d.id)));return Qo(t,[...a,...c,...l],e)},se(e.options,lt,"getHeaderGroups")),e.getCenterHeaderGroups=oe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,r)=>(n=n.filter(o=>!(i!=null&&i.includes(o.id))&&!(r!=null&&r.includes(o.id))),Qo(t,n,e,"center")),se(e.options,lt,"getCenterHeaderGroups")),e.getLeftHeaderGroups=oe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,i)=>{var r;const o=(r=i==null?void 0:i.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?r:[];return Qo(t,o,e,"left")},se(e.options,lt,"getLeftHeaderGroups")),e.getRightHeaderGroups=oe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,i)=>{var r;const o=(r=i==null?void 0:i.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?r:[];return Qo(t,o,e,"right")},se(e.options,lt,"getRightHeaderGroups")),e.getFooterGroups=oe(()=>[e.getHeaderGroups()],t=>[...t].reverse(),se(e.options,lt,"getFooterGroups")),e.getLeftFooterGroups=oe(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),se(e.options,lt,"getLeftFooterGroups")),e.getCenterFooterGroups=oe(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),se(e.options,lt,"getCenterFooterGroups")),e.getRightFooterGroups=oe(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),se(e.options,lt,"getRightFooterGroups")),e.getFlatHeaders=oe(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),se(e.options,lt,"getFlatHeaders")),e.getLeftFlatHeaders=oe(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),se(e.options,lt,"getLeftFlatHeaders")),e.getCenterFlatHeaders=oe(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),se(e.options,lt,"getCenterFlatHeaders")),e.getRightFlatHeaders=oe(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),se(e.options,lt,"getRightFlatHeaders")),e.getCenterLeafHeaders=oe(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),se(e.options,lt,"getCenterLeafHeaders")),e.getLeftLeafHeaders=oe(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),se(e.options,lt,"getLeftLeafHeaders")),e.getRightLeafHeaders=oe(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),se(e.options,lt,"getRightLeafHeaders")),e.getLeafHeaders=oe(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,i)=>{var r,o,s,a,l,c;return[...(r=(o=t[0])==null?void 0:o.headers)!=null?r:[],...(s=(a=n[0])==null?void 0:a.headers)!=null?s:[],...(l=(c=i[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},se(e.options,lt,"getLeafHeaders"))}};function Qo(e,t,n,i){var r,o;let s=0;const a=function(f,h){h===void 0&&(h=1),s=Math.max(s,h),f.filter(g=>g.getIsVisible()).forEach(g=>{var p;(p=g.columns)!=null&&p.length&&a(g.columns,h+1)},0)};a(e);let l=[];const c=(f,h)=>{const g={depth:h,id:[i,`${h}`].filter(Boolean).join("_"),headers:[]},p=[];f.forEach(m=>{const b=[...p].reverse()[0],y=m.column.depth===g.depth;let x,I=!1;if(y&&m.column.parent?x=m.column.parent:(x=m.column,I=!0),b&&(b==null?void 0:b.column)===x)b.subHeaders.push(m);else{const C=rh(n,x,{id:[i,h,x.id,m==null?void 0:m.id].filter(Boolean).join("_"),isPlaceholder:I,placeholderId:I?`${p.filter(M=>M.column===x).length}`:void 0,depth:h,index:p.length});C.subHeaders.push(m),p.push(C)}g.headers.push(m),m.headerGroup=g}),l.push(g),h>0&&c(p,h-1)},u=t.map((f,h)=>rh(n,f,{depth:s,index:h}));c(u,s-1),l.reverse();const d=f=>f.filter(g=>g.column.getIsVisible()).map(g=>{let p=0,m=0,b=[0];g.subHeaders&&g.subHeaders.length?(b=[],d(g.subHeaders).forEach(x=>{let{colSpan:I,rowSpan:C}=x;p+=I,b.push(C)})):p=1;const y=Math.min(...b);return m=m+y,g.colSpan=p,g.rowSpan=m,{colSpan:p,rowSpan:m}});return d((r=(o=l[0])==null?void 0:o.headers)!=null?r:[]),l}const e5=(e,t,n,i,r,o,s)=>{let a={id:t,index:i,original:n,depth:r,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,i),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,i),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>UI(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:oe(()=>[e.getAllLeafColumns()],l=>l.map(c=>QI(e,a,c,c.id)),se(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:oe(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),se(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(a,e)}return a},t5={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},wm=(e,t,n)=>{var i,r;const o=n==null||(i=n.toString())==null?void 0:i.toLowerCase();return!!(!((r=e.getValue(t))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(o))};wm.autoRemove=e=>Qt(e);const Sm=(e,t,n)=>{var i;return!!(!((i=e.getValue(t))==null||(i=i.toString())==null)&&i.includes(n))};Sm.autoRemove=e=>Qt(e);const Im=(e,t,n)=>{var i;return((i=e.getValue(t))==null||(i=i.toString())==null?void 0:i.toLowerCase())===(n==null?void 0:n.toLowerCase())};Im.autoRemove=e=>Qt(e);const _m=(e,t,n)=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(n)};_m.autoRemove=e=>Qt(e);const Em=(e,t,n)=>!n.some(i=>{var r;return!((r=e.getValue(t))!=null&&r.includes(i))});Em.autoRemove=e=>Qt(e)||!(e!=null&&e.length);const Am=(e,t,n)=>n.some(i=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(i)});Am.autoRemove=e=>Qt(e)||!(e!=null&&e.length);const Mm=(e,t,n)=>e.getValue(t)===n;Mm.autoRemove=e=>Qt(e);const Rm=(e,t,n)=>e.getValue(t)==n;Rm.autoRemove=e=>Qt(e);const ju=(e,t,n)=>{let[i,r]=n;const o=e.getValue(t);return o>=i&&o<=r};ju.resolveFilterValue=e=>{let[t,n]=e,i=typeof t!="number"?parseFloat(t):t,r=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(i)?-1/0:i,s=n===null||Number.isNaN(r)?1/0:r;if(o>s){const a=o;o=s,s=a}return[o,s]};ju.autoRemove=e=>Qt(e)||Qt(e[0])&&Qt(e[1]);const In={includesString:wm,includesStringSensitive:Sm,equalsString:Im,arrIncludes:_m,arrIncludesAll:Em,arrIncludesSome:Am,equals:Mm,weakEquals:Rm,inNumberRange:ju};function Qt(e){return e==null||e===""}const n5={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ft("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n==null?void 0:n.getValue(e.id);return typeof i=="string"?In.includesString:typeof i=="number"?In.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?In.equals:Array.isArray(i)?In.arrIncludes:In.weakEquals},e.getFilterFn=()=>{var n,i;return Ua(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(i=t.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?n:In[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,r;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((i=t.options.enableColumnFilters)!=null?i:!0)&&((r=t.options.enableFilters)!=null?r:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(i=>i.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,i;return(n=(i=t.getState().columnFilters)==null?void 0:i.findIndex(r=>r.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(i=>{const r=e.getFilterFn(),o=i==null?void 0:i.find(u=>u.id===e.id),s=Wn(n,o?o.value:void 0);if(oh(r,s,e)){var a;return(a=i==null?void 0:i.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:s};if(o){var c;return(c=i==null?void 0:i.map(u=>u.id===e.id?l:u))!=null?c:[]}return i!=null&&i.length?[...i,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),i=r=>{var o;return(o=Wn(t,r))==null?void 0:o.filter(s=>{const a=n.find(l=>l.id===s.id);if(a){const l=a.getFilterFn();if(oh(l,s.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=t=>{var n,i;e.setColumnFilters(t?[]:(n=(i=e.initialState)==null?void 0:i.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function oh(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const i5=(e,t,n)=>n.reduce((i,r)=>{const o=r.getValue(e);return i+(typeof o=="number"?o:0)},0),r5=(e,t,n)=>{let i;return n.forEach(r=>{const o=r.getValue(e);o!=null&&(i>o||i===void 0&&o>=o)&&(i=o)}),i},o5=(e,t,n)=>{let i;return n.forEach(r=>{const o=r.getValue(e);o!=null&&(i<o||i===void 0&&o>=o)&&(i=o)}),i},s5=(e,t,n)=>{let i,r;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(i===void 0?s>=s&&(i=r=s):(i>s&&(i=s),r<s&&(r=s)))}),[i,r]},a5=(e,t)=>{let n=0,i=0;if(t.forEach(r=>{let o=r.getValue(e);o!=null&&(o=+o)>=o&&(++n,i+=o)}),n)return i/n},l5=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!JI(n))return;if(n.length===1)return n[0];const i=Math.floor(n.length/2),r=n.sort((o,s)=>o-s);return n.length%2!==0?r[i]:(r[i-1]+r[i])/2},c5=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),u5=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,d5=(e,t)=>t.length,Al={sum:i5,min:r5,max:o5,extent:s5,mean:a5,median:l5,unique:c5,uniqueCount:u5,count:d5},f5={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Ft("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(i=>i!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,i;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((i=t.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n==null?void 0:n.getValue(e.id);if(typeof i=="number")return Al.sum;if(Object.prototype.toString.call(i)==="[object Date]")return Al.extent},e.getAggregationFn=()=>{var n,i;if(!e)throw new Error;return Ua(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(i=t.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?n:Al[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i;e.setGrouping(t?[]:(n=(i=e.initialState)==null?void 0:i.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const i=t.getColumn(n);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var r;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((r=n.subRows)!=null&&r.length)}}};function h5(e,t,n){if(!(t!=null&&t.length)||!n)return e;const i=e.filter(o=>!t.includes(o.id));return n==="remove"?i:[...t.map(o=>e.find(s=>s.id===o)).filter(Boolean),...i]}const g5={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ft("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=oe(n=>[Zr(t,n)],n=>n.findIndex(i=>i.id===e.id),se(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var i;return((i=Zr(t,n)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i;const r=Zr(t,n);return((i=r[r.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=oe(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,i)=>r=>{let o=[];if(!(t!=null&&t.length))o=r;else{const s=[...t],a=[...r];for(;a.length&&s.length;){const l=s.shift(),c=a.findIndex(u=>u.id===l);c>-1&&o.push(a.splice(c,1)[0])}o=[...o,...a]}return h5(o,n,i)},se(e.options,"debugTable","_getOrderColumnsFn"))}},Ml=()=>({left:[],right:[]}),p5={getInitialState:e=>({columnPinning:Ml(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ft("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const i=e.getLeafColumns().map(r=>r.id).filter(Boolean);t.setColumnPinning(r=>{var o,s;if(n==="right"){var a,l;return{left:((a=r==null?void 0:r.left)!=null?a:[]).filter(d=>!(i!=null&&i.includes(d))),right:[...((l=r==null?void 0:r.right)!=null?l:[]).filter(d=>!(i!=null&&i.includes(d))),...i]}}if(n==="left"){var c,u;return{left:[...((c=r==null?void 0:r.left)!=null?c:[]).filter(d=>!(i!=null&&i.includes(d))),...i],right:((u=r==null?void 0:r.right)!=null?u:[]).filter(d=>!(i!=null&&i.includes(d)))}}return{left:((o=r==null?void 0:r.left)!=null?o:[]).filter(d=>!(i!=null&&i.includes(d))),right:((s=r==null?void 0:r.right)!=null?s:[]).filter(d=>!(i!=null&&i.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var r,o,s;return((r=i.columnDef.enablePinning)!=null?r:!0)&&((o=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:i,right:r}=t.getState().columnPinning,o=n.some(a=>i==null?void 0:i.includes(a)),s=n.some(a=>r==null?void 0:r.includes(a));return o?"left":s?"right":!1},e.getPinnedIndex=()=>{var n,i;const r=e.getIsPinned();return r?(n=(i=t.getState().columnPinning)==null||(i=i[r])==null?void 0:i.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=oe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,i,r)=>{const o=[...i??[],...r??[]];return n.filter(s=>!o.includes(s.column.id))},se(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=oe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,i)=>(i??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),se(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=oe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,i)=>(i??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),se(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i;return e.setColumnPinning(t?Ml():(n=(i=e.initialState)==null?void 0:i.columnPinning)!=null?n:Ml())},e.getIsSomeColumnsPinned=t=>{var n;const i=e.getState().columnPinning;if(!t){var r,o;return!!((r=i.left)!=null&&r.length||(o=i.right)!=null&&o.length)}return!!((n=i[t])!=null&&n.length)},e.getLeftLeafColumns=oe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(r=>r.id===i)).filter(Boolean),se(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=oe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(r=>r.id===i)).filter(Boolean),se(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=oe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i)=>{const r=[...n??[],...i??[]];return t.filter(o=>!r.includes(o.id))},se(e.options,"debugColumns","getCenterLeafColumns"))}};function m5(e){return e||(typeof document<"u"?document:null)}const Ko={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Rl=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),b5={getDefaultColumnDef:()=>Ko,getInitialState:e=>({columnSizing:{},columnSizingInfo:Rl(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ft("columnSizing",e),onColumnSizingInfoChange:Ft("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,r;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Ko.minSize,(i=o??e.columnDef.size)!=null?i:Ko.size),(r=e.columnDef.maxSize)!=null?r:Ko.maxSize)},e.getStart=oe(n=>[n,Zr(t,n),t.getState().columnSizing],(n,i)=>i.slice(0,e.getIndex(n)).reduce((r,o)=>r+o.getSize(),0),se(t.options,"debugColumns","getStart")),e.getAfter=oe(n=>[n,Zr(t,n),t.getState().columnSizing],(n,i)=>i.slice(e.getIndex(n)+1).reduce((r,o)=>r+o.getSize(),0),se(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:i,...r}=n;return r})},e.getCanResize=()=>{var n,i;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((i=t.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const i=r=>{if(r.subHeaders.length)r.subHeaders.forEach(i);else{var o;n+=(o=r.column.getSize())!=null?o:0}};return i(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const i=t.getColumn(e.column.id),r=i==null?void 0:i.getCanResize();return o=>{if(!i||!r||(o.persist==null||o.persist(),Pl(o)&&o.touches&&o.touches.length>1))return;const s=e.getSize(),a=e?e.getLeafHeaders().map(b=>[b.column.id,b.column.getSize()]):[[i.id,i.getSize()]],l=Pl(o)?Math.round(o.touches[0].clientX):o.clientX,c={},u=(b,y)=>{typeof y=="number"&&(t.setColumnSizingInfo(x=>{var I,C;const M=t.options.columnResizeDirection==="rtl"?-1:1,R=(y-((I=x==null?void 0:x.startOffset)!=null?I:0))*M,w=Math.max(R/((C=x==null?void 0:x.startSize)!=null?C:0),-.999999);return x.columnSizingStart.forEach(_=>{let[A,k]=_;c[A]=Math.round(Math.max(k+k*w,0)*100)/100}),{...x,deltaOffset:R,deltaPercentage:w}}),(t.options.columnResizeMode==="onChange"||b==="end")&&t.setColumnSizing(x=>({...x,...c})))},d=b=>u("move",b),f=b=>{u("end",b),t.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=m5(n),g={moveHandler:b=>d(b.clientX),upHandler:b=>{h==null||h.removeEventListener("mousemove",g.moveHandler),h==null||h.removeEventListener("mouseup",g.upHandler),f(b.clientX)}},p={moveHandler:b=>(b.cancelable&&(b.preventDefault(),b.stopPropagation()),d(b.touches[0].clientX),!1),upHandler:b=>{var y;h==null||h.removeEventListener("touchmove",p.moveHandler),h==null||h.removeEventListener("touchend",p.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),f((y=b.touches[0])==null?void 0:y.clientX)}},m=v5()?{passive:!1}:!1;Pl(o)?(h==null||h.addEventListener("touchmove",p.moveHandler,m),h==null||h.addEventListener("touchend",p.upHandler,m)):(h==null||h.addEventListener("mousemove",g.moveHandler,m),h==null||h.addEventListener("mouseup",g.upHandler,m)),t.setColumnSizingInfo(b=>({...b,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Rl():(n=e.initialState.columnSizingInfo)!=null?n:Rl())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((i,r)=>i+r.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((i,r)=>i+r.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((i,r)=>i+r.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((i,r)=>i+r.getSize(),0))!=null?t:0}}};let qo=null;function v5(){if(typeof qo=="boolean")return qo;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return qo=e,qo}function Pl(e){return e.type==="touchstart"}const x5={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ft("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(i=>({...i,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,i;const r=e.columns;return(n=r.length?r.some(o=>o.getIsVisible()):(i=t.getState().columnVisibility)==null?void 0:i[e.id])!=null?n:!0},e.getCanHide=()=>{var n,i;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((i=t.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=oe(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(i=>i.column.getIsVisible()),se(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=oe(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,i,r)=>[...n,...i,...r],se(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,i)=>oe(()=>[i(),i().filter(r=>r.getIsVisible()).map(r=>r.id).join("_")],r=>r.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),se(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var i;e.setColumnVisibility(n?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=n=>{var i;n=(i=n)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((r,o)=>({...r,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var i;e.toggleAllColumnsVisible((i=n.target)==null?void 0:i.checked)}}};function Zr(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const y5={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},C5={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ft("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const i=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,r,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((i=t.options.enableGlobalFilter)!=null?i:!0)&&((r=t.options.enableFilters)!=null?r:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>In.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:i}=e.options;return Ua(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[i])!=null?t:In[i]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},w5={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ft("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var i,r;if(!t){e._queue(()=>{t=!0});return}if((i=(r=e.options.autoResetAll)!=null?r:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var r,o;e.setExpanded(i?{}:(r=(o=e.initialState)==null?void 0:o.expanded)!=null?r:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(r=>!r.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const s=o.split(".");i=Math.max(i,s.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(i=>{var r;const o=i===!0?!0:!!(i!=null&&i[e.id]);let s={};if(i===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{s[a]=!0}):s=i,n=(r=n)!=null?r:!o,!o&&n)return{...s,[e.id]:!0};if(o&&!n){const{[e.id]:a,...l}=s;return l}return i})},e.getIsExpanded=()=>{var n;const i=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:i===!0||i!=null&&i[e.id])},e.getCanExpand=()=>{var n,i,r;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((i=t.options.enableExpanding)!=null?i:!0)&&!!((r=e.subRows)!=null&&r.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e;for(;n&&i.parentId;)i=t.getRow(i.parentId,!0),n=i.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Ic=0,_c=10,kl=()=>({pageIndex:Ic,pageSize:_c}),S5={getInitialState:e=>({...e,pagination:{...kl(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ft("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var i,r;if(!t){e._queue(()=>{t=!0});return}if((i=(r=e.options.autoResetAll)!=null?r:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=i=>{const r=o=>Wn(i,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(r)},e.resetPagination=i=>{var r;e.setPagination(i?kl():(r=e.initialState.pagination)!=null?r:kl())},e.setPageIndex=i=>{e.setPagination(r=>{let o=Wn(i,r.pageIndex);const s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,s)),{...r,pageIndex:o}})},e.resetPageIndex=i=>{var r,o;e.setPageIndex(i?Ic:(r=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?r:Ic)},e.resetPageSize=i=>{var r,o;e.setPageSize(i?_c:(r=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?r:_c)},e.setPageSize=i=>{e.setPagination(r=>{const o=Math.max(1,Wn(i,r.pageSize)),s=r.pageSize*r.pageIndex,a=Math.floor(s/o);return{...r,pageIndex:a,pageSize:o}})},e.setPageCount=i=>e.setPagination(r=>{var o;let s=Wn(i,(o=e.options.pageCount)!=null?o:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...r,pageCount:s}}),e.getPageOptions=oe(()=>[e.getPageCount()],i=>{let r=[];return i&&i>0&&(r=[...new Array(i)].fill(null).map((o,s)=>s)),r},se(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,r=e.getPageCount();return r===-1?!0:r===0?!1:i<r-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},Fl=()=>({top:[],bottom:[]}),I5={getInitialState:e=>({rowPinning:Fl(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ft("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,r)=>{const o=i?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],s=r?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...s,e.id,...o]);t.setRowPinning(l=>{var c,u;if(n==="bottom"){var d,f;return{top:((d=l==null?void 0:l.top)!=null?d:[]).filter(p=>!(a!=null&&a.has(p))),bottom:[...((f=l==null?void 0:l.bottom)!=null?f:[]).filter(p=>!(a!=null&&a.has(p))),...Array.from(a)]}}if(n==="top"){var h,g;return{top:[...((h=l==null?void 0:l.top)!=null?h:[]).filter(p=>!(a!=null&&a.has(p))),...Array.from(a)],bottom:((g=l==null?void 0:l.bottom)!=null?g:[]).filter(p=>!(a!=null&&a.has(p)))}}return{top:((c=l==null?void 0:l.top)!=null?c:[]).filter(p=>!(a!=null&&a.has(p))),bottom:((u=l==null?void 0:l.bottom)!=null?u:[]).filter(p=>!(a!=null&&a.has(p)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:i,enablePinning:r}=t.options;return typeof i=="function"?i(e):(n=i??r)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:i,bottom:r}=t.getState().rowPinning,o=n.some(a=>i==null?void 0:i.includes(a)),s=n.some(a=>r==null?void 0:r.includes(a));return o?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var n,i;const r=e.getIsPinned();if(!r)return-1;const o=(n=r==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(s=>{let{id:a}=s;return a});return(i=o==null?void 0:o.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,i;return e.setRowPinning(t?Fl():(n=(i=e.initialState)==null?void 0:i.rowPinning)!=null?n:Fl())},e.getIsSomeRowsPinned=t=>{var n;const i=e.getState().rowPinning;if(!t){var r,o;return!!((r=i.top)!=null&&r.length||(o=i.bottom)!=null&&o.length)}return!!((n=i[t])!=null&&n.length)},e._getPinnedRows=(t,n,i)=>{var r;return((r=e.options.keepPinnedRows)==null||r?(n??[]).map(s=>{const a=e.getRow(s,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(s=>t.find(a=>a.id===s))).filter(Boolean).map(s=>({...s,position:i}))},e.getTopRows=oe(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),se(e.options,"debugRows","getTopRows")),e.getBottomRows=oe(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),se(e.options,"debugRows","getBottomRows")),e.getCenterRows=oe(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,i)=>{const r=new Set([...n??[],...i??[]]);return t.filter(o=>!r.has(o.id))},se(e.options,"debugRows","getCenterRows"))}},_5={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ft("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const i={...n},r=e.getPreGroupedRowModel().flatRows;return t?r.forEach(o=>{o.getCanSelect()&&(i[o.id]=!0)}):r.forEach(o=>{delete i[o.id]}),i})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const i=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),r={...n};return e.getRowModel().rows.forEach(o=>{Ec(r,o.id,i,!0,e)}),r}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=oe(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Ol(e,n):{rows:[],flatRows:[],rowsById:{}},se(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=oe(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Ol(e,n):{rows:[],flatRows:[],rowsById:{}},se(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=oe(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Ol(e,n):{rows:[],flatRows:[],rowsById:{}},se(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let i=!!(t.length&&Object.keys(n).length);return i&&t.some(r=>r.getCanSelect()&&!n[r.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(r=>r.getCanSelect()),{rowSelection:n}=e.getState();let i=!!t.length;return i&&t.some(r=>!n[r.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,i)=>{const r=e.getIsSelected();t.setRowSelection(o=>{var s;if(n=typeof n<"u"?n:!r,e.getCanSelect()&&r===n)return o;const a={...o};return Ec(a,e.id,n,(s=i==null?void 0:i.selectChildren)!=null?s:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Gu(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Ac(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Ac(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return i=>{var r;n&&e.toggleSelected((r=i.target)==null?void 0:r.checked)}}}},Ec=(e,t,n,i,r)=>{var o;const s=r.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),s.getCanSelect()&&(e[t]=!0)):delete e[t],i&&(o=s.subRows)!=null&&o.length&&s.getCanSelectSubRows()&&s.subRows.forEach(a=>Ec(e,a.id,n,i,r))};function Ol(e,t){const n=e.getState().rowSelection,i=[],r={},o=function(s,a){return s.map(l=>{var c;const u=Gu(l,n);if(u&&(i.push(l),r[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:o(l.subRows)}),u)return l}).filter(Boolean)};return{rows:o(t.rows),flatRows:i,rowsById:r}}function Gu(e,t){var n;return(n=t[e.id])!=null?n:!1}function Ac(e,t,n){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let r=!0,o=!1;return e.subRows.forEach(s=>{if(!(o&&!r)&&(s.getCanSelect()&&(Gu(s,t)?o=!0:r=!1),s.subRows&&s.subRows.length)){const a=Ac(s,t);a==="all"?o=!0:(a==="some"&&(o=!0),r=!1)}}),r?"all":o?"some":!1}const Mc=/([0-9]+)/gm,E5=(e,t,n)=>Pm(ei(e.getValue(n)).toLowerCase(),ei(t.getValue(n)).toLowerCase()),A5=(e,t,n)=>Pm(ei(e.getValue(n)),ei(t.getValue(n))),M5=(e,t,n)=>zu(ei(e.getValue(n)).toLowerCase(),ei(t.getValue(n)).toLowerCase()),R5=(e,t,n)=>zu(ei(e.getValue(n)),ei(t.getValue(n))),P5=(e,t,n)=>{const i=e.getValue(n),r=t.getValue(n);return i>r?1:i<r?-1:0},k5=(e,t,n)=>zu(e.getValue(n),t.getValue(n));function zu(e,t){return e===t?0:e>t?1:-1}function ei(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Pm(e,t){const n=e.split(Mc).filter(Boolean),i=t.split(Mc).filter(Boolean);for(;n.length&&i.length;){const r=n.shift(),o=i.shift(),s=parseInt(r,10),a=parseInt(o,10),l=[s,a].sort();if(isNaN(l[0])){if(r>o)return 1;if(o>r)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return n.length-i.length}const Er={alphanumeric:E5,alphanumericCaseSensitive:A5,text:M5,textCaseSensitive:R5,datetime:P5,basic:k5},F5={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ft("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const r of n){const o=r==null?void 0:r.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return Er.datetime;if(typeof o=="string"&&(i=!0,o.split(Mc).length>1))return Er.alphanumeric}return i?Er.text:Er.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,i;if(!e)throw new Error;return Ua(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(i=t.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?n:Er[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{const r=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(s=>{const a=s==null?void 0:s.find(h=>h.id===e.id),l=s==null?void 0:s.findIndex(h=>h.id===e.id);let c=[],u,d=o?n:r==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&i?a?u="toggle":u="add":s!=null&&s.length&&l!==s.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(o||r||(u="remove")),u==="add"){var f;c=[...s,{id:e.id,desc:d}],c.splice(0,c.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=s.map(h=>h.id===e.id?{...h,desc:d}:h):u==="remove"?c=s.filter(h=>h.id!==e.id):c=[{id:e.id,desc:d}];return c})},e.getFirstSortDir=()=>{var n,i;return((n=(i=e.columnDef.sortDescFirst)!=null?i:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var i,r;const o=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==o&&((i=t.options.enableSortingRemoval)==null||i)&&(!(n&&(r=t.options.enableMultiRemove)!=null)||r)?!1:s==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,i;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((i=t.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,i;return(n=(i=e.columnDef.enableMultiSort)!=null?i:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const i=(n=t.getState().sorting)==null?void 0:n.find(r=>r.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,i;return(n=(i=t.getState().sorting)==null?void 0:i.findIndex(r=>r.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return i=>{n&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i;e.setSorting(t?[]:(n=(i=e.initialState)==null?void 0:i.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},O5=[qI,x5,g5,p5,t5,n5,y5,C5,F5,f5,w5,S5,I5,_5,b5];function T5(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const i=[...O5,...(t=e._features)!=null?t:[]];let r={_features:i};const o=r._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(r)),{}),s=f=>r.options.mergeOptions?r.options.mergeOptions(o,f):{...o,...f};let l={...{},...(n=e.initialState)!=null?n:{}};r._features.forEach(f=>{var h;l=(h=f.getInitialState==null?void 0:f.getInitialState(l))!=null?h:l});const c=[];let u=!1;const d={_features:i,options:{...o,...e},initialState:l,_queue:f=>{c.push(f),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{r.setState(r.initialState)},setOptions:f=>{const h=Wn(f,r.options);r.options=s(h)},getState:()=>r.options.state,setState:f=>{r.options.onStateChange==null||r.options.onStateChange(f)},_getRowId:(f,h,g)=>{var p;return(p=r.options.getRowId==null?void 0:r.options.getRowId(f,h,g))!=null?p:`${g?[g.id,h].join("."):h}`},getCoreRowModel:()=>(r._getCoreRowModel||(r._getCoreRowModel=r.options.getCoreRowModel(r)),r._getCoreRowModel()),getRowModel:()=>r.getPaginationRowModel(),getRow:(f,h)=>{let g=(h?r.getPrePaginationRowModel():r.getRowModel()).rowsById[f];if(!g&&(g=r.getCoreRowModel().rowsById[f],!g))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${f}`):new Error;return g},_getDefaultColumnDef:oe(()=>[r.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:g=>{const p=g.header.column.columnDef;return p.accessorKey?p.accessorKey:p.accessorFn?p.id:null},cell:g=>{var p,m;return(p=(m=g.renderValue())==null||m.toString==null?void 0:m.toString())!=null?p:null},...r._features.reduce((g,p)=>Object.assign(g,p.getDefaultColumnDef==null?void 0:p.getDefaultColumnDef()),{}),...f}},se(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>r.options.columns,getAllColumns:oe(()=>[r._getColumnDefs()],f=>{const h=function(g,p,m){return m===void 0&&(m=0),g.map(b=>{const y=KI(r,b,m,p),x=b;return y.columns=x.columns?h(x.columns,y,m+1):[],y})};return h(f)},se(e,"debugColumns","getAllColumns")),getAllFlatColumns:oe(()=>[r.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),se(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:oe(()=>[r.getAllFlatColumns()],f=>f.reduce((h,g)=>(h[g.id]=g,h),{}),se(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:oe(()=>[r.getAllColumns(),r._getOrderColumnsFn()],(f,h)=>{let g=f.flatMap(p=>p.getLeafColumns());return h(g)},se(e,"debugColumns","getAllLeafColumns")),getColumn:f=>{const h=r._getAllFlatColumnsById()[f];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${f}' does not exist.`),h}};Object.assign(r,d);for(let f=0;f<r._features.length;f++){const h=r._features[f];h==null||h.createTable==null||h.createTable(r)}return r}function D5(){return e=>oe(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(r,o,s){o===void 0&&(o=0);const a=[];for(let c=0;c<r.length;c++){const u=e5(e,e._getRowId(r[c],c,s),r[c],c,o,void 0,s==null?void 0:s.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(r[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=i(u.originalSubRows,o+1,u))}}return a};return n.rows=i(t),n},se(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function N5(e){const t=[],n=i=>{var r;t.push(i),(r=i.subRows)!=null&&r.length&&i.getIsExpanded()&&i.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function L5(e){return t=>oe(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,i)=>{if(!i.rows.length)return i;const{pageSize:r,pageIndex:o}=n;let{rows:s,flatRows:a,rowsById:l}=i;const c=r*o,u=c+r;s=s.slice(c,u);let d;t.options.paginateExpandedRows?d={rows:s,flatRows:a,rowsById:l}:d=N5({rows:s,flatRows:a,rowsById:l}),d.flatRows=[];const f=h=>{d.flatRows.push(h),h.subRows.length&&h.subRows.forEach(f)};return d.rows.forEach(f),d},se(t.options,"debugTable","getPaginationRowModel"))}/**
53
- * react-table
54
- *
55
- * Copyright (c) TanStack
56
- *
57
- * This source code is licensed under the MIT license found in the
58
- * LICENSE.md file in the root directory of this source tree.
59
- *
60
- * @license MIT
61
- */function sh(e,t){return e?V5(e)?z.createElement(e,t):e:null}function V5(e){return B5(e)||typeof e=="function"||$5(e)}function B5(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function $5(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function j5(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=z.useState(()=>({current:T5(t)})),[i,r]=z.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...i,...e.state},onStateChange:s=>{r(s),e.onStateChange==null||e.onStateChange(s)}})),n.current}function G5(e){return de({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"},child:[]}]})(e)}function km(e){return de({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},child:[]}]})(e)}function z5(e){return de({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function Hu(e){return de({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"},child:[]}]})(e)}function H5(e){return de({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m6 18 8.5-6L6 6v12zM16 6v12h2V6h-2z"},child:[]}]})(e)}function W5(e){return de({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"},child:[]}]})(e)}function X5(e){return de({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 10 5 5 5-5z"},child:[]}]})(e)}function Y5(e){return de({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 14 5-5 5 5z"},child:[]}]})(e)}function Z5(e){return de({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"},child:[]}]})(e)}function J5(e){return de({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"},child:[]}]})(e)}function U5(e){return de({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function Q5(e){return de({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function K5(e){return de({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function q5(e){return de({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12.01",y2:"16"},child:[]}]})(e)}function e_(e){return de({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"20",x2:"18",y2:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"20",x2:"12",y2:"4"},child:[]},{tag:"line",attr:{x1:"6",y1:"20",x2:"6",y2:"14"},child:[]}]})(e)}function t_(e){return de({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"},child:[]},{tag:"polyline",attr:{points:"22 4 12 14.01 9 11.01"},child:[]}]})(e)}function n_(e){return de({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}function i_(e){return de({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"18 15 12 9 6 15"},child:[]}]})(e)}function r_(e){return de({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"ellipse",attr:{cx:"12",cy:"5",rx:"9",ry:"3"},child:[]},{tag:"path",attr:{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"},child:[]},{tag:"path",attr:{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"},child:[]}]})(e)}function ca(e){return de({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function o_(e){return de({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"line",attr:{x1:"12",y1:"18",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"9",y1:"15",x2:"15",y2:"15"},child:[]}]})(e)}function s_(e){return de({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 4 23 10 17 10"},child:[]},{tag:"polyline",attr:{points:"1 20 1 14 7 14"},child:[]},{tag:"path",attr:{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"},child:[]}]})(e)}function ah(e){return de({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"},child:[]}]})(e)}function a_(e){return de({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}const Fm=S.createContext(void 0),Om=({children:e,onToastShow:t})=>{const[n,i]=S.useState(!1),[r,o]=S.useState(Mt.INFO),[s,a]=S.useState(""),l=S.useCallback((c,u,d)=>{if(t)try{t(c,u,d)}catch(f){console.warn("Toast external integration failed:",f)}o(c),a(u),i(!0)},[t]);return v.jsx(Fm.Provider,{value:{toast:n,toastMessage:s,toastType:r,setToast:i,setToastMessage:a,setToastType:o,showToast:l},children:e})},Tm=()=>{const e=S.useContext(Fm);if(!e)throw new Error("useToast must be used within a ToastProvider");return e};let ua=null,da=null,lh=!1;function Wu(){if(!lh){lh=!0;try{const e=require("react-redux");ua=e.useDispatch,da=e.useSelector}catch{}}}const Dm=()=>(Wu(),ua?ua():(console.warn("[useAppDispatch] Redux is not installed. Install @reduxjs/toolkit and react-redux to use this hook."),null)),Nm=(e,t)=>(Wu(),da?da(e,t):(console.warn("[useAppSelector] Redux is not installed. Install @reduxjs/toolkit and react-redux to use this hook."),null)),Lm=()=>(Wu(),ua!==null&&da!==null),Vm=S.createContext(void 0),Bm=({children:e})=>{const[t,n]=S.useState(!1),i=()=>n(!0),r=()=>n(!1);return v.jsx(Vm.Provider,{value:{isLoading:t,showLoader:i,hideLoader:r},children:e})},$m=()=>{const e=S.useContext(Vm);if(!e)throw new Error("useLoader must be used within a LoaderProvider");return e},jm=(e,t={})=>{const[n,i]=S.useState(t),[r,o]=S.useState(null),[s,a]=S.useState(!1),[l,c]=S.useState(null);return{filters:n,filteredData:r,loading:s,error:l,updateFilters:f=>{i(h=>({...h,...f}))},clearFilters:()=>{i(t),o(null)},setFilteredData:o,setLoading:a,setError:c}},Ds=10,Ns=0,Rc=8,Pc=`w-4 h-4 appearance-none border
62
- border-gray-500 rounded-sm checked:bg-brand-primary
63
- checked:border-[#0b86cf] checked:relative
64
- checked:after:content-['✔'] checked:after:absolute
65
- checked:after:text-white checked:after:font-bold
66
- checked:after:left-1/2 checked:after:top-1/2
67
- checked:after:-translate-x-1/2 checked:after:-translate-y-1/2
68
- checked:after:text-xs`,l_=({type:e,options:t,columns:n,data:i,fetchTableData:r,searchEnabled:o=!1,filtersEnabled:s,filterFields:a,setTableData:l,refreshTable:c,paginationEnabled:u=!0,exportEnabled:d=!0,bulkActions:f={},handleBulkAction:h,onRowClick:g,columnBorders:p,showConnectorsSummary:m=!1,connectorScanObject:b,connectorDetail:y,scanDetails:x,isDeletedItemsList:I=!1,onViewDeletedItemsClick:C,showViewDeleteButton:M=!1,refreshData:R,setRefreshData:w,tableWrapperClass:_,searchColumns:A=[],onExport:k,FilterModal:D,ConnectorSummaryAccordion:B})=>{var Fd,Od,Td,Dd,Nd;const N=Dm(),P=Lm(),O=Nm(L=>!P||!(L!=null&&L.tableData)?null:L.tableData[e]||null),[T,E]=S.useState(""),[F,V]=S.useState(()=>(O==null?void 0:O.sorting)??[]),[j,G]=S.useState(new Set),[$,Y]=S.useState(),[U,re]=S.useState(!0),[ve,Q]=S.useState(!1),[ee,ue]=S.useState(0),{filters:J}=jm(),[H,ye]=S.useState({}),[Z,pe]=S.useState(()=>O!=null&&O.pagination?{...O.pagination}:{pageIndex:Ns,pageSize:Ds}),{showToast:ge}=Tm(),{showLoader:st,hideLoader:le}=$m(),[Te,qt]=S.useState(),xn=S.useRef(null),bt=S.useRef(""),Gn=S.useRef(""),Ye=S.useRef(!1),ke=j5({data:i,columns:n,state:{columnVisibility:{actions:U},globalFilter:T,sorting:F,pagination:Z},onColumnVisibilityChange:()=>re(!U),onGlobalFilterChange:E,onSortingChange:V,getCoreRowModel:D5(),manualPagination:!0,manualSorting:!0,manualFiltering:!0,pageCount:Math.ceil(ee/Z.pageSize),onPaginationChange:pe,...u&&{getPaginationRowModel:L5()}}),Ge=((Fd=ke.getState().pagination)==null?void 0:Fd.pageIndex)+1||1,[Qe,Tt]=S.useState(!1),[li,$o]=S.useState(!1),[Wt,vt]=S.useState(Ge),Dt=S.useMemo(()=>!ee||ee===0||isNaN(ee)?1:Math.max(Math.ceil(ee/Z.pageSize),1),[ee,Z.pageSize,Z.pageIndex,Qe,I]);S.useEffect(()=>{R&&(jo(),w&&w(!1))},[R]),S.useEffect(()=>{if(e&&P&&N)try{const{setPagination:L}=require("../../redux/slices/tableDataSlice");N(L({tableType:e,pagination:Z}))}catch{}},[Z.pageIndex,Z.pageSize,e]),S.useEffect(()=>{vt(Ge)},[Ge]),S.useEffect(()=>{if(P&&N)try{const{setGlobalSorting:L}=require("../../redux/slices/tableDataSlice");N(L({tableType:e,sorting:F}))}catch{}},[(Od=F[0])==null?void 0:Od.desc,(Td=F[0])==null?void 0:Td.id]);const ci=S.useMemo(()=>{var Re,je,at;const L={pageNumber:ke.getState().pagination.pageIndex,pageSize:ke.getState().pagination.pageSize},ne={sortBy:F.length&&(Re=F[0])!=null&&Re.id?(je=F[0])==null?void 0:je.id:void 0,order:F.length&&(at=F[0])!=null&&at.desc?"desc":"asc"},X={searchTerm:T,searchColumns:A.length>0?A:void 0};return{options:t,filters:Object.keys(J).length>0?J:H,...X,...L,...ne,fetchDeleted:I}},[T,J,F,ke.getState().pagination.pageIndex,ke.getState().pagination.pageSize,(Dd=F[0])==null?void 0:Dd.id,(Nd=F[0])==null?void 0:Nd.desc,I,Qe,t==null?void 0:t.arg,A]),a1=L=>{if(L){const ne=i.filter(X=>!X.isDisabled).map(X=>X.id);G(new Set(ne))}else G(new Set)};S.useEffect(()=>()=>{var L;Te&&((L=window.api)!=null&&L.deleteExportedFile)&&window.api.deleteExportedFile((Te??"").replace("download:\\",""))},[Te]),S.useEffect(()=>{const L=async()=>{if(r){Ye.current=!0;try{st();let Re=0;if(e===hu.SCANRESULT&&(t!=null&&t.usePermanentCache)){const at=`scandetails_count_${JSON.stringify({...ci,pageNumber:void 0,pageSize:void 0})}`,zn=localStorage.getItem(at)||sessionStorage.getItem(at);if(zn)try{const yn=JSON.parse(zn);yn&&typeof yn.totalRecords=="number"&&(Re=yn.totalRecords)}catch{}Re||(Re=(await r({...ci,usePermanentCache:(t==null?void 0:t.usePermanentCache)||!1})).totalRecords??0)}else Re=(await r({...ci,...t!=null&&t.usePermanentCache?{usePermanentCache:t.usePermanentCache}:{}})).totalRecords??0;const je=Math.max(Math.ceil(Re/Z.pageSize)-1,0);i.length===0&&Z.pageIndex>0?pe(at=>({...at,pageIndex:Math.min(Z.pageIndex,je)})):Z.pageIndex>je&&pe(at=>({...at,pageIndex:je})),ke.setPageCount(Math.ceil(Re/Z.pageSize))}catch(Re){console.error("Failed to update total count",Re)}finally{Ye.current=!1;const Re=JSON.stringify({pagination:Z,searchApplied:li,sorting:F,isDeletedItemsList:I});Re!==bt.current&&(bt.current=Re,jo()),le()}}},ne=JSON.stringify({options:t,filters:J,searchTerm:T,searchColumns:A,sorting:F,isDeletedItemsList:I,pageSize:Z.pageSize});ne!==Gn.current&&(L(),Gn.current=ne)},[t,J,T,e,F,I,Z.pageSize,A]);const l1=L=>{var ne;L.key==="Enter"&&((ne=xn.current)==null||ne.click())},c1=(L,ne)=>{G(X=>{const Re=new Set(X);return ne?Re.add(L):Re.delete(L),Re})},u1=async()=>{var ne;if(!e)return;let L="";try{if(st(),k)L=await k(e,H,t,I);else if((ne=window.api)!=null&&ne.exportTable)L=t?await window.api.exportTable(e,H,t,I):await window.api.exportTable(e,H,{},I);else{ge(Mt.ERROR,"Export functionality is not available. Please provide an onExport handler.");return}qt(L);const X=document.createElement("a");X.href=L,X.download=`export-${e}.csv`,document.body.appendChild(X),X.click(),document.body.removeChild(X),ge(Mt.SUCCESS,"Export initiated successfully")}catch(X){console.error("Export error",X),ge(Mt.ERROR,"Export failed")}finally{le(),L&&L.startsWith("blob:")&&URL.revokeObjectURL(L)}},Ed=()=>{let L=0;return i.forEach(ne=>{ne.isDisabled||L++}),L},d1=async()=>{if(!(!r||!l)){st(),pe(L=>({...L,pageIndex:0}));try{$o(T!==""),await jo()}catch(L){console.error("Search error:",L),ge(Mt.ERROR,"Search operation failed.")}finally{le()}}},jo=async()=>{if(!(!r||!l)){st();try{const L=await r({...ci,...t!=null&&t.usePermanentCache?{usePermanentCache:t.usePermanentCache}:{}}),ne=L.totalRecords;if(ue(ne),l(L.data),P&&N)try{const{setTotalCount:X,setTableData:Re}=require("../../redux/slices/tableDataSlice");N(X({tableType:e,totalCount:ne})),N(Re({tableType:e,data:L.data}))}catch{}}catch(L){console.error("Failed to fetch data",L),ge(Mt.ERROR,"Failed to fetch data!")}finally{le()}}};S.useEffect(()=>{const L=JSON.stringify({pagination:Z,searchApplied:li,sorting:F,isDeletedItemsList:I});L!==bt.current&&!Ye.current&&(bt.current=L,jo())},[Z.pageIndex,Z.pageSize,li,F,I]);const Ad=Object.entries(f).map(([L,ne])=>({value:L,label:ne})),f1=()=>G(new Set),h1=()=>Y(""),Sr=S.useMemo(()=>!!h,[h]),Md=j.size>0,Rd=L=>{let ne=0,X=!1;return Sr&&(ne+=57),ke.getHeaderGroups().forEach(Re=>{Re.headers.forEach(je=>{if(!X&&je.column.columnDef.fixedColumn){if(je.id===L){X=!0;return}je.getSize()?ne+=je.getSize()+16:ne+=150}})}),`${ne}px`},Pd=D,kd=B;return v.jsxs("div",{className:"py-0 px-0 flex flex-col gap-2 mt-2",children:[v.jsxs("div",{className:"main-action-wrapper flex gap-2 relative justify-end",children:[d&&!!e&&v.jsxs("button",{onClick:u1,className:"flex items-center shadow-sm gap-2 px-4 py-2 text-sm border border-transparent bg-brand-primary rounded-md transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-[var(--brand-orange)] focus:ring-offset-2",children:[v.jsx(ca,{className:"h-4 w-4"}),v.jsx("span",{children:"Export"})]}),s&&v.jsxs("button",{onClick:()=>Q(!0),className:"filters flex items-center shadow-sm gap-2 px-4 py-2 text-sm border border-1 border-[var(--border-color)] rounded-md hover:bg-brand-surface-subtle dark:text-gray-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-[var(--brand-orange)]",children:[Qe&&v.jsx("span",{className:"h-2 w-2 bg-brand-primary rounded-full"}),v.jsx(k1,{className:"h-3 w-3 text-brand-primary"}),v.jsx("span",{children:"Filters"})]}),Sr&&Md&&v.jsx("div",{className:"rounded-md text-gray-500 dark:text-gray-400 text-sm appearance-none absolute top-0 left-0 z-30",children:v.jsx(ym,{placeholder:"Bulk Actions",className:"w-[10rem] bulk-actions-select",value:Ad.find(L=>L.value===$)||null,options:Ad,onChange:L=>{L&&(Y(L.value),h&&(h(L.value,j,f1,h1),Y("")))},isClearable:!0,styles:{control:(L,ne)=>({...L,borderColor:ne.isFocused?"var(--brand-orange)":"var(--border-color)",borderRadius:"0.25rem",cursor:"pointer",backgroundColor:"var(--bg-color)",color:"var(--text-color)",boxShadow:ne.isFocused?"0 0 0 1px var(--brand-orange)":"none",":hover":{borderColor:"var(--brand-orange)"}}),input:L=>({...L,color:"var(--text-color)"}),singleValue:L=>({...L,color:"var(--text-color)"}),placeholder:L=>({...L,color:"var(--secondary-text-color)"}),option:(L,ne)=>({...L,backgroundColor:ne.isSelected?"var(--brand-orange)":ne.isFocused?"var(--hover-bg-color)":"var(--bg-color)",color:ne.isSelected?"white":"var(--text-color)",cursor:"pointer",":active":{backgroundColor:"var(--brand-orange)"}}),menu:L=>({...L,backgroundColor:"var(--bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)",zIndex:9999}),dropdownIndicator:L=>({...L,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),clearIndicator:L=>({...L,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),indicatorSeparator:L=>({...L,backgroundColor:"var(--border-color)"})}})}),o&&v.jsxs("div",{className:"flex max-w-xs w-full border rounded-md overflow-hidden shadow-sm main-search-input",style:{borderColor:"var(--border-color)"},children:[v.jsx("input",{type:"text","data-testid":"table-search-input",placeholder:"Search...",value:T,onKeyDown:l1,onChange:L=>E(L.target.value),className:"flex-grow px-4 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none",style:{backgroundColor:"var(--bg-color)",color:"var(--text-color)"}}),v.jsx("button",{ref:xn,"data-testid":"table-search-button",className:"px-4 py-0 transition-colors",style:{backgroundColor:"var(--brand-light)",color:"var(--brand-dark)"},onMouseEnter:L=>L.currentTarget.style.backgroundColor="var(--hover-bg-color)",onMouseLeave:L=>L.currentTarget.style.backgroundColor="var(--brand-light)",onClick:d1,children:v.jsx(z5,{size:22})})]})]}),m&&kd&&v.jsx(kd,{connectorDetail:y,scanDetails:x,scanObjects:b??[]}),v.jsx("div",{className:"main-table-wrapper flex-grow overflow-hidden rounded-md table-container",children:v.jsx("div",{className:`overflow-auto${_?` ${_}`:""}`,style:_?{}:{maxHeight:"calc(100vh - 21rem)"},children:v.jsxs("table",{className:"table-auto w-full text-left border-collapse border dark:border-gray-700 main-table",children:[v.jsx("thead",{className:"sticky -top-1 z-20 bg-brand-surface-subtle dark:bg-gray-800",children:ke.getHeaderGroups().map((L,ne)=>v.jsxs("tr",{children:[Sr&&v.jsx("th",{className:"sticky -left-1 z-20 table-header checkbox font-bold cursor-pointer",style:{width:"40px"},children:v.jsx("input",{type:"checkbox",className:`${Pc} dark:border-gray-600`,checked:ke.getRowModel().rows.length>0&&j.size===Ed()&&Ed()>0,onChange:X=>{X.stopPropagation(),a1(X.target.checked)}})}),L.headers.map((X,Re)=>{var zn,yn;let je="";const at=["actions"].includes((zn=X==null?void 0:X.column)==null?void 0:zn.id);return X.column.columnDef.fixedColumn&&(je+=" sticky z-10"),X.column.columnDef.centerAlign&&(je+=" text-center"),at&&(je+=" right-fixed"),["#","id"].includes((yn=X==null?void 0:X.column)==null?void 0:yn.id)&&(je+=" id-column"),v.jsxs("th",{className:`table-header ${p?"border dark:border-gray-600":""} font-bold whitespace-nowrap text-ellipsis cursor-pointer ${je}`,style:{minWidth:X.column.columnDef.minSize||"auto",maxWidth:X.column.columnDef.maxSize||"auto",left:X.column.columnDef.fixedColumn?Rd(X.id):void 0,right:at?0:void 0},onClick:()=>{X.column.getCanSort()&&X.column.toggleSorting()},children:[X.isPlaceholder?null:sh(X.column.columnDef.header,X.getContext()),v.jsxs("span",{className:"ml-0",children:[X.column.getIsSorted()==="asc"&&v.jsx(Y5,{size:24,className:"inline-block pb-1"}),X.column.getIsSorted()==="desc"&&v.jsx(X5,{size:24,className:"inline-block pb-1"})]})]},`${X.id}_${Re}`)})]},`${L.id}_${ne}`))}),v.jsx("tbody",{children:ke.getRowModel().rows.length===0?v.jsx("tr",{children:v.jsx("td",{colSpan:n.length+(Sr?1:0),className:"text-center text-sm py-4 text-gray-600 dark:text-gray-400",children:"No data available"})}):ke.getRowModel().rows.map((L,ne)=>v.jsxs("tr",{className:`table-data${g?" cursor-pointer":""}`,onClick:X=>{g&&!X.target.closest('input[type="checkbox"]')&&g(L.original)},children:[Sr&&v.jsx("td",{className:"table-padding checkbox sticky -left-1 z-10",style:{width:"40px"},onClick:X=>{X.stopPropagation();const Re=X.currentTarget.querySelector('input[type="checkbox"]');Re&&Re.click()},children:v.jsx("input",{type:"checkbox",disabled:L.original.isDisabled,className:`${Pc} dark:border-gray-600`,checked:j.has(L.original.id)&&!L.original.isDisabled,onChange:X=>{L.original.isDisabled||c1(L.original.id,X.target.checked)},onClick:X=>X.stopPropagation()})}),L.getVisibleCells().map((X,Re)=>{var zn;let je="";const at=["actions","startTime","endTime","created_at","updated_at","created","updated"].includes((zn=X==null?void 0:X.column)==null?void 0:zn.id);return X.column.columnDef.preLine&&(je+=" pre-line"),X.column.columnDef.fixedColumn&&(je+=" sticky z-10"),X.column.columnDef.centerAlign&&(je+=" text-center"),at&&(je+=" right-fixed"),v.jsx("td",{className:`table-padding ${je} ${p?"border":""} whitespace-nowrap text-ellipsis`,style:{minWidth:X.column.columnDef.minSize||"auto",maxWidth:X.column.columnDef.maxSize||"auto",left:X.column.columnDef.fixedColumn?Rd(X.column.id):void 0,right:at?0:void 0,backgroundColor:X.column.columnDef.fixedColumn?"var(--bg-color)":void 0,borderColor:p?"var(--border-color)":void 0,color:"var(--text-color)"},onClick:yn=>{X.column.columnDef.disableClick&&yn.stopPropagation()},children:sh(X.column.columnDef.cell,X.getContext())},`${X.id}_${Re}`)})]},`${L.id}_${ne}`))})]})})}),u&&v.jsxs("div",{className:"sticky bottom-0 z-10 bg-brand-surface py-2 flex justify-between items-center pagination-container dark:text-gray-300 main-table-footer",children:[v.jsxs("div",{className:"flex items-center space-x-1",children:[v.jsx("button",{onClick:()=>ke.setPageIndex(0),disabled:Z.pageIndex===0,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:L=>!L.currentTarget.disabled&&(L.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:L=>L.currentTarget.style.color="var(--secondary-text-color)",children:v.jsx(W5,{size:20})}),v.jsx("button",{onClick:()=>ke.previousPage(),disabled:Z.pageIndex===0,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:L=>!L.currentTarget.disabled&&(L.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:L=>L.currentTarget.style.color="var(--secondary-text-color)",children:v.jsx(Z5,{size:20})}),v.jsxs("span",{className:"pagination-content",style:{color:"var(--text-color)"},children:["Page",v.jsx("input",{type:"number",value:Wt,onChange:L=>{const ne=L.target.value.replace(/^0+/,"");vt(ne===""?"":Number(ne))},onBlur:()=>{const L=Math.min(Math.max(Number(Wt),1),Dt);vt(L),ke.setPageIndex(L-1)},onKeyDown:L=>{if(L.key==="Enter"){const ne=Math.min(Math.max(Number(Wt),1),Dt);vt(ne),ke.setPageIndex(ne-1)}},className:"px-2 py-1 rounded text-center mx-2",style:{width:`${String(Wt||Rc).length+Rc}ch`,backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)",color:"var(--text-color)"}}),"of ",v.jsx("span",{className:"mx-1",children:Dt})]}),v.jsx("button",{onClick:()=>ke.nextPage(),disabled:Z.pageIndex+1===Dt,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:L=>!L.currentTarget.disabled&&(L.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:L=>L.currentTarget.style.color="var(--secondary-text-color)",children:v.jsx(J5,{size:20})}),v.jsx("button",{onClick:()=>ke.setPageIndex(Dt),disabled:Z.pageIndex+1===Dt,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:L=>!L.currentTarget.disabled&&(L.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:L=>L.currentTarget.style.color="var(--secondary-text-color)",children:v.jsx(H5,{size:20})})]}),M&&v.jsx("button",{"data-testid":I?"view-active-items-button":"view-deleted-items-button",onClick:()=>{if(G(new Set),Z.pageIndex=Ns,Z.pageSize=Ds,P&&N)try{const{setPagination:L}=require("../../redux/slices/tableDataSlice");N(L({tableType:e,pagination:{pageIndex:Ns,pageSize:Ds}}));try{const{setFilters:ne}=require("../../redux/slices/filterSlice");N(ne({tableType:e,filters:{}}))}catch{}}catch{}Tt(!1),C==null||C()},className:`toggle-delete text-xs px-2 py-1 min-w-24 rounded flex items-center gap-1 font-semibold justify-center ${I?"bg-gray-600 text-white hover:bg-gray-700 dark:bg-gray-500 dark:text-gray-200 dark:hover:bg-gray-400":"bg-white text-gray-600 hover:bg-gray-100 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"} border border-gray-300 text-gray-700 dark:border-gray-500 focus:outline-none`,children:I?"View Active Items":"View Deleted Items"}),v.jsxs("div",{className:"flex items-center space-x-2 pagination-content",style:{color:"var(--text-color)"},children:[v.jsx("span",{children:"Rows per page"}),v.jsx("div",{style:{width:"90px"},children:v.jsx(Cm,{placeholder:"",options:[10,25,50,100].map(L=>({label:L.toString(),value:L.toString()})),selectedOptions:[{label:Z.pageSize.toString(),value:Z.pageSize.toString()}],handleChange:L=>{L&&pe(ne=>({...ne,pageSize:+L.value}))},isMulti:!1,closeMenuOnSelect:!0,isClearable:!1,menuPosition:"fixed",customStyles:{control:(L,ne)=>({...L,minHeight:"34px",height:"34px",backgroundColor:"var(--bg-color)",borderColor:ne.isFocused?"var(--brand-orange)":"var(--border-color)",boxShadow:ne.isFocused?"0 0 0 1px var(--brand-orange)":L.boxShadow})}})})]})]}),s&&a&&l&&c&&Pd&&v.jsx(Pd,{type:e,fields:a,inlineRowFields:a==null?void 0:a.filter(L=>L.inline===!0),visible:ve,onClose:()=>Q(!1),title:"Filters",okText:"Apply Filters",cancelText:"Clear",data:i,setFilteredData:l,filtersApplied:Qe,toggleFilterApply:Tt,fetchTableData:r,pageNumber:Z.pageIndex,pageSize:Z.pageSize,setTotalRowCount:ue,setPagination:pe,options:t,sorting:F,setSorting:V,showDeletedItems:I,setExportFilters:ye,searchTerm:T})]})},c_=({isOpen:e,onClose:t,onConfirm:n,title:i,message:r,confirmText:o="Confirm",cancelText:s="Cancel",type:a="warning",isLoading:l=!1})=>{if(!e)return null;const c=()=>{switch(a){case"danger":return"text-red-500";case"warning":return"text-yellow-500";case"info":return"text-brand-primary";default:return"text-yellow-500"}},u=()=>{switch(a){case"danger":return"bg-red-600 hover:bg-red-700 focus:ring-red-500";case"warning":return"bg-yellow-600 hover:bg-yellow-700 focus:ring-yellow-500";case"info":return"bg-brand-primary hover:bg-[var(--brand-orange)]/90 focus:ring-[var(--brand-orange)]";default:return"bg-yellow-600 hover:bg-yellow-700 focus:ring-yellow-500"}};return v.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[v.jsx("div",{className:"absolute inset-0 bg-gray-500 bg-opacity-75 transition-opacity",onClick:t}),v.jsxs("div",{className:"relative rounded-lg text-left overflow-hidden shadow-xl transform transition-all max-w-lg w-full mx-4",style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},children:[v.jsx("div",{className:"px-4 pt-5 pb-4 sm:p-6 sm:pb-4",style:{backgroundColor:"var(--bg-color)"},children:v.jsxs("div",{className:"sm:flex sm:items-start",children:[v.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full sm:mx-0 sm:h-10 sm:w-10",style:{backgroundColor:"var(--hover-bg-color)"},children:v.jsx(Ip,{className:`h-6 w-6 ${c()}`})}),v.jsxs("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[v.jsx("h3",{className:"text-lg leading-6 font-medium",style:{color:"var(--text-color)"},children:i}),v.jsx("div",{className:"mt-2",children:v.jsx("p",{className:"text-sm whitespace-pre-line",style:{color:"var(--secondary-text-color)"},children:r})})]})]})}),v.jsxs("div",{className:"px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",style:{backgroundColor:"var(--hover-bg-color)"},children:[v.jsx("button",{type:"button",className:`w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 text-base font-medium text-white ${u()} focus:outline-none focus:ring-2 focus:ring-offset-2 sm:ml-3 sm:w-auto sm:text-sm disabled:opacity-50 disabled:cursor-not-allowed`,onClick:n,disabled:l,children:l?"Processing...":o}),v.jsx("button",{type:"button",className:"mt-3 w-full inline-flex justify-center rounded-md shadow-sm px-4 py-2 text-base font-medium focus:outline-none focus:ring-2 focus:ring-offset-2 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",style:{backgroundColor:"var(--bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)"},onMouseEnter:d=>d.currentTarget.style.backgroundColor="var(--hover-bg-color)",onMouseLeave:d=>d.currentTarget.style.backgroundColor="var(--bg-color)",onClick:t,disabled:l,children:s})]})]})]})};var Gm={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(wu,function(){var n=1e3,i=6e4,r=36e5,o="millisecond",s="second",a="minute",l="hour",c="day",u="week",d="month",f="quarter",h="year",g="date",p="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var P=["th","st","nd","rd"],O=N%100;return"["+N+(P[(O-20)%10]||P[O]||P[0])+"]"}},x=function(N,P,O){var T=String(N);return!T||T.length>=P?N:""+Array(P+1-T.length).join(O)+N},I={s:x,z:function(N){var P=-N.utcOffset(),O=Math.abs(P),T=Math.floor(O/60),E=O%60;return(P<=0?"+":"-")+x(T,2,"0")+":"+x(E,2,"0")},m:function N(P,O){if(P.date()<O.date())return-N(O,P);var T=12*(O.year()-P.year())+(O.month()-P.month()),E=P.clone().add(T,d),F=O-E<0,V=P.clone().add(T+(F?-1:1),d);return+(-(T+(O-E)/(F?E-V:V-E))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:d,y:h,w:u,d:c,D:g,h:l,m:a,s,ms:o,Q:f}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},C="en",M={};M[C]=y;var R="$isDayjsObject",w=function(N){return N instanceof D||!(!N||!N[R])},_=function N(P,O,T){var E;if(!P)return C;if(typeof P=="string"){var F=P.toLowerCase();M[F]&&(E=F),O&&(M[F]=O,E=F);var V=P.split("-");if(!E&&V.length>1)return N(V[0])}else{var j=P.name;M[j]=P,E=j}return!T&&E&&(C=E),E||!T&&C},A=function(N,P){if(w(N))return N.clone();var O=typeof P=="object"?P:{};return O.date=N,O.args=arguments,new D(O)},k=I;k.l=_,k.i=w,k.w=function(N,P){return A(N,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var D=function(){function N(O){this.$L=_(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[R]=!0}var P=N.prototype;return P.parse=function(O){this.$d=function(T){var E=T.date,F=T.utc;if(E===null)return new Date(NaN);if(k.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var V=E.match(m);if(V){var j=V[2]-1||0,G=(V[7]||"0").substring(0,3);return F?new Date(Date.UTC(V[1],j,V[3]||1,V[4]||0,V[5]||0,V[6]||0,G)):new Date(V[1],j,V[3]||1,V[4]||0,V[5]||0,V[6]||0,G)}}return new Date(E)}(O),this.init()},P.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},P.$utils=function(){return k},P.isValid=function(){return this.$d.toString()!==p},P.isSame=function(O,T){var E=A(O);return this.startOf(T)<=E&&E<=this.endOf(T)},P.isAfter=function(O,T){return A(O)<this.startOf(T)},P.isBefore=function(O,T){return this.endOf(T)<A(O)},P.$g=function(O,T,E){return k.u(O)?this[T]:this.set(E,O)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(O,T){var E=this,F=!!k.u(T)||T,V=k.p(O),j=function(ee,ue){var J=k.w(E.$u?Date.UTC(E.$y,ue,ee):new Date(E.$y,ue,ee),E);return F?J:J.endOf(c)},G=function(ee,ue){return k.w(E.toDate()[ee].apply(E.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(ue)),E)},$=this.$W,Y=this.$M,U=this.$D,re="set"+(this.$u?"UTC":"");switch(V){case h:return F?j(1,0):j(31,11);case d:return F?j(1,Y):j(0,Y+1);case u:var ve=this.$locale().weekStart||0,Q=($<ve?$+7:$)-ve;return j(F?U-Q:U+(6-Q),Y);case c:case g:return G(re+"Hours",0);case l:return G(re+"Minutes",1);case a:return G(re+"Seconds",2);case s:return G(re+"Milliseconds",3);default:return this.clone()}},P.endOf=function(O){return this.startOf(O,!1)},P.$set=function(O,T){var E,F=k.p(O),V="set"+(this.$u?"UTC":""),j=(E={},E[c]=V+"Date",E[g]=V+"Date",E[d]=V+"Month",E[h]=V+"FullYear",E[l]=V+"Hours",E[a]=V+"Minutes",E[s]=V+"Seconds",E[o]=V+"Milliseconds",E)[F],G=F===c?this.$D+(T-this.$W):T;if(F===d||F===h){var $=this.clone().set(g,1);$.$d[j](G),$.init(),this.$d=$.set(g,Math.min(this.$D,$.daysInMonth())).$d}else j&&this.$d[j](G);return this.init(),this},P.set=function(O,T){return this.clone().$set(O,T)},P.get=function(O){return this[k.p(O)]()},P.add=function(O,T){var E,F=this;O=Number(O);var V=k.p(T),j=function(Y){var U=A(F);return k.w(U.date(U.date()+Math.round(Y*O)),F)};if(V===d)return this.set(d,this.$M+O);if(V===h)return this.set(h,this.$y+O);if(V===c)return j(1);if(V===u)return j(7);var G=(E={},E[a]=i,E[l]=r,E[s]=n,E)[V]||1,$=this.$d.getTime()+O*G;return k.w($,this)},P.subtract=function(O,T){return this.add(-1*O,T)},P.format=function(O){var T=this,E=this.$locale();if(!this.isValid())return E.invalidDate||p;var F=O||"YYYY-MM-DDTHH:mm:ssZ",V=k.z(this),j=this.$H,G=this.$m,$=this.$M,Y=E.weekdays,U=E.months,re=E.meridiem,ve=function(ue,J,H,ye){return ue&&(ue[J]||ue(T,F))||H[J].slice(0,ye)},Q=function(ue){return k.s(j%12||12,ue,"0")},ee=re||function(ue,J,H){var ye=ue<12?"AM":"PM";return H?ye.toLowerCase():ye};return F.replace(b,function(ue,J){return J||function(H){switch(H){case"YY":return String(T.$y).slice(-2);case"YYYY":return k.s(T.$y,4,"0");case"M":return $+1;case"MM":return k.s($+1,2,"0");case"MMM":return ve(E.monthsShort,$,U,3);case"MMMM":return ve(U,$);case"D":return T.$D;case"DD":return k.s(T.$D,2,"0");case"d":return String(T.$W);case"dd":return ve(E.weekdaysMin,T.$W,Y,2);case"ddd":return ve(E.weekdaysShort,T.$W,Y,3);case"dddd":return Y[T.$W];case"H":return String(j);case"HH":return k.s(j,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return ee(j,G,!0);case"A":return ee(j,G,!1);case"m":return String(G);case"mm":return k.s(G,2,"0");case"s":return String(T.$s);case"ss":return k.s(T.$s,2,"0");case"SSS":return k.s(T.$ms,3,"0");case"Z":return V}return null}(ue)||V.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(O,T,E){var F,V=this,j=k.p(T),G=A(O),$=(G.utcOffset()-this.utcOffset())*i,Y=this-G,U=function(){return k.m(V,G)};switch(j){case h:F=U()/12;break;case d:F=U();break;case f:F=U()/3;break;case u:F=(Y-$)/6048e5;break;case c:F=(Y-$)/864e5;break;case l:F=Y/r;break;case a:F=Y/i;break;case s:F=Y/n;break;default:F=Y}return E?F:k.a(F)},P.daysInMonth=function(){return this.endOf(d).$D},P.$locale=function(){return M[this.$L]},P.locale=function(O,T){if(!O)return this.$L;var E=this.clone(),F=_(O,T,!0);return F&&(E.$L=F),E},P.clone=function(){return k.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},N}(),B=D.prototype;return A.prototype=B,[["$ms",o],["$s",s],["$m",a],["$H",l],["$W",c],["$M",d],["$y",h],["$D",g]].forEach(function(N){B[N[1]]=function(P){return this.$g(P,N[0],N[1])}}),A.extend=function(N,P){return N.$i||(N(P,D,A),N.$i=!0),A},A.locale=_,A.isDayjs=w,A.unix=function(N){return A(1e3*N)},A.en=M[C],A.Ls=M,A.p={},A})})(Gm);var u_=Gm.exports;const kc=Su(u_);var zm={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(wu,function(){var n="minute",i=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(o,s,a){var l=s.prototype;a.utc=function(p){var m={date:p,utc:!0,args:arguments};return new s(m)},l.utc=function(p){var m=a(this.toDate(),{locale:this.$L,utc:!0});return p?m.add(this.utcOffset(),n):m},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var c=l.parse;l.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),c.call(this,p)};var u=l.init;l.init=function(){if(this.$u){var p=this.$d;this.$y=p.getUTCFullYear(),this.$M=p.getUTCMonth(),this.$D=p.getUTCDate(),this.$W=p.getUTCDay(),this.$H=p.getUTCHours(),this.$m=p.getUTCMinutes(),this.$s=p.getUTCSeconds(),this.$ms=p.getUTCMilliseconds()}else u.call(this)};var d=l.utcOffset;l.utcOffset=function(p,m){var b=this.$utils().u;if(b(p))return this.$u?0:b(this.$offset)?d.call(this):this.$offset;if(typeof p=="string"&&(p=function(C){C===void 0&&(C="");var M=C.match(i);if(!M)return null;var R=(""+M[0]).match(r)||["-",0,0],w=R[0],_=60*+R[1]+ +R[2];return _===0?0:w==="+"?_:-_}(p),p===null))return this;var y=Math.abs(p)<=16?60*p:p;if(y===0)return this.utc(m);var x=this.clone();if(m)return x.$offset=y,x.$u=!1,x;var I=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(x=this.local().add(y+I,n)).$offset=y,x.$x.$localOffset=I,x};var f=l.format;l.format=function(p){var m=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return f.call(this,m)},l.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var h=l.toDate;l.toDate=function(p){return p==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var g=l.diff;l.diff=function(p,m,b){if(p&&this.$u===p.$u)return g.call(this,p,m,b);var y=this.local(),x=a(p).local();return g.call(y,x,m,b)}}})})(zm);var d_=zm.exports;const f_=Su(d_);kc.extend(f_);const h_=({seconds:e,pauseOnMount:t=!1,startDateTime:n,runningTime:i=!0})=>{const[r,o]=S.useState(e),[s,a]=S.useState(0);S.useEffect(()=>{!n&&typeof e=="number"&&!isNaN(e)&&o(e)},[e,n]),S.useEffect(()=>{let d;if(n){const f=kc.utc(n,"YYYY-MM-DD HH:mm:ss");d=setInterval(()=>{const g=kc.utc().diff(f,"second");a(g)},1e3)}else!t&&typeof r=="number"&&(d=setInterval(()=>{o(f=>typeof f=="number"?f-1:f)},1e3));return()=>{d&&clearInterval(d)}},[n,t,r]);const l=d=>{const f=Math.abs(d),h=Math.floor(f/3600),g=Math.floor(f%3600/60),p=f%60,m=[];return h>0&&m.push(`${h}h`),m.push(`${g}m`),m.push(`${p}s`),m.join(" ")},c=d=>n?"text-green-500 dark:text-green-400 text-[11px]":t?i?"text-[11px] dark:text-gray-300":"text-[12px] dark:text-gray-300":d<0?"text-[10px] text-red-500 dark:text-red-400":d<=60?"text-[10px] text-yellow-500 dark:text-yellow-400":"text-[10px] text-green-500 dark:text-green-400",u=n?s:r;return typeof u!="number"||isNaN(u)?v.jsx("span",{className:"text-gray-400 dark:text-gray-500 text-sm font-mono",children:"-- --"}):v.jsx("span",{className:`font-mono ${c(u)}`,children:l(u)})},g_=({error:e,onRetry:t,fallbackPath:n})=>{const[i,r]=S.useState(!1),[o,s]=S.useState(!1),a=async()=>{s(!0);try{n?window.location.href=n:window.location.reload()}finally{s(!1)}},l=()=>{t()};return S.useEffect(()=>{typeof window<"u"&&window.Sentry&&window.Sentry.captureException(e)},[e]),v.jsx("div",{className:"fixed inset-0 z-[9999] overflow-auto",style:{backgroundColor:"var(--app-bg-color, #ffffff)"},children:v.jsx("div",{className:"flex items-center justify-center min-h-screen w-full p-4 sm:p-8 font-sans",children:v.jsxs("div",{className:"shadow-md dark:shadow-lg rounded-lg p-6 sm:p-10 max-w-xl w-full text-center focus:outline-none my-8",style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},children:[v.jsxs("div",{className:"mb-8",children:[v.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full mb-5",style:{backgroundColor:"rgba(255, 101, 3, 0.1)",color:"var(--brand-orange)"},children:v.jsx(Hu,{size:32})}),v.jsx("h2",{className:"text-xl font-semibold mb-3 leading-snug",style:{color:"var(--text-color)"},children:"Something went wrong"}),v.jsx("p",{className:"text-base leading-relaxed max-w-md mx-auto",style:{color:"var(--secondary-text-color)"},children:"An unexpected error occurred. Please try refreshing the page"})]}),v.jsxs("div",{className:"flex flex-wrap justify-center gap-3 mb-8",children:[v.jsxs("button",{className:"bg-brand-primary inline-flex items-center justify-center gap-2 px-5 py-3 rounded-md font-medium text-sm transition-all duration-150 min-w-[120px] focus:outline-none disabled:opacity-65 disabled:cursor-not-allowed disabled:pointer-events-none",onClick:l,disabled:o,children:[v.jsx(K5,{size:16,className:o?"animate-spin ":""}),"Try Again"]}),v.jsxs("button",{className:"inline-flex items-center justify-center gap-2 px-5 py-3 rounded-md font-medium text-sm transition-all duration-150 min-w-[120px] focus:outline-none disabled:opacity-65 disabled:cursor-not-allowed disabled:pointer-events-none",style:{backgroundColor:"var(--hover-bg-color)",color:"var(--text-color)"},onMouseEnter:c=>{c.currentTarget.style.backgroundColor="var(--border-color)"},onMouseLeave:c=>{c.currentTarget.style.backgroundColor="var(--hover-bg-color)"},onClick:a,disabled:o,children:[v.jsx(G5,{size:16}),n?"Go to Home":"Refresh Page"]})]}),process.env.NODE_ENV!=="production"&&v.jsxs("div",{className:"pt-6",style:{borderTop:"1px solid var(--border-color)"},children:[v.jsxs("button",{className:"inline-flex items-center gap-2 text-sm font-medium py-2 px-3 rounded transition-colors",style:{color:"var(--brand-orange)"},onMouseEnter:c=>{c.currentTarget.style.backgroundColor="var(--hover-bg-color)"},onMouseLeave:c=>{c.currentTarget.style.backgroundColor="transparent"},onClick:()=>r(!i),children:[i?v.jsx(U5,{size:16}):v.jsx(Q5,{size:16}),i?"Hide":"Show"," Error Details"]}),i&&v.jsxs("div",{className:"mt-5 text-left p-5 rounded-md max-h-[400px] overflow-auto",style:{backgroundColor:"var(--hover-bg-color)",border:"1px solid var(--border-color)"},children:[v.jsxs("div",{className:"mb-4 flex flex-col gap-2",children:[v.jsx("span",{className:"font-semibold text-sm",style:{color:"var(--text-color)"},children:"Error Message:"}),v.jsx("code",{className:"text-sm leading-snug break-words p-2 rounded font-mono",style:{backgroundColor:"rgba(239, 68, 68, 0.1)",color:"#dc2626",border:"1px solid rgba(239, 68, 68, 0.3)"},children:e.message})]}),v.jsxs("div",{className:"mb-4 flex flex-col gap-2",children:[v.jsx("span",{className:"font-semibold text-sm",style:{color:"var(--text-color)"},children:"Timestamp:"}),v.jsx("span",{className:"text-sm leading-snug break-words",style:{color:"var(--text-color)"},children:new Date().toLocaleString()})]}),e.stack&&v.jsxs("div",{className:"mb-0 flex flex-col gap-2",children:[v.jsx("span",{className:"font-semibold text-sm",style:{color:"var(--text-color)"},children:"Stack Trace:"}),v.jsx("pre",{className:"text-sm leading-snug break-words p-4 rounded font-mono text-xs leading-relaxed overflow-auto whitespace-pre-wrap max-h-[300px]",style:{backgroundColor:"var(--brand-dark)",color:"#f9fafb",border:"1px solid var(--border-color)"},children:e.stack})]})]})]})]})})})};class Hm extends S.Component{constructor(t){super(t),this.handleReset=()=>{this.setState({hasError:!1,error:null,errorInfo:null}),this.props.onReset&&this.props.onReset()},this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){typeof window<"u"&&window.Sentry&&window.Sentry.captureException(t),this.setState({errorInfo:{componentStack:n.componentStack||""}}),this.props.onError&&this.props.onError(t,{componentStack:n.componentStack||""})}render(){return this.state.hasError&&this.state.error?v.jsx(g_,{error:this.state.error,onRetry:this.handleReset,fallbackPath:this.props.fallbackPath}):this.props.children}}class p_ extends S.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){var i,r;console.error("Component error:",t,n),(r=(i=this.props).onError)==null||r.call(i,t,n),typeof window<"u"&&window.Sentry&&window.Sentry.captureException(t,{contexts:{react:{componentStack:n.componentStack}}})}render(){var t;return this.state.hasError?this.props.fallback?this.props.fallback:v.jsxs("div",{className:"p-4 rounded",style:{backgroundColor:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)"},children:[v.jsx("p",{className:"text-sm",style:{color:"#dc2626"},children:"Something went wrong displaying this component."}),process.env.NODE_ENV==="development"&&v.jsxs("details",{className:"mt-2",children:[v.jsx("summary",{className:"cursor-pointer text-xs",style:{color:"var(--text-color)"},children:"Error details"}),v.jsx("pre",{className:"mt-1 text-xs overflow-auto",style:{color:"var(--text-color)"},children:(t=this.state.error)==null?void 0:t.toString()})]})]}):this.props.children}}const m_=({used:e,max:t,resourceName:n,warningThreshold:i=5,className:r=""})=>{const o=t-e;if(!t)return null;const a=o<=0?"exhausted":o<=i?"warning":"available",l=()=>{switch(a){case"exhausted":return{backgroundColor:"var(--status-error-bg)",color:"var(--status-error-text)",border:"1px solid var(--status-error-border)"};case"warning":return{backgroundColor:"var(--status-warning-bg)",color:"var(--status-warning-text)",border:"1px solid var(--status-warning-border)"};case"available":default:return{backgroundColor:"var(--status-success-bg)",color:"var(--status-success-text)",border:"1px solid var(--status-success-border)"}}};return v.jsxs("div",{className:`ml-2 px-2 py-1 rounded flex items-center gap-1 text-xs font-semibold ${r}`,style:l(),children:[v.jsxs("span",{children:[e," / ",t," (",o," available)"]}),a==="exhausted"&&v.jsxs("span",{className:"ml-2 font-semibold",children:["No more ",n," can be added."]})]})},b_=({displayText:e,hasMoreData:t,restDataLength:n,onClick:i,isTruncatedData:r,tooltipText:o="",customButtonEl:s})=>v.jsxs("div",{className:"flex gap-2 items-center",children:[v.jsx("div",{children:v.jsx("span",{children:v.jsx(La,{text:o,isVisible:r,children:e})})}),t&&v.jsx("button",{className:"rounded px-[3px] flex items-center justify-center cursor-pointer transition border-brand-primary text-brand-primary hover:bg-brand-surface-subtle",style:{border:"1px solid var(--brand-orange)",color:"var(--brand-orange)"},onMouseEnter:a=>a.currentTarget.style.backgroundColor="var(--brand-light)",onMouseLeave:a=>a.currentTarget.style.backgroundColor="transparent",onClick:a=>{a.stopPropagation(),i()},children:s||v.jsx(v.Fragment,{children:v.jsxs("span",{className:"text-xs",children:["+",n&&Number(n)>0?n:""]})})})]}),Ci={low:{label:"Low"},medium:{min:40,label:"Medium"},high:{min:70,label:"High"},critical:{min:90,label:"Critical"}},v_={low:{level:"low",label:Ci.low.label,color:"text-white",backgroundColor:"bg-green-500"},medium:{level:"medium",label:Ci.medium.label,color:"text-white",backgroundColor:"bg-yellow-500"},high:{level:"high",label:Ci.high.label,color:"text-white",backgroundColor:"bg-orange-500"},critical:{level:"critical",label:Ci.critical.label,color:"text-white",backgroundColor:"bg-red-500"}},Xu=e=>e>=Ci.critical.min?"critical":e>=Ci.high.min?"high":e>=Ci.medium.min?"medium":"low",Wm=e=>{const t=Xu(e);return v_[t]},x_=e=>{const t=Xu(e);return t==="high"||t==="critical"},y_=({score:e,customStyles:t})=>{const{label:n,backgroundColor:i,color:r}=Wm(e);return v.jsx("span",{className:kt("px-2 py-1 rounded text-xs font-semibold",i,r,t),children:n})},Xm=(e={})=>{const{fallbackPath:t="/assets",basePath:n=e.basePath||t}=e;return{getAssetPath:S.useMemo(()=>r=>{if(!r)return n;const o=r.startsWith("/")?r.slice(1):r;return`${n.endsWith("/")?n.slice(0,-1):n}/${o}`},[n]),basePath:n}},Ym=e=>{const{getAssetPath:t}=Xm(),n=S.useMemo(()=>!e||e.trim()===""?t("files/unknown_file.svg"):t(`files/${e.toLowerCase()}.svg`),[e,t]),i=S.useMemo(()=>t("files/unknown_file.svg"),[t]);return{iconPath:n,fallbackPath:i}},C_=({category:e,className:t="w-3 h-4 object-cover"})=>{const{iconPath:n,fallbackPath:i}=Ym(e),[r,o]=S.useState(!1),s=S.useCallback(()=>{o(!0)},[]),a=r?i:n;return v.jsx("img",{src:a,alt:e||"unknown file",className:t,onError:s})},w_=({message:e="No Active Attributes Present!"})=>v.jsxs("div",{className:"flex gap-2 align-center p-2 text-xs font-medium rounded-sm bg-yellow-200 text-yellow-700 w-full",children:[v.jsx(Hu,{role:"img",size:14}),v.jsx("span",{children:e})]}),S_=({icon:e,title:t="Select Country"})=>{const n=S.useRef(null),[i,r]=S.useState(!1);S.useEffect(()=>{const s=n.current;s&&r(s.scrollWidth>s.clientWidth)},[t]);const o=v.jsx("p",{ref:n,className:"overflow-hidden text-ellipsis whitespace-nowrap max-w-36",children:t});return v.jsxs("div",{className:"px-2 border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-800 text-gray-400 dark:text-gray-300 text-sm text-center h-[30px] flex items-center justify-center",children:[v.jsx("img",{src:e,alt:t,className:"w-4 h-4 mr-2 rounded-full object-cover"}),i?v.jsx(La,{text:t,children:o}):o]})},I_=({isOpen:e,onDismiss:t,summaryData:n,errors:i=[],onDownload:r,onRetry:o,title:s,dataType:a})=>{if(S.useEffect(()=>{if(!e)return;const d=f=>{f.key==="Escape"&&t()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[e,t]),!e)return null;const l=n.total>0?n.success/n.total*100:0,[c,u]=S.useState(!0);return v.jsx("div",{role:"dialog",className:"fixed inset-0 z-[1000] flex items-center justify-center bg-black/40",onClick:t,children:v.jsxs("div",{className:"relative w-full min-w-[320px] max-w-[600px] rounded-lg shadow-2xl",style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},onClick:d=>d.stopPropagation(),children:[v.jsx("button",{onClick:t,"aria-label":"Close",className:"absolute right-4 top-4 text-xl",style:{color:"var(--secondary-text-color)"},onMouseEnter:d=>d.currentTarget.style.color="var(--text-color)",onMouseLeave:d=>d.currentTarget.style.color="var(--secondary-text-color)",children:"×"}),v.jsxs("div",{className:"p-4 border-b",style:{borderColor:"var(--border-color)"},children:[v.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[v.jsx(o_,{className:"text-blue-500",size:20}),v.jsx("h3",{className:"text-lg font-semibold",style:{color:"var(--text-color)"},children:s??"Result"})]}),v.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-4",children:[v.jsxs("div",{className:"text-center",children:[v.jsx("div",{className:"text-2xl font-bold",style:{color:"var(--text-color)"},children:n.total}),v.jsx("div",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:"Total"})]}),v.jsxs("div",{className:"text-center",children:[v.jsx("div",{className:"text-2xl font-bold text-green-600 dark:text-green-400",children:n.success}),v.jsx("div",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:"Success"})]}),v.jsxs("div",{className:"text-center",children:[v.jsx("div",{className:"text-2xl font-bold text-red-600 dark:text-red-400",children:n.failed}),v.jsx("div",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:"Failed"})]})]}),v.jsx("div",{className:"w-full rounded-full h-2",style:{backgroundColor:"var(--brand-light)"},children:v.jsx("div",{className:"bg-green-600 dark:bg-green-400 h-2 rounded-full transition-all duration-500",style:{width:`${l}%`}})}),v.jsxs("div",{className:"text-sm font-bold mt-2",style:{color:"var(--secondary-text-color)"},children:[l.toFixed(0),"% successful"]})]}),i.length>0&&v.jsxs("div",{className:"p-4 border-b",style:{borderColor:"var(--border-color)"},children:[v.jsxs("button",{onClick:()=>u(!c),className:"flex items-center justify-between w-full text-left hover:bg-opacity-50 rounded p-2 -m-2 transition-colors",style:{backgroundColor:"transparent"},onMouseEnter:d=>d.currentTarget.style.backgroundColor="var(--hover-bg-color)",onMouseLeave:d=>d.currentTarget.style.backgroundColor="transparent",children:[v.jsxs("h4",{className:"text-md font-medium flex items-center gap-2",style:{color:"var(--text-color)"},children:[v.jsx(q5,{className:"text-amber-500"}),"Error Details (",i.length," issues)"]}),c?v.jsx(i_,{style:{color:"var(--secondary-text-color)"}}):v.jsx(n_,{style:{color:"var(--secondary-text-color)"}})]}),c&&v.jsx("div",{className:"mt-4 space-y-2 max-h-60 overflow-y-auto",children:i.map(d=>v.jsxs("div",{className:"p-3 rounded text-sm",style:{backgroundColor:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)"},children:[v.jsxs("div",{className:"font-medium",style:{color:"#dc2626"},children:[d.field?`${d.field}: `:"",d.error]}),d.value&&v.jsxs("div",{className:"mt-1 text-xs",style:{color:"var(--secondary-text-color)"},children:["Value: ",d.value]})]},d.id))})]}),v.jsxs("div",{className:"p-4 flex flex-wrap justify-end gap-2",children:[r&&v.jsxs("button",{onClick:r,className:"px-4 py-2 rounded-md flex items-center gap-2 transition-colors",style:{backgroundColor:"var(--hover-bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)"},onMouseEnter:d=>d.currentTarget.style.backgroundColor="var(--brand-light)",onMouseLeave:d=>d.currentTarget.style.backgroundColor="var(--hover-bg-color)",children:[v.jsx(ca,{}),"Download Errors"]}),o&&v.jsxs("button",{onClick:o,className:"px-4 py-2 rounded-md flex items-center gap-2 bg-brand-primary text-white hover:bg-opacity-90 transition-colors",children:[v.jsx(s_,{}),"Retry"]}),v.jsx("button",{onClick:t,className:"px-4 py-2 rounded-md transition-colors",style:{backgroundColor:"var(--hover-bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)"},onMouseEnter:d=>d.currentTarget.style.backgroundColor="var(--brand-light)",onMouseLeave:d=>d.currentTarget.style.backgroundColor="var(--hover-bg-color)",children:"Close"})]})]})})},__=({isVisible:e,currentStep:t,error:n,onDismiss:i})=>{if(!e)return null;const r=(o,s)=>s?v.jsx(t_,{className:"w-6 h-6 text-green-600 dark:text-green-400"}):o?v.jsx("div",{className:"animate-spin rounded-full h-6 w-6",style:{borderWidth:"2px",borderStyle:"solid",borderColor:"var(--brand-light)",borderTopColor:"var(--brand-orange)"}}):v.jsx("div",{className:"w-6 h-6 border-2 rounded-full",style:{borderColor:"var(--border-color)"}});return v.jsx("div",{className:"fixed inset-0 bg-black/80 backdrop-blur-sm flex items-center justify-center z-50",children:v.jsxs("div",{className:"rounded-lg shadow-2xl p-8 max-w-md w-full mx-4 relative",style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},children:[n&&i&&v.jsx("button",{onClick:i,className:"absolute top-4 right-4 p-2 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:o=>o.currentTarget.style.color="var(--text-color)",onMouseLeave:o=>o.currentTarget.style.color="var(--secondary-text-color)",children:v.jsx(a_,{className:"w-5 h-5"})}),v.jsxs("div",{className:"text-center mb-8",children:[v.jsx("div",{className:"flex items-center justify-center mb-4",children:v.jsx(ca,{className:"w-12 h-12 text-brand-primary"})}),v.jsx("h2",{className:"text-2xl font-bold mb-2",style:{color:"var(--text-color)"},children:"Installing Update"}),v.jsx("p",{style:{color:"var(--secondary-text-color)"},children:"Please wait while we install the update safely"})]}),n&&v.jsxs("div",{className:"mb-6 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:[v.jsxs("div",{className:"flex items-center space-x-2",children:[v.jsx(ah,{className:"w-5 h-5 text-red-600 dark:text-red-400"}),v.jsx("p",{className:"text-sm text-red-700 dark:text-red-300 font-medium",children:"Installation Failed"})]}),v.jsx("p",{className:"text-sm text-red-600 dark:text-red-400 mt-1",children:n}),v.jsx("div",{className:"mt-3 flex space-x-2",children:v.jsx("button",{onClick:i,className:"px-3 py-1.5 bg-red-600 text-white text-sm rounded hover:bg-red-700 transition-colors",children:"Close"})})]}),v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{className:"flex items-center space-x-3",children:[r(t==="backup",t==="install"||t==="complete"),v.jsxs("div",{className:"flex-1",children:[v.jsxs("div",{className:"flex items-center space-x-2",children:[v.jsx(r_,{className:"w-4 h-4",style:{color:"var(--secondary-text-color)"}}),v.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text-color)"},children:"Database Backup"})]}),v.jsx("p",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:t==="backup"?"Creating secure backup...":t==="install"||t==="complete"?"Backup completed":"Pending"})]})]}),v.jsxs("div",{className:"flex items-center space-x-3",children:[r(t==="install",t==="complete"),v.jsxs("div",{className:"flex-1",children:[v.jsxs("div",{className:"flex items-center space-x-2",children:[v.jsx(ca,{className:"w-4 h-4",style:{color:"var(--secondary-text-color)"}}),v.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text-color)"},children:"Update Installation"})]}),v.jsx("p",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:t==="install"?"Installing update...":t==="complete"?"Installation completed":"Pending"})]})]})]}),v.jsx("div",{className:"mt-6",children:v.jsx("div",{className:"w-full rounded-full h-2",style:{backgroundColor:"var(--brand-light)"},children:v.jsx("div",{className:"h-2 rounded-full transition-all duration-500",style:{width:t==="backup"?"50%":"100%",backgroundColor:"var(--brand-orange)"}})})}),v.jsx("div",{className:"mt-6 p-3 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg",children:v.jsxs("div",{className:"flex items-start space-x-2",children:[v.jsx(ah,{className:"w-4 h-4 text-yellow-600 dark:text-yellow-400 mt-0.5 flex-shrink-0"}),v.jsxs("p",{className:"text-xs text-yellow-700 dark:text-yellow-300",children:[v.jsx("strong",{children:"Important:"})," Do not close the application during this process. The app will restart automatically after installation."]})]})})]})})},E_=({confidenceData:e,children:t,position:n="top"})=>{const[i,r]=S.useState(!1),[o,s]=S.useState({}),[a,l]=S.useState({}),c=S.useRef(null),u=S.useRef(null);S.useEffect(()=>{if(!i||!c.current)return;const p=c.current.getBoundingClientRect(),m=u.current;if(!m)return;const b=m.getBoundingClientRect(),y=window.innerWidth,x=window.innerHeight;let I=n,C=0,M=0,R=0,w=0;switch(n==="top"&&p.top-b.height<10?I="bottom":n==="bottom"&&p.bottom+b.height>x-10?I="top":n==="left"&&p.left-b.width<10?I="right":n==="right"&&p.right+b.width>y-10&&(I="left"),I){case"top":C=p.top-b.height-8,M=p.left+p.width/2-b.width/2,R=b.height-4,w=b.width/2-5;break;case"bottom":C=p.bottom+8,M=p.left+p.width/2-b.width/2,R=-5,w=b.width/2-5;break;case"left":C=p.top+p.height/2-b.height/2,M=p.left-b.width-8,R=b.height/2-5,w=b.width-4;break;case"right":C=p.top+p.height/2-b.height/2,M=p.right+8,R=b.height/2-5,w=-5;break}s({top:`${C}px`,left:`${M}px`,opacity:1,visibility:"visible"}),l({top:`${R}px`,left:`${w}px`,transform:"rotate(45deg)"})},[i,n]);const d=p=>p>=.8?"text-green-600":p>=.6?"text-yellow-600":"text-red-600",f=p=>p>=.8?"High":p>=.6?"Medium":"Low",h=p=>{switch(p){case"column_name":return"Based on column name analysis";case"sample_data":return"Based on sample data analysis";default:return"Confidence score available"}},g=()=>{const{confidence_score:p,classification_reason:m,sample_data_preview:b,confidence_reason:y}=e;return v.jsxs("div",{className:"confidence-tooltip-content",children:[v.jsx("div",{className:"confidence-tooltip-header",children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(km,{className:"h-4 w-4 text-blue-500"}),v.jsx("span",{className:"font-semibold",style:{color:"var(--text-color)"},children:"Classification Details"})]})}),v.jsxs("div",{className:"confidence-tooltip-body",children:[p!==void 0&&v.jsx("div",{className:"confidence-score-section",children:v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("span",{className:"text-sm font-medium",style:{color:"var(--secondary-text-color)"},children:"Confidence Score:"}),v.jsxs("span",{className:`text-sm font-bold ${d(p)}`,children:[f(p)," (",(p*100).toFixed(0),"%)"]})]})}),v.jsx("div",{className:"classification-reason-section",children:v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("span",{className:"text-sm font-medium",style:{color:"var(--secondary-text-color)"},children:"Classification Method:"}),v.jsx("span",{className:"text-sm",style:{color:"var(--text-color)"},children:h(m)})]})}),m==="sample_data"&&b&&v.jsxs("div",{className:"sample-data-section",children:[v.jsx("div",{className:"text-sm font-medium mb-1",style:{color:"var(--text-color)"},children:"Sample Data Preview:"}),v.jsx("div",{className:"text-xs p-2 rounded border max-w-xs",style:{color:"var(--text-color)",backgroundColor:"var(--hover-bg-color)",borderColor:"var(--border-color)"},children:v.jsx("div",{className:"truncate",title:b,children:b})})]}),y&&v.jsxs("div",{className:"confidence-reason-section",children:[v.jsx("div",{className:"text-sm font-medium mb-1",style:{color:"var(--text-color)"},children:"Additional Details:"}),v.jsx("div",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:y})]})]})]})};return v.jsxs("div",{className:"confidence-tooltip-wrapper",ref:c,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[t,i&&fn.createPortal(v.jsxs("div",{ref:u,className:"confidence-tooltip",style:o,children:[g(),v.jsx("span",{className:"confidence-tooltip-arrow",style:a})]}),document.body)]})},A_=({isOpen:e,imagePath:t,imageSrc:n,loadImageFromPath:i,onClose:r})=>{const[o,s]=S.useState(""),[a,l]=S.useState(!1),[c,u]=S.useState("");if(du(e),S.useEffect(()=>{if(!e){s(""),u(""),l(!1);return}if(n){s(n),u(""),l(!1);return}t?(async()=>{l(!0),u(""),s("");try{if(i){const h=await i(t);s(h)}else s(t)}catch(h){const g=h instanceof Error?h.message:"Failed to load image";u(g),console.error("[ImagePreviewModal] Failed to load image:",h)}finally{l(!1)}})():u("No image source provided")},[e,t,n,i]),S.useEffect(()=>{if(!e)return;const f=h=>{h.key==="Escape"&&r()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[e,r]),!e)return null;const d=v.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-[40] p-4 overflow-y-auto",onClick:r,children:v.jsxs("div",{className:"relative py-4 rounded-lg shadow-lg w-[95%] sm:w-[90%] md:w-[85%] lg:w-auto max-w-screen-2xl min-w-[320px] sm:min-w-[400px]",style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},onClick:f=>f.stopPropagation(),children:[v.jsx("div",{className:"px-4",children:v.jsxs("div",{className:"flex justify-between items-center",children:[v.jsx("h2",{className:"text-lg font-semibold",style:{color:"var(--text-color)"},children:"Image Preview"}),v.jsx("button",{onClick:r,className:"text-brand-primary hover:opacity-80 transition-opacity","aria-label":"Close",children:v.jsx(_p,{size:16})})]})}),v.jsxs("div",{className:"px-4 mt-4 pb-4",children:[a&&v.jsx("div",{className:"flex justify-center items-center py-8",style:{color:"var(--text-color)"},children:v.jsx("span",{children:"Loading image..."})}),c&&v.jsx("div",{className:"flex justify-center items-center py-8",style:{color:"var(--text-color)"},children:v.jsxs("div",{className:"text-center",children:[v.jsx("p",{className:"text-red-500 mb-2",children:"Error loading image"}),v.jsx("p",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:c})]})}),!a&&!c&&o&&v.jsx("div",{className:"flex justify-center items-center max-h-[70vh] overflow-auto",children:v.jsx("img",{src:o,alt:"Preview",className:"max-w-full max-h-[70vh] object-contain rounded",style:{border:"1px solid var(--border-color)"},onError:()=>u("Failed to load image")})})]})]})});return fn.createPortal(d,document.getElementById("modal-root")||document.body)};var Zm={exports:{}};/* @license
69
- Papa Parse
70
- v5.5.3
71
- https://github.com/mholt/PapaParse
72
- License: MIT
73
- */(function(e,t){((n,i)=>{e.exports=i()})(wu,function n(){var i=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:{},r,o=!i.document&&!!i.postMessage,s=i.IS_PAPA_WORKER||!1,a={},l=0,c={};function u(w){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(_){var A=C(_);A.chunkSize=parseInt(A.chunkSize),_.step||_.chunk||(A.chunkSize=null),this._handle=new p(A),(this._handle.streamer=this)._config=A}).call(this,w),this.parseChunk=function(_,A){var k=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<k){let B=this._config.newline;B||(D=this._config.quoteChar||'"',B=this._handle.guessLineEndings(_,D)),_=[..._.split(B).slice(k)].join(B)}this.isFirstChunk&&R(this._config.beforeFirstChunk)&&(D=this._config.beforeFirstChunk(_))!==void 0&&(_=D),this.isFirstChunk=!1,this._halted=!1;var k=this._partialLine+_,D=(this._partialLine="",this._handle.parse(k,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(_=D.meta.cursor,k=(this._finished||(this._partialLine=k.substring(_-this._baseIndex),this._baseIndex=_),D&&D.data&&(this._rowCount+=D.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),s)i.postMessage({results:D,workerId:c.WORKER_ID,finished:k});else if(R(this._config.chunk)&&!A){if(this._config.chunk(D,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=D=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(D.data),this._completeResults.errors=this._completeResults.errors.concat(D.errors),this._completeResults.meta=D.meta),this._completed||!k||!R(this._config.complete)||D&&D.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),k||D&&D.meta.paused||this._nextChunk(),D}this._halted=!0},this._sendError=function(_){R(this._config.error)?this._config.error(_):s&&this._config.error&&i.postMessage({workerId:c.WORKER_ID,error:_,finished:!1})}}function d(w){var _;(w=w||{}).chunkSize||(w.chunkSize=c.RemoteChunkSize),u.call(this,w),this._nextChunk=o?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(A){this._input=A,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(_=new XMLHttpRequest,this._config.withCredentials&&(_.withCredentials=this._config.withCredentials),o||(_.onload=M(this._chunkLoaded,this),_.onerror=M(this._chunkError,this)),_.open(this._config.downloadRequestBody?"POST":"GET",this._input,!o),this._config.downloadRequestHeaders){var A,k=this._config.downloadRequestHeaders;for(A in k)_.setRequestHeader(A,k[A])}var D;this._config.chunkSize&&(D=this._start+this._config.chunkSize-1,_.setRequestHeader("Range","bytes="+this._start+"-"+D));try{_.send(this._config.downloadRequestBody)}catch(B){this._chunkError(B.message)}o&&_.status===0&&this._chunkError()}},this._chunkLoaded=function(){_.readyState===4&&(_.status<200||400<=_.status?this._chunkError():(this._start+=this._config.chunkSize||_.responseText.length,this._finished=!this._config.chunkSize||this._start>=(A=>(A=A.getResponseHeader("Content-Range"))!==null?parseInt(A.substring(A.lastIndexOf("/")+1)):-1)(_),this.parseChunk(_.responseText)))},this._chunkError=function(A){A=_.statusText||A,this._sendError(new Error(A))}}function f(w){(w=w||{}).chunkSize||(w.chunkSize=c.LocalChunkSize),u.call(this,w);var _,A,k=typeof FileReader<"u";this.stream=function(D){this._input=D,A=D.slice||D.webkitSlice||D.mozSlice,k?((_=new FileReader).onload=M(this._chunkLoaded,this),_.onerror=M(this._chunkError,this)):_=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var D=this._input,B=(this._config.chunkSize&&(B=Math.min(this._start+this._config.chunkSize,this._input.size),D=A.call(D,this._start,B)),_.readAsText(D,this._config.encoding));k||this._chunkLoaded({target:{result:B}})},this._chunkLoaded=function(D){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(D.target.result)},this._chunkError=function(){this._sendError(_.error)}}function h(w){var _;u.call(this,w=w||{}),this.stream=function(A){return _=A,this._nextChunk()},this._nextChunk=function(){var A,k;if(!this._finished)return A=this._config.chunkSize,_=A?(k=_.substring(0,A),_.substring(A)):(k=_,""),this._finished=!_,this.parseChunk(k)}}function g(w){u.call(this,w=w||{});var _=[],A=!0,k=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(D){this._input=D,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){k&&_.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),_.length?this.parseChunk(_.shift()):A=!0},this._streamData=M(function(D){try{_.push(typeof D=="string"?D:D.toString(this._config.encoding)),A&&(A=!1,this._checkIsFinished(),this.parseChunk(_.shift()))}catch(B){this._streamError(B)}},this),this._streamError=M(function(D){this._streamCleanUp(),this._sendError(D)},this),this._streamEnd=M(function(){this._streamCleanUp(),k=!0,this._streamData("")},this),this._streamCleanUp=M(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function p(w){var _,A,k,D,B=Math.pow(2,53),N=-B,P=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,O=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,T=this,E=0,F=0,V=!1,j=!1,G=[],$={data:[],errors:[],meta:{}};function Y(Q){return w.skipEmptyLines==="greedy"?Q.join("").trim()==="":Q.length===1&&Q[0].length===0}function U(){if($&&k&&(ve("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+c.DefaultDelimiter+"'"),k=!1),w.skipEmptyLines&&($.data=$.data.filter(function(J){return!Y(J)})),re()){let J=function(H,ye){R(w.transformHeader)&&(H=w.transformHeader(H,ye)),G.push(H)};if($)if(Array.isArray($.data[0])){for(var Q=0;re()&&Q<$.data.length;Q++)$.data[Q].forEach(J);$.data.splice(0,1)}else $.data.forEach(J)}function ee(J,H){for(var ye=w.header?{}:[],Z=0;Z<J.length;Z++){var pe=Z,ge=J[Z],ge=((st,le)=>(Te=>(w.dynamicTypingFunction&&w.dynamicTyping[Te]===void 0&&(w.dynamicTyping[Te]=w.dynamicTypingFunction(Te)),(w.dynamicTyping[Te]||w.dynamicTyping)===!0))(st)?le==="true"||le==="TRUE"||le!=="false"&&le!=="FALSE"&&((Te=>{if(P.test(Te)&&(Te=parseFloat(Te),N<Te&&Te<B))return 1})(le)?parseFloat(le):O.test(le)?new Date(le):le===""?null:le):le)(pe=w.header?Z>=G.length?"__parsed_extra":G[Z]:pe,ge=w.transform?w.transform(ge,pe):ge);pe==="__parsed_extra"?(ye[pe]=ye[pe]||[],ye[pe].push(ge)):ye[pe]=ge}return w.header&&(Z>G.length?ve("FieldMismatch","TooManyFields","Too many fields: expected "+G.length+" fields but parsed "+Z,F+H):Z<G.length&&ve("FieldMismatch","TooFewFields","Too few fields: expected "+G.length+" fields but parsed "+Z,F+H)),ye}var ue;$&&(w.header||w.dynamicTyping||w.transform)&&(ue=1,!$.data.length||Array.isArray($.data[0])?($.data=$.data.map(ee),ue=$.data.length):$.data=ee($.data,0),w.header&&$.meta&&($.meta.fields=G),F+=ue)}function re(){return w.header&&G.length===0}function ve(Q,ee,ue,J){Q={type:Q,code:ee,message:ue},J!==void 0&&(Q.row=J),$.errors.push(Q)}R(w.step)&&(D=w.step,w.step=function(Q){$=Q,re()?U():(U(),$.data.length!==0&&(E+=Q.data.length,w.preview&&E>w.preview?A.abort():($.data=$.data[0],D($,T))))}),this.parse=function(Q,ee,ue){var J=w.quoteChar||'"',J=(w.newline||(w.newline=this.guessLineEndings(Q,J)),k=!1,w.delimiter?R(w.delimiter)&&(w.delimiter=w.delimiter(Q),$.meta.delimiter=w.delimiter):((J=((H,ye,Z,pe,ge)=>{var st,le,Te,qt;ge=ge||[","," ","|",";",c.RECORD_SEP,c.UNIT_SEP];for(var xn=0;xn<ge.length;xn++){for(var bt,Gn=ge[xn],Ye=0,ke=0,Ge=0,Qe=(Te=void 0,new b({comments:pe,delimiter:Gn,newline:ye,preview:10}).parse(H)),Tt=0;Tt<Qe.data.length;Tt++)Z&&Y(Qe.data[Tt])?Ge++:(bt=Qe.data[Tt].length,ke+=bt,Te===void 0?Te=bt:0<bt&&(Ye+=Math.abs(bt-Te),Te=bt));0<Qe.data.length&&(ke/=Qe.data.length-Ge),(le===void 0||Ye<=le)&&(qt===void 0||qt<ke)&&1.99<ke&&(le=Ye,st=Gn,qt=ke)}return{successful:!!(w.delimiter=st),bestDelimiter:st}})(Q,w.newline,w.skipEmptyLines,w.comments,w.delimitersToGuess)).successful?w.delimiter=J.bestDelimiter:(k=!0,w.delimiter=c.DefaultDelimiter),$.meta.delimiter=w.delimiter),C(w));return w.preview&&w.header&&J.preview++,_=Q,A=new b(J),$=A.parse(_,ee,ue),U(),V?{meta:{paused:!0}}:$||{meta:{paused:!1}}},this.paused=function(){return V},this.pause=function(){V=!0,A.abort(),_=R(w.chunk)?"":_.substring(A.getCharIndex())},this.resume=function(){T.streamer._halted?(V=!1,T.streamer.parseChunk(_,!0)):setTimeout(T.resume,3)},this.aborted=function(){return j},this.abort=function(){j=!0,A.abort(),$.meta.aborted=!0,R(w.complete)&&w.complete($),_=""},this.guessLineEndings=function(H,J){H=H.substring(0,1048576);var J=new RegExp(m(J)+"([^]*?)"+m(J),"gm"),ue=(H=H.replace(J,"")).split("\r"),J=H.split(`
74
- `),H=1<J.length&&J[0].length<ue[0].length;if(ue.length===1||H)return`
75
- `;for(var ye=0,Z=0;Z<ue.length;Z++)ue[Z][0]===`
76
- `&&ye++;return ye>=ue.length/2?`\r
77
- `:"\r"}}function m(w){return w.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(w){var _=(w=w||{}).delimiter,A=w.newline,k=w.comments,D=w.step,B=w.preview,N=w.fastMode,P=null,O=!1,T=w.quoteChar==null?'"':w.quoteChar,E=T;if(w.escapeChar!==void 0&&(E=w.escapeChar),(typeof _!="string"||-1<c.BAD_DELIMITERS.indexOf(_))&&(_=","),k===_)throw new Error("Comment character same as delimiter");k===!0?k="#":(typeof k!="string"||-1<c.BAD_DELIMITERS.indexOf(k))&&(k=!1),A!==`
78
- `&&A!=="\r"&&A!==`\r
79
- `&&(A=`
80
- `);var F=0,V=!1;this.parse=function(j,G,$){if(typeof j!="string")throw new Error("Input must be a string");var Y=j.length,U=_.length,re=A.length,ve=k.length,Q=R(D),ee=[],ue=[],J=[],H=F=0;if(!j)return Ye();if(N||N!==!1&&j.indexOf(T)===-1){for(var ye=j.split(A),Z=0;Z<ye.length;Z++){if(J=ye[Z],F+=J.length,Z!==ye.length-1)F+=A.length;else if($)return Ye();if(!k||J.substring(0,ve)!==k){if(Q){if(ee=[],qt(J.split(_)),ke(),V)return Ye()}else qt(J.split(_));if(B&&B<=Z)return ee=ee.slice(0,B),Ye(!0)}}return Ye()}for(var pe=j.indexOf(_,F),ge=j.indexOf(A,F),st=new RegExp(m(E)+m(T),"g"),le=j.indexOf(T,F);;)if(j[F]===T)for(le=F,F++;;){if((le=j.indexOf(T,le+1))===-1)return $||ue.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:ee.length,index:F}),bt();if(le===Y-1)return bt(j.substring(F,le).replace(st,T));if(T===E&&j[le+1]===E)le++;else if(T===E||le===0||j[le-1]!==E){pe!==-1&&pe<le+1&&(pe=j.indexOf(_,le+1));var Te=xn((ge=ge!==-1&&ge<le+1?j.indexOf(A,le+1):ge)===-1?pe:Math.min(pe,ge));if(j.substr(le+1+Te,U)===_){J.push(j.substring(F,le).replace(st,T)),j[F=le+1+Te+U]!==T&&(le=j.indexOf(T,F)),pe=j.indexOf(_,F),ge=j.indexOf(A,F);break}if(Te=xn(ge),j.substring(le+1+Te,le+1+Te+re)===A){if(J.push(j.substring(F,le).replace(st,T)),Gn(le+1+Te+re),pe=j.indexOf(_,F),le=j.indexOf(T,F),Q&&(ke(),V))return Ye();if(B&&ee.length>=B)return Ye(!0);break}ue.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:ee.length,index:F}),le++}}else if(k&&J.length===0&&j.substring(F,F+ve)===k){if(ge===-1)return Ye();F=ge+re,ge=j.indexOf(A,F),pe=j.indexOf(_,F)}else if(pe!==-1&&(pe<ge||ge===-1))J.push(j.substring(F,pe)),F=pe+U,pe=j.indexOf(_,F);else{if(ge===-1)break;if(J.push(j.substring(F,ge)),Gn(ge+re),Q&&(ke(),V))return Ye();if(B&&ee.length>=B)return Ye(!0)}return bt();function qt(Ge){ee.push(Ge),H=F}function xn(Ge){var Qe=0;return Qe=Ge!==-1&&(Ge=j.substring(le+1,Ge))&&Ge.trim()===""?Ge.length:Qe}function bt(Ge){return $||(Ge===void 0&&(Ge=j.substring(F)),J.push(Ge),F=Y,qt(J),Q&&ke()),Ye()}function Gn(Ge){F=Ge,qt(J),J=[],ge=j.indexOf(A,F)}function Ye(Ge){if(w.header&&!G&&ee.length&&!O){var Qe=ee[0],Tt=Object.create(null),li=new Set(Qe);let $o=!1;for(let Wt=0;Wt<Qe.length;Wt++){let vt=Qe[Wt];if(Tt[vt=R(w.transformHeader)?w.transformHeader(vt,Wt):vt]){let Dt,ci=Tt[vt];for(;Dt=vt+"_"+ci,ci++,li.has(Dt););li.add(Dt),Qe[Wt]=Dt,Tt[vt]++,$o=!0,(P=P===null?{}:P)[Dt]=vt}else Tt[vt]=1,Qe[Wt]=vt;li.add(vt)}$o&&console.warn("Duplicate headers found and renamed."),O=!0}return{data:ee,errors:ue,meta:{delimiter:_,linebreak:A,aborted:V,truncated:!!Ge,cursor:H+(G||0),renamedHeaders:P}}}function ke(){D(Ye()),ee=[],ue=[]}},this.abort=function(){V=!0},this.getCharIndex=function(){return F}}function y(w){var _=w.data,A=a[_.workerId],k=!1;if(_.error)A.userError(_.error,_.file);else if(_.results&&_.results.data){var D={abort:function(){k=!0,x(_.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:I,resume:I};if(R(A.userStep)){for(var B=0;B<_.results.data.length&&(A.userStep({data:_.results.data[B],errors:_.results.errors,meta:_.results.meta},D),!k);B++);delete _.results}else R(A.userChunk)&&(A.userChunk(_.results,D,_.file),delete _.results)}_.finished&&!k&&x(_.workerId,_.results)}function x(w,_){var A=a[w];R(A.userComplete)&&A.userComplete(_),A.terminate(),delete a[w]}function I(){throw new Error("Not implemented.")}function C(w){if(typeof w!="object"||w===null)return w;var _,A=Array.isArray(w)?[]:{};for(_ in w)A[_]=C(w[_]);return A}function M(w,_){return function(){w.apply(_,arguments)}}function R(w){return typeof w=="function"}return c.parse=function(w,_){var A=(_=_||{}).dynamicTyping||!1;if(R(A)&&(_.dynamicTypingFunction=A,A={}),_.dynamicTyping=A,_.transform=!!R(_.transform)&&_.transform,!_.worker||!c.WORKERS_SUPPORTED)return A=null,c.NODE_STREAM_INPUT,typeof w=="string"?(w=(k=>k.charCodeAt(0)!==65279?k:k.slice(1))(w),A=new(_.download?d:h)(_)):w.readable===!0&&R(w.read)&&R(w.on)?A=new g(_):(i.File&&w instanceof File||w instanceof Object)&&(A=new f(_)),A.stream(w);(A=(()=>{var k;return!!c.WORKERS_SUPPORTED&&(k=(()=>{var D=i.URL||i.webkitURL||null,B=n.toString();return c.BLOB_URL||(c.BLOB_URL=D.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",B,")();"],{type:"text/javascript"})))})(),(k=new i.Worker(k)).onmessage=y,k.id=l++,a[k.id]=k)})()).userStep=_.step,A.userChunk=_.chunk,A.userComplete=_.complete,A.userError=_.error,_.step=R(_.step),_.chunk=R(_.chunk),_.complete=R(_.complete),_.error=R(_.error),delete _.worker,A.postMessage({input:w,config:_,workerId:A.id})},c.unparse=function(w,_){var A=!1,k=!0,D=",",B=`\r
81
- `,N='"',P=N+N,O=!1,T=null,E=!1,F=((()=>{if(typeof _=="object"){if(typeof _.delimiter!="string"||c.BAD_DELIMITERS.filter(function(G){return _.delimiter.indexOf(G)!==-1}).length||(D=_.delimiter),typeof _.quotes!="boolean"&&typeof _.quotes!="function"&&!Array.isArray(_.quotes)||(A=_.quotes),typeof _.skipEmptyLines!="boolean"&&typeof _.skipEmptyLines!="string"||(O=_.skipEmptyLines),typeof _.newline=="string"&&(B=_.newline),typeof _.quoteChar=="string"&&(N=_.quoteChar),typeof _.header=="boolean"&&(k=_.header),Array.isArray(_.columns)){if(_.columns.length===0)throw new Error("Option columns is empty");T=_.columns}_.escapeChar!==void 0&&(P=_.escapeChar+N),_.escapeFormulae instanceof RegExp?E=_.escapeFormulae:typeof _.escapeFormulae=="boolean"&&_.escapeFormulae&&(E=/^[=+\-@\t\r].*$/)}})(),new RegExp(m(N),"g"));if(typeof w=="string"&&(w=JSON.parse(w)),Array.isArray(w)){if(!w.length||Array.isArray(w[0]))return V(null,w,O);if(typeof w[0]=="object")return V(T||Object.keys(w[0]),w,O)}else if(typeof w=="object")return typeof w.data=="string"&&(w.data=JSON.parse(w.data)),Array.isArray(w.data)&&(w.fields||(w.fields=w.meta&&w.meta.fields||T),w.fields||(w.fields=Array.isArray(w.data[0])?w.fields:typeof w.data[0]=="object"?Object.keys(w.data[0]):[]),Array.isArray(w.data[0])||typeof w.data[0]=="object"||(w.data=[w.data])),V(w.fields||[],w.data||[],O);throw new Error("Unable to serialize unrecognized input");function V(G,$,Y){var U="",re=(typeof G=="string"&&(G=JSON.parse(G)),typeof $=="string"&&($=JSON.parse($)),Array.isArray(G)&&0<G.length),ve=!Array.isArray($[0]);if(re&&k){for(var Q=0;Q<G.length;Q++)0<Q&&(U+=D),U+=j(G[Q],Q);0<$.length&&(U+=B)}for(var ee=0;ee<$.length;ee++){var ue=(re?G:$[ee]).length,J=!1,H=re?Object.keys($[ee]).length===0:$[ee].length===0;if(Y&&!re&&(J=Y==="greedy"?$[ee].join("").trim()==="":$[ee].length===1&&$[ee][0].length===0),Y==="greedy"&&re){for(var ye=[],Z=0;Z<ue;Z++){var pe=ve?G[Z]:Z;ye.push($[ee][pe])}J=ye.join("").trim()===""}if(!J){for(var ge=0;ge<ue;ge++){0<ge&&!H&&(U+=D);var st=re&&ve?G[ge]:ge;U+=j($[ee][st],ge)}ee<$.length-1&&(!Y||0<ue&&!H)&&(U+=B)}}return U}function j(G,$){var Y,U;return G==null?"":G.constructor===Date?JSON.stringify(G).slice(1,25):(U=!1,E&&typeof G=="string"&&E.test(G)&&(G="'"+G,U=!0),Y=G.toString().replace(F,P),(U=U||A===!0||typeof A=="function"&&A(G,$)||Array.isArray(A)&&A[$]||((re,ve)=>{for(var Q=0;Q<ve.length;Q++)if(-1<re.indexOf(ve[Q]))return!0;return!1})(Y,c.BAD_DELIMITERS)||-1<Y.indexOf(D)||Y.charAt(0)===" "||Y.charAt(Y.length-1)===" ")?N+Y+N:Y)}},c.RECORD_SEP="",c.UNIT_SEP="",c.BYTE_ORDER_MARK="\uFEFF",c.BAD_DELIMITERS=["\r",`
82
- `,'"',c.BYTE_ORDER_MARK],c.WORKERS_SUPPORTED=!o&&!!i.Worker,c.NODE_STREAM_INPUT=1,c.LocalChunkSize=10485760,c.RemoteChunkSize=5242880,c.DefaultDelimiter=",",c.Parser=b,c.ParserHandle=p,c.NetworkStreamer=d,c.FileStreamer=f,c.StringStreamer=h,c.ReadableStreamStreamer=g,i.jQuery&&((r=i.jQuery).fn.parse=function(w){var _=w.config||{},A=[];return this.each(function(B){if(!(r(this).prop("tagName").toUpperCase()==="INPUT"&&r(this).attr("type").toLowerCase()==="file"&&i.FileReader)||!this.files||this.files.length===0)return!0;for(var N=0;N<this.files.length;N++)A.push({file:this.files[N],inputElem:this,instanceConfig:r.extend({},_)})}),k(),this;function k(){if(A.length===0)R(w.complete)&&w.complete();else{var B,N,P,O,T=A[0];if(R(w.before)){var E=w.before(T.file,T.inputElem);if(typeof E=="object"){if(E.action==="abort")return B="AbortError",N=T.file,P=T.inputElem,O=E.reason,void(R(w.error)&&w.error({name:B},N,P,O));if(E.action==="skip")return void D();typeof E.config=="object"&&(T.instanceConfig=r.extend(T.instanceConfig,E.config))}else if(E==="skip")return void D()}var F=T.instanceConfig.complete;T.instanceConfig.complete=function(V){R(F)&&F(V,T.file,T.inputElem),D()},c.parse(T.file,T.instanceConfig)}}function D(){A.splice(0,1),k()}}),s&&(i.onmessage=function(w){w=w.data,c.WORKER_ID===void 0&&w&&(c.WORKER_ID=w.workerId),typeof w.input=="string"?i.postMessage({workerId:c.WORKER_ID,results:c.parse(w.input,w.config),finished:!0}):(i.File&&w.input instanceof File||w.input instanceof Object)&&(w=c.parse(w.input,w.config))&&i.postMessage({workerId:c.WORKER_ID,results:w,finished:!0})}),(d.prototype=Object.create(u.prototype)).constructor=d,(f.prototype=Object.create(u.prototype)).constructor=f,(h.prototype=Object.create(h.prototype)).constructor=h,(g.prototype=Object.create(u.prototype)).constructor=g,c})})(Zm);var M_=Zm.exports;const R_=Su(M_),P_=(e="database")=>{let t=[],n=[];e==="database"?(t=["Connection Name","Port","Username","Password","Database Name","Server URL","Scan Order","Scan Scope","Scan Scope Value","Department","Country ISO2"],n=[["ExampleConnection1","3306","admin","pass123","server1","http://server1.com","Sequential","Number","200","Finance","CL"],["ExampleConnection2","5432","root","securePass","example_db","http://server2.com","Random","Number","100","Accounting","US"],["ExampleConnection3","1521","oracle_admin","oraclePass","oracle_db","http://server3.com","Random","Percentage","50","Information Technology (IT)","IN"]]):e==="shared_drive"&&(t=["Connection Name","IP Address","Username","Password","Host Name","Mount Path","Department","Country ISO2"],n=[["SharedDriveConn1","192.168.1.10","shared_admin","fin@123","finance-server-01","/mnt/finance","Finance","CL"],["SharedDriveConn2","10.0.0.25","acc_user","acc@secure","accounting-host","/mnt/accounting","Accounting","US"],["SharedDriveConn3","172.16.0.5","it_admin","it!pass2024","it-nfs-01","/mnt/it_shared","Information Technology (IT)","IN"]]);const i=[t.join(","),...n.map(a=>a.join(","))].join(`
83
- `),r=new Blob([i],{type:"text/csv"}),o=window.URL.createObjectURL(r),s=document.createElement("a");s.href=o,s.setAttribute("download","sample.csv"),document.body.appendChild(s),s.click(),document.body.removeChild(s)},k_=(e,t="database")=>t==="database"?e.map(n=>{var i,r,o,s,a,l,c,u,d,f,h;return{"Connection Name":((i=n["Connection Name"])==null?void 0:i.trim())||"",Port:((r=n.Port)==null?void 0:r.trim())||"",Username:((o=n.Username)==null?void 0:o.trim())||"",Password:((s=n.Password)==null?void 0:s.trim())||"","Database Name":((a=n["Database Name"])==null?void 0:a.trim())||"","Server URL":((l=n["Server URL"])==null?void 0:l.trim())||"","Scan Order":((c=n["Scan Order"])==null?void 0:c.trim())||"","Scan Scope":((u=n["Scan Scope"])==null?void 0:u.trim())||"","Scan Scope Value":((d=n["Scan Scope Value"])==null?void 0:d.trim())||"",Department:((f=n.Department)==null?void 0:f.trim())||"","Country ISO2":((h=n["Country ISO2"])==null?void 0:h.trim())||""}}):t==="shared_drive"?e.map(n=>{var i,r,o,s,a,l,c,u;return{"Connection Name":((i=n["Connection Name"])==null?void 0:i.trim())||"","IP Address":((r=n["IP Address"])==null?void 0:r.trim())||"",Department:((o=n.Department)==null?void 0:o.trim())||"","Country ISO2":((s=n["Country ISO2"])==null?void 0:s.trim())||"",Username:((a=n.Username)==null?void 0:a.trim())||"",Password:((l=n.Password)==null?void 0:l.trim())||"","Host Name":((c=n["Host Name"])==null?void 0:c.trim())||"","Mount Path":((u=n["Mount Path"])==null?void 0:u.trim())||""}}):[],F_="••••••••••",O_=({csvType:e="database",connectionType:t,onClose:n,onConfirm:i,TestConnection:r})=>{const[o,s]=S.useState(null),[a,l]=S.useState([]),[c,u]=S.useState(new Set),d=h=>{if(h.target.files){const g=h.target.files[0];s(g),f(g)}},f=h=>{const g=new FileReader;g.onload=({target:p})=>{p!=null&&p.result&&R_.parse(p.result,{header:!0,skipEmptyLines:!0,complete:m=>{l(k_(m.data,e))}})},g.readAsText(h)};return v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"fixed inset-0 z-40 bg-gray-900 bg-opacity-50 backdrop-blur-sm"}),v.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-40",children:v.jsxs("div",{className:`p-8 rounded-lg shadow-2xl w-full ${a.length>0?"max-w-[78vw]":"w-full max-w-3xl"} relative`,style:{backgroundColor:"var(--bg-color)"},children:[v.jsxs("div",{className:"flex justify-between items-center",children:[v.jsx("h3",{className:"text-xl font-semibold",style:{color:"var(--text-color)",fontFamily:"'Afacad', 'Rubik', sans-serif"},children:"Import Connectors"}),v.jsx("button",{className:"text-2xl transition-colors text-brand-primary hover:opacity-80",onClick:n,children:"×"})]}),e==="database"?v.jsx("div",{className:"w-full max-w-2xl bg-yellow-100 dark:bg-yellow-900/30 border border-yellow-400 dark:border-yellow-700 text-yellow-800 dark:text-yellow-200 px-4 py-2 rounded relative mt-2",role:"alert",children:v.jsxs("strong",{className:"font-bold flex gap-2 text-sm items-center",children:[v.jsx(Hu,{}),"Import connectors works only for connection without SSH Configuration"]})}):v.jsx("div",{className:"w-full max-w-2xl px-4 py-2 rounded relative mt-2",style:{backgroundColor:"var(--brand-light)",border:"1px solid var(--brand-orange)",color:"var(--brand-dark)"},role:"alert",children:v.jsxs("strong",{className:"font-normal flex gap-2 text-sm items-center",children:[v.jsx(km,{style:{color:"var(--brand-orange)"}}),"Please refer to the sample CSV before uploading"]})}),a.length>0&&v.jsx("div",{className:"max-h-[60vh] overflow-auto border rounded-md shadow-sm mt-4",children:v.jsxs("table",{className:"min-w-full max-h-[60vh] border-collapse",children:[v.jsx("thead",{children:v.jsxs("tr",{className:"sticky top-0 z-10",style:{backgroundColor:"var(--brand-light)"},children:[Object.keys(a[0]).map((h,g)=>v.jsx("th",{className:"p-3 text-left",style:{border:"1px solid var(--border-color)",color:"var(--brand-dark)"},children:h},g)),t&&r&&v.jsx("th",{style:{border:"1px solid var(--border-color)",color:"var(--brand-dark)"},children:"Test Status"})]})}),v.jsx("tbody",{children:a.map((h,g)=>v.jsxs("tr",{className:`${c.has(g)?"bg-red-50 dark:bg-red-900/20":g%2===0?"bg-white dark:bg-[#23272f]":"bg-gray-50 dark:bg-[#1e293b]"}`,children:[Object.entries(h).map(([p,m],b)=>v.jsx("td",{className:"border p-3 text-gray-600 dark:text-gray-200",children:p.toLowerCase().includes("password")?F_:m},b)),t&&r&&v.jsx("td",{className:"border p-3 text-gray-600 dark:text-gray-200",children:v.jsx("div",{className:"flex justify-center",children:v.jsx(r,{type:t,host:h["Server URL"],port:parseInt(h.PORT?h.PORT:"3306",10),ipAddress:h["IP Address"],username:h.Username,password:h.Password,database:h["Database Name"],mountPath:h["Mount Path"],hostName:h["Host Name"],onTestResult:p=>{p.success?u(m=>{const b=new Set(m);return b.delete(g),b}):u(m=>new Set([...m,g]))},enableCopy:!1,enableTechnicalDetails:!1,customStyles:"mb-0"})})})]},g))})]})}),v.jsxs("div",{className:"flex flex-col items-center mt-6",children:[v.jsx("label",{htmlFor:"file-upload",className:"px-4 py-2 bg-brand-primary text-sm text-white rounded-md cursor-pointer hover:bg-[var(--brand-orange)]/90 transition-all shadow",children:o?o.name:"Add File"}),v.jsx("input",{type:"file",id:"file-upload",className:"hidden",accept:".csv",onChange:d})]}),v.jsxs("div",{className:"flex justify-between items-center mt-6",children:[v.jsx("button",{onClick:()=>P_(e),className:"text-sm text-brand-primary hover:opacity-80 underline transition-colors",children:"Download Sample CSV"}),a.length>0&&v.jsx("button",{className:"px-4 py-2 bg-brand-primary text-sm text-white rounded-md shadow hover:bg-[var(--brand-orange)]/90 transition-all",onClick:()=>{i(a),n()},children:"Confirm Import"})]})]})})]})},T_=({title:e})=>v.jsxs("div",{className:"nochartdata-container w-full h-full flex flex-col items-center justify-center text-center select-none",children:[v.jsx("div",{className:"items-center top-0 left-0 p-[1.25rem] absolute justify-center select-none text-[18px] font-[600] p-3",style:{color:"var(--chart-text-color)",fontFamily:"'Afacad', 'Rubik', sans-serif"},children:e}),v.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full",children:[v.jsx(e_,{size:80,style:{color:"var(--brand-color-orange)",opacity:.2}}),v.jsx("span",{className:"mt-4 text-[1rem]",style:{color:"var(--secondary-text-color)"},children:"No data to display"})]})]}),D_=({title:e,mainClassname:t,rightContent:n})=>v.jsxs("div",{className:`${t} flex items-center justify-between`,children:[v.jsx("span",{className:"flex flex-1 select-none md:text-xl 2xl:text-2xl font-[600]",style:{color:"var(--chart-text-color)",fontFamily:"'Afacad', 'Rubik', sans-serif"},children:e}),v.jsx("div",{children:n})]}),Yu=({legends:e,maxDisplayLegends:t=8,dataValues:n,colors:i,showAllLegends:r=!1,onClick:o})=>{const s=Math.min(e.length,t),a=(n==null?void 0:n.reduce((l,c)=>l+c,0))??0;return v.jsxs("div",{className:"flex flex-col",style:{minWidth:"150px",maxWidth:"100%"},children:[v.jsx("div",{className:"flex-1 overflow-y-auto",children:e.slice(0,s).map((l,c)=>v.jsxs("div",{className:"flex items-center mb-2 min-w-0",children:[v.jsx("div",{className:"mr-2 flex-shrink-0",style:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:i[c%i.length]}}),v.jsx("span",{className:"text-sm font-medium flex-1 min-w-0",style:{color:"var(--chart-text-color)",wordBreak:"break-word",overflowWrap:"break-word"},children:l}),n&&v.jsxs("span",{className:"text-xs ml-2 flex-shrink-0",style:{color:"var(--secondary-text-color)"},children:["(",(n[c]/a*100).toFixed(2),"%)"]})]},c))}),e.length>t&&v.jsx("div",{className:"mt-1 text-right",children:r?v.jsx("button",{className:"px-2 py-1 text-xs text-white rounded transition-colors",style:{backgroundColor:"var(--secondary-text-color)"},onMouseEnter:l=>l.currentTarget.style.opacity="0.9",onMouseLeave:l=>l.currentTarget.style.opacity="1",onClick:o,children:"Show Less"}):v.jsxs("button",{className:"px-2 py-1 text-xs text-white rounded transition-colors",style:{backgroundColor:"var(--brand-orange)"},onMouseEnter:l=>l.currentTarget.style.opacity="0.9",onMouseLeave:l=>l.currentTarget.style.opacity="1",onClick:o,children:["View All (",e.length-t," more)"]})})]})};/*!
84
- * @kurkle/color v0.3.4
85
- * https://github.com/kurkle/color#readme
86
- * (c) 2024 Jukka Kurkela
87
- * Released under the MIT License
88
- */function No(e){return e+.5|0}const Xn=(e,t,n)=>Math.max(Math.min(e,n),t);function Lr(e){return Xn(No(e*2.55),0,255)}function Qn(e){return Xn(No(e*255),0,255)}function _n(e){return Xn(No(e/2.55)/100,0,1)}function ch(e){return Xn(No(e*100),0,100)}const Lt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Fc=[..."0123456789ABCDEF"],N_=e=>Fc[e&15],L_=e=>Fc[(e&240)>>4]+Fc[e&15],es=e=>(e&240)>>4===(e&15),V_=e=>es(e.r)&&es(e.g)&&es(e.b)&&es(e.a);function B_(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Lt[e[1]]*17,g:255&Lt[e[2]]*17,b:255&Lt[e[3]]*17,a:t===5?Lt[e[4]]*17:255}:(t===7||t===9)&&(n={r:Lt[e[1]]<<4|Lt[e[2]],g:Lt[e[3]]<<4|Lt[e[4]],b:Lt[e[5]]<<4|Lt[e[6]],a:t===9?Lt[e[7]]<<4|Lt[e[8]]:255})),n}const $_=(e,t)=>e<255?t(e):"";function j_(e){var t=V_(e)?N_:L_;return e?"#"+t(e.r)+t(e.g)+t(e.b)+$_(e.a,t):void 0}const G_=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Jm(e,t,n){const i=t*Math.min(n,1-n),r=(o,s=(o+e/30)%12)=>n-i*Math.max(Math.min(s-3,9-s,1),-1);return[r(0),r(8),r(4)]}function z_(e,t,n){const i=(r,o=(r+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function H_(e,t,n){const i=Jm(e,1,.5);let r;for(t+n>1&&(r=1/(t+n),t*=r,n*=r),r=0;r<3;r++)i[r]*=1-t-n,i[r]+=t;return i}function W_(e,t,n,i,r){return e===r?(t-n)/i+(t<n?6:0):t===r?(n-e)/i+2:(e-t)/i+4}function Zu(e){const n=e.r/255,i=e.g/255,r=e.b/255,o=Math.max(n,i,r),s=Math.min(n,i,r),a=(o+s)/2;let l,c,u;return o!==s&&(u=o-s,c=a>.5?u/(2-o-s):u/(o+s),l=W_(n,i,r,u,o),l=l*60+.5),[l|0,c||0,a]}function Ju(e,t,n,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,i)).map(Qn)}function Uu(e,t,n){return Ju(Jm,e,t,n)}function X_(e,t,n){return Ju(H_,e,t,n)}function Y_(e,t,n){return Ju(z_,e,t,n)}function Um(e){return(e%360+360)%360}function Z_(e){const t=G_.exec(e);let n=255,i;if(!t)return;t[5]!==i&&(n=t[6]?Lr(+t[5]):Qn(+t[5]));const r=Um(+t[2]),o=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?i=X_(r,o,s):t[1]==="hsv"?i=Y_(r,o,s):i=Uu(r,o,s),{r:i[0],g:i[1],b:i[2],a:n}}function J_(e,t){var n=Zu(e);n[0]=Um(n[0]+t),n=Uu(n),e.r=n[0],e.g=n[1],e.b=n[2]}function U_(e){if(!e)return;const t=Zu(e),n=t[0],i=ch(t[1]),r=ch(t[2]);return e.a<255?`hsla(${n}, ${i}%, ${r}%, ${_n(e.a)})`:`hsl(${n}, ${i}%, ${r}%)`}const uh={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},dh={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Q_(){const e={},t=Object.keys(dh),n=Object.keys(uh);let i,r,o,s,a;for(i=0;i<t.length;i++){for(s=a=t[i],r=0;r<n.length;r++)o=n[r],a=a.replace(o,uh[o]);o=parseInt(dh[s],16),e[a]=[o>>16&255,o>>8&255,o&255]}return e}let ts;function K_(e){ts||(ts=Q_(),ts.transparent=[0,0,0,0]);const t=ts[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const q_=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function eE(e){const t=q_.exec(e);let n=255,i,r,o;if(t){if(t[7]!==i){const s=+t[7];n=t[8]?Lr(s):Xn(s*255,0,255)}return i=+t[1],r=+t[3],o=+t[5],i=255&(t[2]?Lr(i):Xn(i,0,255)),r=255&(t[4]?Lr(r):Xn(r,0,255)),o=255&(t[6]?Lr(o):Xn(o,0,255)),{r:i,g:r,b:o,a:n}}}function tE(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${_n(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Tl=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Xi=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function nE(e,t,n){const i=Xi(_n(e.r)),r=Xi(_n(e.g)),o=Xi(_n(e.b));return{r:Qn(Tl(i+n*(Xi(_n(t.r))-i))),g:Qn(Tl(r+n*(Xi(_n(t.g))-r))),b:Qn(Tl(o+n*(Xi(_n(t.b))-o))),a:e.a+n*(t.a-e.a)}}function ns(e,t,n){if(e){let i=Zu(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*n,t===0?360:1)),i=Uu(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function Qm(e,t){return e&&Object.assign(t||{},e)}function fh(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Qn(e[3]))):(t=Qm(e,{r:0,g:0,b:0,a:1}),t.a=Qn(t.a)),t}function iE(e){return e.charAt(0)==="r"?eE(e):Z_(e)}let Km=class Oc{constructor(t){if(t instanceof Oc)return t;const n=typeof t;let i;n==="object"?i=fh(t):n==="string"&&(i=B_(t)||K_(t)||iE(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Qm(this._rgb);return t&&(t.a=_n(t.a)),t}set rgb(t){this._rgb=fh(t)}rgbString(){return this._valid?tE(this._rgb):void 0}hexString(){return this._valid?j_(this._rgb):void 0}hslString(){return this._valid?U_(this._rgb):void 0}mix(t,n){if(t){const i=this.rgb,r=t.rgb;let o;const s=n===o?.5:n,a=2*s-1,l=i.a-r.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,i.r=255&c*i.r+o*r.r+.5,i.g=255&c*i.g+o*r.g+.5,i.b=255&c*i.b+o*r.b+.5,i.a=s*i.a+(1-s)*r.a,this.rgb=i}return this}interpolate(t,n){return t&&(this._rgb=nE(this._rgb,t._rgb,n)),this}clone(){return new Oc(this.rgb)}alpha(t){return this._rgb.a=Qn(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=No(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return ns(this._rgb,2,t),this}darken(t){return ns(this._rgb,2,-t),this}saturate(t){return ns(this._rgb,1,t),this}desaturate(t){return ns(this._rgb,1,-t),this}rotate(t){return J_(this._rgb,t),this}};/*!
89
- * Chart.js v4.5.1
90
- * https://www.chartjs.org
91
- * (c) 2025 Chart.js Contributors
92
- * Released under the MIT License
93
- */function Cn(){}const rE=(()=>{let e=0;return()=>e++})();function he(e){return e==null}function Ve(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function be(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function He(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function At(e,t){return He(e)?e:t}function ae(e,t){return typeof e>"u"?t:e}const oE=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,qm=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Fe(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Me(e,t,n,i){let r,o,s;if(Ve(e))for(o=e.length,r=0;r<o;r++)t.call(n,e[r],r);else if(be(e))for(s=Object.keys(e),o=s.length,r=0;r<o;r++)t.call(n,e[s[r]],s[r])}function fa(e,t){let n,i,r,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(r=e[n],o=t[n],r.datasetIndex!==o.datasetIndex||r.index!==o.index)return!1;return!0}function ha(e){if(Ve(e))return e.map(ha);if(be(e)){const t=Object.create(null),n=Object.keys(e),i=n.length;let r=0;for(;r<i;++r)t[n[r]]=ha(e[n[r]]);return t}return e}function eb(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function sE(e,t,n,i){if(!eb(e))return;const r=t[e],o=n[e];be(r)&&be(o)?et(r,o,i):t[e]=ha(o)}function et(e,t,n){const i=Ve(t)?t:[t],r=i.length;if(!be(e))return e;n=n||{};const o=n.merger||sE;let s;for(let a=0;a<r;++a){if(s=i[a],!be(s))continue;const l=Object.keys(s);for(let c=0,u=l.length;c<u;++c)o(l[c],e,s,n)}return e}function Jr(e,t){return et(e,t,{merger:aE})}function aE(e,t,n){if(!eb(e))return;const i=t[e],r=n[e];be(i)&&be(r)?Jr(i,r):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=ha(r))}const hh={"":e=>e,x:e=>e.x,y:e=>e.y};function lE(e){const t=e.split("."),n=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function cE(e){const t=lE(e);return n=>{for(const i of t){if(i==="")break;n=n&&n[i]}return n}}function ti(e,t){return(hh[t]||(hh[t]=cE(t)))(e)}function Qu(e){return e.charAt(0).toUpperCase()+e.slice(1)}const vo=e=>typeof e<"u",ni=e=>typeof e=="function",gh=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function uE(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const we=Math.PI,Be=2*we,dE=Be+we,ga=Number.POSITIVE_INFINITY,fE=we/180,Xe=we/2,ui=we/4,ph=we*2/3,Yn=Math.log10,cn=Math.sign;function Ur(e,t,n){return Math.abs(e-t)<n}function mh(e){const t=Math.round(e);e=Ur(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Yn(e))),i=e/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function hE(e){const t=[],n=Math.sqrt(e);let i;for(i=1;i<n;i++)e%i===0&&(t.push(i),t.push(e/i));return n===(n|0)&&t.push(n),t.sort((r,o)=>r-o).pop(),t}function gE(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function sr(e){return!gE(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function pE(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function tb(e,t,n){let i,r,o;for(i=0,r=e.length;i<r;i++)o=e[i][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function Ut(e){return e*(we/180)}function Ku(e){return e*(180/we)}function bh(e){if(!He(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function nb(e,t){const n=t.x-e.x,i=t.y-e.y,r=Math.sqrt(n*n+i*i);let o=Math.atan2(i,n);return o<-.5*we&&(o+=Be),{angle:o,distance:r}}function Tc(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function mE(e,t){return(e-t+dE)%Be-we}function ft(e){return(e%Be+Be)%Be}function xo(e,t,n,i){const r=ft(e),o=ft(t),s=ft(n),a=ft(o-r),l=ft(s-r),c=ft(r-o),u=ft(r-s);return r===o||r===s||i&&o===s||a>l&&c<u}function qe(e,t,n){return Math.max(t,Math.min(n,e))}function bE(e){return qe(e,-32768,32767)}function Rn(e,t,n,i=1e-6){return e>=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function qu(e,t,n){n=n||(s=>e[s]<t);let i=e.length-1,r=0,o;for(;i-r>1;)o=r+i>>1,n(o)?r=o:i=o;return{lo:r,hi:i}}const Pn=(e,t,n,i)=>qu(e,n,i?r=>{const o=e[r][t];return o<n||o===n&&e[r+1][t]===n}:r=>e[r][t]<n),vE=(e,t,n)=>qu(e,n,i=>e[i][t]>=n);function xE(e,t,n){let i=0,r=e.length;for(;i<r&&e[i]<t;)i++;for(;r>i&&e[r-1]>n;)r--;return i>0||r<e.length?e.slice(i,r):e}const ib=["push","pop","shift","splice","unshift"];function yE(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),ib.forEach(n=>{const i="_onData"+Qu(n),r=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const s=r.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...o)}),s}})})}function vh(e,t){const n=e._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(ib.forEach(o=>{delete e[o]}),delete e._chartjs)}function rb(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const ob=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function sb(e,t){let n=[],i=!1;return function(...r){n=r,i||(i=!0,ob.call(window,()=>{i=!1,e.apply(t,n)}))}}function CE(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}const ed=e=>e==="start"?"left":e==="end"?"right":"center",ut=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,wE=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t;function ab(e,t,n){const i=t.length;let r=0,o=i;if(e._sorted){const{iScale:s,vScale:a,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=s.axis,{min:d,max:f,minDefined:h,maxDefined:g}=s.getUserBounds();if(h){if(r=Math.min(Pn(l,u,d).lo,n?i:Pn(t,u,s.getPixelForValue(d)).lo),c){const p=l.slice(0,r+1).reverse().findIndex(m=>!he(m[a.axis]));r-=Math.max(0,p)}r=qe(r,0,i-1)}if(g){let p=Math.max(Pn(l,s.axis,f,!0).hi+1,n?0:Pn(t,u,s.getPixelForValue(f),!0).hi+1);if(c){const m=l.slice(p-1).findIndex(b=>!he(b[a.axis]));p+=Math.max(0,m)}o=qe(p,r,i)-r}else o=i-r}return{start:r,count:o}}function lb(e){const{xScale:t,yScale:n,_scaleRanges:i}=e,r={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!i)return e._scaleRanges=r,!0;const o=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,r),o}const is=e=>e===0||e===1,xh=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Be/n)),yh=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Be/n)+1,Qr={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Xe)+1,easeOutSine:e=>Math.sin(e*Xe),easeInOutSine:e=>-.5*(Math.cos(we*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>is(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>is(e)?e:xh(e,.075,.3),easeOutElastic:e=>is(e)?e:yh(e,.075,.3),easeInOutElastic(e){return is(e)?e:e<.5?.5*xh(e*2,.1125,.45):.5+.5*yh(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Qr.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Qr.easeInBounce(e*2)*.5:Qr.easeOutBounce(e*2-1)*.5+.5};function td(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Ch(e){return td(e)?e:new Km(e)}function Dl(e){return td(e)?e:new Km(e).saturate(.5).darken(.1).hexString()}const SE=["x","y","borderWidth","radius","tension"],IE=["color","borderColor","backgroundColor"];function _E(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:IE},numbers:{type:"number",properties:SE}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function EE(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const wh=new Map;function AE(e,t){t=t||{};const n=e+JSON.stringify(t);let i=wh.get(n);return i||(i=new Intl.NumberFormat(e,t),wh.set(n,i)),i}function Lo(e,t,n){return AE(t,n).format(e)}const cb={values(e){return Ve(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const i=this.chart.options.locale;let r,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(r="scientific"),o=ME(e,n)}const s=Yn(Math.abs(o)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Lo(e,i,l)},logarithmic(e,t,n){if(e===0)return"0";const i=n[t].significand||e/Math.pow(10,Math.floor(Yn(e)));return[1,2,3,5,10,15].includes(i)||t>.8*n.length?cb.numeric.call(this,e,t,n):""}};function ME(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Qa={formatters:cb};function RE(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Qa.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Di=Object.create(null),Dc=Object.create(null);function Kr(e,t){if(!t)return e;const n=t.split(".");for(let i=0,r=n.length;i<r;++i){const o=n[i];e=e[o]||(e[o]=Object.create(null))}return e}function Nl(e,t,n){return typeof t=="string"?et(Kr(e,t),n):et(Kr(e,""),t)}class PE{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,r)=>Dl(r.backgroundColor),this.hoverBorderColor=(i,r)=>Dl(r.borderColor),this.hoverColor=(i,r)=>Dl(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Nl(this,t,n)}get(t){return Kr(this,t)}describe(t,n){return Nl(Dc,t,n)}override(t,n){return Nl(Di,t,n)}route(t,n,i,r){const o=Kr(this,t),s=Kr(this,i),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=s[r];return be(l)?Object.assign({},c,l):ae(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var $e=new PE({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[_E,EE,RE]);function kE(e){return!e||he(e.size)||he(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function pa(e,t,n,i,r){let o=t[r];return o||(o=t[r]=e.measureText(r).width,n.push(r)),o>i&&(i=o),i}function FE(e,t,n,i){i=i||{};let r=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(r=i.data={},o=i.garbageCollect=[],i.font=t),e.save(),e.font=t;let s=0;const a=n.length;let l,c,u,d,f;for(l=0;l<a;l++)if(d=n[l],d!=null&&!Ve(d))s=pa(e,r,o,s,d);else if(Ve(d))for(c=0,u=d.length;c<u;c++)f=d[c],f!=null&&!Ve(f)&&(s=pa(e,r,o,s,f));e.restore();const h=o.length/2;if(h>n.length){for(l=0;l<h;l++)delete r[o[l]];o.splice(0,h)}return s}function di(e,t,n){const i=e.currentDevicePixelRatio,r=n!==0?Math.max(n/2,.5):0;return Math.round((t-r)*i)/i+r}function Sh(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function ma(e,t,n,i){ub(e,t,n,i,null)}function ub(e,t,n,i,r){let o,s,a,l,c,u,d,f;const h=t.pointStyle,g=t.rotation,p=t.radius;let m=(g||0)*fE;if(h&&typeof h=="object"&&(o=h.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(n,i),e.rotate(m),e.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),e.restore();return}if(!(isNaN(p)||p<=0)){switch(e.beginPath(),h){default:r?e.ellipse(n,i,r/2,p,0,0,Be):e.arc(n,i,p,0,Be),e.closePath();break;case"triangle":u=r?r/2:p,e.moveTo(n+Math.sin(m)*u,i-Math.cos(m)*p),m+=ph,e.lineTo(n+Math.sin(m)*u,i-Math.cos(m)*p),m+=ph,e.lineTo(n+Math.sin(m)*u,i-Math.cos(m)*p),e.closePath();break;case"rectRounded":c=p*.516,l=p-c,s=Math.cos(m+ui)*l,d=Math.cos(m+ui)*(r?r/2-c:l),a=Math.sin(m+ui)*l,f=Math.sin(m+ui)*(r?r/2-c:l),e.arc(n-d,i-a,c,m-we,m-Xe),e.arc(n+f,i-s,c,m-Xe,m),e.arc(n+d,i+a,c,m,m+Xe),e.arc(n-f,i+s,c,m+Xe,m+we),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*p,u=r?r/2:l,e.rect(n-u,i-l,2*u,2*l);break}m+=ui;case"rectRot":d=Math.cos(m)*(r?r/2:p),s=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(r?r/2:p),e.moveTo(n-d,i-a),e.lineTo(n+f,i-s),e.lineTo(n+d,i+a),e.lineTo(n-f,i+s),e.closePath();break;case"crossRot":m+=ui;case"cross":d=Math.cos(m)*(r?r/2:p),s=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(r?r/2:p),e.moveTo(n-d,i-a),e.lineTo(n+d,i+a),e.moveTo(n+f,i-s),e.lineTo(n-f,i+s);break;case"star":d=Math.cos(m)*(r?r/2:p),s=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(r?r/2:p),e.moveTo(n-d,i-a),e.lineTo(n+d,i+a),e.moveTo(n+f,i-s),e.lineTo(n-f,i+s),m+=ui,d=Math.cos(m)*(r?r/2:p),s=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(r?r/2:p),e.moveTo(n-d,i-a),e.lineTo(n+d,i+a),e.moveTo(n+f,i-s),e.lineTo(n-f,i+s);break;case"line":s=r?r/2:Math.cos(m)*p,a=Math.sin(m)*p,e.moveTo(n-s,i-a),e.lineTo(n+s,i+a);break;case"dash":e.moveTo(n,i),e.lineTo(n+Math.cos(m)*(r?r/2:p),i+Math.sin(m)*p);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function kn(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Ii(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function _i(e){e.restore()}function OE(e,t,n,i,r){if(!t)return e.lineTo(n.x,n.y);if(r==="middle"){const o=(t.x+n.x)/2;e.lineTo(o,t.y),e.lineTo(o,n.y)}else r==="after"!=!!i?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function TE(e,t,n,i){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function DE(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),he(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function NE(e,t,n,i,r){if(r.strikethrough||r.underline){const o=e.measureText(i),s=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,u=r.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=r.decorationWidth||2,e.moveTo(s,u),e.lineTo(a,u),e.stroke()}}function LE(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Ni(e,t,n,i,r,o={}){const s=Ve(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=r.string,DE(e,o),l=0;l<s.length;++l)c=s[l],o.backdrop&&LE(e,o.backdrop),a&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),he(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,n,i,o.maxWidth)),e.fillText(c,n,i,o.maxWidth),NE(e,n,i,c,o),i+=Number(r.lineHeight);e.restore()}function yo(e,t){const{x:n,y:i,w:r,h:o,radius:s}=t;e.arc(n+s.topLeft,i+s.topLeft,s.topLeft,1.5*we,we,!0),e.lineTo(n,i+o-s.bottomLeft),e.arc(n+s.bottomLeft,i+o-s.bottomLeft,s.bottomLeft,we,Xe,!0),e.lineTo(n+r-s.bottomRight,i+o),e.arc(n+r-s.bottomRight,i+o-s.bottomRight,s.bottomRight,Xe,0,!0),e.lineTo(n+r,i+s.topRight),e.arc(n+r-s.topRight,i+s.topRight,s.topRight,0,-Xe,!0),e.lineTo(n+s.topLeft,i)}const VE=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,BE=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function $E(e,t){const n=(""+e).match(VE);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const jE=e=>+e||0;function nd(e,t){const n={},i=be(t),r=i?Object.keys(t):t,o=be(e)?i?s=>ae(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of r)n[s]=jE(o(s));return n}function db(e){return nd(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Ei(e){return nd(e,["topLeft","topRight","bottomLeft","bottomRight"])}function ot(e){const t=db(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Ue(e,t){e=e||{},t=t||$e.font;let n=ae(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=ae(e.style,t.style);i&&!(""+i).match(BE)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:ae(e.family,t.family),lineHeight:$E(ae(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:ae(e.weight,t.weight),string:""};return r.string=kE(r),r}function Le(e,t,n,i){let r,o,s;for(r=0,o=e.length;r<o;++r)if(s=e[r],s!==void 0&&(t!==void 0&&typeof s=="function"&&(s=s(t)),n!==void 0&&Ve(s)&&(s=s[n%s.length]),s!==void 0))return s}function GE(e,t,n){const{min:i,max:r}=e,o=qm(t,(r-i)/2),s=(a,l)=>n&&a===0?0:a+l;return{min:s(i,-Math.abs(o)),max:s(r,o)}}function si(e,t){return Object.assign(Object.create(e),t)}function id(e,t=[""],n,i,r=()=>e[0]){const o=n||e;typeof i>"u"&&(i=pb("_fallback",e));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:i,_getTarget:r,override:a=>id([a,...e],t,o,i)};return new Proxy(s,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return hb(a,l,()=>UE(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return _h(a).includes(l)},ownKeys(a){return _h(a)},set(a,l,c){const u=a._storage||(a._storage=r());return a[l]=u[l]=c,delete a._keys,!0}})}function ar(e,t,n,i){const r={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:fb(e,i),setContext:o=>ar(e,o,n,i),override:o=>ar(e.override(o),t,n,i)};return new Proxy(r,{deleteProperty(o,s){return delete o[s],delete e[s],!0},get(o,s,a){return hb(o,s,()=>HE(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(o,s,a){return e[s]=a,delete o[s],!0}})}function fb(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=e;return{allKeys:r,scriptable:n,indexable:i,isScriptable:ni(n)?n:()=>n,isIndexable:ni(i)?i:()=>i}}const zE=(e,t)=>e?e+Qu(t):t,rd=(e,t)=>be(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function hb(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const i=n();return e[t]=i,i}function HE(e,t,n){const{_proxy:i,_context:r,_subProxy:o,_descriptors:s}=e;let a=i[t];return ni(a)&&s.isScriptable(t)&&(a=WE(t,a,e,n)),Ve(a)&&a.length&&(a=XE(t,a,e,s.isIndexable)),rd(t,a)&&(a=ar(a,r,o&&o[t],s)),a}function WE(e,t,n,i){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(o,s||i);return a.delete(e),rd(e,l)&&(l=od(r._scopes,r,e,l)),l}function XE(e,t,n,i){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=n;if(typeof o.index<"u"&&i(e))return t[o.index%t.length];if(be(t[0])){const l=t,c=r._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=od(c,r,e,u);t.push(ar(d,o,s&&s[e],a))}}return t}function gb(e,t,n){return ni(e)?e(t,n):e}const YE=(e,t)=>e===!0?t:typeof e=="string"?ti(t,e):void 0;function ZE(e,t,n,i,r){for(const o of t){const s=YE(n,o);if(s){e.add(s);const a=gb(s._fallback,n,r);if(typeof a<"u"&&a!==n&&a!==i)return a}else if(s===!1&&typeof i<"u"&&n!==i)return null}return!1}function od(e,t,n,i){const r=t._rootScopes,o=gb(t._fallback,n,i),s=[...e,...r],a=new Set;a.add(i);let l=Ih(a,s,n,o||n,i);return l===null||typeof o<"u"&&o!==n&&(l=Ih(a,s,o,l,i),l===null)?!1:id(Array.from(a),[""],r,o,()=>JE(t,n,i))}function Ih(e,t,n,i,r){for(;n;)n=ZE(e,t,n,i,r);return n}function JE(e,t,n){const i=e._getTarget();t in i||(i[t]={});const r=i[t];return Ve(r)&&be(n)?n:r||{}}function UE(e,t,n,i){let r;for(const o of t)if(r=pb(zE(o,e),n),typeof r<"u")return rd(e,r)?od(n,i,e,r):r}function pb(e,t){for(const n of t){if(!n)continue;const i=n[e];if(typeof i<"u")return i}}function _h(e){let t=e._keys;return t||(t=e._keys=QE(e._scopes)),t}function QE(e){const t=new Set;for(const n of e)for(const i of Object.keys(n).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function mb(e,t,n,i){const{iScale:r}=e,{key:o="r"}=this._parsing,s=new Array(i);let a,l,c,u;for(a=0,l=i;a<l;++a)c=a+n,u=t[c],s[a]={r:r.parse(ti(u,o),c)};return s}const KE=Number.EPSILON||1e-14,lr=(e,t)=>t<e.length&&!e[t].skip&&e[t],bb=e=>e==="x"?"y":"x";function qE(e,t,n,i){const r=e.skip?t:e,o=t,s=n.skip?t:n,a=Tc(o,r),l=Tc(s,o);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=i*c,f=i*u;return{previous:{x:o.x-d*(s.x-r.x),y:o.y-d*(s.y-r.y)},next:{x:o.x+f*(s.x-r.x),y:o.y+f*(s.y-r.y)}}}function e3(e,t,n){const i=e.length;let r,o,s,a,l,c=lr(e,0);for(let u=0;u<i-1;++u)if(l=c,c=lr(e,u+1),!(!l||!c)){if(Ur(t[u],0,KE)){n[u]=n[u+1]=0;continue}r=n[u]/t[u],o=n[u+1]/t[u],a=Math.pow(r,2)+Math.pow(o,2),!(a<=9)&&(s=3/Math.sqrt(a),n[u]=r*s*t[u],n[u+1]=o*s*t[u])}}function t3(e,t,n="x"){const i=bb(n),r=e.length;let o,s,a,l=lr(e,0);for(let c=0;c<r;++c){if(s=a,a=l,l=lr(e,c+1),!a)continue;const u=a[n],d=a[i];s&&(o=(u-s[n])/3,a[`cp1${n}`]=u-o,a[`cp1${i}`]=d-o*t[c]),l&&(o=(l[n]-u)/3,a[`cp2${n}`]=u+o,a[`cp2${i}`]=d+o*t[c])}}function n3(e,t="x"){const n=bb(t),i=e.length,r=Array(i).fill(0),o=Array(i);let s,a,l,c=lr(e,0);for(s=0;s<i;++s)if(a=l,l=c,c=lr(e,s+1),!!l){if(c){const u=c[t]-l[t];r[s]=u!==0?(c[n]-l[n])/u:0}o[s]=a?c?cn(r[s-1])!==cn(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}e3(e,r,o),t3(e,o,t)}function rs(e,t,n){return Math.max(Math.min(e,n),t)}function i3(e,t){let n,i,r,o,s,a=kn(e[0],t);for(n=0,i=e.length;n<i;++n)s=o,o=a,a=n<i-1&&kn(e[n+1],t),o&&(r=e[n],s&&(r.cp1x=rs(r.cp1x,t.left,t.right),r.cp1y=rs(r.cp1y,t.top,t.bottom)),a&&(r.cp2x=rs(r.cp2x,t.left,t.right),r.cp2y=rs(r.cp2y,t.top,t.bottom)))}function r3(e,t,n,i,r){let o,s,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")n3(e,r);else{let c=i?e[e.length-1]:e[0];for(o=0,s=e.length;o<s;++o)a=e[o],l=qE(c,a,e[Math.min(o+1,s-(i?0:1))%s],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&i3(e,n)}function sd(){return typeof window<"u"&&typeof document<"u"}function ad(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function ba(e,t,n){let i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*t.parentNode[n])):i=e,i}const Ka=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function o3(e,t){return Ka(e).getPropertyValue(t)}const s3=["top","right","bottom","left"];function Ai(e,t,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const o=s3[r];i[o]=parseFloat(e[t+"-"+o+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const a3=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function l3(e,t){const n=e.touches,i=n&&n.length?n[0]:e,{offsetX:r,offsetY:o}=i;let s=!1,a,l;if(a3(r,o,e.target))a=r,l=o;else{const c=t.getBoundingClientRect();a=i.clientX-c.left,l=i.clientY-c.top,s=!0}return{x:a,y:l,box:s}}function gi(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:i}=t,r=Ka(n),o=r.boxSizing==="border-box",s=Ai(r,"padding"),a=Ai(r,"border","width"),{x:l,y:c,box:u}=l3(e,n),d=s.left+(u&&a.left),f=s.top+(u&&a.top);let{width:h,height:g}=t;return o&&(h-=s.width+a.width,g-=s.height+a.height),{x:Math.round((l-d)/h*n.width/i),y:Math.round((c-f)/g*n.height/i)}}function c3(e,t,n){let i,r;if(t===void 0||n===void 0){const o=e&&ad(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const s=o.getBoundingClientRect(),a=Ka(o),l=Ai(a,"border","width"),c=Ai(a,"padding");t=s.width-c.width-l.width,n=s.height-c.height-l.height,i=ba(a.maxWidth,o,"clientWidth"),r=ba(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:i||ga,maxHeight:r||ga}}const Zn=e=>Math.round(e*10)/10;function u3(e,t,n,i){const r=Ka(e),o=Ai(r,"margin"),s=ba(r.maxWidth,e,"clientWidth")||ga,a=ba(r.maxHeight,e,"clientHeight")||ga,l=c3(e,t,n);let{width:c,height:u}=l;if(r.boxSizing==="content-box"){const f=Ai(r,"border","width"),h=Ai(r,"padding");c-=h.width+f.width,u-=h.height+f.height}return c=Math.max(0,c-o.width),u=Math.max(0,i?c/i:u-o.height),c=Zn(Math.min(c,s,l.maxWidth)),u=Zn(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Zn(c/2)),(t!==void 0||n!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Zn(Math.floor(u*i))),{width:c,height:u}}function Eh(e,t,n){const i=t||1,r=Zn(e.height*i),o=Zn(e.width*i);e.height=Zn(e.height),e.width=Zn(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==i||s.height!==r||s.width!==o?(e.currentDevicePixelRatio=i,s.height=r,s.width=o,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const d3=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};sd()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function Ah(e,t){const n=o3(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function pi(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function f3(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:i==="middle"?n<.5?e.y:t.y:i==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function h3(e,t,n,i){const r={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},s=pi(e,r,n),a=pi(r,o,n),l=pi(o,t,n),c=pi(s,a,n),u=pi(a,l,n);return pi(c,u,n)}const g3=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},p3=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function tr(e,t,n){return e?g3(t,n):p3()}function vb(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function xb(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function yb(e){return e==="angle"?{between:xo,compare:mE,normalize:ft}:{between:Rn,compare:(t,n)=>t-n,normalize:t=>t}}function Mh({start:e,end:t,count:n,loop:i,style:r}){return{start:e%n,end:t%n,loop:i&&(t-e+1)%n===0,style:r}}function m3(e,t,n){const{property:i,start:r,end:o}=n,{between:s,normalize:a}=yb(i),l=t.length;let{start:c,end:u,loop:d}=e,f,h;if(d){for(c+=l,u+=l,f=0,h=l;f<h&&s(a(t[c%l][i]),r,o);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function Cb(e,t,n){if(!n)return[e];const{property:i,start:r,end:o}=n,s=t.length,{compare:a,between:l,normalize:c}=yb(i),{start:u,end:d,loop:f,style:h}=m3(e,t,n),g=[];let p=!1,m=null,b,y,x;const I=()=>l(r,x,b)&&a(r,x)!==0,C=()=>a(o,b)===0||l(o,x,b),M=()=>p||I(),R=()=>!p||C();for(let w=u,_=u;w<=d;++w)y=t[w%s],!y.skip&&(b=c(y[i]),b!==x&&(p=l(b,r,o),m===null&&M()&&(m=a(b,r)===0?w:_),m!==null&&R()&&(g.push(Mh({start:m,end:w,loop:f,count:s,style:h})),m=null),_=w,x=b));return m!==null&&g.push(Mh({start:m,end:d,loop:f,count:s,style:h})),g}function wb(e,t){const n=[],i=e.segments;for(let r=0;r<i.length;r++){const o=Cb(i[r],e.points,t);o.length&&n.push(...o)}return n}function b3(e,t,n,i){let r=0,o=t-1;if(n&&!i)for(;r<t&&!e[r].skip;)r++;for(;r<t&&e[r].skip;)r++;for(r%=t,n&&(o+=r);o>r&&e[o%t].skip;)o--;return o%=t,{start:r,end:o}}function v3(e,t,n,i){const r=e.length,o=[];let s=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%r];c.skip||c.stop?a.skip||(i=!1,o.push({start:t%r,end:(l-1)%r,loop:i}),t=s=c.stop?l:null):(s=l,a.skip&&(t=l)),a=c}return s!==null&&o.push({start:t%r,end:s%r,loop:i}),o}function x3(e,t){const n=e.points,i=e.options.spanGaps,r=n.length;if(!r)return[];const o=!!e._loop,{start:s,end:a}=b3(n,r,o,i);if(i===!0)return Rh(e,[{start:s,end:a,loop:o}],n,t);const l=a<s?a+r:a,c=!!e._fullLoop&&s===0&&a===r-1;return Rh(e,v3(n,s,l,c),n,t)}function Rh(e,t,n,i){return!i||!i.setContext||!n?t:y3(e,t,n,i)}function y3(e,t,n,i){const r=e._chart.getContext(),o=Ph(e.options),{_datasetIndex:s,options:{spanGaps:a}}=e,l=n.length,c=[];let u=o,d=t[0].start,f=d;function h(g,p,m,b){const y=a?-1:1;if(g!==p){for(g+=l;n[g%l].skip;)g-=y;for(;n[p%l].skip;)p+=y;g%l!==p%l&&(c.push({start:g%l,end:p%l,loop:m,style:b}),u=b,d=p%l)}}for(const g of t){d=a?d:g.start;let p=n[d%l],m;for(f=d+1;f<=g.end;f++){const b=n[f%l];m=Ph(i.setContext(si(r,{type:"segment",p0:p,p1:b,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:s}))),C3(m,u)&&h(d,f-1,g.loop,u),p=b,u=m}d<f-1&&h(d,f-1,g.loop,u)}return c}function Ph(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function C3(e,t){if(!t)return!1;const n=[],i=function(r,o){return td(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(e,i)!==JSON.stringify(t,i)}function os(e,t,n){return e.options.clip?e[n]:t[n]}function w3(e,t){const{xScale:n,yScale:i}=e;return n&&i?{left:os(n,t,"left"),right:os(n,t,"right"),top:os(i,t,"top"),bottom:os(i,t,"bottom")}:t}function Sb(e,t){const n=t._clip;if(n.disabled)return!1;const i=w3(t,e.chartArea);return{left:n.left===!1?0:i.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:i.right+(n.right===!0?0:n.right),top:n.top===!1?0:i.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:i.bottom+(n.bottom===!0?0:n.bottom)}}/*!
94
- * Chart.js v4.5.1
95
- * https://www.chartjs.org
96
- * (c) 2025 Chart.js Contributors
97
- * Released under the MIT License
98
- */class S3{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,i,r){const o=n.listeners[r],s=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(i-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=ob.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const o=i.items;let s=o.length-1,a=!1,l;for(;s>=0;--s)l=o[s],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(r.draw(),this._notify(r,i,t,"progress")),o.length||(i.running=!1,this._notify(r,i,t,"complete"),i.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const i=n.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var wn=new S3;const kh="transparent",I3={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=Ch(e||kh),r=i.valid&&Ch(t||kh);return r&&r.valid?r.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class _3{constructor(t,n,i,r){const o=n[i];r=Le([t.to,r,o,t.from]);const s=Le([t.from,o,r]);this._active=!0,this._fn=t.fn||I3[t.type||typeof s],this._easing=Qr[t.easing]||Qr.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(t,n,i){if(this._active){this._notify(!1);const r=this._target[this._prop],o=i-this._start,s=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Le([t.to,n,r,t.from]),this._from=Le([t.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,i=this._duration,r=this._prop,o=this._from,s=this._loop,a=this._to;let l;if(this._active=o!==a&&(s||n<i),!this._active){this._target[r]=a,this._notify(!0);return}if(n<0){this._target[r]=o;return}l=n/i%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][n]()}}class Ib{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!be(t))return;const n=Object.keys($e.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const o=t[r];if(!be(o))return;const s={};for(const a of n)s[a]=o[a];(Ve(o.properties)&&o.properties||[r]).forEach(a=>{(a===r||!i.has(a))&&i.set(a,s)})})}_animateOptions(t,n){const i=n.options,r=A3(t,i);if(!r)return[];const o=this._createAnimations(r,i);return i.$shared&&E3(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,n){const i=this._properties,r=[],o=t.$animations||(t.$animations={}),s=Object.keys(n),a=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){r.push(...this._animateOptions(t,n));continue}const u=n[c];let d=o[c];const f=i.get(c);if(d)if(f&&d.active()){d.update(f,u,a);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}o[c]=d=new _3(f,t,c,u),r.push(d)}return r}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return wn.add(this._chart,i),!0}}function E3(e,t){const n=[],i=Object.keys(t);for(let r=0;r<i.length;r++){const o=e[i[r]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function A3(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Fh(e,t){const n=e&&e.options||{},i=n.reverse,r=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:i?o:r,end:i?r:o}}function M3(e,t,n){if(n===!1)return!1;const i=Fh(e,n),r=Fh(t,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function R3(e){let t,n,i,r;return be(e)?(t=e.top,n=e.right,i=e.bottom,r=e.left):t=n=i=r=e,{top:t,right:n,bottom:i,left:r,disabled:e===!1}}function _b(e,t){const n=[],i=e._getSortedDatasetMetas(t);let r,o;for(r=0,o=i.length;r<o;++r)n.push(i[r].index);return n}function Oh(e,t,n,i={}){const r=e.keys,o=i.mode==="single";let s,a,l,c;if(t===null)return;let u=!1;for(s=0,a=r.length;s<a;++s){if(l=+r[s],l===n){if(u=!0,i.all)continue;break}c=e.values[l],He(c)&&(o||t===0||cn(t)===cn(c))&&(t+=c)}return!u&&!i.all?0:t}function P3(e,t){const{iScale:n,vScale:i}=t,r=n.axis==="x"?"x":"y",o=i.axis==="x"?"x":"y",s=Object.keys(e),a=new Array(s.length);let l,c,u;for(l=0,c=s.length;l<c;++l)u=s[l],a[l]={[r]:u,[o]:e[u]};return a}function Ll(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function k3(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function F3(e){const{min:t,max:n,minDefined:i,maxDefined:r}=e.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}function O3(e,t,n){const i=e[t]||(e[t]={});return i[n]||(i[n]={})}function Th(e,t,n,i){for(const r of t.getMatchingVisibleMetas(i).reverse()){const o=e[r.index];if(n&&o>0||!n&&o<0)return r.index}return null}function Dh(e,t){const{chart:n,_cachedMeta:i}=e,r=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=i,l=o.axis,c=s.axis,u=k3(o,s,i),d=t.length;let f;for(let h=0;h<d;++h){const g=t[h],{[l]:p,[c]:m}=g,b=g._stacks||(g._stacks={});f=b[c]=O3(r,u,p),f[a]=m,f._top=Th(f,s,!0,i.type),f._bottom=Th(f,s,!1,i.type);const y=f._visualValues||(f._visualValues={});y[a]=m}}function Vl(e,t){const n=e.scales;return Object.keys(n).filter(i=>n[i].axis===t).shift()}function T3(e,t){return si(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function D3(e,t,n){return si(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Ar(e,t){const n=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const r of t){const o=r._stacks;if(!o||o[i]===void 0||o[i][n]===void 0)return;delete o[i][n],o[i]._visualValues!==void 0&&o[i]._visualValues[n]!==void 0&&delete o[i]._visualValues[n]}}}const Bl=e=>e==="reset"||e==="none",Nh=(e,t)=>t?e:Object.assign({},e),N3=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:_b(n,!0),values:null};class jt{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ll(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Ar(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,i=this.getDataset(),r=(d,f,h,g)=>d==="x"?f:d==="r"?g:h,o=n.xAxisID=ae(i.xAxisID,Vl(t,"x")),s=n.yAxisID=ae(i.yAxisID,Vl(t,"y")),a=n.rAxisID=ae(i.rAxisID,Vl(t,"r")),l=n.indexAxis,c=n.iAxisID=r(l,o,s,a),u=n.vAxisID=r(l,s,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&vh(this._data,this),t._stacked&&Ar(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(be(n)){const r=this._cachedMeta;this._data=P3(n,r)}else if(i!==n){if(i){vh(i,this);const r=this._cachedMeta;Ar(r),r._parsed=[]}n&&Object.isExtensible(n)&&yE(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const o=n._stacked;n._stacked=Ll(n.vScale,n),n.stack!==i.stack&&(r=!0,Ar(n),n.stack=i.stack),this._resyncElements(t),(r||o!==n._stacked)&&(Dh(this,n._parsed),n._stacked=Ll(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:i,_data:r}=this,{iScale:o,_stacked:s}=i,a=o.axis;let l=t===0&&n===r.length?!0:i._sorted,c=t>0&&i._parsed[t-1],u,d,f;if(this._parsing===!1)i._parsed=r,i._sorted=!0,f=r;else{Ve(r[t])?f=this.parseArrayData(i,r,t,n):be(r[t])?f=this.parseObjectData(i,r,t,n):f=this.parsePrimitiveData(i,r,t,n);const h=()=>d[a]===null||c&&d[a]<c[a];for(u=0;u<n;++u)i._parsed[u+t]=d=f[u],l&&(h()&&(l=!1),c=d);i._sorted=l}s&&Dh(this,f)}parsePrimitiveData(t,n,i,r){const{iScale:o,vScale:s}=t,a=o.axis,l=s.axis,c=o.getLabels(),u=o===s,d=new Array(r);let f,h,g;for(f=0,h=r;f<h;++f)g=f+i,d[f]={[a]:u||o.parse(c[g],g),[l]:s.parse(n[g],g)};return d}parseArrayData(t,n,i,r){const{xScale:o,yScale:s}=t,a=new Array(r);let l,c,u,d;for(l=0,c=r;l<c;++l)u=l+i,d=n[u],a[l]={x:o.parse(d[0],u),y:s.parse(d[1],u)};return a}parseObjectData(t,n,i,r){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(r);let u,d,f,h;for(u=0,d=r;u<d;++u)f=u+i,h=n[f],c[u]={x:o.parse(ti(h,a),f),y:s.parse(ti(h,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,i){const r=this.chart,o=this._cachedMeta,s=n[t.axis],a={keys:_b(r,!0),values:n._stacks[t.axis]._visualValues};return Oh(a,s,o.index,{mode:i})}updateRangeFromParsed(t,n,i,r){const o=i[n.axis];let s=o===null?NaN:o;const a=r&&i._stacks[n.axis];r&&a&&(r.values=a,s=Oh(r,o,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,n){const i=this._cachedMeta,r=i._parsed,o=i._sorted&&t===i.iScale,s=r.length,a=this._getOtherScale(t),l=N3(n,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=F3(a);let f,h;function g(){h=r[f];const p=h[a.axis];return!He(h[t.axis])||u>p||d<p}for(f=0;f<s&&!(!g()&&(this.updateRangeFromParsed(c,t,h,l),o));++f);if(o){for(f=s-1;f>=0;--f)if(!g()){this.updateRangeFromParsed(c,t,h,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,i=[];let r,o,s;for(r=0,o=n.length;r<o;++r)s=n[r][t.axis],He(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,i=n.iScale,r=n.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:r?""+r.getLabelForValue(o[r.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=R3(ae(this.options.clip,M3(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,i=this._cachedMeta,r=i.data||[],o=n.chartArea,s=[],a=this._drawStart||0,l=this._drawCount||r.length-a,c=this.options.drawActiveElementsOnTop;let u;for(i.dataset&&i.dataset.draw(t,o,a,l),u=a;u<a+l;++u){const d=r[u];d.hidden||(d.active&&c?s.push(d):d.draw(t,o))}for(u=0;u<s.length;++u)s[u].draw(t,o)}getStyle(t,n){const i=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,n,i){const r=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];o=s.$context||(s.$context=D3(this.getContext(),t,s)),o.parsed=this.getParsed(t),o.raw=r.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=T3(this.chart.getContext(),this.index)),o.dataset=r,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",i){const r=n==="active",o=this._cachedDataOpts,s=t+"-"+n,a=o[s],l=this.enableOptionSharing&&vo(i);if(a)return Nh(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=r?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),h=Object.keys($e.elements[t]),g=()=>this.getContext(i,r,n),p=c.resolveNamedOptions(f,h,g,d);return p.$shared&&(p.$shared=l,o[s]=Object.freeze(Nh(p,l))),p}_resolveAnimations(t,n,i){const r=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,a=o[s];if(a)return a;let l;if(r.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,i,n))}const c=new Ib(r,l&&l.animations);return l&&l._cacheable&&(o[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Bl(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const i=this.resolveDataElementOptions(t,n),r=this._sharedOptions,o=this.getSharedOptions(i),s=this.includeOptions(n,o)||o!==r;return this.updateSharedOptions(o,n,i),{sharedOptions:o,includeOptions:s}}updateElement(t,n,i,r){Bl(r)?Object.assign(t,i):this._resolveAnimations(n,r).update(t,i)}updateSharedOptions(t,n,i){t&&!Bl(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,r){t.active=r;const o=this.getStyle(n,r);this._resolveAnimations(n,i,r).update(t,{options:!r&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,i=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const r=i.length,o=n.length,s=Math.min(o,r);s&&this.parse(0,s),o>r?this._insertElements(r,o-r,t):o<r&&this._removeElements(o,r-o)}_insertElements(t,n,i=!0){const r=this._cachedMeta,o=r.data,s=t+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=s;a--)c[a]=c[a-n]};for(l(o),a=t;a<s;++a)o[a]=new this.dataElementType;this._parsing&&l(r._parsed),this.parse(t,n),i&&this.updateElements(o,t,n,"reset")}updateElements(t,n,i,r){}_removeElements(t,n){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(t,n);i._stacked&&Ar(i,r)}i.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,i,r]=t;this[n](i,r)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}W(jt,"defaults",{}),W(jt,"datasetElementType",null),W(jt,"dataElementType",null);function L3(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let i=[];for(let r=0,o=n.length;r<o;r++)i=i.concat(n[r].controller.getAllParsedValues(e));e._cache.$bar=rb(i.sort((r,o)=>r-o))}return e._cache.$bar}function V3(e){const t=e.iScale,n=L3(t,e.type);let i=t._length,r,o,s,a;const l=()=>{s===32767||s===-32768||(vo(a)&&(i=Math.min(i,Math.abs(s-a)||i)),a=s)};for(r=0,o=n.length;r<o;++r)s=t.getPixelForValue(n[r]),l();for(a=void 0,r=0,o=t.ticks.length;r<o;++r)s=t.getPixelForTick(r),l();return i}function B3(e,t,n,i){const r=n.barThickness;let o,s;return he(r)?(o=t.min*n.categoryPercentage,s=n.barPercentage):(o=r*i,s=1),{chunk:o/i,ratio:s,start:t.pixels[e]-o/2}}function $3(e,t,n,i){const r=t.pixels,o=r[e];let s=e>0?r[e-1]:null,a=e<r.length-1?r[e+1]:null;const l=n.categoryPercentage;s===null&&(s=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-s);const c=o-(o-Math.min(s,a))/2*l;return{chunk:Math.abs(a-s)/2*l/i,ratio:n.barPercentage,start:c}}function j3(e,t,n,i){const r=n.parse(e[0],i),o=n.parse(e[1],i),s=Math.min(r,o),a=Math.max(r,o);let l=s,c=a;Math.abs(s)>Math.abs(a)&&(l=a,c=s),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}function Eb(e,t,n,i){return Ve(e)?j3(e,t,n,i):t[n.axis]=n.parse(e,i),t}function Lh(e,t,n,i){const r=e.iScale,o=e.vScale,s=r.getLabels(),a=r===o,l=[];let c,u,d,f;for(c=n,u=n+i;c<u;++c)f=t[c],d={},d[r.axis]=a||r.parse(s[c],c),l.push(Eb(f,d,o,c));return l}function $l(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function G3(e,t,n){return e!==0?cn(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function z3(e){let t,n,i,r,o;return e.horizontal?(t=e.base>e.x,n="left",i="right"):(t=e.base<e.y,n="bottom",i="top"),t?(r="end",o="start"):(r="start",o="end"),{start:n,end:i,reverse:t,top:r,bottom:o}}function H3(e,t,n,i){let r=t.borderSkipped;const o={};if(!r){e.borderSkipped=o;return}if(r===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:a,reverse:l,top:c,bottom:u}=z3(e);r==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===i?r=c:(n._bottom||0)===i?r=u:(o[Vh(u,s,a,l)]=!0,r=c)),o[Vh(r,s,a,l)]=!0,e.borderSkipped=o}function Vh(e,t,n,i){return i?(e=W3(e,t,n),e=Bh(e,n,t)):e=Bh(e,t,n),e}function W3(e,t,n){return e===t?n:e===n?t:e}function Bh(e,t,n){return e==="start"?t:e==="end"?n:e}function X3(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class qr extends jt{parsePrimitiveData(t,n,i,r){return Lh(t,n,i,r)}parseArrayData(t,n,i,r){return Lh(t,n,i,r)}parseObjectData(t,n,i,r){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,u=s.axis==="x"?a:l,d=[];let f,h,g,p;for(f=i,h=i+r;f<h;++f)p=n[f],g={},g[o.axis]=o.parse(ti(p,c),f),d.push(Eb(ti(p,u),g,s,f));return d}updateRangeFromParsed(t,n,i,r){super.updateRangeFromParsed(t,n,i,r);const o=i._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:i,vScale:r}=n,o=this.getParsed(t),s=o._custom,a=$l(s)?"["+s.start+", "+s.end+"]":""+r.getLabelForValue(o[r.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,i,r){const o=r==="reset",{index:s,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,r);for(let h=n;h<n+i;h++){const g=this.getParsed(h),p=o||he(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),m=this._calculateBarIndexPixels(h,u),b=(g._stacks||{})[a.axis],y={horizontal:c,base:p.base,enableBorderRadius:!b||$l(g._custom)||s===b._top||s===b._bottom,x:c?p.head:m.center,y:c?m.center:p.head,height:c?m.size:Math.abs(p.size),width:c?Math.abs(p.size):m.size};f&&(y.options=d||this.resolveDataElementOptions(h,t[h].active?"active":r));const x=y.options||t[h].options;H3(y,x,b,s),X3(y,x,u.ratio),this.updateElement(t[h],h,y,r)}}_getStacks(t,n){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=i.options.stacked,s=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[i.axis],c=u=>{const d=u._parsed.find(h=>h[i.axis]===l),f=d&&d[u.vScale.axis];if(he(f)||isNaN(f))return!0};for(const u of r)if(!(n!==void 0&&c(u))&&((o===!1||s.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&s.push(u.stack),u.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(i=>t[i].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[ae(this.chart.options.indexAxis==="x"?i.xAxisID:i.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,i){const r=this._getStacks(t,i),o=n!==void 0?r.indexOf(n):-1;return o===-1?r.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,i=n.iScale,r=[];let o,s;for(o=0,s=n.data.length;o<s;++o)r.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const a=t.barThickness;return{min:a||V3(n),pixels:r,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:i,index:r},options:{base:o,minBarLength:s}}=this,a=o||0,l=this.getParsed(t),c=l._custom,u=$l(c);let d=l[n.axis],f=0,h=i?this.applyStack(n,l,i):d,g,p;h!==d&&(f=h-d,h=d),u&&(d=c.barStart,h=c.barEnd-c.barStart,d!==0&&cn(d)!==cn(c.barEnd)&&(f=0),f+=d);const m=!he(o)&&!u?o:f;let b=n.getPixelForValue(m);if(this.chart.getDataVisibility(t)?g=n.getPixelForValue(f+h):g=b,p=g-b,Math.abs(p)<s){p=G3(p,n,a)*s,d===a&&(b-=p/2);const y=n.getPixelForDecimal(0),x=n.getPixelForDecimal(1),I=Math.min(y,x),C=Math.max(y,x);b=Math.max(Math.min(b,C),I),g=b+p,i&&!u&&(l._stacks[n.axis]._visualValues[r]=n.getValueForPixel(g)-n.getValueForPixel(b))}if(b===n.getPixelForValue(a)){const y=cn(p)*n.getLineWidthForValue(a)/2;b+=y,p-=y}return{size:p,base:b,head:g,center:g+p/2}}_calculateBarIndexPixels(t,n){const i=n.scale,r=this.options,o=r.skipNull,s=ae(r.maxBarThickness,1/0);let a,l;const c=this._getAxisCount();if(n.grouped){const u=o?this._getStackCount(t):n.stackCount,d=r.barThickness==="flex"?$3(t,n,r,u*c):B3(t,n,r,u*c),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(ae(f,this.getFirstScaleIdForIndexAxis())),g=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+h;a=d.start+d.chunk*g+d.chunk/2,l=Math.min(s,d.chunk*d.ratio)}else a=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(s,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,i=t.data,r=i.length;let o=0;for(;o<r;++o)this.getParsed(o)[n.axis]!==null&&!i[o].hidden&&i[o].draw(this._ctx)}}W(qr,"id","bar"),W(qr,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),W(qr,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Ls extends jt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,i,r){const o=super.parsePrimitiveData(t,n,i,r);for(let s=0;s<o.length;s++)o[s]._custom=this.resolveDataElementOptions(s+i).radius;return o}parseArrayData(t,n,i,r){const o=super.parseArrayData(t,n,i,r);for(let s=0;s<o.length;s++){const a=n[i+s];o[s]._custom=ae(a[2],this.resolveDataElementOptions(s+i).radius)}return o}parseObjectData(t,n,i,r){const o=super.parseObjectData(t,n,i,r);for(let s=0;s<o.length;s++){const a=n[i+s];o[s]._custom=ae(a&&a.r&&+a.r,this.resolveDataElementOptions(s+i).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let i=t.length-1;i>=0;--i)n=Math.max(n,t[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:o}=n,s=this.getParsed(t),a=r.getLabelForValue(s.x),l=o.getLabelForValue(s.y),c=s._custom;return{label:i[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,i,r){const o=r==="reset",{iScale:s,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,r),u=s.axis,d=a.axis;for(let f=n;f<n+i;f++){const h=t[f],g=!o&&this.getParsed(f),p={},m=p[u]=o?s.getPixelForDecimal(.5):s.getPixelForValue(g[u]),b=p[d]=o?a.getBasePixel():a.getPixelForValue(g[d]);p.skip=isNaN(m)||isNaN(b),c&&(p.options=l||this.resolveDataElementOptions(f,h.active?"active":r),o&&(p.options.radius=0)),this.updateElement(h,f,p,r)}}resolveDataElementOptions(t,n){const i=this.getParsed(t);let r=super.resolveDataElementOptions(t,n);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const o=r.radius;return n!=="active"&&(r.radius=0),r.radius+=ae(i&&i._custom,o),r}}W(Ls,"id","bubble"),W(Ls,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),W(Ls,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Y3(e,t,n){let i=1,r=1,o=0,s=0;if(t<Be){const a=e,l=a+t,c=Math.cos(a),u=Math.sin(a),d=Math.cos(l),f=Math.sin(l),h=(x,I,C)=>xo(x,a,l,!0)?1:Math.max(I,I*n,C,C*n),g=(x,I,C)=>xo(x,a,l,!0)?-1:Math.min(I,I*n,C,C*n),p=h(0,c,d),m=h(Xe,u,f),b=g(we,c,d),y=g(we+Xe,u,f);i=(p-b)/2,r=(m-y)/2,o=-(p+b)/2,s=-(m+y)/2}return{ratioX:i,ratioY:r,offsetX:o,offsetY:s}}class Jn extends jt{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const i=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=i;else{let o=l=>+i[l];if(be(i[t])){const{key:l="value"}=this._parsing;o=c=>+ti(i[c],l)}let s,a;for(s=t,a=t+n;s<a;++s)r._parsed[s]=o(s)}}_getRotation(){return Ut(this.options.rotation-90)}_getCircumference(){return Ut(this.options.circumference)}_getRotationExtents(){let t=Be,n=-Be;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const r=this.chart.getDatasetMeta(i).controller,o=r._getRotation(),s=r._getCircumference();t=Math.min(t,o),n=Math.max(n,o+s)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:i}=n,r=this._cachedMeta,o=r.data,s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(i.width,i.height)-s)/2,0),l=Math.min(oE(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:h,offsetX:g,offsetY:p}=Y3(d,u,l),m=(i.width-s)/f,b=(i.height-s)/h,y=Math.max(Math.min(m,b)/2,0),x=qm(this.options.radius,y),I=Math.max(x*l,0),C=(x-I)/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=p*x,r.total=this.calculateTotal(),this.outerRadius=x-C*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-C*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const i=this.options,r=this._cachedMeta,o=this._getCircumference();return n&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||r._parsed[t]===null||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*o/Be)}updateElements(t,n,i,r){const o=r==="reset",s=this.chart,a=s.chartArea,c=s.options.animation,u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,f=o&&c.animateScale,h=f?0:this.innerRadius,g=f?0:this.outerRadius,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(n,r);let b=this._getRotation(),y;for(y=0;y<n;++y)b+=this._circumference(y,o);for(y=n;y<n+i;++y){const x=this._circumference(y,o),I=t[y],C={x:u+this.offsetX,y:d+this.offsetY,startAngle:b,endAngle:b+x,circumference:x,outerRadius:g,innerRadius:h};m&&(C.options=p||this.resolveDataElementOptions(y,I.active?"active":r)),b+=x,this.updateElement(I,y,C,r)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let i=0,r;for(r=0;r<n.length;r++){const o=t._parsed[r];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(r)&&!n[r].hidden&&(i+=Math.abs(o))}return i}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Be*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,r=i.data.labels||[],o=Lo(n._parsed[t],i.options.locale);return{label:r[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const i=this.chart;let r,o,s,a,l;if(!t){for(r=0,o=i.data.datasets.length;r<o;++r)if(i.isDatasetVisible(r)){s=i.getDatasetMeta(r),t=s.data,a=s.controller;break}}if(!t)return 0;for(r=0,o=t.length;r<o;++r)l=a.resolveDataElementOptions(r),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let i=0,r=t.length;i<r;++i){const o=this.resolveDataElementOptions(i);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(n+=this._getRingWeight(i));return n}_getRingWeight(t){return Math.max(ae(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}W(Jn,"id","doughnut"),W(Jn,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),W(Jn,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),W(Jn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data,{labels:{pointStyle:i,textAlign:r,color:o,useBorderRadius:s,borderRadius:a}}=t.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((l,c)=>{const d=t.getDatasetMeta(0).controller.getStyle(c);return{text:l,fillStyle:d.backgroundColor,fontColor:o,hidden:!t.getDataVisibility(c),lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:d.borderWidth,strokeStyle:d.borderColor,textAlign:r,pointStyle:i,borderRadius:s&&(a||d.borderRadius),index:c}}):[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}});class Vs extends jt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:i,data:r=[],_dataset:o}=n,s=this.chart._animationsDisabled;let{start:a,count:l}=ab(n,r,s);this._drawStart=a,this._drawCount=l,lb(n)&&(a=0,l=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=r;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:c},t),this.updateElements(r,a,l,t)}updateElements(t,n,i,r){const o=r==="reset",{iScale:s,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,r),f=s.axis,h=a.axis,{spanGaps:g,segment:p}=this.options,m=sr(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||r==="none",y=n+i,x=t.length;let I=n>0&&this.getParsed(n-1);for(let C=0;C<x;++C){const M=t[C],R=b?M:{};if(C<n||C>=y){R.skip=!0;continue}const w=this.getParsed(C),_=he(w[h]),A=R[f]=s.getPixelForValue(w[f],C),k=R[h]=o||_?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,w,l):w[h],C);R.skip=isNaN(A)||isNaN(k)||_,R.stop=C>0&&Math.abs(w[f]-I[f])>m,p&&(R.parsed=w,R.raw=c.data[C]),d&&(R.options=u||this.resolveDataElementOptions(C,M.active?"active":r)),b||this.updateElement(M,C,R,r),I=w}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,i=n.options&&n.options.borderWidth||0,r=t.data||[];if(!r.length)return i;const o=r[0].size(this.resolveDataElementOptions(0)),s=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}W(Vs,"id","line"),W(Vs,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),W(Vs,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class eo extends jt{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,r=i.data.labels||[],o=Lo(n._parsed[t].r,i.options.locale);return{label:r[t]||"",value:o}}parseObjectData(t,n,i,r){return mb.bind(this)(t,n,i,r)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,r)=>{const o=this.getParsed(r).r;!isNaN(o)&&this.chart.getDataVisibility(r)&&(o<n.min&&(n.min=o),o>n.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,i=t.options,r=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(r/2,0),s=Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0),a=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,i,r){const o=r==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*we;let h=f,g;const p=360/this.countVisibleElements();for(g=0;g<n;++g)h+=this._computeAngle(g,r,p);for(g=n;g<n+i;g++){const m=t[g];let b=h,y=h+this._computeAngle(g,r,p),x=s.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;h=y,o&&(l.animateScale&&(x=0),l.animateRotate&&(b=y=f));const I={x:u,y:d,innerRadius:0,outerRadius:x,startAngle:b,endAngle:y,options:this.resolveDataElementOptions(g,m.active?"active":r)};this.updateElement(m,g,I,r)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((i,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&n++}),n}_computeAngle(t,n,i){return this.chart.getDataVisibility(t)?Ut(this.resolveDataElementOptions(t,n).angle||i):0}}W(eo,"id","polarArea"),W(eo,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),W(eo,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return n.labels.map((o,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class va extends Jn{}W(va,"id","pie"),W(va,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Bs extends jt{getLabelAndValue(t){const n=this._cachedMeta.vScale,i=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(t,n,i,r){return mb.bind(this)(t,n,i,r)}update(t){const n=this._cachedMeta,i=n.dataset,r=n.data||[],o=n.iScale.getLabels();if(i.points=r,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===r.length,options:s};this.updateElement(i,void 0,a,t)}this.updateElements(r,0,r.length,t)}updateElements(t,n,i,r){const o=this._cachedMeta.rScale,s=r==="reset";for(let a=n;a<n+i;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":r),u=o.getPointPositionForValue(a,this.getParsed(a).r),d=s?o.xCenter:u.x,f=s?o.yCenter:u.y,h={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,a,h,r)}}}W(Bs,"id","radar"),W(Bs,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),W(Bs,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class $s extends jt{getLabelAndValue(t){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:o}=n,s=this.getParsed(t),a=r.getLabelForValue(s.x),l=o.getLabelForValue(s.y);return{label:i[t]||"",value:"("+a+", "+l+")"}}update(t){const n=this._cachedMeta,{data:i=[]}=n,r=this.chart._animationsDisabled;let{start:o,count:s}=ab(n,i,r);if(this._drawStart=o,this._drawCount=s,lb(n)&&(o=0,s=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:l}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=i;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!r,options:c},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(i,o,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,i,r){const o=r==="reset",{iScale:s,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,r),d=this.getSharedOptions(u),f=this.includeOptions(r,d),h=s.axis,g=a.axis,{spanGaps:p,segment:m}=this.options,b=sr(p)?p:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||o||r==="none";let x=n>0&&this.getParsed(n-1);for(let I=n;I<n+i;++I){const C=t[I],M=this.getParsed(I),R=y?C:{},w=he(M[g]),_=R[h]=s.getPixelForValue(M[h],I),A=R[g]=o||w?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,M,l):M[g],I);R.skip=isNaN(_)||isNaN(A)||w,R.stop=I>0&&Math.abs(M[h]-x[h])>b,m&&(R.parsed=M,R.raw=c.data[I]),f&&(R.options=d||this.resolveDataElementOptions(I,C.active?"active":r)),y||this.updateElement(C,I,R,r),x=M}this.updateSharedOptions(d,r,u)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const i=t.dataset,r=i.options&&i.options.borderWidth||0;if(!n.length)return r;const o=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(r,o,s)/2}}W($s,"id","scatter"),W($s,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),W($s,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Z3=Object.freeze({__proto__:null,BarController:qr,BubbleController:Ls,DoughnutController:Jn,LineController:Vs,PieController:va,PolarAreaController:eo,RadarController:Bs,ScatterController:$s});function fi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ld{constructor(t){W(this,"options");this.options=t||{}}static override(t){Object.assign(ld.prototype,t)}init(){}formats(){return fi()}parse(){return fi()}format(){return fi()}add(){return fi()}diff(){return fi()}startOf(){return fi()}endOf(){return fi()}}var J3={_date:ld};function U3(e,t,n,i){const{controller:r,data:o,_sorted:s}=e,a=r._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const c=a._reversePixels?vE:Pn;if(i){if(r._sharedOptions){const u=o[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){const f=c(o,t,n-d),h=c(o,t,n+d);return{lo:f.lo,hi:h.hi}}}}else{const u=c(o,t,n);if(l){const{vScale:d}=r._cachedMeta,{_parsed:f}=e,h=f.slice(0,u.lo+1).reverse().findIndex(p=>!he(p[d.axis]));u.lo-=Math.max(0,h);const g=f.slice(u.hi).findIndex(p=>!he(p[d.axis]));u.hi+=Math.max(0,g)}return u}}return{lo:0,hi:o.length-1}}function qa(e,t,n,i,r){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:u}=o[a],{lo:d,hi:f}=U3(o[a],t,s,r);for(let h=d;h<=f;++h){const g=u[h];g.skip||i(g,c,h)}}}function Q3(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(i,r){const o=t?Math.abs(i.x-r.x):0,s=n?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}function jl(e,t,n,i,r){const o=[];return!r&&!e.isPointInArea(t)||qa(e,n,t,function(a,l,c){!r&&!kn(a,e.chartArea,0)||a.inRange(t.x,t.y,i)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function K3(e,t,n,i){let r=[];function o(s,a,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],i),{angle:d}=nb(s,{x:t.x,y:t.y});xo(d,c,u)&&r.push({element:s,datasetIndex:a,index:l})}return qa(e,n,t,o),r}function q3(e,t,n,i,r,o){let s=[];const a=Q3(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const h=u.inRange(t.x,t.y,r);if(i&&!h)return;const g=u.getCenterPoint(r);if(!(!!o||e.isPointInArea(g))&&!h)return;const m=a(t,g);m<l?(s=[{element:u,datasetIndex:d,index:f}],l=m):m===l&&s.push({element:u,datasetIndex:d,index:f})}return qa(e,n,t,c),s}function Gl(e,t,n,i,r,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!i?K3(e,t,n,r):q3(e,t,n,i,r,o)}function $h(e,t,n,i,r){const o=[],s=n==="x"?"inXRange":"inYRange";let a=!1;return qa(e,n,t,(l,c,u)=>{l[s]&&l[s](t[n],r)&&(o.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,r))}),i&&!a?[]:o}var eA={modes:{index(e,t,n,i){const r=gi(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?jl(e,r,o,i,s):Gl(e,r,o,!1,i,s),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,i){const r=gi(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?jl(e,r,o,i,s):Gl(e,r,o,!1,i,s);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(e,t,n,i){const r=gi(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;return jl(e,r,o,i,s)},nearest(e,t,n,i){const r=gi(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;return Gl(e,r,o,n.intersect,i,s)},x(e,t,n,i){const r=gi(t,e);return $h(e,r,"x",n.intersect,i)},y(e,t,n,i){const r=gi(t,e);return $h(e,r,"y",n.intersect,i)}}};const Ab=["left","top","right","bottom"];function Mr(e,t){return e.filter(n=>n.pos===t)}function jh(e,t){return e.filter(n=>Ab.indexOf(n.pos)===-1&&n.box.axis===t)}function Rr(e,t){return e.sort((n,i)=>{const r=t?i:n,o=t?n:i;return r.weight===o.weight?r.index-o.index:r.weight-o.weight})}function tA(e){const t=[];let n,i,r,o,s,a;for(n=0,i=(e||[]).length;n<i;++n)r=e[n],{position:o,options:{stack:s,stackWeight:a=1}}=r,t.push({index:n,box:r,pos:o,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&o+s,stackWeight:a});return t}function nA(e){const t={};for(const n of e){const{stack:i,pos:r,stackWeight:o}=n;if(!i||!Ab.includes(r))continue;const s=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return t}function iA(e,t){const n=nA(e),{vBoxMaxWidth:i,hBoxMaxHeight:r}=t;let o,s,a;for(o=0,s=e.length;o<s;++o){a=e[o];const{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*i:l&&t.availableWidth,a.height=r):(a.width=i,a.height=u?u*r:l&&t.availableHeight)}return n}function rA(e){const t=tA(e),n=Rr(t.filter(c=>c.box.fullSize),!0),i=Rr(Mr(t,"left"),!0),r=Rr(Mr(t,"right")),o=Rr(Mr(t,"top"),!0),s=Rr(Mr(t,"bottom")),a=jh(t,"x"),l=jh(t,"y");return{fullSize:n,leftAndTop:i.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:Mr(t,"chartArea"),vertical:i.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}function Gh(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function Mb(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function oA(e,t,n,i){const{pos:r,box:o}=n,s=e.maxPadding;if(!be(r)){n.size&&(e[r]-=n.size);const d=i[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[r]+=n.size}o.getPadding&&Mb(s,o.getPadding());const a=Math.max(0,t.outerWidth-Gh(s,e,"left","right")),l=Math.max(0,t.outerHeight-Gh(s,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function sA(e){const t=e.maxPadding;function n(i){const r=Math.max(t[i]-e[i],0);return e[i]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function aA(e,t){const n=t.maxPadding;function i(r){const o={left:0,top:0,right:0,bottom:0};return r.forEach(s=>{o[s]=Math.max(t[s],n[s])}),o}return i(e?["left","right"]:["top","bottom"])}function Vr(e,t,n,i){const r=[];let o,s,a,l,c,u;for(o=0,s=e.length,c=0;o<s;++o){a=e[o],l=a.box,l.update(a.width||t.w,a.height||t.h,aA(a.horizontal,t));const{same:d,other:f}=oA(t,n,a,i);c|=d&&r.length,u=u||f,l.fullSize||r.push(a)}return c&&Vr(r,t,n,i)||u}function ss(e,t,n,i,r){e.top=n,e.left=t,e.right=t+i,e.bottom=n+r,e.width=i,e.height=r}function zh(e,t,n,i){const r=n.padding;let{x:o,y:s}=t;for(const a of e){const l=a.box,c=i[a.stack]||{placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const d=t.w*u,f=c.size||l.height;vo(c.start)&&(s=c.start),l.fullSize?ss(l,r.left,s,n.outerWidth-r.right-r.left,f):ss(l,t.left+c.placed,s,d,f),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,f=c.size||l.width;vo(c.start)&&(o=c.start),l.fullSize?ss(l,o,r.top,f,n.outerHeight-r.bottom-r.top):ss(l,o,t.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=s}var pt={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,i){if(!e)return;const r=ot(e.options.layout.padding),o=Math.max(t-r.width,0),s=Math.max(n-r.height,0),a=rA(e.boxes),l=a.vertical,c=a.horizontal;Me(e.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const u=l.reduce((p,m)=>m.box.options&&m.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/u,hBoxMaxHeight:s/2}),f=Object.assign({},r);Mb(f,ot(i));const h=Object.assign({maxPadding:f,w:o,h:s,x:r.left,y:r.top},r),g=iA(l.concat(c),d);Vr(a.fullSize,h,d,g),Vr(l,h,d,g),Vr(c,h,d,g)&&Vr(l,h,d,g),sA(h),zh(a.leftAndTop,h,d,g),h.x+=h.w,h.y+=h.h,zh(a.rightAndBottom,h,d,g),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Me(a.chartArea,p=>{const m=p.box;Object.assign(m,e.chartArea),m.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class Rb{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,r){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,r?Math.floor(n/r):i)}}isAttached(t){return!0}updateConfig(t){}}class lA extends Rb{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const js="$chartjs",cA={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Hh=e=>e===null||e==="";function uA(e,t){const n=e.style,i=e.getAttribute("height"),r=e.getAttribute("width");if(e[js]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Hh(r)){const o=Ah(e,"width");o!==void 0&&(e.width=o)}if(Hh(i))if(e.style.height==="")e.height=e.width/(t||2);else{const o=Ah(e,"height");o!==void 0&&(e.height=o)}return e}const Pb=d3?{passive:!0}:!1;function dA(e,t,n){e&&e.addEventListener(t,n,Pb)}function fA(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Pb)}function hA(e,t){const n=cA[e.type]||e.type,{x:i,y:r}=gi(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:r!==void 0?r:null}}function xa(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function gA(e,t,n){const i=e.canvas,r=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||xa(a.addedNodes,i),s=s&&!xa(a.removedNodes,i);s&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function pA(e,t,n){const i=e.canvas,r=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||xa(a.removedNodes,i),s=s&&!xa(a.addedNodes,i);s&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const Co=new Map;let Wh=0;function kb(){const e=window.devicePixelRatio;e!==Wh&&(Wh=e,Co.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function mA(e,t){Co.size||window.addEventListener("resize",kb),Co.set(e,t)}function bA(e){Co.delete(e),Co.size||window.removeEventListener("resize",kb)}function vA(e,t,n){const i=e.canvas,r=i&&ad(i);if(!r)return;const o=sb((a,l)=>{const c=r.clientWidth;n(a,l),c<r.clientWidth&&n()},window),s=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return s.observe(r),mA(e,o),s}function zl(e,t,n){n&&n.disconnect(),t==="resize"&&bA(e)}function xA(e,t,n){const i=e.canvas,r=sb(o=>{e.ctx!==null&&n(hA(o,e))},e);return dA(i,t,r),r}class yA extends Rb{acquireContext(t,n){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(uA(t,n),i):null}releaseContext(t){const n=t.canvas;if(!n[js])return!1;const i=n[js].initial;["height","width"].forEach(o=>{const s=i[o];he(s)?n.removeAttribute(o):n.setAttribute(o,s)});const r=i.style||{};return Object.keys(r).forEach(o=>{n.style[o]=r[o]}),n.width=n.width,delete n[js],!0}addEventListener(t,n,i){this.removeEventListener(t,n);const r=t.$proxies||(t.$proxies={}),s={attach:gA,detach:pA,resize:vA}[n]||xA;r[n]=s(t,n,i)}removeEventListener(t,n){const i=t.$proxies||(t.$proxies={}),r=i[n];if(!r)return;({attach:zl,detach:zl,resize:zl}[n]||fA)(t,n,r),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,r){return u3(t,n,i,r)}isAttached(t){const n=t&&ad(t);return!!(n&&n.isConnected)}}function CA(e){return!sd()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?lA:yA}var As;let vn=(As=class{constructor(){W(this,"x");W(this,"y");W(this,"active",!1);W(this,"options");W(this,"$animations")}tooltipPosition(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return sr(this.x)&&sr(this.y)}getProps(t,n){const i=this.$animations;if(!n||!i)return this;const r={};return t.forEach(o=>{r[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),r}},W(As,"defaults",{}),W(As,"defaultRoutes"),As);function wA(e,t){const n=e.options.ticks,i=SA(e),r=Math.min(n.maxTicksLimit||i,i),o=n.major.enabled?_A(t):[],s=o.length,a=o[0],l=o[s-1],c=[];if(s>r)return EA(t,c,o,s/r),c;const u=IA(o,t,r);if(s>0){let d,f;const h=s>1?Math.round((l-a)/(s-1)):null;for(as(t,c,u,he(h)?0:a-h,a),d=0,f=s-1;d<f;d++)as(t,c,u,o[d],o[d+1]);return as(t,c,u,l,he(h)?t.length:l+h),c}return as(t,c,u),c}function SA(e){const t=e.options.offset,n=e._tickSize(),i=e._length/n+(t?0:1),r=e._maxLength/n;return Math.floor(Math.min(i,r))}function IA(e,t,n){const i=AA(e),r=t.length/n;if(!i)return Math.max(r,1);const o=hE(i);for(let s=0,a=o.length-1;s<a;s++){const l=o[s];if(l>r)return l}return Math.max(r,1)}function _A(e){const t=[];let n,i;for(n=0,i=e.length;n<i;n++)e[n].major&&t.push(n);return t}function EA(e,t,n,i){let r=0,o=n[0],s;for(i=Math.ceil(i),s=0;s<e.length;s++)s===o&&(t.push(e[s]),r++,o=n[r*i])}function as(e,t,n,i,r){const o=ae(i,0),s=Math.min(ae(r,e.length),e.length);let a=0,l,c,u;for(n=Math.ceil(n),r&&(l=r-i,n=l/Math.floor(l/n)),u=o;u<0;)a++,u=Math.round(o+a*n);for(c=Math.max(o,0);c<s;c++)c===u&&(t.push(e[c]),a++,u=Math.round(o+a*n))}function AA(e){const t=e.length;let n,i;if(t<2)return!1;for(i=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==i)return!1;return i}const MA=e=>e==="left"?"right":e==="right"?"left":e,Xh=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Yh=(e,t)=>Math.min(t||e,e);function Zh(e,t){const n=[],i=e.length/t,r=e.length;let o=0;for(;o<r;o+=i)n.push(e[Math.floor(o)]);return n}function RA(e,t,n){const i=e.ticks.length,r=Math.min(t,i-1),o=e._startPixel,s=e._endPixel,a=1e-6;let l=e.getPixelForTick(r),c;if(!(n&&(i===1?c=Math.max(l-o,s-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(r-1))/2,l+=r<t?c:-c,l<o-a||l>s+a)))return l}function PA(e,t){Me(e,n=>{const i=n.gc,r=i.length/2;let o;if(r>t){for(o=0;o<r;++o)delete n.data[i[o]];i.splice(0,r)}})}function Pr(e){return e.drawTicks?e.tickLength:0}function Jh(e,t){if(!e.display)return 0;const n=Ue(e.font,t),i=ot(e.padding);return(Ve(e.text)?e.text.length:1)*n.lineHeight+i.height}function kA(e,t){return si(e,{scale:t,type:"scale"})}function FA(e,t,n){return si(e,{tick:n,index:t,type:"tick"})}function OA(e,t,n){let i=ed(e);return(n&&t!=="right"||!n&&t==="right")&&(i=MA(i)),i}function TA(e,t,n,i){const{top:r,left:o,bottom:s,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,h,g;const p=s-r,m=a-o;if(e.isHorizontal()){if(h=ut(i,o,a),be(n)){const b=Object.keys(n)[0],y=n[b];g=u[b].getPixelForValue(y)+p-t}else n==="center"?g=(c.bottom+c.top)/2+p-t:g=Xh(e,n,t);f=a-o}else{if(be(n)){const b=Object.keys(n)[0],y=n[b];h=u[b].getPixelForValue(y)-m+t}else n==="center"?h=(c.left+c.right)/2-m+t:h=Xh(e,n,t);g=ut(i,s,r),d=n==="left"?-Xe:Xe}return{titleX:h,titleY:g,maxWidth:f,rotation:d}}class ai extends vn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:i,_suggestedMax:r}=this;return t=At(t,Number.POSITIVE_INFINITY),n=At(n,Number.NEGATIVE_INFINITY),i=At(i,Number.POSITIVE_INFINITY),r=At(r,Number.NEGATIVE_INFINITY),{min:At(t,i),max:At(n,r),minDefined:He(t),maxDefined:He(n)}}getMinMax(t){let{min:n,max:i,minDefined:r,maxDefined:o}=this.getUserBounds(),s;if(r&&o)return{min:n,max:i};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)s=a[l].controller.getMinMax(this,t),r||(n=Math.min(n,s.min)),o||(i=Math.max(i,s.max));return n=o&&n>i?i:n,i=r&&n>i?n:i,{min:At(n,At(i,n)),max:At(i,At(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Fe(this.options.beforeUpdate,[this])}update(t,n,i){const{beginAtZero:r,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=GE(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Zh(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=wA(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,t=!t),this._startPixel=n,this._endPixel=i,this._reversePixels=t,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Fe(this.options.afterUpdate,[this])}beforeSetDimensions(){Fe(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Fe(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Fe(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Fe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let i,r,o;for(i=0,r=t.length;i<r;i++)o=t[i],o.label=Fe(n.callback,[o.value,i,t],this)}afterTickToLabelConversion(){Fe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Fe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,i=Yh(this.ticks.length,t.ticks.maxTicksLimit),r=n.minRotation||0,o=n.maxRotation;let s=r,a,l,c;if(!this._isVisible()||!n.display||r>=o||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,h=qe(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/i:h/(i-1),d+6>a&&(a=h/(i-(t.offset?.5:1)),l=this.maxHeight-Pr(t.grid)-n.padding-Jh(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),s=Ku(Math.min(Math.asin(qe((u.highest.height+6)/a,-1,1)),Math.asin(qe(l/c,-1,1))-Math.asin(qe(f/c,-1,1)))),s=Math.max(r,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){Fe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Fe(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:i,title:r,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const l=Jh(r,n.options.font);if(a?(t.width=this.maxWidth,t.height=Pr(o)+l):(t.height=this.maxHeight,t.width=Pr(o)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),h=i.padding*2,g=Ut(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(a){const b=i.mirror?0:m*d.width+p*f.height;t.height=Math.min(this.maxHeight,t.height+b+h)}else{const b=i.mirror?0:p*d.width+m*f.height;t.width=Math.min(this.maxWidth,t.width+b+h)}this._calculatePadding(c,u,m,p)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,i,r){const{ticks:{align:o,padding:s},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?c?(f=r*t.width,h=i*n.height):(f=i*t.height,h=r*n.width):o==="start"?h=n.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,h=n.width/2),this.paddingLeft=Math.max((f-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((h-d+s)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;o==="start"?(u=0,d=t.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Fe(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,i;for(n=0,i=t.length;n<i;n++)he(t[n].label)&&(t.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=Zh(i,n)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,i){const{ctx:r,_longestTextCache:o}=this,s=[],a=[],l=Math.floor(n/Yh(n,i));let c=0,u=0,d,f,h,g,p,m,b,y,x,I,C;for(d=0;d<n;d+=l){if(g=t[d].label,p=this._resolveTickFontOptions(d),r.font=m=p.string,b=o[m]=o[m]||{data:{},gc:[]},y=p.lineHeight,x=I=0,!he(g)&&!Ve(g))x=pa(r,b.data,b.gc,x,g),I=y;else if(Ve(g))for(f=0,h=g.length;f<h;++f)C=g[f],!he(C)&&!Ve(C)&&(x=pa(r,b.data,b.gc,x,C),I+=y);s.push(x),a.push(I),c=Math.max(x,c),u=Math.max(I,u)}PA(o,n);const M=s.indexOf(c),R=a.indexOf(u),w=_=>({width:s[_]||0,height:a[_]||0});return{first:w(0),last:w(n-1),widest:w(M),highest:w(R),widths:s,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return bE(this._alignToPixels?di(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const i=n[t];return i.$context||(i.$context=FA(this.getContext(),t,i))}return this.$context||(this.$context=kA(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Ut(this.labelRotation),i=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),o=this._getLabelSizes(),s=t.autoSkipPadding||0,a=o?o.widest.width+s:0,l=o?o.highest.height+s:0;return this.isHorizontal()?l*i>a*r?a/i:l/r:l*r<a*i?l/i:a/r}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,i=this.chart,r=this.options,{grid:o,position:s,border:a}=r,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Pr(o),h=[],g=a.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,b=function(O){return di(i,O,p)};let y,x,I,C,M,R,w,_,A,k,D,B;if(s==="top")y=b(this.bottom),R=this.bottom-f,_=y-m,k=b(t.top)+m,B=t.bottom;else if(s==="bottom")y=b(this.top),k=t.top,B=b(t.bottom)-m,R=y+m,_=this.top+f;else if(s==="left")y=b(this.right),M=this.right-f,w=y-m,A=b(t.left)+m,D=t.right;else if(s==="right")y=b(this.left),A=t.left,D=b(t.right)-m,M=y+m,w=this.left+f;else if(n==="x"){if(s==="center")y=b((t.top+t.bottom)/2+.5);else if(be(s)){const O=Object.keys(s)[0],T=s[O];y=b(this.chart.scales[O].getPixelForValue(T))}k=t.top,B=t.bottom,R=y+m,_=R+f}else if(n==="y"){if(s==="center")y=b((t.left+t.right)/2);else if(be(s)){const O=Object.keys(s)[0],T=s[O];y=b(this.chart.scales[O].getPixelForValue(T))}M=y-m,w=M-f,A=t.left,D=t.right}const N=ae(r.ticks.maxTicksLimit,d),P=Math.max(1,Math.ceil(d/N));for(x=0;x<d;x+=P){const O=this.getContext(x),T=o.setContext(O),E=a.setContext(O),F=T.lineWidth,V=T.color,j=E.dash||[],G=E.dashOffset,$=T.tickWidth,Y=T.tickColor,U=T.tickBorderDash||[],re=T.tickBorderDashOffset;I=RA(this,x,l),I!==void 0&&(C=di(i,I,F),c?M=w=A=D=C:R=_=k=B=C,h.push({tx1:M,ty1:R,tx2:w,ty2:_,x1:A,y1:k,x2:D,y2:B,width:F,color:V,borderDash:j,borderDashOffset:G,tickWidth:$,tickColor:Y,tickBorderDash:U,tickBorderDashOffset:re}))}return this._ticksLength=d,this._borderValue=y,h}_computeLabelItems(t){const n=this.axis,i=this.options,{position:r,ticks:o}=i,s=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=o,f=Pr(i.grid),h=f+u,g=d?-u:h,p=-Ut(this.labelRotation),m=[];let b,y,x,I,C,M,R,w,_,A,k,D,B="middle";if(r==="top")M=this.bottom-g,R=this._getXAxisLabelAlignment();else if(r==="bottom")M=this.top+g,R=this._getXAxisLabelAlignment();else if(r==="left"){const P=this._getYAxisLabelAlignment(f);R=P.textAlign,C=P.x}else if(r==="right"){const P=this._getYAxisLabelAlignment(f);R=P.textAlign,C=P.x}else if(n==="x"){if(r==="center")M=(t.top+t.bottom)/2+h;else if(be(r)){const P=Object.keys(r)[0],O=r[P];M=this.chart.scales[P].getPixelForValue(O)+h}R=this._getXAxisLabelAlignment()}else if(n==="y"){if(r==="center")C=(t.left+t.right)/2-h;else if(be(r)){const P=Object.keys(r)[0],O=r[P];C=this.chart.scales[P].getPixelForValue(O)}R=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?B="top":l==="end"&&(B="bottom"));const N=this._getLabelSizes();for(b=0,y=a.length;b<y;++b){x=a[b],I=x.label;const P=o.setContext(this.getContext(b));w=this.getPixelForTick(b)+o.labelOffset,_=this._resolveTickFontOptions(b),A=_.lineHeight,k=Ve(I)?I.length:1;const O=k/2,T=P.color,E=P.textStrokeColor,F=P.textStrokeWidth;let V=R;s?(C=w,R==="inner"&&(b===y-1?V=this.options.reverse?"left":"right":b===0?V=this.options.reverse?"right":"left":V="center"),r==="top"?c==="near"||p!==0?D=-k*A+A/2:c==="center"?D=-N.highest.height/2-O*A+A:D=-N.highest.height+A/2:c==="near"||p!==0?D=A/2:c==="center"?D=N.highest.height/2-O*A:D=N.highest.height-k*A,d&&(D*=-1),p!==0&&!P.showLabelBackdrop&&(C+=A/2*Math.sin(p))):(M=w,D=(1-k)*A/2);let j;if(P.showLabelBackdrop){const G=ot(P.backdropPadding),$=N.heights[b],Y=N.widths[b];let U=D-G.top,re=0-G.left;switch(B){case"middle":U-=$/2;break;case"bottom":U-=$;break}switch(R){case"center":re-=Y/2;break;case"right":re-=Y;break;case"inner":b===y-1?re-=Y:b>0&&(re-=Y/2);break}j={left:re,top:U,width:Y+G.width,height:$+G.height,color:P.backdropColor}}m.push({label:I,font:_,textOffset:D,options:{rotation:p,color:T,strokeColor:E,strokeWidth:F,textAlign:V,textBaseline:B,translation:[C,M],backdrop:j}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Ut(this.labelRotation))return t==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:i,mirror:r,padding:o}}=this.options,s=this._getLabelSizes(),a=t+o,l=s.widest.width;let c,u;return n==="left"?r?(u=this.right+o,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?r?(u=this.left+o,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:i,top:r,width:o,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,r,o,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const r=this.ticks.findIndex(o=>o.value===t);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const n=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(n.display)for(o=0,s=r.length;o<s;++o){const l=r[o];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:i,grid:r}}=this,o=i.setContext(this.getContext()),s=i.display?o.width:0;if(!s)return;const a=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=di(t,this.left,s)-s/2,u=di(t,this.right,a)+a/2,d=f=l):(d=di(t,this.top,s)-s/2,f=di(t,this.bottom,a)+a/2,c=u=l),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&Ii(i,r);const o=this.getLabelItems(t);for(const s of o){const a=s.options,l=s.font,c=s.label,u=s.textOffset;Ni(i,c,0,u,l,a)}r&&_i(i)}drawTitle(){const{ctx:t,options:{position:n,title:i,reverse:r}}=this;if(!i.display)return;const o=Ue(i.font),s=ot(i.padding),a=i.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||be(n)?(l+=s.bottom,Ve(i.text)&&(l+=o.lineHeight*(i.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=TA(this,l,n,a);Ni(t,i.text,0,0,o,{color:i.color,maxWidth:d,rotation:f,textAlign:OA(a,n,r),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,i=ae(t.grid&&t.grid.z,-1),r=ae(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==ai.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let o,s;for(o=0,s=n.length;o<s;++o){const a=n[o];a[i]===this.id&&(!t||a.type===t)&&r.push(a)}return r}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Ue(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ls{constructor(t,n,i){this.type=t,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let i;LA(n)&&(i=this.register(n));const r=this.items,o=t.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in r||(r[o]=t,DA(t,s,i),this.override&&$e.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const n=this.items,i=t.id,r=this.scope;i in n&&delete n[i],r&&i in $e[r]&&(delete $e[r][i],this.override&&delete Di[i])}}function DA(e,t,n){const i=et(Object.create(null),[n?$e.get(n):{},$e.get(t),e.defaults]);$e.set(t,i),e.defaultRoutes&&NA(t,e.defaultRoutes),e.descriptors&&$e.describe(t,e.descriptors)}function NA(e,t){Object.keys(t).forEach(n=>{const i=n.split("."),r=i.pop(),o=[e].concat(i).join("."),s=t[n].split("."),a=s.pop(),l=s.join(".");$e.route(o,r,l,a)})}function LA(e){return"id"in e&&"defaults"in e}class VA{constructor(){this.controllers=new ls(jt,"datasets",!0),this.elements=new ls(vn,"elements"),this.plugins=new ls(Object,"plugins"),this.scales=new ls(ai,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,i){[...n].forEach(r=>{const o=i||this._getRegistryForType(r);i||o.isForType(r)||o===this.plugins&&r.id?this._exec(t,o,r):Me(r,s=>{const a=i||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,n,i){const r=Qu(t);Fe(i["before"+r],[],i),n[t](i),Fe(i["after"+r],[],i)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(t))return i}return this.plugins}_get(t,n,i){const r=n.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return r}}var yt=new VA;class BA{constructor(){this._init=void 0}notify(t,n,i,r){if(n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const o=r?this._descriptors(t).filter(r):this._descriptors(t),s=this._notify(o,t,n,i);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),s}_notify(t,n,i,r){r=r||{};for(const o of t){const s=o.plugin,a=s[i],l=[n,r,o.options];if(Fe(a,l,s)===!1&&r.cancelable)return!1}return!0}invalidate(){he(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const i=t&&t.config,r=ae(i.options&&i.options.plugins,{}),o=$A(i);return r===!1&&!n?[]:GA(t,o,r,n)}_notifyStateChanges(t){const n=this._oldCache||[],i=this._cache,r=(o,s)=>o.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(r(n,i),t,"stop"),this._notify(r(i,n),t,"start")}}function $A(e){const t={},n=[],i=Object.keys(yt.plugins.items);for(let o=0;o<i.length;o++)n.push(yt.getPlugin(i[o]));const r=e.plugins||[];for(let o=0;o<r.length;o++){const s=r[o];n.indexOf(s)===-1&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}function jA(e,t){return!t&&e===!1?null:e===!0?{}:e}function GA(e,{plugins:t,localIds:n},i,r){const o=[],s=e.getContext();for(const a of t){const l=a.id,c=jA(i[l],r);c!==null&&o.push({plugin:a,options:zA(e.config,{plugin:a,local:n[l]},c,s)})}return o}function zA(e,{plugin:t,local:n},i,r){const o=e.pluginScopeKeys(t),s=e.getOptionScopes(i,o);return n&&t.defaults&&s.push(t.defaults),e.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Nc(e,t){const n=$e.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function HA(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function WA(e,t){return e===t?"_index_":"_value_"}function Uh(e){if(e==="x"||e==="y"||e==="r")return e}function XA(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Lc(e,...t){if(Uh(e))return e;for(const n of t){const i=n.axis||XA(n.position)||e.length>1&&Uh(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Qh(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function YA(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return Qh(e,"x",n[0])||Qh(e,"y",n[0])}return{}}function ZA(e,t){const n=Di[e.type]||{scales:{}},i=t.scales||{},r=Nc(e.type,t),o=Object.create(null);return Object.keys(i).forEach(s=>{const a=i[s];if(!be(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=Lc(s,a,YA(s,e),$e.scales[a.type]),c=WA(l,r),u=n.scales||{};o[s]=Jr(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(s=>{const a=s.type||e.type,l=s.indexAxis||Nc(a,t),u=(Di[a]||{}).scales||{};Object.keys(u).forEach(d=>{const f=HA(d,l),h=s[f+"AxisID"]||f;o[h]=o[h]||Object.create(null),Jr(o[h],[{axis:f},i[h],u[d]])})}),Object.keys(o).forEach(s=>{const a=o[s];Jr(a,[$e.scales[a.type],$e.scale])}),o}function Fb(e){const t=e.options||(e.options={});t.plugins=ae(t.plugins,{}),t.scales=ZA(e,t)}function Ob(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function JA(e){return e=e||{},e.data=Ob(e.data),Fb(e),e}const Kh=new Map,Tb=new Set;function cs(e,t){let n=Kh.get(e);return n||(n=t(),Kh.set(e,n),Tb.add(n)),n}const kr=(e,t,n)=>{const i=ti(t,n);i!==void 0&&e.add(i)};class UA{constructor(t){this._config=JA(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Ob(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Fb(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return cs(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return cs(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return cs(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,i=this.type;return cs(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const i=this._scopeCache;let r=i.get(t);return(!r||n)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,n,i){const{options:r,type:o}=this,s=this._cachedScopes(t,i),a=s.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>kr(l,t,d))),u.forEach(d=>kr(l,r,d)),u.forEach(d=>kr(l,Di[o]||{},d)),u.forEach(d=>kr(l,$e,d)),u.forEach(d=>kr(l,Dc,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Tb.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Di[n]||{},$e.datasets[n]||{},{type:n},$e,Dc]}resolveNamedOptions(t,n,i,r=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=qh(this._resolverCache,t,r);let l=s;if(KA(s,n)){o.$shared=!1,i=ni(i)?i():i;const c=this.createResolver(t,i,a);l=ar(s,i,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,i=[""],r){const{resolver:o}=qh(this._resolverCache,t,i);return be(n)?ar(o,n,void 0,r):o}}function qh(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));const r=n.join();let o=i.get(r);return o||(o={resolver:id(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(r,o)),o}const QA=e=>be(e)&&Object.getOwnPropertyNames(e).some(t=>ni(e[t]));function KA(e,t){const{isScriptable:n,isIndexable:i}=fb(e);for(const r of t){const o=n(r),s=i(r),a=(s||o)&&e[r];if(o&&(ni(a)||QA(a))||s&&Ve(a))return!0}return!1}var qA="4.5.1";const eM=["top","bottom","left","right","chartArea"];function eg(e,t){return e==="top"||e==="bottom"||eM.indexOf(e)===-1&&t==="x"}function tg(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function ng(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Fe(n&&n.onComplete,[e],t)}function tM(e){const t=e.chart,n=t.options.animation;Fe(n&&n.onProgress,[e],t)}function Db(e){return sd()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Gs={},ig=e=>{const t=Db(e);return Object.values(Gs).filter(n=>n.canvas===t).pop()};function nM(e,t,n){const i=Object.keys(e);for(const r of i){const o=+r;if(o>=t){const s=e[r];delete e[r],(n>0||o>t)&&(e[o+n]=s)}}}function iM(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}var Hn;let tt=(Hn=class{static register(...t){yt.add(...t),rg()}static unregister(...t){yt.remove(...t),rg()}constructor(t,n){const i=this.config=new UA(n),r=Db(t),o=ig(r);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||CA(r)),this.platform.updateConfig(i);const a=this.platform.acquireContext(r,s.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=rE(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new BA,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=CE(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],Gs[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}wn.listen(this,"complete",ng),wn.listen(this,"progress",tM),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:r,_aspectRatio:o}=this;return he(t)?n&&o?o:r?i/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return yt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Eh(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Sh(this.canvas,this.ctx),this}stop(){return wn.stop(this),this}resize(t,n){wn.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const i=this.options,r=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,t,n,o),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Eh(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),Fe(i.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Me(n,(i,r)=>{i.id=r})}buildOrUpdateScales(){const t=this.options,n=t.scales,i=this.scales,r=Object.keys(i).reduce((s,a)=>(s[a]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const a=n[s],l=Lc(s,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Me(o,s=>{const a=s.options,l=a.id,c=Lc(l,a),u=ae(a.type,s.dtype);(a.position===void 0||eg(a.position,c)!==eg(s.dposition))&&(a.position=s.dposition),r[l]=!0;let d=null;if(l in i&&i[l].type===u)d=i[l];else{const f=yt.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(a,t)}),Me(r,(s,a)=>{s||delete i[a]}),Me(i,s=>{pt.configure(this,s,s.options),pt.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((r,o)=>r.index-o.index),i>n){for(let r=n;r<i;++r)this._destroyDatasetMeta(r);t.splice(n,i-n)}this._sortedMetasets=t.slice(0).sort(tg("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((i,r)=>{n.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=n.length;i<r;i++){const o=n[i];let s=this.getDatasetMeta(i);const a=o.type||this.config.type;if(s.type&&s.type!==a&&(this._destroyDatasetMeta(i),s=this.getDatasetMeta(i)),s.type=a,s.indexAxis=o.indexAxis||Nc(a,this.options),s.order=o.order||0,s.index=i,s.label=""+o.label,s.visible=this.isDatasetVisible(i),s.controller)s.controller.updateIndex(i),s.controller.linkScales();else{const l=yt.getController(a),{datasetElementType:c,dataElementType:u}=$e.datasets[a];Object.assign(l,{dataElementType:yt.getElement(u),datasetElementType:c&&yt.getElement(c)}),s.controller=new l(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){Me(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!r&&o.indexOf(d)===-1;d.buildOrUpdateElements(f),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),r||Me(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(tg("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Me(this.scales,t=>{pt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!gh(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:o}of n){const s=i==="_removeElements"?-o:o;nM(t,r,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),r=i(0);for(let o=1;o<n;o++)if(!gh(r,i(o)))return;return Array.from(r).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;pt.update(this,this.width,this.height,t);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],Me(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,o)=>{r._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,ni(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const i=this.getDatasetMeta(t),r={meta:i,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(n),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(wn.has(this)?this.attached&&!wn.running(this)&&wn.start(this):(this.draw(),ng({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:r}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,r)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,i=[];let r,o;for(r=0,o=n.length;r<o;++r){const s=n[r];(!t||s.visible)&&i.push(s)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,i={meta:t,index:t.index,cancelable:!0},r=Sb(this,t);this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(r&&Ii(n,r),t.controller.draw(),r&&_i(n),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return kn(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,r){const o=eA.modes[n];return typeof o=="function"?o(this,t,i,r):[]}getDatasetMeta(t){const n=this.data.datasets[t],i=this._metasets;let r=i.filter(o=>o&&o._dataset===n).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=si(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){const i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){const r=i?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,r);vo(n)?(o.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(o,{visible:i}),this.update(a=>a.datasetIndex===t?r:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),wn.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Sh(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Gs[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,i=(o,s)=>{n.addEventListener(this,o,s),t[o]=s},r=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};Me(this.options.events,o=>i(o,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,i=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},r=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const a=()=>{r("attach",a),this.attached=!0,this.resize(),i("resize",o),i("detach",s)};s=()=>{this.attached=!1,r("resize",o),this._stop(),this._resize(0,0),i("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){Me(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Me(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){const r=i?"set":"remove";let o,s,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+r+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){s=t[a];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[r+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],i=t.map(({datasetIndex:o,index:s})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!fa(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,i){const r=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=o(n,t),a=i?t:o(t,n);s.length&&this.updateHoverStyle(s,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(t,n){const i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},r=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,r)===!1)return;const o=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(o||i.changed)&&this.render(),this}_handleEvent(t,n,i){const{_active:r=[],options:o}=this,s=n,a=this._getActiveElements(t,r,i,s),l=uE(t),c=iM(t,this._lastEvent,i,l);i&&(this._lastEvent=null,Fe(o.onHover,[t,a,this],this),l&&Fe(o.onClick,[t,a,this],this));const u=!fa(a,r);return(u||n)&&(this._active=a,this._updateHoverStyles(a,r,n)),this._lastEvent=c,u}_getActiveElements(t,n,i,r){if(t.type==="mouseout")return[];if(!i)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,r)}},W(Hn,"defaults",$e),W(Hn,"instances",Gs),W(Hn,"overrides",Di),W(Hn,"registry",yt),W(Hn,"version",qA),W(Hn,"getChart",ig),Hn);function rg(){return Me(tt.instances,e=>e._plugins.invalidate())}function rM(e,t,n){const{startAngle:i,x:r,y:o,outerRadius:s,innerRadius:a,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,d=Math.min(c/s,ft(i-n));if(e.beginPath(),e.arc(r,o,s-c/2,i+d/2,n-d/2),a>0){const f=Math.min(c/a,ft(i-n));e.arc(r,o,a+c/2,n-f/2,i+f/2,!0)}else{const f=Math.min(c/2,s*ft(i-n));if(u==="round")e.arc(r,o,f,n-we/2,i+we/2,!0);else if(u==="bevel"){const h=2*f*f,g=-h*Math.cos(n+we/2)+r,p=-h*Math.sin(n+we/2)+o,m=h*Math.cos(i+we/2)+r,b=h*Math.sin(i+we/2)+o;e.lineTo(g,p),e.lineTo(m,b)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function oM(e,t,n){const{startAngle:i,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=t;let c=r/a;e.beginPath(),e.arc(o,s,a,i-c,n+c),l>r?(c=r/l,e.arc(o,s,l,n+c,i-c,!0)):e.arc(o,s,r,n+Xe,i-Xe),e.closePath(),e.clip()}function sM(e){return nd(e,["outerStart","outerEnd","innerStart","innerEnd"])}function aM(e,t,n,i){const r=sM(e.options.borderRadius),o=(n-t)/2,s=Math.min(o,i*t/2),a=l=>{const c=(n-Math.min(o,l))*i/2;return qe(l,0,Math.min(o,c))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:qe(r.innerStart,0,s),innerEnd:qe(r.innerEnd,0,s)}}function Yi(e,t,n,i){return{x:n+e*Math.cos(t),y:i+e*Math.sin(t)}}function ya(e,t,n,i,r,o){const{x:s,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+i+n-c,0),f=u>0?u+i+n+c:0;let h=0;const g=r-l;if(i){const P=u>0?u-i:0,O=d>0?d-i:0,T=(P+O)/2,E=T!==0?g*T/(T+i):g;h=(g-E)/2}const p=Math.max(.001,g*d-n/we)/d,m=(g-p)/2,b=l+m+h,y=r-m-h,{outerStart:x,outerEnd:I,innerStart:C,innerEnd:M}=aM(t,f,d,y-b),R=d-x,w=d-I,_=b+x/R,A=y-I/w,k=f+C,D=f+M,B=b+C/k,N=y-M/D;if(e.beginPath(),o){const P=(_+A)/2;if(e.arc(s,a,d,_,P),e.arc(s,a,d,P,A),I>0){const F=Yi(w,A,s,a);e.arc(F.x,F.y,I,A,y+Xe)}const O=Yi(D,y,s,a);if(e.lineTo(O.x,O.y),M>0){const F=Yi(D,N,s,a);e.arc(F.x,F.y,M,y+Xe,N+Math.PI)}const T=(y-M/f+(b+C/f))/2;if(e.arc(s,a,f,y-M/f,T,!0),e.arc(s,a,f,T,b+C/f,!0),C>0){const F=Yi(k,B,s,a);e.arc(F.x,F.y,C,B+Math.PI,b-Xe)}const E=Yi(R,b,s,a);if(e.lineTo(E.x,E.y),x>0){const F=Yi(R,_,s,a);e.arc(F.x,F.y,x,b-Xe,_)}}else{e.moveTo(s,a);const P=Math.cos(_)*d+s,O=Math.sin(_)*d+a;e.lineTo(P,O);const T=Math.cos(A)*d+s,E=Math.sin(A)*d+a;e.lineTo(T,E)}e.closePath()}function lM(e,t,n,i,r){const{fullCircles:o,startAngle:s,circumference:a}=t;let l=t.endAngle;if(o){ya(e,t,n,i,l,r);for(let c=0;c<o;++c)e.fill();isNaN(a)||(l=s+(a%Be||Be))}return ya(e,t,n,i,l,r),e.fill(),l}function cM(e,t,n,i,r){const{fullCircles:o,startAngle:s,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f,borderRadius:h}=l,g=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=f,g?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let p=t.endAngle;if(o){ya(e,t,n,i,p,r);for(let m=0;m<o;++m)e.stroke();isNaN(a)||(p=s+(a%Be||Be))}g&&oM(e,t,p),l.selfJoin&&p-s>=we&&h===0&&u!=="miter"&&rM(e,t,p),o||(ya(e,t,n,i,p,r),e.stroke())}class Fn extends vn{constructor(n){super();W(this,"circumference");W(this,"endAngle");W(this,"fullCircles");W(this,"innerRadius");W(this,"outerRadius");W(this,"pixelMargin");W(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,i,r){const o=this.getProps(["x","y"],r),{angle:s,distance:a}=nb(o,{x:n,y:i}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),h=(this.options.spacing+this.options.borderWidth)/2,g=ae(f,c-l),p=xo(s,l,c)&&l!==c,m=g>=Be||p,b=Rn(a,u+h,d+h);return m&&b}getCenterPoint(n){const{x:i,y:r,startAngle:o,endAngle:s,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,d=(o+s)/2,f=(a+l+u+c)/2;return{x:i+Math.cos(d)*f,y:r+Math.sin(d)*f}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:i,circumference:r}=this,o=(i.offset||0)/4,s=(i.spacing||0)/2,a=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=r>Be?Math.floor(r/Be):0,r===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*o,Math.sin(l)*o);const c=1-Math.sin(Math.min(we,r||0)),u=o*c;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,lM(n,this,u,s,a),cM(n,this,u,s,a),n.restore()}}W(Fn,"id","arc"),W(Fn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),W(Fn,"defaultRoutes",{backgroundColor:"backgroundColor"}),W(Fn,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function Nb(e,t,n=t){e.lineCap=ae(n.borderCapStyle,t.borderCapStyle),e.setLineDash(ae(n.borderDash,t.borderDash)),e.lineDashOffset=ae(n.borderDashOffset,t.borderDashOffset),e.lineJoin=ae(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=ae(n.borderWidth,t.borderWidth),e.strokeStyle=ae(n.borderColor,t.borderColor)}function uM(e,t,n){e.lineTo(n.x,n.y)}function dM(e){return e.stepped?OE:e.tension||e.cubicInterpolationMode==="monotone"?TE:uM}function Lb(e,t,n={}){const i=e.length,{start:r=0,end:o=i-1}=n,{start:s,end:a}=t,l=Math.max(r,s),c=Math.min(o,a),u=r<s&&o<s||r>a&&o>a;return{count:i,start:l,loop:t.loop,ilen:c<l&&!u?i+c-l:c-l}}function fM(e,t,n,i){const{points:r,options:o}=t,{count:s,start:a,loop:l,ilen:c}=Lb(r,n,i),u=dM(o);let{move:d=!0,reverse:f}=i||{},h,g,p;for(h=0;h<=c;++h)g=r[(a+(f?c-h:h))%s],!g.skip&&(d?(e.moveTo(g.x,g.y),d=!1):u(e,p,g,f,o.stepped),p=g);return l&&(g=r[(a+(f?c:0))%s],u(e,p,g,f,o.stepped)),!!l}function hM(e,t,n,i){const r=t.points,{count:o,start:s,ilen:a}=Lb(r,n,i),{move:l=!0,reverse:c}=i||{};let u=0,d=0,f,h,g,p,m,b;const y=I=>(s+(c?a-I:I))%o,x=()=>{p!==m&&(e.lineTo(u,m),e.lineTo(u,p),e.lineTo(u,b))};for(l&&(h=r[y(0)],e.moveTo(h.x,h.y)),f=0;f<=a;++f){if(h=r[y(f)],h.skip)continue;const I=h.x,C=h.y,M=I|0;M===g?(C<p?p=C:C>m&&(m=C),u=(d*u+I)/++d):(x(),e.lineTo(I,C),g=M,d=0,p=m=C),b=C}x()}function Vc(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?hM:fM}function gM(e){return e.stepped?f3:e.tension||e.cubicInterpolationMode==="monotone"?h3:pi}function pM(e,t,n,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,n,i)&&r.closePath()),Nb(e,t.options),e.stroke(r)}function mM(e,t,n,i){const{segments:r,options:o}=t,s=Vc(t);for(const a of r)Nb(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+i-1})&&e.closePath(),e.stroke()}const bM=typeof Path2D=="function";function vM(e,t,n,i){bM&&!t.options.segment?pM(e,t,n,i):mM(e,t,n,i)}class On extends vn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;r3(this._points,i,t,r,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=x3(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){const i=this.options,r=t[n],o=this.points,s=wb(this,{property:n,start:r,end:r});if(!s.length)return;const a=[],l=gM(i);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:f}=s[c],h=o[d],g=o[f];if(h===g){a.push(h);continue}const p=Math.abs((r-h[n])/(g[n]-h[n])),m=l(h,g,p,i.stepped);m[n]=t[n],a.push(m)}return a.length===1?a[0]:a}pathSegment(t,n,i){return Vc(this)(t,this,n,i)}path(t,n,i){const r=this.segments,o=Vc(this);let s=this._loop;n=n||0,i=i||this.points.length-n;for(const a of r)s&=o(t,this,a,{start:n,end:n+i-1});return!!s}draw(t,n,i,r){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),vM(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}W(On,"id","line"),W(On,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),W(On,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),W(On,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function og(e,t,n,i){const r=e.options,{[n]:o}=e.getProps([n],i);return Math.abs(t-o)<r.radius+r.hitRadius}class Mi extends vn{constructor(n){super();W(this,"parsed");W(this,"skip");W(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,i,r){const o=this.options,{x:s,y:a}=this.getProps(["x","y"],r);return Math.pow(n-s,2)+Math.pow(i-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(n,i){return og(this,n,"x",i)}inYRange(n,i){return og(this,n,"y",i)}getCenterPoint(n){const{x:i,y:r}=this.getProps(["x","y"],n);return{x:i,y:r}}size(n){n=n||this.options||{};let i=n.radius||0;i=Math.max(i,i&&n.hoverRadius||0);const r=i&&n.borderWidth||0;return(i+r)*2}draw(n,i){const r=this.options;this.skip||r.radius<.1||!kn(this,i,this.size(r)/2)||(n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.fillStyle=r.backgroundColor,ma(n,r,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}W(Mi,"id","point"),W(Mi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),W(Mi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Vb(e,t){const{x:n,y:i,base:r,width:o,height:s}=e.getProps(["x","y","base","width","height"],t);let a,l,c,u,d;return e.horizontal?(d=s/2,a=Math.min(n,r),l=Math.max(n,r),c=i-d,u=i+d):(d=o/2,a=n-d,l=n+d,c=Math.min(i,r),u=Math.max(i,r)),{left:a,top:c,right:l,bottom:u}}function Un(e,t,n,i){return e?0:qe(t,n,i)}function xM(e,t,n){const i=e.options.borderWidth,r=e.borderSkipped,o=db(i);return{t:Un(r.top,o.top,0,n),r:Un(r.right,o.right,0,t),b:Un(r.bottom,o.bottom,0,n),l:Un(r.left,o.left,0,t)}}function yM(e,t,n){const{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),r=e.options.borderRadius,o=Ei(r),s=Math.min(t,n),a=e.borderSkipped,l=i||be(r);return{topLeft:Un(!l||a.top||a.left,o.topLeft,0,s),topRight:Un(!l||a.top||a.right,o.topRight,0,s),bottomLeft:Un(!l||a.bottom||a.left,o.bottomLeft,0,s),bottomRight:Un(!l||a.bottom||a.right,o.bottomRight,0,s)}}function CM(e){const t=Vb(e),n=t.right-t.left,i=t.bottom-t.top,r=xM(e,n/2,i/2),o=yM(e,n/2,i/2);return{outer:{x:t.left,y:t.top,w:n,h:i,radius:o},inner:{x:t.left+r.l,y:t.top+r.t,w:n-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,o.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(r.b,r.r))}}}}function Hl(e,t,n,i){const r=t===null,o=n===null,a=e&&!(r&&o)&&Vb(e,i);return a&&(r||Rn(t,a.left,a.right))&&(o||Rn(n,a.top,a.bottom))}function wM(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function SM(e,t){e.rect(t.x,t.y,t.w,t.h)}function Wl(e,t,n={}){const i=e.x!==n.x?-t:0,r=e.y!==n.y?-t:0,o=(e.x+e.w!==n.x+n.w?t:0)-i,s=(e.y+e.h!==n.y+n.h?t:0)-r;return{x:e.x+i,y:e.y+r,w:e.w+o,h:e.h+s,radius:e.radius}}class un extends vn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:i,backgroundColor:r}}=this,{inner:o,outer:s}=CM(this),a=wM(s.radius)?yo:SM;t.save(),(s.w!==o.w||s.h!==o.h)&&(t.beginPath(),a(t,Wl(s,n,o)),t.clip(),a(t,Wl(o,-n,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,Wl(o,n)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,n,i){return Hl(this,t,n,i)}inXRange(t,n){return Hl(this,t,null,n)}inYRange(t,n){return Hl(this,null,t,n)}getCenterPoint(t){const{x:n,y:i,base:r,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+r)/2:n,y:o?i:(i+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}W(un,"id","bar"),W(un,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),W(un,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var IM=Object.freeze({__proto__:null,ArcElement:Fn,BarElement:un,LineElement:On,PointElement:Mi});const Bc=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],sg=Bc.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function Bb(e){return Bc[e%Bc.length]}function $b(e){return sg[e%sg.length]}function _M(e,t){return e.borderColor=Bb(t),e.backgroundColor=$b(t),++t}function EM(e,t){return e.backgroundColor=e.data.map(()=>Bb(t++)),t}function AM(e,t){return e.backgroundColor=e.data.map(()=>$b(t++)),t}function MM(e){let t=0;return(n,i)=>{const r=e.getDatasetMeta(i).controller;r instanceof Jn?t=EM(n,t):r instanceof eo?t=AM(n,t):r&&(t=_M(n,t))}}function ag(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function RM(e){return e&&(e.borderColor||e.backgroundColor)}function PM(){return $e.borderColor!=="rgba(0,0,0,0.1)"||$e.backgroundColor!=="rgba(0,0,0,0.1)"}var kM={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:i},options:r}=e.config,{elements:o}=r,s=ag(i)||RM(r)||o&&ag(o)||PM();if(!n.forceOverride&&s)return;const a=MM(e);i.forEach(a)}};function FM(e,t,n,i,r){const o=r.samples||i;if(o>=n)return e.slice(t,t+n);const s=[],a=(n-2)/(o-2);let l=0;const c=t+n-1;let u=t,d,f,h,g,p;for(s[l++]=e[u],d=0;d<o-2;d++){let m=0,b=0,y;const x=Math.floor((d+1)*a)+1+t,I=Math.min(Math.floor((d+2)*a)+1,n)+t,C=I-x;for(y=x;y<I;y++)m+=e[y].x,b+=e[y].y;m/=C,b/=C;const M=Math.floor(d*a)+1+t,R=Math.min(Math.floor((d+1)*a)+1,n)+t,{x:w,y:_}=e[u];for(h=g=-1,y=M;y<R;y++)g=.5*Math.abs((w-m)*(e[y].y-_)-(w-e[y].x)*(b-_)),g>h&&(h=g,f=e[y],p=y);s[l++]=f,u=p}return s[l++]=e[c],s}function OM(e,t,n,i){let r=0,o=0,s,a,l,c,u,d,f,h,g,p;const m=[],b=t+n-1,y=e[t].x,I=e[b].x-y;for(s=t;s<t+n;++s){a=e[s],l=(a.x-y)/I*i,c=a.y;const C=l|0;if(C===u)c<g?(g=c,d=s):c>p&&(p=c,f=s),r=(o*r+a.x)/++o;else{const M=s-1;if(!he(d)&&!he(f)){const R=Math.min(d,f),w=Math.max(d,f);R!==h&&R!==M&&m.push({...e[R],x:r}),w!==h&&w!==M&&m.push({...e[w],x:r})}s>0&&M!==h&&m.push(e[M]),m.push(a),u=C,o=0,g=p=c,d=f=h=s}}return m}function jb(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function lg(e){e.data.datasets.forEach(t=>{jb(t)})}function TM(e,t){const n=t.length;let i=0,r;const{iScale:o}=e,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(i=qe(Pn(t,o.axis,s).lo,0,n-1)),c?r=qe(Pn(t,o.axis,a).hi+1,i,n)-i:r=n-i,{start:i,count:r}}var DM={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){lg(e);return}const i=e.width;e.data.datasets.forEach((r,o)=>{const{_data:s,indexAxis:a}=r,l=e.getDatasetMeta(o),c=s||r.data;if(Le([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:d,count:f}=TM(l,c);const h=n.threshold||4*i;if(f<=h){jb(r);return}he(s)&&(r._data=c,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let g;switch(n.algorithm){case"lttb":g=FM(c,d,f,i,n);break;case"min-max":g=OM(c,d,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}r._decimated=g})},destroy(e){lg(e)}};function NM(e,t,n){const i=e.segments,r=e.points,o=t.points,s=[];for(const a of i){let{start:l,end:c}=a;c=el(l,c,r);const u=$c(n,r[l],r[c],a.loop);if(!t.segments){s.push({source:a,target:u,start:r[l],end:r[c]});continue}const d=wb(t,u);for(const f of d){const h=$c(n,o[f.start],o[f.end],f.loop),g=Cb(a,r,h);for(const p of g)s.push({source:p,target:f,start:{[n]:cg(u,h,"start",Math.max)},end:{[n]:cg(u,h,"end",Math.min)}})}}return s}function $c(e,t,n,i){if(i)return;let r=t[e],o=n[e];return e==="angle"&&(r=ft(r),o=ft(o)),{property:e,start:r,end:o}}function LM(e,t){const{x:n=null,y:i=null}=e||{},r=t.points,o=[];return t.segments.forEach(({start:s,end:a})=>{a=el(s,a,r);const l=r[s],c=r[a];i!==null?(o.push({x:l.x,y:i}),o.push({x:c.x,y:i})):n!==null&&(o.push({x:n,y:l.y}),o.push({x:n,y:c.y}))}),o}function el(e,t,n){for(;t>e;t--){const i=n[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function cg(e,t,n,i){return e&&t?i(e[n],t[n]):e?e[n]:t?t[n]:0}function Gb(e,t){let n=[],i=!1;return Ve(e)?(i=!0,n=e):n=LM(e,t),n.length?new On({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function ug(e){return e&&e.fill!==!1}function VM(e,t,n){let r=e[t].fill;const o=[t];let s;if(!n)return r;for(;r!==!1&&o.indexOf(r)===-1;){if(!He(r))return r;if(s=e[r],!s)return!1;if(s.visible)return r;o.push(r),r=s.fill}return!1}function BM(e,t,n){const i=zM(e);if(be(i))return isNaN(i.value)?!1:i;let r=parseFloat(i);return He(r)&&Math.floor(r)===r?$M(i[0],t,r,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function $M(e,t,n,i){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=i?!1:n}function jM(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:be(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function GM(e,t,n){let i;return e==="start"?i=n:e==="end"?i=t.options.reverse?t.min:t.max:be(e)?i=e.value:i=t.getBaseValue(),i}function zM(e){const t=e.options,n=t.fill;let i=ae(n&&n.target,n);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function HM(e){const{scale:t,index:n,line:i}=e,r=[],o=i.segments,s=i.points,a=WM(t,n);a.push(Gb({x:null,y:t.bottom},i));for(let l=0;l<o.length;l++){const c=o[l];for(let u=c.start;u<=c.end;u++)XM(r,s[u],a)}return new On({points:r,options:{}})}function WM(e,t){const n=[],i=e.getMatchingVisibleMetas("line");for(let r=0;r<i.length;r++){const o=i[r];if(o.index===t)break;o.hidden||n.unshift(o.dataset)}return n}function XM(e,t,n){const i=[];for(let r=0;r<n.length;r++){const o=n[r],{first:s,last:a,point:l}=YM(o,t,"x");if(!(!l||s&&a)){if(s)i.unshift(l);else if(e.push(l),!a)break}}e.push(...i)}function YM(e,t,n){const i=e.interpolate(t,n);if(!i)return{};const r=i[n],o=e.segments,s=e.points;let a=!1,l=!1;for(let c=0;c<o.length;c++){const u=o[c],d=s[u.start][n],f=s[u.end][n];if(Rn(r,d,f)){a=r===d,l=r===f;break}}return{first:a,last:l,point:i}}class zb{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,i){const{x:r,y:o,radius:s}=this;return n=n||{start:0,end:Be},t.arc(r,o,s,n.end,n.start,!0),!i.bounds}interpolate(t){const{x:n,y:i,radius:r}=this,o=t.angle;return{x:n+Math.cos(o)*r,y:i+Math.sin(o)*r,angle:o}}}function ZM(e){const{chart:t,fill:n,line:i}=e;if(He(n))return JM(t,n);if(n==="stack")return HM(e);if(n==="shape")return!0;const r=UM(e);return r instanceof zb?r:Gb(r,i)}function JM(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function UM(e){return(e.scale||{}).getPointPositionForValue?KM(e):QM(e)}function QM(e){const{scale:t={},fill:n}=e,i=jM(n,t);if(He(i)){const r=t.isHorizontal();return{x:r?i:null,y:r?null:i}}return null}function KM(e){const{scale:t,fill:n}=e,i=t.options,r=t.getLabels().length,o=i.reverse?t.max:t.min,s=GM(n,t,o),a=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,o);return new zb({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(s)})}for(let l=0;l<r;++l)a.push(t.getPointPositionForValue(l,s));return a}function Xl(e,t,n){const i=ZM(t),{chart:r,index:o,line:s,scale:a,axis:l}=t,c=s.options,u=c.fill,d=c.backgroundColor,{above:f=d,below:h=d}=u||{},g=r.getDatasetMeta(o),p=Sb(r,g);i&&s.points.length&&(Ii(e,n),qM(e,{line:s,target:i,above:f,below:h,area:n,scale:a,axis:l,clip:p}),_i(e))}function qM(e,t){const{line:n,target:i,above:r,below:o,area:s,scale:a,clip:l}=t,c=n._loop?"angle":t.axis;e.save();let u=o;o!==r&&(c==="x"?(dg(e,i,s.top),Yl(e,{line:n,target:i,color:r,scale:a,property:c,clip:l}),e.restore(),e.save(),dg(e,i,s.bottom)):c==="y"&&(fg(e,i,s.left),Yl(e,{line:n,target:i,color:o,scale:a,property:c,clip:l}),e.restore(),e.save(),fg(e,i,s.right),u=r)),Yl(e,{line:n,target:i,color:u,scale:a,property:c,clip:l}),e.restore()}function dg(e,t,n){const{segments:i,points:r}=t;let o=!0,s=!1;e.beginPath();for(const a of i){const{start:l,end:c}=a,u=r[l],d=r[el(l,c,r)];o?(e.moveTo(u.x,u.y),o=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),s=!!t.pathSegment(e,a,{move:s}),s?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function fg(e,t,n){const{segments:i,points:r}=t;let o=!0,s=!1;e.beginPath();for(const a of i){const{start:l,end:c}=a,u=r[l],d=r[el(l,c,r)];o?(e.moveTo(u.x,u.y),o=!1):(e.lineTo(n,u.y),e.lineTo(u.x,u.y)),s=!!t.pathSegment(e,a,{move:s}),s?e.closePath():e.lineTo(n,d.y)}e.lineTo(n,t.first().y),e.closePath(),e.clip()}function Yl(e,t){const{line:n,target:i,property:r,color:o,scale:s,clip:a}=t,l=NM(n,i,r);for(const{source:c,target:u,start:d,end:f}of l){const{style:{backgroundColor:h=o}={}}=c,g=i!==!0;e.save(),e.fillStyle=h,e9(e,s,a,g&&$c(r,d,f)),e.beginPath();const p=!!n.pathSegment(e,c);let m;if(g){p?e.closePath():hg(e,i,f,r);const b=!!i.pathSegment(e,u,{move:p,reverse:!0});m=p&&b,m||hg(e,i,d,r)}e.closePath(),e.fill(m?"evenodd":"nonzero"),e.restore()}}function e9(e,t,n,i){const r=t.chart.chartArea,{property:o,start:s,end:a}=i||{};if(o==="x"||o==="y"){let l,c,u,d;o==="x"?(l=s,c=r.top,u=a,d=r.bottom):(l=r.left,c=s,u=r.right,d=a),e.beginPath(),n&&(l=Math.max(l,n.left),u=Math.min(u,n.right),c=Math.max(c,n.top),d=Math.min(d,n.bottom)),e.rect(l,c,u-l,d-c),e.clip()}}function hg(e,t,n,i){const r=t.interpolate(n,i);r&&e.lineTo(r.x,r.y)}var t9={id:"filler",afterDatasetsUpdate(e,t,n){const i=(e.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s<i;++s)o=e.getDatasetMeta(s),a=o.dataset,l=null,a&&a.options&&a instanceof On&&(l={visible:e.isDatasetVisible(s),index:s,fill:BM(a,s,i),chart:e,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,r.push(l);for(s=0;s<i;++s)l=r[s],!(!l||l.fill===!1)&&(l.fill=VM(r,s,n.propagate))},beforeDraw(e,t,n){const i=n.drawTime==="beforeDraw",r=e.getSortedVisibleDatasetMetas(),o=e.chartArea;for(let s=r.length-1;s>=0;--s){const a=r[s].$filler;a&&(a.line.updateControlPoints(o,a.axis),i&&a.fill&&Xl(e.ctx,a,o))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const i=e.getSortedVisibleDatasetMetas();for(let r=i.length-1;r>=0;--r){const o=i[r].$filler;ug(o)&&Xl(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const i=t.meta.$filler;!ug(i)||n.drawTime!=="beforeDatasetDraw"||Xl(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const gg=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},n9=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class pg extends vn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,i){this.maxWidth=t,this.maxHeight=n,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Fe(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,r)=>t.sort(i,r,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,r=Ue(i.font),o=r.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=gg(i,o);let c,u;n.font=r.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,o,a,l)+10):(u=this.maxHeight,c=this._fitCols(s,r,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,i,r){const{ctx:o,maxWidth:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=r+a;let d=t;o.textAlign="left",o.textBaseline="middle";let f=-1,h=-u;return this.legendItems.forEach((g,p)=>{const m=i+n/2+o.measureText(g.text).width;(p===0||c[c.length-1]+m+2*a>s)&&(d+=u,c[c.length-(p>0?0:1)]=0,h+=u,f++),l[p]={left:0,top:h,row:f,width:m,height:r},c[c.length-1]+=m+a}),d}_fitCols(t,n,i,r){const{ctx:o,maxHeight:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=a,f=0,h=0,g=0,p=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:y,itemHeight:x}=i9(i,n,o,m,r);b>0&&h+x+2*a>u&&(d+=f+a,c.push({width:f,height:h}),g+=f+a,p++,f=h=0),l[b]={left:g,top:h,col:p,width:y,height:x},f=Math.max(f,y),h+=x+a}),d+=f,c.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:r},rtl:o}}=this,s=tr(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=ut(i,this.left+r,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=ut(i,this.left+r,this.right-this.lineWidths[a])),c.top+=this.top+t+r,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+r}else{let a=0,l=ut(i,this.top+t+r,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=ut(i,this.top+t+r,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+r,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ii(t,this),this._draw(),_i(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:i,ctx:r}=this,{align:o,labels:s}=t,a=$e.color,l=tr(t.rtl,this.left,this.width),c=Ue(s.font),{padding:u}=s,d=c.size,f=d/2;let h;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;const{boxWidth:g,boxHeight:p,itemHeight:m}=gg(s,d),b=function(M,R,w){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;r.save();const _=ae(w.lineWidth,1);if(r.fillStyle=ae(w.fillStyle,a),r.lineCap=ae(w.lineCap,"butt"),r.lineDashOffset=ae(w.lineDashOffset,0),r.lineJoin=ae(w.lineJoin,"miter"),r.lineWidth=_,r.strokeStyle=ae(w.strokeStyle,a),r.setLineDash(ae(w.lineDash,[])),s.usePointStyle){const A={radius:p*Math.SQRT2/2,pointStyle:w.pointStyle,rotation:w.rotation,borderWidth:_},k=l.xPlus(M,g/2),D=R+f;ub(r,A,k,D,s.pointStyleWidth&&g)}else{const A=R+Math.max((d-p)/2,0),k=l.leftForLtr(M,g),D=Ei(w.borderRadius);r.beginPath(),Object.values(D).some(B=>B!==0)?yo(r,{x:k,y:A,w:g,h:p,radius:D}):r.rect(k,A,g,p),r.fill(),_!==0&&r.stroke()}r.restore()},y=function(M,R,w){Ni(r,w.text,M,R+m/2,c,{strikethrough:w.hidden,textAlign:l.textAlign(w.textAlign)})},x=this.isHorizontal(),I=this._computeTitleHeight();x?h={x:ut(o,this.left+u,this.right-i[0]),y:this.top+u+I,line:0}:h={x:this.left+u,y:ut(o,this.top+I+u,this.bottom-n[0].height),line:0},vb(this.ctx,t.textDirection);const C=m+u;this.legendItems.forEach((M,R)=>{r.strokeStyle=M.fontColor,r.fillStyle=M.fontColor;const w=r.measureText(M.text).width,_=l.textAlign(M.textAlign||(M.textAlign=s.textAlign)),A=g+f+w;let k=h.x,D=h.y;l.setWidth(this.width),x?R>0&&k+A+u>this.right&&(D=h.y+=C,h.line++,k=h.x=ut(o,this.left+u,this.right-i[h.line])):R>0&&D+C>this.bottom&&(k=h.x=k+n[h.line].width+u,h.line++,D=h.y=ut(o,this.top+I+u,this.bottom-n[h.line].height));const B=l.x(k);if(b(B,D,M),k=wE(_,k+g+f,x?k+A:this.right,t.rtl),y(l.x(k),D,M),x)h.x+=A+u;else if(typeof M.text!="string"){const N=c.lineHeight;h.y+=Hb(M,N)+u}else h.y+=C}),xb(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,i=Ue(n.font),r=ot(n.padding);if(!n.display)return;const o=tr(t.rtl,this.left,this.width),s=this.ctx,a=n.position,l=i.size/2,c=r.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=ut(t.align,d,this.right-f);else{const g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);u=c+ut(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const h=ut(a,d,d+f);s.textAlign=o.textAlign(ed(a)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=i.string,Ni(s,n.text,h,u,i)}_computeTitleHeight(){const t=this.options.title,n=Ue(t.font),i=ot(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,r,o;if(Rn(t,this.left,this.right)&&Rn(n,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(r=o[i],Rn(t,r.left,r.left+r.width)&&Rn(n,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const n=this.options;if(!s9(t.type,n))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,o=n9(r,i);r&&!o&&Fe(n.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!o&&Fe(n.onHover,[t,i,this],this)}else i&&Fe(n.onClick,[t,i,this],this)}}function i9(e,t,n,i,r){const o=r9(i,e,t,n),s=o9(r,i,t.lineHeight);return{itemWidth:o,itemHeight:s}}function r9(e,t,n,i){let r=e.text;return r&&typeof r!="string"&&(r=r.reduce((o,s)=>o.length>s.length?o:s)),t+n.size/2+i.measureText(r).width}function o9(e,t,n){let i=e;return typeof t.text!="string"&&(i=Hb(t,n)),i}function Hb(e,t){const n=e.text?e.text.length:0;return t*n}function s9(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var ji={id:"legend",_element:pg,start(e,t,n){const i=e.legend=new pg({ctx:e.ctx,options:n,chart:e});pt.configure(e,i,n),pt.addBox(e,i)},stop(e){pt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const i=e.legend;pt.configure(e,i,n),i.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const i=t.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:r,color:o,useBorderRadius:s,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=ot(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:r||c.textAlign,borderRadius:s&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class cd extends vn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const r=Ve(i.text)?i.text.length:1;this._padding=ot(i.padding);const o=r*Ue(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:i,bottom:r,right:o,options:s}=this,a=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=ut(a,i,o),d=n+t,c=o-i):(s.position==="left"?(u=i+t,d=ut(a,r,n),l=we*-.5):(u=o-t,d=ut(a,n,r),l=we*.5),c=r-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const i=Ue(n.font),o=i.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Ni(t,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:c,textAlign:ed(n.align),textBaseline:"middle",translation:[s,a]})}}function a9(e,t){const n=new cd({ctx:e.ctx,options:t,chart:e});pt.configure(e,n,t),pt.addBox(e,n),e.titleBlock=n}var ud={id:"title",_element:cd,start(e,t,n){a9(e,n)},stop(e){const t=e.titleBlock;pt.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const i=e.titleBlock;pt.configure(e,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const us=new WeakMap;var l9={id:"subtitle",start(e,t,n){const i=new cd({ctx:e.ctx,options:n,chart:e});pt.configure(e,i,n),pt.addBox(e,i),us.set(e,i)},stop(e){pt.removeBox(e,us.get(e)),us.delete(e)},beforeUpdate(e,t,n){const i=us.get(e);pt.configure(e,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Br={average(e){if(!e.length)return!1;let t,n,i=new Set,r=0,o=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();i.add(l.x),r+=l.y,++o}}return o===0||i.size===0?!1:{x:[...i].reduce((a,l)=>a+l)/i.size,y:r/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,r=Number.POSITIVE_INFINITY,o,s,a;for(o=0,s=e.length;o<s;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Tc(t,c);u<r&&(r=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,i=l.y}return{x:n,y:i}}};function tn(e,t){return t&&(Ve(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Sn(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
99
- `)>-1?e.split(`
100
- `):e}function c9(e,t){const{element:n,datasetIndex:i,index:r}=t,o=e.getDatasetMeta(i).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:e,label:s,parsed:o.getParsed(r),raw:e.data.datasets[i].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function mg(e,t){const n=e.chart.ctx,{body:i,footer:r,title:o}=e,{boxWidth:s,boxHeight:a}=t,l=Ue(t.bodyFont),c=Ue(t.titleFont),u=Ue(t.footerFont),d=o.length,f=r.length,h=i.length,g=ot(t.padding);let p=g.height,m=0,b=i.reduce((I,C)=>I+C.before.length+C.lines.length+C.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const I=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=h*I+(b-h)*l.lineHeight+(b-1)*t.bodySpacing}f&&(p+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let y=0;const x=function(I){m=Math.max(m,n.measureText(I).width+y)};return n.save(),n.font=c.string,Me(e.title,x),n.font=l.string,Me(e.beforeBody.concat(e.afterBody),x),y=t.displayColors?s+2+t.boxPadding:0,Me(i,I=>{Me(I.before,x),Me(I.lines,x),Me(I.after,x)}),y=0,n.font=u.string,Me(e.footer,x),n.restore(),m+=g.width,{width:m,height:p}}function u9(e,t){const{y:n,height:i}=t;return n<i/2?"top":n>e.height-i/2?"bottom":"center"}function d9(e,t,n,i){const{x:r,width:o}=i,s=n.caretSize+n.caretPadding;if(e==="left"&&r+o+s>t.width||e==="right"&&r-o-s<0)return!0}function f9(e,t,n,i){const{x:r,width:o}=n,{width:s,chartArea:{left:a,right:l}}=e;let c="center";return i==="center"?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),d9(c,e,t,n)&&(c="center"),c}function bg(e,t,n){const i=n.yAlign||t.yAlign||u9(e,n);return{xAlign:n.xAlign||t.xAlign||f9(e,t,n,i),yAlign:i}}function h9(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function g9(e,t,n){let{y:i,height:r}=e;return t==="top"?i+=n:t==="bottom"?i-=r+n:i-=r/2,i}function vg(e,t,n,i){const{caretSize:r,caretPadding:o,cornerRadius:s}=e,{xAlign:a,yAlign:l}=n,c=r+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:h}=Ei(s);let g=h9(t,a);const p=g9(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(u,f)+r:a==="right"&&(g+=Math.max(d,h)+r),{x:qe(g,0,i.width-t.width),y:qe(p,0,i.height-t.height)}}function ds(e,t,n){const i=ot(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function xg(e){return tn([],Sn(e))}function p9(e,t,n){return si(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function yg(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Wb={beforeTitle:Cn,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return n[t.dataIndex]}return""},afterTitle:Cn,beforeBody:Cn,beforeLabel:Cn,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return he(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Cn,afterBody:Cn,beforeFooter:Cn,footer:Cn,afterFooter:Cn};function wt(e,t,n,i){const r=e[t].call(n,i);return typeof r>"u"?Wb[t].call(n,i):r}class jc extends vn{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&n.options.animation&&i.animations,o=new Ib(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=p9(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:i}=n,r=wt(i,"beforeTitle",this,t),o=wt(i,"title",this,t),s=wt(i,"afterTitle",this,t);let a=[];return a=tn(a,Sn(r)),a=tn(a,Sn(o)),a=tn(a,Sn(s)),a}getBeforeBody(t,n){return xg(wt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:i}=n,r=[];return Me(t,o=>{const s={before:[],lines:[],after:[]},a=yg(i,o);tn(s.before,Sn(wt(a,"beforeLabel",this,o))),tn(s.lines,wt(a,"label",this,o)),tn(s.after,Sn(wt(a,"afterLabel",this,o))),r.push(s)}),r}getAfterBody(t,n){return xg(wt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:i}=n,r=wt(i,"beforeFooter",this,t),o=wt(i,"footer",this,t),s=wt(i,"afterFooter",this,t);let a=[];return a=tn(a,Sn(r)),a=tn(a,Sn(o)),a=tn(a,Sn(s)),a}_createItems(t){const n=this._active,i=this.chart.data,r=[],o=[],s=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(c9(this.chart,n[l]));return t.filter&&(a=a.filter((u,d,f)=>t.filter(u,d,f,i))),t.itemSort&&(a=a.sort((u,d)=>t.itemSort(u,d,i))),Me(a,u=>{const d=yg(t.callbacks,u);r.push(wt(d,"labelColor",this,u)),o.push(wt(d,"labelPointStyle",this,u)),s.push(wt(d,"labelTextColor",this,u))}),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,n){const i=this.options.setContext(this.getContext()),r=this._active;let o,s=[];if(!r.length)this.opacity!==0&&(o={opacity:0});else{const a=Br[i.position].call(this,r,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const l=this._size=mg(this,i),c=Object.assign({},a,l),u=bg(this.chart,i,c),d=vg(i,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,r){const o=this.getCaretPosition(t,i,r);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,i){const{xAlign:r,yAlign:o}=this,{caretSize:s,cornerRadius:a}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Ei(a),{x:f,y:h}=t,{width:g,height:p}=n;let m,b,y,x,I,C;return o==="center"?(I=h+p/2,r==="left"?(m=f,b=m-s,x=I+s,C=I-s):(m=f+g,b=m+s,x=I-s,C=I+s),y=m):(r==="left"?b=f+Math.max(l,u)+s:r==="right"?b=f+g-Math.max(c,d)-s:b=this.caretX,o==="top"?(x=h,I=x-s,m=b-s,y=b+s):(x=h+p,I=x+s,m=b+s,y=b-s),C=x),{x1:m,x2:b,x3:y,y1:x,y2:I,y3:C}}drawTitle(t,n,i){const r=this.title,o=r.length;let s,a,l;if(o){const c=tr(i.rtl,this.x,this.width);for(t.x=ds(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",s=Ue(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=s.string,l=0;l<o;++l)n.fillText(r[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+a,l+1===o&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,n,i,r,o){const s=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:l,boxWidth:c}=o,u=Ue(o.bodyFont),d=ds(this,"left",o),f=r.x(d),h=l<u.lineHeight?(u.lineHeight-l)/2:0,g=n.y+h;if(o.usePointStyle){const p={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=r.leftForLtr(f,c)+c/2,b=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,ma(t,p,m,b),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,ma(t,p,m,b)}else{t.lineWidth=be(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const p=r.leftForLtr(f,c),m=r.leftForLtr(r.xPlus(f,1),c-2),b=Ei(s.borderRadius);Object.values(b).some(y=>y!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,yo(t,{x:p,y:g,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),yo(t,{x:m,y:g+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(p,g,c,l),t.strokeRect(p,g,c,l),t.fillStyle=s.backgroundColor,t.fillRect(m,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){const{body:r}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=i,d=Ue(i.bodyFont);let f=d.lineHeight,h=0;const g=tr(i.rtl,this.x,this.width),p=function(w){n.fillText(w,g.x(t.x+h),t.y+f/2),t.y+=f+o},m=g.textAlign(s);let b,y,x,I,C,M,R;for(n.textAlign=s,n.textBaseline="middle",n.font=d.string,t.x=ds(this,m,i),n.fillStyle=i.bodyColor,Me(this.beforeBody,p),h=a&&m!=="right"?s==="center"?c/2+u:c+2+u:0,I=0,M=r.length;I<M;++I){for(b=r[I],y=this.labelTextColors[I],n.fillStyle=y,Me(b.before,p),x=b.lines,a&&x.length&&(this._drawColorBox(n,t,I,g,i),f=Math.max(d.lineHeight,l)),C=0,R=x.length;C<R;++C)p(x[C]),f=d.lineHeight;Me(b.after,p)}h=0,f=d.lineHeight,Me(this.afterBody,p),t.y-=o}drawFooter(t,n,i){const r=this.footer,o=r.length;let s,a;if(o){const l=tr(i.rtl,this.x,this.width);for(t.x=ds(this,i.footerAlign,i),t.y+=i.footerMarginTop,n.textAlign=l.textAlign(i.footerAlign),n.textBaseline="middle",s=Ue(i.footerFont),n.fillStyle=i.footerColor,n.font=s.string,a=0;a<o;++a)n.fillText(r[a],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,n,i,r){const{xAlign:o,yAlign:s}=this,{x:a,y:l}=t,{width:c,height:u}=i,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:g}=Ei(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(a+d,l),s==="top"&&this.drawCaret(t,n,i,r),n.lineTo(a+c-f,l),n.quadraticCurveTo(a+c,l,a+c,l+f),s==="center"&&o==="right"&&this.drawCaret(t,n,i,r),n.lineTo(a+c,l+u-g),n.quadraticCurveTo(a+c,l+u,a+c-g,l+u),s==="bottom"&&this.drawCaret(t,n,i,r),n.lineTo(a+h,l+u),n.quadraticCurveTo(a,l+u,a,l+u-h),s==="center"&&o==="left"&&this.drawCaret(t,n,i,r),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,i=this.$animations,r=i&&i.x,o=i&&i.y;if(r||o){const s=Br[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=mg(this,t),l=Object.assign({},s,this._size),c=bg(n,t,l),u=vg(t,l,c,n);(r._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=ot(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,r,n),vb(t,n.textDirection),o.y+=s.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),xb(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const i=this._active,r=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!fa(i,r),s=this._positionChanged(r,n);(o||s)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,o=this._active||[],s=this._getActiveElements(t,o,n,i),a=this._positionChanged(s,t),l=n||!fa(s,o)||a;return l&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,i,r){const o=this.options;if(t.type==="mouseout")return[];if(!r)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const s=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:i,caretY:r,options:o}=this,s=Br[o.position].call(this,t,n);return s!==!1&&(i!==s.x||r!==s.y)}}W(jc,"positioners",Br);var Gi={id:"tooltip",_element:jc,positioners:Br,afterInit(e,t,n){n&&(e.tooltip=new jc({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Wb},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},m9=Object.freeze({__proto__:null,Colors:kM,Decimation:DM,Filler:t9,Legend:ji,SubTitle:l9,Title:ud,Tooltip:Gi});const b9=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function v9(e,t,n,i){const r=e.indexOf(t);if(r===-1)return b9(e,t,n,i);const o=e.lastIndexOf(t);return r!==o?n:r}const x9=(e,t)=>e===null?null:qe(Math.round(e),0,t);function Cg(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class cr extends ai{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:r,label:o}of n)i[r]===o&&i.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(he(t))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:v9(i,t,ae(n,t),this._addedLabels),x9(n,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const t=this.min,n=this.max,i=this.options.offset,r=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let s=t;s<=n;s++)r.push({value:s});return r}getLabelForValue(t){return Cg.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}W(cr,"id","category"),W(cr,"defaults",{ticks:{callback:Cg}});function y9(e,t){const n=[],{bounds:r,step:o,min:s,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,h=o||1,g=u-1,{min:p,max:m}=t,b=!he(s),y=!he(a),x=!he(c),I=(m-p)/(d+1);let C=mh((m-p)/g/h)*h,M,R,w,_;if(C<1e-14&&!b&&!y)return[{value:p},{value:m}];_=Math.ceil(m/C)-Math.floor(p/C),_>g&&(C=mh(_*C/g/h)*h),he(l)||(M=Math.pow(10,l),C=Math.ceil(C*M)/M),r==="ticks"?(R=Math.floor(p/C)*C,w=Math.ceil(m/C)*C):(R=p,w=m),b&&y&&o&&pE((a-s)/o,C/1e3)?(_=Math.round(Math.min((a-s)/C,u)),C=(a-s)/_,R=s,w=a):x?(R=b?s:R,w=y?a:w,_=c-1,C=(w-R)/_):(_=(w-R)/C,Ur(_,Math.round(_),C/1e3)?_=Math.round(_):_=Math.ceil(_));const A=Math.max(bh(C),bh(R));M=Math.pow(10,he(l)?A:l),R=Math.round(R*M)/M,w=Math.round(w*M)/M;let k=0;for(b&&(f&&R!==s?(n.push({value:s}),R<s&&k++,Ur(Math.round((R+k*C)*M)/M,s,wg(s,I,e))&&k++):R<s&&k++);k<_;++k){const D=Math.round((R+k*C)*M)/M;if(y&&D>a)break;n.push({value:D})}return y&&f&&w!==a?n.length&&Ur(n[n.length-1].value,a,wg(a,I,e))?n[n.length-1].value=a:n.push({value:a}):(!y||w===a)&&n.push({value:w}),n}function wg(e,t,{horizontal:n,minRotation:i}){const r=Ut(i),o=(n?Math.sin(r):Math.cos(r))||.001,s=.75*t*(""+e).length;return Math.min(t/o,s)}class Ca extends ai{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return he(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:r,max:o}=this;const s=l=>r=n?r:l,a=l=>o=i?o:l;if(t){const l=cn(r),c=cn(o);l<0&&c<0?a(0):l>0&&c>0&&s(0)}if(r===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||s(r-l)}this.min=r,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=t,r;return i?(r=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,s=y9(r,o);return t.bounds==="ticks"&&tb(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const r=(i-n)/Math.max(t.length-1,1)/2;n-=r,i+=r}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return Lo(t,this.chart.options.locale,this.options.ticks.format)}}class Nn extends Ca{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=He(t)?t:0,this.max=He(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,i=Ut(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/r))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}W(Nn,"id","linear"),W(Nn,"defaults",{ticks:{callback:Qa.formatters.numeric}});const wo=e=>Math.floor(Yn(e)),hi=(e,t)=>Math.pow(10,wo(e)+t);function Sg(e){return e/Math.pow(10,wo(e))===1}function Ig(e,t,n){const i=Math.pow(10,n),r=Math.floor(e/i);return Math.ceil(t/i)-r}function C9(e,t){const n=t-e;let i=wo(n);for(;Ig(e,t,i)>10;)i++;for(;Ig(e,t,i)<10;)i--;return Math.min(i,wo(e))}function w9(e,{min:t,max:n}){t=At(e.min,t);const i=[],r=wo(t);let o=C9(t,n),s=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=r>o?Math.pow(10,r):0,c=Math.round((t-l)*s)/s,u=Math.floor((t-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,o)),f=At(e.min,Math.round((l+u+d*Math.pow(10,o))*s)/s);for(;f<n;)i.push({value:f,major:Sg(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,s=o>=0?1:s),f=Math.round((l+u+d*Math.pow(10,o))*s)/s;const h=At(e.max,f);return i.push({value:h,major:Sg(h),significand:d}),i}class Li extends ai{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const i=Ca.prototype.parse.apply(this,[t,n]);if(i===0){this._zero=!0;return}return He(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=He(t)?Math.max(0,t):null,this.max=He(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!He(this._userMin)&&(this.min=t===hi(this.min,0)?hi(this.min,-1):hi(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let i=this.min,r=this.max;const o=a=>i=t?i:a,s=a=>r=n?r:a;i===r&&(i<=0?(o(1),s(10)):(o(hi(i,-1)),s(hi(r,1)))),i<=0&&o(hi(r,-1)),r<=0&&s(hi(i,1)),this.min=i,this.max=r}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},i=w9(n,this);return t.bounds==="ticks"&&tb(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":Lo(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Yn(t),this._valueRange=Yn(this.max)-Yn(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Yn(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}W(Li,"id","logarithmic"),W(Li,"defaults",{ticks:{callback:Qa.formatters.logarithmic,major:{enabled:!0}}});function Gc(e){const t=e.ticks;if(t.display&&e.display){const n=ot(t.backdropPadding);return ae(t.font&&t.font.size,$e.font.size)+n.height}return 0}function S9(e,t,n){return n=Ve(n)?n:[n],{w:FE(e,t.string,n),h:n.length*t.lineHeight}}function _g(e,t,n,i,r){return e===i||e===r?{start:t-n/2,end:t+n/2}:e<i||e>r?{start:t-n,end:t}:{start:t,end:t+n}}function I9(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),i=[],r=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?we/o:0;for(let l=0;l<o;l++){const c=s.setContext(e.getPointLabelContext(l));r[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+r[l],a),d=Ue(c.font),f=S9(e.ctx,d,e._pointLabels[l]);i[l]=f;const h=ft(e.getIndexAngle(l)+a),g=Math.round(Ku(h)),p=_g(g,u.x,f.w,0,180),m=_g(g,u.y,f.h,90,270);_9(n,t,h,p,m)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=M9(e,i,r)}function _9(e,t,n,i,r){const o=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let a=0,l=0;i.start<t.l?(a=(t.l-i.start)/o,e.l=Math.min(e.l,t.l-a)):i.end>t.r&&(a=(i.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),r.start<t.t?(l=(t.t-r.start)/s,e.t=Math.min(e.t,t.t-l)):r.end>t.b&&(l=(r.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function E9(e,t,n){const i=e.drawingArea,{extra:r,additionalAngle:o,padding:s,size:a}=n,l=e.getPointPosition(t,i+r+s,o),c=Math.round(Ku(ft(l.angle+Xe))),u=k9(l.y,a.h,c),d=R9(c),f=P9(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+a.w,bottom:u+a.h}}function A9(e,t){if(!t)return!0;const{left:n,top:i,right:r,bottom:o}=e;return!(kn({x:n,y:i},t)||kn({x:n,y:o},t)||kn({x:r,y:i},t)||kn({x:r,y:o},t))}function M9(e,t,n){const i=[],r=e._pointLabels.length,o=e.options,{centerPointLabels:s,display:a}=o.pointLabels,l={extra:Gc(o)/2,additionalAngle:s?we/r:0};let c;for(let u=0;u<r;u++){l.padding=n[u],l.size=t[u];const d=E9(e,u,l);i.push(d),a==="auto"&&(d.visible=A9(d,c),d.visible&&(c=d))}return i}function R9(e){return e===0||e===180?"center":e<180?"left":"right"}function P9(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function k9(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function F9(e,t,n){const{left:i,top:r,right:o,bottom:s}=n,{backdropColor:a}=t;if(!he(a)){const l=Ei(t.borderRadius),c=ot(t.backdropPadding);e.fillStyle=a;const u=i-c.left,d=r-c.top,f=o-i+c.width,h=s-r+c.height;Object.values(l).some(g=>g!==0)?(e.beginPath(),yo(e,{x:u,y:d,w:f,h,radius:l}),e.fill()):e.fillRect(u,d,f,h)}}function O9(e,t){const{ctx:n,options:{pointLabels:i}}=e;for(let r=t-1;r>=0;r--){const o=e._pointLabelItems[r];if(!o.visible)continue;const s=i.setContext(e.getPointLabelContext(r));F9(n,s,o);const a=Ue(s.font),{x:l,y:c,textAlign:u}=o;Ni(n,e._pointLabels[r],l,c+a.lineHeight/2,a,{color:s.color,textAlign:u,textBaseline:"middle"})}}function Xb(e,t,n,i){const{ctx:r}=e;if(n)r.arc(e.xCenter,e.yCenter,t,0,Be);else{let o=e.getPointPosition(0,t);r.moveTo(o.x,o.y);for(let s=1;s<i;s++)o=e.getPointPosition(s,t),r.lineTo(o.x,o.y)}}function T9(e,t,n,i,r){const o=e.ctx,s=t.circular,{color:a,lineWidth:l}=t;!s&&!i||!a||!l||n<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(r.dash||[]),o.lineDashOffset=r.dashOffset,o.beginPath(),Xb(e,n,s,i),o.closePath(),o.stroke(),o.restore())}function D9(e,t,n){return si(e,{label:n,index:t,type:"pointLabel"})}class $r extends Ca{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=ot(Gc(this.options)/2),n=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=He(t)&&!isNaN(t)?t:0,this.max=He(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Gc(this.options))}generateTickLabels(t){Ca.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,i)=>{const r=Fe(this.options.pointLabels.callback,[n,i],this);return r||r===0?r:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?I9(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,i,r){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,i,r))}getIndexAngle(t){const n=Be/(this._pointLabels.length||1),i=this.options.startAngle||0;return ft(t*n+Ut(i))}getDistanceFromCenterForValue(t){if(he(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(he(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const i=n[t];return D9(this.getContext(),t,i)}}getPointPosition(t,n,i=0){const r=this.getIndexAngle(t)-Xe+i;return{x:Math.cos(r)*n+this.xCenter,y:Math.sin(r)*n+this.yCenter,angle:r}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:i,right:r,bottom:o}=this._pointLabelItems[t];return{left:n,top:i,right:r,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Xb(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:i,grid:r,border:o}=n,s=this._pointLabels.length;let a,l,c;if(n.pointLabels.display&&O9(this,s),r.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),h=r.setContext(f),g=o.setContext(f);T9(this,h,l,s,g)}}),i.display){for(t.save(),a=s-1;a>=0;a--){const u=i.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const c=i.setContext(this.getContext(l)),u=Ue(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=ot(c.backdropPadding);t.fillRect(-s/2-d.left,-o-u.size/2-d.top,s+d.width,u.size+d.height)}Ni(t,a.label,0,-o,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}W($r,"id","radialLinear"),W($r,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Qa.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),W($r,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),W($r,"descriptors",{angleLines:{_fallback:"grid"}});const tl={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},It=Object.keys(tl);function Eg(e,t){return e-t}function Ag(e,t){if(he(t))return null;const n=e._adapter,{parser:i,round:r,isoWeekday:o}=e._parseOpts;let s=t;return typeof i=="function"&&(s=i(s)),He(s)||(s=typeof i=="string"?n.parse(s,i):n.parse(s)),s===null?null:(r&&(s=r==="week"&&(sr(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,r)),+s)}function Mg(e,t,n,i){const r=It.length;for(let o=It.indexOf(e);o<r-1;++o){const s=tl[It[o]],a=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(a*s.size))<=i)return It[o]}return It[r-1]}function N9(e,t,n,i,r){for(let o=It.length-1;o>=It.indexOf(n);o--){const s=It[o];if(tl[s].common&&e._adapter.diff(r,i,s)>=t-1)return s}return It[n?It.indexOf(n):0]}function L9(e){for(let t=It.indexOf(e)+1,n=It.length;t<n;++t)if(tl[It[t]].common)return It[t]}function Rg(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:i,hi:r}=qu(n,t),o=n[i]>=t?n[i]:n[r];e[o]=!0}}function V9(e,t,n,i){const r=e._adapter,o=+r.startOf(t[0].value,i),s=t[t.length-1].value;let a,l;for(a=o;a<=s;a=+r.add(a,1,i))l=n[a],l>=0&&(t[l].major=!0);return t}function Pg(e,t,n){const i=[],r={},o=t.length;let s,a;for(s=0;s<o;++s)a=t[s],r[a]=s,i.push({value:a,major:!1});return o===0||!n?i:V9(e,i,r,n)}class So extends ai{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const i=t.time||(t.time={}),r=this._adapter=new J3._date(t.adapters.date);r.init(n),Jr(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:Ag(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,i=t.time.unit||"day";let{min:r,max:o,minDefined:s,maxDefined:a}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(r=Math.min(r,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!s||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),r=He(r)&&!isNaN(r)?r:+n.startOf(Date.now(),i),o=He(o)&&!isNaN(o)?o:+n.endOf(Date.now(),i)+1,this.min=Math.min(r,o-1),this.max=Math.max(r+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){const t=this.options,n=t.time,i=t.ticks,r=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const o=this.min,s=this.max,a=xE(r,o,s);return this._unit=n.unit||(i.autoSkip?Mg(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):N9(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:L9(this._unit),this.initOffsets(r),t.reverse&&a.reverse(),Pg(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,r,o;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?n=1-r:n=(this.getDecimalForValue(t[1])-r)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=qe(n,0,s),i=qe(i,0,s),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const t=this._adapter,n=this.min,i=this.max,r=this.options,o=r.time,s=o.unit||Mg(o.minUnit,n,i,this._getLabelCapacity(n)),a=ae(r.ticks.stepSize,1),l=s==="week"?o.isoWeekday:!1,c=sr(l)||l===!0,u={};let d=n,f,h;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(i,n,s)>1e5*a)throw new Error(n+" and "+i+" are too far apart with stepSize of "+a+" "+s);const g=r.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<i;f=+t.add(f,a,s),h++)Rg(u,f,g);return(f===i||r.bounds==="ticks"||h===1)&&Rg(u,f,g),Object.keys(u).sort(Eg).map(p=>+p)}getLabelForValue(t){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){const r=this.options.time.displayFormats,o=this._unit,s=n||r[o];return this._adapter.format(t,s)}_tickFormatFunction(t,n,i,r){const o=this.options,s=o.ticks.callback;if(s)return Fe(s,[t,n,i],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],f=i[n],h=c&&d&&f&&f.major;return this._adapter.format(t,r||(h?d:u))}generateTickLabels(t){let n,i,r;for(n=0,i=t.length;n<i;++n)r=t[n],r.label=this._tickFormatFunction(r.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,i=this.ctx.measureText(t).width,r=Ut(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(r),s=Math.sin(r),a=this._resolveTickFontOptions(0).size;return{w:i*o+a*s,h:i*s+a*o}}_getLabelCapacity(t){const n=this.options.time,i=n.displayFormats,r=i[n.unit]||i.millisecond,o=this._tickFormatFunction(t,0,Pg(this,[t],this._majorUnit),r),s=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,i;if(t.length)return t;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,i=r.length;n<i;++n)t=t.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,i;if(t.length)return t;const r=this.getLabels();for(n=0,i=r.length;n<i;++n)t.push(Ag(this,r[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return rb(t.sort(Eg))}}W(So,"id","time"),W(So,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function fs(e,t,n){let i=0,r=e.length-1,o,s,a,l;n?(t>=e[i].pos&&t<=e[r].pos&&({lo:i,hi:r}=Pn(e,"pos",t)),{pos:o,time:a}=e[i],{pos:s,time:l}=e[r]):(t>=e[i].time&&t<=e[r].time&&({lo:i,hi:r}=Pn(e,"time",t)),{time:o,pos:a}=e[i],{time:s,pos:l}=e[r]);const c=s-o;return c?a+(l-a)*(t-o)/c:a}class zc extends So{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=fs(n,this.min),this._tableRange=fs(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:i}=this,r=[],o=[];let s,a,l,c,u;for(s=0,a=t.length;s<a;++s)c=t[s],c>=n&&c<=i&&r.push(c);if(r.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(s=0,a=r.length;s<a;++s)u=r[s+1],l=r[s-1],c=r[s],Math.round((u+l)/2)!==c&&o.push({time:c,pos:s/(a-1)});return o}_generate(){const t=this.min,n=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(n)||i.length===1)&&i.push(n),i.sort((r,o)=>r-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(fs(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return fs(this._table,i*this._tableRange+this._minPos,!0)}}W(zc,"id","timeseries"),W(zc,"defaults",So.defaults);var B9=Object.freeze({__proto__:null,CategoryScale:cr,LinearScale:Nn,LogarithmicScale:Li,RadialLinearScale:$r,TimeScale:So,TimeSeriesScale:zc});const $9=[Z3,IM,m9,B9],Yb="label";function kg(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function j9(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function Zb(e,t){e.labels=t}function Jb(e,t,n=Yb){const i=[];e.datasets=t.map(r=>{const o=e.datasets.find(s=>s[n]===r[n]);return!o||!r.data||i.includes(o)?{...r}:(i.push(o),Object.assign(o,r),o)})}function G9(e,t=Yb){const n={labels:[],datasets:[]};return Zb(n,e.labels),Jb(n,e.datasets,t),n}function z9(e,t){const{height:n=150,width:i=300,redraw:r=!1,datasetIdKey:o,type:s,data:a,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...f}=e,h=S.useRef(null),g=S.useRef(null),p=()=>{h.current&&(g.current=new tt(h.current,{type:s,data:G9(a,o),options:l&&{...l},plugins:c}),kg(t,g.current))},m=()=>{kg(t,null),g.current&&(g.current.destroy(),g.current=null)};return S.useEffect(()=>{!r&&g.current&&l&&j9(g.current,l)},[r,l]),S.useEffect(()=>{!r&&g.current&&Zb(g.current.config.data,a.labels)},[r,a.labels]),S.useEffect(()=>{!r&&g.current&&a.datasets&&Jb(g.current.config.data,a.datasets,o)},[r,a.datasets]),S.useEffect(()=>{g.current&&(r?(m(),setTimeout(p)):g.current.update(d))},[r,l,a.labels,a.datasets,d]),S.useEffect(()=>{g.current&&(m(),setTimeout(p))},[s]),S.useEffect(()=>(p(),()=>m()),[]),v.jsx("canvas",{ref:h,role:"img",height:n,width:i,...f,children:u})}const dd=S.forwardRef(z9);function fd(e,t){return tt.register(t),S.forwardRef((n,i)=>v.jsx(dd,{...n,ref:i,type:e}))}const H9=fd("bar",qr),Ub=fd("doughnut",Jn),W9=fd("pie",va);/*!
101
- * chartjs-plugin-datalabels v2.2.0
102
- * https://chartjs-plugin-datalabels.netlify.app
103
- * (c) 2017-2022 chartjs-plugin-datalabels contributors
104
- * Released under the MIT license
105
- */var Fg=function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var e=window.screen;if(e)return(e.deviceXDPI||1)/(e.logicalXDPI||1)}return 1}(),to={toTextLines:function(e){var t=[],n;for(e=[].concat(e);e.length;)n=e.pop(),typeof n=="string"?t.unshift.apply(t,n.split(`
106
- `)):Array.isArray(n)?e.push.apply(e,n):he(e)||t.unshift(""+n);return t},textSize:function(e,t,n){var i=[].concat(t),r=i.length,o=e.font,s=0,a;for(e.font=n.string,a=0;a<r;++a)s=Math.max(e.measureText(i[a]).width,s);return e.font=o,{height:r*n.lineHeight,width:s}},bound:function(e,t,n){return Math.max(e,Math.min(t,n))},arrayDiff:function(e,t){var n=e.slice(),i=[],r,o,s,a;for(r=0,s=t.length;r<s;++r)a=t[r],o=n.indexOf(a),o===-1?i.push([a,1]):n.splice(o,1);for(r=0,s=n.length;r<s;++r)i.push([n[r],-1]);return i},rasterize:function(e){return Math.round(e*Fg)/Fg}};function Zl(e,t){var n=t.x,i=t.y;if(n===null)return{x:0,y:-1};if(i===null)return{x:1,y:0};var r=e.x-n,o=e.y-i,s=Math.sqrt(r*r+o*o);return{x:s?r/s:0,y:s?o/s:-1}}function X9(e,t,n,i,r){switch(r){case"center":n=i=0;break;case"bottom":n=0,i=1;break;case"right":n=1,i=0;break;case"left":n=-1,i=0;break;case"top":n=0,i=-1;break;case"start":n=-n,i=-i;break;case"end":break;default:r*=Math.PI/180,n=Math.cos(r),i=Math.sin(r);break}return{x:e,y:t,vx:n,vy:i}}var Y9=0,Qb=1,Kb=2,qb=4,ev=8;function hs(e,t,n){var i=Y9;return e<n.left?i|=Qb:e>n.right&&(i|=Kb),t<n.top?i|=ev:t>n.bottom&&(i|=qb),i}function Z9(e,t){for(var n=e.x0,i=e.y0,r=e.x1,o=e.y1,s=hs(n,i,t),a=hs(r,o,t),l,c,u;!(!(s|a)||s&a);)l=s||a,l&ev?(c=n+(r-n)*(t.top-i)/(o-i),u=t.top):l&qb?(c=n+(r-n)*(t.bottom-i)/(o-i),u=t.bottom):l&Kb?(u=i+(o-i)*(t.right-n)/(r-n),c=t.right):l&Qb&&(u=i+(o-i)*(t.left-n)/(r-n),c=t.left),l===s?(n=c,i=u,s=hs(n,i,t)):(r=c,o=u,a=hs(r,o,t));return{x0:n,x1:r,y0:i,y1:o}}function gs(e,t){var n=t.anchor,i=e,r,o;return t.clamp&&(i=Z9(i,t.area)),n==="start"?(r=i.x0,o=i.y0):n==="end"?(r=i.x1,o=i.y1):(r=(i.x0+i.x1)/2,o=(i.y0+i.y1)/2),X9(r,o,e.vx,e.vy,t.align)}var ps={arc:function(e,t){var n=(e.startAngle+e.endAngle)/2,i=Math.cos(n),r=Math.sin(n),o=e.innerRadius,s=e.outerRadius;return gs({x0:e.x+i*o,y0:e.y+r*o,x1:e.x+i*s,y1:e.y+r*s,vx:i,vy:r},t)},point:function(e,t){var n=Zl(e,t.origin),i=n.x*e.options.radius,r=n.y*e.options.radius;return gs({x0:e.x-i,y0:e.y-r,x1:e.x+i,y1:e.y+r,vx:n.x,vy:n.y},t)},bar:function(e,t){var n=Zl(e,t.origin),i=e.x,r=e.y,o=0,s=0;return e.horizontal?(i=Math.min(e.x,e.base),o=Math.abs(e.base-e.x)):(r=Math.min(e.y,e.base),s=Math.abs(e.base-e.y)),gs({x0:i,y0:r+s,x1:i+o,y1:r,vx:n.x,vy:n.y},t)},fallback:function(e,t){var n=Zl(e,t.origin);return gs({x0:e.x,y0:e.y,x1:e.x+(e.width||0),y1:e.y+(e.height||0),vx:n.x,vy:n.y},t)}},Tn=to.rasterize;function J9(e){var t=e.borderWidth||0,n=e.padding,i=e.size.height,r=e.size.width,o=-r/2,s=-i/2;return{frame:{x:o-n.left-t,y:s-n.top-t,w:r+n.width+t*2,h:i+n.height+t*2},text:{x:o,y:s,w:r,h:i}}}function U9(e,t){var n=t.chart.getDatasetMeta(t.datasetIndex).vScale;if(!n)return null;if(n.xCenter!==void 0&&n.yCenter!==void 0)return{x:n.xCenter,y:n.yCenter};var i=n.getBasePixel();return e.horizontal?{x:i,y:null}:{x:null,y:i}}function Q9(e){return e instanceof Fn?ps.arc:e instanceof Mi?ps.point:e instanceof un?ps.bar:ps.fallback}function K9(e,t,n,i,r,o){var s=Math.PI/2;if(o){var a=Math.min(o,r/2,i/2),l=t+a,c=n+a,u=t+i-a,d=n+r-a;e.moveTo(t,c),l<u&&c<d?(e.arc(l,c,a,-Math.PI,-s),e.arc(u,c,a,-s,0),e.arc(u,d,a,0,s),e.arc(l,d,a,s,Math.PI)):l<u?(e.moveTo(l,n),e.arc(u,c,a,-s,s),e.arc(l,c,a,s,Math.PI+s)):c<d?(e.arc(l,c,a,-Math.PI,0),e.arc(l,d,a,0,Math.PI)):e.arc(l,c,a,-Math.PI,Math.PI),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,i,r)}function q9(e,t,n){var i=n.backgroundColor,r=n.borderColor,o=n.borderWidth;!i&&(!r||!o)||(e.beginPath(),K9(e,Tn(t.x)+o/2,Tn(t.y)+o/2,Tn(t.w)-o,Tn(t.h)-o,n.borderRadius),e.closePath(),i&&(e.fillStyle=i,e.fill()),r&&o&&(e.strokeStyle=r,e.lineWidth=o,e.lineJoin="miter",e.stroke()))}function e6(e,t,n){var i=n.lineHeight,r=e.w,o=e.x,s=e.y+i/2;return t==="center"?o+=r/2:(t==="end"||t==="right")&&(o+=r),{h:i,w:r,x:o,y:s}}function t6(e,t,n){var i=e.shadowBlur,r=n.stroked,o=Tn(n.x),s=Tn(n.y),a=Tn(n.w);r&&e.strokeText(t,o,s,a),n.filled&&(i&&r&&(e.shadowBlur=0),e.fillText(t,o,s,a),i&&r&&(e.shadowBlur=i))}function n6(e,t,n,i){var r=i.textAlign,o=i.color,s=!!o,a=i.font,l=t.length,c=i.textStrokeColor,u=i.textStrokeWidth,d=c&&u,f;if(!(!l||!s&&!d))for(n=e6(n,r,a),e.font=a.string,e.textAlign=r,e.textBaseline="middle",e.shadowBlur=i.textShadowBlur,e.shadowColor=i.textShadowColor,s&&(e.fillStyle=o),d&&(e.lineJoin="round",e.lineWidth=u,e.strokeStyle=c),f=0,l=t.length;f<l;++f)t6(e,t[f],{stroked:d,filled:s,w:n.w,x:n.x,y:n.y+n.h*f})}var tv=function(e,t,n,i){var r=this;r._config=e,r._index=i,r._model=null,r._rects=null,r._ctx=t,r._el=n};et(tv.prototype,{_modelize:function(e,t,n,i){var r=this,o=r._index,s=Ue(Le([n.font,{}],i,o)),a=Le([n.color,$e.color],i,o);return{align:Le([n.align,"center"],i,o),anchor:Le([n.anchor,"center"],i,o),area:i.chart.chartArea,backgroundColor:Le([n.backgroundColor,null],i,o),borderColor:Le([n.borderColor,null],i,o),borderRadius:Le([n.borderRadius,0],i,o),borderWidth:Le([n.borderWidth,0],i,o),clamp:Le([n.clamp,!1],i,o),clip:Le([n.clip,!1],i,o),color:a,display:e,font:s,lines:t,offset:Le([n.offset,4],i,o),opacity:Le([n.opacity,1],i,o),origin:U9(r._el,i),padding:ot(Le([n.padding,4],i,o)),positioner:Q9(r._el),rotation:Le([n.rotation,0],i,o)*(Math.PI/180),size:to.textSize(r._ctx,t,s),textAlign:Le([n.textAlign,"start"],i,o),textShadowBlur:Le([n.textShadowBlur,0],i,o),textShadowColor:Le([n.textShadowColor,a],i,o),textStrokeColor:Le([n.textStrokeColor,a],i,o),textStrokeWidth:Le([n.textStrokeWidth,0],i,o)}},update:function(e){var t=this,n=null,i=null,r=t._index,o=t._config,s,a,l,c=Le([o.display,!0],e,r);c&&(s=e.dataset.data[r],a=ae(Fe(o.formatter,[s,e]),s),l=he(a)?[]:to.toTextLines(a),l.length&&(n=t._modelize(c,l,o,e),i=J9(n))),t._model=n,t._rects=i},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(e,t){var n=this,i=e.ctx,r=n._model,o=n._rects,s;this.visible()&&(i.save(),r.clip&&(s=r.area,i.beginPath(),i.rect(s.left,s.top,s.right-s.left,s.bottom-s.top),i.clip()),i.globalAlpha=to.bound(0,r.opacity,1),i.translate(Tn(t.x),Tn(t.y)),i.rotate(r.rotation),q9(i,o.frame,r),n6(i,r.lines,o.text,r),i.restore())}});var i6=Number.MIN_SAFE_INTEGER||-9007199254740991,r6=Number.MAX_SAFE_INTEGER||9007199254740991;function Fr(e,t,n){var i=Math.cos(n),r=Math.sin(n),o=t.x,s=t.y;return{x:o+i*(e.x-o)-r*(e.y-s),y:s+r*(e.x-o)+i*(e.y-s)}}function Og(e,t){var n=r6,i=i6,r=t.origin,o,s,a,l,c;for(o=0;o<e.length;++o)s=e[o],a=s.x-r.x,l=s.y-r.y,c=t.vx*a+t.vy*l,n=Math.min(n,c),i=Math.max(i,c);return{min:n,max:i}}function ms(e,t){var n=t.x-e.x,i=t.y-e.y,r=Math.sqrt(n*n+i*i);return{vx:(t.x-e.x)/r,vy:(t.y-e.y)/r,origin:e,ln:r}}var nv=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};et(nv.prototype,{center:function(){var e=this._rect;return{x:e.x+e.w/2,y:e.y+e.h/2}},update:function(e,t,n){this._rotation=n,this._rect={x:t.x+e.x,y:t.y+e.y,w:t.w,h:t.h}},contains:function(e){var t=this,n=1,i=t._rect;return e=Fr(e,t.center(),-t._rotation),!(e.x<i.x-n||e.y<i.y-n||e.x>i.x+i.w+n*2||e.y>i.y+i.h+n*2)},intersects:function(e){var t=this._points(),n=e._points(),i=[ms(t[0],t[1]),ms(t[0],t[3])],r,o,s;for(this._rotation!==e._rotation&&i.push(ms(n[0],n[1]),ms(n[0],n[3])),r=0;r<i.length;++r)if(o=Og(t,i[r]),s=Og(n,i[r]),o.max<s.min||s.max<o.min)return!1;return!0},_points:function(){var e=this,t=e._rect,n=e._rotation,i=e.center();return[Fr({x:t.x,y:t.y},i,n),Fr({x:t.x+t.w,y:t.y},i,n),Fr({x:t.x+t.w,y:t.y+t.h},i,n),Fr({x:t.x,y:t.y+t.h},i,n)]}});function iv(e,t,n){var i=t.positioner(e,t),r=i.vx,o=i.vy;if(!r&&!o)return{x:i.x,y:i.y};var s=n.w,a=n.h,l=t.rotation,c=Math.abs(s/2*Math.cos(l))+Math.abs(a/2*Math.sin(l)),u=Math.abs(s/2*Math.sin(l))+Math.abs(a/2*Math.cos(l)),d=1/Math.max(Math.abs(r),Math.abs(o));return c*=r*d,u*=o*d,c+=t.offset*r,u+=t.offset*o,{x:i.x+c,y:i.y+u}}function o6(e,t){var n,i,r,o;for(n=e.length-1;n>=0;--n)for(r=e[n].$layout,i=n-1;i>=0&&r._visible;--i)o=e[i].$layout,o._visible&&r._box.intersects(o._box)&&t(r,o);return e}function s6(e){var t,n,i,r,o,s,a;for(t=0,n=e.length;t<n;++t)i=e[t],r=i.$layout,r._visible&&(a=new Proxy(i._el,{get:(l,c)=>l.getProps([c],!0)[c]}),o=i.geometry(),s=iv(a,i.model(),o),r._box.update(s,o,i.rotation()));return o6(e,function(l,c){var u=l._hidable,d=c._hidable;u&&d||d?c._visible=!1:u&&(l._visible=!1)})}var no={prepare:function(e){var t=[],n,i,r,o,s;for(n=0,r=e.length;n<r;++n)for(i=0,o=e[n].length;i<o;++i)s=e[n][i],t.push(s),s.$layout={_box:new nv,_hidable:!1,_visible:!0,_set:n,_idx:s._index};return t.sort(function(a,l){var c=a.$layout,u=l.$layout;return c._idx===u._idx?u._set-c._set:u._idx-c._idx}),this.update(t),t},update:function(e){var t=!1,n,i,r,o,s;for(n=0,i=e.length;n<i;++n)r=e[n],o=r.model(),s=r.$layout,s._hidable=o&&o.display==="auto",s._visible=r.visible(),t|=s._hidable;t&&s6(e)},lookup:function(e,t){var n,i;for(n=e.length-1;n>=0;--n)if(i=e[n].$layout,i&&i._visible&&i._box.contains(t))return e[n];return null},draw:function(e,t){var n,i,r,o,s,a;for(n=0,i=t.length;n<i;++n)r=t[n],o=r.$layout,o._visible&&(s=r.geometry(),a=iv(r._el,r.model(),s),o._box.update(a,s,r.rotation()),r.draw(e,a))}},a6=function(e){if(he(e))return null;var t=e,n,i,r;if(be(e))if(!he(e.label))t=e.label;else if(!he(e.r))t=e.r;else for(t="",n=Object.keys(e),r=0,i=n.length;r<i;++r)t+=(r!==0?", ":"")+n[r]+": "+e[n[r]];return""+t},l6={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:a6,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},St="$datalabels",rv="$default";function c6(e,t){var n=e.datalabels,i={},r=[],o,s;return n===!1?null:(n===!0&&(n={}),t=et({},[t,n]),o=t.labels||{},s=Object.keys(o),delete t.labels,s.length?s.forEach(function(a){o[a]&&r.push(et({},[t,o[a],{_key:a}]))}):r.push(t),i=r.reduce(function(a,l){return Me(l.listeners||{},function(c,u){a[u]=a[u]||{},a[u][l._key||rv]=c}),delete l.listeners,a},{}),{labels:r,listeners:i})}function Hc(e,t,n,i){if(t){var r=n.$context,o=n.$groups,s;t[o._set]&&(s=t[o._set][o._key],s&&Fe(s,[r,i])===!0&&(e[St]._dirty=!0,n.update(r)))}}function u6(e,t,n,i,r){var o,s;!n&&!i||(n?i?n!==i&&(s=o=!0):s=!0:o=!0,s&&Hc(e,t.leave,n,r),o&&Hc(e,t.enter,i,r))}function d6(e,t){var n=e[St],i=n._listeners,r,o;if(!(!i.enter&&!i.leave)){if(t.type==="mousemove")o=no.lookup(n._labels,t);else if(t.type!=="mouseout")return;r=n._hovered,n._hovered=o,u6(e,i,r,o,t)}}function f6(e,t){var n=e[St],i=n._listeners.click,r=i&&no.lookup(n._labels,t);r&&Hc(e,i,r,t)}var ov={id:"datalabels",defaults:l6,beforeInit:function(e){e[St]={_actives:[]}},beforeUpdate:function(e){var t=e[St];t._listened=!1,t._listeners={},t._datasets=[],t._labels=[]},afterDatasetUpdate:function(e,t,n){var i=t.index,r=e[St],o=r._datasets[i]=[],s=e.isDatasetVisible(i),a=e.data.datasets[i],l=c6(a,n),c=t.meta.data||[],u=e.ctx,d,f,h,g,p,m,b,y;for(u.save(),d=0,h=c.length;d<h;++d)if(b=c[d],b[St]=[],s&&b&&e.getDataVisibility(d)&&!b.skip)for(f=0,g=l.labels.length;f<g;++f)p=l.labels[f],m=p._key,y=new tv(p,u,b,d),y.$groups={_set:i,_key:m||rv},y.$context={active:!1,chart:e,dataIndex:d,dataset:a,datasetIndex:i},y.update(y.$context),b[St].push(y),o.push(y);u.restore(),et(r._listeners,l.listeners,{merger:function(x,I,C){I[x]=I[x]||{},I[x][t.index]=C[x],r._listened=!0}})},afterUpdate:function(e){e[St]._labels=no.prepare(e[St]._datasets)},afterDatasetsDraw:function(e){no.draw(e,e[St]._labels)},beforeEvent:function(e,t){if(e[St]._listened){var n=t.event;switch(n.type){case"mousemove":case"mouseout":d6(e,n);break;case"click":f6(e,n);break}}},afterEvent:function(e){var t=e[St],n=t._actives,i=t._actives=e.getActiveElements(),r=to.arrayDiff(n,i),o,s,a,l,c,u,d;for(o=0,s=r.length;o<s;++o)if(c=r[o],c[1])for(d=c[0].element[St]||[],a=0,l=d.length;a<l;++a)u=d[a],u.$context.active=c[1]===1,u.update(u.$context);(t._dirty||r.length)&&(no.update(t._labels),e.render()),delete t._dirty}};tt.register(Fn,Gi,ji,ov);tt.defaults.font.family="'Rubik', 'Inter', sans-serif";const h6=({labels:e,dataValues:t,colors:n,title:i,tableHeader:r="",renderLegendTable:o})=>{const[s,a]=S.useState(!1),l=["#ff6503","#ff8533","#ffa366","#3a3a3a","#4a4a4a","#5a5a5a","#dae0e8","#c5cdd7","#b0b8c6","#9ba5b5"],c=n||l.slice(0,e.length>l.length?l.length:e.length),u={labels:e,datasets:[{data:t,backgroundColor:c,hoverBackgroundColor:c.map(p=>p+"CC"),borderWidth:2}]},d=t.reduce((p,m)=>p+m,0),f={responsive:!0,cutout:"70%",maintainAspectRatio:!1,plugins:{title:{display:!1},legend:{display:!1},datalabels:{color:"var(--chart-text-color)",formatter:(p,m)=>{const b=m.chart.data.datasets[0].data.reduce((x,I)=>x+I,0);return`${(p/b*100).toFixed(2)+"%"}
107
- (${p})`},font:function(p){const m=p.chart.width,b=Math.round(m/32);return{weight:"bold",size:b>12?12:b}},backgroundColor:"var(--brand-light)",borderRadius:24,padding:{top:8,bottom:8,left:10,right:10},anchor:"end",display:!1},tooltip:{callbacks:{label:p=>{const m=p.raw;return`${(m/d*100).toFixed(2)}% (${m})`}}}}},h=e.map((p,m)=>({id:m+1,label:p,percentage:(t[m]/d*100).toFixed(2)+"%",value:t[m]})),g=v.jsx("div",{className:"space-y-2",children:h.map(p=>v.jsxs("div",{className:"flex items-center justify-between p-2 border-b",style:{borderColor:"var(--border-color)"},children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{style:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:c[p.id-1]}}),v.jsx("span",{style:{color:"var(--text-color)"},children:p.label})]}),v.jsxs("div",{className:"flex gap-4",children:[v.jsx("span",{style:{color:"var(--secondary-text-color)"},children:p.percentage}),v.jsxs("span",{style:{color:"var(--secondary-text-color)"},children:["(",p.value,")"]})]})]},p.id))});return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"flex flex-row flex-1 items-end",children:[v.jsx("div",{className:"w-2/3 h-64",children:v.jsx(Ub,{data:u,options:f})}),v.jsx(Yu,{legends:e,colors:c,dataValues:t,showAllLegends:s,onClick:()=>a(!s)})]}),v.jsx(fu,{isOpen:s,onClose:()=>{a(!1)},title:`${i||"Chart"} Legends:`,showFooter:!1,body:o?o(h):g})]})},Ce={brandOrange:"#ff6503",brandDark:"#3a3a3a",brandDarkSecondary:"#2c2c2c",brandLight:"#dae0e8",brandOrange10:"rgba(255, 101, 3, 0.1)",appBgColor:"#ffffff",appBgColorDark:"#111111",bgColor:"#ffffff",textColor:"#3a3a3a",hoverBgColor:"#f3f4f6",sidebarHoverBg:"#dae0e8",gridColor:"rgba(0, 0, 0, 0.08)",chartTextColor:"#3a3a3a",chartGridColor:"rgba(0, 0, 0, 0.08)",chartLabelColor:"#4b5563",borderColor:"#e5e7eb",secondaryTextColor:"#6b7280",disabledTextColor:"#9ca3af",statusErrorBg:"#fee2e2",statusErrorText:"#b91c1c",statusErrorBorder:"#fca5a5",statusWarningBg:"#fef3c7",statusWarningText:"#92400e",statusWarningBorder:"#fcd34d",statusSuccessBg:"#f0fdf4",statusSuccessText:"#166534",statusSuccessBorder:"#bbf7d0",fontFamily:"'Rubik', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",fontFamilyHeading:"'Afacad', 'Rubik', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},g6={bgColor:"#3a3a3a",textColor:"#f9fafb",hoverBgColor:"#4b4b4b",sidebarHoverBg:"#2c2c2c",gridColor:"rgba(255, 255, 255, 0.1)",chartTextColor:"#f9fafb",chartGridColor:"rgba(255, 255, 255, 0.1)",chartLabelColor:"#d1d5db",borderColor:"#4b5563",secondaryTextColor:"#9ca3af",disabledTextColor:"#6b7280",statusErrorBg:"#450a0a",statusErrorText:"#fca5a5",statusErrorBorder:"#991b1b",statusWarningBg:"#451a03",statusWarningText:"#fcd34d",statusWarningBorder:"#b45309",statusSuccessBg:"rgba(20, 83, 45, 0.2)",statusSuccessText:"#bbf7d0",statusSuccessBorder:"#166534"},sv=S.createContext(void 0),av=({children:e,defaultTheme:t,config:n={},storageKey:i="theme"})=>{const r=()=>{if(typeof window<"u"){const g=localStorage.getItem(i);if(g==="light"||g==="dark")return g}return t||(typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")},[o,s]=S.useState(r),[a,l]=S.useState(()=>({...Ce,...n})),c=S.useMemo(()=>o==="dark"?{...a,...g6,...n}:{...a,...n},[o,a,n]);S.useEffect(()=>{if(typeof window>"u")return;const g=window.document.documentElement;g.classList.remove(o==="light"?"dark":"light"),g.classList.add(o),localStorage.setItem(i,o);const p={"--brand-orange":c.brandOrange||Ce.brandOrange,"--brand-dark":c.brandDark||Ce.brandDark,"--brand-dark-secondary":c.brandDarkSecondary||Ce.brandDarkSecondary,"--brand-light":c.brandLight||Ce.brandLight,"--brand-orange-10":c.brandOrange10||Ce.brandOrange10,"--app-bg-color":c.appBgColor||Ce.appBgColor,"--app-bg-color-dark":c.appBgColorDark||Ce.appBgColorDark,"--bg-color":c.bgColor||Ce.bgColor,"--text-color":c.textColor||Ce.textColor,"--hover-bg-color":c.hoverBgColor||Ce.hoverBgColor,"--sidebar-hover-bg":c.sidebarHoverBg||Ce.sidebarHoverBg,"--grid-color":c.gridColor||Ce.gridColor,"--chart-text-color":c.chartTextColor||Ce.chartTextColor,"--chart-grid-color":c.chartGridColor||Ce.chartGridColor,"--chart-label-color":c.chartLabelColor||Ce.chartLabelColor,"--border-color":c.borderColor||Ce.borderColor,"--secondary-text-color":c.secondaryTextColor||Ce.secondaryTextColor,"--disabled-text-color":c.disabledTextColor||Ce.disabledTextColor,"--status-error-bg":c.statusErrorBg||Ce.statusErrorBg,"--status-error-text":c.statusErrorText||Ce.statusErrorText,"--status-error-border":c.statusErrorBorder||Ce.statusErrorBorder,"--status-warning-bg":c.statusWarningBg||Ce.statusWarningBg,"--status-warning-text":c.statusWarningText||Ce.statusWarningText,"--status-warning-border":c.statusWarningBorder||Ce.statusWarningBorder,"--status-success-bg":c.statusSuccessBg||Ce.statusSuccessBg,"--status-success-text":c.statusSuccessText||Ce.statusSuccessText,"--status-success-border":c.statusSuccessBorder||Ce.statusSuccessBorder,"--font-family":c.fontFamily||Ce.fontFamily,"--font-family-heading":c.fontFamilyHeading||Ce.fontFamilyHeading,...c.customVariables||{}};Object.entries(p).forEach(([m,b])=>{g.style.setProperty(m,b)}),c.fontFamily&&(document.body.style.fontFamily=c.fontFamily),document.body.style.backgroundColor=o==="dark"?c.appBgColorDark||Ce.appBgColorDark:c.appBgColor||Ce.appBgColor},[o,c,i]);const h={theme:o,toggleTheme:()=>{s(g=>g==="light"?"dark":"light")},setTheme:g=>{s(g)},config:c,updateConfig:g=>{l(p=>({...p,...g}))}};return v.jsx(sv.Provider,{value:h,children:e})},nl=()=>{const e=S.useContext(sv);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};tt.register(Fn,Gi,ji,ov);tt.defaults.font.family="'Rubik', 'Inter', sans-serif";const p6=({labels:e,dataValues:t,colors:n,title:i="",tableHeader:r="",renderLegendTable:o})=>{const[s,a]=S.useState(!1),{theme:l}=nl(),c=["#ff6503","#ff8533","#ffa366","#3a3a3a","#4a4a4a"],u=n||c.slice(0,e.length>c.length?c.length:e.length),d={labels:e,datasets:[{data:t,backgroundColor:u,hoverBackgroundColor:u.map(m=>m+"CC"),borderColor:"var(--border-color)",borderWidth:1}]},f=t.reduce((m,b)=>m+b,0),h={responsive:!0,maintainAspectRatio:!1,plugins:{title:{display:!1},legend:{display:!1},datalabels:{color:"#fff",anchor:"center",align:"center",formatter:(m,b)=>{const y=b.chart.data.datasets[0].data.reduce((C,M)=>{const R=Number(M);return isNaN(R)?C:C+R},0);return`${Math.round(m/y*100)+"%"}`},font:function(m){const b=m.chart.width,y=Math.round(b/24);return{weight:"bold",size:y>14?14:y}}},tooltip:{callbacks:{label:m=>{const b=m.raw,y=t.reduce((I,C)=>I+C,0);return` ${(b/y*100).toFixed(2)}% (${b})`}}}}},g=e.map((m,b)=>({id:b+1,label:m,percentage:(t[b]/f*100).toFixed(2)+"%",value:t[b]})),p=v.jsx("div",{className:"space-y-2",children:g.map(m=>v.jsxs("div",{className:"flex items-center justify-between p-2 border-b",style:{borderColor:"var(--border-color)"},children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{style:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:u[m.id-1]}}),v.jsx("span",{style:{color:"var(--text-color)"},children:m.label})]}),v.jsxs("div",{className:"flex gap-4",children:[v.jsx("span",{style:{color:"var(--secondary-text-color)"},children:m.percentage}),v.jsxs("span",{style:{color:"var(--secondary-text-color)"},children:["(",m.value,")"]})]})]},m.id))});return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"pie-chart-container flex flex-row flex-1 items-end",children:[v.jsx("div",{className:"w-2/3 h-64",children:v.jsx(W9,{data:d,options:h})}),v.jsx(Yu,{legends:e,colors:u,dataValues:t,showAllLegends:s,onClick:()=>a(!s)})]}),v.jsx(fu,{isOpen:s,onClose:()=>{a(!1)},title:`${i||"Chart"} Legends:`,showFooter:!1,body:o?o(g):p})]})};tt.register(...$9);tt.register(cr,Nn,un,Mi,On,ud,Gi,ji);tt.defaults.font.family="'Rubik', 'Inter', sans-serif";const m6=({chartData:e,title:t})=>{const{theme:n}=nl(),i=getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim()||(n==="dark"?"#fff":"#333333"),r=S.useMemo(()=>({responsive:!0,maintainAspectRatio:!1,interaction:{mode:"nearest",intersect:!1},scales:{y:{beginAtZero:!0,grid:{color:getComputedStyle(document.documentElement).getPropertyValue("--chart-grid-color").trim()},ticks:{maxTicksLimit:8,font:{size:12,weight:"bold"},color:i},border:{color:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()}},x:{grid:{display:!1,color:getComputedStyle(document.documentElement).getPropertyValue("--chart-grid-color").trim()},ticks:{font:{size:12,weight:"bold"},color:i},border:{color:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()}}},plugins:{datalabels:{color:i,font:{weight:"bold",size:14},anchor:"end",align:"left",formatter:(s,a)=>a.dataset.label==="Blue Bar"?s.toLocaleString():""},legend:{display:!1,labels:{color:i}},title:{display:!0,text:t||"",color:i,font:{weight:"600",size:20},position:"top",align:"start"},tooltip:{backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--bg-color").trim(),titleColor:i,bodyColor:i,borderColor:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim(),borderWidth:1,callbacks:{label:function(s){return`${s.dataset.type==="line"?"Trend":"Value"}: ${s.raw}`}}}}}),[t,n,i]),o=S.useMemo(()=>{var s;return e!=null&&e.monthlyData?{labels:(s=e.monthlyData)==null?void 0:s.map(a=>a.month),datasets:[{label:`${t}`,type:"line",data:e.monthlyData.map(a=>a.value),borderColor:getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim(),borderWidth:3,pointRadius:4,pointBackgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--bg-color").trim(),pointBorderColor:getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim(),pointBorderWidth:3,tension:0,fill:!1,yAxisID:"y",stack:"stack 1"},{label:`${t}`,type:"bar",data:e.monthlyData.map(a=>a.value),backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim(),borderSkipped:!1,maxBarThickness:30,stack:"Stack 0",borderRadius:{topLeft:20,topRight:20,bottomLeft:0,bottomRight:0}}]}:{labels:[],datasets:[]}},[e,t]);return v.jsx("div",{className:"vertical-bar-chart",style:{height:"400px"},children:v.jsx(dd,{type:"bar",options:r,data:o})})};tt.register(cr,Li,Nn,un,ud,Gi,ji);tt.defaults.font.family="'Rubik', 'Inter', sans-serif";const b6=({data:e,maxValue:t=5e4,scaleType:n=mi.LINEAR})=>{const{theme:i}=nl(),r=getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim()||(i==="dark"?"#fff":"#333333"),{processedData:o,computedMaxValue:s}=S.useMemo(()=>{const d=Object.values(e);let f=[...d],h=t;if(n===mi.NORMALISED){const g=Math.min(...d),m=Math.max(...d)-g;f=d.map(b=>(b-g)/m*100),h=100}else n===mi.LOG?(f=d.map(g=>Math.max(g,.1)),h=t||Math.max(...f)*1.1):h=t||Math.max(...d)*1.1;return{processedData:Object.keys(e).reduce((g,p,m)=>(g[p]=f[m],g),{}),computedMaxValue:h}},[e,n,t]),a=Math.max(300,Object.keys(e).length*50),l=d=>n===mi.NORMALISED?`Value: ${e[Object.keys(e)[d.dataIndex]].toLocaleString()} (${d.raw.toFixed(2)}%)`:`Value: ${d.raw.toLocaleString()}`,c={indexAxis:"y",responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1,labels:{color:r}},title:{display:!1},datalabels:{color:"#ffff",font:{weight:"bold",size:14},anchor:"end",align:"left",formatter:(d,f)=>f.dataset.label==="Blue Bar"?d.toLocaleString():""},tooltip:{backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--bg-color").trim(),titleColor:r,bodyColor:r,borderColor:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim(),borderWidth:1,callbacks:{label:d=>l(d)}}},scales:{x:{type:n===mi.LOG?"logarithmic":"linear",max:s,grid:{display:!1,offset:!1,color:getComputedStyle(document.documentElement).getPropertyValue("--chart-grid-color").trim()},ticks:{font:{size:11.19,weight:"400"},color:r},border:{color:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()}},y:{grid:{display:!1,color:getComputedStyle(document.documentElement).getPropertyValue("--chart-grid-color").trim()},ticks:{font:{size:10.33,weight:"500"},color:r,align:"center",callback:function(d){const f=this.getLabelForValue(d),h=25;return f.length>h?f.slice(0,h)+"...":f}},border:{color:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()}}}},u={labels:Object.keys(e),datasets:[{label:"Bar Chart",data:Object.values(o),backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim(),borderRadius:{topLeft:0,topRight:20,bottomLeft:0,bottomRight:20},barThickness:25,borderSkipped:!1,grouped:!1,maxBarThickness:30,stack:"foreground"}]};return v.jsx("div",{className:"horizontal-bar-chart-container",style:{height:`${a}px`},children:v.jsx(H9,{options:c,data:u})})};function lv(e,t=2){if(e===0)return"0 bytes";const n=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],i=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,i)).toFixed(t)} ${n[i]}`}const v6=({icon:e,value:t,isSize:n=!1,label:i})=>{const r=S.useMemo(()=>{if(!n)return t;const o=typeof t=="number"?t:parseInt(t,10),s=lv(o).split(" ");return{size:s[0],unit:s[1]}},[t,n]);return v.jsxs("div",{className:"flex flex-col select-none items-center justify-center rounded-lg relative w-full shadow-sm !p-0",style:{border:"1px solid var(--border-color)"},children:[v.jsxs("div",{className:"flex flex-col flex-1 items-center justify-center p-0",children:[v.jsx("div",{className:"p-2",style:{color:"var(--brand-orange)"},children:typeof e=="string"?v.jsx("img",{src:e,alt:i,className:"h-10 w-10 md:h-16 md:w-16 lg:h-20 lg:w-20 object-contain"}):v.jsx("div",{className:"text-4xl md:text-5xl lg:text-6xl",children:e})}),v.jsxs("div",{className:"font-bold text-center text-xl md:text-2xl lg:text-3xl mt-2",style:{color:"var(--chart-text-color)"},children:[n?r.size:r,n&&v.jsx("span",{className:"ml-1 text-sm md:text-base",style:{color:"var(--secondary-text-color)"},children:r.unit})]})]}),v.jsx("div",{className:"flex items-center justify-center font-bold p-2 w-full text-center text-sm md:text-base border-t",style:{backgroundColor:"var(--brand-light)",color:"var(--brand-dark)",borderTopColor:"var(--border-color)"},children:i})]})};tt.register(Fn,Gi,ji);tt.defaults.font.family="'Rubik', 'Inter', sans-serif";const x6=e=>`
108
- input[type=range] {
109
- height: 4px;
110
- -webkit-appearance: none;
111
- width: 100%;
112
- position: absolute;
113
- top: 0;
114
- margin: 0;
115
- padding: 0;
116
- background: none;
117
- pointer-events: none;
118
- }
119
-
120
- /* Center thumbs vertically on the track */
121
- input[type=range]::-webkit-slider-runnable-track {
122
- height: 1px;
123
- -webkit-appearance: none;
124
- color: #13bba4;
125
- }
126
-
127
- input[type=range]::-webkit-slider-thumb {
128
- -webkit-appearance: none;
129
- width: ${e}px;
130
- height: ${e}px;
131
- border-radius: 50%;
132
- background: #ffffff;
133
- cursor: pointer;
134
- box-shadow: 0 1px 3px rgba(0,0,0,0.3);
135
- border: 2px solid gray;
136
- margin-top: -0.8rem;
137
- pointer-events: all;
138
- z-index: 3;
139
- }
140
-
141
- input[type=range]::-moz-range-track {
142
- height: 1px;
143
- -moz-appearance: none;
144
- color: #13bba4;
145
- }
146
-
147
- input[type=range]::-moz-range-thumb {
148
- width: ${e}px;
149
- height: ${e}px;
150
- border-radius: 50%;
151
- background: #ffffff;
152
- cursor: pointer;
153
- box-shadow: 0 1px 3px rgba(0,0,0,0.3);
154
- border: 2px solid gray;
155
- margin-top: -0.8rem;
156
- pointer-events: all;
157
- }
158
- `,y6=({title:e,data:t,maxValue:n,minRange:i=0,maxRange:r=10,onMinRangeChange:o,onMaxRangeChange:s,showRangeSlider:a=!1,sliderMin:l=0,sliderMax:c=10,sliderStep:u=.1,formatSliderLabel:d=h=>`${h.toFixed(1)}Y`,hasData:f=!0})=>{const[h,g]=S.useState(0),p=S.useRef(null),[m,b]=S.useState(i),[y,x]=S.useState(r),I=t,C=n>0?I/n*100:0,M=25;S.useEffect(()=>{const F=()=>{if(p.current){const V=p.current.offsetWidth;g(j=>j!==V?V:j)}};return window.addEventListener("resize",F),F(),()=>window.removeEventListener("resize",F)},[]),S.useEffect(()=>{b(i)},[i]),S.useEffect(()=>{x(r)},[r]);const R=S.useMemo(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{title:{display:!1,text:e||"Gauge Chart",color:"#302d2eff",font:{weight:"bold",size:24},position:"top",align:"start",padding:{top:0}},legend:{display:!1},tooltip:{enabled:!1},datalabels:{display:!1}}}),[e]),w=S.useMemo(()=>({datasets:[{data:f?[C,100-C]:[0,100],backgroundColor:f?[getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim()||"#ff6503",getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8"]:[getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8",getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8"],borderWidth:0,cutout:"75%",circumference:300,rotation:-150}]}),[C,f]),_=S.useCallback(F=>{const V=parseFloat(F.target.value);b(V)},[]),A=S.useCallback(F=>{const V=parseFloat(F.target.value);x(V)},[]),k=S.useCallback(()=>{o==null||o(m)},[m,o]),D=S.useCallback(()=>{s==null||s(y)},[y,s]),B=c-l,N=B>0?(m-l)/B*100:0,P=B>0?(y-l)/B*100:0,O=`${N}%`,T=`${P}%`,E=S.useMemo(()=>{const F=getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8",V=getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim()||"#ff6503";return{background:`linear-gradient(to right, ${F} 0%, ${F} ${N}%,
159
- ${V} ${N}%, ${V} ${P}%, ${F} ${P}%, ${F} 100%)`}},[N,P]);return v.jsxs("div",{className:"retention flex flex-col items-center rounded-xl select-none p-3",children:[v.jsx("div",{className:"w-full flex flex-col items-center justify-center p-2 mb-4",children:v.jsxs("div",{className:"relative w-11/12 h-64 flex items-center justify-center",children:[v.jsx(Ub,{data:w,options:R}),v.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:f?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-xl font-bold",style:{color:"var(--chart-text-color)"},children:I.toLocaleString()}),v.jsx("span",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:e})]}):v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-lg font-medium",style:{color:"var(--secondary-text-color)"},children:"No Data"}),v.jsx("span",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:"Available"})]})})]})}),a&&v.jsx("div",{className:"w-full px-6",children:v.jsxs("div",{className:"relative w-full",ref:p,children:[v.jsx("style",{children:x6(M)}),v.jsx("div",{className:"absolute top-0 w-full h-1 rounded-full",style:E}),v.jsx("input",{type:"range",min:l,max:c,step:u,value:m,onChange:_,onMouseUp:k,onTouchEnd:k,className:"w-full"}),v.jsx("input",{type:"range",min:l,max:c,step:u,value:y,onChange:A,onMouseUp:D,onTouchEnd:D,className:"w-full"}),v.jsx("div",{className:"absolute flex items-center justify-center w-8 h-8 text-white text-xs font-bold rounded",style:{left:O,top:"-40px",transform:"translateX(-50%)",clipPath:"polygon(0% 0%, 100% 0%, 100% 80%, 60% 80%, 50% 100%, 40% 80%, 0% 80%)",backgroundColor:"var(--brand-orange)"},children:d(m)}),v.jsx("div",{className:"absolute flex items-center justify-center w-8 h-8 text-white text-xs font-bold rounded",style:{left:T,top:"-40px",transform:"translateX(-50%)",clipPath:"polygon(0% 0%, 100% 0%, 100% 80%, 60% 80%, 50% 100%, 40% 80%, 0% 80%)",backgroundColor:"var(--brand-dark)"},children:d(y)})]})})]})};class ii{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let i=0;for(let r=0;r<this._n&&r<32;r++){const o=n[r],s=t+o,a=Math.abs(t)<Math.abs(o)?t-(s-o):o-(s-t);a&&(n[i++]=a),t=s}return n[i]=t,this._n=i+1,this}valueOf(){const t=this._partials;let n=this._n,i,r,o,s=0;if(n>0){for(s=t[--n];n>0&&(i=s,r=t[--n],s=i+r,o=r-(s-i),!o););n>0&&(o<0&&t[n-1]<0||o>0&&t[n-1]>0)&&(r=o*2,i=s+r,r==i-s&&(s=i))}return s}}function*C6(e){for(const t of e)yield*t}function cv(e){return Array.from(C6(e))}function Ji(e,t,n){e=+e,t=+t,n=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(r);++i<r;)o[i]=e+i*n;return o}var ie=1e-6,hd=1e-12,me=Math.PI,ze=me/2,Tg=me/4,Ot=me*2,xt=180/me,Oe=me/180,xe=Math.abs,yr=Math.atan,gn=Math.atan2,fe=Math.cos,bs=Math.ceil,uv=Math.exp,wa=Math.log,Jl=Math.pow,ce=Math.sin,$t=Math.sign||function(e){return e>0?1:e<0?-1:0},Ct=Math.sqrt,gd=Math.tan;function dv(e){return e>1?0:e<-1?me:Math.acos(e)}function Gt(e){return e>1?ze:e<-1?-ze:Math.asin(e)}function Ke(){}function Sa(e,t){e&&Ng.hasOwnProperty(e.type)&&Ng[e.type](e,t)}var Dg={Feature:function(e,t){Sa(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i<r;)Sa(n[i].geometry,t)}},Ng={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)e=n[i],t.point(e[0],e[1],e[2])},LineString:function(e,t){Wc(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)Wc(n[i],t,0)},Polygon:function(e,t){Lg(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)Lg(n[i],t)},GeometryCollection:function(e,t){for(var n=e.geometries,i=-1,r=n.length;++i<r;)Sa(n[i],t)}};function Wc(e,t,n){var i=-1,r=e.length-n,o;for(t.lineStart();++i<r;)o=e[i],t.point(o[0],o[1],o[2]);t.lineEnd()}function Lg(e,t){var n=-1,i=e.length;for(t.polygonStart();++n<i;)Wc(e[n],t,1);t.polygonEnd()}function bi(e,t){e&&Dg.hasOwnProperty(e.type)?Dg[e.type](e,t):Sa(e,t)}function Xc(e){return[gn(e[1],e[0]),Gt(e[2])]}function ur(e){var t=e[0],n=e[1],i=fe(n);return[i*fe(t),i*ce(t),ce(n)]}function vs(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Ia(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Ul(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function xs(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Yc(e){var t=Ct(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Zc(e,t){function n(i,r){return i=e(i,r),t(i[0],i[1])}return e.invert&&t.invert&&(n.invert=function(i,r){return i=t.invert(i,r),i&&e.invert(i[0],i[1])}),n}function Jc(e,t){return xe(e)>me&&(e-=Math.round(e/Ot)*Ot),[e,t]}Jc.invert=Jc;function fv(e,t,n){return(e%=Ot)?t||n?Zc(Bg(e),$g(t,n)):Bg(e):t||n?$g(t,n):Jc}function Vg(e){return function(t,n){return t+=e,xe(t)>me&&(t-=Math.round(t/Ot)*Ot),[t,n]}}function Bg(e){var t=Vg(e);return t.invert=Vg(-e),t}function $g(e,t){var n=fe(e),i=ce(e),r=fe(t),o=ce(t);function s(a,l){var c=fe(l),u=fe(a)*c,d=ce(a)*c,f=ce(l),h=f*n+u*i;return[gn(d*r-h*o,u*n-f*i),Gt(h*r+d*o)]}return s.invert=function(a,l){var c=fe(l),u=fe(a)*c,d=ce(a)*c,f=ce(l),h=f*r-d*o;return[gn(d*r+f*o,u*n+h*i),Gt(h*n-u*i)]},s}function w6(e){e=fv(e[0]*Oe,e[1]*Oe,e.length>2?e[2]*Oe:0);function t(n){return n=e(n[0]*Oe,n[1]*Oe),n[0]*=xt,n[1]*=xt,n}return t.invert=function(n){return n=e.invert(n[0]*Oe,n[1]*Oe),n[0]*=xt,n[1]*=xt,n},t}function S6(e,t,n,i,r,o){if(n){var s=fe(t),a=ce(t),l=i*n;r==null?(r=t+i*Ot,o=t-l/2):(r=jg(s,r),o=jg(s,o),(i>0?r<o:r>o)&&(r+=i*Ot));for(var c,u=r;i>0?u>o:u<o;u-=l)c=Xc([s,-a*fe(u),-a*ce(u)]),e.point(c[0],c[1])}}function jg(e,t){t=ur(t),t[0]-=e,Yc(t);var n=dv(-t[1]);return((-t[2]<0?-n:n)+Ot-ie)%Ot}function hv(){var e=[],t;return{point:function(n,i,r){t.push([n,i,r])},lineStart:function(){e.push(t=[])},lineEnd:Ke,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function zs(e,t){return xe(e[0]-t[0])<ie&&xe(e[1]-t[1])<ie}function ys(e,t,n,i){this.x=e,this.z=t,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function gv(e,t,n,i,r){var o=[],s=[],a,l;if(e.forEach(function(g){if(!((p=g.length-1)<=0)){var p,m=g[0],b=g[p],y;if(zs(m,b)){if(!m[2]&&!b[2]){for(r.lineStart(),a=0;a<p;++a)r.point((m=g[a])[0],m[1]);r.lineEnd();return}b[0]+=2*ie}o.push(y=new ys(m,g,null,!0)),s.push(y.o=new ys(m,null,y,!1)),o.push(y=new ys(b,g,null,!1)),s.push(y.o=new ys(b,null,y,!0))}}),!!o.length){for(s.sort(t),Gg(o),Gg(s),a=0,l=s.length;a<l;++a)s[a].e=n=!n;for(var c=o[0],u,d;;){for(var f=c,h=!0;f.v;)if((f=f.n)===c)return;u=f.z,r.lineStart();do{if(f.v=f.o.v=!0,f.e){if(h)for(a=0,l=u.length;a<l;++a)r.point((d=u[a])[0],d[1]);else i(f.x,f.n.x,1,r);f=f.n}else{if(h)for(u=f.p.z,a=u.length-1;a>=0;--a)r.point((d=u[a])[0],d[1]);else i(f.x,f.p.x,-1,r);f=f.p}f=f.o,u=f.z,h=!h}while(!f.v);r.lineEnd()}}}function Gg(e){if(t=e.length){for(var t,n=0,i=e[0],r;++n<t;)i.n=r=e[n],r.p=i,i=r;i.n=r=e[0],r.p=i}}function Ql(e){return xe(e[0])<=me?e[0]:$t(e[0])*((xe(e[0])+me)%Ot-me)}function pv(e,t){var n=Ql(t),i=t[1],r=ce(i),o=[ce(n),-fe(n),0],s=0,a=0,l=new ii;r===1?i=ze+ie:r===-1&&(i=-ze-ie);for(var c=0,u=e.length;c<u;++c)if(f=(d=e[c]).length)for(var d,f,h=d[f-1],g=Ql(h),p=h[1]/2+Tg,m=ce(p),b=fe(p),y=0;y<f;++y,g=I,m=M,b=R,h=x){var x=d[y],I=Ql(x),C=x[1]/2+Tg,M=ce(C),R=fe(C),w=I-g,_=w>=0?1:-1,A=_*w,k=A>me,D=m*M;if(l.add(gn(D*_*ce(A),b*R+D*fe(A))),s+=k?w+_*Ot:w,k^g>=n^I>=n){var B=Ia(ur(h),ur(x));Yc(B);var N=Ia(o,B);Yc(N);var P=(k^w>=0?-1:1)*Gt(N[2]);(i>P||i===P&&(B[0]||B[1]))&&(a+=k^w>=0?1:-1)}}return(s<-ie||s<ie&&l<-hd)^a&1}function mv(e,t,n,i){return function(r){var o=t(r),s=hv(),a=t(s),l=!1,c,u,d,f={point:h,lineStart:p,lineEnd:m,polygonStart:function(){f.point=b,f.lineStart=y,f.lineEnd=x,u=[],c=[]},polygonEnd:function(){f.point=h,f.lineStart=p,f.lineEnd=m,u=cv(u);var I=pv(c,i);u.length?(l||(r.polygonStart(),l=!0),gv(u,_6,I,n,r)):I&&(l||(r.polygonStart(),l=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),l&&(r.polygonEnd(),l=!1),u=c=null},sphere:function(){r.polygonStart(),r.lineStart(),n(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function h(I,C){e(I,C)&&r.point(I,C)}function g(I,C){o.point(I,C)}function p(){f.point=g,o.lineStart()}function m(){f.point=h,o.lineEnd()}function b(I,C){d.push([I,C]),a.point(I,C)}function y(){a.lineStart(),d=[]}function x(){b(d[0][0],d[0][1]),a.lineEnd();var I=a.clean(),C=s.result(),M,R=C.length,w,_,A;if(d.pop(),c.push(d),d=null,!!R){if(I&1){if(_=C[0],(w=_.length-1)>0){for(l||(r.polygonStart(),l=!0),r.lineStart(),M=0;M<w;++M)r.point((A=_[M])[0],A[1]);r.lineEnd()}return}R>1&&I&2&&C.push(C.pop().concat(C.shift())),u.push(C.filter(I6))}}return f}}function I6(e){return e.length>1}function _6(e,t){return((e=e.x)[0]<0?e[1]-ze-ie:ze-e[1])-((t=t.x)[0]<0?t[1]-ze-ie:ze-t[1])}const zg=mv(function(){return!0},E6,M6,[-me,-ze]);function E6(e){var t=NaN,n=NaN,i=NaN,r;return{lineStart:function(){e.lineStart(),r=1},point:function(o,s){var a=o>0?me:-me,l=xe(o-t);xe(l-me)<ie?(e.point(t,n=(n+s)/2>0?ze:-ze),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(a,n),e.point(o,n),r=0):i!==a&&l>=me&&(xe(t-i)<ie&&(t-=i*ie),xe(o-a)<ie&&(o-=a*ie),n=A6(t,n,o,s),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(a,n),r=0),e.point(t=o,n=s),i=a},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-r}}}function A6(e,t,n,i){var r,o,s=ce(e-n);return xe(s)>ie?yr((ce(t)*(o=fe(i))*ce(n)-ce(i)*(r=fe(t))*ce(e))/(r*o*s)):(t+i)/2}function M6(e,t,n,i){var r;if(e==null)r=n*ze,i.point(-me,r),i.point(0,r),i.point(me,r),i.point(me,0),i.point(me,-r),i.point(0,-r),i.point(-me,-r),i.point(-me,0),i.point(-me,r);else if(xe(e[0]-t[0])>ie){var o=e[0]<t[0]?me:-me;r=n*o/2,i.point(-o,r),i.point(0,r),i.point(o,r)}else i.point(t[0],t[1])}function R6(e){var t=fe(e),n=2*Oe,i=t>0,r=xe(t)>ie;function o(u,d,f,h){S6(h,e,n,f,u,d)}function s(u,d){return fe(u)*fe(d)>t}function a(u){var d,f,h,g,p;return{lineStart:function(){g=h=!1,p=1},point:function(m,b){var y=[m,b],x,I=s(m,b),C=i?I?0:c(m,b):I?c(m+(m<0?me:-me),b):0;if(!d&&(g=h=I)&&u.lineStart(),I!==h&&(x=l(d,y),(!x||zs(d,x)||zs(y,x))&&(y[2]=1)),I!==h)p=0,I?(u.lineStart(),x=l(y,d),u.point(x[0],x[1])):(x=l(d,y),u.point(x[0],x[1],2),u.lineEnd()),d=x;else if(r&&d&&i^I){var M;!(C&f)&&(M=l(y,d,!0))&&(p=0,i?(u.lineStart(),u.point(M[0][0],M[0][1]),u.point(M[1][0],M[1][1]),u.lineEnd()):(u.point(M[1][0],M[1][1]),u.lineEnd(),u.lineStart(),u.point(M[0][0],M[0][1],3)))}I&&(!d||!zs(d,y))&&u.point(y[0],y[1]),d=y,h=I,f=C},lineEnd:function(){h&&u.lineEnd(),d=null},clean:function(){return p|(g&&h)<<1}}}function l(u,d,f){var h=ur(u),g=ur(d),p=[1,0,0],m=Ia(h,g),b=vs(m,m),y=m[0],x=b-y*y;if(!x)return!f&&u;var I=t*b/x,C=-t*y/x,M=Ia(p,m),R=xs(p,I),w=xs(m,C);Ul(R,w);var _=M,A=vs(R,_),k=vs(_,_),D=A*A-k*(vs(R,R)-1);if(!(D<0)){var B=Ct(D),N=xs(_,(-A-B)/k);if(Ul(N,R),N=Xc(N),!f)return N;var P=u[0],O=d[0],T=u[1],E=d[1],F;O<P&&(F=P,P=O,O=F);var V=O-P,j=xe(V-me)<ie,G=j||V<ie;if(!j&&E<T&&(F=T,T=E,E=F),G?j?T+E>0^N[1]<(xe(N[0]-P)<ie?T:E):T<=N[1]&&N[1]<=E:V>me^(P<=N[0]&&N[0]<=O)){var $=xs(_,(-A+B)/k);return Ul($,R),[N,Xc($)]}}}function c(u,d){var f=i?e:me-e,h=0;return u<-f?h|=1:u>f&&(h|=2),d<-f?h|=4:d>f&&(h|=8),h}return mv(s,a,o,i?[0,-e]:[-me,e-me])}function P6(e,t,n,i,r,o){var s=e[0],a=e[1],l=t[0],c=t[1],u=0,d=1,f=l-s,h=c-a,g;if(g=n-s,!(!f&&g>0)){if(g/=f,f<0){if(g<u)return;g<d&&(d=g)}else if(f>0){if(g>d)return;g>u&&(u=g)}if(g=r-s,!(!f&&g<0)){if(g/=f,f<0){if(g>d)return;g>u&&(u=g)}else if(f>0){if(g<u)return;g<d&&(d=g)}if(g=i-a,!(!h&&g>0)){if(g/=h,h<0){if(g<u)return;g<d&&(d=g)}else if(h>0){if(g>d)return;g>u&&(u=g)}if(g=o-a,!(!h&&g<0)){if(g/=h,h<0){if(g>d)return;g>u&&(u=g)}else if(h>0){if(g<u)return;g<d&&(d=g)}return u>0&&(e[0]=s+u*f,e[1]=a+u*h),d<1&&(t[0]=s+d*f,t[1]=a+d*h),!0}}}}}var jr=1e9,Cs=-jr;function k6(e,t,n,i){function r(c,u){return e<=c&&c<=n&&t<=u&&u<=i}function o(c,u,d,f){var h=0,g=0;if(c==null||(h=s(c,d))!==(g=s(u,d))||l(c,u)<0^d>0)do f.point(h===0||h===3?e:n,h>1?i:t);while((h=(h+d+4)%4)!==g);else f.point(u[0],u[1])}function s(c,u){return xe(c[0]-e)<ie?u>0?0:3:xe(c[0]-n)<ie?u>0?2:1:xe(c[1]-t)<ie?u>0?1:0:u>0?3:2}function a(c,u){return l(c.x,u.x)}function l(c,u){var d=s(c,1),f=s(u,1);return d!==f?d-f:d===0?u[1]-c[1]:d===1?c[0]-u[0]:d===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,d=hv(),f,h,g,p,m,b,y,x,I,C,M,R={point:w,lineStart:D,lineEnd:B,polygonStart:A,polygonEnd:k};function w(P,O){r(P,O)&&u.point(P,O)}function _(){for(var P=0,O=0,T=h.length;O<T;++O)for(var E=h[O],F=1,V=E.length,j=E[0],G,$,Y=j[0],U=j[1];F<V;++F)G=Y,$=U,j=E[F],Y=j[0],U=j[1],$<=i?U>i&&(Y-G)*(i-$)>(U-$)*(e-G)&&++P:U<=i&&(Y-G)*(i-$)<(U-$)*(e-G)&&--P;return P}function A(){u=d,f=[],h=[],M=!0}function k(){var P=_(),O=M&&P,T=(f=cv(f)).length;(O||T)&&(c.polygonStart(),O&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),T&&gv(f,a,P,o,c),c.polygonEnd()),u=c,f=h=g=null}function D(){R.point=N,h&&h.push(g=[]),C=!0,I=!1,y=x=NaN}function B(){f&&(N(p,m),b&&I&&d.rejoin(),f.push(d.result())),R.point=w,I&&u.lineEnd()}function N(P,O){var T=r(P,O);if(h&&g.push([P,O]),C)p=P,m=O,b=T,C=!1,T&&(u.lineStart(),u.point(P,O));else if(T&&I)u.point(P,O);else{var E=[y=Math.max(Cs,Math.min(jr,y)),x=Math.max(Cs,Math.min(jr,x))],F=[P=Math.max(Cs,Math.min(jr,P)),O=Math.max(Cs,Math.min(jr,O))];P6(E,F,e,t,n,i)?(I||(u.lineStart(),u.point(E[0],E[1])),u.point(F[0],F[1]),T||u.lineEnd(),M=!1):T&&(u.lineStart(),u.point(P,O),M=!1)}y=P,x=O,I=T}return R}}var Uc,Qc,Hs,Ws,dr={sphere:Ke,point:Ke,lineStart:F6,lineEnd:Ke,polygonStart:Ke,polygonEnd:Ke};function F6(){dr.point=T6,dr.lineEnd=O6}function O6(){dr.point=dr.lineEnd=Ke}function T6(e,t){e*=Oe,t*=Oe,Qc=e,Hs=ce(t),Ws=fe(t),dr.point=D6}function D6(e,t){e*=Oe,t*=Oe;var n=ce(t),i=fe(t),r=xe(e-Qc),o=fe(r),s=ce(r),a=i*s,l=Ws*n-Hs*i*o,c=Hs*n+Ws*i*o;Uc.add(gn(Ct(a*a+l*l),c)),Qc=e,Hs=n,Ws=i}function N6(e){return Uc=new ii,bi(e,dr),+Uc}var Kc=[null,null],L6={type:"LineString",coordinates:Kc};function qc(e,t){return Kc[0]=e,Kc[1]=t,N6(L6)}var Hg={Feature:function(e,t){return _a(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i<r;)if(_a(n[i].geometry,t))return!0;return!1}},Wg={Sphere:function(){return!0},Point:function(e,t){return Xg(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)if(Xg(n[i],t))return!0;return!1},LineString:function(e,t){return Yg(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)if(Yg(n[i],t))return!0;return!1},Polygon:function(e,t){return Zg(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)if(Zg(n[i],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,i=-1,r=n.length;++i<r;)if(_a(n[i],t))return!0;return!1}};function _a(e,t){return e&&Wg.hasOwnProperty(e.type)?Wg[e.type](e,t):!1}function Xg(e,t){return qc(e,t)===0}function Yg(e,t){for(var n,i,r,o=0,s=e.length;o<s;o++){if(i=qc(e[o],t),i===0||o>0&&(r=qc(e[o],e[o-1]),r>0&&n<=r&&i<=r&&(n+i-r)*(1-Math.pow((n-i)/r,2))<hd*r))return!0;n=i}return!1}function Zg(e,t){return!!pv(e.map(V6),bv(t))}function V6(e){return e=e.map(bv),e.pop(),e}function bv(e){return[e[0]*Oe,e[1]*Oe]}function B6(e,t){return(e&&Hg.hasOwnProperty(e.type)?Hg[e.type]:_a)(e,t)}function Jg(e,t,n){var i=Ji(e,t-ie,n).concat(t);return function(r){return i.map(function(o){return[r,o]})}}function Ug(e,t,n){var i=Ji(e,t-ie,n).concat(t);return function(r){return i.map(function(o){return[o,r]})}}function vv(){var e,t,n,i,r,o,s,a,l=10,c=l,u=90,d=360,f,h,g,p,m=2.5;function b(){return{type:"MultiLineString",coordinates:y()}}function y(){return Ji(bs(i/u)*u,n,u).map(g).concat(Ji(bs(a/d)*d,s,d).map(p)).concat(Ji(bs(t/l)*l,e,l).filter(function(x){return xe(x%u)>ie}).map(f)).concat(Ji(bs(o/c)*c,r,c).filter(function(x){return xe(x%d)>ie}).map(h))}return b.lines=function(){return y().map(function(x){return{type:"LineString",coordinates:x}})},b.outline=function(){return{type:"Polygon",coordinates:[g(i).concat(p(s).slice(1),g(n).reverse().slice(1),p(a).reverse().slice(1))]}},b.extent=function(x){return arguments.length?b.extentMajor(x).extentMinor(x):b.extentMinor()},b.extentMajor=function(x){return arguments.length?(i=+x[0][0],n=+x[1][0],a=+x[0][1],s=+x[1][1],i>n&&(x=i,i=n,n=x),a>s&&(x=a,a=s,s=x),b.precision(m)):[[i,a],[n,s]]},b.extentMinor=function(x){return arguments.length?(t=+x[0][0],e=+x[1][0],o=+x[0][1],r=+x[1][1],t>e&&(x=t,t=e,e=x),o>r&&(x=o,o=r,r=x),b.precision(m)):[[t,o],[e,r]]},b.step=function(x){return arguments.length?b.stepMajor(x).stepMinor(x):b.stepMinor()},b.stepMajor=function(x){return arguments.length?(u=+x[0],d=+x[1],b):[u,d]},b.stepMinor=function(x){return arguments.length?(l=+x[0],c=+x[1],b):[l,c]},b.precision=function(x){return arguments.length?(m=+x,f=Jg(o,r,90),h=Ug(t,e,m),g=Jg(a,s,90),p=Ug(i,n,m),b):m},b.extentMajor([[-180,-90+ie],[180,90-ie]]).extentMinor([[-180,-80-ie],[180,80+ie]])}function $6(){return vv()()}const eu=e=>e;var Kl=new ii,tu=new ii,xv,yv,nu,iu,En={point:Ke,lineStart:Ke,lineEnd:Ke,polygonStart:function(){En.lineStart=j6,En.lineEnd=z6},polygonEnd:function(){En.lineStart=En.lineEnd=En.point=Ke,Kl.add(xe(tu)),tu=new ii},result:function(){var e=Kl/2;return Kl=new ii,e}};function j6(){En.point=G6}function G6(e,t){En.point=Cv,xv=nu=e,yv=iu=t}function Cv(e,t){tu.add(iu*e-nu*t),nu=e,iu=t}function z6(){Cv(xv,yv)}var fr=1/0,Ea=fr,Io=-fr,Aa=Io,Ma={point:H6,lineStart:Ke,lineEnd:Ke,polygonStart:Ke,polygonEnd:Ke,result:function(){var e=[[fr,Ea],[Io,Aa]];return Io=Aa=-(Ea=fr=1/0),e}};function H6(e,t){e<fr&&(fr=e),e>Io&&(Io=e),t<Ea&&(Ea=t),t>Aa&&(Aa=t)}var ru=0,ou=0,Gr=0,Ra=0,Pa=0,Ui=0,su=0,au=0,zr=0,wv,Sv,on,sn,Bt={point:Vi,lineStart:Qg,lineEnd:Kg,polygonStart:function(){Bt.lineStart=Y6,Bt.lineEnd=Z6},polygonEnd:function(){Bt.point=Vi,Bt.lineStart=Qg,Bt.lineEnd=Kg},result:function(){var e=zr?[su/zr,au/zr]:Ui?[Ra/Ui,Pa/Ui]:Gr?[ru/Gr,ou/Gr]:[NaN,NaN];return ru=ou=Gr=Ra=Pa=Ui=su=au=zr=0,e}};function Vi(e,t){ru+=e,ou+=t,++Gr}function Qg(){Bt.point=W6}function W6(e,t){Bt.point=X6,Vi(on=e,sn=t)}function X6(e,t){var n=e-on,i=t-sn,r=Ct(n*n+i*i);Ra+=r*(on+e)/2,Pa+=r*(sn+t)/2,Ui+=r,Vi(on=e,sn=t)}function Kg(){Bt.point=Vi}function Y6(){Bt.point=J6}function Z6(){Iv(wv,Sv)}function J6(e,t){Bt.point=Iv,Vi(wv=on=e,Sv=sn=t)}function Iv(e,t){var n=e-on,i=t-sn,r=Ct(n*n+i*i);Ra+=r*(on+e)/2,Pa+=r*(sn+t)/2,Ui+=r,r=sn*e-on*t,su+=r*(on+e),au+=r*(sn+t),zr+=r*3,Vi(on=e,sn=t)}function _v(e){this._context=e}_v.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Ot);break}}},result:Ke};var lu=new ii,ql,Ev,Av,Hr,Wr,_o={point:Ke,lineStart:function(){_o.point=U6},lineEnd:function(){ql&&Mv(Ev,Av),_o.point=Ke},polygonStart:function(){ql=!0},polygonEnd:function(){ql=null},result:function(){var e=+lu;return lu=new ii,e}};function U6(e,t){_o.point=Mv,Ev=Hr=e,Av=Wr=t}function Mv(e,t){Hr-=e,Wr-=t,lu.add(Ct(Hr*Hr+Wr*Wr)),Hr=e,Wr=t}let qg,ka,ep,tp;class np{constructor(t){this._append=t==null?Rv:Q6(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==ep||this._append!==ka){const i=this._radius,r=this._;this._="",this._append`m0,${i}a${i},${i} 0 1,1 0,${-2*i}a${i},${i} 0 1,1 0,${2*i}z`,ep=i,ka=this._append,tp=this._,this._=r}this._+=tp;break}}}result(){const t=this._;return this._="",t.length?t:null}}function Rv(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Q6(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return Rv;if(t!==qg){const n=10**t;qg=t,ka=function(r){let o=1;this._+=r[0];for(const s=r.length;o<s;++o)this._+=Math.round(arguments[o]*n)/n+r[o]}}return ka}function ip(e,t){let n=3,i=4.5,r,o;function s(a){return a&&(typeof i=="function"&&o.pointRadius(+i.apply(this,arguments)),bi(a,r(o))),o.result()}return s.area=function(a){return bi(a,r(En)),En.result()},s.measure=function(a){return bi(a,r(_o)),_o.result()},s.bounds=function(a){return bi(a,r(Ma)),Ma.result()},s.centroid=function(a){return bi(a,r(Bt)),Bt.result()},s.projection=function(a){return arguments.length?(r=a==null?(e=null,eu):(e=a).stream,s):e},s.context=function(a){return arguments.length?(o=a==null?(t=null,new np(n)):new _v(t=a),typeof i!="function"&&o.pointRadius(i),s):t},s.pointRadius=function(a){return arguments.length?(i=typeof a=="function"?a:(o.pointRadius(+a),+a),s):i},s.digits=function(a){if(!arguments.length)return n;if(a==null)n=null;else{const l=Math.floor(a);if(!(l>=0))throw new RangeError(`invalid digits: ${a}`);n=l}return t===null&&(o=new np(n)),s},s.projection(e).digits(n).context(t)}function pd(e){return function(t){var n=new cu;for(var i in e)n[i]=e[i];return n.stream=t,n}}function cu(){}cu.prototype={constructor:cu,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function md(e,t,n){var i=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),i!=null&&e.clipExtent(null),bi(n,e.stream(Ma)),t(Ma.result()),i!=null&&e.clipExtent(i),e}function bd(e,t,n){return md(e,function(i){var r=t[1][0]-t[0][0],o=t[1][1]-t[0][1],s=Math.min(r/(i[1][0]-i[0][0]),o/(i[1][1]-i[0][1])),a=+t[0][0]+(r-s*(i[1][0]+i[0][0]))/2,l=+t[0][1]+(o-s*(i[1][1]+i[0][1]))/2;e.scale(150*s).translate([a,l])},n)}function Pv(e,t,n){return bd(e,[[0,0],t],n)}function kv(e,t,n){return md(e,function(i){var r=+t,o=r/(i[1][0]-i[0][0]),s=(r-o*(i[1][0]+i[0][0]))/2,a=-o*i[0][1];e.scale(150*o).translate([s,a])},n)}function Fv(e,t,n){return md(e,function(i){var r=+t,o=r/(i[1][1]-i[0][1]),s=-o*i[0][0],a=(r-o*(i[1][1]+i[0][1]))/2;e.scale(150*o).translate([s,a])},n)}var rp=16,K6=fe(30*Oe);function op(e,t){return+t?eR(e,t):q6(e)}function q6(e){return pd({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function eR(e,t){function n(i,r,o,s,a,l,c,u,d,f,h,g,p,m){var b=c-i,y=u-r,x=b*b+y*y;if(x>4*t&&p--){var I=s+f,C=a+h,M=l+g,R=Ct(I*I+C*C+M*M),w=Gt(M/=R),_=xe(xe(M)-1)<ie||xe(o-d)<ie?(o+d)/2:gn(C,I),A=e(_,w),k=A[0],D=A[1],B=k-i,N=D-r,P=y*B-b*N;(P*P/x>t||xe((b*B+y*N)/x-.5)>.3||s*f+a*h+l*g<K6)&&(n(i,r,o,s,a,l,k,D,_,I/=R,C/=R,M,p,m),m.point(k,D),n(k,D,_,I,C,M,c,u,d,f,h,g,p,m))}}return function(i){var r,o,s,a,l,c,u,d,f,h,g,p,m={point:b,lineStart:y,lineEnd:I,polygonStart:function(){i.polygonStart(),m.lineStart=C},polygonEnd:function(){i.polygonEnd(),m.lineStart=y}};function b(w,_){w=e(w,_),i.point(w[0],w[1])}function y(){d=NaN,m.point=x,i.lineStart()}function x(w,_){var A=ur([w,_]),k=e(w,_);n(d,f,u,h,g,p,d=k[0],f=k[1],u=w,h=A[0],g=A[1],p=A[2],rp,i),i.point(d,f)}function I(){m.point=b,i.lineEnd()}function C(){y(),m.point=M,m.lineEnd=R}function M(w,_){x(r=w,_),o=d,s=f,a=h,l=g,c=p,m.point=x}function R(){n(d,f,u,h,g,p,o,s,r,a,l,c,rp,i),m.lineEnd=I,I()}return m}}var tR=pd({point:function(e,t){this.stream.point(e*Oe,t*Oe)}});function nR(e){return pd({point:function(t,n){var i=e(t,n);return this.stream.point(i[0],i[1])}})}function iR(e,t,n,i,r){function o(s,a){return s*=i,a*=r,[t+e*s,n-e*a]}return o.invert=function(s,a){return[(s-t)/e*i,(n-a)/e*r]},o}function sp(e,t,n,i,r,o){if(!o)return iR(e,t,n,i,r);var s=fe(o),a=ce(o),l=s*e,c=a*e,u=s/e,d=a/e,f=(a*n-s*t)/e,h=(a*t+s*n)/e;function g(p,m){return p*=i,m*=r,[l*p-c*m+t,n-c*p-l*m]}return g.invert=function(p,m){return[i*(u*p-d*m+f),r*(h-d*p-u*m)]},g}function jn(e){return Ov(function(){return e})()}function Ov(e){var t,n=150,i=480,r=250,o=0,s=0,a=0,l=0,c=0,u,d=0,f=1,h=1,g=null,p=zg,m=null,b,y,x,I=eu,C=.5,M,R,w,_,A;function k(P){return w(P[0]*Oe,P[1]*Oe)}function D(P){return P=w.invert(P[0],P[1]),P&&[P[0]*xt,P[1]*xt]}k.stream=function(P){return _&&A===P?_:_=tR(nR(u)(p(M(I(A=P)))))},k.preclip=function(P){return arguments.length?(p=P,g=void 0,N()):p},k.postclip=function(P){return arguments.length?(I=P,m=b=y=x=null,N()):I},k.clipAngle=function(P){return arguments.length?(p=+P?R6(g=P*Oe):(g=null,zg),N()):g*xt},k.clipExtent=function(P){return arguments.length?(I=P==null?(m=b=y=x=null,eu):k6(m=+P[0][0],b=+P[0][1],y=+P[1][0],x=+P[1][1]),N()):m==null?null:[[m,b],[y,x]]},k.scale=function(P){return arguments.length?(n=+P,B()):n},k.translate=function(P){return arguments.length?(i=+P[0],r=+P[1],B()):[i,r]},k.center=function(P){return arguments.length?(o=P[0]%360*Oe,s=P[1]%360*Oe,B()):[o*xt,s*xt]},k.rotate=function(P){return arguments.length?(a=P[0]%360*Oe,l=P[1]%360*Oe,c=P.length>2?P[2]%360*Oe:0,B()):[a*xt,l*xt,c*xt]},k.angle=function(P){return arguments.length?(d=P%360*Oe,B()):d*xt},k.reflectX=function(P){return arguments.length?(f=P?-1:1,B()):f<0},k.reflectY=function(P){return arguments.length?(h=P?-1:1,B()):h<0},k.precision=function(P){return arguments.length?(M=op(R,C=P*P),N()):Ct(C)},k.fitExtent=function(P,O){return bd(k,P,O)},k.fitSize=function(P,O){return Pv(k,P,O)},k.fitWidth=function(P,O){return kv(k,P,O)},k.fitHeight=function(P,O){return Fv(k,P,O)};function B(){var P=sp(n,0,0,f,h,d).apply(null,t(o,s)),O=sp(n,i-P[0],r-P[1],f,h,d);return u=fv(a,l,c),R=Zc(t,O),w=Zc(u,R),M=op(R,C),N()}function N(){return _=A=null,k}return function(){return t=e.apply(this,arguments),k.invert=t.invert&&D,B()}}function vd(e){var t=0,n=me/3,i=Ov(e),r=i(t,n);return r.parallels=function(o){return arguments.length?i(t=o[0]*Oe,n=o[1]*Oe):[t*xt,n*xt]},r}function rR(e){var t=fe(e);function n(i,r){return[i*t,ce(r)/t]}return n.invert=function(i,r){return[i/t,Gt(r*t)]},n}function oR(e,t){var n=ce(e),i=(n+ce(t))/2;if(xe(i)<ie)return rR(e);var r=1+n*(2*i-n),o=Ct(r)/i;function s(a,l){var c=Ct(r-2*i*ce(l))/i;return[c*ce(a*=i),o-c*fe(a)]}return s.invert=function(a,l){var c=o-l,u=gn(a,xe(c))*$t(c);return c*i<0&&(u-=me*$t(a)*$t(c)),[u/i,Gt((r-(a*a+c*c)*i*i)/(2*i))]},s}function Fa(){return vd(oR).scale(155.424).center([0,33.6442])}function Tv(){return Fa().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function sR(e){var t=e.length;return{point:function(n,i){for(var r=-1;++r<t;)e[r].point(n,i)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}function aR(){var e,t,n=Tv(),i,r=Fa().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,s=Fa().rotate([157,0]).center([-3,19.9]).parallels([8,18]),a,l,c={point:function(f,h){l=[f,h]}};function u(f){var h=f[0],g=f[1];return l=null,i.point(h,g),l||(o.point(h,g),l)||(a.point(h,g),l)}u.invert=function(f){var h=n.scale(),g=n.translate(),p=(f[0]-g[0])/h,m=(f[1]-g[1])/h;return(m>=.12&&m<.234&&p>=-.425&&p<-.214?r:m>=.166&&m<.234&&p>=-.214&&p<-.115?s:n).invert(f)},u.stream=function(f){return e&&t===f?e:e=sR([n.stream(t=f),r.stream(f),s.stream(f)])},u.precision=function(f){return arguments.length?(n.precision(f),r.precision(f),s.precision(f),d()):n.precision()},u.scale=function(f){return arguments.length?(n.scale(f),r.scale(f*.35),s.scale(f),u.translate(n.translate())):n.scale()},u.translate=function(f){if(!arguments.length)return n.translate();var h=n.scale(),g=+f[0],p=+f[1];return i=n.translate(f).clipExtent([[g-.455*h,p-.238*h],[g+.455*h,p+.238*h]]).stream(c),o=r.translate([g-.307*h,p+.201*h]).clipExtent([[g-.425*h+ie,p+.12*h+ie],[g-.214*h-ie,p+.234*h-ie]]).stream(c),a=s.translate([g-.205*h,p+.212*h]).clipExtent([[g-.214*h+ie,p+.166*h+ie],[g-.115*h-ie,p+.234*h-ie]]).stream(c),d()},u.fitExtent=function(f,h){return bd(u,f,h)},u.fitSize=function(f,h){return Pv(u,f,h)},u.fitWidth=function(f,h){return kv(u,f,h)},u.fitHeight=function(f,h){return Fv(u,f,h)};function d(){return e=t=null,u}return u.scale(1070)}function Dv(e){return function(t,n){var i=fe(t),r=fe(n),o=e(i*r);return o===1/0?[2,0]:[o*r*ce(t),o*ce(n)]}}function Vo(e){return function(t,n){var i=Ct(t*t+n*n),r=e(i),o=ce(r),s=fe(r);return[gn(t*o,i*s),Gt(i&&n*o/i)]}}var Nv=Dv(function(e){return Ct(2/(1+e))});Nv.invert=Vo(function(e){return 2*Gt(e/2)});function lR(){return jn(Nv).scale(124.75).clipAngle(180-.001)}var Lv=Dv(function(e){return(e=dv(e))&&e/ce(e)});Lv.invert=Vo(function(e){return e});function cR(){return jn(Lv).scale(79.4188).clipAngle(180-.001)}function il(e,t){return[e,wa(gd((ze+t)/2))]}il.invert=function(e,t){return[e,2*yr(uv(t))-ze]};function uR(){return Vv(il).scale(961/Ot)}function Vv(e){var t=jn(e),n=t.center,i=t.scale,r=t.translate,o=t.clipExtent,s=null,a,l,c;t.scale=function(d){return arguments.length?(i(d),u()):i()},t.translate=function(d){return arguments.length?(r(d),u()):r()},t.center=function(d){return arguments.length?(n(d),u()):n()},t.clipExtent=function(d){return arguments.length?(d==null?s=a=l=c=null:(s=+d[0][0],a=+d[0][1],l=+d[1][0],c=+d[1][1]),u()):s==null?null:[[s,a],[l,c]]};function u(){var d=me*i(),f=t(w6(t.rotate()).invert([0,0]));return o(s==null?[[f[0]-d,f[1]-d],[f[0]+d,f[1]+d]]:e===il?[[Math.max(f[0]-d,s),a],[Math.min(f[0]+d,l),c]]:[[s,Math.max(f[1]-d,a)],[l,Math.min(f[1]+d,c)]])}return u()}function ws(e){return gd((ze+e)/2)}function dR(e,t){var n=fe(e),i=e===t?ce(e):wa(n/fe(t))/wa(ws(t)/ws(e)),r=n*Jl(ws(e),i)/i;if(!i)return il;function o(s,a){r>0?a<-ze+ie&&(a=-ze+ie):a>ze-ie&&(a=ze-ie);var l=r/Jl(ws(a),i);return[l*ce(i*s),r-l*fe(i*s)]}return o.invert=function(s,a){var l=r-a,c=$t(i)*Ct(s*s+l*l),u=gn(s,xe(l))*$t(l);return l*i<0&&(u-=me*$t(s)*$t(l)),[u/i,2*yr(Jl(r/c,1/i))-ze]},o}function fR(){return vd(dR).scale(109.5).parallels([30,30])}function Oa(e,t){return[e,t]}Oa.invert=Oa;function hR(){return jn(Oa).scale(152.63)}function gR(e,t){var n=fe(e),i=e===t?ce(e):(n-fe(t))/(t-e),r=n/i+e;if(xe(i)<ie)return Oa;function o(s,a){var l=r-a,c=i*s;return[l*ce(c),r-l*fe(c)]}return o.invert=function(s,a){var l=r-a,c=gn(s,xe(l))*$t(l);return l*i<0&&(c-=me*$t(s)*$t(l)),[c/i,r-$t(i)*Ct(s*s+l*l)]},o}function pR(){return vd(gR).scale(131.154).center([0,13.9389])}var io=1.340264,ro=-.081106,oo=893e-6,so=.003796,Ta=Ct(3)/2,mR=12;function Bv(e,t){var n=Gt(Ta*ce(t)),i=n*n,r=i*i*i;return[e*fe(n)/(Ta*(io+3*ro*i+r*(7*oo+9*so*i))),n*(io+ro*i+r*(oo+so*i))]}Bv.invert=function(e,t){for(var n=t,i=n*n,r=i*i*i,o=0,s,a,l;o<mR&&(a=n*(io+ro*i+r*(oo+so*i))-t,l=io+3*ro*i+r*(7*oo+9*so*i),n-=s=a/l,i=n*n,r=i*i*i,!(xe(s)<hd));++o);return[Ta*e*(io+3*ro*i+r*(7*oo+9*so*i))/fe(n),Gt(ce(n)/Ta)]};function bR(){return jn(Bv).scale(177.158)}function $v(e,t){var n=fe(t),i=fe(e)*n;return[n*ce(e)/i,ce(t)/i]}$v.invert=Vo(yr);function vR(){return jn($v).scale(144.049).clipAngle(60)}function jv(e,t){var n=t*t,i=n*n;return[e*(.8707-.131979*n+i*(-.013791+i*(.003971*n-.001529*i))),t*(1.007226+n*(.015085+i*(-.044475+.028874*n-.005916*i)))]}jv.invert=function(e,t){var n=t,i=25,r;do{var o=n*n,s=o*o;n-=r=(n*(1.007226+o*(.015085+s*(-.044475+.028874*o-.005916*s)))-t)/(1.007226+o*(.015085*3+s*(-.044475*7+.028874*9*o-.005916*11*s)))}while(xe(r)>ie&&--i>0);return[e/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function xR(){return jn(jv).scale(175.295)}function Gv(e,t){return[fe(t)*ce(e),ce(t)]}Gv.invert=Vo(Gt);function yR(){return jn(Gv).scale(249.5).clipAngle(90+ie)}function zv(e,t){var n=fe(t),i=1+fe(e)*n;return[n*ce(e)/i,ce(t)/i]}zv.invert=Vo(function(e){return 2*yr(e)});function CR(){return jn(zv).scale(250).clipAngle(142)}function Hv(e,t){return[wa(gd((ze+t)/2)),-e]}Hv.invert=function(e,t){return[-t,2*yr(uv(e))-ze]};function wR(){var e=Vv(Hv),t=e.center,n=e.rotate;return e.center=function(i){return arguments.length?t([-i[1],i[0]]):(i=t(),[i[1],-i[0]])},e.rotate=function(i){return arguments.length?n([i[0],i[1],i.length>2?i[2]+90:90]):(i=n(),[i[0],i[1],i[2]-90])},n([0,0,90]).scale(159.155)}function _e(e){for(var t=e.length/6|0,n=new Array(t),i=0;i<t;)n[i]="#"+e.slice(i*6,++i*6);return n}function rl(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function xd(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Cr(){}var Bi=.7,hr=1/Bi,nr="\\s*([+-]?\\d+)\\s*",Eo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",dn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",SR=/^#([0-9a-f]{3,8})$/,IR=new RegExp(`^rgb\\(${nr},${nr},${nr}\\)$`),_R=new RegExp(`^rgb\\(${dn},${dn},${dn}\\)$`),ER=new RegExp(`^rgba\\(${nr},${nr},${nr},${Eo}\\)$`),AR=new RegExp(`^rgba\\(${dn},${dn},${dn},${Eo}\\)$`),MR=new RegExp(`^hsl\\(${Eo},${dn},${dn}\\)$`),RR=new RegExp(`^hsla\\(${Eo},${dn},${dn},${Eo}\\)$`),ap={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};rl(Cr,yd,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:lp,formatHex:lp,formatHex8:PR,formatHsl:kR,formatRgb:cp,toString:cp});function lp(){return this.rgb().formatHex()}function PR(){return this.rgb().formatHex8()}function kR(){return Xv(this).formatHsl()}function cp(){return this.rgb().formatRgb()}function yd(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=SR.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?up(t):n===3?new mt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ss(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ss(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=IR.exec(e))?new mt(t[1],t[2],t[3],1):(t=_R.exec(e))?new mt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ER.exec(e))?Ss(t[1],t[2],t[3],t[4]):(t=AR.exec(e))?Ss(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=MR.exec(e))?hp(t[1],t[2]/100,t[3]/100,1):(t=RR.exec(e))?hp(t[1],t[2]/100,t[3]/100,t[4]):ap.hasOwnProperty(e)?up(ap[e]):e==="transparent"?new mt(NaN,NaN,NaN,0):null}function up(e){return new mt(e>>16&255,e>>8&255,e&255,1)}function Ss(e,t,n,i){return i<=0&&(e=t=n=NaN),new mt(e,t,n,i)}function Wv(e){return e instanceof Cr||(e=yd(e)),e?(e=e.rgb(),new mt(e.r,e.g,e.b,e.opacity)):new mt}function Ao(e,t,n,i){return arguments.length===1?Wv(e):new mt(e,t,n,i??1)}function mt(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}rl(mt,Ao,xd(Cr,{brighter(e){return e=e==null?hr:Math.pow(hr,e),new mt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Bi:Math.pow(Bi,e),new mt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new mt(Ri(this.r),Ri(this.g),Ri(this.b),Da(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:dp,formatHex:dp,formatHex8:FR,formatRgb:fp,toString:fp}));function dp(){return`#${wi(this.r)}${wi(this.g)}${wi(this.b)}`}function FR(){return`#${wi(this.r)}${wi(this.g)}${wi(this.b)}${wi((isNaN(this.opacity)?1:this.opacity)*255)}`}function fp(){const e=Da(this.opacity);return`${e===1?"rgb(":"rgba("}${Ri(this.r)}, ${Ri(this.g)}, ${Ri(this.b)}${e===1?")":`, ${e})`}`}function Da(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ri(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function wi(e){return e=Ri(e),(e<16?"0":"")+e.toString(16)}function hp(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Jt(e,t,n,i)}function Xv(e){if(e instanceof Jt)return new Jt(e.h,e.s,e.l,e.opacity);if(e instanceof Cr||(e=yd(e)),!e)return new Jt;if(e instanceof Jt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),o=Math.max(t,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(t===o?s=(n-i)/a+(n<i)*6:n===o?s=(i-t)/a+2:s=(t-n)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new Jt(s,a,l,e.opacity)}function OR(e,t,n,i){return arguments.length===1?Xv(e):new Jt(e,t,n,i??1)}function Jt(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}rl(Jt,OR,xd(Cr,{brighter(e){return e=e==null?hr:Math.pow(hr,e),new Jt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Bi:Math.pow(Bi,e),new Jt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new mt(ec(e>=240?e-240:e+120,r,i),ec(e,r,i),ec(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new Jt(gp(this.h),Is(this.s),Is(this.l),Da(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Da(this.opacity);return`${e===1?"hsl(":"hsla("}${gp(this.h)}, ${Is(this.s)*100}%, ${Is(this.l)*100}%${e===1?")":`, ${e})`}`}}));function gp(e){return e=(e||0)%360,e<0?e+360:e}function Is(e){return Math.max(0,Math.min(1,e||0))}function ec(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const TR=Math.PI/180,DR=180/Math.PI;var Yv=-.14861,Cd=1.78277,wd=-.29227,ol=-.90649,Mo=1.97294,pp=Mo*ol,mp=Mo*Cd,bp=Cd*wd-ol*Yv;function NR(e){if(e instanceof Pi)return new Pi(e.h,e.s,e.l,e.opacity);e instanceof mt||(e=Wv(e));var t=e.r/255,n=e.g/255,i=e.b/255,r=(bp*i+pp*t-mp*n)/(bp+pp-mp),o=i-r,s=(Mo*(n-r)-wd*o)/ol,a=Math.sqrt(s*s+o*o)/(Mo*r*(1-r)),l=a?Math.atan2(s,o)*DR-120:NaN;return new Pi(l<0?l+360:l,a,r,e.opacity)}function pn(e,t,n,i){return arguments.length===1?NR(e):new Pi(e,t,n,i??1)}function Pi(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}rl(Pi,pn,xd(Cr,{brighter(e){return e=e==null?hr:Math.pow(hr,e),new Pi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Bi:Math.pow(Bi,e),new Pi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*TR,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),i=Math.cos(e),r=Math.sin(e);return new mt(255*(t+n*(Yv*i+Cd*r)),255*(t+n*(wd*i+ol*r)),255*(t+n*(Mo*i)),this.opacity)}}));function LR(e,t,n,i,r){var o=e*e,s=o*e;return((1-3*e+3*o-s)*t+(4-6*o+3*s)*n+(1+3*e+3*o-3*s)*i+s*r)/6}function VR(e){var t=e.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),r=e[i],o=e[i+1],s=i>0?e[i-1]:2*r-o,a=i<t-1?e[i+2]:2*o-r;return LR((n-i/t)*t,s,r,o,a)}}const Sd=e=>()=>e;function Zv(e,t){return function(n){return e+n*t}}function BR(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function $R(e,t){var n=t-e;return n?Zv(e,n>180||n<-180?n-360*Math.round(n/360):n):Sd(isNaN(e)?t:e)}function jR(e){return(e=+e)==1?ir:function(t,n){return n-t?BR(t,n,e):Sd(isNaN(t)?n:t)}}function ir(e,t){var n=t-e;return n?Zv(e,n):Sd(isNaN(e)?t:e)}(function e(t){var n=jR(t);function i(r,o){var s=n((r=Ao(r)).r,(o=Ao(o)).r),a=n(r.g,o.g),l=n(r.b,o.b),c=ir(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=e,i})(1);function GR(e){return function(t){var n=t.length,i=new Array(n),r=new Array(n),o=new Array(n),s,a;for(s=0;s<n;++s)a=Ao(t[s]),i[s]=a.r||0,r[s]=a.g||0,o[s]=a.b||0;return i=e(i),r=e(r),o=e(o),a.opacity=1,function(l){return a.r=i(l),a.g=r(l),a.b=o(l),a+""}}}var zR=GR(VR);function Jv(e){return function t(n){n=+n;function i(r,o){var s=e((r=pn(r)).h,(o=pn(o)).h),a=ir(r.s,o.s),l=ir(r.l,o.l),c=ir(r.opacity,o.opacity);return function(u){return r.h=s(u),r.s=a(u),r.l=l(Math.pow(u,n)),r.opacity=c(u),r+""}}return i.gamma=t,i}(1)}Jv($R);var Id=Jv(ir);const Ne=e=>zR(e[e.length-1]);var HR=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(_e);const WR=Ne(HR);var XR=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(_e);const YR=Ne(XR);var ZR=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(_e);const JR=Ne(ZR);var UR=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(_e);const QR=Ne(UR);var KR=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(_e);const qR=Ne(KR);var e8=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(_e);const t8=Ne(e8);var n8=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(_e);const i8=Ne(n8);var r8=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(_e);const o8=Ne(r8);var s8=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(_e);const a8=Ne(s8);var l8=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(_e);const c8=Ne(l8);var u8=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(_e);const d8=Ne(u8);var f8=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(_e);const h8=Ne(f8);var g8=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(_e);const p8=Ne(g8);var m8=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(_e);const b8=Ne(m8);var v8=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(_e);const x8=Ne(v8);var y8=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(_e);const C8=Ne(y8);var w8=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(_e);const S8=Ne(w8);var I8=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(_e);const _8=Ne(I8);var E8=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(_e);const A8=Ne(E8);var M8=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(_e);const R8=Ne(M8);var P8=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(_e);const k8=Ne(P8);var F8=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(_e);const O8=Ne(F8);var T8=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(_e);const D8=Ne(T8);var N8=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(_e);const L8=Ne(N8);var V8=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(_e);const B8=Ne(V8);var $8=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(_e);const j8=Ne($8);var G8=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(_e);const z8=Ne(G8);function H8(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const W8=Id(pn(300,.5,0),pn(-240,.5,1));var X8=Id(pn(-100,.75,.35),pn(80,1.5,.8)),Y8=Id(pn(260,.75,.35),pn(80,1.5,.8)),_s=pn();function Z8(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return _s.h=360*e-100,_s.s=1.5-1.5*t,_s.l=.8-.9*t,_s+""}var Es=Ao(),J8=Math.PI/3,U8=Math.PI*2/3;function Q8(e){var t;return e=(.5-e)*Math.PI,Es.r=255*(t=Math.sin(e))*t,Es.g=255*(t=Math.sin(e+J8))*t,Es.b=255*(t=Math.sin(e+U8))*t,Es+""}function K8(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function sl(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const q8=sl(_e("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var eP=sl(_e("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),tP=sl(_e("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),nP=sl(_e("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));const ao={geoAzimuthalEqualArea:lR,geoAzimuthalEquidistant:cR,geoGnomonic:vR,geoOrthographic:yR,geoStereographic:CR,geoEqualEarth:bR,geoAlbers:Tv,geoAlbersUsa:aR,geoConicConformal:fR,geoConicEqualArea:Fa,geoConicEquidistant:pR,geoEquirectangular:hR,geoMercator:uR,geoTransverseMercator:wR,geoNaturalEarth1:xR};Object.keys(ao).forEach(e=>{ao[`${e.charAt(3).toLowerCase()}${e.slice(4)}`]=ao[e]});class zi extends ai{constructor(t){super(t),this.outlineBounds=null,this.oldChartBounds=null,this.geoPath=ip()}init(t){t.position="chartArea",super.init(t),typeof t.projection=="function"?this.projection=t.projection:this.projection=(ao[t.projection]||ao.albersUsa)(),this.geoPath.projection(this.projection),this.outlineBounds=null,this.oldChartBounds=null}computeBounds(t){const n=ip(this.projection.fitWidth(1e3,t)).bounds(t),i=Math.ceil(n[1][1]-n[0][1]),r=Math.ceil(n[1][0]-n[0][0]),o=this.projection.translate();this.outlineBounds={width:r,height:i,aspectRatio:r/i,refScale:this.projection.scale(),refX:o[0],refY:o[1]}}updateBounds(){const t=this.chart.chartArea,n=this.outlineBounds;if(!n)return!1;const i=this.options.padding,r=typeof i=="number"?i:i.top,o=typeof i=="number"?i:i.left,s=typeof i=="number"?i:i.bottom,a=typeof i=="number"?i:i.right,l=t.right-t.left-o-a,c=t.bottom-t.top-r-s,u=this.oldChartBounds;this.oldChartBounds={chartWidth:l,chartHeight:c};const d=Math.min(l/n.width,c/n.height),f=n.width*d,h=n.height*d,g=(l-f)*.5+t.left+o,p=(c-h)*.5+t.top+r,m=this.options;return this.projection.scale(n.refScale*d*m.projectionScale).translate([d*n.refX+g+m.projectionOffset[0],d*n.refY+p+m.projectionOffset[1]]),!u||u.chartWidth!==this.oldChartBounds.chartWidth||u.chartHeight!==this.oldChartBounds.chartHeight}}zi.id="projection";zi.defaults={projection:"albersUsa",projectionScale:1,projectionOffset:[0,0],padding:0};zi.descriptors={_scriptable:e=>e!=="projection",_indexable:e=>e!=="projectionOffset"};const al={position:"chartArea",property:"value",grid:{z:1,drawOnChartArea:!1},ticks:{z:1},legend:{align:"right",position:"bottom-right",length:100,width:50,margin:8,indicatorWidth:10}};function iP(e){const{indicatorWidth:t,align:n,margin:i}=e,r=(typeof i=="number"?i:i.left)+(n==="right"?t:0),o=(typeof i=="number"?i:i.top)+(n==="bottom"?t:0),s=(typeof i=="number"?i:i.right)+(n==="left"?t:0),a=(typeof i=="number"?i:i.bottom)+(n==="top"?t:0);return{left:r,top:o,right:s,bottom:a}}function rP(e,t,n,i,r){const{indicatorWidth:o,align:s,position:a}=t,l=s==="top"||s==="bottom",c=(s==="left"?r.w:n)+(l?o:0),u=(s==="top"?r.h:i)+(l?0:o),d=iP(t);if(typeof a=="string")switch(a){case"top-left":return[d.left,d.top];case"top":return[(e.right-c)/2,d.top];case"left":return[d.left,(e.bottom-u)/2];case"top-right":return[e.right-c-d.right,d.top];case"bottom-right":return[e.right-c-d.right,e.bottom-u-d.bottom];case"bottom":return[(e.right-c)/2,e.bottom-u-d.bottom];case"bottom-left":return[d.left,e.bottom-u-d.bottom];default:return[e.right-c-d.right,(e.bottom-u)/2]}return[a.x,a.y]}class Qi extends Nn{constructor(){super(...arguments),this.legendSize={w:0,h:0}}init(t){t.position="chartArea",super.init(t),this.axis="r"}parse(t,n){return t&&typeof t[this.options.property]=="number"?t[this.options.property]:super.parse(t,n)}isHorizontal(){return this.options.legend.align==="top"||this.options.legend.align==="bottom"}_getNormalizedValue(t){return t==null||Number.isNaN(t)?null:(t-this._startValue)/this._valueRange}update(t,n,i){const r=Math.min(n,this.bottom==null?Number.POSITIVE_INFINITY:this.bottom),o=Math.min(t,this.right==null?Number.POSITIVE_INFINITY:this.right),s=this.options.legend,a=this.isHorizontal(),l=(h,g)=>h<1?g*h:h,c=Math.min(o,l(a?s.length:s.width,o))-(a?0:s.indicatorWidth),u=Math.min(r,l(a?s.width:s.length,r))-(a?s.indicatorWidth:0);this.legendSize={w:c,h:u},this.bottom=u,this.height=u,this.right=c,this.width=c;const d=this.options.position;this.options.position=this.options.legend.align;const f=super.update(c,u,i);return this.options.position=d,this.height=Math.min(u,this.height),this.width=Math.min(c,this.width),f}_computeLabelArea(){}draw(t){if(!this._isVisible())return;const n=rP(t,this.options.legend,this.width,this.height,this.legendSize),{ctx:i}=this;i.save(),i.translate(n[0],n[1]);const r=this.options.position;this.options.position=this.options.legend.align,super.draw({...t,bottom:this.height+10,right:this.width}),this.options.position=r;const{indicatorWidth:o}=this.options.legend;switch(this.options.legend.align){case"left":i.translate(this.legendSize.w,0);break;case"top":i.translate(0,this.legendSize.h);break;case"bottom":i.translate(0,-o);break;default:i.translate(-o,0);break}this._drawIndicator(),i.restore()}_drawIndicator(){}}class Uv extends Li{constructor(){super(...arguments),this.legendSize={w:0,h:0}}init(t){Qi.prototype.init.call(this,t)}parse(t,n){return Qi.prototype.parse.call(this,t,n)}isHorizontal(){return this.options.legend.align==="top"||this.options.legend.align==="bottom"}_getNormalizedValue(t){return t==null||Number.isNaN(t)?null:(Math.log10(t)-this._startValue)/this._valueRange}update(t,n,i){return Qi.prototype.update.call(this,t,n,i)}_computeLabelArea(){}draw(t){return Qi.prototype.draw.call(this,t)}_drawIndicator(){}}const An={interpolateBlues:O8,interpolateBrBG:WR,interpolateBuGn:c8,interpolateBuPu:d8,interpolateCividis:H8,interpolateCool:Y8,interpolateCubehelixDefault:W8,interpolateGnBu:h8,interpolateGreens:D8,interpolateGreys:L8,interpolateInferno:tP,interpolateMagma:eP,interpolateOrRd:p8,interpolateOranges:z8,interpolatePRGn:YR,interpolatePiYG:JR,interpolatePlasma:nP,interpolatePuBu:x8,interpolatePuBuGn:b8,interpolatePuOr:QR,interpolatePuRd:C8,interpolatePurples:B8,interpolateRainbow:Z8,interpolateRdBu:qR,interpolateRdGy:t8,interpolateRdPu:S8,interpolateRdYlBu:i8,interpolateRdYlGn:o8,interpolateReds:j8,interpolateSinebow:Q8,interpolateSpectral:a8,interpolateTurbo:K8,interpolateViridis:q8,interpolateWarm:X8,interpolateYlGn:A8,interpolateYlGnBu:_8,interpolateYlOrBr:R8,interpolateYlOrRd:k8};Object.keys(An).forEach(e=>{An[`${e.charAt(11).toLowerCase()}${e.slice(12)}`]=An[e],An[e.slice(11)]=An[e]});function Qv(e,t){const n=1/t;if(e<=n)return 0;if(e>=1-n)return 1;for(let i=0;i<1;i+=n)if(e<i)return i-n/2;return e}const Kv={interpolate:"blues",missing:"transparent",quantize:0};class ri extends Qi{get interpolate(){const t=this.options;return t?typeof t.interpolate=="function"?t.interpolate:An[t.interpolate]||An.blues:n=>`rgb(${n},${n},${n})`}getColorForValue(t){const n=this._getNormalizedValue(t);return n==null||Number.isNaN(n)?this.options.missing:this.getColor(n)}getColor(t){let n=t;return this.options.quantize>0&&(n=Qv(n,this.options.quantize)),this.interpolate(n)}_drawIndicator(){const{indicatorWidth:t}=this.options.legend,n=this._reversePixels;if(this.isHorizontal()){const i=this.width;if(this.options.quantize>0){const r=i/this.options.quantize,o=n?s=>i-r-s:s=>s;for(let s=0;s<i;s+=r){const a=(s+r/2)/i;this.ctx.fillStyle=this.getColor(a),this.ctx.fillRect(o(s),0,r,t)}}else{const r=n?o=>i-1-o:o=>o;for(let o=0;o<i;o+=1)this.ctx.fillStyle=this.getColor((o+.5)/i),this.ctx.fillRect(r(o),0,1,t)}}else{const i=this.height;if(this.options.quantize>0){const r=i/this.options.quantize,o=n?s=>i-r-s:s=>s;for(let s=0;s<i;s+=r){const a=(s+r/2)/i;this.ctx.fillStyle=this.getColor(a),this.ctx.fillRect(0,o(s),t,r)}}else{const r=n?o=>i-1-o:o=>o;for(let o=0;o<i;o+=1)this.ctx.fillStyle=this.getColor((o+.5)/i),this.ctx.fillRect(0,r(o),t,1)}}}}ri.id="color";ri.defaults=et({},[Nn.defaults,al,Kv]);ri.descriptors={_scriptable:e=>e!=="interpolate",_indexable:!1};class _d extends Uv{constructor(){super(...arguments),this.interpolate=t=>`rgb(${t},${t},${t})`}init(t){super.init(t),typeof t.interpolate=="function"?this.interpolate=t.interpolate:this.interpolate=An[t.interpolate]||An.blues}getColorForValue(t){return ri.prototype.getColorForValue.call(this,t)}getColor(t){let n=t;return this.options.quantize>0&&(n=Qv(n,this.options.quantize)),this.interpolate(n)}_drawIndicator(){return ri.prototype._drawIndicator.call(this)}}_d.id="colorLogarithmic";_d.defaults=et({},[Li.defaults,al,Kv]);_d.descriptors={_scriptable:e=>e!=="interpolate",_indexable:!1};const qv={missing:1,mode:"area",range:[2,20],legend:{align:"bottom",length:90,width:70,indicatorWidth:42}};class $i extends Qi{constructor(){super(...arguments),this._model=null}getSizeForValue(t){const n=this._getNormalizedValue(t);return n==null||Number.isNaN(n)?this.options.missing:this.getSizeImpl(n)}getSizeImpl(t){const[n,i]=this.options.range;if(this.options.mode==="area"){const o=i*i*Math.PI,s=n*n*Math.PI,a=o-s,l=t*a+s;return Math.sqrt(l/Math.PI)}const r=i-n;return t*r+n}_drawIndicator(){const{ctx:t}=this,n=this.options.legend.indicatorWidth/2,i=this.isHorizontal(),r=this.ticks,o=this.getLabelItems(),s=o?o.map(a=>({[i?"x":"y"]:a.options.translation[i?0:1]})):r.map((a,l)=>({[i?"x":"y"]:this.getPixelForTick(l)}));if((this._gridLineItems||[]).forEach(a=>{if(t.save(),t.strokeStyle=a.color,t.lineWidth=a.width,t.setLineDash&&(t.setLineDash(a.borderDash),t.lineDashOffset=a.borderDashOffset),t.beginPath(),this.options.grid.drawTicks)switch(this.options.legend.align){case"left":t.moveTo(0,a.ty1),t.lineTo(n,a.ty2);break;case"top":t.moveTo(a.tx1,0),t.lineTo(a.tx2,n);break;case"bottom":t.moveTo(a.tx1,n),t.lineTo(a.tx2,n*2);break;default:t.moveTo(n,a.ty1),t.lineTo(n*2,a.ty2);break}t.stroke(),t.restore()}),this._model){const a=this._model;t.strokeStyle=a.borderColor,t.lineWidth=a.borderWidth||0,t.fillStyle=a.backgroundColor}else t.fillStyle="blue";r.forEach((a,l)=>{const c=s[l],u=this.getSizeForValue(a.value),d=i?c.x:n,f=i?n:c.y,h={pointStyle:"circle",borderWidth:0,...this._model||{},radius:u};ma(t,h,d,f)})}}$i.id="size";$i.defaults=et({},[Nn.defaults,al,qv]);$i.descriptors={_scriptable:!0,_indexable:e=>e!=="range"};class e1 extends Uv{constructor(){super(...arguments),this._model=null}getSizeForValue(t){const n=this._getNormalizedValue(t);return n==null||Number.isNaN(n)?this.options.missing:this.getSizeImpl(n)}getSizeImpl(t){return $i.prototype.getSizeImpl.call(this,t)}_drawIndicator(){$i.prototype._drawIndicator.call(this)}}e1.id="sizeLogarithmic";e1.defaults=et({},[Li.defaults,al,qv]);function oP(e,t){return[[e[0][0]-t,e[0][1]-t],[e[1][0]+t,e[1][1]+t]]}class Ln extends vn{constructor(){super(...arguments),this.cache=void 0}updateExtras({scale:t,feature:n,center:i,pixelRatio:r,mode:o}){var s,a;const l=o==="resize"||o==="reset"||this.projectionScale!==t||this.feature!==n||((s=this.center)===null||s===void 0?void 0:s.longitude)!==(i==null?void 0:i.longitude)||((a=this.center)===null||a===void 0?void 0:a.latitude)!==(i==null?void 0:i.latitude)||this.pixelRatio!==r;return this.projectionScale=t,this.feature=n,this.center=i,this.pixelRatio=r,l&&(this.cache=void 0),this.getCenterPoint()}inRange(t,n){const i=this.getBounds(),r=(Number.isNaN(t)||t>=i.x&&t<=i.x2)&&(Number.isNaN(n)||n>=i.y&&n<=i.y2),o=this.projectionScale.geoPath.projection();if(r&&!Number.isNaN(t)&&!Number.isNaN(n)&&typeof o.invert=="function"){const s=o.invert([t,n]);return s!=null&&B6(this.feature,s)}return r}inXRange(t){return this.inRange(t,Number.NaN)}inYRange(t){return this.inRange(Number.NaN,t)}getCenterPoint(){if(this.cache&&this.cache.center)return this.cache.center;let t;if(this.center){const n=this.projectionScale.projection([this.center.longitude,this.center.latitude]);t={x:n[0],y:n[1]}}else{const n=this.projectionScale.geoPath.centroid(this.feature);t={x:n[0],y:n[1]}}return this.cache={...this.cache||{},center:t},t}getBounds(){if(this.cache&&this.cache.bounds)return this.cache.bounds;const t=oP(this.projectionScale.geoPath.bounds(this.feature),this.options.borderWidth/2),n={x:t[0][0],x2:t[1][0],y:t[0][1],y2:t[1][1],width:t[1][0]-t[0][0],height:t[1][1]-t[0][1]};return this.cache={...this.cache||{},bounds:n},n}_drawInCache(t){const n=this.getBounds();if(!Number.isFinite(n.x))return;const i=this.cache&&this.cache.canvas?this.cache.canvas:t.createElement("canvas"),r=Math.floor(n.x),o=Math.floor(n.y),s=Math.ceil(n.x+n.width),a=Math.ceil(n.y+n.height),l=this.pixelRatio||1,c=Math.ceil(Math.max(s-r,1)*l),u=Math.ceil(Math.max(a-o,1)*l);if(c<=0||u<=0)return;i.width=c,i.height=u;const d=i.getContext("2d");d&&(d.clearRect(0,0,i.width,i.height),d.save(),d.scale(l,l),d.translate(-r,-o),this._drawImpl(d),d.restore(),this.cache={...this.cache||{},canvas:i,canvasKey:this._optionsToKey()})}_optionsToKey(){const{options:t}=this;return`${t.backgroundColor};${t.borderColor};${t.borderWidth};${this.pixelRatio}`}_drawImpl(t){const{feature:n}=this,{options:i}=this;t.beginPath(),this.projectionScale.geoPath.context(t)(n),i.backgroundColor&&(t.fillStyle=i.backgroundColor,t.fill()),i.borderColor&&(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.stroke())}draw(t){const{feature:n}=this;if(!n)return;(!this.cache||this.cache.canvasKey!==this._optionsToKey())&&t.canvas.ownerDocument!=null&&this._drawInCache(t.canvas.ownerDocument);const i=this.getBounds();if(this.cache&&this.cache.canvas&&this.cache.canvas.width>0&&this.cache.canvas.height>0){const r=Math.floor(i.x),o=Math.floor(i.y),s=Math.ceil(i.x+i.width),a=Math.ceil(i.y+i.height),l=s-r,c=a-o;l>0&&c>0&&t.drawImage(this.cache.canvas,r,o,s-r,a-o)}else Number.isFinite(i.x)&&(t.save(),this._drawImpl(t),t.restore())}}Ln.id="geoFeature";Ln.defaults={...un.defaults,outlineBackgroundColor:null,outlineBorderWidth:0,graticuleBorderColor:"#CCCCCC",graticuleBorderWidth:0};Ln.defaultRoutes={outlineBorderColor:"borderColor",...un.defaultRoutes||{}};const t1={showOutline:!1,showGraticule:!1,clipMap:!0},n1={scales:{projection:{axis:"x",type:zi.id,position:"chartArea",display:!1}}};function vp(e){const t={...e};return Object.keys(e).forEach(n=>{let i=n;if(n.startsWith("outline")){const r=n.slice(7);i=r[0].toLowerCase()+r.slice(1)}else if(n.startsWith("hoverOutline"))i=`hover${n.slice(12)}`;else return;delete t[n],t[i]=e[n]}),t}class i1 extends jt{getGeoDataset(){return super.getDataset()}getGeoOptions(){return this.chart.options}getProjectionScale(){return this.getScaleForId("projection")}linkScales(){const t=this.getGeoDataset(),n=this.getMeta();n.xAxisID="projection",t.xAxisID="projection",n.yAxisID="projection",t.yAxisID="projection",n.xScale=this.getScaleForId("projection"),n.yScale=this.getScaleForId("projection"),this.getProjectionScale().computeBounds(this.resolveOutline())}showOutline(){return ae(this.getGeoDataset().showOutline,this.getGeoOptions().showOutline)}clipMap(){return ae(this.getGeoDataset().clipMap,this.getGeoOptions().clipMap)}getGraticule(){return ae(this.getGeoDataset().showGraticule,this.getGeoOptions().showGraticule)}update(t){super.update(t);const n=this.getMeta(),i=this.getProjectionScale(),r=i.updateBounds()||t==="resize"||t==="reset";if(this.showOutline()){const o=n.dataset;if(r&&delete o.cache,o.projectionScale=i,o.pixelRatio=this.chart.currentDevicePixelRatio,t!=="resize"){const s=vp(this.resolveDatasetElementOptions(t)),a={feature:this.resolveOutline(),options:s};this.updateElement(o,void 0,a,t),this.getGraticule()&&(n.graticule=s)}}else this.getGraticule()&&t!=="resize"&&(n.graticule=vp(this.resolveDatasetElementOptions(t)));r&&n.data.forEach(o=>delete o.cache),this.updateElements(n.data,0,n.data.length,t)}resolveOutline(){const n=this.getGeoDataset().outline||{type:"Sphere"};return Array.isArray(n)?{type:"FeatureCollection",features:n}:n}showGraticule(){const t=this.getGraticule(),n=this.getMeta().graticule;if(!t||!n)return;const{ctx:i}=this.chart,o=this.getProjectionScale().geoPath.context(i);if(i.save(),i.beginPath(),typeof t=="boolean")t&&o($6());else{const s=vv();t.stepMajor&&s.stepMajor(t.stepMajor),t.stepMinor&&s.stepMinor(t.stepMinor),o(s())}i.strokeStyle=n.graticuleBorderColor,i.lineWidth=n.graticuleBorderWidth,i.stroke(),i.restore()}draw(){const{chart:t}=this,n=this.clipMap();let i=!1;(n===!0||n==="outline"||n==="outline+graticule")&&(i=!0,Ii(t.ctx,t.chartArea)),this.showOutline()&&this.getMeta().dataset&&this.getMeta().dataset.draw.call(this.getMeta().dataset,t.ctx,t.chartArea),n===!0||n==="graticule"||n==="outline+graticule"?i||Ii(t.ctx,t.chartArea):i&&(i=!1,_i(t.ctx)),this.showGraticule(),n===!0||n==="items"?i||Ii(t.ctx,t.chartArea):i&&(i=!1,_i(t.ctx)),this.getMeta().data.forEach(r=>r.draw.call(r,t.ctx,t.chartArea)),i&&(i=!1,_i(t.ctx))}}function r1(e,t,n,i=[],r=[]){yt.addControllers(n),Array.isArray(i)?yt.addElements(...i):yt.addElements(i),Array.isArray(r)?yt.addScales(...r):yt.addScales(r);const o=t;return o.type=e,o}class wr extends i1{initialize(){super.initialize(),this.enableOptionSharing=!0}linkScales(){super.linkScales();const t=this.getGeoDataset(),n=this.getMeta();n.vAxisID="color",n.rAxisID="color",t.vAxisID="color",t.rAxisID="color",n.rScale=this.getScaleForId("color"),n.vScale=n.rScale,n.iScale=n.xScale,n.iAxisID=n.xAxisID,t.iAxisID=n.xAxisID}_getOtherScale(t){return t}parse(t,n){const i=this.getMeta().rScale,{data:r}=this.getDataset(),o=this._cachedMeta;for(let s=t;s<t+n;s+=1)o._parsed[s]={[i.axis]:i.parse(r[s],s)}}updateElements(t,n,i,r){const o=this.resolveDataElementOptions(n,r),s=this.getSharedOptions(o),a=this.includeOptions(r,s),l=this.getProjectionScale();this.updateSharedOptions(s,r,o);for(let c=n;c<n+i;c+=1){const u=t[c];u.projectionScale=l;const d=u.updateExtras({scale:l,feature:this._data[c].feature,center:this._data[c].center,pixelRatio:this.chart.currentDevicePixelRatio,mode:r}),f={x:d.x,y:d.y};a&&(f.options=s||this.resolveDataElementOptions(c,r)),this.updateElement(u,c,f,r)}}indexToColor(t){const n=this.getMeta().rScale;return n.getColorForValue(this.getParsed(t)[n.axis])}}wr.id="choropleth";wr.defaults=et({},[t1,{datasetElementType:Ln.id,dataElementType:Ln.id}]);wr.overrides=et({},[n1,{plugins:{tooltip:{callbacks:{title(){return""},label(e){var t,n,i,r;return e.formattedValue==null?(n=(t=e.chart.data)===null||t===void 0?void 0:t.labels)===null||n===void 0?void 0:n[e.dataIndex]:`${(r=(i=e.chart.data)===null||i===void 0?void 0:i.labels)===null||r===void 0?void 0:r[e.dataIndex]}: ${e.formattedValue}`}}},colors:{enabled:!1}},scales:{color:{type:ri.id,axis:"x"}},elements:{geoFeature:{backgroundColor(e){return e.dataIndex==null?null:e.chart.getDatasetMeta(e.datasetIndex).controller.indexToColor(e.dataIndex)}}}}]);class sP extends tt{constructor(t,n){super(t,r1("choropleth",n,wr,Ln,[ri,zi]))}}sP.id=wr.id;class Bo extends i1{initialize(){super.initialize(),this.enableOptionSharing=!0}linkScales(){super.linkScales();const t=this.getGeoDataset(),n=this.getMeta();n.vAxisID="size",n.rAxisID="size",t.vAxisID="size",t.rAxisID="size",n.rScale=this.getScaleForId("size"),n.vScale=n.rScale,n.iScale=n.xScale,n.iAxisID=n.xAxisID,t.iAxisID=n.xAxisID}_getOtherScale(t){return t}parse(t,n){const i=this.getMeta().rScale,r=this.getDataset().data,o=this._cachedMeta;for(let s=t;s<t+n;s+=1){const a=r[s];o._parsed[s]={x:a.longitude==null?a.x:a.longitude,y:a.latitude==null?a.y:a.latitude,[i.axis]:i.parse(a,s)}}}updateElements(t,n,i,r){const o=r==="reset",s=this.resolveDataElementOptions(n,r),a=this.getSharedOptions(s),l=this.includeOptions(r,a),c=this.getProjectionScale();this.getMeta().rScale._model=s,this.updateSharedOptions(a,r,s);for(let u=n;u<n+i;u+=1){const d=t[u],f=this.getParsed(u),h=c.projection([f.x,f.y]),g={x:h?h[0]:0,y:h?h[1]:0,skip:Number.isNaN(f.x)||Number.isNaN(f.y)};l&&(g.options=a||this.resolveDataElementOptions(u,r),o&&(g.options.radius=0)),this.updateElement(d,u,g,r)}}indexToRadius(t){const n=this.getMeta().rScale;return n.getSizeForValue(this.getParsed(t)[n.axis])}}Bo.id="bubbleMap";Bo.defaults=et({},[t1,{dataElementType:Mi.id,datasetElementType:Ln.id,showOutline:!0,clipMap:"outline+graticule"}]);Bo.overrides=et({},[n1,{plugins:{tooltip:{callbacks:{title(){return""},label(e){var t,n,i,r;return e.formattedValue==null?(n=(t=e.chart.data)===null||t===void 0?void 0:t.labels)===null||n===void 0?void 0:n[e.dataIndex]:`${(r=(i=e.chart.data)===null||i===void 0?void 0:i.labels)===null||r===void 0?void 0:r[e.dataIndex]}: ${e.formattedValue}`}}}},scales:{size:{axis:"x",type:$i.id}},elements:{point:{radius(e){return e.dataIndex==null?null:e.chart.getDatasetMeta(e.datasetIndex).controller.indexToRadius(e.dataIndex)},hoverRadius(e){return e.dataIndex==null?null:e.chart.getDatasetMeta(e.datasetIndex).controller.indexToRadius(e.dataIndex)+1}}}}]);class aP extends tt{constructor(t,n){super(t,r1("bubbleMap",n,Bo,Ln,[$i,zi]))}}aP.id=Bo.id;tt.register(wr,Ln,zi,ri,Gi,ji,cr,Nn,un);tt.defaults.font.family="'Rubik', 'Inter', sans-serif";const lP=({data:e=new Map,defaultCountry:t="India",geoData:n,dataLabel:i="Data Points Found"})=>{const[r,o]=S.useState(null),[s,a]=S.useState(0),l=n?n.features.filter(d=>d.properties.name!=="Antarctica"):[];if(S.useEffect(()=>{if(e!=null&&e.size){let d=0;e.forEach((f,h)=>{r===h&&(d=f)}),a(d)}},[r,e]),!n||l.length===0)return v.jsx("div",{className:"geochart-container flex flex-col items-center justify-center p-8",style:{minHeight:"400px"},children:v.jsx("p",{style:{color:"var(--secondary-text-color)"},children:"Geo data not provided. Please provide geoData prop."})});const c={datasets:[{label:"Data Distribution",data:l.map(d=>({feature:d,value:e.get(d.properties.name)||0})),borderColor:"#fff",borderWidth:1,backgroundColor:d=>{var p;if(!((p=d==null?void 0:d.raw)!=null&&p.feature))return getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8";const f=d.raw.feature.properties.name,h=getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim()||"#ff6503",g=getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8";return f===t?h:r===f?h+"99":g}}]},u={responsive:!0,maintainAspectRatio:!1,scales:{projection:{axis:"x",projection:"equirectangular"},color:{axis:"x",display:!1}},plugins:{legend:{display:!1},tooltip:{backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--bg-color").trim()||"#fff",titleColor:getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim()||"#333",bodyColor:getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim()||"#333",borderColor:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()||"#e5e7eb",borderWidth:1,callbacks:{title:d=>{var f,h,g;return d.length?((g=(h=(f=d[0].raw)==null?void 0:f.feature)==null?void 0:h.properties)==null?void 0:g.name)??"Unknown":""},label:()=>`${i}: ${s}`}},datalabels:{display:!1}},onHover:(d,f)=>{var h,g;if(f.length>0){const p=f[0].index;o(((g=(h=l[p])==null?void 0:h.properties)==null?void 0:g.name)||null)}}};return v.jsx("div",{className:"geochart-container flex flex-col items-center",onMouseLeave:()=>o(null),style:{minHeight:"400px"},children:v.jsx(dd,{type:"choropleth",data:c,options:u,className:"w-full h-full"})})},cP=({children:e,customProviders:t=[],onToastShow:n,themeConfig:i,defaultTheme:r})=>[...[({children:a})=>v.jsx(av,{defaultTheme:r,config:i,children:a}),Bm,({children:a})=>v.jsx(Om,{onToastShow:n,children:a})],...t].reduceRight((a,l)=>v.jsx(l,{children:a}),v.jsx(v.Fragment,{children:e}));function uP(e,t){const[n,i]=S.useState(e);return S.useEffect(()=>{const r=setTimeout(()=>{i(e)},t);return()=>{clearTimeout(r)}},[e,t]),n}const dP=({callback:e,onScroll:t=!0,onResize:n=!0,onEscape:i=!0})=>{const r=S.useRef(null);return S.useEffect(()=>{const o=l=>{var c;r.current&&((c=l.target)!=null&&c.closest("[data-dropdown-ref]")||r.current.contains(l.target)||e())},s=()=>{e()},a=l=>{l.key==="Escape"&&i&&e()};return document.addEventListener("mousedown",o),t&&window.addEventListener("scroll",s),n&&window.addEventListener("resize",s),i&&document.addEventListener("keydown",a),()=>{document.removeEventListener("mousedown",o),t&&window.removeEventListener("scroll",s),n&&window.removeEventListener("resize",s),i&&document.removeEventListener("keydown",a)}},[e,t,n,i]),r};let uu=null,o1=null,s1=null,xp=!1;function fP(){if(!xp){xp=!0;try{const e=require("react-redux"),t=require("@reduxjs/toolkit");uu=e.useDispatch,o1=e.useSelector,s1=t.createSelector}catch{}}}const hP=e=>{const{metric:t,fetchFunction:n,cacheKey:i,...r}=e,[o,s]=S.useState({}),[a,l]=S.useState(!1),[c,u]=S.useState(null),d=S.useMemo(()=>i||`${t}_${JSON.stringify(r)}`,[i,t,JSON.stringify(r)]);return fP(),uu&&o1&&s1&&!uu()?yp({metric:t,fetchFunction:n,cacheKey:d,...r}):yp({metric:t,fetchFunction:n,cacheKey:d,...r})};function yp(e){const{fetchFunction:t,cacheKey:n}=e,[i,r]=S.useState({}),[o,s]=S.useState(!1),[a,l]=S.useState(null),c=i[n||""]||{data:null,loading:!1,error:null};S.useEffect(()=>{!c.data&&!c.loading&&t&&(s(!0),t(e).then(d=>{r(f=>({...f,[n||""]:{data:d,loading:!1,error:null}})),s(!1)}).catch(d=>{l(d),s(!1)}))},[n,t]);const u=()=>{r(d=>{const f={...d};return delete f[n||""],f})};return{data:c.data,loading:c.loading||o,error:c.error||a,clearCache:u}}const Na=(e,t)=>{if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(typeof e!="object")return e===t;if(Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Na(e[r],t[r]))return!1;return!0}const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Na(e[r],t[r]))return!1;return!0},gP=(e,t)=>{const n=["country_iso2","department_name"];for(const i of n)if(!Na(e[i],t[i]))return!1;return!0};exports.Alert=R1;exports.ApiMetric=Ep;exports.CHECKBOX_STYLE=Pc;exports.CSVImporter=O_;exports.CSVType=Ap;exports.ChartHeader=D_;exports.ComponentErrorBoundary=p_;exports.ConfidenceScoreTooltip=E_;exports.ConfirmationModal=c_;exports.ContextProvider=cP;exports.CountryBox=S_;exports.CustomLegends=Yu;exports.DonutChart=h6;exports.Dropdown=fw;exports.ErrorBoundary=Hm;exports.ErrorBoundaryDefault=Hm;exports.FileTypeIcon=C_;exports.GaugeChart=y6;exports.GeoChart=lP;exports.HorizontalBarChart=b6;exports.ImagePreviewModal=A_;exports.InstallUpdateLoader=__;exports.Loader=P1;exports.LoaderProvider=Bm;exports.Modal=fu;exports.MultiSelect=Cm;exports.NoActiveAttributeWarning=w_;exports.NoDataChart=T_;exports.NotificationType=Mp;exports.PAGE_INDEX=Ns;exports.PAGE_SIZE=Ds;exports.PAGINATION_INPUT_BUFFER_CH=Rc;exports.PieChart=p6;exports.ResourceUsageBadge=m_;exports.RiskScoreLabel=y_;exports.STATUS_BADGE_CLASSES=Xt;exports.STATUS_CONFIGURATIONS=tc;exports.ScaleType=mi;exports.ShowMultiData=b_;exports.StatusBadge=Q1;exports.StatusIcon=Js;exports.StorageChart=v6;exports.Table=l_;exports.TableType=hu;exports.TaskResult=I_;exports.ThemeProvider=av;exports.Timer=h_;exports.Toast=Y1;exports.ToastProvider=Om;exports.ToastType=Mt;exports.ToggleSwitch=K1;exports.ToolTip=La;exports.VerticalBarChart=m6;exports.cn=kt;exports.conditionalClass=N1;exports.deepEqual=Na;exports.formatBytes=lv;exports.getRiskLevel=Xu;exports.getRiskScoreInfo=Wm;exports.getStatusConfig=gu;exports.globalFiltersEqual=gP;exports.isFailedStatus=J1;exports.isHighRisk=x_;exports.isReduxAvailable=Lm;exports.isRunningStatus=Z1;exports.isSuccessStatus=U1;exports.switchClass=L1;exports.useApiCache=hP;exports.useAppDispatch=Dm;exports.useAppSelector=Nm;exports.useAssetPath=Xm;exports.useBodyScrollLock=du;exports.useClickOutside=dP;exports.useDebounce=uP;exports.useFileIconPath=Ym;exports.useFilterCache=jm;exports.useLoader=$m;exports.useTheme=nl;exports.useToast=Tm;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CEYAqBxa.js");exports.Alert=e.Alert;exports.ApiMetric=e.ApiMetric;exports.CHECKBOX_STYLE=e.CHECKBOX_STYLE;exports.CSVImporter=e.CSVImporter;exports.CSVType=e.CSVType;exports.ChartHeader=e.ChartHeader;exports.ComponentErrorBoundary=e.ComponentErrorBoundary;exports.ConfidenceScoreTooltip=e.ConfidenceScoreTooltip;exports.ConfirmationModal=e.ConfirmationModal;exports.ContextProvider=e.ContextProvider;exports.CountryBox=e.CountryBox;exports.CustomLegends=e.CustomLegends;exports.DbSchemaBrowser=e.DbSchemaBrowser;exports.DonutChart=e.DonutChart;exports.Dropdown=e.Dropdown;exports.ErrorBoundary=e.ErrorBoundary;exports.ErrorBoundaryDefault=e.ErrorBoundary;exports.FILE_BROWSER_PAGE_SIZE=e.FILE_BROWSER_PAGE_SIZE;exports.FileBrowser=e.FileBrowser;exports.FileTypeIcon=e.FileTypeIcon;exports.GaugeChart=e.GaugeChart;exports.GeoChart=e.GeoChart;exports.HorizontalBarChart=e.HorizontalBarChart;exports.ImagePreviewModal=e.ImagePreviewModal;exports.InstallUpdateLoader=e.InstallUpdateLoader;exports.Loader=e.Loader;exports.LoaderProvider=e.LoaderProvider;exports.METADATA_KEYS=e.METADATA_KEYS;exports.Modal=e.Modal;exports.MultiSelect=e.MultiSelect;exports.NOT_APPLICABLE=e.NOT_APPLICABLE;exports.NoActiveAttributeWarning=e.NoActiveAttributeWarning;exports.NoDataChart=e.NoDataChart;exports.NotificationType=e.NotificationType;exports.PAGE_INDEX=e.PAGE_INDEX;exports.PAGE_SIZE=e.PAGE_SIZE;exports.PAGINATION_INPUT_BUFFER_CH=e.PAGINATION_INPUT_BUFFER_CH;exports.PieChart=e.PieChart;exports.ResourceUsageBadge=e.ResourceUsageBadge;exports.RiskScoreLabel=e.RiskScoreLabel;exports.STATUS_BADGE_CLASSES=e.STATUS_BADGE_CLASSES;exports.STATUS_CONFIGURATIONS=e.STATUS_CONFIGURATIONS;exports.ScaleType=e.ScaleType;exports.ShowMultiData=e.ShowMultiData;exports.StatusBadge=e.StatusBadge;exports.StatusIcon=e.StatusIcon;exports.StorageChart=e.StorageChart;exports.Table=e.Table;exports.TableType=e.TableType;exports.TaskResult=e.TaskResult;exports.ThemeProvider=e.ThemeProvider;exports.Timer=e.Timer;exports.Toast=e.Toast;exports.ToastProvider=e.ToastProvider;exports.ToastType=e.ToastType;exports.ToggleSwitch=e.ToggleSwitch;exports.ToolTip=e.ToolTip;exports.VerticalBarChart=e.VerticalBarChart;exports.cn=e.cn;exports.conditionalClass=e.conditionalClass;exports.convertScanObjectToDbSchema=e.convertScanObjectToDbSchema;exports.convertScanObjectToFiledata=e.convertScanObjectToFiledata;exports.deepEqual=e.deepEqual;exports.extractAttributeMapping=e.extractAttributeMapping;exports.extractConfidenceMetadata=e.extractConfidenceMetadata;exports.formatBytes=e.formatBytes;exports.formatDateTime=e.formatDateTime;exports.getConfidenceColor=e.getConfidenceColor;exports.getRiskLevel=e.getRiskLevel;exports.getRiskScoreInfo=e.getRiskScoreInfo;exports.getStatusConfig=e.getStatusConfig;exports.globalFiltersEqual=e.globalFiltersEqual;exports.isChildPath=e.isChildPath;exports.isFailedStatus=e.isFailedStatus;exports.isHighRisk=e.isHighRisk;exports.isReduxAvailable=e.isReduxAvailable;exports.isRunningStatus=e.isRunningStatus;exports.isSuccessStatus=e.isSuccessStatus;exports.switchClass=e.switchClass;exports.ucwords=e.ucwords;exports.useApiCache=e.useApiCache;exports.useAppDispatch=e.useAppDispatch;exports.useAppSelector=e.useAppSelector;exports.useAssetPath=e.useAssetPath;exports.useBodyScrollLock=e.useBodyScrollLock;exports.useClickOutside=e.useClickOutside;exports.useDebounce=e.useDebounce;exports.useFileIconPath=e.useFileIconPath;exports.useFilterCache=e.useFilterCache;exports.useLoader=e.useLoader;exports.useTheme=e.useTheme;exports.useToast=e.useToast;