@undp/data-viz 0.0.71 → 0.0.73

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
@@ -161,7 +161,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
161
161
  */var E_;function HQ(){if(E_)return gn;E_=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,s=t?Symbol.for("react.async_mode"):60111,f=t?Symbol.for("react.concurrent_mode"):60111,c=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,g=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,b=t?Symbol.for("react.fundamental"):60117,S=t?Symbol.for("react.responder"):60118,w=t?Symbol.for("react.scope"):60119;function C(_){if(typeof _=="object"&&_!==null){var D=_.$$typeof;switch(D){case e:switch(_=_.type,_){case s:case f:case n:case i:case a:case h:return _;default:switch(_=_&&_.$$typeof,_){case l:case c:case g:case m:case o:return _;default:return D}}case r:return D}}}function k(_){return C(_)===f}return gn.AsyncMode=s,gn.ConcurrentMode=f,gn.ContextConsumer=l,gn.ContextProvider=o,gn.Element=e,gn.ForwardRef=c,gn.Fragment=n,gn.Lazy=g,gn.Memo=m,gn.Portal=r,gn.Profiler=i,gn.StrictMode=a,gn.Suspense=h,gn.isAsyncMode=function(_){return k(_)||C(_)===s},gn.isConcurrentMode=k,gn.isContextConsumer=function(_){return C(_)===l},gn.isContextProvider=function(_){return C(_)===o},gn.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},gn.isForwardRef=function(_){return C(_)===c},gn.isFragment=function(_){return C(_)===n},gn.isLazy=function(_){return C(_)===g},gn.isMemo=function(_){return C(_)===m},gn.isPortal=function(_){return C(_)===r},gn.isProfiler=function(_){return C(_)===i},gn.isStrictMode=function(_){return C(_)===a},gn.isSuspense=function(_){return C(_)===h},gn.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===f||_===i||_===a||_===h||_===d||typeof _=="object"&&_!==null&&(_.$$typeof===g||_.$$typeof===m||_.$$typeof===o||_.$$typeof===l||_.$$typeof===c||_.$$typeof===b||_.$$typeof===S||_.$$typeof===w||_.$$typeof===y)},gn.typeOf=C,gn}var j_;function qQ(){return j_||(j_=1,M_.exports=HQ()),M_.exports}var np,L_;function WQ(){if(L_)return np;L_=1;var t=qQ(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[t.ForwardRef]=n,i[t.Memo]=a;function o(g){return t.isMemo(g)?a:i[g.$$typeof]||e}var l=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,d=Object.prototype;function m(g,y,b){if(typeof y!="string"){if(d){var S=h(y);S&&S!==d&&m(g,S,b)}var w=s(y);f&&(w=w.concat(f(y)));for(var C=o(g),k=o(y),_=0;_<w.length;++_){var D=w[_];if(!r[D]&&!(b&&b[D])&&!(k&&k[D])&&!(C&&C[D])){var T=c(y,D);try{l(g,D,T)}catch{}}}}return g}return np=m,np}WQ();var UQ=!0;function GQ(t,e,r){var n="";return r.split(" ").forEach(function(a){t[a]!==void 0?e.push(t[a]+";"):a&&(n+=a+" ")}),n}var TI=function(t,e,r){var n=t.key+"-"+e.name;(r===!1||UQ===!1)&&t.registered[n]===void 0&&(t.registered[n]=e.styles)},YQ=function(t,e,r){TI(t,e,r);var n=t.key+"-"+e.name;if(t.inserted[e.name]===void 0){var a=e;do t.insert(e===a?"."+n:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function XQ(t){for(var e=0,r,n=0,a=t.length;a>=4;++n,a-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(a){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var KQ={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},JQ=/[A-Z]|^ms/g,ZQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,MI=function(t){return t.charCodeAt(1)===45},N_=function(t){return t!=null&&typeof t!="boolean"},ap=NQ(function(t){return MI(t)?t:t.replace(JQ,"-$&").toLowerCase()}),I_=function(t,e){switch(t){case"animation":case"animationName":if(typeof e=="string")return e.replace(ZQ,function(r,n,a){return e0={name:n,styles:a,next:e0},n})}return KQ[t]!==1&&!MI(t)&&typeof e=="number"&&e!==0?e+"px":e};function ms(t,e,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return e0={name:a.name,styles:a.styles,next:e0},a.name;var i=r;if(i.styles!==void 0){var o=i.next;if(o!==void 0)for(;o!==void 0;)e0={name:o.name,styles:o.styles,next:e0},o=o.next;var l=i.styles+";";return l}return QQ(t,e,r)}case"function":{if(t!==void 0){var s=e0,f=r(t);return e0=s,ms(t,e,f)}break}}var c=r;return c}function QQ(t,e,r){var n="";if(Array.isArray(r))for(var a=0;a<r.length;a++)n+=ms(t,e,r[a])+";";else for(var i in r){var o=r[i];if(typeof o!="object"){var l=o;N_(l)&&(n+=ap(i)+":"+I_(i,l)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&e==null)for(var s=0;s<o.length;s++)N_(o[s])&&(n+=ap(i)+":"+I_(i,o[s])+";");else{var f=ms(t,e,o);switch(i){case"animation":case"animationName":{n+=ap(i)+":"+f+";";break}default:n+=i+"{"+f+"}"}}}return n}var P_=/label:\s*([^\s;{]+)\s*(;|$)/g,e0;function EI(t,e,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var n=!0,a="";e0=void 0;var i=t[0];if(i==null||i.raw===void 0)n=!1,a+=ms(r,e,i);else{var o=i;a+=o[0]}for(var l=1;l<t.length;l++)if(a+=ms(r,e,t[l]),n){var s=i;a+=s[l]}P_.lastIndex=0;for(var f="",c;(c=P_.exec(a))!==null;)f+="-"+c[1];var h=XQ(a)+f;return{name:h,styles:a,next:e0}}var eee=function(t){return t()},tee=me.useInsertionEffect?me.useInsertionEffect:!1,ree=tee||eee,jI=me.createContext(typeof HTMLElement<"u"?zQ({key:"css"}):null);jI.Provider;var nee=function(t){return I.forwardRef(function(e,r){var n=I.useContext(jI);return t(e,n,r)})},aee=me.createContext({}),Wv={}.hasOwnProperty,Rg="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",iee=function(t,e){var r={};for(var n in e)Wv.call(e,n)&&(r[n]=e[n]);return r[Rg]=t,r},oee=function(t){var e=t.cache,r=t.serialized,n=t.isStringTag;return TI(e,r,n),ree(function(){return YQ(e,r,n)}),null},lee=nee(function(t,e,r){var n=t.css;typeof n=="string"&&e.registered[n]!==void 0&&(n=e.registered[n]);var a=t[Rg],i=[n],o="";typeof t.className=="string"?o=GQ(e.registered,i,t.className):t.className!=null&&(o=t.className+" ");var l=EI(i,void 0,me.useContext(aee));o+=e.key+"-"+l.name;var s={};for(var f in t)Wv.call(t,f)&&f!=="css"&&f!==Rg&&(s[f]=t[f]);return s.className=o,r&&(s.ref=r),me.createElement(me.Fragment,null,me.createElement(oee,{cache:e,serialized:l,isStringTag:typeof a=="string"}),me.createElement(a,s))}),see=lee,rr=function(t,e){var r=arguments;if(e==null||!Wv.call(e,"css"))return me.createElement.apply(void 0,r);var n=r.length,a=new Array(n);a[0]=see,a[1]=iee(t,e);for(var i=2;i<n;i++)a[i]=r[i];return me.createElement.apply(null,a)};(function(t){var e;e||(e=t.JSX||(t.JSX={}))})(rr||(rr={}));function Uv(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return EI(e)}function uee(){var t=Uv.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}function cee(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var $g=I.useLayoutEffect,fee=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Gu=function(){};function dee(t,e){return e?e[0]==="-"?t+e:t+"__"+e:t}function hee(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a<r;a++)n[a-2]=arguments[a];var i=[].concat(n);if(e&&t)for(var o in e)e.hasOwnProperty(o)&&e[o]&&i.push("".concat(dee(t,o)));return i.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var R_=function(t){return See(t)?t.filter(Boolean):d0(t)==="object"&&t!==null?[t]:[]},LI=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 e=Bo(t,fee);return Ft({},e)},wa=function(t,e,r){var n=t.cx,a=t.getStyles,i=t.getClassNames,o=t.className;return{css:a(e,t),className:n(r??{},i(e,t),o)}};function cf(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function pee(t){return cf(t)?window.innerHeight:t.clientHeight}function NI(t){return cf(t)?window.pageYOffset:t.scrollTop}function Yu(t,e){if(cf(t)){window.scrollTo(0,e);return}t.scrollTop=e}function mee(t){var e=getComputedStyle(t),r=e.position==="absolute",n=/(auto|scroll)/;if(e.position==="fixed")return document.documentElement;for(var a=t;a=a.parentElement;)if(e=getComputedStyle(a),!(r&&e.position==="static")&&n.test(e.overflow+e.overflowY+e.overflowX))return a;return document.documentElement}function gee(t,e,r,n){return r*((t=t/n-1)*t*t+1)+e}function C8(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Gu,a=NI(t),i=e-a,o=10,l=0;function s(){l+=o;var f=gee(l,a,i,r);Yu(t,f),l<r?window.requestAnimationFrame(s):n(t)}s()}function $_(t,e){var r=t.getBoundingClientRect(),n=e.getBoundingClientRect(),a=e.offsetHeight/3;n.bottom+a>r.bottom?Yu(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+a,t.scrollHeight)):n.top-a<r.top&&Yu(t,Math.max(e.offsetTop-a,0))}function yee(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}function B_(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function vee(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var II=!1,bee={get passive(){return II=!0}},k8=typeof window<"u"?window:{};k8.addEventListener&&k8.removeEventListener&&(k8.addEventListener("p",Gu,bee),k8.removeEventListener("p",Gu,!1));var xee=II;function wee(t){return t!=null}function See(t){return Array.isArray(t)}function _8(t,e,r){return t?e:r}var Cee=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];var a=Object.entries(t).filter(function(i){var o=qn(i,1),l=o[0];return!r.includes(l)});return a.reduce(function(i,o){var l=qn(o,2),s=l[0],f=l[1];return i[s]=f,i},{})},kee=["children","innerProps"],_ee=["children","innerProps"];function Oee(t){var e=t.maxHeight,r=t.menuEl,n=t.minHeight,a=t.placement,i=t.shouldScroll,o=t.isFixedPosition,l=t.controlHeight,s=mee(r),f={placement:"bottom",maxHeight:e};if(!r||!r.offsetParent)return f;var c=s.getBoundingClientRect(),h=c.height,d=r.getBoundingClientRect(),m=d.bottom,g=d.height,y=d.top,b=r.offsetParent.getBoundingClientRect(),S=b.top,w=o?window.innerHeight:pee(s),C=NI(s),k=parseInt(getComputedStyle(r).marginBottom,10),_=parseInt(getComputedStyle(r).marginTop,10),D=S-_,T=w-y,A=D+C,M=h-C-y,E=m-w+C+k,N=C+y-_,Y=160;switch(a){case"auto":case"bottom":if(T>=g)return{placement:"bottom",maxHeight:e};if(M>=g&&!o)return i&&C8(s,E,Y),{placement:"bottom",maxHeight:e};if(!o&&M>=n||o&&T>=n){i&&C8(s,E,Y);var ne=o?T-k:M-k;return{placement:"bottom",maxHeight:ne}}if(a==="auto"||o){var K=e,B=o?D:A;return B>=n&&(K=Math.min(B-k-l,e)),{placement:"top",maxHeight:K}}if(a==="bottom")return i&&Yu(s,E),{placement:"bottom",maxHeight:e};break;case"top":if(D>=g)return{placement:"top",maxHeight:e};if(A>=g&&!o)return i&&C8(s,N,Y),{placement:"top",maxHeight:e};if(!o&&A>=n||o&&D>=n){var j=e;return(!o&&A>=n||o&&D>=n)&&(j=o?D-_:A-_),i&&C8(s,N,Y),{placement:"top",maxHeight:j}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(a,'".'))}return f}function Dee(t){var e={bottom:"top",top:"bottom"};return t?e[t]:"bottom"}var PI=function(t){return t==="auto"?"bottom":t},Aee=function(t,e){var r,n=t.placement,a=t.theme,i=a.borderRadius,o=a.spacing,l=a.colors;return Ft((r={label:"menu"},V1(r,Dee(n),"100%"),V1(r,"position","absolute"),V1(r,"width","100%"),V1(r,"zIndex",1),r),e?{}:{backgroundColor:l.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:o.menuGutter,marginTop:o.menuGutter})},RI=I.createContext(null),Tee=function(t){var e=t.children,r=t.minMenuHeight,n=t.maxMenuHeight,a=t.menuPlacement,i=t.menuPosition,o=t.menuShouldScrollIntoView,l=t.theme,s=I.useContext(RI)||{},f=s.setPortalPlacement,c=I.useRef(null),h=I.useState(n),d=qn(h,2),m=d[0],g=d[1],y=I.useState(null),b=qn(y,2),S=b[0],w=b[1],C=l.spacing.controlHeight;return $g(function(){var k=c.current;if(k){var _=i==="fixed",D=o&&!_,T=Oee({maxHeight:n,menuEl:k,minHeight:r,placement:a,shouldScroll:D,isFixedPosition:_,controlHeight:C});g(T.maxHeight),w(T.placement),f==null||f(T.placement)}},[n,a,i,o,r,f,C]),e({ref:c,placerProps:Ft(Ft({},t),{},{placement:S||PI(a),maxHeight:m})})},Mee=function(t){var e=t.children,r=t.innerRef,n=t.innerProps;return rr("div",ir({},wa(t,"menu",{menu:!0}),{ref:r},n),e)},Eee=Mee,jee=function(t,e){var r=t.maxHeight,n=t.theme.spacing.baseUnit;return Ft({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},e?{}:{paddingBottom:n,paddingTop:n})},Lee=function(t){var e=t.children,r=t.innerProps,n=t.innerRef,a=t.isMulti;return rr("div",ir({},wa(t,"menuList",{"menu-list":!0,"menu-list--is-multi":a}),{ref:n},r),e)},$I=function(t,e){var r=t.theme,n=r.spacing.baseUnit,a=r.colors;return Ft({textAlign:"center"},e?{}:{color:a.neutral40,padding:"".concat(n*2,"px ").concat(n*3,"px")})},Nee=$I,Iee=$I,Pee=function(t){var e=t.children,r=e===void 0?"No options":e,n=t.innerProps,a=Bo(t,kee);return rr("div",ir({},wa(Ft(Ft({},a),{},{children:r,innerProps:n}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),n),r)},Ree=function(t){var e=t.children,r=e===void 0?"Loading...":e,n=t.innerProps,a=Bo(t,_ee);return rr("div",ir({},wa(Ft(Ft({},a),{},{children:r,innerProps:n}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),n),r)},$ee=function(t){var e=t.rect,r=t.offset,n=t.position;return{left:e.left,position:n,top:r,width:e.width,zIndex:1}},Bee=function(t){var e=t.appendTo,r=t.children,n=t.controlElement,a=t.innerProps,i=t.menuPlacement,o=t.menuPosition,l=I.useRef(null),s=I.useRef(null),f=I.useState(PI(i)),c=qn(f,2),h=c[0],d=c[1],m=I.useMemo(function(){return{setPortalPlacement:d}},[]),g=I.useState(null),y=qn(g,2),b=y[0],S=y[1],w=I.useCallback(function(){if(n){var D=yee(n),T=o==="fixed"?0:window.pageYOffset,A=D[h]+T;(A!==(b==null?void 0:b.offset)||D.left!==(b==null?void 0:b.rect.left)||D.width!==(b==null?void 0:b.rect.width))&&S({offset:A,rect:D})}},[n,o,h,b==null?void 0:b.offset,b==null?void 0:b.rect.left,b==null?void 0:b.rect.width]);$g(function(){w()},[w]);var C=I.useCallback(function(){typeof s.current=="function"&&(s.current(),s.current=null),n&&l.current&&(s.current=lN(n,l.current,w,{elementResize:"ResizeObserver"in window}))},[n,w]);$g(function(){C()},[C]);var k=I.useCallback(function(D){l.current=D,C()},[C]);if(!e&&o!=="fixed"||!b)return null;var _=rr("div",ir({ref:k},wa(Ft(Ft({},t),{},{offset:b.offset,position:o,rect:b.rect}),"menuPortal",{"menu-portal":!0}),a),r);return rr(RI.Provider,{value:m},e?a0.createPortal(_,e):_)},Vee=function(t){var e=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:e?"none":void 0,position:"relative"}},Fee=function(t){var e=t.children,r=t.innerProps,n=t.isDisabled,a=t.isRtl;return rr("div",ir({},wa(t,"container",{"--is-disabled":n,"--is-rtl":a}),r),e)},zee=function(t,e){var r=t.theme.spacing,n=t.isMulti,a=t.hasValue,i=t.selectProps.controlShouldRenderValue;return Ft({alignItems:"center",display:n&&a&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},e?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},Hee=function(t){var e=t.children,r=t.innerProps,n=t.isMulti,a=t.hasValue;return rr("div",ir({},wa(t,"valueContainer",{"value-container":!0,"value-container--is-multi":n,"value-container--has-value":a}),r),e)},qee=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Wee=function(t){var e=t.children,r=t.innerProps;return rr("div",ir({},wa(t,"indicatorsContainer",{indicators:!0}),r),e)},V_,Uee=["size"],Gee=["innerProps","isRtl","size"],Yee={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},BI=function(t){var e=t.size,r=Bo(t,Uee);return rr("svg",ir({height:e,width:e,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Yee},r))},Gv=function(t){return rr(BI,ir({size:20},t),rr("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"}))},VI=function(t){return rr(BI,ir({size:20},t),rr("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"}))},FI=function(t,e){var r=t.isFocused,n=t.theme,a=n.spacing.baseUnit,i=n.colors;return Ft({label:"indicatorContainer",display:"flex",transition:"color 150ms"},e?{}:{color:r?i.neutral60:i.neutral20,padding:a*2,":hover":{color:r?i.neutral80:i.neutral40}})},Xee=FI,Kee=function(t){var e=t.children,r=t.innerProps;return rr("div",ir({},wa(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),e||rr(VI,null))},Jee=FI,Zee=function(t){var e=t.children,r=t.innerProps;return rr("div",ir({},wa(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),e||rr(Gv,null))},Qee=function(t,e){var r=t.isDisabled,n=t.theme,a=n.spacing.baseUnit,i=n.colors;return Ft({label:"indicatorSeparator",alignSelf:"stretch",width:1},e?{}:{backgroundColor:r?i.neutral10:i.neutral20,marginBottom:a*2,marginTop:a*2})},ete=function(t){var e=t.innerProps;return rr("span",ir({},e,wa(t,"indicatorSeparator",{"indicator-separator":!0})))},tte=uee(V_||(V_=cee([`
162
162
  0%, 80%, 100% { opacity: 0; }
163
163
  40% { opacity: 1; }
164
- `]))),rte=function(t,e){var r=t.isFocused,n=t.size,a=t.theme,i=a.colors,o=a.spacing.baseUnit;return Ft({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"},e?{}:{color:r?i.neutral60:i.neutral20,padding:o*2})},ip=function(t){var e=t.delay,r=t.offset;return rr("span",{css:Uv({animation:"".concat(tte," 1s ease-in-out ").concat(e,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},nte=function(t){var e=t.innerProps,r=t.isRtl,n=t.size,a=n===void 0?4:n,i=Bo(t,Gee);return rr("div",ir({},wa(Ft(Ft({},i),{},{innerProps:e,isRtl:r,size:a}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),e),rr(ip,{delay:0,offset:r}),rr(ip,{delay:160,offset:!0}),rr(ip,{delay:320,offset:!r}))},ate=function(t,e){var r=t.isDisabled,n=t.isFocused,a=t.theme,i=a.colors,o=a.borderRadius,l=a.spacing;return Ft({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},e?{}:{backgroundColor:r?i.neutral5:i.neutral0,borderColor:r?i.neutral10:n?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:n?i.primary:i.neutral30}})},ite=function(t){var e=t.children,r=t.isDisabled,n=t.isFocused,a=t.innerRef,i=t.innerProps,o=t.menuIsOpen;return rr("div",ir({ref:a},wa(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":n,"control--menu-is-open":o}),i,{"aria-disabled":r||void 0}),e)},ote=ite,lte=["data"],ste=function(t,e){var r=t.theme.spacing;return e?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},ute=function(t){var e=t.children,r=t.cx,n=t.getStyles,a=t.getClassNames,i=t.Heading,o=t.headingProps,l=t.innerProps,s=t.label,f=t.theme,c=t.selectProps;return rr("div",ir({},wa(t,"group",{group:!0}),l),rr(i,ir({},o,{selectProps:c,theme:f,getStyles:n,getClassNames:a,cx:r}),s),rr("div",null,e))},cte=function(t,e){var r=t.theme,n=r.colors,a=r.spacing;return Ft({label:"group",cursor:"default",display:"block"},e?{}:{color:n.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:a.baseUnit*3,paddingRight:a.baseUnit*3,textTransform:"uppercase"})},fte=function(t){var e=LI(t);e.data;var r=Bo(e,lte);return rr("div",ir({},wa(t,"groupHeading",{"group-heading":!0}),r))},dte=ute,hte=["innerRef","isDisabled","isHidden","inputClassName"],pte=function(t,e){var r=t.isDisabled,n=t.value,a=t.theme,i=a.spacing,o=a.colors;return Ft(Ft({visibility:r?"hidden":"visible",transform:n?"translateZ(0)":""},mte),e?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:o.neutral80})},zI={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},mte={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ft({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},zI)},gte=function(t){return Ft({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},zI)},yte=function(t){var e=t.cx,r=t.value,n=LI(t),a=n.innerRef,i=n.isDisabled,o=n.isHidden,l=n.inputClassName,s=Bo(n,hte);return rr("div",ir({},wa(t,"input",{"input-container":!0}),{"data-value":r||""}),rr("input",ir({className:e({input:!0},l),ref:a,style:gte(o),disabled:i},s)))},vte=yte,bte=function(t,e){var r=t.theme,n=r.spacing,a=r.borderRadius,i=r.colors;return Ft({label:"multiValue",display:"flex",minWidth:0},e?{}:{backgroundColor:i.neutral10,borderRadius:a/2,margin:n.baseUnit/2})},xte=function(t,e){var r=t.theme,n=r.borderRadius,a=r.colors,i=t.cropWithEllipsis;return Ft({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},e?{}:{borderRadius:n/2,color:a.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},wte=function(t,e){var r=t.theme,n=r.spacing,a=r.borderRadius,i=r.colors,o=t.isFocused;return Ft({alignItems:"center",display:"flex"},e?{}:{borderRadius:a/2,backgroundColor:o?i.dangerLight:void 0,paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},HI=function(t){var e=t.children,r=t.innerProps;return rr("div",r,e)},Ste=HI,Cte=HI;function kte(t){var e=t.children,r=t.innerProps;return rr("div",ir({role:"button"},r),e||rr(Gv,{size:14}))}var _te=function(t){var e=t.children,r=t.components,n=t.data,a=t.innerProps,i=t.isDisabled,o=t.removeProps,l=t.selectProps,s=r.Container,f=r.Label,c=r.Remove;return rr(s,{data:n,innerProps:Ft(Ft({},wa(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),a),selectProps:l},rr(f,{data:n,innerProps:Ft({},wa(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},e),rr(c,{data:n,innerProps:Ft(Ft({},wa(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(e||"option")},o),selectProps:l}))},Ote=_te,Dte=function(t,e){var r=t.isDisabled,n=t.isFocused,a=t.isSelected,i=t.theme,o=i.spacing,l=i.colors;return Ft({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},e?{}:{backgroundColor:a?l.primary:n?l.primary25:"transparent",color:r?l.neutral20:a?l.neutral0:"inherit",padding:"".concat(o.baseUnit*2,"px ").concat(o.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:a?l.primary:l.primary50}})},Ate=function(t){var e=t.children,r=t.isDisabled,n=t.isFocused,a=t.isSelected,i=t.innerRef,o=t.innerProps;return rr("div",ir({},wa(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":n,"option--is-selected":a}),{ref:i,"aria-disabled":r},o),e)},Tte=Ate,Mte=function(t,e){var r=t.theme,n=r.spacing,a=r.colors;return Ft({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},e?{}:{color:a.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2})},Ete=function(t){var e=t.children,r=t.innerProps;return rr("div",ir({},wa(t,"placeholder",{placeholder:!0}),r),e)},jte=Ete,Lte=function(t,e){var r=t.isDisabled,n=t.theme,a=n.spacing,i=n.colors;return Ft({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e?{}:{color:r?i.neutral40:i.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},Nte=function(t){var e=t.children,r=t.isDisabled,n=t.innerProps;return rr("div",ir({},wa(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),n),e)},Ite=Nte,Yv={ClearIndicator:Zee,Control:ote,DropdownIndicator:Kee,DownChevron:VI,CrossIcon:Gv,Group:dte,GroupHeading:fte,IndicatorsContainer:Wee,IndicatorSeparator:ete,Input:vte,LoadingIndicator:nte,Menu:Eee,MenuList:Lee,MenuPortal:Bee,LoadingMessage:Ree,NoOptionsMessage:Pee,MultiValue:Ote,MultiValueContainer:Ste,MultiValueLabel:Cte,MultiValueRemove:kte,Option:Tte,Placeholder:jte,SelectContainer:Fee,SingleValue:Ite,ValueContainer:Hee},Pte=function(t){return Ft(Ft({},Yv),t.components)},F_=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Rte(t,e){return!!(t===e||F_(t)&&F_(e))}function $te(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!Rte(t[r],e[r]))return!1;return!0}function Bte(t,e){e===void 0&&(e=$te);var r=null;function n(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];if(r&&r.lastThis===this&&e(a,r.lastArgs))return r.lastResult;var o=t.apply(this,a);return r={lastResult:o,lastArgs:a,lastThis:this},o}return n.clear=function(){r=null},n}var Vte={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"},Fte=function(t){return rr("span",ir({css:Vte},t))},z_=Fte,zte={guidance:function(t){var e=t.isSearchable,r=t.isMulti,n=t.tabSelectsValue,a=t.context,i=t.isInitialFocus;switch(a){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(n?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(t["aria-label"]||"Select"," is focused ").concat(e?",type to refine list":"",", press Down to open the menu, ").concat(r?" 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 e=t.action,r=t.label,n=r===void 0?"":r,a=t.labels,i=t.isDisabled;switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(a.length>1?"s":""," ").concat(a.join(","),", selected.");case"select-option":return i?"option ".concat(n," is disabled. Select another option."):"option ".concat(n,", selected.");default:return""}},onFocus:function(t){var e=t.context,r=t.focused,n=t.options,a=t.label,i=a===void 0?"":a,o=t.selectValue,l=t.isDisabled,s=t.isSelected,f=t.isAppleDevice,c=function(m,g){return m&&m.length?"".concat(m.indexOf(g)+1," of ").concat(m.length):""};if(e==="value"&&o)return"value ".concat(i," focused, ").concat(c(o,r),".");if(e==="menu"&&f){var h=l?" disabled":"",d="".concat(s?" selected":"").concat(h);return"".concat(i).concat(d,", ").concat(c(n,r),".")}return""},onFilter:function(t){var e=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(e?" for search term "+e:"",".")}},Hte=function(t){var e=t.ariaSelection,r=t.focusedOption,n=t.focusedValue,a=t.focusableOptions,i=t.isFocused,o=t.selectValue,l=t.selectProps,s=t.id,f=t.isAppleDevice,c=l.ariaLiveMessages,h=l.getOptionLabel,d=l.inputValue,m=l.isMulti,g=l.isOptionDisabled,y=l.isSearchable,b=l.menuIsOpen,S=l.options,w=l.screenReaderStatus,C=l.tabSelectsValue,k=l.isLoading,_=l["aria-label"],D=l["aria-live"],T=I.useMemo(function(){return Ft(Ft({},zte),c||{})},[c]),A=I.useMemo(function(){var K="";if(e&&T.onChange){var B=e.option,j=e.options,$=e.removedValue,V=e.removedValues,z=e.value,W=function(ee){return Array.isArray(ee)?null:ee},G=$||B||W(z),ae=G?h(G):"",U=j||V||void 0,H=U?U.map(h):[],R=Ft({isDisabled:G&&g(G,o),label:ae,labels:H},e);K=T.onChange(R)}return K},[e,T,g,o,h]),M=I.useMemo(function(){var K="",B=r||n,j=!!(r&&o&&o.includes(r));if(B&&T.onFocus){var $={focused:B,label:h(B),isDisabled:g(B,o),isSelected:j,options:a,context:B===r?"menu":"value",selectValue:o,isAppleDevice:f};K=T.onFocus($)}return K},[r,n,h,g,T,a,o,f]),E=I.useMemo(function(){var K="";if(b&&S.length&&!k&&T.onFilter){var B=w({count:a.length});K=T.onFilter({inputValue:d,resultsMessage:B})}return K},[a,d,b,T,S,w,k]),N=(e==null?void 0:e.action)==="initial-input-focus",Y=I.useMemo(function(){var K="";if(T.guidance){var B=n?"value":b?"menu":"input";K=T.guidance({"aria-label":_,context:B,isDisabled:r&&g(r,o),isMulti:m,isSearchable:y,tabSelectsValue:C,isInitialFocus:N})}return K},[_,r,n,m,g,y,b,T,o,C,N]),ne=rr(I.Fragment,null,rr("span",{id:"aria-selection"},A),rr("span",{id:"aria-focused"},M),rr("span",{id:"aria-results"},E),rr("span",{id:"aria-guidance"},Y));return rr(I.Fragment,null,rr(z_,{id:s},N&&ne),rr(z_,{"aria-live":D,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!N&&ne))},qte=Hte,Bg=[{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źẑżžẓẕƶȥɀⱬꝣ"}],Wte=new RegExp("["+Bg.map(function(t){return t.letters}).join("")+"]","g"),qI={};for(var op=0;op<Bg.length;op++)for(var lp=Bg[op],sp=0;sp<lp.letters.length;sp++)qI[lp.letters[sp]]=lp.base;var WI=function(t){return t.replace(Wte,function(e){return qI[e]})},Ute=Bte(WI),H_=function(t){return t.replace(/^\s+|\s+$/g,"")},Gte=function(t){return"".concat(t.label," ").concat(t.value)},Z1=function(t){return function(e,r){if(e.data.__isNew__)return!0;var n=Ft({ignoreCase:!0,ignoreAccents:!0,stringify:Gte,trim:!0,matchFrom:"any"},t),a=n.ignoreCase,i=n.ignoreAccents,o=n.stringify,l=n.trim,s=n.matchFrom,f=l?H_(r):r,c=l?H_(o(e)):o(e);return a&&(f=f.toLowerCase(),c=c.toLowerCase()),i&&(f=Ute(f),c=WI(c)),s==="start"?c.substr(0,f.length)===f:c.indexOf(f)>-1}},Yte=["innerRef"];function Xte(t){var e=t.innerRef,r=Bo(t,Yte),n=Cee(r,"onExited","in","enter","exit","appear");return rr("input",ir({ref:e},n,{css:Uv({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)"},"","")}))}var Kte=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function Jte(t){var e=t.isEnabled,r=t.onBottomArrive,n=t.onBottomLeave,a=t.onTopArrive,i=t.onTopLeave,o=I.useRef(!1),l=I.useRef(!1),s=I.useRef(0),f=I.useRef(null),c=I.useCallback(function(b,S){if(f.current!==null){var w=f.current,C=w.scrollTop,k=w.scrollHeight,_=w.clientHeight,D=f.current,T=S>0,A=k-_-C,M=!1;A>S&&o.current&&(n&&n(b),o.current=!1),T&&l.current&&(i&&i(b),l.current=!1),T&&S>A?(r&&!o.current&&r(b),D.scrollTop=k,M=!0,o.current=!0):!T&&-S>C&&(a&&!l.current&&a(b),D.scrollTop=0,M=!0,l.current=!0),M&&Kte(b)}},[r,n,a,i]),h=I.useCallback(function(b){c(b,b.deltaY)},[c]),d=I.useCallback(function(b){s.current=b.changedTouches[0].clientY},[]),m=I.useCallback(function(b){var S=s.current-b.changedTouches[0].clientY;c(b,S)},[c]),g=I.useCallback(function(b){if(b){var S=xee?{passive:!1}:!1;b.addEventListener("wheel",h,S),b.addEventListener("touchstart",d,S),b.addEventListener("touchmove",m,S)}},[m,d,h]),y=I.useCallback(function(b){b&&(b.removeEventListener("wheel",h,!1),b.removeEventListener("touchstart",d,!1),b.removeEventListener("touchmove",m,!1))},[m,d,h]);return I.useEffect(function(){if(e){var b=f.current;return g(b),function(){y(b)}}},[e,g,y]),function(b){f.current=b}}var q_=["boxSizing","height","overflow","paddingRight","position"],W_={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function U_(t){t.cancelable&&t.preventDefault()}function G_(t){t.stopPropagation()}function Y_(){var t=this.scrollTop,e=this.scrollHeight,r=t+this.offsetHeight;t===0?this.scrollTop=1:r===e&&(this.scrollTop=t-1)}function X_(){return"ontouchstart"in window||navigator.maxTouchPoints}var K_=!!(typeof window<"u"&&window.document&&window.document.createElement),fl=0,X4={capture:!1,passive:!1};function Zte(t){var e=t.isEnabled,r=t.accountForScrollbars,n=r===void 0?!0:r,a=I.useRef({}),i=I.useRef(null),o=I.useCallback(function(s){if(K_){var f=document.body,c=f&&f.style;if(n&&q_.forEach(function(g){var y=c&&c[g];a.current[g]=y}),n&&fl<1){var h=parseInt(a.current.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,m=window.innerWidth-d+h||0;Object.keys(W_).forEach(function(g){var y=W_[g];c&&(c[g]=y)}),c&&(c.paddingRight="".concat(m,"px"))}f&&X_()&&(f.addEventListener("touchmove",U_,X4),s&&(s.addEventListener("touchstart",Y_,X4),s.addEventListener("touchmove",G_,X4))),fl+=1}},[n]),l=I.useCallback(function(s){if(K_){var f=document.body,c=f&&f.style;fl=Math.max(fl-1,0),n&&fl<1&&q_.forEach(function(h){var d=a.current[h];c&&(c[h]=d)}),f&&X_()&&(f.removeEventListener("touchmove",U_,X4),s&&(s.removeEventListener("touchstart",Y_,X4),s.removeEventListener("touchmove",G_,X4)))}},[n]);return I.useEffect(function(){if(e){var s=i.current;return o(s),function(){l(s)}}},[e,o,l]),function(s){i.current=s}}var Qte=function(t){var e=t.target;return e.ownerDocument.activeElement&&e.ownerDocument.activeElement.blur()},ere={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function tre(t){var e=t.children,r=t.lockEnabled,n=t.captureEnabled,a=n===void 0?!0:n,i=t.onBottomArrive,o=t.onBottomLeave,l=t.onTopArrive,s=t.onTopLeave,f=Jte({isEnabled:a,onBottomArrive:i,onBottomLeave:o,onTopArrive:l,onTopLeave:s}),c=Zte({isEnabled:r}),h=function(d){f(d),c(d)};return rr(I.Fragment,null,r&&rr("div",{onClick:Qte,css:ere}),e(h))}var rre={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},nre=function(t){var e=t.name,r=t.onFocus;return rr("input",{required:!0,name:e,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:rre,value:"",onChange:function(){}})},are=nre;function Xv(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function ire(){return Xv(/^iPhone/i)}function UI(){return Xv(/^Mac/i)}function ore(){return Xv(/^iPad/i)||UI()&&navigator.maxTouchPoints>1}function lre(){return ire()||ore()}function sre(){return UI()||lre()}var ure=function(t){return t.label},cre=function(t){return t.label},fre=function(t){return t.value},dre=function(t){return!!t.isDisabled},hre={clearIndicator:Jee,container:Vee,control:ate,dropdownIndicator:Xee,group:ste,groupHeading:cte,indicatorsContainer:qee,indicatorSeparator:Qee,input:pte,loadingIndicator:rte,loadingMessage:Iee,menu:Aee,menuList:jee,menuPortal:$ee,multiValue:bte,multiValueLabel:xte,multiValueRemove:wte,noOptionsMessage:Nee,option:Dte,placeholder:Mte,singleValue:Lte,valueContainer:zee},pre={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%)"},mre=4,GI=4,gre=38,yre=GI*2,vre={baseUnit:GI,controlHeight:gre,menuGutter:yre},up={borderRadius:mre,colors:pre,spacing:vre},bre={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:B_(),captureMenuScroll:!B_(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Z1(),formatGroupLabel:ure,getOptionLabel:cre,getOptionValue:fre,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:dre,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!vee(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var e=t.count;return"".concat(e," result").concat(e!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function J_(t,e,r,n){var a=KI(t,e,r),i=JI(t,e,r),o=XI(t,e),l=Xu(t,e);return{type:"option",data:e,isDisabled:a,isSelected:i,label:o,value:l,index:n}}function yu(t,e){return t.options.map(function(r,n){if("options"in r){var a=r.options.map(function(o,l){return J_(t,o,e,l)}).filter(function(o){return Q_(t,o)});return a.length>0?{type:"group",data:r,options:a,index:n}:void 0}var i=J_(t,r,e,n);return Q_(t,i)?i:void 0}).filter(wee)}function YI(t){return t.reduce(function(e,r){return r.type==="group"?e.push.apply(e,io(r.options.map(function(n){return n.data}))):e.push(r.data),e},[])}function Z_(t,e){return t.reduce(function(r,n){return n.type==="group"?r.push.apply(r,io(n.options.map(function(a){return{data:a.data,id:"".concat(e,"-").concat(n.index,"-").concat(a.index)}}))):r.push({data:n.data,id:"".concat(e,"-").concat(n.index)}),r},[])}function xre(t,e){return YI(yu(t,e))}function Q_(t,e){var r=t.inputValue,n=r===void 0?"":r,a=e.data,i=e.isSelected,o=e.label,l=e.value;return(!QI(t)||!i)&&ZI(t,{label:o,value:l,data:a},n)}function wre(t,e){var r=t.focusedValue,n=t.selectValue,a=n.indexOf(r);if(a>-1){var i=e.indexOf(r);if(i>-1)return r;if(a<e.length)return e[a]}return null}function Sre(t,e){var r=t.focusedOption;return r&&e.indexOf(r)>-1?r:e[0]}var cp=function(t,e){var r,n=(r=t.find(function(a){return a.data===e}))===null||r===void 0?void 0:r.id;return n||null},XI=function(t,e){return t.getOptionLabel(e)},Xu=function(t,e){return t.getOptionValue(e)};function KI(t,e,r){return typeof t.isOptionDisabled=="function"?t.isOptionDisabled(e,r):!1}function JI(t,e,r){if(r.indexOf(e)>-1)return!0;if(typeof t.isOptionSelected=="function")return t.isOptionSelected(e,r);var n=Xu(t,e);return r.some(function(a){return Xu(t,a)===n})}function ZI(t,e,r){return t.filterOption?t.filterOption(e,r):!0}var QI=function(t){var e=t.hideSelectedOptions,r=t.isMulti;return e===void 0?r:e},Cre=1,eP=function(t){oQ(r,t);var e=uQ(r);function r(n){var a;if(aQ(this,r),a=e.call(this,n),a.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:""},a.blockOptionHover=!1,a.isComposing=!1,a.commonProps=void 0,a.initialTouchX=0,a.initialTouchY=0,a.openAfterFocus=!1,a.scrollToFocusedOptionOnUpdate=!1,a.userIsDragging=void 0,a.isAppleDevice=sre(),a.controlRef=null,a.getControlRef=function(s){a.controlRef=s},a.focusedOptionRef=null,a.getFocusedOptionRef=function(s){a.focusedOptionRef=s},a.menuListRef=null,a.getMenuListRef=function(s){a.menuListRef=s},a.inputRef=null,a.getInputRef=function(s){a.inputRef=s},a.focus=a.focusInput,a.blur=a.blurInput,a.onChange=function(s,f){var c=a.props,h=c.onChange,d=c.name;f.name=d,a.ariaOnChange(s,f),h(s,f)},a.setValue=function(s,f,c){var h=a.props,d=h.closeMenuOnSelect,m=h.isMulti,g=h.inputValue;a.onInputChange("",{action:"set-value",prevInputValue:g}),d&&(a.setState({inputIsHiddenAfterUpdate:!m}),a.onMenuClose()),a.setState({clearFocusValueOnUpdate:!0}),a.onChange(s,{action:f,option:c})},a.selectOption=function(s){var f=a.props,c=f.blurInputOnSelect,h=f.isMulti,d=f.name,m=a.state.selectValue,g=h&&a.isOptionSelected(s,m),y=a.isOptionDisabled(s,m);if(g){var b=a.getOptionValue(s);a.setValue(m.filter(function(S){return a.getOptionValue(S)!==b}),"deselect-option",s)}else if(!y)h?a.setValue([].concat(io(m),[s]),"select-option",s):a.setValue(s,"select-option");else{a.ariaOnChange(s,{action:"select-option",option:s,name:d});return}c&&a.blurInput()},a.removeValue=function(s){var f=a.props.isMulti,c=a.state.selectValue,h=a.getOptionValue(s),d=c.filter(function(g){return a.getOptionValue(g)!==h}),m=_8(f,d,d[0]||null);a.onChange(m,{action:"remove-value",removedValue:s}),a.focusInput()},a.clearValue=function(){var s=a.state.selectValue;a.onChange(_8(a.props.isMulti,[],null),{action:"clear",removedValues:s})},a.popValue=function(){var s=a.props.isMulti,f=a.state.selectValue,c=f[f.length-1],h=f.slice(0,f.length-1),d=_8(s,h,h[0]||null);c&&a.onChange(d,{action:"pop-value",removedValue:c})},a.getFocusedOptionId=function(s){return cp(a.state.focusableOptionsWithIds,s)},a.getFocusableOptionsWithIds=function(){return Z_(yu(a.props,a.state.selectValue),a.getElementId("option"))},a.getValue=function(){return a.state.selectValue},a.cx=function(){for(var s=arguments.length,f=new Array(s),c=0;c<s;c++)f[c]=arguments[c];return hee.apply(void 0,[a.props.classNamePrefix].concat(f))},a.getOptionLabel=function(s){return XI(a.props,s)},a.getOptionValue=function(s){return Xu(a.props,s)},a.getStyles=function(s,f){var c=a.props.unstyled,h=hre[s](f,c);h.boxSizing="border-box";var d=a.props.styles[s];return d?d(h,f):h},a.getClassNames=function(s,f){var c,h;return(c=(h=a.props.classNames)[s])===null||c===void 0?void 0:c.call(h,f)},a.getElementId=function(s){return"".concat(a.state.instancePrefix,"-").concat(s)},a.getComponents=function(){return Pte(a.props)},a.buildCategorizedOptions=function(){return yu(a.props,a.state.selectValue)},a.getCategorizedOptions=function(){return a.props.menuIsOpen?a.buildCategorizedOptions():[]},a.buildFocusableOptions=function(){return YI(a.buildCategorizedOptions())},a.getFocusableOptions=function(){return a.props.menuIsOpen?a.buildFocusableOptions():[]},a.ariaOnChange=function(s,f){a.setState({ariaSelection:Ft({value:s},f)})},a.onMenuMouseDown=function(s){s.button===0&&(s.stopPropagation(),s.preventDefault(),a.focusInput())},a.onMenuMouseMove=function(s){a.blockOptionHover=!1},a.onControlMouseDown=function(s){if(!s.defaultPrevented){var f=a.props.openMenuOnClick;a.state.isFocused?a.props.menuIsOpen?s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&a.onMenuClose():f&&a.openMenu("first"):(f&&(a.openAfterFocus=!0),a.focusInput()),s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&s.preventDefault()}},a.onDropdownIndicatorMouseDown=function(s){if(!(s&&s.type==="mousedown"&&s.button!==0)&&!a.props.isDisabled){var f=a.props,c=f.isMulti,h=f.menuIsOpen;a.focusInput(),h?(a.setState({inputIsHiddenAfterUpdate:!c}),a.onMenuClose()):a.openMenu("first"),s.preventDefault()}},a.onClearIndicatorMouseDown=function(s){s&&s.type==="mousedown"&&s.button!==0||(a.clearValue(),s.preventDefault(),a.openAfterFocus=!1,s.type==="touchend"?a.focusInput():setTimeout(function(){return a.focusInput()}))},a.onScroll=function(s){typeof a.props.closeMenuOnScroll=="boolean"?s.target instanceof HTMLElement&&cf(s.target)&&a.props.onMenuClose():typeof a.props.closeMenuOnScroll=="function"&&a.props.closeMenuOnScroll(s)&&a.props.onMenuClose()},a.onCompositionStart=function(){a.isComposing=!0},a.onCompositionEnd=function(){a.isComposing=!1},a.onTouchStart=function(s){var f=s.touches,c=f&&f.item(0);c&&(a.initialTouchX=c.clientX,a.initialTouchY=c.clientY,a.userIsDragging=!1)},a.onTouchMove=function(s){var f=s.touches,c=f&&f.item(0);if(c){var h=Math.abs(c.clientX-a.initialTouchX),d=Math.abs(c.clientY-a.initialTouchY),m=5;a.userIsDragging=h>m||d>m}},a.onTouchEnd=function(s){a.userIsDragging||(a.controlRef&&!a.controlRef.contains(s.target)&&a.menuListRef&&!a.menuListRef.contains(s.target)&&a.blurInput(),a.initialTouchX=0,a.initialTouchY=0)},a.onControlTouchEnd=function(s){a.userIsDragging||a.onControlMouseDown(s)},a.onClearIndicatorTouchEnd=function(s){a.userIsDragging||a.onClearIndicatorMouseDown(s)},a.onDropdownIndicatorTouchEnd=function(s){a.userIsDragging||a.onDropdownIndicatorMouseDown(s)},a.handleInputChange=function(s){var f=a.props.inputValue,c=s.currentTarget.value;a.setState({inputIsHiddenAfterUpdate:!1}),a.onInputChange(c,{action:"input-change",prevInputValue:f}),a.props.menuIsOpen||a.onMenuOpen()},a.onInputFocus=function(s){a.props.onFocus&&a.props.onFocus(s),a.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(a.openAfterFocus||a.props.openMenuOnFocus)&&a.openMenu("first"),a.openAfterFocus=!1},a.onInputBlur=function(s){var f=a.props.inputValue;if(a.menuListRef&&a.menuListRef.contains(document.activeElement)){a.inputRef.focus();return}a.props.onBlur&&a.props.onBlur(s),a.onInputChange("",{action:"input-blur",prevInputValue:f}),a.onMenuClose(),a.setState({focusedValue:null,isFocused:!1})},a.onOptionHover=function(s){if(!(a.blockOptionHover||a.state.focusedOption===s)){var f=a.getFocusableOptions(),c=f.indexOf(s);a.setState({focusedOption:s,focusedOptionId:c>-1?a.getFocusedOptionId(s):null})}},a.shouldHideSelectedOptions=function(){return QI(a.props)},a.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),a.focus()},a.onKeyDown=function(s){var f=a.props,c=f.isMulti,h=f.backspaceRemovesValue,d=f.escapeClearsValue,m=f.inputValue,g=f.isClearable,y=f.isDisabled,b=f.menuIsOpen,S=f.onKeyDown,w=f.tabSelectsValue,C=f.openMenuOnFocus,k=a.state,_=k.focusedOption,D=k.focusedValue,T=k.selectValue;if(!y&&!(typeof S=="function"&&(S(s),s.defaultPrevented))){switch(a.blockOptionHover=!0,s.key){case"ArrowLeft":if(!c||m)return;a.focusValue("previous");break;case"ArrowRight":if(!c||m)return;a.focusValue("next");break;case"Delete":case"Backspace":if(m)return;if(D)a.removeValue(D);else{if(!h)return;c?a.popValue():g&&a.clearValue()}break;case"Tab":if(a.isComposing||s.shiftKey||!b||!w||!_||C&&a.isOptionSelected(_,T))return;a.selectOption(_);break;case"Enter":if(s.keyCode===229)break;if(b){if(!_||a.isComposing)return;a.selectOption(_);break}return;case"Escape":b?(a.setState({inputIsHiddenAfterUpdate:!1}),a.onInputChange("",{action:"menu-close",prevInputValue:m}),a.onMenuClose()):g&&d&&a.clearValue();break;case" ":if(m)return;if(!b){a.openMenu("first");break}if(!_)return;a.selectOption(_);break;case"ArrowUp":b?a.focusOption("up"):a.openMenu("last");break;case"ArrowDown":b?a.focusOption("down"):a.openMenu("first");break;case"PageUp":if(!b)return;a.focusOption("pageup");break;case"PageDown":if(!b)return;a.focusOption("pagedown");break;case"Home":if(!b)return;a.focusOption("first");break;case"End":if(!b)return;a.focusOption("last");break;default:return}s.preventDefault()}},a.state.instancePrefix="react-select-"+(a.props.instanceId||++Cre),a.state.selectValue=R_(n.value),n.menuIsOpen&&a.state.selectValue.length){var i=a.getFocusableOptionsWithIds(),o=a.buildFocusableOptions(),l=o.indexOf(a.state.selectValue[0]);a.state.focusableOptionsWithIds=i,a.state.focusedOption=o[l],a.state.focusedOptionId=cp(i,o[l])}return a}return iQ(r,[{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&&$_(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(n){var a=this.props,i=a.isDisabled,o=a.menuIsOpen,l=this.state.isFocused;(l&&!i&&n.isDisabled||l&&o&&!n.menuIsOpen)&&this.focusInput(),l&&i&&!n.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!i&&n.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&($_(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(n,a){this.props.onInputChange(n,a)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(n){var a=this,i=this.state,o=i.selectValue,l=i.isFocused,s=this.buildFocusableOptions(),f=n==="first"?0:s.length-1;if(!this.props.isMulti){var c=s.indexOf(o[0]);c>-1&&(f=c)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:s[f],focusedOptionId:this.getFocusedOptionId(s[f])},function(){return a.onMenuOpen()})}},{key:"focusValue",value:function(n){var a=this.state,i=a.selectValue,o=a.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=i.indexOf(o);o||(l=-1);var s=i.length-1,f=-1;if(i.length){switch(n){case"previous":l===0?f=0:l===-1?f=s:f=l-1;break;case"next":l>-1&&l<s&&(f=l+1);break}this.setState({inputIsHidden:f!==-1,focusedValue:i[f]})}}}},{key:"focusOption",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",a=this.props.pageSize,i=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var l=0,s=o.indexOf(i);i||(s=-1),n==="up"?l=s>0?s-1:o.length-1:n==="down"?l=(s+1)%o.length:n==="pageup"?(l=s-a,l<0&&(l=0)):n==="pagedown"?(l=s+a,l>o.length-1&&(l=o.length-1)):n==="last"&&(l=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(o[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(up):Ft(Ft({},up),this.props.theme):up}},{key:"getCommonProps",value:function(){var n=this.clearValue,a=this.cx,i=this.getStyles,o=this.getClassNames,l=this.getValue,s=this.selectOption,f=this.setValue,c=this.props,h=c.isMulti,d=c.isRtl,m=c.options,g=this.hasValue();return{clearValue:n,cx:a,getStyles:i,getClassNames:o,getValue:l,hasValue:g,isMulti:h,isRtl:d,options:m,selectOption:s,selectProps:c,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var n=this.state.selectValue;return n.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var n=this.props,a=n.isClearable,i=n.isMulti;return a===void 0?i:a}},{key:"isOptionDisabled",value:function(n,a){return KI(this.props,n,a)}},{key:"isOptionSelected",value:function(n,a){return JI(this.props,n,a)}},{key:"filterOption",value:function(n,a){return ZI(this.props,n,a)}},{key:"formatOptionLabel",value:function(n,a){if(typeof this.props.formatOptionLabel=="function"){var i=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(n,{context:a,inputValue:i,selectValue:o})}else return this.getOptionLabel(n)}},{key:"formatGroupLabel",value:function(n){return this.props.formatGroupLabel(n)}},{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 n=this.props,a=n.isDisabled,i=n.isSearchable,o=n.inputId,l=n.inputValue,s=n.tabIndex,f=n.form,c=n.menuIsOpen,h=n.required,d=this.getComponents(),m=d.Input,g=this.state,y=g.inputIsHidden,b=g.ariaSelection,S=this.commonProps,w=o||this.getElementId("input"),C=Ft(Ft(Ft({"aria-autocomplete":"list","aria-expanded":c,"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":h,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},c&&{"aria-controls":this.getElementId("listbox")}),!i&&{"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 i?me.createElement(m,ir({},S,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:w,innerRef:this.getInputRef,isDisabled:a,isHidden:y,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:s,form:f,type:"text",value:l},C)):me.createElement(Xte,ir({id:w,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Gu,onFocus:this.onInputFocus,disabled:a,tabIndex:s,inputMode:"none",form:f,value:""},C))}},{key:"renderPlaceholderOrValue",value:function(){var n=this,a=this.getComponents(),i=a.MultiValue,o=a.MultiValueContainer,l=a.MultiValueLabel,s=a.MultiValueRemove,f=a.SingleValue,c=a.Placeholder,h=this.commonProps,d=this.props,m=d.controlShouldRenderValue,g=d.isDisabled,y=d.isMulti,b=d.inputValue,S=d.placeholder,w=this.state,C=w.selectValue,k=w.focusedValue,_=w.isFocused;if(!this.hasValue()||!m)return b?null:me.createElement(c,ir({},h,{key:"placeholder",isDisabled:g,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),S);if(y)return C.map(function(T,A){var M=T===k,E="".concat(n.getOptionLabel(T),"-").concat(n.getOptionValue(T));return me.createElement(i,ir({},h,{components:{Container:o,Label:l,Remove:s},isFocused:M,isDisabled:g,key:E,index:A,removeProps:{onClick:function(){return n.removeValue(T)},onTouchEnd:function(){return n.removeValue(T)},onMouseDown:function(N){N.preventDefault()}},data:T}),n.formatOptionLabel(T,"value"))});if(b)return null;var D=C[0];return me.createElement(f,ir({},h,{data:D,isDisabled:g}),this.formatOptionLabel(D,"value"))}},{key:"renderClearIndicator",value:function(){var n=this.getComponents(),a=n.ClearIndicator,i=this.commonProps,o=this.props,l=o.isDisabled,s=o.isLoading,f=this.state.isFocused;if(!this.isClearable()||!a||l||!this.hasValue()||s)return null;var c={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return me.createElement(a,ir({},i,{innerProps:c,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var n=this.getComponents(),a=n.LoadingIndicator,i=this.commonProps,o=this.props,l=o.isDisabled,s=o.isLoading,f=this.state.isFocused;if(!a||!s)return null;var c={"aria-hidden":"true"};return me.createElement(a,ir({},i,{innerProps:c,isDisabled:l,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var n=this.getComponents(),a=n.DropdownIndicator,i=n.IndicatorSeparator;if(!a||!i)return null;var o=this.commonProps,l=this.props.isDisabled,s=this.state.isFocused;return me.createElement(i,ir({},o,{isDisabled:l,isFocused:s}))}},{key:"renderDropdownIndicator",value:function(){var n=this.getComponents(),a=n.DropdownIndicator;if(!a)return null;var i=this.commonProps,o=this.props.isDisabled,l=this.state.isFocused,s={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return me.createElement(a,ir({},i,{innerProps:s,isDisabled:o,isFocused:l}))}},{key:"renderMenu",value:function(){var n=this,a=this.getComponents(),i=a.Group,o=a.GroupHeading,l=a.Menu,s=a.MenuList,f=a.MenuPortal,c=a.LoadingMessage,h=a.NoOptionsMessage,d=a.Option,m=this.commonProps,g=this.state.focusedOption,y=this.props,b=y.captureMenuScroll,S=y.inputValue,w=y.isLoading,C=y.loadingMessage,k=y.minMenuHeight,_=y.maxMenuHeight,D=y.menuIsOpen,T=y.menuPlacement,A=y.menuPosition,M=y.menuPortalTarget,E=y.menuShouldBlockScroll,N=y.menuShouldScrollIntoView,Y=y.noOptionsMessage,ne=y.onMenuScrollToTop,K=y.onMenuScrollToBottom;if(!D)return null;var B=function(G,ae){var U=G.type,H=G.data,R=G.isDisabled,ee=G.isSelected,J=G.label,Z=G.value,re=g===H,te=R?void 0:function(){return n.onOptionHover(H)},F=R?void 0:function(){return n.selectOption(H)},q="".concat(n.getElementId("option"),"-").concat(ae),X={id:q,onClick:F,onMouseMove:te,onMouseOver:te,tabIndex:-1,role:"option","aria-selected":n.isAppleDevice?void 0:ee};return me.createElement(d,ir({},m,{innerProps:X,data:H,isDisabled:R,isSelected:ee,key:q,label:J,type:U,value:Z,isFocused:re,innerRef:re?n.getFocusedOptionRef:void 0}),n.formatOptionLabel(G.data,"menu"))},j;if(this.hasOptions())j=this.getCategorizedOptions().map(function(G){if(G.type==="group"){var ae=G.data,U=G.options,H=G.index,R="".concat(n.getElementId("group"),"-").concat(H),ee="".concat(R,"-heading");return me.createElement(i,ir({},m,{key:R,data:ae,options:U,Heading:o,headingProps:{id:ee,data:G.data},label:n.formatGroupLabel(G.data)}),G.options.map(function(J){return B(J,"".concat(H,"-").concat(J.index))}))}else if(G.type==="option")return B(G,"".concat(G.index))});else if(w){var $=C({inputValue:S});if($===null)return null;j=me.createElement(c,m,$)}else{var V=Y({inputValue:S});if(V===null)return null;j=me.createElement(h,m,V)}var z={minMenuHeight:k,maxMenuHeight:_,menuPlacement:T,menuPosition:A,menuShouldScrollIntoView:N},W=me.createElement(Tee,ir({},m,z),function(G){var ae=G.ref,U=G.placerProps,H=U.placement,R=U.maxHeight;return me.createElement(l,ir({},m,z,{innerRef:ae,innerProps:{onMouseDown:n.onMenuMouseDown,onMouseMove:n.onMenuMouseMove},isLoading:w,placement:H}),me.createElement(tre,{captureEnabled:b,onTopArrive:ne,onBottomArrive:K,lockEnabled:E},function(ee){return me.createElement(s,ir({},m,{innerRef:function(J){n.getMenuListRef(J),ee(J)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:n.getElementId("listbox")},isLoading:w,maxHeight:R,focusedOption:g}),j)}))});return M||A==="fixed"?me.createElement(f,ir({},m,{appendTo:M,controlElement:this.controlRef,menuPlacement:T,menuPosition:A}),W):W}},{key:"renderFormField",value:function(){var n=this,a=this.props,i=a.delimiter,o=a.isDisabled,l=a.isMulti,s=a.name,f=a.required,c=this.state.selectValue;if(f&&!this.hasValue()&&!o)return me.createElement(are,{name:s,onFocus:this.onValueInputFocus});if(!(!s||o))if(l)if(i){var h=c.map(function(g){return n.getOptionValue(g)}).join(i);return me.createElement("input",{name:s,type:"hidden",value:h})}else{var d=c.length>0?c.map(function(g,y){return me.createElement("input",{key:"i-".concat(y),name:s,type:"hidden",value:n.getOptionValue(g)})}):me.createElement("input",{name:s,type:"hidden",value:""});return me.createElement("div",null,d)}else{var m=c[0]?this.getOptionValue(c[0]):"";return me.createElement("input",{name:s,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var n=this.commonProps,a=this.state,i=a.ariaSelection,o=a.focusedOption,l=a.focusedValue,s=a.isFocused,f=a.selectValue,c=this.getFocusableOptions();return me.createElement(qte,ir({},n,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:o,focusedValue:l,isFocused:s,selectValue:f,focusableOptions:c,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var n=this.getComponents(),a=n.Control,i=n.IndicatorsContainer,o=n.SelectContainer,l=n.ValueContainer,s=this.props,f=s.className,c=s.id,h=s.isDisabled,d=s.menuIsOpen,m=this.state.isFocused,g=this.commonProps=this.getCommonProps();return me.createElement(o,ir({},g,{className:f,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:m}),this.renderLiveRegion(),me.createElement(a,ir({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:m,menuIsOpen:d}),me.createElement(l,ir({},g,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),me.createElement(i,ir({},g,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(n,a){var i=a.prevProps,o=a.clearFocusValueOnUpdate,l=a.inputIsHiddenAfterUpdate,s=a.ariaSelection,f=a.isFocused,c=a.prevWasFocused,h=a.instancePrefix,d=n.options,m=n.value,g=n.menuIsOpen,y=n.inputValue,b=n.isMulti,S=R_(m),w={};if(i&&(m!==i.value||d!==i.options||g!==i.menuIsOpen||y!==i.inputValue)){var C=g?xre(n,S):[],k=g?Z_(yu(n,S),"".concat(h,"-option")):[],_=o?wre(a,S):null,D=Sre(a,C),T=cp(k,D);w={selectValue:S,focusedOption:D,focusedOptionId:T,focusableOptionsWithIds:k,focusedValue:_,clearFocusValueOnUpdate:!1}}var A=l!=null&&n!==i?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},M=s,E=f&&c;return f&&!E&&(M={value:_8(b,S,S[0]||null),options:S,action:"initial-input-focus"},E=!c),(s==null?void 0:s.action)==="initial-input-focus"&&(M=null),Ft(Ft(Ft({},w),A),{},{prevProps:n,ariaSelection:M,prevWasFocused:E})}}]),r}(I.Component);eP.defaultProps=bre;var kre=I.forwardRef(function(t,e){var r=nQ(t);return me.createElement(eP,ir({ref:e},r))}),_re=kre;const Ore=(t,e)=>{const{index:r,getValue:n}=t,a=n();if(r<e)return ke.jsx(Yv.MultiValue,{...t});if(r===e){const i=a.length-e;return ke.jsxs("div",{className:"ml-1 text-sm",children:["+",i]})}return null},Dre=on("text-sm! rounded-none! bg-primary-white! dark:bg-primary-gray-650!",{variants:{variant:{light:"border! border-primary-gray-400! dark:border-primary-gray-500!",normal:"border-2! border-primary-black! dark:border-primary-gray-300!"},size:{sm:"p-0! min-h-[40px]!",base:"min-h-[48px]! px-0! py-0.5!"}},defaultVariants:{variant:"normal",size:"base"}});function Are(t){const{selectProps:e}=t;return ke.jsx(Yv.DropdownIndicator,{...t,children:e.menuIsOpen?ke.jsx(DG,{className:"h-6 w-6 stroke-accent-red dark:stroke-primary-white"}):ke.jsx($u,{className:"h-6 w-6 stroke-accent-red dark:stroke-primary-white"})})}const Tre=t=>({DropdownIndicator:Are,MultiValue:e=>Ore(e,t||1/0),MultiValueRemove:e=>{const{innerRef:r,innerProps:n}=e;return ke.jsx("div",{...r,...n,className:"p-1.5 rounded text-primary-gray-600 hover:text-accent-dark-red dark:text-primary-gray-100 dark:hover:text-accent-light-red",children:ke.jsx(Gc,{size:14})})}});function s1({className:t,variant:e,size:r,truncateLabel:n,placeholder:a,maxTagCount:i,...o}){return ke.jsx(_re,{...o,placeholder:a||"Select...",classNames:{control:()=>Be(Dre({variant:e,size:r}),t),singleValue:()=>"text-primary-black dark:text-primary-white text-base",placeholder:()=>"text-primary-gray-550 dark:text-primary-400 text-base",groupHeading:()=>"font-bold",input:()=>"text-base",multiValue:()=>"bg-primary-gray-300 dark:bg-primary-gray-550 rounded-sm border border-primary-gray-400 dark:border-primary-gray-600",multiValueLabel:()=>`!px-1.5 !py-1 text-sm text-primary-black dark:text-primary-white ${n?" max-w-[72px] truncate":""}`,multiValueRemove:()=>"hover:bg-primary-gray-400 dark:[&_svg]:stroke-primary-white!",valueContainer:()=>"px-1",option:l=>`p-0 text-sm hover:bg-primary-blue-100 dark:hover:bg-primary-blue-400 hover:font-bold hover:text-primary-black${l.isSelected?"bg-primary-blue-600 text-primary-white dark:bg-primary-blue-200 dark:text-primary-gray-700":"bg-primary-white text-primary-black dark:bg-primary-gray-650 dark:text-primary-white"}`,menu:()=>"rounded-none! mt-1! border-0! shadow-lg! p-0!",menuList:()=>"undp-scrollbar pt-0! pb-0!"},components:Tre(i)})}const Mre=on("mt-0 ml-0 mr-0",{variants:{size:{xs:"text-xs",sm:"text-sm",base:"text-base","base-responsive":"text-base md:text-xl",lg:"text-lg",xl:"text-xl"},leading:{none:"leading-none",xs:"leading-[1.25]",sm:"leading-[1.375]",base:"leading-[1.4]",lg:"leading-[1.625]",xl:"leading-[2]"},marginBottom:{none:"mb-0","3xs":"mb-1","2xs":"mb-2",xs:"mb-3",sm:"mb-4",base:"mb-5",lg:"mb-6",xl:"mb-7"}},defaultVariants:{size:"base-responsive",leading:"base",marginBottom:"base"}});function or({children:t,className:e,size:r,leading:n,marginBottom:a,...i}){return ke.jsx("p",{...i,className:Be(Mre({size:r,leading:n,marginBottom:a}),e),children:t})}const Kv=on("mt-0 ml-0 mr-0 p-0",{variants:{marginBottom:{none:"mb-0","2xs":"mb-1",xs:"mb-2",sm:"mb-3","base-responsive":"mb-3 md:mb-4",base:"mb-4",lg:"mb-5",xl:"mb-6"}},defaultVariants:{marginBottom:"base-responsive"}});function tP({children:t,className:e,marginBottom:r,...n}){return ke.jsx("h2",{...n,className:Be("text-[2.5rem] md:text-[2.813rem] lg:text-[3.438rem] font-bold leading-[1.1]",Kv({marginBottom:r}),e),children:t})}function rP({children:t,className:e,marginBottom:r,...n}){return ke.jsx("h3",{...n,className:Be("text-[1.875rem] md:text-[2.188rem] font-semibold leading-[1.15]",Kv({marginBottom:r}),e),children:t})}function Ere({children:t,className:e,marginBottom:r,...n}){return ke.jsx("h5",{...n,className:Be("text-[1.25rem] md:text-[1.563rem] font-normal leading-[1.15]",Kv({marginBottom:r}),e),children:t})}function jre({children:t,className:e,...r}){return ke.jsx("a",{...r,className:Be("undp-link light text-primary-black dark:text-primary-white dark:text-primary-white bg-double-red dark:bg-double-white","cursor-pointer no-underline focus-visible:outline-hidden focus-visible:shadow-[0_0_0_#0468b1]",e),children:t})}var fp,nP="HoverCard",[aP,XSe]=m1(nP,[m0]),Jv=m0(),[KSe,Zv]=aP(nP),iP="HoverCardTrigger",oP=me.forwardRef((t,e)=>{const{__scopeHoverCard:r,...n}=t,a=Zv(iP,r),i=Jv(r);return ke.jsx(Z6,{asChild:!0,...i,children:ke.jsx(Gt.a,{"data-state":a.open?"open":"closed",...n,ref:e,onPointerEnter:kt(t.onPointerEnter,Ju(a.onOpen)),onPointerLeave:kt(t.onPointerLeave,Ju(a.onClose)),onFocus:kt(t.onFocus,a.onOpen),onBlur:kt(t.onBlur,a.onClose),onTouchStart:kt(t.onTouchStart,o=>o.preventDefault())})})});oP.displayName=iP;var Lre="HoverCardPortal",[JSe,Nre]=aP(Lre,{forceMount:void 0}),Ku="HoverCardContent",lP=me.forwardRef((t,e)=>{const r=Nre(Ku,t.__scopeHoverCard),{forceMount:n=r.forceMount,...a}=t,i=Zv(Ku,t.__scopeHoverCard);return ke.jsx(g1,{present:n||i.open,children:ke.jsx(Ire,{"data-state":i.open?"open":"closed",...a,onPointerEnter:kt(t.onPointerEnter,Ju(i.onOpen)),onPointerLeave:kt(t.onPointerLeave,Ju(i.onClose)),ref:e})})});lP.displayName=Ku;var Ire=me.forwardRef((t,e)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,...l}=t,s=Zv(Ku,r),f=Jv(r),c=me.useRef(null),h=wr(e,c),[d,m]=me.useState(!1);return me.useEffect(()=>{if(d){const g=document.body;return fp=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=fp,g.style.webkitUserSelect=fp}}},[d]),me.useEffect(()=>{if(c.current){const g=()=>{m(!1),s.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(s.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),s.hasSelectionRef.current=!1,s.isPointerDownOnContentRef.current=!1}}},[s.isPointerDownOnContentRef,s.hasSelectionRef]),me.useEffect(()=>{c.current&&$re(c.current).forEach(g=>g.setAttribute("tabindex","-1"))}),ke.jsx(z2,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:kt(i,g=>{g.preventDefault()}),onDismiss:s.onDismiss,children:ke.jsx(Vs,{...f,...l,onPointerDown:kt(l.onPointerDown,g=>{g.currentTarget.contains(g.target)&&m(!0),s.hasSelectionRef.current=!1,s.isPointerDownOnContentRef.current=!0}),ref:h,style:{...l.style,userSelect:d?"text":void 0,WebkitUserSelect:d?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Pre="HoverCardArrow",Rre=me.forwardRef((t,e)=>{const{__scopeHoverCard:r,...n}=t,a=Jv(r);return ke.jsx(Fs,{...a,...n,ref:e})});Rre.displayName=Pre;function Ju(t){return e=>e.pointerType==="touch"?void 0:t()}function $re(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)e.push(r.currentNode);return e}var Bre=oP,sP=lP;const Vre=I.forwardRef(({className:t,children:e,...r},n)=>ke.jsx(Bre,{...r,ref:n,className:Be("cursor-pointer dark:text-primary-white text-primary-black",t),children:e}));Vre.displayName="HoverCardTrigger";const Fre=I.forwardRef(({className:t,align:e="center",sideOffset:r=4,...n},a)=>ke.jsx(sP,{...n,ref:a,align:e,sideOffset:r,className:Be("z-50 w-64 border border-primary-gray-300 dark:border-primary-gray-600 text-sm bg-primary-gray-100 dark:bg-primary-gray-650 p-2 text-primary-black dark:text-primary-white outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t)}));Fre.displayName=sP.displayName;const zre=on("w-full bg-primary-white dark:bg-primary-gray-650 text-primary-black dark:text-primary-white text-base transition-colors file:border-0 file:bg-transparent file:font-medium file:text-primary-gray-700 dark:file:text-primary-white focus-visible:outline-hidden focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50 placeholder:text-primary-gray-550 dark:placeholder:text-primary-gray-400",{variants:{variant:{light:"border border-primary-gray-400 dark:border-primary-gray-500",normal:"border-2 border-primary-black dark:border-primary-gray-300"},inputSize:{sm:"px-2.5 py-1",base:"p-2.5 "}},defaultVariants:{inputSize:"base",variant:"normal"}}),uP=I.forwardRef(({className:t,inputSize:e,variant:r,...n},a)=>ke.jsx("input",{...n,ref:a,className:Be(zre({inputSize:e,variant:r}),t)}));uP.displayName="Input";const cP=I.forwardRef(({className:t,inputClassName:e,buttonClassName:r,onSearch:n,searchOnlyOnClick:a,buttonVariant:i,buttonChildren:o,showSearchButton:l,inputVariant:s,inputSize:f,placeholder:c,...h})=>{const[d,m]=I.useState(void 0),[g,y]=I.useState(!1);return ke.jsxs("div",{className:Be("flex gap-0",t),children:[ke.jsxs("div",{className:"relative w-full",children:[ke.jsx(uP,{...h,variant:s,type:"text",className:e,onChange:b=>{m(b.target.value),a||n==null||n(b.target.value)},inputSize:f,onKeyDown:b=>{b.key==="Enter"&&(n==null||n(d))},onFocus:()=>y(!0),onBlur:()=>y(!1)}),!g&&(d===""||!d)&&ke.jsxs("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:[o?null:ke.jsx(Jk,{className:"h-4 w-4 text-primary-gray-500 dark:text-primary-gray-400 mr-2"}),ke.jsx("span",{className:"text-primary-gray-500 dark:text-primary-gray-400",children:c||"Search..."})]})]}),l===!1?null:ke.jsx(r4,{variant:i||"icon",className:r,padding:f,onClick:()=>{n==null||n(d)},children:o||ke.jsx(Jk,{className:"stroke-2"})})]})});cP.displayName="Search";function eO(t,[e,r]){return Math.min(r,Math.max(e,t))}var fP=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Hre="VisuallyHidden",ff=me.forwardRef((t,e)=>ke.jsx(Gt.span,{...t,ref:e,style:{...fP,...t.style}}));ff.displayName=Hre;var qre=ff,Wre=[" ","Enter","ArrowUp","ArrowDown"],Ure=[" ","Enter"],df="Select",[Qv,hf,Gre]=Rs(df),[t7,ZSe]=m1(df,[Gre,m0]),eb=m0(),[QSe,H2]=t7(df),[eCe,Yre]=t7(df),dP="SelectTrigger",hP=me.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...a}=t,i=eb(r),o=H2(dP,r),l=o.disabled||n,s=wr(e,o.onTriggerChange),f=hf(r),c=me.useRef("touch"),[h,d,m]=EP(y=>{const b=f().filter(C=>!C.disabled),S=b.find(C=>C.value===o.value),w=jP(b,y,S);w!==void 0&&o.onValueChange(w.value)}),g=y=>{l||(o.onOpenChange(!0),m()),y&&(o.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return ke.jsx(Z6,{asChild:!0,...i,children:ke.jsx(Gt.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":MP(o.value)?"":void 0,...a,ref:s,onClick:kt(a.onClick,y=>{y.currentTarget.focus(),c.current!=="mouse"&&g(y)}),onPointerDown:kt(a.onPointerDown,y=>{c.current=y.pointerType;const b=y.target;b.hasPointerCapture(y.pointerId)&&b.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(g(y),y.preventDefault())}),onKeyDown:kt(a.onKeyDown,y=>{const b=h.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&d(y.key),!(b&&y.key===" ")&&Wre.includes(y.key)&&(g(),y.preventDefault())})})})});hP.displayName=dP;var pP="SelectValue",Xre=me.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:a,children:i,placeholder:o="",...l}=t,s=H2(pP,r),{onValueNodeHasChildrenChange:f}=s,c=i!==void 0,h=wr(e,s.onValueNodeChange);return d1(()=>{f(c)},[f,c]),ke.jsx(Gt.span,{...l,ref:h,style:{pointerEvents:"none"},children:MP(s.value)?ke.jsx(ke.Fragment,{children:o}):i})});Xre.displayName=pP;var Kre="SelectIcon",mP=me.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...a}=t;return ke.jsx(Gt.span,{"aria-hidden":!0,...a,ref:e,children:n||"▼"})});mP.displayName=Kre;var Jre="SelectPortal",gP=t=>ke.jsx(n4,{asChild:!0,...t});gP.displayName=Jre;var F3="SelectContent",yP=me.forwardRef((t,e)=>{const r=H2(F3,t.__scopeSelect),[n,a]=me.useState();if(d1(()=>{a(new DocumentFragment)},[]),!r.open){const i=n;return i?Ps.createPortal(ke.jsx(vP,{scope:t.__scopeSelect,children:ke.jsx(Qv.Slot,{scope:t.__scopeSelect,children:ke.jsx("div",{children:t.children})})}),i):null}return ke.jsx(bP,{...t,ref:e})});yP.displayName=F3;var _o=10,[vP,q2]=t7(F3),Zre="SelectContentImpl",Qre=B3("SelectContent.RemoveScroll"),bP=me.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:o,side:l,sideOffset:s,align:f,alignOffset:c,arrowPadding:h,collisionBoundary:d,collisionPadding:m,sticky:g,hideWhenDetached:y,avoidCollisions:b,...S}=t,w=H2(F3,r),[C,k]=me.useState(null),[_,D]=me.useState(null),T=wr(e,J=>k(J)),[A,M]=me.useState(null),[E,N]=me.useState(null),Y=hf(r),[ne,K]=me.useState(!1),B=me.useRef(!1);me.useEffect(()=>{if(C)return rf(C)},[C]),Zc();const j=me.useCallback(J=>{const[Z,...re]=Y().map(q=>q.ref.current),[te]=re.slice(-1),F=document.activeElement;for(const q of J)if(q===F||(q==null||q.scrollIntoView({block:"nearest"}),q===Z&&_&&(_.scrollTop=0),q===te&&_&&(_.scrollTop=_.scrollHeight),q==null||q.focus(),document.activeElement!==F))return},[Y,_]),$=me.useCallback(()=>j([A,C]),[j,A,C]);me.useEffect(()=>{ne&&$()},[ne,$]);const{onOpenChange:V,triggerPointerDownPosRef:z}=w;me.useEffect(()=>{if(C){let J={x:0,y:0};const Z=te=>{var F,q;J={x:Math.abs(Math.round(te.pageX)-(((F=z.current)==null?void 0:F.x)??0)),y:Math.abs(Math.round(te.pageY)-(((q=z.current)==null?void 0:q.y)??0))}},re=te=>{J.x<=10&&J.y<=10?te.preventDefault():C.contains(te.target)||V(!1),document.removeEventListener("pointermove",Z),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",re,{capture:!0})}}},[C,V,z]),me.useEffect(()=>{const J=()=>V(!1);return window.addEventListener("blur",J),window.addEventListener("resize",J),()=>{window.removeEventListener("blur",J),window.removeEventListener("resize",J)}},[V]);const[W,G]=EP(J=>{const Z=Y().filter(F=>!F.disabled),re=Z.find(F=>F.ref.current===document.activeElement),te=jP(Z,J,re);te&&setTimeout(()=>te.ref.current.focus())}),ae=me.useCallback((J,Z,re)=>{const te=!B.current&&!re;(w.value!==void 0&&w.value===Z||te)&&(M(J),te&&(B.current=!0))},[w.value]),U=me.useCallback(()=>C==null?void 0:C.focus(),[C]),H=me.useCallback((J,Z,re)=>{const te=!B.current&&!re;(w.value!==void 0&&w.value===Z||te)&&N(J)},[w.value]),R=n==="popper"?Vg:xP,ee=R===Vg?{side:l,sideOffset:s,align:f,alignOffset:c,arrowPadding:h,collisionBoundary:d,collisionPadding:m,sticky:g,hideWhenDetached:y,avoidCollisions:b}:{};return ke.jsx(vP,{scope:r,content:C,viewport:_,onViewportChange:D,itemRefCallback:ae,selectedItem:A,onItemLeave:U,itemTextRefCallback:H,focusSelectedItem:$,selectedItemText:E,position:n,isPositioned:ne,searchRef:W,children:ke.jsx(Hs,{as:Qre,allowPinchZoom:!0,children:ke.jsx($s,{asChild:!0,trapped:w.open,onMountAutoFocus:J=>{J.preventDefault()},onUnmountAutoFocus:kt(a,J=>{var Z;(Z=w.trigger)==null||Z.focus({preventScroll:!0}),J.preventDefault()}),children:ke.jsx(z2,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:J=>J.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:ke.jsx(R,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:J=>J.preventDefault(),...S,...ee,onPlaced:()=>K(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:kt(S.onKeyDown,J=>{const Z=J.ctrlKey||J.altKey||J.metaKey;if(J.key==="Tab"&&J.preventDefault(),!Z&&J.key.length===1&&G(J.key),["ArrowUp","ArrowDown","Home","End"].includes(J.key)){let re=Y().filter(te=>!te.disabled).map(te=>te.ref.current);if(["ArrowUp","End"].includes(J.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(J.key)){const te=J.target,F=re.indexOf(te);re=re.slice(F+1)}setTimeout(()=>j(re)),J.preventDefault()}})})})})})})});bP.displayName=Zre;var ene="SelectItemAlignedPosition",xP=me.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...a}=t,i=H2(F3,r),o=q2(F3,r),[l,s]=me.useState(null),[f,c]=me.useState(null),h=wr(e,T=>c(T)),d=hf(r),m=me.useRef(!1),g=me.useRef(!0),{viewport:y,selectedItem:b,selectedItemText:S,focusSelectedItem:w}=o,C=me.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&f&&y&&b&&S){const T=i.trigger.getBoundingClientRect(),A=f.getBoundingClientRect(),M=i.valueNode.getBoundingClientRect(),E=S.getBoundingClientRect();if(i.dir!=="rtl"){const te=E.left-A.left,F=M.left-te,q=T.left-F,X=T.width+q,ie=Math.max(X,A.width),ce=window.innerWidth-_o,de=eO(F,[_o,Math.max(_o,ce-ie)]);l.style.minWidth=X+"px",l.style.left=de+"px"}else{const te=A.right-E.right,F=window.innerWidth-M.right-te,q=window.innerWidth-T.right-F,X=T.width+q,ie=Math.max(X,A.width),ce=window.innerWidth-_o,de=eO(F,[_o,Math.max(_o,ce-ie)]);l.style.minWidth=X+"px",l.style.right=de+"px"}const N=d(),Y=window.innerHeight-_o*2,ne=y.scrollHeight,K=window.getComputedStyle(f),B=parseInt(K.borderTopWidth,10),j=parseInt(K.paddingTop,10),$=parseInt(K.borderBottomWidth,10),V=parseInt(K.paddingBottom,10),z=B+j+ne+V+$,W=Math.min(b.offsetHeight*5,z),G=window.getComputedStyle(y),ae=parseInt(G.paddingTop,10),U=parseInt(G.paddingBottom,10),H=T.top+T.height/2-_o,R=Y-H,ee=b.offsetHeight/2,J=b.offsetTop+ee,Z=B+j+J,re=z-Z;if(Z<=H){const te=N.length>0&&b===N[N.length-1].ref.current;l.style.bottom="0px";const F=f.clientHeight-y.offsetTop-y.offsetHeight,q=Math.max(R,ee+(te?U:0)+F+$),X=Z+q;l.style.height=X+"px"}else{const te=N.length>0&&b===N[0].ref.current;l.style.top="0px";const F=Math.max(H,B+y.offsetTop+(te?ae:0)+ee)+re;l.style.height=F+"px",y.scrollTop=Z-H+y.offsetTop}l.style.margin=`${_o}px 0`,l.style.minHeight=W+"px",l.style.maxHeight=Y+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[d,i.trigger,i.valueNode,l,f,y,b,S,i.dir,n]);d1(()=>C(),[C]);const[k,_]=me.useState();d1(()=>{f&&_(window.getComputedStyle(f).zIndex)},[f]);const D=me.useCallback(T=>{T&&g.current===!0&&(C(),w==null||w(),g.current=!1)},[C,w]);return ke.jsx(rne,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:D,children:ke.jsx("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:ke.jsx(Gt.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});xP.displayName=ene;var tne="SelectPopperPosition",Vg=me.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:a=_o,...i}=t,o=eb(r);return ke.jsx(Vs,{...o,...i,ref:e,align:n,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Vg.displayName=tne;var[rne,tb]=t7(F3,{}),Fg="SelectViewport",wP=me.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...a}=t,i=q2(Fg,r),o=tb(Fg,r),l=wr(e,i.onViewportChange),s=me.useRef(0);return ke.jsxs(ke.Fragment,{children:[ke.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),ke.jsx(Qv.Slot,{scope:r,children:ke.jsx(Gt.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:kt(a.onScroll,f=>{const c=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&h){const m=Math.abs(s.current-c.scrollTop);if(m>0){const g=window.innerHeight-_o*2,y=parseFloat(h.style.minHeight),b=parseFloat(h.style.height),S=Math.max(y,b);if(S<g){const w=S+m,C=Math.min(g,w),k=w-C;h.style.height=C+"px",h.style.bottom==="0px"&&(c.scrollTop=k>0?k:0,h.style.justifyContent="flex-end")}}}s.current=c.scrollTop})})})]})});wP.displayName=Fg;var SP="SelectGroup",[nne,ane]=t7(SP),ine=me.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,a=F0();return ke.jsx(nne,{scope:r,id:a,children:ke.jsx(Gt.div,{role:"group","aria-labelledby":a,...n,ref:e})})});ine.displayName=SP;var CP="SelectLabel",one=me.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,a=ane(CP,r);return ke.jsx(Gt.div,{id:a.id,...n,ref:e})});one.displayName=CP;var Zu="SelectItem",[lne,kP]=t7(Zu),_P=me.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:a=!1,textValue:i,...o}=t,l=H2(Zu,r),s=q2(Zu,r),f=l.value===n,[c,h]=me.useState(i??""),[d,m]=me.useState(!1),g=wr(e,w=>{var C;return(C=s.itemRefCallback)==null?void 0:C.call(s,w,n,a)}),y=F0(),b=me.useRef("touch"),S=()=>{a||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return ke.jsx(lne,{scope:r,value:n,disabled:a,textId:y,isSelected:f,onItemTextChange:me.useCallback(w=>{h(C=>C||((w==null?void 0:w.textContent)??"").trim())},[]),children:ke.jsx(Qv.ItemSlot,{scope:r,value:n,disabled:a,textValue:c,children:ke.jsx(Gt.div,{role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":f&&d,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...o,ref:g,onFocus:kt(o.onFocus,()=>m(!0)),onBlur:kt(o.onBlur,()=>m(!1)),onClick:kt(o.onClick,()=>{b.current!=="mouse"&&S()}),onPointerUp:kt(o.onPointerUp,()=>{b.current==="mouse"&&S()}),onPointerDown:kt(o.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:kt(o.onPointerMove,w=>{var C;b.current=w.pointerType,a?(C=s.onItemLeave)==null||C.call(s):b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:kt(o.onPointerLeave,w=>{var C;w.currentTarget===document.activeElement&&((C=s.onItemLeave)==null||C.call(s))}),onKeyDown:kt(o.onKeyDown,w=>{var C;((C=s.searchRef)==null?void 0:C.current)!==""&&w.key===" "||(Ure.includes(w.key)&&S(),w.key===" "&&w.preventDefault())})})})})});_P.displayName=Zu;var Pl="SelectItemText",OP=me.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:a,...i}=t,o=H2(Pl,r),l=q2(Pl,r),s=kP(Pl,r),f=Yre(Pl,r),[c,h]=me.useState(null),d=wr(e,S=>h(S),s.onItemTextChange,S=>{var w;return(w=l.itemTextRefCallback)==null?void 0:w.call(l,S,s.value,s.disabled)}),m=c==null?void 0:c.textContent,g=me.useMemo(()=>ke.jsx("option",{value:s.value,disabled:s.disabled,children:m},s.value),[s.disabled,s.value,m]),{onNativeOptionAdd:y,onNativeOptionRemove:b}=f;return d1(()=>(y(g),()=>b(g)),[y,b,g]),ke.jsxs(ke.Fragment,{children:[ke.jsx(Gt.span,{id:s.textId,...i,ref:d}),s.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ps.createPortal(i.children,o.valueNode):null]})});OP.displayName=Pl;var DP="SelectItemIndicator",AP=me.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return kP(DP,r).isSelected?ke.jsx(Gt.span,{"aria-hidden":!0,...n,ref:e}):null});AP.displayName=DP;var zg="SelectScrollUpButton",sne=me.forwardRef((t,e)=>{const r=q2(zg,t.__scopeSelect),n=tb(zg,t.__scopeSelect),[a,i]=me.useState(!1),o=wr(e,n.onScrollButtonChange);return d1(()=>{if(r.viewport&&r.isPositioned){let l=function(){const f=s.scrollTop>0;i(f)};const s=r.viewport;return l(),s.addEventListener("scroll",l),()=>s.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?ke.jsx(TP,{...t,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:s}=r;l&&s&&(l.scrollTop=l.scrollTop-s.offsetHeight)}}):null});sne.displayName=zg;var Hg="SelectScrollDownButton",une=me.forwardRef((t,e)=>{const r=q2(Hg,t.__scopeSelect),n=tb(Hg,t.__scopeSelect),[a,i]=me.useState(!1),o=wr(e,n.onScrollButtonChange);return d1(()=>{if(r.viewport&&r.isPositioned){let l=function(){const f=s.scrollHeight-s.clientHeight,c=Math.ceil(s.scrollTop)<f;i(c)};const s=r.viewport;return l(),s.addEventListener("scroll",l),()=>s.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?ke.jsx(TP,{...t,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:s}=r;l&&s&&(l.scrollTop=l.scrollTop+s.offsetHeight)}}):null});une.displayName=Hg;var TP=me.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...a}=t,i=q2("SelectScrollButton",r),o=me.useRef(null),l=hf(r),s=me.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return me.useEffect(()=>()=>s(),[s]),d1(()=>{var f;const c=l().find(h=>h.ref.current===document.activeElement);(f=c==null?void 0:c.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),ke.jsx(Gt.div,{"aria-hidden":!0,...a,ref:e,style:{flexShrink:0,...a.style},onPointerDown:kt(a.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:kt(a.onPointerMove,()=>{var f;(f=i.onItemLeave)==null||f.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:kt(a.onPointerLeave,()=>{s()})})}),cne="SelectSeparator",fne=me.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return ke.jsx(Gt.div,{"aria-hidden":!0,...n,ref:e})});fne.displayName=cne;var qg="SelectArrow",dne=me.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,a=eb(r),i=H2(qg,r),o=q2(qg,r);return i.open&&o.position==="popper"?ke.jsx(Fs,{...a,...n,ref:e}):null});dne.displayName=qg;var hne="SelectBubbleInput",pne=me.forwardRef(({__scopeSelect:t,value:e,...r},n)=>{const a=me.useRef(null),i=wr(n,a),o=Xc(e);return me.useEffect(()=>{const l=a.current;if(!l)return;const s=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(s,"value").set;if(o!==e&&f){const c=new Event("change",{bubbles:!0});f.call(l,e),l.dispatchEvent(c)}},[o,e]),ke.jsx(Gt.select,{...r,style:{...fP,...r.style},ref:i,defaultValue:e})});pne.displayName=hne;function MP(t){return t===""||t===void 0}function EP(t){const e=Vi(t),r=me.useRef(""),n=me.useRef(0),a=me.useCallback(o=>{const l=r.current+o;e(l),function s(f){r.current=f,window.clearTimeout(n.current),f!==""&&(n.current=window.setTimeout(()=>s(""),1e3))}(l)},[e]),i=me.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return me.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,a,i]}function jP(t,e,r){const n=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,a=r?t.indexOf(r):-1;let i=mne(t,Math.max(a,0));n.length===1&&(i=i.filter(l=>l!==r));const o=i.find(l=>l.textValue.toLowerCase().startsWith(n.toLowerCase()));return o!==r?o:void 0}function mne(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var LP=hP,gne=mP,yne=gP,NP=yP,vne=wP,IP=_P,bne=OP,xne=AP;function wne(){return ke.jsx("svg",{width:"25",height:"26",viewBox:"0 0 25 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ke.jsxs("g",{children:[ke.jsx("path",{d:"M16.599 23.688C17.7895 22.3987 18.4193 20.6895 18.35 18.936H0.75V0.75H23.88V15.468L23.875 15.474C23.875 15.521 23.875 15.568 23.875 15.616C23.905 20.278 17.206 24.488 16.175 24.488C15.921 24.488 16.004 24.24 16.599 23.688Z",stroke:"currentColor",strokeWidth:"1.5"}),ke.jsx("path",{d:"M13.5854 13.542L16.9429 5.45215L20.2144 13.542",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),ke.jsx("path",{d:"M15.0576 10.6704H18.9863",stroke:"currentColor",strokeWidth:"1.5"}),ke.jsx("path",{d:"M4.13086 6.76706H10.6748",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),ke.jsx("path",{d:"M4.13086 13.1656C4.13086 13.1656 9.59778 13.6368 9.92578 6.90781",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),ke.jsx("path",{d:"M10.8271 13.5417C10.8271 13.5417 6.38075 13.065 5.21875 9.11597",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),ke.jsx("path",{d:"M7.40723 4.08563V6.56317",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})}const Sne=I.forwardRef(({className:t,children:e,...r},n)=>ke.jsxs(LP,{ref:n,className:Be("cursor-pointer flex h-9 flex gap-2 rtl:[direction:rtl] items-center text-primary-blue-600 hover:text-primary-blue-400 dark:text-primary-white dark:hover:text-primary-white uppercase font-semibold text-sm justify-between whitespace-nowrap bg-transparent p-0 shadow-sm data-[placeholder]:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","[&[data-state=open]>.lucide-chevron-down]:rotate-180",t),...r,children:[ke.jsx(wne,{}),e,ke.jsx(gne,{asChild:!0,children:ke.jsx($u,{className:"h-6 w-6 transition-transform duration-200"})})]}));Sne.displayName=LP.displayName;const Cne=I.forwardRef(({className:t,children:e,position:r="popper",...n},a)=>ke.jsx(yne,{children:ke.jsx(NP,{ref:a,className:Be("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-primary-white dark:bg-primary-gray-650 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,...n,children:ke.jsx(vne,{className:Be(r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e})})}));Cne.displayName=NP.displayName;const kne=I.forwardRef(({className:t,children:e,...r},n)=>ke.jsxs(IP,{ref:n,className:Be("relative flex w-full cursor-default select-none items-center py-3 px-4 text-sm uppercase font-semibold outline-none border-b border-primary-gray-400 [&:last-of-type]:border-b-0 dark:border-primary-gray-550 focus:bg-primary-gray-400 dark:focus:bg-primary-gray-550 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[ke.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:ke.jsx(xne,{children:ke.jsx(vv,{className:"h-4 w-4"})})}),ke.jsx(bne,{children:e})]}));kne.displayName=IP.displayName;const _ne=I.forwardRef(({className:t,...e},r)=>ke.jsx("ol",{ref:r,"aria-label":"list",...e,className:Be("pl-6 rtl:pr-6 rtl:pl-0",t)}));_ne.displayName="Ol";const One=I.forwardRef(({className:t,...e},r)=>ke.jsx("ul",{ref:r,"aria-label":"list",...e,className:Be("pl-6 rtl:pr-6 rtl:pl-0",t)}));One.displayName="Ul";const Dne=I.forwardRef(({className:t,...e},r)=>ke.jsx("li",{...e,ref:r,className:Be("mb-6 pl-3 text-base md:text-xl rtl:pr-3 rtl:pl-0",t)}));Dne.displayName="li";var pf="Dialog",[PP,tCe]=m1(pf),[Ane,Vo]=PP(pf),RP=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:a,onOpenChange:i,modal:o=!0}=t,l=me.useRef(null),s=me.useRef(null),[f,c]=h0({prop:n,defaultProp:a??!1,onChange:i,caller:pf});return ke.jsx(Ane,{scope:e,triggerRef:l,contentRef:s,contentId:F0(),titleId:F0(),descriptionId:F0(),open:f,onOpenChange:c,onOpenToggle:me.useCallback(()=>c(h=>!h),[c]),modal:o,children:r})};RP.displayName=pf;var $P="DialogTrigger",Tne=me.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,a=Vo($P,r),i=wr(e,a.triggerRef);return ke.jsx(Gt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":ab(a.open),...n,ref:i,onClick:kt(t.onClick,a.onOpenToggle)})});Tne.displayName=$P;var rb="DialogPortal",[Mne,BP]=PP(rb,{forceMount:void 0}),VP=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:a}=t,i=Vo(rb,e);return ke.jsx(Mne,{scope:e,forceMount:r,children:me.Children.map(n,o=>ke.jsx(g1,{present:r||i.open,children:ke.jsx(n4,{asChild:!0,container:a,children:o})}))})};VP.displayName=rb;var Qu="DialogOverlay",FP=me.forwardRef((t,e)=>{const r=BP(Qu,t.__scopeDialog),{forceMount:n=r.forceMount,...a}=t,i=Vo(Qu,t.__scopeDialog);return i.modal?ke.jsx(g1,{present:n||i.open,children:ke.jsx(jne,{...a,ref:e})}):null});FP.displayName=Qu;var Ene=B3("DialogOverlay.RemoveScroll"),jne=me.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,a=Vo(Qu,r);return ke.jsx(Hs,{as:Ene,allowPinchZoom:!0,shards:[a.contentRef],children:ke.jsx(Gt.div,{"data-state":ab(a.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),z3="DialogContent",zP=me.forwardRef((t,e)=>{const r=BP(z3,t.__scopeDialog),{forceMount:n=r.forceMount,...a}=t,i=Vo(z3,t.__scopeDialog);return ke.jsx(g1,{present:n||i.open,children:i.modal?ke.jsx(Lne,{...a,ref:e}):ke.jsx(Nne,{...a,ref:e})})});zP.displayName=z3;var Lne=me.forwardRef((t,e)=>{const r=Vo(z3,t.__scopeDialog),n=me.useRef(null),a=wr(e,r.contentRef,n);return me.useEffect(()=>{const i=n.current;if(i)return rf(i)},[]),ke.jsx(HP,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:kt(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:kt(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&i.preventDefault()}),onFocusOutside:kt(t.onFocusOutside,i=>i.preventDefault())})}),Nne=me.forwardRef((t,e)=>{const r=Vo(z3,t.__scopeDialog),n=me.useRef(!1),a=me.useRef(!1);return ke.jsx(HP,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),i.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:i=>{var o,l;(o=t.onInteractOutside)==null||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const s=i.target;(l=r.triggerRef.current)!=null&&l.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),HP=me.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,...o}=t,l=Vo(z3,r),s=me.useRef(null),f=wr(e,s);return Zc(),ke.jsxs(ke.Fragment,{children:[ke.jsx($s,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:i,children:ke.jsx(z2,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ab(l.open),...o,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),ke.jsxs(ke.Fragment,{children:[ke.jsx(Pne,{titleId:l.titleId}),ke.jsx($ne,{contentRef:s,descriptionId:l.descriptionId})]})]})}),nb="DialogTitle",qP=me.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,a=Vo(nb,r);return ke.jsx(Gt.h2,{id:a.titleId,...n,ref:e})});qP.displayName=nb;var WP="DialogDescription",UP=me.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,a=Vo(WP,r);return ke.jsx(Gt.p,{id:a.descriptionId,...n,ref:e})});UP.displayName=WP;var GP="DialogClose",Ine=me.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,a=Vo(GP,r);return ke.jsx(Gt.button,{type:"button",...n,ref:e,onClick:kt(t.onClick,()=>a.onOpenChange(!1))})});Ine.displayName=GP;function ab(t){return t?"open":"closed"}var YP="DialogTitleWarning",[rCe,XP]=$U(YP,{contentName:z3,titleName:nb,docsSlug:"dialog"}),Pne=({titleId:t})=>{const e=XP(YP),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
164
+ `]))),rte=function(t,e){var r=t.isFocused,n=t.size,a=t.theme,i=a.colors,o=a.spacing.baseUnit;return Ft({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"},e?{}:{color:r?i.neutral60:i.neutral20,padding:o*2})},ip=function(t){var e=t.delay,r=t.offset;return rr("span",{css:Uv({animation:"".concat(tte," 1s ease-in-out ").concat(e,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},nte=function(t){var e=t.innerProps,r=t.isRtl,n=t.size,a=n===void 0?4:n,i=Bo(t,Gee);return rr("div",ir({},wa(Ft(Ft({},i),{},{innerProps:e,isRtl:r,size:a}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),e),rr(ip,{delay:0,offset:r}),rr(ip,{delay:160,offset:!0}),rr(ip,{delay:320,offset:!r}))},ate=function(t,e){var r=t.isDisabled,n=t.isFocused,a=t.theme,i=a.colors,o=a.borderRadius,l=a.spacing;return Ft({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},e?{}:{backgroundColor:r?i.neutral5:i.neutral0,borderColor:r?i.neutral10:n?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:n?i.primary:i.neutral30}})},ite=function(t){var e=t.children,r=t.isDisabled,n=t.isFocused,a=t.innerRef,i=t.innerProps,o=t.menuIsOpen;return rr("div",ir({ref:a},wa(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":n,"control--menu-is-open":o}),i,{"aria-disabled":r||void 0}),e)},ote=ite,lte=["data"],ste=function(t,e){var r=t.theme.spacing;return e?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},ute=function(t){var e=t.children,r=t.cx,n=t.getStyles,a=t.getClassNames,i=t.Heading,o=t.headingProps,l=t.innerProps,s=t.label,f=t.theme,c=t.selectProps;return rr("div",ir({},wa(t,"group",{group:!0}),l),rr(i,ir({},o,{selectProps:c,theme:f,getStyles:n,getClassNames:a,cx:r}),s),rr("div",null,e))},cte=function(t,e){var r=t.theme,n=r.colors,a=r.spacing;return Ft({label:"group",cursor:"default",display:"block"},e?{}:{color:n.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:a.baseUnit*3,paddingRight:a.baseUnit*3,textTransform:"uppercase"})},fte=function(t){var e=LI(t);e.data;var r=Bo(e,lte);return rr("div",ir({},wa(t,"groupHeading",{"group-heading":!0}),r))},dte=ute,hte=["innerRef","isDisabled","isHidden","inputClassName"],pte=function(t,e){var r=t.isDisabled,n=t.value,a=t.theme,i=a.spacing,o=a.colors;return Ft(Ft({visibility:r?"hidden":"visible",transform:n?"translateZ(0)":""},mte),e?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:o.neutral80})},zI={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},mte={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ft({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},zI)},gte=function(t){return Ft({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},zI)},yte=function(t){var e=t.cx,r=t.value,n=LI(t),a=n.innerRef,i=n.isDisabled,o=n.isHidden,l=n.inputClassName,s=Bo(n,hte);return rr("div",ir({},wa(t,"input",{"input-container":!0}),{"data-value":r||""}),rr("input",ir({className:e({input:!0},l),ref:a,style:gte(o),disabled:i},s)))},vte=yte,bte=function(t,e){var r=t.theme,n=r.spacing,a=r.borderRadius,i=r.colors;return Ft({label:"multiValue",display:"flex",minWidth:0},e?{}:{backgroundColor:i.neutral10,borderRadius:a/2,margin:n.baseUnit/2})},xte=function(t,e){var r=t.theme,n=r.borderRadius,a=r.colors,i=t.cropWithEllipsis;return Ft({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},e?{}:{borderRadius:n/2,color:a.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},wte=function(t,e){var r=t.theme,n=r.spacing,a=r.borderRadius,i=r.colors,o=t.isFocused;return Ft({alignItems:"center",display:"flex"},e?{}:{borderRadius:a/2,backgroundColor:o?i.dangerLight:void 0,paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},HI=function(t){var e=t.children,r=t.innerProps;return rr("div",r,e)},Ste=HI,Cte=HI;function kte(t){var e=t.children,r=t.innerProps;return rr("div",ir({role:"button"},r),e||rr(Gv,{size:14}))}var _te=function(t){var e=t.children,r=t.components,n=t.data,a=t.innerProps,i=t.isDisabled,o=t.removeProps,l=t.selectProps,s=r.Container,f=r.Label,c=r.Remove;return rr(s,{data:n,innerProps:Ft(Ft({},wa(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),a),selectProps:l},rr(f,{data:n,innerProps:Ft({},wa(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},e),rr(c,{data:n,innerProps:Ft(Ft({},wa(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(e||"option")},o),selectProps:l}))},Ote=_te,Dte=function(t,e){var r=t.isDisabled,n=t.isFocused,a=t.isSelected,i=t.theme,o=i.spacing,l=i.colors;return Ft({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},e?{}:{backgroundColor:a?l.primary:n?l.primary25:"transparent",color:r?l.neutral20:a?l.neutral0:"inherit",padding:"".concat(o.baseUnit*2,"px ").concat(o.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:a?l.primary:l.primary50}})},Ate=function(t){var e=t.children,r=t.isDisabled,n=t.isFocused,a=t.isSelected,i=t.innerRef,o=t.innerProps;return rr("div",ir({},wa(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":n,"option--is-selected":a}),{ref:i,"aria-disabled":r},o),e)},Tte=Ate,Mte=function(t,e){var r=t.theme,n=r.spacing,a=r.colors;return Ft({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},e?{}:{color:a.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2})},Ete=function(t){var e=t.children,r=t.innerProps;return rr("div",ir({},wa(t,"placeholder",{placeholder:!0}),r),e)},jte=Ete,Lte=function(t,e){var r=t.isDisabled,n=t.theme,a=n.spacing,i=n.colors;return Ft({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e?{}:{color:r?i.neutral40:i.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},Nte=function(t){var e=t.children,r=t.isDisabled,n=t.innerProps;return rr("div",ir({},wa(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),n),e)},Ite=Nte,Yv={ClearIndicator:Zee,Control:ote,DropdownIndicator:Kee,DownChevron:VI,CrossIcon:Gv,Group:dte,GroupHeading:fte,IndicatorsContainer:Wee,IndicatorSeparator:ete,Input:vte,LoadingIndicator:nte,Menu:Eee,MenuList:Lee,MenuPortal:Bee,LoadingMessage:Ree,NoOptionsMessage:Pee,MultiValue:Ote,MultiValueContainer:Ste,MultiValueLabel:Cte,MultiValueRemove:kte,Option:Tte,Placeholder:jte,SelectContainer:Fee,SingleValue:Ite,ValueContainer:Hee},Pte=function(t){return Ft(Ft({},Yv),t.components)},F_=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Rte(t,e){return!!(t===e||F_(t)&&F_(e))}function $te(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!Rte(t[r],e[r]))return!1;return!0}function Bte(t,e){e===void 0&&(e=$te);var r=null;function n(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];if(r&&r.lastThis===this&&e(a,r.lastArgs))return r.lastResult;var o=t.apply(this,a);return r={lastResult:o,lastArgs:a,lastThis:this},o}return n.clear=function(){r=null},n}var Vte={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"},Fte=function(t){return rr("span",ir({css:Vte},t))},z_=Fte,zte={guidance:function(t){var e=t.isSearchable,r=t.isMulti,n=t.tabSelectsValue,a=t.context,i=t.isInitialFocus;switch(a){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(n?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(t["aria-label"]||"Select"," is focused ").concat(e?",type to refine list":"",", press Down to open the menu, ").concat(r?" 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 e=t.action,r=t.label,n=r===void 0?"":r,a=t.labels,i=t.isDisabled;switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(a.length>1?"s":""," ").concat(a.join(","),", selected.");case"select-option":return i?"option ".concat(n," is disabled. Select another option."):"option ".concat(n,", selected.");default:return""}},onFocus:function(t){var e=t.context,r=t.focused,n=t.options,a=t.label,i=a===void 0?"":a,o=t.selectValue,l=t.isDisabled,s=t.isSelected,f=t.isAppleDevice,c=function(m,g){return m&&m.length?"".concat(m.indexOf(g)+1," of ").concat(m.length):""};if(e==="value"&&o)return"value ".concat(i," focused, ").concat(c(o,r),".");if(e==="menu"&&f){var h=l?" disabled":"",d="".concat(s?" selected":"").concat(h);return"".concat(i).concat(d,", ").concat(c(n,r),".")}return""},onFilter:function(t){var e=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(e?" for search term "+e:"",".")}},Hte=function(t){var e=t.ariaSelection,r=t.focusedOption,n=t.focusedValue,a=t.focusableOptions,i=t.isFocused,o=t.selectValue,l=t.selectProps,s=t.id,f=t.isAppleDevice,c=l.ariaLiveMessages,h=l.getOptionLabel,d=l.inputValue,m=l.isMulti,g=l.isOptionDisabled,y=l.isSearchable,b=l.menuIsOpen,S=l.options,w=l.screenReaderStatus,C=l.tabSelectsValue,k=l.isLoading,_=l["aria-label"],D=l["aria-live"],T=I.useMemo(function(){return Ft(Ft({},zte),c||{})},[c]),A=I.useMemo(function(){var K="";if(e&&T.onChange){var B=e.option,j=e.options,$=e.removedValue,V=e.removedValues,z=e.value,W=function(ee){return Array.isArray(ee)?null:ee},G=$||B||W(z),ae=G?h(G):"",U=j||V||void 0,H=U?U.map(h):[],R=Ft({isDisabled:G&&g(G,o),label:ae,labels:H},e);K=T.onChange(R)}return K},[e,T,g,o,h]),M=I.useMemo(function(){var K="",B=r||n,j=!!(r&&o&&o.includes(r));if(B&&T.onFocus){var $={focused:B,label:h(B),isDisabled:g(B,o),isSelected:j,options:a,context:B===r?"menu":"value",selectValue:o,isAppleDevice:f};K=T.onFocus($)}return K},[r,n,h,g,T,a,o,f]),E=I.useMemo(function(){var K="";if(b&&S.length&&!k&&T.onFilter){var B=w({count:a.length});K=T.onFilter({inputValue:d,resultsMessage:B})}return K},[a,d,b,T,S,w,k]),N=(e==null?void 0:e.action)==="initial-input-focus",Y=I.useMemo(function(){var K="";if(T.guidance){var B=n?"value":b?"menu":"input";K=T.guidance({"aria-label":_,context:B,isDisabled:r&&g(r,o),isMulti:m,isSearchable:y,tabSelectsValue:C,isInitialFocus:N})}return K},[_,r,n,m,g,y,b,T,o,C,N]),ne=rr(I.Fragment,null,rr("span",{id:"aria-selection"},A),rr("span",{id:"aria-focused"},M),rr("span",{id:"aria-results"},E),rr("span",{id:"aria-guidance"},Y));return rr(I.Fragment,null,rr(z_,{id:s},N&&ne),rr(z_,{"aria-live":D,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!N&&ne))},qte=Hte,Bg=[{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źẑżžẓẕƶȥɀⱬꝣ"}],Wte=new RegExp("["+Bg.map(function(t){return t.letters}).join("")+"]","g"),qI={};for(var op=0;op<Bg.length;op++)for(var lp=Bg[op],sp=0;sp<lp.letters.length;sp++)qI[lp.letters[sp]]=lp.base;var WI=function(t){return t.replace(Wte,function(e){return qI[e]})},Ute=Bte(WI),H_=function(t){return t.replace(/^\s+|\s+$/g,"")},Gte=function(t){return"".concat(t.label," ").concat(t.value)},Z1=function(t){return function(e,r){if(e.data.__isNew__)return!0;var n=Ft({ignoreCase:!0,ignoreAccents:!0,stringify:Gte,trim:!0,matchFrom:"any"},t),a=n.ignoreCase,i=n.ignoreAccents,o=n.stringify,l=n.trim,s=n.matchFrom,f=l?H_(r):r,c=l?H_(o(e)):o(e);return a&&(f=f.toLowerCase(),c=c.toLowerCase()),i&&(f=Ute(f),c=WI(c)),s==="start"?c.substr(0,f.length)===f:c.indexOf(f)>-1}},Yte=["innerRef"];function Xte(t){var e=t.innerRef,r=Bo(t,Yte),n=Cee(r,"onExited","in","enter","exit","appear");return rr("input",ir({ref:e},n,{css:Uv({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)"},"","")}))}var Kte=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function Jte(t){var e=t.isEnabled,r=t.onBottomArrive,n=t.onBottomLeave,a=t.onTopArrive,i=t.onTopLeave,o=I.useRef(!1),l=I.useRef(!1),s=I.useRef(0),f=I.useRef(null),c=I.useCallback(function(b,S){if(f.current!==null){var w=f.current,C=w.scrollTop,k=w.scrollHeight,_=w.clientHeight,D=f.current,T=S>0,A=k-_-C,M=!1;A>S&&o.current&&(n&&n(b),o.current=!1),T&&l.current&&(i&&i(b),l.current=!1),T&&S>A?(r&&!o.current&&r(b),D.scrollTop=k,M=!0,o.current=!0):!T&&-S>C&&(a&&!l.current&&a(b),D.scrollTop=0,M=!0,l.current=!0),M&&Kte(b)}},[r,n,a,i]),h=I.useCallback(function(b){c(b,b.deltaY)},[c]),d=I.useCallback(function(b){s.current=b.changedTouches[0].clientY},[]),m=I.useCallback(function(b){var S=s.current-b.changedTouches[0].clientY;c(b,S)},[c]),g=I.useCallback(function(b){if(b){var S=xee?{passive:!1}:!1;b.addEventListener("wheel",h,S),b.addEventListener("touchstart",d,S),b.addEventListener("touchmove",m,S)}},[m,d,h]),y=I.useCallback(function(b){b&&(b.removeEventListener("wheel",h,!1),b.removeEventListener("touchstart",d,!1),b.removeEventListener("touchmove",m,!1))},[m,d,h]);return I.useEffect(function(){if(e){var b=f.current;return g(b),function(){y(b)}}},[e,g,y]),function(b){f.current=b}}var q_=["boxSizing","height","overflow","paddingRight","position"],W_={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function U_(t){t.cancelable&&t.preventDefault()}function G_(t){t.stopPropagation()}function Y_(){var t=this.scrollTop,e=this.scrollHeight,r=t+this.offsetHeight;t===0?this.scrollTop=1:r===e&&(this.scrollTop=t-1)}function X_(){return"ontouchstart"in window||navigator.maxTouchPoints}var K_=!!(typeof window<"u"&&window.document&&window.document.createElement),fl=0,X4={capture:!1,passive:!1};function Zte(t){var e=t.isEnabled,r=t.accountForScrollbars,n=r===void 0?!0:r,a=I.useRef({}),i=I.useRef(null),o=I.useCallback(function(s){if(K_){var f=document.body,c=f&&f.style;if(n&&q_.forEach(function(g){var y=c&&c[g];a.current[g]=y}),n&&fl<1){var h=parseInt(a.current.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,m=window.innerWidth-d+h||0;Object.keys(W_).forEach(function(g){var y=W_[g];c&&(c[g]=y)}),c&&(c.paddingRight="".concat(m,"px"))}f&&X_()&&(f.addEventListener("touchmove",U_,X4),s&&(s.addEventListener("touchstart",Y_,X4),s.addEventListener("touchmove",G_,X4))),fl+=1}},[n]),l=I.useCallback(function(s){if(K_){var f=document.body,c=f&&f.style;fl=Math.max(fl-1,0),n&&fl<1&&q_.forEach(function(h){var d=a.current[h];c&&(c[h]=d)}),f&&X_()&&(f.removeEventListener("touchmove",U_,X4),s&&(s.removeEventListener("touchstart",Y_,X4),s.removeEventListener("touchmove",G_,X4)))}},[n]);return I.useEffect(function(){if(e){var s=i.current;return o(s),function(){l(s)}}},[e,o,l]),function(s){i.current=s}}var Qte=function(t){var e=t.target;return e.ownerDocument.activeElement&&e.ownerDocument.activeElement.blur()},ere={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function tre(t){var e=t.children,r=t.lockEnabled,n=t.captureEnabled,a=n===void 0?!0:n,i=t.onBottomArrive,o=t.onBottomLeave,l=t.onTopArrive,s=t.onTopLeave,f=Jte({isEnabled:a,onBottomArrive:i,onBottomLeave:o,onTopArrive:l,onTopLeave:s}),c=Zte({isEnabled:r}),h=function(d){f(d),c(d)};return rr(I.Fragment,null,r&&rr("div",{onClick:Qte,css:ere}),e(h))}var rre={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},nre=function(t){var e=t.name,r=t.onFocus;return rr("input",{required:!0,name:e,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:rre,value:"",onChange:function(){}})},are=nre;function Xv(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function ire(){return Xv(/^iPhone/i)}function UI(){return Xv(/^Mac/i)}function ore(){return Xv(/^iPad/i)||UI()&&navigator.maxTouchPoints>1}function lre(){return ire()||ore()}function sre(){return UI()||lre()}var ure=function(t){return t.label},cre=function(t){return t.label},fre=function(t){return t.value},dre=function(t){return!!t.isDisabled},hre={clearIndicator:Jee,container:Vee,control:ate,dropdownIndicator:Xee,group:ste,groupHeading:cte,indicatorsContainer:qee,indicatorSeparator:Qee,input:pte,loadingIndicator:rte,loadingMessage:Iee,menu:Aee,menuList:jee,menuPortal:$ee,multiValue:bte,multiValueLabel:xte,multiValueRemove:wte,noOptionsMessage:Nee,option:Dte,placeholder:Mte,singleValue:Lte,valueContainer:zee},pre={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%)"},mre=4,GI=4,gre=38,yre=GI*2,vre={baseUnit:GI,controlHeight:gre,menuGutter:yre},up={borderRadius:mre,colors:pre,spacing:vre},bre={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:B_(),captureMenuScroll:!B_(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Z1(),formatGroupLabel:ure,getOptionLabel:cre,getOptionValue:fre,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:dre,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!vee(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var e=t.count;return"".concat(e," result").concat(e!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function J_(t,e,r,n){var a=KI(t,e,r),i=JI(t,e,r),o=XI(t,e),l=Xu(t,e);return{type:"option",data:e,isDisabled:a,isSelected:i,label:o,value:l,index:n}}function yu(t,e){return t.options.map(function(r,n){if("options"in r){var a=r.options.map(function(o,l){return J_(t,o,e,l)}).filter(function(o){return Q_(t,o)});return a.length>0?{type:"group",data:r,options:a,index:n}:void 0}var i=J_(t,r,e,n);return Q_(t,i)?i:void 0}).filter(wee)}function YI(t){return t.reduce(function(e,r){return r.type==="group"?e.push.apply(e,io(r.options.map(function(n){return n.data}))):e.push(r.data),e},[])}function Z_(t,e){return t.reduce(function(r,n){return n.type==="group"?r.push.apply(r,io(n.options.map(function(a){return{data:a.data,id:"".concat(e,"-").concat(n.index,"-").concat(a.index)}}))):r.push({data:n.data,id:"".concat(e,"-").concat(n.index)}),r},[])}function xre(t,e){return YI(yu(t,e))}function Q_(t,e){var r=t.inputValue,n=r===void 0?"":r,a=e.data,i=e.isSelected,o=e.label,l=e.value;return(!QI(t)||!i)&&ZI(t,{label:o,value:l,data:a},n)}function wre(t,e){var r=t.focusedValue,n=t.selectValue,a=n.indexOf(r);if(a>-1){var i=e.indexOf(r);if(i>-1)return r;if(a<e.length)return e[a]}return null}function Sre(t,e){var r=t.focusedOption;return r&&e.indexOf(r)>-1?r:e[0]}var cp=function(t,e){var r,n=(r=t.find(function(a){return a.data===e}))===null||r===void 0?void 0:r.id;return n||null},XI=function(t,e){return t.getOptionLabel(e)},Xu=function(t,e){return t.getOptionValue(e)};function KI(t,e,r){return typeof t.isOptionDisabled=="function"?t.isOptionDisabled(e,r):!1}function JI(t,e,r){if(r.indexOf(e)>-1)return!0;if(typeof t.isOptionSelected=="function")return t.isOptionSelected(e,r);var n=Xu(t,e);return r.some(function(a){return Xu(t,a)===n})}function ZI(t,e,r){return t.filterOption?t.filterOption(e,r):!0}var QI=function(t){var e=t.hideSelectedOptions,r=t.isMulti;return e===void 0?r:e},Cre=1,eP=function(t){oQ(r,t);var e=uQ(r);function r(n){var a;if(aQ(this,r),a=e.call(this,n),a.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:""},a.blockOptionHover=!1,a.isComposing=!1,a.commonProps=void 0,a.initialTouchX=0,a.initialTouchY=0,a.openAfterFocus=!1,a.scrollToFocusedOptionOnUpdate=!1,a.userIsDragging=void 0,a.isAppleDevice=sre(),a.controlRef=null,a.getControlRef=function(s){a.controlRef=s},a.focusedOptionRef=null,a.getFocusedOptionRef=function(s){a.focusedOptionRef=s},a.menuListRef=null,a.getMenuListRef=function(s){a.menuListRef=s},a.inputRef=null,a.getInputRef=function(s){a.inputRef=s},a.focus=a.focusInput,a.blur=a.blurInput,a.onChange=function(s,f){var c=a.props,h=c.onChange,d=c.name;f.name=d,a.ariaOnChange(s,f),h(s,f)},a.setValue=function(s,f,c){var h=a.props,d=h.closeMenuOnSelect,m=h.isMulti,g=h.inputValue;a.onInputChange("",{action:"set-value",prevInputValue:g}),d&&(a.setState({inputIsHiddenAfterUpdate:!m}),a.onMenuClose()),a.setState({clearFocusValueOnUpdate:!0}),a.onChange(s,{action:f,option:c})},a.selectOption=function(s){var f=a.props,c=f.blurInputOnSelect,h=f.isMulti,d=f.name,m=a.state.selectValue,g=h&&a.isOptionSelected(s,m),y=a.isOptionDisabled(s,m);if(g){var b=a.getOptionValue(s);a.setValue(m.filter(function(S){return a.getOptionValue(S)!==b}),"deselect-option",s)}else if(!y)h?a.setValue([].concat(io(m),[s]),"select-option",s):a.setValue(s,"select-option");else{a.ariaOnChange(s,{action:"select-option",option:s,name:d});return}c&&a.blurInput()},a.removeValue=function(s){var f=a.props.isMulti,c=a.state.selectValue,h=a.getOptionValue(s),d=c.filter(function(g){return a.getOptionValue(g)!==h}),m=_8(f,d,d[0]||null);a.onChange(m,{action:"remove-value",removedValue:s}),a.focusInput()},a.clearValue=function(){var s=a.state.selectValue;a.onChange(_8(a.props.isMulti,[],null),{action:"clear",removedValues:s})},a.popValue=function(){var s=a.props.isMulti,f=a.state.selectValue,c=f[f.length-1],h=f.slice(0,f.length-1),d=_8(s,h,h[0]||null);c&&a.onChange(d,{action:"pop-value",removedValue:c})},a.getFocusedOptionId=function(s){return cp(a.state.focusableOptionsWithIds,s)},a.getFocusableOptionsWithIds=function(){return Z_(yu(a.props,a.state.selectValue),a.getElementId("option"))},a.getValue=function(){return a.state.selectValue},a.cx=function(){for(var s=arguments.length,f=new Array(s),c=0;c<s;c++)f[c]=arguments[c];return hee.apply(void 0,[a.props.classNamePrefix].concat(f))},a.getOptionLabel=function(s){return XI(a.props,s)},a.getOptionValue=function(s){return Xu(a.props,s)},a.getStyles=function(s,f){var c=a.props.unstyled,h=hre[s](f,c);h.boxSizing="border-box";var d=a.props.styles[s];return d?d(h,f):h},a.getClassNames=function(s,f){var c,h;return(c=(h=a.props.classNames)[s])===null||c===void 0?void 0:c.call(h,f)},a.getElementId=function(s){return"".concat(a.state.instancePrefix,"-").concat(s)},a.getComponents=function(){return Pte(a.props)},a.buildCategorizedOptions=function(){return yu(a.props,a.state.selectValue)},a.getCategorizedOptions=function(){return a.props.menuIsOpen?a.buildCategorizedOptions():[]},a.buildFocusableOptions=function(){return YI(a.buildCategorizedOptions())},a.getFocusableOptions=function(){return a.props.menuIsOpen?a.buildFocusableOptions():[]},a.ariaOnChange=function(s,f){a.setState({ariaSelection:Ft({value:s},f)})},a.onMenuMouseDown=function(s){s.button===0&&(s.stopPropagation(),s.preventDefault(),a.focusInput())},a.onMenuMouseMove=function(s){a.blockOptionHover=!1},a.onControlMouseDown=function(s){if(!s.defaultPrevented){var f=a.props.openMenuOnClick;a.state.isFocused?a.props.menuIsOpen?s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&a.onMenuClose():f&&a.openMenu("first"):(f&&(a.openAfterFocus=!0),a.focusInput()),s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&s.preventDefault()}},a.onDropdownIndicatorMouseDown=function(s){if(!(s&&s.type==="mousedown"&&s.button!==0)&&!a.props.isDisabled){var f=a.props,c=f.isMulti,h=f.menuIsOpen;a.focusInput(),h?(a.setState({inputIsHiddenAfterUpdate:!c}),a.onMenuClose()):a.openMenu("first"),s.preventDefault()}},a.onClearIndicatorMouseDown=function(s){s&&s.type==="mousedown"&&s.button!==0||(a.clearValue(),s.preventDefault(),a.openAfterFocus=!1,s.type==="touchend"?a.focusInput():setTimeout(function(){return a.focusInput()}))},a.onScroll=function(s){typeof a.props.closeMenuOnScroll=="boolean"?s.target instanceof HTMLElement&&cf(s.target)&&a.props.onMenuClose():typeof a.props.closeMenuOnScroll=="function"&&a.props.closeMenuOnScroll(s)&&a.props.onMenuClose()},a.onCompositionStart=function(){a.isComposing=!0},a.onCompositionEnd=function(){a.isComposing=!1},a.onTouchStart=function(s){var f=s.touches,c=f&&f.item(0);c&&(a.initialTouchX=c.clientX,a.initialTouchY=c.clientY,a.userIsDragging=!1)},a.onTouchMove=function(s){var f=s.touches,c=f&&f.item(0);if(c){var h=Math.abs(c.clientX-a.initialTouchX),d=Math.abs(c.clientY-a.initialTouchY),m=5;a.userIsDragging=h>m||d>m}},a.onTouchEnd=function(s){a.userIsDragging||(a.controlRef&&!a.controlRef.contains(s.target)&&a.menuListRef&&!a.menuListRef.contains(s.target)&&a.blurInput(),a.initialTouchX=0,a.initialTouchY=0)},a.onControlTouchEnd=function(s){a.userIsDragging||a.onControlMouseDown(s)},a.onClearIndicatorTouchEnd=function(s){a.userIsDragging||a.onClearIndicatorMouseDown(s)},a.onDropdownIndicatorTouchEnd=function(s){a.userIsDragging||a.onDropdownIndicatorMouseDown(s)},a.handleInputChange=function(s){var f=a.props.inputValue,c=s.currentTarget.value;a.setState({inputIsHiddenAfterUpdate:!1}),a.onInputChange(c,{action:"input-change",prevInputValue:f}),a.props.menuIsOpen||a.onMenuOpen()},a.onInputFocus=function(s){a.props.onFocus&&a.props.onFocus(s),a.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(a.openAfterFocus||a.props.openMenuOnFocus)&&a.openMenu("first"),a.openAfterFocus=!1},a.onInputBlur=function(s){var f=a.props.inputValue;if(a.menuListRef&&a.menuListRef.contains(document.activeElement)){a.inputRef.focus();return}a.props.onBlur&&a.props.onBlur(s),a.onInputChange("",{action:"input-blur",prevInputValue:f}),a.onMenuClose(),a.setState({focusedValue:null,isFocused:!1})},a.onOptionHover=function(s){if(!(a.blockOptionHover||a.state.focusedOption===s)){var f=a.getFocusableOptions(),c=f.indexOf(s);a.setState({focusedOption:s,focusedOptionId:c>-1?a.getFocusedOptionId(s):null})}},a.shouldHideSelectedOptions=function(){return QI(a.props)},a.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),a.focus()},a.onKeyDown=function(s){var f=a.props,c=f.isMulti,h=f.backspaceRemovesValue,d=f.escapeClearsValue,m=f.inputValue,g=f.isClearable,y=f.isDisabled,b=f.menuIsOpen,S=f.onKeyDown,w=f.tabSelectsValue,C=f.openMenuOnFocus,k=a.state,_=k.focusedOption,D=k.focusedValue,T=k.selectValue;if(!y&&!(typeof S=="function"&&(S(s),s.defaultPrevented))){switch(a.blockOptionHover=!0,s.key){case"ArrowLeft":if(!c||m)return;a.focusValue("previous");break;case"ArrowRight":if(!c||m)return;a.focusValue("next");break;case"Delete":case"Backspace":if(m)return;if(D)a.removeValue(D);else{if(!h)return;c?a.popValue():g&&a.clearValue()}break;case"Tab":if(a.isComposing||s.shiftKey||!b||!w||!_||C&&a.isOptionSelected(_,T))return;a.selectOption(_);break;case"Enter":if(s.keyCode===229)break;if(b){if(!_||a.isComposing)return;a.selectOption(_);break}return;case"Escape":b?(a.setState({inputIsHiddenAfterUpdate:!1}),a.onInputChange("",{action:"menu-close",prevInputValue:m}),a.onMenuClose()):g&&d&&a.clearValue();break;case" ":if(m)return;if(!b){a.openMenu("first");break}if(!_)return;a.selectOption(_);break;case"ArrowUp":b?a.focusOption("up"):a.openMenu("last");break;case"ArrowDown":b?a.focusOption("down"):a.openMenu("first");break;case"PageUp":if(!b)return;a.focusOption("pageup");break;case"PageDown":if(!b)return;a.focusOption("pagedown");break;case"Home":if(!b)return;a.focusOption("first");break;case"End":if(!b)return;a.focusOption("last");break;default:return}s.preventDefault()}},a.state.instancePrefix="react-select-"+(a.props.instanceId||++Cre),a.state.selectValue=R_(n.value),n.menuIsOpen&&a.state.selectValue.length){var i=a.getFocusableOptionsWithIds(),o=a.buildFocusableOptions(),l=o.indexOf(a.state.selectValue[0]);a.state.focusableOptionsWithIds=i,a.state.focusedOption=o[l],a.state.focusedOptionId=cp(i,o[l])}return a}return iQ(r,[{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&&$_(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(n){var a=this.props,i=a.isDisabled,o=a.menuIsOpen,l=this.state.isFocused;(l&&!i&&n.isDisabled||l&&o&&!n.menuIsOpen)&&this.focusInput(),l&&i&&!n.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!i&&n.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&($_(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(n,a){this.props.onInputChange(n,a)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(n){var a=this,i=this.state,o=i.selectValue,l=i.isFocused,s=this.buildFocusableOptions(),f=n==="first"?0:s.length-1;if(!this.props.isMulti){var c=s.indexOf(o[0]);c>-1&&(f=c)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:s[f],focusedOptionId:this.getFocusedOptionId(s[f])},function(){return a.onMenuOpen()})}},{key:"focusValue",value:function(n){var a=this.state,i=a.selectValue,o=a.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=i.indexOf(o);o||(l=-1);var s=i.length-1,f=-1;if(i.length){switch(n){case"previous":l===0?f=0:l===-1?f=s:f=l-1;break;case"next":l>-1&&l<s&&(f=l+1);break}this.setState({inputIsHidden:f!==-1,focusedValue:i[f]})}}}},{key:"focusOption",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",a=this.props.pageSize,i=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var l=0,s=o.indexOf(i);i||(s=-1),n==="up"?l=s>0?s-1:o.length-1:n==="down"?l=(s+1)%o.length:n==="pageup"?(l=s-a,l<0&&(l=0)):n==="pagedown"?(l=s+a,l>o.length-1&&(l=o.length-1)):n==="last"&&(l=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(o[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(up):Ft(Ft({},up),this.props.theme):up}},{key:"getCommonProps",value:function(){var n=this.clearValue,a=this.cx,i=this.getStyles,o=this.getClassNames,l=this.getValue,s=this.selectOption,f=this.setValue,c=this.props,h=c.isMulti,d=c.isRtl,m=c.options,g=this.hasValue();return{clearValue:n,cx:a,getStyles:i,getClassNames:o,getValue:l,hasValue:g,isMulti:h,isRtl:d,options:m,selectOption:s,selectProps:c,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var n=this.state.selectValue;return n.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var n=this.props,a=n.isClearable,i=n.isMulti;return a===void 0?i:a}},{key:"isOptionDisabled",value:function(n,a){return KI(this.props,n,a)}},{key:"isOptionSelected",value:function(n,a){return JI(this.props,n,a)}},{key:"filterOption",value:function(n,a){return ZI(this.props,n,a)}},{key:"formatOptionLabel",value:function(n,a){if(typeof this.props.formatOptionLabel=="function"){var i=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(n,{context:a,inputValue:i,selectValue:o})}else return this.getOptionLabel(n)}},{key:"formatGroupLabel",value:function(n){return this.props.formatGroupLabel(n)}},{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 n=this.props,a=n.isDisabled,i=n.isSearchable,o=n.inputId,l=n.inputValue,s=n.tabIndex,f=n.form,c=n.menuIsOpen,h=n.required,d=this.getComponents(),m=d.Input,g=this.state,y=g.inputIsHidden,b=g.ariaSelection,S=this.commonProps,w=o||this.getElementId("input"),C=Ft(Ft(Ft({"aria-autocomplete":"list","aria-expanded":c,"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":h,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},c&&{"aria-controls":this.getElementId("listbox")}),!i&&{"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 i?me.createElement(m,ir({},S,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:w,innerRef:this.getInputRef,isDisabled:a,isHidden:y,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:s,form:f,type:"text",value:l},C)):me.createElement(Xte,ir({id:w,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Gu,onFocus:this.onInputFocus,disabled:a,tabIndex:s,inputMode:"none",form:f,value:""},C))}},{key:"renderPlaceholderOrValue",value:function(){var n=this,a=this.getComponents(),i=a.MultiValue,o=a.MultiValueContainer,l=a.MultiValueLabel,s=a.MultiValueRemove,f=a.SingleValue,c=a.Placeholder,h=this.commonProps,d=this.props,m=d.controlShouldRenderValue,g=d.isDisabled,y=d.isMulti,b=d.inputValue,S=d.placeholder,w=this.state,C=w.selectValue,k=w.focusedValue,_=w.isFocused;if(!this.hasValue()||!m)return b?null:me.createElement(c,ir({},h,{key:"placeholder",isDisabled:g,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),S);if(y)return C.map(function(T,A){var M=T===k,E="".concat(n.getOptionLabel(T),"-").concat(n.getOptionValue(T));return me.createElement(i,ir({},h,{components:{Container:o,Label:l,Remove:s},isFocused:M,isDisabled:g,key:E,index:A,removeProps:{onClick:function(){return n.removeValue(T)},onTouchEnd:function(){return n.removeValue(T)},onMouseDown:function(N){N.preventDefault()}},data:T}),n.formatOptionLabel(T,"value"))});if(b)return null;var D=C[0];return me.createElement(f,ir({},h,{data:D,isDisabled:g}),this.formatOptionLabel(D,"value"))}},{key:"renderClearIndicator",value:function(){var n=this.getComponents(),a=n.ClearIndicator,i=this.commonProps,o=this.props,l=o.isDisabled,s=o.isLoading,f=this.state.isFocused;if(!this.isClearable()||!a||l||!this.hasValue()||s)return null;var c={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return me.createElement(a,ir({},i,{innerProps:c,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var n=this.getComponents(),a=n.LoadingIndicator,i=this.commonProps,o=this.props,l=o.isDisabled,s=o.isLoading,f=this.state.isFocused;if(!a||!s)return null;var c={"aria-hidden":"true"};return me.createElement(a,ir({},i,{innerProps:c,isDisabled:l,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var n=this.getComponents(),a=n.DropdownIndicator,i=n.IndicatorSeparator;if(!a||!i)return null;var o=this.commonProps,l=this.props.isDisabled,s=this.state.isFocused;return me.createElement(i,ir({},o,{isDisabled:l,isFocused:s}))}},{key:"renderDropdownIndicator",value:function(){var n=this.getComponents(),a=n.DropdownIndicator;if(!a)return null;var i=this.commonProps,o=this.props.isDisabled,l=this.state.isFocused,s={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return me.createElement(a,ir({},i,{innerProps:s,isDisabled:o,isFocused:l}))}},{key:"renderMenu",value:function(){var n=this,a=this.getComponents(),i=a.Group,o=a.GroupHeading,l=a.Menu,s=a.MenuList,f=a.MenuPortal,c=a.LoadingMessage,h=a.NoOptionsMessage,d=a.Option,m=this.commonProps,g=this.state.focusedOption,y=this.props,b=y.captureMenuScroll,S=y.inputValue,w=y.isLoading,C=y.loadingMessage,k=y.minMenuHeight,_=y.maxMenuHeight,D=y.menuIsOpen,T=y.menuPlacement,A=y.menuPosition,M=y.menuPortalTarget,E=y.menuShouldBlockScroll,N=y.menuShouldScrollIntoView,Y=y.noOptionsMessage,ne=y.onMenuScrollToTop,K=y.onMenuScrollToBottom;if(!D)return null;var B=function(G,ae){var U=G.type,H=G.data,R=G.isDisabled,ee=G.isSelected,J=G.label,Z=G.value,re=g===H,te=R?void 0:function(){return n.onOptionHover(H)},F=R?void 0:function(){return n.selectOption(H)},q="".concat(n.getElementId("option"),"-").concat(ae),X={id:q,onClick:F,onMouseMove:te,onMouseOver:te,tabIndex:-1,role:"option","aria-selected":n.isAppleDevice?void 0:ee};return me.createElement(d,ir({},m,{innerProps:X,data:H,isDisabled:R,isSelected:ee,key:q,label:J,type:U,value:Z,isFocused:re,innerRef:re?n.getFocusedOptionRef:void 0}),n.formatOptionLabel(G.data,"menu"))},j;if(this.hasOptions())j=this.getCategorizedOptions().map(function(G){if(G.type==="group"){var ae=G.data,U=G.options,H=G.index,R="".concat(n.getElementId("group"),"-").concat(H),ee="".concat(R,"-heading");return me.createElement(i,ir({},m,{key:R,data:ae,options:U,Heading:o,headingProps:{id:ee,data:G.data},label:n.formatGroupLabel(G.data)}),G.options.map(function(J){return B(J,"".concat(H,"-").concat(J.index))}))}else if(G.type==="option")return B(G,"".concat(G.index))});else if(w){var $=C({inputValue:S});if($===null)return null;j=me.createElement(c,m,$)}else{var V=Y({inputValue:S});if(V===null)return null;j=me.createElement(h,m,V)}var z={minMenuHeight:k,maxMenuHeight:_,menuPlacement:T,menuPosition:A,menuShouldScrollIntoView:N},W=me.createElement(Tee,ir({},m,z),function(G){var ae=G.ref,U=G.placerProps,H=U.placement,R=U.maxHeight;return me.createElement(l,ir({},m,z,{innerRef:ae,innerProps:{onMouseDown:n.onMenuMouseDown,onMouseMove:n.onMenuMouseMove},isLoading:w,placement:H}),me.createElement(tre,{captureEnabled:b,onTopArrive:ne,onBottomArrive:K,lockEnabled:E},function(ee){return me.createElement(s,ir({},m,{innerRef:function(J){n.getMenuListRef(J),ee(J)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:n.getElementId("listbox")},isLoading:w,maxHeight:R,focusedOption:g}),j)}))});return M||A==="fixed"?me.createElement(f,ir({},m,{appendTo:M,controlElement:this.controlRef,menuPlacement:T,menuPosition:A}),W):W}},{key:"renderFormField",value:function(){var n=this,a=this.props,i=a.delimiter,o=a.isDisabled,l=a.isMulti,s=a.name,f=a.required,c=this.state.selectValue;if(f&&!this.hasValue()&&!o)return me.createElement(are,{name:s,onFocus:this.onValueInputFocus});if(!(!s||o))if(l)if(i){var h=c.map(function(g){return n.getOptionValue(g)}).join(i);return me.createElement("input",{name:s,type:"hidden",value:h})}else{var d=c.length>0?c.map(function(g,y){return me.createElement("input",{key:"i-".concat(y),name:s,type:"hidden",value:n.getOptionValue(g)})}):me.createElement("input",{name:s,type:"hidden",value:""});return me.createElement("div",null,d)}else{var m=c[0]?this.getOptionValue(c[0]):"";return me.createElement("input",{name:s,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var n=this.commonProps,a=this.state,i=a.ariaSelection,o=a.focusedOption,l=a.focusedValue,s=a.isFocused,f=a.selectValue,c=this.getFocusableOptions();return me.createElement(qte,ir({},n,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:o,focusedValue:l,isFocused:s,selectValue:f,focusableOptions:c,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var n=this.getComponents(),a=n.Control,i=n.IndicatorsContainer,o=n.SelectContainer,l=n.ValueContainer,s=this.props,f=s.className,c=s.id,h=s.isDisabled,d=s.menuIsOpen,m=this.state.isFocused,g=this.commonProps=this.getCommonProps();return me.createElement(o,ir({},g,{className:f,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:m}),this.renderLiveRegion(),me.createElement(a,ir({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:m,menuIsOpen:d}),me.createElement(l,ir({},g,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),me.createElement(i,ir({},g,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(n,a){var i=a.prevProps,o=a.clearFocusValueOnUpdate,l=a.inputIsHiddenAfterUpdate,s=a.ariaSelection,f=a.isFocused,c=a.prevWasFocused,h=a.instancePrefix,d=n.options,m=n.value,g=n.menuIsOpen,y=n.inputValue,b=n.isMulti,S=R_(m),w={};if(i&&(m!==i.value||d!==i.options||g!==i.menuIsOpen||y!==i.inputValue)){var C=g?xre(n,S):[],k=g?Z_(yu(n,S),"".concat(h,"-option")):[],_=o?wre(a,S):null,D=Sre(a,C),T=cp(k,D);w={selectValue:S,focusedOption:D,focusedOptionId:T,focusableOptionsWithIds:k,focusedValue:_,clearFocusValueOnUpdate:!1}}var A=l!=null&&n!==i?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},M=s,E=f&&c;return f&&!E&&(M={value:_8(b,S,S[0]||null),options:S,action:"initial-input-focus"},E=!c),(s==null?void 0:s.action)==="initial-input-focus"&&(M=null),Ft(Ft(Ft({},w),A),{},{prevProps:n,ariaSelection:M,prevWasFocused:E})}}]),r}(I.Component);eP.defaultProps=bre;var kre=I.forwardRef(function(t,e){var r=nQ(t);return me.createElement(eP,ir({ref:e},r))}),_re=kre;const Ore=(t,e)=>{const{index:r,getValue:n}=t,a=n();if(r<e)return ke.jsx(Yv.MultiValue,{...t});if(r===e){const i=a.length-e;return ke.jsxs("div",{className:"ml-1 text-sm",children:["+",i]})}return null},Dre=on("text-sm! rounded-none!",{variants:{variant:{light:"border! border-primary-gray-400! dark:border-primary-gray-500!",normal:"border-2! border-primary-black! dark:border-primary-gray-300!"},size:{sm:"p-0! min-h-[40px]!",base:"min-h-[48px]! px-0! py-0.5!"},isDisabled:{true:"bg-primary-gray-200! dark:bg-primary-gray-550! border-primary-gray-400! dark:border-primary-gray-500!",false:"bg-primary-white! dark:bg-primary-gray-650!"}},defaultVariants:{variant:"normal",size:"base",isDisabled:!1}});function Are(t,e){const{selectProps:r}=t;return ke.jsx(Yv.DropdownIndicator,{...t,children:r.menuIsOpen?ke.jsx(DG,{className:Be("h-6 w-6",e?"stroke-primary-gray-400":"stroke-accent-red dark:stroke-primary-white")}):ke.jsx($u,{className:Be("h-6 w-6",e?"stroke-primary-gray-400":"stroke-accent-red dark:stroke-primary-white")})})}const Tre=(t,e)=>({DropdownIndicator:r=>Are(r,e),MultiValue:r=>Ore(r,t||1/0),MultiValueRemove:r=>{const{innerRef:n,innerProps:a}=r;return ke.jsx("div",{...n,...a,className:"p-1.5 rounded text-primary-gray-600 hover:text-accent-dark-red dark:text-primary-gray-100 dark:hover:text-accent-light-red",children:ke.jsx(Gc,{size:14})})}});function s1({className:t,variant:e,size:r,truncateLabel:n,placeholder:a,maxTagCount:i,isDisabled:o,...l}){return ke.jsx(_re,{...l,isDisabled:o,placeholder:a||"Select...",classNames:{control:()=>Be(Dre({variant:e,size:r,isDisabled:o||!1}),t),singleValue:()=>"text-primary-black dark:text-primary-white text-base",placeholder:()=>"text-primary-gray-550 dark:text-primary-400 text-base",groupHeading:()=>"font-bold",input:()=>"text-base",multiValue:()=>"bg-primary-gray-300 dark:bg-primary-gray-550 rounded-sm border border-primary-gray-400 dark:border-primary-gray-600",multiValueLabel:()=>`!px-1.5 !py-1 text-sm text-primary-black dark:text-primary-white ${n?" max-w-[72px] truncate":""}`,multiValueRemove:()=>"hover:bg-primary-gray-400 dark:[&_svg]:stroke-primary-white!",valueContainer:()=>"px-1",option:s=>`p-0 text-sm hover:bg-primary-blue-100 dark:hover:bg-primary-blue-400 hover:font-bold hover:text-primary-black${s.isSelected?"bg-primary-blue-600 text-primary-white dark:bg-primary-blue-200 dark:text-primary-gray-700":"bg-primary-white text-primary-black dark:bg-primary-gray-650 dark:text-primary-white"}`,menu:()=>"rounded-none! mt-1! border-0! shadow-lg! p-0!",menuList:()=>"undp-scrollbar pt-0! pb-0!"},components:Tre(i,o)})}const Mre=on("mt-0 ml-0 mr-0",{variants:{size:{xs:"text-xs",sm:"text-sm",base:"text-base","base-responsive":"text-base md:text-xl",lg:"text-lg",xl:"text-xl"},leading:{none:"leading-none",xs:"leading-[1.25]",sm:"leading-[1.375]",base:"leading-[1.4]",lg:"leading-[1.625]",xl:"leading-[2]"},marginBottom:{none:"mb-0","3xs":"mb-1","2xs":"mb-2",xs:"mb-3",sm:"mb-4",base:"mb-5",lg:"mb-6",xl:"mb-7"}},defaultVariants:{size:"base-responsive",leading:"base",marginBottom:"base"}});function or({children:t,className:e,size:r,leading:n,marginBottom:a,...i}){return ke.jsx("p",{...i,className:Be(Mre({size:r,leading:n,marginBottom:a}),e),children:t})}const Kv=on("mt-0 ml-0 mr-0 p-0",{variants:{marginBottom:{none:"mb-0","2xs":"mb-1",xs:"mb-2",sm:"mb-3","base-responsive":"mb-3 md:mb-4",base:"mb-4",lg:"mb-5",xl:"mb-6"}},defaultVariants:{marginBottom:"base-responsive"}});function tP({children:t,className:e,marginBottom:r,...n}){return ke.jsx("h2",{...n,className:Be("text-[2.5rem] md:text-[2.813rem] lg:text-[3.438rem] font-bold leading-[1.1]",Kv({marginBottom:r}),e),children:t})}function rP({children:t,className:e,marginBottom:r,...n}){return ke.jsx("h3",{...n,className:Be("text-[1.875rem] md:text-[2.188rem] font-semibold leading-[1.15]",Kv({marginBottom:r}),e),children:t})}function Ere({children:t,className:e,marginBottom:r,...n}){return ke.jsx("h5",{...n,className:Be("text-[1.25rem] md:text-[1.563rem] font-normal leading-[1.15]",Kv({marginBottom:r}),e),children:t})}function jre({children:t,className:e,...r}){return ke.jsx("a",{...r,className:Be("undp-link light text-primary-black dark:text-primary-white dark:text-primary-white bg-double-red dark:bg-double-white","cursor-pointer no-underline focus-visible:outline-hidden focus-visible:shadow-[0_0_0_#0468b1]",e),children:t})}var fp,nP="HoverCard",[aP,XSe]=m1(nP,[m0]),Jv=m0(),[KSe,Zv]=aP(nP),iP="HoverCardTrigger",oP=me.forwardRef((t,e)=>{const{__scopeHoverCard:r,...n}=t,a=Zv(iP,r),i=Jv(r);return ke.jsx(Z6,{asChild:!0,...i,children:ke.jsx(Gt.a,{"data-state":a.open?"open":"closed",...n,ref:e,onPointerEnter:kt(t.onPointerEnter,Ju(a.onOpen)),onPointerLeave:kt(t.onPointerLeave,Ju(a.onClose)),onFocus:kt(t.onFocus,a.onOpen),onBlur:kt(t.onBlur,a.onClose),onTouchStart:kt(t.onTouchStart,o=>o.preventDefault())})})});oP.displayName=iP;var Lre="HoverCardPortal",[JSe,Nre]=aP(Lre,{forceMount:void 0}),Ku="HoverCardContent",lP=me.forwardRef((t,e)=>{const r=Nre(Ku,t.__scopeHoverCard),{forceMount:n=r.forceMount,...a}=t,i=Zv(Ku,t.__scopeHoverCard);return ke.jsx(g1,{present:n||i.open,children:ke.jsx(Ire,{"data-state":i.open?"open":"closed",...a,onPointerEnter:kt(t.onPointerEnter,Ju(i.onOpen)),onPointerLeave:kt(t.onPointerLeave,Ju(i.onClose)),ref:e})})});lP.displayName=Ku;var Ire=me.forwardRef((t,e)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,...l}=t,s=Zv(Ku,r),f=Jv(r),c=me.useRef(null),h=wr(e,c),[d,m]=me.useState(!1);return me.useEffect(()=>{if(d){const g=document.body;return fp=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=fp,g.style.webkitUserSelect=fp}}},[d]),me.useEffect(()=>{if(c.current){const g=()=>{m(!1),s.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(s.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),s.hasSelectionRef.current=!1,s.isPointerDownOnContentRef.current=!1}}},[s.isPointerDownOnContentRef,s.hasSelectionRef]),me.useEffect(()=>{c.current&&$re(c.current).forEach(g=>g.setAttribute("tabindex","-1"))}),ke.jsx(z2,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:kt(i,g=>{g.preventDefault()}),onDismiss:s.onDismiss,children:ke.jsx(Vs,{...f,...l,onPointerDown:kt(l.onPointerDown,g=>{g.currentTarget.contains(g.target)&&m(!0),s.hasSelectionRef.current=!1,s.isPointerDownOnContentRef.current=!0}),ref:h,style:{...l.style,userSelect:d?"text":void 0,WebkitUserSelect:d?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Pre="HoverCardArrow",Rre=me.forwardRef((t,e)=>{const{__scopeHoverCard:r,...n}=t,a=Jv(r);return ke.jsx(Fs,{...a,...n,ref:e})});Rre.displayName=Pre;function Ju(t){return e=>e.pointerType==="touch"?void 0:t()}function $re(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)e.push(r.currentNode);return e}var Bre=oP,sP=lP;const Vre=I.forwardRef(({className:t,children:e,...r},n)=>ke.jsx(Bre,{...r,ref:n,className:Be("cursor-pointer dark:text-primary-white text-primary-black",t),children:e}));Vre.displayName="HoverCardTrigger";const Fre=I.forwardRef(({className:t,align:e="center",sideOffset:r=4,...n},a)=>ke.jsx(sP,{...n,ref:a,align:e,sideOffset:r,className:Be("z-50 w-64 border border-primary-gray-300 dark:border-primary-gray-600 text-sm bg-primary-gray-100 dark:bg-primary-gray-650 p-2 text-primary-black dark:text-primary-white outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t)}));Fre.displayName=sP.displayName;const zre=on("w-full bg-primary-white dark:bg-primary-gray-650 text-primary-black dark:text-primary-white text-base transition-colors file:border-0 file:bg-transparent file:font-medium file:text-primary-gray-700 dark:file:text-primary-white focus-visible:outline-hidden focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50 placeholder:text-primary-gray-550 dark:placeholder:text-primary-gray-400",{variants:{variant:{light:"border border-primary-gray-400 dark:border-primary-gray-500",normal:"border-2 border-primary-black dark:border-primary-gray-300"},inputSize:{sm:"px-2.5 py-1",base:"p-2.5 "}},defaultVariants:{inputSize:"base",variant:"normal"}}),uP=I.forwardRef(({className:t,inputSize:e,variant:r,...n},a)=>ke.jsx("input",{...n,ref:a,className:Be(zre({inputSize:e,variant:r}),t)}));uP.displayName="Input";const cP=I.forwardRef(({className:t,inputClassName:e,buttonClassName:r,onSearch:n,searchOnlyOnClick:a,buttonVariant:i,buttonChildren:o,showSearchButton:l,inputVariant:s,inputSize:f,placeholder:c,...h})=>{const[d,m]=I.useState(void 0),[g,y]=I.useState(!1);return ke.jsxs("div",{className:Be("flex gap-0",t),children:[ke.jsxs("div",{className:"relative w-full",children:[ke.jsx(uP,{...h,variant:s,type:"text",className:e,onChange:b=>{m(b.target.value),a||n==null||n(b.target.value)},inputSize:f,onKeyDown:b=>{b.key==="Enter"&&(n==null||n(d))},onFocus:()=>y(!0),onBlur:()=>y(!1)}),!g&&(d===""||!d)&&ke.jsxs("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:[o?null:ke.jsx(Jk,{className:"h-4 w-4 text-primary-gray-500 dark:text-primary-gray-400 mr-2"}),ke.jsx("span",{className:"text-primary-gray-500 dark:text-primary-gray-400",children:c||"Search..."})]})]}),l===!1?null:ke.jsx(r4,{variant:i||"icon",className:r,padding:f,onClick:()=>{n==null||n(d)},children:o||ke.jsx(Jk,{className:"stroke-2"})})]})});cP.displayName="Search";function eO(t,[e,r]){return Math.min(r,Math.max(e,t))}var fP=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Hre="VisuallyHidden",ff=me.forwardRef((t,e)=>ke.jsx(Gt.span,{...t,ref:e,style:{...fP,...t.style}}));ff.displayName=Hre;var qre=ff,Wre=[" ","Enter","ArrowUp","ArrowDown"],Ure=[" ","Enter"],df="Select",[Qv,hf,Gre]=Rs(df),[t7,ZSe]=m1(df,[Gre,m0]),eb=m0(),[QSe,H2]=t7(df),[eCe,Yre]=t7(df),dP="SelectTrigger",hP=me.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...a}=t,i=eb(r),o=H2(dP,r),l=o.disabled||n,s=wr(e,o.onTriggerChange),f=hf(r),c=me.useRef("touch"),[h,d,m]=EP(y=>{const b=f().filter(C=>!C.disabled),S=b.find(C=>C.value===o.value),w=jP(b,y,S);w!==void 0&&o.onValueChange(w.value)}),g=y=>{l||(o.onOpenChange(!0),m()),y&&(o.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return ke.jsx(Z6,{asChild:!0,...i,children:ke.jsx(Gt.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":MP(o.value)?"":void 0,...a,ref:s,onClick:kt(a.onClick,y=>{y.currentTarget.focus(),c.current!=="mouse"&&g(y)}),onPointerDown:kt(a.onPointerDown,y=>{c.current=y.pointerType;const b=y.target;b.hasPointerCapture(y.pointerId)&&b.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(g(y),y.preventDefault())}),onKeyDown:kt(a.onKeyDown,y=>{const b=h.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&d(y.key),!(b&&y.key===" ")&&Wre.includes(y.key)&&(g(),y.preventDefault())})})})});hP.displayName=dP;var pP="SelectValue",Xre=me.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:a,children:i,placeholder:o="",...l}=t,s=H2(pP,r),{onValueNodeHasChildrenChange:f}=s,c=i!==void 0,h=wr(e,s.onValueNodeChange);return d1(()=>{f(c)},[f,c]),ke.jsx(Gt.span,{...l,ref:h,style:{pointerEvents:"none"},children:MP(s.value)?ke.jsx(ke.Fragment,{children:o}):i})});Xre.displayName=pP;var Kre="SelectIcon",mP=me.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...a}=t;return ke.jsx(Gt.span,{"aria-hidden":!0,...a,ref:e,children:n||"▼"})});mP.displayName=Kre;var Jre="SelectPortal",gP=t=>ke.jsx(n4,{asChild:!0,...t});gP.displayName=Jre;var F3="SelectContent",yP=me.forwardRef((t,e)=>{const r=H2(F3,t.__scopeSelect),[n,a]=me.useState();if(d1(()=>{a(new DocumentFragment)},[]),!r.open){const i=n;return i?Ps.createPortal(ke.jsx(vP,{scope:t.__scopeSelect,children:ke.jsx(Qv.Slot,{scope:t.__scopeSelect,children:ke.jsx("div",{children:t.children})})}),i):null}return ke.jsx(bP,{...t,ref:e})});yP.displayName=F3;var _o=10,[vP,q2]=t7(F3),Zre="SelectContentImpl",Qre=B3("SelectContent.RemoveScroll"),bP=me.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:o,side:l,sideOffset:s,align:f,alignOffset:c,arrowPadding:h,collisionBoundary:d,collisionPadding:m,sticky:g,hideWhenDetached:y,avoidCollisions:b,...S}=t,w=H2(F3,r),[C,k]=me.useState(null),[_,D]=me.useState(null),T=wr(e,J=>k(J)),[A,M]=me.useState(null),[E,N]=me.useState(null),Y=hf(r),[ne,K]=me.useState(!1),B=me.useRef(!1);me.useEffect(()=>{if(C)return rf(C)},[C]),Zc();const j=me.useCallback(J=>{const[Z,...re]=Y().map(q=>q.ref.current),[te]=re.slice(-1),F=document.activeElement;for(const q of J)if(q===F||(q==null||q.scrollIntoView({block:"nearest"}),q===Z&&_&&(_.scrollTop=0),q===te&&_&&(_.scrollTop=_.scrollHeight),q==null||q.focus(),document.activeElement!==F))return},[Y,_]),$=me.useCallback(()=>j([A,C]),[j,A,C]);me.useEffect(()=>{ne&&$()},[ne,$]);const{onOpenChange:V,triggerPointerDownPosRef:z}=w;me.useEffect(()=>{if(C){let J={x:0,y:0};const Z=te=>{var F,q;J={x:Math.abs(Math.round(te.pageX)-(((F=z.current)==null?void 0:F.x)??0)),y:Math.abs(Math.round(te.pageY)-(((q=z.current)==null?void 0:q.y)??0))}},re=te=>{J.x<=10&&J.y<=10?te.preventDefault():C.contains(te.target)||V(!1),document.removeEventListener("pointermove",Z),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",re,{capture:!0})}}},[C,V,z]),me.useEffect(()=>{const J=()=>V(!1);return window.addEventListener("blur",J),window.addEventListener("resize",J),()=>{window.removeEventListener("blur",J),window.removeEventListener("resize",J)}},[V]);const[W,G]=EP(J=>{const Z=Y().filter(F=>!F.disabled),re=Z.find(F=>F.ref.current===document.activeElement),te=jP(Z,J,re);te&&setTimeout(()=>te.ref.current.focus())}),ae=me.useCallback((J,Z,re)=>{const te=!B.current&&!re;(w.value!==void 0&&w.value===Z||te)&&(M(J),te&&(B.current=!0))},[w.value]),U=me.useCallback(()=>C==null?void 0:C.focus(),[C]),H=me.useCallback((J,Z,re)=>{const te=!B.current&&!re;(w.value!==void 0&&w.value===Z||te)&&N(J)},[w.value]),R=n==="popper"?Vg:xP,ee=R===Vg?{side:l,sideOffset:s,align:f,alignOffset:c,arrowPadding:h,collisionBoundary:d,collisionPadding:m,sticky:g,hideWhenDetached:y,avoidCollisions:b}:{};return ke.jsx(vP,{scope:r,content:C,viewport:_,onViewportChange:D,itemRefCallback:ae,selectedItem:A,onItemLeave:U,itemTextRefCallback:H,focusSelectedItem:$,selectedItemText:E,position:n,isPositioned:ne,searchRef:W,children:ke.jsx(Hs,{as:Qre,allowPinchZoom:!0,children:ke.jsx($s,{asChild:!0,trapped:w.open,onMountAutoFocus:J=>{J.preventDefault()},onUnmountAutoFocus:kt(a,J=>{var Z;(Z=w.trigger)==null||Z.focus({preventScroll:!0}),J.preventDefault()}),children:ke.jsx(z2,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:J=>J.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:ke.jsx(R,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:J=>J.preventDefault(),...S,...ee,onPlaced:()=>K(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:kt(S.onKeyDown,J=>{const Z=J.ctrlKey||J.altKey||J.metaKey;if(J.key==="Tab"&&J.preventDefault(),!Z&&J.key.length===1&&G(J.key),["ArrowUp","ArrowDown","Home","End"].includes(J.key)){let re=Y().filter(te=>!te.disabled).map(te=>te.ref.current);if(["ArrowUp","End"].includes(J.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(J.key)){const te=J.target,F=re.indexOf(te);re=re.slice(F+1)}setTimeout(()=>j(re)),J.preventDefault()}})})})})})})});bP.displayName=Zre;var ene="SelectItemAlignedPosition",xP=me.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...a}=t,i=H2(F3,r),o=q2(F3,r),[l,s]=me.useState(null),[f,c]=me.useState(null),h=wr(e,T=>c(T)),d=hf(r),m=me.useRef(!1),g=me.useRef(!0),{viewport:y,selectedItem:b,selectedItemText:S,focusSelectedItem:w}=o,C=me.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&f&&y&&b&&S){const T=i.trigger.getBoundingClientRect(),A=f.getBoundingClientRect(),M=i.valueNode.getBoundingClientRect(),E=S.getBoundingClientRect();if(i.dir!=="rtl"){const te=E.left-A.left,F=M.left-te,q=T.left-F,X=T.width+q,ie=Math.max(X,A.width),ce=window.innerWidth-_o,de=eO(F,[_o,Math.max(_o,ce-ie)]);l.style.minWidth=X+"px",l.style.left=de+"px"}else{const te=A.right-E.right,F=window.innerWidth-M.right-te,q=window.innerWidth-T.right-F,X=T.width+q,ie=Math.max(X,A.width),ce=window.innerWidth-_o,de=eO(F,[_o,Math.max(_o,ce-ie)]);l.style.minWidth=X+"px",l.style.right=de+"px"}const N=d(),Y=window.innerHeight-_o*2,ne=y.scrollHeight,K=window.getComputedStyle(f),B=parseInt(K.borderTopWidth,10),j=parseInt(K.paddingTop,10),$=parseInt(K.borderBottomWidth,10),V=parseInt(K.paddingBottom,10),z=B+j+ne+V+$,W=Math.min(b.offsetHeight*5,z),G=window.getComputedStyle(y),ae=parseInt(G.paddingTop,10),U=parseInt(G.paddingBottom,10),H=T.top+T.height/2-_o,R=Y-H,ee=b.offsetHeight/2,J=b.offsetTop+ee,Z=B+j+J,re=z-Z;if(Z<=H){const te=N.length>0&&b===N[N.length-1].ref.current;l.style.bottom="0px";const F=f.clientHeight-y.offsetTop-y.offsetHeight,q=Math.max(R,ee+(te?U:0)+F+$),X=Z+q;l.style.height=X+"px"}else{const te=N.length>0&&b===N[0].ref.current;l.style.top="0px";const F=Math.max(H,B+y.offsetTop+(te?ae:0)+ee)+re;l.style.height=F+"px",y.scrollTop=Z-H+y.offsetTop}l.style.margin=`${_o}px 0`,l.style.minHeight=W+"px",l.style.maxHeight=Y+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[d,i.trigger,i.valueNode,l,f,y,b,S,i.dir,n]);d1(()=>C(),[C]);const[k,_]=me.useState();d1(()=>{f&&_(window.getComputedStyle(f).zIndex)},[f]);const D=me.useCallback(T=>{T&&g.current===!0&&(C(),w==null||w(),g.current=!1)},[C,w]);return ke.jsx(rne,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:D,children:ke.jsx("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:ke.jsx(Gt.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});xP.displayName=ene;var tne="SelectPopperPosition",Vg=me.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:a=_o,...i}=t,o=eb(r);return ke.jsx(Vs,{...o,...i,ref:e,align:n,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Vg.displayName=tne;var[rne,tb]=t7(F3,{}),Fg="SelectViewport",wP=me.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...a}=t,i=q2(Fg,r),o=tb(Fg,r),l=wr(e,i.onViewportChange),s=me.useRef(0);return ke.jsxs(ke.Fragment,{children:[ke.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),ke.jsx(Qv.Slot,{scope:r,children:ke.jsx(Gt.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:kt(a.onScroll,f=>{const c=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&h){const m=Math.abs(s.current-c.scrollTop);if(m>0){const g=window.innerHeight-_o*2,y=parseFloat(h.style.minHeight),b=parseFloat(h.style.height),S=Math.max(y,b);if(S<g){const w=S+m,C=Math.min(g,w),k=w-C;h.style.height=C+"px",h.style.bottom==="0px"&&(c.scrollTop=k>0?k:0,h.style.justifyContent="flex-end")}}}s.current=c.scrollTop})})})]})});wP.displayName=Fg;var SP="SelectGroup",[nne,ane]=t7(SP),ine=me.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,a=F0();return ke.jsx(nne,{scope:r,id:a,children:ke.jsx(Gt.div,{role:"group","aria-labelledby":a,...n,ref:e})})});ine.displayName=SP;var CP="SelectLabel",one=me.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,a=ane(CP,r);return ke.jsx(Gt.div,{id:a.id,...n,ref:e})});one.displayName=CP;var Zu="SelectItem",[lne,kP]=t7(Zu),_P=me.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:a=!1,textValue:i,...o}=t,l=H2(Zu,r),s=q2(Zu,r),f=l.value===n,[c,h]=me.useState(i??""),[d,m]=me.useState(!1),g=wr(e,w=>{var C;return(C=s.itemRefCallback)==null?void 0:C.call(s,w,n,a)}),y=F0(),b=me.useRef("touch"),S=()=>{a||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return ke.jsx(lne,{scope:r,value:n,disabled:a,textId:y,isSelected:f,onItemTextChange:me.useCallback(w=>{h(C=>C||((w==null?void 0:w.textContent)??"").trim())},[]),children:ke.jsx(Qv.ItemSlot,{scope:r,value:n,disabled:a,textValue:c,children:ke.jsx(Gt.div,{role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":f&&d,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...o,ref:g,onFocus:kt(o.onFocus,()=>m(!0)),onBlur:kt(o.onBlur,()=>m(!1)),onClick:kt(o.onClick,()=>{b.current!=="mouse"&&S()}),onPointerUp:kt(o.onPointerUp,()=>{b.current==="mouse"&&S()}),onPointerDown:kt(o.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:kt(o.onPointerMove,w=>{var C;b.current=w.pointerType,a?(C=s.onItemLeave)==null||C.call(s):b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:kt(o.onPointerLeave,w=>{var C;w.currentTarget===document.activeElement&&((C=s.onItemLeave)==null||C.call(s))}),onKeyDown:kt(o.onKeyDown,w=>{var C;((C=s.searchRef)==null?void 0:C.current)!==""&&w.key===" "||(Ure.includes(w.key)&&S(),w.key===" "&&w.preventDefault())})})})})});_P.displayName=Zu;var Pl="SelectItemText",OP=me.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:a,...i}=t,o=H2(Pl,r),l=q2(Pl,r),s=kP(Pl,r),f=Yre(Pl,r),[c,h]=me.useState(null),d=wr(e,S=>h(S),s.onItemTextChange,S=>{var w;return(w=l.itemTextRefCallback)==null?void 0:w.call(l,S,s.value,s.disabled)}),m=c==null?void 0:c.textContent,g=me.useMemo(()=>ke.jsx("option",{value:s.value,disabled:s.disabled,children:m},s.value),[s.disabled,s.value,m]),{onNativeOptionAdd:y,onNativeOptionRemove:b}=f;return d1(()=>(y(g),()=>b(g)),[y,b,g]),ke.jsxs(ke.Fragment,{children:[ke.jsx(Gt.span,{id:s.textId,...i,ref:d}),s.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ps.createPortal(i.children,o.valueNode):null]})});OP.displayName=Pl;var DP="SelectItemIndicator",AP=me.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return kP(DP,r).isSelected?ke.jsx(Gt.span,{"aria-hidden":!0,...n,ref:e}):null});AP.displayName=DP;var zg="SelectScrollUpButton",sne=me.forwardRef((t,e)=>{const r=q2(zg,t.__scopeSelect),n=tb(zg,t.__scopeSelect),[a,i]=me.useState(!1),o=wr(e,n.onScrollButtonChange);return d1(()=>{if(r.viewport&&r.isPositioned){let l=function(){const f=s.scrollTop>0;i(f)};const s=r.viewport;return l(),s.addEventListener("scroll",l),()=>s.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?ke.jsx(TP,{...t,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:s}=r;l&&s&&(l.scrollTop=l.scrollTop-s.offsetHeight)}}):null});sne.displayName=zg;var Hg="SelectScrollDownButton",une=me.forwardRef((t,e)=>{const r=q2(Hg,t.__scopeSelect),n=tb(Hg,t.__scopeSelect),[a,i]=me.useState(!1),o=wr(e,n.onScrollButtonChange);return d1(()=>{if(r.viewport&&r.isPositioned){let l=function(){const f=s.scrollHeight-s.clientHeight,c=Math.ceil(s.scrollTop)<f;i(c)};const s=r.viewport;return l(),s.addEventListener("scroll",l),()=>s.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?ke.jsx(TP,{...t,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:s}=r;l&&s&&(l.scrollTop=l.scrollTop+s.offsetHeight)}}):null});une.displayName=Hg;var TP=me.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...a}=t,i=q2("SelectScrollButton",r),o=me.useRef(null),l=hf(r),s=me.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return me.useEffect(()=>()=>s(),[s]),d1(()=>{var f;const c=l().find(h=>h.ref.current===document.activeElement);(f=c==null?void 0:c.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),ke.jsx(Gt.div,{"aria-hidden":!0,...a,ref:e,style:{flexShrink:0,...a.style},onPointerDown:kt(a.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:kt(a.onPointerMove,()=>{var f;(f=i.onItemLeave)==null||f.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:kt(a.onPointerLeave,()=>{s()})})}),cne="SelectSeparator",fne=me.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return ke.jsx(Gt.div,{"aria-hidden":!0,...n,ref:e})});fne.displayName=cne;var qg="SelectArrow",dne=me.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,a=eb(r),i=H2(qg,r),o=q2(qg,r);return i.open&&o.position==="popper"?ke.jsx(Fs,{...a,...n,ref:e}):null});dne.displayName=qg;var hne="SelectBubbleInput",pne=me.forwardRef(({__scopeSelect:t,value:e,...r},n)=>{const a=me.useRef(null),i=wr(n,a),o=Xc(e);return me.useEffect(()=>{const l=a.current;if(!l)return;const s=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(s,"value").set;if(o!==e&&f){const c=new Event("change",{bubbles:!0});f.call(l,e),l.dispatchEvent(c)}},[o,e]),ke.jsx(Gt.select,{...r,style:{...fP,...r.style},ref:i,defaultValue:e})});pne.displayName=hne;function MP(t){return t===""||t===void 0}function EP(t){const e=Vi(t),r=me.useRef(""),n=me.useRef(0),a=me.useCallback(o=>{const l=r.current+o;e(l),function s(f){r.current=f,window.clearTimeout(n.current),f!==""&&(n.current=window.setTimeout(()=>s(""),1e3))}(l)},[e]),i=me.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return me.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,a,i]}function jP(t,e,r){const n=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,a=r?t.indexOf(r):-1;let i=mne(t,Math.max(a,0));n.length===1&&(i=i.filter(l=>l!==r));const o=i.find(l=>l.textValue.toLowerCase().startsWith(n.toLowerCase()));return o!==r?o:void 0}function mne(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var LP=hP,gne=mP,yne=gP,NP=yP,vne=wP,IP=_P,bne=OP,xne=AP;function wne(){return ke.jsx("svg",{width:"25",height:"26",viewBox:"0 0 25 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ke.jsxs("g",{children:[ke.jsx("path",{d:"M16.599 23.688C17.7895 22.3987 18.4193 20.6895 18.35 18.936H0.75V0.75H23.88V15.468L23.875 15.474C23.875 15.521 23.875 15.568 23.875 15.616C23.905 20.278 17.206 24.488 16.175 24.488C15.921 24.488 16.004 24.24 16.599 23.688Z",stroke:"currentColor",strokeWidth:"1.5"}),ke.jsx("path",{d:"M13.5854 13.542L16.9429 5.45215L20.2144 13.542",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),ke.jsx("path",{d:"M15.0576 10.6704H18.9863",stroke:"currentColor",strokeWidth:"1.5"}),ke.jsx("path",{d:"M4.13086 6.76706H10.6748",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),ke.jsx("path",{d:"M4.13086 13.1656C4.13086 13.1656 9.59778 13.6368 9.92578 6.90781",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),ke.jsx("path",{d:"M10.8271 13.5417C10.8271 13.5417 6.38075 13.065 5.21875 9.11597",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),ke.jsx("path",{d:"M7.40723 4.08563V6.56317",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})}const Sne=I.forwardRef(({className:t,children:e,...r},n)=>ke.jsxs(LP,{ref:n,className:Be("cursor-pointer flex h-9 flex gap-2 rtl:[direction:rtl] items-center text-primary-blue-600 hover:text-primary-blue-400 dark:text-primary-white dark:hover:text-primary-white uppercase font-semibold text-sm justify-between whitespace-nowrap bg-transparent p-0 shadow-sm data-[placeholder]:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","[&[data-state=open]>.lucide-chevron-down]:rotate-180",t),...r,children:[ke.jsx(wne,{}),e,ke.jsx(gne,{asChild:!0,children:ke.jsx($u,{className:"h-6 w-6 transition-transform duration-200"})})]}));Sne.displayName=LP.displayName;const Cne=I.forwardRef(({className:t,children:e,position:r="popper",...n},a)=>ke.jsx(yne,{children:ke.jsx(NP,{ref:a,className:Be("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-primary-white dark:bg-primary-gray-650 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,...n,children:ke.jsx(vne,{className:Be(r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e})})}));Cne.displayName=NP.displayName;const kne=I.forwardRef(({className:t,children:e,...r},n)=>ke.jsxs(IP,{ref:n,className:Be("relative flex w-full cursor-default select-none items-center py-3 px-4 text-sm uppercase font-semibold outline-none border-b border-primary-gray-400 [&:last-of-type]:border-b-0 dark:border-primary-gray-550 focus:bg-primary-gray-400 dark:focus:bg-primary-gray-550 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[ke.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:ke.jsx(xne,{children:ke.jsx(vv,{className:"h-4 w-4"})})}),ke.jsx(bne,{children:e})]}));kne.displayName=IP.displayName;const _ne=I.forwardRef(({className:t,...e},r)=>ke.jsx("ol",{ref:r,"aria-label":"list",...e,className:Be("pl-6 rtl:pr-6 rtl:pl-0",t)}));_ne.displayName="Ol";const One=I.forwardRef(({className:t,...e},r)=>ke.jsx("ul",{ref:r,"aria-label":"list",...e,className:Be("pl-6 rtl:pr-6 rtl:pl-0",t)}));One.displayName="Ul";const Dne=I.forwardRef(({className:t,...e},r)=>ke.jsx("li",{...e,ref:r,className:Be("mb-6 pl-3 text-base md:text-xl rtl:pr-3 rtl:pl-0",t)}));Dne.displayName="li";var pf="Dialog",[PP,tCe]=m1(pf),[Ane,Vo]=PP(pf),RP=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:a,onOpenChange:i,modal:o=!0}=t,l=me.useRef(null),s=me.useRef(null),[f,c]=h0({prop:n,defaultProp:a??!1,onChange:i,caller:pf});return ke.jsx(Ane,{scope:e,triggerRef:l,contentRef:s,contentId:F0(),titleId:F0(),descriptionId:F0(),open:f,onOpenChange:c,onOpenToggle:me.useCallback(()=>c(h=>!h),[c]),modal:o,children:r})};RP.displayName=pf;var $P="DialogTrigger",Tne=me.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,a=Vo($P,r),i=wr(e,a.triggerRef);return ke.jsx(Gt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":ab(a.open),...n,ref:i,onClick:kt(t.onClick,a.onOpenToggle)})});Tne.displayName=$P;var rb="DialogPortal",[Mne,BP]=PP(rb,{forceMount:void 0}),VP=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:a}=t,i=Vo(rb,e);return ke.jsx(Mne,{scope:e,forceMount:r,children:me.Children.map(n,o=>ke.jsx(g1,{present:r||i.open,children:ke.jsx(n4,{asChild:!0,container:a,children:o})}))})};VP.displayName=rb;var Qu="DialogOverlay",FP=me.forwardRef((t,e)=>{const r=BP(Qu,t.__scopeDialog),{forceMount:n=r.forceMount,...a}=t,i=Vo(Qu,t.__scopeDialog);return i.modal?ke.jsx(g1,{present:n||i.open,children:ke.jsx(jne,{...a,ref:e})}):null});FP.displayName=Qu;var Ene=B3("DialogOverlay.RemoveScroll"),jne=me.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,a=Vo(Qu,r);return ke.jsx(Hs,{as:Ene,allowPinchZoom:!0,shards:[a.contentRef],children:ke.jsx(Gt.div,{"data-state":ab(a.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),z3="DialogContent",zP=me.forwardRef((t,e)=>{const r=BP(z3,t.__scopeDialog),{forceMount:n=r.forceMount,...a}=t,i=Vo(z3,t.__scopeDialog);return ke.jsx(g1,{present:n||i.open,children:i.modal?ke.jsx(Lne,{...a,ref:e}):ke.jsx(Nne,{...a,ref:e})})});zP.displayName=z3;var Lne=me.forwardRef((t,e)=>{const r=Vo(z3,t.__scopeDialog),n=me.useRef(null),a=wr(e,r.contentRef,n);return me.useEffect(()=>{const i=n.current;if(i)return rf(i)},[]),ke.jsx(HP,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:kt(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:kt(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&i.preventDefault()}),onFocusOutside:kt(t.onFocusOutside,i=>i.preventDefault())})}),Nne=me.forwardRef((t,e)=>{const r=Vo(z3,t.__scopeDialog),n=me.useRef(!1),a=me.useRef(!1);return ke.jsx(HP,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),i.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:i=>{var o,l;(o=t.onInteractOutside)==null||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const s=i.target;(l=r.triggerRef.current)!=null&&l.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),HP=me.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,...o}=t,l=Vo(z3,r),s=me.useRef(null),f=wr(e,s);return Zc(),ke.jsxs(ke.Fragment,{children:[ke.jsx($s,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:i,children:ke.jsx(z2,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ab(l.open),...o,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),ke.jsxs(ke.Fragment,{children:[ke.jsx(Pne,{titleId:l.titleId}),ke.jsx($ne,{contentRef:s,descriptionId:l.descriptionId})]})]})}),nb="DialogTitle",qP=me.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,a=Vo(nb,r);return ke.jsx(Gt.h2,{id:a.titleId,...n,ref:e})});qP.displayName=nb;var WP="DialogDescription",UP=me.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,a=Vo(WP,r);return ke.jsx(Gt.p,{id:a.descriptionId,...n,ref:e})});UP.displayName=WP;var GP="DialogClose",Ine=me.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,a=Vo(GP,r);return ke.jsx(Gt.button,{type:"button",...n,ref:e,onClick:kt(t.onClick,()=>a.onOpenChange(!1))})});Ine.displayName=GP;function ab(t){return t?"open":"closed"}var YP="DialogTitleWarning",[rCe,XP]=$U(YP,{contentName:z3,titleName:nb,docsSlug:"dialog"}),Pne=({titleId:t})=>{const e=XP(YP),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
165
165
 
166
166
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
167
167
 
@@ -271,18 +271,18 @@ License: MIT
271
271
  `&&(E=`
272
272
  `);var z=0,W=!1;this.parse=function(G,ae,U){if(typeof G!="string")throw new Error("Input must be a string");var H=G.length,R=M.length,ee=E.length,J=N.length,Z=T(Y),re=[],te=[],F=[],q=z=0;if(!G)return ge();if(K||K!==!1&&G.indexOf($)===-1){for(var X=G.split(E),ie=0;ie<X.length;ie++){if(F=X[ie],z+=F.length,ie!==X.length-1)z+=E.length;else if(U)return ge();if(!N||F.substring(0,J)!==N){if(Z){if(re=[],Te(F.split(M)),ve(),W)return ge()}else Te(F.split(M));if(ne&&ne<=ie)return re=re.slice(0,ne),ge(!0)}}return ge()}for(var ce=G.indexOf(M,z),de=G.indexOf(E,z),he=new RegExp(b(V)+b($),"g"),Oe=G.indexOf($,z);;)if(G[z]===$)for(Oe=z,z++;;){if((Oe=G.indexOf($,Oe+1))===-1)return U||te.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:re.length,index:z}),xe();if(Oe===H-1)return xe(G.substring(z,Oe).replace(he,$));if($===V&&G[Oe+1]===V)Oe++;else if($===V||Oe===0||G[Oe-1]!==V){ce!==-1&&ce<Oe+1&&(ce=G.indexOf(M,Oe+1));var Ne=_e((de=de!==-1&&de<Oe+1?G.indexOf(E,Oe+1):de)===-1?ce:Math.min(ce,de));if(G.substr(Oe+1+Ne,R)===M){F.push(G.substring(z,Oe).replace(he,$)),G[z=Oe+1+Ne+R]!==$&&(Oe=G.indexOf($,z)),ce=G.indexOf(M,z),de=G.indexOf(E,z);break}if(Ne=_e(de),G.substring(Oe+1+Ne,Oe+1+Ne+ee)===E){if(F.push(G.substring(z,Oe).replace(he,$)),we(Oe+1+Ne+ee),ce=G.indexOf(M,z),Oe=G.indexOf($,z),Z&&(ve(),W))return ge();if(ne&&re.length>=ne)return ge(!0);break}te.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:re.length,index:z}),Oe++}}else if(N&&F.length===0&&G.substring(z,z+J)===N){if(de===-1)return ge();z=de+ee,de=G.indexOf(E,z),ce=G.indexOf(M,z)}else if(ce!==-1&&(ce<de||de===-1))F.push(G.substring(z,ce)),z=ce+R,ce=G.indexOf(M,z);else{if(de===-1)break;if(F.push(G.substring(z,de)),we(de+ee),Z&&(ve(),W))return ge();if(ne&&re.length>=ne)return ge(!0)}return xe();function Te(le){re.push(le),q=z}function _e(le){var ue=0;return ue=le!==-1&&(le=G.substring(Oe+1,le))&&le.trim()===""?le.length:ue}function xe(le){return U||(le===void 0&&(le=G.substring(z)),F.push(le),z=H,Te(F),Z&&ve()),ge()}function we(le){z=le,Te(F),F=[],de=G.indexOf(E,z)}function ge(le){if(A.header&&!ae&&re.length&&!j){var ue=re[0],Ce={},pe=new Set(ue);let ye=!1;for(let be=0;be<ue.length;be++){let je=ue[be];if(Ce[je=T(A.transformHeader)?A.transformHeader(je,be):je]){let $e,ut=Ce[je];for(;$e=je+"_"+ut,ut++,pe.has($e););pe.add($e),ue[be]=$e,Ce[je]++,ye=!0,(B=B===null?{}:B)[$e]=je}else Ce[je]=1,ue[be]=je;pe.add(je)}ye&&console.warn("Duplicate headers found and renamed."),j=!0}return{data:re,errors:te,meta:{delimiter:M,linebreak:E,aborted:W,truncated:!!le,cursor:q+(ae||0),renamedHeaders:B}}}function ve(){Y(ge()),re=[],te=[]}},this.abort=function(){W=!0},this.getCharIndex=function(){return z}}function w(A){var M=A.data,E=l[M.workerId],N=!1;if(M.error)E.userError(M.error,M.file);else if(M.results&&M.results.data){var Y={abort:function(){N=!0,C(M.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:k,resume:k};if(T(E.userStep)){for(var ne=0;ne<M.results.data.length&&(E.userStep({data:M.results.data[ne],errors:M.results.errors,meta:M.results.meta},Y),!N);ne++);delete M.results}else T(E.userChunk)&&(E.userChunk(M.results,Y,M.file),delete M.results)}M.finished&&!N&&C(M.workerId,M.results)}function C(A,M){var E=l[A];T(E.userComplete)&&E.userComplete(M),E.terminate(),delete l[A]}function k(){throw new Error("Not implemented.")}function _(A){if(typeof A!="object"||A===null)return A;var M,E=Array.isArray(A)?[]:{};for(M in A)E[M]=_(A[M]);return E}function D(A,M){return function(){A.apply(M,arguments)}}function T(A){return typeof A=="function"}return f.parse=function(A,M){var E=(M=M||{}).dynamicTyping||!1;if(T(E)&&(M.dynamicTypingFunction=E,E={}),M.dynamicTyping=E,M.transform=!!T(M.transform)&&M.transform,!M.worker||!f.WORKERS_SUPPORTED)return E=null,f.NODE_STREAM_INPUT,typeof A=="string"?(A=(N=>N.charCodeAt(0)!==65279?N:N.slice(1))(A),E=new(M.download?h:m)(M)):A.readable===!0&&T(A.read)&&T(A.on)?E=new g(M):(n.File&&A instanceof File||A instanceof Object)&&(E=new d(M)),E.stream(A);(E=(()=>{var N;return!!f.WORKERS_SUPPORTED&&(N=(()=>{var Y=n.URL||n.webkitURL||null,ne=r.toString();return f.BLOB_URL||(f.BLOB_URL=Y.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; ","(",ne,")();"],{type:"text/javascript"})))})(),(N=new n.Worker(N)).onmessage=w,N.id=s++,l[N.id]=N)})()).userStep=M.step,E.userChunk=M.chunk,E.userComplete=M.complete,E.userError=M.error,M.step=T(M.step),M.chunk=T(M.chunk),M.complete=T(M.complete),M.error=T(M.error),delete M.worker,E.postMessage({input:A,config:M,workerId:E.id})},f.unparse=function(A,M){var E=!1,N=!0,Y=",",ne=`\r
273
273
  `,K='"',B=K+K,j=!1,$=null,V=!1,z=((()=>{if(typeof M=="object"){if(typeof M.delimiter!="string"||f.BAD_DELIMITERS.filter(function(ae){return M.delimiter.indexOf(ae)!==-1}).length||(Y=M.delimiter),typeof M.quotes!="boolean"&&typeof M.quotes!="function"&&!Array.isArray(M.quotes)||(E=M.quotes),typeof M.skipEmptyLines!="boolean"&&typeof M.skipEmptyLines!="string"||(j=M.skipEmptyLines),typeof M.newline=="string"&&(ne=M.newline),typeof M.quoteChar=="string"&&(K=M.quoteChar),typeof M.header=="boolean"&&(N=M.header),Array.isArray(M.columns)){if(M.columns.length===0)throw new Error("Option columns is empty");$=M.columns}M.escapeChar!==void 0&&(B=M.escapeChar+K),M.escapeFormulae instanceof RegExp?V=M.escapeFormulae:typeof M.escapeFormulae=="boolean"&&M.escapeFormulae&&(V=/^[=+\-@\t\r].*$/)}})(),new RegExp(b(K),"g"));if(typeof A=="string"&&(A=JSON.parse(A)),Array.isArray(A)){if(!A.length||Array.isArray(A[0]))return W(null,A,j);if(typeof A[0]=="object")return W($||Object.keys(A[0]),A,j)}else if(typeof A=="object")return typeof A.data=="string"&&(A.data=JSON.parse(A.data)),Array.isArray(A.data)&&(A.fields||(A.fields=A.meta&&A.meta.fields||$),A.fields||(A.fields=Array.isArray(A.data[0])?A.fields:typeof A.data[0]=="object"?Object.keys(A.data[0]):[]),Array.isArray(A.data[0])||typeof A.data[0]=="object"||(A.data=[A.data])),W(A.fields||[],A.data||[],j);throw new Error("Unable to serialize unrecognized input");function W(ae,U,H){var R="",ee=(typeof ae=="string"&&(ae=JSON.parse(ae)),typeof U=="string"&&(U=JSON.parse(U)),Array.isArray(ae)&&0<ae.length),J=!Array.isArray(U[0]);if(ee&&N){for(var Z=0;Z<ae.length;Z++)0<Z&&(R+=Y),R+=G(ae[Z],Z);0<U.length&&(R+=ne)}for(var re=0;re<U.length;re++){var te=(ee?ae:U[re]).length,F=!1,q=ee?Object.keys(U[re]).length===0:U[re].length===0;if(H&&!ee&&(F=H==="greedy"?U[re].join("").trim()==="":U[re].length===1&&U[re][0].length===0),H==="greedy"&&ee){for(var X=[],ie=0;ie<te;ie++){var ce=J?ae[ie]:ie;X.push(U[re][ce])}F=X.join("").trim()===""}if(!F){for(var de=0;de<te;de++){0<de&&!q&&(R+=Y);var he=ee&&J?ae[de]:de;R+=G(U[re][he],de)}re<U.length-1&&(!H||0<te&&!q)&&(R+=ne)}}return R}function G(ae,U){var H,R;return ae==null?"":ae.constructor===Date?JSON.stringify(ae).slice(1,25):(R=!1,V&&typeof ae=="string"&&V.test(ae)&&(ae="'"+ae,R=!0),H=ae.toString().replace(z,B),(R=R||E===!0||typeof E=="function"&&E(ae,U)||Array.isArray(E)&&E[U]||((ee,J)=>{for(var Z=0;Z<J.length;Z++)if(-1<ee.indexOf(J[Z]))return!0;return!1})(H,f.BAD_DELIMITERS)||-1<H.indexOf(Y)||H.charAt(0)===" "||H.charAt(H.length-1)===" ")?K+H+K:H)}},f.RECORD_SEP="",f.UNIT_SEP="",f.BYTE_ORDER_MARK="\uFEFF",f.BAD_DELIMITERS=["\r",`
274
- `,'"',f.BYTE_ORDER_MARK],f.WORKERS_SUPPORTED=!i&&!!n.Worker,f.NODE_STREAM_INPUT=1,f.LocalChunkSize=10485760,f.RemoteChunkSize=5242880,f.DefaultDelimiter=",",f.Parser=S,f.ParserHandle=y,f.NetworkStreamer=h,f.FileStreamer=d,f.StringStreamer=m,f.ReadableStreamStreamer=g,n.jQuery&&((a=n.jQuery).fn.parse=function(A){var M=A.config||{},E=[];return this.each(function(ne){if(!(a(this).prop("tagName").toUpperCase()==="INPUT"&&a(this).attr("type").toLowerCase()==="file"&&n.FileReader)||!this.files||this.files.length===0)return!0;for(var K=0;K<this.files.length;K++)E.push({file:this.files[K],inputElem:this,instanceConfig:a.extend({},M)})}),N(),this;function N(){if(E.length===0)T(A.complete)&&A.complete();else{var ne,K,B,j,$=E[0];if(T(A.before)){var V=A.before($.file,$.inputElem);if(typeof V=="object"){if(V.action==="abort")return ne="AbortError",K=$.file,B=$.inputElem,j=V.reason,void(T(A.error)&&A.error({name:ne},K,B,j));if(V.action==="skip")return void Y();typeof V.config=="object"&&($.instanceConfig=a.extend($.instanceConfig,V.config))}else if(V==="skip")return void Y()}var z=$.instanceConfig.complete;$.instanceConfig.complete=function(W){T(z)&&z(W,$.file,$.inputElem),Y()},f.parse($.file,$.instanceConfig)}}function Y(){E.splice(0,1),N()}}),o&&(n.onmessage=function(A){A=A.data,f.WORKER_ID===void 0&&A&&(f.WORKER_ID=A.workerId),typeof A.input=="string"?n.postMessage({workerId:f.WORKER_ID,results:f.parse(A.input,A.config),finished:!0}):(n.File&&A.input instanceof File||A.input instanceof Object)&&(A=f.parse(A.input,A.config))&&n.postMessage({workerId:f.WORKER_ID,results:A,finished:!0})}),(h.prototype=Object.create(c.prototype)).constructor=h,(d.prototype=Object.create(c.prototype)).constructor=d,(m.prototype=Object.create(m.prototype)).constructor=m,(g.prototype=Object.create(c.prototype)).constructor=g,f})}(Eu)),Eu.exports}var Dpe=Ope();const eH=_a(Dpe);function n2(t,e){return!e||e.length===0?t:t.map(n=>{const a={...n};return e.forEach(i=>{a[i.column]=a[i.column]?a[i.column].split(i.delimiter||",").map(o=>o.trim()):[]}),a})}var Wl={exports:{}};Wl.exports;var CM;function Ape(){return CM||(CM=1,function(t,e){var r=200,n="Expected a function",a="__lodash_hash_undefined__",i=1,o=2,l=9007199254740991,s="[object Arguments]",f="[object Array]",c="[object Boolean]",h="[object Date]",d="[object Error]",m="[object Function]",g="[object GeneratorFunction]",y="[object Map]",b="[object Number]",S="[object Object]",w="[object Promise]",C="[object RegExp]",k="[object Set]",_="[object String]",D="[object Symbol]",T="[object WeakMap]",A="[object ArrayBuffer]",M="[object DataView]",E="[object Float32Array]",N="[object Float64Array]",Y="[object Int8Array]",ne="[object Int16Array]",K="[object Int32Array]",B="[object Uint8Array]",j="[object Uint8ClampedArray]",$="[object Uint16Array]",V="[object Uint32Array]",z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W=/^\w*$/,G=/^\./,ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,U=/[\\^$.*+?()[\]{}|]/g,H=/\\(\\)?/g,R=/^\[object .+?Constructor\]$/,ee=/^(?:0|[1-9]\d*)$/,J={};J[E]=J[N]=J[Y]=J[ne]=J[K]=J[B]=J[j]=J[$]=J[V]=!0,J[s]=J[f]=J[A]=J[c]=J[M]=J[h]=J[d]=J[m]=J[y]=J[b]=J[S]=J[C]=J[k]=J[_]=J[T]=!1;var Z=typeof kr=="object"&&kr&&kr.Object===Object&&kr,re=typeof self=="object"&&self&&self.Object===Object&&self,te=Z||re||Function("return this")(),F=e&&!e.nodeType&&e,q=F&&!0&&t&&!t.nodeType&&t,X=q&&q.exports===F,ie=X&&Z.process,ce=function(){try{return ie&&ie.binding("util")}catch{}}(),de=ce&&ce.isTypedArray;function he(Ae,se,Ee,fe){for(var Le=-1,Ve=Ae?Ae.length:0;++Le<Ve;){var qe=Ae[Le];se(fe,qe,Ee(qe),Ae)}return fe}function Oe(Ae,se){for(var Ee=-1,fe=Ae?Ae.length:0;++Ee<fe;)if(se(Ae[Ee],Ee,Ae))return!0;return!1}function Ne(Ae){return function(se){return se==null?void 0:se[Ae]}}function Te(Ae,se){for(var Ee=-1,fe=Array(Ae);++Ee<Ae;)fe[Ee]=se(Ee);return fe}function _e(Ae){return function(se){return Ae(se)}}function xe(Ae,se){return Ae==null?void 0:Ae[se]}function we(Ae){var se=!1;if(Ae!=null&&typeof Ae.toString!="function")try{se=!!(Ae+"")}catch{}return se}function ge(Ae){var se=-1,Ee=Array(Ae.size);return Ae.forEach(function(fe,Le){Ee[++se]=[Le,fe]}),Ee}function ve(Ae,se){return function(Ee){return Ae(se(Ee))}}function le(Ae){var se=-1,Ee=Array(Ae.size);return Ae.forEach(function(fe){Ee[++se]=fe}),Ee}var ue=Array.prototype,Ce=Function.prototype,pe=Object.prototype,ye=te["__core-js_shared__"],be=function(){var Ae=/[^.]+$/.exec(ye&&ye.keys&&ye.keys.IE_PROTO||"");return Ae?"Symbol(src)_1."+Ae:""}(),je=Ce.toString,$e=pe.hasOwnProperty,ut=pe.toString,Ie=RegExp("^"+je.call($e).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ze=te.Symbol,Ke=te.Uint8Array,et=pe.propertyIsEnumerable,Pt=ue.splice,jt=ve(Object.keys,Object),Tt=ea(te,"DataView"),St=ea(te,"Map"),tt=ea(te,"Promise"),Mt=ea(te,"Set"),Dt=ea(te,"WeakMap"),Ye=ea(Object,"create"),Lt=_r(Tt),Et=_r(St),Xt=_r(tt),He=_r(Mt),It=_r(Dt),Ge=Ze?Ze.prototype:void 0,Rt=Ge?Ge.valueOf:void 0,$t=Ge?Ge.toString:void 0;function dr(Ae){var se=-1,Ee=Ae?Ae.length:0;for(this.clear();++se<Ee;){var fe=Ae[se];this.set(fe[0],fe[1])}}function xr(){this.__data__=Ye?Ye(null):{}}function Mr(Ae){return this.has(Ae)&&delete this.__data__[Ae]}function Er(Ae){var se=this.__data__;if(Ye){var Ee=se[Ae];return Ee===a?void 0:Ee}return $e.call(se,Ae)?se[Ae]:void 0}function it(Ae){var se=this.__data__;return Ye?se[Ae]!==void 0:$e.call(se,Ae)}function Xe(Ae,se){var Ee=this.__data__;return Ee[Ae]=Ye&&se===void 0?a:se,this}dr.prototype.clear=xr,dr.prototype.delete=Mr,dr.prototype.get=Er,dr.prototype.has=it,dr.prototype.set=Xe;function Vt(Ae){var se=-1,Ee=Ae?Ae.length:0;for(this.clear();++se<Ee;){var fe=Ae[se];this.set(fe[0],fe[1])}}function Yt(){this.__data__=[]}function at(Ae){var se=this.__data__,Ee=jn(se,Ae);if(Ee<0)return!1;var fe=se.length-1;return Ee==fe?se.pop():Pt.call(se,Ee,1),!0}function cr(Ae){var se=this.__data__,Ee=jn(se,Ae);return Ee<0?void 0:se[Ee][1]}function Gn(Ae){return jn(this.__data__,Ae)>-1}function nr(Ae,se){var Ee=this.__data__,fe=jn(Ee,Ae);return fe<0?Ee.push([Ae,se]):Ee[fe][1]=se,this}Vt.prototype.clear=Yt,Vt.prototype.delete=at,Vt.prototype.get=cr,Vt.prototype.has=Gn,Vt.prototype.set=nr;function Ur(Ae){var se=-1,Ee=Ae?Ae.length:0;for(this.clear();++se<Ee;){var fe=Ae[se];this.set(fe[0],fe[1])}}function vn(){this.__data__={hash:new dr,map:new(St||Vt),string:new dr}}function F1(Ae){return Ln(this,Ae).delete(Ae)}function Kt(Ae){return Ln(this,Ae).get(Ae)}function Jt(Ae){return Ln(this,Ae).has(Ae)}function zt(Ae,se){return Ln(this,Ae).set(Ae,se),this}Ur.prototype.clear=vn,Ur.prototype.delete=F1,Ur.prototype.get=Kt,Ur.prototype.has=Jt,Ur.prototype.set=zt;function mn(Ae){var se=-1,Ee=Ae?Ae.length:0;for(this.__data__=new Ur;++se<Ee;)this.add(Ae[se])}function Ir(Ae){return this.__data__.set(Ae,a),this}function mr(Ae){return this.__data__.has(Ae)}mn.prototype.add=mn.prototype.push=Ir,mn.prototype.has=mr;function Jr(Ae){this.__data__=new Vt(Ae)}function en(){this.__data__=new Vt}function Pr(Ae){return this.__data__.delete(Ae)}function pa(Ae){return this.__data__.get(Ae)}function Zn(Ae){return this.__data__.has(Ae)}function Gr(Ae,se){var Ee=this.__data__;if(Ee instanceof Vt){var fe=Ee.__data__;if(!St||fe.length<r-1)return fe.push([Ae,se]),this;Ee=this.__data__=new Ur(fe)}return Ee.set(Ae,se),this}Jr.prototype.clear=en,Jr.prototype.delete=Pr,Jr.prototype.get=pa,Jr.prototype.has=Zn,Jr.prototype.set=Gr;function oa(Ae,se){var Ee=zr(Ae)||Oa(Ae)?Te(Ae.length,String):[],fe=Ee.length,Le=!!fe;for(var Ve in Ae)$e.call(Ae,Ve)&&!(Le&&(Ve=="length"||ta(Ve,fe)))&&Ee.push(Ve);return Ee}function jn(Ae,se){for(var Ee=Ae.length;Ee--;)if(Xr(Ae[Ee][0],se))return Ee;return-1}function Va(Ae,se,Ee,fe){return wi(Ae,function(Le,Ve,qe){se(fe,Le,Ee(Le),qe)}),fe}var wi=e1(O1),_1=Yn();function O1(Ae,se){return Ae&&_1(Ae,se,rt)}function $n(Ae,se){se=sn(se,Ae)?[se]:oi(se);for(var Ee=0,fe=se.length;Ae!=null&&Ee<fe;)Ae=Ae[sa(se[Ee++])];return Ee&&Ee==fe?Ae:void 0}function ai(Ae){return ut.call(Ae)}function Qn(Ae,se){return Ae!=null&&se in Object(Ae)}function Fa(Ae,se,Ee,fe,Le){return Ae===se?!0:Ae==null||se==null||!Fn(Ae)&&!zn(se)?Ae!==Ae&&se!==se:D1(Ae,se,Fa,Ee,fe,Le)}function D1(Ae,se,Ee,fe,Le,Ve){var qe=zr(Ae),ht=zr(se),ct=f,gt=f;qe||(ct=Yr(Ae),ct=ct==s?S:ct),ht||(gt=Yr(se),gt=gt==s?S:gt);var Nt=ct==S&&!we(Ae),Se=gt==S&&!we(se),Pe=ct==gt;if(Pe&&!Nt)return Ve||(Ve=new Jr),qe||Ia(Ae)?ln(Ae,se,Ee,fe,Le,Ve):t1(Ae,se,ct,Ee,fe,Le,Ve);if(!(Le&o)){var We=Nt&&$e.call(Ae,"__wrapped__"),ot=Se&&$e.call(se,"__wrapped__");if(We||ot){var wt=We?Ae.value():Ae,vt=ot?se.value():se;return Ve||(Ve=new Jr),Ee(wt,vt,fe,Le,Ve)}}return Pe?(Ve||(Ve=new Jr),Na(Ae,se,Ee,fe,Le,Ve)):!1}function A1(Ae,se,Ee,fe){var Le=Ee.length,Ve=Le;if(Ae==null)return!Ve;for(Ae=Object(Ae);Le--;){var qe=Ee[Le];if(qe[2]?qe[1]!==Ae[qe[0]]:!(qe[0]in Ae))return!1}for(;++Le<Ve;){qe=Ee[Le];var ht=qe[0],ct=Ae[ht],gt=qe[1];if(qe[2]){if(ct===void 0&&!(ht in Ae))return!1}else{var Nt=new Jr,Se;if(!(Se===void 0?Fa(gt,ct,fe,i|o,Nt):Se))return!1}}return!0}function Za(Ae){if(!Fn(Ae)||_n(Ae))return!1;var se=Nn(Ae)||we(Ae)?Ie:R;return se.test(_r(Ae))}function ii(Ae){return zn(Ae)&&Da(Ae.length)&&!!J[ut.call(Ae)]}function T1(Ae){return typeof Ae=="function"?Ae:Ae==null?Ot:typeof Ae=="object"?zr(Ae)?M1(Ae[0],Ae[1]):Si(Ae):pt(Ae)}function Qa(Ae){if(!Vn(Ae))return jt(Ae);var se=[];for(var Ee in Object(Ae))$e.call(Ae,Ee)&&Ee!="constructor"&&se.push(Ee);return se}function Si(Ae){var se=j1(Ae);return se.length==1&&se[0][2]?Xn(se[0][0],se[0][1]):function(Ee){return Ee===Ae||A1(Ee,Ae,se)}}function M1(Ae,se){return sn(Ae)&&r1(se)?Xn(sa(Ae),se):function(Ee){var fe=De(Ee,Ae);return fe===void 0&&fe===se?ze(Ee,Ae):Fa(se,fe,void 0,i|o)}}function E1(Ae){return function(se){return $n(se,Ae)}}function z1(Ae){if(typeof Ae=="string")return Ae;if(Wa(Ae))return $t?$t.call(Ae):"";var se=Ae+"";return se=="0"&&1/Ae==-1/0?"-0":se}function oi(Ae){return zr(Ae)?Ae:Wr(Ae)}function za(Ae,se){return function(Ee,fe){var Le=zr(Ee)?he:Va,Ve={};return Le(Ee,Ae,T1(fe),Ve)}}function e1(Ae,se){return function(Ee,fe){if(Ee==null)return Ee;if(!Ha(Ee))return Ae(Ee,fe);for(var Le=Ee.length,Ve=-1,qe=Object(Ee);++Ve<Le&&fe(qe[Ve],Ve,qe)!==!1;);return Ee}}function Yn(Ae){return function(se,Ee,fe){for(var Le=-1,Ve=Object(se),qe=fe(se),ht=qe.length;ht--;){var ct=qe[++Le];if(Ee(Ve[ct],ct,Ve)===!1)break}return se}}function ln(Ae,se,Ee,fe,Le,Ve){var qe=Le&o,ht=Ae.length,ct=se.length;if(ht!=ct&&!(qe&&ct>ht))return!1;var gt=Ve.get(Ae);if(gt&&Ve.get(se))return gt==se;var Nt=-1,Se=!0,Pe=Le&i?new mn:void 0;for(Ve.set(Ae,se),Ve.set(se,Ae);++Nt<ht;){var We=Ae[Nt],ot=se[Nt];if(fe)var wt=qe?fe(ot,We,Nt,se,Ae,Ve):fe(We,ot,Nt,Ae,se,Ve);if(wt!==void 0){if(wt)continue;Se=!1;break}if(Pe){if(!Oe(se,function(vt,At){if(!Pe.has(At)&&(We===vt||Ee(We,vt,fe,Le,Ve)))return Pe.add(At)})){Se=!1;break}}else if(!(We===ot||Ee(We,ot,fe,Le,Ve))){Se=!1;break}}return Ve.delete(Ae),Ve.delete(se),Se}function t1(Ae,se,Ee,fe,Le,Ve,qe){switch(Ee){case M:if(Ae.byteLength!=se.byteLength||Ae.byteOffset!=se.byteOffset)return!1;Ae=Ae.buffer,se=se.buffer;case A:return!(Ae.byteLength!=se.byteLength||!fe(new Ke(Ae),new Ke(se)));case c:case h:case b:return Xr(+Ae,+se);case d:return Ae.name==se.name&&Ae.message==se.message;case C:case _:return Ae==se+"";case y:var ht=ge;case k:var ct=Ve&o;if(ht||(ht=le),Ae.size!=se.size&&!ct)return!1;var gt=qe.get(Ae);if(gt)return gt==se;Ve|=i,qe.set(Ae,se);var Nt=ln(ht(Ae),ht(se),fe,Le,Ve,qe);return qe.delete(Ae),Nt;case D:if(Rt)return Rt.call(Ae)==Rt.call(se)}return!1}function Na(Ae,se,Ee,fe,Le,Ve){var qe=Le&o,ht=rt(Ae),ct=ht.length,gt=rt(se),Nt=gt.length;if(ct!=Nt&&!qe)return!1;for(var Se=ct;Se--;){var Pe=ht[Se];if(!(qe?Pe in se:$e.call(se,Pe)))return!1}var We=Ve.get(Ae);if(We&&Ve.get(se))return We==se;var ot=!0;Ve.set(Ae,se),Ve.set(se,Ae);for(var wt=qe;++Se<ct;){Pe=ht[Se];var vt=Ae[Pe],At=se[Pe];if(fe)var ar=qe?fe(At,vt,Pe,se,Ae,Ve):fe(vt,At,Pe,Ae,se,Ve);if(!(ar===void 0?vt===At||Ee(vt,At,fe,Le,Ve):ar)){ot=!1;break}wt||(wt=Pe=="constructor")}if(ot&&!wt){var Qt=Ae.constructor,vr=se.constructor;Qt!=vr&&"constructor"in Ae&&"constructor"in se&&!(typeof Qt=="function"&&Qt instanceof Qt&&typeof vr=="function"&&vr instanceof vr)&&(ot=!1)}return Ve.delete(Ae),Ve.delete(se),ot}function Ln(Ae,se){var Ee=Ae.__data__;return Bn(se)?Ee[typeof se=="string"?"string":"hash"]:Ee.map}function j1(Ae){for(var se=rt(Ae),Ee=se.length;Ee--;){var fe=se[Ee],Le=Ae[fe];se[Ee]=[fe,Le,r1(Le)]}return se}function ea(Ae,se){var Ee=xe(Ae,se);return Za(Ee)?Ee:void 0}var Yr=ai;(Tt&&Yr(new Tt(new ArrayBuffer(1)))!=M||St&&Yr(new St)!=y||tt&&Yr(tt.resolve())!=w||Mt&&Yr(new Mt)!=k||Dt&&Yr(new Dt)!=T)&&(Yr=function(Ae){var se=ut.call(Ae),Ee=se==S?Ae.constructor:void 0,fe=Ee?_r(Ee):void 0;if(fe)switch(fe){case Lt:return M;case Et:return y;case Xt:return w;case He:return k;case It:return T}return se});function la(Ae,se,Ee){se=sn(se,Ae)?[se]:oi(se);for(var fe,Le=-1,qe=se.length;++Le<qe;){var Ve=sa(se[Le]);if(!(fe=Ae!=null&&Ee(Ae,Ve)))break;Ae=Ae[Ve]}if(fe)return fe;var qe=Ae?Ae.length:0;return!!qe&&Da(qe)&&ta(Ve,qe)&&(zr(Ae)||Oa(Ae))}function ta(Ae,se){return se=se??l,!!se&&(typeof Ae=="number"||ee.test(Ae))&&Ae>-1&&Ae%1==0&&Ae<se}function sn(Ae,se){if(zr(Ae))return!1;var Ee=typeof Ae;return Ee=="number"||Ee=="symbol"||Ee=="boolean"||Ae==null||Wa(Ae)?!0:W.test(Ae)||!z.test(Ae)||se!=null&&Ae in Object(se)}function Bn(Ae){var se=typeof Ae;return se=="string"||se=="number"||se=="symbol"||se=="boolean"?Ae!=="__proto__":Ae===null}function _n(Ae){return!!be&&be in Ae}function Vn(Ae){var se=Ae&&Ae.constructor,Ee=typeof se=="function"&&se.prototype||pe;return Ae===Ee}function r1(Ae){return Ae===Ae&&!Fn(Ae)}function Xn(Ae,se){return function(Ee){return Ee==null?!1:Ee[Ae]===se&&(se!==void 0||Ae in Object(Ee))}}var Wr=On(function(Ae){Ae=oe(Ae);var se=[];return G.test(Ae)&&se.push(""),Ae.replace(ae,function(Ee,fe,Le,Ve){se.push(Le?Ve.replace(H,"$1"):fe||Ee)}),se});function sa(Ae){if(typeof Ae=="string"||Wa(Ae))return Ae;var se=Ae+"";return se=="0"&&1/Ae==-1/0?"-0":se}function _r(Ae){if(Ae!=null){try{return je.call(Ae)}catch{}try{return Ae+""}catch{}}return""}var ua=za(function(Ae,se,Ee){$e.call(Ae,Ee)?Ae[Ee].push(se):Ae[Ee]=[se]});function On(Ae,se){if(typeof Ae!="function"||se&&typeof se!="function")throw new TypeError(n);var Ee=function(){var fe=arguments,Le=se?se.apply(this,fe):fe[0],Ve=Ee.cache;if(Ve.has(Le))return Ve.get(Le);var qe=Ae.apply(this,fe);return Ee.cache=Ve.set(Le,qe),qe};return Ee.cache=new(On.Cache||Ur),Ee}On.Cache=Ur;function Xr(Ae,se){return Ae===se||Ae!==Ae&&se!==se}function Oa(Ae){return qa(Ae)&&$e.call(Ae,"callee")&&(!et.call(Ae,"callee")||ut.call(Ae)==s)}var zr=Array.isArray;function Ha(Ae){return Ae!=null&&Da(Ae.length)&&!Nn(Ae)}function qa(Ae){return zn(Ae)&&Ha(Ae)}function Nn(Ae){var se=Fn(Ae)?ut.call(Ae):"";return se==m||se==g}function Da(Ae){return typeof Ae=="number"&&Ae>-1&&Ae%1==0&&Ae<=l}function Fn(Ae){var se=typeof Ae;return!!Ae&&(se=="object"||se=="function")}function zn(Ae){return!!Ae&&typeof Ae=="object"}function Wa(Ae){return typeof Ae=="symbol"||zn(Ae)&&ut.call(Ae)==D}var Ia=de?_e(de):ii;function oe(Ae){return Ae==null?"":z1(Ae)}function De(Ae,se,Ee){var fe=Ae==null?void 0:$n(Ae,se);return fe===void 0?Ee:fe}function ze(Ae,se){return Ae!=null&&la(Ae,se,Qn)}function rt(Ae){return Ha(Ae)?oa(Ae):Qa(Ae)}function Ot(Ae){return Ae}function pt(Ae){return sn(Ae)?Ne(sa(Ae)):E1(Ae)}t.exports=ua}(Wl,Wl.exports)),Wl.exports}var Tpe=Ape();const Mpe=_a(Tpe);function Epe(t,e){return t.map(r=>{const n={...r};return n["~id"]=n[e],n})}function jpe(t){const e=[];return t.forEach(r=>{r.forEach(n=>{e.push(n)})}),e}function Lpe(t,e){const r=Mpe(t,"~id"),n=Object.keys(r).map(l=>r[l].reduce((f,c)=>(Object.assign(f,c),f),{})),a=new Set;n.forEach(l=>{Object.keys(l).forEach(s=>{a.add(s)})});const i={};return a.forEach(l=>{i[l]=void 0}),n.map(l=>({...i,...l})).map(l=>({...l,[e]:l["~id"]}))}function Npe(t,e){const r=t.map(a=>Epe(a.data,a.idColumn)),n=jpe(r);return Lpe(n,e||"~id")}function H6(t,e){if(!e)return t;Zo.registerHelper("json",n=>new Zo.SafeString(JSON.stringify(n,null,2)));const r=Zo.compile(e);return JSON.parse(r(t))}async function p4(t,e,r,n,a,i){return new Promise((o,l)=>{eH.parse(t,{download:!0,skipEmptyLines:!0,dynamicTyping:!0,header:i!==!1,delimiter:a||",",complete(s){if(n&&console.log("Data from file:",s.data),r){const f=n2(s.data,r);n&&console.log("Data after transformation of column to array:",f),o(H6(f,e))}else o(H6(s.data,e))},error(s){l(s)}})})}async function Ipe(t,e,r,n,a,i){return new Promise((o,l)=>{eH.parse(t,{skipEmptyLines:!0,header:i!==!1,delimiter:a||",",complete(s){if(n&&console.log("Data from file:",s.data),r){const f=n2(s.data,r);n&&console.log("Data after transformation of column to array:",f),o(H6(f,e))}else o(H6(s.data,e))},error(s){l(s)}})})}async function ka(t,e,r,n){const a=t;try{const i=await fetch(a);if(!i.ok)throw new Error(`Response status: ${i.status}`);const o=await i.json(),l=H6(o,r);if(n&&console.log("Data from file:",o),e){const s=n2(l,e);return n&&console.log("Data after transformation of column to array:",s),s}return l}catch(i){return i}}async function m4(t,e,r,n,a){const i=await fetch(t,{method:"GET",headers:e});if(!i.ok)throw new Error("Network response was not ok");const o=await i.json(),l=H6(o,n);if(a&&(console.log("Data from api:",o),console.log("Data from api after transformation:",l)),r){const s=n2(l,r);return a&&console.log("Data after transformation of column to array:",s),s}return l}async function y7(t,e){const r=await Promise.all(t.map(a=>a.fileType==="json"?ka(a.dataURL,a.columnsToArray,a.dataTransformation,!1):a.fileType==="api"?m4(a.dataURL,a.apiHeaders,a.columnsToArray,a.dataTransformation,!1):p4(a.dataURL,a.dataTransformation,a.columnsToArray,!1,a.delimiter,!0)));return Npe(r.map((a,i)=>({data:a,idColumn:t[i].idColumnName})),e)}var pm,kM;function Ppe(){if(kM)return pm;kM=1;var t=200,e="__lodash_hash_undefined__",r=1/0,n="[object Function]",a="[object GeneratorFunction]",i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=typeof kr=="object"&&kr&&kr.Object===Object&&kr,s=typeof self=="object"&&self&&self.Object===Object&&self,f=l||s||Function("return this")();function c(ye,be){var je=ye?ye.length:0;return!!je&&d(ye,be,0)>-1}function h(ye,be,je,$e){for(var ut=ye.length,Ie=je+-1;++Ie<ut;)if(be(ye[Ie],Ie,ye))return Ie;return-1}function d(ye,be,je){if(be!==be)return h(ye,m,je);for(var $e=je-1,ut=ye.length;++$e<ut;)if(ye[$e]===be)return $e;return-1}function m(ye){return ye!==ye}function g(ye,be){return ye.has(be)}function y(ye,be){return ye==null?void 0:ye[be]}function b(ye){var be=!1;if(ye!=null&&typeof ye.toString!="function")try{be=!!(ye+"")}catch{}return be}function S(ye){var be=-1,je=Array(ye.size);return ye.forEach(function($e){je[++be]=$e}),je}var w=Array.prototype,C=Function.prototype,k=Object.prototype,_=f["__core-js_shared__"],D=function(){var ye=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||"");return ye?"Symbol(src)_1."+ye:""}(),T=C.toString,A=k.hasOwnProperty,M=k.toString,E=RegExp("^"+T.call(A).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=w.splice,Y=_e(f,"Map"),ne=_e(f,"Set"),K=_e(Object,"create");function B(ye){var be=-1,je=ye?ye.length:0;for(this.clear();++be<je;){var $e=ye[be];this.set($e[0],$e[1])}}function j(){this.__data__=K?K(null):{}}function $(ye){return this.has(ye)&&delete this.__data__[ye]}function V(ye){var be=this.__data__;if(K){var je=be[ye];return je===e?void 0:je}return A.call(be,ye)?be[ye]:void 0}function z(ye){var be=this.__data__;return K?be[ye]!==void 0:A.call(be,ye)}function W(ye,be){var je=this.__data__;return je[ye]=K&&be===void 0?e:be,this}B.prototype.clear=j,B.prototype.delete=$,B.prototype.get=V,B.prototype.has=z,B.prototype.set=W;function G(ye){var be=-1,je=ye?ye.length:0;for(this.clear();++be<je;){var $e=ye[be];this.set($e[0],$e[1])}}function ae(){this.__data__=[]}function U(ye){var be=this.__data__,je=de(be,ye);if(je<0)return!1;var $e=be.length-1;return je==$e?be.pop():N.call(be,je,1),!0}function H(ye){var be=this.__data__,je=de(be,ye);return je<0?void 0:be[je][1]}function R(ye){return de(this.__data__,ye)>-1}function ee(ye,be){var je=this.__data__,$e=de(je,ye);return $e<0?je.push([ye,be]):je[$e][1]=be,this}G.prototype.clear=ae,G.prototype.delete=U,G.prototype.get=H,G.prototype.has=R,G.prototype.set=ee;function J(ye){var be=-1,je=ye?ye.length:0;for(this.clear();++be<je;){var $e=ye[be];this.set($e[0],$e[1])}}function Z(){this.__data__={hash:new B,map:new(Y||G),string:new B}}function re(ye){return Te(this,ye).delete(ye)}function te(ye){return Te(this,ye).get(ye)}function F(ye){return Te(this,ye).has(ye)}function q(ye,be){return Te(this,ye).set(ye,be),this}J.prototype.clear=Z,J.prototype.delete=re,J.prototype.get=te,J.prototype.has=F,J.prototype.set=q;function X(ye){var be=-1,je=ye?ye.length:0;for(this.__data__=new J;++be<je;)this.add(ye[be])}function ie(ye){return this.__data__.set(ye,e),this}function ce(ye){return this.__data__.has(ye)}X.prototype.add=X.prototype.push=ie,X.prototype.has=ce;function de(ye,be){for(var je=ye.length;je--;)if(le(ye[je][0],be))return je;return-1}function he(ye){if(!Ce(ye)||we(ye))return!1;var be=ue(ye)||b(ye)?E:o;return be.test(ge(ye))}function Oe(ye,be,je){var $e=-1,ut=c,Ie=ye.length,Ze=!0,Ke=[],et=Ke;if(Ie>=t){var Pt=Ne(ye);if(Pt)return S(Pt);Ze=!1,ut=g,et=new X}else et=Ke;e:for(;++$e<Ie;){var jt=ye[$e],Tt=jt;if(jt=jt!==0?jt:0,Ze&&Tt===Tt){for(var St=et.length;St--;)if(et[St]===Tt)continue e;Ke.push(jt)}else ut(et,Tt,je)||(et!==Ke&&et.push(Tt),Ke.push(jt))}return Ke}var Ne=ne&&1/S(new ne([,-0]))[1]==r?function(ye){return new ne(ye)}:pe;function Te(ye,be){var je=ye.__data__;return xe(be)?je[typeof be=="string"?"string":"hash"]:je.map}function _e(ye,be){var je=y(ye,be);return he(je)?je:void 0}function xe(ye){var be=typeof ye;return be=="string"||be=="number"||be=="symbol"||be=="boolean"?ye!=="__proto__":ye===null}function we(ye){return!!D&&D in ye}function ge(ye){if(ye!=null){try{return T.call(ye)}catch{}try{return ye+""}catch{}}return""}function ve(ye){return ye&&ye.length?Oe(ye):[]}function le(ye,be){return ye===be||ye!==ye&&be!==be}function ue(ye){var be=Ce(ye)?M.call(ye):"";return be==n||be==a}function Ce(ye){var be=typeof ye;return!!ye&&(be=="object"||be=="function")}function pe(){}return pm=ve,pm}var Rpe=Ppe();const $pe=_a(Rpe),Bpe=(t,e)=>{const r=[...t];for(;r.length<e;)r.push(r[r.length-1]);return r};function X3(t,e){const r=Ut(t.filter(i=>i!=null),i=>i);return($pe(r).length<e?Bpe(r,e).slice(1,-1):Zfe(r,e).slice(1,-1)).map(i=>{const o=parseFloat(Sb(".2r")(i));return isNaN(o)?i<-1?Math.round(i):i:i!==0&&Math.abs(i)<1?o:Math.round(o)})}function tH(t){const{data:e,mapData:r,graphTitle:n,colors:a=Qe.light.bivariateColors.colors05x05,sources:i,graphDescription:o,height:l,width:s,footNote:f,xDomain:c,yDomain:h,xColorLegendTitle:d="X Color key",yColorLegendTitle:m="Y Color key",tooltip:g,scale:y=.95,centerPoint:b,padding:S,mapBorderWidth:w=.5,mapNoDataColor:C=Qe.light.graphNoData,backgroundColor:k=!1,mapBorderColor:_=Qe.light.grays["gray-500"],relativeHeight:D,onSeriesMouseOver:T,isWorldMap:A=!0,zoomScaleExtend:M=[.8,6],zoomTranslateExtend:E,graphID:N,showColorScale:Y=!0,highlightedIds:ne=[],onSeriesMouseClick:K,mapProperty:B="ISO3",graphDownload:j=!1,dataDownload:$=!1,showAntarctica:V=!1,language:z="en",minHeight:W=0,theme:G="light",ariaLabel:ae,resetSelectionOnDoubleClick:U=!0,detailsOnClick:H,styles:R,classNames:ee,mapProjection:J}=t,[Z,re]=I.useState(0),[te,F]=I.useState(0),[q,X]=I.useState(void 0),ie=I.useRef(null),ce=I.useRef(null);return I.useEffect(()=>{const de=new ResizeObserver(he=>{re(s||he[0].contentRect.width||760),F(l||he[0].target.clientHeight||480)});return ie.current&&(F(ie.current.clientHeight||480),re(ie.current.clientWidth||760),s||de.observe(ie.current)),()=>de.disconnect()},[s,l]),I.useEffect(()=>{typeof r=="string"?ka(r).then(he=>{X(he)}):X(r||u7)},[r]),c&&h&&(c.length!==a[0].length-1||h.length!==a.length-1)?(console.error("the xDomain and yDomain array length don't match to the color array length"),null):v.jsx("div",{className:`${G||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:z==="he"||z==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${k?k===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${z||"en"}`,ee==null?void 0:ee.graphContainer),style:{...(R==null?void 0:R.graphContainer)||{},...k&&k!==!0?{backgroundColor:k}:{}},id:N,ref:ce,"aria-label":ae||`${n?`The graph shows ${n}. `:""}This is bi-variate choropleth map where geographic areas are colored in proportion to two variables.${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:k?S||"1rem":S||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[n||o||j||$?v.jsx(Zt,{styles:{title:R==null?void 0:R.title,description:R==null?void 0:R.description},classNames:{title:ee==null?void 0:ee.title,description:ee==null?void 0:ee.description},graphTitle:n,graphDescription:o,width:s,graphDownload:j?ce.current:void 0,dataDownload:$?e.map(de=>de.data).filter(de=>de!==void 0).length>0?e.map(de=>de.data).filter(de=>de!==void 0):e.filter(de=>de!==void 0):null}):null,v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:ie,"aria-label":"Map area",children:(s||Z)&&(l||te)&&q?v.jsx(kpe,{data:e,mapData:V?q:{...q,features:q.features.filter(de=>de.properties.NAME!=="Antarctica")},xDomain:c||X3(e.map(de=>de.x),a[0].length),yDomain:h||X3(e.map(de=>de.y),a.length),width:s||Z,height:Math.max(W,l||(D?W?(s||Z)*D>W?(s||Z)*D:W:(s||Z)*D:te)),scale:y,centerPoint:b,colors:a,xColorLegendTitle:d,yColorLegendTitle:m,mapBorderWidth:w,mapNoDataColor:C,mapBorderColor:_,tooltip:g,onSeriesMouseOver:T,isWorldMap:A,zoomScaleExtend:M,zoomTranslateExtend:E,onSeriesMouseClick:K,mapProperty:B,highlightedIds:ne,resetSelectionOnDoubleClick:U,styles:R,showColorScale:Y,classNames:ee,mapProjection:J||(A?"naturalEarth":"mercator"),detailsOnClick:H}):null}),i||f?v.jsx(tr,{styles:{footnote:R==null?void 0:R.footnote,source:R==null?void 0:R.source},classNames:{footnote:ee==null?void 0:ee.footnote,source:ee==null?void 0:ee.source},sources:i,footNote:f,width:s}):null]})})})})}function Vpe(t){const{data:e,colorDomain:r,colors:n,mapData:a,colorLegendTitle:i,categorical:o,height:l,width:s,scale:f,centerPoint:c,tooltip:h,mapBorderWidth:d,mapBorderColor:m,mapNoDataColor:g,onSeriesMouseOver:y,showColorScale:b,zoomScaleExtend:S,zoomTranslateExtend:w,highlightedIds:C,onSeriesMouseClick:k,mapProperty:_,resetSelectionOnDoubleClick:D,detailsOnClick:T,styles:A,classNames:M,mapProjection:E}=t,[N,Y]=I.useState(void 0),[ne,K]=I.useState(!(s<680)),B=I.useRef(null),[j,$]=I.useState(50),[V,z]=I.useState(void 0),[W,G]=I.useState(void 0),[ae,U]=I.useState(void 0),[H,R]=I.useState(void 0),ee=I.useRef(null),J=I.useRef(null),Z=o?Ys().domain(r).range(n):P2().domain(r).range(n);I.useEffect(()=>{const he=Qr(J.current),Oe=Qr(ee.current),Ne=g7().scaleExtent(S).translateExtent(w||[[-20,-20],[s+20,l+20]]).on("zoom",({transform:Te})=>{he.attr("transform",Te)});Oe.call(Ne)},[l,s]);const re=c7(a),te=o9(a),F=re[2]-re[0],q=re[3]-re[1],X=s*190/960*360/F,ie=l*190/678*180/q,ce=f*Math.min(X,ie),de=E==="mercator"?d7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):E==="equalEarth"?h7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):E==="naturalEarth"?p7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):E==="orthographic"?m7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):f7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce);return I.useEffect(()=>{(()=>{if(B.current){const Oe=B.current.getBoundingClientRect().height;$(Oe+16)}})()},[]),v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${s}px`,height:`${l}px`,viewBox:`0 0 ${s} ${l}`,ref:ee,direction:"ltr",children:[v.jsxs("g",{ref:J,children:[a.features.map((he,Oe)=>e.findIndex(Te=>Te.id===he.properties[_])!==-1?null:v.jsx("g",{opacity:N?.3:C.length!==0?C.indexOf(he.properties[_])!==-1?1:.3:1,children:he.geometry.type==="MultiPolygon"?he.geometry.coordinates.map((Te,_e)=>{let xe="";return Te.forEach(we=>{let ge=" M";we.forEach((ve,le)=>{const ue=de([ve[0],ve[1]]);le!==we.length-1?ge=`${ge}${ue[0]} ${ue[1]}L`:ge=`${ge}${ue[0]} ${ue[1]}`}),xe+=ge}),v.jsx("path",{d:xe,style:{stroke:m,strokeWidth:d,fill:g}},_e)}):he.geometry.coordinates.map((Te,_e)=>{let xe="M";return Te.forEach((we,ge)=>{const ve=de([we[0],we[1]]);ge!==Te.length-1?xe=`${xe}${ve[0]} ${ve[1]}L`:xe=`${xe}${ve[0]} ${ve[1]}`}),v.jsx("path",{d:xe,style:{stroke:m,strokeWidth:d,fill:g}},_e)})},Oe)),e.map((he,Oe)=>{const Ne=a.features.findIndex(_e=>he.id===_e.properties[_]),Te=Fe(he.x)?g:Z(he.x);return v.jsx("g",{opacity:N?N===Te?1:.3:C.length!==0?C.indexOf(he.id)!==-1?1:.3:1,onMouseEnter:_e=>{G(he),R(_e.clientY),U(_e.clientX),y&&y(he)},onMouseMove:_e=>{G(he),R(_e.clientY),U(_e.clientX)},onMouseLeave:()=>{G(void 0),U(void 0),R(void 0),y&&y(void 0)},onClick:()=>{(k||T)&&(Sr(V,he)&&D?(z(void 0),k==null||k(void 0)):(z(he),k==null||k(he)))},children:Ne===-1?null:a.features[Ne].geometry.type==="MultiPolygon"?a.features[Ne].geometry.coordinates.map((_e,xe)=>{let we="";return _e.forEach(ge=>{let ve=" M";ge.forEach((le,ue)=>{const Ce=de([le[0],le[1]]);ue!==ge.length-1?ve=`${ve}${Ce[0]} ${Ce[1]}L`:ve=`${ve}${Ce[0]} ${Ce[1]}`}),we+=ve}),v.jsx("path",{d:we,style:{stroke:m,strokeWidth:d,fill:Te}},xe)}):a.features[Ne].geometry.coordinates.map((_e,xe)=>{let we="M";return _e.forEach((ge,ve)=>{const le=de([ge[0],ge[1]]);ve!==_e.length-1?we=`${we}${le[0]} ${le[1]}L`:we=`${we}${le[0]} ${le[1]}`}),v.jsx("path",{d:we,style:{stroke:m,strokeWidth:d,fill:Te}},xe)})},Oe)}),W?a.features.filter(he=>he.properties[_]===W.id).map((he,Oe)=>v.jsx("g",{children:he.geometry.type==="MultiPolygon"?he.geometry.coordinates.map((Ne,Te)=>{let _e="";return Ne.forEach(xe=>{let we=" M";xe.forEach((ge,ve)=>{const le=de([ge[0],ge[1]]);ve!==xe.length-1?we=`${we}${le[0]} ${le[1]}L`:we=`${we}${le[0]} ${le[1]}`}),_e+=we}),v.jsx("path",{d:_e,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},Te)}):he.geometry.coordinates.map((Ne,Te)=>{let _e="M";return Ne.forEach((xe,we)=>{const ge=de([xe[0],xe[1]]);we!==Ne.length-1?_e=`${_e}${ge[0]} ${ge[1]}L`:_e=`${_e}${ge[0]} ${ge[1]}`}),v.jsx("path",{d:_e,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},Te)})},Oe)):null]}),b===!1?null:v.jsx("foreignObject",{x:10,y:ne?l-j-5:l-46,width:ne?o?150:352:101,height:ne?j:36,children:ne?v.jsxs("div",{ref:B,children:[v.jsx("div",{style:{marginBottom:"-0.75rem",marginLeft:o?"126px":"328px",backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"relative"},onClick:()=>{K(!1)},children:v.jsx(n7,{})}),v.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.5",width:o?"138px":"340px"},children:[i&&i!==""?v.jsx(or,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:i}):null,o?v.jsx("div",{className:"flex flex-col gap-3",children:r.map((he,Oe)=>v.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{Y(n[Oe%n.length])},onMouseLeave:()=>{Y(void 0)},children:[v.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:n[Oe%n.length]}}),v.jsx(or,{size:"sm",marginBottom:"none",leading:"none",children:he})]},Oe))}):v.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:v.jsxs("g",{children:[r.map((he,Oe)=>v.jsxs("g",{onMouseOver:()=>{Y(n[Oe])},onMouseLeave:()=>{Y(void 0)},className:"cursor-pointer",children:[v.jsx("rect",{x:Oe*320/n.length+1,y:1,width:320/n.length-2,height:8,className:N===n[Oe]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:n[Oe],...N===n[Oe]?{}:{stroke:n[Oe]}}}),v.jsx("text",{x:(Oe+1)*320/n.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:_t(he,"","")})]},Oe)),v.jsx("g",{children:v.jsx("rect",{onMouseOver:()=>{Y(n[r.length])},onMouseLeave:()=>{Y(void 0)},x:r.length*320/n.length+1,y:1,width:320/n.length-2,height:8,className:`cursor-pointer ${N===n[r.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:n[r.length],...N===n[r.length]?{}:{stroke:n[r.length]}}})})]})})]})]}):v.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{K(!0)},children:v.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})})]}),T?v.jsx(Tr,{open:V!==void 0,onClose:()=>{z(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(T,V)}})}):null,W&&h&&ae&&H?v.jsx(yr,{data:W,body:h,xPos:ae,yPos:H,backgroundStyle:A==null?void 0:A.tooltip,className:M==null?void 0:M.tooltip}):null]})}var mm,_M;function Fpe(){if(_M)return mm;_M=1;var t=1/0,e=9007199254740991,r="[object Arguments]",n="[object Function]",a="[object GeneratorFunction]",i=typeof kr=="object"&&kr&&kr.Object===Object&&kr,o=typeof self=="object"&&self&&self.Object===Object&&self,l=i||o||Function("return this")(),s=Object.prototype,f=s.hasOwnProperty,c=s.toString,h=l.Symbol,d=s.propertyIsEnumerable,m=h?h.isConcatSpreadable:void 0;function g(M,E,N,Y,ne){var K=-1,B=M.length;for(N||(N=y),ne||(ne=[]);++K<B;){var j=M[K];N(j)?g(j,E-1,N,Y,ne):ne[ne.length]=j}return ne}function y(M){return w(M)||S(M)||!!(m&&M&&M[m])}function b(M){var E=M?M.length:0;return E?g(M,t):[]}function S(M){return k(M)&&f.call(M,"callee")&&(!d.call(M,"callee")||c.call(M)==r)}var w=Array.isArray;function C(M){return M!=null&&D(M.length)&&!_(M)}function k(M){return A(M)&&C(M)}function _(M){var E=T(M)?c.call(M):"";return E==n||E==a}function D(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=e}function T(M){var E=typeof M;return!!M&&(E=="object"||E=="function")}function A(M){return!!M&&typeof M=="object"}return mm=b,mm}var zpe=Fpe();const f1=_a(zpe);function J0(t,e){return t.length===0?[]:typeof t[0][e]!="object"?Ut(Bt(t,a=>a[e]),a=>a[e]).map(a=>a[e]):Ut(Bt(f1(t.map(n=>n[e])),n=>n),n=>n)}function rH(t){const{data:e,mapData:r,graphTitle:n,colors:a,sources:i,graphDescription:o,height:l,width:s,footNote:f,colorDomain:c,colorLegendTitle:h,categorical:d=!1,scale:m=.95,centerPoint:g,padding:y,mapBorderWidth:b=.5,mapNoDataColor:S=Qe.light.graphNoData,backgroundColor:w=!1,mapBorderColor:C=Qe.light.grays["gray-500"],relativeHeight:k,tooltip:_,onSeriesMouseOver:D,isWorldMap:T=!0,showColorScale:A=!0,zoomScaleExtend:M=[.8,6],zoomTranslateExtend:E,graphID:N,highlightedIds:Y=[],onSeriesMouseClick:ne,mapProperty:K="ISO3",graphDownload:B=!1,dataDownload:j=!1,showAntarctica:$=!1,language:V="en",minHeight:z=0,theme:W="light",ariaLabel:G,resetSelectionOnDoubleClick:ae=!0,detailsOnClick:U,styles:H,classNames:R,mapProjection:ee}=t,[J,Z]=I.useState(0),[re,te]=I.useState(0),[F,q]=I.useState(void 0),X=I.useRef(null),ie=I.useRef(null);I.useEffect(()=>{const de=new ResizeObserver(he=>{Z(s||he[0].target.clientWidth||760),te(l||he[0].target.clientHeight||480)});return X.current&&(te(X.current.clientHeight||480),Z(X.current.clientWidth||760),s||de.observe(X.current)),()=>de.disconnect()},[s,l]),I.useEffect(()=>{typeof r=="string"?ka(r).then(he=>{q(he)}):q(r||u7)},[r]);const ce=c||(d?J0(e,"x"):X3(e.map(de=>de.x),(a==null?void 0:a.length)||4));return v.jsx("div",{className:`${W||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:V==="he"||V==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${w?w===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${V||"en"}`,R==null?void 0:R.graphContainer),style:{...(H==null?void 0:H.graphContainer)||{},...w&&w!==!0?{backgroundColor:w}:{}},id:N,ref:ie,"aria-label":G||`${n?`The graph shows ${n}. `:""}This is a choropleth map where geographic areas are colored in proportion to a specific variable.${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:w?y||"1rem":y||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[n||o||B||j?v.jsx(Zt,{styles:{title:H==null?void 0:H.title,description:H==null?void 0:H.description},classNames:{title:R==null?void 0:R.title,description:R==null?void 0:R.description},graphTitle:n,graphDescription:o,width:s,graphDownload:B?ie.current:void 0,dataDownload:j?e.map(de=>de.data).filter(de=>de!==void 0).length>0?e.map(de=>de.data).filter(de=>de!==void 0):e.filter(de=>de!==void 0):null}):null,v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:X,"aria-label":"Map area",children:(s||J)&&(l||re)&&F?v.jsx(Vpe,{data:e,mapData:$?F:{...F,features:F.features.filter(de=>de.properties.NAME!=="Antarctica")},colorDomain:ce,width:s||J,height:Math.max(z,l||(k?z?(s||J)*k>z?(s||J)*k:z:(s||J)*k:re)),scale:m,centerPoint:g,colors:a||(d?Qe[W].sequentialColors[`neutralColorsx0${ce.length}`]:Qe[W].sequentialColors[`neutralColorsx0${ce.length+1}`]),colorLegendTitle:h,mapBorderWidth:b,mapNoDataColor:S,categorical:d,mapBorderColor:C,tooltip:_,onSeriesMouseOver:D,isWorldMap:T,showColorScale:A,zoomScaleExtend:M,zoomTranslateExtend:E,onSeriesMouseClick:ne,mapProperty:K,highlightedIds:Y,resetSelectionOnDoubleClick:ae,styles:H,classNames:R,detailsOnClick:U,mapProjection:ee||(T?"naturalEarth":"mercator")}):null}),i||f?v.jsx(tr,{styles:{footnote:H==null?void 0:H.footnote,source:H==null?void 0:H.source},classNames:{footnote:R==null?void 0:R.footnote,source:R==null?void 0:R.source},sources:i,footNote:f,width:s}):null]})})})})}function Hpe(t){var he;const{data:e,colors:r,mapData:n,colorLegendTitle:a,colorDomain:i,radius:o,height:l,width:s,scale:f,centerPoint:c,tooltip:h,showLabels:d,mapBorderWidth:m,mapBorderColor:g,mapNoDataColor:y,onSeriesMouseOver:b,showColorScale:S,zoomScaleExtend:w,zoomTranslateExtend:C,highlightedDataPoints:k,onSeriesMouseClick:_,resetSelectionOnDoubleClick:D,detailsOnClick:T,styles:A,classNames:M,mapProjection:E}=t,[N,Y]=I.useState(void 0),[ne,K]=I.useState(!(s<680)),B=I.useRef(null),[j,$]=I.useState(50),[V,z]=I.useState(void 0),[W,G]=I.useState(void 0),[ae,U]=I.useState(void 0),[H,R]=I.useState(void 0),ee=I.useRef(null),J=I.useRef(null),Z=e.filter(Oe=>Oe.radius===void 0).length!==e.length?l4().domain([0,(he=Vr(e,"radius"))==null?void 0:he.radius]).range([.25,o]).nice():void 0;I.useEffect(()=>{const Oe=Qr(J.current),Ne=Qr(ee.current),Te=g7().scaleExtent(w).translateExtent(C||[[-20,-20],[s+20,l+20]]).on("zoom",({transform:_e})=>{Oe.attr("transform",_e)});Ne.call(Te)},[l,s]);const re=c7(n),te=o9(n),F=re[2]-re[0],q=re[3]-re[1],X=s*190/960*360/F,ie=l*190/678*180/q,ce=f*Math.min(X,ie),de=E==="mercator"?d7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):E==="equalEarth"?h7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):E==="naturalEarth"?p7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):E==="orthographic"?m7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):f7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce);return I.useEffect(()=>{(()=>{if(B.current){const Ne=B.current.getBoundingClientRect().height;$(Ne+16)}})()},[]),v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${s}px`,height:`${l}px`,viewBox:`0 0 ${s} ${l}`,ref:ee,direction:"ltr",children:[v.jsxs("g",{ref:J,children:[n.features.map((Oe,Ne)=>v.jsx("g",{children:Oe.geometry.type==="MultiPolygon"?Oe.geometry.coordinates.map((Te,_e)=>{let xe="";return Te.forEach(we=>{let ge=" M";we.forEach((ve,le)=>{const ue=de([ve[0],ve[1]]);le!==we.length-1?ge=`${ge}${ue[0]} ${ue[1]}L`:ge=`${ge}${ue[0]} ${ue[1]}`}),xe+=ge}),v.jsx("path",{d:xe,style:{stroke:g,strokeWidth:m,fill:y}},_e)}):Oe.geometry.coordinates.map((Te,_e)=>{let xe="M";return Te.forEach((we,ge)=>{const ve=de([we[0],we[1]]);ge!==Te.length-1?xe=`${xe}${ve[0]} ${ve[1]}L`:xe=`${xe}${ve[0]} ${ve[1]}`}),v.jsx("path",{d:xe,style:{stroke:g,strokeWidth:m,fill:y}},_e)})},Ne)),e.map((Oe,Ne)=>{const Te=e.filter(_e=>_e.color).length===0?r[0]:Oe.color?r[i.indexOf(`${Oe.color}`)]:Qe.gray;return v.jsxs("g",{opacity:N?N===Te?1:.3:k.length!==0?k.indexOf(Oe.data.id)!==-1?1:.3:1,onMouseEnter:_e=>{G(Oe),R(_e.clientY),U(_e.clientX),b&&b(Oe)},onMouseMove:_e=>{G(Oe),R(_e.clientY),U(_e.clientX)},onMouseLeave:()=>{G(void 0),U(void 0),R(void 0),b&&b(void 0)},onClick:()=>{(_||T)&&(Sr(V,Oe)&&D?(z(void 0),_==null||_(void 0)):(z(Oe),_==null||_(Oe)))},transform:`translate(${de([Oe.long,Oe.lat])[0]},${de([Oe.long,Oe.lat])[1]})`,children:[v.jsx("circle",{cx:0,cy:0,r:Z?Z(Oe.radius||0):o,style:{fill:e.filter(_e=>_e.color).length===0?r[0]:Oe.color?r[i.indexOf(`${Oe.color}`)]:Qe.gray,stroke:e.filter(_e=>_e.color).length===0?r[0]:Oe.color?r[i.indexOf(`${Oe.color}`)]:Qe.gray,fillOpacity:.8}}),d&&Oe.label?v.jsx("text",{x:Z?Z(Oe.radius||0):o,y:0,className:"fill-primary-gray-600 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"start"},dx:4,dy:5,children:Oe.label}):null]},Ne)})]}),v.jsx("foreignObject",{x:10,y:ne?l-j-5:l-46,width:ne?150:101,height:ne?j:36,children:e.filter(Oe=>Oe.color).length===0||S===!1?null:ne?v.jsxs("div",{ref:B,children:[v.jsx("div",{style:{marginBottom:"-0.75rem",marginLeft:"126px",backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"relative"},onClick:()=>{K(!1)},children:v.jsx(n7,{})}),v.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.5",width:"138px"},children:[a&&a!==""?v.jsx("p",{className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:a}):null,v.jsx("div",{className:"flex flex-col gap-3",children:i.map((Oe,Ne)=>v.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{Y(r[Ne%r.length])},onMouseLeave:()=>{Y(void 0)},children:[v.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[Ne%r.length]}}),v.jsx(or,{size:"sm",marginBottom:"none",leading:"none",children:Oe})]},Ne))})]})]}):v.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{K(!0)},children:v.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})})]}),T?v.jsx(Tr,{open:V!==void 0,onClose:()=>{z(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(T,V)}})}):null,W&&h&&ae&&H?v.jsx(yr,{data:W,body:h,xPos:ae,yPos:H,backgroundStyle:A==null?void 0:A.tooltip,className:M==null?void 0:M.tooltip}):null]})}function nH(t){const{data:e,mapData:r,graphTitle:n,colors:a,sources:i,graphDescription:o,height:l,width:s,footNote:f,colorLegendTitle:c,colorDomain:h,radius:d=5,scale:m=.95,centerPoint:g,padding:y,mapBorderWidth:b=.5,mapNoDataColor:S=Qe.light.graphNoData,backgroundColor:w=!1,showLabels:C=!1,mapBorderColor:k=Qe.light.grays["gray-500"],tooltip:_,relativeHeight:D,onSeriesMouseOver:T,isWorldMap:A=!0,showColorScale:M=!0,zoomScaleExtend:E=[.8,6],zoomTranslateExtend:N,graphID:Y,highlightedDataPoints:ne=[],onSeriesMouseClick:K,graphDownload:B=!1,dataDownload:j=!1,showAntarctica:$=!1,language:V="en",minHeight:z=0,theme:W="light",ariaLabel:G,resetSelectionOnDoubleClick:ae=!0,detailsOnClick:U,styles:H,classNames:R,mapProjection:ee}=t,[J,Z]=I.useState(0),[re,te]=I.useState(0),[F,q]=I.useState(void 0),X=I.useRef(null),ie=I.useRef(null);return I.useEffect(()=>{const ce=new ResizeObserver(de=>{Z(s||de[0].target.clientWidth||760),te(l||de[0].target.clientHeight||480)});return X.current&&(te(X.current.clientHeight||480),Z(X.current.clientWidth||760),s||ce.observe(X.current)),()=>ce.disconnect()},[s,l]),I.useEffect(()=>{typeof r=="string"?ka(r).then(de=>{q(de)}):q(r||u7)},[r]),v.jsx("div",{className:`${W||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:V==="he"||V==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${w?w===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${V||"en"}`,R==null?void 0:R.graphContainer),style:{...(H==null?void 0:H.graphContainer)||{},...w&&w!==!0?{backgroundColor:w}:{}},id:Y,ref:ie,"aria-label":G||`${n?`The graph shows ${n}. `:""}This is a dot density map showing the distribution of a variable across a region or world, with each dot representing a data point.${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:w?y||"1rem":y||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[n||o||B||j?v.jsx(Zt,{styles:{title:H==null?void 0:H.title,description:H==null?void 0:H.description},classNames:{title:R==null?void 0:R.title,description:R==null?void 0:R.description},graphTitle:n,graphDescription:o,width:s,graphDownload:B?ie.current:void 0,dataDownload:j?e.map(ce=>ce.data).filter(ce=>ce!==void 0).length>0?e.map(ce=>ce.data).filter(ce=>ce!==void 0):e.filter(ce=>ce!==void 0):null}):null,v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:X,"aria-label":"Map area",children:(s||J)&&(l||re)&&F?v.jsx(Hpe,{data:e,mapData:$?F:{...F,features:F.features.filter(ce=>ce.properties.NAME!=="Antarctica")},colorDomain:e.filter(ce=>ce.color).length===0?[]:h||Bt(e.filter(ce=>!Fe(ce.color)),"color").map(ce=>`${ce.color}`),width:s||J,height:Math.max(z,l||(D?z?(s||J)*D>z?(s||J)*D:z:(s||J)*D:re)),scale:m,centerPoint:g,colors:e.filter(ce=>ce.color).length===0?a?[a]:[Qe.primaryColors["blue-600"]]:a||Qe[W].categoricalColors.colors,colorLegendTitle:c,radius:d,mapBorderWidth:b,mapNoDataColor:S,mapBorderColor:k,tooltip:_,onSeriesMouseOver:T,showLabels:C,isWorldMap:A,showColorScale:M,zoomScaleExtend:E,zoomTranslateExtend:N,onSeriesMouseClick:K,highlightedDataPoints:ne,resetSelectionOnDoubleClick:ae,styles:H,classNames:R,detailsOnClick:U,mapProjection:ee||(A?"naturalEarth":"mercator")}):null}),i||f?v.jsx(tr,{styles:{footnote:H==null?void 0:H.footnote,source:H==null?void 0:H.source},classNames:{footnote:R==null?void 0:R.footnote,source:R==null?void 0:R.source},sources:i,footNote:f,width:s}):null]})})})})}var Ii=Uint8Array,y6=Uint16Array,qpe=Int32Array,aH=new Ii([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),iH=new Ii([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Wpe=new Ii([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),oH=function(t,e){for(var r=new y6(31),n=0;n<31;++n)r[n]=e+=1<<t[n-1];for(var a=new qpe(r[30]),n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)a[i]=i-r[n]<<5|n;return{b:r,r:a}},lH=oH(aH,2),sH=lH.b,Upe=lH.r;sH[28]=258,Upe[258]=28;var Gpe=oH(iH,0),Ype=Gpe.b,Gy=new y6(32768);for(var Jn=0;Jn<32768;++Jn){var D2=(Jn&43690)>>1|(Jn&21845)<<1;D2=(D2&52428)>>2|(D2&13107)<<2,D2=(D2&61680)>>4|(D2&3855)<<4,Gy[Jn]=((D2&65280)>>8|(D2&255)<<8)>>1}var as=function(t,e,r){for(var n=t.length,a=0,i=new y6(e);a<n;++a)t[a]&&++i[t[a]-1];var o=new y6(e);for(a=1;a<e;++a)o[a]=o[a-1]+i[a-1]<<1;var l;if(r){l=new y6(1<<e);var s=15-e;for(a=0;a<n;++a)if(t[a])for(var f=a<<4|t[a],c=e-t[a],h=o[t[a]-1]++<<c,d=h|(1<<c)-1;h<=d;++h)l[Gy[h]>>s]=f}else for(l=new y6(n),a=0;a<n;++a)t[a]&&(l[a]=Gy[o[t[a]-1]++]>>15-t[a]);return l},l9=new Ii(288);for(var Jn=0;Jn<144;++Jn)l9[Jn]=8;for(var Jn=144;Jn<256;++Jn)l9[Jn]=9;for(var Jn=256;Jn<280;++Jn)l9[Jn]=7;for(var Jn=280;Jn<288;++Jn)l9[Jn]=8;var uH=new Ii(32);for(var Jn=0;Jn<32;++Jn)uH[Jn]=5;var Xpe=as(l9,9,1),Kpe=as(uH,5,1),gm=function(t){for(var e=t[0],r=1;r<t.length;++r)t[r]>e&&(e=t[r]);return e},Co=function(t,e,r){var n=e/8|0;return(t[n]|t[n+1]<<8)>>(e&7)&r},ym=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(e&7)},Jpe=function(t){return(t+7)/8|0},Zpe=function(t,e,r){return(r==null||r>t.length)&&(r=t.length),new Ii(t.subarray(e,r))},Qpe=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Li=function(t,e,r){var n=new Error(e||Qpe[t]);if(n.code=t,Error.captureStackTrace&&Error.captureStackTrace(n,Li),!r)throw n;return n},Qx=function(t,e,r,n){var a=t.length,i=0;if(!a||e.f&&!e.l)return r||new Ii(0);var o=!r,l=o||e.i!=2,s=e.i;o&&(r=new Ii(a*3));var f=function(F){var q=r.length;if(F>q){var X=new Ii(Math.max(q*2,F));X.set(r),r=X}},c=e.f||0,h=e.p||0,d=e.b||0,m=e.l,g=e.d,y=e.m,b=e.n,S=a*8;do{if(!m){c=Co(t,h,1);var w=Co(t,h+1,3);if(h+=3,w)if(w==1)m=Xpe,g=Kpe,y=9,b=5;else if(w==2){var D=Co(t,h,31)+257,T=Co(t,h+10,15)+4,A=D+Co(t,h+5,31)+1;h+=14;for(var M=new Ii(A),E=new Ii(19),N=0;N<T;++N)E[Wpe[N]]=Co(t,h+N*3,7);h+=T*3;for(var Y=gm(E),ne=(1<<Y)-1,K=as(E,Y,1),N=0;N<A;){var B=K[Co(t,h,ne)];h+=B&15;var C=B>>4;if(C<16)M[N++]=C;else{var j=0,$=0;for(C==16?($=3+Co(t,h,3),h+=2,j=M[N-1]):C==17?($=3+Co(t,h,7),h+=3):C==18&&($=11+Co(t,h,127),h+=7);$--;)M[N++]=j}}var V=M.subarray(0,D),z=M.subarray(D);y=gm(V),b=gm(z),m=as(V,y,1),g=as(z,b,1)}else Li(1);else{var C=Jpe(h)+4,k=t[C-4]|t[C-3]<<8,_=C+k;if(_>a){s&&Li(0);break}l&&f(d+k),r.set(t.subarray(C,_),d),e.b=d+=k,e.p=h=_*8,e.f=c;continue}if(h>S){s&&Li(0);break}}l&&f(d+131072);for(var W=(1<<y)-1,G=(1<<b)-1,ae=h;;ae=h){var j=m[ym(t,h)&W],U=j>>4;if(h+=j&15,h>S){s&&Li(0);break}if(j||Li(2),U<256)r[d++]=U;else if(U==256){ae=h,m=null;break}else{var H=U-254;if(U>264){var N=U-257,R=aH[N];H=Co(t,h,(1<<R)-1)+sH[N],h+=R}var ee=g[ym(t,h)&G],J=ee>>4;ee||Li(3),h+=ee&15;var z=Ype[J];if(J>3){var R=iH[J];z+=ym(t,h)&(1<<R)-1,h+=R}if(h>S){s&&Li(0);break}l&&f(d+131072);var Z=d+H;if(d<z){var re=i-z,te=Math.min(z,Z);for(re+d<0&&Li(3);d<te;++d)r[d]=n[re+d]}for(;d<Z;++d)r[d]=r[d-z]}}e.l=m,e.p=ae,e.b=d,e.f=c,m&&(c=1,e.m=y,e.d=g,e.n=b)}while(!c);return d!=r.length&&o?Zpe(r,0,d):r.subarray(0,d)},eme=new Ii(0),tme=function(t){(t[0]!=31||t[1]!=139||t[2]!=8)&&Li(6,"invalid gzip data");var e=t[3],r=10;e&4&&(r+=(t[10]|t[11]<<8)+2);for(var n=(e>>3&1)+(e>>4&1);n>0;n-=!t[r++]);return r+(e&2)},rme=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},nme=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&Li(6,"invalid zlib data"),(t[1]>>5&1)==1&&Li(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function ame(t,e){return Qx(t,{i:2},e,e)}function ime(t,e){var r=tme(t);return r+8>t.length&&Li(6,"invalid gzip data"),Qx(t.subarray(r,-8),{i:2},new Ii(rme(t)),e)}function ome(t,e){return Qx(t.subarray(nme(t),-4),{i:2},e,e)}function lme(t,e){return t[0]==31&&t[1]==139&&t[2]==8?ime(t,e):(t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?ame(t,e):ome(t,e)}var sme=typeof TextDecoder<"u"&&new TextDecoder,ume=0;try{sme.decode(eme,{stream:!0}),ume=1}catch{}var cme=Object.defineProperty,is=Math.pow,En=(t,e)=>cme(t,"name",{value:e,configurable:!0}),u1=(t,e,r)=>new Promise((n,a)=>{var i=s=>{try{l(r.next(s))}catch(f){a(f)}},o=s=>{try{l(r.throw(s))}catch(f){a(f)}},l=s=>s.done?n(s.value):Promise.resolve(s.value).then(i,o);l((r=r.apply(t,e)).next())});En((t,e)=>{let r=!1,n="",a=L.GridLayer.extend({createTile:En((i,o)=>{let l=document.createElement("img"),s=new AbortController,f=s.signal;return l.cancel=()=>{s.abort()},r||(t.getHeader().then(c=>{c.tileType===1?console.error("Error: archive contains MVT vector tiles, but leafletRasterLayer is for displaying raster tiles. See https://github.com/protomaps/PMTiles/tree/main/js for details."):c.tileType===2?n="image/png":c.tileType===3?n="image/jpeg":c.tileType===4?n="image/webp":c.tileType===5&&(n="image/avif")}),r=!0),t.getZxy(i.z,i.x,i.y,f).then(c=>{if(c){let h=new Blob([c.data],{type:n}),d=window.URL.createObjectURL(h);l.src=d,l.cancel=void 0,o(void 0,l)}}).catch(c=>{if(c.name!=="AbortError")throw c}),l},"createTile"),_removeTile:En(function(i){let o=this._tiles[i];o&&(o.el.cancel&&o.el.cancel(),o.el.width=0,o.el.height=0,o.el.deleted=!0,L.DomUtil.remove(o.el),delete this._tiles[i],this.fire("tileunload",{tile:o.el,coords:this._keyToTileCoords(i)}))},"_removeTile")});return new a(e)},"leafletRasterLayer");var fme=En(t=>(e,r)=>{if(r instanceof AbortController)return t(e,r);let n=new AbortController;return t(e,n).then(a=>r(void 0,a.data,a.cacheControl||"",a.expires||""),a=>r(a)).catch(a=>r(a)),{cancel:En(()=>n.abort(),"cancel")}},"v3compat"),cH=class{constructor(e){this.tilev4=En((r,n)=>u1(this,null,function*(){if(r.type==="json"){let m=r.url.substr(10),g=this.tiles.get(m);if(g||(g=new OM(m),this.tiles.set(m,g)),this.metadata)return{data:yield g.getTileJson(r.url)};let y=yield g.getHeader();return(y.minLon>=y.maxLon||y.minLat>=y.maxLat)&&console.error(`Bounds of PMTiles archive ${y.minLon},${y.minLat},${y.maxLon},${y.maxLat} are not valid.`),{data:{tiles:[`${r.url}/{z}/{x}/{y}`],minzoom:y.minZoom,maxzoom:y.maxZoom,bounds:[y.minLon,y.minLat,y.maxLon,y.maxLat]}}}let a=new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/),i=r.url.match(a);if(!i)throw new Error("Invalid PMTiles protocol URL");let o=i[1],l=this.tiles.get(o);l||(l=new OM(o),this.tiles.set(o,l));let s=i[2],f=i[3],c=i[4],h=yield l.getHeader(),d=yield l==null?void 0:l.getZxy(+s,+f,+c,n.signal);if(d)return{data:new Uint8Array(d.data),cacheControl:d.cacheControl,expires:d.expires};if(h.tileType===1){if(this.errorOnMissingTile)throw new Error("Tile not found.");return{data:new Uint8Array}}return{data:null}}),"tilev4"),this.tile=fme(this.tilev4),this.tiles=new Map,this.metadata=(e==null?void 0:e.metadata)||!1,this.errorOnMissingTile=(e==null?void 0:e.errorOnMissingTile)||!1}add(e){this.tiles.set(e.source.getKey(),e)}get(e){return this.tiles.get(e)}};En(cH,"Protocol");var Rf=cH;function fH(t,e){return(e>>>0)*4294967296+(t>>>0)}En(fH,"toNum");function dH(t,e){let r=e.buf,n=r[e.pos++],a=(n&112)>>4;if(n<128||(n=r[e.pos++],a|=(n&127)<<3,n<128)||(n=r[e.pos++],a|=(n&127)<<10,n<128)||(n=r[e.pos++],a|=(n&127)<<17,n<128)||(n=r[e.pos++],a|=(n&127)<<24,n<128)||(n=r[e.pos++],a|=(n&1)<<31,n<128))return fH(t,a);throw new Error("Expected varint not more than 10 bytes")}En(dH,"readVarintRemainder");function l6(t){let e=t.buf,r=e[t.pos++],n=r&127;return r<128||(r=e[t.pos++],n|=(r&127)<<7,r<128)||(r=e[t.pos++],n|=(r&127)<<14,r<128)||(r=e[t.pos++],n|=(r&127)<<21,r<128)?n:(r=e[t.pos],n|=(r&15)<<28,dH(n,t))}En(l6,"readVarint");function ew(t,e,r,n){if(n===0){r===1&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);let a=e[0];e[0]=e[1],e[1]=a}}En(ew,"rotate");function hH(t,e){let r=is(2,t),n=e,a=e,i=e,o=[0,0],l=1;for(;l<r;)n=1&i/2,a=1&(i^n),ew(l,o,n,a),o[0]+=l*n,o[1]+=l*a,i=i/4,l*=2;return[t,o[0],o[1]]}En(hH,"idOnLevel");var dme=[0,1,5,21,85,341,1365,5461,21845,87381,349525,1398101,5592405,22369621,89478485,357913941,1431655765,5726623061,22906492245,91625968981,366503875925,1466015503701,5864062014805,23456248059221,93824992236885,375299968947541,0x5555555555555];function pH(t,e,r){if(t>26)throw new Error("Tile zoom level exceeds max safe number limit (26)");if(e>is(2,t)-1||r>is(2,t)-1)throw new Error("tile x/y outside zoom level bounds");let n=dme[t],a=is(2,t),i=0,o=0,l=0,s=[e,r],f=a/2;for(;f>0;)i=(s[0]&f)>0?1:0,o=(s[1]&f)>0?1:0,l+=f*f*(3*i^o),ew(f,s,i,o),f=f/2;return n+l}En(pH,"zxyToTileId");function hme(t){let e=0;for(let r=0;r<27;r++){let n=(1<<r)*(1<<r);if(e+n>t)return hH(r,t-e);e+=n}throw new Error("Tile zoom level exceeds max safe number limit (26)")}En(hme,"tileIdToZxy");var pme=(t=>(t[t.Unknown=0]="Unknown",t[t.None=1]="None",t[t.Gzip=2]="Gzip",t[t.Brotli=3]="Brotli",t[t.Zstd=4]="Zstd",t))(pme||{});function $f(t,e){return u1(this,null,function*(){if(e===1||e===0)return t;if(e===2){if(typeof globalThis.DecompressionStream>"u")return lme(new Uint8Array(t));let r=new Response(t).body;if(!r)throw new Error("Failed to read response stream");let n=r.pipeThrough(new globalThis.DecompressionStream("gzip"));return new Response(n).arrayBuffer()}throw new Error("Compression method not supported")})}En($f,"defaultDecompress");var mme=(t=>(t[t.Unknown=0]="Unknown",t[t.Mvt=1]="Mvt",t[t.Png=2]="Png",t[t.Jpeg=3]="Jpeg",t[t.Webp=4]="Webp",t[t.Avif=5]="Avif",t))(mme||{});function mH(t){return t===1?".mvt":t===2?".png":t===3?".jpg":t===4?".webp":t===5?".avif":""}En(mH,"tileTypeExt");var gme=127;function gH(t,e){let r=0,n=t.length-1;for(;r<=n;){let a=n+r>>1,i=e-t[a].tileId;if(i>0)r=a+1;else if(i<0)n=a-1;else return t[a]}return n>=0&&(t[n].runLength===0||e-t[n].tileId<t[n].runLength)?t[n]:null}En(gH,"findTile");var yme=class{constructor(e){this.file=e}getKey(){return this.file.name}getBytes(e,r){return u1(this,null,function*(){return{data:yield this.file.slice(e,e+r).arrayBuffer()}})}};En(yme,"FileSource");var yH=class{constructor(e,r=new Headers){this.url=e,this.customHeaders=r,this.mustReload=!1;let n="";"navigator"in globalThis&&(n=globalThis.navigator.userAgent||"");let a=n.indexOf("Windows")>-1,i=/Chrome|Chromium|Edg|OPR|Brave/.test(n);this.chromeWindowsNoCache=!1,a&&i&&(this.chromeWindowsNoCache=!0)}getKey(){return this.url}setHeaders(e){this.customHeaders=e}getBytes(e,r,n,a){return u1(this,null,function*(){let i,o;n?o=n:(i=new AbortController,o=i.signal);let l=new Headers(this.customHeaders);l.set("range",`bytes=${e}-${e+r-1}`);let s;this.mustReload?s="reload":this.chromeWindowsNoCache&&(s="no-store");let f=yield fetch(this.url,{signal:o,cache:s,headers:l});if(e===0&&f.status===416){let d=f.headers.get("Content-Range");if(!d||!d.startsWith("bytes */"))throw new Error("Missing content-length on 416 response");let m=+d.substr(8);f=yield fetch(this.url,{signal:o,cache:"reload",headers:{range:`bytes=0-${m-1}`}})}let c=f.headers.get("Etag");if(c!=null&&c.startsWith("W/")&&(c=null),f.status===416||a&&c&&c!==a)throw this.mustReload=!0,new Yy(`Server returned non-matching ETag ${a} after one retry. Check browser extensions and servers for issues that may affect correct ETag headers.`);if(f.status>=300)throw new Error(`Bad response code: ${f.status}`);let h=f.headers.get("Content-Length");if(f.status===200&&(!h||+h>r))throw i&&i.abort(),new Error("Server returned no content-length header or content-length exceeding request. Check that your storage backend supports HTTP Byte Serving.");return{data:yield f.arrayBuffer(),etag:c||void 0,cacheControl:f.headers.get("Cache-Control")||void 0,expires:f.headers.get("Expires")||void 0}})}};En(yH,"FetchSource");var vme=yH;function ro(t,e){let r=t.getUint32(e+4,!0),n=t.getUint32(e+0,!0);return r*is(2,32)+n}En(ro,"getUint64");function vH(t,e){let r=new DataView(t),n=r.getUint8(7);if(n>3)throw new Error(`Archive is spec version ${n} but this library supports up to spec version 3`);return{specVersion:n,rootDirectoryOffset:ro(r,8),rootDirectoryLength:ro(r,16),jsonMetadataOffset:ro(r,24),jsonMetadataLength:ro(r,32),leafDirectoryOffset:ro(r,40),leafDirectoryLength:ro(r,48),tileDataOffset:ro(r,56),tileDataLength:ro(r,64),numAddressedTiles:ro(r,72),numTileEntries:ro(r,80),numTileContents:ro(r,88),clustered:r.getUint8(96)===1,internalCompression:r.getUint8(97),tileCompression:r.getUint8(98),tileType:r.getUint8(99),minZoom:r.getUint8(100),maxZoom:r.getUint8(101),minLon:r.getInt32(102,!0)/1e7,minLat:r.getInt32(106,!0)/1e7,maxLon:r.getInt32(110,!0)/1e7,maxLat:r.getInt32(114,!0)/1e7,centerZoom:r.getUint8(118),centerLon:r.getInt32(119,!0)/1e7,centerLat:r.getInt32(123,!0)/1e7,etag:e}}En(vH,"bytesToHeader");function tw(t){let e={buf:new Uint8Array(t),pos:0},r=l6(e),n=[],a=0;for(let i=0;i<r;i++){let o=l6(e);n.push({tileId:a+o,offset:0,length:0,runLength:1}),a+=o}for(let i=0;i<r;i++)n[i].runLength=l6(e);for(let i=0;i<r;i++)n[i].length=l6(e);for(let i=0;i<r;i++){let o=l6(e);o===0&&i>0?n[i].offset=n[i-1].offset+n[i-1].length:n[i].offset=o-1}return n}En(tw,"deserializeIndex");var bH=class extends Error{};En(bH,"EtagMismatch");var Yy=bH;function rw(t,e){return u1(this,null,function*(){let r=yield t.getBytes(0,16384);if(new DataView(r.data).getUint16(0,!0)!==19792)throw new Error("Wrong magic number for PMTiles archive");let n=r.data.slice(0,gme),a=vH(n,r.etag),i=r.data.slice(a.rootDirectoryOffset,a.rootDirectoryOffset+a.rootDirectoryLength),o=`${t.getKey()}|${a.etag||""}|${a.rootDirectoryOffset}|${a.rootDirectoryLength}`,l=tw(yield e(i,a.internalCompression));return[a,[o,l.length,l]]})}En(rw,"getHeaderAndRoot");function nw(t,e,r,n,a){return u1(this,null,function*(){let i=yield t.getBytes(r,n,void 0,a.etag),o=yield e(i.data,a.internalCompression),l=tw(o);if(l.length===0)throw new Error("Empty directory is invalid");return l})}En(nw,"getDirectory");var bme=class{constructor(e=100,r=!0,n=$f){this.cache=new Map,this.maxCacheEntries=e,this.counter=1,this.decompress=n}getHeader(e){return u1(this,null,function*(){let r=e.getKey(),n=this.cache.get(r);if(n)return n.lastUsed=this.counter++,n.data;let a=yield rw(e,this.decompress);return a[1]&&this.cache.set(a[1][0],{lastUsed:this.counter++,data:a[1][2]}),this.cache.set(r,{lastUsed:this.counter++,data:a[0]}),this.prune(),a[0]})}getDirectory(e,r,n,a){return u1(this,null,function*(){let i=`${e.getKey()}|${a.etag||""}|${r}|${n}`,o=this.cache.get(i);if(o)return o.lastUsed=this.counter++,o.data;let l=yield nw(e,this.decompress,r,n,a);return this.cache.set(i,{lastUsed:this.counter++,data:l}),this.prune(),l})}prune(){if(this.cache.size>this.maxCacheEntries){let e=1/0,r;this.cache.forEach((n,a)=>{n.lastUsed<e&&(e=n.lastUsed,r=a)}),r&&this.cache.delete(r)}}invalidate(e){return u1(this,null,function*(){this.cache.delete(e.getKey())})}};En(bme,"ResolvedValueCache");var xH=class{constructor(e=100,r=!0,n=$f){this.cache=new Map,this.invalidations=new Map,this.maxCacheEntries=e,this.counter=1,this.decompress=n}getHeader(e){return u1(this,null,function*(){let r=e.getKey(),n=this.cache.get(r);if(n)return n.lastUsed=this.counter++,yield n.data;let a=new Promise((i,o)=>{rw(e,this.decompress).then(l=>{l[1]&&this.cache.set(l[1][0],{lastUsed:this.counter++,data:Promise.resolve(l[1][2])}),i(l[0]),this.prune()}).catch(l=>{o(l)})});return this.cache.set(r,{lastUsed:this.counter++,data:a}),a})}getDirectory(e,r,n,a){return u1(this,null,function*(){let i=`${e.getKey()}|${a.etag||""}|${r}|${n}`,o=this.cache.get(i);if(o)return o.lastUsed=this.counter++,yield o.data;let l=new Promise((s,f)=>{nw(e,this.decompress,r,n,a).then(c=>{s(c),this.prune()}).catch(c=>{f(c)})});return this.cache.set(i,{lastUsed:this.counter++,data:l}),l})}prune(){if(this.cache.size>=this.maxCacheEntries){let e=1/0,r;this.cache.forEach((n,a)=>{n.lastUsed<e&&(e=n.lastUsed,r=a)}),r&&this.cache.delete(r)}}invalidate(e){return u1(this,null,function*(){let r=e.getKey();if(this.invalidations.get(r))return yield this.invalidations.get(r);this.cache.delete(e.getKey());let n=new Promise((a,i)=>{this.getHeader(e).then(o=>{a(),this.invalidations.delete(r)}).catch(o=>{i(o)})});this.invalidations.set(r,n)})}};En(xH,"SharedPromiseCache");var xme=xH,wH=class{constructor(e,r,n){typeof e=="string"?this.source=new vme(e):this.source=e,n?this.decompress=n:this.decompress=$f,r?this.cache=r:this.cache=new xme}getHeader(){return u1(this,null,function*(){return yield this.cache.getHeader(this.source)})}getZxyAttempt(e,r,n,a){return u1(this,null,function*(){let i=pH(e,r,n),o=yield this.cache.getHeader(this.source);if(e<o.minZoom||e>o.maxZoom)return;let l=o.rootDirectoryOffset,s=o.rootDirectoryLength;for(let f=0;f<=3;f++){let c=yield this.cache.getDirectory(this.source,l,s,o),h=gH(c,i);if(h){if(h.runLength>0){let d=yield this.source.getBytes(o.tileDataOffset+h.offset,h.length,a,o.etag);return{data:yield this.decompress(d.data,o.tileCompression),cacheControl:d.cacheControl,expires:d.expires}}l=o.leafDirectoryOffset+h.offset,s=h.length}else return}throw new Error("Maximum directory depth exceeded")})}getZxy(e,r,n,a){return u1(this,null,function*(){try{return yield this.getZxyAttempt(e,r,n,a)}catch(i){if(i instanceof Yy)return this.cache.invalidate(this.source),yield this.getZxyAttempt(e,r,n,a);throw i}})}getMetadataAttempt(){return u1(this,null,function*(){let e=yield this.cache.getHeader(this.source),r=yield this.source.getBytes(e.jsonMetadataOffset,e.jsonMetadataLength,void 0,e.etag),n=yield this.decompress(r.data,e.internalCompression),a=new TextDecoder("utf-8");return JSON.parse(a.decode(n))})}getMetadata(){return u1(this,null,function*(){try{return yield this.getMetadataAttempt()}catch(e){if(e instanceof Yy)return this.cache.invalidate(this.source),yield this.getMetadataAttempt();throw e}})}getTileJson(e){return u1(this,null,function*(){let r=yield this.getHeader(),n=yield this.getMetadata(),a=mH(r.tileType);return{tilejson:"3.0.0",scheme:"xyz",tiles:[`${e}/{z}/{x}/{y}${a}`],vector_layers:n.vector_layers,attribution:n.attribution,description:n.description,name:n.name,version:n.version,bounds:[r.minLon,r.minLat,r.maxLon,r.maxLat],center:[r.centerLon,r.centerLat,r.centerZoom],minzoom:r.minZoom,maxzoom:r.maxZoom}})}};En(wH,"PMTiles");var OM=wH,vm,DM;function wme(){if(DM)return vm;DM=1;var t="__lodash_hash_undefined__",e=9007199254740991,r="[object Function]",n="[object GeneratorFunction]",a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=typeof kr=="object"&&kr&&kr.Object===Object&&kr,l=typeof self=="object"&&self&&self.Object===Object&&self,s=o||l||Function("return this")();function f(Ie,Ze,Ke){switch(Ke.length){case 0:return Ie.call(Ze);case 1:return Ie.call(Ze,Ke[0]);case 2:return Ie.call(Ze,Ke[0],Ke[1]);case 3:return Ie.call(Ze,Ke[0],Ke[1],Ke[2])}return Ie.apply(Ze,Ke)}function c(Ie,Ze){var Ke=Ie?Ie.length:0;return!!Ke&&m(Ie,Ze,0)>-1}function h(Ie,Ze){for(var Ke=-1,et=Ie?Ie.length:0,Pt=Array(et);++Ke<et;)Pt[Ke]=Ze(Ie[Ke],Ke,Ie);return Pt}function d(Ie,Ze,Ke,et){for(var Pt=Ie.length,jt=Ke+-1;++jt<Pt;)if(Ze(Ie[jt],jt,Ie))return jt;return-1}function m(Ie,Ze,Ke){if(Ze!==Ze)return d(Ie,g,Ke);for(var et=Ke-1,Pt=Ie.length;++et<Pt;)if(Ie[et]===Ze)return et;return-1}function g(Ie){return Ie!==Ie}function y(Ie,Ze){return Ie.has(Ze)}function b(Ie,Ze){return Ie==null?void 0:Ie[Ze]}function S(Ie){var Ze=!1;if(Ie!=null&&typeof Ie.toString!="function")try{Ze=!!(Ie+"")}catch{}return Ze}var w=Array.prototype,C=Function.prototype,k=Object.prototype,_=s["__core-js_shared__"],D=function(){var Ie=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||"");return Ie?"Symbol(src)_1."+Ie:""}(),T=C.toString,A=k.hasOwnProperty,M=k.toString,E=RegExp("^"+T.call(A).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=w.splice,Y=Math.max,ne=Math.min,K=we(s,"Map"),B=we(Object,"create");function j(Ie){var Ze=-1,Ke=Ie?Ie.length:0;for(this.clear();++Ze<Ke;){var et=Ie[Ze];this.set(et[0],et[1])}}function $(){this.__data__=B?B(null):{}}function V(Ie){return this.has(Ie)&&delete this.__data__[Ie]}function z(Ie){var Ze=this.__data__;if(B){var Ke=Ze[Ie];return Ke===t?void 0:Ke}return A.call(Ze,Ie)?Ze[Ie]:void 0}function W(Ie){var Ze=this.__data__;return B?Ze[Ie]!==void 0:A.call(Ze,Ie)}function G(Ie,Ze){var Ke=this.__data__;return Ke[Ie]=B&&Ze===void 0?t:Ze,this}j.prototype.clear=$,j.prototype.delete=V,j.prototype.get=z,j.prototype.has=W,j.prototype.set=G;function ae(Ie){var Ze=-1,Ke=Ie?Ie.length:0;for(this.clear();++Ze<Ke;){var et=Ie[Ze];this.set(et[0],et[1])}}function U(){this.__data__=[]}function H(Ie){var Ze=this.__data__,Ke=he(Ze,Ie);if(Ke<0)return!1;var et=Ze.length-1;return Ke==et?Ze.pop():N.call(Ze,Ke,1),!0}function R(Ie){var Ze=this.__data__,Ke=he(Ze,Ie);return Ke<0?void 0:Ze[Ke][1]}function ee(Ie){return he(this.__data__,Ie)>-1}function J(Ie,Ze){var Ke=this.__data__,et=he(Ke,Ie);return et<0?Ke.push([Ie,Ze]):Ke[et][1]=Ze,this}ae.prototype.clear=U,ae.prototype.delete=H,ae.prototype.get=R,ae.prototype.has=ee,ae.prototype.set=J;function Z(Ie){var Ze=-1,Ke=Ie?Ie.length:0;for(this.clear();++Ze<Ke;){var et=Ie[Ze];this.set(et[0],et[1])}}function re(){this.__data__={hash:new j,map:new(K||ae),string:new j}}function te(Ie){return xe(this,Ie).delete(Ie)}function F(Ie){return xe(this,Ie).get(Ie)}function q(Ie){return xe(this,Ie).has(Ie)}function X(Ie,Ze){return xe(this,Ie).set(Ie,Ze),this}Z.prototype.clear=re,Z.prototype.delete=te,Z.prototype.get=F,Z.prototype.has=q,Z.prototype.set=X;function ie(Ie){var Ze=-1,Ke=Ie?Ie.length:0;for(this.__data__=new Z;++Ze<Ke;)this.add(Ie[Ze])}function ce(Ie){return this.__data__.set(Ie,t),this}function de(Ie){return this.__data__.has(Ie)}ie.prototype.add=ie.prototype.push=ce,ie.prototype.has=de;function he(Ie,Ze){for(var Ke=Ie.length;Ke--;)if(Ce(Ie[Ke][0],Ze))return Ke;return-1}function Oe(Ie,Ze,Ke){for(var et=c,Pt=Ie[0].length,jt=Ie.length,Tt=jt,St=Array(jt),tt=1/0,Mt=[];Tt--;){var Dt=Ie[Tt];tt=ne(Dt.length,tt),St[Tt]=Pt>=120&&Dt.length>=120?new ie(Tt&&Dt):void 0}Dt=Ie[0];var Ye=-1,Lt=St[0];e:for(;++Ye<Pt&&Mt.length<tt;){var Et=Dt[Ye],Xt=Et;if(Et=Et!==0?Et:0,!(Lt?y(Lt,Xt):et(Mt,Xt))){for(Tt=jt;--Tt;){var He=St[Tt];if(!(He?y(He,Xt):et(Ie[Tt],Xt)))continue e}Lt&&Lt.push(Xt),Mt.push(Et)}}return Mt}function Ne(Ie){if(!$e(Ie)||ve(Ie))return!1;var Ze=be(Ie)||S(Ie)?E:i;return Ze.test(le(Ie))}function Te(Ie,Ze){return Ze=Y(Ze===void 0?Ie.length-1:Ze,0),function(){for(var Ke=arguments,et=-1,Pt=Y(Ke.length-Ze,0),jt=Array(Pt);++et<Pt;)jt[et]=Ke[Ze+et];et=-1;for(var Tt=Array(Ze+1);++et<Ze;)Tt[et]=Ke[et];return Tt[Ze]=jt,f(Ie,this,Tt)}}function _e(Ie){return ye(Ie)?Ie:[]}function xe(Ie,Ze){var Ke=Ie.__data__;return ge(Ze)?Ke[typeof Ze=="string"?"string":"hash"]:Ke.map}function we(Ie,Ze){var Ke=b(Ie,Ze);return Ne(Ke)?Ke:void 0}function ge(Ie){var Ze=typeof Ie;return Ze=="string"||Ze=="number"||Ze=="symbol"||Ze=="boolean"?Ie!=="__proto__":Ie===null}function ve(Ie){return!!D&&D in Ie}function le(Ie){if(Ie!=null){try{return T.call(Ie)}catch{}try{return Ie+""}catch{}}return""}var ue=Te(function(Ie){var Ze=h(Ie,_e);return Ze.length&&Ze[0]===Ie[0]?Oe(Ze):[]});function Ce(Ie,Ze){return Ie===Ze||Ie!==Ie&&Ze!==Ze}function pe(Ie){return Ie!=null&&je(Ie.length)&&!be(Ie)}function ye(Ie){return ut(Ie)&&pe(Ie)}function be(Ie){var Ze=$e(Ie)?M.call(Ie):"";return Ze==r||Ze==n}function je(Ie){return typeof Ie=="number"&&Ie>-1&&Ie%1==0&&Ie<=e}function $e(Ie){var Ze=typeof Ie;return!!Ie&&(Ze=="object"||Ze=="function")}function ut(Ie){return!!Ie&&typeof Ie=="object"}return vm=ue,vm}var Sme=wme();const K3=_a(Sme);function po(t,e){return e.length===0?t:t.filter(a=>e.every(i=>i.includeValues&&i.includeValues.length>0?K3(f1([a[i.column]]),i.includeValues).length>0:!0)).filter(a=>e.every(i=>i.excludeValues&&i.excludeValues.length>0?K3(f1([a[i.column]]),i.excludeValues).length===0:!0))}function Cme(t){const{mapStyle:e,height:r,width:n,relativeHeight:a,center:i,zoomLevel:o,minHeight:l,includeLayers:s,excludeLayers:f}=t,[c,h]=I.useState(0),[d,m]=I.useState(0),g=I.useRef(null),y=I.useRef(null),b=I.useRef(null);return I.useEffect(()=>{const S=new ResizeObserver(w=>{h(n||w[0].target.clientWidth||620),m(r||w[0].target.clientHeight||480)});return g.current&&(m(g.current.clientHeight||480),h(g.current.clientWidth||620),n||S.observe(g.current)),()=>S.disconnect()},[n,r]),I.useEffect(()=>{y.current&&c&&!b.current&&ka(e).then(S=>{Qr(y.current).selectAll("div").remove();const C=new Rf;Pi.addProtocol("pmtiles",C.tile);const k={container:y.current,style:s.length===0&&f.length===0?S:{...S,layers:po(S.layers,[{column:"id",includeValues:s,excludeValues:f}])}};i&&(k.center=i),o&&(k.zoom=o),b.current=new Pi.Map(k),b.current.addControl(new Pi.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),b.current.addControl(new Pi.ScaleControl,"bottom-left")})},[c,i,o,s,f,e]),I.useEffect(()=>{b.current&&ka(e).then(S=>{const w={...S,layers:po(S.layers,[{column:"id",includeValues:s,excludeValues:f}])};b.current.setStyle(w)})},[f,s,e]),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:g,"aria-label":"Map area",children:(n||c)&&(r||d)?v.jsx("div",{style:{width:n||c,height:Math.max(l,r||(a?l?(n||c)*a>l?(n||c)*a:l:(n||c)*a:d))},children:v.jsx("div",{ref:y,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}})}):null})}function kme(t){const{mapStyle:e,height:r,width:n,relativeHeight:a,center:i,zoomLevel:o,minHeight:l,includeLayers:s,excludeLayers:f}=t,[c,h]=I.useState(0),[d,m]=I.useState(0),g=I.useRef(null),y=I.useRef(null);return I.useEffect(()=>{const b=new ResizeObserver(S=>{h(n||S[0].target.clientWidth||620),m(r||S[0].target.clientHeight||480)});return g.current&&(m(g.current.clientHeight||480),h(g.current.clientWidth||620),n||b.observe(g.current)),()=>b.disconnect()},[n,r]),I.useEffect(()=>{y.current&&c&&ka(e).then(b=>{Qr(y.current).selectAll("div").remove();const w=new Rf;Pi.addProtocol("pmtiles",w.tile);const C={container:y.current,style:s.length===0&&f.length===0?b:{...b,layers:po(b.layers,[{column:"id",includeValues:s,excludeValues:f}])}};i&&(C.center=i),o&&(C.zoom=o);const k=new Pi.Map(C);k.addControl(new Pi.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),k.addControl(new Pi.ScaleControl,"bottom-left")})},[c,e,i,o,s,f]),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:g,"aria-label":"Map area",children:(n||c)&&(r||d)?v.jsx("div",{style:{width:n||c,height:Math.max(l,r||(a?l?(n||c)*a>l?(n||c)*a:l:(n||c)*a:d))},children:v.jsx("div",{ref:y,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}})}):null})}function SH(t){const{mapStyle:e,graphTitle:r,height:n,width:a,relativeHeight:i,sources:o,graphDescription:l,footNote:s,padding:f,backgroundColor:c=!1,center:h,zoomLevel:d,graphID:m,language:g="en",minHeight:y=0,theme:b="light",includeLayers:S=[],excludeLayers:w=[],ariaLabel:C,uiMode:k="normal",styles:_,classNames:D}=t,[T,A]=I.useState(typeof e=="string"?e:e[0].style);I.useEffect(()=>{A(typeof e=="string"?e:e[0].style)},[e]);const M=I.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]);return v.jsx("div",{className:`${b||"light"} flex ${a?"w-fit grow-0":"w-full grow"}`,dir:g==="he"||g==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${c?c===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${g||"en"}`,D==null?void 0:D.graphContainer),style:{...(_==null?void 0:_.graphContainer)||{},...c&&c!==!0?{backgroundColor:c}:{}},id:m,"aria-label":C||`${r?`The graph shows ${r}. `:""}This is a map.${l?` ${l}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:c?f||"1rem":f||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||l?v.jsx(Zt,{styles:{title:_==null?void 0:_.title,description:_==null?void 0:_.description},classNames:{title:D==null?void 0:D.title,description:D==null?void 0:D.description},graphTitle:r,graphDescription:l,width:a}):null,typeof e=="string"?null:v.jsx(s1,{options:e.map(E=>({label:E.name,value:E.style})),isClearable:!1,size:"sm",variant:k,isRtl:g==="he"||g==="ar",isSearchable:!0,filterOption:Z1(M),defaultValue:{label:e[0].name,value:e[0].style},controlShouldRenderValue:!0,onChange:E=>{E&&A(E.value)}}),typeof e=="string"?v.jsx(kme,{mapStyle:e,center:h,zoomLevel:d,width:a,height:n,relativeHeight:i,minHeight:y,includeLayers:S,excludeLayers:w}):v.jsx(Cme,{mapStyle:T,center:h,zoomLevel:d,width:a,height:n,relativeHeight:i,minHeight:y,includeLayers:S,excludeLayers:w}),o||s?v.jsx(tr,{styles:{footnote:_==null?void 0:_.footnote,source:_==null?void 0:_.source},classNames:{footnote:D==null?void 0:D.footnote,source:D==null?void 0:D.source},sources:o,footNote:s,width:a}):null]})})})})}const Bf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function v7(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function aw(t){return"nodeType"in t}function xi(t){var e,r;return t?v7(t)?t:aw(t)&&(e=(r=t.ownerDocument)==null?void 0:r.defaultView)!=null?e:window:window}function iw(t){const{Document:e}=xi(t);return t instanceof e}function s9(t){return v7(t)?!1:t instanceof xi(t).HTMLElement}function CH(t){return t instanceof xi(t).SVGElement}function b7(t){return t?v7(t)?t.document:aw(t)?iw(t)?t:s9(t)||CH(t)?t.ownerDocument:document:document:document}const F2=Bf?I.useLayoutEffect:I.useEffect;function ow(t){const e=I.useRef(t);return F2(()=>{e.current=t}),I.useCallback(function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return e.current==null?void 0:e.current(...n)},[])}function _me(){const t=I.useRef(null),e=I.useCallback((n,a)=>{t.current=setInterval(n,a)},[]),r=I.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,r]}function lw(t,e){e===void 0&&(e=[t]);const r=I.useRef(t);return F2(()=>{r.current!==t&&(r.current=t)},e),r}function u9(t,e){const r=I.useRef();return I.useMemo(()=>{const n=t(r.current);return r.current=n,n},[...e])}function Xy(t){const e=ow(t),r=I.useRef(null),n=I.useCallback(a=>{a!==r.current&&(e==null||e(a,r.current)),r.current=a},[]);return[r,n]}function Ky(t){const e=I.useRef();return I.useEffect(()=>{e.current=t},[t]),e.current}let bm={};function sw(t,e){return I.useMemo(()=>{if(e)return e;const r=bm[t]==null?0:bm[t]+1;return bm[t]=r,t+"-"+r},[t,e])}function kH(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return n.reduce((i,o)=>{const l=Object.entries(o);for(const[s,f]of l){const c=i[s];c!=null&&(i[s]=c+t*f)}return i},{...e})}}const k6=kH(1),Lc=kH(-1);function Ome(t){return"clientX"in t&&"clientY"in t}function _H(t){if(!t)return!1;const{KeyboardEvent:e}=xi(t.target);return e&&t instanceof e}function Dme(t){if(!t)return!1;const{TouchEvent:e}=xi(t.target);return e&&t instanceof e}function Jy(t){if(Dme(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:r}=t.touches[0];return{x:e,y:r}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:r}=t.changedTouches[0];return{x:e,y:r}}}return Ome(t)?{x:t.clientX,y:t.clientY}:null}const AM="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ame(t){return t.matches(AM)?t:t.querySelector(AM)}const Tme={display:"none"};function Mme(t){let{id:e,value:r}=t;return I.createElement("div",{id:e,style:Tme},r)}function Eme(t){let{id:e,announcement:r,ariaLiveType:n="assertive"}=t;const a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return I.createElement("div",{id:e,style:a,role:"status","aria-live":n,"aria-atomic":!0},r)}function jme(){const[t,e]=I.useState("");return{announce:I.useCallback(n=>{n!=null&&e(n)},[]),announcement:t}}const OH=I.createContext(null);function Lme(t){const e=I.useContext(OH);I.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Nme(){const[t]=I.useState(()=>new Set),e=I.useCallback(n=>(t.add(n),()=>t.delete(n)),[t]);return[I.useCallback(n=>{let{type:a,event:i}=n;t.forEach(o=>{var l;return(l=o[a])==null?void 0:l.call(o,i)})},[t]),e]}const Ime={draggable:`
274
+ `,'"',f.BYTE_ORDER_MARK],f.WORKERS_SUPPORTED=!i&&!!n.Worker,f.NODE_STREAM_INPUT=1,f.LocalChunkSize=10485760,f.RemoteChunkSize=5242880,f.DefaultDelimiter=",",f.Parser=S,f.ParserHandle=y,f.NetworkStreamer=h,f.FileStreamer=d,f.StringStreamer=m,f.ReadableStreamStreamer=g,n.jQuery&&((a=n.jQuery).fn.parse=function(A){var M=A.config||{},E=[];return this.each(function(ne){if(!(a(this).prop("tagName").toUpperCase()==="INPUT"&&a(this).attr("type").toLowerCase()==="file"&&n.FileReader)||!this.files||this.files.length===0)return!0;for(var K=0;K<this.files.length;K++)E.push({file:this.files[K],inputElem:this,instanceConfig:a.extend({},M)})}),N(),this;function N(){if(E.length===0)T(A.complete)&&A.complete();else{var ne,K,B,j,$=E[0];if(T(A.before)){var V=A.before($.file,$.inputElem);if(typeof V=="object"){if(V.action==="abort")return ne="AbortError",K=$.file,B=$.inputElem,j=V.reason,void(T(A.error)&&A.error({name:ne},K,B,j));if(V.action==="skip")return void Y();typeof V.config=="object"&&($.instanceConfig=a.extend($.instanceConfig,V.config))}else if(V==="skip")return void Y()}var z=$.instanceConfig.complete;$.instanceConfig.complete=function(W){T(z)&&z(W,$.file,$.inputElem),Y()},f.parse($.file,$.instanceConfig)}}function Y(){E.splice(0,1),N()}}),o&&(n.onmessage=function(A){A=A.data,f.WORKER_ID===void 0&&A&&(f.WORKER_ID=A.workerId),typeof A.input=="string"?n.postMessage({workerId:f.WORKER_ID,results:f.parse(A.input,A.config),finished:!0}):(n.File&&A.input instanceof File||A.input instanceof Object)&&(A=f.parse(A.input,A.config))&&n.postMessage({workerId:f.WORKER_ID,results:A,finished:!0})}),(h.prototype=Object.create(c.prototype)).constructor=h,(d.prototype=Object.create(c.prototype)).constructor=d,(m.prototype=Object.create(m.prototype)).constructor=m,(g.prototype=Object.create(c.prototype)).constructor=g,f})}(Eu)),Eu.exports}var Dpe=Ope();const eH=_a(Dpe);function n2(t,e){return!e||e.length===0?t:t.map(n=>{const a={...n};return e.forEach(i=>{a[i.column]=a[i.column]?a[i.column].split(i.delimiter||",").map(o=>o.trim()):[]}),a})}var Wl={exports:{}};Wl.exports;var CM;function Ape(){return CM||(CM=1,function(t,e){var r=200,n="Expected a function",a="__lodash_hash_undefined__",i=1,o=2,l=9007199254740991,s="[object Arguments]",f="[object Array]",c="[object Boolean]",h="[object Date]",d="[object Error]",m="[object Function]",g="[object GeneratorFunction]",y="[object Map]",b="[object Number]",S="[object Object]",w="[object Promise]",C="[object RegExp]",k="[object Set]",_="[object String]",D="[object Symbol]",T="[object WeakMap]",A="[object ArrayBuffer]",M="[object DataView]",E="[object Float32Array]",N="[object Float64Array]",Y="[object Int8Array]",ne="[object Int16Array]",K="[object Int32Array]",B="[object Uint8Array]",j="[object Uint8ClampedArray]",$="[object Uint16Array]",V="[object Uint32Array]",z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W=/^\w*$/,G=/^\./,ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,U=/[\\^$.*+?()[\]{}|]/g,H=/\\(\\)?/g,R=/^\[object .+?Constructor\]$/,ee=/^(?:0|[1-9]\d*)$/,J={};J[E]=J[N]=J[Y]=J[ne]=J[K]=J[B]=J[j]=J[$]=J[V]=!0,J[s]=J[f]=J[A]=J[c]=J[M]=J[h]=J[d]=J[m]=J[y]=J[b]=J[S]=J[C]=J[k]=J[_]=J[T]=!1;var Z=typeof kr=="object"&&kr&&kr.Object===Object&&kr,re=typeof self=="object"&&self&&self.Object===Object&&self,te=Z||re||Function("return this")(),F=e&&!e.nodeType&&e,q=F&&!0&&t&&!t.nodeType&&t,X=q&&q.exports===F,ie=X&&Z.process,ce=function(){try{return ie&&ie.binding("util")}catch{}}(),de=ce&&ce.isTypedArray;function he(Ae,se,Ee,fe){for(var Le=-1,Ve=Ae?Ae.length:0;++Le<Ve;){var qe=Ae[Le];se(fe,qe,Ee(qe),Ae)}return fe}function Oe(Ae,se){for(var Ee=-1,fe=Ae?Ae.length:0;++Ee<fe;)if(se(Ae[Ee],Ee,Ae))return!0;return!1}function Ne(Ae){return function(se){return se==null?void 0:se[Ae]}}function Te(Ae,se){for(var Ee=-1,fe=Array(Ae);++Ee<Ae;)fe[Ee]=se(Ee);return fe}function _e(Ae){return function(se){return Ae(se)}}function xe(Ae,se){return Ae==null?void 0:Ae[se]}function we(Ae){var se=!1;if(Ae!=null&&typeof Ae.toString!="function")try{se=!!(Ae+"")}catch{}return se}function ge(Ae){var se=-1,Ee=Array(Ae.size);return Ae.forEach(function(fe,Le){Ee[++se]=[Le,fe]}),Ee}function ve(Ae,se){return function(Ee){return Ae(se(Ee))}}function le(Ae){var se=-1,Ee=Array(Ae.size);return Ae.forEach(function(fe){Ee[++se]=fe}),Ee}var ue=Array.prototype,Ce=Function.prototype,pe=Object.prototype,ye=te["__core-js_shared__"],be=function(){var Ae=/[^.]+$/.exec(ye&&ye.keys&&ye.keys.IE_PROTO||"");return Ae?"Symbol(src)_1."+Ae:""}(),je=Ce.toString,$e=pe.hasOwnProperty,ut=pe.toString,Ie=RegExp("^"+je.call($e).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ze=te.Symbol,Ke=te.Uint8Array,et=pe.propertyIsEnumerable,Pt=ue.splice,jt=ve(Object.keys,Object),Tt=ea(te,"DataView"),St=ea(te,"Map"),tt=ea(te,"Promise"),Mt=ea(te,"Set"),Dt=ea(te,"WeakMap"),Ye=ea(Object,"create"),Lt=_r(Tt),Et=_r(St),Xt=_r(tt),He=_r(Mt),It=_r(Dt),Ge=Ze?Ze.prototype:void 0,Rt=Ge?Ge.valueOf:void 0,$t=Ge?Ge.toString:void 0;function dr(Ae){var se=-1,Ee=Ae?Ae.length:0;for(this.clear();++se<Ee;){var fe=Ae[se];this.set(fe[0],fe[1])}}function xr(){this.__data__=Ye?Ye(null):{}}function Mr(Ae){return this.has(Ae)&&delete this.__data__[Ae]}function Er(Ae){var se=this.__data__;if(Ye){var Ee=se[Ae];return Ee===a?void 0:Ee}return $e.call(se,Ae)?se[Ae]:void 0}function it(Ae){var se=this.__data__;return Ye?se[Ae]!==void 0:$e.call(se,Ae)}function Xe(Ae,se){var Ee=this.__data__;return Ee[Ae]=Ye&&se===void 0?a:se,this}dr.prototype.clear=xr,dr.prototype.delete=Mr,dr.prototype.get=Er,dr.prototype.has=it,dr.prototype.set=Xe;function Vt(Ae){var se=-1,Ee=Ae?Ae.length:0;for(this.clear();++se<Ee;){var fe=Ae[se];this.set(fe[0],fe[1])}}function Yt(){this.__data__=[]}function at(Ae){var se=this.__data__,Ee=jn(se,Ae);if(Ee<0)return!1;var fe=se.length-1;return Ee==fe?se.pop():Pt.call(se,Ee,1),!0}function cr(Ae){var se=this.__data__,Ee=jn(se,Ae);return Ee<0?void 0:se[Ee][1]}function Gn(Ae){return jn(this.__data__,Ae)>-1}function nr(Ae,se){var Ee=this.__data__,fe=jn(Ee,Ae);return fe<0?Ee.push([Ae,se]):Ee[fe][1]=se,this}Vt.prototype.clear=Yt,Vt.prototype.delete=at,Vt.prototype.get=cr,Vt.prototype.has=Gn,Vt.prototype.set=nr;function Ur(Ae){var se=-1,Ee=Ae?Ae.length:0;for(this.clear();++se<Ee;){var fe=Ae[se];this.set(fe[0],fe[1])}}function vn(){this.__data__={hash:new dr,map:new(St||Vt),string:new dr}}function F1(Ae){return Ln(this,Ae).delete(Ae)}function Kt(Ae){return Ln(this,Ae).get(Ae)}function Jt(Ae){return Ln(this,Ae).has(Ae)}function zt(Ae,se){return Ln(this,Ae).set(Ae,se),this}Ur.prototype.clear=vn,Ur.prototype.delete=F1,Ur.prototype.get=Kt,Ur.prototype.has=Jt,Ur.prototype.set=zt;function mn(Ae){var se=-1,Ee=Ae?Ae.length:0;for(this.__data__=new Ur;++se<Ee;)this.add(Ae[se])}function Ir(Ae){return this.__data__.set(Ae,a),this}function mr(Ae){return this.__data__.has(Ae)}mn.prototype.add=mn.prototype.push=Ir,mn.prototype.has=mr;function Jr(Ae){this.__data__=new Vt(Ae)}function en(){this.__data__=new Vt}function Pr(Ae){return this.__data__.delete(Ae)}function pa(Ae){return this.__data__.get(Ae)}function Zn(Ae){return this.__data__.has(Ae)}function Gr(Ae,se){var Ee=this.__data__;if(Ee instanceof Vt){var fe=Ee.__data__;if(!St||fe.length<r-1)return fe.push([Ae,se]),this;Ee=this.__data__=new Ur(fe)}return Ee.set(Ae,se),this}Jr.prototype.clear=en,Jr.prototype.delete=Pr,Jr.prototype.get=pa,Jr.prototype.has=Zn,Jr.prototype.set=Gr;function oa(Ae,se){var Ee=zr(Ae)||Oa(Ae)?Te(Ae.length,String):[],fe=Ee.length,Le=!!fe;for(var Ve in Ae)$e.call(Ae,Ve)&&!(Le&&(Ve=="length"||ta(Ve,fe)))&&Ee.push(Ve);return Ee}function jn(Ae,se){for(var Ee=Ae.length;Ee--;)if(Xr(Ae[Ee][0],se))return Ee;return-1}function Va(Ae,se,Ee,fe){return wi(Ae,function(Le,Ve,qe){se(fe,Le,Ee(Le),qe)}),fe}var wi=e1(O1),_1=Yn();function O1(Ae,se){return Ae&&_1(Ae,se,rt)}function $n(Ae,se){se=sn(se,Ae)?[se]:oi(se);for(var Ee=0,fe=se.length;Ae!=null&&Ee<fe;)Ae=Ae[sa(se[Ee++])];return Ee&&Ee==fe?Ae:void 0}function ai(Ae){return ut.call(Ae)}function Qn(Ae,se){return Ae!=null&&se in Object(Ae)}function Fa(Ae,se,Ee,fe,Le){return Ae===se?!0:Ae==null||se==null||!Fn(Ae)&&!zn(se)?Ae!==Ae&&se!==se:D1(Ae,se,Fa,Ee,fe,Le)}function D1(Ae,se,Ee,fe,Le,Ve){var qe=zr(Ae),ht=zr(se),ct=f,gt=f;qe||(ct=Yr(Ae),ct=ct==s?S:ct),ht||(gt=Yr(se),gt=gt==s?S:gt);var Nt=ct==S&&!we(Ae),Se=gt==S&&!we(se),Pe=ct==gt;if(Pe&&!Nt)return Ve||(Ve=new Jr),qe||Ia(Ae)?ln(Ae,se,Ee,fe,Le,Ve):t1(Ae,se,ct,Ee,fe,Le,Ve);if(!(Le&o)){var We=Nt&&$e.call(Ae,"__wrapped__"),ot=Se&&$e.call(se,"__wrapped__");if(We||ot){var wt=We?Ae.value():Ae,vt=ot?se.value():se;return Ve||(Ve=new Jr),Ee(wt,vt,fe,Le,Ve)}}return Pe?(Ve||(Ve=new Jr),Na(Ae,se,Ee,fe,Le,Ve)):!1}function A1(Ae,se,Ee,fe){var Le=Ee.length,Ve=Le;if(Ae==null)return!Ve;for(Ae=Object(Ae);Le--;){var qe=Ee[Le];if(qe[2]?qe[1]!==Ae[qe[0]]:!(qe[0]in Ae))return!1}for(;++Le<Ve;){qe=Ee[Le];var ht=qe[0],ct=Ae[ht],gt=qe[1];if(qe[2]){if(ct===void 0&&!(ht in Ae))return!1}else{var Nt=new Jr,Se;if(!(Se===void 0?Fa(gt,ct,fe,i|o,Nt):Se))return!1}}return!0}function Za(Ae){if(!Fn(Ae)||_n(Ae))return!1;var se=Nn(Ae)||we(Ae)?Ie:R;return se.test(_r(Ae))}function ii(Ae){return zn(Ae)&&Da(Ae.length)&&!!J[ut.call(Ae)]}function T1(Ae){return typeof Ae=="function"?Ae:Ae==null?Ot:typeof Ae=="object"?zr(Ae)?M1(Ae[0],Ae[1]):Si(Ae):pt(Ae)}function Qa(Ae){if(!Vn(Ae))return jt(Ae);var se=[];for(var Ee in Object(Ae))$e.call(Ae,Ee)&&Ee!="constructor"&&se.push(Ee);return se}function Si(Ae){var se=j1(Ae);return se.length==1&&se[0][2]?Xn(se[0][0],se[0][1]):function(Ee){return Ee===Ae||A1(Ee,Ae,se)}}function M1(Ae,se){return sn(Ae)&&r1(se)?Xn(sa(Ae),se):function(Ee){var fe=De(Ee,Ae);return fe===void 0&&fe===se?ze(Ee,Ae):Fa(se,fe,void 0,i|o)}}function E1(Ae){return function(se){return $n(se,Ae)}}function z1(Ae){if(typeof Ae=="string")return Ae;if(Wa(Ae))return $t?$t.call(Ae):"";var se=Ae+"";return se=="0"&&1/Ae==-1/0?"-0":se}function oi(Ae){return zr(Ae)?Ae:Wr(Ae)}function za(Ae,se){return function(Ee,fe){var Le=zr(Ee)?he:Va,Ve={};return Le(Ee,Ae,T1(fe),Ve)}}function e1(Ae,se){return function(Ee,fe){if(Ee==null)return Ee;if(!Ha(Ee))return Ae(Ee,fe);for(var Le=Ee.length,Ve=-1,qe=Object(Ee);++Ve<Le&&fe(qe[Ve],Ve,qe)!==!1;);return Ee}}function Yn(Ae){return function(se,Ee,fe){for(var Le=-1,Ve=Object(se),qe=fe(se),ht=qe.length;ht--;){var ct=qe[++Le];if(Ee(Ve[ct],ct,Ve)===!1)break}return se}}function ln(Ae,se,Ee,fe,Le,Ve){var qe=Le&o,ht=Ae.length,ct=se.length;if(ht!=ct&&!(qe&&ct>ht))return!1;var gt=Ve.get(Ae);if(gt&&Ve.get(se))return gt==se;var Nt=-1,Se=!0,Pe=Le&i?new mn:void 0;for(Ve.set(Ae,se),Ve.set(se,Ae);++Nt<ht;){var We=Ae[Nt],ot=se[Nt];if(fe)var wt=qe?fe(ot,We,Nt,se,Ae,Ve):fe(We,ot,Nt,Ae,se,Ve);if(wt!==void 0){if(wt)continue;Se=!1;break}if(Pe){if(!Oe(se,function(vt,At){if(!Pe.has(At)&&(We===vt||Ee(We,vt,fe,Le,Ve)))return Pe.add(At)})){Se=!1;break}}else if(!(We===ot||Ee(We,ot,fe,Le,Ve))){Se=!1;break}}return Ve.delete(Ae),Ve.delete(se),Se}function t1(Ae,se,Ee,fe,Le,Ve,qe){switch(Ee){case M:if(Ae.byteLength!=se.byteLength||Ae.byteOffset!=se.byteOffset)return!1;Ae=Ae.buffer,se=se.buffer;case A:return!(Ae.byteLength!=se.byteLength||!fe(new Ke(Ae),new Ke(se)));case c:case h:case b:return Xr(+Ae,+se);case d:return Ae.name==se.name&&Ae.message==se.message;case C:case _:return Ae==se+"";case y:var ht=ge;case k:var ct=Ve&o;if(ht||(ht=le),Ae.size!=se.size&&!ct)return!1;var gt=qe.get(Ae);if(gt)return gt==se;Ve|=i,qe.set(Ae,se);var Nt=ln(ht(Ae),ht(se),fe,Le,Ve,qe);return qe.delete(Ae),Nt;case D:if(Rt)return Rt.call(Ae)==Rt.call(se)}return!1}function Na(Ae,se,Ee,fe,Le,Ve){var qe=Le&o,ht=rt(Ae),ct=ht.length,gt=rt(se),Nt=gt.length;if(ct!=Nt&&!qe)return!1;for(var Se=ct;Se--;){var Pe=ht[Se];if(!(qe?Pe in se:$e.call(se,Pe)))return!1}var We=Ve.get(Ae);if(We&&Ve.get(se))return We==se;var ot=!0;Ve.set(Ae,se),Ve.set(se,Ae);for(var wt=qe;++Se<ct;){Pe=ht[Se];var vt=Ae[Pe],At=se[Pe];if(fe)var ar=qe?fe(At,vt,Pe,se,Ae,Ve):fe(vt,At,Pe,Ae,se,Ve);if(!(ar===void 0?vt===At||Ee(vt,At,fe,Le,Ve):ar)){ot=!1;break}wt||(wt=Pe=="constructor")}if(ot&&!wt){var Qt=Ae.constructor,vr=se.constructor;Qt!=vr&&"constructor"in Ae&&"constructor"in se&&!(typeof Qt=="function"&&Qt instanceof Qt&&typeof vr=="function"&&vr instanceof vr)&&(ot=!1)}return Ve.delete(Ae),Ve.delete(se),ot}function Ln(Ae,se){var Ee=Ae.__data__;return Bn(se)?Ee[typeof se=="string"?"string":"hash"]:Ee.map}function j1(Ae){for(var se=rt(Ae),Ee=se.length;Ee--;){var fe=se[Ee],Le=Ae[fe];se[Ee]=[fe,Le,r1(Le)]}return se}function ea(Ae,se){var Ee=xe(Ae,se);return Za(Ee)?Ee:void 0}var Yr=ai;(Tt&&Yr(new Tt(new ArrayBuffer(1)))!=M||St&&Yr(new St)!=y||tt&&Yr(tt.resolve())!=w||Mt&&Yr(new Mt)!=k||Dt&&Yr(new Dt)!=T)&&(Yr=function(Ae){var se=ut.call(Ae),Ee=se==S?Ae.constructor:void 0,fe=Ee?_r(Ee):void 0;if(fe)switch(fe){case Lt:return M;case Et:return y;case Xt:return w;case He:return k;case It:return T}return se});function la(Ae,se,Ee){se=sn(se,Ae)?[se]:oi(se);for(var fe,Le=-1,qe=se.length;++Le<qe;){var Ve=sa(se[Le]);if(!(fe=Ae!=null&&Ee(Ae,Ve)))break;Ae=Ae[Ve]}if(fe)return fe;var qe=Ae?Ae.length:0;return!!qe&&Da(qe)&&ta(Ve,qe)&&(zr(Ae)||Oa(Ae))}function ta(Ae,se){return se=se??l,!!se&&(typeof Ae=="number"||ee.test(Ae))&&Ae>-1&&Ae%1==0&&Ae<se}function sn(Ae,se){if(zr(Ae))return!1;var Ee=typeof Ae;return Ee=="number"||Ee=="symbol"||Ee=="boolean"||Ae==null||Wa(Ae)?!0:W.test(Ae)||!z.test(Ae)||se!=null&&Ae in Object(se)}function Bn(Ae){var se=typeof Ae;return se=="string"||se=="number"||se=="symbol"||se=="boolean"?Ae!=="__proto__":Ae===null}function _n(Ae){return!!be&&be in Ae}function Vn(Ae){var se=Ae&&Ae.constructor,Ee=typeof se=="function"&&se.prototype||pe;return Ae===Ee}function r1(Ae){return Ae===Ae&&!Fn(Ae)}function Xn(Ae,se){return function(Ee){return Ee==null?!1:Ee[Ae]===se&&(se!==void 0||Ae in Object(Ee))}}var Wr=On(function(Ae){Ae=oe(Ae);var se=[];return G.test(Ae)&&se.push(""),Ae.replace(ae,function(Ee,fe,Le,Ve){se.push(Le?Ve.replace(H,"$1"):fe||Ee)}),se});function sa(Ae){if(typeof Ae=="string"||Wa(Ae))return Ae;var se=Ae+"";return se=="0"&&1/Ae==-1/0?"-0":se}function _r(Ae){if(Ae!=null){try{return je.call(Ae)}catch{}try{return Ae+""}catch{}}return""}var ua=za(function(Ae,se,Ee){$e.call(Ae,Ee)?Ae[Ee].push(se):Ae[Ee]=[se]});function On(Ae,se){if(typeof Ae!="function"||se&&typeof se!="function")throw new TypeError(n);var Ee=function(){var fe=arguments,Le=se?se.apply(this,fe):fe[0],Ve=Ee.cache;if(Ve.has(Le))return Ve.get(Le);var qe=Ae.apply(this,fe);return Ee.cache=Ve.set(Le,qe),qe};return Ee.cache=new(On.Cache||Ur),Ee}On.Cache=Ur;function Xr(Ae,se){return Ae===se||Ae!==Ae&&se!==se}function Oa(Ae){return qa(Ae)&&$e.call(Ae,"callee")&&(!et.call(Ae,"callee")||ut.call(Ae)==s)}var zr=Array.isArray;function Ha(Ae){return Ae!=null&&Da(Ae.length)&&!Nn(Ae)}function qa(Ae){return zn(Ae)&&Ha(Ae)}function Nn(Ae){var se=Fn(Ae)?ut.call(Ae):"";return se==m||se==g}function Da(Ae){return typeof Ae=="number"&&Ae>-1&&Ae%1==0&&Ae<=l}function Fn(Ae){var se=typeof Ae;return!!Ae&&(se=="object"||se=="function")}function zn(Ae){return!!Ae&&typeof Ae=="object"}function Wa(Ae){return typeof Ae=="symbol"||zn(Ae)&&ut.call(Ae)==D}var Ia=de?_e(de):ii;function oe(Ae){return Ae==null?"":z1(Ae)}function De(Ae,se,Ee){var fe=Ae==null?void 0:$n(Ae,se);return fe===void 0?Ee:fe}function ze(Ae,se){return Ae!=null&&la(Ae,se,Qn)}function rt(Ae){return Ha(Ae)?oa(Ae):Qa(Ae)}function Ot(Ae){return Ae}function pt(Ae){return sn(Ae)?Ne(sa(Ae)):E1(Ae)}t.exports=ua}(Wl,Wl.exports)),Wl.exports}var Tpe=Ape();const Mpe=_a(Tpe);function Epe(t,e){return t.map(r=>{const n={...r};return n["~id"]=n[e],n})}function jpe(t){const e=[];return t.forEach(r=>{r.forEach(n=>{e.push(n)})}),e}function Lpe(t,e){const r=Mpe(t,"~id"),n=Object.keys(r).map(l=>r[l].reduce((f,c)=>(Object.assign(f,c),f),{})),a=new Set;n.forEach(l=>{Object.keys(l).forEach(s=>{a.add(s)})});const i={};return a.forEach(l=>{i[l]=void 0}),n.map(l=>({...i,...l})).map(l=>({...l,[e]:l["~id"]}))}function Npe(t,e){const r=t.map(a=>Epe(a.data,a.idColumn)),n=jpe(r);return Lpe(n,e||"~id")}function H6(t,e){if(!e)return t;Zo.registerHelper("json",n=>new Zo.SafeString(JSON.stringify(n,null,2)));const r=Zo.compile(e);return JSON.parse(r(t))}async function p4(t,e,r,n,a,i){return new Promise((o,l)=>{eH.parse(t,{download:!0,skipEmptyLines:!0,dynamicTyping:!0,header:i!==!1,delimiter:a||",",complete(s){if(n&&console.log("Data from file:",s.data),r){const f=n2(s.data,r);n&&console.log("Data after transformation of column to array:",f),o(H6(f,e))}else o(H6(s.data,e))},error(s){l(s)}})})}async function Ipe(t,e,r,n,a,i){return new Promise((o,l)=>{eH.parse(t,{skipEmptyLines:!0,header:i!==!1,delimiter:a||",",complete(s){if(n&&console.log("Data from file:",s.data),r){const f=n2(s.data,r);n&&console.log("Data after transformation of column to array:",f),o(H6(f,e))}else o(H6(s.data,e))},error(s){l(s)}})})}async function ka(t,e,r,n){const a=t;try{const i=await fetch(a);if(!i.ok)throw new Error(`Response status: ${i.status}`);const o=await i.json(),l=H6(o,r);if(n&&console.log("Data from file:",o),e){const s=n2(l,e);return n&&console.log("Data after transformation of column to array:",s),s}return l}catch(i){return i}}async function m4(t,e,r,n,a){const i=await fetch(t,{method:"GET",headers:e});if(!i.ok)throw new Error("Network response was not ok");const o=await i.json(),l=H6(o,n);if(a&&(console.log("Data from api:",o),console.log("Data from api after transformation:",l)),r){const s=n2(l,r);return a&&console.log("Data after transformation of column to array:",s),s}return l}async function y7(t,e){const r=await Promise.all(t.map(a=>a.fileType==="json"?ka(a.dataURL,a.columnsToArray,a.dataTransformation,!1):a.fileType==="api"?m4(a.dataURL,a.apiHeaders,a.columnsToArray,a.dataTransformation,!1):p4(a.dataURL,a.dataTransformation,a.columnsToArray,!1,a.delimiter,!0)));return Npe(r.map((a,i)=>({data:a,idColumn:t[i].idColumnName})),e)}var pm,kM;function Ppe(){if(kM)return pm;kM=1;var t=200,e="__lodash_hash_undefined__",r=1/0,n="[object Function]",a="[object GeneratorFunction]",i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=typeof kr=="object"&&kr&&kr.Object===Object&&kr,s=typeof self=="object"&&self&&self.Object===Object&&self,f=l||s||Function("return this")();function c(ye,be){var je=ye?ye.length:0;return!!je&&d(ye,be,0)>-1}function h(ye,be,je,$e){for(var ut=ye.length,Ie=je+-1;++Ie<ut;)if(be(ye[Ie],Ie,ye))return Ie;return-1}function d(ye,be,je){if(be!==be)return h(ye,m,je);for(var $e=je-1,ut=ye.length;++$e<ut;)if(ye[$e]===be)return $e;return-1}function m(ye){return ye!==ye}function g(ye,be){return ye.has(be)}function y(ye,be){return ye==null?void 0:ye[be]}function b(ye){var be=!1;if(ye!=null&&typeof ye.toString!="function")try{be=!!(ye+"")}catch{}return be}function S(ye){var be=-1,je=Array(ye.size);return ye.forEach(function($e){je[++be]=$e}),je}var w=Array.prototype,C=Function.prototype,k=Object.prototype,_=f["__core-js_shared__"],D=function(){var ye=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||"");return ye?"Symbol(src)_1."+ye:""}(),T=C.toString,A=k.hasOwnProperty,M=k.toString,E=RegExp("^"+T.call(A).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=w.splice,Y=_e(f,"Map"),ne=_e(f,"Set"),K=_e(Object,"create");function B(ye){var be=-1,je=ye?ye.length:0;for(this.clear();++be<je;){var $e=ye[be];this.set($e[0],$e[1])}}function j(){this.__data__=K?K(null):{}}function $(ye){return this.has(ye)&&delete this.__data__[ye]}function V(ye){var be=this.__data__;if(K){var je=be[ye];return je===e?void 0:je}return A.call(be,ye)?be[ye]:void 0}function z(ye){var be=this.__data__;return K?be[ye]!==void 0:A.call(be,ye)}function W(ye,be){var je=this.__data__;return je[ye]=K&&be===void 0?e:be,this}B.prototype.clear=j,B.prototype.delete=$,B.prototype.get=V,B.prototype.has=z,B.prototype.set=W;function G(ye){var be=-1,je=ye?ye.length:0;for(this.clear();++be<je;){var $e=ye[be];this.set($e[0],$e[1])}}function ae(){this.__data__=[]}function U(ye){var be=this.__data__,je=de(be,ye);if(je<0)return!1;var $e=be.length-1;return je==$e?be.pop():N.call(be,je,1),!0}function H(ye){var be=this.__data__,je=de(be,ye);return je<0?void 0:be[je][1]}function R(ye){return de(this.__data__,ye)>-1}function ee(ye,be){var je=this.__data__,$e=de(je,ye);return $e<0?je.push([ye,be]):je[$e][1]=be,this}G.prototype.clear=ae,G.prototype.delete=U,G.prototype.get=H,G.prototype.has=R,G.prototype.set=ee;function J(ye){var be=-1,je=ye?ye.length:0;for(this.clear();++be<je;){var $e=ye[be];this.set($e[0],$e[1])}}function Z(){this.__data__={hash:new B,map:new(Y||G),string:new B}}function re(ye){return Te(this,ye).delete(ye)}function te(ye){return Te(this,ye).get(ye)}function F(ye){return Te(this,ye).has(ye)}function q(ye,be){return Te(this,ye).set(ye,be),this}J.prototype.clear=Z,J.prototype.delete=re,J.prototype.get=te,J.prototype.has=F,J.prototype.set=q;function X(ye){var be=-1,je=ye?ye.length:0;for(this.__data__=new J;++be<je;)this.add(ye[be])}function ie(ye){return this.__data__.set(ye,e),this}function ce(ye){return this.__data__.has(ye)}X.prototype.add=X.prototype.push=ie,X.prototype.has=ce;function de(ye,be){for(var je=ye.length;je--;)if(le(ye[je][0],be))return je;return-1}function he(ye){if(!Ce(ye)||we(ye))return!1;var be=ue(ye)||b(ye)?E:o;return be.test(ge(ye))}function Oe(ye,be,je){var $e=-1,ut=c,Ie=ye.length,Ze=!0,Ke=[],et=Ke;if(Ie>=t){var Pt=Ne(ye);if(Pt)return S(Pt);Ze=!1,ut=g,et=new X}else et=Ke;e:for(;++$e<Ie;){var jt=ye[$e],Tt=jt;if(jt=jt!==0?jt:0,Ze&&Tt===Tt){for(var St=et.length;St--;)if(et[St]===Tt)continue e;Ke.push(jt)}else ut(et,Tt,je)||(et!==Ke&&et.push(Tt),Ke.push(jt))}return Ke}var Ne=ne&&1/S(new ne([,-0]))[1]==r?function(ye){return new ne(ye)}:pe;function Te(ye,be){var je=ye.__data__;return xe(be)?je[typeof be=="string"?"string":"hash"]:je.map}function _e(ye,be){var je=y(ye,be);return he(je)?je:void 0}function xe(ye){var be=typeof ye;return be=="string"||be=="number"||be=="symbol"||be=="boolean"?ye!=="__proto__":ye===null}function we(ye){return!!D&&D in ye}function ge(ye){if(ye!=null){try{return T.call(ye)}catch{}try{return ye+""}catch{}}return""}function ve(ye){return ye&&ye.length?Oe(ye):[]}function le(ye,be){return ye===be||ye!==ye&&be!==be}function ue(ye){var be=Ce(ye)?M.call(ye):"";return be==n||be==a}function Ce(ye){var be=typeof ye;return!!ye&&(be=="object"||be=="function")}function pe(){}return pm=ve,pm}var Rpe=Ppe();const $pe=_a(Rpe),Bpe=(t,e)=>{const r=[...t];for(;r.length<e;)r.push(r[r.length-1]);return r};function X3(t,e){const r=Ut(t.filter(i=>i!=null),i=>i);return($pe(r).length<e?Bpe(r,e).slice(1,-1):Zfe(r,e).slice(1,-1)).map(i=>{const o=parseFloat(Sb(".2r")(i));return isNaN(o)?i<-1?Math.round(i):i:i!==0&&Math.abs(i)<1?o:Math.round(o)})}function tH(t){const{data:e,mapData:r,graphTitle:n,colors:a=Qe.light.bivariateColors.colors05x05,sources:i,graphDescription:o,height:l,width:s,footNote:f,xDomain:c,yDomain:h,xColorLegendTitle:d="X Color key",yColorLegendTitle:m="Y Color key",tooltip:g,scale:y=.95,centerPoint:b,padding:S,mapBorderWidth:w=.5,mapNoDataColor:C=Qe.light.graphNoData,backgroundColor:k=!1,mapBorderColor:_=Qe.light.grays["gray-500"],relativeHeight:D,onSeriesMouseOver:T,isWorldMap:A=!0,zoomScaleExtend:M=[.8,6],zoomTranslateExtend:E,graphID:N,showColorScale:Y=!0,highlightedIds:ne=[],onSeriesMouseClick:K,mapProperty:B="ISO3",graphDownload:j=!1,dataDownload:$=!1,showAntarctica:V=!1,language:z="en",minHeight:W=0,theme:G="light",ariaLabel:ae,resetSelectionOnDoubleClick:U=!0,detailsOnClick:H,styles:R,classNames:ee,mapProjection:J}=t,[Z,re]=I.useState(0),[te,F]=I.useState(0),[q,X]=I.useState(void 0),ie=I.useRef(null),ce=I.useRef(null);return I.useEffect(()=>{const de=new ResizeObserver(he=>{re(s||he[0].contentRect.width||760),F(l||he[0].target.clientHeight||480)});return ie.current&&(F(ie.current.clientHeight||480),re(ie.current.clientWidth||760),s||de.observe(ie.current)),()=>de.disconnect()},[s,l]),I.useEffect(()=>{typeof r=="string"?ka(r).then(he=>{X(he)}):X(r||u7)},[r]),c&&h&&(c.length!==a[0].length-1||h.length!==a.length-1)?(console.error("the xDomain and yDomain array length don't match to the color array length"),null):v.jsx("div",{className:`${G||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:z==="he"||z==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${k?k===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${z||"en"}`,ee==null?void 0:ee.graphContainer),style:{...(R==null?void 0:R.graphContainer)||{},...k&&k!==!0?{backgroundColor:k}:{}},id:N,ref:ce,"aria-label":ae||`${n?`The graph shows ${n}. `:""}This is bi-variate choropleth map where geographic areas are colored in proportion to two variables.${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:k?S||"1rem":S||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[n||o||j||$?v.jsx(Zt,{styles:{title:R==null?void 0:R.title,description:R==null?void 0:R.description},classNames:{title:ee==null?void 0:ee.title,description:ee==null?void 0:ee.description},graphTitle:n,graphDescription:o,width:s,graphDownload:j?ce.current:void 0,dataDownload:$?e.map(de=>de.data).filter(de=>de!==void 0).length>0?e.map(de=>de.data).filter(de=>de!==void 0):e.filter(de=>de!==void 0):null}):null,v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:ie,"aria-label":"Map area",children:(s||Z)&&(l||te)&&q?v.jsx(kpe,{data:e,mapData:V?q:{...q,features:q.features.filter(de=>de.properties.NAME!=="Antarctica")},xDomain:c||X3(e.map(de=>de.x),a[0].length),yDomain:h||X3(e.map(de=>de.y),a.length),width:s||Z,height:Math.max(W,l||(D?W?(s||Z)*D>W?(s||Z)*D:W:(s||Z)*D:te)),scale:y,centerPoint:b,colors:a,xColorLegendTitle:d,yColorLegendTitle:m,mapBorderWidth:w,mapNoDataColor:C,mapBorderColor:_,tooltip:g,onSeriesMouseOver:T,isWorldMap:A,zoomScaleExtend:M,zoomTranslateExtend:E,onSeriesMouseClick:K,mapProperty:B,highlightedIds:ne,resetSelectionOnDoubleClick:U,styles:R,showColorScale:Y,classNames:ee,mapProjection:J||(A?"naturalEarth":"mercator"),detailsOnClick:H}):null}),i||f?v.jsx(tr,{styles:{footnote:R==null?void 0:R.footnote,source:R==null?void 0:R.source},classNames:{footnote:ee==null?void 0:ee.footnote,source:ee==null?void 0:ee.source},sources:i,footNote:f,width:s}):null]})})})})}function Vpe(t){const{data:e,colorDomain:r,colors:n,mapData:a,colorLegendTitle:i,categorical:o,height:l,width:s,scale:f,centerPoint:c,tooltip:h,mapBorderWidth:d,mapBorderColor:m,mapNoDataColor:g,onSeriesMouseOver:y,showColorScale:b,zoomScaleExtend:S,zoomTranslateExtend:w,highlightedIds:C,onSeriesMouseClick:k,mapProperty:_,resetSelectionOnDoubleClick:D,detailsOnClick:T,styles:A,classNames:M,mapProjection:E}=t,[N,Y]=I.useState(void 0),[ne,K]=I.useState(!(s<680)),B=I.useRef(null),[j,$]=I.useState(50),[V,z]=I.useState(void 0),[W,G]=I.useState(void 0),[ae,U]=I.useState(void 0),[H,R]=I.useState(void 0),ee=I.useRef(null),J=I.useRef(null),Z=o?Ys().domain(r).range(n):P2().domain(r).range(n);I.useEffect(()=>{const he=Qr(J.current),Oe=Qr(ee.current),Ne=g7().scaleExtent(S).translateExtent(w||[[-20,-20],[s+20,l+20]]).on("zoom",({transform:Te})=>{he.attr("transform",Te)});Oe.call(Ne)},[l,s]);const re=c7(a),te=o9(a),F=re[2]-re[0],q=re[3]-re[1],X=s*190/960*360/F,ie=l*190/678*180/q,ce=f*Math.min(X,ie),de=E==="mercator"?d7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):E==="equalEarth"?h7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):E==="naturalEarth"?p7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):E==="orthographic"?m7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):f7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce);return I.useEffect(()=>{(()=>{if(B.current){const Oe=B.current.getBoundingClientRect().height;$(Oe+16)}})()},[]),v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${s}px`,height:`${l}px`,viewBox:`0 0 ${s} ${l}`,ref:ee,direction:"ltr",children:[v.jsxs("g",{ref:J,children:[a.features.map((he,Oe)=>e.findIndex(Te=>Te.id===he.properties[_])!==-1?null:v.jsx("g",{opacity:N?.3:C.length!==0?C.indexOf(he.properties[_])!==-1?1:.3:1,children:he.geometry.type==="MultiPolygon"?he.geometry.coordinates.map((Te,_e)=>{let xe="";return Te.forEach(we=>{let ge=" M";we.forEach((ve,le)=>{const ue=de([ve[0],ve[1]]);le!==we.length-1?ge=`${ge}${ue[0]} ${ue[1]}L`:ge=`${ge}${ue[0]} ${ue[1]}`}),xe+=ge}),v.jsx("path",{d:xe,style:{stroke:m,strokeWidth:d,fill:g}},_e)}):he.geometry.coordinates.map((Te,_e)=>{let xe="M";return Te.forEach((we,ge)=>{const ve=de([we[0],we[1]]);ge!==Te.length-1?xe=`${xe}${ve[0]} ${ve[1]}L`:xe=`${xe}${ve[0]} ${ve[1]}`}),v.jsx("path",{d:xe,style:{stroke:m,strokeWidth:d,fill:g}},_e)})},Oe)),e.map((he,Oe)=>{const Ne=a.features.findIndex(_e=>he.id===_e.properties[_]),Te=Fe(he.x)?g:Z(he.x);return v.jsx("g",{opacity:N?N===Te?1:.3:C.length!==0?C.indexOf(he.id)!==-1?1:.3:1,onMouseEnter:_e=>{G(he),R(_e.clientY),U(_e.clientX),y&&y(he)},onMouseMove:_e=>{G(he),R(_e.clientY),U(_e.clientX)},onMouseLeave:()=>{G(void 0),U(void 0),R(void 0),y&&y(void 0)},onClick:()=>{(k||T)&&(Sr(V,he)&&D?(z(void 0),k==null||k(void 0)):(z(he),k==null||k(he)))},children:Ne===-1?null:a.features[Ne].geometry.type==="MultiPolygon"?a.features[Ne].geometry.coordinates.map((_e,xe)=>{let we="";return _e.forEach(ge=>{let ve=" M";ge.forEach((le,ue)=>{const Ce=de([le[0],le[1]]);ue!==ge.length-1?ve=`${ve}${Ce[0]} ${Ce[1]}L`:ve=`${ve}${Ce[0]} ${Ce[1]}`}),we+=ve}),v.jsx("path",{d:we,style:{stroke:m,strokeWidth:d,fill:Te}},xe)}):a.features[Ne].geometry.coordinates.map((_e,xe)=>{let we="M";return _e.forEach((ge,ve)=>{const le=de([ge[0],ge[1]]);ve!==_e.length-1?we=`${we}${le[0]} ${le[1]}L`:we=`${we}${le[0]} ${le[1]}`}),v.jsx("path",{d:we,style:{stroke:m,strokeWidth:d,fill:Te}},xe)})},Oe)}),W?a.features.filter(he=>he.properties[_]===W.id).map((he,Oe)=>v.jsx("g",{children:he.geometry.type==="MultiPolygon"?he.geometry.coordinates.map((Ne,Te)=>{let _e="";return Ne.forEach(xe=>{let we=" M";xe.forEach((ge,ve)=>{const le=de([ge[0],ge[1]]);ve!==xe.length-1?we=`${we}${le[0]} ${le[1]}L`:we=`${we}${le[0]} ${le[1]}`}),_e+=we}),v.jsx("path",{d:_e,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},Te)}):he.geometry.coordinates.map((Ne,Te)=>{let _e="M";return Ne.forEach((xe,we)=>{const ge=de([xe[0],xe[1]]);we!==Ne.length-1?_e=`${_e}${ge[0]} ${ge[1]}L`:_e=`${_e}${ge[0]} ${ge[1]}`}),v.jsx("path",{d:_e,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},Te)})},Oe)):null]}),b===!1?null:v.jsx("foreignObject",{x:10,y:ne?l-j-5:l-46,width:ne?o?150:352:101,height:ne?j:36,children:ne?v.jsxs("div",{ref:B,children:[v.jsx("div",{style:{marginBottom:"-0.75rem",marginLeft:o?"126px":"328px",backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"relative"},onClick:()=>{K(!1)},children:v.jsx(n7,{})}),v.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.5",width:o?"138px":"340px"},children:[i&&i!==""?v.jsx(or,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:i}):null,o?v.jsx("div",{className:"flex flex-col gap-3",children:r.map((he,Oe)=>v.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{Y(n[Oe%n.length])},onMouseLeave:()=>{Y(void 0)},children:[v.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:n[Oe%n.length]}}),v.jsx(or,{size:"sm",marginBottom:"none",leading:"none",children:he})]},Oe))}):v.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:v.jsxs("g",{children:[r.map((he,Oe)=>v.jsxs("g",{onMouseOver:()=>{Y(n[Oe])},onMouseLeave:()=>{Y(void 0)},className:"cursor-pointer",children:[v.jsx("rect",{x:Oe*320/n.length+1,y:1,width:320/n.length-2,height:8,className:N===n[Oe]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:n[Oe],...N===n[Oe]?{}:{stroke:n[Oe]}}}),v.jsx("text",{x:(Oe+1)*320/n.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:_t(he,"","")})]},Oe)),v.jsx("g",{children:v.jsx("rect",{onMouseOver:()=>{Y(n[r.length])},onMouseLeave:()=>{Y(void 0)},x:r.length*320/n.length+1,y:1,width:320/n.length-2,height:8,className:`cursor-pointer ${N===n[r.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:n[r.length],...N===n[r.length]?{}:{stroke:n[r.length]}}})})]})})]})]}):v.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{K(!0)},children:v.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})})]}),T?v.jsx(Tr,{open:V!==void 0,onClose:()=>{z(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(T,V)}})}):null,W&&h&&ae&&H?v.jsx(yr,{data:W,body:h,xPos:ae,yPos:H,backgroundStyle:A==null?void 0:A.tooltip,className:M==null?void 0:M.tooltip}):null]})}var mm,_M;function Fpe(){if(_M)return mm;_M=1;var t=1/0,e=9007199254740991,r="[object Arguments]",n="[object Function]",a="[object GeneratorFunction]",i=typeof kr=="object"&&kr&&kr.Object===Object&&kr,o=typeof self=="object"&&self&&self.Object===Object&&self,l=i||o||Function("return this")(),s=Object.prototype,f=s.hasOwnProperty,c=s.toString,h=l.Symbol,d=s.propertyIsEnumerable,m=h?h.isConcatSpreadable:void 0;function g(M,E,N,Y,ne){var K=-1,B=M.length;for(N||(N=y),ne||(ne=[]);++K<B;){var j=M[K];N(j)?g(j,E-1,N,Y,ne):ne[ne.length]=j}return ne}function y(M){return w(M)||S(M)||!!(m&&M&&M[m])}function b(M){var E=M?M.length:0;return E?g(M,t):[]}function S(M){return k(M)&&f.call(M,"callee")&&(!d.call(M,"callee")||c.call(M)==r)}var w=Array.isArray;function C(M){return M!=null&&D(M.length)&&!_(M)}function k(M){return A(M)&&C(M)}function _(M){var E=T(M)?c.call(M):"";return E==n||E==a}function D(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=e}function T(M){var E=typeof M;return!!M&&(E=="object"||E=="function")}function A(M){return!!M&&typeof M=="object"}return mm=b,mm}var zpe=Fpe();const f1=_a(zpe);function J0(t,e){return t.length===0?[]:typeof t[0][e]!="object"?Ut(Bt(t,a=>a[e]),a=>a[e]).map(a=>a[e]):Ut(Bt(f1(t.map(n=>n[e])),n=>n),n=>n)}function rH(t){const{data:e,mapData:r,graphTitle:n,colors:a,sources:i,graphDescription:o,height:l,width:s,footNote:f,colorDomain:c,colorLegendTitle:h,scaleType:d="threshold",scale:m=.95,centerPoint:g,padding:y,mapBorderWidth:b=.5,mapNoDataColor:S=Qe.light.graphNoData,backgroundColor:w=!1,mapBorderColor:C=Qe.light.grays["gray-500"],relativeHeight:k,tooltip:_,onSeriesMouseOver:D,isWorldMap:T=!0,showColorScale:A=!0,zoomScaleExtend:M=[.8,6],zoomTranslateExtend:E,graphID:N,highlightedIds:Y=[],onSeriesMouseClick:ne,mapProperty:K="ISO3",graphDownload:B=!1,dataDownload:j=!1,showAntarctica:$=!1,language:V="en",minHeight:z=0,theme:W="light",ariaLabel:G,resetSelectionOnDoubleClick:ae=!0,detailsOnClick:U,styles:H,classNames:R,mapProjection:ee}=t,[J,Z]=I.useState(0),[re,te]=I.useState(0),[F,q]=I.useState(void 0),X=I.useRef(null),ie=I.useRef(null);I.useEffect(()=>{const de=new ResizeObserver(he=>{Z(s||he[0].target.clientWidth||760),te(l||he[0].target.clientHeight||480)});return X.current&&(te(X.current.clientHeight||480),Z(X.current.clientWidth||760),s||de.observe(X.current)),()=>de.disconnect()},[s,l]),I.useEffect(()=>{typeof r=="string"?ka(r).then(he=>{q(he)}):q(r||u7)},[r]);const ce=c||(d==="categorical"?J0(e,"x"):X3(e.map(de=>de.x),(a==null?void 0:a.length)||4));return v.jsx("div",{className:`${W||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:V==="he"||V==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${w?w===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${V||"en"}`,R==null?void 0:R.graphContainer),style:{...(H==null?void 0:H.graphContainer)||{},...w&&w!==!0?{backgroundColor:w}:{}},id:N,ref:ie,"aria-label":G||`${n?`The graph shows ${n}. `:""}This is a choropleth map where geographic areas are colored in proportion to a specific variable.${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:w?y||"1rem":y||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[n||o||B||j?v.jsx(Zt,{styles:{title:H==null?void 0:H.title,description:H==null?void 0:H.description},classNames:{title:R==null?void 0:R.title,description:R==null?void 0:R.description},graphTitle:n,graphDescription:o,width:s,graphDownload:B?ie.current:void 0,dataDownload:j?e.map(de=>de.data).filter(de=>de!==void 0).length>0?e.map(de=>de.data).filter(de=>de!==void 0):e.filter(de=>de!==void 0):null}):null,v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:X,"aria-label":"Map area",children:(s||J)&&(l||re)&&F?v.jsx(Vpe,{data:e,mapData:$?F:{...F,features:F.features.filter(de=>de.properties.NAME!=="Antarctica")},colorDomain:ce,width:s||J,height:Math.max(z,l||(k?z?(s||J)*k>z?(s||J)*k:z:(s||J)*k:re)),scale:m,centerPoint:g,colors:a||(d==="categorical"?Qe[W].sequentialColors[`neutralColorsx0${ce.length}`]:Qe[W].sequentialColors[`neutralColorsx0${ce.length+1}`]),colorLegendTitle:h,mapBorderWidth:b,mapNoDataColor:S,categorical:d==="categorical",mapBorderColor:C,tooltip:_,onSeriesMouseOver:D,isWorldMap:T,showColorScale:A,zoomScaleExtend:M,zoomTranslateExtend:E,onSeriesMouseClick:ne,mapProperty:K,highlightedIds:Y,resetSelectionOnDoubleClick:ae,styles:H,classNames:R,detailsOnClick:U,mapProjection:ee||(T?"naturalEarth":"mercator")}):null}),i||f?v.jsx(tr,{styles:{footnote:H==null?void 0:H.footnote,source:H==null?void 0:H.source},classNames:{footnote:R==null?void 0:R.footnote,source:R==null?void 0:R.source},sources:i,footNote:f,width:s}):null]})})})})}function Hpe(t){var he;const{data:e,colors:r,mapData:n,colorLegendTitle:a,colorDomain:i,radius:o,height:l,width:s,scale:f,centerPoint:c,tooltip:h,showLabels:d,mapBorderWidth:m,mapBorderColor:g,mapNoDataColor:y,onSeriesMouseOver:b,showColorScale:S,zoomScaleExtend:w,zoomTranslateExtend:C,highlightedDataPoints:k,onSeriesMouseClick:_,resetSelectionOnDoubleClick:D,detailsOnClick:T,styles:A,classNames:M,mapProjection:E}=t,[N,Y]=I.useState(void 0),[ne,K]=I.useState(!(s<680)),B=I.useRef(null),[j,$]=I.useState(50),[V,z]=I.useState(void 0),[W,G]=I.useState(void 0),[ae,U]=I.useState(void 0),[H,R]=I.useState(void 0),ee=I.useRef(null),J=I.useRef(null),Z=e.filter(Oe=>Oe.radius===void 0).length!==e.length?l4().domain([0,(he=Vr(e,"radius"))==null?void 0:he.radius]).range([.25,o]).nice():void 0;I.useEffect(()=>{const Oe=Qr(J.current),Ne=Qr(ee.current),Te=g7().scaleExtent(w).translateExtent(C||[[-20,-20],[s+20,l+20]]).on("zoom",({transform:_e})=>{Oe.attr("transform",_e)});Ne.call(Te)},[l,s]);const re=c7(n),te=o9(n),F=re[2]-re[0],q=re[3]-re[1],X=s*190/960*360/F,ie=l*190/678*180/q,ce=f*Math.min(X,ie),de=E==="mercator"?d7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):E==="equalEarth"?h7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):E==="naturalEarth"?p7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):E==="orthographic"?m7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce):f7().rotate([0,0]).center(c||te.geometry.coordinates).translate([s/2,l/2]).scale(ce);return I.useEffect(()=>{(()=>{if(B.current){const Ne=B.current.getBoundingClientRect().height;$(Ne+16)}})()},[]),v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${s}px`,height:`${l}px`,viewBox:`0 0 ${s} ${l}`,ref:ee,direction:"ltr",children:[v.jsxs("g",{ref:J,children:[n.features.map((Oe,Ne)=>v.jsx("g",{children:Oe.geometry.type==="MultiPolygon"?Oe.geometry.coordinates.map((Te,_e)=>{let xe="";return Te.forEach(we=>{let ge=" M";we.forEach((ve,le)=>{const ue=de([ve[0],ve[1]]);le!==we.length-1?ge=`${ge}${ue[0]} ${ue[1]}L`:ge=`${ge}${ue[0]} ${ue[1]}`}),xe+=ge}),v.jsx("path",{d:xe,style:{stroke:g,strokeWidth:m,fill:y}},_e)}):Oe.geometry.coordinates.map((Te,_e)=>{let xe="M";return Te.forEach((we,ge)=>{const ve=de([we[0],we[1]]);ge!==Te.length-1?xe=`${xe}${ve[0]} ${ve[1]}L`:xe=`${xe}${ve[0]} ${ve[1]}`}),v.jsx("path",{d:xe,style:{stroke:g,strokeWidth:m,fill:y}},_e)})},Ne)),e.map((Oe,Ne)=>{const Te=e.filter(_e=>_e.color).length===0?r[0]:Oe.color?r[i.indexOf(`${Oe.color}`)]:Qe.gray;return v.jsxs("g",{opacity:N?N===Te?1:.3:k.length!==0?k.indexOf(Oe.data.id)!==-1?1:.3:1,onMouseEnter:_e=>{G(Oe),R(_e.clientY),U(_e.clientX),b&&b(Oe)},onMouseMove:_e=>{G(Oe),R(_e.clientY),U(_e.clientX)},onMouseLeave:()=>{G(void 0),U(void 0),R(void 0),b&&b(void 0)},onClick:()=>{(_||T)&&(Sr(V,Oe)&&D?(z(void 0),_==null||_(void 0)):(z(Oe),_==null||_(Oe)))},transform:`translate(${de([Oe.long,Oe.lat])[0]},${de([Oe.long,Oe.lat])[1]})`,children:[v.jsx("circle",{cx:0,cy:0,r:Z?Z(Oe.radius||0):o,style:{fill:e.filter(_e=>_e.color).length===0?r[0]:Oe.color?r[i.indexOf(`${Oe.color}`)]:Qe.gray,stroke:e.filter(_e=>_e.color).length===0?r[0]:Oe.color?r[i.indexOf(`${Oe.color}`)]:Qe.gray,fillOpacity:.8}}),d&&Oe.label?v.jsx("text",{x:Z?Z(Oe.radius||0):o,y:0,className:"fill-primary-gray-600 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"start"},dx:4,dy:5,children:Oe.label}):null]},Ne)})]}),v.jsx("foreignObject",{x:10,y:ne?l-j-5:l-46,width:ne?150:101,height:ne?j:36,children:e.filter(Oe=>Oe.color).length===0||S===!1?null:ne?v.jsxs("div",{ref:B,children:[v.jsx("div",{style:{marginBottom:"-0.75rem",marginLeft:"126px",backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"relative"},onClick:()=>{K(!1)},children:v.jsx(n7,{})}),v.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.5",width:"138px"},children:[a&&a!==""?v.jsx("p",{className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:a}):null,v.jsx("div",{className:"flex flex-col gap-3",children:i.map((Oe,Ne)=>v.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{Y(r[Ne%r.length])},onMouseLeave:()=>{Y(void 0)},children:[v.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[Ne%r.length]}}),v.jsx(or,{size:"sm",marginBottom:"none",leading:"none",children:Oe})]},Ne))})]})]}):v.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{K(!0)},children:v.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})})]}),T?v.jsx(Tr,{open:V!==void 0,onClose:()=>{z(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(T,V)}})}):null,W&&h&&ae&&H?v.jsx(yr,{data:W,body:h,xPos:ae,yPos:H,backgroundStyle:A==null?void 0:A.tooltip,className:M==null?void 0:M.tooltip}):null]})}function nH(t){const{data:e,mapData:r,graphTitle:n,colors:a,sources:i,graphDescription:o,height:l,width:s,footNote:f,colorLegendTitle:c,colorDomain:h,radius:d=5,scale:m=.95,centerPoint:g,padding:y,mapBorderWidth:b=.5,mapNoDataColor:S=Qe.light.graphNoData,backgroundColor:w=!1,showLabels:C=!1,mapBorderColor:k=Qe.light.grays["gray-500"],tooltip:_,relativeHeight:D,onSeriesMouseOver:T,isWorldMap:A=!0,showColorScale:M=!0,zoomScaleExtend:E=[.8,6],zoomTranslateExtend:N,graphID:Y,highlightedDataPoints:ne=[],onSeriesMouseClick:K,graphDownload:B=!1,dataDownload:j=!1,showAntarctica:$=!1,language:V="en",minHeight:z=0,theme:W="light",ariaLabel:G,resetSelectionOnDoubleClick:ae=!0,detailsOnClick:U,styles:H,classNames:R,mapProjection:ee}=t,[J,Z]=I.useState(0),[re,te]=I.useState(0),[F,q]=I.useState(void 0),X=I.useRef(null),ie=I.useRef(null);return I.useEffect(()=>{const ce=new ResizeObserver(de=>{Z(s||de[0].target.clientWidth||760),te(l||de[0].target.clientHeight||480)});return X.current&&(te(X.current.clientHeight||480),Z(X.current.clientWidth||760),s||ce.observe(X.current)),()=>ce.disconnect()},[s,l]),I.useEffect(()=>{typeof r=="string"?ka(r).then(de=>{q(de)}):q(r||u7)},[r]),v.jsx("div",{className:`${W||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:V==="he"||V==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${w?w===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${V||"en"}`,R==null?void 0:R.graphContainer),style:{...(H==null?void 0:H.graphContainer)||{},...w&&w!==!0?{backgroundColor:w}:{}},id:Y,ref:ie,"aria-label":G||`${n?`The graph shows ${n}. `:""}This is a dot density map showing the distribution of a variable across a region or world, with each dot representing a data point.${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:w?y||"1rem":y||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[n||o||B||j?v.jsx(Zt,{styles:{title:H==null?void 0:H.title,description:H==null?void 0:H.description},classNames:{title:R==null?void 0:R.title,description:R==null?void 0:R.description},graphTitle:n,graphDescription:o,width:s,graphDownload:B?ie.current:void 0,dataDownload:j?e.map(ce=>ce.data).filter(ce=>ce!==void 0).length>0?e.map(ce=>ce.data).filter(ce=>ce!==void 0):e.filter(ce=>ce!==void 0):null}):null,v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:X,"aria-label":"Map area",children:(s||J)&&(l||re)&&F?v.jsx(Hpe,{data:e,mapData:$?F:{...F,features:F.features.filter(ce=>ce.properties.NAME!=="Antarctica")},colorDomain:e.filter(ce=>ce.color).length===0?[]:h||Bt(e.filter(ce=>!Fe(ce.color)),"color").map(ce=>`${ce.color}`),width:s||J,height:Math.max(z,l||(D?z?(s||J)*D>z?(s||J)*D:z:(s||J)*D:re)),scale:m,centerPoint:g,colors:e.filter(ce=>ce.color).length===0?a?[a]:[Qe.primaryColors["blue-600"]]:a||Qe[W].categoricalColors.colors,colorLegendTitle:c,radius:d,mapBorderWidth:b,mapNoDataColor:S,mapBorderColor:k,tooltip:_,onSeriesMouseOver:T,showLabels:C,isWorldMap:A,showColorScale:M,zoomScaleExtend:E,zoomTranslateExtend:N,onSeriesMouseClick:K,highlightedDataPoints:ne,resetSelectionOnDoubleClick:ae,styles:H,classNames:R,detailsOnClick:U,mapProjection:ee||(A?"naturalEarth":"mercator")}):null}),i||f?v.jsx(tr,{styles:{footnote:H==null?void 0:H.footnote,source:H==null?void 0:H.source},classNames:{footnote:R==null?void 0:R.footnote,source:R==null?void 0:R.source},sources:i,footNote:f,width:s}):null]})})})})}var Ii=Uint8Array,y6=Uint16Array,qpe=Int32Array,aH=new Ii([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),iH=new Ii([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Wpe=new Ii([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),oH=function(t,e){for(var r=new y6(31),n=0;n<31;++n)r[n]=e+=1<<t[n-1];for(var a=new qpe(r[30]),n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)a[i]=i-r[n]<<5|n;return{b:r,r:a}},lH=oH(aH,2),sH=lH.b,Upe=lH.r;sH[28]=258,Upe[258]=28;var Gpe=oH(iH,0),Ype=Gpe.b,Gy=new y6(32768);for(var Jn=0;Jn<32768;++Jn){var D2=(Jn&43690)>>1|(Jn&21845)<<1;D2=(D2&52428)>>2|(D2&13107)<<2,D2=(D2&61680)>>4|(D2&3855)<<4,Gy[Jn]=((D2&65280)>>8|(D2&255)<<8)>>1}var as=function(t,e,r){for(var n=t.length,a=0,i=new y6(e);a<n;++a)t[a]&&++i[t[a]-1];var o=new y6(e);for(a=1;a<e;++a)o[a]=o[a-1]+i[a-1]<<1;var l;if(r){l=new y6(1<<e);var s=15-e;for(a=0;a<n;++a)if(t[a])for(var f=a<<4|t[a],c=e-t[a],h=o[t[a]-1]++<<c,d=h|(1<<c)-1;h<=d;++h)l[Gy[h]>>s]=f}else for(l=new y6(n),a=0;a<n;++a)t[a]&&(l[a]=Gy[o[t[a]-1]++]>>15-t[a]);return l},l9=new Ii(288);for(var Jn=0;Jn<144;++Jn)l9[Jn]=8;for(var Jn=144;Jn<256;++Jn)l9[Jn]=9;for(var Jn=256;Jn<280;++Jn)l9[Jn]=7;for(var Jn=280;Jn<288;++Jn)l9[Jn]=8;var uH=new Ii(32);for(var Jn=0;Jn<32;++Jn)uH[Jn]=5;var Xpe=as(l9,9,1),Kpe=as(uH,5,1),gm=function(t){for(var e=t[0],r=1;r<t.length;++r)t[r]>e&&(e=t[r]);return e},Co=function(t,e,r){var n=e/8|0;return(t[n]|t[n+1]<<8)>>(e&7)&r},ym=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(e&7)},Jpe=function(t){return(t+7)/8|0},Zpe=function(t,e,r){return(r==null||r>t.length)&&(r=t.length),new Ii(t.subarray(e,r))},Qpe=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Li=function(t,e,r){var n=new Error(e||Qpe[t]);if(n.code=t,Error.captureStackTrace&&Error.captureStackTrace(n,Li),!r)throw n;return n},Qx=function(t,e,r,n){var a=t.length,i=0;if(!a||e.f&&!e.l)return r||new Ii(0);var o=!r,l=o||e.i!=2,s=e.i;o&&(r=new Ii(a*3));var f=function(F){var q=r.length;if(F>q){var X=new Ii(Math.max(q*2,F));X.set(r),r=X}},c=e.f||0,h=e.p||0,d=e.b||0,m=e.l,g=e.d,y=e.m,b=e.n,S=a*8;do{if(!m){c=Co(t,h,1);var w=Co(t,h+1,3);if(h+=3,w)if(w==1)m=Xpe,g=Kpe,y=9,b=5;else if(w==2){var D=Co(t,h,31)+257,T=Co(t,h+10,15)+4,A=D+Co(t,h+5,31)+1;h+=14;for(var M=new Ii(A),E=new Ii(19),N=0;N<T;++N)E[Wpe[N]]=Co(t,h+N*3,7);h+=T*3;for(var Y=gm(E),ne=(1<<Y)-1,K=as(E,Y,1),N=0;N<A;){var B=K[Co(t,h,ne)];h+=B&15;var C=B>>4;if(C<16)M[N++]=C;else{var j=0,$=0;for(C==16?($=3+Co(t,h,3),h+=2,j=M[N-1]):C==17?($=3+Co(t,h,7),h+=3):C==18&&($=11+Co(t,h,127),h+=7);$--;)M[N++]=j}}var V=M.subarray(0,D),z=M.subarray(D);y=gm(V),b=gm(z),m=as(V,y,1),g=as(z,b,1)}else Li(1);else{var C=Jpe(h)+4,k=t[C-4]|t[C-3]<<8,_=C+k;if(_>a){s&&Li(0);break}l&&f(d+k),r.set(t.subarray(C,_),d),e.b=d+=k,e.p=h=_*8,e.f=c;continue}if(h>S){s&&Li(0);break}}l&&f(d+131072);for(var W=(1<<y)-1,G=(1<<b)-1,ae=h;;ae=h){var j=m[ym(t,h)&W],U=j>>4;if(h+=j&15,h>S){s&&Li(0);break}if(j||Li(2),U<256)r[d++]=U;else if(U==256){ae=h,m=null;break}else{var H=U-254;if(U>264){var N=U-257,R=aH[N];H=Co(t,h,(1<<R)-1)+sH[N],h+=R}var ee=g[ym(t,h)&G],J=ee>>4;ee||Li(3),h+=ee&15;var z=Ype[J];if(J>3){var R=iH[J];z+=ym(t,h)&(1<<R)-1,h+=R}if(h>S){s&&Li(0);break}l&&f(d+131072);var Z=d+H;if(d<z){var re=i-z,te=Math.min(z,Z);for(re+d<0&&Li(3);d<te;++d)r[d]=n[re+d]}for(;d<Z;++d)r[d]=r[d-z]}}e.l=m,e.p=ae,e.b=d,e.f=c,m&&(c=1,e.m=y,e.d=g,e.n=b)}while(!c);return d!=r.length&&o?Zpe(r,0,d):r.subarray(0,d)},eme=new Ii(0),tme=function(t){(t[0]!=31||t[1]!=139||t[2]!=8)&&Li(6,"invalid gzip data");var e=t[3],r=10;e&4&&(r+=(t[10]|t[11]<<8)+2);for(var n=(e>>3&1)+(e>>4&1);n>0;n-=!t[r++]);return r+(e&2)},rme=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},nme=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&Li(6,"invalid zlib data"),(t[1]>>5&1)==1&&Li(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function ame(t,e){return Qx(t,{i:2},e,e)}function ime(t,e){var r=tme(t);return r+8>t.length&&Li(6,"invalid gzip data"),Qx(t.subarray(r,-8),{i:2},new Ii(rme(t)),e)}function ome(t,e){return Qx(t.subarray(nme(t),-4),{i:2},e,e)}function lme(t,e){return t[0]==31&&t[1]==139&&t[2]==8?ime(t,e):(t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?ame(t,e):ome(t,e)}var sme=typeof TextDecoder<"u"&&new TextDecoder,ume=0;try{sme.decode(eme,{stream:!0}),ume=1}catch{}var cme=Object.defineProperty,is=Math.pow,En=(t,e)=>cme(t,"name",{value:e,configurable:!0}),u1=(t,e,r)=>new Promise((n,a)=>{var i=s=>{try{l(r.next(s))}catch(f){a(f)}},o=s=>{try{l(r.throw(s))}catch(f){a(f)}},l=s=>s.done?n(s.value):Promise.resolve(s.value).then(i,o);l((r=r.apply(t,e)).next())});En((t,e)=>{let r=!1,n="",a=L.GridLayer.extend({createTile:En((i,o)=>{let l=document.createElement("img"),s=new AbortController,f=s.signal;return l.cancel=()=>{s.abort()},r||(t.getHeader().then(c=>{c.tileType===1?console.error("Error: archive contains MVT vector tiles, but leafletRasterLayer is for displaying raster tiles. See https://github.com/protomaps/PMTiles/tree/main/js for details."):c.tileType===2?n="image/png":c.tileType===3?n="image/jpeg":c.tileType===4?n="image/webp":c.tileType===5&&(n="image/avif")}),r=!0),t.getZxy(i.z,i.x,i.y,f).then(c=>{if(c){let h=new Blob([c.data],{type:n}),d=window.URL.createObjectURL(h);l.src=d,l.cancel=void 0,o(void 0,l)}}).catch(c=>{if(c.name!=="AbortError")throw c}),l},"createTile"),_removeTile:En(function(i){let o=this._tiles[i];o&&(o.el.cancel&&o.el.cancel(),o.el.width=0,o.el.height=0,o.el.deleted=!0,L.DomUtil.remove(o.el),delete this._tiles[i],this.fire("tileunload",{tile:o.el,coords:this._keyToTileCoords(i)}))},"_removeTile")});return new a(e)},"leafletRasterLayer");var fme=En(t=>(e,r)=>{if(r instanceof AbortController)return t(e,r);let n=new AbortController;return t(e,n).then(a=>r(void 0,a.data,a.cacheControl||"",a.expires||""),a=>r(a)).catch(a=>r(a)),{cancel:En(()=>n.abort(),"cancel")}},"v3compat"),cH=class{constructor(e){this.tilev4=En((r,n)=>u1(this,null,function*(){if(r.type==="json"){let m=r.url.substr(10),g=this.tiles.get(m);if(g||(g=new OM(m),this.tiles.set(m,g)),this.metadata)return{data:yield g.getTileJson(r.url)};let y=yield g.getHeader();return(y.minLon>=y.maxLon||y.minLat>=y.maxLat)&&console.error(`Bounds of PMTiles archive ${y.minLon},${y.minLat},${y.maxLon},${y.maxLat} are not valid.`),{data:{tiles:[`${r.url}/{z}/{x}/{y}`],minzoom:y.minZoom,maxzoom:y.maxZoom,bounds:[y.minLon,y.minLat,y.maxLon,y.maxLat]}}}let a=new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/),i=r.url.match(a);if(!i)throw new Error("Invalid PMTiles protocol URL");let o=i[1],l=this.tiles.get(o);l||(l=new OM(o),this.tiles.set(o,l));let s=i[2],f=i[3],c=i[4],h=yield l.getHeader(),d=yield l==null?void 0:l.getZxy(+s,+f,+c,n.signal);if(d)return{data:new Uint8Array(d.data),cacheControl:d.cacheControl,expires:d.expires};if(h.tileType===1){if(this.errorOnMissingTile)throw new Error("Tile not found.");return{data:new Uint8Array}}return{data:null}}),"tilev4"),this.tile=fme(this.tilev4),this.tiles=new Map,this.metadata=(e==null?void 0:e.metadata)||!1,this.errorOnMissingTile=(e==null?void 0:e.errorOnMissingTile)||!1}add(e){this.tiles.set(e.source.getKey(),e)}get(e){return this.tiles.get(e)}};En(cH,"Protocol");var Rf=cH;function fH(t,e){return(e>>>0)*4294967296+(t>>>0)}En(fH,"toNum");function dH(t,e){let r=e.buf,n=r[e.pos++],a=(n&112)>>4;if(n<128||(n=r[e.pos++],a|=(n&127)<<3,n<128)||(n=r[e.pos++],a|=(n&127)<<10,n<128)||(n=r[e.pos++],a|=(n&127)<<17,n<128)||(n=r[e.pos++],a|=(n&127)<<24,n<128)||(n=r[e.pos++],a|=(n&1)<<31,n<128))return fH(t,a);throw new Error("Expected varint not more than 10 bytes")}En(dH,"readVarintRemainder");function l6(t){let e=t.buf,r=e[t.pos++],n=r&127;return r<128||(r=e[t.pos++],n|=(r&127)<<7,r<128)||(r=e[t.pos++],n|=(r&127)<<14,r<128)||(r=e[t.pos++],n|=(r&127)<<21,r<128)?n:(r=e[t.pos],n|=(r&15)<<28,dH(n,t))}En(l6,"readVarint");function ew(t,e,r,n){if(n===0){r===1&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);let a=e[0];e[0]=e[1],e[1]=a}}En(ew,"rotate");function hH(t,e){let r=is(2,t),n=e,a=e,i=e,o=[0,0],l=1;for(;l<r;)n=1&i/2,a=1&(i^n),ew(l,o,n,a),o[0]+=l*n,o[1]+=l*a,i=i/4,l*=2;return[t,o[0],o[1]]}En(hH,"idOnLevel");var dme=[0,1,5,21,85,341,1365,5461,21845,87381,349525,1398101,5592405,22369621,89478485,357913941,1431655765,5726623061,22906492245,91625968981,366503875925,1466015503701,5864062014805,23456248059221,93824992236885,375299968947541,0x5555555555555];function pH(t,e,r){if(t>26)throw new Error("Tile zoom level exceeds max safe number limit (26)");if(e>is(2,t)-1||r>is(2,t)-1)throw new Error("tile x/y outside zoom level bounds");let n=dme[t],a=is(2,t),i=0,o=0,l=0,s=[e,r],f=a/2;for(;f>0;)i=(s[0]&f)>0?1:0,o=(s[1]&f)>0?1:0,l+=f*f*(3*i^o),ew(f,s,i,o),f=f/2;return n+l}En(pH,"zxyToTileId");function hme(t){let e=0;for(let r=0;r<27;r++){let n=(1<<r)*(1<<r);if(e+n>t)return hH(r,t-e);e+=n}throw new Error("Tile zoom level exceeds max safe number limit (26)")}En(hme,"tileIdToZxy");var pme=(t=>(t[t.Unknown=0]="Unknown",t[t.None=1]="None",t[t.Gzip=2]="Gzip",t[t.Brotli=3]="Brotli",t[t.Zstd=4]="Zstd",t))(pme||{});function $f(t,e){return u1(this,null,function*(){if(e===1||e===0)return t;if(e===2){if(typeof globalThis.DecompressionStream>"u")return lme(new Uint8Array(t));let r=new Response(t).body;if(!r)throw new Error("Failed to read response stream");let n=r.pipeThrough(new globalThis.DecompressionStream("gzip"));return new Response(n).arrayBuffer()}throw new Error("Compression method not supported")})}En($f,"defaultDecompress");var mme=(t=>(t[t.Unknown=0]="Unknown",t[t.Mvt=1]="Mvt",t[t.Png=2]="Png",t[t.Jpeg=3]="Jpeg",t[t.Webp=4]="Webp",t[t.Avif=5]="Avif",t))(mme||{});function mH(t){return t===1?".mvt":t===2?".png":t===3?".jpg":t===4?".webp":t===5?".avif":""}En(mH,"tileTypeExt");var gme=127;function gH(t,e){let r=0,n=t.length-1;for(;r<=n;){let a=n+r>>1,i=e-t[a].tileId;if(i>0)r=a+1;else if(i<0)n=a-1;else return t[a]}return n>=0&&(t[n].runLength===0||e-t[n].tileId<t[n].runLength)?t[n]:null}En(gH,"findTile");var yme=class{constructor(e){this.file=e}getKey(){return this.file.name}getBytes(e,r){return u1(this,null,function*(){return{data:yield this.file.slice(e,e+r).arrayBuffer()}})}};En(yme,"FileSource");var yH=class{constructor(e,r=new Headers){this.url=e,this.customHeaders=r,this.mustReload=!1;let n="";"navigator"in globalThis&&(n=globalThis.navigator.userAgent||"");let a=n.indexOf("Windows")>-1,i=/Chrome|Chromium|Edg|OPR|Brave/.test(n);this.chromeWindowsNoCache=!1,a&&i&&(this.chromeWindowsNoCache=!0)}getKey(){return this.url}setHeaders(e){this.customHeaders=e}getBytes(e,r,n,a){return u1(this,null,function*(){let i,o;n?o=n:(i=new AbortController,o=i.signal);let l=new Headers(this.customHeaders);l.set("range",`bytes=${e}-${e+r-1}`);let s;this.mustReload?s="reload":this.chromeWindowsNoCache&&(s="no-store");let f=yield fetch(this.url,{signal:o,cache:s,headers:l});if(e===0&&f.status===416){let d=f.headers.get("Content-Range");if(!d||!d.startsWith("bytes */"))throw new Error("Missing content-length on 416 response");let m=+d.substr(8);f=yield fetch(this.url,{signal:o,cache:"reload",headers:{range:`bytes=0-${m-1}`}})}let c=f.headers.get("Etag");if(c!=null&&c.startsWith("W/")&&(c=null),f.status===416||a&&c&&c!==a)throw this.mustReload=!0,new Yy(`Server returned non-matching ETag ${a} after one retry. Check browser extensions and servers for issues that may affect correct ETag headers.`);if(f.status>=300)throw new Error(`Bad response code: ${f.status}`);let h=f.headers.get("Content-Length");if(f.status===200&&(!h||+h>r))throw i&&i.abort(),new Error("Server returned no content-length header or content-length exceeding request. Check that your storage backend supports HTTP Byte Serving.");return{data:yield f.arrayBuffer(),etag:c||void 0,cacheControl:f.headers.get("Cache-Control")||void 0,expires:f.headers.get("Expires")||void 0}})}};En(yH,"FetchSource");var vme=yH;function ro(t,e){let r=t.getUint32(e+4,!0),n=t.getUint32(e+0,!0);return r*is(2,32)+n}En(ro,"getUint64");function vH(t,e){let r=new DataView(t),n=r.getUint8(7);if(n>3)throw new Error(`Archive is spec version ${n} but this library supports up to spec version 3`);return{specVersion:n,rootDirectoryOffset:ro(r,8),rootDirectoryLength:ro(r,16),jsonMetadataOffset:ro(r,24),jsonMetadataLength:ro(r,32),leafDirectoryOffset:ro(r,40),leafDirectoryLength:ro(r,48),tileDataOffset:ro(r,56),tileDataLength:ro(r,64),numAddressedTiles:ro(r,72),numTileEntries:ro(r,80),numTileContents:ro(r,88),clustered:r.getUint8(96)===1,internalCompression:r.getUint8(97),tileCompression:r.getUint8(98),tileType:r.getUint8(99),minZoom:r.getUint8(100),maxZoom:r.getUint8(101),minLon:r.getInt32(102,!0)/1e7,minLat:r.getInt32(106,!0)/1e7,maxLon:r.getInt32(110,!0)/1e7,maxLat:r.getInt32(114,!0)/1e7,centerZoom:r.getUint8(118),centerLon:r.getInt32(119,!0)/1e7,centerLat:r.getInt32(123,!0)/1e7,etag:e}}En(vH,"bytesToHeader");function tw(t){let e={buf:new Uint8Array(t),pos:0},r=l6(e),n=[],a=0;for(let i=0;i<r;i++){let o=l6(e);n.push({tileId:a+o,offset:0,length:0,runLength:1}),a+=o}for(let i=0;i<r;i++)n[i].runLength=l6(e);for(let i=0;i<r;i++)n[i].length=l6(e);for(let i=0;i<r;i++){let o=l6(e);o===0&&i>0?n[i].offset=n[i-1].offset+n[i-1].length:n[i].offset=o-1}return n}En(tw,"deserializeIndex");var bH=class extends Error{};En(bH,"EtagMismatch");var Yy=bH;function rw(t,e){return u1(this,null,function*(){let r=yield t.getBytes(0,16384);if(new DataView(r.data).getUint16(0,!0)!==19792)throw new Error("Wrong magic number for PMTiles archive");let n=r.data.slice(0,gme),a=vH(n,r.etag),i=r.data.slice(a.rootDirectoryOffset,a.rootDirectoryOffset+a.rootDirectoryLength),o=`${t.getKey()}|${a.etag||""}|${a.rootDirectoryOffset}|${a.rootDirectoryLength}`,l=tw(yield e(i,a.internalCompression));return[a,[o,l.length,l]]})}En(rw,"getHeaderAndRoot");function nw(t,e,r,n,a){return u1(this,null,function*(){let i=yield t.getBytes(r,n,void 0,a.etag),o=yield e(i.data,a.internalCompression),l=tw(o);if(l.length===0)throw new Error("Empty directory is invalid");return l})}En(nw,"getDirectory");var bme=class{constructor(e=100,r=!0,n=$f){this.cache=new Map,this.maxCacheEntries=e,this.counter=1,this.decompress=n}getHeader(e){return u1(this,null,function*(){let r=e.getKey(),n=this.cache.get(r);if(n)return n.lastUsed=this.counter++,n.data;let a=yield rw(e,this.decompress);return a[1]&&this.cache.set(a[1][0],{lastUsed:this.counter++,data:a[1][2]}),this.cache.set(r,{lastUsed:this.counter++,data:a[0]}),this.prune(),a[0]})}getDirectory(e,r,n,a){return u1(this,null,function*(){let i=`${e.getKey()}|${a.etag||""}|${r}|${n}`,o=this.cache.get(i);if(o)return o.lastUsed=this.counter++,o.data;let l=yield nw(e,this.decompress,r,n,a);return this.cache.set(i,{lastUsed:this.counter++,data:l}),this.prune(),l})}prune(){if(this.cache.size>this.maxCacheEntries){let e=1/0,r;this.cache.forEach((n,a)=>{n.lastUsed<e&&(e=n.lastUsed,r=a)}),r&&this.cache.delete(r)}}invalidate(e){return u1(this,null,function*(){this.cache.delete(e.getKey())})}};En(bme,"ResolvedValueCache");var xH=class{constructor(e=100,r=!0,n=$f){this.cache=new Map,this.invalidations=new Map,this.maxCacheEntries=e,this.counter=1,this.decompress=n}getHeader(e){return u1(this,null,function*(){let r=e.getKey(),n=this.cache.get(r);if(n)return n.lastUsed=this.counter++,yield n.data;let a=new Promise((i,o)=>{rw(e,this.decompress).then(l=>{l[1]&&this.cache.set(l[1][0],{lastUsed:this.counter++,data:Promise.resolve(l[1][2])}),i(l[0]),this.prune()}).catch(l=>{o(l)})});return this.cache.set(r,{lastUsed:this.counter++,data:a}),a})}getDirectory(e,r,n,a){return u1(this,null,function*(){let i=`${e.getKey()}|${a.etag||""}|${r}|${n}`,o=this.cache.get(i);if(o)return o.lastUsed=this.counter++,yield o.data;let l=new Promise((s,f)=>{nw(e,this.decompress,r,n,a).then(c=>{s(c),this.prune()}).catch(c=>{f(c)})});return this.cache.set(i,{lastUsed:this.counter++,data:l}),l})}prune(){if(this.cache.size>=this.maxCacheEntries){let e=1/0,r;this.cache.forEach((n,a)=>{n.lastUsed<e&&(e=n.lastUsed,r=a)}),r&&this.cache.delete(r)}}invalidate(e){return u1(this,null,function*(){let r=e.getKey();if(this.invalidations.get(r))return yield this.invalidations.get(r);this.cache.delete(e.getKey());let n=new Promise((a,i)=>{this.getHeader(e).then(o=>{a(),this.invalidations.delete(r)}).catch(o=>{i(o)})});this.invalidations.set(r,n)})}};En(xH,"SharedPromiseCache");var xme=xH,wH=class{constructor(e,r,n){typeof e=="string"?this.source=new vme(e):this.source=e,n?this.decompress=n:this.decompress=$f,r?this.cache=r:this.cache=new xme}getHeader(){return u1(this,null,function*(){return yield this.cache.getHeader(this.source)})}getZxyAttempt(e,r,n,a){return u1(this,null,function*(){let i=pH(e,r,n),o=yield this.cache.getHeader(this.source);if(e<o.minZoom||e>o.maxZoom)return;let l=o.rootDirectoryOffset,s=o.rootDirectoryLength;for(let f=0;f<=3;f++){let c=yield this.cache.getDirectory(this.source,l,s,o),h=gH(c,i);if(h){if(h.runLength>0){let d=yield this.source.getBytes(o.tileDataOffset+h.offset,h.length,a,o.etag);return{data:yield this.decompress(d.data,o.tileCompression),cacheControl:d.cacheControl,expires:d.expires}}l=o.leafDirectoryOffset+h.offset,s=h.length}else return}throw new Error("Maximum directory depth exceeded")})}getZxy(e,r,n,a){return u1(this,null,function*(){try{return yield this.getZxyAttempt(e,r,n,a)}catch(i){if(i instanceof Yy)return this.cache.invalidate(this.source),yield this.getZxyAttempt(e,r,n,a);throw i}})}getMetadataAttempt(){return u1(this,null,function*(){let e=yield this.cache.getHeader(this.source),r=yield this.source.getBytes(e.jsonMetadataOffset,e.jsonMetadataLength,void 0,e.etag),n=yield this.decompress(r.data,e.internalCompression),a=new TextDecoder("utf-8");return JSON.parse(a.decode(n))})}getMetadata(){return u1(this,null,function*(){try{return yield this.getMetadataAttempt()}catch(e){if(e instanceof Yy)return this.cache.invalidate(this.source),yield this.getMetadataAttempt();throw e}})}getTileJson(e){return u1(this,null,function*(){let r=yield this.getHeader(),n=yield this.getMetadata(),a=mH(r.tileType);return{tilejson:"3.0.0",scheme:"xyz",tiles:[`${e}/{z}/{x}/{y}${a}`],vector_layers:n.vector_layers,attribution:n.attribution,description:n.description,name:n.name,version:n.version,bounds:[r.minLon,r.minLat,r.maxLon,r.maxLat],center:[r.centerLon,r.centerLat,r.centerZoom],minzoom:r.minZoom,maxzoom:r.maxZoom}})}};En(wH,"PMTiles");var OM=wH,vm,DM;function wme(){if(DM)return vm;DM=1;var t="__lodash_hash_undefined__",e=9007199254740991,r="[object Function]",n="[object GeneratorFunction]",a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=typeof kr=="object"&&kr&&kr.Object===Object&&kr,l=typeof self=="object"&&self&&self.Object===Object&&self,s=o||l||Function("return this")();function f(Ie,Ze,Ke){switch(Ke.length){case 0:return Ie.call(Ze);case 1:return Ie.call(Ze,Ke[0]);case 2:return Ie.call(Ze,Ke[0],Ke[1]);case 3:return Ie.call(Ze,Ke[0],Ke[1],Ke[2])}return Ie.apply(Ze,Ke)}function c(Ie,Ze){var Ke=Ie?Ie.length:0;return!!Ke&&m(Ie,Ze,0)>-1}function h(Ie,Ze){for(var Ke=-1,et=Ie?Ie.length:0,Pt=Array(et);++Ke<et;)Pt[Ke]=Ze(Ie[Ke],Ke,Ie);return Pt}function d(Ie,Ze,Ke,et){for(var Pt=Ie.length,jt=Ke+-1;++jt<Pt;)if(Ze(Ie[jt],jt,Ie))return jt;return-1}function m(Ie,Ze,Ke){if(Ze!==Ze)return d(Ie,g,Ke);for(var et=Ke-1,Pt=Ie.length;++et<Pt;)if(Ie[et]===Ze)return et;return-1}function g(Ie){return Ie!==Ie}function y(Ie,Ze){return Ie.has(Ze)}function b(Ie,Ze){return Ie==null?void 0:Ie[Ze]}function S(Ie){var Ze=!1;if(Ie!=null&&typeof Ie.toString!="function")try{Ze=!!(Ie+"")}catch{}return Ze}var w=Array.prototype,C=Function.prototype,k=Object.prototype,_=s["__core-js_shared__"],D=function(){var Ie=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||"");return Ie?"Symbol(src)_1."+Ie:""}(),T=C.toString,A=k.hasOwnProperty,M=k.toString,E=RegExp("^"+T.call(A).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=w.splice,Y=Math.max,ne=Math.min,K=we(s,"Map"),B=we(Object,"create");function j(Ie){var Ze=-1,Ke=Ie?Ie.length:0;for(this.clear();++Ze<Ke;){var et=Ie[Ze];this.set(et[0],et[1])}}function $(){this.__data__=B?B(null):{}}function V(Ie){return this.has(Ie)&&delete this.__data__[Ie]}function z(Ie){var Ze=this.__data__;if(B){var Ke=Ze[Ie];return Ke===t?void 0:Ke}return A.call(Ze,Ie)?Ze[Ie]:void 0}function W(Ie){var Ze=this.__data__;return B?Ze[Ie]!==void 0:A.call(Ze,Ie)}function G(Ie,Ze){var Ke=this.__data__;return Ke[Ie]=B&&Ze===void 0?t:Ze,this}j.prototype.clear=$,j.prototype.delete=V,j.prototype.get=z,j.prototype.has=W,j.prototype.set=G;function ae(Ie){var Ze=-1,Ke=Ie?Ie.length:0;for(this.clear();++Ze<Ke;){var et=Ie[Ze];this.set(et[0],et[1])}}function U(){this.__data__=[]}function H(Ie){var Ze=this.__data__,Ke=he(Ze,Ie);if(Ke<0)return!1;var et=Ze.length-1;return Ke==et?Ze.pop():N.call(Ze,Ke,1),!0}function R(Ie){var Ze=this.__data__,Ke=he(Ze,Ie);return Ke<0?void 0:Ze[Ke][1]}function ee(Ie){return he(this.__data__,Ie)>-1}function J(Ie,Ze){var Ke=this.__data__,et=he(Ke,Ie);return et<0?Ke.push([Ie,Ze]):Ke[et][1]=Ze,this}ae.prototype.clear=U,ae.prototype.delete=H,ae.prototype.get=R,ae.prototype.has=ee,ae.prototype.set=J;function Z(Ie){var Ze=-1,Ke=Ie?Ie.length:0;for(this.clear();++Ze<Ke;){var et=Ie[Ze];this.set(et[0],et[1])}}function re(){this.__data__={hash:new j,map:new(K||ae),string:new j}}function te(Ie){return xe(this,Ie).delete(Ie)}function F(Ie){return xe(this,Ie).get(Ie)}function q(Ie){return xe(this,Ie).has(Ie)}function X(Ie,Ze){return xe(this,Ie).set(Ie,Ze),this}Z.prototype.clear=re,Z.prototype.delete=te,Z.prototype.get=F,Z.prototype.has=q,Z.prototype.set=X;function ie(Ie){var Ze=-1,Ke=Ie?Ie.length:0;for(this.__data__=new Z;++Ze<Ke;)this.add(Ie[Ze])}function ce(Ie){return this.__data__.set(Ie,t),this}function de(Ie){return this.__data__.has(Ie)}ie.prototype.add=ie.prototype.push=ce,ie.prototype.has=de;function he(Ie,Ze){for(var Ke=Ie.length;Ke--;)if(Ce(Ie[Ke][0],Ze))return Ke;return-1}function Oe(Ie,Ze,Ke){for(var et=c,Pt=Ie[0].length,jt=Ie.length,Tt=jt,St=Array(jt),tt=1/0,Mt=[];Tt--;){var Dt=Ie[Tt];tt=ne(Dt.length,tt),St[Tt]=Pt>=120&&Dt.length>=120?new ie(Tt&&Dt):void 0}Dt=Ie[0];var Ye=-1,Lt=St[0];e:for(;++Ye<Pt&&Mt.length<tt;){var Et=Dt[Ye],Xt=Et;if(Et=Et!==0?Et:0,!(Lt?y(Lt,Xt):et(Mt,Xt))){for(Tt=jt;--Tt;){var He=St[Tt];if(!(He?y(He,Xt):et(Ie[Tt],Xt)))continue e}Lt&&Lt.push(Xt),Mt.push(Et)}}return Mt}function Ne(Ie){if(!$e(Ie)||ve(Ie))return!1;var Ze=be(Ie)||S(Ie)?E:i;return Ze.test(le(Ie))}function Te(Ie,Ze){return Ze=Y(Ze===void 0?Ie.length-1:Ze,0),function(){for(var Ke=arguments,et=-1,Pt=Y(Ke.length-Ze,0),jt=Array(Pt);++et<Pt;)jt[et]=Ke[Ze+et];et=-1;for(var Tt=Array(Ze+1);++et<Ze;)Tt[et]=Ke[et];return Tt[Ze]=jt,f(Ie,this,Tt)}}function _e(Ie){return ye(Ie)?Ie:[]}function xe(Ie,Ze){var Ke=Ie.__data__;return ge(Ze)?Ke[typeof Ze=="string"?"string":"hash"]:Ke.map}function we(Ie,Ze){var Ke=b(Ie,Ze);return Ne(Ke)?Ke:void 0}function ge(Ie){var Ze=typeof Ie;return Ze=="string"||Ze=="number"||Ze=="symbol"||Ze=="boolean"?Ie!=="__proto__":Ie===null}function ve(Ie){return!!D&&D in Ie}function le(Ie){if(Ie!=null){try{return T.call(Ie)}catch{}try{return Ie+""}catch{}}return""}var ue=Te(function(Ie){var Ze=h(Ie,_e);return Ze.length&&Ze[0]===Ie[0]?Oe(Ze):[]});function Ce(Ie,Ze){return Ie===Ze||Ie!==Ie&&Ze!==Ze}function pe(Ie){return Ie!=null&&je(Ie.length)&&!be(Ie)}function ye(Ie){return ut(Ie)&&pe(Ie)}function be(Ie){var Ze=$e(Ie)?M.call(Ie):"";return Ze==r||Ze==n}function je(Ie){return typeof Ie=="number"&&Ie>-1&&Ie%1==0&&Ie<=e}function $e(Ie){var Ze=typeof Ie;return!!Ie&&(Ze=="object"||Ze=="function")}function ut(Ie){return!!Ie&&typeof Ie=="object"}return vm=ue,vm}var Sme=wme();const K3=_a(Sme);function po(t,e){return e.length===0?t:t.filter(a=>e.every(i=>i.includeValues&&i.includeValues.length>0?K3(f1([a[i.column]]),i.includeValues).length>0:!0)).filter(a=>e.every(i=>i.excludeValues&&i.excludeValues.length>0?K3(f1([a[i.column]]),i.excludeValues).length===0:!0))}function Cme(t){const{mapStyle:e,height:r,width:n,relativeHeight:a,center:i,zoomLevel:o,minHeight:l,includeLayers:s,excludeLayers:f}=t,[c,h]=I.useState(0),[d,m]=I.useState(0),g=I.useRef(null),y=I.useRef(null),b=I.useRef(null);return I.useEffect(()=>{const S=new ResizeObserver(w=>{h(n||w[0].target.clientWidth||620),m(r||w[0].target.clientHeight||480)});return g.current&&(m(g.current.clientHeight||480),h(g.current.clientWidth||620),n||S.observe(g.current)),()=>S.disconnect()},[n,r]),I.useEffect(()=>{y.current&&c&&!b.current&&ka(e).then(S=>{Qr(y.current).selectAll("div").remove();const C=new Rf;Pi.addProtocol("pmtiles",C.tile);const k={container:y.current,style:s.length===0&&f.length===0?S:{...S,layers:po(S.layers,[{column:"id",includeValues:s,excludeValues:f}])}};i&&(k.center=i),o&&(k.zoom=o),b.current=new Pi.Map(k),b.current.addControl(new Pi.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),b.current.addControl(new Pi.ScaleControl,"bottom-left")})},[c,i,o,s,f,e]),I.useEffect(()=>{b.current&&ka(e).then(S=>{const w={...S,layers:po(S.layers,[{column:"id",includeValues:s,excludeValues:f}])};b.current.setStyle(w)})},[f,s,e]),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:g,"aria-label":"Map area",children:(n||c)&&(r||d)?v.jsx("div",{style:{width:n||c,height:Math.max(l,r||(a?l?(n||c)*a>l?(n||c)*a:l:(n||c)*a:d))},children:v.jsx("div",{ref:y,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}})}):null})}function kme(t){const{mapStyle:e,height:r,width:n,relativeHeight:a,center:i,zoomLevel:o,minHeight:l,includeLayers:s,excludeLayers:f}=t,[c,h]=I.useState(0),[d,m]=I.useState(0),g=I.useRef(null),y=I.useRef(null);return I.useEffect(()=>{const b=new ResizeObserver(S=>{h(n||S[0].target.clientWidth||620),m(r||S[0].target.clientHeight||480)});return g.current&&(m(g.current.clientHeight||480),h(g.current.clientWidth||620),n||b.observe(g.current)),()=>b.disconnect()},[n,r]),I.useEffect(()=>{y.current&&c&&ka(e).then(b=>{Qr(y.current).selectAll("div").remove();const w=new Rf;Pi.addProtocol("pmtiles",w.tile);const C={container:y.current,style:s.length===0&&f.length===0?b:{...b,layers:po(b.layers,[{column:"id",includeValues:s,excludeValues:f}])}};i&&(C.center=i),o&&(C.zoom=o);const k=new Pi.Map(C);k.addControl(new Pi.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),k.addControl(new Pi.ScaleControl,"bottom-left")})},[c,e,i,o,s,f]),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:g,"aria-label":"Map area",children:(n||c)&&(r||d)?v.jsx("div",{style:{width:n||c,height:Math.max(l,r||(a?l?(n||c)*a>l?(n||c)*a:l:(n||c)*a:d))},children:v.jsx("div",{ref:y,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}})}):null})}function SH(t){const{mapStyle:e,graphTitle:r,height:n,width:a,relativeHeight:i,sources:o,graphDescription:l,footNote:s,padding:f,backgroundColor:c=!1,center:h,zoomLevel:d,graphID:m,language:g="en",minHeight:y=0,theme:b="light",includeLayers:S=[],excludeLayers:w=[],ariaLabel:C,uiMode:k="normal",styles:_,classNames:D}=t,[T,A]=I.useState(typeof e=="string"?e:e[0].style);I.useEffect(()=>{A(typeof e=="string"?e:e[0].style)},[e]);const M=I.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]);return v.jsx("div",{className:`${b||"light"} flex ${a?"w-fit grow-0":"w-full grow"}`,dir:g==="he"||g==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${c?c===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${g||"en"}`,D==null?void 0:D.graphContainer),style:{...(_==null?void 0:_.graphContainer)||{},...c&&c!==!0?{backgroundColor:c}:{}},id:m,"aria-label":C||`${r?`The graph shows ${r}. `:""}This is a map.${l?` ${l}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:c?f||"1rem":f||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||l?v.jsx(Zt,{styles:{title:_==null?void 0:_.title,description:_==null?void 0:_.description},classNames:{title:D==null?void 0:D.title,description:D==null?void 0:D.description},graphTitle:r,graphDescription:l,width:a}):null,typeof e=="string"?null:v.jsx(s1,{options:e.map(E=>({label:E.name,value:E.style})),isClearable:!1,size:"sm",variant:k,isRtl:g==="he"||g==="ar",isSearchable:!0,filterOption:Z1(M),defaultValue:{label:e[0].name,value:e[0].style},controlShouldRenderValue:!0,onChange:E=>{E&&A(E.value)}}),typeof e=="string"?v.jsx(kme,{mapStyle:e,center:h,zoomLevel:d,width:a,height:n,relativeHeight:i,minHeight:y,includeLayers:S,excludeLayers:w}):v.jsx(Cme,{mapStyle:T,center:h,zoomLevel:d,width:a,height:n,relativeHeight:i,minHeight:y,includeLayers:S,excludeLayers:w}),o||s?v.jsx(tr,{styles:{footnote:_==null?void 0:_.footnote,source:_==null?void 0:_.source},classNames:{footnote:D==null?void 0:D.footnote,source:D==null?void 0:D.source},sources:o,footNote:s,width:a}):null]})})})})}const Bf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function v7(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function aw(t){return"nodeType"in t}function xi(t){var e,r;return t?v7(t)?t:aw(t)&&(e=(r=t.ownerDocument)==null?void 0:r.defaultView)!=null?e:window:window}function iw(t){const{Document:e}=xi(t);return t instanceof e}function s9(t){return v7(t)?!1:t instanceof xi(t).HTMLElement}function CH(t){return t instanceof xi(t).SVGElement}function b7(t){return t?v7(t)?t.document:aw(t)?iw(t)?t:s9(t)||CH(t)?t.ownerDocument:document:document:document}const F2=Bf?I.useLayoutEffect:I.useEffect;function ow(t){const e=I.useRef(t);return F2(()=>{e.current=t}),I.useCallback(function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return e.current==null?void 0:e.current(...n)},[])}function _me(){const t=I.useRef(null),e=I.useCallback((n,a)=>{t.current=setInterval(n,a)},[]),r=I.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,r]}function lw(t,e){e===void 0&&(e=[t]);const r=I.useRef(t);return F2(()=>{r.current!==t&&(r.current=t)},e),r}function u9(t,e){const r=I.useRef();return I.useMemo(()=>{const n=t(r.current);return r.current=n,n},[...e])}function Xy(t){const e=ow(t),r=I.useRef(null),n=I.useCallback(a=>{a!==r.current&&(e==null||e(a,r.current)),r.current=a},[]);return[r,n]}function Ky(t){const e=I.useRef();return I.useEffect(()=>{e.current=t},[t]),e.current}let bm={};function sw(t,e){return I.useMemo(()=>{if(e)return e;const r=bm[t]==null?0:bm[t]+1;return bm[t]=r,t+"-"+r},[t,e])}function kH(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return n.reduce((i,o)=>{const l=Object.entries(o);for(const[s,f]of l){const c=i[s];c!=null&&(i[s]=c+t*f)}return i},{...e})}}const k6=kH(1),Lc=kH(-1);function Ome(t){return"clientX"in t&&"clientY"in t}function _H(t){if(!t)return!1;const{KeyboardEvent:e}=xi(t.target);return e&&t instanceof e}function Dme(t){if(!t)return!1;const{TouchEvent:e}=xi(t.target);return e&&t instanceof e}function Jy(t){if(Dme(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:r}=t.touches[0];return{x:e,y:r}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:r}=t.changedTouches[0];return{x:e,y:r}}}return Ome(t)?{x:t.clientX,y:t.clientY}:null}const AM="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ame(t){return t.matches(AM)?t:t.querySelector(AM)}const Tme={display:"none"};function Mme(t){let{id:e,value:r}=t;return I.createElement("div",{id:e,style:Tme},r)}function Eme(t){let{id:e,announcement:r,ariaLiveType:n="assertive"}=t;const a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return I.createElement("div",{id:e,style:a,role:"status","aria-live":n,"aria-atomic":!0},r)}function jme(){const[t,e]=I.useState("");return{announce:I.useCallback(n=>{n!=null&&e(n)},[]),announcement:t}}const OH=I.createContext(null);function Lme(t){const e=I.useContext(OH);I.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Nme(){const[t]=I.useState(()=>new Set),e=I.useCallback(n=>(t.add(n),()=>t.delete(n)),[t]);return[I.useCallback(n=>{let{type:a,event:i}=n;t.forEach(o=>{var l;return(l=o[a])==null?void 0:l.call(o,i)})},[t]),e]}const Ime={draggable:`
275
275
  To pick up a draggable item, press the space bar.
276
276
  While dragging, use the arrow keys to move the item.
277
277
  Press space again to drop the item in its new position, or press escape to cancel.
278
- `},Pme={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:r}=t;return r?"Draggable item "+e.id+" was moved over droppable area "+r.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:r}=t;return r?"Draggable item "+e.id+" was dropped over droppable area "+r.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function Rme(t){let{announcements:e=Pme,container:r,hiddenTextDescribedById:n,screenReaderInstructions:a=Ime}=t;const{announce:i,announcement:o}=jme(),l=sw("DndLiveRegion"),[s,f]=I.useState(!1);if(I.useEffect(()=>{f(!0)},[]),Lme(I.useMemo(()=>({onDragStart(h){let{active:d}=h;i(e.onDragStart({active:d}))},onDragMove(h){let{active:d,over:m}=h;e.onDragMove&&i(e.onDragMove({active:d,over:m}))},onDragOver(h){let{active:d,over:m}=h;i(e.onDragOver({active:d,over:m}))},onDragEnd(h){let{active:d,over:m}=h;i(e.onDragEnd({active:d,over:m}))},onDragCancel(h){let{active:d,over:m}=h;i(e.onDragCancel({active:d,over:m}))}}),[i,e])),!s)return null;const c=I.createElement(I.Fragment,null,I.createElement(Mme,{id:n,value:a.draggable}),I.createElement(Eme,{id:l,announcement:o}));return r?a0.createPortal(c,r):c}var $1;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})($1||($1={}));function Nc(){}function $me(t,e){return I.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function Bme(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return I.useMemo(()=>[...e].filter(n=>n!=null),[...e])}const Ro=Object.freeze({x:0,y:0});function Vme(t,e){let{data:{value:r}}=t,{data:{value:n}}=e;return n-r}function Fme(t,e){if(!t||t.length===0)return null;const[r]=t;return r[e]}function zme(t,e){const r=Math.max(e.top,t.top),n=Math.max(e.left,t.left),a=Math.min(e.left+e.width,t.left+t.width),i=Math.min(e.top+e.height,t.top+t.height),o=a-n,l=i-r;if(n<a&&r<i){const s=e.width*e.height,f=t.width*t.height,c=o*l,h=c/(s+f-c);return Number(h.toFixed(4))}return 0}const Hme=t=>{let{collisionRect:e,droppableRects:r,droppableContainers:n}=t;const a=[];for(const i of n){const{id:o}=i,l=r.get(o);if(l){const s=zme(l,e);s>0&&a.push({id:o,data:{droppableContainer:i,value:s}})}}return a.sort(Vme)};function qme(t,e,r){return{...t,scaleX:e&&r?e.width/r.width:1,scaleY:e&&r?e.height/r.height:1}}function DH(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:Ro}function Wme(t){return function(r){for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];return a.reduce((o,l)=>({...o,top:o.top+t*l.y,bottom:o.bottom+t*l.y,left:o.left+t*l.x,right:o.right+t*l.x}),{...r})}}const Ume=Wme(1);function Gme(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function Yme(t,e,r){const n=Gme(e);if(!n)return t;const{scaleX:a,scaleY:i,x:o,y:l}=n,s=t.left-o-(1-a)*parseFloat(r),f=t.top-l-(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),c=a?t.width/a:t.width,h=i?t.height/i:t.height;return{width:c,height:h,top:f,right:s+c,bottom:f+h,left:s}}const Xme={ignoreTransform:!1};function c9(t,e){e===void 0&&(e=Xme);let r=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:f,transformOrigin:c}=xi(t).getComputedStyle(t);f&&(r=Yme(r,f,c))}const{top:n,left:a,width:i,height:o,bottom:l,right:s}=r;return{top:n,left:a,width:i,height:o,bottom:l,right:s}}function TM(t){return c9(t,{ignoreTransform:!0})}function Kme(t){const e=t.innerWidth,r=t.innerHeight;return{top:0,left:0,right:e,bottom:r,width:e,height:r}}function Jme(t,e){return e===void 0&&(e=xi(t).getComputedStyle(t)),e.position==="fixed"}function Zme(t,e){e===void 0&&(e=xi(t).getComputedStyle(t));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(a=>{const i=e[a];return typeof i=="string"?r.test(i):!1})}function uw(t,e){const r=[];function n(a){if(e!=null&&r.length>=e||!a)return r;if(iw(a)&&a.scrollingElement!=null&&!r.includes(a.scrollingElement))return r.push(a.scrollingElement),r;if(!s9(a)||CH(a)||r.includes(a))return r;const i=xi(t).getComputedStyle(a);return a!==t&&Zme(a,i)&&r.push(a),Jme(a,i)?r:n(a.parentNode)}return t?n(t):r}function AH(t){const[e]=uw(t,1);return e??null}function xm(t){return!Bf||!t?null:v7(t)?t:aw(t)?iw(t)||t===b7(t).scrollingElement?window:s9(t)?t:null:null}function TH(t){return v7(t)?t.scrollX:t.scrollLeft}function MH(t){return v7(t)?t.scrollY:t.scrollTop}function Zy(t){return{x:TH(t),y:MH(t)}}var l1;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(l1||(l1={}));function EH(t){return!Bf||!t?!1:t===document.scrollingElement}function jH(t){const e={x:0,y:0},r=EH(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},n={x:t.scrollWidth-r.width,y:t.scrollHeight-r.height},a=t.scrollTop<=e.y,i=t.scrollLeft<=e.x,o=t.scrollTop>=n.y,l=t.scrollLeft>=n.x;return{isTop:a,isLeft:i,isBottom:o,isRight:l,maxScroll:n,minScroll:e}}const Qme={x:.2,y:.2};function ege(t,e,r,n,a){let{top:i,left:o,right:l,bottom:s}=r;n===void 0&&(n=10),a===void 0&&(a=Qme);const{isTop:f,isBottom:c,isLeft:h,isRight:d}=jH(t),m={x:0,y:0},g={x:0,y:0},y={height:e.height*a.y,width:e.width*a.x};return!f&&i<=e.top+y.height?(m.y=l1.Backward,g.y=n*Math.abs((e.top+y.height-i)/y.height)):!c&&s>=e.bottom-y.height&&(m.y=l1.Forward,g.y=n*Math.abs((e.bottom-y.height-s)/y.height)),!d&&l>=e.right-y.width?(m.x=l1.Forward,g.x=n*Math.abs((e.right-y.width-l)/y.width)):!h&&o<=e.left+y.width&&(m.x=l1.Backward,g.x=n*Math.abs((e.left+y.width-o)/y.width)),{direction:m,speed:g}}function tge(t){if(t===document.scrollingElement){const{innerWidth:i,innerHeight:o}=window;return{top:0,left:0,right:i,bottom:o,width:i,height:o}}const{top:e,left:r,right:n,bottom:a}=t.getBoundingClientRect();return{top:e,left:r,right:n,bottom:a,width:t.clientWidth,height:t.clientHeight}}function LH(t){return t.reduce((e,r)=>k6(e,Zy(r)),Ro)}function rge(t){return t.reduce((e,r)=>e+TH(r),0)}function nge(t){return t.reduce((e,r)=>e+MH(r),0)}function age(t,e){if(e===void 0&&(e=c9),!t)return;const{top:r,left:n,bottom:a,right:i}=e(t);AH(t)&&(a<=0||i<=0||r>=window.innerHeight||n>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const ige=[["x",["left","right"],rge],["y",["top","bottom"],nge]];class cw{constructor(e,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=uw(r),a=LH(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[i,o,l]of ige)for(const s of o)Object.defineProperty(this,s,{get:()=>{const f=l(n),c=a[i]-f;return this.rect[s]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class os{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=e}add(e,r,n){var a;(a=this.target)==null||a.addEventListener(e,r,n),this.listeners.push([e,r,n])}}function oge(t){const{EventTarget:e}=xi(t);return t instanceof e?t:b7(t)}function wm(t,e){const r=Math.abs(t.x),n=Math.abs(t.y);return typeof e=="number"?Math.sqrt(r**2+n**2)>e:"x"in e&&"y"in e?r>e.x&&n>e.y:"x"in e?r>e.x:"y"in e?n>e.y:!1}var ao;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(ao||(ao={}));function MM(t){t.preventDefault()}function lge(t){t.stopPropagation()}var Pn;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(Pn||(Pn={}));const NH={start:[Pn.Space,Pn.Enter],cancel:[Pn.Esc],end:[Pn.Space,Pn.Enter,Pn.Tab]},sge=(t,e)=>{let{currentCoordinates:r}=e;switch(t.code){case Pn.Right:return{...r,x:r.x+25};case Pn.Left:return{...r,x:r.x-25};case Pn.Down:return{...r,y:r.y+25};case Pn.Up:return{...r,y:r.y-25}}};class IH{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:r}}=e;this.props=e,this.listeners=new os(b7(r)),this.windowListeners=new os(xi(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ao.Resize,this.handleCancel),this.windowListeners.add(ao.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ao.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:r}=this.props,n=e.node.current;n&&age(n),r(Ro)}handleKeyDown(e){if(_H(e)){const{active:r,context:n,options:a}=this.props,{keyboardCodes:i=NH,coordinateGetter:o=sge,scrollBehavior:l="smooth"}=a,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}const{collisionRect:f}=n.current,c=f?{x:f.left,y:f.top}:Ro;this.referenceCoordinates||(this.referenceCoordinates=c);const h=o(e,{active:r,context:n.current,currentCoordinates:c});if(h){const d=Lc(h,c),m={x:0,y:0},{scrollableAncestors:g}=n.current;for(const y of g){const b=e.code,{isTop:S,isRight:w,isLeft:C,isBottom:k,maxScroll:_,minScroll:D}=jH(y),T=tge(y),A={x:Math.min(b===Pn.Right?T.right-T.width/2:T.right,Math.max(b===Pn.Right?T.left:T.left+T.width/2,h.x)),y:Math.min(b===Pn.Down?T.bottom-T.height/2:T.bottom,Math.max(b===Pn.Down?T.top:T.top+T.height/2,h.y))},M=b===Pn.Right&&!w||b===Pn.Left&&!C,E=b===Pn.Down&&!k||b===Pn.Up&&!S;if(M&&A.x!==h.x){const N=y.scrollLeft+d.x,Y=b===Pn.Right&&N<=_.x||b===Pn.Left&&N>=D.x;if(Y&&!d.y){y.scrollTo({left:N,behavior:l});return}Y?m.x=y.scrollLeft-N:m.x=b===Pn.Right?y.scrollLeft-_.x:y.scrollLeft-D.x,m.x&&y.scrollBy({left:-m.x,behavior:l});break}else if(E&&A.y!==h.y){const N=y.scrollTop+d.y,Y=b===Pn.Down&&N<=_.y||b===Pn.Up&&N>=D.y;if(Y&&!d.x){y.scrollTo({top:N,behavior:l});return}Y?m.y=y.scrollTop-N:m.y=b===Pn.Down?y.scrollTop-_.y:y.scrollTop-D.y,m.y&&y.scrollBy({top:-m.y,behavior:l});break}}this.handleMove(e,k6(Lc(h,this.referenceCoordinates),m))}}}handleMove(e,r){const{onMove:n}=this.props;e.preventDefault(),n(r)}handleEnd(e){const{onEnd:r}=this.props;e.preventDefault(),this.detach(),r()}handleCancel(e){const{onCancel:r}=this.props;e.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}IH.activators=[{eventName:"onKeyDown",handler:(t,e,r)=>{let{keyboardCodes:n=NH,onActivation:a}=e,{active:i}=r;const{code:o}=t.nativeEvent;if(n.start.includes(o)){const l=i.activatorNode.current;return l&&t.target!==l?!1:(t.preventDefault(),a==null||a({event:t.nativeEvent}),!0)}return!1}}];function EM(t){return!!(t&&"distance"in t)}function jM(t){return!!(t&&"delay"in t)}class fw{constructor(e,r,n){var a;n===void 0&&(n=oge(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=r;const{event:i}=e,{target:o}=i;this.props=e,this.events=r,this.document=b7(o),this.documentListeners=new os(this.document),this.listeners=new os(n),this.windowListeners=new os(xi(o)),this.initialCoordinates=(a=Jy(i))!=null?a:Ro,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ao.Resize,this.handleCancel),this.windowListeners.add(ao.DragStart,MM),this.windowListeners.add(ao.VisibilityChange,this.handleCancel),this.windowListeners.add(ao.ContextMenu,MM),this.documentListeners.add(ao.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(jM(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(EM(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,r){const{active:n,onPending:a}=this.props;a(n,e,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:e}=this,{onStart:r}=this.props;e&&(this.activated=!0,this.documentListeners.add(ao.Click,lge,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ao.SelectionChange,this.removeTextSelection),r(e))}handleMove(e){var r;const{activated:n,initialCoordinates:a,props:i}=this,{onMove:o,options:{activationConstraint:l}}=i;if(!a)return;const s=(r=Jy(e))!=null?r:Ro,f=Lc(a,s);if(!n&&l){if(EM(l)){if(l.tolerance!=null&&wm(f,l.tolerance))return this.handleCancel();if(wm(f,l.distance))return this.handleStart()}if(jM(l)&&wm(f,l.tolerance))return this.handleCancel();this.handlePending(l,f);return}e.cancelable&&e.preventDefault(),o(s)}handleEnd(){const{onAbort:e,onEnd:r}=this.props;this.detach(),this.activated||e(this.props.active),r()}handleCancel(){const{onAbort:e,onCancel:r}=this.props;this.detach(),this.activated||e(this.props.active),r()}handleKeydown(e){e.code===Pn.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const uge={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class dw extends fw{constructor(e){const{event:r}=e,n=b7(r.target);super(e,uge,n)}}dw.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:r}=t,{onActivation:n}=e;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const cge={move:{name:"mousemove"},end:{name:"mouseup"}};var Qy;(function(t){t[t.RightClick=2]="RightClick"})(Qy||(Qy={}));class fge extends fw{constructor(e){super(e,cge,b7(e.event.target))}}fge.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:r}=t,{onActivation:n}=e;return r.button===Qy.RightClick?!1:(n==null||n({event:r}),!0)}}];const Sm={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class dge extends fw{constructor(e){super(e,Sm)}static setup(){return window.addEventListener(Sm.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Sm.move.name,e)};function e(){}}}dge.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:r}=t,{onActivation:n}=e;const{touches:a}=r;return a.length>1?!1:(n==null||n({event:r}),!0)}}];var ls;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(ls||(ls={}));var Ic;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(Ic||(Ic={}));function hge(t){let{acceleration:e,activator:r=ls.Pointer,canScroll:n,draggingRect:a,enabled:i,interval:o=5,order:l=Ic.TreeOrder,pointerCoordinates:s,scrollableAncestors:f,scrollableAncestorRects:c,delta:h,threshold:d}=t;const m=mge({delta:h,disabled:!i}),[g,y]=_me(),b=I.useRef({x:0,y:0}),S=I.useRef({x:0,y:0}),w=I.useMemo(()=>{switch(r){case ls.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case ls.DraggableRect:return a}},[r,a,s]),C=I.useRef(null),k=I.useCallback(()=>{const D=C.current;if(!D)return;const T=b.current.x*S.current.x,A=b.current.y*S.current.y;D.scrollBy(T,A)},[]),_=I.useMemo(()=>l===Ic.TreeOrder?[...f].reverse():f,[l,f]);I.useEffect(()=>{if(!i||!f.length||!w){y();return}for(const D of _){if((n==null?void 0:n(D))===!1)continue;const T=f.indexOf(D),A=c[T];if(!A)continue;const{direction:M,speed:E}=ege(D,A,w,e,d);for(const N of["x","y"])m[N][M[N]]||(E[N]=0,M[N]=0);if(E.x>0||E.y>0){y(),C.current=D,g(k,o),b.current=E,S.current=M;return}}b.current={x:0,y:0},S.current={x:0,y:0},y()},[e,k,n,y,i,o,JSON.stringify(w),JSON.stringify(m),g,f,_,c,JSON.stringify(d)])}const pge={x:{[l1.Backward]:!1,[l1.Forward]:!1},y:{[l1.Backward]:!1,[l1.Forward]:!1}};function mge(t){let{delta:e,disabled:r}=t;const n=Ky(e);return u9(a=>{if(r||!n||!a)return pge;const i={x:Math.sign(e.x-n.x),y:Math.sign(e.y-n.y)};return{x:{[l1.Backward]:a.x[l1.Backward]||i.x===-1,[l1.Forward]:a.x[l1.Forward]||i.x===1},y:{[l1.Backward]:a.y[l1.Backward]||i.y===-1,[l1.Forward]:a.y[l1.Forward]||i.y===1}}},[r,e,n])}function gge(t,e){const r=e!=null?t.get(e):void 0,n=r?r.node.current:null;return u9(a=>{var i;return e==null?null:(i=n??a)!=null?i:null},[n,e])}function yge(t,e){return I.useMemo(()=>t.reduce((r,n)=>{const{sensor:a}=n,i=a.activators.map(o=>({eventName:o.eventName,handler:e(o.handler,n)}));return[...r,...i]},[]),[t,e])}var Ls;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(Ls||(Ls={}));var ev;(function(t){t.Optimized="optimized"})(ev||(ev={}));const LM=new Map;function vge(t,e){let{dragging:r,dependencies:n,config:a}=e;const[i,o]=I.useState(null),{frequency:l,measure:s,strategy:f}=a,c=I.useRef(t),h=b(),d=lw(h),m=I.useCallback(function(S){S===void 0&&(S=[]),!d.current&&o(w=>w===null?S:w.concat(S.filter(C=>!w.includes(C))))},[d]),g=I.useRef(null),y=u9(S=>{if(h&&!r)return LM;if(!S||S===LM||c.current!==t||i!=null){const w=new Map;for(let C of t){if(!C)continue;if(i&&i.length>0&&!i.includes(C.id)&&C.rect.current){w.set(C.id,C.rect.current);continue}const k=C.node.current,_=k?new cw(s(k),k):null;C.rect.current=_,_&&w.set(C.id,_)}return w}return S},[t,i,r,h,s]);return I.useEffect(()=>{c.current=t},[t]),I.useEffect(()=>{h||m()},[r,h]),I.useEffect(()=>{i&&i.length>0&&o(null)},[JSON.stringify(i)]),I.useEffect(()=>{h||typeof l!="number"||g.current!==null||(g.current=setTimeout(()=>{m(),g.current=null},l))},[l,h,m,...n]),{droppableRects:y,measureDroppableContainers:m,measuringScheduled:i!=null};function b(){switch(f){case Ls.Always:return!1;case Ls.BeforeDragging:return r;default:return!r}}}function PH(t,e){return u9(r=>t?r||(typeof e=="function"?e(t):t):null,[e,t])}function bge(t,e){return PH(t,e)}function xge(t){let{callback:e,disabled:r}=t;const n=ow(e),a=I.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(n)},[n,r]);return I.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function hw(t){let{callback:e,disabled:r}=t;const n=ow(e),a=I.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(n)},[r]);return I.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function wge(t){return new cw(c9(t),t)}function NM(t,e,r){e===void 0&&(e=wge);const[n,a]=I.useState(null);function i(){a(s=>{if(!t)return null;if(t.isConnected===!1){var f;return(f=s??r)!=null?f:null}const c=e(t);return JSON.stringify(s)===JSON.stringify(c)?s:c})}const o=xge({callback(s){if(t)for(const f of s){const{type:c,target:h}=f;if(c==="childList"&&h instanceof HTMLElement&&h.contains(t)){i();break}}}}),l=hw({callback:i});return F2(()=>{i(),t?(l==null||l.observe(t),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),o==null||o.disconnect())},[t]),n}function Sge(t){const e=PH(t);return DH(t,e)}const IM=[];function Cge(t){const e=I.useRef(t),r=u9(n=>t?n&&n!==IM&&t&&e.current&&t.parentNode===e.current.parentNode?n:uw(t):IM,[t]);return I.useEffect(()=>{e.current=t},[t]),r}function kge(t){const[e,r]=I.useState(null),n=I.useRef(t),a=I.useCallback(i=>{const o=xm(i.target);o&&r(l=>l?(l.set(o,Zy(o)),new Map(l)):null)},[]);return I.useEffect(()=>{const i=n.current;if(t!==i){o(i);const l=t.map(s=>{const f=xm(s);return f?(f.addEventListener("scroll",a,{passive:!0}),[f,Zy(f)]):null}).filter(s=>s!=null);r(l.length?new Map(l):null),n.current=t}return()=>{o(t),o(i)};function o(l){l.forEach(s=>{const f=xm(s);f==null||f.removeEventListener("scroll",a)})}},[a,t]),I.useMemo(()=>t.length?e?Array.from(e.values()).reduce((i,o)=>k6(i,o),Ro):LH(t):Ro,[t,e])}function PM(t,e){e===void 0&&(e=[]);const r=I.useRef(null);return I.useEffect(()=>{r.current=null},e),I.useEffect(()=>{const n=t!==Ro;n&&!r.current&&(r.current=t),!n&&r.current&&(r.current=null)},[t]),r.current?Lc(t,r.current):Ro}function _ge(t){I.useEffect(()=>{if(!Bf)return;const e=t.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of e)r==null||r()}},t.map(e=>{let{sensor:r}=e;return r}))}function Oge(t,e){return I.useMemo(()=>t.reduce((r,n)=>{let{eventName:a,handler:i}=n;return r[a]=o=>{i(o,e)},r},{}),[t,e])}function RH(t){return I.useMemo(()=>t?Kme(t):null,[t])}const RM=[];function Dge(t,e){e===void 0&&(e=c9);const[r]=t,n=RH(r?xi(r):null),[a,i]=I.useState(RM);function o(){i(()=>t.length?t.map(s=>EH(s)?n:new cw(e(s),s)):RM)}const l=hw({callback:o});return F2(()=>{l==null||l.disconnect(),o(),t.forEach(s=>l==null?void 0:l.observe(s))},[t]),a}function Age(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return s9(e)?e:t}function Tge(t){let{measure:e}=t;const[r,n]=I.useState(null),a=I.useCallback(f=>{for(const{target:c}of f)if(s9(c)){n(h=>{const d=e(c);return h?{...h,width:d.width,height:d.height}:d});break}},[e]),i=hw({callback:a}),o=I.useCallback(f=>{const c=Age(f);i==null||i.disconnect(),c&&(i==null||i.observe(c)),n(c?e(c):null)},[e,i]),[l,s]=Xy(o);return I.useMemo(()=>({nodeRef:l,rect:r,setRef:s}),[r,l,s])}const Mge=[{sensor:dw,options:{}},{sensor:IH,options:{}}],Ege={current:{}},ju={draggable:{measure:TM},droppable:{measure:TM,strategy:Ls.WhileDragging,frequency:ev.Optimized},dragOverlay:{measure:c9}};class ss extends Map{get(e){var r;return e!=null&&(r=super.get(e))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:r}=e;return!r})}getNodeFor(e){var r,n;return(r=(n=this.get(e))==null?void 0:n.node.current)!=null?r:void 0}}const jge={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ss,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Nc},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ju,measureDroppableContainers:Nc,windowRect:null,measuringScheduled:!1},Lge={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Nc,draggableNodes:new Map,over:null,measureDroppableContainers:Nc},pw=I.createContext(Lge),Nge=I.createContext(jge);function Ige(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ss}}}function Pge(t,e){switch(e.type){case $1.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case $1.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case $1.DragEnd:case $1.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case $1.RegisterDroppable:{const{element:r}=e,{id:n}=r,a=new ss(t.droppable.containers);return a.set(n,r),{...t,droppable:{...t.droppable,containers:a}}}case $1.SetDroppableDisabled:{const{id:r,key:n,disabled:a}=e,i=t.droppable.containers.get(r);if(!i||n!==i.key)return t;const o=new ss(t.droppable.containers);return o.set(r,{...i,disabled:a}),{...t,droppable:{...t.droppable,containers:o}}}case $1.UnregisterDroppable:{const{id:r,key:n}=e,a=t.droppable.containers.get(r);if(!a||n!==a.key)return t;const i=new ss(t.droppable.containers);return i.delete(r),{...t,droppable:{...t.droppable,containers:i}}}default:return t}}function Rge(t){let{disabled:e}=t;const{active:r,activatorEvent:n,draggableNodes:a}=I.useContext(pw),i=Ky(n),o=Ky(r==null?void 0:r.id);return I.useEffect(()=>{if(!e&&!n&&i&&o!=null){if(!_H(i)||document.activeElement===i.target)return;const l=a.get(o);if(!l)return;const{activatorNode:s,node:f}=l;if(!s.current&&!f.current)return;requestAnimationFrame(()=>{for(const c of[s.current,f.current]){if(!c)continue;const h=Ame(c);if(h){h.focus();break}}})}},[n,e,a,o,i]),null}function $ge(t,e){let{transform:r,...n}=e;return t!=null&&t.length?t.reduce((a,i)=>i({transform:a,...n}),r):r}function Bge(t){return I.useMemo(()=>({draggable:{...ju.draggable,...t==null?void 0:t.draggable},droppable:{...ju.droppable,...t==null?void 0:t.droppable},dragOverlay:{...ju.dragOverlay,...t==null?void 0:t.dragOverlay}}),[t==null?void 0:t.draggable,t==null?void 0:t.droppable,t==null?void 0:t.dragOverlay])}function Vge(t){let{activeNode:e,measure:r,initialRect:n,config:a=!0}=t;const i=I.useRef(!1),{x:o,y:l}=typeof a=="boolean"?{x:a,y:a}:a;F2(()=>{if(!o&&!l||!e){i.current=!1;return}if(i.current||!n)return;const f=e==null?void 0:e.node.current;if(!f||f.isConnected===!1)return;const c=r(f),h=DH(c,n);if(o||(h.x=0),l||(h.y=0),i.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const d=AH(f);d&&d.scrollBy({top:h.y,left:h.x})}},[e,o,l,n,r])}const $H=I.createContext({...Ro,scaleX:1,scaleY:1});var E2;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(E2||(E2={}));const Fge=I.memo(function(e){var r,n,a,i;let{id:o,accessibility:l,autoScroll:s=!0,children:f,sensors:c=Mge,collisionDetection:h=Hme,measuring:d,modifiers:m,...g}=e;const y=I.useReducer(Pge,void 0,Ige),[b,S]=y,[w,C]=Nme(),[k,_]=I.useState(E2.Uninitialized),D=k===E2.Initialized,{draggable:{active:T,nodes:A,translate:M},droppable:{containers:E}}=b,N=T!=null?A.get(T):null,Y=I.useRef({initial:null,translated:null}),ne=I.useMemo(()=>{var St;return T!=null?{id:T,data:(St=N==null?void 0:N.data)!=null?St:Ege,rect:Y}:null},[T,N]),K=I.useRef(null),[B,j]=I.useState(null),[$,V]=I.useState(null),z=lw(g,Object.values(g)),W=sw("DndDescribedBy",o),G=I.useMemo(()=>E.getEnabled(),[E]),ae=Bge(d),{droppableRects:U,measureDroppableContainers:H,measuringScheduled:R}=vge(G,{dragging:D,dependencies:[M.x,M.y],config:ae.droppable}),ee=gge(A,T),J=I.useMemo(()=>$?Jy($):null,[$]),Z=Tt(),re=bge(ee,ae.draggable.measure);Vge({activeNode:T!=null?A.get(T):null,config:Z.layoutShiftCompensation,initialRect:re,measure:ae.draggable.measure});const te=NM(ee,ae.draggable.measure,re),F=NM(ee?ee.parentElement:null),q=I.useRef({activatorEvent:null,active:null,activeNode:ee,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:A,draggingNode:null,draggingNodeRect:null,droppableContainers:E,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),X=E.getNodeFor((r=q.current.over)==null?void 0:r.id),ie=Tge({measure:ae.dragOverlay.measure}),ce=(n=ie.nodeRef.current)!=null?n:ee,de=D?(a=ie.rect)!=null?a:te:null,he=!!(ie.nodeRef.current&&ie.rect),Oe=Sge(he?null:te),Ne=RH(ce?xi(ce):null),Te=Cge(D?X??ee:null),_e=Dge(Te),xe=$ge(m,{transform:{x:M.x-Oe.x,y:M.y-Oe.y,scaleX:1,scaleY:1},activatorEvent:$,active:ne,activeNodeRect:te,containerNodeRect:F,draggingNodeRect:de,over:q.current.over,overlayNodeRect:ie.rect,scrollableAncestors:Te,scrollableAncestorRects:_e,windowRect:Ne}),we=J?k6(J,M):null,ge=kge(Te),ve=PM(ge),le=PM(ge,[te]),ue=k6(xe,ve),Ce=de?Ume(de,xe):null,pe=ne&&Ce?h({active:ne,collisionRect:Ce,droppableRects:U,droppableContainers:G,pointerCoordinates:we}):null,ye=Fme(pe,"id"),[be,je]=I.useState(null),$e=he?xe:k6(xe,le),ut=qme($e,(i=be==null?void 0:be.rect)!=null?i:null,te),Ie=I.useRef(null),Ze=I.useCallback((St,tt)=>{let{sensor:Mt,options:Dt}=tt;if(K.current==null)return;const Ye=A.get(K.current);if(!Ye)return;const Lt=St.nativeEvent,Et=new Mt({active:K.current,activeNode:Ye,event:Lt,options:Dt,context:q,onAbort(He){if(!A.get(He))return;const{onDragAbort:Ge}=z.current,Rt={id:He};Ge==null||Ge(Rt),w({type:"onDragAbort",event:Rt})},onPending(He,It,Ge,Rt){if(!A.get(He))return;const{onDragPending:dr}=z.current,xr={id:He,constraint:It,initialCoordinates:Ge,offset:Rt};dr==null||dr(xr),w({type:"onDragPending",event:xr})},onStart(He){const It=K.current;if(It==null)return;const Ge=A.get(It);if(!Ge)return;const{onDragStart:Rt}=z.current,$t={activatorEvent:Lt,active:{id:It,data:Ge.data,rect:Y}};a0.unstable_batchedUpdates(()=>{Rt==null||Rt($t),_(E2.Initializing),S({type:$1.DragStart,initialCoordinates:He,active:It}),w({type:"onDragStart",event:$t}),j(Ie.current),V(Lt)})},onMove(He){S({type:$1.DragMove,coordinates:He})},onEnd:Xt($1.DragEnd),onCancel:Xt($1.DragCancel)});Ie.current=Et;function Xt(He){return async function(){const{active:Ge,collisions:Rt,over:$t,scrollAdjustedTranslate:dr}=q.current;let xr=null;if(Ge&&dr){const{cancelDrop:Mr}=z.current;xr={activatorEvent:Lt,active:Ge,collisions:Rt,delta:dr,over:$t},He===$1.DragEnd&&typeof Mr=="function"&&await Promise.resolve(Mr(xr))&&(He=$1.DragCancel)}K.current=null,a0.unstable_batchedUpdates(()=>{S({type:He}),_(E2.Uninitialized),je(null),j(null),V(null),Ie.current=null;const Mr=He===$1.DragEnd?"onDragEnd":"onDragCancel";if(xr){const Er=z.current[Mr];Er==null||Er(xr),w({type:Mr,event:xr})}})}}},[A]),Ke=I.useCallback((St,tt)=>(Mt,Dt)=>{const Ye=Mt.nativeEvent,Lt=A.get(Dt);if(K.current!==null||!Lt||Ye.dndKit||Ye.defaultPrevented)return;const Et={active:Lt};St(Mt,tt.options,Et)===!0&&(Ye.dndKit={capturedBy:tt.sensor},K.current=Dt,Ze(Mt,tt))},[A,Ze]),et=yge(c,Ke);_ge(c),F2(()=>{te&&k===E2.Initializing&&_(E2.Initialized)},[te,k]),I.useEffect(()=>{const{onDragMove:St}=z.current,{active:tt,activatorEvent:Mt,collisions:Dt,over:Ye}=q.current;if(!tt||!Mt)return;const Lt={active:tt,activatorEvent:Mt,collisions:Dt,delta:{x:ue.x,y:ue.y},over:Ye};a0.unstable_batchedUpdates(()=>{St==null||St(Lt),w({type:"onDragMove",event:Lt})})},[ue.x,ue.y]),I.useEffect(()=>{const{active:St,activatorEvent:tt,collisions:Mt,droppableContainers:Dt,scrollAdjustedTranslate:Ye}=q.current;if(!St||K.current==null||!tt||!Ye)return;const{onDragOver:Lt}=z.current,Et=Dt.get(ye),Xt=Et&&Et.rect.current?{id:Et.id,rect:Et.rect.current,data:Et.data,disabled:Et.disabled}:null,He={active:St,activatorEvent:tt,collisions:Mt,delta:{x:Ye.x,y:Ye.y},over:Xt};a0.unstable_batchedUpdates(()=>{je(Xt),Lt==null||Lt(He),w({type:"onDragOver",event:He})})},[ye]),F2(()=>{q.current={activatorEvent:$,active:ne,activeNode:ee,collisionRect:Ce,collisions:pe,droppableRects:U,draggableNodes:A,draggingNode:ce,draggingNodeRect:de,droppableContainers:E,over:be,scrollableAncestors:Te,scrollAdjustedTranslate:ue},Y.current={initial:de,translated:Ce}},[ne,ee,pe,Ce,A,ce,de,U,E,be,Te,ue]),hge({...Z,delta:M,draggingRect:Ce,pointerCoordinates:we,scrollableAncestors:Te,scrollableAncestorRects:_e});const Pt=I.useMemo(()=>({active:ne,activeNode:ee,activeNodeRect:te,activatorEvent:$,collisions:pe,containerNodeRect:F,dragOverlay:ie,draggableNodes:A,droppableContainers:E,droppableRects:U,over:be,measureDroppableContainers:H,scrollableAncestors:Te,scrollableAncestorRects:_e,measuringConfiguration:ae,measuringScheduled:R,windowRect:Ne}),[ne,ee,te,$,pe,F,ie,A,E,U,be,H,Te,_e,ae,R,Ne]),jt=I.useMemo(()=>({activatorEvent:$,activators:et,active:ne,activeNodeRect:te,ariaDescribedById:{draggable:W},dispatch:S,draggableNodes:A,over:be,measureDroppableContainers:H}),[$,et,ne,te,S,W,A,be,H]);return I.createElement(OH.Provider,{value:C},I.createElement(pw.Provider,{value:jt},I.createElement(Nge.Provider,{value:Pt},I.createElement($H.Provider,{value:ut},f)),I.createElement(Rge,{disabled:(l==null?void 0:l.restoreFocus)===!1})),I.createElement(Rme,{...l,hiddenTextDescribedById:W}));function Tt(){const St=(B==null?void 0:B.autoScrollEnabled)===!1,tt=typeof s=="object"?s.enabled===!1:s===!1,Mt=D&&!St&&!tt;return typeof s=="object"?{...s,enabled:Mt}:{enabled:Mt}}}),zge=I.createContext(null),$M="button",Hge="Draggable";function qge(t){let{id:e,data:r,disabled:n=!1,attributes:a}=t;const i=sw(Hge),{activators:o,activatorEvent:l,active:s,activeNodeRect:f,ariaDescribedById:c,draggableNodes:h,over:d}=I.useContext(pw),{role:m=$M,roleDescription:g="draggable",tabIndex:y=0}=a??{},b=(s==null?void 0:s.id)===e,S=I.useContext(b?$H:zge),[w,C]=Xy(),[k,_]=Xy(),D=Oge(o,e),T=lw(r);F2(()=>(h.set(e,{id:e,key:i,node:w,activatorNode:k,data:T}),()=>{const M=h.get(e);M&&M.key===i&&h.delete(e)}),[h,e]);const A=I.useMemo(()=>({role:m,tabIndex:y,"aria-disabled":n,"aria-pressed":b&&m===$M?!0:void 0,"aria-roledescription":g,"aria-describedby":c.draggable}),[n,m,y,b,g,c.draggable]);return{active:s,activatorEvent:l,activeNodeRect:f,attributes:A,isDragging:b,listeners:n?void 0:D,node:w,over:d,setNodeRef:C,setActivatorNodeRef:_,transform:S}}const Wge=t=>{let{transform:e}=t;return{...e,y:0}};function Uge(t,e){let r=!1;function n(a,i){if(!r){r=!0;const o=a.getCenter(),l=a.getZoom(),s=a.getBearing(),f=a.getPitch();i.jumpTo({center:o,zoom:l,bearing:s,pitch:f}),r=!1}}t.on("move",()=>{n(t,e)}),e.on("move",()=>{n(e,t)})}function Gge(t){const{height:e,width:r,mapStyles:n,center:a,zoomLevel:i}=t,[o,l]=I.useState(50),[s,f]=I.useState(!1),c=I.useRef(null),h=I.useRef(50),d=I.useRef(0),m=Bme($me(dw,{activationConstraint:{distance:0}})),g=()=>{f(!0),h.current=o,c.current&&(d.current=c.current.getBoundingClientRect().width)},y=D=>{if(!c.current||d.current===0)return;const T=D.delta.x/d.current*100,A=Math.max(0,Math.min(100,h.current+T));l(A)},b=()=>{f(!1)},S=D=>{if(s||!c.current)return;const T=c.current.getBoundingClientRect(),M=(D.clientX-T.left)/T.width*100;l(Math.max(0,Math.min(100,M)))},w=I.useRef(null),C=I.useRef(null),k=I.useRef(null),_=I.useRef(null);return I.useEffect(()=>{if(_.current&&C.current&&k.current&&r){Qr(_.current).selectAll(".maplibregl-compare").remove(),Qr(C.current).selectAll("div").remove(),Qr(k.current).selectAll("div").remove();const M=new Rf;y3.addProtocol("pmtiles",M.tile);const E=new y3.Map({container:C.current,style:n[0],center:a||[0,0],zoom:i||4}),N=new y3.Map({container:k.current,style:n[1],center:a||[0,0],zoom:i||4});N.addControl(new y3.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),E.addControl(new y3.ScaleControl,"bottom-left"),E.addControl(new y3.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),N.addControl(new y3.ScaleControl,"bottom-left"),Uge(E,N)}},[r,n,a,i]),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:w,"aria-label":"Map area",children:v.jsx("div",{style:{width:r,height:e},children:v.jsx("div",{ref:_,className:"map maplibre-show-control relative w-full h-full",style:{inset:0},children:v.jsx(Fge,{sensors:m,modifiers:[Wge],onDragStart:g,onDragMove:y,onDragEnd:b,children:v.jsxs("div",{ref:c,style:{position:"relative",width:r,height:e,overflow:"hidden",cursor:s?"grabbing":"col-resize",userSelect:"none"},onClick:S,children:[v.jsx("div",{ref:k,className:"absolute h-full rightMap w-full",style:{position:"absolute",top:0,left:0,clipPath:`polygon(${o}% 0%, ${o}% 100%, 100% 100%, 100% 0%)`}}),v.jsx("div",{ref:C,className:"absolute h-full leftMap w-full",style:{position:"absolute",top:0,left:0,inset:0,clipPath:`polygon(0% 0%, ${o}% 0%, ${o}% 100%, 0% 100%)`}}),v.jsx(Yge,{position:o})]})})})})})}function Yge(t){const{position:e}=t,{attributes:r,listeners:n,setNodeRef:a}=qge({id:"slider-handle"});return v.jsxs("div",{ref:a,style:{position:"absolute",left:`${e}%`,top:0,bottom:0,width:"40px",transform:"translateX(-50%)",cursor:"col-resize",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10,touchAction:"none"},...n,...r,children:[v.jsx("div",{className:"h-full bg-primary-blue-600 dark:bg-primary-blue-400",style:{width:"2px"}}),v.jsx("div",{className:"flex bg-primary-blue-600 dark:bg-primary-blue-400 rounded-full absolute items-center justify-center text-primary-white font-primary-white",style:{boxShadow:"inset 0 0 0 1px #fff",width:"42px",height:"42px",top:"calc(50% - 21px)",left:"0",cursor:"col-resize"},children:v.jsx(U3e,{})})]})}function BH(t){const{graphTitle:e,height:r,width:n,relativeHeight:a,sources:i,graphDescription:o,footNote:l,padding:s,backgroundColor:f=!1,graphID:c,mapStyles:h,center:d=[0,0],zoomLevel:m=3,language:g="en",minHeight:y=0,theme:b="light",ariaLabel:S,styles:w,classNames:C}=t,[k,_]=I.useState(0),[D,T]=I.useState(0),A=I.useRef(null);return I.useEffect(()=>{const M=new ResizeObserver(E=>{_(n||E[0].target.clientWidth||620),T(r||E[0].target.clientHeight||480)});return A.current&&(T(A.current.clientHeight||480),_(A.current.clientWidth||620),n||M.observe(A.current)),()=>M.disconnect()},[n,r]),v.jsx("div",{className:`${b||"light"} flex ${n?"w-fit grow-0":"w-full grow"}`,dir:g==="he"||g==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${f?f===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${g||"en"}`,C==null?void 0:C.graphContainer),style:{...(w==null?void 0:w.graphContainer)||{},...f&&f!==!0?{backgroundColor:f}:{}},id:c,"aria-label":S||`${e?`The graph shows ${e}. `:""}This is a comparison between two maps.${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:f?s||"1rem":s||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[e||o?v.jsx(Zt,{styles:{title:w==null?void 0:w.title,description:w==null?void 0:w.description},classNames:{title:C==null?void 0:C.title,description:C==null?void 0:C.description},graphTitle:e,graphDescription:o,width:n}):null,v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:A,"aria-label":"map area",children:(n||k)&&(r||D)?v.jsx(Gge,{width:n||k,height:Math.max(y,r||(a?y?(n||k)*a>y?(n||k)*a:y:(n||k)*a:D)),mapStyles:h,center:d,zoomLevel:m}):null}),i||l?v.jsx(tr,{styles:{footnote:w==null?void 0:w.footnote,source:w==null?void 0:w.source},classNames:{footnote:C==null?void 0:C.footnote,source:C==null?void 0:C.source},sources:i,footNote:l,width:n}):null]})})})})}function Xge(t){const{mapStyle:e,height:r,width:n,relativeHeight:a,center:i,zoomLevel:o,minHeight:l,selectedLayer:s,layerIdList:f,excludeLayers:c}=t,[h,d]=I.useState(0),[m,g]=I.useState(0),[y,b]=I.useState(void 0),S=I.useRef(null),w=I.useRef(null),C=I.useRef(null);return I.useEffect(()=>{const k=new ResizeObserver(_=>{d(n||_[0].target.clientWidth||620),g(r||_[0].target.clientHeight||480)});return S.current&&(g(S.current.clientHeight||480),d(S.current.clientWidth||620),n||k.observe(S.current)),()=>k.disconnect()},[n,r]),I.useEffect(()=>{w.current&&h&&!C.current&&ka(e).then(k=>{b(k),Qr(w.current).selectAll("div").remove();const D=new Rf;Pi.addProtocol("pmtiles",D.tile);const T={container:w.current,style:{...k,layers:po(k.layers,[{column:"id",excludeValues:[...c,...f.filter(A=>s.indexOf(A)===-1)]}])}};i&&(T.center=i),o&&(T.zoom=o),C.current=new Pi.Map(T),C.current.addControl(new Pi.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),C.current.addControl(new Pi.ScaleControl,"bottom-left")})},[h,i,o,f,e,c,s]),I.useEffect(()=>{if(C.current)if(y){const k={...y,layers:po(y.layers,[{column:"id",excludeValues:[...c,...f.filter(_=>s.indexOf(_)===-1)]}])};C.current.setStyle(k)}else ka(e).then(k=>{const _={...k,layers:po(k.layers,[{column:"id",excludeValues:[...c,...f.filter(D=>s.indexOf(D)===-1)]}])};C.current.setStyle(_)})},[c,f,e,y,s]),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:S,"aria-label":"Map area",children:(n||h)&&(r||m)?v.jsx("div",{style:{width:n||h,height:Math.max(l,r||(a?l?(n||h)*a>l?(n||h)*a:l:(n||h)*a:m))},children:v.jsx("div",{ref:w,className:"map maplibre-show-control w-full h-full"})}):null})}function VH(t){const{mapStyle:e,graphTitle:r,height:n,width:a,relativeHeight:i,sources:o,graphDescription:l,footNote:s,padding:f,backgroundColor:c=!1,center:h,zoomLevel:d,graphID:m,language:g="en",minHeight:y=0,theme:b="light",layerSelection:S,excludeLayers:w=[],ariaLabel:C,uiMode:k="normal",styles:_,classNames:D}=t,[T,A]=I.useState(S[0].layerID);I.useEffect(()=>{A(S[0].layerID)},[S]);const M=I.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]);return v.jsx("div",{className:`${b||"light"} flex ${a?"w-fit grow-0":"w-full grow"}`,dir:g==="he"||g==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${c?c===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${g||"en"}`,D==null?void 0:D.graphContainer),style:{...(_==null?void 0:_.graphContainer)||{},...c&&c!==!0?{backgroundColor:c}:{}},id:m,"aria-label":C||`${r?`The graph shows ${r}. `:""}This is a map.${l?` ${l}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:c?f||"1rem":f||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||l?v.jsx(Zt,{styles:{title:_==null?void 0:_.title,description:_==null?void 0:_.description},classNames:{title:D==null?void 0:D.title,description:D==null?void 0:D.description},graphTitle:r,graphDescription:l,width:a}):null,v.jsx(s1,{options:S.map(E=>({label:E.name,value:E.layerID})),size:"sm",isClearable:!1,variant:k,isRtl:g==="he"||g==="ar",isSearchable:!0,filterOption:Z1(M),defaultValue:{label:S[0].name,value:S[0].layerID},controlShouldRenderValue:!0,onChange:E=>{E&&A(E.value)}}),v.jsx(Xge,{mapStyle:e,center:h,zoomLevel:d,width:a,height:n,relativeHeight:i,minHeight:y,selectedLayer:T,layerIdList:f1(S.map(E=>E.layerID)),excludeLayers:w}),o||s?v.jsx(tr,{styles:{footnote:_==null?void 0:_.footnote,source:_==null?void 0:_.source},classNames:{footnote:D==null?void 0:D.footnote,source:D==null?void 0:D.source},sources:o,footNote:s,width:a}):null]})})})})}function Kge(t){var ye,be,je,$e,ut,Ie,Ze,Ke,et,Pt,jt,Tt,St,tt,Mt,Dt,Ye,Lt,Et,Xt,He,It,Ge,Rt,$t,dr,xr,Mr,Er;const{data:e,width:r,height:n,showLabels:a,colors:i,colorDomain:o,radius:l,xAxisTitle:s,yAxisTitle:f,leftMargin:c,rightMargin:h,topMargin:d,bottomMargin:m,tooltip:g,onSeriesMouseOver:y,refXValues:b,refYValues:S,highlightAreaSettings:w,selectedColor:C,highlightedDataPoints:k,maxRadiusValue:_,maxXValue:D,minXValue:T,maxYValue:A,minYValue:M,onSeriesMouseClick:E,rtl:N,annotations:Y,customHighlightAreaSettings:ne,regressionLine:K,resetSelectionOnDoubleClick:B,detailsOnClick:j,noOfXTicks:$,noOfYTicks:V,labelColor:z,xSuffix:W,ySuffix:G,xPrefix:ae,yPrefix:U,styles:H,classNames:R}=t,[ee,J]=I.useState(void 0),[Z,re]=I.useState(void 0),[te,F]=I.useState(void 0),[q,X]=I.useState(void 0),ie={top:d,bottom:s?m+50:m,left:f?c+30:c,right:h},ce=e.map((it,Xe)=>({...it,id:`${Xe}`})),de=r-ie.left-ie.right,he=n-ie.top-ie.bottom,Oe=e.filter(it=>it.radius===void 0).length!==e.length?l4().domain([0,Fe(_)?(ye=Vr(e,"radius"))==null?void 0:ye.radius:_]).range([.25,l]).nice():void 0,Ne=ce.filter(it=>!Fe(it.radius)).length===0?ce:a7(ce.filter(it=>!Fe(it.radius)),"radius","desc"),Te=Fe(T)?((be=Br(e,"x"))==null?void 0:be.x)>0?0:(je=Br(e,"x"))==null?void 0:je.x:T,_e=Fe(D)?(($e=Vr(e,"x"))==null?void 0:$e.x)>0?(ut=Vr(e,"x"))==null?void 0:ut.x:0:D,xe=br().domain([Te,_e]).range([0,de]).nice(),we=Fe(M)?((Ie=Br(e,"y"))==null?void 0:Ie.y)>0?0:(Ze=Br(e,"y"))==null?void 0:Ze.y:M,ge=Fe(A)?((Ke=Vr(e,"y"))==null?void 0:Ke.y)>0?(et=Vr(e,"y"))==null?void 0:et.y:0:A,ve=br().domain([we,ge]).range([he,0]).nice(),le=xe.ticks($),ue=ve.ticks(V),Ce=i9.from(Ne.filter(it=>!Fe(it.x)&&!Fe(it.y)),it=>xe(it.x),it=>ve(it.y)).voronoi([0,0,de<0?0:de,he<0?0:he]),pe=Hx(e.filter(it=>!Fe(it.x)&&!Fe(it.y)).map(it=>[xe(it.x),ve(it.y)]));return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${ie.left},${ie.top})`,children:[v.jsx(Az,{areaSettings:w,width:de,height:he,scaleX:xe,scaleY:ve}),v.jsx(Z2,{areaSettings:ne,scaleX:xe,scaleY:ve}),v.jsxs("g",{children:[v.jsx(v1,{values:ue.filter(it=>it!==0),y:ue.filter(it=>it!==0).map(it=>ve(it)),x1:0-c,x2:de+ie.right,styles:{gridLines:(Pt=H==null?void 0:H.yAxis)==null?void 0:Pt.gridLines,labels:(jt=H==null?void 0:H.yAxis)==null?void 0:jt.labels},classNames:{gridLines:(Tt=R==null?void 0:R.yAxis)==null?void 0:Tt.gridLines,labels:(St=R==null?void 0:R.yAxis)==null?void 0:St.labels},suffix:G,prefix:U,labelType:"secondary",showGridLines:!0,labelPos:"side"}),v.jsx(Nr,{y1:ve(we<0?0:we),y2:ve(we<0?0:we),x1:0-c,x2:de+ie.right,label:_t(we<0?0:we,U,G),labelPos:{x:0,y:ve(we<0?0:we),dy:"0.33em",dx:-4},classNames:{axis:(tt=R==null?void 0:R.xAxis)==null?void 0:tt.axis,label:(Mt=R==null?void 0:R.yAxis)==null?void 0:Mt.labels},styles:{axis:(Dt=H==null?void 0:H.xAxis)==null?void 0:Dt.axis,label:{textAnchor:"end",...((Ye=H==null?void 0:H.yAxis)==null?void 0:Ye.labels)||{}}}}),v.jsx(nn,{x:0-c-15,y:he/2,style:(Lt=H==null?void 0:H.yAxis)==null?void 0:Lt.title,className:(Et=R==null?void 0:R.yAxis)==null?void 0:Et.title,text:f,rotate90:!0})]}),v.jsxs("g",{children:[v.jsx(La,{values:le.filter(it=>it!==0),x:le.filter(it=>it!==0).map(it=>xe(it)),y1:0,y2:he,styles:{gridLines:(Xt=H==null?void 0:H.xAxis)==null?void 0:Xt.gridLines,labels:(He=H==null?void 0:H.xAxis)==null?void 0:He.labels},classNames:{gridLines:(It=R==null?void 0:R.xAxis)==null?void 0:It.gridLines,labels:(Ge=R==null?void 0:R.xAxis)==null?void 0:Ge.labels},suffix:W,prefix:ae,labelType:"primary",showGridLines:!0}),v.jsx(Nr,{x1:xe(Te<0?0:Te),x2:xe(Te<0?0:Te),y1:0,y2:he,label:_t(Te<0?0:Te,ae,W),labelPos:{x:xe(Te<0?0:Te),y:he,dy:"1em",dx:0},classNames:{axis:(Rt=R==null?void 0:R.xAxis)==null?void 0:Rt.axis,label:($t=R==null?void 0:R.yAxis)==null?void 0:$t.labels},styles:{axis:(dr=H==null?void 0:H.xAxis)==null?void 0:dr.axis,label:{textAnchor:"middle",...((xr=H==null?void 0:H.yAxis)==null?void 0:xr.labels)||{}}}}),v.jsx(nn,{x:de/2,y:he+30,style:(Mr=H==null?void 0:H.xAxis)==null?void 0:Mr.title,className:(Er=R==null?void 0:R.xAxis)==null?void 0:Er.title,text:s})]}),Ne.filter(it=>!Fe(it.x)&&!Fe(it.y)).map((it,Xe)=>v.jsx("g",{children:v.jsx("path",{d:Ce.renderCell(Ne.findIndex(Vt=>Vt.id===it.id)),opacity:0,onMouseEnter:Vt=>{J(it),X(Vt.clientY),F(Vt.clientX),y&&y(it)},onMouseMove:Vt=>{J(it),X(Vt.clientY),F(Vt.clientX)},onMouseLeave:()=>{J(void 0),F(void 0),X(void 0),y&&y(void 0)},onClick:()=>{(E||j)&&(Sr(Z,it)&&B?(re(void 0),E==null||E(void 0)):(re(it),E==null||E(it)))}})},Xe)),Ne.filter(it=>!Fe(it.x)&&!Fe(it.y)).map((it,Xe)=>v.jsx("g",{children:v.jsxs("g",{opacity:C?it.color&&i[o.indexOf(`${it.color}`)]===C?1:.3:ee?ee.id===it.id?1:.3:k.length!==0?k.indexOf(it.label||"")!==-1?1:.5:1,transform:`translate(${xe(it.x)},${ve(it.y)})`,onMouseEnter:Vt=>{J(it),X(Vt.clientY),F(Vt.clientX),y&&y(it)},onMouseMove:Vt=>{J(it),X(Vt.clientY),F(Vt.clientX)},onMouseLeave:()=>{J(void 0),F(void 0),X(void 0),y&&y(void 0)},onClick:()=>{(E||j)&&(Sr(Z,it)&&B?(re(void 0),E==null||E(void 0)):(re(it),E==null||E(it)))},children:[v.jsx("circle",{cx:0,cy:0,r:Oe?Oe(it.radius||0):l,style:{fill:e.filter(Vt=>Vt.color).length===0?i[0]:it.color?i[o.indexOf(`${it.color}`)]:Qe.gray,stroke:e.filter(Vt=>Vt.color).length===0?i[0]:it.color?i[o.indexOf(`${it.color}`)]:Qe.gray,fillOpacity:.6}}),a&&!Fe(it.label)?v.jsx("text",{style:{fill:z||(e.filter(Vt=>Vt.color).length===0?i[0]:it.color?i[o.indexOf(`${it.color}`)]:Qe.gray),...(H==null?void 0:H.graphObjectValues)||{}},className:Be("graph-value text-sm",R==null?void 0:R.graphObjectValues),y:0,x:Oe?Oe(it.radius||0):l,dy:"0.33em",dx:3,children:it.label}):k.length!==0&&!Fe(it.label)&&k.indexOf(it.label)!==-1?v.jsx("text",{style:{fill:z||(e.filter(Vt=>Vt.color).length===0?i[0]:it.color?i[o.indexOf(`${it.color}`)]:Qe.gray),...(H==null?void 0:H.graphObjectValues)||{}},className:Be("graph-value text-sm",R==null?void 0:R.graphObjectValues),y:0,x:Oe?Oe(it.radius||0):l,dy:"0.33em",dx:3,children:it.label}):null]})},Xe)),b.map((it,Xe)=>v.jsx(ti,{text:it.text,color:it.color,x:xe(it.value),y1:0,y2:he,textSide:xe(it.value)>de*.75||N?"left":"right",classNames:it.classNames,styles:it.styles},Xe)),S.map((it,Xe)=>v.jsx(h1,{text:it.text,color:it.color,y:ve(it.value),x1:0,x2:de,classNames:it.classNames,styles:it.styles},Xe)),v.jsx("g",{children:Y.map((it,Xe)=>{const Vt=K2({x:it.xCoordinate?xe(it.xCoordinate)+(it.xOffset||0):0+(it.xOffset||0),y:it.yCoordinate?ve(it.yCoordinate)+(it.yOffset||0)-8:0+(it.yOffset||0)-8},{x:it.xCoordinate?xe(it.xCoordinate):0,y:it.yCoordinate?ve(it.yCoordinate):0},Fe(it.connectorRadius)?3.5:it.connectorRadius),Yt=it.showConnector?{y1:Vt.y,x1:Vt.x,y2:it.yCoordinate?ve(it.yCoordinate)+(it.yOffset||0):0+(it.yOffset||0),x2:it.xCoordinate?xe(it.xCoordinate)+(it.xOffset||0):0+(it.xOffset||0),cy:it.yCoordinate?ve(it.yCoordinate):0,cx:it.xCoordinate?xe(it.xCoordinate):0,circleRadius:Fe(it.connectorRadius)?3.5:it.connectorRadius,strokeWidth:it.showConnector===!0?2:Math.min(it.showConnector||0,1)}:void 0,at={y:it.yCoordinate?ve(it.yCoordinate)+(it.yOffset||0)-8:0+(it.yOffset||0)-8,x:N?0:it.xCoordinate?xe(it.xCoordinate)+(it.xOffset||0):0+(it.xOffset||0),width:N?it.xCoordinate?xe(it.xCoordinate)+(it.xOffset||0):0+(it.xOffset||0):de-(it.xCoordinate?xe(it.xCoordinate)+(it.xOffset||0):0+(it.xOffset||0)),maxWidth:it.maxWidth,fontWeight:it.fontWeight,align:it.align};return v.jsx(J2,{color:it.color,connectorsSettings:Yt,labelSettings:at,text:it.text,classNames:it.classNames,styles:it.styles},Xe)})}),K?v.jsx(qx,{x1:pe.b>he?(he-pe.b)/pe.m:0,x2:de,y1:pe.b>he?he:pe.b,y2:pe.m*de+pe.b,className:R==null?void 0:R.regLine,style:H==null?void 0:H.regLine,color:typeof K=="string"?K:void 0}):null]})}),ee&&g&&te&&q?v.jsx(yr,{data:ee,body:g,xPos:te,yPos:q,backgroundStyle:H==null?void 0:H.tooltip,className:R==null?void 0:R.tooltip}):null,j?v.jsx(Tr,{open:Z!==void 0,onClose:()=>{re(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(j,Z)}})}):null]})}function FH(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,showLabels:o=!1,height:l,width:s,footNote:f,colorDomain:c,colorLegendTitle:h,radius:d=5,xAxisTitle:m="X Axis",yAxisTitle:g="Y Axis",padding:y,backgroundColor:b=!1,leftMargin:S=0,rightMargin:w=10,topMargin:C=20,bottomMargin:k=50,tooltip:_,relativeHeight:D,onSeriesMouseOver:T,refXValues:A=[],refYValues:M=[],highlightAreaSettings:E=[],showColorScale:N=!0,highlightedDataPoints:Y=[],graphID:ne,maxRadiusValue:K,maxXValue:B,minXValue:j,maxYValue:$,minYValue:V,xSuffix:z="",ySuffix:W="",xPrefix:G="",yPrefix:ae="",onSeriesMouseClick:U,graphDownload:H=!1,dataDownload:R=!1,language:ee="en",showNAColor:J=!0,minHeight:Z=0,annotations:re=[],customHighlightAreaSettings:te=[],theme:F="light",regressionLine:q=!1,ariaLabel:X,resetSelectionOnDoubleClick:ie=!0,detailsOnClick:ce,noOfXTicks:de=5,noOfYTicks:he=5,labelColor:Oe,styles:Ne,classNames:Te}=t,[_e,xe]=I.useState(0),[we,ge]=I.useState(0),[ve,le]=I.useState(void 0),ue=I.useRef(null),Ce=I.useRef(null);return I.useEffect(()=>{const pe=new ResizeObserver(ye=>{xe(s||ye[0].target.clientWidth||620),ge(l||ye[0].target.clientHeight||480)});return ue.current&&(ge(ue.current.clientHeight||480),xe(ue.current.clientWidth||620),s||pe.observe(ue.current)),()=>pe.disconnect()},[s,l]),v.jsx("div",{className:`${F||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:ee==="he"||ee==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${b?b===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${ee||"en"}`,Te==null?void 0:Te.graphContainer),style:{...(Ne==null?void 0:Ne.graphContainer)||{},...b&&b!==!0?{backgroundColor:b}:{}},id:ne,ref:Ce,"aria-label":X||`${r?`The graph shows ${r}. `:""}This is a scatter plot that shows correlation between two variables.${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:b?y||"1rem":y||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||H||R?v.jsx(Zt,{styles:{title:Ne==null?void 0:Ne.title,description:Ne==null?void 0:Ne.description},classNames:{title:Te==null?void 0:Te.title,description:Te==null?void 0:Te.description},graphTitle:r,graphDescription:i,width:s,graphDownload:H?Ce.current:void 0,dataDownload:R?e.map(pe=>pe.data).filter(pe=>pe!==void 0).length>0?e.map(pe=>pe.data).filter(pe=>pe!==void 0):e.filter(pe=>pe!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[N&&e.filter(pe=>pe.color).length!==0?v.jsx(Cn,{width:s,colorLegendTitle:h,colors:n||Qe[F].categoricalColors.colors,colorDomain:c||Bt(e.filter(pe=>pe.color),"color").map(pe=>pe.color),setSelectedColor:le,showNAColor:J}):null,v.jsx("div",{className:"flex flex-col grow justify-center w-full leading-0",ref:ue,"aria-label":"Graph area",children:(s||_e)&&(l||we)?v.jsx(Kge,{data:e,width:s||_e,height:Math.max(Z,l||(D?Z?(s||_e)*D>Z?(s||_e)*D:Z:(s||_e)*D:we)),colorDomain:e.filter(pe=>pe.color).length===0?[]:c||Bt(e.filter(pe=>pe.color),"color").map(pe=>pe.color),colors:e.filter(pe=>pe.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[F].categoricalColors.colors,xAxisTitle:m,yAxisTitle:g,refXValues:A,refYValues:M,showLabels:o,radius:d,leftMargin:S,rightMargin:w,topMargin:C,bottomMargin:k,tooltip:_,onSeriesMouseOver:T,highlightAreaSettings:E,highlightedDataPoints:e.filter(pe=>pe.label).length===0?[]:Y,selectedColor:ve,maxRadiusValue:K,maxXValue:B,minXValue:j,maxYValue:$,minYValue:V,onSeriesMouseClick:U,rtl:ee==="he"||ee==="ar",annotations:re,customHighlightAreaSettings:te,regressionLine:q,resetSelectionOnDoubleClick:ie,detailsOnClick:ce,noOfXTicks:de,noOfYTicks:he,labelColor:Oe,xSuffix:z,ySuffix:W,xPrefix:G,yPrefix:ae,styles:Ne,classNames:Te}):null})]})}),a||f?v.jsx(tr,{styles:{footnote:Ne==null?void 0:Ne.footnote,source:Ne==null?void 0:Ne.source},classNames:{footnote:Te==null?void 0:Te.footnote,source:Te==null?void 0:Te.source},sources:a,footNote:f,width:s}):null]})})})})}function Jge(t){var ae,U,H,R,ee,J,Z,re,te,F;const{data:e,width:r,height:n,showLabels:a,colors:i,colorDomain:o,radius:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,tooltip:d,onSeriesMouseOver:m,axisTitles:g,highlightedDataPoints:y,selectedColor:b,minValue:S,maxValue:w,onSeriesMouseClick:C,resetSelectionOnDoubleClick:k,detailsOnClick:_,styles:D,classNames:T}=t,[A,M]=I.useState(void 0),[E,N]=I.useState(void 0),[Y,ne]=I.useState(void 0),[K,B]=I.useState(void 0),j={top:c,bottom:h,left:s,right:f},$=r-j.left-j.right,V=n-j.top-j.bottom,z=Math.min((ae=Br(e,"y1"))==null?void 0:ae.y1,(U=Br(e,"y2"))==null?void 0:U.y2),W=Math.max((H=Vr(e,"y1"))==null?void 0:H.y1,(R=Vr(e,"y2"))==null?void 0:R.y2),G=br().domain([Fe(S)?z>0?0:z:S,Fe(w)?W>0?W:0:w]).range([V,0]).nice();return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,className:"mx-auto",direction:"ltr",children:v.jsxs("g",{transform:`translate(${j.left},${j.top})`,children:[v.jsxs("g",{children:[v.jsx(Nr,{y1:0,y2:V,x1:l,x2:l,classNames:{axis:Be("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",(ee=T==null?void 0:T.yAxis)==null?void 0:ee.axis)}}),v.jsx(nn,{x:l,y:V+15,style:(J=D==null?void 0:D.yAxis)==null?void 0:J.title,className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(Z=T==null?void 0:T.yAxis)==null?void 0:Z.title),text:g[0]})]}),v.jsxs("g",{children:[v.jsx(Nr,{y1:0,y2:V,x1:$-l,x2:$-l,classNames:{axis:Be("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",(re=T==null?void 0:T.yAxis)==null?void 0:re.axis)}}),v.jsx(nn,{x:$-l,y:V+15,style:(te=D==null?void 0:D.yAxis)==null?void 0:te.title,className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(F=T==null?void 0:T.yAxis)==null?void 0:F.title),text:g[1]})]}),e.map((q,X)=>{var ie,ce,de,he,Oe,Ne,Te,_e;return v.jsxs("g",{opacity:b?q.color&&i[o.indexOf(`${q.color}`)]===b?1:.3:A?A.label===q.label?1:.3:y.length!==0?y.indexOf(q.label)!==-1?1:.5:1,onMouseEnter:xe=>{M(q),B(xe.clientY),ne(xe.clientX),m&&m(q)},onMouseMove:xe=>{M(q),B(xe.clientY),ne(xe.clientX)},onMouseLeave:()=>{M(void 0),ne(void 0),B(void 0),m&&m(void 0)},onClick:()=>{(C||_)&&(Sr(E,q)&&k?(N(void 0),C==null||C(void 0)):(N(q),C==null||C(q)))},children:[v.jsx("circle",{cx:l,cy:G(q.y1),r:l,style:{fill:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,stroke:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,fillOpacity:.6}}),a?v.jsx("text",{style:{fill:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,textAnchor:"end",...((ie=D==null?void 0:D.yAxis)==null?void 0:ie.labels)||{}},className:Be("text-xs",(ce=T==null?void 0:T.yAxis)==null?void 0:ce.labels),y:G(q.y1),x:5,dy:"0.33em",dx:-3,children:q.label}):y.length!==0&&y.indexOf(q.label)!==-1?v.jsx("text",{style:{fill:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,textAnchor:"end",...((de=D==null?void 0:D.yAxis)==null?void 0:de.labels)||{}},className:Be("text-xs",(he=T==null?void 0:T.yAxis)==null?void 0:he.labels),y:G(q.y1),x:5,dy:"0.33em",dx:-3,children:q.label}):null,v.jsx("circle",{cx:$-l,cy:G(q.y2),r:l,style:{fill:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,stroke:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,fillOpacity:.6}}),a?v.jsx("text",{style:{fill:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,textAnchor:"start",...((Oe=D==null?void 0:D.yAxis)==null?void 0:Oe.labels)||{}},className:Be("text-xs",(Ne=T==null?void 0:T.yAxis)==null?void 0:Ne.labels),y:G(q.y2),x:$-5,dy:"0.33em",dx:3,children:q.label}):y.length!==0&&y.indexOf(q.label)!==-1?v.jsx("text",{style:{fill:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,textAnchor:"start",...((Te=D==null?void 0:D.yAxis)==null?void 0:Te.labels)||{}},className:Be("text-xs",(_e=T==null?void 0:T.yAxis)==null?void 0:_e.labels),y:G(q.y2),x:$-5,dy:"0.33em",dx:3,children:q.label}):null,v.jsx("line",{x1:l,x2:$-l,y1:G(q.y1),y2:G(q.y2),className:T==null?void 0:T.dataConnectors,style:{fill:"none",stroke:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,strokeWidth:1,...D==null?void 0:D.dataConnectors}})]},X)})]})}),A&&d&&Y&&K?v.jsx(yr,{data:A,body:d,xPos:Y,yPos:K,backgroundStyle:D==null?void 0:D.tooltip,className:T==null?void 0:T.tooltip}):null,_?v.jsx(Tr,{open:E!==void 0,onClose:()=>{N(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(_,E)}})}):null]})}function zH(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,showLabels:o=!1,height:l,width:s,footNote:f,colorDomain:c,colorLegendTitle:h,radius:d=5,axisTitles:m=["",""],padding:g,backgroundColor:y=!1,leftMargin:b=50,rightMargin:S=50,topMargin:w=20,bottomMargin:C=20,tooltip:k,relativeHeight:_,onSeriesMouseOver:D,showColorScale:T=!0,highlightedDataPoints:A=[],graphID:M,minValue:E,maxValue:N,onSeriesMouseClick:Y,graphDownload:ne=!1,dataDownload:K=!1,fillContainer:B=!0,language:j="en",showNAColor:$=!0,minHeight:V=0,theme:z="light",ariaLabel:W,resetSelectionOnDoubleClick:G=!0,detailsOnClick:ae,styles:U,classNames:H}=t,[R,ee]=I.useState(0),[J,Z]=I.useState(0),[re,te]=I.useState(void 0),F=I.useRef(null),q=I.useRef(null);return I.useEffect(()=>{const X=new ResizeObserver(ie=>{ee(s||ie[0].target.clientWidth||620),Z(l||ie[0].target.clientHeight||480)});return F.current&&(Z(F.current.clientHeight||480),ee(F.current.clientWidth||620),s||X.observe(F.current)),()=>X.disconnect()},[s,l]),v.jsx("div",{className:`${z||"light"} flex ${s?"grow-0":"grow"} ${B?"w-full":"w-fit"} `,dir:j==="he"||j==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${y?y===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${j||"en"}`,H==null?void 0:H.graphContainer),style:{...(U==null?void 0:U.graphContainer)||{},...y&&y!==!0?{backgroundColor:y}:{}},id:M,ref:q,"aria-label":W||`${r?`The graph shows ${r}. `:""}This is a slope chart showing changes in data between two category or starting and ending time. Each line represents a different row in data, with lines sloping up or down to show increase or decrease over two categories or time.${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:y?g||"1rem":g||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||ne||K?v.jsx(Zt,{styles:{title:U==null?void 0:U.title,description:U==null?void 0:U.description},classNames:{title:H==null?void 0:H.title,description:H==null?void 0:H.description},graphTitle:r,graphDescription:i,width:s,graphDownload:ne?q.current:void 0,dataDownload:K?e.map(X=>X.data).filter(X=>X!==void 0).length>0?e.map(X=>X.data).filter(X=>X!==void 0):e.filter(X=>X!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[T&&e.filter(X=>X.color).length!==0?v.jsx(Cn,{width:s,colorLegendTitle:h,colors:n||Qe[z].categoricalColors.colors,colorDomain:c||Bt(e.filter(X=>X.color),"color").map(X=>X.color),setSelectedColor:te,showNAColor:$}):null,v.jsx("div",{className:"flex flex-col grow justify-center w-full leading-0",ref:F,"aria-label":"Graph area",children:(s||R)&&(l||J)?v.jsx(Jge,{data:e.filter(X=>!Fe(X.y1)&&!Fe(X.y2)),width:s||R,height:Math.max(V,l||(_?V?(s||R)*_>V?(s||R)*_:V:(s||R)*_:J)),colorDomain:e.filter(X=>X.color).length===0?[]:c||Bt(e.filter(X=>X.color),"color").map(X=>X.color),colors:e.filter(X=>X.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[z].categoricalColors.colors,selectedColor:re,axisTitles:m,showLabels:o,radius:d,leftMargin:b,rightMargin:S,topMargin:w,bottomMargin:C,tooltip:k,onSeriesMouseOver:D,highlightedDataPoints:A,minValue:E,maxValue:N,onSeriesMouseClick:Y,resetSelectionOnDoubleClick:G,detailsOnClick:ae,styles:U,classNames:H}):null})]})}),a||f?v.jsx(tr,{styles:{footnote:U==null?void 0:U.footnote,source:U==null?void 0:U.source},classNames:{footnote:H==null?void 0:H.footnote,source:H==null?void 0:H.source},sources:a,footNote:f,width:s}):null]})})})})}function Zge(t){var ce,de,he,Oe,Ne,Te,_e,xe,we,ge,ve,le,ue,Ce;const{data:e,width:r,height:n,colors:a,dateFormat:i,noOfXTicks:o,rightMargin:l,leftMargin:s,topMargin:f,bottomMargin:c,yAxisTitle:h,tooltip:d,onSeriesMouseOver:m,highlightAreaSettings:g,refValues:y,minValue:b,maxValue:S,rtl:w,annotations:C,customHighlightAreaSettings:k,noOfYTicks:_,prefix:D,suffix:T,curveType:A,styles:M,classNames:E}=t,N=A==="linear"?yo:A==="step"?e2:A==="stepAfter"?r2:A==="stepBefore"?t2:Q0,[Y,ne]=I.useState(void 0),[K,B]=I.useState(void 0),[j,$]=I.useState(void 0),V={top:f,bottom:c,left:h?s+30:s,right:l},z=I.useRef(null),W=Ut(e.map(pe=>({...pe,date:bt(`${pe.date}`,i,new Date)})),"date"),G=g.map(pe=>({...pe,coordinates:[pe.coordinates[0]===null?null:bt(`${pe.coordinates[0]}`,i,new Date),pe.coordinates[1]===null?null:bt(`${pe.coordinates[1]}`,i,new Date)]})),ae=k.map(pe=>({...pe,coordinates:pe.coordinates.map((ye,be)=>be%2===0?bt(`${ye}`,i,new Date):ye)})),U=W[0].y.map((pe,ye)=>W.map(be=>({date:be.date,y0:ye===0?0:fr(be.y.filter((je,$e)=>$e<ye)),y1:fr(be.y.filter((je,$e)=>$e<=ye))}))),H=r-V.left-V.right,R=n-V.top-V.bottom,ee=W[0].date,J=W[W.length-1].date,Z=Fe(b)?0:b,re=Fe(S)?Math.max(...e.map(pe=>fr(pe.y)||0)):S,te=G2().domain([ee,J]).range([0,H]),F=br().domain([Z,re]).range([R,0]).nice(),q=C6().x(pe=>te(pe.date)).y0(pe=>F(pe.y0)).y1(pe=>F(pe.y1)).curve(N),X=F.ticks(_),ie=te.ticks(o);return I.useEffect(()=>{const pe=be=>{const je=W[U2(W.map($e=>$e.date),te.invert(K1(be)[0]),1)];ne(je||W[W.length-1]),m&&m(je||W[W.length-1]),$(be.clientY),B(be.clientX)},ye=()=>{ne(void 0),B(void 0),$(void 0),m&&m(void 0)};Qr(z.current).on("mousemove",pe).on("mouseout",ye)},[te,W,m]),v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${V.left},${V.top})`,children:[v.jsx(h4,{areaSettings:G,width:H,height:R,scale:te}),v.jsx(Z2,{areaSettings:ae,scaleX:te,scaleY:F}),v.jsxs("g",{children:[v.jsx(v1,{values:X.filter(pe=>pe!==0),y:X.filter(pe=>pe!==0).map(pe=>F(pe)),x1:0-s,x2:H+V.right,styles:{gridLines:(ce=M==null?void 0:M.yAxis)==null?void 0:ce.gridLines,labels:(de=M==null?void 0:M.yAxis)==null?void 0:de.labels},classNames:{gridLines:(he=E==null?void 0:E.yAxis)==null?void 0:he.gridLines,labels:(Oe=E==null?void 0:E.yAxis)==null?void 0:Oe.labels},suffix:T,prefix:D,labelType:"secondary",showGridLines:!0,labelPos:"vertical"}),v.jsx(Nr,{y1:F(Z<0?0:Z),y2:F(Z<0?0:Z),x1:0-s,x2:H+V.right,label:_t(Z<0?0:Z,D,T),labelPos:{x:0-s,dx:0,dy:re<0?"1em":-5,y:F(Z<0?0:Z)},classNames:{axis:(Ne=E==null?void 0:E.xAxis)==null?void 0:Ne.axis,label:(Te=E==null?void 0:E.yAxis)==null?void 0:Te.labels},styles:{axis:(_e=M==null?void 0:M.xAxis)==null?void 0:_e.axis,label:(xe=M==null?void 0:M.yAxis)==null?void 0:xe.labels}}),v.jsx(nn,{x:0-s-15,y:R/2,style:(we=M==null?void 0:M.yAxis)==null?void 0:we.title,className:(ge=E==null?void 0:E.yAxis)==null?void 0:ge.title,text:h,rotate90:!0})]}),v.jsx(La,{values:ie.map(pe=>Sa(pe,i)),x:ie.map(pe=>te(pe)),y1:0,y2:R,styles:{gridLines:(ve=M==null?void 0:M.xAxis)==null?void 0:ve.gridLines,labels:(le=M==null?void 0:M.xAxis)==null?void 0:le.labels},classNames:{gridLines:Be("opacity-0",(ue=E==null?void 0:E.xAxis)==null?void 0:ue.gridLines),labels:Be("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[8px] sm:text-[9px] md:text-[10px] lg:text-xs",(Ce=E==null?void 0:E.xAxis)==null?void 0:Ce.labels)},suffix:T,prefix:D,labelType:"primary",showGridLines:!0}),v.jsxs("g",{children:[U.map((pe,ye)=>v.jsx("path",{d:q(pe),style:{fill:a[ye],opacity:.8}},ye)),Y?v.jsx("line",{y1:0,y2:R,x1:te(Y.date),x2:te(Y.date),className:Be("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",E==null?void 0:E.mouseOverLine),style:M==null?void 0:M.mouseOverLine}):null]}),y?v.jsx(v.Fragment,{children:y.map((pe,ye)=>v.jsx(h1,{text:pe.text,color:pe.color,y:F(pe.value),x1:0-s,x2:H+V.right,classNames:pe.classNames,styles:pe.styles},ye))}):null,v.jsx("g",{children:C.map((pe,ye)=>{const be=K2({x:pe.xCoordinate?te(bt(`${pe.xCoordinate}`,i,new Date))+(pe.xOffset||0):0+(pe.xOffset||0),y:pe.yCoordinate?F(pe.yCoordinate)+(pe.yOffset||0)-8:0+(pe.yOffset||0)-8},{x:pe.xCoordinate?te(bt(`${pe.xCoordinate}`,i,new Date)):0,y:pe.yCoordinate?F(pe.yCoordinate):0},Fe(pe.connectorRadius)?3.5:pe.connectorRadius),je=pe.showConnector?{y1:be.y,x1:be.x,y2:pe.yCoordinate?F(pe.yCoordinate)+(pe.yOffset||0):0+(pe.yOffset||0),x2:pe.xCoordinate?te(bt(`${pe.xCoordinate}`,i,new Date))+(pe.xOffset||0):0+(pe.xOffset||0),cx:pe.xCoordinate?te(bt(`${pe.xCoordinate}`,i,new Date)):0,cy:pe.yCoordinate?F(pe.yCoordinate):0,circleRadius:Fe(pe.connectorRadius)?3.5:pe.connectorRadius,strokeWidth:pe.showConnector===!0?2:Math.min(pe.showConnector||0,1)}:void 0,$e={y:pe.yCoordinate?F(pe.yCoordinate)+(pe.yOffset||0)-8:0+(pe.yOffset||0)-8,x:w?0:pe.xCoordinate?te(bt(`${pe.xCoordinate}`,i,new Date))+(pe.xOffset||0):0+(pe.xOffset||0),width:w?pe.xCoordinate?te(bt(`${pe.xCoordinate}`,i,new Date))+(pe.xOffset||0):0+(pe.xOffset||0):H-(pe.xCoordinate?te(bt(`${pe.xCoordinate}`,i,new Date))+(pe.xOffset||0):0+(pe.xOffset||0)),maxWidth:pe.maxWidth,fontWeight:pe.fontWeight,align:pe.align};return v.jsx(J2,{color:pe.color,connectorsSettings:je,labelSettings:$e,text:pe.text,classNames:pe.classNames,styles:pe.styles},ye)})}),v.jsx("rect",{ref:z,style:{fill:"none",pointerEvents:"all"},width:H,height:R})]})}),Y&&d&&K&&j?v.jsx(yr,{data:Y,body:d,xPos:K,yPos:j,backgroundStyle:M==null?void 0:M.tooltip,className:E==null?void 0:E.tooltip}):null]})}function HH(t){const{data:e,graphTitle:r,colors:n=Qe.light.categoricalColors.colors,sources:a,graphDescription:i,height:o,width:l,footNote:s,noOfXTicks:f=10,dateFormat:c="yyyy",colorDomain:h,padding:d,backgroundColor:m=!1,colorLegendTitle:g,leftMargin:y=50,rightMargin:b=20,topMargin:S=20,bottomMargin:w=25,highlightAreaSettings:C=[],tooltip:k,relativeHeight:_,onSeriesMouseOver:D,refValues:T=[],graphID:A,minValue:M,maxValue:E,graphDownload:N=!1,dataDownload:Y=!1,showColorScale:ne=!0,language:K="en",minHeight:B=0,annotations:j=[],customHighlightAreaSettings:$=[],theme:V="light",ariaLabel:z,yAxisTitle:W,noOfYTicks:G=5,prefix:ae="",suffix:U="",curveType:H="curve",styles:R,classNames:ee}=t,[J,Z]=I.useState(0),[re,te]=I.useState(0),F=I.useRef(null),q=I.useRef(null);return I.useEffect(()=>{const X=new ResizeObserver(ie=>{Z(l||ie[0].target.clientWidth||620),te(o||ie[0].target.clientHeight||480)});return F.current&&(te(F.current.clientHeight||480),Z(F.current.clientWidth||620),l||X.observe(F.current)),()=>X.disconnect()},[l,o]),v.jsx("div",{className:`${V||"light"} flex ${l?"w-fit grow-0":"w-full grow"}`,dir:K==="he"||K==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${m?m===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${K||"en"}`,ee==null?void 0:ee.graphContainer),style:{...(R==null?void 0:R.graphContainer)||{},...m&&m!==!0?{backgroundColor:m}:{}},id:A,ref:q,"aria-label":z||`${r?`The graph shows ${r}. `:""}This is a stacked area chart that shows trends over time.${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:m?d||"1rem":d||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||N||Y?v.jsx(Zt,{styles:{title:R==null?void 0:R.title,description:R==null?void 0:R.description},classNames:{title:ee==null?void 0:ee.title,description:ee==null?void 0:ee.description},graphTitle:r,graphDescription:i,width:l,graphDownload:N?q.current:void 0,dataDownload:Y?e.map(X=>X.data).filter(X=>X!==void 0).length>0?e.map(X=>X.data).filter(X=>X!==void 0):e.filter(X=>X!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[ne!==!1?v.jsx(g0,{colorDomain:h,colors:n,colorLegendTitle:g,showNAColor:!1}):null,v.jsx("div",{className:"w-full grow leading-0",ref:F,"aria-label":"Graph area",children:(l||J)&&(o||re)?v.jsx(Zge,{data:e,colors:n,width:l||J,height:Math.max(B,o||(_?B?(l||J)*_>B?(l||J)*_:B:(l||J)*_:re)),dateFormat:c,noOfXTicks:f,leftMargin:y,rightMargin:b,topMargin:S,bottomMargin:w,tooltip:k,onSeriesMouseOver:D,highlightAreaSettings:C,refValues:T,minValue:M,maxValue:E,rtl:K==="he"||K==="ar",annotations:j,customHighlightAreaSettings:$,yAxisTitle:W,noOfYTicks:G,prefix:ae,suffix:U,curveType:H,styles:R,classNames:ee}):null})]})}),a||s?v.jsx(tr,{styles:{footnote:R==null?void 0:R.footnote,source:R==null?void 0:R.source},classNames:{footnote:ee==null?void 0:ee.footnote,source:ee==null?void 0:ee.source},sources:a,footNote:s,width:l}):null]})})})})}function Qge(t){const{year:e,value:r,graphTitle:n,suffix:a="",sources:i,prefix:o="",graphDescription:l,footNote:s,padding:f,backgroundColor:c=!1,graphID:h,language:d="en",theme:m="light",ariaLabel:g,textBackground:y=!1,headingFontSize:b="4.375rem",centerAlign:S=!1,verticalAlign:w="center",styles:C,classNames:k}=t;return v.jsx("div",{className:`${m||"light"} flex w-full`,dir:d==="he"||d==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${c?c===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}flex flex-col w-full h-inherit ${d||"en"}`,k==null?void 0:k.graphContainer),style:{...(C==null?void 0:C.graphContainer)||{},...c&&c!==!0?{backgroundColor:c}:{}},id:h,"aria-label":g||`${n?`The graph shows ${n}. `:""}This is a statistic card.${l?` ${l}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:c?f||"1rem":f||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-12 justify-between grow",children:[n||l?v.jsx(Zt,{styles:{title:C==null?void 0:C.title,description:C==null?void 0:C.description},classNames:{title:k==null?void 0:k.title,description:k==null?void 0:k.description},graphTitle:n,graphDescription:l}):null,v.jsx("div",{className:`flex flex-col justify-between grow ${w==="top"?"justify-start":w==="bottom"?"justify-end":"justify-center"}`,children:v.jsxs(rP,{marginBottom:"base",className:`leading-none text-outline font-heading ${S?"text-center":d==="he"||d==="ar"?"text-right":"text-left"} ${y?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:b,letterSpacing:"0.05rem"},children:[typeof r=="string"?`${o}${r}${a}`:_t(r,o,a)," ",e?v.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",e,")"]}):null]})}),i||s?v.jsx(tr,{styles:{footnote:C==null?void 0:C.footnote,source:C==null?void 0:C.source},classNames:{footnote:k==null?void 0:k.footnote,source:k==null?void 0:k.source},sources:i,footNote:s}):null]})})})})}function qH(t){var T,A;const{year:e,data:r,graphTitle:n,suffix:a="",sources:i,prefix:o="",graphDescription:l,footNote:s,padding:f,backgroundColor:c=!1,graphID:h,aggregationMethod:d="count",language:m="en",countOnly:g,theme:y="light",ariaLabel:b,textBackground:S=!1,headingFontSize:w="4.375rem",centerAlign:C=!1,verticalAlign:k="center",styles:_,classNames:D}=t;return v.jsx("div",{className:`${y||"light"} flex w-full`,dir:m==="he"||m==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${c?c===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}flex flex-col w-full h-inherit ${m||"en"}`,D==null?void 0:D.graphContainer),style:{...(_==null?void 0:_.graphContainer)||{},...c&&c!==!0?{backgroundColor:c}:{}},id:h,"aria-label":b||`${n?`The graph shows ${n}. `:""}This is a statistic card.${l?` ${l}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:c?f||"1rem":f||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-12 justify-between grow",children:[n||l?v.jsx(Zt,{styles:{title:_==null?void 0:_.title,description:_==null?void 0:_.description},classNames:{title:D==null?void 0:D.title,description:D==null?void 0:D.description},graphTitle:n,graphDescription:l}):null,v.jsx("div",{className:`flex flex-col justify-between grow ${k==="top"?"justify-start":k==="bottom"?"justify-end":"justify-center"}`,children:v.jsxs(rP,{marginBottom:"base",className:`leading-none text-outline font-heading ${C?"text-center":m==="he"||m==="ar"?"text-right":"text-left"} ${S?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:w,letterSpacing:"0.05rem"},children:[r.filter(M=>typeof M.value=="string").length>0||d==="count"?g&&(g==null?void 0:g.length)!==0?r.filter(M=>g.indexOf(M.value)!==-1).length:r.length:_t(d==="sum"?fr(r.map(M=>M.value)):d==="average"?parseFloat((fr(r.map(M=>M.value))/r.length).toFixed(2)):d==="max"?(T=Vr(r,M=>M.value))==null?void 0:T.value:(A=Br(r,M=>M.value))==null?void 0:A.value,o,a)," ",e?v.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",e,")"]}):null]})}),i||s?v.jsx(tr,{styles:{footnote:_==null?void 0:_.footnote,source:_==null?void 0:_.source},classNames:{footnote:D==null?void 0:D.footnote,source:D==null?void 0:D.source},sources:i,footNote:s}):null]})})})})}function eye(t){var e=0,r=t.children,n=r&&r.length;if(!n)e=1;else for(;--n>=0;)e+=r[n].value;t.value=e}function tye(){return this.eachAfter(eye)}function rye(t,e){let r=-1;for(const n of this)t.call(e,n,++r,this);return this}function nye(t,e){for(var r=this,n=[r],a,i,o=-1;r=n.pop();)if(t.call(e,r,++o,this),a=r.children)for(i=a.length-1;i>=0;--i)n.push(a[i]);return this}function aye(t,e){for(var r=this,n=[r],a=[],i,o,l,s=-1;r=n.pop();)if(a.push(r),i=r.children)for(o=0,l=i.length;o<l;++o)n.push(i[o]);for(;r=a.pop();)t.call(e,r,++s,this);return this}function iye(t,e){let r=-1;for(const n of this)if(t.call(e,n,++r,this))return n}function oye(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,n=e.children,a=n&&n.length;--a>=0;)r+=n[a].value;e.value=r})}function lye(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function sye(t){for(var e=this,r=uye(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var a=n.length;t!==r;)n.splice(a,0,t),t=t.parent;return n}function uye(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),a=null;for(t=r.pop(),e=n.pop();t===e;)a=t,t=r.pop(),e=n.pop();return a}function cye(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function fye(){return Array.from(this)}function dye(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function hye(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}function*pye(){var t=this,e,r=[t],n,a,i;do for(e=r.reverse(),r=[];t=e.pop();)if(yield t,n=t.children)for(a=0,i=n.length;a<i;++a)r.push(n[a]);while(r.length)}function WH(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=yye)):e===void 0&&(e=gye);for(var r=new Ns(t),n,a=[r],i,o,l,s;n=a.pop();)if((o=e(n.data))&&(s=(o=Array.from(o)).length))for(n.children=o,l=s-1;l>=0;--l)a.push(i=o[l]=new Ns(o[l])),i.parent=n,i.depth=n.depth+1;return r.eachBefore(UH)}function mye(){return WH(this).eachBefore(vye)}function gye(t){return t.children}function yye(t){return Array.isArray(t)?t[1]:null}function vye(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function UH(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Ns(t){this.data=t,this.depth=this.height=0,this.parent=null}Ns.prototype=WH.prototype={constructor:Ns,count:tye,each:rye,eachAfter:aye,eachBefore:nye,find:iye,sum:oye,sort:lye,path:sye,ancestors:cye,descendants:fye,leaves:dye,links:hye,copy:mye,[Symbol.iterator]:pye};function Cm(t){return t==null?null:GH(t)}function GH(t){if(typeof t!="function")throw new Error;return t}function Dl(){return 0}function Al(t){return function(){return t}}function bye(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function xye(t,e,r,n,a){for(var i=t.children,o,l=-1,s=i.length,f=t.value&&(n-e)/t.value;++l<s;)o=i[l],o.y0=r,o.y1=a,o.x0=e,o.x1=e+=o.value*f}var wye={depth:-1},BM={},km={};function Sye(t){return t.id}function Cye(t){return t.parentId}function kye(){var t=Sye,e=Cye,r;function n(a){var i=Array.from(a),o=t,l=e,s,f,c,h,d,m,g,y,b=new Map;if(r!=null){const S=i.map((k,_)=>_ye(r(k,_,a))),w=S.map(VM),C=new Set(S).add("");for(const k of w)C.has(k)||(C.add(k),S.push(k),w.push(VM(k)),i.push(km));o=(k,_)=>S[_],l=(k,_)=>w[_]}for(c=0,s=i.length;c<s;++c)f=i[c],m=i[c]=new Ns(f),(g=o(f,c,a))!=null&&(g+="")&&(y=m.id=g,b.set(y,b.has(y)?BM:m)),(g=l(f,c,a))!=null&&(g+="")&&(m.parent=g);for(c=0;c<s;++c)if(m=i[c],g=m.parent){if(d=b.get(g),!d)throw new Error("missing: "+g);if(d===BM)throw new Error("ambiguous: "+g);d.children?d.children.push(m):d.children=[m],m.parent=d}else{if(h)throw new Error("multiple roots");h=m}if(!h)throw new Error("no root");if(r!=null){for(;h.data===km&&h.children.length===1;)h=h.children[0],--s;for(let S=i.length-1;S>=0&&(m=i[S],m.data===km);--S)m.data=null}if(h.parent=wye,h.eachBefore(function(S){S.depth=S.parent.depth+1,--s}).eachBefore(UH),h.parent=null,s>0)throw new Error("cycle");return h}return n.id=function(a){return arguments.length?(t=Cm(a),n):t},n.parentId=function(a){return arguments.length?(e=Cm(a),n):e},n.path=function(a){return arguments.length?(r=Cm(a),n):r},n}function _ye(t){t=`${t}`;let e=t.length;return tv(t,e-1)&&!tv(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function VM(t){let e=t.length;if(e<2)return"";for(;--e>1&&!tv(t,e););return t.slice(0,e)}function tv(t,e){if(t[e]==="/"){let r=0;for(;e>0&&t[--e]==="\\";)++r;if((r&1)===0)return!0}return!1}function Oye(t,e,r,n,a){for(var i=t.children,o,l=-1,s=i.length,f=t.value&&(a-r)/t.value;++l<s;)o=i[l],o.x0=e,o.x1=n,o.y0=r,o.y1=r+=o.value*f}var Dye=(1+Math.sqrt(5))/2;function Aye(t,e,r,n,a,i){for(var o=[],l=e.children,s,f,c=0,h=0,d=l.length,m,g,y=e.value,b,S,w,C,k,_,D;c<d;){m=a-r,g=i-n;do b=l[h++].value;while(!b&&h<d);for(S=w=b,_=Math.max(g/m,m/g)/(y*t),D=b*b*_,k=Math.max(w/D,D/S);h<d;++h){if(b+=f=l[h].value,f<S&&(S=f),f>w&&(w=f),D=b*b*_,C=Math.max(w/D,D/S),C>k){b-=f;break}k=C}o.push(s={value:b,dice:m<g,children:l.slice(c,h)}),s.dice?xye(s,r,n,a,y?n+=g*b/y:i):Oye(s,r,n,y?r+=m*b/y:a,i),y-=b,c=h}return o}const Tye=function t(e){function r(n,a,i,o,l){Aye(e,n,a,i,o,l)}return r.ratio=function(n){return t((n=+n)>1?n:1)},r}(Dye);function Mye(){var t=Tye,e=!1,r=1,n=1,a=[0],i=Dl,o=Dl,l=Dl,s=Dl,f=Dl;function c(d){return d.x0=d.y0=0,d.x1=r,d.y1=n,d.eachBefore(h),a=[0],e&&d.eachBefore(bye),d}function h(d){var m=a[d.depth],g=d.x0+m,y=d.y0+m,b=d.x1-m,S=d.y1-m;b<g&&(g=b=(g+b)/2),S<y&&(y=S=(y+S)/2),d.x0=g,d.y0=y,d.x1=b,d.y1=S,d.children&&(m=a[d.depth+1]=i(d)/2,g+=f(d)-m,y+=o(d)-m,b-=l(d)-m,S-=s(d)-m,b<g&&(g=b=(g+b)/2),S<y&&(y=S=(y+S)/2),t(d,g,y,b,S))}return c.round=function(d){return arguments.length?(e=!!d,c):e},c.size=function(d){return arguments.length?(r=+d[0],n=+d[1],c):[r,n]},c.tile=function(d){return arguments.length?(t=GH(d),c):t},c.padding=function(d){return arguments.length?c.paddingInner(d).paddingOuter(d):c.paddingInner()},c.paddingInner=function(d){return arguments.length?(i=typeof d=="function"?d:Al(+d),c):i},c.paddingOuter=function(d){return arguments.length?c.paddingTop(d).paddingRight(d).paddingBottom(d).paddingLeft(d):c.paddingTop()},c.paddingTop=function(d){return arguments.length?(o=typeof d=="function"?d:Al(+d),c):o},c.paddingRight=function(d){return arguments.length?(l=typeof d=="function"?d:Al(+d),c):l},c.paddingBottom=function(d){return arguments.length?(s=typeof d=="function"?d:Al(+d),c):s},c.paddingLeft=function(d){return arguments.length?(f=typeof d=="function"?d:Al(+d),c):f},c}function Eye(t){var ae;const{data:e,colors:r,leftMargin:n,width:a,height:i,colorDomain:o,rightMargin:l,topMargin:s,bottomMargin:f,showLabels:c,tooltip:h,onSeriesMouseOver:d,selectedColor:m,showValues:g,suffix:y,prefix:b,highlightedDataPoints:S,onSeriesMouseClick:w,resetSelectionOnDoubleClick:C,detailsOnClick:k,language:_,styles:D,classNames:T}=t,[A,M]=I.useState(void 0),[E,N]=I.useState(void 0),[Y,ne]=I.useState(void 0),[K,B]=I.useState(void 0),j={top:s,bottom:f,left:n,right:l},$=a-j.left-j.right,V=i-j.top-j.bottom,z=[{id:"root",parent:void 0,value:void 0,data:void 0},...e.map(U=>({id:U.label,value:U.size,parent:"root",data:U}))],W=kye().id(U=>U.id).parentId(U=>U.parent)(z);W.sum(U=>U.value);const G=Mye().size([$,V]).padding(2)(W);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${a}px`,height:`${i}px`,viewBox:`0 0 ${a} ${i}`,direction:"ltr",children:v.jsx("g",{transform:`translate(${j.left},${j.top})`,children:(ae=G.children)==null?void 0:ae.map((U,H)=>v.jsxs("g",{className:"undp-viz-g-with-hover",opacity:m?U.data.data.color&&r[o.indexOf(U.data.data.color)]===m?1:.3:S.length!==0?S.indexOf(U.data.id)!==-1?.85:.3:.85,transform:`translate(${U.x0},${U.y0})`,onMouseEnter:R=>{M(U.data.data),B(R.clientY),ne(R.clientX),d==null||d(U.data.data)},onClick:()=>{(w||k)&&(E===U.data.id&&C?(N(void 0),w==null||w(void 0)):(N(U.data.id),w==null||w(U.data.data)))},onMouseMove:R=>{M(U.data.data),B(R.clientY),ne(R.clientX)},onMouseLeave:()=>{M(void 0),ne(void 0),B(void 0),d&&d(void 0)},children:[v.jsx("rect",{x:0,y:0,width:U.x1-U.x0,height:U.y1-U.y0,style:{fill:e.filter(R=>R.color).length===0?r[0]:U.data.data.color?r[o.indexOf(U.data.data.color)]:Qe.gray}},H),U.x1-U.x0>50&&U.y1-U.y0>25&&(c||g)?v.jsx("foreignObject",{y:0,x:0,width:U.x1-U.x0,height:U.y1-U.y0,children:v.jsxs("div",{className:"flex flex-col gap-0.5 p-2 w-full",style:{color:Bi(e.filter(R=>R.color).length===0?r[0]:U.data.data.color?r[o.indexOf(U.data.data.color)]:Qe.gray)},children:[c?v.jsx(or,{marginBottom:"none",size:"sm",leading:"none",className:Be("w-full treemap-label",_==="ar"||_==="he"?"text-right":"text-left",T==null?void 0:T.graphObjectValues),style:{WebkitLineClamp:U.y1-U.y0>50?U.y1-U.y0>100?U.y1-U.y0>150?void 0:3:2:1,display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",color:Bi(e.filter(R=>R.color).length===0?r[0]:U.data.data.color?r[o.indexOf(U.data.data.color)]:Qe.gray),...(D==null?void 0:D.graphObjectValues)||{}},children:U.data.id}):null,g?v.jsx(or,{marginBottom:"none",size:"sm",leading:"none",className:Be("w-full font-bold treemap-value",_==="ar"||_==="he"?"text-right":"text-left",T==null?void 0:T.graphObjectValues),style:{color:Bi(e.filter(R=>R.color).length===0?r[0]:U.data.data.color?r[o.indexOf(U.data.data.color)]:Qe.gray),...(D==null?void 0:D.graphObjectValues)||{}},children:_t(U.data.value,b,y)}):null]})}):null]},H))})}),A&&h&&Y&&K?v.jsx(yr,{data:A,body:h,xPos:Y,yPos:K,backgroundStyle:D==null?void 0:D.tooltip,className:T==null?void 0:T.tooltip}):null,k?v.jsx(Tr,{open:E!==void 0,onClose:()=>{N(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(k,E)}})}):null]})}function mw(t){const{data:e,graphTitle:r,colors:n,suffix:a="",sources:i,prefix:o="",graphDescription:l,leftMargin:s=0,rightMargin:f=0,topMargin:c=0,bottomMargin:h=0,height:d,width:m,footNote:g,colorDomain:y,colorLegendTitle:b,padding:S,backgroundColor:w=!1,showLabels:C=!0,relativeHeight:k,tooltip:_,onSeriesMouseOver:D,showColorScale:T=!0,showValues:A=!0,graphID:M,highlightedDataPoints:E=[],onSeriesMouseClick:N,graphDownload:Y=!1,dataDownload:ne=!1,language:K="en",showNAColor:B=!0,minHeight:j=0,theme:$="light",ariaLabel:V,resetSelectionOnDoubleClick:z=!0,detailsOnClick:W,styles:G,classNames:ae}=t,[U,H]=I.useState(0),[R,ee]=I.useState(0),[J,Z]=I.useState(void 0),re=I.useRef(null),te=I.useRef(null);return I.useEffect(()=>{const F=new ResizeObserver(q=>{H(m||q[0].target.clientWidth||620),ee(d||q[0].target.clientHeight||480)});return re.current&&(ee(re.current.clientHeight||480),H(re.current.clientWidth||620),m||F.observe(re.current)),()=>F.disconnect()},[m,d]),v.jsx("div",{className:`${$||"light"} flex ${m?"w-fit grow-0":"w-full grow"}`,dir:K==="he"||K==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${w?w===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${K||"en"}`,ae==null?void 0:ae.graphContainer),style:{...(G==null?void 0:G.graphContainer)||{},...w&&w!==!0?{backgroundColor:w}:{}},id:M,ref:te,"aria-label":V||`${r?`The graph shows ${r}. `:""}This is a chart where data points are represented by squares, and their sizes reflect their values. ${l?` ${l}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:w?S||"1rem":S||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||l||Y||ne?v.jsx(Zt,{styles:{title:G==null?void 0:G.title,description:G==null?void 0:G.description},classNames:{title:ae==null?void 0:ae.title,description:ae==null?void 0:ae.description},graphTitle:r,graphDescription:l,width:m,graphDownload:Y?te.current:void 0,dataDownload:ne?e.map(F=>F.data).filter(F=>F!==void 0).length>0?e.map(F=>F.data).filter(F=>F!==void 0):e.filter(F=>F!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[T&&e.filter(F=>F.color).length!==0?v.jsx(Cn,{width:m,colorLegendTitle:b,colors:n||Qe[$].categoricalColors.colors,colorDomain:y||Bt(e.filter(F=>F.color),"color").map(F=>F.color),setSelectedColor:Z,showNAColor:B}):null,v.jsx("div",{className:"flex flex-col grow justify-center w-full leading-0",ref:re,"aria-label":"Graph area",children:(m||U)&&(d||R)?v.jsx(Eye,{data:e.filter(F=>!Fe(F.size)),colors:e.filter(F=>F.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[$].categoricalColors.colors,colorDomain:e.filter(F=>F.color).length===0?[]:y||Bt(e.filter(F=>F.color),"color").map(F=>F.color),width:m||U,height:Math.max(j,d||(k?j?(m||U)*k>j?(m||U)*k:j:(m||U)*k:R)),leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,showLabels:C,showValues:A,suffix:a,prefix:o,selectedColor:J,tooltip:_,onSeriesMouseOver:D,onSeriesMouseClick:N,highlightedDataPoints:E,resetSelectionOnDoubleClick:z,detailsOnClick:W,styles:G,classNames:ae,language:K}):null})]})}),i||g?v.jsx(tr,{styles:{footnote:G==null?void 0:G.footnote,source:G==null?void 0:G.source},classNames:{footnote:ae==null?void 0:ae.footnote,source:ae==null?void 0:ae.source},sources:i,footNote:g,width:m}):null]})})})})}function YH(t){const{data:e,size:r=200,graphTitle:n,sources:a,colors:i=Qe.light.categoricalColors.colors,graphDescription:o,totalNoOfDots:l=100,unitPadding:s=3,gridSize:f=10,footNote:c,padding:h,backgroundColor:d=!1,graphID:m,graphDownload:g=!1,language:y="en",showColorScale:b=!0,showStrokeForWhiteDots:S=!0,note:w,dataDownload:C=!1,theme:k="light",width:_,height:D,minHeight:T=0,relativeHeight:A,ariaLabel:M,styles:E,classNames:N}=t,Y=fr(e.map($=>$.value)),ne=I.useRef(null),K=r/f,B=(K-s*2)/2;if(B<=0)return console.error("The size of single unit is less than or equal to zero. Check values for ((dimension / gridSize) - (padding * 2)) / 2 is not less than or equal to 0."),null;const j=[];return e.forEach(($,V)=>{const z=Math.round($.value/Y*l);for(let W=0;W<z;W+=1)j.push({color:i[V]})}),v.jsx("div",{className:`${k||"light"} flex ${_?"w-fit grow-0":"w-full grow"}`,dir:y==="he"||y==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${d?d===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${y||"en"}`,N==null?void 0:N.graphContainer),style:{...(E==null?void 0:E.graphContainer)||{},minHeight:"inherit",...d&&d!==!0?{backgroundColor:d}:{}},id:m,ref:ne,"aria-label":M||`${n?`The graph shows ${n}. `:""}${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:d?h||"1rem":h||0},children:v.jsxs("div",{className:"flex flex-col gap-3 w-full grow",children:[n||o||g?v.jsx(Zt,{styles:{title:E==null?void 0:E.title,description:E==null?void 0:E.description},classNames:{title:N==null?void 0:N.title,description:N==null?void 0:N.description},graphTitle:n,graphDescription:o,width:_,graphDownload:g?ne.current:void 0,dataDownload:C?e.map($=>$.data).filter($=>$!==void 0).length>0?e.map($=>$.data).filter($=>$!==void 0):e.filter($=>$!==void 0):null}):null,w?v.jsx(tP,{marginBottom:"2xs",className:"text-primary-gray-700 dark:text-primary-gray-100 font-bold",style:{width:_?`${_}px`:"100%"},children:w}):null,v.jsxs("div",{className:"flex grow flex-col gap-4 justify-between",children:[v.jsxs("div",{children:[b?v.jsx("div",{className:"mb-4 leading-0",style:{width:_?`${_}px`:"100%"},"aria-label":"Color legend",children:v.jsx("div",{className:"flex mb-0 flex-wrap gap-x-1 gap-y-4",children:e.map(($,V)=>v.jsxs("div",{className:"flex gap-2 items-center",children:[v.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:i[V]}}),v.jsxs(or,{marginBottom:"none",size:"sm",className:"text-primary-gray-700 dark:text-primary-gray-100",children:[$.label,":"," ",v.jsx("span",{className:"font-bold",children:_t($.value)})]})]},V))})}):null,v.jsx("div",{"aria-label":"Graph area",children:v.jsx("svg",{width:`${_||r}px`,height:`${Math.max(T,D?A&&_?T?_*A>T?_*A:T:_*A:D:Math.floor((l-1)/f)*K+K/2+B+5)}px`,direction:"ltr",viewBox:`0 0 ${_||r} ${Math.max(T,D?A&&_?T?_*A>T?_*A:T:_*A:D:Math.floor((l-1)/f)*K+K/2+B+5)}`,children:v.jsx("g",{children:j.map(($,V)=>v.jsx("circle",{cx:V%f*K+K/2,cy:Math.floor(V/f)*K+K/2,style:{fill:$.color,...S?{}:{stroke:$.color},strokeWidth:1},className:($.color.toLowerCase()==="#fff"||$.color.toLowerCase()==="#ffffff"||$.color.toLowerCase()==="white")&&S?"stroke-primary-gray-400 dark:stroke-primary-gray-500":"",r:B},V))})})})]}),a||c?v.jsx(tr,{styles:{footnote:E==null?void 0:E.footnote,source:E==null?void 0:E.source},sources:a,footNote:c,width:_}):null]})]})})})})}function jye(t){const{data:e,showColumnLabels:r,leftMargin:n,rightMargin:a,truncateBy:i,width:o,height:l,topMargin:s,bottomMargin:f,tooltip:c,onSeriesMouseOver:h,suffix:d,prefix:m,showValues:g,colorDomain:y,colors:b,noDataColor:S,scaleType:w,showRowLabels:C,selectedColor:k,onSeriesMouseClick:_,resetSelectionOnDoubleClick:D,detailsOnClick:T,styles:A,classNames:M}=t,E={top:s,bottom:f,left:n,right:a},[N,Y]=I.useState(void 0),[ne,K]=I.useState(void 0),[B,j]=I.useState(void 0),[$,V]=I.useState(void 0),z=o-E.left-E.right,W=l-E.top-E.bottom,G=Bt(e,Z=>Z.column).map(Z=>Z.column),ae=Bt(e,Z=>Z.row).map(Z=>Z.row),U=Un().domain(ae).range([0,W]),H=U.bandwidth(),R=Un().domain(G).range([0,z]),ee=R.bandwidth(),J=w==="categorical"?Ys().domain(y).range(b):w==="threshold"?P2().domain(y).range(b):br().domain(y).range(b);return v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${o}px`,height:`${l}px`,viewBox:`0 0 ${o} ${l}`,style:{marginLeft:"auto",marginRight:"auto"},direction:"ltr",children:[v.jsx("g",{transform:`translate(${E.left},0)`,children:r?G.map((Z,re)=>{var te,F;return v.jsx(f4,{y:0,x:R(Z),width:ee,height:E.top-5,value:`${Z}`.length<i?`${Z}`:`${`${Z}`.substring(0,i)}...`,style:(te=A==null?void 0:A.xAxis)==null?void 0:te.labels,className:(F=M==null?void 0:M.xAxis)==null?void 0:F.labels,alignment:"bottom"},re)}):null}),v.jsx("g",{transform:`translate(0,${E.top})`,children:C?ae.map((Z,re)=>{var te,F;return v.jsx(Y2,{value:`${Z}`.length<i?`${Z}`:`${`${Z}`.substring(0,i)}...`,y:U(Z),x:0,width:E.left,height:H,alignment:"right",style:(te=A==null?void 0:A.yAxis)==null?void 0:te.labels,className:(F=M==null?void 0:M.yAxis)==null?void 0:F.labels},re)}):null}),v.jsxs("g",{transform:`translate(${E.left},${E.top})`,children:[ae.map((Z,re)=>v.jsx("g",{transform:`translate(0,${U(Z)})`,children:G.map((te,F)=>v.jsx("rect",{x:R(te),y:0,width:ee,height:H,style:{fill:S},className:"stroke-1 stroke-primary-white dark:stroke-primary-gray-700"},F))},re)),e.filter(Z=>!Fe(Z.value)).map((Z,re)=>{const te=Fe(Z.value)?S:J(Z.value);return v.jsxs("g",{transform:`translate(${R(Z.column)},${U(Z.row)})`,onMouseEnter:F=>{K(Z),V(F.clientY),j(F.clientX),h&&h(Z)},onClick:()=>{(_||T)&&(Sr(N,Z)&&D?(Y(void 0),_==null||_(void 0)):(Y(Z),_==null||_(Z)))},onMouseMove:F=>{K(Z),V(F.clientY),j(F.clientX)},onMouseLeave:()=>{K(void 0),j(void 0),V(void 0),h&&h(void 0)},opacity:k?k===te?1:.3:1,children:[v.jsx("rect",{x:0,y:0,width:ee,height:H,style:{fill:te},className:"stroke-1 stroke-primary-white dark:stroke-primary-gray-700"}),g&&!Fe(Z.value)?v.jsx("foreignObject",{y:0,x:0,width:ee,height:H,children:v.jsx("div",{className:"flex flex-col justify-center items-center h-inherit p-1",children:v.jsx("p",{className:Be("text-xs text-center m-0 leading-[1.25] graph-value",M==null?void 0:M.graphObjectValues),style:{color:Bi(te),...(A==null?void 0:A.graphObjectValues)||{}},children:typeof Z.value=="string"?`${m} ${Z.value} ${d}`:_t(Z.value,m,d)})})},re):null]},re)}),ne?v.jsx("rect",{x:R(ne.column),y:U(ne.row),width:ee,height:H,style:{fill:"none",fillOpacity:0,strokeWidth:1.5},className:"stroke-primary-gray-700 dark:stroke-primary-gray-300"}):null]})]}),ne&&c&&B&&$?v.jsx(yr,{data:ne,body:c,xPos:B,yPos:$,backgroundStyle:A==null?void 0:A.tooltip,className:M==null?void 0:M.tooltip}):null,T?v.jsx(Tr,{open:N!==void 0,onClose:()=>{Y(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(T,N)}})}):null]})}function XH(t){const{colorLegendTitle:e,colorDomain:r,colors:n,width:a,className:i}=t;return v.jsxs("div",{className:Be("flex gap-0 flex-wrap justify-center leading-0",i),style:{maxWidth:a?`${a}px`:"none"},"aria-label":"Color legend",children:[e&&e!==""?v.jsx(or,{size:"sm",marginBottom:"2xs",className:"w-full text-center",children:e}):null,v.jsxs("div",{className:"flex gap-0 flex-wrap justify-center w-full min-w-[360px] leading-0",children:[v.jsx("div",{className:"h-4 mb-1 w-full min-w-[360px]",style:{background:`linear-gradient(90deg, ${n[0]} 0%, ${n[1]} 100%)`}}),v.jsxs("div",{className:"flex justify-between w-full min-w-[360px]",children:[v.jsx(or,{marginBottom:"none",size:"sm",children:_t(r[0],"","")}),v.jsx(or,{marginBottom:"none",size:"sm",children:_t(r[1],"","")})]})]})]})}function KH(t){const{colorLegendTitle:e,colorDomain:r,colors:n,setSelectedColor:a,width:i,naColor:o,className:l,showNAColor:s}=t,[f,c]=I.useState(void 0),h=o?320:360;return v.jsxs("div",{className:Be("flex flex-wrap gap-0 justify-center leading-0",l),style:{maxWidth:i?`${i}px`:"none"},"aria-label":"Color legend",children:[e&&e!==""?v.jsx(or,{size:"sm",marginBottom:"2xs",className:"w-full text-center",children:e}):null,v.jsx("svg",{width:"100%",viewBox:"0 0 360 30",style:{maxWidth:"360px"},direction:"ltr",children:v.jsxs("g",{children:[r.map((d,m)=>v.jsxs("g",{onMouseOver:()=>{c(n[m]),a(n[m])},onMouseLeave:()=>{c(void 0),a(void 0)},className:"cursor-pointer",children:[v.jsx("rect",{x:m*h/n.length+1,y:1,width:h/n.length-2,height:8,className:`stroke-1 ${f===n[m]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:n[m],...f!==n[m]?{stroke:n[m]}:{}}}),v.jsx("text",{x:(m+1)*h/n.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"middle"},children:_t(d,"","")})]},m)),v.jsx("g",{children:v.jsx("rect",{onMouseOver:()=>{c(n[r.length]),a(n[r.length])},onMouseLeave:()=>{c(void 0),a(void 0)},x:r.length*h/n.length+1,y:1,width:h/n.length-2,height:8,className:`cursor-pointer stroke-1 ${f===n[r.length]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:n[r.length],...f!==n[r.length]?{stroke:n[r.length]}:{}}})}),s?v.jsxs("g",{onMouseOver:()=>{c(o||"#D4D6D8"),a(o||"#D4D6D8")},onMouseLeave:()=>{c(void 0),a(void 0)},className:"cursor-pointer",children:[v.jsx("rect",{x:335,y:1,width:24,height:8,className:`stroke-1 ${f===o?"stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:o||"#D4D6D8",...f!==o?{stroke:o}:{},strokeWidth:1}}),v.jsx("text",{x:337.5,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"start"},children:"NA"})]}):null]})})]})}function JH(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,showColumnLabels:o=!0,leftMargin:l=100,rightMargin:s=10,truncateBy:f=999,height:c,width:h,scaleType:d,colorDomain:m,footNote:g,colorLegendTitle:y,padding:b,backgroundColor:S=!1,topMargin:w=30,bottomMargin:C=10,tooltip:k,onSeriesMouseOver:_,suffix:D="",prefix:T="",showRowLabels:A=!0,relativeHeight:M,showValues:E,graphID:N,noDataColor:Y=Qe.gray,showColorScale:ne=!0,onSeriesMouseClick:K,graphDownload:B=!1,dataDownload:j=!1,fillContainer:$=!0,language:V="en",showNAColor:z=!0,minHeight:W=0,theme:G="light",ariaLabel:ae,resetSelectionOnDoubleClick:U=!0,detailsOnClick:H,styles:R,classNames:ee}=t,[J,Z]=I.useState(0),[re,te]=I.useState(0),[F,q]=I.useState(void 0),X=I.useRef(null),ie=I.useRef(null);I.useEffect(()=>{const de=new ResizeObserver(he=>{Z(h||he[0].target.clientWidth||620),te(c||he[0].target.clientHeight||480)});return X.current&&(te(X.current.clientHeight||480),Z(X.current.clientWidth||620),h||de.observe(X.current)),()=>de.disconnect()},[h,c]);const ce=d||(typeof m[0]=="string"?"categorical":m.length===2?"linear":"threshold");return v.jsx("div",{className:`${G||"light"} flex ${h?"grow-0":"grow"} ${$?"w-full":"w-fit"}`,dir:V==="he"||V==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${S?S===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${V||"en"}`,ee==null?void 0:ee.graphContainer),style:{...(R==null?void 0:R.graphContainer)||{},...S&&S!==!0?{backgroundColor:S}:{}},id:N,ref:ie,"aria-label":ae||`${r?`The graph shows ${r}. `:""}This is a heatmap. ${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:S?b||"1rem":b||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||B||j?v.jsx(Zt,{styles:{title:R==null?void 0:R.title,description:R==null?void 0:R.description},classNames:{title:ee==null?void 0:ee.title,description:ee==null?void 0:ee.description},graphTitle:r,graphDescription:i,width:h,graphDownload:B?ie.current:void 0,dataDownload:j?e.map(de=>de.data).filter(de=>de!==void 0).length>0?e.map(de=>de.data).filter(de=>de!==void 0):e.filter(de=>de!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[ne?ce==="categorical"?v.jsx(Cn,{width:$?void 0:h,colorLegendTitle:y,colors:n||(typeof m[0]=="string"?Qe[G].categoricalColors.colors:m.length===2?[Qe[G].sequentialColors.neutralColorsx09[0],Qe[G].sequentialColors.neutralColorsx09[8]]:Qe[G].sequentialColors[`neutralColorsx0${m.length+1}`]),colorDomain:m.map(de=>`${de}`),setSelectedColor:q,showNAColor:z}):ce==="threshold"?v.jsx(KH,{width:$?void 0:h,colorLegendTitle:y,colors:n||(typeof m[0]=="string"?Qe[G].categoricalColors.colors:m.length===2?[Qe[G].sequentialColors.neutralColorsx09[0],Qe[G].sequentialColors.neutralColorsx09[8]]:Qe[G].sequentialColors[`neutralColorsx0${m.length+1}`]),colorDomain:m,setSelectedColor:q,naColor:Y,showNAColor:z}):v.jsx(XH,{width:$?void 0:h,colorLegendTitle:y,colors:n||[Qe[G].sequentialColors.neutralColorsx09[0],Qe[G].sequentialColors.neutralColorsx09[8]],colorDomain:m}):null,v.jsx("div",{className:"flex grow flex-col justify-center w-full leading-0",ref:X,"aria-label":"Graph area",children:(h||J)&&(c||re)?v.jsx(jye,{data:e,colorDomain:m,width:h||J,colors:n||(typeof m[0]=="string"?Qe[G].categoricalColors.colors:m.length===2?[Qe[G].sequentialColors.neutralColorsx09[0],Qe[G].sequentialColors.neutralColorsx09[8]]:Qe[G].sequentialColors[`neutralColorsx0${m.length+1}`]),noDataColor:Y,scaleType:ce,height:Math.max(W,c||(M?W?(h||J)*M>W?(h||J)*M:W:(h||J)*M:re)),showColumnLabels:o,leftMargin:l,rightMargin:s,topMargin:w,bottomMargin:C,selectedColor:F,truncateBy:f,showRowLabels:A,tooltip:k,onSeriesMouseOver:_,showValues:E,suffix:D,prefix:T,onSeriesMouseClick:K,resetSelectionOnDoubleClick:U,detailsOnClick:H}):null})]})}),a||g?v.jsx(tr,{styles:{footnote:R==null?void 0:R.footnote,source:R==null?void 0:R.source},classNames:{footnote:ee==null?void 0:ee.footnote,source:ee==null?void 0:ee.source},sources:a,footNote:g,width:h}):null]})})})})}const FM=t=>t.map(n=>n||1).reduce((n,a)=>n+a,0);function ZH(t){var $;const{width:e,height:r,graphTitle:n,sources:a,graphDescription:i,footNote:o,graphID:l,data:s,columnData:f,onSeriesMouseClick:c,language:h="en",theme:d="light",ariaLabel:m,backgroundColor:g=!1,padding:y,resetSelectionOnDoubleClick:b=!0,styles:S,classNames:w}=t,[C,k]=I.useState(void 0),[_,D]=I.useState(void 0),[T,A]=I.useState("asc"),[M,E]=I.useState(void 0),[N,Y]=I.useState({}),[ne,K]=I.useState(f.filter(V=>V.filterOptions&&V.filterOptions.length>0).map(V=>({id:V.columnId,option:V.filterOptions}))),[B,j]=I.useState(s);return I.useEffect(()=>{const V=[];s.forEach(z=>{let W=!0;ne.forEach(G=>{if(typeof z[G.id]!="object"&&typeof z[G.id]!="function"&&typeof z[G.id]!="symbol")if(f[f.findIndex(ae=>ae.columnId===G.id)].separator){const ae=z[G.id].split(f[f.findIndex(U=>U.columnId===G.id)].separator);K3(ae,G.option).length===0&&(W=!1)}else G.option.indexOf(z[G.id])===-1&&(W=!1)}),W&&V.push(z)}),j(C&&s?T==="asc"?Ut(V,[C]):Ut(V,[C]).reverse():V)},[C,T,s,ne,f]),v.jsx("div",{className:`${d||"light"} flex ${e?"w-fit grow-0":"w-full grow"}`,dir:h==="he"||h==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${g?g===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${h||"en"}`,w==null?void 0:w.graphContainer),style:{...(S==null?void 0:S.graphContainer)||{},...g&&g!==!0?{backgroundColor:g}:{}},id:l,"aria-label":m||`${n?`The graph shows ${n}. `:""}This is an data table. ${i?` ${i}`:""}`,children:v.jsxs("div",{className:"flex grow",style:{padding:g?y||"1rem":y||0},children:[v.jsxs("div",{className:"flex flex-col gap-3 w-full justify-between grow",children:[n||i?v.jsx(Zt,{styles:{title:S==null?void 0:S.title,description:S==null?void 0:S.description},classNames:{title:w==null?void 0:w.title,description:w==null?void 0:w.description},graphTitle:n,graphDescription:i,width:e}):null,v.jsx("div",{className:"grow flex flex-col justify-center",children:v.jsx("div",{className:"undp-scrollbar",style:{width:e?`${e}px`:"100%",height:r?`${r}px`:"auto"},children:s?v.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse"},children:[v.jsx("thead",{className:"text-left bg-primary-gray-300 dark:bg-primary-gray-550",children:v.jsx("tr",{children:f==null?void 0:f.map((V,z)=>{var W;return v.jsx("th",{className:"text-primary-gray-700 dark:text-primary-gray-100 text-sm",style:{width:`calc(${100*(V.columnWidth||1)/FM(f.map(G=>G.columnWidth||1))}%`},children:v.jsxs("div",{className:"flex gap-2 justify-between items-center p-4",children:[v.jsx(or,{size:"sm",marginBottom:"none",className:`w-fit grow text-${V.align||"left"} font-bold`,children:V.columnTitle||V.columnId}),V.sortable?v.jsx("button",{type:"button",className:"bg-transparent cursor-pointer p-0 m-0 border-0",onClick:()=>{C===V.columnId?(T==="asc"&&A("desc"),T==="desc"&&k(void 0)):(k(V.columnId),A("asc"))},children:C===V.columnId?T==="asc"?v.jsx(H3e,{}):v.jsx(z3e,{}):v.jsx(F3e,{})}):null,V.filterOptions&&V.filterOptions.length?v.jsx("button",{type:"button",className:"bg-transparent cursor-pointer m-0 p-0 border-0",onClick:G=>{if(M===V.columnId)E(void 0);else if(G.currentTarget){E(V.columnId);const ae=G.currentTarget.getBoundingClientRect();Y({top:ae.bottom+window.scrollY,left:ae.left+window.scrollX-160<0?ae.left+window.scrollX:ae.left+window.scrollX-160,width:"10rem"})}},children:ne[ne.findIndex(G=>G.id===V.columnId)].option.length===((W=V.filterOptions)==null?void 0:W.length)?v.jsx(q3e,{}):v.jsx(W3e,{})}):null]})},z)})})}),v.jsx("tbody",{children:B==null?void 0:B.map((V,z)=>v.jsx("tr",{className:`cursor-${c?"pointer":"auto"} border-b border-b-primary-gray-400 dark:border-b-primary-gray-500 ${Sr(_,V)?"bg-primary-gray-200 dark:bg-primary-gray-600":"bg-transparent"}`,onClick:()=>{c&&(Sr(_,V)&&b?(D(void 0),c(void 0)):(D(V),c(V)))},children:f.map((W,G)=>v.jsx("td",{className:`text-primary-gray-700 dark:text-primary-gray-100 text-sm text-${W.align||"left"}`,style:{width:`calc(${100*(V.columnWidth||1)/FM(f.map(ae=>ae.columnWidth||1))}%`},children:v.jsx("div",{className:`text-primary-gray-700 dark:text-primary-gray-100 flex p-4 ${W.align==="right"?"justify-end":W.align==="center"?"justify-center":"justify-start"}`,children:typeof V[W.columnId]=="number"?v.jsx(or,{marginBottom:"none",size:"sm",className:`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${W.chip?"grow-0 rounded-sm p-2":"grow rounded-none p-0"} text-${W.align||"left"} ${W.chip?W.chipColors?"":"bg-primary-gray-300 dark:bg-primary-gray-500":"bg-transparent"}`,style:{...W.chip&&W.chipColors?{backgroundColor:W.chipColors[W.chipColors.findIndex(ae=>ae.value===V[W.columnId])].color}:{}},children:_t(V[W.columnId],W.prefix,W.suffix)}):typeof V[W.columnId]=="string"?W.separator?v.jsx("div",{className:"text-primary-gray-700 dark:text-primary-gray-100 flex flex-wrap gap-2",children:V[W.columnId].split(W.separator).map((ae,U)=>v.jsx(or,{marginBottom:"none",size:"sm",className:`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${W.chip?"grow-0 rounded-sm p-2":"grow rounded-none p-0"} text-${W.align||"left"} ${W.chip?W.chipColors?"":"bg-primary-gray-300 dark:bg-primary-gray-500":"bg-transparent"}`,style:{...W.chip&&W.chipColors?{backgroundColor:W.chipColors[W.chipColors.findIndex(H=>H.value===V[W.columnId])].color}:{}},children:`${W.prefix||""}${ae}${W.suffix||""}`},U))}):v.jsx(or,{marginBottom:"none",size:"sm",className:`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${W.chip?"grow-0 rounded-sm p-2":"grow rounded-none p-0"} text-${W.align||"left"} ${W.chip?W.chipColors?"":"bg-primary-gray-300 dark:bg-primary-gray-500":"bg-transparent"}`,style:{...W.chip&&W.chipColors?{backgroundColor:W.chipColors[W.chipColors.findIndex(ae=>ae.value===V[W.columnId])].color}:{}},children:`${W.prefix||""}${V[W.columnId]}${W.suffix||""}`}):v.jsx("div",{children:V[W.columnId]})})},G))},z))})]}):null})}),a||o?v.jsx(tr,{styles:{footnote:S==null?void 0:S.footnote,source:S==null?void 0:S.source},classNames:{footnote:w==null?void 0:w.footnote,source:w==null?void 0:w.source},sources:a,footNote:o,width:e}):null]}),M&&v.jsx("div",{style:N,className:"absolute p-3 border z-[1000] rounded-sm bg-primary-white dark:bg-primary-gray-700 border-primary-gray-300 dark:border-primary-gray-550",children:v.jsxs("div",{className:"max-w-60",children:[v.jsx(or,{size:"sm",marginBottom:"2xs",className:"font-bold",children:"Filter data by"}),v.jsx("div",{className:"flex flex-col gap-2",children:($=f[f.findIndex(V=>V.columnId===M)].filterOptions)==null?void 0:$.map((V,z)=>v.jsx("div",{children:v.jsxs("label",{className:"undp-viz-label",children:[v.jsx("input",{type:"checkbox",className:"undp-viz-checkbox",checked:ne[ne.findIndex(W=>W.id===M)].option.indexOf(V)!==-1,onChange:()=>{const W=ne.findIndex(ae=>ae.id===M),G=[...ne[W].option];if(G.indexOf(V)!==-1){G.splice(G.indexOf(V),1);const ae=[...ne];ae[W].option=G,K(ae)}else{G.push(V);const ae=[...ne];ae[W].option=G,K(ae)}}}),V]},z)},z))})]})})]})})})}function J3(t){if(t!==void 0)return Array.isArray(t)?t.map(e=>({value:e,label:e})):{value:t,label:t}}const Lye=t=>t?Object.entries(t).map(([r,n])=>Array.isArray(n)?{" ":r,value:`"${n.join("; ")}"`}:{" ":r,value:`"${n}"`}):{},zM=(t,e,r)=>e.length===0?t:t.filter(n=>e.some(a=>{var i;return(i=n[a])==null?void 0:i.toLowerCase().includes(r.toLowerCase())}));function QH(t){const{width:e,height:r,graphTitle:n,sources:a,graphDescription:i,footNote:o,graphID:l,data:s,onSeriesMouseClick:f,language:c="en",theme:h="light",ariaLabel:d,cardTemplate:m,cardBackgroundColor:g,cardFilters:y=[],cardSortingOptions:b,cardSearchColumns:S=[],cardMinWidth:w=320,backgroundColor:C=!1,padding:k,detailsOnClick:_,allowDataDownloadOnDetail:D=!1,noOfItemsInAPage:T,uiMode:A="normal",styles:M,classNames:E}=t,[N,Y]=I.useState(s),[ne,K]=I.useState(1),[B,j]=I.useState(void 0),[$,V]=I.useState(""),[z,W]=I.useState([]),[G,ae]=I.useState(b?!b.defaultValue||b.options.findIndex(R=>R.label===b.defaultValue)===-1?b.options[0]:b.options[b.options.findIndex(R=>R.label===b.defaultValue)]:void 0),U=I.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]);I.useEffect(()=>{ae(b?!b.defaultValue||b.options.findIndex(R=>R.label===b.defaultValue)===-1?b.options[0]:b.options[b.options.findIndex(R=>R.label===b.defaultValue)]:void 0)},[b]),I.useEffect(()=>{const R=y.map(ee=>({filter:ee.column,label:ee.label||`Filter by ${ee.column}`,singleSelect:!0,clearable:!0,defaultValue:J3(ee.defaultValue),availableValues:J0(s,ee.column).filter(J=>{var Z;return!((Z=ee.excludeValues)!=null&&Z.includes(`${J}`))}).map(J=>({value:J,label:J})),width:ee.width}));W(R)},[s,y]);const H=I.useCallback((R,ee)=>{W(J=>J.map(Z=>Z.filter===R?{...Z,value:ee}:Z))},[]);return I.useEffect(()=>{const R=s.filter(ee=>z.every(J=>J.value&&f1([J.value]).length>0?K3(f1([ee[J.filter]]),f1([J.value]).map(Z=>Z.value)).length>0:!0));Y(G?Ut(R,G==null?void 0:G.value,G==null?void 0:G.type):R)},[z,s,G]),I.useEffect(()=>{K(1)},[N,S,$]),v.jsx("div",{className:`${h||"light"} flex ${e?"w-fit grow-0":"w-full grow"}`,dir:c==="he"||c==="ar"?"rtl":void 0,children:v.jsxs("div",{className:Be(`${C?C===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${c||"en"}`,E==null?void 0:E.graphContainer),style:{...(M==null?void 0:M.graphContainer)||{},...C&&C!==!0?{backgroundColor:C}:{}},id:l,"aria-label":d||`${n?`The graph shows ${n}. `:""}This is an list of cards. ${i?` ${i}`:""}`,children:[v.jsx("div",{className:"flex grow",style:{padding:C?k||"1rem":k||0},children:v.jsxs("div",{className:"flex flex-col grow gap-3 w-full justify-between",children:[n||i?v.jsx(Zt,{styles:{title:M==null?void 0:M.title,description:M==null?void 0:M.description},classNames:{title:E==null?void 0:E.title,description:E==null?void 0:E.description},graphTitle:n,graphDescription:i,width:e}):null,b||z.length>0?v.jsxs("div",{className:"flex gap-4 flex-wrap items-start w-full",children:[b?v.jsxs("div",{className:"grow shrink-0 min-w-[240px]",style:{width:b.width||"calc(25% - 0.75rem)"},children:[v.jsx(or,{marginBottom:"xs",size:"sm",className:"text-primary-gray-700 dark:text-primary-gray-100",children:"Sort by"}),v.jsx(s1,{options:b.options,isRtl:c==="he"||c==="ar",isSearchable:!0,filterOption:Z1(U),onChange:R=>{ae(R||void 0)},variant:A,size:"sm",defaultValue:!b.defaultValue||b.options.findIndex(R=>R.label===b.defaultValue)===-1?b.options[0]:b.options[b.options.findIndex(R=>R.label===b.defaultValue)]})]}):null,z==null?void 0:z.map((R,ee)=>v.jsxs("div",{className:"grow shrink-0 min-w-[240px]",style:{width:R.width||"calc(25% - 0.75rem)"},children:[v.jsx(or,{marginBottom:"xs",size:"sm",className:"text-primary-gray-700 dark:text-primary-gray-100",children:R.label}),v.jsx(s1,{options:R.availableValues,isClearable:R.clearable===void 0?!0:R.clearable,isRtl:c==="he"||c==="ar",isSearchable:!0,variant:A,size:"sm",controlShouldRenderValue:!0,filterOption:Z1(U),onChange:J=>{H(R.filter,J)},defaultValue:R.defaultValue})]},ee))]}):null,S.length>0?v.jsx(cP,{placeholder:"Search...",value:$,onChange:R=>{V(R.target.value)},buttonVariant:"icon",inputVariant:A,showSearchButton:!1,inputSize:"sm"}):null,v.jsx("div",{className:"undp-scrollbar w-full my-0 mx-auto grid gap-4 undp-viz-data-cards-container",style:{width:e?`${e}px`:"100%",height:r?`${r}px`:"auto",gridTemplateColumns:`repeat(auto-fit, minmax(${w}px, 1fr))`},children:zM(N,S,$).filter((R,ee)=>T?ee<ne*T&&ee>=(ne-1)*T:!0).map((R,ee)=>v.jsx("div",{style:{...(M==null?void 0:M.dataCards)||{},...g&&{backgroundColor:g}},className:`w-full flex flex-col ${f||_?"cursor-pointer":"cursor-auto"}${g?"":"bg-primary-gray-200 dark:bg-primary-gray-600"} ${(E==null?void 0:E.dataCards)||""}`,onClick:()=>{f==null||f(R),_&&j(R)},dangerouslySetInnerHTML:{__html:Cr(m,R)}},ee))}),T?v.jsx(Hne,{total:zM(N,S,$).length,defaultPage:0,pageSize:T,onChange:K}):null,a||o?v.jsx(tr,{styles:{footnote:M==null?void 0:M.footnote,source:M==null?void 0:M.source},classNames:{footnote:E==null?void 0:E.footnote,source:E==null?void 0:E.source},sources:a,footNote:o,width:e}):null]})}),v.jsx(Tr,{open:B!==void 0,onClose:()=>{j(void 0)},children:_?v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(_,B)}}),D?v.jsx("div",{className:"flex",children:v.jsx(Vb,{csvData:Lye(B),headers:[{label:" ",key:" "},{label:"value",key:"value"}],buttonContent:v.jsxs("div",{className:"flex items-center gap-4",children:[typeof D=="string"?D:null,v.jsx(Bb,{})]})})}):null]}):null})]})})}function Nye(t){var re,te,F,q;const{data:e,width:r,height:n,colors:a,colorDomain:i,radius:o,leftMargin:l,rightMargin:s,topMargin:f,bottomMargin:c,tooltip:h,onSeriesMouseOver:d,highlightedDataPoints:m,selectedColor:g,minValue:y,maxValue:b,onSeriesMouseClick:S,showAxis:w,prefix:C,suffix:k,stripType:_,highlightColor:D,dotOpacity:T,resetSelectionOnDoubleClick:A,detailsOnClick:M,styles:E,classNames:N,valueColor:Y}=t,[ne,K]=I.useState(void 0),[B,j]=I.useState(void 0),[$,V]=I.useState(void 0),[z,W]=I.useState(void 0),G={top:f,bottom:c,left:l,right:s},ae=r-G.left-G.right,U=n-G.top-G.bottom,H=e.map((X,ie)=>({...X,id:`${ie}`})),R=Ut(H,X=>{const ie=(m||[]).indexOf(X.label);return ie===-1?1/0:ie}).reverse(),ee=Fe(b)?Math.max(...e.filter(X=>!Fe(X.position)).map(X=>X.position))<0?0:Math.max(...e.filter(X=>!Fe(X.position)).map(X=>X.position)):b,J=Fe(y)?Math.min(...e.filter(X=>!Fe(X.position)).map(X=>X.position))>=0?0:Math.min(...e.filter(X=>!Fe(X.position)).map(X=>X.position)):y,Z=br().domain([J,ee]).range([0,ae]).nice();return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${G.left},${G.top})`,children:[R.map((X,ie)=>v.jsxs("g",{className:"undp-viz-g-with-hover",transform:`translate(${Z(X.position)},${U/2})`,opacity:g?X.color&&a[i.indexOf(X.color)]===g?1:T:m.length!==0&&m.indexOf(X.label)!==-1?.85:T,onMouseEnter:ce=>{K(X),W(ce.clientY),V(ce.clientX),d&&d(X)},onClick:()=>{(S||M)&&(Sr(B,X)&&A?(j(void 0),S==null||S(void 0)):(j(X),S==null||S(X)))},onMouseMove:ce=>{K(X),W(ce.clientY),V(ce.clientX)},onMouseLeave:()=>{K(void 0),V(void 0),W(void 0),d&&d(void 0)},children:[_==="dot"?v.jsx("circle",{cy:0,cx:0,style:{fill:D&&m?m.indexOf(X.label)!==-1?D:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray},r:o}):v.jsx("rect",{y:0-o,x:-1,height:o*2,width:2,style:{fill:D&&m?m.indexOf(X.label)!==-1?D:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray}}),m.length!==0&&m.indexOf(X.label)!==-1?v.jsx("text",{x:0,y:0-o-5,style:{fill:Y||(D&&m?m.indexOf(X.label)!==-1?D:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray),textAnchor:"middle",...(E==null?void 0:E.graphObjectValues)||{}},className:Be("graph-value text-sm font-bold",N==null?void 0:N.graphObjectValues),children:_t(X.position,C,k)}):null]},ie)),w?v.jsxs(v.Fragment,{children:[v.jsx("text",{x:0,y:U/2+o,style:{textAnchor:"start",...((re=E==null?void 0:E.yAxis)==null?void 0:re.labels)||{}},className:Be("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",(te=N==null?void 0:N.yAxis)==null?void 0:te.labels),dy:"1em",children:_t(Z.invert(0),C,k)}),v.jsx("text",{x:ae,y:U/2+o,style:{textAnchor:"end",...((F=E==null?void 0:E.yAxis)==null?void 0:F.labels)||{}},className:Be("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",(q=N==null?void 0:N.yAxis)==null?void 0:q.labels),dy:"1em",children:_t(Z.invert(ae),C,k)})]}):null]})}),ne&&h&&$&&z?v.jsx(yr,{data:ne,body:h,xPos:$,yPos:z,backgroundStyle:E==null?void 0:E.tooltip,className:N==null?void 0:N.tooltip}):null,M?v.jsx(Tr,{open:B!==void 0,onClose:()=>{j(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(M,B)}})}):null]})}function Iye(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,height:o,width:l,footNote:s,colorDomain:f,colorLegendTitle:c,radius:h=5,padding:d,backgroundColor:m=!1,leftMargin:g=5,rightMargin:y=5,topMargin:b=10,bottomMargin:S=10,tooltip:w,relativeHeight:C,onSeriesMouseOver:k,showColorScale:_=!0,highlightedDataPoints:D=[],graphID:T,minValue:A,maxValue:M,onSeriesMouseClick:E,showAxis:N=!0,graphDownload:Y=!1,dataDownload:ne=!1,prefix:K="",suffix:B="",stripType:j="dot",language:$="en",highlightColor:V,dotOpacity:z=.3,showNAColor:W=!0,minHeight:G=0,theme:ae="light",ariaLabel:U,resetSelectionOnDoubleClick:H=!0,detailsOnClick:R,styles:ee,classNames:J,valueColor:Z}=t,[re,te]=I.useState(0),[F,q]=I.useState(0),[X,ie]=I.useState(void 0),ce=I.useRef(null),de=I.useRef(null);return I.useEffect(()=>{const he=new ResizeObserver(Oe=>{te(l||Oe[0].target.clientWidth||620),q(o||Oe[0].target.clientHeight||480)});return ce.current&&(q(ce.current.clientHeight||480),te(ce.current.clientWidth||620),l||he.observe(ce.current)),()=>he.disconnect()},[l,o]),v.jsx("div",{className:`${ae||"light"} flex ${l?"w-fit grow-0":"w-full grow"}`,dir:$==="he"||$==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${m?m===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${$||"en"}`,J==null?void 0:J.graphContainer),style:{...(ee==null?void 0:ee.graphContainer)||{},...m&&m!==!0?{backgroundColor:m}:{}},id:T,ref:de,"aria-label":U||`${r?`The graph shows ${r}. `:""}This is a strip chart showing distribution of data along the horizontal axis. Each dot represents an individual data point, helping to visualize the spread and clustering of values.${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:m?d||"1rem":d||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||Y||ne?v.jsx(Zt,{styles:{title:ee==null?void 0:ee.title,description:ee==null?void 0:ee.description},classNames:{title:J==null?void 0:J.title,description:J==null?void 0:J.description},graphTitle:r,graphDescription:i,width:l,graphDownload:Y?de.current:void 0,dataDownload:ne?e.map(he=>he.data).filter(he=>he!==void 0).length>0?e.map(he=>he.data).filter(he=>he!==void 0):e.filter(he=>he!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[_!==!1&&e.filter(he=>he.color).length!==0?v.jsx(Cn,{width:l,colorLegendTitle:c,colors:n||Qe[ae].categoricalColors.colors,colorDomain:f||Bt(e.filter(he=>he.color),"color").map(he=>he.color),setSelectedColor:ie,showNAColor:W??!0}):null,v.jsx("div",{className:"flex flex-col grow justify-center w-full leading-0",ref:ce,"aria-label":"Graph area",children:(l||re)&&(o||F)?v.jsx(Nye,{data:e,width:l||re,height:Math.max(G,o||(C?G?(l||re)*C>G?(l||re)*C:G:(l||re)*C:F)),colorDomain:e.filter(he=>he.color).length===0?[]:f||Bt(e.filter(he=>he.color),"color").map(he=>he.color),colors:e.filter(he=>he.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[ae].categoricalColors.colors,selectedColor:X,radius:h,leftMargin:g,rightMargin:y,topMargin:b,bottomMargin:S,tooltip:w,onSeriesMouseOver:k,highlightedDataPoints:D,minValue:A,maxValue:M,onSeriesMouseClick:E,showAxis:N,prefix:K,suffix:B,stripType:j,highlightColor:V,dotOpacity:z,resetSelectionOnDoubleClick:H,detailsOnClick:R,styles:ee,classNames:J,valueColor:Z}):null})]})}),a||s?v.jsx(tr,{styles:{footnote:ee==null?void 0:ee.footnote,source:ee==null?void 0:ee.source},classNames:{footnote:J==null?void 0:J.footnote,source:J==null?void 0:J.source},sources:a,footNote:s,width:l}):null]})})})})}function Pye(t){var re,te,F,q;const{data:e,width:r,height:n,colors:a,colorDomain:i,radius:o,leftMargin:l,rightMargin:s,topMargin:f,bottomMargin:c,tooltip:h,onSeriesMouseOver:d,highlightedDataPoints:m,selectedColor:g,minValue:y,maxValue:b,onSeriesMouseClick:S,showAxis:w,prefix:C,suffix:k,stripType:_,highlightColor:D,dotOpacity:T,resetSelectionOnDoubleClick:A,detailsOnClick:M,styles:E,classNames:N,valueColor:Y}=t,[ne,K]=I.useState(void 0),[B,j]=I.useState(void 0),[$,V]=I.useState(void 0),[z,W]=I.useState(void 0),G={top:f,bottom:c,left:l,right:s},ae=r-G.left-G.right,U=n-G.top-G.bottom,H=e.map((X,ie)=>({...X,id:`${ie}`})),R=Ut(H,X=>{const ie=(m||[]).indexOf(X.label);return ie===-1?1/0:ie}).reverse(),ee=Fe(b)?Math.max(...e.filter(X=>!Fe(X.position)).map(X=>X.position))<0?0:Math.max(...e.filter(X=>!Fe(X.position)).map(X=>X.position)):b,J=Fe(y)?Math.min(...e.filter(X=>!Fe(X.position)).map(X=>X.position))>=0?0:Math.min(...e.filter(X=>!Fe(X.position)).map(X=>X.position)):y,Z=br().domain([J,ee]).range([U,0]).nice();return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${G.left},${G.top})`,children:[R.map((X,ie)=>v.jsxs("g",{className:"undp-viz-g-with-hover",transform:`translate(${ae/2},${Z(X.position)})`,opacity:g?X.color&&a[i.indexOf(X.color)]===g?1:T:m.length!==0&&m.indexOf(X.label)!==-1?.85:T,onMouseEnter:ce=>{K(X),W(ce.clientY),V(ce.clientX),d&&d(X)},onClick:()=>{(S||M)&&(Sr(B,X)&&A?(j(void 0),S==null||S(void 0)):(j(X),S==null||S(X)))},onMouseMove:ce=>{K(X),W(ce.clientY),V(ce.clientX)},onMouseLeave:()=>{K(void 0),V(void 0),W(void 0),d&&d(void 0)},children:[_==="dot"?v.jsx("circle",{cy:0,cx:0,style:{fill:D&&m?m.indexOf(X.label)!==-1?D:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray},r:o}):v.jsx("rect",{x:0-o,y:-1,width:o*2,height:2,style:{fill:D&&m?m.indexOf(X.label)!==-1?D:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray}}),m.length!==0&&m.indexOf(X.label)!==-1?v.jsx("text",{y:0,dy:"0.33em",x:0+o+3,style:{fill:Y||(D&&m?m.indexOf(X.label)!==-1?D:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray),textAnchor:"start",...(E==null?void 0:E.graphObjectValues)||{}},className:Be("graph-value text-sm font-bold",N==null?void 0:N.graphObjectValues),children:_t(X.position,C,k)}):null]},ie)),w?v.jsxs(v.Fragment,{children:[v.jsx("text",{y:0,x:ae/2+o+5,style:{textAnchor:"start",...((re=E==null?void 0:E.yAxis)==null?void 0:re.labels)||{}},className:Be("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",(te=N==null?void 0:N.yAxis)==null?void 0:te.labels),children:_t(Z.invert(0),C,k)}),v.jsx("text",{y:U,x:ae/2+o+5,style:{textAnchor:"start",...((F=E==null?void 0:E.yAxis)==null?void 0:F.labels)||{}},className:Be("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",(q=N==null?void 0:N.yAxis)==null?void 0:q.labels),children:_t(Z.invert(U),C,k)})]}):null]})}),ne&&h&&$&&z?v.jsx(yr,{data:ne,body:h,xPos:$,yPos:z,backgroundStyle:E==null?void 0:E.tooltip,className:N==null?void 0:N.tooltip}):null,M?v.jsx(Tr,{open:B!==void 0,onClose:()=>{j(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(M,B)}})}):null]})}function Rye(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,height:o,width:l,footNote:s,colorDomain:f,colorLegendTitle:c,radius:h=5,padding:d,backgroundColor:m=!1,leftMargin:g=20,rightMargin:y=20,topMargin:b=10,bottomMargin:S=10,tooltip:w,relativeHeight:C,onSeriesMouseOver:k,showColorScale:_=!0,highlightedDataPoints:D=[],graphID:T,minValue:A,maxValue:M,onSeriesMouseClick:E,showAxis:N=!0,graphDownload:Y=!1,dataDownload:ne=!1,prefix:K="",suffix:B="",stripType:j="dot",language:$="en",highlightColor:V,dotOpacity:z=.3,showNAColor:W=!0,minHeight:G=0,theme:ae="light",ariaLabel:U,resetSelectionOnDoubleClick:H=!0,detailsOnClick:R,styles:ee,classNames:J,valueColor:Z}=t,[re,te]=I.useState(0),[F,q]=I.useState(0),[X,ie]=I.useState(void 0),ce=I.useRef(null),de=I.useRef(null);return I.useEffect(()=>{const he=new ResizeObserver(Oe=>{te(l||Oe[0].target.clientWidth||620),q(o||Oe[0].target.clientHeight||480)});return ce.current&&(q(ce.current.clientHeight||480),te(ce.current.clientWidth||620),l||he.observe(ce.current)),()=>he.disconnect()},[l,o]),v.jsx("div",{className:`${ae||"light"} flex ${l?"w-fit grow-0":"w-full grow"}`,dir:$==="he"||$==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${m?m===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${$||"en"}`,J==null?void 0:J.graphContainer),style:{...(ee==null?void 0:ee.graphContainer)||{},...m&&m!==!0?{backgroundColor:m}:{}},id:T,ref:de,"aria-label":U||`${r?`The graph shows ${r}. `:""}This is a strip chart showing distribution of data along the vertical axis. Each dot represents an individual data point, helping to visualize the spread and clustering of values.${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:m?d||"1rem":d||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||Y||ne?v.jsx(Zt,{styles:{title:ee==null?void 0:ee.title,description:ee==null?void 0:ee.description},classNames:{title:J==null?void 0:J.title,description:J==null?void 0:J.description},graphTitle:r,graphDescription:i,width:l,graphDownload:Y?de.current:void 0,dataDownload:ne?e.map(he=>he.data).filter(he=>he!==void 0).length>0?e.map(he=>he.data).filter(he=>he!==void 0):e.filter(he=>he!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[_!==!1&&e.filter(he=>he.color).length!==0?v.jsx(Cn,{width:l,colorLegendTitle:c,colors:n||Qe[ae].categoricalColors.colors,colorDomain:f||Bt(e.filter(he=>he.color),"color").map(he=>he.color),setSelectedColor:ie,showNAColor:W}):null,v.jsx("div",{className:"flex flex-col grow justify-center w-full leading-0",ref:ce,children:(l||re)&&(o||F)?v.jsx(Pye,{data:e,width:l||re,height:Math.max(G,o||(C?G?(l||re)*C>G?(l||re)*C:G:(l||re)*C:F)),colorDomain:e.filter(he=>he.color).length===0?[]:f||Bt(e.filter(he=>he.color),"color").map(he=>he.color),colors:e.filter(he=>he.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[ae].categoricalColors.colors,selectedColor:X,radius:h,leftMargin:g,rightMargin:y,topMargin:b,bottomMargin:S,tooltip:w,onSeriesMouseOver:k,highlightedDataPoints:D,minValue:A,maxValue:M,onSeriesMouseClick:E,showAxis:N,prefix:K,suffix:B,stripType:j,highlightColor:V,dotOpacity:z,resetSelectionOnDoubleClick:H,detailsOnClick:R,styles:ee,classNames:J,valueColor:Z}):null})]})}),a||s?v.jsx(tr,{styles:{footnote:ee==null?void 0:ee.footnote,source:ee==null?void 0:ee.source},classNames:{footnote:J==null?void 0:J.footnote,source:J==null?void 0:J.source},sources:a,footNote:s,width:l}):null]})})})})}function eq(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,height:o,width:l,footNote:s,colorDomain:f,colorLegendTitle:c,radius:h,padding:d,backgroundColor:m,leftMargin:g,rightMargin:y,topMargin:b,bottomMargin:S,tooltip:w,relativeHeight:C,onSeriesMouseOver:k,showColorScale:_,highlightedDataPoints:D,graphID:T,minValue:A,maxValue:M,onSeriesMouseClick:E,showAxis:N,graphDownload:Y,dataDownload:ne,prefix:K,suffix:B,stripType:j,language:$,highlightColor:V,dotOpacity:z,showNAColor:W,minHeight:G,theme:ae,ariaLabel:U,valueColor:H,resetSelectionOnDoubleClick:R,detailsOnClick:ee,orientation:J="vertical",styles:Z,classNames:re}=t;return J==="vertical"?v.jsx(Rye,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,height:o,width:l,footNote:s,colorDomain:f,colorLegendTitle:c,radius:h,padding:d,backgroundColor:m,leftMargin:g,rightMargin:y,topMargin:b,bottomMargin:S,tooltip:w,relativeHeight:C,onSeriesMouseOver:k,showColorScale:_,highlightedDataPoints:D,graphID:T,minValue:A,maxValue:M,onSeriesMouseClick:E,showAxis:N,graphDownload:Y,dataDownload:ne,prefix:K,suffix:B,stripType:j,language:$,highlightColor:V,dotOpacity:z,showNAColor:W,minHeight:G,theme:ae,ariaLabel:U,resetSelectionOnDoubleClick:R,styles:Z,valueColor:H,detailsOnClick:ee,classNames:re}):v.jsx(Iye,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,height:o,width:l,footNote:s,colorDomain:f,colorLegendTitle:c,radius:h,padding:d,backgroundColor:m,leftMargin:g,rightMargin:y,topMargin:b,bottomMargin:S,tooltip:w,relativeHeight:C,onSeriesMouseOver:k,showColorScale:_,highlightedDataPoints:D,graphID:T,minValue:A,maxValue:M,onSeriesMouseClick:E,showAxis:N,graphDownload:Y,dataDownload:ne,prefix:K,suffix:B,stripType:j,language:$,highlightColor:V,dotOpacity:z,showNAColor:W,minHeight:G,theme:ae,ariaLabel:U,resetSelectionOnDoubleClick:R,styles:Z,valueColor:H,detailsOnClick:ee,classNames:re})}function $ye(t){var Oe,Ne,Te,_e,xe,we,ge,ve,le,ue,Ce,pe,ye,be,je,$e,ut,Ie,Ze,Ke;const{data:e,width:r,height:n,barColor:a,lineColor:i,axisTitles:o,sameAxes:l,rightMargin:s,leftMargin:f,topMargin:c,bottomMargin:h,tooltip:d,showValues:m,onSeriesMouseOver:g,barPadding:y,truncateBy:b,showLabels:S,onSeriesMouseClick:w,resetSelectionOnDoubleClick:C,detailsOnClick:k,noOfTicks:_,lineSuffix:D,barSuffix:T,linePrefix:A,barPrefix:M,curveType:E,styles:N,classNames:Y}=t,ne=E==="linear"?yo:E==="step"?e2:E==="stepAfter"?r2:E==="stepBefore"?t2:Q0,[K,B]=I.useState(void 0),[j,$]=I.useState(void 0),[V,z]=I.useState(void 0),[W,G]=I.useState(void 0),ae={top:c,bottom:h,left:f+50,right:s+65},U=r-ae.left-ae.right,H=n-ae.top-ae.bottom,R=e.map((et,Pt)=>({...et,id:`${Pt}`})),ee=Un().domain(R.map(et=>`${et.id}`)).range([0,U]).paddingInner(y),J=(Oe=Br(R,et=>et.bar))!=null&&Oe.bar?((Ne=Br(R,et=>et.bar))==null?void 0:Ne.bar)>0?0:(Te=Br(R,et=>et.bar))==null?void 0:Te.bar:0,Z=(_e=Br(R,et=>et.line))!=null&&_e.line?((xe=Br(R,et=>et.line))==null?void 0:xe.line)>0?0:(we=Br(R,et=>et.line))==null?void 0:we.line:0,re=(ge=Vr(R,et=>et.bar))!=null&&ge.bar?(ve=Vr(R,et=>et.bar))==null?void 0:ve.bar:0,te=(le=Vr(R,et=>et.line))!=null&&le.line?(ue=Vr(R,et=>et.line))==null?void 0:ue.line:0,F=J<Z?J:Z,q=re>te?re:te,X=br().domain([l?F:J,l?q>0?q:0:re>0?re:0]).range([H,0]).nice(),ie=br().domain([l?F:Z,l?q>0?q:0:te>0?te:0]).range([H,0]).nice(),ce=gi().defined(et=>!Fe(et.line)).x(et=>ee(`${et.id}`)+ee.bandwidth()/2).y(et=>ie(et.line)).curve(ne),de=X.ticks(_),he=ie.ticks(_);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${ae.left},${ae.top})`,children:[v.jsxs("g",{children:[de.map((et,Pt)=>{var jt,Tt,St,tt;return v.jsxs("g",{children:[v.jsx("line",{y1:X(et),y2:X(et),x1:-15,x2:-20,style:{stroke:a,strokeWidth:1,...((jt=N==null?void 0:N.yAxis)==null?void 0:jt.gridLines)||{}},className:(Tt=Y==null?void 0:Y.yAxis)==null?void 0:Tt.gridLines}),v.jsx("text",{x:-25,y:X(et),dy:"0.33em",className:Be("text-xs",(St=Y==null?void 0:Y.yAxis)==null?void 0:St.labels),style:{textAnchor:"end",fill:a,...((tt=N==null?void 0:N.yAxis)==null?void 0:tt.labels)||{}},children:_t(et,M,T)})]},Pt)}),v.jsx(Nr,{y1:0,y2:H,x1:-15,x2:-15,classNames:{axis:(Ce=Y==null?void 0:Y.xAxis)==null?void 0:Ce.axis},styles:{axis:{stroke:a,...((pe=N==null?void 0:N.xAxis)==null?void 0:pe.axis)||{}}}}),v.jsx(nn,{x:10-ae.left,y:H/2,style:{fill:a,...((ye=N==null?void 0:N.yAxis)==null?void 0:ye.title)||{}},className:(be=Y==null?void 0:Y.yAxis)==null?void 0:be.title,text:o[0].length>100?`${o[0].substring(0,100)}...`:o[0],rotate90:!0})]}),v.jsxs("g",{children:[he.map((et,Pt)=>{var jt,Tt,St,tt;return v.jsxs("g",{children:[v.jsx("line",{y1:ie(et),y2:ie(et),x1:U+15,x2:U+20,style:{stroke:i,strokeWidth:1,...((jt=N==null?void 0:N.yAxis)==null?void 0:jt.gridLines)||{}},className:(Tt=Y==null?void 0:Y.yAxis)==null?void 0:Tt.gridLines}),v.jsx("text",{x:U+25,y:ie(et),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:i,...((St=N==null?void 0:N.yAxis)==null?void 0:St.labels)||{}},className:Be("text-xs",(tt=Y==null?void 0:Y.yAxis)==null?void 0:tt.labels),children:_t(et,A,D)})]},Pt)}),v.jsx(Nr,{y1:0,y2:H,x1:U+15,x2:U+15,classNames:{axis:(je=Y==null?void 0:Y.xAxis)==null?void 0:je.axis},styles:{axis:{stroke:i,...(($e=N==null?void 0:N.xAxis)==null?void 0:$e.axis)||{}}}}),v.jsx(nn,{x:U+ae.right-15,y:H/2,style:{fill:i,...((ut=N==null?void 0:N.yAxis)==null?void 0:ut.title)||{}},className:(Ie=Y==null?void 0:Y.yAxis)==null?void 0:Ie.title,text:o[1].length>100?`${o[1].substring(0,100)}...`:o[1],rotate90:!0})]}),v.jsx(Nr,{y1:l?X(0):H,y2:l?X(0):H,x1:-15,x2:U+15,classNames:{axis:(Ze=Y==null?void 0:Y.xAxis)==null?void 0:Ze.axis},styles:{axis:(Ke=N==null?void 0:N.xAxis)==null?void 0:Ke.axis}}),R.map((et,Pt)=>{var jt,Tt;return v.jsxs("g",{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:St=>{B(et),G(St.clientY),z(St.clientX),g&&g(et)},onClick:()=>{(w||k)&&(Sr(j,et)&&C?($(void 0),w==null||w(void 0)):($(et),w==null||w(et)))},onMouseMove:St=>{B(et),G(St.clientY),z(St.clientX)},onMouseLeave:()=>{B(void 0),z(void 0),G(void 0),g&&g(void 0)},children:[v.jsx("rect",{x:ee(`${Pt}`),y:et.bar?et.bar>0?X(et.bar):X(0):0,width:ee.bandwidth(),style:{fill:a},height:et.bar?Math.abs(X(et.bar)-X(0)):0}),m&&!Fe(et.bar)?v.jsx("text",{x:ee(`${et.id}`)+ee.bandwidth()/2,y:X(et.bar||0),style:{fill:a,textAnchor:"middle",...(N==null?void 0:N.graphObjectValues)||{}},className:Be("graph-value text-sm",Y==null?void 0:Y.graphObjectValues),dy:et.bar?et.bar>=0?"-5px":"1em":"-5px",children:_t(et.bar,M,T)}):null,S?v.jsx(f4,{value:`${et.label}`.length<b?`${et.label}`:`${`${et.label}`.substring(0,b)}...`,y:H+5,x:ee(`${et.id}`),width:ee.bandwidth(),height:ae.bottom,style:(jt=N==null?void 0:N.xAxis)==null?void 0:jt.labels,className:(Tt=Y==null?void 0:Y.xAxis)==null?void 0:Tt.labels,alignment:"top"}):null]},Pt)}),v.jsx("path",{d:ce(R),style:{stroke:i,fill:"none",strokeWidth:2}}),R.map((et,Pt)=>v.jsx("g",{children:Fe(et.line)?null:v.jsxs("g",{onMouseEnter:jt=>{B(et),G(jt.clientY),z(jt.clientX),g&&g(et)},onClick:()=>{(w||k)&&(Sr(j,et)&&C?($(void 0),w==null||w(void 0)):($(et),w==null||w(et)))},onMouseMove:jt=>{B(et),G(jt.clientY),z(jt.clientX)},onMouseLeave:()=>{B(void 0),z(void 0),G(void 0),g&&g(void 0)},children:[v.jsx("circle",{cx:ee(et.id)+ee.bandwidth()/2,cy:ie(et.line),r:U/R.length<5?0:U/R.length<20?2:4,style:{fill:i}}),m?v.jsx("text",{x:ee(`${et.id}`)+ee.bandwidth()/2,y:ie(et.line),style:{fill:i,textAnchor:"middle",...(N==null?void 0:N.graphObjectValues)||{}},className:Be("graph-value text-sm",Y==null?void 0:Y.graphObjectValues),dy:"-5px",children:_t(et.line,A,D)}):null]})},Pt))]})}),K&&d&&V&&W?v.jsx(yr,{data:K,body:d,xPos:V,yPos:W,backgroundStyle:N==null?void 0:N.tooltip,className:Y==null?void 0:Y.tooltip}):null,k?v.jsx(Tr,{open:j!==void 0,onClose:()=>{$(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(k,j)}})}):null]})}function tq(t){const{data:e,graphTitle:r,sources:n,graphDescription:a,height:i,width:o,footNote:l,padding:s,lineColor:f=Qe.light.categoricalColors.colors[1],barColor:c=Qe.light.categoricalColors.colors[0],sameAxes:h=!1,backgroundColor:d=!1,leftMargin:m=80,rightMargin:g=80,topMargin:y=20,bottomMargin:b=25,lineAxisTitle:S="Line chart",barAxisTitle:w="Bar graph",tooltip:C,relativeHeight:k,onSeriesMouseOver:_,graphID:D,graphDownload:T=!1,dataDownload:A=!1,barPadding:M=.25,truncateBy:E=999,showLabels:N=!0,onSeriesMouseClick:Y,language:ne="en",colorLegendTitle:K,minHeight:B=0,theme:j="light",ariaLabel:$,resetSelectionOnDoubleClick:V=!0,detailsOnClick:z,showValues:W=!0,noOfTicks:G=5,lineSuffix:ae="",barSuffix:U="",linePrefix:H="",barPrefix:R="",curveType:ee="curve",styles:J,classNames:Z}=t,[re,te]=I.useState(0),[F,q]=I.useState(0),X=I.useRef(null),ie=I.useRef(null);return I.useEffect(()=>{const ce=new ResizeObserver(de=>{te(o||de[0].target.clientWidth||620),q(i||de[0].target.clientHeight||480)});return X.current&&(q(X.current.clientHeight||480),te(X.current.clientWidth||620),o||ce.observe(X.current)),()=>ce.disconnect()},[o,i]),v.jsx("div",{className:`${j||"light"} flex ${o?"w-fit grow-0":"w-full grow"}`,dir:ne==="he"||ne==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${d?d===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${ne||"en"}`,Z==null?void 0:Z.graphContainer),style:{...(J==null?void 0:J.graphContainer)||{},...d&&d!==!0?{backgroundColor:d}:{}},id:D,ref:ie,"aria-label":$||`${r?`The graph shows ${r}. `:""}This is a pareto chart that shows a variable as bars and another as line chart.${a?` ${a}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:d?s||"1rem":s||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||a||T||A?v.jsx(Zt,{styles:{title:J==null?void 0:J.title,description:J==null?void 0:J.description},classNames:{title:Z==null?void 0:Z.title,description:Z==null?void 0:Z.description},graphTitle:r,graphDescription:a,width:o,graphDownload:T?ie.current:void 0,dataDownload:A?e.map(ce=>ce.data).filter(ce=>ce!==void 0).length>0?e.map(ce=>ce.data).filter(ce=>ce!==void 0):e.filter(ce=>ce!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[v.jsx(g0,{colorDomain:[w,S],colors:[c||Qe[j].categoricalColors.colors[0],f||Qe[j].categoricalColors.colors[1]],colorLegendTitle:K,showNAColor:!1}),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:X,"aria-label":"Graph area",children:(o||re)&&(i||F)?v.jsx($ye,{data:e,sameAxes:h,lineColor:f,barColor:c,width:o||re,height:Math.max(B,i||(k?B?(o||re)*k>B?(o||re)*k:B:(o||re)*k:F)),truncateBy:E,leftMargin:m,rightMargin:g,topMargin:y,bottomMargin:b,axisTitles:[w,S],tooltip:C,onSeriesMouseOver:_,barPadding:M,showLabels:N,onSeriesMouseClick:Y,resetSelectionOnDoubleClick:V,detailsOnClick:z,noOfTicks:G,lineSuffix:ae,barSuffix:U,linePrefix:H,barPrefix:R,curveType:ee,showValues:W,styles:J,classNames:Z}):null})]})}),n||l?v.jsx(tr,{styles:{footnote:J==null?void 0:J.footnote,source:J==null?void 0:J.source},classNames:{footnote:Z==null?void 0:Z.footnote,source:Z==null?void 0:Z.source},sources:n,footNote:l,width:o}):null]})})})})}function Bye(t){var ce,de,he,Oe,Ne,Te,_e,xe,we,ge,ve,le,ue,Ce,pe,ye;const{data:e,width:r,height:n,barColors:a,centerGap:i,refValues:o,maxValue:l,minValue:s,showValues:f,axisTitles:c,rightMargin:h,leftMargin:d,topMargin:m,bottomMargin:g,tooltip:y,onSeriesMouseOver:b,barPadding:S,truncateBy:w,onSeriesMouseClick:C,showTicks:k,suffix:_,prefix:D,resetSelectionOnDoubleClick:T,detailsOnClick:A,styles:M,classNames:E,noOfTicks:N}=t,[Y,ne]=I.useState(void 0),[K,B]=I.useState(void 0),[j,$]=I.useState(void 0),[V,z]=I.useState(void 0),W={top:m,bottom:g,left:d,right:h},G=r-W.left-W.right,ae=n-W.top-W.bottom,U=e.map((be,je)=>({...be,id:`${je}`})),H=Un().domain(U.map(be=>`${be.id}`)).range([ae,0]).paddingInner(S),R=Fe(l)?Math.max(...e.filter(be=>!Fe(be.leftBar)).map(be=>be.leftBar))<0?0:Math.max(...e.filter(be=>!Fe(be.leftBar)).map(be=>be.leftBar)):l,ee=Fe(s)?Math.min(...e.filter(be=>!Fe(be.leftBar)).map(be=>be.leftBar))>=0?0:Math.min(...e.filter(be=>!Fe(be.leftBar)).map(be=>be.leftBar)):s,J=Fe(l)?Math.max(...e.filter(be=>!Fe(be.rightBar)).map(be=>be.rightBar))<0?0:Math.max(...e.filter(be=>!Fe(be.rightBar)).map(be=>be.rightBar)):l,Z=Fe(s)?Math.min(...e.filter(be=>!Fe(be.rightBar)).map(be=>be.rightBar))>=0?0:Math.min(...e.filter(be=>!Fe(be.rightBar)).map(be=>be.rightBar)):s,re=ee<Z?ee:Z,te=R>J?R:J,F=br().domain([re,te]).range([0,(G-i)/2]).nice(),q=F.ticks(N),X=br().domain([re,te]).range([(G-i)/2,0]).nice(),ie=X.ticks(N);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${W.left},${W.top})`,children:[v.jsxs("g",{transform:"translate(0,0)",children:[k?v.jsx(La,{values:ie.filter(be=>be!==0),x:ie.filter(be=>be!==0).map(be=>X(be)),y1:0-m,y2:ae+W.bottom,styles:{gridLines:(ce=M==null?void 0:M.xAxis)==null?void 0:ce.gridLines,labels:(de=M==null?void 0:M.xAxis)==null?void 0:de.labels},classNames:{gridLines:(he=E==null?void 0:E.xAxis)==null?void 0:he.gridLines,labels:(Oe=E==null?void 0:E.xAxis)==null?void 0:Oe.labels},suffix:_,prefix:D,labelType:"secondary",showGridLines:!0,leftLabel:!0}):null,U.map((be,je)=>v.jsxs("g",{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:$e=>{ne(be),z($e.clientY),$($e.clientX),b&&b(be)},onClick:()=>{(C||A)&&(Sr(K,be)&&T?(B(void 0),C==null||C(void 0)):(B(be),C==null||C(be)))},onMouseMove:$e=>{ne(be),z($e.clientY),$($e.clientX)},onMouseLeave:()=>{ne(void 0),$(void 0),z(void 0),b&&b(void 0)},children:[be.leftBar?v.jsx("rect",{x:be.leftBar<0?X(0):X(be.leftBar),y:H(`${je}`),width:be.leftBar<0?X(be.leftBar)-X(0):X(0)-X(be.leftBar),style:{fill:a[0]},height:H.bandwidth()}):null,f?v.jsx("text",{x:be.leftBar?X(be.leftBar):X(ee<0?0:ee),y:H(`${je}`)+H.bandwidth()/2,style:{fill:a[0],textAnchor:be.rightBar&&be.rightBar>0?"end":"start",...(M==null?void 0:M.graphObjectValues)||{}},dx:be.rightBar&&be.rightBar>0?-5:5,dy:"0.33em",className:Be("graph-value text-sm",E==null?void 0:E.graphObjectValues),children:_t(be.rightBar,D,_)}):null]},je)),v.jsx(Nr,{y1:-2.5,y2:ae+W.bottom,x1:X(ee<0?0:ee),x2:X(ee<0?0:ee),classNames:{axis:(Ne=E==null?void 0:E.yAxis)==null?void 0:Ne.axis},styles:{axis:(Te=M==null?void 0:M.yAxis)==null?void 0:Te.axis}}),o?v.jsx(v.Fragment,{children:o.map((be,je)=>v.jsx(ti,{text:be.text,color:be.color,x:X(be.value),y1:0-W.top,y2:ae+W.bottom,textSide:"left",classNames:be.classNames,styles:be.styles},je))}):null]}),v.jsxs("g",{transform:`translate(${(G+i)/2},0)`,children:[k?v.jsx(La,{values:q.filter(be=>be!==0),x:q.filter(be=>be!==0).map(be=>F(be)),y1:0-m,y2:ae+W.bottom,styles:{gridLines:(_e=M==null?void 0:M.xAxis)==null?void 0:_e.gridLines,labels:(xe=M==null?void 0:M.xAxis)==null?void 0:xe.labels},classNames:{gridLines:(we=E==null?void 0:E.xAxis)==null?void 0:we.gridLines,labels:(ge=E==null?void 0:E.xAxis)==null?void 0:ge.labels},suffix:_,prefix:D,labelType:"secondary",showGridLines:!0}):null,U.map((be,je)=>v.jsxs("g",{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:$e=>{ne(be),z($e.clientY),$($e.clientX),b&&b(be)},onClick:()=>{(C||A)&&(Sr(K,be)&&T?(B(void 0),C==null||C(void 0)):(B(be),C==null||C(be)))},onMouseMove:$e=>{ne(be),z($e.clientY),$($e.clientX)},onMouseLeave:()=>{ne(void 0),$(void 0),z(void 0),b&&b(void 0)},children:[be.rightBar?v.jsx("rect",{x:be.rightBar>=0?F(0):F(be.rightBar),y:H(`${je}`),width:be.rightBar>=0?F(be.rightBar)-F(0):F(0)-F(be.rightBar),style:{fill:a[1]},height:H.bandwidth()}):null,f?v.jsx("text",{x:be.rightBar?F(be.rightBar):F(Z<0?0:Z),y:H(`${je}`)+H.bandwidth()/2,style:{fill:a[1],textAnchor:be.rightBar&&be.rightBar<0?"end":"start",...(M==null?void 0:M.graphObjectValues)||{}},className:Be("graph-value text-sm",E==null?void 0:E.graphObjectValues),dx:be.rightBar&&be.rightBar<0?-5:5,dy:"0.33em",children:_t(be.rightBar,D,_)}):null]},je)),v.jsx(Nr,{y1:-2.5,y2:ae+W.bottom,x1:F(Z<0?0:Z),x2:F(Z<0?0:Z),classNames:{axis:(ve=E==null?void 0:E.yAxis)==null?void 0:ve.axis},styles:{axis:(le=M==null?void 0:M.yAxis)==null?void 0:le.axis}}),o?v.jsx(v.Fragment,{children:o.map((be,je)=>v.jsx(ti,{text:be.text,color:be.color,x:F(be.value),y1:0-W.top,y2:ae+W.bottom,textSide:"right",classNames:be.classNames,styles:be.styles},je))}):null]}),v.jsx("g",{transform:`translate(${G/2},0)`,children:U.map((be,je)=>{var $e,ut;return v.jsx(Y2,{value:`${be.label}`.length<w?`${be.label}`:`${`${be.label}`.substring(0,w)}...`,y:H(`${be.id}`),x:0-i/2,width:i,height:H.bandwidth(),alignment:"center",style:($e=M==null?void 0:M.yAxis)==null?void 0:$e.labels,className:(ut=E==null?void 0:E.yAxis)==null?void 0:ut.labels},je)})}),v.jsxs("g",{transform:`translate(0,${ae})`,children:[v.jsx("text",{style:{fill:a[0],textAnchor:"end",...(ue=M==null?void 0:M.yAxis)==null?void 0:ue.title},className:Be("text-base",(Ce=E==null?void 0:E.yAxis)==null?void 0:Ce.title),x:G/2-i/2,y:0,dx:-5,dy:20,children:c[0]}),v.jsx("text",{style:{fill:a[1],textAnchor:"start",...(pe=M==null?void 0:M.yAxis)==null?void 0:pe.title},className:Be("text-base",(ye=E==null?void 0:E.yAxis)==null?void 0:ye.title),x:G/2+i/2,y:0,dx:5,dy:20,children:c[1]})]})]})}),Y&&y&&j&&V?v.jsx(yr,{data:Y,body:y,xPos:j,yPos:V,backgroundStyle:M==null?void 0:M.tooltip,className:E==null?void 0:E.tooltip}):null,A?v.jsx(Tr,{open:K!==void 0,onClose:()=>{B(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(A,K)}})}):null]})}function rq(t){const{data:e,graphTitle:r,sources:n,graphDescription:a,height:i,width:o,footNote:l,padding:s,leftBarColor:f=Qe.light.categoricalColors.colors[0],rightBarColor:c=Qe.light.categoricalColors.colors[1],backgroundColor:h=!1,leftMargin:d=20,rightMargin:m=20,topMargin:g=25,bottomMargin:y=30,rightBarTitle:b="Right bar graph",leftBarTitle:S="Left bar graph",tooltip:w,relativeHeight:C,onSeriesMouseOver:k,graphID:_,barPadding:D=.25,truncateBy:T=999,onSeriesMouseClick:A,centerGap:M=100,showValues:E=!0,maxValue:N,minValue:Y,refValues:ne=[],suffix:K="",prefix:B="",showTicks:j=!0,showColorScale:$=!1,graphDownload:V=!1,dataDownload:z=!1,language:W="en",colorLegendTitle:G,minHeight:ae=0,theme:U="light",ariaLabel:H,resetSelectionOnDoubleClick:R=!0,detailsOnClick:ee,styles:J,classNames:Z,noOfTicks:re=5}=t,[te,F]=I.useState(0),[q,X]=I.useState(0),ie=I.useRef(null),ce=I.useRef(null);return I.useEffect(()=>{const de=new ResizeObserver(he=>{F(o||he[0].target.clientWidth||620),X(i||he[0].target.clientHeight||480)});return ie.current&&(X(ie.current.clientHeight||480),F(ie.current.clientWidth||620),o||de.observe(ie.current)),()=>de.disconnect()},[o,i]),v.jsx("div",{className:`${U||"light"} flex ${o?"w-fit grow-0":"w-full grow"}`,dir:W==="he"||W==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${h?h===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${W||"en"}`,Z==null?void 0:Z.graphContainer),style:{...(J==null?void 0:J.graphContainer)||{},...h&&h!==!0?{backgroundColor:h}:{}},id:_,ref:ce,"aria-label":H||`${r?`The graph shows ${r}. `:""}This is a diverging bar chart. ${a?` ${a}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:h?s||"1rem":s||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||a||V||z?v.jsx(Zt,{styles:{title:J==null?void 0:J.title,description:J==null?void 0:J.description},classNames:{title:Z==null?void 0:Z.title,description:Z==null?void 0:Z.description},graphTitle:r,graphDescription:a,width:o,graphDownload:V?ce.current:void 0,dataDownload:z?e.map(de=>de.data).filter(de=>de!==void 0).length>0?e.map(de=>de.data).filter(de=>de!==void 0):e.filter(de=>de!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[$?v.jsx(g0,{colorLegendTitle:G,colorDomain:[S,b],colors:[f,c],showNAColor:!1}):null,v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:ie,"aria-label":"Graph area",children:(o||te)&&(i||q)?v.jsx(Bye,{data:e,barColors:[f,c],width:o||te,centerGap:M,height:Math.max(ae,i||(C?ae?(o||te)*C>ae?(o||te)*C:ae:(o||te)*C:q)),truncateBy:T,leftMargin:d,rightMargin:m,topMargin:g,bottomMargin:y,axisTitles:[S,b],tooltip:w,onSeriesMouseOver:k,barPadding:D,refValues:ne,maxValue:N,minValue:Y,showValues:E,onSeriesMouseClick:A,showTicks:j,suffix:K,prefix:B,resetSelectionOnDoubleClick:R,detailsOnClick:ee,styles:J,classNames:Z,noOfTicks:re}):null})]})}),n||l?v.jsx(tr,{styles:{footnote:J==null?void 0:J.footnote,source:J==null?void 0:J.source},classNames:{footnote:Z==null?void 0:Z.footnote,source:Z==null?void 0:Z.source},sources:n,footNote:l,width:o}):null]})})})})}function nq(t){const{data:e,graphTitle:r,sources:n,graphDescription:a,barPadding:i,showValues:o,showTicks:l,leftMargin:s,rightMargin:f,height:c,width:h,footNote:d,colors:m,padding:g,backgroundColor:y,topMargin:b,bottomMargin:S,showLabels:w,relativeHeight:C,tooltip:k,onSeriesMouseOver:_,refValues:D,graphID:T,maxValue:A,onSeriesMouseClick:M,graphDownload:E,dataDownload:N,numberOfBins:Y,truncateBy:ne,graphType:K,barGraphLayout:B,donutStrokeWidth:j,sortData:$,language:V,minHeight:z,theme:W="light",maxBarThickness:G,ariaLabel:ae,detailsOnClick:U,styles:H,classNames:R}=t,[ee,J]=I.useState([]);return I.useEffect(()=>{const re=Lie().thresholds(Y||10).value(te=>te.value)(e).map(te=>({label:`${te.x0}-${te.x1}`,size:te.length,data:{options:`${te.x0}-${te.x1}`,frequency:te.length}}));J(re)},[e,Y]),ee.length===0?v.jsx("div",{style:{width:`${h}px`,height:`${c}px`,margin:"auto"},children:v.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:v.jsx(Fo,{})})}):K==="circlePacking"?v.jsx(Qb,{colors:m||Qe.graphMainColor,graphTitle:r,graphDescription:a,footNote:d,width:h,height:c,sources:n,leftMargin:s,rightMargin:f,backgroundColor:y,padding:g,topMargin:b,bottomMargin:S,relativeHeight:C,showLabels:w,tooltip:k,onSeriesMouseOver:_,showColorScale:!1,showValues:o,graphID:T,onSeriesMouseClick:M,graphDownload:E,dataDownload:N,data:ee,language:V,minHeight:z,theme:W,ariaLabel:ae,detailsOnClick:U,styles:H,classNames:R}):K==="treeMap"?v.jsx(mw,{colors:m||Qe.graphMainColor,graphTitle:r,graphDescription:a,footNote:d,width:h,height:c,sources:n,leftMargin:s,rightMargin:f,backgroundColor:y,padding:g,topMargin:b,bottomMargin:S,relativeHeight:C,showLabels:w,tooltip:k,onSeriesMouseOver:_,showColorScale:!1,showValues:o,graphID:T,onSeriesMouseClick:M,graphDownload:E,dataDownload:N,data:ee,language:V,minHeight:z,theme:W,ariaLabel:ae,detailsOnClick:U,styles:H,classNames:R}):K==="donutChart"?v.jsx(rx,{colors:m||Qe[W].categoricalColors.colors,graphTitle:r,graphDescription:a,footNote:d,radius:h&&c?h<c?h:c:h||c||void 0,sources:n,backgroundColor:y,padding:g,tooltip:k,onSeriesMouseOver:_,graphID:T,onSeriesMouseClick:M,graphDownload:E,dataDownload:N,data:ee,strokeWidth:j,showColorScale:!0,sortData:$,language:V,theme:W,ariaLabel:ae,detailsOnClick:U,styles:H,classNames:R}):v.jsx(Hb,{colors:m||Qe.graphMainColor,graphTitle:r,graphDescription:a,footNote:d,width:h,height:c,sources:n,leftMargin:s,rightMargin:f,backgroundColor:y,padding:g,topMargin:b,bottomMargin:S,relativeHeight:C,showLabels:w,tooltip:k,onSeriesMouseOver:_,showColorScale:!1,showValues:o,graphID:T,onSeriesMouseClick:M,graphDownload:E,dataDownload:N,data:ee,barPadding:i,refValues:D,truncateBy:ne,maxValue:A,showTicks:l,sortData:$,language:V,minHeight:z,theme:W,maxBarThickness:G,ariaLabel:ae,orientation:B,detailsOnClick:U,styles:H,classNames:R})}function HM(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of t)(a=e(a,++n,t))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}function aq(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of t)(a=e(a,++n,t))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function _m(t,e){let r=0;if(e===void 0)for(let n of t)(n=+n)&&(r+=n);else{let n=-1;for(let a of t)(a=+e(a,++n,t))&&(r+=a)}return r}function Vye(t){return t.target.depth}function Fye(t,e){return t.sourceLinks.length?t.depth:e-1}function Om(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?aq(t.sourceLinks,Vye)-1:0}function x5(t){return function(){return t}}function qM(t,e){return Pc(t.source,e.source)||t.index-e.index}function WM(t,e){return Pc(t.target,e.target)||t.index-e.index}function Pc(t,e){return t.y0-e.y0}function Dm(t){return t.value}function zye(t){return t.index}function Hye(t){return t.nodes}function qye(t){return t.links}function UM(t,e){const r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function GM({nodes:t}){for(const e of t){let r=e.y0,n=r;for(const a of e.sourceLinks)a.y0=r+a.width/2,r+=a.width;for(const a of e.targetLinks)a.y1=n+a.width/2,n+=a.width}}function Am(){let t=0,e=0,r=1,n=1,a=24,i=8,o,l=zye,s=Fye,f,c,h=Hye,d=qye,m=6;function g(){const B={nodes:h.apply(null,arguments),links:d.apply(null,arguments)};return y(B),b(B),S(B),w(B),_(B),GM(B),B}g.update=function(B){return GM(B),B},g.nodeId=function(B){return arguments.length?(l=typeof B=="function"?B:x5(B),g):l},g.nodeAlign=function(B){return arguments.length?(s=typeof B=="function"?B:x5(B),g):s},g.nodeSort=function(B){return arguments.length?(f=B,g):f},g.nodeWidth=function(B){return arguments.length?(a=+B,g):a},g.nodePadding=function(B){return arguments.length?(i=o=+B,g):i},g.nodes=function(B){return arguments.length?(h=typeof B=="function"?B:x5(B),g):h},g.links=function(B){return arguments.length?(d=typeof B=="function"?B:x5(B),g):d},g.linkSort=function(B){return arguments.length?(c=B,g):c},g.size=function(B){return arguments.length?(t=e=0,r=+B[0],n=+B[1],g):[r-t,n-e]},g.extent=function(B){return arguments.length?(t=+B[0][0],r=+B[1][0],e=+B[0][1],n=+B[1][1],g):[[t,e],[r,n]]},g.iterations=function(B){return arguments.length?(m=+B,g):m};function y({nodes:B,links:j}){for(const[V,z]of B.entries())z.index=V,z.sourceLinks=[],z.targetLinks=[];const $=new Map(B.map((V,z)=>[l(V,z,B),V]));for(const[V,z]of j.entries()){z.index=V;let{source:W,target:G}=z;typeof W!="object"&&(W=z.source=UM($,W)),typeof G!="object"&&(G=z.target=UM($,G)),W.sourceLinks.push(z),G.targetLinks.push(z)}if(c!=null)for(const{sourceLinks:V,targetLinks:z}of B)V.sort(c),z.sort(c)}function b({nodes:B}){for(const j of B)j.value=j.fixedValue===void 0?Math.max(_m(j.sourceLinks,Dm),_m(j.targetLinks,Dm)):j.fixedValue}function S({nodes:B}){const j=B.length;let $=new Set(B),V=new Set,z=0;for(;$.size;){for(const W of $){W.depth=z;for(const{target:G}of W.sourceLinks)V.add(G)}if(++z>j)throw new Error("circular link");$=V,V=new Set}}function w({nodes:B}){const j=B.length;let $=new Set(B),V=new Set,z=0;for(;$.size;){for(const W of $){W.height=z;for(const{source:G}of W.targetLinks)V.add(G)}if(++z>j)throw new Error("circular link");$=V,V=new Set}}function C({nodes:B}){const j=HM(B,z=>z.depth)+1,$=(r-t-a)/(j-1),V=new Array(j);for(const z of B){const W=Math.max(0,Math.min(j-1,Math.floor(s.call(null,z,j))));z.layer=W,z.x0=t+W*$,z.x1=z.x0+a,V[W]?V[W].push(z):V[W]=[z]}if(f)for(const z of V)z.sort(f);return V}function k(B){const j=aq(B,$=>(n-e-($.length-1)*o)/_m($,Dm));for(const $ of B){let V=e;for(const z of $){z.y0=V,z.y1=V+z.value*j,V=z.y1+o;for(const W of z.sourceLinks)W.width=W.value*j}V=(n-V+o)/($.length+1);for(let z=0;z<$.length;++z){const W=$[z];W.y0+=V*(z+1),W.y1+=V*(z+1)}Y($)}}function _(B){const j=C(B);o=Math.min(i,(n-e)/(HM(j,$=>$.length)-1)),k(j);for(let $=0;$<m;++$){const V=Math.pow(.99,$),z=Math.max(1-V,($+1)/m);T(j,V,z),D(j,V,z)}}function D(B,j,$){for(let V=1,z=B.length;V<z;++V){const W=B[V];for(const G of W){let ae=0,U=0;for(const{source:R,value:ee}of G.targetLinks){let J=ee*(G.layer-R.layer);ae+=ne(R,G)*J,U+=J}if(!(U>0))continue;let H=(ae/U-G.y0)*j;G.y0+=H,G.y1+=H,N(G)}f===void 0&&W.sort(Pc),A(W,$)}}function T(B,j,$){for(let V=B.length,z=V-2;z>=0;--z){const W=B[z];for(const G of W){let ae=0,U=0;for(const{target:R,value:ee}of G.sourceLinks){let J=ee*(R.layer-G.layer);ae+=K(G,R)*J,U+=J}if(!(U>0))continue;let H=(ae/U-G.y0)*j;G.y0+=H,G.y1+=H,N(G)}f===void 0&&W.sort(Pc),A(W,$)}}function A(B,j){const $=B.length>>1,V=B[$];E(B,V.y0-o,$-1,j),M(B,V.y1+o,$+1,j),E(B,n,B.length-1,j),M(B,e,0,j)}function M(B,j,$,V){for(;$<B.length;++$){const z=B[$],W=(j-z.y0)*V;W>1e-6&&(z.y0+=W,z.y1+=W),j=z.y1+o}}function E(B,j,$,V){for(;$>=0;--$){const z=B[$],W=(z.y1-j)*V;W>1e-6&&(z.y0-=W,z.y1-=W),j=z.y0-o}}function N({sourceLinks:B,targetLinks:j}){if(c===void 0){for(const{source:{sourceLinks:$}}of j)$.sort(WM);for(const{target:{targetLinks:$}}of B)$.sort(qM)}}function Y(B){if(c===void 0)for(const{sourceLinks:j,targetLinks:$}of B)j.sort(WM),$.sort(qM)}function ne(B,j){let $=B.y0-(B.sourceLinks.length-1)*o/2;for(const{target:V,width:z}of B.sourceLinks){if(V===j)break;$+=z+o}for(const{source:V,width:z}of j.targetLinks){if(V===B)break;$-=z}return $}function K(B,j){let $=j.y0-(j.targetLinks.length-1)*o/2;for(const{source:V,width:z}of j.targetLinks){if(V===B)break;$+=z+o}for(const{target:V,width:z}of B.sourceLinks){if(V===j)break;$-=z}return $}return g}var rv=Math.PI,nv=2*rv,T3=1e-6,Wye=nv-T3;function av(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function iq(){return new av}av.prototype=iq.prototype={constructor:av,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(t,e,r,n,a,i){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+a)+","+(this._y1=+i)},arcTo:function(t,e,r,n,a){t=+t,e=+e,r=+r,n=+n,a=+a;var i=this._x1,o=this._y1,l=r-t,s=n-e,f=i-t,c=o-e,h=f*f+c*c;if(a<0)throw new Error("negative radius: "+a);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>T3)if(!(Math.abs(c*l-s*f)>T3)||!a)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var d=r-i,m=n-o,g=l*l+s*s,y=d*d+m*m,b=Math.sqrt(g),S=Math.sqrt(h),w=a*Math.tan((rv-Math.acos((g+h-y)/(2*b*S)))/2),C=w/S,k=w/b;Math.abs(C-1)>T3&&(this._+="L"+(t+C*f)+","+(e+C*c)),this._+="A"+a+","+a+",0,0,"+ +(c*d>f*m)+","+(this._x1=t+k*l)+","+(this._y1=e+k*s)}},arc:function(t,e,r,n,a,i){t=+t,e=+e,r=+r,i=!!i;var o=r*Math.cos(n),l=r*Math.sin(n),s=t+o,f=e+l,c=1^i,h=i?n-a:a-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+s+","+f:(Math.abs(this._x1-s)>T3||Math.abs(this._y1-f)>T3)&&(this._+="L"+s+","+f),r&&(h<0&&(h=h%nv+nv),h>Wye?this._+="A"+r+","+r+",0,1,"+c+","+(t-o)+","+(e-l)+"A"+r+","+r+",0,1,"+c+","+(this._x1=s)+","+(this._y1=f):h>T3&&(this._+="A"+r+","+r+",0,"+ +(h>=rv)+","+c+","+(this._x1=t+r*Math.cos(a))+","+(this._y1=e+r*Math.sin(a))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};function YM(t){return function(){return t}}function Uye(t){return t[0]}function Gye(t){return t[1]}var Yye=Array.prototype.slice;function Xye(t){return t.source}function Kye(t){return t.target}function Jye(t){var e=Xye,r=Kye,n=Uye,a=Gye,i=null;function o(){var l,s=Yye.call(arguments),f=e.apply(this,s),c=r.apply(this,s);if(i||(i=l=iq()),t(i,+n.apply(this,(s[0]=f,s)),+a.apply(this,s),+n.apply(this,(s[0]=c,s)),+a.apply(this,s)),l)return i=null,l+""||null}return o.source=function(l){return arguments.length?(e=l,o):e},o.target=function(l){return arguments.length?(r=l,o):r},o.x=function(l){return arguments.length?(n=typeof l=="function"?l:YM(+l),o):n},o.y=function(l){return arguments.length?(a=typeof l=="function"?l:YM(+l),o):a},o.context=function(l){return arguments.length?(i=l??null,o):i},o}function Zye(t,e,r,n,a){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,a,n,a)}function Qye(){return Jye(Zye)}function eve(t){return[t.source.x1,t.y0]}function tve(t){return[t.target.x0,t.y1]}function rve(){return Qye().source(eve).target(tve)}function nve(t){const{data:e,showLabels:r,leftMargin:n,rightMargin:a,truncateBy:i,width:o,height:l,topMargin:s,bottomMargin:f,tooltip:c,onSeriesMouseOver:h,suffix:d,prefix:m,showValues:g,onSeriesMouseClick:y,nodePadding:b,nodeWidth:S,id:w,highlightedSourceDataPoints:C,highlightedTargetDataPoints:k,defaultLinkOpacity:_,sourceTitle:D,targetTitle:T,animateLinks:A,sortNodes:M,resetSelectionOnDoubleClick:E,detailsOnClick:N,styles:Y,classNames:ne}=t,[K,B]=Xa(),j=d4(K);I.useEffect(()=>{j&&e&&B("path",{pathLength:[0,1]},{duration:A===!0?5:A||0})},[j,e,B,A]);const[$,V]=I.useState(void 0),[z,W]=I.useState(void 0),[G,ae]=I.useState(void 0),[U,H]=I.useState(void 0),[R,ee]=I.useState(void 0),J={top:s,bottom:f,left:n,right:a},Z=o-J.left-J.right,re=l-J.top-J.bottom,te=M==="mostReadable"?Am().nodeWidth(S).nodePadding(b).size([Z,re]).nodeAlign(Om):M==="none"?Am().nodeWidth(S).nodePadding(b).size([Z,re]).nodeAlign(Om).nodeSort(()=>null).linkSort(()=>null):Am().nodeWidth(S).nodePadding(b).size([Z,re]).nodeAlign(Om).nodeSort(M==="desc"?(ie,ce)=>(ce.value||0)-(ie.value||0):(ie,ce)=>(ie.value||0)-(ce.value||0)),{nodes:F,links:q}=te(e),X=rve();return v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${o}px`,height:`${l}px`,viewBox:`0 0 ${o} ${l}`,style:{marginLeft:"auto",marginRight:"auto"},direction:"ltr",children:[D?v.jsx("text",{x:J.left,y:J.top-10,className:"text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100",style:{textAnchor:"start"},children:D}):null,T?v.jsx("text",{x:o-J.right,y:J.top-10,className:"text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100",style:{textAnchor:"end"},children:T}):null,v.jsxs("g",{transform:`translate(${J.left},${J.top})`,children:[F.filter(ie=>ie.type==="source").map((ie,ce)=>v.jsx("g",{onMouseEnter:()=>{ae(ie)},onMouseLeave:()=>{ae(void 0)},children:v.jsxs("g",{transform:`translate(${ie.x0},${ie.y0})`,children:[v.jsx("rect",{x:0,y:0,width:(ie.x1||0)-(ie.x0||0),height:(ie.y1||0)-(ie.y0||0),style:{fill:ie.color}}),r||g?v.jsx("foreignObject",{y:0-b/2,x:0-n,width:n,height:(ie.y1||0)-(ie.y0||0)+b,children:v.jsxs("div",{className:"flex flex-col gap-0.5 justify-center py-0 px-1.5",style:{height:`${(ie.y1||0)-(ie.y0||0)+b}px`,overflow:"visible"},children:[r?v.jsx(or,{marginBottom:g?"3xs":"none",size:"sm",leading:"none",className:Be("sankey-right-label text-right",ne==null?void 0:ne.graphObjectValues),style:{hyphens:"auto",color:ie.color,...Y==null?void 0:Y.graphObjectValues},children:`${ie.label}`.length<i?`${ie.label}`:`${`${ie.label}`.substring(0,i)}...`}):null,g?v.jsx(or,{marginBottom:"none",size:"sm",leading:"none",className:Be("sankey-right-value text-right font-bold",ne==null?void 0:ne.graphObjectValues),style:{hyphens:"auto",color:ie.color,...Y==null?void 0:Y.graphObjectValues},children:_t(ie.value,m,d)}):null]})}):null]})},ce)),F.filter(ie=>ie.type==="target").map((ie,ce)=>v.jsx("g",{onMouseEnter:()=>{ae(ie)},onMouseLeave:()=>{ae(void 0)},children:v.jsxs("g",{transform:`translate(${ie.x0},${ie.y0})`,children:[v.jsx("rect",{x:0,y:0,width:(ie.x1||0)-(ie.x0||0),height:(ie.y1||0)-(ie.y0||0),style:{fill:ie.color}}),r||g?v.jsx("foreignObject",{y:0-b/2,x:S,width:a-S,height:(ie.y1||0)-(ie.y0||0)+b,children:v.jsxs("div",{className:"flex flex-col gap-0.5 justify-center py-0 px-1.5",style:{height:`${(ie.y1||0)-(ie.y0||0)+b}px`},children:[r?v.jsx(or,{marginBottom:g?"3xs":"none",size:"sm",leading:"none",className:Be("sankey-left-label text-left",ne==null?void 0:ne.graphObjectValues),style:{hyphens:"auto",color:ie.color,...Y==null?void 0:Y.graphObjectValues},children:`${ie.label}`.length<i?`${ie.label}`:`${`${ie.label}`.substring(0,i)}...`}):null,g?v.jsx(or,{size:"sm",leading:"none",marginBottom:"none",className:Be("sankey-left-value text-left font-bold",ne==null?void 0:ne.graphObjectValues),style:{hyphens:"auto",color:ie.color,...Y==null?void 0:Y.graphObjectValues},children:_t(ie.value,m,d)}):null]})}):null]})},ce)),v.jsx("defs",{children:q.map((ie,ce)=>v.jsxs("linearGradient",{id:`${w}-gradient-${ce}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientUnits:"userSpaceOnUse",children:[v.jsx("stop",{offset:"0%",style:{stopColor:ie.source.color,stopOpacity:1}}),v.jsx("stop",{offset:"100%",style:{stopColor:ie.target.color,stopOpacity:1}})]},ce))}),v.jsx("g",{ref:K,children:q.map((ie,ce)=>v.jsx("g",{className:"undp-viz-g-with-hover",onMouseEnter:de=>{V(ie.data),ee(de.clientY),H(de.clientX),h==null||h(ie.data)},onMouseMove:de=>{V(ie.data),ee(de.clientY),H(de.clientX)},onClick:()=>{(y||N)&&(Sr(z,ie.data)&&E?(W(void 0),y==null||y(void 0)):(W(ie.data),y==null||y(ie.data)))},onMouseLeave:()=>{V(void 0),H(void 0),ee(void 0),h&&h(void 0)},opacity:G?ie.source.name===G.name||ie.target.name===G.name?.85:_:(C.length!==0||k.length!==0)&&(C.indexOf(ie.source.label)!==-1||k.indexOf(ie.target.label)!==-1)?.85:_,children:v.jsx("path",{d:X(ie)||"",style:{stroke:`url(#${w}-gradient-${ce})`,strokeWidth:ie.width,fill:"none"}})},ce))})]})]}),$&&c&&U&&R?v.jsx(yr,{data:$,body:c,xPos:U,yPos:R,backgroundStyle:Y==null?void 0:Y.tooltip,className:ne==null?void 0:ne.tooltip}):null,N?v.jsx(Tr,{open:z!==void 0,onClose:()=>{W(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(N,z)}})}):null]})}function oq(t){const{data:e,graphTitle:r,sources:n,graphDescription:a,showLabels:i=!0,leftMargin:o=75,rightMargin:l=75,topMargin:s=30,bottomMargin:f=10,truncateBy:c=999,height:h,width:d,footNote:m,padding:g,backgroundColor:y,tooltip:b,onSeriesMouseOver:S,suffix:w="",prefix:C="",relativeHeight:k,showValues:_=!0,graphID:D,onSeriesMouseClick:T,graphDownload:A=!1,dataDownload:M=!1,fillContainer:E=!0,language:N="en",minHeight:Y=0,theme:ne="light",ariaLabel:K,sourceColors:B,targetColors:j,sourceColorDomain:$,targetColorDomain:V,nodePadding:z=5,nodeWidth:W=5,highlightedSourceDataPoints:G=[],highlightedTargetDataPoints:ae=[],defaultLinkOpacity:U=.3,sourceTitle:H,targetTitle:R,animateLinks:ee,sortNodes:J="mostReadable",resetSelectionOnDoubleClick:Z=!0,detailsOnClick:re,styles:te,classNames:F}=t,[q,X]=I.useState(0),[ie,ce]=I.useState(0),[de,he]=I.useState(void 0),Oe=I.useRef(null),Ne=I.useRef(null);return I.useEffect(()=>{const Te=Bt(e,"source").map(ve=>({name:`source_${ve.source}`,type:"source",label:`${ve.source}`,color:typeof B=="string"||!B?B||Qe.graphMainColor:B[($||Bt(e,"source").map(le=>`${le.source}`)).findIndex(le=>`${le}`==`${ve.source}`)>B.length?B.length-1:($||Bt(e,"source").map(le=>`${le.source}`)).findIndex(le=>`${le}`==`${ve.source}`)],totalValue:fr(e.filter(le=>`${le.source}`==`${ve.source}`).map(le=>le.value))})),_e=J==="asc"?Ut(Te,ve=>ve.totalValue):J==="desc"?Ut(Te,ve=>ve.totalValue).reverse():Te,xe=Bt(e,"target").map(ve=>({name:`target_${ve.target}`,type:"target",label:`${ve.target}`,color:typeof j=="string"||!j?j||Qe.graphMainColor:j[(V||Bt(e,"target").map(le=>`${le.target}`)).findIndex(le=>`${le}`==`${ve.target}`)>j.length?j.length-1:(V||Bt(e,"target").map(le=>`${le.target}`)).findIndex(le=>`${le}`==`${ve.target}`)],totalValue:fr(e.filter(le=>`${le.target}`==`${ve.target}`).map(le=>le.value))})),we=J==="asc"?Ut(xe,ve=>ve.totalValue):J==="desc"?Ut(xe,ve=>ve.totalValue).reverse():xe,ge=[..._e,...we];he({nodes:ge,links:e.map(ve=>({source:ge.findIndex(le=>le.name===`source_${ve.source}`),target:ge.findIndex(le=>le.name===`target_${ve.target}`),value:ve.value,data:{...ve}}))})},[e,J,$,B,V,j]),I.useEffect(()=>{const Te=new ResizeObserver(_e=>{X(d||_e[0].target.clientWidth||620),ce(h||_e[0].target.clientHeight||480)});return Oe.current&&(ce(Oe.current.clientHeight||480),X(Oe.current.clientWidth||620),d||Te.observe(Oe.current)),()=>Te.disconnect()},[d,h]),v.jsx("div",{className:`${ne||"light"} flex ${d?"grow-0":"grow"} ${E?"w-full":"w-fit"} `,dir:N==="he"||N==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${y?y===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${N||"en"}`,F==null?void 0:F.graphContainer),style:{...(te==null?void 0:te.graphContainer)||{},...y&&y!==!0?{backgroundColor:y}:{}},id:D,ref:Ne,"aria-label":K||`${r?`The graph shows ${r}. `:""}This is a sankey chart showing flow. ${a?` ${a}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:y?g||"1rem":g||0},children:v.jsxs("div",{className:"flex flex-col gap-4 w-full grow justify-between",children:[r||a||A||M?v.jsx(Zt,{styles:{title:te==null?void 0:te.title,description:te==null?void 0:te.description},classNames:{title:F==null?void 0:F.title,description:F==null?void 0:F.description},graphTitle:r,graphDescription:a,width:d,graphDownload:A?Ne.current:void 0,dataDownload:M?e.map(Te=>Te.data).filter(Te=>Te!==void 0).length>0?e.map(Te=>Te.data).filter(Te=>Te!==void 0):e.filter(Te=>Te!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsx("div",{className:"flex flex-col grow justify-center gap-3 w-full leading-0",ref:Oe,"aria-label":"Graph area",children:(d||q)&&(h||ie)&&de?v.jsx(nve,{data:de,width:d||q,nodePadding:z,nodeWidth:W,height:Math.max(Y,h||(k?Y?(d||q)*k>Y?(d||q)*k:Y:(d||q)*k:ie)),showLabels:i,leftMargin:o,rightMargin:l,topMargin:s,bottomMargin:f,truncateBy:c,tooltip:b,onSeriesMouseOver:S,showValues:_,suffix:w,prefix:C,onSeriesMouseClick:T,id:Wx(8),highlightedSourceDataPoints:G.map(Te=>`${Te}`),highlightedTargetDataPoints:ae.map(Te=>`${Te}`),defaultLinkOpacity:U,sourceTitle:H,targetTitle:R,animateLinks:ee,sortNodes:J,resetSelectionOnDoubleClick:Z,styles:te,classNames:F,detailsOnClick:re}):null})}),n||m?v.jsx(tr,{styles:{footnote:te==null?void 0:te.footnote,source:te==null?void 0:te.source},classNames:{footnote:F==null?void 0:F.footnote,source:F==null?void 0:F.source},sources:n,footNote:m,width:d}):null]})})})})}function ave(t){const{data:e,radius:r,lineColors:n,tooltip:a,onSeriesMouseOver:i,onSeriesMouseClick:o,colorDomain:l,detailsOnClick:s,styles:f,classNames:c,selectedColor:h,axisLabels:d,strokeWidth:m,showValues:g,showDots:y,rightMargin:b,topMargin:S,bottomMargin:w,leftMargin:C,curveType:k,noOfTicks:_,minValue:D,maxValue:T,resetSelectionOnDoubleClick:A,fillShape:M,highlightedLines:E}=t,N=k==="linear"?u7e:s7e,Y={top:S,left:C},ne=Math.min((2*r-C-b)/2,(2*r-S-w)/2),[K,B]=I.useState(void 0),[j,$]=I.useState(void 0),[V,z]=I.useState(void 0),[W,G]=I.useState(void 0),ae=br().domain([0,e[0].values.length]).range([0,2*Math.PI]),U=Fe(T)?Math.max(...e.map(Z=>Mn(Z.values.filter(re=>!Fe(re)))||0))<0?0:Math.max(...e.map(Z=>Mn(Z.values.filter(re=>!Fe(re)))||0)):T,H=Fe(D)?Math.min(...e.map(Z=>gr(Z.values.filter(re=>!Fe(re)))||0))>=0?0:Math.min(...e.map(Z=>gr(Z.values.filter(re=>!Fe(re)))||0)):D,R=br().domain([H,U]).range([0,ne]).nice(),ee=R.ticks(_),J=l7e().radius((Z,re)=>R(Z)).angle((Z,re)=>ae(re)).curve(N);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r*2}px`,height:`${r*2}px`,viewBox:`0 0 ${r*2} ${r*2}`,direction:"ltr",children:v.jsx("g",{transform:`translate(${Y.left},${Y.top})`,children:v.jsxs("g",{transform:`translate(${ne},${ne})`,children:[d.map((Z,re)=>{var te,F,q,X;return v.jsxs("g",{children:[v.jsx("line",{x1:0,y1:0,x2:Math.cos(ae(re)-Math.PI/2)*ne,y2:Math.sin(ae(re)-Math.PI/2)*ne,className:Be("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",(te=c==null?void 0:c.xAxis)==null?void 0:te.axis),style:(F=f==null?void 0:f.xAxis)==null?void 0:F.axis},re),v.jsx("text",{x:Math.cos(ae(re)-Math.PI/2)*(ne+6),y:Math.sin(ae(re)-Math.PI/2)*(ne+6),style:{textAnchor:Math.cos(ae(re)-Math.PI/2)<0?"end":Math.cos(ae(re)-Math.PI/2)<1e-5?"middle":"start",...((q=f==null?void 0:f.xAxis)==null?void 0:q.labels)||""},dy:Math.sin(ae(re)-Math.PI/2)<0?0:Math.sin(ae(re)-Math.PI/2)<1e-5?5:10,className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(X=c==null?void 0:c.xAxis)==null?void 0:X.labels),children:Z})]},re)}),ee.map((Z,re)=>{var te,F,q,X;return v.jsxs("g",{children:[v.jsx("path",{d:J(Array(d.length).fill(Z))||"",className:Be("stroke-primary-gray-500 dark:stroke-primary-gray-550",(te=c==null?void 0:c.xAxis)==null?void 0:te.gridLines),style:{...(F=f==null?void 0:f.xAxis)==null?void 0:F.gridLines,fill:"none"}}),v.jsx("foreignObject",{x:-25,y:Math.sin(-Math.PI/2)*R(Z)>-1e-4?Math.sin(-Math.PI/2)*R(Z)-7:Math.sin(-Math.PI/2)*R(Z)-5,width:50,height:12,children:v.jsx("div",{className:"flex justify-center",children:v.jsx("p",{className:Be("fill-primary-gray-500 dark:fill-primary-gray-550 text-xs m-0 py-0 px-1.5 text-center leading-none bg-primary-white dark:bg-primary-gray-700",(q=c==null?void 0:c.xAxis)==null?void 0:q.labels),style:(X=f==null?void 0:f.xAxis)==null?void 0:X.labels,children:Z})})})]},re)}),e.map((Z,re)=>v.jsxs("g",{opacity:K?Z.label===K.label?1:.3:h?Z.color&&n[l.indexOf(Z.color)]===h?1:.3:E.length!==0?Z.label&&E.indexOf(Z.label)!==-1?1:.3:1,onMouseEnter:te=>{B(Z),G(te.clientY),z(te.clientX),i&&i(Z)},onMouseMove:te=>{B(Z),G(te.clientY),z(te.clientX)},onMouseLeave:()=>{B(void 0),z(void 0),G(void 0),i&&i(void 0)},onClick:()=>{(o||s)&&(Sr(j,Z)&&A?($(void 0),o==null||o(void 0)):($(Z),o==null||o(Z)))},children:[v.jsx("path",{d:J(Z.values)||"",style:{stroke:e.filter(te=>te.color).length===0?n[0]:Z.color?n[l.indexOf(Z.color)]:Qe.gray,fill:M?e.filter(te=>te.color).length===0?n[0]:Z.color?n[l.indexOf(Z.color)]:Qe.gray:"none",fillOpacity:.1,strokeWidth:m}}),v.jsx("g",{children:Z.values.map((te,F)=>v.jsx("g",{children:Fe(te)?null:v.jsxs(v.Fragment,{children:[y?v.jsx("circle",{cx:Math.cos(ae(F)-Math.PI/2)*R(te),cy:Math.sin(ae(F)-Math.PI/2)*R(te),r:4,style:{fill:e.filter(q=>q.color).length===0?n[0]:Z.color?n[l.indexOf(Z.color)]:Qe.gray}}):null,g?v.jsx("text",{cx:Math.cos(ae(F)-Math.PI/2)*(R(te)+6),cy:Math.sin(ae(F)-Math.PI/2)*(R(te)+6),style:{fill:n[re],textAnchor:Math.cos(ae(F)-Math.PI/2)<0?"end":Math.cos(ae(F)-Math.PI/2)<1e-5?"middle":"start",...(f==null?void 0:f.graphObjectValues)||{}},dy:Math.sin(ae(F)-Math.PI/2)<0?10:(Math.sin(ae(F)-Math.PI/2)<1e-5,0),className:Be("graph-value text-xs font-bold",c==null?void 0:c.graphObjectValues),children:_t(te)}):null]})},F))})]},re))]})})}),K&&a&&V&&W?v.jsx(yr,{data:K,body:a,xPos:V,yPos:W,backgroundStyle:f==null?void 0:f.tooltip,className:c==null?void 0:c.tooltip}):null,s?v.jsx(Tr,{open:j!==void 0,onClose:()=>{$(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(s,j)}})}):null]})}function lq(t){const{graphTitle:e,colors:r,sources:n,graphDescription:a,footNote:i,radius:o,data:l,showColorScale:s=!0,padding:f,backgroundColor:c=!1,tooltip:h,onSeriesMouseOver:d,graphID:m,onSeriesMouseClick:g,topMargin:y=75,bottomMargin:b=75,leftMargin:S=75,rightMargin:w=75,graphDownload:C=!1,dataDownload:k=!1,colorDomain:_,language:D="en",theme:T="light",highlightedLines:A=[],width:M,height:E,minHeight:N=0,strokeWidth:Y=2,relativeHeight:ne,ariaLabel:K,colorLegendTitle:B,detailsOnClick:j,styles:$,classNames:V,showNAColor:z=!0,axisLabels:W,showDots:G=!0,showValues:ae=!1,curveType:U="curve",noOfTicks:H=5,minValue:R,maxValue:ee,fillShape:J=!1,resetSelectionOnDoubleClick:Z=!0}=t,[re,te]=I.useState(0),[F,q]=I.useState(0),[X,ie]=I.useState(0),[ce,de]=I.useState(void 0),he=I.useRef(null),Oe=I.useRef(null);return I.useEffect(()=>{const Ne=new ResizeObserver(Te=>{q(M||Te[0].target.clientWidth||420),ie(E||Te[0].target.clientHeight||420),te((gr([M||Te[0].target.clientWidth||620,E||Te[0].target.clientHeight||480])||420)/2)});return he.current&&(ie(he.current.clientHeight||420),q(he.current.clientWidth||420),te((gr([he.current.clientWidth,he.current.clientHeight])||420)/2),(!M||!o)&&Ne.observe(he.current)),()=>Ne.disconnect()},[M,E,o]),v.jsx("div",{className:`${T||"light"} flex ${M?"w-fit grow-0":"w-full grow"}`,dir:D==="he"||D==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${c?c===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${D||"en"}`,V==null?void 0:V.graphContainer),style:{...($==null?void 0:$.graphContainer)||{},minHeight:"inherit",...c&&c!==!0?{backgroundColor:c}:{}},id:m,ref:Oe,"aria-label":K||`${e?`The graph shows ${e}. `:""}This is a donut or pie chart chart. ${a?` ${a}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:c?f||"1rem":f||0},children:v.jsxs("div",{className:"flex flex-col gap-2 w-full grow justify-between",children:[e||a||C||k?v.jsx(Zt,{styles:{title:$==null?void 0:$.title,description:$==null?void 0:$.description},classNames:{title:V==null?void 0:V.title,description:V==null?void 0:V.description},graphTitle:e,graphDescription:a,width:M,graphDownload:C?Oe.current:void 0,dataDownload:k?l.map(Ne=>Ne.data).filter(Ne=>Ne!==void 0).length>0?l.map(Ne=>Ne.data).filter(Ne=>Ne!==void 0):l.filter(Ne=>Ne!==void 0):null}):null,v.jsx("div",{className:"flex grow flex-col justify-center items-stretch gap-8 flex-wrap",style:{width:M?`${M}px`:"100%"},children:l.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[s&&l.filter(Ne=>Ne.color).length!==0?v.jsx(Cn,{width:M,colorLegendTitle:B,colors:r||Qe[T].categoricalColors.colors,colorDomain:_||Bt(l.filter(Ne=>Ne.color),"color").map(Ne=>Ne.color),setSelectedColor:de,showNAColor:z}):null,v.jsx("div",{className:`flex ${M?"grow-0":"grow"} items-center justify-center leading-0`,style:{width:M?`${M}px`:"100%",height:E?`${Math.max(N,E||(ne?N?(M||F)*ne>N?(M||F)*ne:N:(M||F)*ne:X))}px`:"auto"},ref:he,"aria-label":"Graph area",children:v.jsx("div",{className:"w-full flex justify-center leading-0",children:o||re?v.jsx(ave,{data:l,lineColors:l.filter(Ne=>Ne.color).length===0?r?[r]:[Qe.primaryColors["blue-600"]]:r||Qe[T].categoricalColors.colors,radius:o||re,tooltip:h,colorDomain:_||Bt(l.filter(Ne=>Ne.color),"color").map(Ne=>Ne.color),onSeriesMouseOver:d,onSeriesMouseClick:g,styles:$,detailsOnClick:j,selectedColor:ce,axisLabels:W,strokeWidth:Y,showValues:ae,showDots:G,topMargin:y,bottomMargin:b,leftMargin:S,rightMargin:w,curveType:U,noOfTicks:H,minValue:R,maxValue:ee,fillShape:J,highlightedLines:A,resetSelectionOnDoubleClick:Z}):null})})]})}),n||i?v.jsx(tr,{styles:{footnote:$==null?void 0:$.footnote,source:$==null?void 0:$.source},classNames:{footnote:V==null?void 0:V.footnote,source:V==null?void 0:V.source},sources:n,footNote:i,width:M}):v.jsx("div",{})]})})})})}function sq(t,e){const r=Array.from(new Set(t.map(l=>l.label))),n=Array.from(new Set(t.map(l=>l.date))),a=new Set(t.map(l=>`${l.label}-${l.date}`)),i=t.reduce((l,s)=>(l[s.label]||(l[s.label]=s.color),l),{}),o=[...t];return r.forEach(l=>{n.forEach(s=>{a.has(`${l}-${s}`)||o.push({label:l,color:i[l],size:void 0,date:s})})}),Ut(o,l=>bt(`${l.date}`,e||"yyyy",new Date))}function Vf(t,e){const r=Array.from(new Set(t.map(o=>o.label))),n=Array.from(new Set(t.map(o=>o.date))),a=new Set(t.map(o=>`${o.label}-${o.date}`)),i=[...t];return r.forEach(o=>{n.forEach(l=>{a.has(`${o}-${l}`)||i.push({label:o,size:t[0].size.map(s=>null),date:l})})}),Ut(i,o=>bt(`${o.date}`,e||"yyyy",new Date))}function ive(t,e){const r=Array.from(new Set(t.map(o=>o.label))),n=Array.from(new Set(t.map(o=>o.date))),a=new Set(t.map(o=>`${o.label}-${o.date}`)),i=[...t];return r.forEach(o=>{n.forEach(l=>{a.has(`${o}-${l}`)||i.push({label:o,leftBar:void 0,rightBar:void 0,date:l})})}),Ut(i,o=>bt(`${o.date}`,e,new Date))}function ove(t,e){const r=Array.from(new Set(t.map(l=>l.label))),n=Array.from(new Set(t.map(l=>l.date))),a=new Set(t.map(l=>`${l.label}-${l.date}`)),i=t.reduce((l,s)=>(l[s.label]||(l[s.label]=s.color),l),{}),o=[...t];return r.forEach(l=>{n.forEach(s=>{a.has(`${l}-${s}`)||o.push({label:l,color:i[l],x:void 0,y:void 0,radius:void 0,date:s})})}),Ut(o,l=>bt(`${l.date}`,e,new Date))}function uq(t,e){const r=Array.from(new Set(t.map(o=>o.label))),n=Array.from(new Set(t.map(o=>o.date))),a=new Set(t.map(o=>`${o.label}-${o.date}`)),i=[...t];return r.forEach(o=>{n.forEach(l=>{a.has(`${o}-${l}`)||i.push({label:o,x:t[0].x.map(s=>null),date:l})})}),Ut(i,o=>bt(`${o.date}`,e||"yyyy",new Date))}function lve(t){var Ne,Te,_e,xe,we,ge,ve,le,ue,Ce,pe,ye,be,je,$e,ut;const{data:e,width:r,height:n,barColors:a,centerGap:i,refValues:o,maxValue:l,minValue:s,showValues:f,axisTitles:c,rightMargin:h,leftMargin:d,topMargin:m,bottomMargin:g,tooltip:y,onSeriesMouseOver:b,barPadding:S,truncateBy:w,onSeriesMouseClick:C,showTicks:k,suffix:_,prefix:D,dateFormat:T,indx:A,resetSelectionOnDoubleClick:M,detailsOnClick:E,styles:N,classNames:Y,noOfTicks:ne}=t,K=Ut(e.map(Ie=>({...Ie,date:bt(`${Ie.date}`,T,new Date)})),"date"),B=Bt(K,Ie=>Ie.label).map(Ie=>Ie.label),j=Array.from(Hi(ive(e,T||"yyyy"),Ie=>Ie.date),([Ie,Ze])=>({date:Ie,values:B.map(Ke=>Ze.find(et=>et.label===Ke)).map(Ke=>({...Ke,id:Ke.label}))})),[$,V]=I.useState(void 0),[z,W]=I.useState(void 0),[G,ae]=I.useState(void 0),[U,H]=I.useState(void 0),R={top:m,bottom:g,left:d,right:h},ee=r-R.left-R.right,J=n-R.top-R.bottom,Z=Un().domain(B.map(Ie=>`${Ie}`)).range([J,0]).paddingInner(S),re=Fe(l)?Math.max(...e.filter(Ie=>!Fe(Ie.leftBar)).map(Ie=>Ie.leftBar))<0?0:Math.max(...e.filter(Ie=>!Fe(Ie.leftBar)).map(Ie=>Ie.leftBar)):l,te=Fe(s)?Math.min(...e.filter(Ie=>!Fe(Ie.leftBar)).map(Ie=>Ie.leftBar))>=0?0:Math.min(...e.filter(Ie=>!Fe(Ie.leftBar)).map(Ie=>Ie.leftBar)):s,F=Fe(l)?Math.max(...e.filter(Ie=>!Fe(Ie.rightBar)).map(Ie=>Ie.rightBar))<0?0:Math.max(...e.filter(Ie=>!Fe(Ie.rightBar)).map(Ie=>Ie.rightBar)):l,q=Fe(s)?Math.min(...e.filter(Ie=>!Fe(Ie.rightBar)).map(Ie=>Ie.rightBar))>=0?0:Math.min(...e.filter(Ie=>!Fe(Ie.rightBar)).map(Ie=>Ie.rightBar)):s,X=te<q?te:q,ie=re>F?re:F,ce=br().domain([X,ie]).range([0,(ee-i)/2]).nice(),de=ce.ticks(ne),he=br().domain([X,ie]).range([(ee-i)/2,0]).nice(),Oe=he.ticks(ne);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${R.left},${R.top})`,children:[v.jsxs("g",{transform:"translate(0,0)",children:[k?v.jsx(La,{values:Oe.filter(Ie=>Ie!==0),x:Oe.filter(Ie=>Ie!==0).map(Ie=>he(Ie)),y1:0-m,y2:J+R.bottom,styles:{gridLines:(Ne=N==null?void 0:N.xAxis)==null?void 0:Ne.gridLines,labels:(Te=N==null?void 0:N.xAxis)==null?void 0:Te.labels},classNames:{gridLines:(_e=Y==null?void 0:Y.xAxis)==null?void 0:_e.gridLines,labels:(xe=Y==null?void 0:Y.xAxis)==null?void 0:xe.labels},suffix:_,prefix:D,labelType:"secondary",showGridLines:!0,leftLabel:!0}):null,v.jsx(mo,{children:j[A].values.map((Ie,Ze)=>v.jsxs(ur.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:Ke=>{V(Ie),H(Ke.clientY),ae(Ke.clientX),b&&b(Ie)},onClick:()=>{(C||E)&&(Sr(z,Ie)&&M?(W(void 0),C==null||C(void 0)):(W(Ie),C==null||C(Ie)))},onMouseMove:Ke=>{V(Ie),H(Ke.clientY),ae(Ke.clientX)},onMouseLeave:()=>{V(void 0),ae(void 0),H(void 0),b&&b(void 0)},children:[v.jsx(ur.rect,{style:{fill:a[0]},height:Z.bandwidth(),animate:{width:Ie.leftBar?Ie.leftBar<0?he(Ie.leftBar)-he(0):he(0)-he(Ie.leftBar):0,attrY:Z(`${Ie.label}`),attrX:Ie.leftBar?Ie.leftBar<0?he(0):he(Ie.leftBar):he(0)},transition:{duration:.5}}),f?v.jsx(ur.text,{style:{fill:a[0],textAnchor:Ie.rightBar&&Ie.rightBar>0?"end":"start",...(N==null?void 0:N.graphObjectValues)||{}},dx:Ie.leftBar&&Ie.leftBar>0?-5:5,dy:"0.33em",animate:{attrX:Ie.leftBar?he(Ie.leftBar):he(te<0?0:te),attrY:Z(`${Ie.label}`)+Z.bandwidth()/2},transition:{duration:.5},className:Be("graph-value text-sm",Y==null?void 0:Y.graphObjectValues),children:_t(Ie.leftBar,D,_)}):null]},Ie.label))}),v.jsx(Nr,{y1:-2.5,y2:J+R.bottom,x1:he(te<0?0:te),x2:he(te<0?0:te),classNames:{axis:(we=Y==null?void 0:Y.yAxis)==null?void 0:we.axis},styles:{axis:(ge=N==null?void 0:N.yAxis)==null?void 0:ge.axis}}),o?v.jsx(v.Fragment,{children:o.map((Ie,Ze)=>v.jsx(ti,{text:Ie.text,color:Ie.color,x:he(Ie.value),y1:0-R.top,y2:J+R.bottom,textSide:"left",classNames:Ie.classNames,styles:Ie.styles},Ze))}):null]}),v.jsxs("g",{transform:`translate(${(ee+i)/2},0)`,children:[k?v.jsx(La,{values:de.filter(Ie=>Ie!==0),x:de.filter(Ie=>Ie!==0).map(Ie=>ce(Ie)),y1:0-m,y2:J+R.bottom,styles:{gridLines:(ve=N==null?void 0:N.xAxis)==null?void 0:ve.gridLines,labels:(le=N==null?void 0:N.xAxis)==null?void 0:le.labels},classNames:{gridLines:(ue=Y==null?void 0:Y.xAxis)==null?void 0:ue.gridLines,labels:(Ce=Y==null?void 0:Y.xAxis)==null?void 0:Ce.labels},suffix:_,prefix:D,labelType:"secondary",showGridLines:!0}):null,v.jsx(mo,{children:j[A].values.map((Ie,Ze)=>v.jsxs(ur.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:Ke=>{V(Ie),H(Ke.clientY),ae(Ke.clientX),b&&b(Ie)},onClick:()=>{(C||E)&&(Sr(z,Ie)&&M?(W(void 0),C==null||C(void 0)):(W(Ie),C==null||C(Ie)))},onMouseMove:Ke=>{V(Ie),H(Ke.clientY),ae(Ke.clientX)},onMouseLeave:()=>{V(void 0),ae(void 0),H(void 0),b&&b(void 0)},children:[v.jsx(ur.rect,{style:{fill:a[1]},height:Z.bandwidth(),animate:{width:Ie.rightBar?Ie.rightBar>=0?ce(Ie.rightBar)-ce(0):ce(0)-ce(Ie.rightBar):0,attrY:Z(`${Ie.label}`),attrX:Ie.rightBar?Ie.rightBar>=0?ce(0):ce(Ie.rightBar):ce(0)},transition:{duration:.5}}),f?v.jsx(ur.text,{style:{fill:a[1],textAnchor:Ie.rightBar&&Ie.rightBar<0?"end":"start",...(N==null?void 0:N.graphObjectValues)||{}},className:Be("graph-value text-sm",Y==null?void 0:Y.graphObjectValues),dx:Ie.rightBar&&Ie.rightBar<0?-5:5,dy:"0.33em",animate:{attrX:Ie.rightBar?ce(Ie.rightBar):ce(q<0?0:q),attrY:Z(`${Ie.label}`)+Z.bandwidth()/2},transition:{duration:.5},children:_t(Ie.rightBar,D,_)}):null]},Ze))}),v.jsx(Nr,{y1:-2.5,y2:J+R.bottom,x1:ce(q<0?0:q),x2:ce(q<0?0:q),classNames:{axis:(pe=Y==null?void 0:Y.yAxis)==null?void 0:pe.axis},styles:{axis:(ye=N==null?void 0:N.yAxis)==null?void 0:ye.axis}}),o?v.jsx(v.Fragment,{children:o.map((Ie,Ze)=>v.jsx(ti,{text:Ie.text,color:Ie.color,x:ce(Ie.value),y1:0-R.top,y2:J+R.bottom,textSide:"right",classNames:Ie.classNames,styles:Ie.styles},Ze))}):null]}),v.jsx("g",{transform:`translate(${ee/2},0)`,children:j[A].values.map((Ie,Ze)=>{var Ke,et;return v.jsx(Y2,{value:`${Ie.label}`.length<w?`${Ie.label}`:`${`${Ie.label}`.substring(0,w)}...`,y:Z(`${Ie.id}`),x:0-i/2,width:i,height:Z.bandwidth(),alignment:"center",style:(Ke=N==null?void 0:N.yAxis)==null?void 0:Ke.labels,className:(et=Y==null?void 0:Y.yAxis)==null?void 0:et.labels},Ze)})}),v.jsxs("g",{transform:`translate(0,${J})`,children:[v.jsx("text",{style:{fill:a[0],textAnchor:"end",...(be=N==null?void 0:N.yAxis)==null?void 0:be.title},className:Be("text-base",(je=Y==null?void 0:Y.yAxis)==null?void 0:je.title),x:ee/2-i/2,y:0,dx:-5,dy:20,children:c[0]}),v.jsx("text",{style:{fill:a[1],textAnchor:"start",...($e=N==null?void 0:N.yAxis)==null?void 0:$e.title},className:Be("text-base",(ut=Y==null?void 0:Y.yAxis)==null?void 0:ut.title),x:ee/2+i/2,y:0,dx:5,dy:20,children:c[1]})]})]})}),$&&y&&G&&U?v.jsx(yr,{data:$,body:y,xPos:G,yPos:U,backgroundStyle:N==null?void 0:N.tooltip,className:Y==null?void 0:Y.tooltip}):null,E?v.jsx(Tr,{open:z!==void 0,onClose:()=>{W(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(E,z)}})}):null]})}function cq(t){const{data:e,graphTitle:r,sources:n,graphDescription:a,height:i,width:o,footNote:l,padding:s,leftBarColor:f=Qe.light.categoricalColors.colors[0],rightBarColor:c=Qe.light.categoricalColors.colors[1],backgroundColor:h=!1,leftMargin:d=20,rightMargin:m=20,topMargin:g=25,bottomMargin:y=30,rightBarTitle:b="Right bar graph",leftBarTitle:S="Left bar graph",barPadding:w=.25,truncateBy:C=999,onSeriesMouseClick:k,centerGap:_=100,showValues:D=!0,tooltip:T,relativeHeight:A,onSeriesMouseOver:M,graphID:E,refValues:N=[],suffix:Y="",prefix:ne="",showTicks:K=!0,showColorScale:B=!1,graphDownload:j=!1,dataDownload:$=!1,language:V="en",maxValue:z,minValue:W,dateFormat:G="yyyy",showOnlyActiveDate:ae=!1,autoPlay:U=!1,colorLegendTitle:H,minHeight:R=0,theme:ee="light",ariaLabel:J,resetSelectionOnDoubleClick:Z=!0,detailsOnClick:re,styles:te,classNames:F,noOfTicks:q=5}=t,[X,ie]=I.useState(0),[ce,de]=I.useState(0),he=I.useRef(null),Oe=I.useRef(null);I.useEffect(()=>{const ve=new ResizeObserver(le=>{ie(o||le[0].target.clientWidth||620),de(i||le[0].target.clientHeight||480)});return he.current&&(de(he.current.clientHeight||480),ie(he.current.clientWidth||620),o||ve.observe(he.current)),()=>ve.disconnect()},[o,i]);const[Ne,Te]=I.useState(U),_e=qi(Bt(e,ve=>ve.date).map(ve=>bt(`${ve.date}`,G,new Date).getTime()),(ve,le)=>Ka(ve,le)),[xe,we]=I.useState(U?0:_e.length-1),ge={};return _e.forEach((ve,le)=>{ge[`${ve}`]={style:{color:le===xe?"#232E3D":"#A9B1B7",fontWeight:le===xe?"bold":"normal",display:le===xe||!ae?"inline":"none"},label:Sa(new Date(ve),G)}}),I.useEffect(()=>{const ve=setInterval(()=>{we(le=>le<_e.length-1?le+1:0)},2e3);return Ne||clearInterval(ve),()=>clearInterval(ve)},[_e,Ne]),v.jsx("div",{className:`${ee||"light"} flex ${o?"w-fit grow-0":"w-full grow"}`,dir:V==="he"||V==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${h?h===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${V||"en"}`,F==null?void 0:F.graphContainer),style:{...(te==null?void 0:te.graphContainer)||{},...h&&h!==!0?{backgroundColor:h}:{}},id:E,ref:Oe,"aria-label":J||`${r?`The graph shows ${r}. `:""}This is an animated diverging bar chart showing data changes over time. ${a?` ${a}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:h?s||"1rem":s||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||a||j||$?v.jsx(Zt,{styles:{title:te==null?void 0:te.title,description:te==null?void 0:te.description},classNames:{title:F==null?void 0:F.title,description:F==null?void 0:F.description},graphTitle:r,graphDescription:a,width:o,graphDownload:j?Oe.current:void 0,dataDownload:$?e.map(ve=>ve.data).filter(ve=>ve!==void 0).length>0?e.map(ve=>ve.data).filter(ve=>ve!==void 0):e.filter(ve=>ve!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{Te(!Ne)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Ne?"Click to pause animation":"Click to play animation",children:Ne?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:_e[0],max:_e[_e.length-1],marks:ge,step:null,defaultValue:_e[_e.length-1],value:_e[xe],onChangeComplete:ve=>{we(_e.indexOf(ve))},onChange:ve=>{we(_e.indexOf(ve))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[B?v.jsx(g0,{colorLegendTitle:H,colorDomain:[S,b],colors:[f,c],showNAColor:!1}):null,v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:he,"aria-label":"Graph area",children:(o||X)&&(i||ce)?v.jsx(lve,{data:e,barColors:[f,c],width:o||X,centerGap:_,height:Math.max(R,i||(A?R?(o||X)*A>R?(o||X)*A:R:(o||X)*A:ce)),truncateBy:C,leftMargin:d,rightMargin:m,topMargin:g,bottomMargin:y,axisTitles:[S,b],tooltip:T,onSeriesMouseOver:M,barPadding:w,refValues:N,maxValue:z,minValue:W,showValues:Fe(D)?!0:D,onSeriesMouseClick:k,showTicks:K,suffix:Y,prefix:ne,dateFormat:G,indx:xe,resetSelectionOnDoubleClick:Z,detailsOnClick:re,styles:te,classNames:F,noOfTicks:q}):null})]}),n||l?v.jsx(tr,{styles:{footnote:te==null?void 0:te.footnote,source:te==null?void 0:te.source},classNames:{footnote:F==null?void 0:F.footnote,source:F==null?void 0:F.source},sources:n,footNote:l,width:o}):null]})})})})}function sve(t){const{data:e,xDomain:r,mapData:n,xColorLegendTitle:a,yDomain:i,yColorLegendTitle:o,width:l,height:s,colors:f,scale:c,centerPoint:h,mapBorderWidth:d,mapNoDataColor:m,mapBorderColor:g,tooltip:y,onSeriesMouseOver:b,zoomScaleExtend:S,zoomTranslateExtend:w,highlightedIds:C,onSeriesMouseClick:k,mapProperty:_,dateFormat:D,indx:T,resetSelectionOnDoubleClick:A,detailsOnClick:M,showColorScale:E,styles:N,classNames:Y,mapProjection:ne}=t,K=Array.from(Hi(Ut(e,ge=>bt(`${ge.date}`,D||"yyyy",new Date)),ge=>ge.date),([ge,ve])=>({date:ge,values:ve})),[B,j]=I.useState(!(l<680)),$=I.useRef(null),[V,z]=I.useState(50),[W,G]=I.useState(void 0),[ae,U]=I.useState(void 0),[H,R]=I.useState(void 0),[ee,J]=I.useState(void 0),[Z,re]=I.useState(void 0),te=I.useRef(null),F=I.useRef(null),q=Array.from({length:r.length},(ge,ve)=>ve),X=Array.from({length:i.length},(ge,ve)=>ve),ie=P2().domain(r).range(q),ce=P2().domain(i).range(X);I.useEffect(()=>{const ge=Qr(F.current),ve=Qr(te.current),le=g7().scaleExtent(S).translateExtent(w||[[-20,-20],[l+20,s+20]]).on("zoom",({transform:ue})=>{ge.attr("transform",ue)});ve.call(le)},[s,l]),I.useEffect(()=>{(()=>{if($.current){const ve=$.current.getBoundingClientRect().height;z(ve+16)}})()},[]);const de=c7(n),he=Pz(n),Oe=de[2]-de[0],Ne=de[3]-de[1],Te=l*190/960*360/Oe,_e=s*190/678*180/Ne,xe=c*Math.min(Te,_e),we=ne==="mercator"?d7().rotate([0,0]).center(h||he.geometry.coordinates).translate([l/2,s/2]).scale(xe):ne==="equalEarth"?h7().rotate([0,0]).center(h||he.geometry.coordinates).translate([l/2,s/2]).scale(xe):ne==="naturalEarth"?p7().rotate([0,0]).center(h||he.geometry.coordinates).translate([l/2,s/2]).scale(xe):ne==="orthographic"?m7().rotate([0,0]).center(h||he.geometry.coordinates).translate([l/2,s/2]).scale(xe):f7().rotate([0,0]).center(h||he.geometry.coordinates).translate([l/2,s/2]).scale(xe);return v.jsxs(v.Fragment,{children:[v.jsxs("svg",{viewBox:`0 0 ${l} ${s}`,width:`${l}px`,height:`${s}px`,ref:te,direction:"ltr",children:[v.jsxs("g",{ref:F,children:[n.features.map((ge,ve)=>K[T].values.findIndex(ue=>ue.id===ge.properties[_])!==-1?null:v.jsx("g",{opacity:W?.3:C.length!==0?C.indexOf(ge.properties[_])!==-1?1:.3:1,children:ge.geometry.type==="MultiPolygon"?ge.geometry.coordinates.map((ue,Ce)=>{let pe="";return ue.forEach(ye=>{let be=" M";ye.forEach((je,$e)=>{const ut=we([je[0],je[1]]);$e!==ye.length-1?be=`${be}${ut[0]} ${ut[1]}L`:be=`${be}${ut[0]} ${ut[1]}`}),pe+=be}),v.jsx("path",{d:pe,style:{stroke:g,strokeWidth:d,fill:m}},Ce)}):ge.geometry.coordinates.map((ue,Ce)=>{let pe="M";return ue.forEach((ye,be)=>{const je=we([ye[0],ye[1]]);be!==ue.length-1?pe=`${pe}${je[0]} ${je[1]}L`:pe=`${pe}${je[0]} ${je[1]}`}),v.jsx("path",{d:pe,style:{stroke:g,strokeWidth:d,fill:m}},Ce)})},ve)),K[T].values.map((ge,ve)=>{const le=n.features.findIndex(ye=>ge.id===ye.properties[_]),ue=Fe(ge.x)?void 0:ie(ge.x),Ce=Fe(ge.y)?void 0:ce(ge.y),pe=ue!==void 0&&Ce!==void 0?f[Ce][ue]:m;return v.jsx("g",{opacity:W?W===pe?1:.3:C.length!==0?C.indexOf(ge.id)!==-1?1:.3:1,onMouseEnter:ye=>{R(ge),re(ye.clientY),J(ye.clientX),b&&b(ge)},onClick:()=>{(k||M)&&(Sr(ae,ge)&&A?(U(void 0),k==null||k(void 0)):(U(ge),k==null||k(ge)))},onMouseMove:ye=>{R(ge),re(ye.clientY),J(ye.clientX)},onMouseLeave:()=>{R(void 0),J(void 0),re(void 0),b&&b(void 0)},children:le===-1?null:n.features[le].geometry.type==="MultiPolygon"?n.features[le].geometry.coordinates.map((ye,be)=>{let je="";return ye.forEach($e=>{let ut=" M";$e.forEach((Ie,Ze)=>{const Ke=we([Ie[0],Ie[1]]);Ze!==$e.length-1?ut=`${ut}${Ke[0]} ${Ke[1]}L`:ut=`${ut}${Ke[0]} ${Ke[1]}`}),je+=ut}),v.jsx("path",{d:je,className:`${pe===m?"stroke-primary-gray-400 dark:stroke-primary-gray-500":"stroke-primary-white dark:stroke-primary-gray-650"}`,style:{strokeWidth:d,fill:pe}},be)}):n.features[le].geometry.coordinates.map((ye,be)=>{let je="M";return ye.forEach(($e,ut)=>{const Ie=we([$e[0],$e[1]]);ut!==ye.length-1?je=`${je}${Ie[0]} ${Ie[1]}L`:je=`${je}${Ie[0]} ${Ie[1]}`}),v.jsx("path",{d:je,className:`${pe===m?"stroke-primary-gray-400 dark:stroke-primary-gray-500":"stroke-primary-white dark:stroke-primary-gray-650"}`,style:{strokeWidth:d,fill:pe}},be)})},ve)}),H?n.features.filter(ge=>ge.properties[_]===H.id).map((ge,ve)=>v.jsx("g",{children:ge.geometry.type==="MultiPolygon"?ge.geometry.coordinates.map((le,ue)=>{let Ce="";return le.forEach(pe=>{let ye=" M";pe.forEach((be,je)=>{const $e=we([be[0],be[1]]);je!==pe.length-1?ye=`${ye}${$e[0]} ${$e[1]}L`:ye=`${ye}${$e[0]} ${$e[1]}`}),Ce+=ye}),v.jsx("path",{d:Ce,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},ue)}):ge.geometry.coordinates.map((le,ue)=>{let Ce="M";return le.forEach((pe,ye)=>{const be=we([pe[0],pe[1]]);ye!==le.length-1?Ce=`${Ce}${be[0]} ${be[1]}L`:Ce=`${Ce}${be[0]} ${be[1]}`}),v.jsx("path",{d:Ce,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},ue)})},ve)):null]}),v.jsx("foreignObject",{x:10,y:B?s-V-5:s-46,width:B?189:101,height:B?V:36,children:E?B?v.jsxs("div",{ref:$,children:[v.jsx("div",{style:{marginBottom:"-0.75rem",marginLeft:"164px",backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"relative"},onClick:()=>{j(!1)},children:v.jsx(n7,{})}),v.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.5",width:"175px"},children:[v.jsxs("div",{className:"flex gap-1 items-center",children:[v.jsx("svg",{width:"136px",viewBox:"0 0 136 136",className:"shrink-0",children:v.jsxs("g",{children:[f.map((ge,ve)=>v.jsx("g",{transform:`translate(0,${100-ve*25})`,children:ge.map((le,ue)=>v.jsx("rect",{y:1,x:ue*25+1,fill:le,width:23,height:23,strokeWidth:W===le?2:.25,style:{cursor:"pointer"},onMouseOver:()=>{G(le)},onMouseLeave:()=>{G(void 0)}},ue))},ve)),v.jsx("g",{transform:"translate(0,125)",children:r.map((ge,ve)=>v.jsx("text",{y:10,x:(ve+1)*25,fontSize:10,textAnchor:"middle",children:typeof ge=="string"||ge<1?ge:_t(ge,"","")},ve))}),i.map((ge,ve)=>v.jsx("g",{transform:`translate(${Math.max(Math.min(r.length+1,5),4)*25+10},${100-ve*25})`,children:v.jsx("text",{x:0,transform:"rotate(-90)",y:0,fontSize:10,textAnchor:"middle",children:typeof ge=="string"||ge<1?ge:_t(ge,"","")})},ve))]})}),v.jsx(or,{marginBottom:"none",size:"xs",className:"leading-normal text-center shrink-0",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",overflow:"hidden",writingMode:"vertical-rl",height:"8.5rem",transform:"rotate(180deg)"},children:o})]}),v.jsx(or,{marginBottom:"none",size:"xs",className:"mt-1 leading-normal text-center",style:{display:"-webkit-box",WebkitLineClamp:"1",width:"8.5rem",WebkitBoxOrient:"vertical",overflow:"hidden"},children:a})]})]}):v.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{j(!0)},children:v.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})}):null})]}),H&&y&&ee&&Z?v.jsx(yr,{data:H,body:y,xPos:ee,yPos:Z,backgroundStyle:N==null?void 0:N.tooltip,className:Y==null?void 0:Y.tooltip}):null,M?v.jsx(Tr,{open:ae!==void 0,onClose:()=>{U(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(M,ae)}})}):null]})}function fq(t){const{data:e,mapData:r,graphTitle:n,colors:a=Qe.light.bivariateColors.colors05x05,sources:i,graphDescription:o,height:l,width:s,footNote:f,xDomain:c,yDomain:h,xColorLegendTitle:d="X Color key",yColorLegendTitle:m="Y Color key",tooltip:g,scale:y=.95,centerPoint:b,padding:S,mapBorderWidth:w=.5,showColorScale:C=!0,mapNoDataColor:k=Qe.light.graphNoData,backgroundColor:_=!1,mapBorderColor:D=Qe.light.grays["gray-500"],relativeHeight:T,onSeriesMouseOver:A,isWorldMap:M=!0,zoomScaleExtend:E=[.8,6],zoomTranslateExtend:N,graphID:Y,highlightedIds:ne=[],onSeriesMouseClick:K,mapProperty:B="ISO3",graphDownload:j=!1,dataDownload:$=!1,showAntarctica:V=!1,language:z="en",minHeight:W=0,theme:G="light",dateFormat:ae="yyyy",showOnlyActiveDate:U=!1,autoPlay:H=!1,ariaLabel:R,resetSelectionOnDoubleClick:ee=!0,detailsOnClick:J,styles:Z,classNames:re,mapProjection:te}=t,[F,q]=I.useState(0),[X,ie]=I.useState(0),[ce,de]=I.useState(void 0),he=I.useRef(null),Oe=I.useRef(null);I.useEffect(()=>{const ve=new ResizeObserver(le=>{q(s||le[0].target.clientWidth||760),ie(l||le[0].target.clientHeight||480)});return he.current&&(ie(he.current.clientHeight||480),q(he.current.clientWidth||760),s||ve.observe(he.current)),()=>ve.disconnect()},[s,l]);const[Ne,Te]=I.useState(H),_e=qi(Bt(e,ve=>ve.date).map(ve=>bt(`${ve.date}`,ae,new Date).getTime()),(ve,le)=>Ka(ve,le)),[xe,we]=I.useState(H?0:_e.length-1),ge={};return _e.forEach((ve,le)=>{ge[`${ve}`]={style:{color:le===xe?"#232E3D":"#A9B1B7",fontWeight:le===xe?"bold":"normal",display:le===xe||!U?"inline":"none"},label:Sa(new Date(ve),ae)}}),I.useEffect(()=>{const ve=setInterval(()=>{we(le=>le<_e.length-1?le+1:0)},2e3);return Ne||clearInterval(ve),()=>clearInterval(ve)},[_e,Ne]),I.useEffect(()=>{typeof r=="string"?ka(r).then(le=>{de(le)}):de(r||u7)},[r]),c&&h&&(c.length!==a[0].length-1||h.length!==a.length-1)?(console.error("the xDomain and yDomain array length don't match to the color array length"),null):v.jsx("div",{className:`${G||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:z==="he"||z==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${_?_===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${z||"en"}`,re==null?void 0:re.graphContainer),style:{...(Z==null?void 0:Z.graphContainer)||{},..._&&_!==!0?{backgroundColor:_}:{}},id:Y,ref:Oe,"aria-label":R||`${n?`The graph shows ${n}. `:""}This is bi-variate choropleth map where geographic areas are colored in proportion to two variables showing data changes over time.${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:_?S||"1rem":S||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[n||o||j||$?v.jsx(Zt,{styles:{title:Z==null?void 0:Z.title,description:Z==null?void 0:Z.description},classNames:{title:re==null?void 0:re.title,description:re==null?void 0:re.description},graphTitle:n,graphDescription:o,width:s,graphDownload:j?Oe.current:void 0,dataDownload:$?e.map(ve=>ve.data).filter(ve=>ve!==void 0).length>0?e.map(ve=>ve.data).filter(ve=>ve!==void 0):e.filter(ve=>ve!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{Te(!Ne)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Ne?"Click to pause animation":"Click to play animation",children:Ne?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:_e[0],max:_e[_e.length-1],marks:ge,step:null,defaultValue:_e[_e.length-1],value:_e[xe],onChangeComplete:ve=>{we(_e.indexOf(ve))},onChange:ve=>{we(_e.indexOf(ve))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:he,"aria-label":"Map area",children:(s||F)&&(l||X)&&ce?v.jsx(sve,{data:e,mapData:V?ce:{...ce,features:ce.features.filter(ve=>ve.properties.NAME!=="Antarctica")},xDomain:c||X3(e.map(ve=>ve.x),a[0].length),yDomain:h||X3(e.map(ve=>ve.y),a.length),width:s||F,height:Math.max(W,l||(T?W?(s||F)*T>W?(s||F)*T:W:(s||F)*T:X)),scale:y,centerPoint:b,colors:a,xColorLegendTitle:d,yColorLegendTitle:m,mapBorderWidth:Fe(w)?.5:w,mapNoDataColor:k,mapBorderColor:D,tooltip:g,showColorScale:C,onSeriesMouseOver:A,isWorldMap:M,zoomScaleExtend:E,zoomTranslateExtend:N,onSeriesMouseClick:K,mapProperty:B,highlightedIds:ne,dateFormat:ae,indx:xe,resetSelectionOnDoubleClick:ee,styles:Z,classNames:re,detailsOnClick:J,mapProjection:te||(M?"naturalEarth":"mercator")}):null}),i||f?v.jsx(tr,{styles:{footnote:Z==null?void 0:Z.footnote,source:Z==null?void 0:Z.source},classNames:{footnote:re==null?void 0:re.footnote,source:re==null?void 0:re.source},sources:i,footNote:f,width:s}):null]})})})})}function uve(t){const{data:e,colorDomain:r,colors:n,mapData:a,colorLegendTitle:i,categorical:o,height:l,width:s,scale:f,centerPoint:c,tooltip:h,mapBorderWidth:d,mapBorderColor:m,mapNoDataColor:g,onSeriesMouseOver:y,showColorScale:b,zoomScaleExtend:S,zoomTranslateExtend:w,highlightedIds:C,onSeriesMouseClick:k,mapProperty:_,dateFormat:D,indx:T,resetSelectionOnDoubleClick:A,detailsOnClick:M,styles:E,classNames:N,mapProjection:Y}=t,ne=Array.from(Hi(Ut(e,Te=>bt(`${Te.date}`,D||"yyyy",new Date)),Te=>Te.date),([Te,_e])=>({date:Te,values:_e})),[K,B]=I.useState(void 0),[j,$]=I.useState(!(s<680)),V=I.useRef(null),[z,W]=I.useState(50),[G,ae]=I.useState(void 0),[U,H]=I.useState(void 0),[R,ee]=I.useState(void 0),[J,Z]=I.useState(void 0),re=I.useRef(null),te=I.useRef(null),F=o?Ys().domain(r).range(n):P2().domain(r).range(n);I.useEffect(()=>{const Te=Qr(te.current),_e=Qr(re.current),xe=g7().scaleExtent(S).translateExtent(w||[[-20,-20],[s+20,l+20]]).on("zoom",({transform:we})=>{Te.attr("transform",we)});_e.call(xe)},[l,s]),I.useEffect(()=>{(()=>{if(V.current){const _e=V.current.getBoundingClientRect().height;W(_e+16)}})()},[]);const q=c7(a),X=o9(a),ie=q[2]-q[0],ce=q[3]-q[1],de=s*190/960*360/ie,he=l*190/678*180/ce,Oe=f*Math.min(de,he),Ne=Y==="mercator"?d7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):Y==="equalEarth"?h7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):Y==="naturalEarth"?p7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):Y==="orthographic"?m7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):f7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe);return v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${s}px`,height:`${l}px`,viewBox:`0 0 ${s} ${l}`,ref:re,direction:"ltr",children:[v.jsxs("g",{ref:te,children:[a.features.map((Te,_e)=>ne[T].values.findIndex(we=>we.id===Te.properties[_])!==-1?null:v.jsx("g",{opacity:K?.3:C.length!==0?C.indexOf(Te.properties[_])!==-1?1:.3:1,children:Te.geometry.type==="MultiPolygon"?Te.geometry.coordinates.map((we,ge)=>{let ve="";return we.forEach(le=>{let ue=" M";le.forEach((Ce,pe)=>{const ye=Ne([Ce[0],Ce[1]]);pe!==le.length-1?ue=`${ue}${ye[0]} ${ye[1]}L`:ue=`${ue}${ye[0]} ${ye[1]}`}),ve+=ue}),v.jsx("path",{d:ve,style:{stroke:m,fill:g,strokeWidth:d}},ge)}):Te.geometry.coordinates.map((we,ge)=>{let ve="M";return we.forEach((le,ue)=>{const Ce=Ne([le[0],le[1]]);ue!==we.length-1?ve=`${ve}${Ce[0]} ${Ce[1]}L`:ve=`${ve}${Ce[0]} ${Ce[1]}`}),v.jsx("path",{d:ve,style:{stroke:m,strokeWidth:d,fill:g}},ge)})},_e)),ne[T].values.map((Te,_e)=>{const xe=a.features.findIndex(ge=>Te.id===ge.properties[_]),we=Fe(Te.x)?g:F(Te.x);return v.jsx("g",{opacity:K?K===we?1:.3:C.length!==0?C.indexOf(Te.id)!==-1?1:.3:1,onMouseEnter:ge=>{H(Te),Z(ge.clientY),ee(ge.clientX),y&&y(Te)},onMouseMove:ge=>{H(Te),Z(ge.clientY),ee(ge.clientX)},onMouseLeave:()=>{H(void 0),ee(void 0),Z(void 0),y&&y(void 0)},onClick:()=>{(k||M)&&(Sr(G,Te)&&A?(ae(void 0),k==null||k(void 0)):(ae(Te),k==null||k(Te)))},children:xe===-1?null:a.features[xe].geometry.type==="MultiPolygon"?a.features[xe].geometry.coordinates.map((ge,ve)=>{let le="";return ge.forEach(ue=>{let Ce=" M";ue.forEach((pe,ye)=>{const be=Ne([pe[0],pe[1]]);ye!==ue.length-1?Ce=`${Ce}${be[0]} ${be[1]}L`:Ce=`${Ce}${be[0]} ${be[1]}`}),le+=Ce}),v.jsx("path",{d:le,style:{stroke:m,strokeWidth:d,fill:we}},ve)}):a.features[xe].geometry.coordinates.map((ge,ve)=>{let le="M";return ge.forEach((ue,Ce)=>{const pe=Ne([ue[0],ue[1]]);Ce!==ge.length-1?le=`${le}${pe[0]} ${pe[1]}L`:le=`${le}${pe[0]} ${pe[1]}`}),v.jsx("path",{d:le,style:{stroke:m,strokeWidth:d,fill:we}},ve)})},_e)}),U?a.features.filter(Te=>Te.properties[_]===U.id).map((Te,_e)=>v.jsx("g",{children:Te.geometry.type==="MultiPolygon"?Te.geometry.coordinates.map((xe,we)=>{let ge="";return xe.forEach(ve=>{let le=" M";ve.forEach((ue,Ce)=>{const pe=Ne([ue[0],ue[1]]);Ce!==ve.length-1?le=`${le}${pe[0]} ${pe[1]}L`:le=`${le}${pe[0]} ${pe[1]}`}),ge+=le}),v.jsx("path",{d:ge,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},we)}):Te.geometry.coordinates.map((xe,we)=>{let ge="M";return xe.forEach((ve,le)=>{const ue=Ne([ve[0],ve[1]]);le!==xe.length-1?ge=`${ge}${ue[0]} ${ue[1]}L`:ge=`${ge}${ue[0]} ${ue[1]}`}),v.jsx("path",{d:ge,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},we)})},_e)):null]}),b===!1?null:v.jsx("foreignObject",{x:10,y:j?l-z-5:l-46,width:j?o?150:352:101,height:j?z:36,children:j?v.jsxs("div",{ref:V,children:[v.jsx("div",{style:{marginBottom:"-0.75rem",marginLeft:o?"126px":"328px",backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"relative"},onClick:()=>{$(!1)},children:v.jsx(n7,{})}),v.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.5",width:o?"138px":"340px"},children:[i&&i!==""?v.jsx(or,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:i}):null,o?v.jsx("div",{className:"flex flex-col gap-3",children:r.map((Te,_e)=>v.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{B(n[_e%n.length])},onMouseLeave:()=>{B(void 0)},children:[v.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:n[_e%n.length]}}),v.jsx(or,{size:"sm",marginBottom:"none",leading:"none",children:Te})]},_e))}):v.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:v.jsxs("g",{children:[r.map((Te,_e)=>v.jsxs("g",{onMouseOver:()=>{B(n[_e])},onMouseLeave:()=>{B(void 0)},className:"cursor-pointer",children:[v.jsx("rect",{x:_e*320/n.length+1,y:1,width:320/n.length-2,height:8,className:K===n[_e]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:n[_e],...K===n[_e]?{}:{stroke:n[_e]}}}),v.jsx("text",{x:(_e+1)*320/n.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:_t(Te,"","")})]},_e)),v.jsx("g",{children:v.jsx("rect",{onMouseOver:()=>{B(n[r.length])},onMouseLeave:()=>{B(void 0)},x:r.length*320/n.length+1,y:1,width:320/n.length-2,height:8,className:`cursor-pointer ${K===n[r.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:n[r.length],...K===n[r.length]?{}:{stroke:n[r.length]}}})})]})})]})]}):v.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{$(!0)},children:v.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})})]}),U&&h&&R&&J?v.jsx(yr,{data:U,body:h,xPos:R,yPos:J,backgroundStyle:E==null?void 0:E.tooltip,className:N==null?void 0:N.tooltip}):null,M?v.jsx(Tr,{open:G!==void 0,onClose:()=>{ae(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(M,G)}})}):null]})}function dq(t){const{data:e,mapData:r,graphTitle:n,colors:a,sources:i,graphDescription:o,height:l,width:s,footNote:f,colorDomain:c,colorLegendTitle:h,categorical:d=!1,scale:m=.95,centerPoint:g,padding:y,mapBorderWidth:b=.5,mapNoDataColor:S=Qe.light.graphNoData,backgroundColor:w=!1,mapBorderColor:C=Qe.light.grays["gray-500"],relativeHeight:k,tooltip:_,onSeriesMouseOver:D,isWorldMap:T=!0,showColorScale:A=!0,zoomScaleExtend:M=[.8,6],zoomTranslateExtend:E,graphID:N,highlightedIds:Y=[],onSeriesMouseClick:ne,mapProperty:K="ISO3",graphDownload:B=!1,dataDownload:j=!1,showAntarctica:$=!1,language:V="en",minHeight:z=0,theme:W="light",dateFormat:G="yyyy",showOnlyActiveDate:ae=!1,autoPlay:U=!1,ariaLabel:H,resetSelectionOnDoubleClick:R=!0,detailsOnClick:ee,styles:J,classNames:Z,mapProjection:re}=t,[te,F]=I.useState(0),[q,X]=I.useState(0),[ie,ce]=I.useState(void 0),de=I.useRef(null),he=I.useRef(null);I.useEffect(()=>{const ve=new ResizeObserver(le=>{F(s||le[0].target.clientWidth||760),X(l||le[0].target.clientHeight||480)});return de.current&&(X(de.current.clientHeight||480),F(de.current.clientWidth||760),s||ve.observe(de.current)),()=>ve.disconnect()},[s,l]),I.useEffect(()=>{typeof r=="string"?ka(r).then(le=>{ce(le)}):ce(r||u7)},[r]);const Oe=c||(d?J0(e,"x"):X3(e.map(ve=>ve.x),(a==null?void 0:a.length)||4)),[Ne,Te]=I.useState(U),_e=qi(Bt(e,ve=>ve.date).map(ve=>bt(`${ve.date}`,G,new Date).getTime()),(ve,le)=>Ka(ve,le)),[xe,we]=I.useState(U?0:_e.length-1),ge={};return _e.forEach((ve,le)=>{ge[`${ve}`]={style:{color:le===xe?"#232E3D":"#A9B1B7",fontWeight:le===xe?"bold":"normal",display:le===xe||!ae?"inline":"none"},label:Sa(new Date(ve),G)}}),I.useEffect(()=>{const ve=setInterval(()=>{we(le=>le<_e.length-1?le+1:0)},2e3);return Ne||clearInterval(ve),()=>clearInterval(ve)},[_e,Ne]),v.jsx("div",{className:`${W||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:V==="he"||V==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${w?w===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${V||"en"}`,Z==null?void 0:Z.graphContainer),style:{...(J==null?void 0:J.graphContainer)||{},...w&&w!==!0?{backgroundColor:w}:{}},id:N,ref:he,"aria-label":H||`${n?`The graph shows ${n}. `:""}This is a choropleth map where geographic areas are colored in proportion to a specific variable showing data changes over time.${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:w?y||"1rem":y||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[n||o||B||j?v.jsx(Zt,{styles:{title:J==null?void 0:J.title,description:J==null?void 0:J.description},classNames:{title:Z==null?void 0:Z.title,description:Z==null?void 0:Z.description},graphTitle:n,graphDescription:o,width:s,graphDownload:B?he.current:void 0,dataDownload:j?e.map(ve=>ve.data).filter(ve=>ve!==void 0).length>0?e.map(ve=>ve.data).filter(ve=>ve!==void 0):e.filter(ve=>ve!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{Te(!Ne)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Ne?"Click to pause animation":"Click to play animation",children:Ne?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:_e[0],max:_e[_e.length-1],marks:ge,step:null,defaultValue:_e[_e.length-1],value:_e[xe],onChangeComplete:ve=>{we(_e.indexOf(ve))},onChange:ve=>{we(_e.indexOf(ve))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:de,"aria-label":"Map area",children:(s||te)&&(l||q)&&ie?v.jsx(uve,{data:e,mapData:$?ie:{...ie,features:ie.features.filter(ve=>ve.properties.NAME!=="Antarctica")},colorDomain:Oe,width:s||te,height:Math.max(z,l||(k?z?(s||te)*k>z?(s||te)*k:z:(s||te)*k:q)),scale:m,centerPoint:g,colors:a||(d?Qe[W].sequentialColors[`neutralColorsx0${Oe.length}`]:Qe[W].sequentialColors[`neutralColorsx0${Oe.length+1}`]),colorLegendTitle:h,mapBorderWidth:b,mapNoDataColor:S,categorical:d,mapBorderColor:C,tooltip:_,onSeriesMouseOver:D,isWorldMap:T,showColorScale:A,zoomScaleExtend:M,zoomTranslateExtend:E,onSeriesMouseClick:ne,mapProperty:K,highlightedIds:Y,dateFormat:G,indx:xe,resetSelectionOnDoubleClick:R,styles:J,classNames:Z,detailsOnClick:ee,mapProjection:re||(T?"naturalEarth":"mercator")}):null}),i||f?v.jsx(tr,{styles:{footnote:J==null?void 0:J.footnote,source:J==null?void 0:J.source},classNames:{footnote:Z==null?void 0:Z.footnote,source:Z==null?void 0:Z.source},sources:i,footNote:f,width:s}):null]})})})})}function cve(t){var Te;const{data:e,colors:r,mapData:n,colorLegendTitle:a,colorDomain:i,radius:o,height:l,width:s,scale:f,centerPoint:c,tooltip:h,showLabels:d,mapBorderWidth:m,mapBorderColor:g,mapNoDataColor:y,onSeriesMouseOver:b,showColorScale:S,zoomScaleExtend:w,zoomTranslateExtend:C,highlightedDataPoints:k,onSeriesMouseClick:_,dateFormat:D,indx:T,resetSelectionOnDoubleClick:A,detailsOnClick:M,styles:E,classNames:N,mapProjection:Y}=t,ne=Array.from(Hi(Ut(e,_e=>bt(`${_e.date}`,D||"yyyy",new Date)),_e=>_e.date),([_e,xe])=>({date:_e,values:xe})),[K,B]=I.useState(void 0),[j,$]=I.useState(!(s<680)),V=I.useRef(null),[z,W]=I.useState(50),[G,ae]=I.useState(void 0),[U,H]=I.useState(void 0),[R,ee]=I.useState(void 0),[J,Z]=I.useState(void 0),re=I.useRef(null),te=I.useRef(null),F=e.filter(_e=>_e.radius===void 0).length!==e.length?l4().domain([0,(Te=Vr(e,"radius"))==null?void 0:Te.radius]).range([.25,o]).nice():void 0;I.useEffect(()=>{const _e=Qr(te.current),xe=Qr(re.current),we=g7().scaleExtent(w).translateExtent(C||[[-20,-20],[s+20,l+20]]).on("zoom",({transform:ge})=>{_e.attr("transform",ge)});xe.call(we)},[l,s]),I.useEffect(()=>{(()=>{if(V.current){const xe=V.current.getBoundingClientRect().height;W(xe+16)}})()},[]);const q=c7(n),X=o9(n),ie=q[2]-q[0],ce=q[3]-q[1],de=s*190/960*360/ie,he=l*190/678*180/ce,Oe=f*Math.min(de,he),Ne=Y==="mercator"?d7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):Y==="equalEarth"?h7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):Y==="naturalEarth"?p7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):Y==="orthographic"?m7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):f7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe);return v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${s}px`,height:`${l}px`,viewBox:`0 0 ${s} ${l}`,ref:re,direction:"ltr",children:[v.jsxs("g",{ref:te,children:[n.features.map((_e,xe)=>v.jsx("g",{children:_e.geometry.type==="MultiPolygon"?_e.geometry.coordinates.map((we,ge)=>{let ve="";return we.forEach(le=>{let ue=" M";le.forEach((Ce,pe)=>{const ye=Ne([Ce[0],Ce[1]]);pe!==le.length-1?ue=`${ue}${ye[0]} ${ye[1]}L`:ue=`${ue}${ye[0]} ${ye[1]}`}),ve+=ue}),v.jsx("path",{d:ve,style:{stroke:g,strokeWidth:m,fill:y}},ge)}):_e.geometry.coordinates.map((we,ge)=>{let ve="M";return we.forEach((le,ue)=>{const Ce=Ne([le[0],le[1]]);ue!==we.length-1?ve=`${ve}${Ce[0]} ${Ce[1]}L`:ve=`${ve}${Ce[0]} ${Ce[1]}`}),v.jsx("path",{d:ve,style:{stroke:g,strokeWidth:m,fill:y}},ge)})},xe)),v.jsx(mo,{children:ne[T].values.map((_e,xe)=>{const we=e.filter(ge=>ge.color).length===0?r[0]:_e.color?r[i.indexOf(`${_e.color}`)]:Qe.gray;return v.jsxs("g",{opacity:K?K===we?1:.3:k.length!==0?k.indexOf(_e.data.id)!==-1?1:.3:1,onMouseEnter:ge=>{H(_e),Z(ge.clientY),ee(ge.clientX),b&&b(_e)},onMouseMove:ge=>{H(_e),Z(ge.clientY),ee(ge.clientX)},onMouseLeave:()=>{H(void 0),ee(void 0),Z(void 0),b&&b(void 0)},onClick:()=>{(_||M)&&(Sr(G,_e)&&A?(ae(void 0),_==null||_(void 0)):(ae(_e),_==null||_(_e)))},children:[v.jsx(ur.circle,{cx:Ne([_e.long,_e.lat])[0],cy:Ne([_e.long,_e.lat])[1],style:{fillOpacity:.8},animate:{r:F?F(_e.radius||0):o,fill:e.filter(ge=>ge.color).length===0?r[0]:_e.color?r[i.indexOf(`${_e.color}`)]:Qe.gray,stroke:e.filter(ge=>ge.color).length===0?r[0]:_e.color?r[i.indexOf(`${_e.color}`)]:Qe.gray},transition:{duration:.5}}),d&&_e.label?v.jsx(ur.text,{x:F?Ne([_e.long,_e.lat])[0]+F(_e.radius||0):Ne([_e.long,_e.lat])[0]+o,y:Ne([_e.long,_e.lat])[1],className:"fill-primary-gray-600 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"start"},dx:4,dy:5,animate:{opacity:1},transition:{duration:.5},children:_e.label}):null]},xe)})})]}),v.jsx("foreignObject",{x:10,y:j?l-z-5:l-46,width:j?150:101,height:j?z:36,children:e.filter(_e=>_e.color).length===0||S===!1?null:j?v.jsxs("div",{ref:V,children:[v.jsx("div",{style:{marginBottom:"-0.75rem",marginLeft:"126px",backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"relative"},onClick:()=>{$(!1)},children:v.jsx(n7,{})}),v.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.5",width:"138px"},children:[a&&a!==""?v.jsx(or,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:a}):null,v.jsx("div",{className:"flex flex-col gap-3",children:i.map((_e,xe)=>v.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{B(r[xe%r.length])},onMouseLeave:()=>{B(void 0)},children:[v.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[xe%r.length]}}),v.jsx(or,{size:"sm",marginBottom:"none",leading:"none",children:_e})]},xe))})]})]}):v.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{$(!0)},children:v.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})})]}),U&&h&&R&&J?v.jsx(yr,{data:U,body:h,xPos:R,yPos:J,backgroundStyle:E==null?void 0:E.tooltip,className:N==null?void 0:N.tooltip}):null,M?v.jsx(Tr,{open:G!==void 0,onClose:()=>{ae(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(M,G)}})}):null]})}function hq(t){const{data:e,mapData:r,graphTitle:n,colors:a,sources:i,graphDescription:o,height:l,width:s,footNote:f,colorLegendTitle:c,colorDomain:h,radius:d=5,scale:m=.95,centerPoint:g,padding:y,mapBorderWidth:b=.5,mapNoDataColor:S=Qe.light.graphNoData,backgroundColor:w=!1,showLabels:C=!1,mapBorderColor:k=Qe.light.grays["gray-500"],tooltip:_,relativeHeight:D,onSeriesMouseOver:T,isWorldMap:A=!0,showColorScale:M=!0,zoomScaleExtend:E=[.8,6],zoomTranslateExtend:N,graphID:Y,dateFormat:ne="yyyy",showOnlyActiveDate:K=!1,autoPlay:B=!1,highlightedDataPoints:j=[],onSeriesMouseClick:$,graphDownload:V=!1,dataDownload:z=!1,showAntarctica:W=!1,language:G="en",minHeight:ae=0,theme:U="light",ariaLabel:H,resetSelectionOnDoubleClick:R=!0,detailsOnClick:ee,styles:J,classNames:Z,mapProjection:re}=t,[te,F]=I.useState(0),[q,X]=I.useState(0),[ie,ce]=I.useState(void 0),de=I.useRef(null),he=I.useRef(null);I.useEffect(()=>{const ge=new ResizeObserver(ve=>{F(s||ve[0].target.clientWidth||760),X(l||ve[0].target.clientHeight||480)});return de.current&&(X(de.current.clientHeight||480),F(de.current.clientWidth||760),s||ge.observe(de.current)),()=>ge.disconnect()},[s,l]);const[Oe,Ne]=I.useState(B),Te=qi(Bt(e,ge=>ge.date).map(ge=>bt(`${ge.date}`,ne,new Date).getTime()),(ge,ve)=>Ka(ge,ve)),[_e,xe]=I.useState(B?0:Te.length-1),we={};return Te.forEach((ge,ve)=>{we[`${ge}`]={style:{color:ve===_e?"#232E3D":"#A9B1B7",fontWeight:ve===_e?"bold":"normal",display:ve===_e||!K?"inline":"none"},label:Sa(new Date(ge),ne)}}),I.useEffect(()=>{const ge=setInterval(()=>{xe(ve=>ve<Te.length-1?ve+1:0)},2e3);return Oe||clearInterval(ge),()=>clearInterval(ge)},[Te,Oe]),I.useEffect(()=>{typeof r=="string"?ka(r).then(ve=>{ce(ve)}):ce(r||u7)},[r]),v.jsx("div",{className:`${U||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:G==="he"||G==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${w?w===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${G||"en"}`,Z==null?void 0:Z.graphContainer),style:{...(J==null?void 0:J.graphContainer)||{},...w&&w!==!0?{backgroundColor:w}:{}},id:Y,ref:he,"aria-label":H||`${n?`The graph shows ${n}. `:""}This is an animated dot density map showing the distribution of a variable across a region or world, with each dot representing a data point and changes over time.${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:w?y||"1rem":y||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[n||o||V||z?v.jsx(Zt,{styles:{title:J==null?void 0:J.title,description:J==null?void 0:J.description},classNames:{title:Z==null?void 0:Z.title,description:Z==null?void 0:Z.description},graphTitle:n,graphDescription:o,width:s,graphDownload:V?he.current:void 0,dataDownload:z?e.map(ge=>ge.data).filter(ge=>ge!==void 0).length>0?e.map(ge=>ge.data).filter(ge=>ge!==void 0):e.filter(ge=>ge!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{Ne(!Oe)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Oe?"Click to pause animation":"Click to play animation",children:Oe?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:Te[0],max:Te[Te.length-1],marks:we,step:null,defaultValue:Te[Te.length-1],value:Te[_e],onChangeComplete:ge=>{xe(Te.indexOf(ge))},onChange:ge=>{xe(Te.indexOf(ge))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:de,"aria-label":"Map area",children:(s||te)&&(l||q)&&ie?v.jsx(cve,{data:e,mapData:W?ie:{...ie,features:ie.features.filter(ge=>ge.properties.NAME!=="Antarctica")},colorDomain:e.filter(ge=>ge.color).length===0?[]:h||Bt(e.filter(ge=>!Fe(ge.color)),"color").map(ge=>`${ge.color}`),width:s||te,height:Math.max(ae,l||(D?ae?(s||te)*D>ae?(s||te)*D:ae:(s||te)*D:q)),scale:m,centerPoint:g,colors:e.filter(ge=>ge.color).length===0?a?[a]:[Qe.primaryColors["blue-600"]]:a||Qe[U].categoricalColors.colors,colorLegendTitle:c,radius:d,mapBorderWidth:b,mapNoDataColor:S,mapBorderColor:k,tooltip:_,onSeriesMouseOver:T,showLabels:C,isWorldMap:A,showColorScale:M,zoomScaleExtend:E,zoomTranslateExtend:N,onSeriesMouseClick:$,highlightedDataPoints:j,dateFormat:ne,indx:_e,resetSelectionOnDoubleClick:R,styles:J,classNames:Z,detailsOnClick:ee,mapProjection:re||(A?"naturalEarth":"mercator")}):null}),i||f?v.jsx(tr,{styles:{footnote:J==null?void 0:J.footnote,source:J==null?void 0:J.source},classNames:{footnote:Z==null?void 0:Z.footnote,source:Z==null?void 0:Z.source},sources:i,footNote:f,width:s}):null]})})})})}function fve(t){var be,je,$e,ut,Ie,Ze,Ke,et,Pt,jt,Tt,St,tt,Mt,Dt,Ye,Lt,Et,Xt,He,It,Ge,Rt,$t,dr,xr,Mr,Er,it;const{data:e,width:r,height:n,showLabels:a,colors:i,colorDomain:o,radius:l,xAxisTitle:s,yAxisTitle:f,leftMargin:c,rightMargin:h,topMargin:d,bottomMargin:m,tooltip:g,onSeriesMouseOver:y,refXValues:b,refYValues:S,highlightAreaSettings:w,selectedColor:C,highlightedDataPoints:k,maxRadiusValue:_,maxXValue:D,minXValue:T,maxYValue:A,minYValue:M,onSeriesMouseClick:E,dateFormat:N,indx:Y,rtl:ne,annotations:K,customHighlightAreaSettings:B,resetSelectionOnDoubleClick:j,detailsOnClick:$,noOfXTicks:V,noOfYTicks:z,labelColor:W,xSuffix:G,ySuffix:ae,xPrefix:U,yPrefix:H,styles:R,classNames:ee}=t,J=Ut(e.map(Xe=>({...Xe,date:bt(`${Xe.date}`,N,new Date)})),"date"),Z=Bt(J,Xe=>Xe.label).map(Xe=>Xe.label),re=Array.from(Hi(ove(e,N||"yyyy"),Xe=>Xe.date),([Xe,Vt])=>({date:Xe,values:Z.map(Yt=>Vt.find(at=>at.label===Yt)).map(Yt=>({...Yt,id:Yt.label}))})),[te,F]=I.useState(void 0),[q,X]=I.useState(void 0),[ie,ce]=I.useState(void 0),[de,he]=I.useState(void 0),Oe={top:d,bottom:m,left:f?c+40:c,right:h},Ne=r-Oe.left-Oe.right,Te=n-Oe.top-Oe.bottom,_e=e.filter(Xe=>Xe.radius===void 0).length!==e.length?l4().domain([0,Fe(_)?(be=Vr(e,"radius"))==null?void 0:be.radius:_]).range([.25,l]).nice():void 0,xe=Fe(T)?((je=Br(e,"x"))==null?void 0:je.x)>0?0:($e=Br(e,"x"))==null?void 0:$e.x:T,we=Fe(D)?((ut=Vr(e,"x"))==null?void 0:ut.x)>0?(Ie=Vr(e,"x"))==null?void 0:Ie.x:0:D,ge=br().domain([xe,we]).range([0,Ne]).nice(),ve=Fe(M)?((Ze=Br(e,"y"))==null?void 0:Ze.y)>0?0:(Ke=Br(e,"y"))==null?void 0:Ke.y:M,le=Fe(A)?((et=Vr(e,"y"))==null?void 0:et.y)>0?(Pt=Vr(e,"y"))==null?void 0:Pt.y:0:A,ue=br().domain([ve,le]).range([Te,0]).nice(),Ce=ge.ticks(V),pe=ue.ticks(z),ye=i9.from(re[Y].values.filter(Xe=>!Fe(Xe.x)&&!Fe(Xe.y)),Xe=>ge(Xe.x),Xe=>ue(Xe.y)).voronoi([0,0,Ne<0?0:Ne,Te<0?0:Te]);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${Oe.left},${Oe.top})`,children:[v.jsx(Az,{areaSettings:w,width:Ne,height:Te,scaleX:ge,scaleY:ue}),v.jsx(Z2,{areaSettings:B,scaleX:ge,scaleY:ue}),v.jsxs("g",{children:[v.jsx(v1,{values:pe.filter(Xe=>Xe!==0),y:pe.filter(Xe=>Xe!==0).map(Xe=>ue(Xe)),x1:0,x2:Ne+Oe.right,styles:{gridLines:(jt=R==null?void 0:R.yAxis)==null?void 0:jt.gridLines,labels:(Tt=R==null?void 0:R.yAxis)==null?void 0:Tt.labels},classNames:{gridLines:(St=ee==null?void 0:ee.yAxis)==null?void 0:St.gridLines,labels:(tt=ee==null?void 0:ee.yAxis)==null?void 0:tt.labels},suffix:ae,prefix:H,labelType:"primary",showGridLines:!0,labelPos:"side"}),v.jsx(Nr,{y1:ue(ve<0?0:ve),y2:ue(ve<0?0:ve),x1:0,x2:Ne,label:_t(ve<0?0:ve,H,ae),labelPos:{x:0,y:ue(ve<0?0:ve),dy:"0.33em",dx:-4},classNames:{axis:(Mt=ee==null?void 0:ee.xAxis)==null?void 0:Mt.axis,label:(Dt=ee==null?void 0:ee.yAxis)==null?void 0:Dt.labels},styles:{axis:(Ye=R==null?void 0:R.xAxis)==null?void 0:Ye.axis,label:{textAnchor:"end",...((Lt=R==null?void 0:R.yAxis)==null?void 0:Lt.labels)||{}}}}),v.jsx(nn,{x:0-Oe.left+15,y:Te/2,style:(Et=R==null?void 0:R.yAxis)==null?void 0:Et.title,className:(Xt=ee==null?void 0:ee.yAxis)==null?void 0:Xt.title,text:f,rotate90:!0})]}),v.jsxs("g",{children:[v.jsx(La,{values:Ce.filter(Xe=>Xe!==0),x:Ce.filter(Xe=>Xe!==0).map(Xe=>ge(Xe)),y1:0,y2:Te,styles:{gridLines:(He=R==null?void 0:R.xAxis)==null?void 0:He.gridLines,labels:(It=R==null?void 0:R.xAxis)==null?void 0:It.labels},classNames:{gridLines:(Ge=ee==null?void 0:ee.xAxis)==null?void 0:Ge.gridLines,labels:(Rt=ee==null?void 0:ee.xAxis)==null?void 0:Rt.labels},suffix:G,prefix:U,labelType:"primary",showGridLines:!0}),v.jsx(Nr,{x1:ge(xe<0?0:xe),x2:ge(xe<0?0:xe),y1:0,y2:Te,label:_t(xe<0?0:xe,U,G),labelPos:{x:ge(xe<0?0:xe),y:Te,dy:"1em",dx:0},classNames:{axis:($t=ee==null?void 0:ee.xAxis)==null?void 0:$t.axis,label:(dr=ee==null?void 0:ee.yAxis)==null?void 0:dr.labels},styles:{axis:(xr=R==null?void 0:R.xAxis)==null?void 0:xr.axis,label:{textAnchor:"middle",...((Mr=R==null?void 0:R.yAxis)==null?void 0:Mr.labels)||{}}}}),v.jsx(nn,{x:Ne/2,y:Te+30,style:(Er=R==null?void 0:R.xAxis)==null?void 0:Er.title,className:(it=ee==null?void 0:ee.xAxis)==null?void 0:it.title,text:s})]}),v.jsxs(mo,{children:[re[Y].values.map((Xe,Vt)=>v.jsx("g",{children:v.jsx("path",{d:ye.renderCell(re[Y].values.findIndex(Yt=>Yt.id===Xe.id)),className:"opacity-0",onMouseEnter:Yt=>{F(Xe),he(Yt.clientY),ce(Yt.clientX),y&&y(Xe)},onMouseMove:Yt=>{F(Xe),he(Yt.clientY),ce(Yt.clientX)},onMouseLeave:()=>{F(void 0),ce(void 0),he(void 0),y&&y(void 0)},onClick:()=>{(E||$)&&(Sr(q,Xe)&&j?(X(void 0),E==null||E(void 0)):(X(Xe),E==null||E(Xe)))}})},Vt)),re[Y].values.map((Xe,Vt)=>v.jsx("g",{children:v.jsxs(ur.g,{opacity:C?Xe.color&&i[o.indexOf(`${Xe.color}`)]===C?1:.3:te?te.label===Xe.label?1:.3:k.length!==0?k.indexOf(Xe.label||"")!==-1?1:.5:1,onMouseEnter:Yt=>{F(Xe),he(Yt.clientY),ce(Yt.clientX),y&&y(Xe)},onMouseMove:Yt=>{F(Xe),he(Yt.clientY),ce(Yt.clientX)},onMouseLeave:()=>{F(void 0),ce(void 0),he(void 0),y&&y(void 0)},onClick:()=>{(E||$)&&(Sr(q,Xe)&&j?(X(void 0),E==null||E(void 0)):(X(Xe),E==null||E(Xe)))},children:[v.jsx(ur.circle,{cx:0,cy:0,style:{fill:e.filter(Yt=>Yt.color).length===0?i[0]:Xe.color?i[o.indexOf(`${Xe.color}`)]:Qe.gray,stroke:e.filter(Yt=>Yt.color).length===0?i[0]:Xe.color?i[o.indexOf(`${Xe.color}`)]:Qe.gray,fillOpacity:.6},animate:{cx:ge(Xe.x||0),cy:ue(Xe.y||0),r:Fe(Xe.x)||Fe(Xe.y)?0:_e?_e(Xe.radius||0):l},transition:{duration:.5}}),a&&!Fe(Xe.label)?v.jsx(ur.text,{className:Be("graph-value text-sm",ee==null?void 0:ee.graphObjectValues),style:{fill:W||(e.filter(Yt=>Yt.color).length===0?i[0]:Xe.color?i[o.indexOf(`${Xe.color}`)]:Qe.gray),...(R==null?void 0:R.graphObjectValues)||{}},dy:"0.33em",dx:3,animate:{attrY:ue(Xe.y||0),attrX:_e?ge(Xe.x||0)+_e(Xe.radius||0):ge(Xe.x||0)+l,opacity:Fe(Xe.x)||Fe(Xe.y)?0:1},transition:{duration:.5},children:Xe.label}):k.length!==0&&!Fe(Xe.label)&&k.indexOf(Xe.label)!==-1?v.jsx(ur.text,{className:Be("graph-value text-sm",ee==null?void 0:ee.graphObjectValues),style:{fill:W||(e.filter(Yt=>Yt.color).length===0?i[0]:Xe.color?i[o.indexOf(`${Xe.color}`)]:Qe.gray),...(R==null?void 0:R.graphObjectValues)||{}},dy:"0.33em",dx:3,animate:{attrY:ue(Xe.y||0),attrX:_e?ge(Xe.x||0)+_e(Xe.radius||0):ge(Xe.x||0)+l,opacity:Fe(Xe.x)||Fe(Xe.y)?0:1},transition:{duration:.5},children:Xe.label}):null]})},Vt))]}),b.map((Xe,Vt)=>v.jsx(ti,{text:Xe.text,color:Xe.color,x:ge(Xe.value),y1:0,y2:Te,textSide:ge(Xe.value)>Ne*.75||ne?"left":"right",classNames:Xe.classNames,styles:Xe.styles},Vt)),S.map((Xe,Vt)=>v.jsx(h1,{text:Xe.text,color:Xe.color,y:ue(Xe.value),x1:0,x2:Ne,classNames:Xe.classNames,styles:Xe.styles},Vt)),v.jsx("g",{children:K.map((Xe,Vt)=>{const Yt=K2({x:Xe.xCoordinate?ge(Xe.xCoordinate)+(Xe.xOffset||0):0+(Xe.xOffset||0),y:Xe.yCoordinate?ue(Xe.yCoordinate)+(Xe.yOffset||0)-8:0+(Xe.yOffset||0)-8},{x:Xe.xCoordinate?ge(Xe.xCoordinate):0,y:Xe.yCoordinate?ue(Xe.yCoordinate):0},Fe(Xe.connectorRadius)?3.5:Xe.connectorRadius),at=Xe.showConnector?{y1:Yt.y,x1:Yt.x,y2:Xe.yCoordinate?ue(Xe.yCoordinate)+(Xe.yOffset||0):0+(Xe.yOffset||0),x2:Xe.xCoordinate?ge(Xe.xCoordinate)+(Xe.xOffset||0):0+(Xe.xOffset||0),cy:Xe.yCoordinate?ue(Xe.yCoordinate):0,cx:Xe.xCoordinate?ge(Xe.xCoordinate):0,circleRadius:Fe(Xe.connectorRadius)?3.5:Xe.connectorRadius,strokeWidth:Xe.showConnector===!0?2:Math.min(Xe.showConnector||0,1)}:void 0,cr={y:Xe.yCoordinate?ue(Xe.yCoordinate)+(Xe.yOffset||0)-8:0+(Xe.yOffset||0)-8,x:ne?0:Xe.xCoordinate?ge(Xe.xCoordinate)+(Xe.xOffset||0):0+(Xe.xOffset||0),width:ne?Xe.xCoordinate?ge(Xe.xCoordinate)+(Xe.xOffset||0):0+(Xe.xOffset||0):Ne-(Xe.xCoordinate?ge(Xe.xCoordinate)+(Xe.xOffset||0):0+(Xe.xOffset||0)),maxWidth:Xe.maxWidth,fontWeight:Xe.fontWeight,align:Xe.align};return v.jsx(J2,{color:Xe.color,connectorsSettings:at,labelSettings:cr,text:Xe.text,classNames:Xe.classNames,styles:Xe.styles},Vt)})})]})}),te&&g&&ie&&de?v.jsx(yr,{data:te,body:g,xPos:ie,yPos:de,backgroundStyle:R==null?void 0:R.tooltip,className:ee==null?void 0:ee.tooltip}):null,$?v.jsx(Tr,{open:q!==void 0,onClose:()=>{X(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr($,q)}})}):null]})}function pq(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,showLabels:o=!1,height:l,width:s,footNote:f,colorDomain:c,colorLegendTitle:h,radius:d=5,xAxisTitle:m="X Axis",yAxisTitle:g="Y Axis",padding:y,backgroundColor:b=!1,leftMargin:S=50,rightMargin:w=20,topMargin:C=20,bottomMargin:k=50,tooltip:_,relativeHeight:D,onSeriesMouseOver:T,refXValues:A=[],refYValues:M=[],highlightAreaSettings:E=[],showColorScale:N=!0,highlightedDataPoints:Y=[],graphID:ne,maxRadiusValue:K,maxXValue:B,minXValue:j,maxYValue:$,minYValue:V,onSeriesMouseClick:z,graphDownload:W=!1,dataDownload:G=!1,language:ae="en",showNAColor:U=!0,minHeight:H=0,annotations:R=[],customHighlightAreaSettings:ee=[],theme:J="light",ariaLabel:Z,resetSelectionOnDoubleClick:re=!0,dateFormat:te="yyyy",showOnlyActiveDate:F=!1,autoPlay:q=!1,detailsOnClick:X,noOfXTicks:ie=5,noOfYTicks:ce=5,labelColor:de,xSuffix:he="",ySuffix:Oe="",xPrefix:Ne="",yPrefix:Te="",styles:_e,classNames:xe}=t,[we,ge]=I.useState(0),[ve,le]=I.useState(0),[ue,Ce]=I.useState(void 0),pe=I.useRef(null),ye=I.useRef(null);I.useEffect(()=>{const Ke=new ResizeObserver(et=>{ge(s||et[0].target.clientWidth||620),le(l||et[0].target.clientHeight||480)});return pe.current&&(le(pe.current.clientHeight||480),ge(pe.current.clientWidth||620),s||Ke.observe(pe.current)),()=>Ke.disconnect()},[s,l]);const[be,je]=I.useState(q),$e=qi(Bt(e,Ke=>Ke.date).map(Ke=>bt(`${Ke.date}`,te,new Date).getTime()),(Ke,et)=>Ka(Ke,et)),[ut,Ie]=I.useState(q?0:$e.length-1),Ze={};return $e.forEach((Ke,et)=>{Ze[`${Ke}`]={style:{color:et===ut?"#232E3D":"#A9B1B7",fontWeight:et===ut?"bold":"normal",display:et===ut||!F?"inline":"none"},label:Sa(new Date(Ke),te)}}),I.useEffect(()=>{const Ke=setInterval(()=>{Ie(et=>et<$e.length-1?et+1:0)},2e3);return be||clearInterval(Ke),()=>clearInterval(Ke)},[$e,be]),v.jsx("div",{className:`${J||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:ae==="he"||ae==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${b?b===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${ae||"en"}`,xe==null?void 0:xe.graphContainer),style:{...(_e==null?void 0:_e.graphContainer)||{},...b&&b!==!0?{backgroundColor:b}:{}},id:ne,ref:ye,"aria-label":Z||`${r?`The graph shows ${r}. `:""}This is an animated scatter plot that shows correlation between two variables showing data changes over time.${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:b?y||"1rem":y||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||W||G?v.jsx(Zt,{styles:{title:_e==null?void 0:_e.title,description:_e==null?void 0:_e.description},classNames:{title:xe==null?void 0:xe.title,description:xe==null?void 0:xe.description},graphTitle:r,graphDescription:i,width:s,graphDownload:W?ye.current:void 0,dataDownload:G?e.map(Ke=>Ke.data).filter(Ke=>Ke!==void 0).length>0?e.map(Ke=>Ke.data).filter(Ke=>Ke!==void 0):e.filter(Ke=>Ke!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{je(!be)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":be?"Click to pause animation":"Click to play animation",children:be?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:$e[0],max:$e[$e.length-1],marks:Ze,step:null,defaultValue:$e[$e.length-1],value:$e[ut],onChangeComplete:Ke=>{Ie($e.indexOf(Ke))},onChange:Ke=>{Ie($e.indexOf(Ke))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[N&&e.filter(Ke=>Ke.color).length!==0?v.jsx(Cn,{width:s,colorLegendTitle:h,colors:n||Qe[J].categoricalColors.colors,colorDomain:c||Bt(e.filter(Ke=>Ke.color),"color").map(Ke=>Ke.color),setSelectedColor:Ce,showNAColor:U}):null,v.jsx("div",{className:"flex flex-col grow justify-center w-full leading-0",ref:pe,"aria-label":"Graph area",children:(s||we)&&(l||ve)?v.jsx(fve,{data:e,width:s||we,height:Math.max(H,l||(D?H?(s||we)*D>H?(s||we)*D:H:(s||we)*D:ve)),colorDomain:e.filter(Ke=>Ke.color).length===0?[]:c||Bt(e.filter(Ke=>Ke.color),"color").map(Ke=>Ke.color),colors:e.filter(Ke=>Ke.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[J].categoricalColors.colors,xAxisTitle:m,yAxisTitle:g,refXValues:A,refYValues:M,showLabels:o,radius:d,leftMargin:S,rightMargin:w,topMargin:C,bottomMargin:k,tooltip:_,onSeriesMouseOver:T,highlightAreaSettings:E,highlightedDataPoints:e.filter(Ke=>Ke.label).length===0?[]:Y,selectedColor:ue,maxRadiusValue:K,maxXValue:B,minXValue:j,maxYValue:$,minYValue:V,onSeriesMouseClick:z,dateFormat:te,indx:ut,rtl:ae==="he"||ae==="ar",annotations:R,customHighlightAreaSettings:ee,resetSelectionOnDoubleClick:re,detailsOnClick:X,noOfXTicks:ie,noOfYTicks:ce,labelColor:de,xSuffix:he,ySuffix:Oe,xPrefix:Ne,yPrefix:Te,styles:_e,classNames:xe}):null})]}),a||f?v.jsx(tr,{styles:{footnote:_e==null?void 0:_e.footnote,source:_e==null?void 0:_e.source},classNames:{footnote:xe==null?void 0:xe.footnote,source:xe==null?void 0:xe.source},sources:a,footNote:f,width:s}):null]})})})})}function dve(t){var xe,we,ge,ve,le,ue;const{data:e,dotColors:r,suffix:n,prefix:a,barPadding:i,showValues:o,showTicks:l,leftMargin:s,truncateBy:f,width:c,height:h,rightMargin:d,topMargin:m,bottomMargin:g,radius:y,showLabels:b,tooltip:S,onSeriesMouseOver:w,maxPositionValue:C,minPositionValue:k,onSeriesMouseClick:_,selectedColor:D,dateFormat:T,indx:A,sortParameter:M,connectorStrokeWidth:E,arrowConnector:N,maxBarThickness:Y,minBarThickness:ne,resetSelectionOnDoubleClick:K,detailsOnClick:B,axisTitle:j,noOfTicks:$,valueColor:V,styles:z,classNames:W,refValues:G,rtl:ae}=t,U=Ut(e.map(Ce=>({...Ce,date:bt(`${Ce.date}`,T,new Date)})),"date"),H=Bt(U,Ce=>Ce.label).map(Ce=>Ce.label),R=Array.from(Hi(uq(e,T||"yyyy"),Ce=>Ce.date),([Ce,pe])=>({date:Ce,values:M!==void 0?M==="diff"?Ut(pe,ye=>Fe(ye.x[ye.x.length-1])||Fe(ye.x[0])?-1/0:ye.x[ye.x.length-1]-ye.x[0]).reverse().map((ye,be)=>({...ye,id:`${be}`})):Ut(pe,ye=>Fe(ye.x[M])?-1/0:ye.x[M]).reverse().map((ye,be)=>({...ye,id:`${be}`})):H.map(ye=>pe.find(be=>be.label===ye)).map((ye,be)=>({...ye,id:`${be}`}))})),ee={top:j?m+25:m,bottom:g,left:s,right:d},J=c-ee.left-ee.right,Z=h-ee.top-ee.bottom,[re,te]=I.useState(void 0),[F,q]=I.useState(void 0),[X,ie]=I.useState(void 0),[ce,de]=I.useState(void 0),he=Fe(C)?Math.max(...e.map(Ce=>Mn(Ce.x)||0))<0?0:Math.max(...e.map(Ce=>Mn(Ce.x)||0)):C,Oe=Fe(k)?Math.min(...e.map(Ce=>gr(Ce.x)||0))>0?0:Math.min(...e.map(Ce=>gr(Ce.x)||0)):k,Ne=br().domain([Oe,he]).range([0,J]).nice(),Te=Un().domain(H.map((Ce,pe)=>`${pe}`)).range([0,ne?Math.max(Z,ne*H.length):Y?Math.min(Z,Y*H.length):Z]).paddingInner(i),_e=Ne.ticks($);return v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${c}px`,height:`${h}px`,viewBox:`0 0 ${c} ${h}`,direction:"ltr",children:[N?v.jsx("defs",{children:v.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:v.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,v.jsxs("g",{transform:`translate(${ee.left},${ee.top})`,children:[l?v.jsx(La,{values:_e.filter(Ce=>Ce!==0),x:_e.filter(Ce=>Ce!==0).map(Ce=>Ne(Ce)),y1:0-m,y2:Z+ee.bottom,styles:{gridLines:(xe=z==null?void 0:z.xAxis)==null?void 0:xe.gridLines,labels:(we=z==null?void 0:z.xAxis)==null?void 0:we.labels},classNames:{gridLines:(ge=W==null?void 0:W.xAxis)==null?void 0:ge.gridLines,labels:(ve=W==null?void 0:W.xAxis)==null?void 0:ve.labels},suffix:n,prefix:a,labelType:"secondary",showGridLines:!0}):null,v.jsx(nn,{x:J/2,y:0-ee.top+15,style:(le=z==null?void 0:z.xAxis)==null?void 0:le.title,className:(ue=W==null?void 0:W.xAxis)==null?void 0:ue.title,text:j}),v.jsx(mo,{children:R[A].values.map((Ce,pe)=>{var ye,be,je,$e;return v.jsxs(ur.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",children:[b?v.jsx(ur.text,{style:{textAnchor:"end",...((ye=z==null?void 0:z.yAxis)==null?void 0:ye.labels)||{}},x:0,dx:-10,dy:"0.33em",className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(be=W==null?void 0:W.yAxis)==null?void 0:be.labels),animate:{attrY:Te(`${pe}`)+Te.bandwidth()/2},transition:{duration:.5},children:`${Ce.label}`.length<f?Ce.label:`${`${Ce.label}`.substring(0,f)}...`}):null,v.jsx(ur.line,{x1:0,x2:J,className:Be("undp-tick-line stroke-primary-gray-400 dark:stroke-primary-gray-600",(je=W==null?void 0:W.yAxis)==null?void 0:je.gridLines),style:($e=z==null?void 0:z.yAxis)==null?void 0:$e.gridLines,animate:{y1:Te(`${pe}`)+Te.bandwidth()/2,y2:Te(`${pe}`)+Te.bandwidth()/2},transition:{duration:.5}}),v.jsx(ur.line,{style:{strokeWidth:E,...(z==null?void 0:z.dataConnectors)||{},opacity:D?.3:1},className:Be("stroke-primary-gray-600 dark:stroke-primary-gray-300",W==null?void 0:W.dataConnectors),animate:{y1:Te(`${pe}`)+Te.bandwidth()/2,y2:Te(`${pe}`)+Te.bandwidth()/2,x1:Ne(gr(Ce.x))+y,x2:Ne(Mn(Ce.x))-y},markerEnd:N&&Ce.x.indexOf(gr(Ce.x))===0?"url(#arrow)":"",markerStart:N&&Ce.x.indexOf(gr(Ce.x))===Ce.x.length-1?"url(#arrow)":""}),Ce.x.map((ut,Ie)=>v.jsxs(ur.g,{opacity:D?r[Ie]===D?1:.3:1,onMouseEnter:Ze=>{te({...Ce,xIndex:Ie}),de(Ze.clientY),ie(Ze.clientX),w&&w({...Ce,xIndex:Ie})},onClick:()=>{(_||B)&&(Sr(F,{...Ce,xIndex:Ie})&&K?(q(void 0),_==null||_(void 0)):(q({...Ce,xIndex:Ie}),_&&_({...Ce,xIndex:Ie})))},onMouseMove:Ze=>{te({...Ce,xIndex:Ie}),de(Ze.clientY),ie(Ze.clientX)},onMouseLeave:()=>{te(void 0),ie(void 0),de(void 0),w&&w(void 0)},children:[v.jsx(ur.circle,{r:y,style:{fill:r[Ie],fillOpacity:.85,stroke:r[Ie],strokeWidth:1},animate:{cy:Te(`${pe}`)+Te.bandwidth()/2,cx:Ne(ut||0),opacity:Fe(ut)?0:1},transition:{duration:.5}}),o?v.jsx(ur.text,{style:{fill:V||r[Ie],textAnchor:"middle",opacity:Fe(ut)?0:1,...(z==null?void 0:z.graphObjectValues)||{}},className:Be("graph-value text-sm font-bold",W==null?void 0:W.graphObjectValues),dx:0,dy:0-y-3,animate:{attrY:Te(`${pe}`)+Te.bandwidth()/2,attrX:Ne(ut||0),opacity:Fe(ut)?0:1},transition:{duration:.5},children:_t(ut,a,n)}):null]},Ie))]},pe)})}),G?v.jsx(v.Fragment,{children:G.map((Ce,pe)=>v.jsx(ti,{text:Ce.text,color:Ce.color,x:Ne(Ce.value),y1:0-ee.top,y2:Z+ee.bottom,textSide:Ne(Ce.value)>J*.75||ae?"left":"right",classNames:Ce.classNames,styles:Ce.styles},pe))}):null]})]}),re&&S&&X&&ce?v.jsx(yr,{data:re,body:S,xPos:X,yPos:ce,backgroundStyle:z==null?void 0:z.tooltip,className:W==null?void 0:W.tooltip}):null,B?v.jsx(Tr,{open:F!==void 0,onClose:()=>{q(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(B,F)}})}):null]})}function hve(t){const{data:e,graphTitle:r,colors:n=Qe.light.categoricalColors.colors,suffix:a="",prefix:i="",sources:o,graphDescription:l,barPadding:s=.25,showTicks:f=!0,leftMargin:c=100,rightMargin:h=40,topMargin:d=20,bottomMargin:m=10,truncateBy:g=999,showValues:y=!0,height:b,width:S,footNote:w,colorDomain:C,colorLegendTitle:k,padding:_,backgroundColor:D=!1,radius:T=3,showLabels:A=!0,tooltip:M,relativeHeight:E,onSeriesMouseOver:N,graphID:Y,maxPositionValue:ne,minPositionValue:K,onSeriesMouseClick:B,graphDownload:j=!1,dataDownload:$=!1,sortParameter:V,showOnlyActiveDate:z=!1,autoPlay:W=!1,dateFormat:G="yyyy",arrowConnector:ae=!1,connectorStrokeWidth:U=2,language:H="en",minHeight:R=0,theme:ee="light",maxBarThickness:J,minBarThickness:Z,ariaLabel:re,resetSelectionOnDoubleClick:te=!0,detailsOnClick:F,axisTitle:q,noOfTicks:X=5,valueColor:ie,styles:ce,classNames:de,refValues:he}=t,[Oe,Ne]=I.useState(0),[Te,_e]=I.useState(0),[xe,we]=I.useState(void 0),ge=I.useRef(null),ve=I.useRef(null);I.useEffect(()=>{const je=new ResizeObserver($e=>{Ne(S||$e[0].target.clientWidth||620),_e(b||$e[0].target.clientHeight||480)});return ge.current&&(_e(ge.current.clientHeight||480),Ne(ge.current.clientWidth||620),S||je.observe(ge.current)),()=>je.disconnect()},[S,b]);const[le,ue]=I.useState(W),Ce=qi(Bt(e,je=>je.date).map(je=>bt(`${je.date}`,G,new Date).getTime()),(je,$e)=>Ka(je,$e)),[pe,ye]=I.useState(W?0:Ce.length-1),be={};return Ce.forEach((je,$e)=>{be[`${je}`]={style:{color:$e===pe?"#232E3D":"#A9B1B7",fontWeight:$e===pe?"bold":"normal",display:$e===pe||!z?"inline":"none"},label:Sa(new Date(je),G)}}),I.useEffect(()=>{const je=setInterval(()=>{ye($e=>$e<Ce.length-1?$e+1:0)},2e3);return le||clearInterval(je),()=>clearInterval(je)},[Ce,le]),v.jsx("div",{className:`${ee||"light"} flex ${S?"w-fit grow-0":"w-full grow"}`,dir:H==="he"||H==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${D?D===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${H||"en"}`,de==null?void 0:de.graphContainer),style:{...(ce==null?void 0:ce.graphContainer)||{},...D&&D!==!0?{backgroundColor:D}:{}},id:Y,ref:ve,"aria-label":re||`${r?`The graph shows ${r}. `:""}This is an animated dumbbell chart that shows comparisons between two or more data points across categories. ${l?` ${l}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:D?_||"1rem":_||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||l||j||$?v.jsx(Zt,{styles:{title:ce==null?void 0:ce.title,description:ce==null?void 0:ce.description},classNames:{title:de==null?void 0:de.title,description:de==null?void 0:de.description},graphTitle:r,graphDescription:l,width:S,graphDownload:j?ve.current:void 0,dataDownload:$?e.map(je=>je.data).filter(je=>je!==void 0).length>0?e.map(je=>je.data).filter(je=>je!==void 0):e.filter(je=>je!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{ue(!le)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":le?"Click to pause animation":"Click to play animation",children:le?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:Ce[0],max:Ce[Ce.length-1],marks:be,step:null,defaultValue:Ce[Ce.length-1],value:Ce[pe],onChangeComplete:je=>{ye(Ce.indexOf(je))},onChange:je=>{ye(Ce.indexOf(je))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[v.jsx(Cn,{width:S,colorDomain:C,colors:n,colorLegendTitle:k,setSelectedColor:we,showNAColor:!1}),v.jsx("div",{className:"flex grow w-full justify-center leading-0",ref:ge,"aria-label":"Graph area",children:(S||Oe)&&(b||Te)?v.jsx(dve,{data:e,dotColors:n,width:S||Oe,height:Math.max(R,b||(E?R?(S||Oe)*E>R?(S||Oe)*E:R:(S||Oe)*E:Te)),suffix:a,prefix:i,radius:T,barPadding:s,showTicks:f,leftMargin:c,rightMargin:h,topMargin:d,bottomMargin:m,truncateBy:g,showLabels:A,showValues:y,tooltip:M,onSeriesMouseOver:N,maxPositionValue:ne,minPositionValue:K,onSeriesMouseClick:B,selectedColor:xe,dateFormat:G,indx:pe,sortParameter:V,arrowConnector:ae,connectorStrokeWidth:U,maxBarThickness:J,minBarThickness:Z,resetSelectionOnDoubleClick:te,detailsOnClick:F,axisTitle:q,noOfTicks:X,valueColor:ie,styles:ce,classNames:de,refValues:he,rtl:H==="he"||H==="ar"}):null})]}),o||w?v.jsx(tr,{styles:{footnote:ce==null?void 0:ce.footnote,source:ce==null?void 0:ce.source},classNames:{footnote:de==null?void 0:de.footnote,source:de==null?void 0:de.source},sources:o,footNote:w,width:S}):null]})})})})}function pve(t){var _e,xe,we,ge,ve,le,ue,Ce,pe,ye;const{data:e,dotColors:r,barPadding:n,showTicks:a,leftMargin:i,truncateBy:o,width:l,height:s,rightMargin:f,topMargin:c,bottomMargin:h,radius:d,showLabels:m,tooltip:g,onSeriesMouseOver:y,maxPositionValue:b,minPositionValue:S,onSeriesMouseClick:w,showValues:C,suffix:k,prefix:_,selectedColor:D,dateFormat:T,indx:A,sortParameter:M,arrowConnector:E,connectorStrokeWidth:N,maxBarThickness:Y,minBarThickness:ne,resetSelectionOnDoubleClick:K,detailsOnClick:B,axisTitle:j,noOfTicks:$,valueColor:V,styles:z,classNames:W,refValues:G}=t,ae=Ut(e.map(be=>({...be,date:bt(`${be.date}`,T,new Date)})),"date"),U=Bt(ae,be=>be.label).map(be=>be.label),H=Array.from(Hi(uq(e,T||"yyyy"),be=>be.date),([be,je])=>({date:be,values:M!==void 0?M==="diff"?Ut(je,$e=>Fe($e.x[$e.x.length-1])||Fe($e.x[0])?-1/0:$e.x[$e.x.length-1]-$e.x[0]).map(($e,ut)=>({...$e,id:`${ut}`})):Ut(je,$e=>Fe($e.x[M])?-1/0:$e.x[M]).map(($e,ut)=>({...$e,id:`${ut}`})):U.map($e=>je.find(ut=>ut.label===$e)).map(($e,ut)=>({...$e,id:`${ut}`}))})),R={top:c,bottom:h,left:j?i+30:i,right:f},ee=l-R.left-R.right,J=s-R.top-R.bottom,[Z,re]=I.useState(void 0),[te,F]=I.useState(void 0),[q,X]=I.useState(void 0),[ie,ce]=I.useState(void 0),de=Fe(b)?Math.max(...e.map(be=>Mn(be.x)||0))<0?0:Math.max(...e.map(be=>Mn(be.x)||0)):b,he=Fe(S)?Math.min(...e.map(be=>gr(be.x)||0))>0?0:Math.min(...e.map(be=>gr(be.x)||0)):S,Oe=br().domain([he,de]).range([J,0]).nice(),Ne=Un().domain(U.map((be,je)=>`${je}`)).range([0,ne?Math.max(ee,ne*U.length):Y?Math.min(ee,Y*U.length):ee]).paddingInner(n),Te=Oe.ticks($);return v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${l}px`,height:`${s}px`,viewBox:`0 0 ${l} ${s}`,direction:"ltr",children:[E?v.jsx("defs",{children:v.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:v.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,v.jsxs("g",{transform:`translate(${R.left},${R.top})`,children:[v.jsx(Nr,{y1:Oe(he<0?0:he),y2:Oe(he<0?0:he),x1:0-i,x2:ee+R.right,label:_t(he<0?0:he,_,k),labelPos:{x:0-i,y:de<0?0:Oe(he<0?0:he),dx:0,dy:de<0?"1em":-5},classNames:{axis:(_e=W==null?void 0:W.xAxis)==null?void 0:_e.axis,label:(xe=W==null?void 0:W.yAxis)==null?void 0:xe.labels},styles:{axis:(we=z==null?void 0:z.xAxis)==null?void 0:we.axis,label:(ge=z==null?void 0:z.yAxis)==null?void 0:ge.labels}}),a?v.jsx(v1,{values:Te.filter(be=>be!==0),y:Te.filter(be=>be!==0).map(be=>Oe(be)),x1:0-i,x2:ee+R.right,styles:{gridLines:(ve=z==null?void 0:z.yAxis)==null?void 0:ve.gridLines,labels:(le=z==null?void 0:z.yAxis)==null?void 0:le.labels},classNames:{gridLines:(ue=W==null?void 0:W.yAxis)==null?void 0:ue.gridLines,labels:(Ce=W==null?void 0:W.yAxis)==null?void 0:Ce.labels},suffix:k,prefix:_,labelType:"secondary",showGridLines:!0,labelPos:"vertical"}):null,v.jsx(nn,{x:0-i-15,y:J/2,style:(pe=z==null?void 0:z.yAxis)==null?void 0:pe.title,className:(ye=W==null?void 0:W.yAxis)==null?void 0:ye.title,text:j,rotate90:!0}),v.jsx(mo,{children:H[A].values.map((be,je)=>{var $e,ut;return v.jsxs(ur.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",children:[m?v.jsx(ur.text,{style:{textAnchor:"middle",...(($e=z==null?void 0:z.xAxis)==null?void 0:$e.labels)||{}},y:J+5,dy:"1em",animate:{attrX:Ne(`${je}`)+Ne.bandwidth()/2},transition:{duration:.5},className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(ut=W==null?void 0:W.xAxis)==null?void 0:ut.labels),children:`${be.label}`.length<o?be.label:`${`${be.label}`.substring(0,o)}...`}):null,v.jsx(ur.line,{style:{strokeWidth:N,...(z==null?void 0:z.dataConnectors)||{},opacity:D?.3:1},className:Be("stroke-primary-gray-600 dark:stroke-primary-gray-300",W==null?void 0:W.dataConnectors),markerEnd:E&&be.x.indexOf(gr(be.x))===0?"url(#arrow)":"",markerStart:E&&be.x.indexOf(gr(be.x))===be.x.length-1?"url(#arrow)":"",animate:{x1:Ne(`${je}`)+Ne.bandwidth()/2,y1:Oe(gr(be.x))-d,x2:Ne(`${je}`)+Ne.bandwidth()/2,y2:Oe(Mn(be.x))+d},transition:{duration:.5}}),be.x.map((Ie,Ze)=>v.jsxs("g",{opacity:D?r[Ze]===D?1:.3:1,onMouseEnter:Ke=>{re({...be,xIndex:Ze}),ce(Ke.clientY),X(Ke.clientX),y&&y({...be,xIndex:Ze})},onClick:()=>{(w||B)&&(Sr(te,{...be,xIndex:Ze})&&K?(F(void 0),w==null||w(void 0)):(F({...be,xIndex:Ze}),w&&w({...be,xIndex:Ze})))},onMouseMove:Ke=>{re({...be,xIndex:Ze}),ce(Ke.clientY),X(Ke.clientX)},onMouseLeave:()=>{re(void 0),X(void 0),ce(void 0),y&&y(void 0)},children:[v.jsx(ur.circle,{r:d,style:{fill:r[Ze],fillOpacity:.85,stroke:r[Ze],strokeWidth:1},animate:{cx:Ne(`${je}`)+Ne.bandwidth()/2,cy:Oe(Ie||0),opacity:Fe(Ie)?0:1},transition:{duration:.5}}),C?v.jsx(ur.text,{style:{fill:V||r[Ze],textAnchor:"start",...(z==null?void 0:z.graphObjectValues)||{}},className:Be("graph-value text-sm font-bold",W==null?void 0:W.graphObjectValues),dx:d+3,dy:"0.33em",animate:{attrX:Ne(`${je}`)+Ne.bandwidth()/2,attrY:Oe(Ie||0),opacity:Fe(Ie)?0:1},transition:{duration:.5},children:_t(Ie,_,k)}):null]},Ze))]},be.label)})}),G?v.jsx(v.Fragment,{children:G.map((be,je)=>v.jsx(h1,{text:be.text,color:be.color,y:Oe(be.value),x1:0-i,x2:ee+R.right,classNames:be.classNames,styles:be.styles},je))}):null]})]}),Z&&g&&q&&ie?v.jsx(yr,{data:Z,body:g,xPos:q,yPos:ie,backgroundStyle:z==null?void 0:z.tooltip,className:W==null?void 0:W.tooltip}):null,B?v.jsx(Tr,{open:te!==void 0,onClose:()=>{F(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(B,te)}})}):null]})}function mve(t){const{data:e,graphTitle:r,colors:n=Qe.light.categoricalColors.colors,sources:a,graphDescription:i,barPadding:o=.25,showTicks:l=!0,leftMargin:s=20,rightMargin:f=20,topMargin:c=20,bottomMargin:h=25,truncateBy:d=999,height:m,width:g,footNote:y,colorDomain:b,colorLegendTitle:S,padding:w,backgroundColor:C=!1,radius:k=3,tooltip:_,showLabels:D=!0,relativeHeight:T,onSeriesMouseOver:A,graphID:M,suffix:E="",prefix:N="",maxPositionValue:Y,minPositionValue:ne,onSeriesMouseClick:K,graphDownload:B=!1,dataDownload:j=!1,showValues:$=!0,sortParameter:V,arrowConnector:z=!1,connectorStrokeWidth:W=2,language:G="en",minHeight:ae=0,theme:U="light",showOnlyActiveDate:H=!1,autoPlay:R=!1,dateFormat:ee="yyyy",maxBarThickness:J,minBarThickness:Z,ariaLabel:re,resetSelectionOnDoubleClick:te=!0,detailsOnClick:F,axisTitle:q,noOfTicks:X=5,valueColor:ie,styles:ce,classNames:de,refValues:he}=t,[Oe,Ne]=I.useState(0),[Te,_e]=I.useState(0),[xe,we]=I.useState(void 0),ge=I.useRef(null),ve=I.useRef(null);I.useEffect(()=>{const je=new ResizeObserver($e=>{Ne(g||$e[0].target.clientWidth||620),_e(m||$e[0].target.clientHeight||480)});return ge.current&&(_e(ge.current.clientHeight||480),Ne(ge.current.clientWidth||620),g||je.observe(ge.current)),()=>je.disconnect()},[g,m]);const[le,ue]=I.useState(R),Ce=qi(Bt(e,je=>je.date).map(je=>bt(`${je.date}`,ee,new Date).getTime()),(je,$e)=>Ka(je,$e)),[pe,ye]=I.useState(R?0:Ce.length-1),be={};return Ce.forEach((je,$e)=>{be[`${je}`]={style:{color:$e===pe?"#232E3D":"#A9B1B7",fontWeight:$e===pe?"bold":"normal",display:$e===pe||!H?"inline":"none"},label:Sa(new Date(je),ee)}}),I.useEffect(()=>{const je=setInterval(()=>{ye($e=>$e<Ce.length-1?$e+1:0)},2e3);return le||clearInterval(je),()=>clearInterval(je)},[Ce,le]),v.jsx("div",{className:`${U||"light"} flex ${g?"w-fit grow-0":"w-full grow"}`,dir:G==="he"||G==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${C?C===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${G||"en"}`,de==null?void 0:de.graphContainer),style:{...(ce==null?void 0:ce.graphContainer)||{},...C&&C!==!0?{backgroundColor:C}:{}},id:M,ref:ve,"aria-label":re||`${r?`The graph shows ${r}. `:""}This is a dumbbell chart that shows comparisons between two or more data points across categories. ${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:C?w||"1rem":w||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||B||j?v.jsx(Zt,{styles:{title:ce==null?void 0:ce.title,description:ce==null?void 0:ce.description},classNames:{title:de==null?void 0:de.title,description:de==null?void 0:de.description},graphTitle:r,graphDescription:i,width:g,graphDownload:B?ve.current:void 0,dataDownload:j?e.map(je=>je.data).filter(je=>je!==void 0).length>0?e.map(je=>je.data).filter(je=>je!==void 0):e.filter(je=>je!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{ue(!le)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":le?"Click to pause animation":"Click to play animation",children:le?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:Ce[0],max:Ce[Ce.length-1],marks:be,step:null,defaultValue:Ce[Ce.length-1],value:Ce[pe],onChangeComplete:je=>{ye(Ce.indexOf(je))},onChange:je=>{ye(Ce.indexOf(je))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[v.jsx(Cn,{width:g,colorDomain:b,colors:n,colorLegendTitle:S,setSelectedColor:we,showNAColor:!1}),v.jsx("div",{className:"flex grow w-full justify-center leading-0",ref:ge,"aria-label":"Graph area",children:(g||Oe)&&(m||Te)?v.jsx(pve,{data:e,dotColors:n,width:g||Oe,height:Math.max(ae,m||(T?ae?(g||Oe)*T>ae?(g||Oe)*T:ae:(g||Oe)*T:Te)),radius:k,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:D,showValues:$,tooltip:_,suffix:E,prefix:N,onSeriesMouseOver:A,maxPositionValue:Y,minPositionValue:ne,onSeriesMouseClick:K,selectedColor:xe,dateFormat:ee,indx:pe,sortParameter:V,arrowConnector:z,connectorStrokeWidth:W,maxBarThickness:J,minBarThickness:Z,resetSelectionOnDoubleClick:te,detailsOnClick:F,axisTitle:q,noOfTicks:X,valueColor:ie,styles:ce,classNames:de,refValues:he}):null})]}),a||y?v.jsx(tr,{styles:{footnote:ce==null?void 0:ce.footnote,source:ce==null?void 0:ce.source},classNames:{footnote:de==null?void 0:de.footnote,source:de==null?void 0:de.source},sources:a,footNote:y,width:g}):null]})})})})}function mq(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,height:m,width:g,footNote:y,colorDomain:b,colorLegendTitle:S,padding:w,backgroundColor:C,radius:k,tooltip:_,showLabels:D,relativeHeight:T,onSeriesMouseOver:A,graphID:M,suffix:E,prefix:N,maxPositionValue:Y,minPositionValue:ne,onSeriesMouseClick:K,graphDownload:B,dataDownload:j,showValues:$,sortParameter:V,arrowConnector:z,connectorStrokeWidth:W,language:G,minHeight:ae,theme:U,showOnlyActiveDate:H,autoPlay:R,dateFormat:ee,maxBarThickness:J,minBarThickness:Z,ariaLabel:re,resetSelectionOnDoubleClick:te,detailsOnClick:F,axisTitle:q,noOfTicks:X,valueColor:ie,orientation:ce="vertical",refValues:de,styles:he,classNames:Oe}=t;return ce==="vertical"?v.jsx(mve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,height:m,width:g,footNote:y,colorDomain:b,colorLegendTitle:S,padding:w,backgroundColor:C,radius:k,tooltip:_,showLabels:D,relativeHeight:T,onSeriesMouseOver:A,graphID:M,suffix:E,prefix:N,maxPositionValue:Y,minPositionValue:ne,onSeriesMouseClick:K,graphDownload:B,dataDownload:j,showValues:$,sortParameter:V,arrowConnector:z,connectorStrokeWidth:W,language:G,minHeight:ae,theme:U,showOnlyActiveDate:H,autoPlay:R,dateFormat:ee,maxBarThickness:J,minBarThickness:Z,ariaLabel:re,resetSelectionOnDoubleClick:te,styles:he,detailsOnClick:F,axisTitle:q,noOfTicks:X,refValues:de,valueColor:ie,classNames:Oe}):v.jsx(hve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,height:m,width:g,footNote:y,colorDomain:b,colorLegendTitle:S,padding:w,backgroundColor:C,radius:k,tooltip:_,showLabels:D,relativeHeight:T,onSeriesMouseOver:A,graphID:M,suffix:E,prefix:N,maxPositionValue:Y,minPositionValue:ne,onSeriesMouseClick:K,graphDownload:B,dataDownload:j,showValues:$,sortParameter:V,arrowConnector:z,connectorStrokeWidth:W,language:G,minHeight:ae,theme:U,showOnlyActiveDate:H,autoPlay:R,dateFormat:ee,maxBarThickness:J,minBarThickness:Z,ariaLabel:re,resetSelectionOnDoubleClick:te,styles:he,detailsOnClick:F,axisTitle:q,noOfTicks:X,refValues:de,valueColor:ie,classNames:Oe})}function gve(t){var _e,xe,we,ge,ve,le,ue,Ce;const{data:e,barColor:r,suffix:n,prefix:a,barPadding:i,showValues:o,showTicks:l,leftMargin:s,truncateBy:f,width:c,height:h,colorDomain:d,rightMargin:m,topMargin:g,bottomMargin:y,showLabels:b,tooltip:S,onSeriesMouseOver:w,refValues:C,selectedColor:k,highlightedDataPoints:_,maxValue:D,minValue:T,onSeriesMouseClick:A,dateFormat:M,indx:E,autoSort:N,rtl:Y,maxBarThickness:ne,minBarThickness:K,resetSelectionOnDoubleClick:B,detailsOnClick:j,barAxisTitle:$,valueColor:V,noOfTicks:z,styles:W,classNames:G}=t,[ae,U]=I.useState(void 0),[H,R]=I.useState(void 0),[ee,J]=I.useState(void 0),[Z,re]=I.useState(void 0),te={top:$?g+25:g,bottom:y,left:s,right:m},F=c-te.left-te.right,q=h-te.top-te.bottom,X=Ut(e.map(pe=>({...pe,date:bt(`${pe.date}`,M,new Date)})),"date"),ie=Bt(X,pe=>pe.label).map(pe=>pe.label),ce=Array.from(Hi(sq(e,M||"yyyy"),pe=>pe.date),([pe,ye])=>({date:pe,values:N?a7(ye,[be=>be.size===void 0,"size"],["asc","desc"]).map((be,je)=>({...be,id:`${je}`})):ie.map(be=>ye.find(je=>je.label===be)).map((be,je)=>({...be,id:`${je}`}))})),de=Fe(D)?Math.max(...e.filter(pe=>!Fe(pe.size)).map(pe=>pe.size))<0?0:Math.max(...e.filter(pe=>!Fe(pe.size)).map(pe=>pe.size)):D,he=Fe(T)?Math.min(...e.filter(pe=>!Fe(pe.size)).map(pe=>pe.size))>=0?0:Math.min(...e.filter(pe=>!Fe(pe.size)).map(pe=>pe.size)):T,Oe=br().domain([he,de]).range([0,F]).nice(),Ne=Un().domain(ie.map((pe,ye)=>`${ye}`)).range([0,K?Math.max(q,K*ie.length):ne?Math.min(q,ne*ie.length):q]).paddingInner(i),Te=Oe.ticks(z);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${c}px`,height:`${h}px`,viewBox:`0 0 ${c} ${h}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${te.left},${te.top})`,children:[l?v.jsx(La,{values:Te.filter(pe=>pe!==0),x:Te.filter(pe=>pe!==0).map(pe=>Oe(pe)),y1:0-g,y2:q+te.bottom,styles:{gridLines:(_e=W==null?void 0:W.xAxis)==null?void 0:_e.gridLines,labels:(xe=W==null?void 0:W.xAxis)==null?void 0:xe.labels},classNames:{gridLines:(we=G==null?void 0:G.xAxis)==null?void 0:we.gridLines,labels:(ge=G==null?void 0:G.xAxis)==null?void 0:ge.labels},suffix:n,prefix:a,labelType:"secondary",showGridLines:!0}):null,v.jsx(nn,{x:F/2,y:0-te.top+15,style:(ve=W==null?void 0:W.xAxis)==null?void 0:ve.title,className:(le=G==null?void 0:G.xAxis)==null?void 0:le.title,text:$}),v.jsx(mo,{children:ce[E].values.map(pe=>{var ye,be;return v.jsxs(ur.g,{transition:{duration:.5},className:"undp-viz-g-with-hover",opacity:k?pe.color&&r[d.indexOf(pe.color)]===k?1:.3:_.length!==0?_.indexOf(pe.label)!==-1?.85:.3:.85,onMouseEnter:je=>{U(pe),J(je.clientY),R(je.clientX),w&&w(pe)},onClick:()=>{(A||j)&&(Sr(Z,pe)&&B?(re(void 0),A==null||A(void 0)):(re(pe),A==null||A(pe)))},onMouseMove:je=>{U(pe),J(je.clientY),R(je.clientX)},onMouseLeave:()=>{U(void 0),R(void 0),J(void 0),w&&w(void 0)},children:[v.jsx(ur.rect,{style:{fill:e.filter(je=>je.color).length===0?r[0]:pe.color?r[d.indexOf(pe.color)]:Qe.gray},height:Ne.bandwidth(),animate:{width:pe.size?pe.size>=0?Oe(pe.size)-Oe(0):Oe(0)-Oe(pe.size):0,attrX:pe.size?pe.size>=0?Oe(0):Oe(pe.size):0,attrY:Ne(pe.id),fill:e.filter(je=>je.color).length===0?r[0]:pe.color?r[d.indexOf(pe.color)]:Qe.gray},transition:{duration:.5}}),b?v.jsx(ur.text,{style:{textAnchor:pe.size&&pe.size<0?"start":"end",...((ye=W==null?void 0:W.yAxis)==null?void 0:ye.labels)||{}},className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(be=G==null?void 0:G.yAxis)==null?void 0:be.labels),x:0,y:0,dx:pe.size&&pe.size<0?10:-10,dy:"0.33em",animate:{attrX:Oe(he<0?0:he),attrY:Ne(pe.id)+Ne.bandwidth()/2},transition:{duration:.5},children:`${pe.label}`.length<f?`${pe.label}`:`${`${pe.label}`.substring(0,f)}...`}):null,o?v.jsx(ur.text,{y:0,style:{...V?{fill:V}:r.length>1?{}:{fill:r[0]},textAnchor:pe.size&&pe.size<0?"end":"start",...(W==null?void 0:W.graphObjectValues)||{}},className:Be("graph-value text-sm",!V&&r.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",G==null?void 0:G.graphObjectValues),dx:pe.size&&pe.size<0?-5:5,animate:{attrX:pe.size?Oe(pe.size):Oe(0),attrY:Ne(pe.id)+Ne.bandwidth()/2},dy:"0.33em",transition:{duration:.5},children:_t(pe.size,a,n)}):null]},pe.label)})}),v.jsx(Nr,{x1:Oe(he<0?0:he),x2:Oe(he<0?0:he),y1:-2.5,y2:q+te.bottom,classNames:{axis:(ue=G==null?void 0:G.yAxis)==null?void 0:ue.axis},styles:{axis:(Ce=W==null?void 0:W.yAxis)==null?void 0:Ce.axis}}),C?v.jsx(v.Fragment,{children:C.map((pe,ye)=>v.jsx(ti,{text:pe.text,color:pe.color,x:Oe(pe.value),y1:0-te.top,y2:q+te.bottom,textSide:Oe(pe.value)>F*.75||Y?"left":"right",classNames:pe.classNames,styles:pe.styles},ye))}):null]})}),ae&&S&&H&&ee?v.jsx(yr,{data:ae,body:S,xPos:H,yPos:ee,backgroundStyle:W==null?void 0:W.tooltip,className:G==null?void 0:G.tooltip}):null,j?v.jsx(Tr,{open:Z!==void 0,onClose:()=>{re(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(j,Z)}})}):null]})}function yve(t){const{data:e,graphTitle:r,colors:n,suffix:a="",sources:i,prefix:o="",graphDescription:l,barPadding:s=.25,showValues:f=!0,showTicks:c=!0,leftMargin:h=100,rightMargin:d=40,truncateBy:m=999,height:g,width:y,footNote:b,colorDomain:S,colorLegendTitle:w,highlightedDataPoints:C=[],padding:k,backgroundColor:_=!1,topMargin:D=25,bottomMargin:T=10,showLabels:A=!0,relativeHeight:M,tooltip:E,onSeriesMouseOver:N,refValues:Y,showColorScale:ne=!0,graphID:K,maxValue:B,minValue:j,onSeriesMouseClick:$,graphDownload:V=!1,dataDownload:z=!1,dateFormat:W="yyyy",showOnlyActiveDate:G=!1,autoPlay:ae=!1,autoSort:U=!0,language:H="en",showNAColor:R=!0,minHeight:ee=0,theme:J="light",maxBarThickness:Z,minBarThickness:re,ariaLabel:te,resetSelectionOnDoubleClick:F=!0,detailsOnClick:q,barAxisTitle:X,noOfTicks:ie=5,valueColor:ce,styles:de,classNames:he}=t,[Oe,Ne]=I.useState(0),[Te,_e]=I.useState(0),[xe,we]=I.useState(void 0),[ge,ve]=I.useState(ae),le=I.useRef(null),ue=I.useRef(null);I.useEffect(()=>{const je=new ResizeObserver($e=>{Ne(y||$e[0].target.clientWidth||620),_e(g||$e[0].target.clientHeight||480)});return le.current&&(_e(le.current.clientHeight||480),Ne(le.current.clientWidth||620),y||je.observe(le.current)),()=>je.disconnect()},[y,g]);const Ce=qi(Bt(e,je=>je.date).map(je=>bt(`${je.date}`,W,new Date).getTime()),(je,$e)=>Ka(je,$e)),[pe,ye]=I.useState(ae?0:Ce.length-1),be={};return Ce.forEach((je,$e)=>{be[`${je}`]={style:{color:$e===pe?"#232E3D":"#A9B1B7",fontWeight:$e===pe?"bold":"normal",display:$e===pe||!G?"inline":"none"},label:Sa(new Date(je),W)}}),I.useEffect(()=>{const je=setInterval(()=>{ye($e=>$e<Ce.length-1?$e+1:0)},2e3);return ge||clearInterval(je),()=>clearInterval(je)},[Ce,ge]),v.jsx("div",{className:`${J||"light"} flex ${y?"w-fit grow-0":"w-full grow"}`,dir:H==="he"||H==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${_?_===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${H||"en"}`,he==null?void 0:he.graphContainer),style:{...(de==null?void 0:de.graphContainer)||{},..._&&_!==!0?{backgroundColor:_}:{}},id:K,ref:ue,"aria-label":te||`${r?`The graph shows ${r}. `:""}This is an animated bar chart showing data changes over time. ${l?` ${l}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:_?k||"1rem":k||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||l||V||z?v.jsx(Zt,{styles:{title:de==null?void 0:de.title,description:de==null?void 0:de.description},classNames:{title:he==null?void 0:he.title,description:he==null?void 0:he.description},graphTitle:r,graphDescription:l,width:y,graphDownload:V?ue.current:void 0,dataDownload:z?e.map(je=>je.data).filter(je=>je!==void 0).length>0?e.map(je=>je.data).filter(je=>je!==void 0):e.filter(je=>je!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{ve(!ge)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":ge?"Click to pause animation":"Click to play animation",children:ge?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:Ce[0],max:Ce[Ce.length-1],marks:be,step:null,defaultValue:Ce[Ce.length-1],value:Ce[pe],onChangeComplete:je=>{ye(Ce.indexOf(je))},onChange:je=>{ye(Ce.indexOf(je))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[ne&&e.filter(je=>je.color).length!==0?v.jsx(Cn,{width:y,colorLegendTitle:w,colors:n||Qe[J].categoricalColors.colors,colorDomain:S||Bt(e.filter(je=>je.color),"color").map(je=>je.color),setSelectedColor:we,showNAColor:R}):null,v.jsx("div",{className:"flex grow flex-col justify-center w-full leading-0",ref:le,"aria-label":"Graph area",children:(y||Oe)&&(g||Te)?v.jsx(gve,{data:e,barColor:e.filter(je=>je.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[J].categoricalColors.colors,colorDomain:e.filter(je=>je.color).length===0?[]:S||Bt(e.filter(je=>je.color),"color").map(je=>je.color),width:y||Oe,selectedColor:xe,height:Math.max(ee,g||(M?ee?(y||Oe)*M>ee?(y||Oe)*M:ee:(y||Oe)*M:Te)),suffix:a,prefix:o,barPadding:s,showValues:f,showTicks:c,leftMargin:h,rightMargin:d,topMargin:D,bottomMargin:T,truncateBy:m,showLabels:A,tooltip:E,onSeriesMouseOver:N,refValues:Y,maxValue:B,minValue:j,highlightedDataPoints:C,onSeriesMouseClick:$,dateFormat:W,indx:pe,autoSort:U,rtl:H==="he"||H==="ar",maxBarThickness:Z,minBarThickness:re,resetSelectionOnDoubleClick:F,detailsOnClick:q,barAxisTitle:X,noOfTicks:ie,valueColor:ce,styles:de,classNames:he}):null})]}),i||b?v.jsx(tr,{styles:{footnote:de==null?void 0:de.footnote,source:de==null?void 0:de.source},classNames:{footnote:he==null?void 0:he.footnote,source:he==null?void 0:he.source},sources:i,footNote:b,width:y}):null]})})})})}function vve(t){var Oe,Ne,Te,_e,xe,we,ge,ve;const{data:e,barColors:r,barPadding:n,showTicks:a,leftMargin:i,truncateBy:o,width:l,height:s,suffix:f,prefix:c,showValues:h,rightMargin:d,topMargin:m,bottomMargin:g,showLabels:y,tooltip:b,onSeriesMouseOver:S,refValues:w,maxValue:C,minValue:k,onSeriesMouseClick:_,selectedColor:D,dateFormat:T,indx:A,rtl:M,maxBarThickness:E,resetSelectionOnDoubleClick:N,detailsOnClick:Y,barAxisTitle:ne,valueColor:K,noOfTicks:B,styles:j,classNames:$}=t,V=Ut(e.map(le=>({...le,date:bt(`${le.date}`,T,new Date)})),"date"),z=Bt(V,le=>le.label).map(le=>le.label),W=Array.from(Hi(Vf(e,T||"yyyy"),le=>le.date),([le,ue])=>({date:le,values:z.map(Ce=>ue.find(pe=>pe.label===Ce)).map((Ce,pe)=>({...Ce,id:`${pe}`}))})),G={top:ne?m+25:m,bottom:g,left:i,right:d},[ae,U]=I.useState(void 0),[H,R]=I.useState(void 0),[ee,J]=I.useState(void 0),[Z,re]=I.useState(void 0),te=l-G.left-G.right,F=s-G.top-G.bottom,q=Fe(C)?Math.max(...e.map(le=>Mn(le.size.filter(ue=>!Fe(ue)))||0))<0?0:Math.max(...e.map(le=>Mn(le.size.filter(ue=>!Fe(ue)))||0)):C,X=Fe(k)?Math.min(...e.map(le=>gr(le.size.filter(ue=>!Fe(ue)))||0))>=0?0:Math.min(...e.map(le=>gr(le.size.filter(ue=>!Fe(ue)))||0)):k,ie=br().domain([X,q]).range([0,te]).nice(),ce=Un().domain(z.map((le,ue)=>`${ue}`)).range([0,E?Math.min(te,E*z.length):F]).paddingInner(n),de=Un().domain(e[0].size.map((le,ue)=>`${ue}`)).range([0,ce.bandwidth()]).paddingInner(.1),he=ie.ticks(B);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${l}px`,height:`${s}px`,viewBox:`0 0 ${l} ${s}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${G.left},${G.top})`,children:[a?v.jsx(La,{values:he.filter(le=>le!==0),x:he.filter(le=>le!==0).map(le=>ie(le)),y1:0-m,y2:F+G.bottom,styles:{gridLines:(Oe=j==null?void 0:j.xAxis)==null?void 0:Oe.gridLines,labels:(Ne=j==null?void 0:j.xAxis)==null?void 0:Ne.labels},classNames:{gridLines:(Te=$==null?void 0:$.xAxis)==null?void 0:Te.gridLines,labels:(_e=$==null?void 0:$.xAxis)==null?void 0:_e.labels},suffix:f,prefix:c,labelType:"secondary",showGridLines:!0}):null,v.jsx(nn,{x:te/2,y:0-G.top+15,style:(xe=j==null?void 0:j.xAxis)==null?void 0:xe.title,className:(we=$==null?void 0:$.xAxis)==null?void 0:we.title,text:ne}),v.jsx(mo,{children:W[A].values.map((le,ue)=>{var Ce,pe;return v.jsxs(ur.g,{transform:`translate(0,${ce(`${ue}`)})`,children:[le.size.map((ye,be)=>v.jsxs(ur.g,{className:"undp-viz-g-with-hover",opacity:D?r[be]===D?1:.3:.85,onMouseEnter:je=>{U({...le,sizeIndex:be}),re(je.clientY),J(je.clientX),S&&S({...le,sizeIndex:be})},onMouseMove:je=>{U({...le,sizeIndex:be}),re(je.clientY),J(je.clientX)},onMouseLeave:()=>{U(void 0),J(void 0),re(void 0),S&&S(void 0)},onClick:()=>{(_||Y)&&(Sr(H,{...le,sizeIndex:be})&&N?(R(void 0),_&&_(void 0)):(R({...le,sizeIndex:be}),_&&_({...le,sizeIndex:be})))},children:[v.jsx(ur.rect,{y:de(`${be}`),style:{fill:r[be]},height:de.bandwidth(),animate:{width:Fe(ye)?0:ye>=0?ie(ye)-ie(0):ie(0)-ie(ye),attrX:ye>=0?ie(0):ie(ye)},transition:{duration:.5}},be),h?v.jsx(ur.text,{y:de(`${be}`)+de.bandwidth()/2,style:{fill:K||r[be],textAnchor:ye&&ye<0?"end":"start",...(j==null?void 0:j.graphObjectValues)||{}},className:Be("graph-value text-sm",$==null?void 0:$.graphObjectValues),dx:ye&&ye<0?-5:5,dy:"0.33em",animate:{attrX:ie(ye||0)},transition:{duration:.5},children:_t(ye,c,f)}):null]},be)),y?v.jsx(Y2,{value:`${le.label}`.length<o?`${le.label}`:`${`${le.label}`.substring(0,o)}...`,y:0,x:0-G.left,width:ie(X<0?0:X)+G.left,height:ce.bandwidth(),style:(Ce=j==null?void 0:j.yAxis)==null?void 0:Ce.labels,className:(pe=$==null?void 0:$.yAxis)==null?void 0:pe.labels}):null]},ue)})}),v.jsx(Nr,{x1:ie(X<0?0:X),x2:ie(X<0?0:X),y1:-2.5,y2:F+G.bottom,classNames:{axis:(ge=$==null?void 0:$.yAxis)==null?void 0:ge.axis},styles:{axis:(ve=j==null?void 0:j.yAxis)==null?void 0:ve.axis}}),w?v.jsx(v.Fragment,{children:w.map((le,ue)=>v.jsx(ti,{text:le.text,color:le.color,x:ie(le.value),y1:0-G.top,y2:F+G.bottom,textSide:ie(le.value)>te*.75||M?"left":"right",classNames:le.classNames,styles:le.styles},ue))}):null]})}),ae&&b&&ee&&Z?v.jsx(yr,{data:ae,body:b,xPos:ee,yPos:Z,backgroundStyle:j==null?void 0:j.tooltip,className:$==null?void 0:$.tooltip}):null,Y?v.jsx(Tr,{open:H!==void 0,onClose:()=>{R(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(Y,H)}})}):null]})}function bve(t){const{data:e,graphTitle:r,colors:n=Qe.light.categoricalColors.colors,sources:a,graphDescription:i,barPadding:o=.25,showTicks:l=!0,truncateBy:s=999,height:f,width:c,footNote:h,colorDomain:d,colorLegendTitle:m,suffix:g="",prefix:y="",showValues:b=!0,padding:S,backgroundColor:w=!1,leftMargin:C=100,rightMargin:k=40,topMargin:_=25,showLabels:D=!0,bottomMargin:T=10,relativeHeight:A,tooltip:M,onSeriesMouseOver:E,refValues:N,graphID:Y,maxValue:ne,minValue:K,onSeriesMouseClick:B,graphDownload:j=!1,dataDownload:$=!1,dateFormat:V="yyyy",showOnlyActiveDate:z=!1,autoPlay:W=!1,language:G="en",minHeight:ae=0,theme:U="light",maxBarThickness:H,ariaLabel:R,resetSelectionOnDoubleClick:ee=!0,detailsOnClick:J,barAxisTitle:Z,noOfTicks:re=5,valueColor:te,styles:F,classNames:q}=t,[X,ie]=I.useState(0),[ce,de]=I.useState(0),[he,Oe]=I.useState(void 0),Ne=I.useRef(null),Te=I.useRef(null);I.useEffect(()=>{const ue=new ResizeObserver(Ce=>{ie(c||Ce[0].target.clientWidth||620),de(f||Ce[0].target.clientHeight||480)});return Ne.current&&(de(Ne.current.clientHeight||480),ie(Ne.current.clientWidth||620),c||ue.observe(Ne.current)),()=>ue.disconnect()},[c,f]);const[_e,xe]=I.useState(W),we=qi(Bt(e,ue=>ue.date).map(ue=>bt(`${ue.date}`,V,new Date).getTime()),(ue,Ce)=>Ka(ue,Ce)),[ge,ve]=I.useState(W?0:we.length-1),le={};return we.forEach((ue,Ce)=>{le[`${ue}`]={style:{color:Ce===ge?"#232E3D":"#A9B1B7",fontWeight:Ce===ge?"bold":"normal",display:Ce===ge||!z?"inline":"none"},label:Sa(new Date(ue),V)}}),I.useEffect(()=>{const ue=setInterval(()=>{ve(Ce=>Ce<we.length-1?Ce+1:0)},2e3);return _e||clearInterval(ue),()=>clearInterval(ue)},[we,_e]),v.jsx("div",{className:`${U||"light"} flex ${c?"w-fit grow-0":"w-full grow"}`,dir:G==="he"||G==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${w?w===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${G||"en"}`,q==null?void 0:q.graphContainer),style:{...(F==null?void 0:F.graphContainer)||{},...w&&w!==!0?{backgroundColor:w}:{}},id:Y,ref:Te,"aria-label":R||`${r?`The graph shows ${r}. `:""}This is an animated grouped bar chart showing data changes over time. ${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:w?S||"1rem":S||0},children:v.jsxs("div",{className:"flex flex-col gap-4 w-full grow justify-between",children:[r||i||j||$?v.jsx(Zt,{styles:{title:F==null?void 0:F.title,description:F==null?void 0:F.description},classNames:{title:q==null?void 0:q.title,description:q==null?void 0:q.description},graphTitle:r,graphDescription:i,width:c,graphDownload:j?Te.current:void 0,dataDownload:$?e.map(ue=>ue.data).filter(ue=>ue!==void 0).length>0?e.map(ue=>ue.data).filter(ue=>ue!==void 0):e.filter(ue=>ue!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{xe(!_e)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":_e?"Click to pause animation":"Click to play animation",children:_e?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:we[0],max:we[we.length-1],marks:le,step:null,defaultValue:we[we.length-1],value:we[ge],onChangeComplete:ue=>{ve(we.indexOf(ue))},onChange:ue=>{ve(we.indexOf(ue))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[v.jsx(Cn,{width:c,colorDomain:d,colors:n,colorLegendTitle:m,setSelectedColor:Oe,showNAColor:!1}),v.jsx("div",{className:"w-full grow leading-0",ref:Ne,"aria-label":"Graph area",children:(c||X)&&(f||ce)?v.jsx(vve,{data:e,barColors:n,width:c||X,height:Math.max(ae,f||(A?ae?(c||X)*A>ae?(c||X)*A:ae:(c||X)*A:ce)),suffix:g,prefix:y,showValues:b,barPadding:o,showTicks:l,leftMargin:C,rightMargin:k,topMargin:_,bottomMargin:T,truncateBy:s,showLabels:D,tooltip:M,onSeriesMouseOver:E,refValues:N,maxValue:ne,minValue:K,onSeriesMouseClick:B,selectedColor:he,dateFormat:V,indx:ge,rtl:G==="he"||G==="ar",maxBarThickness:H,resetSelectionOnDoubleClick:ee,detailsOnClick:J,barAxisTitle:Z,noOfTicks:re,valueColor:te,styles:F,classNames:q}):null})]}),a||h?v.jsx(tr,{styles:{footnote:F==null?void 0:F.footnote,source:F==null?void 0:F.source},classNames:{footnote:q==null?void 0:q.footnote,source:q==null?void 0:q.source},sources:a,footNote:h,width:c}):null]})})})})}function xve(t){var Oe,Ne,Te,_e,xe,we,ge,ve;const{data:e,barColors:r,barPadding:n,showTicks:a,leftMargin:i,rightMargin:o,truncateBy:l,width:s,height:f,topMargin:c,bottomMargin:h,tooltip:d,onSeriesMouseOver:m,showLabels:g,suffix:y,prefix:b,showValues:S,refValues:w,maxValue:C,onSeriesMouseClick:k,selectedColor:_,dateFormat:D,indx:T,autoSort:A,rtl:M,sortParameter:E,maxBarThickness:N,minBarThickness:Y,resetSelectionOnDoubleClick:ne,detailsOnClick:K,barAxisTitle:B,valueColor:j,noOfTicks:$,styles:V,classNames:z}=t,[W,G]=I.useState(void 0),ae=Ut(e.map(le=>({...le,date:bt(`${le.date}`,D,new Date)})),"date"),U=Bt(ae,le=>le.label).map(le=>le.label),H=Array.from(Hi(Vf(e,D||"yyyy"),le=>le.date),([le,ue])=>({date:le,values:E!==void 0||A?E==="total"||E===void 0?Ut(e,Ce=>fr(Ce.size.filter(pe=>!Fe(pe)))).reverse().map((Ce,pe)=>({...Ce,id:`${pe}`})):Ut(e,Ce=>Fe(Ce.size[E])?-1/0:Ce.size[E]).reverse().map((Ce,pe)=>({...Ce,id:`${pe}`})):U.map(Ce=>ue.find(pe=>pe.label===Ce)).map((Ce,pe)=>({...Ce,id:`${pe}`}))})),R={top:B?c+25:c,bottom:h,left:i,right:o},[ee,J]=I.useState(void 0),[Z,re]=I.useState(void 0),[te,F]=I.useState(void 0),q=s-R.left-R.right,X=f-R.top-R.bottom,ie=Fe(C)?Math.max(...e.map(le=>fr(le.size.filter(ue=>!Fe(ue)))||0)):C,ce=br().domain([0,ie]).range([0,q]).nice(),de=Un().domain(U.map((le,ue)=>`${ue}`)).range([0,Y?Math.max(X,Y*U.length):N?Math.min(X,N*U.length):X]).paddingInner(n),he=ce.ticks($);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${s}px`,height:`${f}px`,viewBox:`0 0 ${s} ${f}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${R.left},${R.top})`,children:[a?v.jsx(La,{values:he.filter(le=>le!==0),x:he.filter(le=>le!==0).map(le=>ce(le)),y1:0-c,y2:X+R.bottom,styles:{gridLines:(Oe=V==null?void 0:V.xAxis)==null?void 0:Oe.gridLines,labels:(Ne=V==null?void 0:V.xAxis)==null?void 0:Ne.labels},classNames:{gridLines:(Te=z==null?void 0:z.xAxis)==null?void 0:Te.gridLines,labels:(_e=z==null?void 0:z.xAxis)==null?void 0:_e.labels},suffix:y,prefix:b,labelType:"secondary",showGridLines:!0}):null,v.jsx(nn,{x:q/2,y:0-R.top+15,style:(xe=V==null?void 0:V.xAxis)==null?void 0:xe.title,className:(we=z==null?void 0:z.xAxis)==null?void 0:we.title,text:B}),v.jsx(mo,{children:H[T].values.map(le=>v.jsxs("g",{className:"undp-viz-low-opacity undp-viz-g-with-hover",children:[le.size.map((ue,Ce)=>{var pe,ye;return v.jsxs(ur.g,{opacity:_?r[Ce]===_?1:.3:1,onMouseEnter:be=>{J({...le,sizeIndex:Ce}),F(be.clientY),re(be.clientX),m&&m({...le,sizeIndex:Ce})},onMouseMove:be=>{J({...le,sizeIndex:Ce}),F(be.clientY),re(be.clientX)},onMouseLeave:()=>{J(void 0),re(void 0),F(void 0),m&&m(void 0)},onClick:()=>{(k||K)&&(Sr(W,{...le,sizeIndex:Ce})&&ne?(G(void 0),k&&k(void 0)):(G({...le,sizeIndex:Ce}),k&&k({...le,sizeIndex:Ce})))},children:[v.jsx(ur.rect,{style:{fill:r[Ce]},height:de.bandwidth(),animate:{width:ce(ue||0),attrX:ce(Ce===0?0:fr(le.size.filter((be,je)=>je<Ce&&be))),attrY:de(le.id)},transition:{duration:.5}},Ce),g?v.jsx(ur.text,{style:{textAnchor:"end",...((pe=V==null?void 0:V.yAxis)==null?void 0:pe.labels)||{}},className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(ye=z==null?void 0:z.yAxis)==null?void 0:ye.labels),dx:-10,dy:"0.33em",animate:{attrX:ce(0),attrY:(de(le.id)||0)+de.bandwidth()/2},transition:{duration:.5},children:`${le.label}`.length<l?`${le.label}`:`${`${le.label}`.substring(0,l)}...`}):null,S?v.jsx(ur.text,{style:{fill:Bi(r[Ce]),textAnchor:"middle",...(V==null?void 0:V.graphObjectValues)||{}},className:Be("graph-value text-sm",z==null?void 0:z.graphObjectValues),dy:"0.33em",animate:{attrX:ce(Ce===0?0:fr(le.size.filter((be,je)=>je<Ce&&be)))+ce(ue||0)/2,attrY:(de(le.id)||0)+de.bandwidth()/2,opacity:ue&&ce(ue)/_t(ue,b,y).length>12?1:0},transition:{duration:.5},children:_t(ue,b,y)}):null]},Ce)}),S?v.jsx(ur.text,{style:{...j&&{fill:j},textAnchor:"start",...(V==null?void 0:V.graphObjectValues)||{}},className:Be("graph-value graph-value-total text-sm",j?"":" fill-primary-gray-700 dark:fill-primary-gray-300",z==null?void 0:z.graphObjectValues),dx:5,dy:"0.33em",animate:{attrX:ce(fr(le.size.map(ue=>ue||0))),attrY:(de(le.id)||0)+de.bandwidth()/2},transition:{duration:.5},children:_t(fr(le.size.filter(ue=>ue)),b,y)}):null]},le.label))}),v.jsx(Nr,{x1:ce(0),x2:ce(0),y1:-2.5,y2:X+R.bottom,classNames:{axis:(ge=z==null?void 0:z.yAxis)==null?void 0:ge.axis},styles:{axis:(ve=V==null?void 0:V.yAxis)==null?void 0:ve.axis}}),w?v.jsx(v.Fragment,{children:w.map((le,ue)=>v.jsx(ti,{text:le.text,color:le.color,x:ce(le.value),y1:0-R.top,y2:X+R.bottom,textSide:ce(le.value)>q*.75||M?"left":"right",classNames:le.classNames,styles:le.styles},ue))}):null]})}),ee&&d&&Z&&te?v.jsx(yr,{data:ee,body:d,xPos:Z,yPos:te,backgroundStyle:V==null?void 0:V.tooltip,className:z==null?void 0:z.tooltip}):null,K?v.jsx(Tr,{open:W!==void 0,onClose:()=>{G(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(K,W)}})}):null]})}function wve(t){const{data:e,graphTitle:r,colors:n=Qe.light.categoricalColors.colors,sources:a,graphDescription:i,barPadding:o=.25,showTicks:l=!0,leftMargin:s=100,rightMargin:f=40,truncateBy:c=999,height:h,width:d,footNote:m,colorDomain:g,colorLegendTitle:y,padding:b,backgroundColor:S=!1,topMargin:w=25,bottomMargin:C=10,tooltip:k,onSeriesMouseOver:_,suffix:D="",prefix:T="",showLabels:A=!0,relativeHeight:M,showValues:E,refValues:N,graphID:Y,maxValue:ne,onSeriesMouseClick:K,graphDownload:B=!1,dataDownload:j=!1,dateFormat:$="yyyy",showOnlyActiveDate:V=!1,autoPlay:z=!1,autoSort:W=!0,language:G="en",minHeight:ae=0,theme:U="light",sortParameter:H,maxBarThickness:R,minBarThickness:ee,ariaLabel:J,resetSelectionOnDoubleClick:Z=!0,detailsOnClick:re,barAxisTitle:te,noOfTicks:F=5,valueColor:q,styles:X,classNames:ie}=t,[ce,de]=I.useState(0),[he,Oe]=I.useState(0),[Ne,Te]=I.useState(void 0),_e=I.useRef(null),xe=I.useRef(null);I.useEffect(()=>{const pe=new ResizeObserver(ye=>{de(d||ye[0].target.clientWidth||620),Oe(h||ye[0].target.clientHeight||480)});return _e.current&&(Oe(_e.current.clientHeight||480),de(_e.current.clientWidth||620),d||pe.observe(_e.current)),()=>pe.disconnect()},[d,h]);const[we,ge]=I.useState(z),ve=qi(Bt(e,pe=>pe.date).map(pe=>bt(`${pe.date}`,$,new Date).getTime()),(pe,ye)=>Ka(pe,ye)),[le,ue]=I.useState(z?0:ve.length-1),Ce={};return ve.forEach((pe,ye)=>{Ce[`${pe}`]={style:{color:ye===le?"#232E3D":"#A9B1B7",fontWeight:ye===le?"bold":"normal",display:ye===le||!V?"inline":"none"},label:Sa(new Date(pe),$)}}),I.useEffect(()=>{const pe=setInterval(()=>{ue(ye=>ye<ve.length-1?ye+1:0)},2e3);return we||clearInterval(pe),()=>clearInterval(pe)},[ve,we]),v.jsx("div",{className:`${U||"light"} flex ${d?"w-fit grow-0":"w-full grow"}`,dir:G==="he"||G==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${S?S===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${G||"en"}`,ie==null?void 0:ie.graphContainer),style:{...(X==null?void 0:X.graphContainer)||{},...S&&S!==!0?{backgroundColor:S}:{}},id:Y,ref:xe,"aria-label":J||`${r?`The graph shows ${r}. `:""}This is an animated stacked bar chart showing data changes over time. ${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:S?b||"1rem":b||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||B||j?v.jsx(Zt,{styles:{title:X==null?void 0:X.title,description:X==null?void 0:X.description},classNames:{title:ie==null?void 0:ie.title,description:ie==null?void 0:ie.description},graphTitle:r,graphDescription:i,width:d,graphDownload:B?xe.current:void 0,dataDownload:j?e.map(pe=>pe.data).filter(pe=>pe!==void 0).length>0?e.map(pe=>pe.data).filter(pe=>pe!==void 0):e.filter(pe=>pe!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{ge(!we)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":we?"Click to pause animation":"Click to play animation",children:we?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:ve[0],max:ve[ve.length-1],marks:Ce,step:null,defaultValue:ve[ve.length-1],value:ve[le],onChangeComplete:pe=>{ue(ve.indexOf(pe))},onChange:pe=>{ue(ve.indexOf(pe))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[v.jsx(Cn,{width:d,colorDomain:g,colors:n,colorLegendTitle:y,setSelectedColor:Te,showNAColor:!1}),v.jsx("div",{className:"w-full grow leading-0",ref:_e,"aria-label":"Graph area",children:(d||ce)&&(h||he)?v.jsx(xve,{data:e,barColors:n,width:d||ce,height:Math.max(ae,h||(M?ae?(d||ce)*M>ae?(d||ce)*M:ae:(d||ce)*M:he)),barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:w,bottomMargin:C,truncateBy:c,showLabels:A,tooltip:k,onSeriesMouseOver:_,showValues:E,suffix:D,prefix:T,refValues:N,maxValue:ne,onSeriesMouseClick:K,selectedColor:Ne,dateFormat:$,indx:le,sortParameter:H,autoSort:W,rtl:G==="he"||G==="ar",maxBarThickness:R,minBarThickness:ee,resetSelectionOnDoubleClick:Z,detailsOnClick:re,barAxisTitle:te,noOfTicks:F,valueColor:q,styles:X,classNames:ie}):null})]}),a||m?v.jsx(tr,{styles:{footnote:X==null?void 0:X.footnote,source:X==null?void 0:X.source},classNames:{footnote:ie==null?void 0:ie.footnote,source:ie==null?void 0:ie.source},sources:a,footNote:m,width:d}):null]})})})})}function Sve(t){var Te,_e,xe,we,ge,ve,le,ue,Ce,pe;const{data:e,barColor:r,suffix:n,prefix:a,barPadding:i,showValues:o,showTicks:l,leftMargin:s,truncateBy:f,width:c,height:h,colorDomain:d,rightMargin:m,topMargin:g,bottomMargin:y,showLabels:b,tooltip:S,onSeriesMouseOver:w,refValues:C,selectedColor:k,highlightedDataPoints:_,maxValue:D,minValue:T,onSeriesMouseClick:A,dateFormat:M,indx:E,autoSort:N,maxBarThickness:Y,minBarThickness:ne,resetSelectionOnDoubleClick:K,detailsOnClick:B,barAxisTitle:j,valueColor:$,noOfTicks:V,styles:z,classNames:W}=t,[G,ae]=I.useState(void 0),[U,H]=I.useState(void 0),[R,ee]=I.useState(void 0),[J,Z]=I.useState(void 0),re={top:g,bottom:y,left:j?s+30:s,right:m},te=c-re.left-re.right,F=h-re.top-re.bottom,q=Ut(e.map(ye=>({...ye,date:bt(`${ye.date}`,M,new Date)})),"date"),X=Bt(q,ye=>ye.label).map(ye=>ye.label),ie=Array.from(Hi(sq(e,M||"yyyy"),ye=>ye.date),([ye,be])=>{const je=N?a7(be.filter($e=>!Fe($e.size)),["size"],["desc"]):X.map($e=>be.find(ut=>ut.label===$e));return be.filter($e=>$e.size===void 0).forEach($e=>{je.push($e)}),{date:ye,values:N?je.reverse().map(($e,ut)=>({...$e,id:`${ut}`})):je.map(($e,ut)=>({...$e,id:`${ut}`}))}}),ce=Fe(D)?Math.max(...e.filter(ye=>!Fe(ye.size)).map(ye=>ye.size))<0?0:Math.max(...e.filter(ye=>!Fe(ye.size)).map(ye=>ye.size)):D,de=Fe(T)?Math.min(...e.filter(ye=>!Fe(ye.size)).map(ye=>ye.size))>=0?0:Math.min(...e.filter(ye=>!Fe(ye.size)).map(ye=>ye.size)):T,he=br().domain([de,ce]).range([F,0]).nice(),Oe=Un().domain(X.map((ye,be)=>`${be}`)).range([0,ne?Math.max(te,ne*X.length):Y?Math.min(te,Y*X.length):te]).paddingInner(i),Ne=he.ticks(V);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${c}px`,height:`${h}px`,viewBox:`0 0 ${c} ${h}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${re.left},${re.top})`,children:[v.jsx(Nr,{y1:he(de<0?0:de),y2:he(de<0?0:de),x1:0-s,x2:te+re.right,label:_t(de<0?0:de,a,n),labelPos:{x:0-s,y:ce<0?-15:he(de<0?0:de),dy:ce<0?"1em":-5,dx:0},classNames:{axis:(Te=W==null?void 0:W.xAxis)==null?void 0:Te.axis,label:(_e=W==null?void 0:W.yAxis)==null?void 0:_e.labels},styles:{axis:(xe=z==null?void 0:z.xAxis)==null?void 0:xe.axis,label:(we=z==null?void 0:z.yAxis)==null?void 0:we.labels}}),l?v.jsx(v1,{values:Ne.filter(ye=>ye!==0),y:Ne.filter(ye=>ye!==0).map(ye=>he(ye)),x1:0-s,x2:te+re.right,styles:{gridLines:(ge=z==null?void 0:z.yAxis)==null?void 0:ge.gridLines,labels:(ve=z==null?void 0:z.yAxis)==null?void 0:ve.labels},classNames:{gridLines:(le=W==null?void 0:W.yAxis)==null?void 0:le.gridLines,labels:(ue=W==null?void 0:W.yAxis)==null?void 0:ue.labels},suffix:n,prefix:a,labelType:"secondary",showGridLines:!0,labelPos:"vertical"}):null,v.jsx(nn,{x:0-s-15,y:F/2,style:(Ce=z==null?void 0:z.yAxis)==null?void 0:Ce.title,className:(pe=W==null?void 0:W.yAxis)==null?void 0:pe.title,text:j,rotate90:!0}),v.jsx(mo,{children:ie[E].values.map(ye=>{var be,je;return v.jsxs(ur.g,{transition:{duration:.5},className:"undp-viz-g-with-hover",opacity:k?ye.color&&r[d.indexOf(ye.color)]===k?1:.3:_.length!==0?_.indexOf(ye.label)!==-1?.85:.3:.85,onMouseEnter:$e=>{H(ye),Z($e.clientY),ee($e.clientX),w&&w(ye)},onClick:()=>{(A||B)&&(Sr(G,ye)&&K?(ae(void 0),A==null||A(void 0)):(ae(ye),A==null||A(ye)))},onMouseMove:$e=>{H(ye),Z($e.clientY),ee($e.clientX)},onMouseLeave:()=>{H(void 0),ee(void 0),Z(void 0),w&&w(void 0)},children:[v.jsx(ur.rect,{style:{fill:e.filter($e=>$e.color).length===0?r[0]:ye.color?r[d.indexOf(ye.color)]:Qe.gray},height:ye.size?Math.abs(he(ye.size)-he(0)):0,width:Oe.bandwidth(),animate:{height:ye.size?Math.abs(he(ye.size)-he(0)):0,attrY:ye.size&&ye.size>0?he(ye.size):he(0),attrX:Oe(`${ye.id}`),fill:e.filter($e=>$e.color).length===0?r[0]:ye.color?r[d.indexOf(ye.color)]:Qe.gray},transition:{duration:.5}}),b?v.jsx(ur.text,{style:{textAnchor:"middle",...((be=z==null?void 0:z.xAxis)==null?void 0:be.labels)||{}},dy:ye.size?ye.size>=0?"1em":"-5px":"1em",animate:{attrX:Oe(`${ye.id}`)+Oe.bandwidth()/2,attrY:ye.size?ye.size>=0?he(0)+4:he(0):he(0)+4},transition:{duration:.5},className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(je=W==null?void 0:W.xAxis)==null?void 0:je.labels),children:`${ye.label}`.length<f?`${ye.label}`:`${`${ye.label}`.substring(0,f)}...`}):null,o?v.jsx(ur.text,{style:{...$?{fill:$}:r.length>1?{}:{fill:r[0]},textAnchor:"middle",...(z==null?void 0:z.graphObjectValues)||{}},className:Be("graph-value text-sm",!$&&r.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",W==null?void 0:W.graphObjectValues),animate:{attrX:Oe(`${ye.id}`)+Oe.bandwidth()/2,attrY:he(ye.size||0)},dy:ye.size?ye.size>=0?"-5px":"1em":"-5px",transition:{duration:.5},children:_t(ye.size,a,n)}):null]},ye.label)})}),C?v.jsx(v.Fragment,{children:C.map((ye,be)=>v.jsx(h1,{text:ye.text,color:ye.color,y:he(ye.value),x1:0-s,x2:te+re.right,classNames:ye.classNames,styles:ye.styles},be))}):null]})}),U&&S&&R&&J?v.jsx(yr,{data:U,body:S,xPos:R,yPos:J,backgroundStyle:z==null?void 0:z.tooltip,className:W==null?void 0:W.tooltip}):null,B?v.jsx(Tr,{open:G!==void 0,onClose:()=>{ae(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(B,G)}})}):null]})}function Cve(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o=.25,showTicks:l=!0,leftMargin:s=20,rightMargin:f=20,topMargin:c=20,bottomMargin:h=25,truncateBy:d=999,showLabels:m=!0,showValues:g=!0,backgroundColor:y=!1,suffix:b="",prefix:S="",height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,highlightedDataPoints:T=[],padding:A,relativeHeight:M,tooltip:E,onSeriesMouseOver:N,refValues:Y,showColorScale:ne,graphID:K,maxValue:B,minValue:j,onSeriesMouseClick:$,dateFormat:V="yyyy",showOnlyActiveDate:z=!1,autoPlay:W=!1,autoSort:G=!0,graphDownload:ae=!1,dataDownload:U=!1,language:H="en",theme:R="light",showNAColor:ee=!0,minHeight:J=0,maxBarThickness:Z,minBarThickness:re,ariaLabel:te,resetSelectionOnDoubleClick:F=!0,detailsOnClick:q,barAxisTitle:X,noOfTicks:ie=5,valueColor:ce,styles:de,classNames:he}=t,[Oe,Ne]=I.useState(0),[Te,_e]=I.useState(0),[xe,we]=I.useState(void 0),[ge,ve]=I.useState(W),le=I.useRef(null),ue=I.useRef(null);I.useEffect(()=>{const je=new ResizeObserver($e=>{Ne(C||$e[0].target.clientWidth||620),_e(w||$e[0].target.clientHeight||480)});return le.current&&(_e(le.current.clientHeight||480),Ne(le.current.clientWidth||620),C||je.observe(le.current)),()=>je.disconnect()},[C,w]);const Ce=qi(Bt(e,je=>je.date).map(je=>bt(`${je.date}`,V,new Date).getTime()),(je,$e)=>Ka(je,$e)),[pe,ye]=I.useState(W?0:Ce.length-1),be={};return Ce.forEach((je,$e)=>{be[`${je}`]={style:{color:$e===pe?"#232E3D":"#A9B1B7",fontWeight:$e===pe?"bold":"normal",display:$e===pe||!z?"inline":"none"},label:Sa(new Date(je),V)}}),I.useEffect(()=>{const je=setInterval(()=>{ye($e=>$e<Ce.length-1?$e+1:0)},2e3);return ge||clearInterval(je),()=>clearInterval(je)},[Ce,ge]),v.jsx("div",{className:`${R||"light"} flex ${C?"w-fit grow-0":"w-full grow"}`,dir:H==="he"||H==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${y?y===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${H||"en"}`,he==null?void 0:he.graphContainer),style:{...(de==null?void 0:de.graphContainer)||{},...y&&y!==!0?{backgroundColor:y}:{}},id:K,ref:ue,"aria-label":te||`${r?`The graph shows ${r}. `:""}This is an animated bar chart showing data changes over time. ${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:y?A||"1rem":A||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||ae||U?v.jsx(Zt,{styles:{title:de==null?void 0:de.title,description:de==null?void 0:de.description},classNames:{title:he==null?void 0:he.title,description:he==null?void 0:he.description},graphTitle:r,graphDescription:i,width:C,graphDownload:ae?ue.current:void 0,dataDownload:U?e.map(je=>je.data).filter(je=>je!==void 0).length>0?e.map(je=>je.data).filter(je=>je!==void 0):e.filter(je=>je!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{ve(!ge)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":ge?"Click to pause animation":"Click to play animation",children:ge?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:Ce[0],max:Ce[Ce.length-1],marks:be,step:null,defaultValue:Ce[Ce.length-1],value:Ce[pe],onChangeComplete:je=>{ye(Ce.indexOf(je))},onChange:je=>{ye(Ce.indexOf(je))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[ne!==!1&&e.filter(je=>je.color).length!==0?v.jsx(Cn,{width:C,colorLegendTitle:D,colors:n||Qe[R].categoricalColors.colors,colorDomain:_||Bt(e.filter(je=>je.color),"color").map(je=>je.color),setSelectedColor:we,showNAColor:ee}):null,v.jsx("div",{className:"flex grow flex-col justify-center w-full leading-0",ref:le,"aria-label":"Graph area",children:(C||Oe)&&(w||Te)?v.jsx(Sve,{data:e,barColor:e.filter(je=>je.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[R].categoricalColors.colors,colorDomain:e.filter(je=>je.color).length===0?[]:_||Bt(e.filter(je=>je.color),"color").map(je=>je.color),width:C||Oe,selectedColor:xe,height:Math.max(J,w||(M?J?(C||Oe)*M>J?(C||Oe)*M:J:(C||Oe)*M:Te)),suffix:b,prefix:S,barPadding:o,showValues:g,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:m,tooltip:E,onSeriesMouseOver:N,refValues:Y,maxValue:B,minValue:j,highlightedDataPoints:T,onSeriesMouseClick:$,dateFormat:V,indx:pe,autoSort:G,maxBarThickness:Z,minBarThickness:re,resetSelectionOnDoubleClick:F,detailsOnClick:q,barAxisTitle:X,noOfTicks:ie,valueColor:ce,styles:de,classNames:he}):null})]}),a||k?v.jsx(tr,{styles:{footnote:de==null?void 0:de.footnote,source:de==null?void 0:de.source},classNames:{footnote:he==null?void 0:he.footnote,source:he==null?void 0:he.source},sources:a,footNote:k,width:C}):null]})})})})}function kve(t){var he,Oe,Ne,Te,_e,xe,we,ge,ve,le;const{data:e,width:r,height:n,barColors:a,suffix:i,prefix:o,barPadding:l,showLabels:s,showValues:f,showTicks:c,truncateBy:h,leftMargin:d,rightMargin:m,topMargin:g,bottomMargin:y,tooltip:b,onSeriesMouseOver:S,refValues:w,maxValue:C,minValue:k,onSeriesMouseClick:_,selectedColor:D,dateFormat:T,indx:A,maxBarThickness:M,resetSelectionOnDoubleClick:E,detailsOnClick:N,barAxisTitle:Y,valueColor:ne,noOfTicks:K,styles:B,classNames:j}=t,$=Ut(e.map(ue=>({...ue,date:bt(`${ue.date}`,T,new Date)})),"date"),V=Bt($,ue=>ue.label).map(ue=>ue.label),z=Array.from(Hi(Vf(e,T||"yyyy"),ue=>ue.date),([ue,Ce])=>({date:ue,values:V.map(pe=>Ce.find(ye=>ye.label===pe)).map((pe,ye)=>({...pe,id:`${ye}`}))})),W={top:g,bottom:y,left:Y?d+30:d,right:m},[G,ae]=I.useState(void 0),[U,H]=I.useState(void 0),[R,ee]=I.useState(void 0),[J,Z]=I.useState(void 0),re=r-W.left-W.right,te=n-W.top-W.bottom,F=Fe(C)?Math.max(...e.map(ue=>Mn(ue.size.filter(Ce=>!Fe(Ce)))||0))<0?0:Math.max(...e.map(ue=>Mn(ue.size.filter(Ce=>!Fe(Ce)))||0)):C,q=Fe(k)?Math.min(...e.map(ue=>gr(ue.size.filter(Ce=>!Fe(Ce)))||0))>=0?0:Math.min(...e.map(ue=>gr(ue.size.filter(Ce=>!Fe(Ce)))||0)):k,X=br().domain([q,F]).range([te,0]).nice(),ie=Un().domain(V.map((ue,Ce)=>`${Ce}`)).range([0,M?Math.min(re,M*V.length):re]).paddingInner(l),ce=Un().domain(e[0].size.map((ue,Ce)=>`${Ce}`)).range([0,ie.bandwidth()]).paddingInner(.1),de=X.ticks(K);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${W.left},${W.top})`,children:[v.jsx(Nr,{y1:X(q<0?0:q),y2:X(q<0?0:q),x1:0-d,x2:re+W.right,label:_t(q<0?0:q,o,i),labelPos:{x:0-d,dx:0,dy:F<0?"1em":-5,y:X(q<0?0:q)},classNames:{axis:(he=j==null?void 0:j.xAxis)==null?void 0:he.axis,label:(Oe=j==null?void 0:j.yAxis)==null?void 0:Oe.labels},styles:{axis:(Ne=B==null?void 0:B.xAxis)==null?void 0:Ne.axis,label:(Te=B==null?void 0:B.yAxis)==null?void 0:Te.labels}}),c?v.jsx(v1,{values:de.filter(ue=>ue!==0),y:de.filter(ue=>ue!==0).map(ue=>X(ue)),x1:0-d,x2:re+W.right,styles:{gridLines:(_e=B==null?void 0:B.yAxis)==null?void 0:_e.gridLines,labels:(xe=B==null?void 0:B.yAxis)==null?void 0:xe.labels},classNames:{gridLines:(we=j==null?void 0:j.yAxis)==null?void 0:we.gridLines,labels:(ge=j==null?void 0:j.yAxis)==null?void 0:ge.labels},suffix:i,prefix:o,labelType:"secondary",showGridLines:!0,labelPos:"vertical"}):null,v.jsx(nn,{x:0-d-15,y:te/2,style:(ve=B==null?void 0:B.yAxis)==null?void 0:ve.title,className:(le=j==null?void 0:j.yAxis)==null?void 0:le.title,text:Y,rotate90:!0}),v.jsx(mo,{children:z[A].values.map((ue,Ce)=>{var pe,ye;return v.jsxs(ur.g,{transform:`translate(${ie(`${ue.id}`)},0)`,children:[ue.size.map((be,je)=>v.jsxs(ur.g,{className:"undp-viz-g-with-hover",opacity:D?a[je]===D?1:.3:.85,onMouseEnter:$e=>{ae({...ue,sizeIndex:je}),Z($e.clientY),ee($e.clientX),S&&S({...ue,sizeIndex:je})},onMouseMove:$e=>{ae({...ue,sizeIndex:je}),Z($e.clientY),ee($e.clientX)},onMouseLeave:()=>{ae(void 0),ee(void 0),Z(void 0),S&&S(void 0)},onClick:()=>{(_||N)&&(Sr(U,{...ue,sizeIndex:je})&&E?(H(void 0),_&&_(void 0)):(H({...ue,sizeIndex:je}),_&&_({...ue,sizeIndex:je})))},children:[v.jsx(ur.rect,{x:ce(`${je}`),width:ce.bandwidth(),style:{fill:a[je]},animate:{height:Fe(be)?0:Math.abs(X(be)-X(0)),attrY:Fe(be)?X(0):be>0?X(be):X(0)},transition:{duration:.5}}),f?v.jsx(ur.text,{x:ce(`${je}`)+ce.bandwidth()/2,style:{fill:ne||a[je],textAnchor:"middle",...(B==null?void 0:B.graphObjectValues)||{}},className:Be("graph-value text-sm",j==null?void 0:j.graphObjectValues),dy:be?be>=0?"-5px":"1em":"-5px",animate:{attrY:X(be||0)},transition:{duration:.5},children:_t(be,o,i)}):null]},je)),s?v.jsx(f4,{value:`${ue.label}`.length<h?`${ue.label}`:`${`${ue.label}`.substring(0,h)}...`,y:X(0)+5,x:0,width:ie.bandwidth(),height:W.bottom,style:(pe=B==null?void 0:B.xAxis)==null?void 0:pe.labels,className:(ye=j==null?void 0:j.xAxis)==null?void 0:ye.labels,alignment:"top"}):null]},Ce)})}),w?v.jsx(v.Fragment,{children:w.map((ue,Ce)=>v.jsx(h1,{text:ue.text,color:ue.color,y:X(ue.value),x1:0-d,x2:re+W.right,classNames:ue.classNames,styles:ue.styles},Ce))}):null]})}),G&&b&&R&&J?v.jsx(yr,{data:G,body:b,xPos:R,yPos:J,backgroundStyle:B==null?void 0:B.tooltip,className:j==null?void 0:j.tooltip}):null,N?v.jsx(Tr,{open:U!==void 0,onClose:()=>{H(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(N,U)}})}):null]})}function _ve(t){const{data:e,graphTitle:r,colors:n=Qe.light.categoricalColors.colors,sources:a,graphDescription:i,barPadding:o=.25,showTicks:l=!0,leftMargin:s=20,rightMargin:f=20,topMargin:c=20,bottomMargin:h=25,truncateBy:d=999,showLabels:m=!0,showValues:g=!0,backgroundColor:y=!1,suffix:b="",prefix:S="",height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,padding:T,relativeHeight:A,tooltip:M,onSeriesMouseOver:E,refValues:N,graphID:Y,maxValue:ne,minValue:K,onSeriesMouseClick:B,dateFormat:j="yyyy",showOnlyActiveDate:$=!1,autoPlay:V=!1,graphDownload:z=!1,dataDownload:W=!1,language:G="en",theme:ae="light",minHeight:U=0,maxBarThickness:H,ariaLabel:R,resetSelectionOnDoubleClick:ee=!0,detailsOnClick:J,barAxisTitle:Z,noOfTicks:re=5,valueColor:te,styles:F,classNames:q}=t,[X,ie]=I.useState(0),[ce,de]=I.useState(0),[he,Oe]=I.useState(void 0),Ne=I.useRef(null),Te=I.useRef(null);I.useEffect(()=>{const ue=new ResizeObserver(Ce=>{ie(C||Ce[0].target.clientWidth||620),de(w||Ce[0].target.clientHeight||480)});return Ne.current&&(de(Ne.current.clientHeight||480),ie(Ne.current.clientWidth||620),C||ue.observe(Ne.current)),()=>ue.disconnect()},[C,w]);const[_e,xe]=I.useState(V),we=qi(Bt(e,ue=>ue.date).map(ue=>bt(`${ue.date}`,j,new Date).getTime()),(ue,Ce)=>Ka(ue,Ce)),[ge,ve]=I.useState(V?0:we.length-1),le={};return we.forEach((ue,Ce)=>{le[`${ue}`]={style:{color:Ce===ge?"#232E3D":"#A9B1B7",fontWeight:Ce===ge?"bold":"normal",display:Ce===ge||!$?"inline":"none"},label:Sa(new Date(ue),j)}}),I.useEffect(()=>{const ue=setInterval(()=>{ve(Ce=>Ce<we.length-1?Ce+1:0)},2e3);return _e||clearInterval(ue),()=>clearInterval(ue)},[we,_e]),v.jsx("div",{className:`${ae||"light"} flex ${C?"w-fit grow-0":"w-full grow"}`,dir:G==="he"||G==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${y?y===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${G||"en"}`,q==null?void 0:q.graphContainer),style:{...(F==null?void 0:F.graphContainer)||{},...y&&y!==!0?{backgroundColor:y}:{}},id:Y,ref:Te,"aria-label":R||`${r?`The graph shows ${r}. `:""}This is an animated grouped bar chart showing data changes over time. ${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:y?T||"1rem":T||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||z||W?v.jsx(Zt,{styles:{title:F==null?void 0:F.title,description:F==null?void 0:F.description},classNames:{title:q==null?void 0:q.title,description:q==null?void 0:q.description},graphTitle:r,graphDescription:i,width:C,graphDownload:z?Te.current:void 0,dataDownload:W?e.map(ue=>ue.data).filter(ue=>ue!==void 0).length>0?e.map(ue=>ue.data).filter(ue=>ue!==void 0):e.filter(ue=>ue!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{xe(!_e)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":_e?"Click to pause animation":"Click to play animation",children:_e?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:we[0],max:we[we.length-1],marks:le,step:null,defaultValue:we[we.length-1],value:we[ge],onChangeComplete:ue=>{ve(we.indexOf(ue))},onChange:ue=>{ve(we.indexOf(ue))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[v.jsx(Cn,{width:C,colorDomain:_,colors:n,colorLegendTitle:D,setSelectedColor:Oe,showNAColor:!1}),v.jsx("div",{className:"w-full grow leading-0",ref:Ne,"aria-label":"Graph area",children:(C||X)&&(w||ce)?v.jsx(kve,{data:e,barColors:n,width:C||X,height:Math.max(U,w||(A?U?(C||X)*A>U?(C||X)*A:U:(C||X)*A:ce)),suffix:b,prefix:S,barPadding:o,showLabels:m,showValues:g,showTicks:l,truncateBy:d,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,tooltip:M,onSeriesMouseOver:E,refValues:N,maxValue:ne,minValue:K,onSeriesMouseClick:B,selectedColor:he,dateFormat:j,indx:ge,maxBarThickness:H,resetSelectionOnDoubleClick:ee,detailsOnClick:J,barAxisTitle:Z,noOfTicks:re,valueColor:te,styles:F,classNames:q}):null})]}),a||k?v.jsx(tr,{styles:{footnote:F==null?void 0:F.footnote,source:F==null?void 0:F.source},classNames:{footnote:q==null?void 0:q.footnote,source:q==null?void 0:q.source},sources:a,footNote:k,width:C}):null]})})})})}function Ove(t){var he,Oe,Ne,Te,_e,xe,we,ge,ve,le;const{data:e,barColors:r,barPadding:n,showTicks:a,leftMargin:i,rightMargin:o,truncateBy:l,width:s,height:f,topMargin:c,bottomMargin:h,tooltip:d,onSeriesMouseOver:m,showLabels:g,suffix:y,prefix:b,showValues:S,refValues:w,maxValue:C,onSeriesMouseClick:k,selectedColor:_,dateFormat:D,indx:T,autoSort:A,sortParameter:M,maxBarThickness:E,minBarThickness:N,resetSelectionOnDoubleClick:Y,detailsOnClick:ne,barAxisTitle:K,valueColor:B,noOfTicks:j,styles:$,classNames:V}=t,[z,W]=I.useState(void 0),G=Ut(e.map(ue=>({...ue,date:bt(`${ue.date}`,D,new Date)})),"date"),ae=Bt(G,ue=>ue.label).map(ue=>ue.label),U=Array.from(Hi(Vf(e,D||"yyyy"),ue=>ue.date),([ue,Ce])=>({date:ue,values:M!==void 0||A?M==="total"||M===void 0?Ut(e.filter(pe=>pe.date===ue),pe=>fr(pe.size.filter(ye=>!Fe(ye)))).map((pe,ye)=>({...pe,id:`${ye}`})):Ut(e.filter(pe=>pe.date===ue),pe=>Fe(pe.size[M])?-1/0:pe.size[M]).map((pe,ye)=>({...pe,id:`${ye}`})):ae.map(pe=>Ce.find(ye=>ye.label===pe)).map((pe,ye)=>({...pe,id:`${ye}`}))})),H={top:c,bottom:h,left:i,right:o},[R,ee]=I.useState(void 0),[J,Z]=I.useState(void 0),[re,te]=I.useState(void 0),F=s-H.left-H.right,q=f-H.top-H.bottom,X=Fe(C)?Math.max(...e.map(ue=>fr(ue.size.filter(Ce=>!Fe(Ce)))||0)):C,ie=br().domain([0,X]).range([q,0]).nice(),ce=Un().domain(ae.map((ue,Ce)=>`${Ce}`)).range([0,N?Math.max(F,N*ae.length):E?Math.min(F,E*ae.length):F]).paddingInner(n),de=ie.ticks(j);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${s}px`,height:`${f}px`,viewBox:`0 0 ${s} ${f}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${H.left},${H.top})`,children:[v.jsx(Nr,{y1:ie(0),y2:ie(0),x1:0-i,x2:F+H.right,label:_t(0,b,y),labelPos:{x:0-i,y:ie(0),dx:0,dy:-5},classNames:{axis:(he=V==null?void 0:V.xAxis)==null?void 0:he.axis,label:(Oe=V==null?void 0:V.yAxis)==null?void 0:Oe.labels},styles:{axis:(Ne=$==null?void 0:$.xAxis)==null?void 0:Ne.axis,label:(Te=$==null?void 0:$.yAxis)==null?void 0:Te.labels}}),a?v.jsx(v1,{values:de.filter(ue=>ue!==0),y:de.filter(ue=>ue!==0).map(ue=>ie(ue)),x1:0-i,x2:F+H.right,styles:{gridLines:(_e=$==null?void 0:$.yAxis)==null?void 0:_e.gridLines,labels:(xe=$==null?void 0:$.yAxis)==null?void 0:xe.labels},classNames:{gridLines:(we=V==null?void 0:V.yAxis)==null?void 0:we.gridLines,labels:(ge=V==null?void 0:V.yAxis)==null?void 0:ge.labels},suffix:y,prefix:b,labelType:"secondary",showGridLines:!0,labelPos:"vertical"}):null,v.jsx(nn,{x:0-i-15,y:q/2,style:(ve=$==null?void 0:$.yAxis)==null?void 0:ve.title,className:(le=V==null?void 0:V.yAxis)==null?void 0:le.title,text:K,rotate90:!0}),v.jsx(mo,{children:U[T].values.map(ue=>{var Ce,pe;return v.jsxs("g",{className:"undp-viz-low-opacity undp-viz-g-with-hover",transform:"translate(0,0)",children:[ue.size.map((ye,be)=>v.jsxs(ur.g,{opacity:_?r[be]===_?1:.3:1,onMouseEnter:je=>{ee({...ue,sizeIndex:be}),te(je.clientY),Z(je.clientX),m&&m({...ue,sizeIndex:be})},onMouseMove:je=>{ee({...ue,sizeIndex:be}),te(je.clientY),Z(je.clientX)},onMouseLeave:()=>{ee(void 0),Z(void 0),te(void 0),m&&m(void 0)},onClick:()=>{(k||ne)&&(Sr(z,{...ue,sizeIndex:be})&&Y?(W(void 0),k&&k(void 0)):(W({...ue,sizeIndex:be}),k&&k({...ue,sizeIndex:be})))},children:[v.jsx(ur.rect,{style:{fill:r[be]},width:ce.bandwidth(),animate:{height:Math.abs(ie(fr(ue.size.filter((je,$e)=>$e<=be&&je)))-ie(fr(ue.size.filter((je,$e)=>$e<be&&je)))),attrY:ie(fr(ue.size.filter((je,$e)=>$e<=be&&je))),attrX:ce(ue.id)},transition:{duration:.5}},be),S?v.jsx(ur.text,{style:{fill:Bi(r[be]),textAnchor:"middle",...($==null?void 0:$.graphObjectValues)||{}},className:Be("graph-value text-sm",V==null?void 0:V.graphObjectValues),dy:"0.33em",animate:{attrY:ie(fr(ue.size.filter((je,$e)=>$e<=be&&je)))+Math.abs(ie(fr(ue.size.filter((je,$e)=>$e<=be&&je)))-ie(fr(ue.size.filter((je,$e)=>$e<be&&je))))/2,attrX:(ce(ue.id)||0)+ce.bandwidth()/2,opacity:ye&&Math.abs(ie(fr(ue.size.filter((je,$e)=>$e<=be&&je)))-ie(fr(ue.size.filter((je,$e)=>$e<be&&je))))>20?1:0},transition:{duration:.5},children:_t(ye,b,y)}):null]},be)),g?v.jsx(ur.text,{style:{textAnchor:"middle",...((Ce=$==null?void 0:$.xAxis)==null?void 0:Ce.labels)||{}},className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(pe=V==null?void 0:V.xAxis)==null?void 0:pe.labels),dy:"1em",animate:{attrY:ie(0)+5,attrX:(ce(ue.id)||0)+ce.bandwidth()/2},transition:{duration:.5},children:`${ue.label}`.length<l?`${ue.label}`:`${`${ue.label}`.substring(0,l)}...`}):null,S?v.jsx(ur.text,{style:{...B&&{fill:B},textAnchor:"middle",...($==null?void 0:$.graphObjectValues)||{}},className:Be("graph-value graph-value-total",B?"text-sm":"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",V==null?void 0:V.graphObjectValues),dy:-10,animate:{attrY:ie(fr(ue.size.map(ye=>ye||0))),attrX:(ce(ue.id)||0)+ce.bandwidth()/2},transition:{duration:.5},children:_t(fr(ue.size.filter(ye=>ye)),b,y)}):null]},ue.label)})}),w?v.jsx(v.Fragment,{children:w.map((ue,Ce)=>v.jsx(h1,{text:ue.text,color:ue.color,y:ie(ue.value),x1:0-i,x2:F+H.right,classNames:ue.classNames,styles:ue.styles},Ce))}):null]})}),R&&d&&J&&re?v.jsx(yr,{data:R,body:d,xPos:J,yPos:re,backgroundStyle:$==null?void 0:$.tooltip,className:V==null?void 0:V.tooltip}):null,ne?v.jsx(Tr,{open:z!==void 0,onClose:()=>{W(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(ne,z)}})}):null]})}function Dve(t){const{data:e,graphTitle:r,colors:n=Qe.light.categoricalColors.colors,sources:a,graphDescription:i,barPadding:o=.25,showTicks:l=!0,leftMargin:s=20,rightMargin:f=20,topMargin:c=20,bottomMargin:h=25,truncateBy:d=999,showLabels:m=!0,showValues:g=!0,backgroundColor:y=!1,suffix:b="",prefix:S="",height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,padding:T,tooltip:A,onSeriesMouseOver:M,relativeHeight:E,refValues:N,graphID:Y,maxValue:ne,onSeriesMouseClick:K,dateFormat:B="yyyy",showOnlyActiveDate:j=!1,autoPlay:$=!1,autoSort:V=!0,graphDownload:z=!1,dataDownload:W=!1,language:G="en",theme:ae="light",minHeight:U=0,sortParameter:H,maxBarThickness:R,minBarThickness:ee,ariaLabel:J,resetSelectionOnDoubleClick:Z=!0,detailsOnClick:re,barAxisTitle:te,noOfTicks:F=5,valueColor:q,styles:X,classNames:ie}=t,[ce,de]=I.useState(0),[he,Oe]=I.useState(0),[Ne,Te]=I.useState(void 0),_e=I.useRef(null),xe=I.useRef(null);I.useEffect(()=>{const pe=new ResizeObserver(ye=>{de(C||ye[0].target.clientWidth||620),Oe(w||ye[0].target.clientHeight||480)});return _e.current&&(Oe(_e.current.clientHeight||480),de(_e.current.clientWidth||620),C||pe.observe(_e.current)),()=>pe.disconnect()},[C,w]);const[we,ge]=I.useState($),ve=qi(Bt(e,pe=>pe.date).map(pe=>bt(`${pe.date}`,B,new Date).getTime()),(pe,ye)=>Ka(pe,ye)),[le,ue]=I.useState($?0:ve.length-1),Ce={};return ve.forEach((pe,ye)=>{Ce[`${pe}`]={style:{color:ye===le?"#232E3D":"#A9B1B7",fontWeight:ye===le?"bold":"normal",display:ye===le||!j?"inline":"none"},label:Sa(new Date(pe),B)}}),I.useEffect(()=>{const pe=setInterval(()=>{ue(ye=>ye<ve.length-1?ye+1:0)},2e3);return we||clearInterval(pe),()=>clearInterval(pe)},[ve,we]),v.jsx("div",{className:`${ae||"light"} flex ${C?"w-fit grow-0":"w-full grow"}`,dir:G==="he"||G==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${y?y===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${G||"en"}`,ie==null?void 0:ie.graphContainer),style:{...(X==null?void 0:X.graphContainer)||{},...y&&y!==!0?{backgroundColor:y}:{}},id:Y,ref:xe,"aria-label":J||`${r?`The graph shows ${r}. `:""}This is an animated stacked bar chart showing data changes over time. ${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:y?T||"1rem":T||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||z||W?v.jsx(Zt,{styles:{title:X==null?void 0:X.title,description:X==null?void 0:X.description},classNames:{title:ie==null?void 0:ie.title,description:ie==null?void 0:ie.description},graphTitle:r,graphDescription:i,width:C,graphDownload:z?xe.current:void 0,dataDownload:W?e.map(pe=>pe.data).filter(pe=>pe!==void 0).length>0?e.map(pe=>pe.data).filter(pe=>pe!==void 0):e.filter(pe=>pe!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{ge(!we)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":we?"Click to pause animation":"Click to play animation",children:we?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:ve[0],max:ve[ve.length-1],marks:Ce,step:null,defaultValue:ve[ve.length-1],value:ve[le],onChangeComplete:pe=>{ue(ve.indexOf(pe))},onChange:pe=>{ue(ve.indexOf(pe))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[v.jsx(Cn,{width:C,colorDomain:_,colors:n,colorLegendTitle:D,setSelectedColor:Te,showNAColor:!1}),v.jsx("div",{className:"w-full grow leading-0",ref:_e,"aria-label":"Graph area",children:(C||ce)&&(w||he)?v.jsx(Ove,{data:e,barColors:n,width:C||ce,height:Math.max(U,w||(E?U?(C||ce)*E>U?(C||ce)*E:U:(C||ce)*E:he)),suffix:b,prefix:S,barPadding:o,showLabels:m,showValues:g,showTicks:l,truncateBy:d,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,tooltip:A,onSeriesMouseOver:M,refValues:N,maxValue:ne,onSeriesMouseClick:K,selectedColor:Ne,dateFormat:B,indx:le,sortParameter:H,autoSort:V,maxBarThickness:R,minBarThickness:ee,resetSelectionOnDoubleClick:Z,detailsOnClick:re,barAxisTitle:te,noOfTicks:F,valueColor:q,styles:X,classNames:ie}):null})]}),a||k?v.jsx(tr,{styles:{footnote:X==null?void 0:X.footnote,source:X==null?void 0:X.source},classNames:{footnote:ie==null?void 0:ie.footnote,source:ie==null?void 0:ie.source},sources:a,footNote:k,width:C}):null]})})})})}function gq(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:m,showValues:g,backgroundColor:y,suffix:b,prefix:S,height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,highlightedDataPoints:T,padding:A,relativeHeight:M,tooltip:E,onSeriesMouseOver:N,refValues:Y,showColorScale:ne,graphID:K,maxValue:B,minValue:j,onSeriesMouseClick:$,dateFormat:V,showOnlyActiveDate:z,autoPlay:W,autoSort:G,graphDownload:ae,dataDownload:U,language:H,theme:R,showNAColor:ee,minHeight:J,maxBarThickness:Z,minBarThickness:re,ariaLabel:te,resetSelectionOnDoubleClick:F,detailsOnClick:q,barAxisTitle:X,noOfTicks:ie,valueColor:ce,orientation:de="vertical",styles:he,classNames:Oe}=t;return de==="vertical"?v.jsx(Cve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:m,showValues:g,backgroundColor:y,suffix:b,prefix:S,height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,highlightedDataPoints:T,padding:A,relativeHeight:M,tooltip:E,onSeriesMouseOver:N,refValues:Y,showColorScale:ne,graphID:K,maxValue:B,minValue:j,onSeriesMouseClick:$,dateFormat:V,showOnlyActiveDate:z,autoPlay:W,autoSort:G,graphDownload:ae,dataDownload:U,language:H,theme:R,showNAColor:ee,minHeight:J,maxBarThickness:Z,minBarThickness:re,ariaLabel:te,resetSelectionOnDoubleClick:F,styles:he,detailsOnClick:q,barAxisTitle:X,noOfTicks:ie,valueColor:ce,classNames:Oe}):v.jsx(yve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:m,showValues:g,backgroundColor:y,suffix:b,prefix:S,height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,highlightedDataPoints:T,padding:A,relativeHeight:M,tooltip:E,onSeriesMouseOver:N,refValues:Y,showColorScale:ne,graphID:K,maxValue:B,minValue:j,onSeriesMouseClick:$,dateFormat:V,showOnlyActiveDate:z,autoPlay:W,autoSort:G,graphDownload:ae,dataDownload:U,language:H,theme:R,showNAColor:ee,minHeight:J,maxBarThickness:Z,minBarThickness:re,ariaLabel:te,resetSelectionOnDoubleClick:F,styles:he,detailsOnClick:q,barAxisTitle:X,noOfTicks:ie,valueColor:ce,classNames:Oe})}function yq(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,truncateBy:s,height:f,width:c,footNote:h,colorDomain:d,colorLegendTitle:m,suffix:g,prefix:y,showValues:b,padding:S,backgroundColor:w,leftMargin:C,rightMargin:k,topMargin:_,showLabels:D,bottomMargin:T,relativeHeight:A,tooltip:M,onSeriesMouseOver:E,refValues:N,graphID:Y,maxValue:ne,minValue:K,onSeriesMouseClick:B,graphDownload:j,dataDownload:$,dateFormat:V,showOnlyActiveDate:z,autoPlay:W,language:G,minHeight:ae,theme:U,maxBarThickness:H,ariaLabel:R,resetSelectionOnDoubleClick:ee,detailsOnClick:J,barAxisTitle:Z,noOfTicks:re,valueColor:te,orientation:F="vertical",styles:q,classNames:X}=t;return F==="vertical"?v.jsx(_ve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,truncateBy:s,height:f,width:c,footNote:h,colorDomain:d,colorLegendTitle:m,suffix:g,prefix:y,showValues:b,padding:S,backgroundColor:w,leftMargin:C,rightMargin:k,topMargin:_,showLabels:D,bottomMargin:T,relativeHeight:A,tooltip:M,onSeriesMouseOver:E,refValues:N,graphID:Y,maxValue:ne,minValue:K,onSeriesMouseClick:B,graphDownload:j,dataDownload:$,dateFormat:V,showOnlyActiveDate:z,autoPlay:W,language:G,minHeight:ae,theme:U,maxBarThickness:H,ariaLabel:R,resetSelectionOnDoubleClick:ee,styles:q,detailsOnClick:J,barAxisTitle:Z,noOfTicks:re,valueColor:te,classNames:X}):v.jsx(bve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,truncateBy:s,height:f,width:c,footNote:h,colorDomain:d,colorLegendTitle:m,suffix:g,prefix:y,showValues:b,padding:S,backgroundColor:w,leftMargin:C,rightMargin:k,topMargin:_,showLabels:D,bottomMargin:T,relativeHeight:A,tooltip:M,onSeriesMouseOver:E,refValues:N,graphID:Y,maxValue:ne,minValue:K,onSeriesMouseClick:B,graphDownload:j,dataDownload:$,dateFormat:V,showOnlyActiveDate:z,autoPlay:W,language:G,minHeight:ae,theme:U,maxBarThickness:H,ariaLabel:R,resetSelectionOnDoubleClick:ee,styles:q,detailsOnClick:J,barAxisTitle:Z,noOfTicks:re,valueColor:te,classNames:X})}function vq(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:m,showValues:g,backgroundColor:y,suffix:b,prefix:S,height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,padding:T,tooltip:A,onSeriesMouseOver:M,relativeHeight:E,refValues:N,graphID:Y,maxValue:ne,onSeriesMouseClick:K,dateFormat:B,showOnlyActiveDate:j,autoPlay:$,autoSort:V,graphDownload:z,dataDownload:W,language:G,theme:ae,minHeight:U,sortParameter:H,maxBarThickness:R,minBarThickness:ee,ariaLabel:J,resetSelectionOnDoubleClick:Z,detailsOnClick:re,barAxisTitle:te,noOfTicks:F,valueColor:q,orientation:X="vertical",styles:ie,classNames:ce}=t;return X==="vertical"?v.jsx(Dve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:m,showValues:g,backgroundColor:y,suffix:b,prefix:S,height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,padding:T,tooltip:A,onSeriesMouseOver:M,relativeHeight:E,refValues:N,graphID:Y,maxValue:ne,onSeriesMouseClick:K,dateFormat:B,showOnlyActiveDate:j,autoPlay:$,autoSort:V,graphDownload:z,dataDownload:W,language:G,theme:ae,minHeight:U,sortParameter:H,maxBarThickness:R,minBarThickness:ee,ariaLabel:J,resetSelectionOnDoubleClick:Z,styles:ie,detailsOnClick:re,barAxisTitle:te,noOfTicks:F,valueColor:q,classNames:ce}):v.jsx(wve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:m,showValues:g,backgroundColor:y,suffix:b,prefix:S,height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,padding:T,tooltip:A,onSeriesMouseOver:M,relativeHeight:E,refValues:N,graphID:Y,maxValue:ne,onSeriesMouseClick:K,dateFormat:B,showOnlyActiveDate:j,autoPlay:$,autoSort:V,graphDownload:z,dataDownload:W,language:G,theme:ae,minHeight:U,sortParameter:H,maxBarThickness:R,minBarThickness:ee,ariaLabel:J,resetSelectionOnDoubleClick:Z,styles:ie,detailsOnClick:re,barAxisTitle:te,noOfTicks:F,valueColor:q,classNames:ce})}function Lr(t,e,r){return e.findIndex(n=>n.chartConfigId===t)===-1?void 0:typeof e[e.findIndex(n=>n.chartConfigId===t)].columnId=="object"?e[e.findIndex(n=>n.chartConfigId===t)].columnId.map(n=>r.findIndex(a=>a.value===n)===-1?n:r[r.findIndex(a=>a.value===n)].label):r.findIndex(n=>n.value===e[e.findIndex(a=>a.chartConfigId===t)].columnId)===-1?e[e.findIndex(n=>n.chartConfigId===t)].columnId:r[r.findIndex(n=>n.value===e[e.findIndex(a=>a.chartConfigId===t)].columnId)].label}var w5={exports:{}},Tm={},I0={},S3={},Mm={},Em={},jm={},XM;function Rc(){return XM||(XM=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(w){if(super(),!t.IDENTIFIER.test(w))throw new Error("CodeGen: name must be a valid identifier");this.str=w}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(w){super(),this._items=typeof w=="string"?[w]:w}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const w=this._items[0];return w===""||w==='""'}get str(){var w;return(w=this._str)!==null&&w!==void 0?w:this._str=this._items.reduce((C,k)=>`${C}${k}`,"")}get names(){var w;return(w=this._names)!==null&&w!==void 0?w:this._names=this._items.reduce((C,k)=>(k instanceof r&&(C[k.str]=(C[k.str]||0)+1),C),{})}}t._Code=n,t.nil=new n("");function a(S,...w){const C=[S[0]];let k=0;for(;k<w.length;)l(C,w[k]),C.push(S[++k]);return new n(C)}t._=a;const i=new n("+");function o(S,...w){const C=[m(S[0])];let k=0;for(;k<w.length;)C.push(i),l(C,w[k]),C.push(i,m(S[++k]));return s(C),new n(C)}t.str=o;function l(S,w){w instanceof n?S.push(...w._items):w instanceof r?S.push(w):S.push(h(w))}t.addCodeArg=l;function s(S){let w=1;for(;w<S.length-1;){if(S[w]===i){const C=f(S[w-1],S[w+1]);if(C!==void 0){S.splice(w-1,3,C);continue}S[w++]="+"}w++}}function f(S,w){if(w==='""')return S;if(S==='""')return w;if(typeof S=="string")return w instanceof r||S[S.length-1]!=='"'?void 0:typeof w!="string"?`${S.slice(0,-1)}${w}"`:w[0]==='"'?S.slice(0,-1)+w.slice(1):void 0;if(typeof w=="string"&&w[0]==='"'&&!(S instanceof r))return`"${S}${w.slice(1)}`}function c(S,w){return w.emptyStr()?S:S.emptyStr()?w:o`${S}${w}`}t.strConcat=c;function h(S){return typeof S=="number"||typeof S=="boolean"||S===null?S:m(Array.isArray(S)?S.join(","):S)}function d(S){return new n(m(S))}t.stringify=d;function m(S){return JSON.stringify(S).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=m;function g(S){return typeof S=="string"&&t.IDENTIFIER.test(S)?new n(`.${S}`):a`[${S}]`}t.getProperty=g;function y(S){if(typeof S=="string"&&t.IDENTIFIER.test(S))return new n(`${S}`);throw new Error(`CodeGen: invalid export name: ${S}, use explicit $id name mapping`)}t.getEsmExportName=y;function b(S){return new n(S.toString())}t.regexpCode=b}(jm)),jm}var Lm={},KM;function JM(){return KM||(KM=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=Rc();class r extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var n;(function(s){s[s.Started=0]="Started",s[s.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class a{constructor({prefixes:f,parent:c}={}){this._names={},this._prefixes=f,this._parent=c}toName(f){return f instanceof e.Name?f:this.name(f)}name(f){return new e.Name(this._newName(f))}_newName(f){const c=this._names[f]||this._nameGroup(f);return`${f}${c.index++}`}_nameGroup(f){var c,h;if(!((h=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||h===void 0)&&h.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}t.Scope=a;class i extends e.Name{constructor(f,c){super(c),this.prefix=f}setValue(f,{property:c,itemIndex:h}){this.value=f,this.scopePath=(0,e._)`.${new e.Name(c)}[${h}]`}}t.ValueScopeName=i;const o=(0,e._)`\n`;class l extends a{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?o:e.nil}}get(){return this._scope}name(f){return new i(f,this._newName(f))}value(f,c){var h;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const d=this.toName(f),{prefix:m}=d,g=(h=c.key)!==null&&h!==void 0?h:c.ref;let y=this._values[m];if(y){const w=y.get(g);if(w)return w}else y=this._values[m]=new Map;y.set(g,d);const b=this._scope[m]||(this._scope[m]=[]),S=b.length;return b[S]=c.ref,d.setValue(c,{property:m,itemIndex:S}),d}getValue(f,c){const h=this._values[f];if(h)return h.get(c)}scopeRefs(f,c=this._values){return this._reduceValues(c,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,e._)`${f}${h.scopePath}`})}scopeCode(f=this._values,c,h){return this._reduceValues(f,d=>{if(d.value===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return d.value.code},c,h)}_reduceValues(f,c,h={},d){let m=e.nil;for(const g in f){const y=f[g];if(!y)continue;const b=h[g]=h[g]||new Map;y.forEach(S=>{if(b.has(S))return;b.set(S,n.Started);let w=c(S);if(w){const C=this.opts.es5?t.varKinds.var:t.varKinds.const;m=(0,e._)`${m}${C} ${S} = ${w};${this.opts._n}`}else if(w=d==null?void 0:d(S))m=(0,e._)`${m}${w}${this.opts._n}`;else throw new r(S);b.set(S,n.Completed)})}return m}}t.ValueScope=l}(Lm)),Lm}var ZM;function Fr(){return ZM||(ZM=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=Rc(),r=JM();var n=Rc();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var a=JM();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class i{optimizeNodes(){return this}optimizeNames(H,R){return this}}class o extends i{constructor(H,R,ee){super(),this.varKind=H,this.name=R,this.rhs=ee}render({es5:H,_n:R}){const ee=H?r.varKinds.var:this.varKind,J=this.rhs===void 0?"":` = ${this.rhs}`;return`${ee} ${this.name}${J};`+R}optimizeNames(H,R){if(H[this.name.str])return this.rhs&&(this.rhs=K(this.rhs,H,R)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class l extends i{constructor(H,R,ee){super(),this.lhs=H,this.rhs=R,this.sideEffects=ee}render({_n:H}){return`${this.lhs} = ${this.rhs};`+H}optimizeNames(H,R){if(!(this.lhs instanceof e.Name&&!H[this.lhs.str]&&!this.sideEffects))return this.rhs=K(this.rhs,H,R),this}get names(){const H=this.lhs instanceof e.Name?{}:{...this.lhs.names};return ne(H,this.rhs)}}class s extends l{constructor(H,R,ee,J){super(H,ee,J),this.op=R}render({_n:H}){return`${this.lhs} ${this.op}= ${this.rhs};`+H}}class f extends i{constructor(H){super(),this.label=H,this.names={}}render({_n:H}){return`${this.label}:`+H}}class c extends i{constructor(H){super(),this.label=H,this.names={}}render({_n:H}){return`break${this.label?` ${this.label}`:""};`+H}}class h extends i{constructor(H){super(),this.error=H}render({_n:H}){return`throw ${this.error};`+H}get names(){return this.error.names}}class d extends i{constructor(H){super(),this.code=H}render({_n:H}){return`${this.code};`+H}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(H,R){return this.code=K(this.code,H,R),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class m extends i{constructor(H=[]){super(),this.nodes=H}render(H){return this.nodes.reduce((R,ee)=>R+ee.render(H),"")}optimizeNodes(){const{nodes:H}=this;let R=H.length;for(;R--;){const ee=H[R].optimizeNodes();Array.isArray(ee)?H.splice(R,1,...ee):ee?H[R]=ee:H.splice(R,1)}return H.length>0?this:void 0}optimizeNames(H,R){const{nodes:ee}=this;let J=ee.length;for(;J--;){const Z=ee[J];Z.optimizeNames(H,R)||(B(H,Z.names),ee.splice(J,1))}return ee.length>0?this:void 0}get names(){return this.nodes.reduce((H,R)=>Y(H,R.names),{})}}class g extends m{render(H){return"{"+H._n+super.render(H)+"}"+H._n}}class y extends m{}class b extends g{}b.kind="else";class S extends g{constructor(H,R){super(R),this.condition=H}render(H){let R=`if(${this.condition})`+super.render(H);return this.else&&(R+="else "+this.else.render(H)),R}optimizeNodes(){super.optimizeNodes();const H=this.condition;if(H===!0)return this.nodes;let R=this.else;if(R){const ee=R.optimizeNodes();R=this.else=Array.isArray(ee)?new b(ee):ee}if(R)return H===!1?R instanceof S?R:R.nodes:this.nodes.length?this:new S(j(H),R instanceof S?[R]:R.nodes);if(!(H===!1||!this.nodes.length))return this}optimizeNames(H,R){var ee;if(this.else=(ee=this.else)===null||ee===void 0?void 0:ee.optimizeNames(H,R),!!(super.optimizeNames(H,R)||this.else))return this.condition=K(this.condition,H,R),this}get names(){const H=super.names;return ne(H,this.condition),this.else&&Y(H,this.else.names),H}}S.kind="if";class w extends g{}w.kind="for";class C extends w{constructor(H){super(),this.iteration=H}render(H){return`for(${this.iteration})`+super.render(H)}optimizeNames(H,R){if(super.optimizeNames(H,R))return this.iteration=K(this.iteration,H,R),this}get names(){return Y(super.names,this.iteration.names)}}class k extends w{constructor(H,R,ee,J){super(),this.varKind=H,this.name=R,this.from=ee,this.to=J}render(H){const R=H.es5?r.varKinds.var:this.varKind,{name:ee,from:J,to:Z}=this;return`for(${R} ${ee}=${J}; ${ee}<${Z}; ${ee}++)`+super.render(H)}get names(){const H=ne(super.names,this.from);return ne(H,this.to)}}class _ extends w{constructor(H,R,ee,J){super(),this.loop=H,this.varKind=R,this.name=ee,this.iterable=J}render(H){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(H)}optimizeNames(H,R){if(super.optimizeNames(H,R))return this.iterable=K(this.iterable,H,R),this}get names(){return Y(super.names,this.iterable.names)}}class D extends g{constructor(H,R,ee){super(),this.name=H,this.args=R,this.async=ee}render(H){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(H)}}D.kind="func";class T extends m{render(H){return"return "+super.render(H)}}T.kind="return";class A extends g{render(H){let R="try"+super.render(H);return this.catch&&(R+=this.catch.render(H)),this.finally&&(R+=this.finally.render(H)),R}optimizeNodes(){var H,R;return super.optimizeNodes(),(H=this.catch)===null||H===void 0||H.optimizeNodes(),(R=this.finally)===null||R===void 0||R.optimizeNodes(),this}optimizeNames(H,R){var ee,J;return super.optimizeNames(H,R),(ee=this.catch)===null||ee===void 0||ee.optimizeNames(H,R),(J=this.finally)===null||J===void 0||J.optimizeNames(H,R),this}get names(){const H=super.names;return this.catch&&Y(H,this.catch.names),this.finally&&Y(H,this.finally.names),H}}class M extends g{constructor(H){super(),this.error=H}render(H){return`catch(${this.error})`+super.render(H)}}M.kind="catch";class E extends g{render(H){return"finally"+super.render(H)}}E.kind="finally";class N{constructor(H,R={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...R,_n:R.lines?`
278
+ `},Pme={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:r}=t;return r?"Draggable item "+e.id+" was moved over droppable area "+r.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:r}=t;return r?"Draggable item "+e.id+" was dropped over droppable area "+r.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function Rme(t){let{announcements:e=Pme,container:r,hiddenTextDescribedById:n,screenReaderInstructions:a=Ime}=t;const{announce:i,announcement:o}=jme(),l=sw("DndLiveRegion"),[s,f]=I.useState(!1);if(I.useEffect(()=>{f(!0)},[]),Lme(I.useMemo(()=>({onDragStart(h){let{active:d}=h;i(e.onDragStart({active:d}))},onDragMove(h){let{active:d,over:m}=h;e.onDragMove&&i(e.onDragMove({active:d,over:m}))},onDragOver(h){let{active:d,over:m}=h;i(e.onDragOver({active:d,over:m}))},onDragEnd(h){let{active:d,over:m}=h;i(e.onDragEnd({active:d,over:m}))},onDragCancel(h){let{active:d,over:m}=h;i(e.onDragCancel({active:d,over:m}))}}),[i,e])),!s)return null;const c=I.createElement(I.Fragment,null,I.createElement(Mme,{id:n,value:a.draggable}),I.createElement(Eme,{id:l,announcement:o}));return r?a0.createPortal(c,r):c}var $1;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})($1||($1={}));function Nc(){}function $me(t,e){return I.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function Bme(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return I.useMemo(()=>[...e].filter(n=>n!=null),[...e])}const Ro=Object.freeze({x:0,y:0});function Vme(t,e){let{data:{value:r}}=t,{data:{value:n}}=e;return n-r}function Fme(t,e){if(!t||t.length===0)return null;const[r]=t;return r[e]}function zme(t,e){const r=Math.max(e.top,t.top),n=Math.max(e.left,t.left),a=Math.min(e.left+e.width,t.left+t.width),i=Math.min(e.top+e.height,t.top+t.height),o=a-n,l=i-r;if(n<a&&r<i){const s=e.width*e.height,f=t.width*t.height,c=o*l,h=c/(s+f-c);return Number(h.toFixed(4))}return 0}const Hme=t=>{let{collisionRect:e,droppableRects:r,droppableContainers:n}=t;const a=[];for(const i of n){const{id:o}=i,l=r.get(o);if(l){const s=zme(l,e);s>0&&a.push({id:o,data:{droppableContainer:i,value:s}})}}return a.sort(Vme)};function qme(t,e,r){return{...t,scaleX:e&&r?e.width/r.width:1,scaleY:e&&r?e.height/r.height:1}}function DH(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:Ro}function Wme(t){return function(r){for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];return a.reduce((o,l)=>({...o,top:o.top+t*l.y,bottom:o.bottom+t*l.y,left:o.left+t*l.x,right:o.right+t*l.x}),{...r})}}const Ume=Wme(1);function Gme(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function Yme(t,e,r){const n=Gme(e);if(!n)return t;const{scaleX:a,scaleY:i,x:o,y:l}=n,s=t.left-o-(1-a)*parseFloat(r),f=t.top-l-(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),c=a?t.width/a:t.width,h=i?t.height/i:t.height;return{width:c,height:h,top:f,right:s+c,bottom:f+h,left:s}}const Xme={ignoreTransform:!1};function c9(t,e){e===void 0&&(e=Xme);let r=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:f,transformOrigin:c}=xi(t).getComputedStyle(t);f&&(r=Yme(r,f,c))}const{top:n,left:a,width:i,height:o,bottom:l,right:s}=r;return{top:n,left:a,width:i,height:o,bottom:l,right:s}}function TM(t){return c9(t,{ignoreTransform:!0})}function Kme(t){const e=t.innerWidth,r=t.innerHeight;return{top:0,left:0,right:e,bottom:r,width:e,height:r}}function Jme(t,e){return e===void 0&&(e=xi(t).getComputedStyle(t)),e.position==="fixed"}function Zme(t,e){e===void 0&&(e=xi(t).getComputedStyle(t));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(a=>{const i=e[a];return typeof i=="string"?r.test(i):!1})}function uw(t,e){const r=[];function n(a){if(e!=null&&r.length>=e||!a)return r;if(iw(a)&&a.scrollingElement!=null&&!r.includes(a.scrollingElement))return r.push(a.scrollingElement),r;if(!s9(a)||CH(a)||r.includes(a))return r;const i=xi(t).getComputedStyle(a);return a!==t&&Zme(a,i)&&r.push(a),Jme(a,i)?r:n(a.parentNode)}return t?n(t):r}function AH(t){const[e]=uw(t,1);return e??null}function xm(t){return!Bf||!t?null:v7(t)?t:aw(t)?iw(t)||t===b7(t).scrollingElement?window:s9(t)?t:null:null}function TH(t){return v7(t)?t.scrollX:t.scrollLeft}function MH(t){return v7(t)?t.scrollY:t.scrollTop}function Zy(t){return{x:TH(t),y:MH(t)}}var l1;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(l1||(l1={}));function EH(t){return!Bf||!t?!1:t===document.scrollingElement}function jH(t){const e={x:0,y:0},r=EH(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},n={x:t.scrollWidth-r.width,y:t.scrollHeight-r.height},a=t.scrollTop<=e.y,i=t.scrollLeft<=e.x,o=t.scrollTop>=n.y,l=t.scrollLeft>=n.x;return{isTop:a,isLeft:i,isBottom:o,isRight:l,maxScroll:n,minScroll:e}}const Qme={x:.2,y:.2};function ege(t,e,r,n,a){let{top:i,left:o,right:l,bottom:s}=r;n===void 0&&(n=10),a===void 0&&(a=Qme);const{isTop:f,isBottom:c,isLeft:h,isRight:d}=jH(t),m={x:0,y:0},g={x:0,y:0},y={height:e.height*a.y,width:e.width*a.x};return!f&&i<=e.top+y.height?(m.y=l1.Backward,g.y=n*Math.abs((e.top+y.height-i)/y.height)):!c&&s>=e.bottom-y.height&&(m.y=l1.Forward,g.y=n*Math.abs((e.bottom-y.height-s)/y.height)),!d&&l>=e.right-y.width?(m.x=l1.Forward,g.x=n*Math.abs((e.right-y.width-l)/y.width)):!h&&o<=e.left+y.width&&(m.x=l1.Backward,g.x=n*Math.abs((e.left+y.width-o)/y.width)),{direction:m,speed:g}}function tge(t){if(t===document.scrollingElement){const{innerWidth:i,innerHeight:o}=window;return{top:0,left:0,right:i,bottom:o,width:i,height:o}}const{top:e,left:r,right:n,bottom:a}=t.getBoundingClientRect();return{top:e,left:r,right:n,bottom:a,width:t.clientWidth,height:t.clientHeight}}function LH(t){return t.reduce((e,r)=>k6(e,Zy(r)),Ro)}function rge(t){return t.reduce((e,r)=>e+TH(r),0)}function nge(t){return t.reduce((e,r)=>e+MH(r),0)}function age(t,e){if(e===void 0&&(e=c9),!t)return;const{top:r,left:n,bottom:a,right:i}=e(t);AH(t)&&(a<=0||i<=0||r>=window.innerHeight||n>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const ige=[["x",["left","right"],rge],["y",["top","bottom"],nge]];class cw{constructor(e,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=uw(r),a=LH(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[i,o,l]of ige)for(const s of o)Object.defineProperty(this,s,{get:()=>{const f=l(n),c=a[i]-f;return this.rect[s]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class os{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=e}add(e,r,n){var a;(a=this.target)==null||a.addEventListener(e,r,n),this.listeners.push([e,r,n])}}function oge(t){const{EventTarget:e}=xi(t);return t instanceof e?t:b7(t)}function wm(t,e){const r=Math.abs(t.x),n=Math.abs(t.y);return typeof e=="number"?Math.sqrt(r**2+n**2)>e:"x"in e&&"y"in e?r>e.x&&n>e.y:"x"in e?r>e.x:"y"in e?n>e.y:!1}var ao;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(ao||(ao={}));function MM(t){t.preventDefault()}function lge(t){t.stopPropagation()}var Pn;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(Pn||(Pn={}));const NH={start:[Pn.Space,Pn.Enter],cancel:[Pn.Esc],end:[Pn.Space,Pn.Enter,Pn.Tab]},sge=(t,e)=>{let{currentCoordinates:r}=e;switch(t.code){case Pn.Right:return{...r,x:r.x+25};case Pn.Left:return{...r,x:r.x-25};case Pn.Down:return{...r,y:r.y+25};case Pn.Up:return{...r,y:r.y-25}}};class IH{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:r}}=e;this.props=e,this.listeners=new os(b7(r)),this.windowListeners=new os(xi(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ao.Resize,this.handleCancel),this.windowListeners.add(ao.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ao.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:r}=this.props,n=e.node.current;n&&age(n),r(Ro)}handleKeyDown(e){if(_H(e)){const{active:r,context:n,options:a}=this.props,{keyboardCodes:i=NH,coordinateGetter:o=sge,scrollBehavior:l="smooth"}=a,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}const{collisionRect:f}=n.current,c=f?{x:f.left,y:f.top}:Ro;this.referenceCoordinates||(this.referenceCoordinates=c);const h=o(e,{active:r,context:n.current,currentCoordinates:c});if(h){const d=Lc(h,c),m={x:0,y:0},{scrollableAncestors:g}=n.current;for(const y of g){const b=e.code,{isTop:S,isRight:w,isLeft:C,isBottom:k,maxScroll:_,minScroll:D}=jH(y),T=tge(y),A={x:Math.min(b===Pn.Right?T.right-T.width/2:T.right,Math.max(b===Pn.Right?T.left:T.left+T.width/2,h.x)),y:Math.min(b===Pn.Down?T.bottom-T.height/2:T.bottom,Math.max(b===Pn.Down?T.top:T.top+T.height/2,h.y))},M=b===Pn.Right&&!w||b===Pn.Left&&!C,E=b===Pn.Down&&!k||b===Pn.Up&&!S;if(M&&A.x!==h.x){const N=y.scrollLeft+d.x,Y=b===Pn.Right&&N<=_.x||b===Pn.Left&&N>=D.x;if(Y&&!d.y){y.scrollTo({left:N,behavior:l});return}Y?m.x=y.scrollLeft-N:m.x=b===Pn.Right?y.scrollLeft-_.x:y.scrollLeft-D.x,m.x&&y.scrollBy({left:-m.x,behavior:l});break}else if(E&&A.y!==h.y){const N=y.scrollTop+d.y,Y=b===Pn.Down&&N<=_.y||b===Pn.Up&&N>=D.y;if(Y&&!d.x){y.scrollTo({top:N,behavior:l});return}Y?m.y=y.scrollTop-N:m.y=b===Pn.Down?y.scrollTop-_.y:y.scrollTop-D.y,m.y&&y.scrollBy({top:-m.y,behavior:l});break}}this.handleMove(e,k6(Lc(h,this.referenceCoordinates),m))}}}handleMove(e,r){const{onMove:n}=this.props;e.preventDefault(),n(r)}handleEnd(e){const{onEnd:r}=this.props;e.preventDefault(),this.detach(),r()}handleCancel(e){const{onCancel:r}=this.props;e.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}IH.activators=[{eventName:"onKeyDown",handler:(t,e,r)=>{let{keyboardCodes:n=NH,onActivation:a}=e,{active:i}=r;const{code:o}=t.nativeEvent;if(n.start.includes(o)){const l=i.activatorNode.current;return l&&t.target!==l?!1:(t.preventDefault(),a==null||a({event:t.nativeEvent}),!0)}return!1}}];function EM(t){return!!(t&&"distance"in t)}function jM(t){return!!(t&&"delay"in t)}class fw{constructor(e,r,n){var a;n===void 0&&(n=oge(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=r;const{event:i}=e,{target:o}=i;this.props=e,this.events=r,this.document=b7(o),this.documentListeners=new os(this.document),this.listeners=new os(n),this.windowListeners=new os(xi(o)),this.initialCoordinates=(a=Jy(i))!=null?a:Ro,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ao.Resize,this.handleCancel),this.windowListeners.add(ao.DragStart,MM),this.windowListeners.add(ao.VisibilityChange,this.handleCancel),this.windowListeners.add(ao.ContextMenu,MM),this.documentListeners.add(ao.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(jM(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(EM(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,r){const{active:n,onPending:a}=this.props;a(n,e,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:e}=this,{onStart:r}=this.props;e&&(this.activated=!0,this.documentListeners.add(ao.Click,lge,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ao.SelectionChange,this.removeTextSelection),r(e))}handleMove(e){var r;const{activated:n,initialCoordinates:a,props:i}=this,{onMove:o,options:{activationConstraint:l}}=i;if(!a)return;const s=(r=Jy(e))!=null?r:Ro,f=Lc(a,s);if(!n&&l){if(EM(l)){if(l.tolerance!=null&&wm(f,l.tolerance))return this.handleCancel();if(wm(f,l.distance))return this.handleStart()}if(jM(l)&&wm(f,l.tolerance))return this.handleCancel();this.handlePending(l,f);return}e.cancelable&&e.preventDefault(),o(s)}handleEnd(){const{onAbort:e,onEnd:r}=this.props;this.detach(),this.activated||e(this.props.active),r()}handleCancel(){const{onAbort:e,onCancel:r}=this.props;this.detach(),this.activated||e(this.props.active),r()}handleKeydown(e){e.code===Pn.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const uge={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class dw extends fw{constructor(e){const{event:r}=e,n=b7(r.target);super(e,uge,n)}}dw.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:r}=t,{onActivation:n}=e;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const cge={move:{name:"mousemove"},end:{name:"mouseup"}};var Qy;(function(t){t[t.RightClick=2]="RightClick"})(Qy||(Qy={}));class fge extends fw{constructor(e){super(e,cge,b7(e.event.target))}}fge.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:r}=t,{onActivation:n}=e;return r.button===Qy.RightClick?!1:(n==null||n({event:r}),!0)}}];const Sm={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class dge extends fw{constructor(e){super(e,Sm)}static setup(){return window.addEventListener(Sm.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Sm.move.name,e)};function e(){}}}dge.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:r}=t,{onActivation:n}=e;const{touches:a}=r;return a.length>1?!1:(n==null||n({event:r}),!0)}}];var ls;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(ls||(ls={}));var Ic;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(Ic||(Ic={}));function hge(t){let{acceleration:e,activator:r=ls.Pointer,canScroll:n,draggingRect:a,enabled:i,interval:o=5,order:l=Ic.TreeOrder,pointerCoordinates:s,scrollableAncestors:f,scrollableAncestorRects:c,delta:h,threshold:d}=t;const m=mge({delta:h,disabled:!i}),[g,y]=_me(),b=I.useRef({x:0,y:0}),S=I.useRef({x:0,y:0}),w=I.useMemo(()=>{switch(r){case ls.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case ls.DraggableRect:return a}},[r,a,s]),C=I.useRef(null),k=I.useCallback(()=>{const D=C.current;if(!D)return;const T=b.current.x*S.current.x,A=b.current.y*S.current.y;D.scrollBy(T,A)},[]),_=I.useMemo(()=>l===Ic.TreeOrder?[...f].reverse():f,[l,f]);I.useEffect(()=>{if(!i||!f.length||!w){y();return}for(const D of _){if((n==null?void 0:n(D))===!1)continue;const T=f.indexOf(D),A=c[T];if(!A)continue;const{direction:M,speed:E}=ege(D,A,w,e,d);for(const N of["x","y"])m[N][M[N]]||(E[N]=0,M[N]=0);if(E.x>0||E.y>0){y(),C.current=D,g(k,o),b.current=E,S.current=M;return}}b.current={x:0,y:0},S.current={x:0,y:0},y()},[e,k,n,y,i,o,JSON.stringify(w),JSON.stringify(m),g,f,_,c,JSON.stringify(d)])}const pge={x:{[l1.Backward]:!1,[l1.Forward]:!1},y:{[l1.Backward]:!1,[l1.Forward]:!1}};function mge(t){let{delta:e,disabled:r}=t;const n=Ky(e);return u9(a=>{if(r||!n||!a)return pge;const i={x:Math.sign(e.x-n.x),y:Math.sign(e.y-n.y)};return{x:{[l1.Backward]:a.x[l1.Backward]||i.x===-1,[l1.Forward]:a.x[l1.Forward]||i.x===1},y:{[l1.Backward]:a.y[l1.Backward]||i.y===-1,[l1.Forward]:a.y[l1.Forward]||i.y===1}}},[r,e,n])}function gge(t,e){const r=e!=null?t.get(e):void 0,n=r?r.node.current:null;return u9(a=>{var i;return e==null?null:(i=n??a)!=null?i:null},[n,e])}function yge(t,e){return I.useMemo(()=>t.reduce((r,n)=>{const{sensor:a}=n,i=a.activators.map(o=>({eventName:o.eventName,handler:e(o.handler,n)}));return[...r,...i]},[]),[t,e])}var Ls;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(Ls||(Ls={}));var ev;(function(t){t.Optimized="optimized"})(ev||(ev={}));const LM=new Map;function vge(t,e){let{dragging:r,dependencies:n,config:a}=e;const[i,o]=I.useState(null),{frequency:l,measure:s,strategy:f}=a,c=I.useRef(t),h=b(),d=lw(h),m=I.useCallback(function(S){S===void 0&&(S=[]),!d.current&&o(w=>w===null?S:w.concat(S.filter(C=>!w.includes(C))))},[d]),g=I.useRef(null),y=u9(S=>{if(h&&!r)return LM;if(!S||S===LM||c.current!==t||i!=null){const w=new Map;for(let C of t){if(!C)continue;if(i&&i.length>0&&!i.includes(C.id)&&C.rect.current){w.set(C.id,C.rect.current);continue}const k=C.node.current,_=k?new cw(s(k),k):null;C.rect.current=_,_&&w.set(C.id,_)}return w}return S},[t,i,r,h,s]);return I.useEffect(()=>{c.current=t},[t]),I.useEffect(()=>{h||m()},[r,h]),I.useEffect(()=>{i&&i.length>0&&o(null)},[JSON.stringify(i)]),I.useEffect(()=>{h||typeof l!="number"||g.current!==null||(g.current=setTimeout(()=>{m(),g.current=null},l))},[l,h,m,...n]),{droppableRects:y,measureDroppableContainers:m,measuringScheduled:i!=null};function b(){switch(f){case Ls.Always:return!1;case Ls.BeforeDragging:return r;default:return!r}}}function PH(t,e){return u9(r=>t?r||(typeof e=="function"?e(t):t):null,[e,t])}function bge(t,e){return PH(t,e)}function xge(t){let{callback:e,disabled:r}=t;const n=ow(e),a=I.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(n)},[n,r]);return I.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function hw(t){let{callback:e,disabled:r}=t;const n=ow(e),a=I.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(n)},[r]);return I.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function wge(t){return new cw(c9(t),t)}function NM(t,e,r){e===void 0&&(e=wge);const[n,a]=I.useState(null);function i(){a(s=>{if(!t)return null;if(t.isConnected===!1){var f;return(f=s??r)!=null?f:null}const c=e(t);return JSON.stringify(s)===JSON.stringify(c)?s:c})}const o=xge({callback(s){if(t)for(const f of s){const{type:c,target:h}=f;if(c==="childList"&&h instanceof HTMLElement&&h.contains(t)){i();break}}}}),l=hw({callback:i});return F2(()=>{i(),t?(l==null||l.observe(t),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),o==null||o.disconnect())},[t]),n}function Sge(t){const e=PH(t);return DH(t,e)}const IM=[];function Cge(t){const e=I.useRef(t),r=u9(n=>t?n&&n!==IM&&t&&e.current&&t.parentNode===e.current.parentNode?n:uw(t):IM,[t]);return I.useEffect(()=>{e.current=t},[t]),r}function kge(t){const[e,r]=I.useState(null),n=I.useRef(t),a=I.useCallback(i=>{const o=xm(i.target);o&&r(l=>l?(l.set(o,Zy(o)),new Map(l)):null)},[]);return I.useEffect(()=>{const i=n.current;if(t!==i){o(i);const l=t.map(s=>{const f=xm(s);return f?(f.addEventListener("scroll",a,{passive:!0}),[f,Zy(f)]):null}).filter(s=>s!=null);r(l.length?new Map(l):null),n.current=t}return()=>{o(t),o(i)};function o(l){l.forEach(s=>{const f=xm(s);f==null||f.removeEventListener("scroll",a)})}},[a,t]),I.useMemo(()=>t.length?e?Array.from(e.values()).reduce((i,o)=>k6(i,o),Ro):LH(t):Ro,[t,e])}function PM(t,e){e===void 0&&(e=[]);const r=I.useRef(null);return I.useEffect(()=>{r.current=null},e),I.useEffect(()=>{const n=t!==Ro;n&&!r.current&&(r.current=t),!n&&r.current&&(r.current=null)},[t]),r.current?Lc(t,r.current):Ro}function _ge(t){I.useEffect(()=>{if(!Bf)return;const e=t.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of e)r==null||r()}},t.map(e=>{let{sensor:r}=e;return r}))}function Oge(t,e){return I.useMemo(()=>t.reduce((r,n)=>{let{eventName:a,handler:i}=n;return r[a]=o=>{i(o,e)},r},{}),[t,e])}function RH(t){return I.useMemo(()=>t?Kme(t):null,[t])}const RM=[];function Dge(t,e){e===void 0&&(e=c9);const[r]=t,n=RH(r?xi(r):null),[a,i]=I.useState(RM);function o(){i(()=>t.length?t.map(s=>EH(s)?n:new cw(e(s),s)):RM)}const l=hw({callback:o});return F2(()=>{l==null||l.disconnect(),o(),t.forEach(s=>l==null?void 0:l.observe(s))},[t]),a}function Age(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return s9(e)?e:t}function Tge(t){let{measure:e}=t;const[r,n]=I.useState(null),a=I.useCallback(f=>{for(const{target:c}of f)if(s9(c)){n(h=>{const d=e(c);return h?{...h,width:d.width,height:d.height}:d});break}},[e]),i=hw({callback:a}),o=I.useCallback(f=>{const c=Age(f);i==null||i.disconnect(),c&&(i==null||i.observe(c)),n(c?e(c):null)},[e,i]),[l,s]=Xy(o);return I.useMemo(()=>({nodeRef:l,rect:r,setRef:s}),[r,l,s])}const Mge=[{sensor:dw,options:{}},{sensor:IH,options:{}}],Ege={current:{}},ju={draggable:{measure:TM},droppable:{measure:TM,strategy:Ls.WhileDragging,frequency:ev.Optimized},dragOverlay:{measure:c9}};class ss extends Map{get(e){var r;return e!=null&&(r=super.get(e))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:r}=e;return!r})}getNodeFor(e){var r,n;return(r=(n=this.get(e))==null?void 0:n.node.current)!=null?r:void 0}}const jge={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ss,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Nc},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ju,measureDroppableContainers:Nc,windowRect:null,measuringScheduled:!1},Lge={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Nc,draggableNodes:new Map,over:null,measureDroppableContainers:Nc},pw=I.createContext(Lge),Nge=I.createContext(jge);function Ige(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ss}}}function Pge(t,e){switch(e.type){case $1.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case $1.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case $1.DragEnd:case $1.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case $1.RegisterDroppable:{const{element:r}=e,{id:n}=r,a=new ss(t.droppable.containers);return a.set(n,r),{...t,droppable:{...t.droppable,containers:a}}}case $1.SetDroppableDisabled:{const{id:r,key:n,disabled:a}=e,i=t.droppable.containers.get(r);if(!i||n!==i.key)return t;const o=new ss(t.droppable.containers);return o.set(r,{...i,disabled:a}),{...t,droppable:{...t.droppable,containers:o}}}case $1.UnregisterDroppable:{const{id:r,key:n}=e,a=t.droppable.containers.get(r);if(!a||n!==a.key)return t;const i=new ss(t.droppable.containers);return i.delete(r),{...t,droppable:{...t.droppable,containers:i}}}default:return t}}function Rge(t){let{disabled:e}=t;const{active:r,activatorEvent:n,draggableNodes:a}=I.useContext(pw),i=Ky(n),o=Ky(r==null?void 0:r.id);return I.useEffect(()=>{if(!e&&!n&&i&&o!=null){if(!_H(i)||document.activeElement===i.target)return;const l=a.get(o);if(!l)return;const{activatorNode:s,node:f}=l;if(!s.current&&!f.current)return;requestAnimationFrame(()=>{for(const c of[s.current,f.current]){if(!c)continue;const h=Ame(c);if(h){h.focus();break}}})}},[n,e,a,o,i]),null}function $ge(t,e){let{transform:r,...n}=e;return t!=null&&t.length?t.reduce((a,i)=>i({transform:a,...n}),r):r}function Bge(t){return I.useMemo(()=>({draggable:{...ju.draggable,...t==null?void 0:t.draggable},droppable:{...ju.droppable,...t==null?void 0:t.droppable},dragOverlay:{...ju.dragOverlay,...t==null?void 0:t.dragOverlay}}),[t==null?void 0:t.draggable,t==null?void 0:t.droppable,t==null?void 0:t.dragOverlay])}function Vge(t){let{activeNode:e,measure:r,initialRect:n,config:a=!0}=t;const i=I.useRef(!1),{x:o,y:l}=typeof a=="boolean"?{x:a,y:a}:a;F2(()=>{if(!o&&!l||!e){i.current=!1;return}if(i.current||!n)return;const f=e==null?void 0:e.node.current;if(!f||f.isConnected===!1)return;const c=r(f),h=DH(c,n);if(o||(h.x=0),l||(h.y=0),i.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const d=AH(f);d&&d.scrollBy({top:h.y,left:h.x})}},[e,o,l,n,r])}const $H=I.createContext({...Ro,scaleX:1,scaleY:1});var E2;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(E2||(E2={}));const Fge=I.memo(function(e){var r,n,a,i;let{id:o,accessibility:l,autoScroll:s=!0,children:f,sensors:c=Mge,collisionDetection:h=Hme,measuring:d,modifiers:m,...g}=e;const y=I.useReducer(Pge,void 0,Ige),[b,S]=y,[w,C]=Nme(),[k,_]=I.useState(E2.Uninitialized),D=k===E2.Initialized,{draggable:{active:T,nodes:A,translate:M},droppable:{containers:E}}=b,N=T!=null?A.get(T):null,Y=I.useRef({initial:null,translated:null}),ne=I.useMemo(()=>{var St;return T!=null?{id:T,data:(St=N==null?void 0:N.data)!=null?St:Ege,rect:Y}:null},[T,N]),K=I.useRef(null),[B,j]=I.useState(null),[$,V]=I.useState(null),z=lw(g,Object.values(g)),W=sw("DndDescribedBy",o),G=I.useMemo(()=>E.getEnabled(),[E]),ae=Bge(d),{droppableRects:U,measureDroppableContainers:H,measuringScheduled:R}=vge(G,{dragging:D,dependencies:[M.x,M.y],config:ae.droppable}),ee=gge(A,T),J=I.useMemo(()=>$?Jy($):null,[$]),Z=Tt(),re=bge(ee,ae.draggable.measure);Vge({activeNode:T!=null?A.get(T):null,config:Z.layoutShiftCompensation,initialRect:re,measure:ae.draggable.measure});const te=NM(ee,ae.draggable.measure,re),F=NM(ee?ee.parentElement:null),q=I.useRef({activatorEvent:null,active:null,activeNode:ee,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:A,draggingNode:null,draggingNodeRect:null,droppableContainers:E,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),X=E.getNodeFor((r=q.current.over)==null?void 0:r.id),ie=Tge({measure:ae.dragOverlay.measure}),ce=(n=ie.nodeRef.current)!=null?n:ee,de=D?(a=ie.rect)!=null?a:te:null,he=!!(ie.nodeRef.current&&ie.rect),Oe=Sge(he?null:te),Ne=RH(ce?xi(ce):null),Te=Cge(D?X??ee:null),_e=Dge(Te),xe=$ge(m,{transform:{x:M.x-Oe.x,y:M.y-Oe.y,scaleX:1,scaleY:1},activatorEvent:$,active:ne,activeNodeRect:te,containerNodeRect:F,draggingNodeRect:de,over:q.current.over,overlayNodeRect:ie.rect,scrollableAncestors:Te,scrollableAncestorRects:_e,windowRect:Ne}),we=J?k6(J,M):null,ge=kge(Te),ve=PM(ge),le=PM(ge,[te]),ue=k6(xe,ve),Ce=de?Ume(de,xe):null,pe=ne&&Ce?h({active:ne,collisionRect:Ce,droppableRects:U,droppableContainers:G,pointerCoordinates:we}):null,ye=Fme(pe,"id"),[be,je]=I.useState(null),$e=he?xe:k6(xe,le),ut=qme($e,(i=be==null?void 0:be.rect)!=null?i:null,te),Ie=I.useRef(null),Ze=I.useCallback((St,tt)=>{let{sensor:Mt,options:Dt}=tt;if(K.current==null)return;const Ye=A.get(K.current);if(!Ye)return;const Lt=St.nativeEvent,Et=new Mt({active:K.current,activeNode:Ye,event:Lt,options:Dt,context:q,onAbort(He){if(!A.get(He))return;const{onDragAbort:Ge}=z.current,Rt={id:He};Ge==null||Ge(Rt),w({type:"onDragAbort",event:Rt})},onPending(He,It,Ge,Rt){if(!A.get(He))return;const{onDragPending:dr}=z.current,xr={id:He,constraint:It,initialCoordinates:Ge,offset:Rt};dr==null||dr(xr),w({type:"onDragPending",event:xr})},onStart(He){const It=K.current;if(It==null)return;const Ge=A.get(It);if(!Ge)return;const{onDragStart:Rt}=z.current,$t={activatorEvent:Lt,active:{id:It,data:Ge.data,rect:Y}};a0.unstable_batchedUpdates(()=>{Rt==null||Rt($t),_(E2.Initializing),S({type:$1.DragStart,initialCoordinates:He,active:It}),w({type:"onDragStart",event:$t}),j(Ie.current),V(Lt)})},onMove(He){S({type:$1.DragMove,coordinates:He})},onEnd:Xt($1.DragEnd),onCancel:Xt($1.DragCancel)});Ie.current=Et;function Xt(He){return async function(){const{active:Ge,collisions:Rt,over:$t,scrollAdjustedTranslate:dr}=q.current;let xr=null;if(Ge&&dr){const{cancelDrop:Mr}=z.current;xr={activatorEvent:Lt,active:Ge,collisions:Rt,delta:dr,over:$t},He===$1.DragEnd&&typeof Mr=="function"&&await Promise.resolve(Mr(xr))&&(He=$1.DragCancel)}K.current=null,a0.unstable_batchedUpdates(()=>{S({type:He}),_(E2.Uninitialized),je(null),j(null),V(null),Ie.current=null;const Mr=He===$1.DragEnd?"onDragEnd":"onDragCancel";if(xr){const Er=z.current[Mr];Er==null||Er(xr),w({type:Mr,event:xr})}})}}},[A]),Ke=I.useCallback((St,tt)=>(Mt,Dt)=>{const Ye=Mt.nativeEvent,Lt=A.get(Dt);if(K.current!==null||!Lt||Ye.dndKit||Ye.defaultPrevented)return;const Et={active:Lt};St(Mt,tt.options,Et)===!0&&(Ye.dndKit={capturedBy:tt.sensor},K.current=Dt,Ze(Mt,tt))},[A,Ze]),et=yge(c,Ke);_ge(c),F2(()=>{te&&k===E2.Initializing&&_(E2.Initialized)},[te,k]),I.useEffect(()=>{const{onDragMove:St}=z.current,{active:tt,activatorEvent:Mt,collisions:Dt,over:Ye}=q.current;if(!tt||!Mt)return;const Lt={active:tt,activatorEvent:Mt,collisions:Dt,delta:{x:ue.x,y:ue.y},over:Ye};a0.unstable_batchedUpdates(()=>{St==null||St(Lt),w({type:"onDragMove",event:Lt})})},[ue.x,ue.y]),I.useEffect(()=>{const{active:St,activatorEvent:tt,collisions:Mt,droppableContainers:Dt,scrollAdjustedTranslate:Ye}=q.current;if(!St||K.current==null||!tt||!Ye)return;const{onDragOver:Lt}=z.current,Et=Dt.get(ye),Xt=Et&&Et.rect.current?{id:Et.id,rect:Et.rect.current,data:Et.data,disabled:Et.disabled}:null,He={active:St,activatorEvent:tt,collisions:Mt,delta:{x:Ye.x,y:Ye.y},over:Xt};a0.unstable_batchedUpdates(()=>{je(Xt),Lt==null||Lt(He),w({type:"onDragOver",event:He})})},[ye]),F2(()=>{q.current={activatorEvent:$,active:ne,activeNode:ee,collisionRect:Ce,collisions:pe,droppableRects:U,draggableNodes:A,draggingNode:ce,draggingNodeRect:de,droppableContainers:E,over:be,scrollableAncestors:Te,scrollAdjustedTranslate:ue},Y.current={initial:de,translated:Ce}},[ne,ee,pe,Ce,A,ce,de,U,E,be,Te,ue]),hge({...Z,delta:M,draggingRect:Ce,pointerCoordinates:we,scrollableAncestors:Te,scrollableAncestorRects:_e});const Pt=I.useMemo(()=>({active:ne,activeNode:ee,activeNodeRect:te,activatorEvent:$,collisions:pe,containerNodeRect:F,dragOverlay:ie,draggableNodes:A,droppableContainers:E,droppableRects:U,over:be,measureDroppableContainers:H,scrollableAncestors:Te,scrollableAncestorRects:_e,measuringConfiguration:ae,measuringScheduled:R,windowRect:Ne}),[ne,ee,te,$,pe,F,ie,A,E,U,be,H,Te,_e,ae,R,Ne]),jt=I.useMemo(()=>({activatorEvent:$,activators:et,active:ne,activeNodeRect:te,ariaDescribedById:{draggable:W},dispatch:S,draggableNodes:A,over:be,measureDroppableContainers:H}),[$,et,ne,te,S,W,A,be,H]);return I.createElement(OH.Provider,{value:C},I.createElement(pw.Provider,{value:jt},I.createElement(Nge.Provider,{value:Pt},I.createElement($H.Provider,{value:ut},f)),I.createElement(Rge,{disabled:(l==null?void 0:l.restoreFocus)===!1})),I.createElement(Rme,{...l,hiddenTextDescribedById:W}));function Tt(){const St=(B==null?void 0:B.autoScrollEnabled)===!1,tt=typeof s=="object"?s.enabled===!1:s===!1,Mt=D&&!St&&!tt;return typeof s=="object"?{...s,enabled:Mt}:{enabled:Mt}}}),zge=I.createContext(null),$M="button",Hge="Draggable";function qge(t){let{id:e,data:r,disabled:n=!1,attributes:a}=t;const i=sw(Hge),{activators:o,activatorEvent:l,active:s,activeNodeRect:f,ariaDescribedById:c,draggableNodes:h,over:d}=I.useContext(pw),{role:m=$M,roleDescription:g="draggable",tabIndex:y=0}=a??{},b=(s==null?void 0:s.id)===e,S=I.useContext(b?$H:zge),[w,C]=Xy(),[k,_]=Xy(),D=Oge(o,e),T=lw(r);F2(()=>(h.set(e,{id:e,key:i,node:w,activatorNode:k,data:T}),()=>{const M=h.get(e);M&&M.key===i&&h.delete(e)}),[h,e]);const A=I.useMemo(()=>({role:m,tabIndex:y,"aria-disabled":n,"aria-pressed":b&&m===$M?!0:void 0,"aria-roledescription":g,"aria-describedby":c.draggable}),[n,m,y,b,g,c.draggable]);return{active:s,activatorEvent:l,activeNodeRect:f,attributes:A,isDragging:b,listeners:n?void 0:D,node:w,over:d,setNodeRef:C,setActivatorNodeRef:_,transform:S}}const Wge=t=>{let{transform:e}=t;return{...e,y:0}};function Uge(t,e){let r=!1;function n(a,i){if(!r){r=!0;const o=a.getCenter(),l=a.getZoom(),s=a.getBearing(),f=a.getPitch();i.jumpTo({center:o,zoom:l,bearing:s,pitch:f}),r=!1}}t.on("move",()=>{n(t,e)}),e.on("move",()=>{n(e,t)})}function Gge(t){const{height:e,width:r,mapStyles:n,center:a,zoomLevel:i}=t,[o,l]=I.useState(50),[s,f]=I.useState(!1),c=I.useRef(null),h=I.useRef(50),d=I.useRef(0),m=Bme($me(dw,{activationConstraint:{distance:0}})),g=()=>{f(!0),h.current=o,c.current&&(d.current=c.current.getBoundingClientRect().width)},y=D=>{if(!c.current||d.current===0)return;const T=D.delta.x/d.current*100,A=Math.max(0,Math.min(100,h.current+T));l(A)},b=()=>{f(!1)},S=D=>{if(s||!c.current)return;const T=c.current.getBoundingClientRect(),M=(D.clientX-T.left)/T.width*100;l(Math.max(0,Math.min(100,M)))},w=I.useRef(null),C=I.useRef(null),k=I.useRef(null),_=I.useRef(null);return I.useEffect(()=>{if(_.current&&C.current&&k.current&&r){Qr(_.current).selectAll(".maplibregl-compare").remove(),Qr(C.current).selectAll("div").remove(),Qr(k.current).selectAll("div").remove();const M=new Rf;y3.addProtocol("pmtiles",M.tile);const E=new y3.Map({container:C.current,style:n[0],center:a||[0,0],zoom:i||4}),N=new y3.Map({container:k.current,style:n[1],center:a||[0,0],zoom:i||4});N.addControl(new y3.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),E.addControl(new y3.ScaleControl,"bottom-left"),E.addControl(new y3.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),N.addControl(new y3.ScaleControl,"bottom-left"),Uge(E,N)}},[r,n,a,i]),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:w,"aria-label":"Map area",children:v.jsx("div",{style:{width:r,height:e},children:v.jsx("div",{ref:_,className:"map maplibre-show-control relative w-full h-full",style:{inset:0},children:v.jsx(Fge,{sensors:m,modifiers:[Wge],onDragStart:g,onDragMove:y,onDragEnd:b,children:v.jsxs("div",{ref:c,style:{position:"relative",width:r,height:e,overflow:"hidden",cursor:s?"grabbing":"col-resize",userSelect:"none"},onClick:S,children:[v.jsx("div",{ref:k,className:"absolute h-full rightMap w-full",style:{position:"absolute",top:0,left:0,clipPath:`polygon(${o}% 0%, ${o}% 100%, 100% 100%, 100% 0%)`}}),v.jsx("div",{ref:C,className:"absolute h-full leftMap w-full",style:{position:"absolute",top:0,left:0,inset:0,clipPath:`polygon(0% 0%, ${o}% 0%, ${o}% 100%, 0% 100%)`}}),v.jsx(Yge,{position:o})]})})})})})}function Yge(t){const{position:e}=t,{attributes:r,listeners:n,setNodeRef:a}=qge({id:"slider-handle"});return v.jsxs("div",{ref:a,style:{position:"absolute",left:`${e}%`,top:0,bottom:0,width:"40px",transform:"translateX(-50%)",cursor:"col-resize",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10,touchAction:"none"},...n,...r,children:[v.jsx("div",{className:"h-full bg-primary-blue-600 dark:bg-primary-blue-400",style:{width:"2px"}}),v.jsx("div",{className:"flex bg-primary-blue-600 dark:bg-primary-blue-400 rounded-full absolute items-center justify-center text-primary-white font-primary-white",style:{boxShadow:"inset 0 0 0 1px #fff",width:"42px",height:"42px",top:"calc(50% - 21px)",left:"0",cursor:"col-resize"},children:v.jsx(U3e,{})})]})}function BH(t){const{graphTitle:e,height:r,width:n,relativeHeight:a,sources:i,graphDescription:o,footNote:l,padding:s,backgroundColor:f=!1,graphID:c,mapStyles:h,center:d=[0,0],zoomLevel:m=3,language:g="en",minHeight:y=0,theme:b="light",ariaLabel:S,styles:w,classNames:C}=t,[k,_]=I.useState(0),[D,T]=I.useState(0),A=I.useRef(null);return I.useEffect(()=>{const M=new ResizeObserver(E=>{_(n||E[0].target.clientWidth||620),T(r||E[0].target.clientHeight||480)});return A.current&&(T(A.current.clientHeight||480),_(A.current.clientWidth||620),n||M.observe(A.current)),()=>M.disconnect()},[n,r]),v.jsx("div",{className:`${b||"light"} flex ${n?"w-fit grow-0":"w-full grow"}`,dir:g==="he"||g==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${f?f===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${g||"en"}`,C==null?void 0:C.graphContainer),style:{...(w==null?void 0:w.graphContainer)||{},...f&&f!==!0?{backgroundColor:f}:{}},id:c,"aria-label":S||`${e?`The graph shows ${e}. `:""}This is a comparison between two maps.${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:f?s||"1rem":s||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[e||o?v.jsx(Zt,{styles:{title:w==null?void 0:w.title,description:w==null?void 0:w.description},classNames:{title:C==null?void 0:C.title,description:C==null?void 0:C.description},graphTitle:e,graphDescription:o,width:n}):null,v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:A,"aria-label":"map area",children:(n||k)&&(r||D)?v.jsx(Gge,{width:n||k,height:Math.max(y,r||(a?y?(n||k)*a>y?(n||k)*a:y:(n||k)*a:D)),mapStyles:h,center:d,zoomLevel:m}):null}),i||l?v.jsx(tr,{styles:{footnote:w==null?void 0:w.footnote,source:w==null?void 0:w.source},classNames:{footnote:C==null?void 0:C.footnote,source:C==null?void 0:C.source},sources:i,footNote:l,width:n}):null]})})})})}function Xge(t){const{mapStyle:e,height:r,width:n,relativeHeight:a,center:i,zoomLevel:o,minHeight:l,selectedLayer:s,layerIdList:f,excludeLayers:c}=t,[h,d]=I.useState(0),[m,g]=I.useState(0),[y,b]=I.useState(void 0),S=I.useRef(null),w=I.useRef(null),C=I.useRef(null);return I.useEffect(()=>{const k=new ResizeObserver(_=>{d(n||_[0].target.clientWidth||620),g(r||_[0].target.clientHeight||480)});return S.current&&(g(S.current.clientHeight||480),d(S.current.clientWidth||620),n||k.observe(S.current)),()=>k.disconnect()},[n,r]),I.useEffect(()=>{w.current&&h&&!C.current&&ka(e).then(k=>{b(k),Qr(w.current).selectAll("div").remove();const D=new Rf;Pi.addProtocol("pmtiles",D.tile);const T={container:w.current,style:{...k,layers:po(k.layers,[{column:"id",excludeValues:[...c,...f.filter(A=>s.indexOf(A)===-1)]}])}};i&&(T.center=i),o&&(T.zoom=o),C.current=new Pi.Map(T),C.current.addControl(new Pi.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),C.current.addControl(new Pi.ScaleControl,"bottom-left")})},[h,i,o,f,e,c,s]),I.useEffect(()=>{if(C.current)if(y){const k={...y,layers:po(y.layers,[{column:"id",excludeValues:[...c,...f.filter(_=>s.indexOf(_)===-1)]}])};C.current.setStyle(k)}else ka(e).then(k=>{const _={...k,layers:po(k.layers,[{column:"id",excludeValues:[...c,...f.filter(D=>s.indexOf(D)===-1)]}])};C.current.setStyle(_)})},[c,f,e,y,s]),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:S,"aria-label":"Map area",children:(n||h)&&(r||m)?v.jsx("div",{style:{width:n||h,height:Math.max(l,r||(a?l?(n||h)*a>l?(n||h)*a:l:(n||h)*a:m))},children:v.jsx("div",{ref:w,className:"map maplibre-show-control w-full h-full"})}):null})}function VH(t){const{mapStyle:e,graphTitle:r,height:n,width:a,relativeHeight:i,sources:o,graphDescription:l,footNote:s,padding:f,backgroundColor:c=!1,center:h,zoomLevel:d,graphID:m,language:g="en",minHeight:y=0,theme:b="light",layerSelection:S,excludeLayers:w=[],ariaLabel:C,uiMode:k="normal",styles:_,classNames:D}=t,[T,A]=I.useState(S[0].layerID);I.useEffect(()=>{A(S[0].layerID)},[S]);const M=I.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]);return v.jsx("div",{className:`${b||"light"} flex ${a?"w-fit grow-0":"w-full grow"}`,dir:g==="he"||g==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${c?c===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${g||"en"}`,D==null?void 0:D.graphContainer),style:{...(_==null?void 0:_.graphContainer)||{},...c&&c!==!0?{backgroundColor:c}:{}},id:m,"aria-label":C||`${r?`The graph shows ${r}. `:""}This is a map.${l?` ${l}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:c?f||"1rem":f||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||l?v.jsx(Zt,{styles:{title:_==null?void 0:_.title,description:_==null?void 0:_.description},classNames:{title:D==null?void 0:D.title,description:D==null?void 0:D.description},graphTitle:r,graphDescription:l,width:a}):null,v.jsx(s1,{options:S.map(E=>({label:E.name,value:E.layerID})),size:"sm",isClearable:!1,variant:k,isRtl:g==="he"||g==="ar",isSearchable:!0,filterOption:Z1(M),defaultValue:{label:S[0].name,value:S[0].layerID},controlShouldRenderValue:!0,onChange:E=>{E&&A(E.value)}}),v.jsx(Xge,{mapStyle:e,center:h,zoomLevel:d,width:a,height:n,relativeHeight:i,minHeight:y,selectedLayer:T,layerIdList:f1(S.map(E=>E.layerID)),excludeLayers:w}),o||s?v.jsx(tr,{styles:{footnote:_==null?void 0:_.footnote,source:_==null?void 0:_.source},classNames:{footnote:D==null?void 0:D.footnote,source:D==null?void 0:D.source},sources:o,footNote:s,width:a}):null]})})})})}function Kge(t){var ye,be,je,$e,ut,Ie,Ze,Ke,et,Pt,jt,Tt,St,tt,Mt,Dt,Ye,Lt,Et,Xt,He,It,Ge,Rt,$t,dr,xr,Mr,Er;const{data:e,width:r,height:n,showLabels:a,colors:i,colorDomain:o,radius:l,xAxisTitle:s,yAxisTitle:f,leftMargin:c,rightMargin:h,topMargin:d,bottomMargin:m,tooltip:g,onSeriesMouseOver:y,refXValues:b,refYValues:S,highlightAreaSettings:w,selectedColor:C,highlightedDataPoints:k,maxRadiusValue:_,maxXValue:D,minXValue:T,maxYValue:A,minYValue:M,onSeriesMouseClick:E,rtl:N,annotations:Y,customHighlightAreaSettings:ne,regressionLine:K,resetSelectionOnDoubleClick:B,detailsOnClick:j,noOfXTicks:$,noOfYTicks:V,labelColor:z,xSuffix:W,ySuffix:G,xPrefix:ae,yPrefix:U,styles:H,classNames:R}=t,[ee,J]=I.useState(void 0),[Z,re]=I.useState(void 0),[te,F]=I.useState(void 0),[q,X]=I.useState(void 0),ie={top:d,bottom:s?m+50:m,left:f?c+30:c,right:h},ce=e.map((it,Xe)=>({...it,id:`${Xe}`})),de=r-ie.left-ie.right,he=n-ie.top-ie.bottom,Oe=e.filter(it=>it.radius===void 0).length!==e.length?l4().domain([0,Fe(_)?(ye=Vr(e,"radius"))==null?void 0:ye.radius:_]).range([.25,l]).nice():void 0,Ne=ce.filter(it=>!Fe(it.radius)).length===0?ce:a7(ce.filter(it=>!Fe(it.radius)),"radius","desc"),Te=Fe(T)?((be=Br(e,"x"))==null?void 0:be.x)>0?0:(je=Br(e,"x"))==null?void 0:je.x:T,_e=Fe(D)?(($e=Vr(e,"x"))==null?void 0:$e.x)>0?(ut=Vr(e,"x"))==null?void 0:ut.x:0:D,xe=br().domain([Te,_e]).range([0,de]).nice(),we=Fe(M)?((Ie=Br(e,"y"))==null?void 0:Ie.y)>0?0:(Ze=Br(e,"y"))==null?void 0:Ze.y:M,ge=Fe(A)?((Ke=Vr(e,"y"))==null?void 0:Ke.y)>0?(et=Vr(e,"y"))==null?void 0:et.y:0:A,ve=br().domain([we,ge]).range([he,0]).nice(),le=xe.ticks($),ue=ve.ticks(V),Ce=i9.from(Ne.filter(it=>!Fe(it.x)&&!Fe(it.y)),it=>xe(it.x),it=>ve(it.y)).voronoi([0,0,de<0?0:de,he<0?0:he]),pe=Hx(e.filter(it=>!Fe(it.x)&&!Fe(it.y)).map(it=>[xe(it.x),ve(it.y)]));return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${ie.left},${ie.top})`,children:[v.jsx(Az,{areaSettings:w,width:de,height:he,scaleX:xe,scaleY:ve}),v.jsx(Z2,{areaSettings:ne,scaleX:xe,scaleY:ve}),v.jsxs("g",{children:[v.jsx(v1,{values:ue.filter(it=>it!==0),y:ue.filter(it=>it!==0).map(it=>ve(it)),x1:0-c,x2:de+ie.right,styles:{gridLines:(Pt=H==null?void 0:H.yAxis)==null?void 0:Pt.gridLines,labels:(jt=H==null?void 0:H.yAxis)==null?void 0:jt.labels},classNames:{gridLines:(Tt=R==null?void 0:R.yAxis)==null?void 0:Tt.gridLines,labels:(St=R==null?void 0:R.yAxis)==null?void 0:St.labels},suffix:G,prefix:U,labelType:"secondary",showGridLines:!0,labelPos:"side"}),v.jsx(Nr,{y1:ve(we<0?0:we),y2:ve(we<0?0:we),x1:0-c,x2:de+ie.right,label:_t(we<0?0:we,U,G),labelPos:{x:0,y:ve(we<0?0:we),dy:"0.33em",dx:-4},classNames:{axis:(tt=R==null?void 0:R.xAxis)==null?void 0:tt.axis,label:(Mt=R==null?void 0:R.yAxis)==null?void 0:Mt.labels},styles:{axis:(Dt=H==null?void 0:H.xAxis)==null?void 0:Dt.axis,label:{textAnchor:"end",...((Ye=H==null?void 0:H.yAxis)==null?void 0:Ye.labels)||{}}}}),v.jsx(nn,{x:0-c-15,y:he/2,style:(Lt=H==null?void 0:H.yAxis)==null?void 0:Lt.title,className:(Et=R==null?void 0:R.yAxis)==null?void 0:Et.title,text:f,rotate90:!0})]}),v.jsxs("g",{children:[v.jsx(La,{values:le.filter(it=>it!==0),x:le.filter(it=>it!==0).map(it=>xe(it)),y1:0,y2:he,styles:{gridLines:(Xt=H==null?void 0:H.xAxis)==null?void 0:Xt.gridLines,labels:(He=H==null?void 0:H.xAxis)==null?void 0:He.labels},classNames:{gridLines:(It=R==null?void 0:R.xAxis)==null?void 0:It.gridLines,labels:(Ge=R==null?void 0:R.xAxis)==null?void 0:Ge.labels},suffix:W,prefix:ae,labelType:"primary",showGridLines:!0}),v.jsx(Nr,{x1:xe(Te<0?0:Te),x2:xe(Te<0?0:Te),y1:0,y2:he,label:_t(Te<0?0:Te,ae,W),labelPos:{x:xe(Te<0?0:Te),y:he,dy:"1em",dx:0},classNames:{axis:(Rt=R==null?void 0:R.xAxis)==null?void 0:Rt.axis,label:($t=R==null?void 0:R.yAxis)==null?void 0:$t.labels},styles:{axis:(dr=H==null?void 0:H.xAxis)==null?void 0:dr.axis,label:{textAnchor:"middle",...((xr=H==null?void 0:H.yAxis)==null?void 0:xr.labels)||{}}}}),v.jsx(nn,{x:de/2,y:he+30,style:(Mr=H==null?void 0:H.xAxis)==null?void 0:Mr.title,className:(Er=R==null?void 0:R.xAxis)==null?void 0:Er.title,text:s})]}),Ne.filter(it=>!Fe(it.x)&&!Fe(it.y)).map((it,Xe)=>v.jsx("g",{children:v.jsx("path",{d:Ce.renderCell(Ne.findIndex(Vt=>Vt.id===it.id)),opacity:0,onMouseEnter:Vt=>{J(it),X(Vt.clientY),F(Vt.clientX),y&&y(it)},onMouseMove:Vt=>{J(it),X(Vt.clientY),F(Vt.clientX)},onMouseLeave:()=>{J(void 0),F(void 0),X(void 0),y&&y(void 0)},onClick:()=>{(E||j)&&(Sr(Z,it)&&B?(re(void 0),E==null||E(void 0)):(re(it),E==null||E(it)))}})},Xe)),Ne.filter(it=>!Fe(it.x)&&!Fe(it.y)).map((it,Xe)=>v.jsx("g",{children:v.jsxs("g",{opacity:C?it.color&&i[o.indexOf(`${it.color}`)]===C?1:.3:ee?ee.id===it.id?1:.3:k.length!==0?k.indexOf(it.label||"")!==-1?1:.5:1,transform:`translate(${xe(it.x)},${ve(it.y)})`,onMouseEnter:Vt=>{J(it),X(Vt.clientY),F(Vt.clientX),y&&y(it)},onMouseMove:Vt=>{J(it),X(Vt.clientY),F(Vt.clientX)},onMouseLeave:()=>{J(void 0),F(void 0),X(void 0),y&&y(void 0)},onClick:()=>{(E||j)&&(Sr(Z,it)&&B?(re(void 0),E==null||E(void 0)):(re(it),E==null||E(it)))},children:[v.jsx("circle",{cx:0,cy:0,r:Oe?Oe(it.radius||0):l,style:{fill:e.filter(Vt=>Vt.color).length===0?i[0]:it.color?i[o.indexOf(`${it.color}`)]:Qe.gray,stroke:e.filter(Vt=>Vt.color).length===0?i[0]:it.color?i[o.indexOf(`${it.color}`)]:Qe.gray,fillOpacity:.6}}),a&&!Fe(it.label)?v.jsx("text",{style:{fill:z||(e.filter(Vt=>Vt.color).length===0?i[0]:it.color?i[o.indexOf(`${it.color}`)]:Qe.gray),...(H==null?void 0:H.graphObjectValues)||{}},className:Be("graph-value text-sm",R==null?void 0:R.graphObjectValues),y:0,x:Oe?Oe(it.radius||0):l,dy:"0.33em",dx:3,children:it.label}):k.length!==0&&!Fe(it.label)&&k.indexOf(it.label)!==-1?v.jsx("text",{style:{fill:z||(e.filter(Vt=>Vt.color).length===0?i[0]:it.color?i[o.indexOf(`${it.color}`)]:Qe.gray),...(H==null?void 0:H.graphObjectValues)||{}},className:Be("graph-value text-sm",R==null?void 0:R.graphObjectValues),y:0,x:Oe?Oe(it.radius||0):l,dy:"0.33em",dx:3,children:it.label}):null]})},Xe)),b.map((it,Xe)=>v.jsx(ti,{text:it.text,color:it.color,x:xe(it.value),y1:0,y2:he,textSide:xe(it.value)>de*.75||N?"left":"right",classNames:it.classNames,styles:it.styles},Xe)),S.map((it,Xe)=>v.jsx(h1,{text:it.text,color:it.color,y:ve(it.value),x1:0,x2:de,classNames:it.classNames,styles:it.styles},Xe)),v.jsx("g",{children:Y.map((it,Xe)=>{const Vt=K2({x:it.xCoordinate?xe(it.xCoordinate)+(it.xOffset||0):0+(it.xOffset||0),y:it.yCoordinate?ve(it.yCoordinate)+(it.yOffset||0)-8:0+(it.yOffset||0)-8},{x:it.xCoordinate?xe(it.xCoordinate):0,y:it.yCoordinate?ve(it.yCoordinate):0},Fe(it.connectorRadius)?3.5:it.connectorRadius),Yt=it.showConnector?{y1:Vt.y,x1:Vt.x,y2:it.yCoordinate?ve(it.yCoordinate)+(it.yOffset||0):0+(it.yOffset||0),x2:it.xCoordinate?xe(it.xCoordinate)+(it.xOffset||0):0+(it.xOffset||0),cy:it.yCoordinate?ve(it.yCoordinate):0,cx:it.xCoordinate?xe(it.xCoordinate):0,circleRadius:Fe(it.connectorRadius)?3.5:it.connectorRadius,strokeWidth:it.showConnector===!0?2:Math.min(it.showConnector||0,1)}:void 0,at={y:it.yCoordinate?ve(it.yCoordinate)+(it.yOffset||0)-8:0+(it.yOffset||0)-8,x:N?0:it.xCoordinate?xe(it.xCoordinate)+(it.xOffset||0):0+(it.xOffset||0),width:N?it.xCoordinate?xe(it.xCoordinate)+(it.xOffset||0):0+(it.xOffset||0):de-(it.xCoordinate?xe(it.xCoordinate)+(it.xOffset||0):0+(it.xOffset||0)),maxWidth:it.maxWidth,fontWeight:it.fontWeight,align:it.align};return v.jsx(J2,{color:it.color,connectorsSettings:Yt,labelSettings:at,text:it.text,classNames:it.classNames,styles:it.styles},Xe)})}),K?v.jsx(qx,{x1:pe.b>he?(he-pe.b)/pe.m:0,x2:de,y1:pe.b>he?he:pe.b,y2:pe.m*de+pe.b,className:R==null?void 0:R.regLine,style:H==null?void 0:H.regLine,color:typeof K=="string"?K:void 0}):null]})}),ee&&g&&te&&q?v.jsx(yr,{data:ee,body:g,xPos:te,yPos:q,backgroundStyle:H==null?void 0:H.tooltip,className:R==null?void 0:R.tooltip}):null,j?v.jsx(Tr,{open:Z!==void 0,onClose:()=>{re(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(j,Z)}})}):null]})}function FH(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,showLabels:o=!1,height:l,width:s,footNote:f,colorDomain:c,colorLegendTitle:h,radius:d=5,xAxisTitle:m="X Axis",yAxisTitle:g="Y Axis",padding:y,backgroundColor:b=!1,leftMargin:S=0,rightMargin:w=10,topMargin:C=20,bottomMargin:k=50,tooltip:_,relativeHeight:D,onSeriesMouseOver:T,refXValues:A=[],refYValues:M=[],highlightAreaSettings:E=[],showColorScale:N=!0,highlightedDataPoints:Y=[],graphID:ne,maxRadiusValue:K,maxXValue:B,minXValue:j,maxYValue:$,minYValue:V,xSuffix:z="",ySuffix:W="",xPrefix:G="",yPrefix:ae="",onSeriesMouseClick:U,graphDownload:H=!1,dataDownload:R=!1,language:ee="en",showNAColor:J=!0,minHeight:Z=0,annotations:re=[],customHighlightAreaSettings:te=[],theme:F="light",regressionLine:q=!1,ariaLabel:X,resetSelectionOnDoubleClick:ie=!0,detailsOnClick:ce,noOfXTicks:de=5,noOfYTicks:he=5,labelColor:Oe,styles:Ne,classNames:Te}=t,[_e,xe]=I.useState(0),[we,ge]=I.useState(0),[ve,le]=I.useState(void 0),ue=I.useRef(null),Ce=I.useRef(null);return I.useEffect(()=>{const pe=new ResizeObserver(ye=>{xe(s||ye[0].target.clientWidth||620),ge(l||ye[0].target.clientHeight||480)});return ue.current&&(ge(ue.current.clientHeight||480),xe(ue.current.clientWidth||620),s||pe.observe(ue.current)),()=>pe.disconnect()},[s,l]),v.jsx("div",{className:`${F||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:ee==="he"||ee==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${b?b===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${ee||"en"}`,Te==null?void 0:Te.graphContainer),style:{...(Ne==null?void 0:Ne.graphContainer)||{},...b&&b!==!0?{backgroundColor:b}:{}},id:ne,ref:Ce,"aria-label":X||`${r?`The graph shows ${r}. `:""}This is a scatter plot that shows correlation between two variables.${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:b?y||"1rem":y||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||H||R?v.jsx(Zt,{styles:{title:Ne==null?void 0:Ne.title,description:Ne==null?void 0:Ne.description},classNames:{title:Te==null?void 0:Te.title,description:Te==null?void 0:Te.description},graphTitle:r,graphDescription:i,width:s,graphDownload:H?Ce.current:void 0,dataDownload:R?e.map(pe=>pe.data).filter(pe=>pe!==void 0).length>0?e.map(pe=>pe.data).filter(pe=>pe!==void 0):e.filter(pe=>pe!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[N&&e.filter(pe=>pe.color).length!==0?v.jsx(Cn,{width:s,colorLegendTitle:h,colors:n||Qe[F].categoricalColors.colors,colorDomain:c||Bt(e.filter(pe=>pe.color),"color").map(pe=>pe.color),setSelectedColor:le,showNAColor:J}):null,v.jsx("div",{className:"flex flex-col grow justify-center w-full leading-0",ref:ue,"aria-label":"Graph area",children:(s||_e)&&(l||we)?v.jsx(Kge,{data:e,width:s||_e,height:Math.max(Z,l||(D?Z?(s||_e)*D>Z?(s||_e)*D:Z:(s||_e)*D:we)),colorDomain:e.filter(pe=>pe.color).length===0?[]:c||Bt(e.filter(pe=>pe.color),"color").map(pe=>pe.color),colors:e.filter(pe=>pe.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[F].categoricalColors.colors,xAxisTitle:m,yAxisTitle:g,refXValues:A,refYValues:M,showLabels:o,radius:d,leftMargin:S,rightMargin:w,topMargin:C,bottomMargin:k,tooltip:_,onSeriesMouseOver:T,highlightAreaSettings:E,highlightedDataPoints:e.filter(pe=>pe.label).length===0?[]:Y,selectedColor:ve,maxRadiusValue:K,maxXValue:B,minXValue:j,maxYValue:$,minYValue:V,onSeriesMouseClick:U,rtl:ee==="he"||ee==="ar",annotations:re,customHighlightAreaSettings:te,regressionLine:q,resetSelectionOnDoubleClick:ie,detailsOnClick:ce,noOfXTicks:de,noOfYTicks:he,labelColor:Oe,xSuffix:z,ySuffix:W,xPrefix:G,yPrefix:ae,styles:Ne,classNames:Te}):null})]})}),a||f?v.jsx(tr,{styles:{footnote:Ne==null?void 0:Ne.footnote,source:Ne==null?void 0:Ne.source},classNames:{footnote:Te==null?void 0:Te.footnote,source:Te==null?void 0:Te.source},sources:a,footNote:f,width:s}):null]})})})})}function Jge(t){var ae,U,H,R,ee,J,Z,re,te,F;const{data:e,width:r,height:n,showLabels:a,colors:i,colorDomain:o,radius:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,tooltip:d,onSeriesMouseOver:m,axisTitles:g,highlightedDataPoints:y,selectedColor:b,minValue:S,maxValue:w,onSeriesMouseClick:C,resetSelectionOnDoubleClick:k,detailsOnClick:_,styles:D,classNames:T}=t,[A,M]=I.useState(void 0),[E,N]=I.useState(void 0),[Y,ne]=I.useState(void 0),[K,B]=I.useState(void 0),j={top:c,bottom:h,left:s,right:f},$=r-j.left-j.right,V=n-j.top-j.bottom,z=Math.min((ae=Br(e,"y1"))==null?void 0:ae.y1,(U=Br(e,"y2"))==null?void 0:U.y2),W=Math.max((H=Vr(e,"y1"))==null?void 0:H.y1,(R=Vr(e,"y2"))==null?void 0:R.y2),G=br().domain([Fe(S)?z>0?0:z:S,Fe(w)?W>0?W:0:w]).range([V,0]).nice();return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,className:"mx-auto",direction:"ltr",children:v.jsxs("g",{transform:`translate(${j.left},${j.top})`,children:[v.jsxs("g",{children:[v.jsx(Nr,{y1:0,y2:V,x1:l,x2:l,classNames:{axis:Be("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",(ee=T==null?void 0:T.yAxis)==null?void 0:ee.axis)}}),v.jsx(nn,{x:l,y:V+15,style:(J=D==null?void 0:D.yAxis)==null?void 0:J.title,className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(Z=T==null?void 0:T.yAxis)==null?void 0:Z.title),text:g[0]})]}),v.jsxs("g",{children:[v.jsx(Nr,{y1:0,y2:V,x1:$-l,x2:$-l,classNames:{axis:Be("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",(re=T==null?void 0:T.yAxis)==null?void 0:re.axis)}}),v.jsx(nn,{x:$-l,y:V+15,style:(te=D==null?void 0:D.yAxis)==null?void 0:te.title,className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(F=T==null?void 0:T.yAxis)==null?void 0:F.title),text:g[1]})]}),e.map((q,X)=>{var ie,ce,de,he,Oe,Ne,Te,_e;return v.jsxs("g",{opacity:b?q.color&&i[o.indexOf(`${q.color}`)]===b?1:.3:A?A.label===q.label?1:.3:y.length!==0?y.indexOf(q.label)!==-1?1:.5:1,onMouseEnter:xe=>{M(q),B(xe.clientY),ne(xe.clientX),m&&m(q)},onMouseMove:xe=>{M(q),B(xe.clientY),ne(xe.clientX)},onMouseLeave:()=>{M(void 0),ne(void 0),B(void 0),m&&m(void 0)},onClick:()=>{(C||_)&&(Sr(E,q)&&k?(N(void 0),C==null||C(void 0)):(N(q),C==null||C(q)))},children:[v.jsx("circle",{cx:l,cy:G(q.y1),r:l,style:{fill:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,stroke:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,fillOpacity:.6}}),a?v.jsx("text",{style:{fill:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,textAnchor:"end",...((ie=D==null?void 0:D.yAxis)==null?void 0:ie.labels)||{}},className:Be("text-xs",(ce=T==null?void 0:T.yAxis)==null?void 0:ce.labels),y:G(q.y1),x:5,dy:"0.33em",dx:-3,children:q.label}):y.length!==0&&y.indexOf(q.label)!==-1?v.jsx("text",{style:{fill:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,textAnchor:"end",...((de=D==null?void 0:D.yAxis)==null?void 0:de.labels)||{}},className:Be("text-xs",(he=T==null?void 0:T.yAxis)==null?void 0:he.labels),y:G(q.y1),x:5,dy:"0.33em",dx:-3,children:q.label}):null,v.jsx("circle",{cx:$-l,cy:G(q.y2),r:l,style:{fill:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,stroke:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,fillOpacity:.6}}),a?v.jsx("text",{style:{fill:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,textAnchor:"start",...((Oe=D==null?void 0:D.yAxis)==null?void 0:Oe.labels)||{}},className:Be("text-xs",(Ne=T==null?void 0:T.yAxis)==null?void 0:Ne.labels),y:G(q.y2),x:$-5,dy:"0.33em",dx:3,children:q.label}):y.length!==0&&y.indexOf(q.label)!==-1?v.jsx("text",{style:{fill:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,textAnchor:"start",...((Te=D==null?void 0:D.yAxis)==null?void 0:Te.labels)||{}},className:Be("text-xs",(_e=T==null?void 0:T.yAxis)==null?void 0:_e.labels),y:G(q.y2),x:$-5,dy:"0.33em",dx:3,children:q.label}):null,v.jsx("line",{x1:l,x2:$-l,y1:G(q.y1),y2:G(q.y2),className:T==null?void 0:T.dataConnectors,style:{fill:"none",stroke:e.filter(xe=>xe.color).length===0?i[0]:q.color?i[o.indexOf(`${q.color}`)]:Qe.gray,strokeWidth:1,...D==null?void 0:D.dataConnectors}})]},X)})]})}),A&&d&&Y&&K?v.jsx(yr,{data:A,body:d,xPos:Y,yPos:K,backgroundStyle:D==null?void 0:D.tooltip,className:T==null?void 0:T.tooltip}):null,_?v.jsx(Tr,{open:E!==void 0,onClose:()=>{N(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(_,E)}})}):null]})}function zH(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,showLabels:o=!1,height:l,width:s,footNote:f,colorDomain:c,colorLegendTitle:h,radius:d=5,axisTitles:m=["",""],padding:g,backgroundColor:y=!1,leftMargin:b=50,rightMargin:S=50,topMargin:w=20,bottomMargin:C=20,tooltip:k,relativeHeight:_,onSeriesMouseOver:D,showColorScale:T=!0,highlightedDataPoints:A=[],graphID:M,minValue:E,maxValue:N,onSeriesMouseClick:Y,graphDownload:ne=!1,dataDownload:K=!1,fillContainer:B=!0,language:j="en",showNAColor:$=!0,minHeight:V=0,theme:z="light",ariaLabel:W,resetSelectionOnDoubleClick:G=!0,detailsOnClick:ae,styles:U,classNames:H}=t,[R,ee]=I.useState(0),[J,Z]=I.useState(0),[re,te]=I.useState(void 0),F=I.useRef(null),q=I.useRef(null);return I.useEffect(()=>{const X=new ResizeObserver(ie=>{ee(s||ie[0].target.clientWidth||620),Z(l||ie[0].target.clientHeight||480)});return F.current&&(Z(F.current.clientHeight||480),ee(F.current.clientWidth||620),s||X.observe(F.current)),()=>X.disconnect()},[s,l]),v.jsx("div",{className:`${z||"light"} flex ${s?"grow-0":"grow"} ${B?"w-full":"w-fit"} `,dir:j==="he"||j==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${y?y===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${j||"en"}`,H==null?void 0:H.graphContainer),style:{...(U==null?void 0:U.graphContainer)||{},...y&&y!==!0?{backgroundColor:y}:{}},id:M,ref:q,"aria-label":W||`${r?`The graph shows ${r}. `:""}This is a slope chart showing changes in data between two category or starting and ending time. Each line represents a different row in data, with lines sloping up or down to show increase or decrease over two categories or time.${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:y?g||"1rem":g||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||ne||K?v.jsx(Zt,{styles:{title:U==null?void 0:U.title,description:U==null?void 0:U.description},classNames:{title:H==null?void 0:H.title,description:H==null?void 0:H.description},graphTitle:r,graphDescription:i,width:s,graphDownload:ne?q.current:void 0,dataDownload:K?e.map(X=>X.data).filter(X=>X!==void 0).length>0?e.map(X=>X.data).filter(X=>X!==void 0):e.filter(X=>X!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[T&&e.filter(X=>X.color).length!==0?v.jsx(Cn,{width:s,colorLegendTitle:h,colors:n||Qe[z].categoricalColors.colors,colorDomain:c||Bt(e.filter(X=>X.color),"color").map(X=>X.color),setSelectedColor:te,showNAColor:$}):null,v.jsx("div",{className:"flex flex-col grow justify-center w-full leading-0",ref:F,"aria-label":"Graph area",children:(s||R)&&(l||J)?v.jsx(Jge,{data:e.filter(X=>!Fe(X.y1)&&!Fe(X.y2)),width:s||R,height:Math.max(V,l||(_?V?(s||R)*_>V?(s||R)*_:V:(s||R)*_:J)),colorDomain:e.filter(X=>X.color).length===0?[]:c||Bt(e.filter(X=>X.color),"color").map(X=>X.color),colors:e.filter(X=>X.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[z].categoricalColors.colors,selectedColor:re,axisTitles:m,showLabels:o,radius:d,leftMargin:b,rightMargin:S,topMargin:w,bottomMargin:C,tooltip:k,onSeriesMouseOver:D,highlightedDataPoints:A,minValue:E,maxValue:N,onSeriesMouseClick:Y,resetSelectionOnDoubleClick:G,detailsOnClick:ae,styles:U,classNames:H}):null})]})}),a||f?v.jsx(tr,{styles:{footnote:U==null?void 0:U.footnote,source:U==null?void 0:U.source},classNames:{footnote:H==null?void 0:H.footnote,source:H==null?void 0:H.source},sources:a,footNote:f,width:s}):null]})})})})}function Zge(t){var ce,de,he,Oe,Ne,Te,_e,xe,we,ge,ve,le,ue,Ce;const{data:e,width:r,height:n,colors:a,dateFormat:i,noOfXTicks:o,rightMargin:l,leftMargin:s,topMargin:f,bottomMargin:c,yAxisTitle:h,tooltip:d,onSeriesMouseOver:m,highlightAreaSettings:g,refValues:y,minValue:b,maxValue:S,rtl:w,annotations:C,customHighlightAreaSettings:k,noOfYTicks:_,prefix:D,suffix:T,curveType:A,styles:M,classNames:E}=t,N=A==="linear"?yo:A==="step"?e2:A==="stepAfter"?r2:A==="stepBefore"?t2:Q0,[Y,ne]=I.useState(void 0),[K,B]=I.useState(void 0),[j,$]=I.useState(void 0),V={top:f,bottom:c,left:h?s+30:s,right:l},z=I.useRef(null),W=Ut(e.map(pe=>({...pe,date:bt(`${pe.date}`,i,new Date)})),"date"),G=g.map(pe=>({...pe,coordinates:[pe.coordinates[0]===null?null:bt(`${pe.coordinates[0]}`,i,new Date),pe.coordinates[1]===null?null:bt(`${pe.coordinates[1]}`,i,new Date)]})),ae=k.map(pe=>({...pe,coordinates:pe.coordinates.map((ye,be)=>be%2===0?bt(`${ye}`,i,new Date):ye)})),U=W[0].y.map((pe,ye)=>W.map(be=>({date:be.date,y0:ye===0?0:fr(be.y.filter((je,$e)=>$e<ye)),y1:fr(be.y.filter((je,$e)=>$e<=ye))}))),H=r-V.left-V.right,R=n-V.top-V.bottom,ee=W[0].date,J=W[W.length-1].date,Z=Fe(b)?0:b,re=Fe(S)?Math.max(...e.map(pe=>fr(pe.y)||0)):S,te=G2().domain([ee,J]).range([0,H]),F=br().domain([Z,re]).range([R,0]).nice(),q=C6().x(pe=>te(pe.date)).y0(pe=>F(pe.y0)).y1(pe=>F(pe.y1)).curve(N),X=F.ticks(_),ie=te.ticks(o);return I.useEffect(()=>{const pe=be=>{const je=W[U2(W.map($e=>$e.date),te.invert(K1(be)[0]),1)];ne(je||W[W.length-1]),m&&m(je||W[W.length-1]),$(be.clientY),B(be.clientX)},ye=()=>{ne(void 0),B(void 0),$(void 0),m&&m(void 0)};Qr(z.current).on("mousemove",pe).on("mouseout",ye)},[te,W,m]),v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${V.left},${V.top})`,children:[v.jsx(h4,{areaSettings:G,width:H,height:R,scale:te}),v.jsx(Z2,{areaSettings:ae,scaleX:te,scaleY:F}),v.jsxs("g",{children:[v.jsx(v1,{values:X.filter(pe=>pe!==0),y:X.filter(pe=>pe!==0).map(pe=>F(pe)),x1:0-s,x2:H+V.right,styles:{gridLines:(ce=M==null?void 0:M.yAxis)==null?void 0:ce.gridLines,labels:(de=M==null?void 0:M.yAxis)==null?void 0:de.labels},classNames:{gridLines:(he=E==null?void 0:E.yAxis)==null?void 0:he.gridLines,labels:(Oe=E==null?void 0:E.yAxis)==null?void 0:Oe.labels},suffix:T,prefix:D,labelType:"secondary",showGridLines:!0,labelPos:"vertical"}),v.jsx(Nr,{y1:F(Z<0?0:Z),y2:F(Z<0?0:Z),x1:0-s,x2:H+V.right,label:_t(Z<0?0:Z,D,T),labelPos:{x:0-s,dx:0,dy:re<0?"1em":-5,y:F(Z<0?0:Z)},classNames:{axis:(Ne=E==null?void 0:E.xAxis)==null?void 0:Ne.axis,label:(Te=E==null?void 0:E.yAxis)==null?void 0:Te.labels},styles:{axis:(_e=M==null?void 0:M.xAxis)==null?void 0:_e.axis,label:(xe=M==null?void 0:M.yAxis)==null?void 0:xe.labels}}),v.jsx(nn,{x:0-s-15,y:R/2,style:(we=M==null?void 0:M.yAxis)==null?void 0:we.title,className:(ge=E==null?void 0:E.yAxis)==null?void 0:ge.title,text:h,rotate90:!0})]}),v.jsx(La,{values:ie.map(pe=>Sa(pe,i)),x:ie.map(pe=>te(pe)),y1:0,y2:R,styles:{gridLines:(ve=M==null?void 0:M.xAxis)==null?void 0:ve.gridLines,labels:(le=M==null?void 0:M.xAxis)==null?void 0:le.labels},classNames:{gridLines:Be("opacity-0",(ue=E==null?void 0:E.xAxis)==null?void 0:ue.gridLines),labels:Be("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[8px] sm:text-[9px] md:text-[10px] lg:text-xs",(Ce=E==null?void 0:E.xAxis)==null?void 0:Ce.labels)},suffix:T,prefix:D,labelType:"primary",showGridLines:!0}),v.jsxs("g",{children:[U.map((pe,ye)=>v.jsx("path",{d:q(pe),style:{fill:a[ye],opacity:.8}},ye)),Y?v.jsx("line",{y1:0,y2:R,x1:te(Y.date),x2:te(Y.date),className:Be("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",E==null?void 0:E.mouseOverLine),style:M==null?void 0:M.mouseOverLine}):null]}),y?v.jsx(v.Fragment,{children:y.map((pe,ye)=>v.jsx(h1,{text:pe.text,color:pe.color,y:F(pe.value),x1:0-s,x2:H+V.right,classNames:pe.classNames,styles:pe.styles},ye))}):null,v.jsx("g",{children:C.map((pe,ye)=>{const be=K2({x:pe.xCoordinate?te(bt(`${pe.xCoordinate}`,i,new Date))+(pe.xOffset||0):0+(pe.xOffset||0),y:pe.yCoordinate?F(pe.yCoordinate)+(pe.yOffset||0)-8:0+(pe.yOffset||0)-8},{x:pe.xCoordinate?te(bt(`${pe.xCoordinate}`,i,new Date)):0,y:pe.yCoordinate?F(pe.yCoordinate):0},Fe(pe.connectorRadius)?3.5:pe.connectorRadius),je=pe.showConnector?{y1:be.y,x1:be.x,y2:pe.yCoordinate?F(pe.yCoordinate)+(pe.yOffset||0):0+(pe.yOffset||0),x2:pe.xCoordinate?te(bt(`${pe.xCoordinate}`,i,new Date))+(pe.xOffset||0):0+(pe.xOffset||0),cx:pe.xCoordinate?te(bt(`${pe.xCoordinate}`,i,new Date)):0,cy:pe.yCoordinate?F(pe.yCoordinate):0,circleRadius:Fe(pe.connectorRadius)?3.5:pe.connectorRadius,strokeWidth:pe.showConnector===!0?2:Math.min(pe.showConnector||0,1)}:void 0,$e={y:pe.yCoordinate?F(pe.yCoordinate)+(pe.yOffset||0)-8:0+(pe.yOffset||0)-8,x:w?0:pe.xCoordinate?te(bt(`${pe.xCoordinate}`,i,new Date))+(pe.xOffset||0):0+(pe.xOffset||0),width:w?pe.xCoordinate?te(bt(`${pe.xCoordinate}`,i,new Date))+(pe.xOffset||0):0+(pe.xOffset||0):H-(pe.xCoordinate?te(bt(`${pe.xCoordinate}`,i,new Date))+(pe.xOffset||0):0+(pe.xOffset||0)),maxWidth:pe.maxWidth,fontWeight:pe.fontWeight,align:pe.align};return v.jsx(J2,{color:pe.color,connectorsSettings:je,labelSettings:$e,text:pe.text,classNames:pe.classNames,styles:pe.styles},ye)})}),v.jsx("rect",{ref:z,style:{fill:"none",pointerEvents:"all"},width:H,height:R})]})}),Y&&d&&K&&j?v.jsx(yr,{data:Y,body:d,xPos:K,yPos:j,backgroundStyle:M==null?void 0:M.tooltip,className:E==null?void 0:E.tooltip}):null]})}function HH(t){const{data:e,graphTitle:r,colors:n=Qe.light.categoricalColors.colors,sources:a,graphDescription:i,height:o,width:l,footNote:s,noOfXTicks:f=10,dateFormat:c="yyyy",colorDomain:h,padding:d,backgroundColor:m=!1,colorLegendTitle:g,leftMargin:y=50,rightMargin:b=20,topMargin:S=20,bottomMargin:w=25,highlightAreaSettings:C=[],tooltip:k,relativeHeight:_,onSeriesMouseOver:D,refValues:T=[],graphID:A,minValue:M,maxValue:E,graphDownload:N=!1,dataDownload:Y=!1,showColorScale:ne=!0,language:K="en",minHeight:B=0,annotations:j=[],customHighlightAreaSettings:$=[],theme:V="light",ariaLabel:z,yAxisTitle:W,noOfYTicks:G=5,prefix:ae="",suffix:U="",curveType:H="curve",styles:R,classNames:ee}=t,[J,Z]=I.useState(0),[re,te]=I.useState(0),F=I.useRef(null),q=I.useRef(null);return I.useEffect(()=>{const X=new ResizeObserver(ie=>{Z(l||ie[0].target.clientWidth||620),te(o||ie[0].target.clientHeight||480)});return F.current&&(te(F.current.clientHeight||480),Z(F.current.clientWidth||620),l||X.observe(F.current)),()=>X.disconnect()},[l,o]),v.jsx("div",{className:`${V||"light"} flex ${l?"w-fit grow-0":"w-full grow"}`,dir:K==="he"||K==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${m?m===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${K||"en"}`,ee==null?void 0:ee.graphContainer),style:{...(R==null?void 0:R.graphContainer)||{},...m&&m!==!0?{backgroundColor:m}:{}},id:A,ref:q,"aria-label":z||`${r?`The graph shows ${r}. `:""}This is a stacked area chart that shows trends over time.${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:m?d||"1rem":d||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||N||Y?v.jsx(Zt,{styles:{title:R==null?void 0:R.title,description:R==null?void 0:R.description},classNames:{title:ee==null?void 0:ee.title,description:ee==null?void 0:ee.description},graphTitle:r,graphDescription:i,width:l,graphDownload:N?q.current:void 0,dataDownload:Y?e.map(X=>X.data).filter(X=>X!==void 0).length>0?e.map(X=>X.data).filter(X=>X!==void 0):e.filter(X=>X!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[ne!==!1?v.jsx(g0,{colorDomain:h,colors:n,colorLegendTitle:g,showNAColor:!1}):null,v.jsx("div",{className:"w-full grow leading-0",ref:F,"aria-label":"Graph area",children:(l||J)&&(o||re)?v.jsx(Zge,{data:e,colors:n,width:l||J,height:Math.max(B,o||(_?B?(l||J)*_>B?(l||J)*_:B:(l||J)*_:re)),dateFormat:c,noOfXTicks:f,leftMargin:y,rightMargin:b,topMargin:S,bottomMargin:w,tooltip:k,onSeriesMouseOver:D,highlightAreaSettings:C,refValues:T,minValue:M,maxValue:E,rtl:K==="he"||K==="ar",annotations:j,customHighlightAreaSettings:$,yAxisTitle:W,noOfYTicks:G,prefix:ae,suffix:U,curveType:H,styles:R,classNames:ee}):null})]})}),a||s?v.jsx(tr,{styles:{footnote:R==null?void 0:R.footnote,source:R==null?void 0:R.source},classNames:{footnote:ee==null?void 0:ee.footnote,source:ee==null?void 0:ee.source},sources:a,footNote:s,width:l}):null]})})})})}function Qge(t){const{year:e,value:r,graphTitle:n,suffix:a="",sources:i,prefix:o="",graphDescription:l,footNote:s,padding:f,backgroundColor:c=!1,graphID:h,language:d="en",theme:m="light",ariaLabel:g,textBackground:y=!1,headingFontSize:b="4.375rem",centerAlign:S=!1,verticalAlign:w="center",styles:C,classNames:k}=t;return v.jsx("div",{className:`${m||"light"} flex w-full`,dir:d==="he"||d==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${c?c===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}flex flex-col w-full h-inherit ${d||"en"}`,k==null?void 0:k.graphContainer),style:{...(C==null?void 0:C.graphContainer)||{},...c&&c!==!0?{backgroundColor:c}:{}},id:h,"aria-label":g||`${n?`The graph shows ${n}. `:""}This is a statistic card.${l?` ${l}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:c?f||"1rem":f||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-12 justify-between grow",children:[n||l?v.jsx(Zt,{styles:{title:C==null?void 0:C.title,description:C==null?void 0:C.description},classNames:{title:k==null?void 0:k.title,description:k==null?void 0:k.description},graphTitle:n,graphDescription:l}):null,v.jsx("div",{className:`flex flex-col justify-between grow ${w==="top"?"justify-start":w==="bottom"?"justify-end":"justify-center"}`,children:v.jsxs(rP,{marginBottom:"base",className:`leading-none text-outline font-heading ${S?"text-center":d==="he"||d==="ar"?"text-right":"text-left"} ${y?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:b,letterSpacing:"0.05rem"},children:[typeof r=="string"?`${o}${r}${a}`:_t(r,o,a)," ",e?v.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",e,")"]}):null]})}),i||s?v.jsx(tr,{styles:{footnote:C==null?void 0:C.footnote,source:C==null?void 0:C.source},classNames:{footnote:k==null?void 0:k.footnote,source:k==null?void 0:k.source},sources:i,footNote:s}):null]})})})})}function qH(t){var T,A;const{year:e,data:r,graphTitle:n,suffix:a="",sources:i,prefix:o="",graphDescription:l,footNote:s,padding:f,backgroundColor:c=!1,graphID:h,aggregationMethod:d="count",language:m="en",countOnly:g,theme:y="light",ariaLabel:b,textBackground:S=!1,headingFontSize:w="4.375rem",centerAlign:C=!1,verticalAlign:k="center",styles:_,classNames:D}=t;return v.jsx("div",{className:`${y||"light"} flex w-full`,dir:m==="he"||m==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${c?c===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}flex flex-col w-full h-inherit ${m||"en"}`,D==null?void 0:D.graphContainer),style:{...(_==null?void 0:_.graphContainer)||{},...c&&c!==!0?{backgroundColor:c}:{}},id:h,"aria-label":b||`${n?`The graph shows ${n}. `:""}This is a statistic card.${l?` ${l}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:c?f||"1rem":f||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-12 justify-between grow",children:[n||l?v.jsx(Zt,{styles:{title:_==null?void 0:_.title,description:_==null?void 0:_.description},classNames:{title:D==null?void 0:D.title,description:D==null?void 0:D.description},graphTitle:n,graphDescription:l}):null,v.jsx("div",{className:`flex flex-col justify-between grow ${k==="top"?"justify-start":k==="bottom"?"justify-end":"justify-center"}`,children:v.jsxs(rP,{marginBottom:"base",className:`leading-none text-outline font-heading ${C?"text-center":m==="he"||m==="ar"?"text-right":"text-left"} ${S?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:w,letterSpacing:"0.05rem"},children:[r.filter(M=>typeof M.value=="string").length>0||d==="count"?g&&(g==null?void 0:g.length)!==0?r.filter(M=>g.indexOf(M.value)!==-1).length:r.length:_t(d==="sum"?fr(r.map(M=>M.value)):d==="average"?parseFloat((fr(r.map(M=>M.value))/r.length).toFixed(2)):d==="max"?(T=Vr(r,M=>M.value))==null?void 0:T.value:(A=Br(r,M=>M.value))==null?void 0:A.value,o,a)," ",e?v.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",e,")"]}):null]})}),i||s?v.jsx(tr,{styles:{footnote:_==null?void 0:_.footnote,source:_==null?void 0:_.source},classNames:{footnote:D==null?void 0:D.footnote,source:D==null?void 0:D.source},sources:i,footNote:s}):null]})})})})}function eye(t){var e=0,r=t.children,n=r&&r.length;if(!n)e=1;else for(;--n>=0;)e+=r[n].value;t.value=e}function tye(){return this.eachAfter(eye)}function rye(t,e){let r=-1;for(const n of this)t.call(e,n,++r,this);return this}function nye(t,e){for(var r=this,n=[r],a,i,o=-1;r=n.pop();)if(t.call(e,r,++o,this),a=r.children)for(i=a.length-1;i>=0;--i)n.push(a[i]);return this}function aye(t,e){for(var r=this,n=[r],a=[],i,o,l,s=-1;r=n.pop();)if(a.push(r),i=r.children)for(o=0,l=i.length;o<l;++o)n.push(i[o]);for(;r=a.pop();)t.call(e,r,++s,this);return this}function iye(t,e){let r=-1;for(const n of this)if(t.call(e,n,++r,this))return n}function oye(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,n=e.children,a=n&&n.length;--a>=0;)r+=n[a].value;e.value=r})}function lye(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function sye(t){for(var e=this,r=uye(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var a=n.length;t!==r;)n.splice(a,0,t),t=t.parent;return n}function uye(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),a=null;for(t=r.pop(),e=n.pop();t===e;)a=t,t=r.pop(),e=n.pop();return a}function cye(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function fye(){return Array.from(this)}function dye(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function hye(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}function*pye(){var t=this,e,r=[t],n,a,i;do for(e=r.reverse(),r=[];t=e.pop();)if(yield t,n=t.children)for(a=0,i=n.length;a<i;++a)r.push(n[a]);while(r.length)}function WH(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=yye)):e===void 0&&(e=gye);for(var r=new Ns(t),n,a=[r],i,o,l,s;n=a.pop();)if((o=e(n.data))&&(s=(o=Array.from(o)).length))for(n.children=o,l=s-1;l>=0;--l)a.push(i=o[l]=new Ns(o[l])),i.parent=n,i.depth=n.depth+1;return r.eachBefore(UH)}function mye(){return WH(this).eachBefore(vye)}function gye(t){return t.children}function yye(t){return Array.isArray(t)?t[1]:null}function vye(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function UH(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Ns(t){this.data=t,this.depth=this.height=0,this.parent=null}Ns.prototype=WH.prototype={constructor:Ns,count:tye,each:rye,eachAfter:aye,eachBefore:nye,find:iye,sum:oye,sort:lye,path:sye,ancestors:cye,descendants:fye,leaves:dye,links:hye,copy:mye,[Symbol.iterator]:pye};function Cm(t){return t==null?null:GH(t)}function GH(t){if(typeof t!="function")throw new Error;return t}function Dl(){return 0}function Al(t){return function(){return t}}function bye(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function xye(t,e,r,n,a){for(var i=t.children,o,l=-1,s=i.length,f=t.value&&(n-e)/t.value;++l<s;)o=i[l],o.y0=r,o.y1=a,o.x0=e,o.x1=e+=o.value*f}var wye={depth:-1},BM={},km={};function Sye(t){return t.id}function Cye(t){return t.parentId}function kye(){var t=Sye,e=Cye,r;function n(a){var i=Array.from(a),o=t,l=e,s,f,c,h,d,m,g,y,b=new Map;if(r!=null){const S=i.map((k,_)=>_ye(r(k,_,a))),w=S.map(VM),C=new Set(S).add("");for(const k of w)C.has(k)||(C.add(k),S.push(k),w.push(VM(k)),i.push(km));o=(k,_)=>S[_],l=(k,_)=>w[_]}for(c=0,s=i.length;c<s;++c)f=i[c],m=i[c]=new Ns(f),(g=o(f,c,a))!=null&&(g+="")&&(y=m.id=g,b.set(y,b.has(y)?BM:m)),(g=l(f,c,a))!=null&&(g+="")&&(m.parent=g);for(c=0;c<s;++c)if(m=i[c],g=m.parent){if(d=b.get(g),!d)throw new Error("missing: "+g);if(d===BM)throw new Error("ambiguous: "+g);d.children?d.children.push(m):d.children=[m],m.parent=d}else{if(h)throw new Error("multiple roots");h=m}if(!h)throw new Error("no root");if(r!=null){for(;h.data===km&&h.children.length===1;)h=h.children[0],--s;for(let S=i.length-1;S>=0&&(m=i[S],m.data===km);--S)m.data=null}if(h.parent=wye,h.eachBefore(function(S){S.depth=S.parent.depth+1,--s}).eachBefore(UH),h.parent=null,s>0)throw new Error("cycle");return h}return n.id=function(a){return arguments.length?(t=Cm(a),n):t},n.parentId=function(a){return arguments.length?(e=Cm(a),n):e},n.path=function(a){return arguments.length?(r=Cm(a),n):r},n}function _ye(t){t=`${t}`;let e=t.length;return tv(t,e-1)&&!tv(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function VM(t){let e=t.length;if(e<2)return"";for(;--e>1&&!tv(t,e););return t.slice(0,e)}function tv(t,e){if(t[e]==="/"){let r=0;for(;e>0&&t[--e]==="\\";)++r;if((r&1)===0)return!0}return!1}function Oye(t,e,r,n,a){for(var i=t.children,o,l=-1,s=i.length,f=t.value&&(a-r)/t.value;++l<s;)o=i[l],o.x0=e,o.x1=n,o.y0=r,o.y1=r+=o.value*f}var Dye=(1+Math.sqrt(5))/2;function Aye(t,e,r,n,a,i){for(var o=[],l=e.children,s,f,c=0,h=0,d=l.length,m,g,y=e.value,b,S,w,C,k,_,D;c<d;){m=a-r,g=i-n;do b=l[h++].value;while(!b&&h<d);for(S=w=b,_=Math.max(g/m,m/g)/(y*t),D=b*b*_,k=Math.max(w/D,D/S);h<d;++h){if(b+=f=l[h].value,f<S&&(S=f),f>w&&(w=f),D=b*b*_,C=Math.max(w/D,D/S),C>k){b-=f;break}k=C}o.push(s={value:b,dice:m<g,children:l.slice(c,h)}),s.dice?xye(s,r,n,a,y?n+=g*b/y:i):Oye(s,r,n,y?r+=m*b/y:a,i),y-=b,c=h}return o}const Tye=function t(e){function r(n,a,i,o,l){Aye(e,n,a,i,o,l)}return r.ratio=function(n){return t((n=+n)>1?n:1)},r}(Dye);function Mye(){var t=Tye,e=!1,r=1,n=1,a=[0],i=Dl,o=Dl,l=Dl,s=Dl,f=Dl;function c(d){return d.x0=d.y0=0,d.x1=r,d.y1=n,d.eachBefore(h),a=[0],e&&d.eachBefore(bye),d}function h(d){var m=a[d.depth],g=d.x0+m,y=d.y0+m,b=d.x1-m,S=d.y1-m;b<g&&(g=b=(g+b)/2),S<y&&(y=S=(y+S)/2),d.x0=g,d.y0=y,d.x1=b,d.y1=S,d.children&&(m=a[d.depth+1]=i(d)/2,g+=f(d)-m,y+=o(d)-m,b-=l(d)-m,S-=s(d)-m,b<g&&(g=b=(g+b)/2),S<y&&(y=S=(y+S)/2),t(d,g,y,b,S))}return c.round=function(d){return arguments.length?(e=!!d,c):e},c.size=function(d){return arguments.length?(r=+d[0],n=+d[1],c):[r,n]},c.tile=function(d){return arguments.length?(t=GH(d),c):t},c.padding=function(d){return arguments.length?c.paddingInner(d).paddingOuter(d):c.paddingInner()},c.paddingInner=function(d){return arguments.length?(i=typeof d=="function"?d:Al(+d),c):i},c.paddingOuter=function(d){return arguments.length?c.paddingTop(d).paddingRight(d).paddingBottom(d).paddingLeft(d):c.paddingTop()},c.paddingTop=function(d){return arguments.length?(o=typeof d=="function"?d:Al(+d),c):o},c.paddingRight=function(d){return arguments.length?(l=typeof d=="function"?d:Al(+d),c):l},c.paddingBottom=function(d){return arguments.length?(s=typeof d=="function"?d:Al(+d),c):s},c.paddingLeft=function(d){return arguments.length?(f=typeof d=="function"?d:Al(+d),c):f},c}function Eye(t){var ae;const{data:e,colors:r,leftMargin:n,width:a,height:i,colorDomain:o,rightMargin:l,topMargin:s,bottomMargin:f,showLabels:c,tooltip:h,onSeriesMouseOver:d,selectedColor:m,showValues:g,suffix:y,prefix:b,highlightedDataPoints:S,onSeriesMouseClick:w,resetSelectionOnDoubleClick:C,detailsOnClick:k,language:_,styles:D,classNames:T}=t,[A,M]=I.useState(void 0),[E,N]=I.useState(void 0),[Y,ne]=I.useState(void 0),[K,B]=I.useState(void 0),j={top:s,bottom:f,left:n,right:l},$=a-j.left-j.right,V=i-j.top-j.bottom,z=[{id:"root",parent:void 0,value:void 0,data:void 0},...e.map(U=>({id:U.label,value:U.size,parent:"root",data:U}))],W=kye().id(U=>U.id).parentId(U=>U.parent)(z);W.sum(U=>U.value);const G=Mye().size([$,V]).padding(2)(W);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${a}px`,height:`${i}px`,viewBox:`0 0 ${a} ${i}`,direction:"ltr",children:v.jsx("g",{transform:`translate(${j.left},${j.top})`,children:(ae=G.children)==null?void 0:ae.map((U,H)=>v.jsxs("g",{className:"undp-viz-g-with-hover",opacity:m?U.data.data.color&&r[o.indexOf(U.data.data.color)]===m?1:.3:S.length!==0?S.indexOf(U.data.id)!==-1?.85:.3:.85,transform:`translate(${U.x0},${U.y0})`,onMouseEnter:R=>{M(U.data.data),B(R.clientY),ne(R.clientX),d==null||d(U.data.data)},onClick:()=>{(w||k)&&(E===U.data.id&&C?(N(void 0),w==null||w(void 0)):(N(U.data.id),w==null||w(U.data.data)))},onMouseMove:R=>{M(U.data.data),B(R.clientY),ne(R.clientX)},onMouseLeave:()=>{M(void 0),ne(void 0),B(void 0),d&&d(void 0)},children:[v.jsx("rect",{x:0,y:0,width:U.x1-U.x0,height:U.y1-U.y0,style:{fill:e.filter(R=>R.color).length===0?r[0]:U.data.data.color?r[o.indexOf(U.data.data.color)]:Qe.gray}},H),U.x1-U.x0>50&&U.y1-U.y0>25&&(c||g)?v.jsx("foreignObject",{y:0,x:0,width:U.x1-U.x0,height:U.y1-U.y0,children:v.jsxs("div",{className:"flex flex-col gap-0.5 p-2 w-full",style:{color:Bi(e.filter(R=>R.color).length===0?r[0]:U.data.data.color?r[o.indexOf(U.data.data.color)]:Qe.gray)},children:[c?v.jsx(or,{marginBottom:"none",size:"sm",leading:"none",className:Be("w-full treemap-label",_==="ar"||_==="he"?"text-right":"text-left",T==null?void 0:T.graphObjectValues),style:{WebkitLineClamp:U.y1-U.y0>50?U.y1-U.y0>100?U.y1-U.y0>150?void 0:3:2:1,display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",color:Bi(e.filter(R=>R.color).length===0?r[0]:U.data.data.color?r[o.indexOf(U.data.data.color)]:Qe.gray),...(D==null?void 0:D.graphObjectValues)||{}},children:U.data.id}):null,g?v.jsx(or,{marginBottom:"none",size:"sm",leading:"none",className:Be("w-full font-bold treemap-value",_==="ar"||_==="he"?"text-right":"text-left",T==null?void 0:T.graphObjectValues),style:{color:Bi(e.filter(R=>R.color).length===0?r[0]:U.data.data.color?r[o.indexOf(U.data.data.color)]:Qe.gray),...(D==null?void 0:D.graphObjectValues)||{}},children:_t(U.data.value,b,y)}):null]})}):null]},H))})}),A&&h&&Y&&K?v.jsx(yr,{data:A,body:h,xPos:Y,yPos:K,backgroundStyle:D==null?void 0:D.tooltip,className:T==null?void 0:T.tooltip}):null,k?v.jsx(Tr,{open:E!==void 0,onClose:()=>{N(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(k,E)}})}):null]})}function mw(t){const{data:e,graphTitle:r,colors:n,suffix:a="",sources:i,prefix:o="",graphDescription:l,leftMargin:s=0,rightMargin:f=0,topMargin:c=0,bottomMargin:h=0,height:d,width:m,footNote:g,colorDomain:y,colorLegendTitle:b,padding:S,backgroundColor:w=!1,showLabels:C=!0,relativeHeight:k,tooltip:_,onSeriesMouseOver:D,showColorScale:T=!0,showValues:A=!0,graphID:M,highlightedDataPoints:E=[],onSeriesMouseClick:N,graphDownload:Y=!1,dataDownload:ne=!1,language:K="en",showNAColor:B=!0,minHeight:j=0,theme:$="light",ariaLabel:V,resetSelectionOnDoubleClick:z=!0,detailsOnClick:W,styles:G,classNames:ae}=t,[U,H]=I.useState(0),[R,ee]=I.useState(0),[J,Z]=I.useState(void 0),re=I.useRef(null),te=I.useRef(null);return I.useEffect(()=>{const F=new ResizeObserver(q=>{H(m||q[0].target.clientWidth||620),ee(d||q[0].target.clientHeight||480)});return re.current&&(ee(re.current.clientHeight||480),H(re.current.clientWidth||620),m||F.observe(re.current)),()=>F.disconnect()},[m,d]),v.jsx("div",{className:`${$||"light"} flex ${m?"w-fit grow-0":"w-full grow"}`,dir:K==="he"||K==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${w?w===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${K||"en"}`,ae==null?void 0:ae.graphContainer),style:{...(G==null?void 0:G.graphContainer)||{},...w&&w!==!0?{backgroundColor:w}:{}},id:M,ref:te,"aria-label":V||`${r?`The graph shows ${r}. `:""}This is a chart where data points are represented by squares, and their sizes reflect their values. ${l?` ${l}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:w?S||"1rem":S||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||l||Y||ne?v.jsx(Zt,{styles:{title:G==null?void 0:G.title,description:G==null?void 0:G.description},classNames:{title:ae==null?void 0:ae.title,description:ae==null?void 0:ae.description},graphTitle:r,graphDescription:l,width:m,graphDownload:Y?te.current:void 0,dataDownload:ne?e.map(F=>F.data).filter(F=>F!==void 0).length>0?e.map(F=>F.data).filter(F=>F!==void 0):e.filter(F=>F!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[T&&e.filter(F=>F.color).length!==0?v.jsx(Cn,{width:m,colorLegendTitle:b,colors:n||Qe[$].categoricalColors.colors,colorDomain:y||Bt(e.filter(F=>F.color),"color").map(F=>F.color),setSelectedColor:Z,showNAColor:B}):null,v.jsx("div",{className:"flex flex-col grow justify-center w-full leading-0",ref:re,"aria-label":"Graph area",children:(m||U)&&(d||R)?v.jsx(Eye,{data:e.filter(F=>!Fe(F.size)),colors:e.filter(F=>F.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[$].categoricalColors.colors,colorDomain:e.filter(F=>F.color).length===0?[]:y||Bt(e.filter(F=>F.color),"color").map(F=>F.color),width:m||U,height:Math.max(j,d||(k?j?(m||U)*k>j?(m||U)*k:j:(m||U)*k:R)),leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,showLabels:C,showValues:A,suffix:a,prefix:o,selectedColor:J,tooltip:_,onSeriesMouseOver:D,onSeriesMouseClick:N,highlightedDataPoints:E,resetSelectionOnDoubleClick:z,detailsOnClick:W,styles:G,classNames:ae,language:K}):null})]})}),i||g?v.jsx(tr,{styles:{footnote:G==null?void 0:G.footnote,source:G==null?void 0:G.source},classNames:{footnote:ae==null?void 0:ae.footnote,source:ae==null?void 0:ae.source},sources:i,footNote:g,width:m}):null]})})})})}function YH(t){const{data:e,size:r=200,graphTitle:n,sources:a,colors:i=Qe.light.categoricalColors.colors,graphDescription:o,totalNoOfDots:l=100,unitPadding:s=3,gridSize:f=10,footNote:c,padding:h,backgroundColor:d=!1,graphID:m,graphDownload:g=!1,language:y="en",showColorScale:b=!0,showStrokeForWhiteDots:S=!0,note:w,dataDownload:C=!1,theme:k="light",width:_,height:D,minHeight:T=0,relativeHeight:A,ariaLabel:M,styles:E,classNames:N}=t,Y=fr(e.map($=>$.value)),ne=I.useRef(null),K=r/f,B=(K-s*2)/2;if(B<=0)return console.error("The size of single unit is less than or equal to zero. Check values for ((dimension / gridSize) - (padding * 2)) / 2 is not less than or equal to 0."),null;const j=[];return e.forEach(($,V)=>{const z=Math.round($.value/Y*l);for(let W=0;W<z;W+=1)j.push({color:i[V]})}),v.jsx("div",{className:`${k||"light"} flex ${_?"w-fit grow-0":"w-full grow"}`,dir:y==="he"||y==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${d?d===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${y||"en"}`,N==null?void 0:N.graphContainer),style:{...(E==null?void 0:E.graphContainer)||{},minHeight:"inherit",...d&&d!==!0?{backgroundColor:d}:{}},id:m,ref:ne,"aria-label":M||`${n?`The graph shows ${n}. `:""}${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:d?h||"1rem":h||0},children:v.jsxs("div",{className:"flex flex-col gap-3 w-full grow",children:[n||o||g?v.jsx(Zt,{styles:{title:E==null?void 0:E.title,description:E==null?void 0:E.description},classNames:{title:N==null?void 0:N.title,description:N==null?void 0:N.description},graphTitle:n,graphDescription:o,width:_,graphDownload:g?ne.current:void 0,dataDownload:C?e.map($=>$.data).filter($=>$!==void 0).length>0?e.map($=>$.data).filter($=>$!==void 0):e.filter($=>$!==void 0):null}):null,w?v.jsx(tP,{marginBottom:"2xs",className:"text-primary-gray-700 dark:text-primary-gray-100 font-bold",style:{width:_?`${_}px`:"100%"},children:w}):null,v.jsxs("div",{className:"flex grow flex-col gap-4 justify-between",children:[v.jsxs("div",{children:[b?v.jsx("div",{className:"mb-4 leading-0",style:{width:_?`${_}px`:"100%"},"aria-label":"Color legend",children:v.jsx("div",{className:"flex mb-0 flex-wrap gap-x-1 gap-y-4",children:e.map(($,V)=>v.jsxs("div",{className:"flex gap-2 items-center",children:[v.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:i[V]}}),v.jsxs(or,{marginBottom:"none",size:"sm",className:"text-primary-gray-700 dark:text-primary-gray-100",children:[$.label,":"," ",v.jsx("span",{className:"font-bold",children:_t($.value)})]})]},V))})}):null,v.jsx("div",{"aria-label":"Graph area",children:v.jsx("svg",{width:`${_||r}px`,height:`${Math.max(T,D?A&&_?T?_*A>T?_*A:T:_*A:D:Math.floor((l-1)/f)*K+K/2+B+5)}px`,direction:"ltr",viewBox:`0 0 ${_||r} ${Math.max(T,D?A&&_?T?_*A>T?_*A:T:_*A:D:Math.floor((l-1)/f)*K+K/2+B+5)}`,children:v.jsx("g",{children:j.map(($,V)=>v.jsx("circle",{cx:V%f*K+K/2,cy:Math.floor(V/f)*K+K/2,style:{fill:$.color,...S?{}:{stroke:$.color},strokeWidth:1},className:($.color.toLowerCase()==="#fff"||$.color.toLowerCase()==="#ffffff"||$.color.toLowerCase()==="white")&&S?"stroke-primary-gray-400 dark:stroke-primary-gray-500":"",r:B},V))})})})]}),a||c?v.jsx(tr,{styles:{footnote:E==null?void 0:E.footnote,source:E==null?void 0:E.source},sources:a,footNote:c,width:_}):null]})]})})})})}function jye(t){const{data:e,showColumnLabels:r,leftMargin:n,rightMargin:a,truncateBy:i,width:o,height:l,topMargin:s,bottomMargin:f,tooltip:c,onSeriesMouseOver:h,suffix:d,prefix:m,showValues:g,colorDomain:y,colors:b,noDataColor:S,scaleType:w,showRowLabels:C,selectedColor:k,onSeriesMouseClick:_,resetSelectionOnDoubleClick:D,detailsOnClick:T,styles:A,classNames:M}=t,E={top:s,bottom:f,left:n,right:a},[N,Y]=I.useState(void 0),[ne,K]=I.useState(void 0),[B,j]=I.useState(void 0),[$,V]=I.useState(void 0),z=o-E.left-E.right,W=l-E.top-E.bottom,G=Bt(e,Z=>Z.column).map(Z=>Z.column),ae=Bt(e,Z=>Z.row).map(Z=>Z.row),U=Un().domain(ae).range([0,W]),H=U.bandwidth(),R=Un().domain(G).range([0,z]),ee=R.bandwidth(),J=w==="categorical"?Ys().domain(y).range(b):w==="threshold"?P2().domain(y).range(b):br().domain(y).range(b);return v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${o}px`,height:`${l}px`,viewBox:`0 0 ${o} ${l}`,style:{marginLeft:"auto",marginRight:"auto"},direction:"ltr",children:[v.jsx("g",{transform:`translate(${E.left},0)`,children:r?G.map((Z,re)=>{var te,F;return v.jsx(f4,{y:0,x:R(Z),width:ee,height:E.top-5,value:`${Z}`.length<i?`${Z}`:`${`${Z}`.substring(0,i)}...`,style:(te=A==null?void 0:A.xAxis)==null?void 0:te.labels,className:(F=M==null?void 0:M.xAxis)==null?void 0:F.labels,alignment:"bottom"},re)}):null}),v.jsx("g",{transform:`translate(0,${E.top})`,children:C?ae.map((Z,re)=>{var te,F;return v.jsx(Y2,{value:`${Z}`.length<i?`${Z}`:`${`${Z}`.substring(0,i)}...`,y:U(Z),x:0,width:E.left,height:H,alignment:"right",style:(te=A==null?void 0:A.yAxis)==null?void 0:te.labels,className:(F=M==null?void 0:M.yAxis)==null?void 0:F.labels},re)}):null}),v.jsxs("g",{transform:`translate(${E.left},${E.top})`,children:[ae.map((Z,re)=>v.jsx("g",{transform:`translate(0,${U(Z)})`,children:G.map((te,F)=>v.jsx("rect",{x:R(te),y:0,width:ee,height:H,style:{fill:S},className:"stroke-1 stroke-primary-white dark:stroke-primary-gray-700"},F))},re)),e.filter(Z=>!Fe(Z.value)).map((Z,re)=>{const te=Fe(Z.value)?S:J(Z.value);return v.jsxs("g",{transform:`translate(${R(Z.column)},${U(Z.row)})`,onMouseEnter:F=>{K(Z),V(F.clientY),j(F.clientX),h&&h(Z)},onClick:()=>{(_||T)&&(Sr(N,Z)&&D?(Y(void 0),_==null||_(void 0)):(Y(Z),_==null||_(Z)))},onMouseMove:F=>{K(Z),V(F.clientY),j(F.clientX)},onMouseLeave:()=>{K(void 0),j(void 0),V(void 0),h&&h(void 0)},opacity:k?k===te?1:.3:1,children:[v.jsx("rect",{x:0,y:0,width:ee,height:H,style:{fill:te},className:"stroke-1 stroke-primary-white dark:stroke-primary-gray-700"}),g&&!Fe(Z.value)?v.jsx("foreignObject",{y:0,x:0,width:ee,height:H,children:v.jsx("div",{className:"flex flex-col justify-center items-center h-inherit p-1",children:v.jsx("p",{className:Be("text-xs text-center m-0 leading-[1.25] graph-value",M==null?void 0:M.graphObjectValues),style:{color:Bi(te),...(A==null?void 0:A.graphObjectValues)||{}},children:typeof Z.value=="string"?`${m} ${Z.value} ${d}`:_t(Z.value,m,d)})})},re):null]},re)}),ne?v.jsx("rect",{x:R(ne.column),y:U(ne.row),width:ee,height:H,style:{fill:"none",fillOpacity:0,strokeWidth:1.5},className:"stroke-primary-gray-700 dark:stroke-primary-gray-300"}):null]})]}),ne&&c&&B&&$?v.jsx(yr,{data:ne,body:c,xPos:B,yPos:$,backgroundStyle:A==null?void 0:A.tooltip,className:M==null?void 0:M.tooltip}):null,T?v.jsx(Tr,{open:N!==void 0,onClose:()=>{Y(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(T,N)}})}):null]})}function XH(t){const{colorLegendTitle:e,colorDomain:r,colors:n,width:a,className:i}=t;return v.jsxs("div",{className:Be("flex gap-0 flex-wrap justify-center leading-0",i),style:{maxWidth:a?`${a}px`:"none"},"aria-label":"Color legend",children:[e&&e!==""?v.jsx(or,{size:"sm",marginBottom:"2xs",className:"w-full text-center",children:e}):null,v.jsxs("div",{className:"flex gap-0 flex-wrap justify-center w-full min-w-[360px] leading-0",children:[v.jsx("div",{className:"h-4 mb-1 w-full min-w-[360px]",style:{background:`linear-gradient(90deg, ${n[0]} 0%, ${n[1]} 100%)`}}),v.jsxs("div",{className:"flex justify-between w-full min-w-[360px]",children:[v.jsx(or,{marginBottom:"none",size:"sm",children:_t(r[0],"","")}),v.jsx(or,{marginBottom:"none",size:"sm",children:_t(r[1],"","")})]})]})]})}function KH(t){const{colorLegendTitle:e,colorDomain:r,colors:n,setSelectedColor:a,width:i,naColor:o,className:l,showNAColor:s}=t,[f,c]=I.useState(void 0),h=o?320:360;return v.jsxs("div",{className:Be("flex flex-wrap gap-0 justify-center leading-0",l),style:{maxWidth:i?`${i}px`:"none"},"aria-label":"Color legend",children:[e&&e!==""?v.jsx(or,{size:"sm",marginBottom:"2xs",className:"w-full text-center",children:e}):null,v.jsx("svg",{width:"100%",viewBox:"0 0 360 30",style:{maxWidth:"360px"},direction:"ltr",children:v.jsxs("g",{children:[r.map((d,m)=>v.jsxs("g",{onMouseOver:()=>{c(n[m]),a(n[m])},onMouseLeave:()=>{c(void 0),a(void 0)},className:"cursor-pointer",children:[v.jsx("rect",{x:m*h/n.length+1,y:1,width:h/n.length-2,height:8,className:`stroke-1 ${f===n[m]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:n[m],...f!==n[m]?{stroke:n[m]}:{}}}),v.jsx("text",{x:(m+1)*h/n.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"middle"},children:_t(d,"","")})]},m)),v.jsx("g",{children:v.jsx("rect",{onMouseOver:()=>{c(n[r.length]),a(n[r.length])},onMouseLeave:()=>{c(void 0),a(void 0)},x:r.length*h/n.length+1,y:1,width:h/n.length-2,height:8,className:`cursor-pointer stroke-1 ${f===n[r.length]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:n[r.length],...f!==n[r.length]?{stroke:n[r.length]}:{}}})}),s?v.jsxs("g",{onMouseOver:()=>{c(o||"#D4D6D8"),a(o||"#D4D6D8")},onMouseLeave:()=>{c(void 0),a(void 0)},className:"cursor-pointer",children:[v.jsx("rect",{x:335,y:1,width:24,height:8,className:`stroke-1 ${f===o?"stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:o||"#D4D6D8",...f!==o?{stroke:o}:{},strokeWidth:1}}),v.jsx("text",{x:337.5,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"start"},children:"NA"})]}):null]})})]})}function JH(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,showColumnLabels:o=!0,leftMargin:l=100,rightMargin:s=10,truncateBy:f=999,height:c,width:h,scaleType:d,colorDomain:m,footNote:g,colorLegendTitle:y,padding:b,backgroundColor:S=!1,topMargin:w=30,bottomMargin:C=10,tooltip:k,onSeriesMouseOver:_,suffix:D="",prefix:T="",showRowLabels:A=!0,relativeHeight:M,showValues:E,graphID:N,noDataColor:Y=Qe.gray,showColorScale:ne=!0,onSeriesMouseClick:K,graphDownload:B=!1,dataDownload:j=!1,fillContainer:$=!0,language:V="en",showNAColor:z=!0,minHeight:W=0,theme:G="light",ariaLabel:ae,resetSelectionOnDoubleClick:U=!0,detailsOnClick:H,styles:R,classNames:ee}=t,[J,Z]=I.useState(0),[re,te]=I.useState(0),[F,q]=I.useState(void 0),X=I.useRef(null),ie=I.useRef(null);I.useEffect(()=>{const de=new ResizeObserver(he=>{Z(h||he[0].target.clientWidth||620),te(c||he[0].target.clientHeight||480)});return X.current&&(te(X.current.clientHeight||480),Z(X.current.clientWidth||620),h||de.observe(X.current)),()=>de.disconnect()},[h,c]);const ce=d||(typeof m[0]=="string"?"categorical":m.length===2?"linear":"threshold");return v.jsx("div",{className:`${G||"light"} flex ${h?"grow-0":"grow"} ${$?"w-full":"w-fit"}`,dir:V==="he"||V==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${S?S===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${V||"en"}`,ee==null?void 0:ee.graphContainer),style:{...(R==null?void 0:R.graphContainer)||{},...S&&S!==!0?{backgroundColor:S}:{}},id:N,ref:ie,"aria-label":ae||`${r?`The graph shows ${r}. `:""}This is a heatmap. ${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:S?b||"1rem":b||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||B||j?v.jsx(Zt,{styles:{title:R==null?void 0:R.title,description:R==null?void 0:R.description},classNames:{title:ee==null?void 0:ee.title,description:ee==null?void 0:ee.description},graphTitle:r,graphDescription:i,width:h,graphDownload:B?ie.current:void 0,dataDownload:j?e.map(de=>de.data).filter(de=>de!==void 0).length>0?e.map(de=>de.data).filter(de=>de!==void 0):e.filter(de=>de!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[ne?ce==="categorical"?v.jsx(Cn,{width:$?void 0:h,colorLegendTitle:y,colors:n||(typeof m[0]=="string"?Qe[G].categoricalColors.colors:m.length===2?[Qe[G].sequentialColors.neutralColorsx09[0],Qe[G].sequentialColors.neutralColorsx09[8]]:Qe[G].sequentialColors[`neutralColorsx0${m.length+1}`]),colorDomain:m.map(de=>`${de}`),setSelectedColor:q,showNAColor:z}):ce==="threshold"?v.jsx(KH,{width:$?void 0:h,colorLegendTitle:y,colors:n||(typeof m[0]=="string"?Qe[G].categoricalColors.colors:m.length===2?[Qe[G].sequentialColors.neutralColorsx09[0],Qe[G].sequentialColors.neutralColorsx09[8]]:Qe[G].sequentialColors[`neutralColorsx0${m.length+1}`]),colorDomain:m,setSelectedColor:q,naColor:Y,showNAColor:z}):v.jsx(XH,{width:$?void 0:h,colorLegendTitle:y,colors:n||[Qe[G].sequentialColors.neutralColorsx09[0],Qe[G].sequentialColors.neutralColorsx09[8]],colorDomain:m}):null,v.jsx("div",{className:"flex grow flex-col justify-center w-full leading-0",ref:X,"aria-label":"Graph area",children:(h||J)&&(c||re)?v.jsx(jye,{data:e,colorDomain:m,width:h||J,colors:n||(typeof m[0]=="string"?Qe[G].categoricalColors.colors:m.length===2?[Qe[G].sequentialColors.neutralColorsx09[0],Qe[G].sequentialColors.neutralColorsx09[8]]:Qe[G].sequentialColors[`neutralColorsx0${m.length+1}`]),noDataColor:Y,scaleType:ce,height:Math.max(W,c||(M?W?(h||J)*M>W?(h||J)*M:W:(h||J)*M:re)),showColumnLabels:o,leftMargin:l,rightMargin:s,topMargin:w,bottomMargin:C,selectedColor:F,truncateBy:f,showRowLabels:A,tooltip:k,onSeriesMouseOver:_,showValues:E,suffix:D,prefix:T,onSeriesMouseClick:K,resetSelectionOnDoubleClick:U,detailsOnClick:H,styles:R,classNames:ee}):null})]})}),a||g?v.jsx(tr,{styles:{footnote:R==null?void 0:R.footnote,source:R==null?void 0:R.source},classNames:{footnote:ee==null?void 0:ee.footnote,source:ee==null?void 0:ee.source},sources:a,footNote:g,width:h}):null]})})})})}const FM=t=>t.map(n=>n||1).reduce((n,a)=>n+a,0);function ZH(t){var $;const{width:e,height:r,graphTitle:n,sources:a,graphDescription:i,footNote:o,graphID:l,data:s,columnData:f,onSeriesMouseClick:c,language:h="en",theme:d="light",ariaLabel:m,backgroundColor:g=!1,padding:y,resetSelectionOnDoubleClick:b=!0,styles:S,classNames:w}=t,[C,k]=I.useState(void 0),[_,D]=I.useState(void 0),[T,A]=I.useState("asc"),[M,E]=I.useState(void 0),[N,Y]=I.useState({}),[ne,K]=I.useState(f.filter(V=>V.filterOptions&&V.filterOptions.length>0).map(V=>({id:V.columnId,option:V.filterOptions}))),[B,j]=I.useState(s);return I.useEffect(()=>{const V=[];s.forEach(z=>{let W=!0;ne.forEach(G=>{if(typeof z[G.id]!="object"&&typeof z[G.id]!="function"&&typeof z[G.id]!="symbol")if(f[f.findIndex(ae=>ae.columnId===G.id)].separator){const ae=z[G.id].split(f[f.findIndex(U=>U.columnId===G.id)].separator);K3(ae,G.option).length===0&&(W=!1)}else G.option.indexOf(z[G.id])===-1&&(W=!1)}),W&&V.push(z)}),j(C&&s?T==="asc"?Ut(V,[C]):Ut(V,[C]).reverse():V)},[C,T,s,ne,f]),v.jsx("div",{className:`${d||"light"} flex ${e?"w-fit grow-0":"w-full grow"}`,dir:h==="he"||h==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${g?g===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${h||"en"}`,w==null?void 0:w.graphContainer),style:{...(S==null?void 0:S.graphContainer)||{},...g&&g!==!0?{backgroundColor:g}:{}},id:l,"aria-label":m||`${n?`The graph shows ${n}. `:""}This is an data table. ${i?` ${i}`:""}`,children:v.jsxs("div",{className:"flex grow",style:{padding:g?y||"1rem":y||0},children:[v.jsxs("div",{className:"flex flex-col gap-3 w-full justify-between grow",children:[n||i?v.jsx(Zt,{styles:{title:S==null?void 0:S.title,description:S==null?void 0:S.description},classNames:{title:w==null?void 0:w.title,description:w==null?void 0:w.description},graphTitle:n,graphDescription:i,width:e}):null,v.jsx("div",{className:"grow flex flex-col justify-center",children:v.jsx("div",{className:"undp-scrollbar",style:{width:e?`${e}px`:"100%",height:r?`${r}px`:"auto"},children:s?v.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse"},children:[v.jsx("thead",{className:"text-left bg-primary-gray-300 dark:bg-primary-gray-550",children:v.jsx("tr",{children:f==null?void 0:f.map((V,z)=>{var W;return v.jsx("th",{className:"text-primary-gray-700 dark:text-primary-gray-100 text-sm",style:{width:`calc(${100*(V.columnWidth||1)/FM(f.map(G=>G.columnWidth||1))}%`},children:v.jsxs("div",{className:"flex gap-2 justify-between items-center p-4",children:[v.jsx(or,{size:"sm",marginBottom:"none",className:`w-fit grow text-${V.align||"left"} font-bold`,children:V.columnTitle||V.columnId}),V.sortable?v.jsx("button",{type:"button",className:"bg-transparent cursor-pointer p-0 m-0 border-0",onClick:()=>{C===V.columnId?(T==="asc"&&A("desc"),T==="desc"&&k(void 0)):(k(V.columnId),A("asc"))},children:C===V.columnId?T==="asc"?v.jsx(H3e,{}):v.jsx(z3e,{}):v.jsx(F3e,{})}):null,V.filterOptions&&V.filterOptions.length?v.jsx("button",{type:"button",className:"bg-transparent cursor-pointer m-0 p-0 border-0",onClick:G=>{if(M===V.columnId)E(void 0);else if(G.currentTarget){E(V.columnId);const ae=G.currentTarget.getBoundingClientRect();Y({top:ae.bottom+window.scrollY,left:ae.left+window.scrollX-160<0?ae.left+window.scrollX:ae.left+window.scrollX-160,width:"10rem"})}},children:ne[ne.findIndex(G=>G.id===V.columnId)].option.length===((W=V.filterOptions)==null?void 0:W.length)?v.jsx(q3e,{}):v.jsx(W3e,{})}):null]})},z)})})}),v.jsx("tbody",{children:B==null?void 0:B.map((V,z)=>v.jsx("tr",{className:`cursor-${c?"pointer":"auto"} border-b border-b-primary-gray-400 dark:border-b-primary-gray-500 ${Sr(_,V)?"bg-primary-gray-200 dark:bg-primary-gray-600":"bg-transparent"}`,onClick:()=>{c&&(Sr(_,V)&&b?(D(void 0),c(void 0)):(D(V),c(V)))},children:f.map((W,G)=>v.jsx("td",{className:`text-primary-gray-700 dark:text-primary-gray-100 text-sm text-${W.align||"left"}`,style:{width:`calc(${100*(V.columnWidth||1)/FM(f.map(ae=>ae.columnWidth||1))}%`},children:v.jsx("div",{className:`text-primary-gray-700 dark:text-primary-gray-100 flex p-4 ${W.align==="right"?"justify-end":W.align==="center"?"justify-center":"justify-start"}`,children:typeof V[W.columnId]=="number"?v.jsx(or,{marginBottom:"none",size:"sm",className:`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${W.chip?"grow-0 rounded-sm p-2":"grow rounded-none p-0"} text-${W.align||"left"} ${W.chip?W.chipColors?"":"bg-primary-gray-300 dark:bg-primary-gray-500":"bg-transparent"}`,style:{...W.chip&&W.chipColors?{backgroundColor:W.chipColors[W.chipColors.findIndex(ae=>ae.value===V[W.columnId])].color}:{}},children:_t(V[W.columnId],W.prefix,W.suffix)}):typeof V[W.columnId]=="string"?W.separator?v.jsx("div",{className:"text-primary-gray-700 dark:text-primary-gray-100 flex flex-wrap gap-2",children:V[W.columnId].split(W.separator).map((ae,U)=>v.jsx(or,{marginBottom:"none",size:"sm",className:`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${W.chip?"grow-0 rounded-sm p-2":"grow rounded-none p-0"} text-${W.align||"left"} ${W.chip?W.chipColors?"":"bg-primary-gray-300 dark:bg-primary-gray-500":"bg-transparent"}`,style:{...W.chip&&W.chipColors?{backgroundColor:W.chipColors[W.chipColors.findIndex(H=>H.value===V[W.columnId])].color}:{}},children:`${W.prefix||""}${ae}${W.suffix||""}`},U))}):v.jsx(or,{marginBottom:"none",size:"sm",className:`text-primary-gray-700 dark:text-primary-gray-100 w-fit ${W.chip?"grow-0 rounded-sm p-2":"grow rounded-none p-0"} text-${W.align||"left"} ${W.chip?W.chipColors?"":"bg-primary-gray-300 dark:bg-primary-gray-500":"bg-transparent"}`,style:{...W.chip&&W.chipColors?{backgroundColor:W.chipColors[W.chipColors.findIndex(ae=>ae.value===V[W.columnId])].color}:{}},children:`${W.prefix||""}${V[W.columnId]}${W.suffix||""}`}):v.jsx("div",{children:V[W.columnId]})})},G))},z))})]}):null})}),a||o?v.jsx(tr,{styles:{footnote:S==null?void 0:S.footnote,source:S==null?void 0:S.source},classNames:{footnote:w==null?void 0:w.footnote,source:w==null?void 0:w.source},sources:a,footNote:o,width:e}):null]}),M&&v.jsx("div",{style:N,className:"absolute p-3 border z-[1000] rounded-sm bg-primary-white dark:bg-primary-gray-700 border-primary-gray-300 dark:border-primary-gray-550",children:v.jsxs("div",{className:"max-w-60",children:[v.jsx(or,{size:"sm",marginBottom:"2xs",className:"font-bold",children:"Filter data by"}),v.jsx("div",{className:"flex flex-col gap-2",children:($=f[f.findIndex(V=>V.columnId===M)].filterOptions)==null?void 0:$.map((V,z)=>v.jsx("div",{children:v.jsxs("label",{className:"undp-viz-label",children:[v.jsx("input",{type:"checkbox",className:"undp-viz-checkbox",checked:ne[ne.findIndex(W=>W.id===M)].option.indexOf(V)!==-1,onChange:()=>{const W=ne.findIndex(ae=>ae.id===M),G=[...ne[W].option];if(G.indexOf(V)!==-1){G.splice(G.indexOf(V),1);const ae=[...ne];ae[W].option=G,K(ae)}else{G.push(V);const ae=[...ne];ae[W].option=G,K(ae)}}}),V]},z)},z))})]})})]})})})}function J3(t){if(t!==void 0)return Array.isArray(t)?t.map(e=>({value:e,label:e})):{value:t,label:t}}const Lye=t=>t?Object.entries(t).map(([r,n])=>Array.isArray(n)?{" ":r,value:`"${n.join("; ")}"`}:{" ":r,value:`"${n}"`}):{},zM=(t,e,r)=>e.length===0?t:t.filter(n=>e.some(a=>{var i;return(i=n[a])==null?void 0:i.toLowerCase().includes(r.toLowerCase())}));function QH(t){const{width:e,height:r,graphTitle:n,sources:a,graphDescription:i,footNote:o,graphID:l,data:s,onSeriesMouseClick:f,language:c="en",theme:h="light",ariaLabel:d,cardTemplate:m,cardBackgroundColor:g,cardFilters:y=[],cardSortingOptions:b,cardSearchColumns:S=[],cardMinWidth:w=320,backgroundColor:C=!1,padding:k,detailsOnClick:_,allowDataDownloadOnDetail:D=!1,noOfItemsInAPage:T,uiMode:A="normal",styles:M,classNames:E}=t,[N,Y]=I.useState(s),[ne,K]=I.useState(1),[B,j]=I.useState(void 0),[$,V]=I.useState(""),[z,W]=I.useState([]),[G,ae]=I.useState(b?!b.defaultValue||b.options.findIndex(R=>R.label===b.defaultValue)===-1?b.options[0]:b.options[b.options.findIndex(R=>R.label===b.defaultValue)]:void 0),U=I.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]);I.useEffect(()=>{ae(b?!b.defaultValue||b.options.findIndex(R=>R.label===b.defaultValue)===-1?b.options[0]:b.options[b.options.findIndex(R=>R.label===b.defaultValue)]:void 0)},[b]),I.useEffect(()=>{const R=y.map(ee=>({filter:ee.column,label:ee.label||`Filter by ${ee.column}`,singleSelect:!0,clearable:!0,defaultValue:J3(ee.defaultValue),availableValues:J0(s,ee.column).filter(J=>{var Z;return!((Z=ee.excludeValues)!=null&&Z.includes(`${J}`))}).map(J=>({value:J,label:J})),width:ee.width}));W(R)},[s,y]);const H=I.useCallback((R,ee)=>{W(J=>J.map(Z=>Z.filter===R?{...Z,value:ee}:Z))},[]);return I.useEffect(()=>{const R=s.filter(ee=>z.every(J=>J.value&&f1([J.value]).length>0?K3(f1([ee[J.filter]]),f1([J.value]).map(Z=>Z.value)).length>0:!0));Y(G?Ut(R,G==null?void 0:G.value,G==null?void 0:G.type):R)},[z,s,G]),I.useEffect(()=>{K(1)},[N,S,$]),v.jsx("div",{className:`${h||"light"} flex ${e?"w-fit grow-0":"w-full grow"}`,dir:c==="he"||c==="ar"?"rtl":void 0,children:v.jsxs("div",{className:Be(`${C?C===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${c||"en"}`,E==null?void 0:E.graphContainer),style:{...(M==null?void 0:M.graphContainer)||{},...C&&C!==!0?{backgroundColor:C}:{}},id:l,"aria-label":d||`${n?`The graph shows ${n}. `:""}This is an list of cards. ${i?` ${i}`:""}`,children:[v.jsx("div",{className:"flex grow",style:{padding:C?k||"1rem":k||0},children:v.jsxs("div",{className:"flex flex-col grow gap-3 w-full justify-between",children:[n||i?v.jsx(Zt,{styles:{title:M==null?void 0:M.title,description:M==null?void 0:M.description},classNames:{title:E==null?void 0:E.title,description:E==null?void 0:E.description},graphTitle:n,graphDescription:i,width:e}):null,b||z.length>0?v.jsxs("div",{className:"flex gap-4 flex-wrap items-start w-full",children:[b?v.jsxs("div",{className:"grow shrink-0 min-w-[240px]",style:{width:b.width||"calc(25% - 0.75rem)"},children:[v.jsx(or,{marginBottom:"xs",size:"sm",className:"text-primary-gray-700 dark:text-primary-gray-100",children:"Sort by"}),v.jsx(s1,{options:b.options,isRtl:c==="he"||c==="ar",isSearchable:!0,filterOption:Z1(U),onChange:R=>{ae(R||void 0)},variant:A,size:"sm",defaultValue:!b.defaultValue||b.options.findIndex(R=>R.label===b.defaultValue)===-1?b.options[0]:b.options[b.options.findIndex(R=>R.label===b.defaultValue)]})]}):null,z==null?void 0:z.map((R,ee)=>v.jsxs("div",{className:"grow shrink-0 min-w-[240px]",style:{width:R.width||"calc(25% - 0.75rem)"},children:[v.jsx(or,{marginBottom:"xs",size:"sm",className:"text-primary-gray-700 dark:text-primary-gray-100",children:R.label}),v.jsx(s1,{options:R.availableValues,isClearable:R.clearable===void 0?!0:R.clearable,isRtl:c==="he"||c==="ar",isSearchable:!0,variant:A,size:"sm",controlShouldRenderValue:!0,filterOption:Z1(U),onChange:J=>{H(R.filter,J)},defaultValue:R.defaultValue})]},ee))]}):null,S.length>0?v.jsx(cP,{placeholder:"Search...",value:$,onChange:R=>{V(R.target.value)},buttonVariant:"icon",inputVariant:A,showSearchButton:!1,inputSize:"sm"}):null,v.jsx("div",{className:"undp-scrollbar w-full my-0 mx-auto grid gap-4 undp-viz-data-cards-container",style:{width:e?`${e}px`:"100%",height:r?`${r}px`:"auto",gridTemplateColumns:`repeat(auto-fit, minmax(${w}px, 1fr))`},children:zM(N,S,$).filter((R,ee)=>T?ee<ne*T&&ee>=(ne-1)*T:!0).map((R,ee)=>v.jsx("div",{style:{...(M==null?void 0:M.dataCards)||{},...g&&{backgroundColor:g}},className:`w-full flex flex-col ${f||_?"cursor-pointer":"cursor-auto"}${g?"":"bg-primary-gray-200 dark:bg-primary-gray-600"} ${(E==null?void 0:E.dataCards)||""}`,onClick:()=>{f==null||f(R),_&&j(R)},dangerouslySetInnerHTML:{__html:Cr(m,R)}},ee))}),T?v.jsx(Hne,{total:zM(N,S,$).length,defaultPage:0,pageSize:T,onChange:K}):null,a||o?v.jsx(tr,{styles:{footnote:M==null?void 0:M.footnote,source:M==null?void 0:M.source},classNames:{footnote:E==null?void 0:E.footnote,source:E==null?void 0:E.source},sources:a,footNote:o,width:e}):null]})}),v.jsx(Tr,{open:B!==void 0,onClose:()=>{j(void 0)},children:_?v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(_,B)}}),D?v.jsx("div",{className:"flex",children:v.jsx(Vb,{csvData:Lye(B),headers:[{label:" ",key:" "},{label:"value",key:"value"}],buttonContent:v.jsxs("div",{className:"flex items-center gap-4",children:[typeof D=="string"?D:null,v.jsx(Bb,{})]})})}):null]}):null})]})})}function Nye(t){var re,te,F,q;const{data:e,width:r,height:n,colors:a,colorDomain:i,radius:o,leftMargin:l,rightMargin:s,topMargin:f,bottomMargin:c,tooltip:h,onSeriesMouseOver:d,highlightedDataPoints:m,selectedColor:g,minValue:y,maxValue:b,onSeriesMouseClick:S,showAxis:w,prefix:C,suffix:k,stripType:_,highlightColor:D,dotOpacity:T,resetSelectionOnDoubleClick:A,detailsOnClick:M,styles:E,classNames:N,valueColor:Y}=t,[ne,K]=I.useState(void 0),[B,j]=I.useState(void 0),[$,V]=I.useState(void 0),[z,W]=I.useState(void 0),G={top:f,bottom:c,left:l,right:s},ae=r-G.left-G.right,U=n-G.top-G.bottom,H=e.map((X,ie)=>({...X,id:`${ie}`})),R=Ut(H,X=>{const ie=(m||[]).indexOf(X.label);return ie===-1?1/0:ie}).reverse(),ee=Fe(b)?Math.max(...e.filter(X=>!Fe(X.position)).map(X=>X.position))<0?0:Math.max(...e.filter(X=>!Fe(X.position)).map(X=>X.position)):b,J=Fe(y)?Math.min(...e.filter(X=>!Fe(X.position)).map(X=>X.position))>=0?0:Math.min(...e.filter(X=>!Fe(X.position)).map(X=>X.position)):y,Z=br().domain([J,ee]).range([0,ae]).nice();return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${G.left},${G.top})`,children:[R.map((X,ie)=>v.jsxs("g",{className:"undp-viz-g-with-hover",transform:`translate(${Z(X.position)},${U/2})`,opacity:g?X.color&&a[i.indexOf(X.color)]===g?1:T:m.length!==0&&m.indexOf(X.label)!==-1?.85:T,onMouseEnter:ce=>{K(X),W(ce.clientY),V(ce.clientX),d&&d(X)},onClick:()=>{(S||M)&&(Sr(B,X)&&A?(j(void 0),S==null||S(void 0)):(j(X),S==null||S(X)))},onMouseMove:ce=>{K(X),W(ce.clientY),V(ce.clientX)},onMouseLeave:()=>{K(void 0),V(void 0),W(void 0),d&&d(void 0)},children:[_==="dot"?v.jsx("circle",{cy:0,cx:0,style:{fill:D&&m?m.indexOf(X.label)!==-1?D:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray},r:o}):v.jsx("rect",{y:0-o,x:-1,height:o*2,width:2,style:{fill:D&&m?m.indexOf(X.label)!==-1?D:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray}}),m.length!==0&&m.indexOf(X.label)!==-1?v.jsx("text",{x:0,y:0-o-5,style:{fill:Y||(D&&m?m.indexOf(X.label)!==-1?D:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray),textAnchor:"middle",...(E==null?void 0:E.graphObjectValues)||{}},className:Be("graph-value text-sm font-bold",N==null?void 0:N.graphObjectValues),children:_t(X.position,C,k)}):null]},ie)),w?v.jsxs(v.Fragment,{children:[v.jsx("text",{x:0,y:U/2+o,style:{textAnchor:"start",...((re=E==null?void 0:E.yAxis)==null?void 0:re.labels)||{}},className:Be("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",(te=N==null?void 0:N.yAxis)==null?void 0:te.labels),dy:"1em",children:_t(Z.invert(0),C,k)}),v.jsx("text",{x:ae,y:U/2+o,style:{textAnchor:"end",...((F=E==null?void 0:E.yAxis)==null?void 0:F.labels)||{}},className:Be("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",(q=N==null?void 0:N.yAxis)==null?void 0:q.labels),dy:"1em",children:_t(Z.invert(ae),C,k)})]}):null]})}),ne&&h&&$&&z?v.jsx(yr,{data:ne,body:h,xPos:$,yPos:z,backgroundStyle:E==null?void 0:E.tooltip,className:N==null?void 0:N.tooltip}):null,M?v.jsx(Tr,{open:B!==void 0,onClose:()=>{j(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(M,B)}})}):null]})}function Iye(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,height:o,width:l,footNote:s,colorDomain:f,colorLegendTitle:c,radius:h=5,padding:d,backgroundColor:m=!1,leftMargin:g=5,rightMargin:y=5,topMargin:b=10,bottomMargin:S=10,tooltip:w,relativeHeight:C,onSeriesMouseOver:k,showColorScale:_=!0,highlightedDataPoints:D=[],graphID:T,minValue:A,maxValue:M,onSeriesMouseClick:E,showAxis:N=!0,graphDownload:Y=!1,dataDownload:ne=!1,prefix:K="",suffix:B="",stripType:j="dot",language:$="en",highlightColor:V,dotOpacity:z=.3,showNAColor:W=!0,minHeight:G=0,theme:ae="light",ariaLabel:U,resetSelectionOnDoubleClick:H=!0,detailsOnClick:R,styles:ee,classNames:J,valueColor:Z}=t,[re,te]=I.useState(0),[F,q]=I.useState(0),[X,ie]=I.useState(void 0),ce=I.useRef(null),de=I.useRef(null);return I.useEffect(()=>{const he=new ResizeObserver(Oe=>{te(l||Oe[0].target.clientWidth||620),q(o||Oe[0].target.clientHeight||480)});return ce.current&&(q(ce.current.clientHeight||480),te(ce.current.clientWidth||620),l||he.observe(ce.current)),()=>he.disconnect()},[l,o]),v.jsx("div",{className:`${ae||"light"} flex ${l?"w-fit grow-0":"w-full grow"}`,dir:$==="he"||$==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${m?m===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${$||"en"}`,J==null?void 0:J.graphContainer),style:{...(ee==null?void 0:ee.graphContainer)||{},...m&&m!==!0?{backgroundColor:m}:{}},id:T,ref:de,"aria-label":U||`${r?`The graph shows ${r}. `:""}This is a strip chart showing distribution of data along the horizontal axis. Each dot represents an individual data point, helping to visualize the spread and clustering of values.${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:m?d||"1rem":d||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||Y||ne?v.jsx(Zt,{styles:{title:ee==null?void 0:ee.title,description:ee==null?void 0:ee.description},classNames:{title:J==null?void 0:J.title,description:J==null?void 0:J.description},graphTitle:r,graphDescription:i,width:l,graphDownload:Y?de.current:void 0,dataDownload:ne?e.map(he=>he.data).filter(he=>he!==void 0).length>0?e.map(he=>he.data).filter(he=>he!==void 0):e.filter(he=>he!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[_!==!1&&e.filter(he=>he.color).length!==0?v.jsx(Cn,{width:l,colorLegendTitle:c,colors:n||Qe[ae].categoricalColors.colors,colorDomain:f||Bt(e.filter(he=>he.color),"color").map(he=>he.color),setSelectedColor:ie,showNAColor:W??!0}):null,v.jsx("div",{className:"flex flex-col grow justify-center w-full leading-0",ref:ce,"aria-label":"Graph area",children:(l||re)&&(o||F)?v.jsx(Nye,{data:e,width:l||re,height:Math.max(G,o||(C?G?(l||re)*C>G?(l||re)*C:G:(l||re)*C:F)),colorDomain:e.filter(he=>he.color).length===0?[]:f||Bt(e.filter(he=>he.color),"color").map(he=>he.color),colors:e.filter(he=>he.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[ae].categoricalColors.colors,selectedColor:X,radius:h,leftMargin:g,rightMargin:y,topMargin:b,bottomMargin:S,tooltip:w,onSeriesMouseOver:k,highlightedDataPoints:D,minValue:A,maxValue:M,onSeriesMouseClick:E,showAxis:N,prefix:K,suffix:B,stripType:j,highlightColor:V,dotOpacity:z,resetSelectionOnDoubleClick:H,detailsOnClick:R,styles:ee,classNames:J,valueColor:Z}):null})]})}),a||s?v.jsx(tr,{styles:{footnote:ee==null?void 0:ee.footnote,source:ee==null?void 0:ee.source},classNames:{footnote:J==null?void 0:J.footnote,source:J==null?void 0:J.source},sources:a,footNote:s,width:l}):null]})})})})}function Pye(t){var re,te,F,q;const{data:e,width:r,height:n,colors:a,colorDomain:i,radius:o,leftMargin:l,rightMargin:s,topMargin:f,bottomMargin:c,tooltip:h,onSeriesMouseOver:d,highlightedDataPoints:m,selectedColor:g,minValue:y,maxValue:b,onSeriesMouseClick:S,showAxis:w,prefix:C,suffix:k,stripType:_,highlightColor:D,dotOpacity:T,resetSelectionOnDoubleClick:A,detailsOnClick:M,styles:E,classNames:N,valueColor:Y}=t,[ne,K]=I.useState(void 0),[B,j]=I.useState(void 0),[$,V]=I.useState(void 0),[z,W]=I.useState(void 0),G={top:f,bottom:c,left:l,right:s},ae=r-G.left-G.right,U=n-G.top-G.bottom,H=e.map((X,ie)=>({...X,id:`${ie}`})),R=Ut(H,X=>{const ie=(m||[]).indexOf(X.label);return ie===-1?1/0:ie}).reverse(),ee=Fe(b)?Math.max(...e.filter(X=>!Fe(X.position)).map(X=>X.position))<0?0:Math.max(...e.filter(X=>!Fe(X.position)).map(X=>X.position)):b,J=Fe(y)?Math.min(...e.filter(X=>!Fe(X.position)).map(X=>X.position))>=0?0:Math.min(...e.filter(X=>!Fe(X.position)).map(X=>X.position)):y,Z=br().domain([J,ee]).range([U,0]).nice();return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${G.left},${G.top})`,children:[R.map((X,ie)=>v.jsxs("g",{className:"undp-viz-g-with-hover",transform:`translate(${ae/2},${Z(X.position)})`,opacity:g?X.color&&a[i.indexOf(X.color)]===g?1:T:m.length!==0&&m.indexOf(X.label)!==-1?.85:T,onMouseEnter:ce=>{K(X),W(ce.clientY),V(ce.clientX),d&&d(X)},onClick:()=>{(S||M)&&(Sr(B,X)&&A?(j(void 0),S==null||S(void 0)):(j(X),S==null||S(X)))},onMouseMove:ce=>{K(X),W(ce.clientY),V(ce.clientX)},onMouseLeave:()=>{K(void 0),V(void 0),W(void 0),d&&d(void 0)},children:[_==="dot"?v.jsx("circle",{cy:0,cx:0,style:{fill:D&&m?m.indexOf(X.label)!==-1?D:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray},r:o}):v.jsx("rect",{x:0-o,y:-1,width:o*2,height:2,style:{fill:D&&m?m.indexOf(X.label)!==-1?D:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray}}),m.length!==0&&m.indexOf(X.label)!==-1?v.jsx("text",{y:0,dy:"0.33em",x:0+o+3,style:{fill:Y||(D&&m?m.indexOf(X.label)!==-1?D:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray:e.filter(ce=>ce.color).length===0?a[0]:X.color?a[i.indexOf(X.color)]:Qe.gray),textAnchor:"start",...(E==null?void 0:E.graphObjectValues)||{}},className:Be("graph-value text-sm font-bold",N==null?void 0:N.graphObjectValues),children:_t(X.position,C,k)}):null]},ie)),w?v.jsxs(v.Fragment,{children:[v.jsx("text",{y:0,x:ae/2+o+5,style:{textAnchor:"start",...((re=E==null?void 0:E.yAxis)==null?void 0:re.labels)||{}},className:Be("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",(te=N==null?void 0:N.yAxis)==null?void 0:te.labels),children:_t(Z.invert(0),C,k)}),v.jsx("text",{y:U,x:ae/2+o+5,style:{textAnchor:"start",...((F=E==null?void 0:E.yAxis)==null?void 0:F.labels)||{}},className:Be("fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",(q=N==null?void 0:N.yAxis)==null?void 0:q.labels),children:_t(Z.invert(U),C,k)})]}):null]})}),ne&&h&&$&&z?v.jsx(yr,{data:ne,body:h,xPos:$,yPos:z,backgroundStyle:E==null?void 0:E.tooltip,className:N==null?void 0:N.tooltip}):null,M?v.jsx(Tr,{open:B!==void 0,onClose:()=>{j(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(M,B)}})}):null]})}function Rye(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,height:o,width:l,footNote:s,colorDomain:f,colorLegendTitle:c,radius:h=5,padding:d,backgroundColor:m=!1,leftMargin:g=20,rightMargin:y=20,topMargin:b=10,bottomMargin:S=10,tooltip:w,relativeHeight:C,onSeriesMouseOver:k,showColorScale:_=!0,highlightedDataPoints:D=[],graphID:T,minValue:A,maxValue:M,onSeriesMouseClick:E,showAxis:N=!0,graphDownload:Y=!1,dataDownload:ne=!1,prefix:K="",suffix:B="",stripType:j="dot",language:$="en",highlightColor:V,dotOpacity:z=.3,showNAColor:W=!0,minHeight:G=0,theme:ae="light",ariaLabel:U,resetSelectionOnDoubleClick:H=!0,detailsOnClick:R,styles:ee,classNames:J,valueColor:Z}=t,[re,te]=I.useState(0),[F,q]=I.useState(0),[X,ie]=I.useState(void 0),ce=I.useRef(null),de=I.useRef(null);return I.useEffect(()=>{const he=new ResizeObserver(Oe=>{te(l||Oe[0].target.clientWidth||620),q(o||Oe[0].target.clientHeight||480)});return ce.current&&(q(ce.current.clientHeight||480),te(ce.current.clientWidth||620),l||he.observe(ce.current)),()=>he.disconnect()},[l,o]),v.jsx("div",{className:`${ae||"light"} flex ${l?"w-fit grow-0":"w-full grow"}`,dir:$==="he"||$==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${m?m===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${$||"en"}`,J==null?void 0:J.graphContainer),style:{...(ee==null?void 0:ee.graphContainer)||{},...m&&m!==!0?{backgroundColor:m}:{}},id:T,ref:de,"aria-label":U||`${r?`The graph shows ${r}. `:""}This is a strip chart showing distribution of data along the vertical axis. Each dot represents an individual data point, helping to visualize the spread and clustering of values.${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:m?d||"1rem":d||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||Y||ne?v.jsx(Zt,{styles:{title:ee==null?void 0:ee.title,description:ee==null?void 0:ee.description},classNames:{title:J==null?void 0:J.title,description:J==null?void 0:J.description},graphTitle:r,graphDescription:i,width:l,graphDownload:Y?de.current:void 0,dataDownload:ne?e.map(he=>he.data).filter(he=>he!==void 0).length>0?e.map(he=>he.data).filter(he=>he!==void 0):e.filter(he=>he!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[_!==!1&&e.filter(he=>he.color).length!==0?v.jsx(Cn,{width:l,colorLegendTitle:c,colors:n||Qe[ae].categoricalColors.colors,colorDomain:f||Bt(e.filter(he=>he.color),"color").map(he=>he.color),setSelectedColor:ie,showNAColor:W}):null,v.jsx("div",{className:"flex flex-col grow justify-center w-full leading-0",ref:ce,children:(l||re)&&(o||F)?v.jsx(Pye,{data:e,width:l||re,height:Math.max(G,o||(C?G?(l||re)*C>G?(l||re)*C:G:(l||re)*C:F)),colorDomain:e.filter(he=>he.color).length===0?[]:f||Bt(e.filter(he=>he.color),"color").map(he=>he.color),colors:e.filter(he=>he.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[ae].categoricalColors.colors,selectedColor:X,radius:h,leftMargin:g,rightMargin:y,topMargin:b,bottomMargin:S,tooltip:w,onSeriesMouseOver:k,highlightedDataPoints:D,minValue:A,maxValue:M,onSeriesMouseClick:E,showAxis:N,prefix:K,suffix:B,stripType:j,highlightColor:V,dotOpacity:z,resetSelectionOnDoubleClick:H,detailsOnClick:R,styles:ee,classNames:J,valueColor:Z}):null})]})}),a||s?v.jsx(tr,{styles:{footnote:ee==null?void 0:ee.footnote,source:ee==null?void 0:ee.source},classNames:{footnote:J==null?void 0:J.footnote,source:J==null?void 0:J.source},sources:a,footNote:s,width:l}):null]})})})})}function eq(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,height:o,width:l,footNote:s,colorDomain:f,colorLegendTitle:c,radius:h,padding:d,backgroundColor:m,leftMargin:g,rightMargin:y,topMargin:b,bottomMargin:S,tooltip:w,relativeHeight:C,onSeriesMouseOver:k,showColorScale:_,highlightedDataPoints:D,graphID:T,minValue:A,maxValue:M,onSeriesMouseClick:E,showAxis:N,graphDownload:Y,dataDownload:ne,prefix:K,suffix:B,stripType:j,language:$,highlightColor:V,dotOpacity:z,showNAColor:W,minHeight:G,theme:ae,ariaLabel:U,valueColor:H,resetSelectionOnDoubleClick:R,detailsOnClick:ee,orientation:J="vertical",styles:Z,classNames:re}=t;return J==="vertical"?v.jsx(Rye,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,height:o,width:l,footNote:s,colorDomain:f,colorLegendTitle:c,radius:h,padding:d,backgroundColor:m,leftMargin:g,rightMargin:y,topMargin:b,bottomMargin:S,tooltip:w,relativeHeight:C,onSeriesMouseOver:k,showColorScale:_,highlightedDataPoints:D,graphID:T,minValue:A,maxValue:M,onSeriesMouseClick:E,showAxis:N,graphDownload:Y,dataDownload:ne,prefix:K,suffix:B,stripType:j,language:$,highlightColor:V,dotOpacity:z,showNAColor:W,minHeight:G,theme:ae,ariaLabel:U,resetSelectionOnDoubleClick:R,styles:Z,valueColor:H,detailsOnClick:ee,classNames:re}):v.jsx(Iye,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,height:o,width:l,footNote:s,colorDomain:f,colorLegendTitle:c,radius:h,padding:d,backgroundColor:m,leftMargin:g,rightMargin:y,topMargin:b,bottomMargin:S,tooltip:w,relativeHeight:C,onSeriesMouseOver:k,showColorScale:_,highlightedDataPoints:D,graphID:T,minValue:A,maxValue:M,onSeriesMouseClick:E,showAxis:N,graphDownload:Y,dataDownload:ne,prefix:K,suffix:B,stripType:j,language:$,highlightColor:V,dotOpacity:z,showNAColor:W,minHeight:G,theme:ae,ariaLabel:U,resetSelectionOnDoubleClick:R,styles:Z,valueColor:H,detailsOnClick:ee,classNames:re})}function $ye(t){var Oe,Ne,Te,_e,xe,we,ge,ve,le,ue,Ce,pe,ye,be,je,$e,ut,Ie,Ze,Ke;const{data:e,width:r,height:n,barColor:a,lineColor:i,axisTitles:o,sameAxes:l,rightMargin:s,leftMargin:f,topMargin:c,bottomMargin:h,tooltip:d,showValues:m,onSeriesMouseOver:g,barPadding:y,truncateBy:b,showLabels:S,onSeriesMouseClick:w,resetSelectionOnDoubleClick:C,detailsOnClick:k,noOfTicks:_,lineSuffix:D,barSuffix:T,linePrefix:A,barPrefix:M,curveType:E,styles:N,classNames:Y}=t,ne=E==="linear"?yo:E==="step"?e2:E==="stepAfter"?r2:E==="stepBefore"?t2:Q0,[K,B]=I.useState(void 0),[j,$]=I.useState(void 0),[V,z]=I.useState(void 0),[W,G]=I.useState(void 0),ae={top:c,bottom:h,left:f+50,right:s+65},U=r-ae.left-ae.right,H=n-ae.top-ae.bottom,R=e.map((et,Pt)=>({...et,id:`${Pt}`})),ee=Un().domain(R.map(et=>`${et.id}`)).range([0,U]).paddingInner(y),J=(Oe=Br(R,et=>et.bar))!=null&&Oe.bar?((Ne=Br(R,et=>et.bar))==null?void 0:Ne.bar)>0?0:(Te=Br(R,et=>et.bar))==null?void 0:Te.bar:0,Z=(_e=Br(R,et=>et.line))!=null&&_e.line?((xe=Br(R,et=>et.line))==null?void 0:xe.line)>0?0:(we=Br(R,et=>et.line))==null?void 0:we.line:0,re=(ge=Vr(R,et=>et.bar))!=null&&ge.bar?(ve=Vr(R,et=>et.bar))==null?void 0:ve.bar:0,te=(le=Vr(R,et=>et.line))!=null&&le.line?(ue=Vr(R,et=>et.line))==null?void 0:ue.line:0,F=J<Z?J:Z,q=re>te?re:te,X=br().domain([l?F:J,l?q>0?q:0:re>0?re:0]).range([H,0]).nice(),ie=br().domain([l?F:Z,l?q>0?q:0:te>0?te:0]).range([H,0]).nice(),ce=gi().defined(et=>!Fe(et.line)).x(et=>ee(`${et.id}`)+ee.bandwidth()/2).y(et=>ie(et.line)).curve(ne),de=X.ticks(_),he=ie.ticks(_);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${ae.left},${ae.top})`,children:[v.jsxs("g",{children:[de.map((et,Pt)=>{var jt,Tt,St,tt;return v.jsxs("g",{children:[v.jsx("line",{y1:X(et),y2:X(et),x1:-15,x2:-20,style:{stroke:a,strokeWidth:1,...((jt=N==null?void 0:N.yAxis)==null?void 0:jt.gridLines)||{}},className:(Tt=Y==null?void 0:Y.yAxis)==null?void 0:Tt.gridLines}),v.jsx("text",{x:-25,y:X(et),dy:"0.33em",className:Be("text-xs",(St=Y==null?void 0:Y.yAxis)==null?void 0:St.labels),style:{textAnchor:"end",fill:a,...((tt=N==null?void 0:N.yAxis)==null?void 0:tt.labels)||{}},children:_t(et,M,T)})]},Pt)}),v.jsx(Nr,{y1:0,y2:H,x1:-15,x2:-15,classNames:{axis:(Ce=Y==null?void 0:Y.xAxis)==null?void 0:Ce.axis},styles:{axis:{stroke:a,...((pe=N==null?void 0:N.xAxis)==null?void 0:pe.axis)||{}}}}),v.jsx(nn,{x:10-ae.left,y:H/2,style:{fill:a,...((ye=N==null?void 0:N.yAxis)==null?void 0:ye.title)||{}},className:(be=Y==null?void 0:Y.yAxis)==null?void 0:be.title,text:o[0].length>100?`${o[0].substring(0,100)}...`:o[0],rotate90:!0})]}),v.jsxs("g",{children:[he.map((et,Pt)=>{var jt,Tt,St,tt;return v.jsxs("g",{children:[v.jsx("line",{y1:ie(et),y2:ie(et),x1:U+15,x2:U+20,style:{stroke:i,strokeWidth:1,...((jt=N==null?void 0:N.yAxis)==null?void 0:jt.gridLines)||{}},className:(Tt=Y==null?void 0:Y.yAxis)==null?void 0:Tt.gridLines}),v.jsx("text",{x:U+25,y:ie(et),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:i,...((St=N==null?void 0:N.yAxis)==null?void 0:St.labels)||{}},className:Be("text-xs",(tt=Y==null?void 0:Y.yAxis)==null?void 0:tt.labels),children:_t(et,A,D)})]},Pt)}),v.jsx(Nr,{y1:0,y2:H,x1:U+15,x2:U+15,classNames:{axis:(je=Y==null?void 0:Y.xAxis)==null?void 0:je.axis},styles:{axis:{stroke:i,...(($e=N==null?void 0:N.xAxis)==null?void 0:$e.axis)||{}}}}),v.jsx(nn,{x:U+ae.right-15,y:H/2,style:{fill:i,...((ut=N==null?void 0:N.yAxis)==null?void 0:ut.title)||{}},className:(Ie=Y==null?void 0:Y.yAxis)==null?void 0:Ie.title,text:o[1].length>100?`${o[1].substring(0,100)}...`:o[1],rotate90:!0})]}),v.jsx(Nr,{y1:l?X(0):H,y2:l?X(0):H,x1:-15,x2:U+15,classNames:{axis:(Ze=Y==null?void 0:Y.xAxis)==null?void 0:Ze.axis},styles:{axis:(Ke=N==null?void 0:N.xAxis)==null?void 0:Ke.axis}}),R.map((et,Pt)=>{var jt,Tt;return v.jsxs("g",{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:St=>{B(et),G(St.clientY),z(St.clientX),g&&g(et)},onClick:()=>{(w||k)&&(Sr(j,et)&&C?($(void 0),w==null||w(void 0)):($(et),w==null||w(et)))},onMouseMove:St=>{B(et),G(St.clientY),z(St.clientX)},onMouseLeave:()=>{B(void 0),z(void 0),G(void 0),g&&g(void 0)},children:[v.jsx("rect",{x:ee(`${Pt}`),y:et.bar?et.bar>0?X(et.bar):X(0):0,width:ee.bandwidth(),style:{fill:a},height:et.bar?Math.abs(X(et.bar)-X(0)):0}),m&&!Fe(et.bar)?v.jsx("text",{x:ee(`${et.id}`)+ee.bandwidth()/2,y:X(et.bar||0),style:{fill:a,textAnchor:"middle",...(N==null?void 0:N.graphObjectValues)||{}},className:Be("graph-value text-sm",Y==null?void 0:Y.graphObjectValues),dy:et.bar?et.bar>=0?"-5px":"1em":"-5px",children:_t(et.bar,M,T)}):null,S?v.jsx(f4,{value:`${et.label}`.length<b?`${et.label}`:`${`${et.label}`.substring(0,b)}...`,y:H+5,x:ee(`${et.id}`),width:ee.bandwidth(),height:ae.bottom,style:(jt=N==null?void 0:N.xAxis)==null?void 0:jt.labels,className:(Tt=Y==null?void 0:Y.xAxis)==null?void 0:Tt.labels,alignment:"top"}):null]},Pt)}),v.jsx("path",{d:ce(R),style:{stroke:i,fill:"none",strokeWidth:2}}),R.map((et,Pt)=>v.jsx("g",{children:Fe(et.line)?null:v.jsxs("g",{onMouseEnter:jt=>{B(et),G(jt.clientY),z(jt.clientX),g&&g(et)},onClick:()=>{(w||k)&&(Sr(j,et)&&C?($(void 0),w==null||w(void 0)):($(et),w==null||w(et)))},onMouseMove:jt=>{B(et),G(jt.clientY),z(jt.clientX)},onMouseLeave:()=>{B(void 0),z(void 0),G(void 0),g&&g(void 0)},children:[v.jsx("circle",{cx:ee(et.id)+ee.bandwidth()/2,cy:ie(et.line),r:U/R.length<5?0:U/R.length<20?2:4,style:{fill:i}}),m?v.jsx("text",{x:ee(`${et.id}`)+ee.bandwidth()/2,y:ie(et.line),style:{fill:i,textAnchor:"middle",...(N==null?void 0:N.graphObjectValues)||{}},className:Be("graph-value text-sm",Y==null?void 0:Y.graphObjectValues),dy:"-5px",children:_t(et.line,A,D)}):null]})},Pt))]})}),K&&d&&V&&W?v.jsx(yr,{data:K,body:d,xPos:V,yPos:W,backgroundStyle:N==null?void 0:N.tooltip,className:Y==null?void 0:Y.tooltip}):null,k?v.jsx(Tr,{open:j!==void 0,onClose:()=>{$(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(k,j)}})}):null]})}function tq(t){const{data:e,graphTitle:r,sources:n,graphDescription:a,height:i,width:o,footNote:l,padding:s,lineColor:f=Qe.light.categoricalColors.colors[1],barColor:c=Qe.light.categoricalColors.colors[0],sameAxes:h=!1,backgroundColor:d=!1,leftMargin:m=80,rightMargin:g=80,topMargin:y=20,bottomMargin:b=25,lineAxisTitle:S="Line chart",barAxisTitle:w="Bar graph",tooltip:C,relativeHeight:k,onSeriesMouseOver:_,graphID:D,graphDownload:T=!1,dataDownload:A=!1,barPadding:M=.25,truncateBy:E=999,showLabels:N=!0,onSeriesMouseClick:Y,language:ne="en",colorLegendTitle:K,minHeight:B=0,theme:j="light",ariaLabel:$,resetSelectionOnDoubleClick:V=!0,detailsOnClick:z,showValues:W=!0,noOfTicks:G=5,lineSuffix:ae="",barSuffix:U="",linePrefix:H="",barPrefix:R="",curveType:ee="curve",styles:J,classNames:Z}=t,[re,te]=I.useState(0),[F,q]=I.useState(0),X=I.useRef(null),ie=I.useRef(null);return I.useEffect(()=>{const ce=new ResizeObserver(de=>{te(o||de[0].target.clientWidth||620),q(i||de[0].target.clientHeight||480)});return X.current&&(q(X.current.clientHeight||480),te(X.current.clientWidth||620),o||ce.observe(X.current)),()=>ce.disconnect()},[o,i]),v.jsx("div",{className:`${j||"light"} flex ${o?"w-fit grow-0":"w-full grow"}`,dir:ne==="he"||ne==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${d?d===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${ne||"en"}`,Z==null?void 0:Z.graphContainer),style:{...(J==null?void 0:J.graphContainer)||{},...d&&d!==!0?{backgroundColor:d}:{}},id:D,ref:ie,"aria-label":$||`${r?`The graph shows ${r}. `:""}This is a pareto chart that shows a variable as bars and another as line chart.${a?` ${a}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:d?s||"1rem":s||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||a||T||A?v.jsx(Zt,{styles:{title:J==null?void 0:J.title,description:J==null?void 0:J.description},classNames:{title:Z==null?void 0:Z.title,description:Z==null?void 0:Z.description},graphTitle:r,graphDescription:a,width:o,graphDownload:T?ie.current:void 0,dataDownload:A?e.map(ce=>ce.data).filter(ce=>ce!==void 0).length>0?e.map(ce=>ce.data).filter(ce=>ce!==void 0):e.filter(ce=>ce!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[v.jsx(g0,{colorDomain:[w,S],colors:[c||Qe[j].categoricalColors.colors[0],f||Qe[j].categoricalColors.colors[1]],colorLegendTitle:K,showNAColor:!1}),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:X,"aria-label":"Graph area",children:(o||re)&&(i||F)?v.jsx($ye,{data:e,sameAxes:h,lineColor:f,barColor:c,width:o||re,height:Math.max(B,i||(k?B?(o||re)*k>B?(o||re)*k:B:(o||re)*k:F)),truncateBy:E,leftMargin:m,rightMargin:g,topMargin:y,bottomMargin:b,axisTitles:[w,S],tooltip:C,onSeriesMouseOver:_,barPadding:M,showLabels:N,onSeriesMouseClick:Y,resetSelectionOnDoubleClick:V,detailsOnClick:z,noOfTicks:G,lineSuffix:ae,barSuffix:U,linePrefix:H,barPrefix:R,curveType:ee,showValues:W,styles:J,classNames:Z}):null})]})}),n||l?v.jsx(tr,{styles:{footnote:J==null?void 0:J.footnote,source:J==null?void 0:J.source},classNames:{footnote:Z==null?void 0:Z.footnote,source:Z==null?void 0:Z.source},sources:n,footNote:l,width:o}):null]})})})})}function Bye(t){var ce,de,he,Oe,Ne,Te,_e,xe,we,ge,ve,le,ue,Ce,pe,ye;const{data:e,width:r,height:n,barColors:a,centerGap:i,refValues:o,maxValue:l,minValue:s,showValues:f,axisTitles:c,rightMargin:h,leftMargin:d,topMargin:m,bottomMargin:g,tooltip:y,onSeriesMouseOver:b,barPadding:S,truncateBy:w,onSeriesMouseClick:C,showTicks:k,suffix:_,prefix:D,resetSelectionOnDoubleClick:T,detailsOnClick:A,styles:M,classNames:E,noOfTicks:N}=t,[Y,ne]=I.useState(void 0),[K,B]=I.useState(void 0),[j,$]=I.useState(void 0),[V,z]=I.useState(void 0),W={top:m,bottom:g,left:d,right:h},G=r-W.left-W.right,ae=n-W.top-W.bottom,U=e.map((be,je)=>({...be,id:`${je}`})),H=Un().domain(U.map(be=>`${be.id}`)).range([ae,0]).paddingInner(S),R=Fe(l)?Math.max(...e.filter(be=>!Fe(be.leftBar)).map(be=>be.leftBar))<0?0:Math.max(...e.filter(be=>!Fe(be.leftBar)).map(be=>be.leftBar)):l,ee=Fe(s)?Math.min(...e.filter(be=>!Fe(be.leftBar)).map(be=>be.leftBar))>=0?0:Math.min(...e.filter(be=>!Fe(be.leftBar)).map(be=>be.leftBar)):s,J=Fe(l)?Math.max(...e.filter(be=>!Fe(be.rightBar)).map(be=>be.rightBar))<0?0:Math.max(...e.filter(be=>!Fe(be.rightBar)).map(be=>be.rightBar)):l,Z=Fe(s)?Math.min(...e.filter(be=>!Fe(be.rightBar)).map(be=>be.rightBar))>=0?0:Math.min(...e.filter(be=>!Fe(be.rightBar)).map(be=>be.rightBar)):s,re=ee<Z?ee:Z,te=R>J?R:J,F=br().domain([re,te]).range([0,(G-i)/2]).nice(),q=F.ticks(N),X=br().domain([re,te]).range([(G-i)/2,0]).nice(),ie=X.ticks(N);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${W.left},${W.top})`,children:[v.jsxs("g",{transform:"translate(0,0)",children:[k?v.jsx(La,{values:ie.filter(be=>be!==0),x:ie.filter(be=>be!==0).map(be=>X(be)),y1:0-m,y2:ae+W.bottom,styles:{gridLines:(ce=M==null?void 0:M.xAxis)==null?void 0:ce.gridLines,labels:(de=M==null?void 0:M.xAxis)==null?void 0:de.labels},classNames:{gridLines:(he=E==null?void 0:E.xAxis)==null?void 0:he.gridLines,labels:(Oe=E==null?void 0:E.xAxis)==null?void 0:Oe.labels},suffix:_,prefix:D,labelType:"secondary",showGridLines:!0,leftLabel:!0}):null,U.map((be,je)=>v.jsxs("g",{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:$e=>{ne(be),z($e.clientY),$($e.clientX),b&&b(be)},onClick:()=>{(C||A)&&(Sr(K,be)&&T?(B(void 0),C==null||C(void 0)):(B(be),C==null||C(be)))},onMouseMove:$e=>{ne(be),z($e.clientY),$($e.clientX)},onMouseLeave:()=>{ne(void 0),$(void 0),z(void 0),b&&b(void 0)},children:[be.leftBar?v.jsx("rect",{x:be.leftBar<0?X(0):X(be.leftBar),y:H(`${je}`),width:be.leftBar<0?X(be.leftBar)-X(0):X(0)-X(be.leftBar),style:{fill:a[0]},height:H.bandwidth()}):null,f?v.jsx("text",{x:be.leftBar?X(be.leftBar):X(ee<0?0:ee),y:H(`${je}`)+H.bandwidth()/2,style:{fill:a[0],textAnchor:be.rightBar&&be.rightBar>0?"end":"start",...(M==null?void 0:M.graphObjectValues)||{}},dx:be.rightBar&&be.rightBar>0?-5:5,dy:"0.33em",className:Be("graph-value text-sm",E==null?void 0:E.graphObjectValues),children:_t(be.rightBar,D,_)}):null]},je)),v.jsx(Nr,{y1:-2.5,y2:ae+W.bottom,x1:X(ee<0?0:ee),x2:X(ee<0?0:ee),classNames:{axis:(Ne=E==null?void 0:E.yAxis)==null?void 0:Ne.axis},styles:{axis:(Te=M==null?void 0:M.yAxis)==null?void 0:Te.axis}}),o?v.jsx(v.Fragment,{children:o.map((be,je)=>v.jsx(ti,{text:be.text,color:be.color,x:X(be.value),y1:0-W.top,y2:ae+W.bottom,textSide:"left",classNames:be.classNames,styles:be.styles},je))}):null]}),v.jsxs("g",{transform:`translate(${(G+i)/2},0)`,children:[k?v.jsx(La,{values:q.filter(be=>be!==0),x:q.filter(be=>be!==0).map(be=>F(be)),y1:0-m,y2:ae+W.bottom,styles:{gridLines:(_e=M==null?void 0:M.xAxis)==null?void 0:_e.gridLines,labels:(xe=M==null?void 0:M.xAxis)==null?void 0:xe.labels},classNames:{gridLines:(we=E==null?void 0:E.xAxis)==null?void 0:we.gridLines,labels:(ge=E==null?void 0:E.xAxis)==null?void 0:ge.labels},suffix:_,prefix:D,labelType:"secondary",showGridLines:!0}):null,U.map((be,je)=>v.jsxs("g",{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:$e=>{ne(be),z($e.clientY),$($e.clientX),b&&b(be)},onClick:()=>{(C||A)&&(Sr(K,be)&&T?(B(void 0),C==null||C(void 0)):(B(be),C==null||C(be)))},onMouseMove:$e=>{ne(be),z($e.clientY),$($e.clientX)},onMouseLeave:()=>{ne(void 0),$(void 0),z(void 0),b&&b(void 0)},children:[be.rightBar?v.jsx("rect",{x:be.rightBar>=0?F(0):F(be.rightBar),y:H(`${je}`),width:be.rightBar>=0?F(be.rightBar)-F(0):F(0)-F(be.rightBar),style:{fill:a[1]},height:H.bandwidth()}):null,f?v.jsx("text",{x:be.rightBar?F(be.rightBar):F(Z<0?0:Z),y:H(`${je}`)+H.bandwidth()/2,style:{fill:a[1],textAnchor:be.rightBar&&be.rightBar<0?"end":"start",...(M==null?void 0:M.graphObjectValues)||{}},className:Be("graph-value text-sm",E==null?void 0:E.graphObjectValues),dx:be.rightBar&&be.rightBar<0?-5:5,dy:"0.33em",children:_t(be.rightBar,D,_)}):null]},je)),v.jsx(Nr,{y1:-2.5,y2:ae+W.bottom,x1:F(Z<0?0:Z),x2:F(Z<0?0:Z),classNames:{axis:(ve=E==null?void 0:E.yAxis)==null?void 0:ve.axis},styles:{axis:(le=M==null?void 0:M.yAxis)==null?void 0:le.axis}}),o?v.jsx(v.Fragment,{children:o.map((be,je)=>v.jsx(ti,{text:be.text,color:be.color,x:F(be.value),y1:0-W.top,y2:ae+W.bottom,textSide:"right",classNames:be.classNames,styles:be.styles},je))}):null]}),v.jsx("g",{transform:`translate(${G/2},0)`,children:U.map((be,je)=>{var $e,ut;return v.jsx(Y2,{value:`${be.label}`.length<w?`${be.label}`:`${`${be.label}`.substring(0,w)}...`,y:H(`${be.id}`),x:0-i/2,width:i,height:H.bandwidth(),alignment:"center",style:($e=M==null?void 0:M.yAxis)==null?void 0:$e.labels,className:(ut=E==null?void 0:E.yAxis)==null?void 0:ut.labels},je)})}),v.jsxs("g",{transform:`translate(0,${ae})`,children:[v.jsx("text",{style:{fill:a[0],textAnchor:"end",...(ue=M==null?void 0:M.yAxis)==null?void 0:ue.title},className:Be("text-base",(Ce=E==null?void 0:E.yAxis)==null?void 0:Ce.title),x:G/2-i/2,y:0,dx:-5,dy:20,children:c[0]}),v.jsx("text",{style:{fill:a[1],textAnchor:"start",...(pe=M==null?void 0:M.yAxis)==null?void 0:pe.title},className:Be("text-base",(ye=E==null?void 0:E.yAxis)==null?void 0:ye.title),x:G/2+i/2,y:0,dx:5,dy:20,children:c[1]})]})]})}),Y&&y&&j&&V?v.jsx(yr,{data:Y,body:y,xPos:j,yPos:V,backgroundStyle:M==null?void 0:M.tooltip,className:E==null?void 0:E.tooltip}):null,A?v.jsx(Tr,{open:K!==void 0,onClose:()=>{B(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(A,K)}})}):null]})}function rq(t){const{data:e,graphTitle:r,sources:n,graphDescription:a,height:i,width:o,footNote:l,padding:s,leftBarColor:f=Qe.light.categoricalColors.colors[0],rightBarColor:c=Qe.light.categoricalColors.colors[1],backgroundColor:h=!1,leftMargin:d=20,rightMargin:m=20,topMargin:g=25,bottomMargin:y=30,rightBarTitle:b="Right bar graph",leftBarTitle:S="Left bar graph",tooltip:w,relativeHeight:C,onSeriesMouseOver:k,graphID:_,barPadding:D=.25,truncateBy:T=999,onSeriesMouseClick:A,centerGap:M=100,showValues:E=!0,maxValue:N,minValue:Y,refValues:ne=[],suffix:K="",prefix:B="",showTicks:j=!0,showColorScale:$=!1,graphDownload:V=!1,dataDownload:z=!1,language:W="en",colorLegendTitle:G,minHeight:ae=0,theme:U="light",ariaLabel:H,resetSelectionOnDoubleClick:R=!0,detailsOnClick:ee,styles:J,classNames:Z,noOfTicks:re=5}=t,[te,F]=I.useState(0),[q,X]=I.useState(0),ie=I.useRef(null),ce=I.useRef(null);return I.useEffect(()=>{const de=new ResizeObserver(he=>{F(o||he[0].target.clientWidth||620),X(i||he[0].target.clientHeight||480)});return ie.current&&(X(ie.current.clientHeight||480),F(ie.current.clientWidth||620),o||de.observe(ie.current)),()=>de.disconnect()},[o,i]),v.jsx("div",{className:`${U||"light"} flex ${o?"w-fit grow-0":"w-full grow"}`,dir:W==="he"||W==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${h?h===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${W||"en"}`,Z==null?void 0:Z.graphContainer),style:{...(J==null?void 0:J.graphContainer)||{},...h&&h!==!0?{backgroundColor:h}:{}},id:_,ref:ce,"aria-label":H||`${r?`The graph shows ${r}. `:""}This is a diverging bar chart. ${a?` ${a}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:h?s||"1rem":s||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||a||V||z?v.jsx(Zt,{styles:{title:J==null?void 0:J.title,description:J==null?void 0:J.description},classNames:{title:Z==null?void 0:Z.title,description:Z==null?void 0:Z.description},graphTitle:r,graphDescription:a,width:o,graphDownload:V?ce.current:void 0,dataDownload:z?e.map(de=>de.data).filter(de=>de!==void 0).length>0?e.map(de=>de.data).filter(de=>de!==void 0):e.filter(de=>de!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[$?v.jsx(g0,{colorLegendTitle:G,colorDomain:[S,b],colors:[f,c],showNAColor:!1}):null,v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:ie,"aria-label":"Graph area",children:(o||te)&&(i||q)?v.jsx(Bye,{data:e,barColors:[f,c],width:o||te,centerGap:M,height:Math.max(ae,i||(C?ae?(o||te)*C>ae?(o||te)*C:ae:(o||te)*C:q)),truncateBy:T,leftMargin:d,rightMargin:m,topMargin:g,bottomMargin:y,axisTitles:[S,b],tooltip:w,onSeriesMouseOver:k,barPadding:D,refValues:ne,maxValue:N,minValue:Y,showValues:E,onSeriesMouseClick:A,showTicks:j,suffix:K,prefix:B,resetSelectionOnDoubleClick:R,detailsOnClick:ee,styles:J,classNames:Z,noOfTicks:re}):null})]})}),n||l?v.jsx(tr,{styles:{footnote:J==null?void 0:J.footnote,source:J==null?void 0:J.source},classNames:{footnote:Z==null?void 0:Z.footnote,source:Z==null?void 0:Z.source},sources:n,footNote:l,width:o}):null]})})})})}function nq(t){const{data:e,graphTitle:r,sources:n,graphDescription:a,barPadding:i,showValues:o,showTicks:l,leftMargin:s,rightMargin:f,height:c,width:h,footNote:d,colors:m,padding:g,backgroundColor:y,topMargin:b,bottomMargin:S,showLabels:w,relativeHeight:C,tooltip:k,onSeriesMouseOver:_,refValues:D,graphID:T,maxValue:A,onSeriesMouseClick:M,graphDownload:E,dataDownload:N,numberOfBins:Y,truncateBy:ne,graphType:K,barGraphLayout:B,donutStrokeWidth:j,sortData:$,language:V,minHeight:z,theme:W="light",maxBarThickness:G,ariaLabel:ae,detailsOnClick:U,styles:H,classNames:R}=t,[ee,J]=I.useState([]);return I.useEffect(()=>{const re=Lie().thresholds(Y||10).value(te=>te.value)(e).map(te=>({label:`${te.x0}-${te.x1}`,size:te.length,data:{options:`${te.x0}-${te.x1}`,frequency:te.length}}));J(re)},[e,Y]),ee.length===0?v.jsx("div",{style:{width:`${h}px`,height:`${c}px`,margin:"auto"},children:v.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:v.jsx(Fo,{})})}):K==="circlePacking"?v.jsx(Qb,{colors:m||Qe.graphMainColor,graphTitle:r,graphDescription:a,footNote:d,width:h,height:c,sources:n,leftMargin:s,rightMargin:f,backgroundColor:y,padding:g,topMargin:b,bottomMargin:S,relativeHeight:C,showLabels:w,tooltip:k,onSeriesMouseOver:_,showColorScale:!1,showValues:o,graphID:T,onSeriesMouseClick:M,graphDownload:E,dataDownload:N,data:ee,language:V,minHeight:z,theme:W,ariaLabel:ae,detailsOnClick:U,styles:H,classNames:R}):K==="treeMap"?v.jsx(mw,{colors:m||Qe.graphMainColor,graphTitle:r,graphDescription:a,footNote:d,width:h,height:c,sources:n,leftMargin:s,rightMargin:f,backgroundColor:y,padding:g,topMargin:b,bottomMargin:S,relativeHeight:C,showLabels:w,tooltip:k,onSeriesMouseOver:_,showColorScale:!1,showValues:o,graphID:T,onSeriesMouseClick:M,graphDownload:E,dataDownload:N,data:ee,language:V,minHeight:z,theme:W,ariaLabel:ae,detailsOnClick:U,styles:H,classNames:R}):K==="donutChart"?v.jsx(rx,{colors:m||Qe[W].categoricalColors.colors,graphTitle:r,graphDescription:a,footNote:d,radius:h&&c?h<c?h:c:h||c||void 0,sources:n,backgroundColor:y,padding:g,tooltip:k,onSeriesMouseOver:_,graphID:T,onSeriesMouseClick:M,graphDownload:E,dataDownload:N,data:ee,strokeWidth:j,showColorScale:!0,sortData:$,language:V,theme:W,ariaLabel:ae,detailsOnClick:U,styles:H,classNames:R}):v.jsx(Hb,{colors:m||Qe.graphMainColor,graphTitle:r,graphDescription:a,footNote:d,width:h,height:c,sources:n,leftMargin:s,rightMargin:f,backgroundColor:y,padding:g,topMargin:b,bottomMargin:S,relativeHeight:C,showLabels:w,tooltip:k,onSeriesMouseOver:_,showColorScale:!1,showValues:o,graphID:T,onSeriesMouseClick:M,graphDownload:E,dataDownload:N,data:ee,barPadding:i,refValues:D,truncateBy:ne,maxValue:A,showTicks:l,sortData:$,language:V,minHeight:z,theme:W,maxBarThickness:G,ariaLabel:ae,orientation:B,detailsOnClick:U,styles:H,classNames:R})}function HM(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of t)(a=e(a,++n,t))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}function aq(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of t)(a=e(a,++n,t))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function _m(t,e){let r=0;if(e===void 0)for(let n of t)(n=+n)&&(r+=n);else{let n=-1;for(let a of t)(a=+e(a,++n,t))&&(r+=a)}return r}function Vye(t){return t.target.depth}function Fye(t,e){return t.sourceLinks.length?t.depth:e-1}function Om(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?aq(t.sourceLinks,Vye)-1:0}function x5(t){return function(){return t}}function qM(t,e){return Pc(t.source,e.source)||t.index-e.index}function WM(t,e){return Pc(t.target,e.target)||t.index-e.index}function Pc(t,e){return t.y0-e.y0}function Dm(t){return t.value}function zye(t){return t.index}function Hye(t){return t.nodes}function qye(t){return t.links}function UM(t,e){const r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function GM({nodes:t}){for(const e of t){let r=e.y0,n=r;for(const a of e.sourceLinks)a.y0=r+a.width/2,r+=a.width;for(const a of e.targetLinks)a.y1=n+a.width/2,n+=a.width}}function Am(){let t=0,e=0,r=1,n=1,a=24,i=8,o,l=zye,s=Fye,f,c,h=Hye,d=qye,m=6;function g(){const B={nodes:h.apply(null,arguments),links:d.apply(null,arguments)};return y(B),b(B),S(B),w(B),_(B),GM(B),B}g.update=function(B){return GM(B),B},g.nodeId=function(B){return arguments.length?(l=typeof B=="function"?B:x5(B),g):l},g.nodeAlign=function(B){return arguments.length?(s=typeof B=="function"?B:x5(B),g):s},g.nodeSort=function(B){return arguments.length?(f=B,g):f},g.nodeWidth=function(B){return arguments.length?(a=+B,g):a},g.nodePadding=function(B){return arguments.length?(i=o=+B,g):i},g.nodes=function(B){return arguments.length?(h=typeof B=="function"?B:x5(B),g):h},g.links=function(B){return arguments.length?(d=typeof B=="function"?B:x5(B),g):d},g.linkSort=function(B){return arguments.length?(c=B,g):c},g.size=function(B){return arguments.length?(t=e=0,r=+B[0],n=+B[1],g):[r-t,n-e]},g.extent=function(B){return arguments.length?(t=+B[0][0],r=+B[1][0],e=+B[0][1],n=+B[1][1],g):[[t,e],[r,n]]},g.iterations=function(B){return arguments.length?(m=+B,g):m};function y({nodes:B,links:j}){for(const[V,z]of B.entries())z.index=V,z.sourceLinks=[],z.targetLinks=[];const $=new Map(B.map((V,z)=>[l(V,z,B),V]));for(const[V,z]of j.entries()){z.index=V;let{source:W,target:G}=z;typeof W!="object"&&(W=z.source=UM($,W)),typeof G!="object"&&(G=z.target=UM($,G)),W.sourceLinks.push(z),G.targetLinks.push(z)}if(c!=null)for(const{sourceLinks:V,targetLinks:z}of B)V.sort(c),z.sort(c)}function b({nodes:B}){for(const j of B)j.value=j.fixedValue===void 0?Math.max(_m(j.sourceLinks,Dm),_m(j.targetLinks,Dm)):j.fixedValue}function S({nodes:B}){const j=B.length;let $=new Set(B),V=new Set,z=0;for(;$.size;){for(const W of $){W.depth=z;for(const{target:G}of W.sourceLinks)V.add(G)}if(++z>j)throw new Error("circular link");$=V,V=new Set}}function w({nodes:B}){const j=B.length;let $=new Set(B),V=new Set,z=0;for(;$.size;){for(const W of $){W.height=z;for(const{source:G}of W.targetLinks)V.add(G)}if(++z>j)throw new Error("circular link");$=V,V=new Set}}function C({nodes:B}){const j=HM(B,z=>z.depth)+1,$=(r-t-a)/(j-1),V=new Array(j);for(const z of B){const W=Math.max(0,Math.min(j-1,Math.floor(s.call(null,z,j))));z.layer=W,z.x0=t+W*$,z.x1=z.x0+a,V[W]?V[W].push(z):V[W]=[z]}if(f)for(const z of V)z.sort(f);return V}function k(B){const j=aq(B,$=>(n-e-($.length-1)*o)/_m($,Dm));for(const $ of B){let V=e;for(const z of $){z.y0=V,z.y1=V+z.value*j,V=z.y1+o;for(const W of z.sourceLinks)W.width=W.value*j}V=(n-V+o)/($.length+1);for(let z=0;z<$.length;++z){const W=$[z];W.y0+=V*(z+1),W.y1+=V*(z+1)}Y($)}}function _(B){const j=C(B);o=Math.min(i,(n-e)/(HM(j,$=>$.length)-1)),k(j);for(let $=0;$<m;++$){const V=Math.pow(.99,$),z=Math.max(1-V,($+1)/m);T(j,V,z),D(j,V,z)}}function D(B,j,$){for(let V=1,z=B.length;V<z;++V){const W=B[V];for(const G of W){let ae=0,U=0;for(const{source:R,value:ee}of G.targetLinks){let J=ee*(G.layer-R.layer);ae+=ne(R,G)*J,U+=J}if(!(U>0))continue;let H=(ae/U-G.y0)*j;G.y0+=H,G.y1+=H,N(G)}f===void 0&&W.sort(Pc),A(W,$)}}function T(B,j,$){for(let V=B.length,z=V-2;z>=0;--z){const W=B[z];for(const G of W){let ae=0,U=0;for(const{target:R,value:ee}of G.sourceLinks){let J=ee*(R.layer-G.layer);ae+=K(G,R)*J,U+=J}if(!(U>0))continue;let H=(ae/U-G.y0)*j;G.y0+=H,G.y1+=H,N(G)}f===void 0&&W.sort(Pc),A(W,$)}}function A(B,j){const $=B.length>>1,V=B[$];E(B,V.y0-o,$-1,j),M(B,V.y1+o,$+1,j),E(B,n,B.length-1,j),M(B,e,0,j)}function M(B,j,$,V){for(;$<B.length;++$){const z=B[$],W=(j-z.y0)*V;W>1e-6&&(z.y0+=W,z.y1+=W),j=z.y1+o}}function E(B,j,$,V){for(;$>=0;--$){const z=B[$],W=(z.y1-j)*V;W>1e-6&&(z.y0-=W,z.y1-=W),j=z.y0-o}}function N({sourceLinks:B,targetLinks:j}){if(c===void 0){for(const{source:{sourceLinks:$}}of j)$.sort(WM);for(const{target:{targetLinks:$}}of B)$.sort(qM)}}function Y(B){if(c===void 0)for(const{sourceLinks:j,targetLinks:$}of B)j.sort(WM),$.sort(qM)}function ne(B,j){let $=B.y0-(B.sourceLinks.length-1)*o/2;for(const{target:V,width:z}of B.sourceLinks){if(V===j)break;$+=z+o}for(const{source:V,width:z}of j.targetLinks){if(V===B)break;$-=z}return $}function K(B,j){let $=j.y0-(j.targetLinks.length-1)*o/2;for(const{source:V,width:z}of j.targetLinks){if(V===B)break;$+=z+o}for(const{target:V,width:z}of B.sourceLinks){if(V===j)break;$-=z}return $}return g}var rv=Math.PI,nv=2*rv,T3=1e-6,Wye=nv-T3;function av(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function iq(){return new av}av.prototype=iq.prototype={constructor:av,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(t,e,r,n,a,i){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+a)+","+(this._y1=+i)},arcTo:function(t,e,r,n,a){t=+t,e=+e,r=+r,n=+n,a=+a;var i=this._x1,o=this._y1,l=r-t,s=n-e,f=i-t,c=o-e,h=f*f+c*c;if(a<0)throw new Error("negative radius: "+a);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>T3)if(!(Math.abs(c*l-s*f)>T3)||!a)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var d=r-i,m=n-o,g=l*l+s*s,y=d*d+m*m,b=Math.sqrt(g),S=Math.sqrt(h),w=a*Math.tan((rv-Math.acos((g+h-y)/(2*b*S)))/2),C=w/S,k=w/b;Math.abs(C-1)>T3&&(this._+="L"+(t+C*f)+","+(e+C*c)),this._+="A"+a+","+a+",0,0,"+ +(c*d>f*m)+","+(this._x1=t+k*l)+","+(this._y1=e+k*s)}},arc:function(t,e,r,n,a,i){t=+t,e=+e,r=+r,i=!!i;var o=r*Math.cos(n),l=r*Math.sin(n),s=t+o,f=e+l,c=1^i,h=i?n-a:a-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+s+","+f:(Math.abs(this._x1-s)>T3||Math.abs(this._y1-f)>T3)&&(this._+="L"+s+","+f),r&&(h<0&&(h=h%nv+nv),h>Wye?this._+="A"+r+","+r+",0,1,"+c+","+(t-o)+","+(e-l)+"A"+r+","+r+",0,1,"+c+","+(this._x1=s)+","+(this._y1=f):h>T3&&(this._+="A"+r+","+r+",0,"+ +(h>=rv)+","+c+","+(this._x1=t+r*Math.cos(a))+","+(this._y1=e+r*Math.sin(a))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};function YM(t){return function(){return t}}function Uye(t){return t[0]}function Gye(t){return t[1]}var Yye=Array.prototype.slice;function Xye(t){return t.source}function Kye(t){return t.target}function Jye(t){var e=Xye,r=Kye,n=Uye,a=Gye,i=null;function o(){var l,s=Yye.call(arguments),f=e.apply(this,s),c=r.apply(this,s);if(i||(i=l=iq()),t(i,+n.apply(this,(s[0]=f,s)),+a.apply(this,s),+n.apply(this,(s[0]=c,s)),+a.apply(this,s)),l)return i=null,l+""||null}return o.source=function(l){return arguments.length?(e=l,o):e},o.target=function(l){return arguments.length?(r=l,o):r},o.x=function(l){return arguments.length?(n=typeof l=="function"?l:YM(+l),o):n},o.y=function(l){return arguments.length?(a=typeof l=="function"?l:YM(+l),o):a},o.context=function(l){return arguments.length?(i=l??null,o):i},o}function Zye(t,e,r,n,a){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,a,n,a)}function Qye(){return Jye(Zye)}function eve(t){return[t.source.x1,t.y0]}function tve(t){return[t.target.x0,t.y1]}function rve(){return Qye().source(eve).target(tve)}function nve(t){const{data:e,showLabels:r,leftMargin:n,rightMargin:a,truncateBy:i,width:o,height:l,topMargin:s,bottomMargin:f,tooltip:c,onSeriesMouseOver:h,suffix:d,prefix:m,showValues:g,onSeriesMouseClick:y,nodePadding:b,nodeWidth:S,id:w,highlightedSourceDataPoints:C,highlightedTargetDataPoints:k,defaultLinkOpacity:_,sourceTitle:D,targetTitle:T,animateLinks:A,sortNodes:M,resetSelectionOnDoubleClick:E,detailsOnClick:N,styles:Y,classNames:ne}=t,[K,B]=Xa(),j=d4(K);I.useEffect(()=>{j&&e&&B("path",{pathLength:[0,1]},{duration:A===!0?5:A||0})},[j,e,B,A]);const[$,V]=I.useState(void 0),[z,W]=I.useState(void 0),[G,ae]=I.useState(void 0),[U,H]=I.useState(void 0),[R,ee]=I.useState(void 0),J={top:s,bottom:f,left:n,right:a},Z=o-J.left-J.right,re=l-J.top-J.bottom,te=M==="mostReadable"?Am().nodeWidth(S).nodePadding(b).size([Z,re]).nodeAlign(Om):M==="none"?Am().nodeWidth(S).nodePadding(b).size([Z,re]).nodeAlign(Om).nodeSort(()=>null).linkSort(()=>null):Am().nodeWidth(S).nodePadding(b).size([Z,re]).nodeAlign(Om).nodeSort(M==="desc"?(ie,ce)=>(ce.value||0)-(ie.value||0):(ie,ce)=>(ie.value||0)-(ce.value||0)),{nodes:F,links:q}=te(e),X=rve();return v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${o}px`,height:`${l}px`,viewBox:`0 0 ${o} ${l}`,style:{marginLeft:"auto",marginRight:"auto"},direction:"ltr",children:[D?v.jsx("text",{x:J.left,y:J.top-10,className:"text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100",style:{textAnchor:"start"},children:D}):null,T?v.jsx("text",{x:o-J.right,y:J.top-10,className:"text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100",style:{textAnchor:"end"},children:T}):null,v.jsxs("g",{transform:`translate(${J.left},${J.top})`,children:[F.filter(ie=>ie.type==="source").map((ie,ce)=>v.jsx("g",{onMouseEnter:()=>{ae(ie)},onMouseLeave:()=>{ae(void 0)},children:v.jsxs("g",{transform:`translate(${ie.x0},${ie.y0})`,children:[v.jsx("rect",{x:0,y:0,width:(ie.x1||0)-(ie.x0||0),height:(ie.y1||0)-(ie.y0||0),style:{fill:ie.color}}),r||g?v.jsx("foreignObject",{y:0-b/2,x:0-n,width:n,height:(ie.y1||0)-(ie.y0||0)+b,children:v.jsxs("div",{className:"flex flex-col gap-0.5 justify-center py-0 px-1.5",style:{height:`${(ie.y1||0)-(ie.y0||0)+b}px`,overflow:"visible"},children:[r?v.jsx(or,{marginBottom:g?"3xs":"none",size:"sm",leading:"none",className:Be("sankey-right-label text-right",ne==null?void 0:ne.graphObjectValues),style:{hyphens:"auto",color:ie.color,...Y==null?void 0:Y.graphObjectValues},children:`${ie.label}`.length<i?`${ie.label}`:`${`${ie.label}`.substring(0,i)}...`}):null,g?v.jsx(or,{marginBottom:"none",size:"sm",leading:"none",className:Be("sankey-right-value text-right font-bold",ne==null?void 0:ne.graphObjectValues),style:{hyphens:"auto",color:ie.color,...Y==null?void 0:Y.graphObjectValues},children:_t(ie.value,m,d)}):null]})}):null]})},ce)),F.filter(ie=>ie.type==="target").map((ie,ce)=>v.jsx("g",{onMouseEnter:()=>{ae(ie)},onMouseLeave:()=>{ae(void 0)},children:v.jsxs("g",{transform:`translate(${ie.x0},${ie.y0})`,children:[v.jsx("rect",{x:0,y:0,width:(ie.x1||0)-(ie.x0||0),height:(ie.y1||0)-(ie.y0||0),style:{fill:ie.color}}),r||g?v.jsx("foreignObject",{y:0-b/2,x:S,width:a-S,height:(ie.y1||0)-(ie.y0||0)+b,children:v.jsxs("div",{className:"flex flex-col gap-0.5 justify-center py-0 px-1.5",style:{height:`${(ie.y1||0)-(ie.y0||0)+b}px`},children:[r?v.jsx(or,{marginBottom:g?"3xs":"none",size:"sm",leading:"none",className:Be("sankey-left-label text-left",ne==null?void 0:ne.graphObjectValues),style:{hyphens:"auto",color:ie.color,...Y==null?void 0:Y.graphObjectValues},children:`${ie.label}`.length<i?`${ie.label}`:`${`${ie.label}`.substring(0,i)}...`}):null,g?v.jsx(or,{size:"sm",leading:"none",marginBottom:"none",className:Be("sankey-left-value text-left font-bold",ne==null?void 0:ne.graphObjectValues),style:{hyphens:"auto",color:ie.color,...Y==null?void 0:Y.graphObjectValues},children:_t(ie.value,m,d)}):null]})}):null]})},ce)),v.jsx("defs",{children:q.map((ie,ce)=>v.jsxs("linearGradient",{id:`${w}-gradient-${ce}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientUnits:"userSpaceOnUse",children:[v.jsx("stop",{offset:"0%",style:{stopColor:ie.source.color,stopOpacity:1}}),v.jsx("stop",{offset:"100%",style:{stopColor:ie.target.color,stopOpacity:1}})]},ce))}),v.jsx("g",{ref:K,children:q.map((ie,ce)=>v.jsx("g",{className:"undp-viz-g-with-hover",onMouseEnter:de=>{V(ie.data),ee(de.clientY),H(de.clientX),h==null||h(ie.data)},onMouseMove:de=>{V(ie.data),ee(de.clientY),H(de.clientX)},onClick:()=>{(y||N)&&(Sr(z,ie.data)&&E?(W(void 0),y==null||y(void 0)):(W(ie.data),y==null||y(ie.data)))},onMouseLeave:()=>{V(void 0),H(void 0),ee(void 0),h&&h(void 0)},opacity:G?ie.source.name===G.name||ie.target.name===G.name?.85:_:(C.length!==0||k.length!==0)&&(C.indexOf(ie.source.label)!==-1||k.indexOf(ie.target.label)!==-1)?.85:_,children:v.jsx("path",{d:X(ie)||"",style:{stroke:`url(#${w}-gradient-${ce})`,strokeWidth:ie.width,fill:"none"}})},ce))})]})]}),$&&c&&U&&R?v.jsx(yr,{data:$,body:c,xPos:U,yPos:R,backgroundStyle:Y==null?void 0:Y.tooltip,className:ne==null?void 0:ne.tooltip}):null,N?v.jsx(Tr,{open:z!==void 0,onClose:()=>{W(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(N,z)}})}):null]})}function oq(t){const{data:e,graphTitle:r,sources:n,graphDescription:a,showLabels:i=!0,leftMargin:o=75,rightMargin:l=75,topMargin:s=30,bottomMargin:f=10,truncateBy:c=999,height:h,width:d,footNote:m,padding:g,backgroundColor:y,tooltip:b,onSeriesMouseOver:S,suffix:w="",prefix:C="",relativeHeight:k,showValues:_=!0,graphID:D,onSeriesMouseClick:T,graphDownload:A=!1,dataDownload:M=!1,fillContainer:E=!0,language:N="en",minHeight:Y=0,theme:ne="light",ariaLabel:K,sourceColors:B,targetColors:j,sourceColorDomain:$,targetColorDomain:V,nodePadding:z=5,nodeWidth:W=5,highlightedSourceDataPoints:G=[],highlightedTargetDataPoints:ae=[],defaultLinkOpacity:U=.3,sourceTitle:H,targetTitle:R,animateLinks:ee,sortNodes:J="mostReadable",resetSelectionOnDoubleClick:Z=!0,detailsOnClick:re,styles:te,classNames:F}=t,[q,X]=I.useState(0),[ie,ce]=I.useState(0),[de,he]=I.useState(void 0),Oe=I.useRef(null),Ne=I.useRef(null);return I.useEffect(()=>{const Te=Bt(e,"source").map(ve=>({name:`source_${ve.source}`,type:"source",label:`${ve.source}`,color:typeof B=="string"||!B?B||Qe.graphMainColor:B[($||Bt(e,"source").map(le=>`${le.source}`)).findIndex(le=>`${le}`==`${ve.source}`)>B.length?B.length-1:($||Bt(e,"source").map(le=>`${le.source}`)).findIndex(le=>`${le}`==`${ve.source}`)],totalValue:fr(e.filter(le=>`${le.source}`==`${ve.source}`).map(le=>le.value))})),_e=J==="asc"?Ut(Te,ve=>ve.totalValue):J==="desc"?Ut(Te,ve=>ve.totalValue).reverse():Te,xe=Bt(e,"target").map(ve=>({name:`target_${ve.target}`,type:"target",label:`${ve.target}`,color:typeof j=="string"||!j?j||Qe.graphMainColor:j[(V||Bt(e,"target").map(le=>`${le.target}`)).findIndex(le=>`${le}`==`${ve.target}`)>j.length?j.length-1:(V||Bt(e,"target").map(le=>`${le.target}`)).findIndex(le=>`${le}`==`${ve.target}`)],totalValue:fr(e.filter(le=>`${le.target}`==`${ve.target}`).map(le=>le.value))})),we=J==="asc"?Ut(xe,ve=>ve.totalValue):J==="desc"?Ut(xe,ve=>ve.totalValue).reverse():xe,ge=[..._e,...we];he({nodes:ge,links:e.map(ve=>({source:ge.findIndex(le=>le.name===`source_${ve.source}`),target:ge.findIndex(le=>le.name===`target_${ve.target}`),value:ve.value,data:{...ve}}))})},[e,J,$,B,V,j]),I.useEffect(()=>{const Te=new ResizeObserver(_e=>{X(d||_e[0].target.clientWidth||620),ce(h||_e[0].target.clientHeight||480)});return Oe.current&&(ce(Oe.current.clientHeight||480),X(Oe.current.clientWidth||620),d||Te.observe(Oe.current)),()=>Te.disconnect()},[d,h]),v.jsx("div",{className:`${ne||"light"} flex ${d?"grow-0":"grow"} ${E?"w-full":"w-fit"} `,dir:N==="he"||N==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${y?y===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${N||"en"}`,F==null?void 0:F.graphContainer),style:{...(te==null?void 0:te.graphContainer)||{},...y&&y!==!0?{backgroundColor:y}:{}},id:D,ref:Ne,"aria-label":K||`${r?`The graph shows ${r}. `:""}This is a sankey chart showing flow. ${a?` ${a}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:y?g||"1rem":g||0},children:v.jsxs("div",{className:"flex flex-col gap-4 w-full grow justify-between",children:[r||a||A||M?v.jsx(Zt,{styles:{title:te==null?void 0:te.title,description:te==null?void 0:te.description},classNames:{title:F==null?void 0:F.title,description:F==null?void 0:F.description},graphTitle:r,graphDescription:a,width:d,graphDownload:A?Ne.current:void 0,dataDownload:M?e.map(Te=>Te.data).filter(Te=>Te!==void 0).length>0?e.map(Te=>Te.data).filter(Te=>Te!==void 0):e.filter(Te=>Te!==void 0):null}):null,v.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:e.length===0?v.jsx(kn,{}):v.jsx("div",{className:"flex flex-col grow justify-center gap-3 w-full leading-0",ref:Oe,"aria-label":"Graph area",children:(d||q)&&(h||ie)&&de?v.jsx(nve,{data:de,width:d||q,nodePadding:z,nodeWidth:W,height:Math.max(Y,h||(k?Y?(d||q)*k>Y?(d||q)*k:Y:(d||q)*k:ie)),showLabels:i,leftMargin:o,rightMargin:l,topMargin:s,bottomMargin:f,truncateBy:c,tooltip:b,onSeriesMouseOver:S,showValues:_,suffix:w,prefix:C,onSeriesMouseClick:T,id:Wx(8),highlightedSourceDataPoints:G.map(Te=>`${Te}`),highlightedTargetDataPoints:ae.map(Te=>`${Te}`),defaultLinkOpacity:U,sourceTitle:H,targetTitle:R,animateLinks:ee,sortNodes:J,resetSelectionOnDoubleClick:Z,styles:te,classNames:F,detailsOnClick:re}):null})}),n||m?v.jsx(tr,{styles:{footnote:te==null?void 0:te.footnote,source:te==null?void 0:te.source},classNames:{footnote:F==null?void 0:F.footnote,source:F==null?void 0:F.source},sources:n,footNote:m,width:d}):null]})})})})}function ave(t){const{data:e,radius:r,lineColors:n,tooltip:a,onSeriesMouseOver:i,onSeriesMouseClick:o,colorDomain:l,detailsOnClick:s,styles:f,classNames:c,selectedColor:h,axisLabels:d,strokeWidth:m,showValues:g,showDots:y,rightMargin:b,topMargin:S,bottomMargin:w,leftMargin:C,curveType:k,noOfTicks:_,minValue:D,maxValue:T,resetSelectionOnDoubleClick:A,fillShape:M,highlightedLines:E}=t,N=k==="linear"?u7e:s7e,Y={top:S,left:C},ne=Math.min((2*r-C-b)/2,(2*r-S-w)/2),[K,B]=I.useState(void 0),[j,$]=I.useState(void 0),[V,z]=I.useState(void 0),[W,G]=I.useState(void 0),ae=br().domain([0,e[0].values.length]).range([0,2*Math.PI]),U=Fe(T)?Math.max(...e.map(Z=>Mn(Z.values.filter(re=>!Fe(re)))||0))<0?0:Math.max(...e.map(Z=>Mn(Z.values.filter(re=>!Fe(re)))||0)):T,H=Fe(D)?Math.min(...e.map(Z=>gr(Z.values.filter(re=>!Fe(re)))||0))>=0?0:Math.min(...e.map(Z=>gr(Z.values.filter(re=>!Fe(re)))||0)):D,R=br().domain([H,U]).range([0,ne]).nice(),ee=R.ticks(_),J=l7e().radius((Z,re)=>R(Z)).angle((Z,re)=>ae(re)).curve(N);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r*2}px`,height:`${r*2}px`,viewBox:`0 0 ${r*2} ${r*2}`,direction:"ltr",children:v.jsx("g",{transform:`translate(${Y.left},${Y.top})`,children:v.jsxs("g",{transform:`translate(${ne},${ne})`,children:[d.map((Z,re)=>{var te,F,q,X;return v.jsxs("g",{children:[v.jsx("line",{x1:0,y1:0,x2:Math.cos(ae(re)-Math.PI/2)*ne,y2:Math.sin(ae(re)-Math.PI/2)*ne,className:Be("stroke-1 stroke-primary-gray-500 dark:stroke-primary-gray-550",(te=c==null?void 0:c.xAxis)==null?void 0:te.axis),style:(F=f==null?void 0:f.xAxis)==null?void 0:F.axis},re),v.jsx("text",{x:Math.cos(ae(re)-Math.PI/2)*(ne+6),y:Math.sin(ae(re)-Math.PI/2)*(ne+6),style:{textAnchor:Math.cos(ae(re)-Math.PI/2)<0?"end":Math.cos(ae(re)-Math.PI/2)<1e-5?"middle":"start",...((q=f==null?void 0:f.xAxis)==null?void 0:q.labels)||""},dy:Math.sin(ae(re)-Math.PI/2)<0?0:Math.sin(ae(re)-Math.PI/2)<1e-5?5:10,className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(X=c==null?void 0:c.xAxis)==null?void 0:X.labels),children:Z})]},re)}),ee.map((Z,re)=>{var te,F,q,X;return v.jsxs("g",{children:[v.jsx("path",{d:J(Array(d.length).fill(Z))||"",className:Be("stroke-primary-gray-500 dark:stroke-primary-gray-550",(te=c==null?void 0:c.xAxis)==null?void 0:te.gridLines),style:{...(F=f==null?void 0:f.xAxis)==null?void 0:F.gridLines,fill:"none"}}),v.jsx("foreignObject",{x:-25,y:Math.sin(-Math.PI/2)*R(Z)>-1e-4?Math.sin(-Math.PI/2)*R(Z)-7:Math.sin(-Math.PI/2)*R(Z)-5,width:50,height:12,children:v.jsx("div",{className:"flex justify-center",children:v.jsx("p",{className:Be("fill-primary-gray-500 dark:fill-primary-gray-550 text-xs m-0 py-0 px-1.5 text-center leading-none bg-primary-white dark:bg-primary-gray-700",(q=c==null?void 0:c.xAxis)==null?void 0:q.labels),style:(X=f==null?void 0:f.xAxis)==null?void 0:X.labels,children:Z})})})]},re)}),e.map((Z,re)=>v.jsxs("g",{opacity:K?Z.label===K.label?1:.3:h?Z.color&&n[l.indexOf(Z.color)]===h?1:.3:E.length!==0?Z.label&&E.indexOf(Z.label)!==-1?1:.3:1,onMouseEnter:te=>{B(Z),G(te.clientY),z(te.clientX),i&&i(Z)},onMouseMove:te=>{B(Z),G(te.clientY),z(te.clientX)},onMouseLeave:()=>{B(void 0),z(void 0),G(void 0),i&&i(void 0)},onClick:()=>{(o||s)&&(Sr(j,Z)&&A?($(void 0),o==null||o(void 0)):($(Z),o==null||o(Z)))},children:[v.jsx("path",{d:J(Z.values)||"",style:{stroke:e.filter(te=>te.color).length===0?n[0]:Z.color?n[l.indexOf(Z.color)]:Qe.gray,fill:M?e.filter(te=>te.color).length===0?n[0]:Z.color?n[l.indexOf(Z.color)]:Qe.gray:"none",fillOpacity:.1,strokeWidth:m}}),v.jsx("g",{children:Z.values.map((te,F)=>v.jsx("g",{children:Fe(te)?null:v.jsxs(v.Fragment,{children:[y?v.jsx("circle",{cx:Math.cos(ae(F)-Math.PI/2)*R(te),cy:Math.sin(ae(F)-Math.PI/2)*R(te),r:4,style:{fill:e.filter(q=>q.color).length===0?n[0]:Z.color?n[l.indexOf(Z.color)]:Qe.gray}}):null,g?v.jsx("text",{cx:Math.cos(ae(F)-Math.PI/2)*(R(te)+6),cy:Math.sin(ae(F)-Math.PI/2)*(R(te)+6),style:{fill:n[re],textAnchor:Math.cos(ae(F)-Math.PI/2)<0?"end":Math.cos(ae(F)-Math.PI/2)<1e-5?"middle":"start",...(f==null?void 0:f.graphObjectValues)||{}},dy:Math.sin(ae(F)-Math.PI/2)<0?10:(Math.sin(ae(F)-Math.PI/2)<1e-5,0),className:Be("graph-value text-xs font-bold",c==null?void 0:c.graphObjectValues),children:_t(te)}):null]})},F))})]},re))]})})}),K&&a&&V&&W?v.jsx(yr,{data:K,body:a,xPos:V,yPos:W,backgroundStyle:f==null?void 0:f.tooltip,className:c==null?void 0:c.tooltip}):null,s?v.jsx(Tr,{open:j!==void 0,onClose:()=>{$(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(s,j)}})}):null]})}function lq(t){const{graphTitle:e,colors:r,sources:n,graphDescription:a,footNote:i,radius:o,data:l,showColorScale:s=!0,padding:f,backgroundColor:c=!1,tooltip:h,onSeriesMouseOver:d,graphID:m,onSeriesMouseClick:g,topMargin:y=75,bottomMargin:b=75,leftMargin:S=75,rightMargin:w=75,graphDownload:C=!1,dataDownload:k=!1,colorDomain:_,language:D="en",theme:T="light",highlightedLines:A=[],width:M,height:E,minHeight:N=0,strokeWidth:Y=2,relativeHeight:ne,ariaLabel:K,colorLegendTitle:B,detailsOnClick:j,styles:$,classNames:V,showNAColor:z=!0,axisLabels:W,showDots:G=!0,showValues:ae=!1,curveType:U="curve",noOfTicks:H=5,minValue:R,maxValue:ee,fillShape:J=!1,resetSelectionOnDoubleClick:Z=!0}=t,[re,te]=I.useState(0),[F,q]=I.useState(0),[X,ie]=I.useState(0),[ce,de]=I.useState(void 0),he=I.useRef(null),Oe=I.useRef(null);return I.useEffect(()=>{const Ne=new ResizeObserver(Te=>{q(M||Te[0].target.clientWidth||420),ie(E||Te[0].target.clientHeight||420),te((gr([M||Te[0].target.clientWidth||620,E||Te[0].target.clientHeight||480])||420)/2)});return he.current&&(ie(he.current.clientHeight||420),q(he.current.clientWidth||420),te((gr([he.current.clientWidth,he.current.clientHeight])||420)/2),(!M||!o)&&Ne.observe(he.current)),()=>Ne.disconnect()},[M,E,o]),v.jsx("div",{className:`${T||"light"} flex ${M?"w-fit grow-0":"w-full grow"}`,dir:D==="he"||D==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${c?c===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${D||"en"}`,V==null?void 0:V.graphContainer),style:{...($==null?void 0:$.graphContainer)||{},minHeight:"inherit",...c&&c!==!0?{backgroundColor:c}:{}},id:m,ref:Oe,"aria-label":K||`${e?`The graph shows ${e}. `:""}This is a donut or pie chart chart. ${a?` ${a}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:c?f||"1rem":f||0},children:v.jsxs("div",{className:"flex flex-col gap-2 w-full grow justify-between",children:[e||a||C||k?v.jsx(Zt,{styles:{title:$==null?void 0:$.title,description:$==null?void 0:$.description},classNames:{title:V==null?void 0:V.title,description:V==null?void 0:V.description},graphTitle:e,graphDescription:a,width:M,graphDownload:C?Oe.current:void 0,dataDownload:k?l.map(Ne=>Ne.data).filter(Ne=>Ne!==void 0).length>0?l.map(Ne=>Ne.data).filter(Ne=>Ne!==void 0):l.filter(Ne=>Ne!==void 0):null}):null,v.jsx("div",{className:"flex grow flex-col justify-center items-stretch gap-8 flex-wrap",style:{width:M?`${M}px`:"100%"},children:l.length===0?v.jsx(kn,{}):v.jsxs(v.Fragment,{children:[s&&l.filter(Ne=>Ne.color).length!==0?v.jsx(Cn,{width:M,colorLegendTitle:B,colors:r||Qe[T].categoricalColors.colors,colorDomain:_||Bt(l.filter(Ne=>Ne.color),"color").map(Ne=>Ne.color),setSelectedColor:de,showNAColor:z}):null,v.jsx("div",{className:`flex ${M?"grow-0":"grow"} items-center justify-center leading-0`,style:{width:M?`${M}px`:"100%",height:E?`${Math.max(N,E||(ne?N?(M||F)*ne>N?(M||F)*ne:N:(M||F)*ne:X))}px`:"auto"},ref:he,"aria-label":"Graph area",children:v.jsx("div",{className:"w-full flex justify-center leading-0",children:o||re?v.jsx(ave,{data:l,lineColors:l.filter(Ne=>Ne.color).length===0?r?[r]:[Qe.primaryColors["blue-600"]]:r||Qe[T].categoricalColors.colors,radius:o||re,tooltip:h,colorDomain:_||Bt(l.filter(Ne=>Ne.color),"color").map(Ne=>Ne.color),onSeriesMouseOver:d,onSeriesMouseClick:g,styles:$,detailsOnClick:j,selectedColor:ce,axisLabels:W,strokeWidth:Y,showValues:ae,showDots:G,topMargin:y,bottomMargin:b,leftMargin:S,rightMargin:w,curveType:U,noOfTicks:H,minValue:R,maxValue:ee,fillShape:J,highlightedLines:A,resetSelectionOnDoubleClick:Z}):null})})]})}),n||i?v.jsx(tr,{styles:{footnote:$==null?void 0:$.footnote,source:$==null?void 0:$.source},classNames:{footnote:V==null?void 0:V.footnote,source:V==null?void 0:V.source},sources:n,footNote:i,width:M}):v.jsx("div",{})]})})})})}function sq(t,e){const r=Array.from(new Set(t.map(l=>l.label))),n=Array.from(new Set(t.map(l=>l.date))),a=new Set(t.map(l=>`${l.label}-${l.date}`)),i=t.reduce((l,s)=>(l[s.label]||(l[s.label]=s.color),l),{}),o=[...t];return r.forEach(l=>{n.forEach(s=>{a.has(`${l}-${s}`)||o.push({label:l,color:i[l],size:void 0,date:s})})}),Ut(o,l=>bt(`${l.date}`,e||"yyyy",new Date))}function Vf(t,e){const r=Array.from(new Set(t.map(o=>o.label))),n=Array.from(new Set(t.map(o=>o.date))),a=new Set(t.map(o=>`${o.label}-${o.date}`)),i=[...t];return r.forEach(o=>{n.forEach(l=>{a.has(`${o}-${l}`)||i.push({label:o,size:t[0].size.map(s=>null),date:l})})}),Ut(i,o=>bt(`${o.date}`,e||"yyyy",new Date))}function ive(t,e){const r=Array.from(new Set(t.map(o=>o.label))),n=Array.from(new Set(t.map(o=>o.date))),a=new Set(t.map(o=>`${o.label}-${o.date}`)),i=[...t];return r.forEach(o=>{n.forEach(l=>{a.has(`${o}-${l}`)||i.push({label:o,leftBar:void 0,rightBar:void 0,date:l})})}),Ut(i,o=>bt(`${o.date}`,e,new Date))}function ove(t,e){const r=Array.from(new Set(t.map(l=>l.label))),n=Array.from(new Set(t.map(l=>l.date))),a=new Set(t.map(l=>`${l.label}-${l.date}`)),i=t.reduce((l,s)=>(l[s.label]||(l[s.label]=s.color),l),{}),o=[...t];return r.forEach(l=>{n.forEach(s=>{a.has(`${l}-${s}`)||o.push({label:l,color:i[l],x:void 0,y:void 0,radius:void 0,date:s})})}),Ut(o,l=>bt(`${l.date}`,e,new Date))}function uq(t,e){const r=Array.from(new Set(t.map(o=>o.label))),n=Array.from(new Set(t.map(o=>o.date))),a=new Set(t.map(o=>`${o.label}-${o.date}`)),i=[...t];return r.forEach(o=>{n.forEach(l=>{a.has(`${o}-${l}`)||i.push({label:o,x:t[0].x.map(s=>null),date:l})})}),Ut(i,o=>bt(`${o.date}`,e||"yyyy",new Date))}function lve(t){var Ne,Te,_e,xe,we,ge,ve,le,ue,Ce,pe,ye,be,je,$e,ut;const{data:e,width:r,height:n,barColors:a,centerGap:i,refValues:o,maxValue:l,minValue:s,showValues:f,axisTitles:c,rightMargin:h,leftMargin:d,topMargin:m,bottomMargin:g,tooltip:y,onSeriesMouseOver:b,barPadding:S,truncateBy:w,onSeriesMouseClick:C,showTicks:k,suffix:_,prefix:D,dateFormat:T,indx:A,resetSelectionOnDoubleClick:M,detailsOnClick:E,styles:N,classNames:Y,noOfTicks:ne}=t,K=Ut(e.map(Ie=>({...Ie,date:bt(`${Ie.date}`,T,new Date)})),"date"),B=Bt(K,Ie=>Ie.label).map(Ie=>Ie.label),j=Array.from(Hi(ive(e,T||"yyyy"),Ie=>Ie.date),([Ie,Ze])=>({date:Ie,values:B.map(Ke=>Ze.find(et=>et.label===Ke)).map(Ke=>({...Ke,id:Ke.label}))})),[$,V]=I.useState(void 0),[z,W]=I.useState(void 0),[G,ae]=I.useState(void 0),[U,H]=I.useState(void 0),R={top:m,bottom:g,left:d,right:h},ee=r-R.left-R.right,J=n-R.top-R.bottom,Z=Un().domain(B.map(Ie=>`${Ie}`)).range([J,0]).paddingInner(S),re=Fe(l)?Math.max(...e.filter(Ie=>!Fe(Ie.leftBar)).map(Ie=>Ie.leftBar))<0?0:Math.max(...e.filter(Ie=>!Fe(Ie.leftBar)).map(Ie=>Ie.leftBar)):l,te=Fe(s)?Math.min(...e.filter(Ie=>!Fe(Ie.leftBar)).map(Ie=>Ie.leftBar))>=0?0:Math.min(...e.filter(Ie=>!Fe(Ie.leftBar)).map(Ie=>Ie.leftBar)):s,F=Fe(l)?Math.max(...e.filter(Ie=>!Fe(Ie.rightBar)).map(Ie=>Ie.rightBar))<0?0:Math.max(...e.filter(Ie=>!Fe(Ie.rightBar)).map(Ie=>Ie.rightBar)):l,q=Fe(s)?Math.min(...e.filter(Ie=>!Fe(Ie.rightBar)).map(Ie=>Ie.rightBar))>=0?0:Math.min(...e.filter(Ie=>!Fe(Ie.rightBar)).map(Ie=>Ie.rightBar)):s,X=te<q?te:q,ie=re>F?re:F,ce=br().domain([X,ie]).range([0,(ee-i)/2]).nice(),de=ce.ticks(ne),he=br().domain([X,ie]).range([(ee-i)/2,0]).nice(),Oe=he.ticks(ne);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${R.left},${R.top})`,children:[v.jsxs("g",{transform:"translate(0,0)",children:[k?v.jsx(La,{values:Oe.filter(Ie=>Ie!==0),x:Oe.filter(Ie=>Ie!==0).map(Ie=>he(Ie)),y1:0-m,y2:J+R.bottom,styles:{gridLines:(Ne=N==null?void 0:N.xAxis)==null?void 0:Ne.gridLines,labels:(Te=N==null?void 0:N.xAxis)==null?void 0:Te.labels},classNames:{gridLines:(_e=Y==null?void 0:Y.xAxis)==null?void 0:_e.gridLines,labels:(xe=Y==null?void 0:Y.xAxis)==null?void 0:xe.labels},suffix:_,prefix:D,labelType:"secondary",showGridLines:!0,leftLabel:!0}):null,v.jsx(mo,{children:j[A].values.map((Ie,Ze)=>v.jsxs(ur.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:Ke=>{V(Ie),H(Ke.clientY),ae(Ke.clientX),b&&b(Ie)},onClick:()=>{(C||E)&&(Sr(z,Ie)&&M?(W(void 0),C==null||C(void 0)):(W(Ie),C==null||C(Ie)))},onMouseMove:Ke=>{V(Ie),H(Ke.clientY),ae(Ke.clientX)},onMouseLeave:()=>{V(void 0),ae(void 0),H(void 0),b&&b(void 0)},children:[v.jsx(ur.rect,{style:{fill:a[0]},height:Z.bandwidth(),animate:{width:Ie.leftBar?Ie.leftBar<0?he(Ie.leftBar)-he(0):he(0)-he(Ie.leftBar):0,attrY:Z(`${Ie.label}`),attrX:Ie.leftBar?Ie.leftBar<0?he(0):he(Ie.leftBar):he(0)},transition:{duration:.5}}),f?v.jsx(ur.text,{style:{fill:a[0],textAnchor:Ie.rightBar&&Ie.rightBar>0?"end":"start",...(N==null?void 0:N.graphObjectValues)||{}},dx:Ie.leftBar&&Ie.leftBar>0?-5:5,dy:"0.33em",animate:{attrX:Ie.leftBar?he(Ie.leftBar):he(te<0?0:te),attrY:Z(`${Ie.label}`)+Z.bandwidth()/2},transition:{duration:.5},className:Be("graph-value text-sm",Y==null?void 0:Y.graphObjectValues),children:_t(Ie.leftBar,D,_)}):null]},Ie.label))}),v.jsx(Nr,{y1:-2.5,y2:J+R.bottom,x1:he(te<0?0:te),x2:he(te<0?0:te),classNames:{axis:(we=Y==null?void 0:Y.yAxis)==null?void 0:we.axis},styles:{axis:(ge=N==null?void 0:N.yAxis)==null?void 0:ge.axis}}),o?v.jsx(v.Fragment,{children:o.map((Ie,Ze)=>v.jsx(ti,{text:Ie.text,color:Ie.color,x:he(Ie.value),y1:0-R.top,y2:J+R.bottom,textSide:"left",classNames:Ie.classNames,styles:Ie.styles},Ze))}):null]}),v.jsxs("g",{transform:`translate(${(ee+i)/2},0)`,children:[k?v.jsx(La,{values:de.filter(Ie=>Ie!==0),x:de.filter(Ie=>Ie!==0).map(Ie=>ce(Ie)),y1:0-m,y2:J+R.bottom,styles:{gridLines:(ve=N==null?void 0:N.xAxis)==null?void 0:ve.gridLines,labels:(le=N==null?void 0:N.xAxis)==null?void 0:le.labels},classNames:{gridLines:(ue=Y==null?void 0:Y.xAxis)==null?void 0:ue.gridLines,labels:(Ce=Y==null?void 0:Y.xAxis)==null?void 0:Ce.labels},suffix:_,prefix:D,labelType:"secondary",showGridLines:!0}):null,v.jsx(mo,{children:j[A].values.map((Ie,Ze)=>v.jsxs(ur.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:Ke=>{V(Ie),H(Ke.clientY),ae(Ke.clientX),b&&b(Ie)},onClick:()=>{(C||E)&&(Sr(z,Ie)&&M?(W(void 0),C==null||C(void 0)):(W(Ie),C==null||C(Ie)))},onMouseMove:Ke=>{V(Ie),H(Ke.clientY),ae(Ke.clientX)},onMouseLeave:()=>{V(void 0),ae(void 0),H(void 0),b&&b(void 0)},children:[v.jsx(ur.rect,{style:{fill:a[1]},height:Z.bandwidth(),animate:{width:Ie.rightBar?Ie.rightBar>=0?ce(Ie.rightBar)-ce(0):ce(0)-ce(Ie.rightBar):0,attrY:Z(`${Ie.label}`),attrX:Ie.rightBar?Ie.rightBar>=0?ce(0):ce(Ie.rightBar):ce(0)},transition:{duration:.5}}),f?v.jsx(ur.text,{style:{fill:a[1],textAnchor:Ie.rightBar&&Ie.rightBar<0?"end":"start",...(N==null?void 0:N.graphObjectValues)||{}},className:Be("graph-value text-sm",Y==null?void 0:Y.graphObjectValues),dx:Ie.rightBar&&Ie.rightBar<0?-5:5,dy:"0.33em",animate:{attrX:Ie.rightBar?ce(Ie.rightBar):ce(q<0?0:q),attrY:Z(`${Ie.label}`)+Z.bandwidth()/2},transition:{duration:.5},children:_t(Ie.rightBar,D,_)}):null]},Ze))}),v.jsx(Nr,{y1:-2.5,y2:J+R.bottom,x1:ce(q<0?0:q),x2:ce(q<0?0:q),classNames:{axis:(pe=Y==null?void 0:Y.yAxis)==null?void 0:pe.axis},styles:{axis:(ye=N==null?void 0:N.yAxis)==null?void 0:ye.axis}}),o?v.jsx(v.Fragment,{children:o.map((Ie,Ze)=>v.jsx(ti,{text:Ie.text,color:Ie.color,x:ce(Ie.value),y1:0-R.top,y2:J+R.bottom,textSide:"right",classNames:Ie.classNames,styles:Ie.styles},Ze))}):null]}),v.jsx("g",{transform:`translate(${ee/2},0)`,children:j[A].values.map((Ie,Ze)=>{var Ke,et;return v.jsx(Y2,{value:`${Ie.label}`.length<w?`${Ie.label}`:`${`${Ie.label}`.substring(0,w)}...`,y:Z(`${Ie.id}`),x:0-i/2,width:i,height:Z.bandwidth(),alignment:"center",style:(Ke=N==null?void 0:N.yAxis)==null?void 0:Ke.labels,className:(et=Y==null?void 0:Y.yAxis)==null?void 0:et.labels},Ze)})}),v.jsxs("g",{transform:`translate(0,${J})`,children:[v.jsx("text",{style:{fill:a[0],textAnchor:"end",...(be=N==null?void 0:N.yAxis)==null?void 0:be.title},className:Be("text-base",(je=Y==null?void 0:Y.yAxis)==null?void 0:je.title),x:ee/2-i/2,y:0,dx:-5,dy:20,children:c[0]}),v.jsx("text",{style:{fill:a[1],textAnchor:"start",...($e=N==null?void 0:N.yAxis)==null?void 0:$e.title},className:Be("text-base",(ut=Y==null?void 0:Y.yAxis)==null?void 0:ut.title),x:ee/2+i/2,y:0,dx:5,dy:20,children:c[1]})]})]})}),$&&y&&G&&U?v.jsx(yr,{data:$,body:y,xPos:G,yPos:U,backgroundStyle:N==null?void 0:N.tooltip,className:Y==null?void 0:Y.tooltip}):null,E?v.jsx(Tr,{open:z!==void 0,onClose:()=>{W(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(E,z)}})}):null]})}function cq(t){const{data:e,graphTitle:r,sources:n,graphDescription:a,height:i,width:o,footNote:l,padding:s,leftBarColor:f=Qe.light.categoricalColors.colors[0],rightBarColor:c=Qe.light.categoricalColors.colors[1],backgroundColor:h=!1,leftMargin:d=20,rightMargin:m=20,topMargin:g=25,bottomMargin:y=30,rightBarTitle:b="Right bar graph",leftBarTitle:S="Left bar graph",barPadding:w=.25,truncateBy:C=999,onSeriesMouseClick:k,centerGap:_=100,showValues:D=!0,tooltip:T,relativeHeight:A,onSeriesMouseOver:M,graphID:E,refValues:N=[],suffix:Y="",prefix:ne="",showTicks:K=!0,showColorScale:B=!1,graphDownload:j=!1,dataDownload:$=!1,language:V="en",maxValue:z,minValue:W,dateFormat:G="yyyy",showOnlyActiveDate:ae=!1,autoPlay:U=!1,colorLegendTitle:H,minHeight:R=0,theme:ee="light",ariaLabel:J,resetSelectionOnDoubleClick:Z=!0,detailsOnClick:re,styles:te,classNames:F,noOfTicks:q=5}=t,[X,ie]=I.useState(0),[ce,de]=I.useState(0),he=I.useRef(null),Oe=I.useRef(null);I.useEffect(()=>{const ve=new ResizeObserver(le=>{ie(o||le[0].target.clientWidth||620),de(i||le[0].target.clientHeight||480)});return he.current&&(de(he.current.clientHeight||480),ie(he.current.clientWidth||620),o||ve.observe(he.current)),()=>ve.disconnect()},[o,i]);const[Ne,Te]=I.useState(U),_e=qi(Bt(e,ve=>ve.date).map(ve=>bt(`${ve.date}`,G,new Date).getTime()),(ve,le)=>Ka(ve,le)),[xe,we]=I.useState(U?0:_e.length-1),ge={};return _e.forEach((ve,le)=>{ge[`${ve}`]={style:{color:le===xe?"#232E3D":"#A9B1B7",fontWeight:le===xe?"bold":"normal",display:le===xe||!ae?"inline":"none"},label:Sa(new Date(ve),G)}}),I.useEffect(()=>{const ve=setInterval(()=>{we(le=>le<_e.length-1?le+1:0)},2e3);return Ne||clearInterval(ve),()=>clearInterval(ve)},[_e,Ne]),v.jsx("div",{className:`${ee||"light"} flex ${o?"w-fit grow-0":"w-full grow"}`,dir:V==="he"||V==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${h?h===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${V||"en"}`,F==null?void 0:F.graphContainer),style:{...(te==null?void 0:te.graphContainer)||{},...h&&h!==!0?{backgroundColor:h}:{}},id:E,ref:Oe,"aria-label":J||`${r?`The graph shows ${r}. `:""}This is an animated diverging bar chart showing data changes over time. ${a?` ${a}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:h?s||"1rem":s||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||a||j||$?v.jsx(Zt,{styles:{title:te==null?void 0:te.title,description:te==null?void 0:te.description},classNames:{title:F==null?void 0:F.title,description:F==null?void 0:F.description},graphTitle:r,graphDescription:a,width:o,graphDownload:j?Oe.current:void 0,dataDownload:$?e.map(ve=>ve.data).filter(ve=>ve!==void 0).length>0?e.map(ve=>ve.data).filter(ve=>ve!==void 0):e.filter(ve=>ve!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{Te(!Ne)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Ne?"Click to pause animation":"Click to play animation",children:Ne?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:_e[0],max:_e[_e.length-1],marks:ge,step:null,defaultValue:_e[_e.length-1],value:_e[xe],onChangeComplete:ve=>{we(_e.indexOf(ve))},onChange:ve=>{we(_e.indexOf(ve))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[B?v.jsx(g0,{colorLegendTitle:H,colorDomain:[S,b],colors:[f,c],showNAColor:!1}):null,v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:he,"aria-label":"Graph area",children:(o||X)&&(i||ce)?v.jsx(lve,{data:e,barColors:[f,c],width:o||X,centerGap:_,height:Math.max(R,i||(A?R?(o||X)*A>R?(o||X)*A:R:(o||X)*A:ce)),truncateBy:C,leftMargin:d,rightMargin:m,topMargin:g,bottomMargin:y,axisTitles:[S,b],tooltip:T,onSeriesMouseOver:M,barPadding:w,refValues:N,maxValue:z,minValue:W,showValues:Fe(D)?!0:D,onSeriesMouseClick:k,showTicks:K,suffix:Y,prefix:ne,dateFormat:G,indx:xe,resetSelectionOnDoubleClick:Z,detailsOnClick:re,styles:te,classNames:F,noOfTicks:q}):null})]}),n||l?v.jsx(tr,{styles:{footnote:te==null?void 0:te.footnote,source:te==null?void 0:te.source},classNames:{footnote:F==null?void 0:F.footnote,source:F==null?void 0:F.source},sources:n,footNote:l,width:o}):null]})})})})}function sve(t){const{data:e,xDomain:r,mapData:n,xColorLegendTitle:a,yDomain:i,yColorLegendTitle:o,width:l,height:s,colors:f,scale:c,centerPoint:h,mapBorderWidth:d,mapNoDataColor:m,mapBorderColor:g,tooltip:y,onSeriesMouseOver:b,zoomScaleExtend:S,zoomTranslateExtend:w,highlightedIds:C,onSeriesMouseClick:k,mapProperty:_,dateFormat:D,indx:T,resetSelectionOnDoubleClick:A,detailsOnClick:M,showColorScale:E,styles:N,classNames:Y,mapProjection:ne}=t,K=Array.from(Hi(Ut(e,ge=>bt(`${ge.date}`,D||"yyyy",new Date)),ge=>ge.date),([ge,ve])=>({date:ge,values:ve})),[B,j]=I.useState(!(l<680)),$=I.useRef(null),[V,z]=I.useState(50),[W,G]=I.useState(void 0),[ae,U]=I.useState(void 0),[H,R]=I.useState(void 0),[ee,J]=I.useState(void 0),[Z,re]=I.useState(void 0),te=I.useRef(null),F=I.useRef(null),q=Array.from({length:r.length},(ge,ve)=>ve),X=Array.from({length:i.length},(ge,ve)=>ve),ie=P2().domain(r).range(q),ce=P2().domain(i).range(X);I.useEffect(()=>{const ge=Qr(F.current),ve=Qr(te.current),le=g7().scaleExtent(S).translateExtent(w||[[-20,-20],[l+20,s+20]]).on("zoom",({transform:ue})=>{ge.attr("transform",ue)});ve.call(le)},[s,l]),I.useEffect(()=>{(()=>{if($.current){const ve=$.current.getBoundingClientRect().height;z(ve+16)}})()},[]);const de=c7(n),he=Pz(n),Oe=de[2]-de[0],Ne=de[3]-de[1],Te=l*190/960*360/Oe,_e=s*190/678*180/Ne,xe=c*Math.min(Te,_e),we=ne==="mercator"?d7().rotate([0,0]).center(h||he.geometry.coordinates).translate([l/2,s/2]).scale(xe):ne==="equalEarth"?h7().rotate([0,0]).center(h||he.geometry.coordinates).translate([l/2,s/2]).scale(xe):ne==="naturalEarth"?p7().rotate([0,0]).center(h||he.geometry.coordinates).translate([l/2,s/2]).scale(xe):ne==="orthographic"?m7().rotate([0,0]).center(h||he.geometry.coordinates).translate([l/2,s/2]).scale(xe):f7().rotate([0,0]).center(h||he.geometry.coordinates).translate([l/2,s/2]).scale(xe);return v.jsxs(v.Fragment,{children:[v.jsxs("svg",{viewBox:`0 0 ${l} ${s}`,width:`${l}px`,height:`${s}px`,ref:te,direction:"ltr",children:[v.jsxs("g",{ref:F,children:[n.features.map((ge,ve)=>K[T].values.findIndex(ue=>ue.id===ge.properties[_])!==-1?null:v.jsx("g",{opacity:W?.3:C.length!==0?C.indexOf(ge.properties[_])!==-1?1:.3:1,children:ge.geometry.type==="MultiPolygon"?ge.geometry.coordinates.map((ue,Ce)=>{let pe="";return ue.forEach(ye=>{let be=" M";ye.forEach((je,$e)=>{const ut=we([je[0],je[1]]);$e!==ye.length-1?be=`${be}${ut[0]} ${ut[1]}L`:be=`${be}${ut[0]} ${ut[1]}`}),pe+=be}),v.jsx("path",{d:pe,style:{stroke:g,strokeWidth:d,fill:m}},Ce)}):ge.geometry.coordinates.map((ue,Ce)=>{let pe="M";return ue.forEach((ye,be)=>{const je=we([ye[0],ye[1]]);be!==ue.length-1?pe=`${pe}${je[0]} ${je[1]}L`:pe=`${pe}${je[0]} ${je[1]}`}),v.jsx("path",{d:pe,style:{stroke:g,strokeWidth:d,fill:m}},Ce)})},ve)),K[T].values.map((ge,ve)=>{const le=n.features.findIndex(ye=>ge.id===ye.properties[_]),ue=Fe(ge.x)?void 0:ie(ge.x),Ce=Fe(ge.y)?void 0:ce(ge.y),pe=ue!==void 0&&Ce!==void 0?f[Ce][ue]:m;return v.jsx("g",{opacity:W?W===pe?1:.3:C.length!==0?C.indexOf(ge.id)!==-1?1:.3:1,onMouseEnter:ye=>{R(ge),re(ye.clientY),J(ye.clientX),b&&b(ge)},onClick:()=>{(k||M)&&(Sr(ae,ge)&&A?(U(void 0),k==null||k(void 0)):(U(ge),k==null||k(ge)))},onMouseMove:ye=>{R(ge),re(ye.clientY),J(ye.clientX)},onMouseLeave:()=>{R(void 0),J(void 0),re(void 0),b&&b(void 0)},children:le===-1?null:n.features[le].geometry.type==="MultiPolygon"?n.features[le].geometry.coordinates.map((ye,be)=>{let je="";return ye.forEach($e=>{let ut=" M";$e.forEach((Ie,Ze)=>{const Ke=we([Ie[0],Ie[1]]);Ze!==$e.length-1?ut=`${ut}${Ke[0]} ${Ke[1]}L`:ut=`${ut}${Ke[0]} ${Ke[1]}`}),je+=ut}),v.jsx("path",{d:je,className:`${pe===m?"stroke-primary-gray-400 dark:stroke-primary-gray-500":"stroke-primary-white dark:stroke-primary-gray-650"}`,style:{strokeWidth:d,fill:pe}},be)}):n.features[le].geometry.coordinates.map((ye,be)=>{let je="M";return ye.forEach(($e,ut)=>{const Ie=we([$e[0],$e[1]]);ut!==ye.length-1?je=`${je}${Ie[0]} ${Ie[1]}L`:je=`${je}${Ie[0]} ${Ie[1]}`}),v.jsx("path",{d:je,className:`${pe===m?"stroke-primary-gray-400 dark:stroke-primary-gray-500":"stroke-primary-white dark:stroke-primary-gray-650"}`,style:{strokeWidth:d,fill:pe}},be)})},ve)}),H?n.features.filter(ge=>ge.properties[_]===H.id).map((ge,ve)=>v.jsx("g",{children:ge.geometry.type==="MultiPolygon"?ge.geometry.coordinates.map((le,ue)=>{let Ce="";return le.forEach(pe=>{let ye=" M";pe.forEach((be,je)=>{const $e=we([be[0],be[1]]);je!==pe.length-1?ye=`${ye}${$e[0]} ${$e[1]}L`:ye=`${ye}${$e[0]} ${$e[1]}`}),Ce+=ye}),v.jsx("path",{d:Ce,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},ue)}):ge.geometry.coordinates.map((le,ue)=>{let Ce="M";return le.forEach((pe,ye)=>{const be=we([pe[0],pe[1]]);ye!==le.length-1?Ce=`${Ce}${be[0]} ${be[1]}L`:Ce=`${Ce}${be[0]} ${be[1]}`}),v.jsx("path",{d:Ce,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},ue)})},ve)):null]}),v.jsx("foreignObject",{x:10,y:B?s-V-5:s-46,width:B?189:101,height:B?V:36,children:E?B?v.jsxs("div",{ref:$,children:[v.jsx("div",{style:{marginBottom:"-0.75rem",marginLeft:"164px",backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"relative"},onClick:()=>{j(!1)},children:v.jsx(n7,{})}),v.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.5",width:"175px"},children:[v.jsxs("div",{className:"flex gap-1 items-center",children:[v.jsx("svg",{width:"136px",viewBox:"0 0 136 136",className:"shrink-0",children:v.jsxs("g",{children:[f.map((ge,ve)=>v.jsx("g",{transform:`translate(0,${100-ve*25})`,children:ge.map((le,ue)=>v.jsx("rect",{y:1,x:ue*25+1,fill:le,width:23,height:23,strokeWidth:W===le?2:.25,style:{cursor:"pointer"},onMouseOver:()=>{G(le)},onMouseLeave:()=>{G(void 0)}},ue))},ve)),v.jsx("g",{transform:"translate(0,125)",children:r.map((ge,ve)=>v.jsx("text",{y:10,x:(ve+1)*25,fontSize:10,textAnchor:"middle",children:typeof ge=="string"||ge<1?ge:_t(ge,"","")},ve))}),i.map((ge,ve)=>v.jsx("g",{transform:`translate(${Math.max(Math.min(r.length+1,5),4)*25+10},${100-ve*25})`,children:v.jsx("text",{x:0,transform:"rotate(-90)",y:0,fontSize:10,textAnchor:"middle",children:typeof ge=="string"||ge<1?ge:_t(ge,"","")})},ve))]})}),v.jsx(or,{marginBottom:"none",size:"xs",className:"leading-normal text-center shrink-0",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",overflow:"hidden",writingMode:"vertical-rl",height:"8.5rem",transform:"rotate(180deg)"},children:o})]}),v.jsx(or,{marginBottom:"none",size:"xs",className:"mt-1 leading-normal text-center",style:{display:"-webkit-box",WebkitLineClamp:"1",width:"8.5rem",WebkitBoxOrient:"vertical",overflow:"hidden"},children:a})]})]}):v.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{j(!0)},children:v.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})}):null})]}),H&&y&&ee&&Z?v.jsx(yr,{data:H,body:y,xPos:ee,yPos:Z,backgroundStyle:N==null?void 0:N.tooltip,className:Y==null?void 0:Y.tooltip}):null,M?v.jsx(Tr,{open:ae!==void 0,onClose:()=>{U(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(M,ae)}})}):null]})}function fq(t){const{data:e,mapData:r,graphTitle:n,colors:a=Qe.light.bivariateColors.colors05x05,sources:i,graphDescription:o,height:l,width:s,footNote:f,xDomain:c,yDomain:h,xColorLegendTitle:d="X Color key",yColorLegendTitle:m="Y Color key",tooltip:g,scale:y=.95,centerPoint:b,padding:S,mapBorderWidth:w=.5,showColorScale:C=!0,mapNoDataColor:k=Qe.light.graphNoData,backgroundColor:_=!1,mapBorderColor:D=Qe.light.grays["gray-500"],relativeHeight:T,onSeriesMouseOver:A,isWorldMap:M=!0,zoomScaleExtend:E=[.8,6],zoomTranslateExtend:N,graphID:Y,highlightedIds:ne=[],onSeriesMouseClick:K,mapProperty:B="ISO3",graphDownload:j=!1,dataDownload:$=!1,showAntarctica:V=!1,language:z="en",minHeight:W=0,theme:G="light",dateFormat:ae="yyyy",showOnlyActiveDate:U=!1,autoPlay:H=!1,ariaLabel:R,resetSelectionOnDoubleClick:ee=!0,detailsOnClick:J,styles:Z,classNames:re,mapProjection:te}=t,[F,q]=I.useState(0),[X,ie]=I.useState(0),[ce,de]=I.useState(void 0),he=I.useRef(null),Oe=I.useRef(null);I.useEffect(()=>{const ve=new ResizeObserver(le=>{q(s||le[0].target.clientWidth||760),ie(l||le[0].target.clientHeight||480)});return he.current&&(ie(he.current.clientHeight||480),q(he.current.clientWidth||760),s||ve.observe(he.current)),()=>ve.disconnect()},[s,l]);const[Ne,Te]=I.useState(H),_e=qi(Bt(e,ve=>ve.date).map(ve=>bt(`${ve.date}`,ae,new Date).getTime()),(ve,le)=>Ka(ve,le)),[xe,we]=I.useState(H?0:_e.length-1),ge={};return _e.forEach((ve,le)=>{ge[`${ve}`]={style:{color:le===xe?"#232E3D":"#A9B1B7",fontWeight:le===xe?"bold":"normal",display:le===xe||!U?"inline":"none"},label:Sa(new Date(ve),ae)}}),I.useEffect(()=>{const ve=setInterval(()=>{we(le=>le<_e.length-1?le+1:0)},2e3);return Ne||clearInterval(ve),()=>clearInterval(ve)},[_e,Ne]),I.useEffect(()=>{typeof r=="string"?ka(r).then(le=>{de(le)}):de(r||u7)},[r]),c&&h&&(c.length!==a[0].length-1||h.length!==a.length-1)?(console.error("the xDomain and yDomain array length don't match to the color array length"),null):v.jsx("div",{className:`${G||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:z==="he"||z==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${_?_===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${z||"en"}`,re==null?void 0:re.graphContainer),style:{...(Z==null?void 0:Z.graphContainer)||{},..._&&_!==!0?{backgroundColor:_}:{}},id:Y,ref:Oe,"aria-label":R||`${n?`The graph shows ${n}. `:""}This is bi-variate choropleth map where geographic areas are colored in proportion to two variables showing data changes over time.${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:_?S||"1rem":S||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[n||o||j||$?v.jsx(Zt,{styles:{title:Z==null?void 0:Z.title,description:Z==null?void 0:Z.description},classNames:{title:re==null?void 0:re.title,description:re==null?void 0:re.description},graphTitle:n,graphDescription:o,width:s,graphDownload:j?Oe.current:void 0,dataDownload:$?e.map(ve=>ve.data).filter(ve=>ve!==void 0).length>0?e.map(ve=>ve.data).filter(ve=>ve!==void 0):e.filter(ve=>ve!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{Te(!Ne)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Ne?"Click to pause animation":"Click to play animation",children:Ne?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:_e[0],max:_e[_e.length-1],marks:ge,step:null,defaultValue:_e[_e.length-1],value:_e[xe],onChangeComplete:ve=>{we(_e.indexOf(ve))},onChange:ve=>{we(_e.indexOf(ve))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:he,"aria-label":"Map area",children:(s||F)&&(l||X)&&ce?v.jsx(sve,{data:e,mapData:V?ce:{...ce,features:ce.features.filter(ve=>ve.properties.NAME!=="Antarctica")},xDomain:c||X3(e.map(ve=>ve.x),a[0].length),yDomain:h||X3(e.map(ve=>ve.y),a.length),width:s||F,height:Math.max(W,l||(T?W?(s||F)*T>W?(s||F)*T:W:(s||F)*T:X)),scale:y,centerPoint:b,colors:a,xColorLegendTitle:d,yColorLegendTitle:m,mapBorderWidth:Fe(w)?.5:w,mapNoDataColor:k,mapBorderColor:D,tooltip:g,showColorScale:C,onSeriesMouseOver:A,isWorldMap:M,zoomScaleExtend:E,zoomTranslateExtend:N,onSeriesMouseClick:K,mapProperty:B,highlightedIds:ne,dateFormat:ae,indx:xe,resetSelectionOnDoubleClick:ee,styles:Z,classNames:re,detailsOnClick:J,mapProjection:te||(M?"naturalEarth":"mercator")}):null}),i||f?v.jsx(tr,{styles:{footnote:Z==null?void 0:Z.footnote,source:Z==null?void 0:Z.source},classNames:{footnote:re==null?void 0:re.footnote,source:re==null?void 0:re.source},sources:i,footNote:f,width:s}):null]})})})})}function uve(t){const{data:e,colorDomain:r,colors:n,mapData:a,colorLegendTitle:i,categorical:o,height:l,width:s,scale:f,centerPoint:c,tooltip:h,mapBorderWidth:d,mapBorderColor:m,mapNoDataColor:g,onSeriesMouseOver:y,showColorScale:b,zoomScaleExtend:S,zoomTranslateExtend:w,highlightedIds:C,onSeriesMouseClick:k,mapProperty:_,dateFormat:D,indx:T,resetSelectionOnDoubleClick:A,detailsOnClick:M,styles:E,classNames:N,mapProjection:Y}=t,ne=Array.from(Hi(Ut(e,Te=>bt(`${Te.date}`,D||"yyyy",new Date)),Te=>Te.date),([Te,_e])=>({date:Te,values:_e})),[K,B]=I.useState(void 0),[j,$]=I.useState(!(s<680)),V=I.useRef(null),[z,W]=I.useState(50),[G,ae]=I.useState(void 0),[U,H]=I.useState(void 0),[R,ee]=I.useState(void 0),[J,Z]=I.useState(void 0),re=I.useRef(null),te=I.useRef(null),F=o?Ys().domain(r).range(n):P2().domain(r).range(n);I.useEffect(()=>{const Te=Qr(te.current),_e=Qr(re.current),xe=g7().scaleExtent(S).translateExtent(w||[[-20,-20],[s+20,l+20]]).on("zoom",({transform:we})=>{Te.attr("transform",we)});_e.call(xe)},[l,s]),I.useEffect(()=>{(()=>{if(V.current){const _e=V.current.getBoundingClientRect().height;W(_e+16)}})()},[]);const q=c7(a),X=o9(a),ie=q[2]-q[0],ce=q[3]-q[1],de=s*190/960*360/ie,he=l*190/678*180/ce,Oe=f*Math.min(de,he),Ne=Y==="mercator"?d7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):Y==="equalEarth"?h7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):Y==="naturalEarth"?p7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):Y==="orthographic"?m7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):f7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe);return v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${s}px`,height:`${l}px`,viewBox:`0 0 ${s} ${l}`,ref:re,direction:"ltr",children:[v.jsxs("g",{ref:te,children:[a.features.map((Te,_e)=>ne[T].values.findIndex(we=>we.id===Te.properties[_])!==-1?null:v.jsx("g",{opacity:K?.3:C.length!==0?C.indexOf(Te.properties[_])!==-1?1:.3:1,children:Te.geometry.type==="MultiPolygon"?Te.geometry.coordinates.map((we,ge)=>{let ve="";return we.forEach(le=>{let ue=" M";le.forEach((Ce,pe)=>{const ye=Ne([Ce[0],Ce[1]]);pe!==le.length-1?ue=`${ue}${ye[0]} ${ye[1]}L`:ue=`${ue}${ye[0]} ${ye[1]}`}),ve+=ue}),v.jsx("path",{d:ve,style:{stroke:m,fill:g,strokeWidth:d}},ge)}):Te.geometry.coordinates.map((we,ge)=>{let ve="M";return we.forEach((le,ue)=>{const Ce=Ne([le[0],le[1]]);ue!==we.length-1?ve=`${ve}${Ce[0]} ${Ce[1]}L`:ve=`${ve}${Ce[0]} ${Ce[1]}`}),v.jsx("path",{d:ve,style:{stroke:m,strokeWidth:d,fill:g}},ge)})},_e)),ne[T].values.map((Te,_e)=>{const xe=a.features.findIndex(ge=>Te.id===ge.properties[_]),we=Fe(Te.x)?g:F(Te.x);return v.jsx("g",{opacity:K?K===we?1:.3:C.length!==0?C.indexOf(Te.id)!==-1?1:.3:1,onMouseEnter:ge=>{H(Te),Z(ge.clientY),ee(ge.clientX),y&&y(Te)},onMouseMove:ge=>{H(Te),Z(ge.clientY),ee(ge.clientX)},onMouseLeave:()=>{H(void 0),ee(void 0),Z(void 0),y&&y(void 0)},onClick:()=>{(k||M)&&(Sr(G,Te)&&A?(ae(void 0),k==null||k(void 0)):(ae(Te),k==null||k(Te)))},children:xe===-1?null:a.features[xe].geometry.type==="MultiPolygon"?a.features[xe].geometry.coordinates.map((ge,ve)=>{let le="";return ge.forEach(ue=>{let Ce=" M";ue.forEach((pe,ye)=>{const be=Ne([pe[0],pe[1]]);ye!==ue.length-1?Ce=`${Ce}${be[0]} ${be[1]}L`:Ce=`${Ce}${be[0]} ${be[1]}`}),le+=Ce}),v.jsx("path",{d:le,style:{stroke:m,strokeWidth:d,fill:we}},ve)}):a.features[xe].geometry.coordinates.map((ge,ve)=>{let le="M";return ge.forEach((ue,Ce)=>{const pe=Ne([ue[0],ue[1]]);Ce!==ge.length-1?le=`${le}${pe[0]} ${pe[1]}L`:le=`${le}${pe[0]} ${pe[1]}`}),v.jsx("path",{d:le,style:{stroke:m,strokeWidth:d,fill:we}},ve)})},_e)}),U?a.features.filter(Te=>Te.properties[_]===U.id).map((Te,_e)=>v.jsx("g",{children:Te.geometry.type==="MultiPolygon"?Te.geometry.coordinates.map((xe,we)=>{let ge="";return xe.forEach(ve=>{let le=" M";ve.forEach((ue,Ce)=>{const pe=Ne([ue[0],ue[1]]);Ce!==ve.length-1?le=`${le}${pe[0]} ${pe[1]}L`:le=`${le}${pe[0]} ${pe[1]}`}),ge+=le}),v.jsx("path",{d:ge,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},we)}):Te.geometry.coordinates.map((xe,we)=>{let ge="M";return xe.forEach((ve,le)=>{const ue=Ne([ve[0],ve[1]]);le!==xe.length-1?ge=`${ge}${ue[0]} ${ue[1]}L`:ge=`${ge}${ue[0]} ${ue[1]}`}),v.jsx("path",{d:ge,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},we)})},_e)):null]}),b===!1?null:v.jsx("foreignObject",{x:10,y:j?l-z-5:l-46,width:j?o?150:352:101,height:j?z:36,children:j?v.jsxs("div",{ref:V,children:[v.jsx("div",{style:{marginBottom:"-0.75rem",marginLeft:o?"126px":"328px",backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"relative"},onClick:()=>{$(!1)},children:v.jsx(n7,{})}),v.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.5",width:o?"138px":"340px"},children:[i&&i!==""?v.jsx(or,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:i}):null,o?v.jsx("div",{className:"flex flex-col gap-3",children:r.map((Te,_e)=>v.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{B(n[_e%n.length])},onMouseLeave:()=>{B(void 0)},children:[v.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:n[_e%n.length]}}),v.jsx(or,{size:"sm",marginBottom:"none",leading:"none",children:Te})]},_e))}):v.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:v.jsxs("g",{children:[r.map((Te,_e)=>v.jsxs("g",{onMouseOver:()=>{B(n[_e])},onMouseLeave:()=>{B(void 0)},className:"cursor-pointer",children:[v.jsx("rect",{x:_e*320/n.length+1,y:1,width:320/n.length-2,height:8,className:K===n[_e]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:n[_e],...K===n[_e]?{}:{stroke:n[_e]}}}),v.jsx("text",{x:(_e+1)*320/n.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:_t(Te,"","")})]},_e)),v.jsx("g",{children:v.jsx("rect",{onMouseOver:()=>{B(n[r.length])},onMouseLeave:()=>{B(void 0)},x:r.length*320/n.length+1,y:1,width:320/n.length-2,height:8,className:`cursor-pointer ${K===n[r.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:n[r.length],...K===n[r.length]?{}:{stroke:n[r.length]}}})})]})})]})]}):v.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{$(!0)},children:v.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})})]}),U&&h&&R&&J?v.jsx(yr,{data:U,body:h,xPos:R,yPos:J,backgroundStyle:E==null?void 0:E.tooltip,className:N==null?void 0:N.tooltip}):null,M?v.jsx(Tr,{open:G!==void 0,onClose:()=>{ae(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(M,G)}})}):null]})}function dq(t){const{data:e,mapData:r,graphTitle:n,colors:a,sources:i,graphDescription:o,height:l,width:s,footNote:f,colorDomain:c,colorLegendTitle:h,scaleType:d="threshold",scale:m=.95,centerPoint:g,padding:y,mapBorderWidth:b=.5,mapNoDataColor:S=Qe.light.graphNoData,backgroundColor:w=!1,mapBorderColor:C=Qe.light.grays["gray-500"],relativeHeight:k,tooltip:_,onSeriesMouseOver:D,isWorldMap:T=!0,showColorScale:A=!0,zoomScaleExtend:M=[.8,6],zoomTranslateExtend:E,graphID:N,highlightedIds:Y=[],onSeriesMouseClick:ne,mapProperty:K="ISO3",graphDownload:B=!1,dataDownload:j=!1,showAntarctica:$=!1,language:V="en",minHeight:z=0,theme:W="light",dateFormat:G="yyyy",showOnlyActiveDate:ae=!1,autoPlay:U=!1,ariaLabel:H,resetSelectionOnDoubleClick:R=!0,detailsOnClick:ee,styles:J,classNames:Z,mapProjection:re}=t,[te,F]=I.useState(0),[q,X]=I.useState(0),[ie,ce]=I.useState(void 0),de=I.useRef(null),he=I.useRef(null);I.useEffect(()=>{const ve=new ResizeObserver(le=>{F(s||le[0].target.clientWidth||760),X(l||le[0].target.clientHeight||480)});return de.current&&(X(de.current.clientHeight||480),F(de.current.clientWidth||760),s||ve.observe(de.current)),()=>ve.disconnect()},[s,l]),I.useEffect(()=>{typeof r=="string"?ka(r).then(le=>{ce(le)}):ce(r||u7)},[r]);const Oe=c||(d==="categorical"?J0(e,"x"):X3(e.map(ve=>ve.x),(a==null?void 0:a.length)||4)),[Ne,Te]=I.useState(U),_e=qi(Bt(e,ve=>ve.date).map(ve=>bt(`${ve.date}`,G,new Date).getTime()),(ve,le)=>Ka(ve,le)),[xe,we]=I.useState(U?0:_e.length-1),ge={};return _e.forEach((ve,le)=>{ge[`${ve}`]={style:{color:le===xe?"#232E3D":"#A9B1B7",fontWeight:le===xe?"bold":"normal",display:le===xe||!ae?"inline":"none"},label:Sa(new Date(ve),G)}}),I.useEffect(()=>{const ve=setInterval(()=>{we(le=>le<_e.length-1?le+1:0)},2e3);return Ne||clearInterval(ve),()=>clearInterval(ve)},[_e,Ne]),v.jsx("div",{className:`${W||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:V==="he"||V==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${w?w===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${V||"en"}`,Z==null?void 0:Z.graphContainer),style:{...(J==null?void 0:J.graphContainer)||{},...w&&w!==!0?{backgroundColor:w}:{}},id:N,ref:he,"aria-label":H||`${n?`The graph shows ${n}. `:""}This is a choropleth map where geographic areas are colored in proportion to a specific variable showing data changes over time.${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:w?y||"1rem":y||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[n||o||B||j?v.jsx(Zt,{styles:{title:J==null?void 0:J.title,description:J==null?void 0:J.description},classNames:{title:Z==null?void 0:Z.title,description:Z==null?void 0:Z.description},graphTitle:n,graphDescription:o,width:s,graphDownload:B?he.current:void 0,dataDownload:j?e.map(ve=>ve.data).filter(ve=>ve!==void 0).length>0?e.map(ve=>ve.data).filter(ve=>ve!==void 0):e.filter(ve=>ve!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{Te(!Ne)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Ne?"Click to pause animation":"Click to play animation",children:Ne?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:_e[0],max:_e[_e.length-1],marks:ge,step:null,defaultValue:_e[_e.length-1],value:_e[xe],onChangeComplete:ve=>{we(_e.indexOf(ve))},onChange:ve=>{we(_e.indexOf(ve))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:de,"aria-label":"Map area",children:(s||te)&&(l||q)&&ie?v.jsx(uve,{data:e,mapData:$?ie:{...ie,features:ie.features.filter(ve=>ve.properties.NAME!=="Antarctica")},colorDomain:Oe,width:s||te,height:Math.max(z,l||(k?z?(s||te)*k>z?(s||te)*k:z:(s||te)*k:q)),scale:m,centerPoint:g,colors:a||(d==="categorical"?Qe[W].sequentialColors[`neutralColorsx0${Oe.length}`]:Qe[W].sequentialColors[`neutralColorsx0${Oe.length+1}`]),colorLegendTitle:h,mapBorderWidth:b,mapNoDataColor:S,categorical:d==="categorical",mapBorderColor:C,tooltip:_,onSeriesMouseOver:D,isWorldMap:T,showColorScale:A,zoomScaleExtend:M,zoomTranslateExtend:E,onSeriesMouseClick:ne,mapProperty:K,highlightedIds:Y,dateFormat:G,indx:xe,resetSelectionOnDoubleClick:R,styles:J,classNames:Z,detailsOnClick:ee,mapProjection:re||(T?"naturalEarth":"mercator")}):null}),i||f?v.jsx(tr,{styles:{footnote:J==null?void 0:J.footnote,source:J==null?void 0:J.source},classNames:{footnote:Z==null?void 0:Z.footnote,source:Z==null?void 0:Z.source},sources:i,footNote:f,width:s}):null]})})})})}function cve(t){var Te;const{data:e,colors:r,mapData:n,colorLegendTitle:a,colorDomain:i,radius:o,height:l,width:s,scale:f,centerPoint:c,tooltip:h,showLabels:d,mapBorderWidth:m,mapBorderColor:g,mapNoDataColor:y,onSeriesMouseOver:b,showColorScale:S,zoomScaleExtend:w,zoomTranslateExtend:C,highlightedDataPoints:k,onSeriesMouseClick:_,dateFormat:D,indx:T,resetSelectionOnDoubleClick:A,detailsOnClick:M,styles:E,classNames:N,mapProjection:Y}=t,ne=Array.from(Hi(Ut(e,_e=>bt(`${_e.date}`,D||"yyyy",new Date)),_e=>_e.date),([_e,xe])=>({date:_e,values:xe})),[K,B]=I.useState(void 0),[j,$]=I.useState(!(s<680)),V=I.useRef(null),[z,W]=I.useState(50),[G,ae]=I.useState(void 0),[U,H]=I.useState(void 0),[R,ee]=I.useState(void 0),[J,Z]=I.useState(void 0),re=I.useRef(null),te=I.useRef(null),F=e.filter(_e=>_e.radius===void 0).length!==e.length?l4().domain([0,(Te=Vr(e,"radius"))==null?void 0:Te.radius]).range([.25,o]).nice():void 0;I.useEffect(()=>{const _e=Qr(te.current),xe=Qr(re.current),we=g7().scaleExtent(w).translateExtent(C||[[-20,-20],[s+20,l+20]]).on("zoom",({transform:ge})=>{_e.attr("transform",ge)});xe.call(we)},[l,s]),I.useEffect(()=>{(()=>{if(V.current){const xe=V.current.getBoundingClientRect().height;W(xe+16)}})()},[]);const q=c7(n),X=o9(n),ie=q[2]-q[0],ce=q[3]-q[1],de=s*190/960*360/ie,he=l*190/678*180/ce,Oe=f*Math.min(de,he),Ne=Y==="mercator"?d7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):Y==="equalEarth"?h7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):Y==="naturalEarth"?p7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):Y==="orthographic"?m7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe):f7().rotate([0,0]).center(c||X.geometry.coordinates).translate([s/2,l/2]).scale(Oe);return v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${s}px`,height:`${l}px`,viewBox:`0 0 ${s} ${l}`,ref:re,direction:"ltr",children:[v.jsxs("g",{ref:te,children:[n.features.map((_e,xe)=>v.jsx("g",{children:_e.geometry.type==="MultiPolygon"?_e.geometry.coordinates.map((we,ge)=>{let ve="";return we.forEach(le=>{let ue=" M";le.forEach((Ce,pe)=>{const ye=Ne([Ce[0],Ce[1]]);pe!==le.length-1?ue=`${ue}${ye[0]} ${ye[1]}L`:ue=`${ue}${ye[0]} ${ye[1]}`}),ve+=ue}),v.jsx("path",{d:ve,style:{stroke:g,strokeWidth:m,fill:y}},ge)}):_e.geometry.coordinates.map((we,ge)=>{let ve="M";return we.forEach((le,ue)=>{const Ce=Ne([le[0],le[1]]);ue!==we.length-1?ve=`${ve}${Ce[0]} ${Ce[1]}L`:ve=`${ve}${Ce[0]} ${Ce[1]}`}),v.jsx("path",{d:ve,style:{stroke:g,strokeWidth:m,fill:y}},ge)})},xe)),v.jsx(mo,{children:ne[T].values.map((_e,xe)=>{const we=e.filter(ge=>ge.color).length===0?r[0]:_e.color?r[i.indexOf(`${_e.color}`)]:Qe.gray;return v.jsxs("g",{opacity:K?K===we?1:.3:k.length!==0?k.indexOf(_e.data.id)!==-1?1:.3:1,onMouseEnter:ge=>{H(_e),Z(ge.clientY),ee(ge.clientX),b&&b(_e)},onMouseMove:ge=>{H(_e),Z(ge.clientY),ee(ge.clientX)},onMouseLeave:()=>{H(void 0),ee(void 0),Z(void 0),b&&b(void 0)},onClick:()=>{(_||M)&&(Sr(G,_e)&&A?(ae(void 0),_==null||_(void 0)):(ae(_e),_==null||_(_e)))},children:[v.jsx(ur.circle,{cx:Ne([_e.long,_e.lat])[0],cy:Ne([_e.long,_e.lat])[1],style:{fillOpacity:.8},animate:{r:F?F(_e.radius||0):o,fill:e.filter(ge=>ge.color).length===0?r[0]:_e.color?r[i.indexOf(`${_e.color}`)]:Qe.gray,stroke:e.filter(ge=>ge.color).length===0?r[0]:_e.color?r[i.indexOf(`${_e.color}`)]:Qe.gray},transition:{duration:.5}}),d&&_e.label?v.jsx(ur.text,{x:F?Ne([_e.long,_e.lat])[0]+F(_e.radius||0):Ne([_e.long,_e.lat])[0]+o,y:Ne([_e.long,_e.lat])[1],className:"fill-primary-gray-600 dark:fill-primary-gray-300 text-sm",style:{textAnchor:"start"},dx:4,dy:5,animate:{opacity:1},transition:{duration:.5},children:_e.label}):null]},xe)})})]}),v.jsx("foreignObject",{x:10,y:j?l-z-5:l-46,width:j?150:101,height:j?z:36,children:e.filter(_e=>_e.color).length===0||S===!1?null:j?v.jsxs("div",{ref:V,children:[v.jsx("div",{style:{marginBottom:"-0.75rem",marginLeft:"126px",backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"relative"},onClick:()=>{$(!1)},children:v.jsx(n7,{})}),v.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.5",width:"138px"},children:[a&&a!==""?v.jsx(or,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:a}):null,v.jsx("div",{className:"flex flex-col gap-3",children:i.map((_e,xe)=>v.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{B(r[xe%r.length])},onMouseLeave:()=>{B(void 0)},children:[v.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:r[xe%r.length]}}),v.jsx(or,{size:"sm",marginBottom:"none",leading:"none",children:_e})]},xe))})]})]}):v.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{$(!0)},children:v.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})})]}),U&&h&&R&&J?v.jsx(yr,{data:U,body:h,xPos:R,yPos:J,backgroundStyle:E==null?void 0:E.tooltip,className:N==null?void 0:N.tooltip}):null,M?v.jsx(Tr,{open:G!==void 0,onClose:()=>{ae(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(M,G)}})}):null]})}function hq(t){const{data:e,mapData:r,graphTitle:n,colors:a,sources:i,graphDescription:o,height:l,width:s,footNote:f,colorLegendTitle:c,colorDomain:h,radius:d=5,scale:m=.95,centerPoint:g,padding:y,mapBorderWidth:b=.5,mapNoDataColor:S=Qe.light.graphNoData,backgroundColor:w=!1,showLabels:C=!1,mapBorderColor:k=Qe.light.grays["gray-500"],tooltip:_,relativeHeight:D,onSeriesMouseOver:T,isWorldMap:A=!0,showColorScale:M=!0,zoomScaleExtend:E=[.8,6],zoomTranslateExtend:N,graphID:Y,dateFormat:ne="yyyy",showOnlyActiveDate:K=!1,autoPlay:B=!1,highlightedDataPoints:j=[],onSeriesMouseClick:$,graphDownload:V=!1,dataDownload:z=!1,showAntarctica:W=!1,language:G="en",minHeight:ae=0,theme:U="light",ariaLabel:H,resetSelectionOnDoubleClick:R=!0,detailsOnClick:ee,styles:J,classNames:Z,mapProjection:re}=t,[te,F]=I.useState(0),[q,X]=I.useState(0),[ie,ce]=I.useState(void 0),de=I.useRef(null),he=I.useRef(null);I.useEffect(()=>{const ge=new ResizeObserver(ve=>{F(s||ve[0].target.clientWidth||760),X(l||ve[0].target.clientHeight||480)});return de.current&&(X(de.current.clientHeight||480),F(de.current.clientWidth||760),s||ge.observe(de.current)),()=>ge.disconnect()},[s,l]);const[Oe,Ne]=I.useState(B),Te=qi(Bt(e,ge=>ge.date).map(ge=>bt(`${ge.date}`,ne,new Date).getTime()),(ge,ve)=>Ka(ge,ve)),[_e,xe]=I.useState(B?0:Te.length-1),we={};return Te.forEach((ge,ve)=>{we[`${ge}`]={style:{color:ve===_e?"#232E3D":"#A9B1B7",fontWeight:ve===_e?"bold":"normal",display:ve===_e||!K?"inline":"none"},label:Sa(new Date(ge),ne)}}),I.useEffect(()=>{const ge=setInterval(()=>{xe(ve=>ve<Te.length-1?ve+1:0)},2e3);return Oe||clearInterval(ge),()=>clearInterval(ge)},[Te,Oe]),I.useEffect(()=>{typeof r=="string"?ka(r).then(ve=>{ce(ve)}):ce(r||u7)},[r]),v.jsx("div",{className:`${U||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:G==="he"||G==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${w?w===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${G||"en"}`,Z==null?void 0:Z.graphContainer),style:{...(J==null?void 0:J.graphContainer)||{},...w&&w!==!0?{backgroundColor:w}:{}},id:Y,ref:he,"aria-label":H||`${n?`The graph shows ${n}. `:""}This is an animated dot density map showing the distribution of a variable across a region or world, with each dot representing a data point and changes over time.${o?` ${o}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:w?y||"1rem":y||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[n||o||V||z?v.jsx(Zt,{styles:{title:J==null?void 0:J.title,description:J==null?void 0:J.description},classNames:{title:Z==null?void 0:Z.title,description:Z==null?void 0:Z.description},graphTitle:n,graphDescription:o,width:s,graphDownload:V?he.current:void 0,dataDownload:z?e.map(ge=>ge.data).filter(ge=>ge!==void 0).length>0?e.map(ge=>ge.data).filter(ge=>ge!==void 0):e.filter(ge=>ge!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{Ne(!Oe)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":Oe?"Click to pause animation":"Click to play animation",children:Oe?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:Te[0],max:Te[Te.length-1],marks:we,step:null,defaultValue:Te[Te.length-1],value:Te[_e],onChangeComplete:ge=>{xe(Te.indexOf(ge))},onChange:ge=>{xe(Te.indexOf(ge))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:de,"aria-label":"Map area",children:(s||te)&&(l||q)&&ie?v.jsx(cve,{data:e,mapData:W?ie:{...ie,features:ie.features.filter(ge=>ge.properties.NAME!=="Antarctica")},colorDomain:e.filter(ge=>ge.color).length===0?[]:h||Bt(e.filter(ge=>!Fe(ge.color)),"color").map(ge=>`${ge.color}`),width:s||te,height:Math.max(ae,l||(D?ae?(s||te)*D>ae?(s||te)*D:ae:(s||te)*D:q)),scale:m,centerPoint:g,colors:e.filter(ge=>ge.color).length===0?a?[a]:[Qe.primaryColors["blue-600"]]:a||Qe[U].categoricalColors.colors,colorLegendTitle:c,radius:d,mapBorderWidth:b,mapNoDataColor:S,mapBorderColor:k,tooltip:_,onSeriesMouseOver:T,showLabels:C,isWorldMap:A,showColorScale:M,zoomScaleExtend:E,zoomTranslateExtend:N,onSeriesMouseClick:$,highlightedDataPoints:j,dateFormat:ne,indx:_e,resetSelectionOnDoubleClick:R,styles:J,classNames:Z,detailsOnClick:ee,mapProjection:re||(A?"naturalEarth":"mercator")}):null}),i||f?v.jsx(tr,{styles:{footnote:J==null?void 0:J.footnote,source:J==null?void 0:J.source},classNames:{footnote:Z==null?void 0:Z.footnote,source:Z==null?void 0:Z.source},sources:i,footNote:f,width:s}):null]})})})})}function fve(t){var be,je,$e,ut,Ie,Ze,Ke,et,Pt,jt,Tt,St,tt,Mt,Dt,Ye,Lt,Et,Xt,He,It,Ge,Rt,$t,dr,xr,Mr,Er,it;const{data:e,width:r,height:n,showLabels:a,colors:i,colorDomain:o,radius:l,xAxisTitle:s,yAxisTitle:f,leftMargin:c,rightMargin:h,topMargin:d,bottomMargin:m,tooltip:g,onSeriesMouseOver:y,refXValues:b,refYValues:S,highlightAreaSettings:w,selectedColor:C,highlightedDataPoints:k,maxRadiusValue:_,maxXValue:D,minXValue:T,maxYValue:A,minYValue:M,onSeriesMouseClick:E,dateFormat:N,indx:Y,rtl:ne,annotations:K,customHighlightAreaSettings:B,resetSelectionOnDoubleClick:j,detailsOnClick:$,noOfXTicks:V,noOfYTicks:z,labelColor:W,xSuffix:G,ySuffix:ae,xPrefix:U,yPrefix:H,styles:R,classNames:ee}=t,J=Ut(e.map(Xe=>({...Xe,date:bt(`${Xe.date}`,N,new Date)})),"date"),Z=Bt(J,Xe=>Xe.label).map(Xe=>Xe.label),re=Array.from(Hi(ove(e,N||"yyyy"),Xe=>Xe.date),([Xe,Vt])=>({date:Xe,values:Z.map(Yt=>Vt.find(at=>at.label===Yt)).map(Yt=>({...Yt,id:Yt.label}))})),[te,F]=I.useState(void 0),[q,X]=I.useState(void 0),[ie,ce]=I.useState(void 0),[de,he]=I.useState(void 0),Oe={top:d,bottom:m,left:f?c+40:c,right:h},Ne=r-Oe.left-Oe.right,Te=n-Oe.top-Oe.bottom,_e=e.filter(Xe=>Xe.radius===void 0).length!==e.length?l4().domain([0,Fe(_)?(be=Vr(e,"radius"))==null?void 0:be.radius:_]).range([.25,l]).nice():void 0,xe=Fe(T)?((je=Br(e,"x"))==null?void 0:je.x)>0?0:($e=Br(e,"x"))==null?void 0:$e.x:T,we=Fe(D)?((ut=Vr(e,"x"))==null?void 0:ut.x)>0?(Ie=Vr(e,"x"))==null?void 0:Ie.x:0:D,ge=br().domain([xe,we]).range([0,Ne]).nice(),ve=Fe(M)?((Ze=Br(e,"y"))==null?void 0:Ze.y)>0?0:(Ke=Br(e,"y"))==null?void 0:Ke.y:M,le=Fe(A)?((et=Vr(e,"y"))==null?void 0:et.y)>0?(Pt=Vr(e,"y"))==null?void 0:Pt.y:0:A,ue=br().domain([ve,le]).range([Te,0]).nice(),Ce=ge.ticks(V),pe=ue.ticks(z),ye=i9.from(re[Y].values.filter(Xe=>!Fe(Xe.x)&&!Fe(Xe.y)),Xe=>ge(Xe.x),Xe=>ue(Xe.y)).voronoi([0,0,Ne<0?0:Ne,Te<0?0:Te]);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${Oe.left},${Oe.top})`,children:[v.jsx(Az,{areaSettings:w,width:Ne,height:Te,scaleX:ge,scaleY:ue}),v.jsx(Z2,{areaSettings:B,scaleX:ge,scaleY:ue}),v.jsxs("g",{children:[v.jsx(v1,{values:pe.filter(Xe=>Xe!==0),y:pe.filter(Xe=>Xe!==0).map(Xe=>ue(Xe)),x1:0,x2:Ne+Oe.right,styles:{gridLines:(jt=R==null?void 0:R.yAxis)==null?void 0:jt.gridLines,labels:(Tt=R==null?void 0:R.yAxis)==null?void 0:Tt.labels},classNames:{gridLines:(St=ee==null?void 0:ee.yAxis)==null?void 0:St.gridLines,labels:(tt=ee==null?void 0:ee.yAxis)==null?void 0:tt.labels},suffix:ae,prefix:H,labelType:"primary",showGridLines:!0,labelPos:"side"}),v.jsx(Nr,{y1:ue(ve<0?0:ve),y2:ue(ve<0?0:ve),x1:0,x2:Ne,label:_t(ve<0?0:ve,H,ae),labelPos:{x:0,y:ue(ve<0?0:ve),dy:"0.33em",dx:-4},classNames:{axis:(Mt=ee==null?void 0:ee.xAxis)==null?void 0:Mt.axis,label:(Dt=ee==null?void 0:ee.yAxis)==null?void 0:Dt.labels},styles:{axis:(Ye=R==null?void 0:R.xAxis)==null?void 0:Ye.axis,label:{textAnchor:"end",...((Lt=R==null?void 0:R.yAxis)==null?void 0:Lt.labels)||{}}}}),v.jsx(nn,{x:0-Oe.left+15,y:Te/2,style:(Et=R==null?void 0:R.yAxis)==null?void 0:Et.title,className:(Xt=ee==null?void 0:ee.yAxis)==null?void 0:Xt.title,text:f,rotate90:!0})]}),v.jsxs("g",{children:[v.jsx(La,{values:Ce.filter(Xe=>Xe!==0),x:Ce.filter(Xe=>Xe!==0).map(Xe=>ge(Xe)),y1:0,y2:Te,styles:{gridLines:(He=R==null?void 0:R.xAxis)==null?void 0:He.gridLines,labels:(It=R==null?void 0:R.xAxis)==null?void 0:It.labels},classNames:{gridLines:(Ge=ee==null?void 0:ee.xAxis)==null?void 0:Ge.gridLines,labels:(Rt=ee==null?void 0:ee.xAxis)==null?void 0:Rt.labels},suffix:G,prefix:U,labelType:"primary",showGridLines:!0}),v.jsx(Nr,{x1:ge(xe<0?0:xe),x2:ge(xe<0?0:xe),y1:0,y2:Te,label:_t(xe<0?0:xe,U,G),labelPos:{x:ge(xe<0?0:xe),y:Te,dy:"1em",dx:0},classNames:{axis:($t=ee==null?void 0:ee.xAxis)==null?void 0:$t.axis,label:(dr=ee==null?void 0:ee.yAxis)==null?void 0:dr.labels},styles:{axis:(xr=R==null?void 0:R.xAxis)==null?void 0:xr.axis,label:{textAnchor:"middle",...((Mr=R==null?void 0:R.yAxis)==null?void 0:Mr.labels)||{}}}}),v.jsx(nn,{x:Ne/2,y:Te+30,style:(Er=R==null?void 0:R.xAxis)==null?void 0:Er.title,className:(it=ee==null?void 0:ee.xAxis)==null?void 0:it.title,text:s})]}),v.jsxs(mo,{children:[re[Y].values.map((Xe,Vt)=>v.jsx("g",{children:v.jsx("path",{d:ye.renderCell(re[Y].values.findIndex(Yt=>Yt.id===Xe.id)),className:"opacity-0",onMouseEnter:Yt=>{F(Xe),he(Yt.clientY),ce(Yt.clientX),y&&y(Xe)},onMouseMove:Yt=>{F(Xe),he(Yt.clientY),ce(Yt.clientX)},onMouseLeave:()=>{F(void 0),ce(void 0),he(void 0),y&&y(void 0)},onClick:()=>{(E||$)&&(Sr(q,Xe)&&j?(X(void 0),E==null||E(void 0)):(X(Xe),E==null||E(Xe)))}})},Vt)),re[Y].values.map((Xe,Vt)=>v.jsx("g",{children:v.jsxs(ur.g,{opacity:C?Xe.color&&i[o.indexOf(`${Xe.color}`)]===C?1:.3:te?te.label===Xe.label?1:.3:k.length!==0?k.indexOf(Xe.label||"")!==-1?1:.5:1,onMouseEnter:Yt=>{F(Xe),he(Yt.clientY),ce(Yt.clientX),y&&y(Xe)},onMouseMove:Yt=>{F(Xe),he(Yt.clientY),ce(Yt.clientX)},onMouseLeave:()=>{F(void 0),ce(void 0),he(void 0),y&&y(void 0)},onClick:()=>{(E||$)&&(Sr(q,Xe)&&j?(X(void 0),E==null||E(void 0)):(X(Xe),E==null||E(Xe)))},children:[v.jsx(ur.circle,{cx:0,cy:0,style:{fill:e.filter(Yt=>Yt.color).length===0?i[0]:Xe.color?i[o.indexOf(`${Xe.color}`)]:Qe.gray,stroke:e.filter(Yt=>Yt.color).length===0?i[0]:Xe.color?i[o.indexOf(`${Xe.color}`)]:Qe.gray,fillOpacity:.6},animate:{cx:ge(Xe.x||0),cy:ue(Xe.y||0),r:Fe(Xe.x)||Fe(Xe.y)?0:_e?_e(Xe.radius||0):l},transition:{duration:.5}}),a&&!Fe(Xe.label)?v.jsx(ur.text,{className:Be("graph-value text-sm",ee==null?void 0:ee.graphObjectValues),style:{fill:W||(e.filter(Yt=>Yt.color).length===0?i[0]:Xe.color?i[o.indexOf(`${Xe.color}`)]:Qe.gray),...(R==null?void 0:R.graphObjectValues)||{}},dy:"0.33em",dx:3,animate:{attrY:ue(Xe.y||0),attrX:_e?ge(Xe.x||0)+_e(Xe.radius||0):ge(Xe.x||0)+l,opacity:Fe(Xe.x)||Fe(Xe.y)?0:1},transition:{duration:.5},children:Xe.label}):k.length!==0&&!Fe(Xe.label)&&k.indexOf(Xe.label)!==-1?v.jsx(ur.text,{className:Be("graph-value text-sm",ee==null?void 0:ee.graphObjectValues),style:{fill:W||(e.filter(Yt=>Yt.color).length===0?i[0]:Xe.color?i[o.indexOf(`${Xe.color}`)]:Qe.gray),...(R==null?void 0:R.graphObjectValues)||{}},dy:"0.33em",dx:3,animate:{attrY:ue(Xe.y||0),attrX:_e?ge(Xe.x||0)+_e(Xe.radius||0):ge(Xe.x||0)+l,opacity:Fe(Xe.x)||Fe(Xe.y)?0:1},transition:{duration:.5},children:Xe.label}):null]})},Vt))]}),b.map((Xe,Vt)=>v.jsx(ti,{text:Xe.text,color:Xe.color,x:ge(Xe.value),y1:0,y2:Te,textSide:ge(Xe.value)>Ne*.75||ne?"left":"right",classNames:Xe.classNames,styles:Xe.styles},Vt)),S.map((Xe,Vt)=>v.jsx(h1,{text:Xe.text,color:Xe.color,y:ue(Xe.value),x1:0,x2:Ne,classNames:Xe.classNames,styles:Xe.styles},Vt)),v.jsx("g",{children:K.map((Xe,Vt)=>{const Yt=K2({x:Xe.xCoordinate?ge(Xe.xCoordinate)+(Xe.xOffset||0):0+(Xe.xOffset||0),y:Xe.yCoordinate?ue(Xe.yCoordinate)+(Xe.yOffset||0)-8:0+(Xe.yOffset||0)-8},{x:Xe.xCoordinate?ge(Xe.xCoordinate):0,y:Xe.yCoordinate?ue(Xe.yCoordinate):0},Fe(Xe.connectorRadius)?3.5:Xe.connectorRadius),at=Xe.showConnector?{y1:Yt.y,x1:Yt.x,y2:Xe.yCoordinate?ue(Xe.yCoordinate)+(Xe.yOffset||0):0+(Xe.yOffset||0),x2:Xe.xCoordinate?ge(Xe.xCoordinate)+(Xe.xOffset||0):0+(Xe.xOffset||0),cy:Xe.yCoordinate?ue(Xe.yCoordinate):0,cx:Xe.xCoordinate?ge(Xe.xCoordinate):0,circleRadius:Fe(Xe.connectorRadius)?3.5:Xe.connectorRadius,strokeWidth:Xe.showConnector===!0?2:Math.min(Xe.showConnector||0,1)}:void 0,cr={y:Xe.yCoordinate?ue(Xe.yCoordinate)+(Xe.yOffset||0)-8:0+(Xe.yOffset||0)-8,x:ne?0:Xe.xCoordinate?ge(Xe.xCoordinate)+(Xe.xOffset||0):0+(Xe.xOffset||0),width:ne?Xe.xCoordinate?ge(Xe.xCoordinate)+(Xe.xOffset||0):0+(Xe.xOffset||0):Ne-(Xe.xCoordinate?ge(Xe.xCoordinate)+(Xe.xOffset||0):0+(Xe.xOffset||0)),maxWidth:Xe.maxWidth,fontWeight:Xe.fontWeight,align:Xe.align};return v.jsx(J2,{color:Xe.color,connectorsSettings:at,labelSettings:cr,text:Xe.text,classNames:Xe.classNames,styles:Xe.styles},Vt)})})]})}),te&&g&&ie&&de?v.jsx(yr,{data:te,body:g,xPos:ie,yPos:de,backgroundStyle:R==null?void 0:R.tooltip,className:ee==null?void 0:ee.tooltip}):null,$?v.jsx(Tr,{open:q!==void 0,onClose:()=>{X(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr($,q)}})}):null]})}function pq(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,showLabels:o=!1,height:l,width:s,footNote:f,colorDomain:c,colorLegendTitle:h,radius:d=5,xAxisTitle:m="X Axis",yAxisTitle:g="Y Axis",padding:y,backgroundColor:b=!1,leftMargin:S=50,rightMargin:w=20,topMargin:C=20,bottomMargin:k=50,tooltip:_,relativeHeight:D,onSeriesMouseOver:T,refXValues:A=[],refYValues:M=[],highlightAreaSettings:E=[],showColorScale:N=!0,highlightedDataPoints:Y=[],graphID:ne,maxRadiusValue:K,maxXValue:B,minXValue:j,maxYValue:$,minYValue:V,onSeriesMouseClick:z,graphDownload:W=!1,dataDownload:G=!1,language:ae="en",showNAColor:U=!0,minHeight:H=0,annotations:R=[],customHighlightAreaSettings:ee=[],theme:J="light",ariaLabel:Z,resetSelectionOnDoubleClick:re=!0,dateFormat:te="yyyy",showOnlyActiveDate:F=!1,autoPlay:q=!1,detailsOnClick:X,noOfXTicks:ie=5,noOfYTicks:ce=5,labelColor:de,xSuffix:he="",ySuffix:Oe="",xPrefix:Ne="",yPrefix:Te="",styles:_e,classNames:xe}=t,[we,ge]=I.useState(0),[ve,le]=I.useState(0),[ue,Ce]=I.useState(void 0),pe=I.useRef(null),ye=I.useRef(null);I.useEffect(()=>{const Ke=new ResizeObserver(et=>{ge(s||et[0].target.clientWidth||620),le(l||et[0].target.clientHeight||480)});return pe.current&&(le(pe.current.clientHeight||480),ge(pe.current.clientWidth||620),s||Ke.observe(pe.current)),()=>Ke.disconnect()},[s,l]);const[be,je]=I.useState(q),$e=qi(Bt(e,Ke=>Ke.date).map(Ke=>bt(`${Ke.date}`,te,new Date).getTime()),(Ke,et)=>Ka(Ke,et)),[ut,Ie]=I.useState(q?0:$e.length-1),Ze={};return $e.forEach((Ke,et)=>{Ze[`${Ke}`]={style:{color:et===ut?"#232E3D":"#A9B1B7",fontWeight:et===ut?"bold":"normal",display:et===ut||!F?"inline":"none"},label:Sa(new Date(Ke),te)}}),I.useEffect(()=>{const Ke=setInterval(()=>{Ie(et=>et<$e.length-1?et+1:0)},2e3);return be||clearInterval(Ke),()=>clearInterval(Ke)},[$e,be]),v.jsx("div",{className:`${J||"light"} flex ${s?"w-fit grow-0":"w-full grow"}`,dir:ae==="he"||ae==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${b?b===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${ae||"en"}`,xe==null?void 0:xe.graphContainer),style:{...(_e==null?void 0:_e.graphContainer)||{},...b&&b!==!0?{backgroundColor:b}:{}},id:ne,ref:ye,"aria-label":Z||`${r?`The graph shows ${r}. `:""}This is an animated scatter plot that shows correlation between two variables showing data changes over time.${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:b?y||"1rem":y||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||W||G?v.jsx(Zt,{styles:{title:_e==null?void 0:_e.title,description:_e==null?void 0:_e.description},classNames:{title:xe==null?void 0:xe.title,description:xe==null?void 0:xe.description},graphTitle:r,graphDescription:i,width:s,graphDownload:W?ye.current:void 0,dataDownload:G?e.map(Ke=>Ke.data).filter(Ke=>Ke!==void 0).length>0?e.map(Ke=>Ke.data).filter(Ke=>Ke!==void 0):e.filter(Ke=>Ke!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{je(!be)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":be?"Click to pause animation":"Click to play animation",children:be?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:$e[0],max:$e[$e.length-1],marks:Ze,step:null,defaultValue:$e[$e.length-1],value:$e[ut],onChangeComplete:Ke=>{Ie($e.indexOf(Ke))},onChange:Ke=>{Ie($e.indexOf(Ke))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[N&&e.filter(Ke=>Ke.color).length!==0?v.jsx(Cn,{width:s,colorLegendTitle:h,colors:n||Qe[J].categoricalColors.colors,colorDomain:c||Bt(e.filter(Ke=>Ke.color),"color").map(Ke=>Ke.color),setSelectedColor:Ce,showNAColor:U}):null,v.jsx("div",{className:"flex flex-col grow justify-center w-full leading-0",ref:pe,"aria-label":"Graph area",children:(s||we)&&(l||ve)?v.jsx(fve,{data:e,width:s||we,height:Math.max(H,l||(D?H?(s||we)*D>H?(s||we)*D:H:(s||we)*D:ve)),colorDomain:e.filter(Ke=>Ke.color).length===0?[]:c||Bt(e.filter(Ke=>Ke.color),"color").map(Ke=>Ke.color),colors:e.filter(Ke=>Ke.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[J].categoricalColors.colors,xAxisTitle:m,yAxisTitle:g,refXValues:A,refYValues:M,showLabels:o,radius:d,leftMargin:S,rightMargin:w,topMargin:C,bottomMargin:k,tooltip:_,onSeriesMouseOver:T,highlightAreaSettings:E,highlightedDataPoints:e.filter(Ke=>Ke.label).length===0?[]:Y,selectedColor:ue,maxRadiusValue:K,maxXValue:B,minXValue:j,maxYValue:$,minYValue:V,onSeriesMouseClick:z,dateFormat:te,indx:ut,rtl:ae==="he"||ae==="ar",annotations:R,customHighlightAreaSettings:ee,resetSelectionOnDoubleClick:re,detailsOnClick:X,noOfXTicks:ie,noOfYTicks:ce,labelColor:de,xSuffix:he,ySuffix:Oe,xPrefix:Ne,yPrefix:Te,styles:_e,classNames:xe}):null})]}),a||f?v.jsx(tr,{styles:{footnote:_e==null?void 0:_e.footnote,source:_e==null?void 0:_e.source},classNames:{footnote:xe==null?void 0:xe.footnote,source:xe==null?void 0:xe.source},sources:a,footNote:f,width:s}):null]})})})})}function dve(t){var xe,we,ge,ve,le,ue;const{data:e,dotColors:r,suffix:n,prefix:a,barPadding:i,showValues:o,showTicks:l,leftMargin:s,truncateBy:f,width:c,height:h,rightMargin:d,topMargin:m,bottomMargin:g,radius:y,showLabels:b,tooltip:S,onSeriesMouseOver:w,maxPositionValue:C,minPositionValue:k,onSeriesMouseClick:_,selectedColor:D,dateFormat:T,indx:A,sortParameter:M,connectorStrokeWidth:E,arrowConnector:N,maxBarThickness:Y,minBarThickness:ne,resetSelectionOnDoubleClick:K,detailsOnClick:B,axisTitle:j,noOfTicks:$,valueColor:V,styles:z,classNames:W,refValues:G,rtl:ae}=t,U=Ut(e.map(Ce=>({...Ce,date:bt(`${Ce.date}`,T,new Date)})),"date"),H=Bt(U,Ce=>Ce.label).map(Ce=>Ce.label),R=Array.from(Hi(uq(e,T||"yyyy"),Ce=>Ce.date),([Ce,pe])=>({date:Ce,values:M!==void 0?M==="diff"?Ut(pe,ye=>Fe(ye.x[ye.x.length-1])||Fe(ye.x[0])?-1/0:ye.x[ye.x.length-1]-ye.x[0]).reverse().map((ye,be)=>({...ye,id:`${be}`})):Ut(pe,ye=>Fe(ye.x[M])?-1/0:ye.x[M]).reverse().map((ye,be)=>({...ye,id:`${be}`})):H.map(ye=>pe.find(be=>be.label===ye)).map((ye,be)=>({...ye,id:`${be}`}))})),ee={top:j?m+25:m,bottom:g,left:s,right:d},J=c-ee.left-ee.right,Z=h-ee.top-ee.bottom,[re,te]=I.useState(void 0),[F,q]=I.useState(void 0),[X,ie]=I.useState(void 0),[ce,de]=I.useState(void 0),he=Fe(C)?Math.max(...e.map(Ce=>Mn(Ce.x)||0))<0?0:Math.max(...e.map(Ce=>Mn(Ce.x)||0)):C,Oe=Fe(k)?Math.min(...e.map(Ce=>gr(Ce.x)||0))>0?0:Math.min(...e.map(Ce=>gr(Ce.x)||0)):k,Ne=br().domain([Oe,he]).range([0,J]).nice(),Te=Un().domain(H.map((Ce,pe)=>`${pe}`)).range([0,ne?Math.max(Z,ne*H.length):Y?Math.min(Z,Y*H.length):Z]).paddingInner(i),_e=Ne.ticks($);return v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${c}px`,height:`${h}px`,viewBox:`0 0 ${c} ${h}`,direction:"ltr",children:[N?v.jsx("defs",{children:v.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:v.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,v.jsxs("g",{transform:`translate(${ee.left},${ee.top})`,children:[l?v.jsx(La,{values:_e.filter(Ce=>Ce!==0),x:_e.filter(Ce=>Ce!==0).map(Ce=>Ne(Ce)),y1:0-m,y2:Z+ee.bottom,styles:{gridLines:(xe=z==null?void 0:z.xAxis)==null?void 0:xe.gridLines,labels:(we=z==null?void 0:z.xAxis)==null?void 0:we.labels},classNames:{gridLines:(ge=W==null?void 0:W.xAxis)==null?void 0:ge.gridLines,labels:(ve=W==null?void 0:W.xAxis)==null?void 0:ve.labels},suffix:n,prefix:a,labelType:"secondary",showGridLines:!0}):null,v.jsx(nn,{x:J/2,y:0-ee.top+15,style:(le=z==null?void 0:z.xAxis)==null?void 0:le.title,className:(ue=W==null?void 0:W.xAxis)==null?void 0:ue.title,text:j}),v.jsx(mo,{children:R[A].values.map((Ce,pe)=>{var ye,be,je,$e;return v.jsxs(ur.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",children:[b?v.jsx(ur.text,{style:{textAnchor:"end",...((ye=z==null?void 0:z.yAxis)==null?void 0:ye.labels)||{}},x:0,dx:-10,dy:"0.33em",className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(be=W==null?void 0:W.yAxis)==null?void 0:be.labels),animate:{attrY:Te(`${pe}`)+Te.bandwidth()/2},transition:{duration:.5},children:`${Ce.label}`.length<f?Ce.label:`${`${Ce.label}`.substring(0,f)}...`}):null,v.jsx(ur.line,{x1:0,x2:J,className:Be("undp-tick-line stroke-primary-gray-400 dark:stroke-primary-gray-600",(je=W==null?void 0:W.yAxis)==null?void 0:je.gridLines),style:($e=z==null?void 0:z.yAxis)==null?void 0:$e.gridLines,animate:{y1:Te(`${pe}`)+Te.bandwidth()/2,y2:Te(`${pe}`)+Te.bandwidth()/2},transition:{duration:.5}}),v.jsx(ur.line,{style:{strokeWidth:E,...(z==null?void 0:z.dataConnectors)||{},opacity:D?.3:1},className:Be("stroke-primary-gray-600 dark:stroke-primary-gray-300",W==null?void 0:W.dataConnectors),animate:{y1:Te(`${pe}`)+Te.bandwidth()/2,y2:Te(`${pe}`)+Te.bandwidth()/2,x1:Ne(gr(Ce.x))+y,x2:Ne(Mn(Ce.x))-y},markerEnd:N&&Ce.x.indexOf(gr(Ce.x))===0?"url(#arrow)":"",markerStart:N&&Ce.x.indexOf(gr(Ce.x))===Ce.x.length-1?"url(#arrow)":""}),Ce.x.map((ut,Ie)=>v.jsxs(ur.g,{opacity:D?r[Ie]===D?1:.3:1,onMouseEnter:Ze=>{te({...Ce,xIndex:Ie}),de(Ze.clientY),ie(Ze.clientX),w&&w({...Ce,xIndex:Ie})},onClick:()=>{(_||B)&&(Sr(F,{...Ce,xIndex:Ie})&&K?(q(void 0),_==null||_(void 0)):(q({...Ce,xIndex:Ie}),_&&_({...Ce,xIndex:Ie})))},onMouseMove:Ze=>{te({...Ce,xIndex:Ie}),de(Ze.clientY),ie(Ze.clientX)},onMouseLeave:()=>{te(void 0),ie(void 0),de(void 0),w&&w(void 0)},children:[v.jsx(ur.circle,{r:y,style:{fill:r[Ie],fillOpacity:.85,stroke:r[Ie],strokeWidth:1},animate:{cy:Te(`${pe}`)+Te.bandwidth()/2,cx:Ne(ut||0),opacity:Fe(ut)?0:1},transition:{duration:.5}}),o?v.jsx(ur.text,{style:{fill:V||r[Ie],textAnchor:"middle",opacity:Fe(ut)?0:1,...(z==null?void 0:z.graphObjectValues)||{}},className:Be("graph-value text-sm font-bold",W==null?void 0:W.graphObjectValues),dx:0,dy:0-y-3,animate:{attrY:Te(`${pe}`)+Te.bandwidth()/2,attrX:Ne(ut||0),opacity:Fe(ut)?0:1},transition:{duration:.5},children:_t(ut,a,n)}):null]},Ie))]},pe)})}),G?v.jsx(v.Fragment,{children:G.map((Ce,pe)=>v.jsx(ti,{text:Ce.text,color:Ce.color,x:Ne(Ce.value),y1:0-ee.top,y2:Z+ee.bottom,textSide:Ne(Ce.value)>J*.75||ae?"left":"right",classNames:Ce.classNames,styles:Ce.styles},pe))}):null]})]}),re&&S&&X&&ce?v.jsx(yr,{data:re,body:S,xPos:X,yPos:ce,backgroundStyle:z==null?void 0:z.tooltip,className:W==null?void 0:W.tooltip}):null,B?v.jsx(Tr,{open:F!==void 0,onClose:()=>{q(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(B,F)}})}):null]})}function hve(t){const{data:e,graphTitle:r,colors:n=Qe.light.categoricalColors.colors,suffix:a="",prefix:i="",sources:o,graphDescription:l,barPadding:s=.25,showTicks:f=!0,leftMargin:c=100,rightMargin:h=40,topMargin:d=20,bottomMargin:m=10,truncateBy:g=999,showValues:y=!0,height:b,width:S,footNote:w,colorDomain:C,colorLegendTitle:k,padding:_,backgroundColor:D=!1,radius:T=3,showLabels:A=!0,tooltip:M,relativeHeight:E,onSeriesMouseOver:N,graphID:Y,maxPositionValue:ne,minPositionValue:K,onSeriesMouseClick:B,graphDownload:j=!1,dataDownload:$=!1,sortParameter:V,showOnlyActiveDate:z=!1,autoPlay:W=!1,dateFormat:G="yyyy",arrowConnector:ae=!1,connectorStrokeWidth:U=2,language:H="en",minHeight:R=0,theme:ee="light",maxBarThickness:J,minBarThickness:Z,ariaLabel:re,resetSelectionOnDoubleClick:te=!0,detailsOnClick:F,axisTitle:q,noOfTicks:X=5,valueColor:ie,styles:ce,classNames:de,refValues:he}=t,[Oe,Ne]=I.useState(0),[Te,_e]=I.useState(0),[xe,we]=I.useState(void 0),ge=I.useRef(null),ve=I.useRef(null);I.useEffect(()=>{const je=new ResizeObserver($e=>{Ne(S||$e[0].target.clientWidth||620),_e(b||$e[0].target.clientHeight||480)});return ge.current&&(_e(ge.current.clientHeight||480),Ne(ge.current.clientWidth||620),S||je.observe(ge.current)),()=>je.disconnect()},[S,b]);const[le,ue]=I.useState(W),Ce=qi(Bt(e,je=>je.date).map(je=>bt(`${je.date}`,G,new Date).getTime()),(je,$e)=>Ka(je,$e)),[pe,ye]=I.useState(W?0:Ce.length-1),be={};return Ce.forEach((je,$e)=>{be[`${je}`]={style:{color:$e===pe?"#232E3D":"#A9B1B7",fontWeight:$e===pe?"bold":"normal",display:$e===pe||!z?"inline":"none"},label:Sa(new Date(je),G)}}),I.useEffect(()=>{const je=setInterval(()=>{ye($e=>$e<Ce.length-1?$e+1:0)},2e3);return le||clearInterval(je),()=>clearInterval(je)},[Ce,le]),v.jsx("div",{className:`${ee||"light"} flex ${S?"w-fit grow-0":"w-full grow"}`,dir:H==="he"||H==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${D?D===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${H||"en"}`,de==null?void 0:de.graphContainer),style:{...(ce==null?void 0:ce.graphContainer)||{},...D&&D!==!0?{backgroundColor:D}:{}},id:Y,ref:ve,"aria-label":re||`${r?`The graph shows ${r}. `:""}This is an animated dumbbell chart that shows comparisons between two or more data points across categories. ${l?` ${l}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:D?_||"1rem":_||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||l||j||$?v.jsx(Zt,{styles:{title:ce==null?void 0:ce.title,description:ce==null?void 0:ce.description},classNames:{title:de==null?void 0:de.title,description:de==null?void 0:de.description},graphTitle:r,graphDescription:l,width:S,graphDownload:j?ve.current:void 0,dataDownload:$?e.map(je=>je.data).filter(je=>je!==void 0).length>0?e.map(je=>je.data).filter(je=>je!==void 0):e.filter(je=>je!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{ue(!le)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":le?"Click to pause animation":"Click to play animation",children:le?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:Ce[0],max:Ce[Ce.length-1],marks:be,step:null,defaultValue:Ce[Ce.length-1],value:Ce[pe],onChangeComplete:je=>{ye(Ce.indexOf(je))},onChange:je=>{ye(Ce.indexOf(je))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[v.jsx(Cn,{width:S,colorDomain:C,colors:n,colorLegendTitle:k,setSelectedColor:we,showNAColor:!1}),v.jsx("div",{className:"flex grow w-full justify-center leading-0",ref:ge,"aria-label":"Graph area",children:(S||Oe)&&(b||Te)?v.jsx(dve,{data:e,dotColors:n,width:S||Oe,height:Math.max(R,b||(E?R?(S||Oe)*E>R?(S||Oe)*E:R:(S||Oe)*E:Te)),suffix:a,prefix:i,radius:T,barPadding:s,showTicks:f,leftMargin:c,rightMargin:h,topMargin:d,bottomMargin:m,truncateBy:g,showLabels:A,showValues:y,tooltip:M,onSeriesMouseOver:N,maxPositionValue:ne,minPositionValue:K,onSeriesMouseClick:B,selectedColor:xe,dateFormat:G,indx:pe,sortParameter:V,arrowConnector:ae,connectorStrokeWidth:U,maxBarThickness:J,minBarThickness:Z,resetSelectionOnDoubleClick:te,detailsOnClick:F,axisTitle:q,noOfTicks:X,valueColor:ie,styles:ce,classNames:de,refValues:he,rtl:H==="he"||H==="ar"}):null})]}),o||w?v.jsx(tr,{styles:{footnote:ce==null?void 0:ce.footnote,source:ce==null?void 0:ce.source},classNames:{footnote:de==null?void 0:de.footnote,source:de==null?void 0:de.source},sources:o,footNote:w,width:S}):null]})})})})}function pve(t){var _e,xe,we,ge,ve,le,ue,Ce,pe,ye;const{data:e,dotColors:r,barPadding:n,showTicks:a,leftMargin:i,truncateBy:o,width:l,height:s,rightMargin:f,topMargin:c,bottomMargin:h,radius:d,showLabels:m,tooltip:g,onSeriesMouseOver:y,maxPositionValue:b,minPositionValue:S,onSeriesMouseClick:w,showValues:C,suffix:k,prefix:_,selectedColor:D,dateFormat:T,indx:A,sortParameter:M,arrowConnector:E,connectorStrokeWidth:N,maxBarThickness:Y,minBarThickness:ne,resetSelectionOnDoubleClick:K,detailsOnClick:B,axisTitle:j,noOfTicks:$,valueColor:V,styles:z,classNames:W,refValues:G}=t,ae=Ut(e.map(be=>({...be,date:bt(`${be.date}`,T,new Date)})),"date"),U=Bt(ae,be=>be.label).map(be=>be.label),H=Array.from(Hi(uq(e,T||"yyyy"),be=>be.date),([be,je])=>({date:be,values:M!==void 0?M==="diff"?Ut(je,$e=>Fe($e.x[$e.x.length-1])||Fe($e.x[0])?-1/0:$e.x[$e.x.length-1]-$e.x[0]).map(($e,ut)=>({...$e,id:`${ut}`})):Ut(je,$e=>Fe($e.x[M])?-1/0:$e.x[M]).map(($e,ut)=>({...$e,id:`${ut}`})):U.map($e=>je.find(ut=>ut.label===$e)).map(($e,ut)=>({...$e,id:`${ut}`}))})),R={top:c,bottom:h,left:j?i+30:i,right:f},ee=l-R.left-R.right,J=s-R.top-R.bottom,[Z,re]=I.useState(void 0),[te,F]=I.useState(void 0),[q,X]=I.useState(void 0),[ie,ce]=I.useState(void 0),de=Fe(b)?Math.max(...e.map(be=>Mn(be.x)||0))<0?0:Math.max(...e.map(be=>Mn(be.x)||0)):b,he=Fe(S)?Math.min(...e.map(be=>gr(be.x)||0))>0?0:Math.min(...e.map(be=>gr(be.x)||0)):S,Oe=br().domain([he,de]).range([J,0]).nice(),Ne=Un().domain(U.map((be,je)=>`${je}`)).range([0,ne?Math.max(ee,ne*U.length):Y?Math.min(ee,Y*U.length):ee]).paddingInner(n),Te=Oe.ticks($);return v.jsxs(v.Fragment,{children:[v.jsxs("svg",{width:`${l}px`,height:`${s}px`,viewBox:`0 0 ${l} ${s}`,direction:"ltr",children:[E?v.jsx("defs",{children:v.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:v.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,v.jsxs("g",{transform:`translate(${R.left},${R.top})`,children:[v.jsx(Nr,{y1:Oe(he<0?0:he),y2:Oe(he<0?0:he),x1:0-i,x2:ee+R.right,label:_t(he<0?0:he,_,k),labelPos:{x:0-i,y:de<0?0:Oe(he<0?0:he),dx:0,dy:de<0?"1em":-5},classNames:{axis:(_e=W==null?void 0:W.xAxis)==null?void 0:_e.axis,label:(xe=W==null?void 0:W.yAxis)==null?void 0:xe.labels},styles:{axis:(we=z==null?void 0:z.xAxis)==null?void 0:we.axis,label:(ge=z==null?void 0:z.yAxis)==null?void 0:ge.labels}}),a?v.jsx(v1,{values:Te.filter(be=>be!==0),y:Te.filter(be=>be!==0).map(be=>Oe(be)),x1:0-i,x2:ee+R.right,styles:{gridLines:(ve=z==null?void 0:z.yAxis)==null?void 0:ve.gridLines,labels:(le=z==null?void 0:z.yAxis)==null?void 0:le.labels},classNames:{gridLines:(ue=W==null?void 0:W.yAxis)==null?void 0:ue.gridLines,labels:(Ce=W==null?void 0:W.yAxis)==null?void 0:Ce.labels},suffix:k,prefix:_,labelType:"secondary",showGridLines:!0,labelPos:"vertical"}):null,v.jsx(nn,{x:0-i-15,y:J/2,style:(pe=z==null?void 0:z.yAxis)==null?void 0:pe.title,className:(ye=W==null?void 0:W.yAxis)==null?void 0:ye.title,text:j,rotate90:!0}),v.jsx(mo,{children:H[A].values.map((be,je)=>{var $e,ut;return v.jsxs(ur.g,{className:"undp-viz-low-opacity undp-viz-g-with-hover",children:[m?v.jsx(ur.text,{style:{textAnchor:"middle",...(($e=z==null?void 0:z.xAxis)==null?void 0:$e.labels)||{}},y:J+5,dy:"1em",animate:{attrX:Ne(`${je}`)+Ne.bandwidth()/2},transition:{duration:.5},className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(ut=W==null?void 0:W.xAxis)==null?void 0:ut.labels),children:`${be.label}`.length<o?be.label:`${`${be.label}`.substring(0,o)}...`}):null,v.jsx(ur.line,{style:{strokeWidth:N,...(z==null?void 0:z.dataConnectors)||{},opacity:D?.3:1},className:Be("stroke-primary-gray-600 dark:stroke-primary-gray-300",W==null?void 0:W.dataConnectors),markerEnd:E&&be.x.indexOf(gr(be.x))===0?"url(#arrow)":"",markerStart:E&&be.x.indexOf(gr(be.x))===be.x.length-1?"url(#arrow)":"",animate:{x1:Ne(`${je}`)+Ne.bandwidth()/2,y1:Oe(gr(be.x))-d,x2:Ne(`${je}`)+Ne.bandwidth()/2,y2:Oe(Mn(be.x))+d},transition:{duration:.5}}),be.x.map((Ie,Ze)=>v.jsxs("g",{opacity:D?r[Ze]===D?1:.3:1,onMouseEnter:Ke=>{re({...be,xIndex:Ze}),ce(Ke.clientY),X(Ke.clientX),y&&y({...be,xIndex:Ze})},onClick:()=>{(w||B)&&(Sr(te,{...be,xIndex:Ze})&&K?(F(void 0),w==null||w(void 0)):(F({...be,xIndex:Ze}),w&&w({...be,xIndex:Ze})))},onMouseMove:Ke=>{re({...be,xIndex:Ze}),ce(Ke.clientY),X(Ke.clientX)},onMouseLeave:()=>{re(void 0),X(void 0),ce(void 0),y&&y(void 0)},children:[v.jsx(ur.circle,{r:d,style:{fill:r[Ze],fillOpacity:.85,stroke:r[Ze],strokeWidth:1},animate:{cx:Ne(`${je}`)+Ne.bandwidth()/2,cy:Oe(Ie||0),opacity:Fe(Ie)?0:1},transition:{duration:.5}}),C?v.jsx(ur.text,{style:{fill:V||r[Ze],textAnchor:"start",...(z==null?void 0:z.graphObjectValues)||{}},className:Be("graph-value text-sm font-bold",W==null?void 0:W.graphObjectValues),dx:d+3,dy:"0.33em",animate:{attrX:Ne(`${je}`)+Ne.bandwidth()/2,attrY:Oe(Ie||0),opacity:Fe(Ie)?0:1},transition:{duration:.5},children:_t(Ie,_,k)}):null]},Ze))]},be.label)})}),G?v.jsx(v.Fragment,{children:G.map((be,je)=>v.jsx(h1,{text:be.text,color:be.color,y:Oe(be.value),x1:0-i,x2:ee+R.right,classNames:be.classNames,styles:be.styles},je))}):null]})]}),Z&&g&&q&&ie?v.jsx(yr,{data:Z,body:g,xPos:q,yPos:ie,backgroundStyle:z==null?void 0:z.tooltip,className:W==null?void 0:W.tooltip}):null,B?v.jsx(Tr,{open:te!==void 0,onClose:()=>{F(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(B,te)}})}):null]})}function mve(t){const{data:e,graphTitle:r,colors:n=Qe.light.categoricalColors.colors,sources:a,graphDescription:i,barPadding:o=.25,showTicks:l=!0,leftMargin:s=20,rightMargin:f=20,topMargin:c=20,bottomMargin:h=25,truncateBy:d=999,height:m,width:g,footNote:y,colorDomain:b,colorLegendTitle:S,padding:w,backgroundColor:C=!1,radius:k=3,tooltip:_,showLabels:D=!0,relativeHeight:T,onSeriesMouseOver:A,graphID:M,suffix:E="",prefix:N="",maxPositionValue:Y,minPositionValue:ne,onSeriesMouseClick:K,graphDownload:B=!1,dataDownload:j=!1,showValues:$=!0,sortParameter:V,arrowConnector:z=!1,connectorStrokeWidth:W=2,language:G="en",minHeight:ae=0,theme:U="light",showOnlyActiveDate:H=!1,autoPlay:R=!1,dateFormat:ee="yyyy",maxBarThickness:J,minBarThickness:Z,ariaLabel:re,resetSelectionOnDoubleClick:te=!0,detailsOnClick:F,axisTitle:q,noOfTicks:X=5,valueColor:ie,styles:ce,classNames:de,refValues:he}=t,[Oe,Ne]=I.useState(0),[Te,_e]=I.useState(0),[xe,we]=I.useState(void 0),ge=I.useRef(null),ve=I.useRef(null);I.useEffect(()=>{const je=new ResizeObserver($e=>{Ne(g||$e[0].target.clientWidth||620),_e(m||$e[0].target.clientHeight||480)});return ge.current&&(_e(ge.current.clientHeight||480),Ne(ge.current.clientWidth||620),g||je.observe(ge.current)),()=>je.disconnect()},[g,m]);const[le,ue]=I.useState(R),Ce=qi(Bt(e,je=>je.date).map(je=>bt(`${je.date}`,ee,new Date).getTime()),(je,$e)=>Ka(je,$e)),[pe,ye]=I.useState(R?0:Ce.length-1),be={};return Ce.forEach((je,$e)=>{be[`${je}`]={style:{color:$e===pe?"#232E3D":"#A9B1B7",fontWeight:$e===pe?"bold":"normal",display:$e===pe||!H?"inline":"none"},label:Sa(new Date(je),ee)}}),I.useEffect(()=>{const je=setInterval(()=>{ye($e=>$e<Ce.length-1?$e+1:0)},2e3);return le||clearInterval(je),()=>clearInterval(je)},[Ce,le]),v.jsx("div",{className:`${U||"light"} flex ${g?"w-fit grow-0":"w-full grow"}`,dir:G==="he"||G==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${C?C===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${G||"en"}`,de==null?void 0:de.graphContainer),style:{...(ce==null?void 0:ce.graphContainer)||{},...C&&C!==!0?{backgroundColor:C}:{}},id:M,ref:ve,"aria-label":re||`${r?`The graph shows ${r}. `:""}This is a dumbbell chart that shows comparisons between two or more data points across categories. ${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:C?w||"1rem":w||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||B||j?v.jsx(Zt,{styles:{title:ce==null?void 0:ce.title,description:ce==null?void 0:ce.description},classNames:{title:de==null?void 0:de.title,description:de==null?void 0:de.description},graphTitle:r,graphDescription:i,width:g,graphDownload:B?ve.current:void 0,dataDownload:j?e.map(je=>je.data).filter(je=>je!==void 0).length>0?e.map(je=>je.data).filter(je=>je!==void 0):e.filter(je=>je!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{ue(!le)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":le?"Click to pause animation":"Click to play animation",children:le?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:Ce[0],max:Ce[Ce.length-1],marks:be,step:null,defaultValue:Ce[Ce.length-1],value:Ce[pe],onChangeComplete:je=>{ye(Ce.indexOf(je))},onChange:je=>{ye(Ce.indexOf(je))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[v.jsx(Cn,{width:g,colorDomain:b,colors:n,colorLegendTitle:S,setSelectedColor:we,showNAColor:!1}),v.jsx("div",{className:"flex grow w-full justify-center leading-0",ref:ge,"aria-label":"Graph area",children:(g||Oe)&&(m||Te)?v.jsx(pve,{data:e,dotColors:n,width:g||Oe,height:Math.max(ae,m||(T?ae?(g||Oe)*T>ae?(g||Oe)*T:ae:(g||Oe)*T:Te)),radius:k,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:D,showValues:$,tooltip:_,suffix:E,prefix:N,onSeriesMouseOver:A,maxPositionValue:Y,minPositionValue:ne,onSeriesMouseClick:K,selectedColor:xe,dateFormat:ee,indx:pe,sortParameter:V,arrowConnector:z,connectorStrokeWidth:W,maxBarThickness:J,minBarThickness:Z,resetSelectionOnDoubleClick:te,detailsOnClick:F,axisTitle:q,noOfTicks:X,valueColor:ie,styles:ce,classNames:de,refValues:he}):null})]}),a||y?v.jsx(tr,{styles:{footnote:ce==null?void 0:ce.footnote,source:ce==null?void 0:ce.source},classNames:{footnote:de==null?void 0:de.footnote,source:de==null?void 0:de.source},sources:a,footNote:y,width:g}):null]})})})})}function mq(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,height:m,width:g,footNote:y,colorDomain:b,colorLegendTitle:S,padding:w,backgroundColor:C,radius:k,tooltip:_,showLabels:D,relativeHeight:T,onSeriesMouseOver:A,graphID:M,suffix:E,prefix:N,maxPositionValue:Y,minPositionValue:ne,onSeriesMouseClick:K,graphDownload:B,dataDownload:j,showValues:$,sortParameter:V,arrowConnector:z,connectorStrokeWidth:W,language:G,minHeight:ae,theme:U,showOnlyActiveDate:H,autoPlay:R,dateFormat:ee,maxBarThickness:J,minBarThickness:Z,ariaLabel:re,resetSelectionOnDoubleClick:te,detailsOnClick:F,axisTitle:q,noOfTicks:X,valueColor:ie,orientation:ce="vertical",refValues:de,styles:he,classNames:Oe}=t;return ce==="vertical"?v.jsx(mve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,height:m,width:g,footNote:y,colorDomain:b,colorLegendTitle:S,padding:w,backgroundColor:C,radius:k,tooltip:_,showLabels:D,relativeHeight:T,onSeriesMouseOver:A,graphID:M,suffix:E,prefix:N,maxPositionValue:Y,minPositionValue:ne,onSeriesMouseClick:K,graphDownload:B,dataDownload:j,showValues:$,sortParameter:V,arrowConnector:z,connectorStrokeWidth:W,language:G,minHeight:ae,theme:U,showOnlyActiveDate:H,autoPlay:R,dateFormat:ee,maxBarThickness:J,minBarThickness:Z,ariaLabel:re,resetSelectionOnDoubleClick:te,styles:he,detailsOnClick:F,axisTitle:q,noOfTicks:X,refValues:de,valueColor:ie,classNames:Oe}):v.jsx(hve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,height:m,width:g,footNote:y,colorDomain:b,colorLegendTitle:S,padding:w,backgroundColor:C,radius:k,tooltip:_,showLabels:D,relativeHeight:T,onSeriesMouseOver:A,graphID:M,suffix:E,prefix:N,maxPositionValue:Y,minPositionValue:ne,onSeriesMouseClick:K,graphDownload:B,dataDownload:j,showValues:$,sortParameter:V,arrowConnector:z,connectorStrokeWidth:W,language:G,minHeight:ae,theme:U,showOnlyActiveDate:H,autoPlay:R,dateFormat:ee,maxBarThickness:J,minBarThickness:Z,ariaLabel:re,resetSelectionOnDoubleClick:te,styles:he,detailsOnClick:F,axisTitle:q,noOfTicks:X,refValues:de,valueColor:ie,classNames:Oe})}function gve(t){var _e,xe,we,ge,ve,le,ue,Ce;const{data:e,barColor:r,suffix:n,prefix:a,barPadding:i,showValues:o,showTicks:l,leftMargin:s,truncateBy:f,width:c,height:h,colorDomain:d,rightMargin:m,topMargin:g,bottomMargin:y,showLabels:b,tooltip:S,onSeriesMouseOver:w,refValues:C,selectedColor:k,highlightedDataPoints:_,maxValue:D,minValue:T,onSeriesMouseClick:A,dateFormat:M,indx:E,autoSort:N,rtl:Y,maxBarThickness:ne,minBarThickness:K,resetSelectionOnDoubleClick:B,detailsOnClick:j,barAxisTitle:$,valueColor:V,noOfTicks:z,styles:W,classNames:G}=t,[ae,U]=I.useState(void 0),[H,R]=I.useState(void 0),[ee,J]=I.useState(void 0),[Z,re]=I.useState(void 0),te={top:$?g+25:g,bottom:y,left:s,right:m},F=c-te.left-te.right,q=h-te.top-te.bottom,X=Ut(e.map(pe=>({...pe,date:bt(`${pe.date}`,M,new Date)})),"date"),ie=Bt(X,pe=>pe.label).map(pe=>pe.label),ce=Array.from(Hi(sq(e,M||"yyyy"),pe=>pe.date),([pe,ye])=>({date:pe,values:N?a7(ye,[be=>be.size===void 0,"size"],["asc","desc"]).map((be,je)=>({...be,id:`${je}`})):ie.map(be=>ye.find(je=>je.label===be)).map((be,je)=>({...be,id:`${je}`}))})),de=Fe(D)?Math.max(...e.filter(pe=>!Fe(pe.size)).map(pe=>pe.size))<0?0:Math.max(...e.filter(pe=>!Fe(pe.size)).map(pe=>pe.size)):D,he=Fe(T)?Math.min(...e.filter(pe=>!Fe(pe.size)).map(pe=>pe.size))>=0?0:Math.min(...e.filter(pe=>!Fe(pe.size)).map(pe=>pe.size)):T,Oe=br().domain([he,de]).range([0,F]).nice(),Ne=Un().domain(ie.map((pe,ye)=>`${ye}`)).range([0,K?Math.max(q,K*ie.length):ne?Math.min(q,ne*ie.length):q]).paddingInner(i),Te=Oe.ticks(z);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${c}px`,height:`${h}px`,viewBox:`0 0 ${c} ${h}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${te.left},${te.top})`,children:[l?v.jsx(La,{values:Te.filter(pe=>pe!==0),x:Te.filter(pe=>pe!==0).map(pe=>Oe(pe)),y1:0-g,y2:q+te.bottom,styles:{gridLines:(_e=W==null?void 0:W.xAxis)==null?void 0:_e.gridLines,labels:(xe=W==null?void 0:W.xAxis)==null?void 0:xe.labels},classNames:{gridLines:(we=G==null?void 0:G.xAxis)==null?void 0:we.gridLines,labels:(ge=G==null?void 0:G.xAxis)==null?void 0:ge.labels},suffix:n,prefix:a,labelType:"secondary",showGridLines:!0}):null,v.jsx(nn,{x:F/2,y:0-te.top+15,style:(ve=W==null?void 0:W.xAxis)==null?void 0:ve.title,className:(le=G==null?void 0:G.xAxis)==null?void 0:le.title,text:$}),v.jsx(mo,{children:ce[E].values.map(pe=>{var ye,be;return v.jsxs(ur.g,{transition:{duration:.5},className:"undp-viz-g-with-hover",opacity:k?pe.color&&r[d.indexOf(pe.color)]===k?1:.3:_.length!==0?_.indexOf(pe.label)!==-1?.85:.3:.85,onMouseEnter:je=>{U(pe),J(je.clientY),R(je.clientX),w&&w(pe)},onClick:()=>{(A||j)&&(Sr(Z,pe)&&B?(re(void 0),A==null||A(void 0)):(re(pe),A==null||A(pe)))},onMouseMove:je=>{U(pe),J(je.clientY),R(je.clientX)},onMouseLeave:()=>{U(void 0),R(void 0),J(void 0),w&&w(void 0)},children:[v.jsx(ur.rect,{style:{fill:e.filter(je=>je.color).length===0?r[0]:pe.color?r[d.indexOf(pe.color)]:Qe.gray},height:Ne.bandwidth(),animate:{width:pe.size?pe.size>=0?Oe(pe.size)-Oe(0):Oe(0)-Oe(pe.size):0,attrX:pe.size?pe.size>=0?Oe(0):Oe(pe.size):0,attrY:Ne(pe.id),fill:e.filter(je=>je.color).length===0?r[0]:pe.color?r[d.indexOf(pe.color)]:Qe.gray},transition:{duration:.5}}),b?v.jsx(ur.text,{style:{textAnchor:pe.size&&pe.size<0?"start":"end",...((ye=W==null?void 0:W.yAxis)==null?void 0:ye.labels)||{}},className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(be=G==null?void 0:G.yAxis)==null?void 0:be.labels),x:0,y:0,dx:pe.size&&pe.size<0?10:-10,dy:"0.33em",animate:{attrX:Oe(he<0?0:he),attrY:Ne(pe.id)+Ne.bandwidth()/2},transition:{duration:.5},children:`${pe.label}`.length<f?`${pe.label}`:`${`${pe.label}`.substring(0,f)}...`}):null,o?v.jsx(ur.text,{y:0,style:{...V?{fill:V}:r.length>1?{}:{fill:r[0]},textAnchor:pe.size&&pe.size<0?"end":"start",...(W==null?void 0:W.graphObjectValues)||{}},className:Be("graph-value text-sm",!V&&r.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",G==null?void 0:G.graphObjectValues),dx:pe.size&&pe.size<0?-5:5,animate:{attrX:pe.size?Oe(pe.size):Oe(0),attrY:Ne(pe.id)+Ne.bandwidth()/2},dy:"0.33em",transition:{duration:.5},children:_t(pe.size,a,n)}):null]},pe.label)})}),v.jsx(Nr,{x1:Oe(he<0?0:he),x2:Oe(he<0?0:he),y1:-2.5,y2:q+te.bottom,classNames:{axis:(ue=G==null?void 0:G.yAxis)==null?void 0:ue.axis},styles:{axis:(Ce=W==null?void 0:W.yAxis)==null?void 0:Ce.axis}}),C?v.jsx(v.Fragment,{children:C.map((pe,ye)=>v.jsx(ti,{text:pe.text,color:pe.color,x:Oe(pe.value),y1:0-te.top,y2:q+te.bottom,textSide:Oe(pe.value)>F*.75||Y?"left":"right",classNames:pe.classNames,styles:pe.styles},ye))}):null]})}),ae&&S&&H&&ee?v.jsx(yr,{data:ae,body:S,xPos:H,yPos:ee,backgroundStyle:W==null?void 0:W.tooltip,className:G==null?void 0:G.tooltip}):null,j?v.jsx(Tr,{open:Z!==void 0,onClose:()=>{re(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(j,Z)}})}):null]})}function yve(t){const{data:e,graphTitle:r,colors:n,suffix:a="",sources:i,prefix:o="",graphDescription:l,barPadding:s=.25,showValues:f=!0,showTicks:c=!0,leftMargin:h=100,rightMargin:d=40,truncateBy:m=999,height:g,width:y,footNote:b,colorDomain:S,colorLegendTitle:w,highlightedDataPoints:C=[],padding:k,backgroundColor:_=!1,topMargin:D=25,bottomMargin:T=10,showLabels:A=!0,relativeHeight:M,tooltip:E,onSeriesMouseOver:N,refValues:Y,showColorScale:ne=!0,graphID:K,maxValue:B,minValue:j,onSeriesMouseClick:$,graphDownload:V=!1,dataDownload:z=!1,dateFormat:W="yyyy",showOnlyActiveDate:G=!1,autoPlay:ae=!1,autoSort:U=!0,language:H="en",showNAColor:R=!0,minHeight:ee=0,theme:J="light",maxBarThickness:Z,minBarThickness:re,ariaLabel:te,resetSelectionOnDoubleClick:F=!0,detailsOnClick:q,barAxisTitle:X,noOfTicks:ie=5,valueColor:ce,styles:de,classNames:he}=t,[Oe,Ne]=I.useState(0),[Te,_e]=I.useState(0),[xe,we]=I.useState(void 0),[ge,ve]=I.useState(ae),le=I.useRef(null),ue=I.useRef(null);I.useEffect(()=>{const je=new ResizeObserver($e=>{Ne(y||$e[0].target.clientWidth||620),_e(g||$e[0].target.clientHeight||480)});return le.current&&(_e(le.current.clientHeight||480),Ne(le.current.clientWidth||620),y||je.observe(le.current)),()=>je.disconnect()},[y,g]);const Ce=qi(Bt(e,je=>je.date).map(je=>bt(`${je.date}`,W,new Date).getTime()),(je,$e)=>Ka(je,$e)),[pe,ye]=I.useState(ae?0:Ce.length-1),be={};return Ce.forEach((je,$e)=>{be[`${je}`]={style:{color:$e===pe?"#232E3D":"#A9B1B7",fontWeight:$e===pe?"bold":"normal",display:$e===pe||!G?"inline":"none"},label:Sa(new Date(je),W)}}),I.useEffect(()=>{const je=setInterval(()=>{ye($e=>$e<Ce.length-1?$e+1:0)},2e3);return ge||clearInterval(je),()=>clearInterval(je)},[Ce,ge]),v.jsx("div",{className:`${J||"light"} flex ${y?"w-fit grow-0":"w-full grow"}`,dir:H==="he"||H==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${_?_===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${H||"en"}`,he==null?void 0:he.graphContainer),style:{...(de==null?void 0:de.graphContainer)||{},..._&&_!==!0?{backgroundColor:_}:{}},id:K,ref:ue,"aria-label":te||`${r?`The graph shows ${r}. `:""}This is an animated bar chart showing data changes over time. ${l?` ${l}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:_?k||"1rem":k||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||l||V||z?v.jsx(Zt,{styles:{title:de==null?void 0:de.title,description:de==null?void 0:de.description},classNames:{title:he==null?void 0:he.title,description:he==null?void 0:he.description},graphTitle:r,graphDescription:l,width:y,graphDownload:V?ue.current:void 0,dataDownload:z?e.map(je=>je.data).filter(je=>je!==void 0).length>0?e.map(je=>je.data).filter(je=>je!==void 0):e.filter(je=>je!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{ve(!ge)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":ge?"Click to pause animation":"Click to play animation",children:ge?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:Ce[0],max:Ce[Ce.length-1],marks:be,step:null,defaultValue:Ce[Ce.length-1],value:Ce[pe],onChangeComplete:je=>{ye(Ce.indexOf(je))},onChange:je=>{ye(Ce.indexOf(je))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[ne&&e.filter(je=>je.color).length!==0?v.jsx(Cn,{width:y,colorLegendTitle:w,colors:n||Qe[J].categoricalColors.colors,colorDomain:S||Bt(e.filter(je=>je.color),"color").map(je=>je.color),setSelectedColor:we,showNAColor:R}):null,v.jsx("div",{className:"flex grow flex-col justify-center w-full leading-0",ref:le,"aria-label":"Graph area",children:(y||Oe)&&(g||Te)?v.jsx(gve,{data:e,barColor:e.filter(je=>je.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[J].categoricalColors.colors,colorDomain:e.filter(je=>je.color).length===0?[]:S||Bt(e.filter(je=>je.color),"color").map(je=>je.color),width:y||Oe,selectedColor:xe,height:Math.max(ee,g||(M?ee?(y||Oe)*M>ee?(y||Oe)*M:ee:(y||Oe)*M:Te)),suffix:a,prefix:o,barPadding:s,showValues:f,showTicks:c,leftMargin:h,rightMargin:d,topMargin:D,bottomMargin:T,truncateBy:m,showLabels:A,tooltip:E,onSeriesMouseOver:N,refValues:Y,maxValue:B,minValue:j,highlightedDataPoints:C,onSeriesMouseClick:$,dateFormat:W,indx:pe,autoSort:U,rtl:H==="he"||H==="ar",maxBarThickness:Z,minBarThickness:re,resetSelectionOnDoubleClick:F,detailsOnClick:q,barAxisTitle:X,noOfTicks:ie,valueColor:ce,styles:de,classNames:he}):null})]}),i||b?v.jsx(tr,{styles:{footnote:de==null?void 0:de.footnote,source:de==null?void 0:de.source},classNames:{footnote:he==null?void 0:he.footnote,source:he==null?void 0:he.source},sources:i,footNote:b,width:y}):null]})})})})}function vve(t){var Oe,Ne,Te,_e,xe,we,ge,ve;const{data:e,barColors:r,barPadding:n,showTicks:a,leftMargin:i,truncateBy:o,width:l,height:s,suffix:f,prefix:c,showValues:h,rightMargin:d,topMargin:m,bottomMargin:g,showLabels:y,tooltip:b,onSeriesMouseOver:S,refValues:w,maxValue:C,minValue:k,onSeriesMouseClick:_,selectedColor:D,dateFormat:T,indx:A,rtl:M,maxBarThickness:E,resetSelectionOnDoubleClick:N,detailsOnClick:Y,barAxisTitle:ne,valueColor:K,noOfTicks:B,styles:j,classNames:$}=t,V=Ut(e.map(le=>({...le,date:bt(`${le.date}`,T,new Date)})),"date"),z=Bt(V,le=>le.label).map(le=>le.label),W=Array.from(Hi(Vf(e,T||"yyyy"),le=>le.date),([le,ue])=>({date:le,values:z.map(Ce=>ue.find(pe=>pe.label===Ce)).map((Ce,pe)=>({...Ce,id:`${pe}`}))})),G={top:ne?m+25:m,bottom:g,left:i,right:d},[ae,U]=I.useState(void 0),[H,R]=I.useState(void 0),[ee,J]=I.useState(void 0),[Z,re]=I.useState(void 0),te=l-G.left-G.right,F=s-G.top-G.bottom,q=Fe(C)?Math.max(...e.map(le=>Mn(le.size.filter(ue=>!Fe(ue)))||0))<0?0:Math.max(...e.map(le=>Mn(le.size.filter(ue=>!Fe(ue)))||0)):C,X=Fe(k)?Math.min(...e.map(le=>gr(le.size.filter(ue=>!Fe(ue)))||0))>=0?0:Math.min(...e.map(le=>gr(le.size.filter(ue=>!Fe(ue)))||0)):k,ie=br().domain([X,q]).range([0,te]).nice(),ce=Un().domain(z.map((le,ue)=>`${ue}`)).range([0,E?Math.min(te,E*z.length):F]).paddingInner(n),de=Un().domain(e[0].size.map((le,ue)=>`${ue}`)).range([0,ce.bandwidth()]).paddingInner(.1),he=ie.ticks(B);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${l}px`,height:`${s}px`,viewBox:`0 0 ${l} ${s}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${G.left},${G.top})`,children:[a?v.jsx(La,{values:he.filter(le=>le!==0),x:he.filter(le=>le!==0).map(le=>ie(le)),y1:0-m,y2:F+G.bottom,styles:{gridLines:(Oe=j==null?void 0:j.xAxis)==null?void 0:Oe.gridLines,labels:(Ne=j==null?void 0:j.xAxis)==null?void 0:Ne.labels},classNames:{gridLines:(Te=$==null?void 0:$.xAxis)==null?void 0:Te.gridLines,labels:(_e=$==null?void 0:$.xAxis)==null?void 0:_e.labels},suffix:f,prefix:c,labelType:"secondary",showGridLines:!0}):null,v.jsx(nn,{x:te/2,y:0-G.top+15,style:(xe=j==null?void 0:j.xAxis)==null?void 0:xe.title,className:(we=$==null?void 0:$.xAxis)==null?void 0:we.title,text:ne}),v.jsx(mo,{children:W[A].values.map((le,ue)=>{var Ce,pe;return v.jsxs(ur.g,{transform:`translate(0,${ce(`${ue}`)})`,children:[le.size.map((ye,be)=>v.jsxs(ur.g,{className:"undp-viz-g-with-hover",opacity:D?r[be]===D?1:.3:.85,onMouseEnter:je=>{U({...le,sizeIndex:be}),re(je.clientY),J(je.clientX),S&&S({...le,sizeIndex:be})},onMouseMove:je=>{U({...le,sizeIndex:be}),re(je.clientY),J(je.clientX)},onMouseLeave:()=>{U(void 0),J(void 0),re(void 0),S&&S(void 0)},onClick:()=>{(_||Y)&&(Sr(H,{...le,sizeIndex:be})&&N?(R(void 0),_&&_(void 0)):(R({...le,sizeIndex:be}),_&&_({...le,sizeIndex:be})))},children:[v.jsx(ur.rect,{y:de(`${be}`),style:{fill:r[be]},height:de.bandwidth(),animate:{width:Fe(ye)?0:ye>=0?ie(ye)-ie(0):ie(0)-ie(ye),attrX:ye>=0?ie(0):ie(ye)},transition:{duration:.5}},be),h?v.jsx(ur.text,{y:de(`${be}`)+de.bandwidth()/2,style:{fill:K||r[be],textAnchor:ye&&ye<0?"end":"start",...(j==null?void 0:j.graphObjectValues)||{}},className:Be("graph-value text-sm",$==null?void 0:$.graphObjectValues),dx:ye&&ye<0?-5:5,dy:"0.33em",animate:{attrX:ie(ye||0)},transition:{duration:.5},children:_t(ye,c,f)}):null]},be)),y?v.jsx(Y2,{value:`${le.label}`.length<o?`${le.label}`:`${`${le.label}`.substring(0,o)}...`,y:0,x:0-G.left,width:ie(X<0?0:X)+G.left,height:ce.bandwidth(),style:(Ce=j==null?void 0:j.yAxis)==null?void 0:Ce.labels,className:(pe=$==null?void 0:$.yAxis)==null?void 0:pe.labels}):null]},ue)})}),v.jsx(Nr,{x1:ie(X<0?0:X),x2:ie(X<0?0:X),y1:-2.5,y2:F+G.bottom,classNames:{axis:(ge=$==null?void 0:$.yAxis)==null?void 0:ge.axis},styles:{axis:(ve=j==null?void 0:j.yAxis)==null?void 0:ve.axis}}),w?v.jsx(v.Fragment,{children:w.map((le,ue)=>v.jsx(ti,{text:le.text,color:le.color,x:ie(le.value),y1:0-G.top,y2:F+G.bottom,textSide:ie(le.value)>te*.75||M?"left":"right",classNames:le.classNames,styles:le.styles},ue))}):null]})}),ae&&b&&ee&&Z?v.jsx(yr,{data:ae,body:b,xPos:ee,yPos:Z,backgroundStyle:j==null?void 0:j.tooltip,className:$==null?void 0:$.tooltip}):null,Y?v.jsx(Tr,{open:H!==void 0,onClose:()=>{R(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(Y,H)}})}):null]})}function bve(t){const{data:e,graphTitle:r,colors:n=Qe.light.categoricalColors.colors,sources:a,graphDescription:i,barPadding:o=.25,showTicks:l=!0,truncateBy:s=999,height:f,width:c,footNote:h,colorDomain:d,colorLegendTitle:m,suffix:g="",prefix:y="",showValues:b=!0,padding:S,backgroundColor:w=!1,leftMargin:C=100,rightMargin:k=40,topMargin:_=25,showLabels:D=!0,bottomMargin:T=10,relativeHeight:A,tooltip:M,onSeriesMouseOver:E,refValues:N,graphID:Y,maxValue:ne,minValue:K,onSeriesMouseClick:B,graphDownload:j=!1,dataDownload:$=!1,dateFormat:V="yyyy",showOnlyActiveDate:z=!1,autoPlay:W=!1,language:G="en",minHeight:ae=0,theme:U="light",maxBarThickness:H,ariaLabel:R,resetSelectionOnDoubleClick:ee=!0,detailsOnClick:J,barAxisTitle:Z,noOfTicks:re=5,valueColor:te,styles:F,classNames:q}=t,[X,ie]=I.useState(0),[ce,de]=I.useState(0),[he,Oe]=I.useState(void 0),Ne=I.useRef(null),Te=I.useRef(null);I.useEffect(()=>{const ue=new ResizeObserver(Ce=>{ie(c||Ce[0].target.clientWidth||620),de(f||Ce[0].target.clientHeight||480)});return Ne.current&&(de(Ne.current.clientHeight||480),ie(Ne.current.clientWidth||620),c||ue.observe(Ne.current)),()=>ue.disconnect()},[c,f]);const[_e,xe]=I.useState(W),we=qi(Bt(e,ue=>ue.date).map(ue=>bt(`${ue.date}`,V,new Date).getTime()),(ue,Ce)=>Ka(ue,Ce)),[ge,ve]=I.useState(W?0:we.length-1),le={};return we.forEach((ue,Ce)=>{le[`${ue}`]={style:{color:Ce===ge?"#232E3D":"#A9B1B7",fontWeight:Ce===ge?"bold":"normal",display:Ce===ge||!z?"inline":"none"},label:Sa(new Date(ue),V)}}),I.useEffect(()=>{const ue=setInterval(()=>{ve(Ce=>Ce<we.length-1?Ce+1:0)},2e3);return _e||clearInterval(ue),()=>clearInterval(ue)},[we,_e]),v.jsx("div",{className:`${U||"light"} flex ${c?"w-fit grow-0":"w-full grow"}`,dir:G==="he"||G==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${w?w===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${G||"en"}`,q==null?void 0:q.graphContainer),style:{...(F==null?void 0:F.graphContainer)||{},...w&&w!==!0?{backgroundColor:w}:{}},id:Y,ref:Te,"aria-label":R||`${r?`The graph shows ${r}. `:""}This is an animated grouped bar chart showing data changes over time. ${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:w?S||"1rem":S||0},children:v.jsxs("div",{className:"flex flex-col gap-4 w-full grow justify-between",children:[r||i||j||$?v.jsx(Zt,{styles:{title:F==null?void 0:F.title,description:F==null?void 0:F.description},classNames:{title:q==null?void 0:q.title,description:q==null?void 0:q.description},graphTitle:r,graphDescription:i,width:c,graphDownload:j?Te.current:void 0,dataDownload:$?e.map(ue=>ue.data).filter(ue=>ue!==void 0).length>0?e.map(ue=>ue.data).filter(ue=>ue!==void 0):e.filter(ue=>ue!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{xe(!_e)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":_e?"Click to pause animation":"Click to play animation",children:_e?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:we[0],max:we[we.length-1],marks:le,step:null,defaultValue:we[we.length-1],value:we[ge],onChangeComplete:ue=>{ve(we.indexOf(ue))},onChange:ue=>{ve(we.indexOf(ue))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[v.jsx(Cn,{width:c,colorDomain:d,colors:n,colorLegendTitle:m,setSelectedColor:Oe,showNAColor:!1}),v.jsx("div",{className:"w-full grow leading-0",ref:Ne,"aria-label":"Graph area",children:(c||X)&&(f||ce)?v.jsx(vve,{data:e,barColors:n,width:c||X,height:Math.max(ae,f||(A?ae?(c||X)*A>ae?(c||X)*A:ae:(c||X)*A:ce)),suffix:g,prefix:y,showValues:b,barPadding:o,showTicks:l,leftMargin:C,rightMargin:k,topMargin:_,bottomMargin:T,truncateBy:s,showLabels:D,tooltip:M,onSeriesMouseOver:E,refValues:N,maxValue:ne,minValue:K,onSeriesMouseClick:B,selectedColor:he,dateFormat:V,indx:ge,rtl:G==="he"||G==="ar",maxBarThickness:H,resetSelectionOnDoubleClick:ee,detailsOnClick:J,barAxisTitle:Z,noOfTicks:re,valueColor:te,styles:F,classNames:q}):null})]}),a||h?v.jsx(tr,{styles:{footnote:F==null?void 0:F.footnote,source:F==null?void 0:F.source},classNames:{footnote:q==null?void 0:q.footnote,source:q==null?void 0:q.source},sources:a,footNote:h,width:c}):null]})})})})}function xve(t){var Oe,Ne,Te,_e,xe,we,ge,ve;const{data:e,barColors:r,barPadding:n,showTicks:a,leftMargin:i,rightMargin:o,truncateBy:l,width:s,height:f,topMargin:c,bottomMargin:h,tooltip:d,onSeriesMouseOver:m,showLabels:g,suffix:y,prefix:b,showValues:S,refValues:w,maxValue:C,onSeriesMouseClick:k,selectedColor:_,dateFormat:D,indx:T,autoSort:A,rtl:M,sortParameter:E,maxBarThickness:N,minBarThickness:Y,resetSelectionOnDoubleClick:ne,detailsOnClick:K,barAxisTitle:B,valueColor:j,noOfTicks:$,styles:V,classNames:z}=t,[W,G]=I.useState(void 0),ae=Ut(e.map(le=>({...le,date:bt(`${le.date}`,D,new Date)})),"date"),U=Bt(ae,le=>le.label).map(le=>le.label),H=Array.from(Hi(Vf(e,D||"yyyy"),le=>le.date),([le,ue])=>({date:le,values:E!==void 0||A?E==="total"||E===void 0?Ut(e,Ce=>fr(Ce.size.filter(pe=>!Fe(pe)))).reverse().map((Ce,pe)=>({...Ce,id:`${pe}`})):Ut(e,Ce=>Fe(Ce.size[E])?-1/0:Ce.size[E]).reverse().map((Ce,pe)=>({...Ce,id:`${pe}`})):U.map(Ce=>ue.find(pe=>pe.label===Ce)).map((Ce,pe)=>({...Ce,id:`${pe}`}))})),R={top:B?c+25:c,bottom:h,left:i,right:o},[ee,J]=I.useState(void 0),[Z,re]=I.useState(void 0),[te,F]=I.useState(void 0),q=s-R.left-R.right,X=f-R.top-R.bottom,ie=Fe(C)?Math.max(...e.map(le=>fr(le.size.filter(ue=>!Fe(ue)))||0)):C,ce=br().domain([0,ie]).range([0,q]).nice(),de=Un().domain(U.map((le,ue)=>`${ue}`)).range([0,Y?Math.max(X,Y*U.length):N?Math.min(X,N*U.length):X]).paddingInner(n),he=ce.ticks($);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${s}px`,height:`${f}px`,viewBox:`0 0 ${s} ${f}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${R.left},${R.top})`,children:[a?v.jsx(La,{values:he.filter(le=>le!==0),x:he.filter(le=>le!==0).map(le=>ce(le)),y1:0-c,y2:X+R.bottom,styles:{gridLines:(Oe=V==null?void 0:V.xAxis)==null?void 0:Oe.gridLines,labels:(Ne=V==null?void 0:V.xAxis)==null?void 0:Ne.labels},classNames:{gridLines:(Te=z==null?void 0:z.xAxis)==null?void 0:Te.gridLines,labels:(_e=z==null?void 0:z.xAxis)==null?void 0:_e.labels},suffix:y,prefix:b,labelType:"secondary",showGridLines:!0}):null,v.jsx(nn,{x:q/2,y:0-R.top+15,style:(xe=V==null?void 0:V.xAxis)==null?void 0:xe.title,className:(we=z==null?void 0:z.xAxis)==null?void 0:we.title,text:B}),v.jsx(mo,{children:H[T].values.map(le=>v.jsxs("g",{className:"undp-viz-low-opacity undp-viz-g-with-hover",children:[le.size.map((ue,Ce)=>{var pe,ye;return v.jsxs(ur.g,{opacity:_?r[Ce]===_?1:.3:1,onMouseEnter:be=>{J({...le,sizeIndex:Ce}),F(be.clientY),re(be.clientX),m&&m({...le,sizeIndex:Ce})},onMouseMove:be=>{J({...le,sizeIndex:Ce}),F(be.clientY),re(be.clientX)},onMouseLeave:()=>{J(void 0),re(void 0),F(void 0),m&&m(void 0)},onClick:()=>{(k||K)&&(Sr(W,{...le,sizeIndex:Ce})&&ne?(G(void 0),k&&k(void 0)):(G({...le,sizeIndex:Ce}),k&&k({...le,sizeIndex:Ce})))},children:[v.jsx(ur.rect,{style:{fill:r[Ce]},height:de.bandwidth(),animate:{width:ce(ue||0),attrX:ce(Ce===0?0:fr(le.size.filter((be,je)=>je<Ce&&be))),attrY:de(le.id)},transition:{duration:.5}},Ce),g?v.jsx(ur.text,{style:{textAnchor:"end",...((pe=V==null?void 0:V.yAxis)==null?void 0:pe.labels)||{}},className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(ye=z==null?void 0:z.yAxis)==null?void 0:ye.labels),dx:-10,dy:"0.33em",animate:{attrX:ce(0),attrY:(de(le.id)||0)+de.bandwidth()/2},transition:{duration:.5},children:`${le.label}`.length<l?`${le.label}`:`${`${le.label}`.substring(0,l)}...`}):null,S?v.jsx(ur.text,{style:{fill:Bi(r[Ce]),textAnchor:"middle",...(V==null?void 0:V.graphObjectValues)||{}},className:Be("graph-value text-sm",z==null?void 0:z.graphObjectValues),dy:"0.33em",animate:{attrX:ce(Ce===0?0:fr(le.size.filter((be,je)=>je<Ce&&be)))+ce(ue||0)/2,attrY:(de(le.id)||0)+de.bandwidth()/2,opacity:ue&&ce(ue)/_t(ue,b,y).length>12?1:0},transition:{duration:.5},children:_t(ue,b,y)}):null]},Ce)}),S?v.jsx(ur.text,{style:{...j&&{fill:j},textAnchor:"start",...(V==null?void 0:V.graphObjectValues)||{}},className:Be("graph-value graph-value-total text-sm",j?"":" fill-primary-gray-700 dark:fill-primary-gray-300",z==null?void 0:z.graphObjectValues),dx:5,dy:"0.33em",animate:{attrX:ce(fr(le.size.map(ue=>ue||0))),attrY:(de(le.id)||0)+de.bandwidth()/2},transition:{duration:.5},children:_t(fr(le.size.filter(ue=>ue)),b,y)}):null]},le.label))}),v.jsx(Nr,{x1:ce(0),x2:ce(0),y1:-2.5,y2:X+R.bottom,classNames:{axis:(ge=z==null?void 0:z.yAxis)==null?void 0:ge.axis},styles:{axis:(ve=V==null?void 0:V.yAxis)==null?void 0:ve.axis}}),w?v.jsx(v.Fragment,{children:w.map((le,ue)=>v.jsx(ti,{text:le.text,color:le.color,x:ce(le.value),y1:0-R.top,y2:X+R.bottom,textSide:ce(le.value)>q*.75||M?"left":"right",classNames:le.classNames,styles:le.styles},ue))}):null]})}),ee&&d&&Z&&te?v.jsx(yr,{data:ee,body:d,xPos:Z,yPos:te,backgroundStyle:V==null?void 0:V.tooltip,className:z==null?void 0:z.tooltip}):null,K?v.jsx(Tr,{open:W!==void 0,onClose:()=>{G(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(K,W)}})}):null]})}function wve(t){const{data:e,graphTitle:r,colors:n=Qe.light.categoricalColors.colors,sources:a,graphDescription:i,barPadding:o=.25,showTicks:l=!0,leftMargin:s=100,rightMargin:f=40,truncateBy:c=999,height:h,width:d,footNote:m,colorDomain:g,colorLegendTitle:y,padding:b,backgroundColor:S=!1,topMargin:w=25,bottomMargin:C=10,tooltip:k,onSeriesMouseOver:_,suffix:D="",prefix:T="",showLabels:A=!0,relativeHeight:M,showValues:E,refValues:N,graphID:Y,maxValue:ne,onSeriesMouseClick:K,graphDownload:B=!1,dataDownload:j=!1,dateFormat:$="yyyy",showOnlyActiveDate:V=!1,autoPlay:z=!1,autoSort:W=!0,language:G="en",minHeight:ae=0,theme:U="light",sortParameter:H,maxBarThickness:R,minBarThickness:ee,ariaLabel:J,resetSelectionOnDoubleClick:Z=!0,detailsOnClick:re,barAxisTitle:te,noOfTicks:F=5,valueColor:q,styles:X,classNames:ie}=t,[ce,de]=I.useState(0),[he,Oe]=I.useState(0),[Ne,Te]=I.useState(void 0),_e=I.useRef(null),xe=I.useRef(null);I.useEffect(()=>{const pe=new ResizeObserver(ye=>{de(d||ye[0].target.clientWidth||620),Oe(h||ye[0].target.clientHeight||480)});return _e.current&&(Oe(_e.current.clientHeight||480),de(_e.current.clientWidth||620),d||pe.observe(_e.current)),()=>pe.disconnect()},[d,h]);const[we,ge]=I.useState(z),ve=qi(Bt(e,pe=>pe.date).map(pe=>bt(`${pe.date}`,$,new Date).getTime()),(pe,ye)=>Ka(pe,ye)),[le,ue]=I.useState(z?0:ve.length-1),Ce={};return ve.forEach((pe,ye)=>{Ce[`${pe}`]={style:{color:ye===le?"#232E3D":"#A9B1B7",fontWeight:ye===le?"bold":"normal",display:ye===le||!V?"inline":"none"},label:Sa(new Date(pe),$)}}),I.useEffect(()=>{const pe=setInterval(()=>{ue(ye=>ye<ve.length-1?ye+1:0)},2e3);return we||clearInterval(pe),()=>clearInterval(pe)},[ve,we]),v.jsx("div",{className:`${U||"light"} flex ${d?"w-fit grow-0":"w-full grow"}`,dir:G==="he"||G==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${S?S===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${G||"en"}`,ie==null?void 0:ie.graphContainer),style:{...(X==null?void 0:X.graphContainer)||{},...S&&S!==!0?{backgroundColor:S}:{}},id:Y,ref:xe,"aria-label":J||`${r?`The graph shows ${r}. `:""}This is an animated stacked bar chart showing data changes over time. ${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:S?b||"1rem":b||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||B||j?v.jsx(Zt,{styles:{title:X==null?void 0:X.title,description:X==null?void 0:X.description},classNames:{title:ie==null?void 0:ie.title,description:ie==null?void 0:ie.description},graphTitle:r,graphDescription:i,width:d,graphDownload:B?xe.current:void 0,dataDownload:j?e.map(pe=>pe.data).filter(pe=>pe!==void 0).length>0?e.map(pe=>pe.data).filter(pe=>pe!==void 0):e.filter(pe=>pe!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{ge(!we)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":we?"Click to pause animation":"Click to play animation",children:we?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:ve[0],max:ve[ve.length-1],marks:Ce,step:null,defaultValue:ve[ve.length-1],value:ve[le],onChangeComplete:pe=>{ue(ve.indexOf(pe))},onChange:pe=>{ue(ve.indexOf(pe))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[v.jsx(Cn,{width:d,colorDomain:g,colors:n,colorLegendTitle:y,setSelectedColor:Te,showNAColor:!1}),v.jsx("div",{className:"w-full grow leading-0",ref:_e,"aria-label":"Graph area",children:(d||ce)&&(h||he)?v.jsx(xve,{data:e,barColors:n,width:d||ce,height:Math.max(ae,h||(M?ae?(d||ce)*M>ae?(d||ce)*M:ae:(d||ce)*M:he)),barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:w,bottomMargin:C,truncateBy:c,showLabels:A,tooltip:k,onSeriesMouseOver:_,showValues:E,suffix:D,prefix:T,refValues:N,maxValue:ne,onSeriesMouseClick:K,selectedColor:Ne,dateFormat:$,indx:le,sortParameter:H,autoSort:W,rtl:G==="he"||G==="ar",maxBarThickness:R,minBarThickness:ee,resetSelectionOnDoubleClick:Z,detailsOnClick:re,barAxisTitle:te,noOfTicks:F,valueColor:q,styles:X,classNames:ie}):null})]}),a||m?v.jsx(tr,{styles:{footnote:X==null?void 0:X.footnote,source:X==null?void 0:X.source},classNames:{footnote:ie==null?void 0:ie.footnote,source:ie==null?void 0:ie.source},sources:a,footNote:m,width:d}):null]})})})})}function Sve(t){var Te,_e,xe,we,ge,ve,le,ue,Ce,pe;const{data:e,barColor:r,suffix:n,prefix:a,barPadding:i,showValues:o,showTicks:l,leftMargin:s,truncateBy:f,width:c,height:h,colorDomain:d,rightMargin:m,topMargin:g,bottomMargin:y,showLabels:b,tooltip:S,onSeriesMouseOver:w,refValues:C,selectedColor:k,highlightedDataPoints:_,maxValue:D,minValue:T,onSeriesMouseClick:A,dateFormat:M,indx:E,autoSort:N,maxBarThickness:Y,minBarThickness:ne,resetSelectionOnDoubleClick:K,detailsOnClick:B,barAxisTitle:j,valueColor:$,noOfTicks:V,styles:z,classNames:W}=t,[G,ae]=I.useState(void 0),[U,H]=I.useState(void 0),[R,ee]=I.useState(void 0),[J,Z]=I.useState(void 0),re={top:g,bottom:y,left:j?s+30:s,right:m},te=c-re.left-re.right,F=h-re.top-re.bottom,q=Ut(e.map(ye=>({...ye,date:bt(`${ye.date}`,M,new Date)})),"date"),X=Bt(q,ye=>ye.label).map(ye=>ye.label),ie=Array.from(Hi(sq(e,M||"yyyy"),ye=>ye.date),([ye,be])=>{const je=N?a7(be.filter($e=>!Fe($e.size)),["size"],["desc"]):X.map($e=>be.find(ut=>ut.label===$e));return be.filter($e=>$e.size===void 0).forEach($e=>{je.push($e)}),{date:ye,values:N?je.reverse().map(($e,ut)=>({...$e,id:`${ut}`})):je.map(($e,ut)=>({...$e,id:`${ut}`}))}}),ce=Fe(D)?Math.max(...e.filter(ye=>!Fe(ye.size)).map(ye=>ye.size))<0?0:Math.max(...e.filter(ye=>!Fe(ye.size)).map(ye=>ye.size)):D,de=Fe(T)?Math.min(...e.filter(ye=>!Fe(ye.size)).map(ye=>ye.size))>=0?0:Math.min(...e.filter(ye=>!Fe(ye.size)).map(ye=>ye.size)):T,he=br().domain([de,ce]).range([F,0]).nice(),Oe=Un().domain(X.map((ye,be)=>`${be}`)).range([0,ne?Math.max(te,ne*X.length):Y?Math.min(te,Y*X.length):te]).paddingInner(i),Ne=he.ticks(V);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${c}px`,height:`${h}px`,viewBox:`0 0 ${c} ${h}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${re.left},${re.top})`,children:[v.jsx(Nr,{y1:he(de<0?0:de),y2:he(de<0?0:de),x1:0-s,x2:te+re.right,label:_t(de<0?0:de,a,n),labelPos:{x:0-s,y:ce<0?-15:he(de<0?0:de),dy:ce<0?"1em":-5,dx:0},classNames:{axis:(Te=W==null?void 0:W.xAxis)==null?void 0:Te.axis,label:(_e=W==null?void 0:W.yAxis)==null?void 0:_e.labels},styles:{axis:(xe=z==null?void 0:z.xAxis)==null?void 0:xe.axis,label:(we=z==null?void 0:z.yAxis)==null?void 0:we.labels}}),l?v.jsx(v1,{values:Ne.filter(ye=>ye!==0),y:Ne.filter(ye=>ye!==0).map(ye=>he(ye)),x1:0-s,x2:te+re.right,styles:{gridLines:(ge=z==null?void 0:z.yAxis)==null?void 0:ge.gridLines,labels:(ve=z==null?void 0:z.yAxis)==null?void 0:ve.labels},classNames:{gridLines:(le=W==null?void 0:W.yAxis)==null?void 0:le.gridLines,labels:(ue=W==null?void 0:W.yAxis)==null?void 0:ue.labels},suffix:n,prefix:a,labelType:"secondary",showGridLines:!0,labelPos:"vertical"}):null,v.jsx(nn,{x:0-s-15,y:F/2,style:(Ce=z==null?void 0:z.yAxis)==null?void 0:Ce.title,className:(pe=W==null?void 0:W.yAxis)==null?void 0:pe.title,text:j,rotate90:!0}),v.jsx(mo,{children:ie[E].values.map(ye=>{var be,je;return v.jsxs(ur.g,{transition:{duration:.5},className:"undp-viz-g-with-hover",opacity:k?ye.color&&r[d.indexOf(ye.color)]===k?1:.3:_.length!==0?_.indexOf(ye.label)!==-1?.85:.3:.85,onMouseEnter:$e=>{H(ye),Z($e.clientY),ee($e.clientX),w&&w(ye)},onClick:()=>{(A||B)&&(Sr(G,ye)&&K?(ae(void 0),A==null||A(void 0)):(ae(ye),A==null||A(ye)))},onMouseMove:$e=>{H(ye),Z($e.clientY),ee($e.clientX)},onMouseLeave:()=>{H(void 0),ee(void 0),Z(void 0),w&&w(void 0)},children:[v.jsx(ur.rect,{style:{fill:e.filter($e=>$e.color).length===0?r[0]:ye.color?r[d.indexOf(ye.color)]:Qe.gray},height:ye.size?Math.abs(he(ye.size)-he(0)):0,width:Oe.bandwidth(),animate:{height:ye.size?Math.abs(he(ye.size)-he(0)):0,attrY:ye.size&&ye.size>0?he(ye.size):he(0),attrX:Oe(`${ye.id}`),fill:e.filter($e=>$e.color).length===0?r[0]:ye.color?r[d.indexOf(ye.color)]:Qe.gray},transition:{duration:.5}}),b?v.jsx(ur.text,{style:{textAnchor:"middle",...((be=z==null?void 0:z.xAxis)==null?void 0:be.labels)||{}},dy:ye.size?ye.size>=0?"1em":"-5px":"1em",animate:{attrX:Oe(`${ye.id}`)+Oe.bandwidth()/2,attrY:ye.size?ye.size>=0?he(0)+4:he(0):he(0)+4},transition:{duration:.5},className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(je=W==null?void 0:W.xAxis)==null?void 0:je.labels),children:`${ye.label}`.length<f?`${ye.label}`:`${`${ye.label}`.substring(0,f)}...`}):null,o?v.jsx(ur.text,{style:{...$?{fill:$}:r.length>1?{}:{fill:r[0]},textAnchor:"middle",...(z==null?void 0:z.graphObjectValues)||{}},className:Be("graph-value text-sm",!$&&r.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",W==null?void 0:W.graphObjectValues),animate:{attrX:Oe(`${ye.id}`)+Oe.bandwidth()/2,attrY:he(ye.size||0)},dy:ye.size?ye.size>=0?"-5px":"1em":"-5px",transition:{duration:.5},children:_t(ye.size,a,n)}):null]},ye.label)})}),C?v.jsx(v.Fragment,{children:C.map((ye,be)=>v.jsx(h1,{text:ye.text,color:ye.color,y:he(ye.value),x1:0-s,x2:te+re.right,classNames:ye.classNames,styles:ye.styles},be))}):null]})}),U&&S&&R&&J?v.jsx(yr,{data:U,body:S,xPos:R,yPos:J,backgroundStyle:z==null?void 0:z.tooltip,className:W==null?void 0:W.tooltip}):null,B?v.jsx(Tr,{open:G!==void 0,onClose:()=>{ae(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(B,G)}})}):null]})}function Cve(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o=.25,showTicks:l=!0,leftMargin:s=20,rightMargin:f=20,topMargin:c=20,bottomMargin:h=25,truncateBy:d=999,showLabels:m=!0,showValues:g=!0,backgroundColor:y=!1,suffix:b="",prefix:S="",height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,highlightedDataPoints:T=[],padding:A,relativeHeight:M,tooltip:E,onSeriesMouseOver:N,refValues:Y,showColorScale:ne,graphID:K,maxValue:B,minValue:j,onSeriesMouseClick:$,dateFormat:V="yyyy",showOnlyActiveDate:z=!1,autoPlay:W=!1,autoSort:G=!0,graphDownload:ae=!1,dataDownload:U=!1,language:H="en",theme:R="light",showNAColor:ee=!0,minHeight:J=0,maxBarThickness:Z,minBarThickness:re,ariaLabel:te,resetSelectionOnDoubleClick:F=!0,detailsOnClick:q,barAxisTitle:X,noOfTicks:ie=5,valueColor:ce,styles:de,classNames:he}=t,[Oe,Ne]=I.useState(0),[Te,_e]=I.useState(0),[xe,we]=I.useState(void 0),[ge,ve]=I.useState(W),le=I.useRef(null),ue=I.useRef(null);I.useEffect(()=>{const je=new ResizeObserver($e=>{Ne(C||$e[0].target.clientWidth||620),_e(w||$e[0].target.clientHeight||480)});return le.current&&(_e(le.current.clientHeight||480),Ne(le.current.clientWidth||620),C||je.observe(le.current)),()=>je.disconnect()},[C,w]);const Ce=qi(Bt(e,je=>je.date).map(je=>bt(`${je.date}`,V,new Date).getTime()),(je,$e)=>Ka(je,$e)),[pe,ye]=I.useState(W?0:Ce.length-1),be={};return Ce.forEach((je,$e)=>{be[`${je}`]={style:{color:$e===pe?"#232E3D":"#A9B1B7",fontWeight:$e===pe?"bold":"normal",display:$e===pe||!z?"inline":"none"},label:Sa(new Date(je),V)}}),I.useEffect(()=>{const je=setInterval(()=>{ye($e=>$e<Ce.length-1?$e+1:0)},2e3);return ge||clearInterval(je),()=>clearInterval(je)},[Ce,ge]),v.jsx("div",{className:`${R||"light"} flex ${C?"w-fit grow-0":"w-full grow"}`,dir:H==="he"||H==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${y?y===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${H||"en"}`,he==null?void 0:he.graphContainer),style:{...(de==null?void 0:de.graphContainer)||{},...y&&y!==!0?{backgroundColor:y}:{}},id:K,ref:ue,"aria-label":te||`${r?`The graph shows ${r}. `:""}This is an animated bar chart showing data changes over time. ${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:y?A||"1rem":A||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||ae||U?v.jsx(Zt,{styles:{title:de==null?void 0:de.title,description:de==null?void 0:de.description},classNames:{title:he==null?void 0:he.title,description:he==null?void 0:he.description},graphTitle:r,graphDescription:i,width:C,graphDownload:ae?ue.current:void 0,dataDownload:U?e.map(je=>je.data).filter(je=>je!==void 0).length>0?e.map(je=>je.data).filter(je=>je!==void 0):e.filter(je=>je!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{ve(!ge)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":ge?"Click to pause animation":"Click to play animation",children:ge?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:Ce[0],max:Ce[Ce.length-1],marks:be,step:null,defaultValue:Ce[Ce.length-1],value:Ce[pe],onChangeComplete:je=>{ye(Ce.indexOf(je))},onChange:je=>{ye(Ce.indexOf(je))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[ne!==!1&&e.filter(je=>je.color).length!==0?v.jsx(Cn,{width:C,colorLegendTitle:D,colors:n||Qe[R].categoricalColors.colors,colorDomain:_||Bt(e.filter(je=>je.color),"color").map(je=>je.color),setSelectedColor:we,showNAColor:ee}):null,v.jsx("div",{className:"flex grow flex-col justify-center w-full leading-0",ref:le,"aria-label":"Graph area",children:(C||Oe)&&(w||Te)?v.jsx(Sve,{data:e,barColor:e.filter(je=>je.color).length===0?n?[n]:[Qe.primaryColors["blue-600"]]:n||Qe[R].categoricalColors.colors,colorDomain:e.filter(je=>je.color).length===0?[]:_||Bt(e.filter(je=>je.color),"color").map(je=>je.color),width:C||Oe,selectedColor:xe,height:Math.max(J,w||(M?J?(C||Oe)*M>J?(C||Oe)*M:J:(C||Oe)*M:Te)),suffix:b,prefix:S,barPadding:o,showValues:g,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:m,tooltip:E,onSeriesMouseOver:N,refValues:Y,maxValue:B,minValue:j,highlightedDataPoints:T,onSeriesMouseClick:$,dateFormat:V,indx:pe,autoSort:G,maxBarThickness:Z,minBarThickness:re,resetSelectionOnDoubleClick:F,detailsOnClick:q,barAxisTitle:X,noOfTicks:ie,valueColor:ce,styles:de,classNames:he}):null})]}),a||k?v.jsx(tr,{styles:{footnote:de==null?void 0:de.footnote,source:de==null?void 0:de.source},classNames:{footnote:he==null?void 0:he.footnote,source:he==null?void 0:he.source},sources:a,footNote:k,width:C}):null]})})})})}function kve(t){var he,Oe,Ne,Te,_e,xe,we,ge,ve,le;const{data:e,width:r,height:n,barColors:a,suffix:i,prefix:o,barPadding:l,showLabels:s,showValues:f,showTicks:c,truncateBy:h,leftMargin:d,rightMargin:m,topMargin:g,bottomMargin:y,tooltip:b,onSeriesMouseOver:S,refValues:w,maxValue:C,minValue:k,onSeriesMouseClick:_,selectedColor:D,dateFormat:T,indx:A,maxBarThickness:M,resetSelectionOnDoubleClick:E,detailsOnClick:N,barAxisTitle:Y,valueColor:ne,noOfTicks:K,styles:B,classNames:j}=t,$=Ut(e.map(ue=>({...ue,date:bt(`${ue.date}`,T,new Date)})),"date"),V=Bt($,ue=>ue.label).map(ue=>ue.label),z=Array.from(Hi(Vf(e,T||"yyyy"),ue=>ue.date),([ue,Ce])=>({date:ue,values:V.map(pe=>Ce.find(ye=>ye.label===pe)).map((pe,ye)=>({...pe,id:`${ye}`}))})),W={top:g,bottom:y,left:Y?d+30:d,right:m},[G,ae]=I.useState(void 0),[U,H]=I.useState(void 0),[R,ee]=I.useState(void 0),[J,Z]=I.useState(void 0),re=r-W.left-W.right,te=n-W.top-W.bottom,F=Fe(C)?Math.max(...e.map(ue=>Mn(ue.size.filter(Ce=>!Fe(Ce)))||0))<0?0:Math.max(...e.map(ue=>Mn(ue.size.filter(Ce=>!Fe(Ce)))||0)):C,q=Fe(k)?Math.min(...e.map(ue=>gr(ue.size.filter(Ce=>!Fe(Ce)))||0))>=0?0:Math.min(...e.map(ue=>gr(ue.size.filter(Ce=>!Fe(Ce)))||0)):k,X=br().domain([q,F]).range([te,0]).nice(),ie=Un().domain(V.map((ue,Ce)=>`${Ce}`)).range([0,M?Math.min(re,M*V.length):re]).paddingInner(l),ce=Un().domain(e[0].size.map((ue,Ce)=>`${Ce}`)).range([0,ie.bandwidth()]).paddingInner(.1),de=X.ticks(K);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${r}px`,height:`${n}px`,viewBox:`0 0 ${r} ${n}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${W.left},${W.top})`,children:[v.jsx(Nr,{y1:X(q<0?0:q),y2:X(q<0?0:q),x1:0-d,x2:re+W.right,label:_t(q<0?0:q,o,i),labelPos:{x:0-d,dx:0,dy:F<0?"1em":-5,y:X(q<0?0:q)},classNames:{axis:(he=j==null?void 0:j.xAxis)==null?void 0:he.axis,label:(Oe=j==null?void 0:j.yAxis)==null?void 0:Oe.labels},styles:{axis:(Ne=B==null?void 0:B.xAxis)==null?void 0:Ne.axis,label:(Te=B==null?void 0:B.yAxis)==null?void 0:Te.labels}}),c?v.jsx(v1,{values:de.filter(ue=>ue!==0),y:de.filter(ue=>ue!==0).map(ue=>X(ue)),x1:0-d,x2:re+W.right,styles:{gridLines:(_e=B==null?void 0:B.yAxis)==null?void 0:_e.gridLines,labels:(xe=B==null?void 0:B.yAxis)==null?void 0:xe.labels},classNames:{gridLines:(we=j==null?void 0:j.yAxis)==null?void 0:we.gridLines,labels:(ge=j==null?void 0:j.yAxis)==null?void 0:ge.labels},suffix:i,prefix:o,labelType:"secondary",showGridLines:!0,labelPos:"vertical"}):null,v.jsx(nn,{x:0-d-15,y:te/2,style:(ve=B==null?void 0:B.yAxis)==null?void 0:ve.title,className:(le=j==null?void 0:j.yAxis)==null?void 0:le.title,text:Y,rotate90:!0}),v.jsx(mo,{children:z[A].values.map((ue,Ce)=>{var pe,ye;return v.jsxs(ur.g,{transform:`translate(${ie(`${ue.id}`)},0)`,children:[ue.size.map((be,je)=>v.jsxs(ur.g,{className:"undp-viz-g-with-hover",opacity:D?a[je]===D?1:.3:.85,onMouseEnter:$e=>{ae({...ue,sizeIndex:je}),Z($e.clientY),ee($e.clientX),S&&S({...ue,sizeIndex:je})},onMouseMove:$e=>{ae({...ue,sizeIndex:je}),Z($e.clientY),ee($e.clientX)},onMouseLeave:()=>{ae(void 0),ee(void 0),Z(void 0),S&&S(void 0)},onClick:()=>{(_||N)&&(Sr(U,{...ue,sizeIndex:je})&&E?(H(void 0),_&&_(void 0)):(H({...ue,sizeIndex:je}),_&&_({...ue,sizeIndex:je})))},children:[v.jsx(ur.rect,{x:ce(`${je}`),width:ce.bandwidth(),style:{fill:a[je]},animate:{height:Fe(be)?0:Math.abs(X(be)-X(0)),attrY:Fe(be)?X(0):be>0?X(be):X(0)},transition:{duration:.5}}),f?v.jsx(ur.text,{x:ce(`${je}`)+ce.bandwidth()/2,style:{fill:ne||a[je],textAnchor:"middle",...(B==null?void 0:B.graphObjectValues)||{}},className:Be("graph-value text-sm",j==null?void 0:j.graphObjectValues),dy:be?be>=0?"-5px":"1em":"-5px",animate:{attrY:X(be||0)},transition:{duration:.5},children:_t(be,o,i)}):null]},je)),s?v.jsx(f4,{value:`${ue.label}`.length<h?`${ue.label}`:`${`${ue.label}`.substring(0,h)}...`,y:X(0)+5,x:0,width:ie.bandwidth(),height:W.bottom,style:(pe=B==null?void 0:B.xAxis)==null?void 0:pe.labels,className:(ye=j==null?void 0:j.xAxis)==null?void 0:ye.labels,alignment:"top"}):null]},Ce)})}),w?v.jsx(v.Fragment,{children:w.map((ue,Ce)=>v.jsx(h1,{text:ue.text,color:ue.color,y:X(ue.value),x1:0-d,x2:re+W.right,classNames:ue.classNames,styles:ue.styles},Ce))}):null]})}),G&&b&&R&&J?v.jsx(yr,{data:G,body:b,xPos:R,yPos:J,backgroundStyle:B==null?void 0:B.tooltip,className:j==null?void 0:j.tooltip}):null,N?v.jsx(Tr,{open:U!==void 0,onClose:()=>{H(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(N,U)}})}):null]})}function _ve(t){const{data:e,graphTitle:r,colors:n=Qe.light.categoricalColors.colors,sources:a,graphDescription:i,barPadding:o=.25,showTicks:l=!0,leftMargin:s=20,rightMargin:f=20,topMargin:c=20,bottomMargin:h=25,truncateBy:d=999,showLabels:m=!0,showValues:g=!0,backgroundColor:y=!1,suffix:b="",prefix:S="",height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,padding:T,relativeHeight:A,tooltip:M,onSeriesMouseOver:E,refValues:N,graphID:Y,maxValue:ne,minValue:K,onSeriesMouseClick:B,dateFormat:j="yyyy",showOnlyActiveDate:$=!1,autoPlay:V=!1,graphDownload:z=!1,dataDownload:W=!1,language:G="en",theme:ae="light",minHeight:U=0,maxBarThickness:H,ariaLabel:R,resetSelectionOnDoubleClick:ee=!0,detailsOnClick:J,barAxisTitle:Z,noOfTicks:re=5,valueColor:te,styles:F,classNames:q}=t,[X,ie]=I.useState(0),[ce,de]=I.useState(0),[he,Oe]=I.useState(void 0),Ne=I.useRef(null),Te=I.useRef(null);I.useEffect(()=>{const ue=new ResizeObserver(Ce=>{ie(C||Ce[0].target.clientWidth||620),de(w||Ce[0].target.clientHeight||480)});return Ne.current&&(de(Ne.current.clientHeight||480),ie(Ne.current.clientWidth||620),C||ue.observe(Ne.current)),()=>ue.disconnect()},[C,w]);const[_e,xe]=I.useState(V),we=qi(Bt(e,ue=>ue.date).map(ue=>bt(`${ue.date}`,j,new Date).getTime()),(ue,Ce)=>Ka(ue,Ce)),[ge,ve]=I.useState(V?0:we.length-1),le={};return we.forEach((ue,Ce)=>{le[`${ue}`]={style:{color:Ce===ge?"#232E3D":"#A9B1B7",fontWeight:Ce===ge?"bold":"normal",display:Ce===ge||!$?"inline":"none"},label:Sa(new Date(ue),j)}}),I.useEffect(()=>{const ue=setInterval(()=>{ve(Ce=>Ce<we.length-1?Ce+1:0)},2e3);return _e||clearInterval(ue),()=>clearInterval(ue)},[we,_e]),v.jsx("div",{className:`${ae||"light"} flex ${C?"w-fit grow-0":"w-full grow"}`,dir:G==="he"||G==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${y?y===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${G||"en"}`,q==null?void 0:q.graphContainer),style:{...(F==null?void 0:F.graphContainer)||{},...y&&y!==!0?{backgroundColor:y}:{}},id:Y,ref:Te,"aria-label":R||`${r?`The graph shows ${r}. `:""}This is an animated grouped bar chart showing data changes over time. ${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:y?T||"1rem":T||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||z||W?v.jsx(Zt,{styles:{title:F==null?void 0:F.title,description:F==null?void 0:F.description},classNames:{title:q==null?void 0:q.title,description:q==null?void 0:q.description},graphTitle:r,graphDescription:i,width:C,graphDownload:z?Te.current:void 0,dataDownload:W?e.map(ue=>ue.data).filter(ue=>ue!==void 0).length>0?e.map(ue=>ue.data).filter(ue=>ue!==void 0):e.filter(ue=>ue!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{xe(!_e)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":_e?"Click to pause animation":"Click to play animation",children:_e?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:we[0],max:we[we.length-1],marks:le,step:null,defaultValue:we[we.length-1],value:we[ge],onChangeComplete:ue=>{ve(we.indexOf(ue))},onChange:ue=>{ve(we.indexOf(ue))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[v.jsx(Cn,{width:C,colorDomain:_,colors:n,colorLegendTitle:D,setSelectedColor:Oe,showNAColor:!1}),v.jsx("div",{className:"w-full grow leading-0",ref:Ne,"aria-label":"Graph area",children:(C||X)&&(w||ce)?v.jsx(kve,{data:e,barColors:n,width:C||X,height:Math.max(U,w||(A?U?(C||X)*A>U?(C||X)*A:U:(C||X)*A:ce)),suffix:b,prefix:S,barPadding:o,showLabels:m,showValues:g,showTicks:l,truncateBy:d,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,tooltip:M,onSeriesMouseOver:E,refValues:N,maxValue:ne,minValue:K,onSeriesMouseClick:B,selectedColor:he,dateFormat:j,indx:ge,maxBarThickness:H,resetSelectionOnDoubleClick:ee,detailsOnClick:J,barAxisTitle:Z,noOfTicks:re,valueColor:te,styles:F,classNames:q}):null})]}),a||k?v.jsx(tr,{styles:{footnote:F==null?void 0:F.footnote,source:F==null?void 0:F.source},classNames:{footnote:q==null?void 0:q.footnote,source:q==null?void 0:q.source},sources:a,footNote:k,width:C}):null]})})})})}function Ove(t){var he,Oe,Ne,Te,_e,xe,we,ge,ve,le;const{data:e,barColors:r,barPadding:n,showTicks:a,leftMargin:i,rightMargin:o,truncateBy:l,width:s,height:f,topMargin:c,bottomMargin:h,tooltip:d,onSeriesMouseOver:m,showLabels:g,suffix:y,prefix:b,showValues:S,refValues:w,maxValue:C,onSeriesMouseClick:k,selectedColor:_,dateFormat:D,indx:T,autoSort:A,sortParameter:M,maxBarThickness:E,minBarThickness:N,resetSelectionOnDoubleClick:Y,detailsOnClick:ne,barAxisTitle:K,valueColor:B,noOfTicks:j,styles:$,classNames:V}=t,[z,W]=I.useState(void 0),G=Ut(e.map(ue=>({...ue,date:bt(`${ue.date}`,D,new Date)})),"date"),ae=Bt(G,ue=>ue.label).map(ue=>ue.label),U=Array.from(Hi(Vf(e,D||"yyyy"),ue=>ue.date),([ue,Ce])=>({date:ue,values:M!==void 0||A?M==="total"||M===void 0?Ut(e.filter(pe=>pe.date===ue),pe=>fr(pe.size.filter(ye=>!Fe(ye)))).map((pe,ye)=>({...pe,id:`${ye}`})):Ut(e.filter(pe=>pe.date===ue),pe=>Fe(pe.size[M])?-1/0:pe.size[M]).map((pe,ye)=>({...pe,id:`${ye}`})):ae.map(pe=>Ce.find(ye=>ye.label===pe)).map((pe,ye)=>({...pe,id:`${ye}`}))})),H={top:c,bottom:h,left:i,right:o},[R,ee]=I.useState(void 0),[J,Z]=I.useState(void 0),[re,te]=I.useState(void 0),F=s-H.left-H.right,q=f-H.top-H.bottom,X=Fe(C)?Math.max(...e.map(ue=>fr(ue.size.filter(Ce=>!Fe(Ce)))||0)):C,ie=br().domain([0,X]).range([q,0]).nice(),ce=Un().domain(ae.map((ue,Ce)=>`${Ce}`)).range([0,N?Math.max(F,N*ae.length):E?Math.min(F,E*ae.length):F]).paddingInner(n),de=ie.ticks(j);return v.jsxs(v.Fragment,{children:[v.jsx("svg",{width:`${s}px`,height:`${f}px`,viewBox:`0 0 ${s} ${f}`,direction:"ltr",children:v.jsxs("g",{transform:`translate(${H.left},${H.top})`,children:[v.jsx(Nr,{y1:ie(0),y2:ie(0),x1:0-i,x2:F+H.right,label:_t(0,b,y),labelPos:{x:0-i,y:ie(0),dx:0,dy:-5},classNames:{axis:(he=V==null?void 0:V.xAxis)==null?void 0:he.axis,label:(Oe=V==null?void 0:V.yAxis)==null?void 0:Oe.labels},styles:{axis:(Ne=$==null?void 0:$.xAxis)==null?void 0:Ne.axis,label:(Te=$==null?void 0:$.yAxis)==null?void 0:Te.labels}}),a?v.jsx(v1,{values:de.filter(ue=>ue!==0),y:de.filter(ue=>ue!==0).map(ue=>ie(ue)),x1:0-i,x2:F+H.right,styles:{gridLines:(_e=$==null?void 0:$.yAxis)==null?void 0:_e.gridLines,labels:(xe=$==null?void 0:$.yAxis)==null?void 0:xe.labels},classNames:{gridLines:(we=V==null?void 0:V.yAxis)==null?void 0:we.gridLines,labels:(ge=V==null?void 0:V.yAxis)==null?void 0:ge.labels},suffix:y,prefix:b,labelType:"secondary",showGridLines:!0,labelPos:"vertical"}):null,v.jsx(nn,{x:0-i-15,y:q/2,style:(ve=$==null?void 0:$.yAxis)==null?void 0:ve.title,className:(le=V==null?void 0:V.yAxis)==null?void 0:le.title,text:K,rotate90:!0}),v.jsx(mo,{children:U[T].values.map(ue=>{var Ce,pe;return v.jsxs("g",{className:"undp-viz-low-opacity undp-viz-g-with-hover",transform:"translate(0,0)",children:[ue.size.map((ye,be)=>v.jsxs(ur.g,{opacity:_?r[be]===_?1:.3:1,onMouseEnter:je=>{ee({...ue,sizeIndex:be}),te(je.clientY),Z(je.clientX),m&&m({...ue,sizeIndex:be})},onMouseMove:je=>{ee({...ue,sizeIndex:be}),te(je.clientY),Z(je.clientX)},onMouseLeave:()=>{ee(void 0),Z(void 0),te(void 0),m&&m(void 0)},onClick:()=>{(k||ne)&&(Sr(z,{...ue,sizeIndex:be})&&Y?(W(void 0),k&&k(void 0)):(W({...ue,sizeIndex:be}),k&&k({...ue,sizeIndex:be})))},children:[v.jsx(ur.rect,{style:{fill:r[be]},width:ce.bandwidth(),animate:{height:Math.abs(ie(fr(ue.size.filter((je,$e)=>$e<=be&&je)))-ie(fr(ue.size.filter((je,$e)=>$e<be&&je)))),attrY:ie(fr(ue.size.filter((je,$e)=>$e<=be&&je))),attrX:ce(ue.id)},transition:{duration:.5}},be),S?v.jsx(ur.text,{style:{fill:Bi(r[be]),textAnchor:"middle",...($==null?void 0:$.graphObjectValues)||{}},className:Be("graph-value text-sm",V==null?void 0:V.graphObjectValues),dy:"0.33em",animate:{attrY:ie(fr(ue.size.filter((je,$e)=>$e<=be&&je)))+Math.abs(ie(fr(ue.size.filter((je,$e)=>$e<=be&&je)))-ie(fr(ue.size.filter((je,$e)=>$e<be&&je))))/2,attrX:(ce(ue.id)||0)+ce.bandwidth()/2,opacity:ye&&Math.abs(ie(fr(ue.size.filter((je,$e)=>$e<=be&&je)))-ie(fr(ue.size.filter((je,$e)=>$e<be&&je))))>20?1:0},transition:{duration:.5},children:_t(ye,b,y)}):null]},be)),g?v.jsx(ur.text,{style:{textAnchor:"middle",...((Ce=$==null?void 0:$.xAxis)==null?void 0:Ce.labels)||{}},className:Be("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",(pe=V==null?void 0:V.xAxis)==null?void 0:pe.labels),dy:"1em",animate:{attrY:ie(0)+5,attrX:(ce(ue.id)||0)+ce.bandwidth()/2},transition:{duration:.5},children:`${ue.label}`.length<l?`${ue.label}`:`${`${ue.label}`.substring(0,l)}...`}):null,S?v.jsx(ur.text,{style:{...B&&{fill:B},textAnchor:"middle",...($==null?void 0:$.graphObjectValues)||{}},className:Be("graph-value graph-value-total",B?"text-sm":"fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",V==null?void 0:V.graphObjectValues),dy:-10,animate:{attrY:ie(fr(ue.size.map(ye=>ye||0))),attrX:(ce(ue.id)||0)+ce.bandwidth()/2},transition:{duration:.5},children:_t(fr(ue.size.filter(ye=>ye)),b,y)}):null]},ue.label)})}),w?v.jsx(v.Fragment,{children:w.map((ue,Ce)=>v.jsx(h1,{text:ue.text,color:ue.color,y:ie(ue.value),x1:0-i,x2:F+H.right,classNames:ue.classNames,styles:ue.styles},Ce))}):null]})}),R&&d&&J&&re?v.jsx(yr,{data:R,body:d,xPos:J,yPos:re,backgroundStyle:$==null?void 0:$.tooltip,className:V==null?void 0:V.tooltip}):null,ne?v.jsx(Tr,{open:z!==void 0,onClose:()=>{W(void 0)},children:v.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:{__html:Cr(ne,z)}})}):null]})}function Dve(t){const{data:e,graphTitle:r,colors:n=Qe.light.categoricalColors.colors,sources:a,graphDescription:i,barPadding:o=.25,showTicks:l=!0,leftMargin:s=20,rightMargin:f=20,topMargin:c=20,bottomMargin:h=25,truncateBy:d=999,showLabels:m=!0,showValues:g=!0,backgroundColor:y=!1,suffix:b="",prefix:S="",height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,padding:T,tooltip:A,onSeriesMouseOver:M,relativeHeight:E,refValues:N,graphID:Y,maxValue:ne,onSeriesMouseClick:K,dateFormat:B="yyyy",showOnlyActiveDate:j=!1,autoPlay:$=!1,autoSort:V=!0,graphDownload:z=!1,dataDownload:W=!1,language:G="en",theme:ae="light",minHeight:U=0,sortParameter:H,maxBarThickness:R,minBarThickness:ee,ariaLabel:J,resetSelectionOnDoubleClick:Z=!0,detailsOnClick:re,barAxisTitle:te,noOfTicks:F=5,valueColor:q,styles:X,classNames:ie}=t,[ce,de]=I.useState(0),[he,Oe]=I.useState(0),[Ne,Te]=I.useState(void 0),_e=I.useRef(null),xe=I.useRef(null);I.useEffect(()=>{const pe=new ResizeObserver(ye=>{de(C||ye[0].target.clientWidth||620),Oe(w||ye[0].target.clientHeight||480)});return _e.current&&(Oe(_e.current.clientHeight||480),de(_e.current.clientWidth||620),C||pe.observe(_e.current)),()=>pe.disconnect()},[C,w]);const[we,ge]=I.useState($),ve=qi(Bt(e,pe=>pe.date).map(pe=>bt(`${pe.date}`,B,new Date).getTime()),(pe,ye)=>Ka(pe,ye)),[le,ue]=I.useState($?0:ve.length-1),Ce={};return ve.forEach((pe,ye)=>{Ce[`${pe}`]={style:{color:ye===le?"#232E3D":"#A9B1B7",fontWeight:ye===le?"bold":"normal",display:ye===le||!j?"inline":"none"},label:Sa(new Date(pe),B)}}),I.useEffect(()=>{const pe=setInterval(()=>{ue(ye=>ye<ve.length-1?ye+1:0)},2e3);return we||clearInterval(pe),()=>clearInterval(pe)},[ve,we]),v.jsx("div",{className:`${ae||"light"} flex ${C?"w-fit grow-0":"w-full grow"}`,dir:G==="he"||G==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${y?y===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${G||"en"}`,ie==null?void 0:ie.graphContainer),style:{...(X==null?void 0:X.graphContainer)||{},...y&&y!==!0?{backgroundColor:y}:{}},id:Y,ref:xe,"aria-label":J||`${r?`The graph shows ${r}. `:""}This is an animated stacked bar chart showing data changes over time. ${i?` ${i}`:""}`,children:v.jsx("div",{className:"flex grow",style:{padding:y?T||"1rem":T||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r||i||z||W?v.jsx(Zt,{styles:{title:X==null?void 0:X.title,description:X==null?void 0:X.description},classNames:{title:ie==null?void 0:ie.title,description:ie==null?void 0:ie.description},graphTitle:r,graphDescription:i,width:C,graphDownload:z?xe.current:void 0,dataDownload:W?e.map(pe=>pe.data).filter(pe=>pe!==void 0).length>0?e.map(pe=>pe.data).filter(pe=>pe!==void 0):e.filter(pe=>pe!==void 0):null}):null,v.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[v.jsx("button",{type:"button",onClick:()=>{ge(!we)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":we?"Click to pause animation":"Click to play animation",children:we?v.jsx(Ui,{}):v.jsx(Wi,{})}),v.jsx(zi,{min:ve[0],max:ve[ve.length-1],marks:Ce,step:null,defaultValue:ve[ve.length-1],value:ve[le],onChangeComplete:pe=>{ue(ve.indexOf(pe))},onChange:pe=>{ue(ve.indexOf(pe))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}),v.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[v.jsx(Cn,{width:C,colorDomain:_,colors:n,colorLegendTitle:D,setSelectedColor:Te,showNAColor:!1}),v.jsx("div",{className:"w-full grow leading-0",ref:_e,"aria-label":"Graph area",children:(C||ce)&&(w||he)?v.jsx(Ove,{data:e,barColors:n,width:C||ce,height:Math.max(U,w||(E?U?(C||ce)*E>U?(C||ce)*E:U:(C||ce)*E:he)),suffix:b,prefix:S,barPadding:o,showLabels:m,showValues:g,showTicks:l,truncateBy:d,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,tooltip:A,onSeriesMouseOver:M,refValues:N,maxValue:ne,onSeriesMouseClick:K,selectedColor:Ne,dateFormat:B,indx:le,sortParameter:H,autoSort:V,maxBarThickness:R,minBarThickness:ee,resetSelectionOnDoubleClick:Z,detailsOnClick:re,barAxisTitle:te,noOfTicks:F,valueColor:q,styles:X,classNames:ie}):null})]}),a||k?v.jsx(tr,{styles:{footnote:X==null?void 0:X.footnote,source:X==null?void 0:X.source},classNames:{footnote:ie==null?void 0:ie.footnote,source:ie==null?void 0:ie.source},sources:a,footNote:k,width:C}):null]})})})})}function gq(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:m,showValues:g,backgroundColor:y,suffix:b,prefix:S,height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,highlightedDataPoints:T,padding:A,relativeHeight:M,tooltip:E,onSeriesMouseOver:N,refValues:Y,showColorScale:ne,graphID:K,maxValue:B,minValue:j,onSeriesMouseClick:$,dateFormat:V,showOnlyActiveDate:z,autoPlay:W,autoSort:G,graphDownload:ae,dataDownload:U,language:H,theme:R,showNAColor:ee,minHeight:J,maxBarThickness:Z,minBarThickness:re,ariaLabel:te,resetSelectionOnDoubleClick:F,detailsOnClick:q,barAxisTitle:X,noOfTicks:ie,valueColor:ce,orientation:de="vertical",styles:he,classNames:Oe}=t;return de==="vertical"?v.jsx(Cve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:m,showValues:g,backgroundColor:y,suffix:b,prefix:S,height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,highlightedDataPoints:T,padding:A,relativeHeight:M,tooltip:E,onSeriesMouseOver:N,refValues:Y,showColorScale:ne,graphID:K,maxValue:B,minValue:j,onSeriesMouseClick:$,dateFormat:V,showOnlyActiveDate:z,autoPlay:W,autoSort:G,graphDownload:ae,dataDownload:U,language:H,theme:R,showNAColor:ee,minHeight:J,maxBarThickness:Z,minBarThickness:re,ariaLabel:te,resetSelectionOnDoubleClick:F,styles:he,detailsOnClick:q,barAxisTitle:X,noOfTicks:ie,valueColor:ce,classNames:Oe}):v.jsx(yve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:m,showValues:g,backgroundColor:y,suffix:b,prefix:S,height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,highlightedDataPoints:T,padding:A,relativeHeight:M,tooltip:E,onSeriesMouseOver:N,refValues:Y,showColorScale:ne,graphID:K,maxValue:B,minValue:j,onSeriesMouseClick:$,dateFormat:V,showOnlyActiveDate:z,autoPlay:W,autoSort:G,graphDownload:ae,dataDownload:U,language:H,theme:R,showNAColor:ee,minHeight:J,maxBarThickness:Z,minBarThickness:re,ariaLabel:te,resetSelectionOnDoubleClick:F,styles:he,detailsOnClick:q,barAxisTitle:X,noOfTicks:ie,valueColor:ce,classNames:Oe})}function yq(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,truncateBy:s,height:f,width:c,footNote:h,colorDomain:d,colorLegendTitle:m,suffix:g,prefix:y,showValues:b,padding:S,backgroundColor:w,leftMargin:C,rightMargin:k,topMargin:_,showLabels:D,bottomMargin:T,relativeHeight:A,tooltip:M,onSeriesMouseOver:E,refValues:N,graphID:Y,maxValue:ne,minValue:K,onSeriesMouseClick:B,graphDownload:j,dataDownload:$,dateFormat:V,showOnlyActiveDate:z,autoPlay:W,language:G,minHeight:ae,theme:U,maxBarThickness:H,ariaLabel:R,resetSelectionOnDoubleClick:ee,detailsOnClick:J,barAxisTitle:Z,noOfTicks:re,valueColor:te,orientation:F="vertical",styles:q,classNames:X}=t;return F==="vertical"?v.jsx(_ve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,truncateBy:s,height:f,width:c,footNote:h,colorDomain:d,colorLegendTitle:m,suffix:g,prefix:y,showValues:b,padding:S,backgroundColor:w,leftMargin:C,rightMargin:k,topMargin:_,showLabels:D,bottomMargin:T,relativeHeight:A,tooltip:M,onSeriesMouseOver:E,refValues:N,graphID:Y,maxValue:ne,minValue:K,onSeriesMouseClick:B,graphDownload:j,dataDownload:$,dateFormat:V,showOnlyActiveDate:z,autoPlay:W,language:G,minHeight:ae,theme:U,maxBarThickness:H,ariaLabel:R,resetSelectionOnDoubleClick:ee,styles:q,detailsOnClick:J,barAxisTitle:Z,noOfTicks:re,valueColor:te,classNames:X}):v.jsx(bve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,truncateBy:s,height:f,width:c,footNote:h,colorDomain:d,colorLegendTitle:m,suffix:g,prefix:y,showValues:b,padding:S,backgroundColor:w,leftMargin:C,rightMargin:k,topMargin:_,showLabels:D,bottomMargin:T,relativeHeight:A,tooltip:M,onSeriesMouseOver:E,refValues:N,graphID:Y,maxValue:ne,minValue:K,onSeriesMouseClick:B,graphDownload:j,dataDownload:$,dateFormat:V,showOnlyActiveDate:z,autoPlay:W,language:G,minHeight:ae,theme:U,maxBarThickness:H,ariaLabel:R,resetSelectionOnDoubleClick:ee,styles:q,detailsOnClick:J,barAxisTitle:Z,noOfTicks:re,valueColor:te,classNames:X})}function vq(t){const{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:m,showValues:g,backgroundColor:y,suffix:b,prefix:S,height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,padding:T,tooltip:A,onSeriesMouseOver:M,relativeHeight:E,refValues:N,graphID:Y,maxValue:ne,onSeriesMouseClick:K,dateFormat:B,showOnlyActiveDate:j,autoPlay:$,autoSort:V,graphDownload:z,dataDownload:W,language:G,theme:ae,minHeight:U,sortParameter:H,maxBarThickness:R,minBarThickness:ee,ariaLabel:J,resetSelectionOnDoubleClick:Z,detailsOnClick:re,barAxisTitle:te,noOfTicks:F,valueColor:q,orientation:X="vertical",styles:ie,classNames:ce}=t;return X==="vertical"?v.jsx(Dve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:m,showValues:g,backgroundColor:y,suffix:b,prefix:S,height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,padding:T,tooltip:A,onSeriesMouseOver:M,relativeHeight:E,refValues:N,graphID:Y,maxValue:ne,onSeriesMouseClick:K,dateFormat:B,showOnlyActiveDate:j,autoPlay:$,autoSort:V,graphDownload:z,dataDownload:W,language:G,theme:ae,minHeight:U,sortParameter:H,maxBarThickness:R,minBarThickness:ee,ariaLabel:J,resetSelectionOnDoubleClick:Z,styles:ie,detailsOnClick:re,barAxisTitle:te,noOfTicks:F,valueColor:q,classNames:ce}):v.jsx(wve,{data:e,graphTitle:r,colors:n,sources:a,graphDescription:i,barPadding:o,showTicks:l,leftMargin:s,rightMargin:f,topMargin:c,bottomMargin:h,truncateBy:d,showLabels:m,showValues:g,backgroundColor:y,suffix:b,prefix:S,height:w,width:C,footNote:k,colorDomain:_,colorLegendTitle:D,padding:T,tooltip:A,onSeriesMouseOver:M,relativeHeight:E,refValues:N,graphID:Y,maxValue:ne,onSeriesMouseClick:K,dateFormat:B,showOnlyActiveDate:j,autoPlay:$,autoSort:V,graphDownload:z,dataDownload:W,language:G,theme:ae,minHeight:U,sortParameter:H,maxBarThickness:R,minBarThickness:ee,ariaLabel:J,resetSelectionOnDoubleClick:Z,styles:ie,detailsOnClick:re,barAxisTitle:te,noOfTicks:F,valueColor:q,classNames:ce})}function Lr(t,e,r){return e.findIndex(n=>n.chartConfigId===t)===-1?void 0:typeof e[e.findIndex(n=>n.chartConfigId===t)].columnId=="object"?e[e.findIndex(n=>n.chartConfigId===t)].columnId.map(n=>r.findIndex(a=>a.value===n)===-1?n:r[r.findIndex(a=>a.value===n)].label):r.findIndex(n=>n.value===e[e.findIndex(a=>a.chartConfigId===t)].columnId)===-1?e[e.findIndex(n=>n.chartConfigId===t)].columnId:r[r.findIndex(n=>n.value===e[e.findIndex(a=>a.chartConfigId===t)].columnId)].label}var w5={exports:{}},Tm={},I0={},S3={},Mm={},Em={},jm={},XM;function Rc(){return XM||(XM=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(w){if(super(),!t.IDENTIFIER.test(w))throw new Error("CodeGen: name must be a valid identifier");this.str=w}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(w){super(),this._items=typeof w=="string"?[w]:w}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const w=this._items[0];return w===""||w==='""'}get str(){var w;return(w=this._str)!==null&&w!==void 0?w:this._str=this._items.reduce((C,k)=>`${C}${k}`,"")}get names(){var w;return(w=this._names)!==null&&w!==void 0?w:this._names=this._items.reduce((C,k)=>(k instanceof r&&(C[k.str]=(C[k.str]||0)+1),C),{})}}t._Code=n,t.nil=new n("");function a(S,...w){const C=[S[0]];let k=0;for(;k<w.length;)l(C,w[k]),C.push(S[++k]);return new n(C)}t._=a;const i=new n("+");function o(S,...w){const C=[m(S[0])];let k=0;for(;k<w.length;)C.push(i),l(C,w[k]),C.push(i,m(S[++k]));return s(C),new n(C)}t.str=o;function l(S,w){w instanceof n?S.push(...w._items):w instanceof r?S.push(w):S.push(h(w))}t.addCodeArg=l;function s(S){let w=1;for(;w<S.length-1;){if(S[w]===i){const C=f(S[w-1],S[w+1]);if(C!==void 0){S.splice(w-1,3,C);continue}S[w++]="+"}w++}}function f(S,w){if(w==='""')return S;if(S==='""')return w;if(typeof S=="string")return w instanceof r||S[S.length-1]!=='"'?void 0:typeof w!="string"?`${S.slice(0,-1)}${w}"`:w[0]==='"'?S.slice(0,-1)+w.slice(1):void 0;if(typeof w=="string"&&w[0]==='"'&&!(S instanceof r))return`"${S}${w.slice(1)}`}function c(S,w){return w.emptyStr()?S:S.emptyStr()?w:o`${S}${w}`}t.strConcat=c;function h(S){return typeof S=="number"||typeof S=="boolean"||S===null?S:m(Array.isArray(S)?S.join(","):S)}function d(S){return new n(m(S))}t.stringify=d;function m(S){return JSON.stringify(S).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=m;function g(S){return typeof S=="string"&&t.IDENTIFIER.test(S)?new n(`.${S}`):a`[${S}]`}t.getProperty=g;function y(S){if(typeof S=="string"&&t.IDENTIFIER.test(S))return new n(`${S}`);throw new Error(`CodeGen: invalid export name: ${S}, use explicit $id name mapping`)}t.getEsmExportName=y;function b(S){return new n(S.toString())}t.regexpCode=b}(jm)),jm}var Lm={},KM;function JM(){return KM||(KM=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=Rc();class r extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var n;(function(s){s[s.Started=0]="Started",s[s.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class a{constructor({prefixes:f,parent:c}={}){this._names={},this._prefixes=f,this._parent=c}toName(f){return f instanceof e.Name?f:this.name(f)}name(f){return new e.Name(this._newName(f))}_newName(f){const c=this._names[f]||this._nameGroup(f);return`${f}${c.index++}`}_nameGroup(f){var c,h;if(!((h=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||h===void 0)&&h.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}t.Scope=a;class i extends e.Name{constructor(f,c){super(c),this.prefix=f}setValue(f,{property:c,itemIndex:h}){this.value=f,this.scopePath=(0,e._)`.${new e.Name(c)}[${h}]`}}t.ValueScopeName=i;const o=(0,e._)`\n`;class l extends a{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?o:e.nil}}get(){return this._scope}name(f){return new i(f,this._newName(f))}value(f,c){var h;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const d=this.toName(f),{prefix:m}=d,g=(h=c.key)!==null&&h!==void 0?h:c.ref;let y=this._values[m];if(y){const w=y.get(g);if(w)return w}else y=this._values[m]=new Map;y.set(g,d);const b=this._scope[m]||(this._scope[m]=[]),S=b.length;return b[S]=c.ref,d.setValue(c,{property:m,itemIndex:S}),d}getValue(f,c){const h=this._values[f];if(h)return h.get(c)}scopeRefs(f,c=this._values){return this._reduceValues(c,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,e._)`${f}${h.scopePath}`})}scopeCode(f=this._values,c,h){return this._reduceValues(f,d=>{if(d.value===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return d.value.code},c,h)}_reduceValues(f,c,h={},d){let m=e.nil;for(const g in f){const y=f[g];if(!y)continue;const b=h[g]=h[g]||new Map;y.forEach(S=>{if(b.has(S))return;b.set(S,n.Started);let w=c(S);if(w){const C=this.opts.es5?t.varKinds.var:t.varKinds.const;m=(0,e._)`${m}${C} ${S} = ${w};${this.opts._n}`}else if(w=d==null?void 0:d(S))m=(0,e._)`${m}${w}${this.opts._n}`;else throw new r(S);b.set(S,n.Completed)})}return m}}t.ValueScope=l}(Lm)),Lm}var ZM;function Fr(){return ZM||(ZM=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=Rc(),r=JM();var n=Rc();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var a=JM();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class i{optimizeNodes(){return this}optimizeNames(H,R){return this}}class o extends i{constructor(H,R,ee){super(),this.varKind=H,this.name=R,this.rhs=ee}render({es5:H,_n:R}){const ee=H?r.varKinds.var:this.varKind,J=this.rhs===void 0?"":` = ${this.rhs}`;return`${ee} ${this.name}${J};`+R}optimizeNames(H,R){if(H[this.name.str])return this.rhs&&(this.rhs=K(this.rhs,H,R)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class l extends i{constructor(H,R,ee){super(),this.lhs=H,this.rhs=R,this.sideEffects=ee}render({_n:H}){return`${this.lhs} = ${this.rhs};`+H}optimizeNames(H,R){if(!(this.lhs instanceof e.Name&&!H[this.lhs.str]&&!this.sideEffects))return this.rhs=K(this.rhs,H,R),this}get names(){const H=this.lhs instanceof e.Name?{}:{...this.lhs.names};return ne(H,this.rhs)}}class s extends l{constructor(H,R,ee,J){super(H,ee,J),this.op=R}render({_n:H}){return`${this.lhs} ${this.op}= ${this.rhs};`+H}}class f extends i{constructor(H){super(),this.label=H,this.names={}}render({_n:H}){return`${this.label}:`+H}}class c extends i{constructor(H){super(),this.label=H,this.names={}}render({_n:H}){return`break${this.label?` ${this.label}`:""};`+H}}class h extends i{constructor(H){super(),this.error=H}render({_n:H}){return`throw ${this.error};`+H}get names(){return this.error.names}}class d extends i{constructor(H){super(),this.code=H}render({_n:H}){return`${this.code};`+H}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(H,R){return this.code=K(this.code,H,R),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class m extends i{constructor(H=[]){super(),this.nodes=H}render(H){return this.nodes.reduce((R,ee)=>R+ee.render(H),"")}optimizeNodes(){const{nodes:H}=this;let R=H.length;for(;R--;){const ee=H[R].optimizeNodes();Array.isArray(ee)?H.splice(R,1,...ee):ee?H[R]=ee:H.splice(R,1)}return H.length>0?this:void 0}optimizeNames(H,R){const{nodes:ee}=this;let J=ee.length;for(;J--;){const Z=ee[J];Z.optimizeNames(H,R)||(B(H,Z.names),ee.splice(J,1))}return ee.length>0?this:void 0}get names(){return this.nodes.reduce((H,R)=>Y(H,R.names),{})}}class g extends m{render(H){return"{"+H._n+super.render(H)+"}"+H._n}}class y extends m{}class b extends g{}b.kind="else";class S extends g{constructor(H,R){super(R),this.condition=H}render(H){let R=`if(${this.condition})`+super.render(H);return this.else&&(R+="else "+this.else.render(H)),R}optimizeNodes(){super.optimizeNodes();const H=this.condition;if(H===!0)return this.nodes;let R=this.else;if(R){const ee=R.optimizeNodes();R=this.else=Array.isArray(ee)?new b(ee):ee}if(R)return H===!1?R instanceof S?R:R.nodes:this.nodes.length?this:new S(j(H),R instanceof S?[R]:R.nodes);if(!(H===!1||!this.nodes.length))return this}optimizeNames(H,R){var ee;if(this.else=(ee=this.else)===null||ee===void 0?void 0:ee.optimizeNames(H,R),!!(super.optimizeNames(H,R)||this.else))return this.condition=K(this.condition,H,R),this}get names(){const H=super.names;return ne(H,this.condition),this.else&&Y(H,this.else.names),H}}S.kind="if";class w extends g{}w.kind="for";class C extends w{constructor(H){super(),this.iteration=H}render(H){return`for(${this.iteration})`+super.render(H)}optimizeNames(H,R){if(super.optimizeNames(H,R))return this.iteration=K(this.iteration,H,R),this}get names(){return Y(super.names,this.iteration.names)}}class k extends w{constructor(H,R,ee,J){super(),this.varKind=H,this.name=R,this.from=ee,this.to=J}render(H){const R=H.es5?r.varKinds.var:this.varKind,{name:ee,from:J,to:Z}=this;return`for(${R} ${ee}=${J}; ${ee}<${Z}; ${ee}++)`+super.render(H)}get names(){const H=ne(super.names,this.from);return ne(H,this.to)}}class _ extends w{constructor(H,R,ee,J){super(),this.loop=H,this.varKind=R,this.name=ee,this.iterable=J}render(H){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(H)}optimizeNames(H,R){if(super.optimizeNames(H,R))return this.iterable=K(this.iterable,H,R),this}get names(){return Y(super.names,this.iterable.names)}}class D extends g{constructor(H,R,ee){super(),this.name=H,this.args=R,this.async=ee}render(H){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(H)}}D.kind="func";class T extends m{render(H){return"return "+super.render(H)}}T.kind="return";class A extends g{render(H){let R="try"+super.render(H);return this.catch&&(R+=this.catch.render(H)),this.finally&&(R+=this.finally.render(H)),R}optimizeNodes(){var H,R;return super.optimizeNodes(),(H=this.catch)===null||H===void 0||H.optimizeNodes(),(R=this.finally)===null||R===void 0||R.optimizeNodes(),this}optimizeNames(H,R){var ee,J;return super.optimizeNames(H,R),(ee=this.catch)===null||ee===void 0||ee.optimizeNames(H,R),(J=this.finally)===null||J===void 0||J.optimizeNames(H,R),this}get names(){const H=super.names;return this.catch&&Y(H,this.catch.names),this.finally&&Y(H,this.finally.names),H}}class M extends g{constructor(H){super(),this.error=H}render(H){return`catch(${this.error})`+super.render(H)}}M.kind="catch";class E extends g{render(H){return"finally"+super.render(H)}}E.kind="finally";class N{constructor(H,R={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...R,_n:R.lines?`
279
279
  `:""},this._extScope=H,this._scope=new r.Scope({parent:H}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(H){return this._scope.name(H)}scopeName(H){return this._extScope.name(H)}scopeValue(H,R){const ee=this._extScope.value(H,R);return(this._values[ee.prefix]||(this._values[ee.prefix]=new Set)).add(ee),ee}getScopeValue(H,R){return this._extScope.getValue(H,R)}scopeRefs(H){return this._extScope.scopeRefs(H,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(H,R,ee,J){const Z=this._scope.toName(R);return ee!==void 0&&J&&(this._constants[Z.str]=ee),this._leafNode(new o(H,Z,ee)),Z}const(H,R,ee){return this._def(r.varKinds.const,H,R,ee)}let(H,R,ee){return this._def(r.varKinds.let,H,R,ee)}var(H,R,ee){return this._def(r.varKinds.var,H,R,ee)}assign(H,R,ee){return this._leafNode(new l(H,R,ee))}add(H,R){return this._leafNode(new s(H,t.operators.ADD,R))}code(H){return typeof H=="function"?H():H!==e.nil&&this._leafNode(new d(H)),this}object(...H){const R=["{"];for(const[ee,J]of H)R.length>1&&R.push(","),R.push(ee),(ee!==J||this.opts.es5)&&(R.push(":"),(0,e.addCodeArg)(R,J));return R.push("}"),new e._Code(R)}if(H,R,ee){if(this._blockNode(new S(H)),R&&ee)this.code(R).else().code(ee).endIf();else if(R)this.code(R).endIf();else if(ee)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(H){return this._elseNode(new S(H))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(S,b)}_for(H,R){return this._blockNode(H),R&&this.code(R).endFor(),this}for(H,R){return this._for(new C(H),R)}forRange(H,R,ee,J,Z=this.opts.es5?r.varKinds.var:r.varKinds.let){const re=this._scope.toName(H);return this._for(new k(Z,re,R,ee),()=>J(re))}forOf(H,R,ee,J=r.varKinds.const){const Z=this._scope.toName(H);if(this.opts.es5){const re=R instanceof e.Name?R:this.var("_arr",R);return this.forRange("_i",0,(0,e._)`${re}.length`,te=>{this.var(Z,(0,e._)`${re}[${te}]`),ee(Z)})}return this._for(new _("of",J,Z,R),()=>ee(Z))}forIn(H,R,ee,J=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(H,(0,e._)`Object.keys(${R})`,ee);const Z=this._scope.toName(H);return this._for(new _("in",J,Z,R),()=>ee(Z))}endFor(){return this._endBlockNode(w)}label(H){return this._leafNode(new f(H))}break(H){return this._leafNode(new c(H))}return(H){const R=new T;if(this._blockNode(R),this.code(H),R.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(T)}try(H,R,ee){if(!R&&!ee)throw new Error('CodeGen: "try" without "catch" and "finally"');const J=new A;if(this._blockNode(J),this.code(H),R){const Z=this.name("e");this._currNode=J.catch=new M(Z),R(Z)}return ee&&(this._currNode=J.finally=new E,this.code(ee)),this._endBlockNode(M,E)}throw(H){return this._leafNode(new h(H))}block(H,R){return this._blockStarts.push(this._nodes.length),H&&this.code(H).endBlock(R),this}endBlock(H){const R=this._blockStarts.pop();if(R===void 0)throw new Error("CodeGen: not in self-balancing block");const ee=this._nodes.length-R;if(ee<0||H!==void 0&&ee!==H)throw new Error(`CodeGen: wrong number of nodes: ${ee} vs ${H} expected`);return this._nodes.length=R,this}func(H,R=e.nil,ee,J){return this._blockNode(new D(H,R,ee)),J&&this.code(J).endFunc(),this}endFunc(){return this._endBlockNode(D)}optimize(H=1){for(;H-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(H){return this._currNode.nodes.push(H),this}_blockNode(H){this._currNode.nodes.push(H),this._nodes.push(H)}_endBlockNode(H,R){const ee=this._currNode;if(ee instanceof H||R&&ee instanceof R)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${R?`${H.kind}/${R.kind}`:H.kind}"`)}_elseNode(H){const R=this._currNode;if(!(R instanceof S))throw new Error('CodeGen: "else" without "if"');return this._currNode=R.else=H,this}get _root(){return this._nodes[0]}get _currNode(){const H=this._nodes;return H[H.length-1]}set _currNode(H){const R=this._nodes;R[R.length-1]=H}}t.CodeGen=N;function Y(U,H){for(const R in H)U[R]=(U[R]||0)+(H[R]||0);return U}function ne(U,H){return H instanceof e._CodeOrName?Y(U,H.names):U}function K(U,H,R){if(U instanceof e.Name)return ee(U);if(!J(U))return U;return new e._Code(U._items.reduce((Z,re)=>(re instanceof e.Name&&(re=ee(re)),re instanceof e._Code?Z.push(...re._items):Z.push(re),Z),[]));function ee(Z){const re=R[Z.str];return re===void 0||H[Z.str]!==1?Z:(delete H[Z.str],re)}function J(Z){return Z instanceof e._Code&&Z._items.some(re=>re instanceof e.Name&&H[re.str]===1&&R[re.str]!==void 0)}}function B(U,H){for(const R in H)U[R]=(U[R]||0)-(H[R]||0)}function j(U){return typeof U=="boolean"||typeof U=="number"||U===null?!U:(0,e._)`!${ae(U)}`}t.not=j;const $=G(t.operators.AND);function V(...U){return U.reduce($)}t.and=V;const z=G(t.operators.OR);function W(...U){return U.reduce(z)}t.or=W;function G(U){return(H,R)=>H===e.nil?R:R===e.nil?H:(0,e._)`${ae(H)} ${U} ${ae(R)}`}function ae(U){return U instanceof e.Name?U:(0,e._)`(${U})`}}(Em)),Em}var Dr={},QM;function an(){if(QM)return Dr;QM=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.checkStrictMode=Dr.getErrorPath=Dr.Type=Dr.useFunc=Dr.setEvaluated=Dr.evaluatedPropsToName=Dr.mergeEvaluated=Dr.eachItem=Dr.unescapeJsonPointer=Dr.escapeJsonPointer=Dr.escapeFragment=Dr.unescapeFragment=Dr.schemaRefOrVal=Dr.schemaHasRulesButRef=Dr.schemaHasRules=Dr.checkUnknownRules=Dr.alwaysValidSchema=Dr.toHash=void 0;const t=Fr(),e=Rc();function r(_){const D={};for(const T of _)D[T]=!0;return D}Dr.toHash=r;function n(_,D){return typeof D=="boolean"?D:Object.keys(D).length===0?!0:(a(_,D),!i(D,_.self.RULES.all))}Dr.alwaysValidSchema=n;function a(_,D=_.schema){const{opts:T,self:A}=_;if(!T.strictSchema||typeof D=="boolean")return;const M=A.RULES.keywords;for(const E in D)M[E]||k(_,`unknown keyword: "${E}"`)}Dr.checkUnknownRules=a;function i(_,D){if(typeof _=="boolean")return!_;for(const T in _)if(D[T])return!0;return!1}Dr.schemaHasRules=i;function o(_,D){if(typeof _=="boolean")return!_;for(const T in _)if(T!=="$ref"&&D.all[T])return!0;return!1}Dr.schemaHasRulesButRef=o;function l({topSchemaRef:_,schemaPath:D},T,A,M){if(!M){if(typeof T=="number"||typeof T=="boolean")return T;if(typeof T=="string")return(0,t._)`${T}`}return(0,t._)`${_}${D}${(0,t.getProperty)(A)}`}Dr.schemaRefOrVal=l;function s(_){return h(decodeURIComponent(_))}Dr.unescapeFragment=s;function f(_){return encodeURIComponent(c(_))}Dr.escapeFragment=f;function c(_){return typeof _=="number"?`${_}`:_.replace(/~/g,"~0").replace(/\//g,"~1")}Dr.escapeJsonPointer=c;function h(_){return _.replace(/~1/g,"/").replace(/~0/g,"~")}Dr.unescapeJsonPointer=h;function d(_,D){if(Array.isArray(_))for(const T of _)D(T);else D(_)}Dr.eachItem=d;function m({mergeNames:_,mergeToName:D,mergeValues:T,resultToName:A}){return(M,E,N,Y)=>{const ne=N===void 0?E:N instanceof t.Name?(E instanceof t.Name?_(M,E,N):D(M,E,N),N):E instanceof t.Name?(D(M,N,E),E):T(E,N);return Y===t.Name&&!(ne instanceof t.Name)?A(M,ne):ne}}Dr.mergeEvaluated={props:m({mergeNames:(_,D,T)=>_.if((0,t._)`${T} !== true && ${D} !== undefined`,()=>{_.if((0,t._)`${D} === true`,()=>_.assign(T,!0),()=>_.assign(T,(0,t._)`${T} || {}`).code((0,t._)`Object.assign(${T}, ${D})`))}),mergeToName:(_,D,T)=>_.if((0,t._)`${T} !== true`,()=>{D===!0?_.assign(T,!0):(_.assign(T,(0,t._)`${T} || {}`),y(_,T,D))}),mergeValues:(_,D)=>_===!0?!0:{..._,...D},resultToName:g}),items:m({mergeNames:(_,D,T)=>_.if((0,t._)`${T} !== true && ${D} !== undefined`,()=>_.assign(T,(0,t._)`${D} === true ? true : ${T} > ${D} ? ${T} : ${D}`)),mergeToName:(_,D,T)=>_.if((0,t._)`${T} !== true`,()=>_.assign(T,D===!0?!0:(0,t._)`${T} > ${D} ? ${T} : ${D}`)),mergeValues:(_,D)=>_===!0?!0:Math.max(_,D),resultToName:(_,D)=>_.var("items",D)})};function g(_,D){if(D===!0)return _.var("props",!0);const T=_.var("props",(0,t._)`{}`);return D!==void 0&&y(_,T,D),T}Dr.evaluatedPropsToName=g;function y(_,D,T){Object.keys(T).forEach(A=>_.assign((0,t._)`${D}${(0,t.getProperty)(A)}`,!0))}Dr.setEvaluated=y;const b={};function S(_,D){return _.scopeValue("func",{ref:D,code:b[D.code]||(b[D.code]=new e._Code(D.code))})}Dr.useFunc=S;var w;(function(_){_[_.Num=0]="Num",_[_.Str=1]="Str"})(w||(Dr.Type=w={}));function C(_,D,T){if(_ instanceof t.Name){const A=D===w.Num;return T?A?(0,t._)`"[" + ${_} + "]"`:(0,t._)`"['" + ${_} + "']"`:A?(0,t._)`"/" + ${_}`:(0,t._)`"/" + ${_}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return T?(0,t.getProperty)(_).toString():"/"+c(_)}Dr.getErrorPath=C;function k(_,D,T=_.opts.strictSchema){if(T){if(D=`strict mode: ${D}`,T===!0)throw new Error(D);_.self.logger.warn(D)}}return Dr.checkStrictMode=k,Dr}var S5={},eE;function Q2(){if(eE)return S5;eE=1,Object.defineProperty(S5,"__esModule",{value:!0});const t=Fr(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return S5.default=e,S5}var tE;function Ff(){return tE||(tE=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=Fr(),r=an(),n=Q2();t.keywordError={message:({keyword:b})=>(0,e.str)`must pass "${b}" keyword validation`},t.keyword$DataError={message:({keyword:b,schemaType:S})=>S?(0,e.str)`"${b}" keyword must be ${S} ($data)`:(0,e.str)`"${b}" keyword is invalid ($data)`};function a(b,S=t.keywordError,w,C){const{it:k}=b,{gen:_,compositeRule:D,allErrors:T}=k,A=h(b,S,w);C??(D||T)?s(_,A):f(k,(0,e._)`[${A}]`)}t.reportError=a;function i(b,S=t.keywordError,w){const{it:C}=b,{gen:k,compositeRule:_,allErrors:D}=C,T=h(b,S,w);s(k,T),_||D||f(C,n.default.vErrors)}t.reportExtraError=i;function o(b,S){b.assign(n.default.errors,S),b.if((0,e._)`${n.default.vErrors} !== null`,()=>b.if(S,()=>b.assign((0,e._)`${n.default.vErrors}.length`,S),()=>b.assign(n.default.vErrors,null)))}t.resetErrorsCount=o;function l({gen:b,keyword:S,schemaValue:w,data:C,errsCount:k,it:_}){if(k===void 0)throw new Error("ajv implementation error");const D=b.name("err");b.forRange("i",k,n.default.errors,T=>{b.const(D,(0,e._)`${n.default.vErrors}[${T}]`),b.if((0,e._)`${D}.instancePath === undefined`,()=>b.assign((0,e._)`${D}.instancePath`,(0,e.strConcat)(n.default.instancePath,_.errorPath))),b.assign((0,e._)`${D}.schemaPath`,(0,e.str)`${_.errSchemaPath}/${S}`),_.opts.verbose&&(b.assign((0,e._)`${D}.schema`,w),b.assign((0,e._)`${D}.data`,C))})}t.extendErrors=l;function s(b,S){const w=b.const("err",S);b.if((0,e._)`${n.default.vErrors} === null`,()=>b.assign(n.default.vErrors,(0,e._)`[${w}]`),(0,e._)`${n.default.vErrors}.push(${w})`),b.code((0,e._)`${n.default.errors}++`)}function f(b,S){const{gen:w,validateName:C,schemaEnv:k}=b;k.$async?w.throw((0,e._)`new ${b.ValidationError}(${S})`):(w.assign((0,e._)`${C}.errors`,S),w.return(!1))}const c={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function h(b,S,w){const{createErrors:C}=b.it;return C===!1?(0,e._)`{}`:d(b,S,w)}function d(b,S,w={}){const{gen:C,it:k}=b,_=[m(k,w),g(b,w)];return y(b,S,_),C.object(..._)}function m({errorPath:b},{instancePath:S}){const w=S?(0,e.str)`${b}${(0,r.getErrorPath)(S,r.Type.Str)}`:b;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,w)]}function g({keyword:b,it:{errSchemaPath:S}},{schemaPath:w,parentSchema:C}){let k=C?S:(0,e.str)`${S}/${b}`;return w&&(k=(0,e.str)`${k}${(0,r.getErrorPath)(w,r.Type.Str)}`),[c.schemaPath,k]}function y(b,{params:S,message:w},C){const{keyword:k,data:_,schemaValue:D,it:T}=b,{opts:A,propertyName:M,topSchemaRef:E,schemaPath:N}=T;C.push([c.keyword,k],[c.params,typeof S=="function"?S(b):S||(0,e._)`{}`]),A.messages&&C.push([c.message,typeof w=="function"?w(b):w]),A.verbose&&C.push([c.schema,D],[c.parentSchema,(0,e._)`${E}${N}`],[n.default.data,_]),M&&C.push([c.propertyName,M])}}(Mm)),Mm}var rE;function Ave(){if(rE)return S3;rE=1,Object.defineProperty(S3,"__esModule",{value:!0}),S3.boolOrEmptySchema=S3.topBoolOrEmptySchema=void 0;const t=Ff(),e=Fr(),r=Q2(),n={message:"boolean schema is false"};function a(l){const{gen:s,schema:f,validateName:c}=l;f===!1?o(l,!1):typeof f=="object"&&f.$async===!0?s.return(r.default.data):(s.assign((0,e._)`${c}.errors`,null),s.return(!0))}S3.topBoolOrEmptySchema=a;function i(l,s){const{gen:f,schema:c}=l;c===!1?(f.var(s,!1),o(l)):f.var(s,!0)}S3.boolOrEmptySchema=i;function o(l,s){const{gen:f,data:c}=l,h={gen:f,keyword:"false schema",data:c,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:l};(0,t.reportError)(h,n,void 0,s)}return S3}var S1={},C3={},nE;function bq(){if(nE)return C3;nE=1,Object.defineProperty(C3,"__esModule",{value:!0}),C3.getRules=C3.isJSONType=void 0;const t=["string","number","integer","boolean","null","object","array"],e=new Set(t);function r(a){return typeof a=="string"&&e.has(a)}C3.isJSONType=r;function n(){const a={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...a,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},a.number,a.string,a.array,a.object],post:{rules:[]},all:{},keywords:{}}}return C3.getRules=n,C3}var P0={},aE;function xq(){if(aE)return P0;aE=1,Object.defineProperty(P0,"__esModule",{value:!0}),P0.shouldUseRule=P0.shouldUseGroup=P0.schemaHasRulesForType=void 0;function t({schema:n,self:a},i){const o=a.RULES.types[i];return o&&o!==!0&&e(n,o)}P0.schemaHasRulesForType=t;function e(n,a){return a.rules.some(i=>r(n,i))}P0.shouldUseGroup=e;function r(n,a){var i;return n[a.keyword]!==void 0||((i=a.definition.implements)===null||i===void 0?void 0:i.some(o=>n[o]!==void 0))}return P0.shouldUseRule=r,P0}var iE;function $c(){if(iE)return S1;iE=1,Object.defineProperty(S1,"__esModule",{value:!0}),S1.reportTypeError=S1.checkDataTypes=S1.checkDataType=S1.coerceAndCheckDataType=S1.getJSONTypes=S1.getSchemaTypes=S1.DataType=void 0;const t=bq(),e=xq(),r=Ff(),n=Fr(),a=an();var i;(function(w){w[w.Correct=0]="Correct",w[w.Wrong=1]="Wrong"})(i||(S1.DataType=i={}));function o(w){const C=l(w.type);if(C.includes("null")){if(w.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!C.length&&w.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');w.nullable===!0&&C.push("null")}return C}S1.getSchemaTypes=o;function l(w){const C=Array.isArray(w)?w:w?[w]:[];if(C.every(t.isJSONType))return C;throw new Error("type must be JSONType or JSONType[]: "+C.join(","))}S1.getJSONTypes=l;function s(w,C){const{gen:k,data:_,opts:D}=w,T=c(C,D.coerceTypes),A=C.length>0&&!(T.length===0&&C.length===1&&(0,e.schemaHasRulesForType)(w,C[0]));if(A){const M=g(C,_,D.strictNumbers,i.Wrong);k.if(M,()=>{T.length?h(w,C,T):b(w)})}return A}S1.coerceAndCheckDataType=s;const f=new Set(["string","number","integer","boolean","null"]);function c(w,C){return C?w.filter(k=>f.has(k)||C==="array"&&k==="array"):[]}function h(w,C,k){const{gen:_,data:D,opts:T}=w,A=_.let("dataType",(0,n._)`typeof ${D}`),M=_.let("coerced",(0,n._)`undefined`);T.coerceTypes==="array"&&_.if((0,n._)`${A} == 'object' && Array.isArray(${D}) && ${D}.length == 1`,()=>_.assign(D,(0,n._)`${D}[0]`).assign(A,(0,n._)`typeof ${D}`).if(g(C,D,T.strictNumbers),()=>_.assign(M,D))),_.if((0,n._)`${M} !== undefined`);for(const N of k)(f.has(N)||N==="array"&&T.coerceTypes==="array")&&E(N);_.else(),b(w),_.endIf(),_.if((0,n._)`${M} !== undefined`,()=>{_.assign(D,M),d(w,M)});function E(N){switch(N){case"string":_.elseIf((0,n._)`${A} == "number" || ${A} == "boolean"`).assign(M,(0,n._)`"" + ${D}`).elseIf((0,n._)`${D} === null`).assign(M,(0,n._)`""`);return;case"number":_.elseIf((0,n._)`${A} == "boolean" || ${D} === null
280
280
  || (${A} == "string" && ${D} && ${D} == +${D})`).assign(M,(0,n._)`+${D}`);return;case"integer":_.elseIf((0,n._)`${A} === "boolean" || ${D} === null
281
281
  || (${A} === "string" && ${D} && ${D} == +${D} && !(${D} % 1))`).assign(M,(0,n._)`+${D}`);return;case"boolean":_.elseIf((0,n._)`${D} === "false" || ${D} === 0 || ${D} === null`).assign(M,!1).elseIf((0,n._)`${D} === "true" || ${D} === 1`).assign(M,!0);return;case"null":_.elseIf((0,n._)`${D} === "" || ${D} === 0 || ${D} === false`),_.assign(M,null);return;case"array":_.elseIf((0,n._)`${A} === "string" || ${A} === "number"
282
282
  || ${A} === "boolean" || ${D} === null`).assign(M,(0,n._)`[${D}]`)}}}function d({gen:w,parentData:C,parentDataProperty:k},_){w.if((0,n._)`${C} !== undefined`,()=>w.assign((0,n._)`${C}[${k}]`,_))}function m(w,C,k,_=i.Correct){const D=_===i.Correct?n.operators.EQ:n.operators.NEQ;let T;switch(w){case"null":return(0,n._)`${C} ${D} null`;case"array":T=(0,n._)`Array.isArray(${C})`;break;case"object":T=(0,n._)`${C} && typeof ${C} == "object" && !Array.isArray(${C})`;break;case"integer":T=A((0,n._)`!(${C} % 1) && !isNaN(${C})`);break;case"number":T=A();break;default:return(0,n._)`typeof ${C} ${D} ${w}`}return _===i.Correct?T:(0,n.not)(T);function A(M=n.nil){return(0,n.and)((0,n._)`typeof ${C} == "number"`,M,k?(0,n._)`isFinite(${C})`:n.nil)}}S1.checkDataType=m;function g(w,C,k,_){if(w.length===1)return m(w[0],C,k,_);let D;const T=(0,a.toHash)(w);if(T.array&&T.object){const A=(0,n._)`typeof ${C} != "object"`;D=T.null?A:(0,n._)`!${C} || ${A}`,delete T.null,delete T.array,delete T.object}else D=n.nil;T.number&&delete T.integer;for(const A in T)D=(0,n.and)(D,m(A,C,k,_));return D}S1.checkDataTypes=g;const y={message:({schema:w})=>`must be ${w}`,params:({schema:w,schemaValue:C})=>typeof w=="string"?(0,n._)`{type: ${w}}`:(0,n._)`{type: ${C}}`};function b(w){const C=S(w);(0,r.reportError)(C,y)}S1.reportTypeError=b;function S(w){const{gen:C,data:k,schema:_}=w,D=(0,a.schemaRefOrVal)(w,_,"type");return{gen:C,keyword:"type",data:k,schema:_.type,schemaCode:D,schemaValue:D,parentSchema:_,params:{},it:w}}return S1}var Tl={},oE;function Tve(){if(oE)return Tl;oE=1,Object.defineProperty(Tl,"__esModule",{value:!0}),Tl.assignDefaults=void 0;const t=Fr(),e=an();function r(a,i){const{properties:o,items:l}=a.schema;if(i==="object"&&o)for(const s in o)n(a,s,o[s].default);else i==="array"&&Array.isArray(l)&&l.forEach((s,f)=>n(a,f,s.default))}Tl.assignDefaults=r;function n(a,i,o){const{gen:l,compositeRule:s,data:f,opts:c}=a;if(o===void 0)return;const h=(0,t._)`${f}${(0,t.getProperty)(i)}`;if(s){(0,e.checkStrictMode)(a,`default is ignored for: ${h}`);return}let d=(0,t._)`${h} === undefined`;c.useDefaults==="empty"&&(d=(0,t._)`${d} || ${h} === null || ${h} === ""`),l.if(d,(0,t._)`${h} = ${(0,t.stringify)(o)}`)}return Tl}var ko={},wn={},lE;function qo(){if(lE)return wn;lE=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.validateUnion=wn.validateArray=wn.usePattern=wn.callValidateCode=wn.schemaProperties=wn.allSchemaProperties=wn.noPropertyInData=wn.propertyInData=wn.isOwnProperty=wn.hasPropFunc=wn.reportMissingProp=wn.checkMissingProp=wn.checkReportMissingProp=void 0;const t=Fr(),e=an(),r=Q2(),n=an();function a(w,C){const{gen:k,data:_,it:D}=w;k.if(c(k,_,C,D.opts.ownProperties),()=>{w.setParams({missingProperty:(0,t._)`${C}`},!0),w.error()})}wn.checkReportMissingProp=a;function i({gen:w,data:C,it:{opts:k}},_,D){return(0,t.or)(..._.map(T=>(0,t.and)(c(w,C,T,k.ownProperties),(0,t._)`${D} = ${T}`)))}wn.checkMissingProp=i;function o(w,C){w.setParams({missingProperty:C},!0),w.error()}wn.reportMissingProp=o;function l(w){return w.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}wn.hasPropFunc=l;function s(w,C,k){return(0,t._)`${l(w)}.call(${C}, ${k})`}wn.isOwnProperty=s;function f(w,C,k,_){const D=(0,t._)`${C}${(0,t.getProperty)(k)} !== undefined`;return _?(0,t._)`${D} && ${s(w,C,k)}`:D}wn.propertyInData=f;function c(w,C,k,_){const D=(0,t._)`${C}${(0,t.getProperty)(k)} === undefined`;return _?(0,t.or)(D,(0,t.not)(s(w,C,k))):D}wn.noPropertyInData=c;function h(w){return w?Object.keys(w).filter(C=>C!=="__proto__"):[]}wn.allSchemaProperties=h;function d(w,C){return h(C).filter(k=>!(0,e.alwaysValidSchema)(w,C[k]))}wn.schemaProperties=d;function m({schemaCode:w,data:C,it:{gen:k,topSchemaRef:_,schemaPath:D,errorPath:T},it:A},M,E,N){const Y=N?(0,t._)`${w}, ${C}, ${_}${D}`:C,ne=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,T)],[r.default.parentData,A.parentData],[r.default.parentDataProperty,A.parentDataProperty],[r.default.rootData,r.default.rootData]];A.opts.dynamicRef&&ne.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const K=(0,t._)`${Y}, ${k.object(...ne)}`;return E!==t.nil?(0,t._)`${M}.call(${E}, ${K})`:(0,t._)`${M}(${K})`}wn.callValidateCode=m;const g=(0,t._)`new RegExp`;function y({gen:w,it:{opts:C}},k){const _=C.unicodeRegExp?"u":"",{regExp:D}=C.code,T=D(k,_);return w.scopeValue("pattern",{key:T.toString(),ref:T,code:(0,t._)`${D.code==="new RegExp"?g:(0,n.useFunc)(w,D)}(${k}, ${_})`})}wn.usePattern=y;function b(w){const{gen:C,data:k,keyword:_,it:D}=w,T=C.name("valid");if(D.allErrors){const M=C.let("valid",!0);return A(()=>C.assign(M,!1)),M}return C.var(T,!0),A(()=>C.break()),T;function A(M){const E=C.const("len",(0,t._)`${k}.length`);C.forRange("i",0,E,N=>{w.subschema({keyword:_,dataProp:N,dataPropType:e.Type.Num},T),C.if((0,t.not)(T),M)})}}wn.validateArray=b;function S(w){const{gen:C,schema:k,keyword:_,it:D}=w;if(!Array.isArray(k))throw new Error("ajv implementation error");if(k.some(E=>(0,e.alwaysValidSchema)(D,E))&&!D.opts.unevaluated)return;const A=C.let("valid",!1),M=C.name("_valid");C.block(()=>k.forEach((E,N)=>{const Y=w.subschema({keyword:_,schemaProp:N,compositeRule:!0},M);C.assign(A,(0,t._)`${A} || ${M}`),w.mergeValidEvaluated(Y,M)||C.if((0,t.not)(A))})),w.result(A,()=>w.reset(),()=>w.error(!0))}return wn.validateUnion=S,wn}var sE;function Mve(){if(sE)return ko;sE=1,Object.defineProperty(ko,"__esModule",{value:!0}),ko.validateKeywordUsage=ko.validSchemaType=ko.funcKeywordCode=ko.macroKeywordCode=void 0;const t=Fr(),e=Q2(),r=qo(),n=Ff();function a(d,m){const{gen:g,keyword:y,schema:b,parentSchema:S,it:w}=d,C=m.macro.call(w.self,b,S,w),k=f(g,y,C);w.opts.validateSchema!==!1&&w.self.validateSchema(C,!0);const _=g.name("valid");d.subschema({schema:C,schemaPath:t.nil,errSchemaPath:`${w.errSchemaPath}/${y}`,topSchemaRef:k,compositeRule:!0},_),d.pass(_,()=>d.error(!0))}ko.macroKeywordCode=a;function i(d,m){var g;const{gen:y,keyword:b,schema:S,parentSchema:w,$data:C,it:k}=d;s(k,m);const _=!C&&m.compile?m.compile.call(k.self,S,w,k):m.validate,D=f(y,b,_),T=y.let("valid");d.block$data(T,A),d.ok((g=m.valid)!==null&&g!==void 0?g:T);function A(){if(m.errors===!1)N(),m.modifying&&o(d),Y(()=>d.error());else{const ne=m.async?M():E();m.modifying&&o(d),Y(()=>l(d,ne))}}function M(){const ne=y.let("ruleErrs",null);return y.try(()=>N((0,t._)`await `),K=>y.assign(T,!1).if((0,t._)`${K} instanceof ${k.ValidationError}`,()=>y.assign(ne,(0,t._)`${K}.errors`),()=>y.throw(K))),ne}function E(){const ne=(0,t._)`${D}.errors`;return y.assign(ne,null),N(t.nil),ne}function N(ne=m.async?(0,t._)`await `:t.nil){const K=k.opts.passContext?e.default.this:e.default.self,B=!("compile"in m&&!C||m.schema===!1);y.assign(T,(0,t._)`${ne}${(0,r.callValidateCode)(d,D,K,B)}`,m.modifying)}function Y(ne){var K;y.if((0,t.not)((K=m.valid)!==null&&K!==void 0?K:T),ne)}}ko.funcKeywordCode=i;function o(d){const{gen:m,data:g,it:y}=d;m.if(y.parentData,()=>m.assign(g,(0,t._)`${y.parentData}[${y.parentDataProperty}]`))}function l(d,m){const{gen:g}=d;g.if((0,t._)`Array.isArray(${m})`,()=>{g.assign(e.default.vErrors,(0,t._)`${e.default.vErrors} === null ? ${m} : ${e.default.vErrors}.concat(${m})`).assign(e.default.errors,(0,t._)`${e.default.vErrors}.length`),(0,n.extendErrors)(d)},()=>d.error())}function s({schemaEnv:d},m){if(m.async&&!d.$async)throw new Error("async keyword in sync schema")}function f(d,m,g){if(g===void 0)throw new Error(`keyword "${m}" failed to compile`);return d.scopeValue("keyword",typeof g=="function"?{ref:g}:{ref:g,code:(0,t.stringify)(g)})}function c(d,m,g=!1){return!m.length||m.some(y=>y==="array"?Array.isArray(d):y==="object"?d&&typeof d=="object"&&!Array.isArray(d):typeof d==y||g&&typeof d>"u")}ko.validSchemaType=c;function h({schema:d,opts:m,self:g,errSchemaPath:y},b,S){if(Array.isArray(b.keyword)?!b.keyword.includes(S):b.keyword!==S)throw new Error("ajv implementation error");const w=b.dependencies;if(w!=null&&w.some(C=>!Object.prototype.hasOwnProperty.call(d,C)))throw new Error(`parent schema must have dependencies of ${S}: ${w.join(",")}`);if(b.validateSchema&&!b.validateSchema(d[S])){const k=`keyword "${S}" value is invalid at path "${y}": `+g.errorsText(b.validateSchema.errors);if(m.validateSchema==="log")g.logger.error(k);else throw new Error(k)}}return ko.validateKeywordUsage=h,ko}var R0={},uE;function Eve(){if(uE)return R0;uE=1,Object.defineProperty(R0,"__esModule",{value:!0}),R0.extendSubschemaMode=R0.extendSubschemaData=R0.getSubschema=void 0;const t=Fr(),e=an();function r(i,{keyword:o,schemaProp:l,schema:s,schemaPath:f,errSchemaPath:c,topSchemaRef:h}){if(o!==void 0&&s!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){const d=i.schema[o];return l===void 0?{schema:d,schemaPath:(0,t._)`${i.schemaPath}${(0,t.getProperty)(o)}`,errSchemaPath:`${i.errSchemaPath}/${o}`}:{schema:d[l],schemaPath:(0,t._)`${i.schemaPath}${(0,t.getProperty)(o)}${(0,t.getProperty)(l)}`,errSchemaPath:`${i.errSchemaPath}/${o}/${(0,e.escapeFragment)(l)}`}}if(s!==void 0){if(f===void 0||c===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:f,topSchemaRef:h,errSchemaPath:c}}throw new Error('either "keyword" or "schema" must be passed')}R0.getSubschema=r;function n(i,o,{dataProp:l,dataPropType:s,data:f,dataTypes:c,propertyName:h}){if(f!==void 0&&l!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:d}=o;if(l!==void 0){const{errorPath:g,dataPathArr:y,opts:b}=o,S=d.let("data",(0,t._)`${o.data}${(0,t.getProperty)(l)}`,!0);m(S),i.errorPath=(0,t.str)`${g}${(0,e.getErrorPath)(l,s,b.jsPropertySyntax)}`,i.parentDataProperty=(0,t._)`${l}`,i.dataPathArr=[...y,i.parentDataProperty]}if(f!==void 0){const g=f instanceof t.Name?f:d.let("data",f,!0);m(g),h!==void 0&&(i.propertyName=h)}c&&(i.dataTypes=c);function m(g){i.data=g,i.dataLevel=o.dataLevel+1,i.dataTypes=[],o.definedProperties=new Set,i.parentData=o.data,i.dataNames=[...o.dataNames,g]}}R0.extendSubschemaData=n;function a(i,{jtdDiscriminator:o,jtdMetadata:l,compositeRule:s,createErrors:f,allErrors:c}){s!==void 0&&(i.compositeRule=s),f!==void 0&&(i.createErrors=f),c!==void 0&&(i.allErrors=c),i.jtdDiscriminator=o,i.jtdMetadata=l}return R0.extendSubschemaMode=a,R0}var Y1={},Nm={exports:{}},cE;function jve(){if(cE)return Nm.exports;cE=1;var t=Nm.exports=function(n,a,i){typeof a=="function"&&(i=a,a={}),i=a.cb||i;var o=typeof i=="function"?i:i.pre||function(){},l=i.post||function(){};e(a,o,l,n,"",n)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function e(n,a,i,o,l,s,f,c,h,d){if(o&&typeof o=="object"&&!Array.isArray(o)){a(o,l,s,f,c,h,d);for(var m in o){var g=o[m];if(Array.isArray(g)){if(m in t.arrayKeywords)for(var y=0;y<g.length;y++)e(n,a,i,g[y],l+"/"+m+"/"+y,s,l,m,o,y)}else if(m in t.propsKeywords){if(g&&typeof g=="object")for(var b in g)e(n,a,i,g[b],l+"/"+m+"/"+r(b),s,l,m,o,b)}else(m in t.keywords||n.allKeys&&!(m in t.skipKeywords))&&e(n,a,i,g,l+"/"+m,s,l,m,o)}i(o,l,s,f,c,h,d)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Nm.exports}var fE;function zf(){if(fE)return Y1;fE=1,Object.defineProperty(Y1,"__esModule",{value:!0}),Y1.getSchemaRefs=Y1.resolveUrl=Y1.normalizeId=Y1._getFullPath=Y1.getFullPath=Y1.inlineRef=void 0;const t=an(),e=pb(),r=jve(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function a(y,b=!0){return typeof y=="boolean"?!0:b===!0?!o(y):b?l(y)<=b:!1}Y1.inlineRef=a;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(y){for(const b in y){if(i.has(b))return!0;const S=y[b];if(Array.isArray(S)&&S.some(o)||typeof S=="object"&&o(S))return!0}return!1}function l(y){let b=0;for(const S in y){if(S==="$ref")return 1/0;if(b++,!n.has(S)&&(typeof y[S]=="object"&&(0,t.eachItem)(y[S],w=>b+=l(w)),b===1/0))return 1/0}return b}function s(y,b="",S){S!==!1&&(b=h(b));const w=y.parse(b);return f(y,w)}Y1.getFullPath=s;function f(y,b){return y.serialize(b).split("#")[0]+"#"}Y1._getFullPath=f;const c=/#\/?$/;function h(y){return y?y.replace(c,""):""}Y1.normalizeId=h;function d(y,b,S){return S=h(S),y.resolve(b,S)}Y1.resolveUrl=d;const m=/^[a-z_][-a-z0-9._]*$/i;function g(y,b){if(typeof y=="boolean")return{};const{schemaId:S,uriResolver:w}=this.opts,C=h(y[S]||b),k={"":C},_=s(w,C,!1),D={},T=new Set;return r(y,{allKeys:!0},(E,N,Y,ne)=>{if(ne===void 0)return;const K=_+N;let B=k[ne];typeof E[S]=="string"&&(B=j.call(this,E[S])),$.call(this,E.$anchor),$.call(this,E.$dynamicAnchor),k[N]=B;function j(V){const z=this.opts.uriResolver.resolve;if(V=h(B?z(B,V):V),T.has(V))throw M(V);T.add(V);let W=this.refs[V];return typeof W=="string"&&(W=this.refs[W]),typeof W=="object"?A(E,W.schema,V):V!==h(K)&&(V[0]==="#"?(A(E,D[V],V),D[V]=E):this.refs[V]=K),V}function $(V){if(typeof V=="string"){if(!m.test(V))throw new Error(`invalid anchor "${V}"`);j.call(this,`#${V}`)}}}),D;function A(E,N,Y){if(N!==void 0&&!e(E,N))throw M(Y)}function M(E){return new Error(`reference "${E}" resolves to more than one schema`)}}return Y1.getSchemaRefs=g,Y1}var dE;function Hf(){if(dE)return I0;dE=1,Object.defineProperty(I0,"__esModule",{value:!0}),I0.getData=I0.KeywordCxt=I0.validateFunctionCode=void 0;const t=Ave(),e=$c(),r=xq(),n=$c(),a=Tve(),i=Mve(),o=Eve(),l=Fr(),s=Q2(),f=zf(),c=an(),h=Ff();function d(F){if(_(F)&&(T(F),k(F))){b(F);return}m(F,()=>(0,t.topBoolOrEmptySchema)(F))}I0.validateFunctionCode=d;function m({gen:F,validateName:q,schema:X,schemaEnv:ie,opts:ce},de){ce.code.es5?F.func(q,(0,l._)`${s.default.data}, ${s.default.valCxt}`,ie.$async,()=>{F.code((0,l._)`"use strict"; ${w(X,ce)}`),y(F,ce),F.code(de)}):F.func(q,(0,l._)`${s.default.data}, ${g(ce)}`,ie.$async,()=>F.code(w(X,ce)).code(de))}function g(F){return(0,l._)`{${s.default.instancePath}="", ${s.default.parentData}, ${s.default.parentDataProperty}, ${s.default.rootData}=${s.default.data}${F.dynamicRef?(0,l._)`, ${s.default.dynamicAnchors}={}`:l.nil}}={}`}function y(F,q){F.if(s.default.valCxt,()=>{F.var(s.default.instancePath,(0,l._)`${s.default.valCxt}.${s.default.instancePath}`),F.var(s.default.parentData,(0,l._)`${s.default.valCxt}.${s.default.parentData}`),F.var(s.default.parentDataProperty,(0,l._)`${s.default.valCxt}.${s.default.parentDataProperty}`),F.var(s.default.rootData,(0,l._)`${s.default.valCxt}.${s.default.rootData}`),q.dynamicRef&&F.var(s.default.dynamicAnchors,(0,l._)`${s.default.valCxt}.${s.default.dynamicAnchors}`)},()=>{F.var(s.default.instancePath,(0,l._)`""`),F.var(s.default.parentData,(0,l._)`undefined`),F.var(s.default.parentDataProperty,(0,l._)`undefined`),F.var(s.default.rootData,s.default.data),q.dynamicRef&&F.var(s.default.dynamicAnchors,(0,l._)`{}`)})}function b(F){const{schema:q,opts:X,gen:ie}=F;m(F,()=>{X.$comment&&q.$comment&&ne(F),E(F),ie.let(s.default.vErrors,null),ie.let(s.default.errors,0),X.unevaluated&&S(F),A(F),K(F)})}function S(F){const{gen:q,validateName:X}=F;F.evaluated=q.const("evaluated",(0,l._)`${X}.evaluated`),q.if((0,l._)`${F.evaluated}.dynamicProps`,()=>q.assign((0,l._)`${F.evaluated}.props`,(0,l._)`undefined`)),q.if((0,l._)`${F.evaluated}.dynamicItems`,()=>q.assign((0,l._)`${F.evaluated}.items`,(0,l._)`undefined`))}function w(F,q){const X=typeof F=="object"&&F[q.schemaId];return X&&(q.code.source||q.code.process)?(0,l._)`/*# sourceURL=${X} */`:l.nil}function C(F,q){if(_(F)&&(T(F),k(F))){D(F,q);return}(0,t.boolOrEmptySchema)(F,q)}function k({schema:F,self:q}){if(typeof F=="boolean")return!F;for(const X in F)if(q.RULES.all[X])return!0;return!1}function _(F){return typeof F.schema!="boolean"}function D(F,q){const{schema:X,gen:ie,opts:ce}=F;ce.$comment&&X.$comment&&ne(F),N(F),Y(F);const de=ie.const("_errs",s.default.errors);A(F,de),ie.var(q,(0,l._)`${de} === ${s.default.errors}`)}function T(F){(0,c.checkUnknownRules)(F),M(F)}function A(F,q){if(F.opts.jtd)return j(F,[],!1,q);const X=(0,e.getSchemaTypes)(F.schema),ie=(0,e.coerceAndCheckDataType)(F,X);j(F,X,!ie,q)}function M(F){const{schema:q,errSchemaPath:X,opts:ie,self:ce}=F;q.$ref&&ie.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(q,ce.RULES)&&ce.logger.warn(`$ref: keywords ignored in schema at path "${X}"`)}function E(F){const{schema:q,opts:X}=F;q.default!==void 0&&X.useDefaults&&X.strictSchema&&(0,c.checkStrictMode)(F,"default is ignored in the schema root")}function N(F){const q=F.schema[F.opts.schemaId];q&&(F.baseId=(0,f.resolveUrl)(F.opts.uriResolver,F.baseId,q))}function Y(F){if(F.schema.$async&&!F.schemaEnv.$async)throw new Error("async schema in sync schema")}function ne({gen:F,schemaEnv:q,schema:X,errSchemaPath:ie,opts:ce}){const de=X.$comment;if(ce.$comment===!0)F.code((0,l._)`${s.default.self}.logger.log(${de})`);else if(typeof ce.$comment=="function"){const he=(0,l.str)`${ie}/$comment`,Oe=F.scopeValue("root",{ref:q.root});F.code((0,l._)`${s.default.self}.opts.$comment(${de}, ${he}, ${Oe}.schema)`)}}function K(F){const{gen:q,schemaEnv:X,validateName:ie,ValidationError:ce,opts:de}=F;X.$async?q.if((0,l._)`${s.default.errors} === 0`,()=>q.return(s.default.data),()=>q.throw((0,l._)`new ${ce}(${s.default.vErrors})`)):(q.assign((0,l._)`${ie}.errors`,s.default.vErrors),de.unevaluated&&B(F),q.return((0,l._)`${s.default.errors} === 0`))}function B({gen:F,evaluated:q,props:X,items:ie}){X instanceof l.Name&&F.assign((0,l._)`${q}.props`,X),ie instanceof l.Name&&F.assign((0,l._)`${q}.items`,ie)}function j(F,q,X,ie){const{gen:ce,schema:de,data:he,allErrors:Oe,opts:Ne,self:Te}=F,{RULES:_e}=Te;if(de.$ref&&(Ne.ignoreKeywordsWithRef||!(0,c.schemaHasRulesButRef)(de,_e))){ce.block(()=>J(F,"$ref",_e.all.$ref.definition));return}Ne.jtd||V(F,q),ce.block(()=>{for(const we of _e.rules)xe(we);xe(_e.post)});function xe(we){(0,r.shouldUseGroup)(de,we)&&(we.type?(ce.if((0,n.checkDataType)(we.type,he,Ne.strictNumbers)),$(F,we),q.length===1&&q[0]===we.type&&X&&(ce.else(),(0,n.reportTypeError)(F)),ce.endIf()):$(F,we),Oe||ce.if((0,l._)`${s.default.errors} === ${ie||0}`))}}function $(F,q){const{gen:X,schema:ie,opts:{useDefaults:ce}}=F;ce&&(0,a.assignDefaults)(F,q.type),X.block(()=>{for(const de of q.rules)(0,r.shouldUseRule)(ie,de)&&J(F,de.keyword,de.definition,q.type)})}function V(F,q){F.schemaEnv.meta||!F.opts.strictTypes||(z(F,q),F.opts.allowUnionTypes||W(F,q),G(F,F.dataTypes))}function z(F,q){if(q.length){if(!F.dataTypes.length){F.dataTypes=q;return}q.forEach(X=>{U(F.dataTypes,X)||R(F,`type "${X}" not allowed by context "${F.dataTypes.join(",")}"`)}),H(F,q)}}function W(F,q){q.length>1&&!(q.length===2&&q.includes("null"))&&R(F,"use allowUnionTypes to allow union type keyword")}function G(F,q){const X=F.self.RULES.all;for(const ie in X){const ce=X[ie];if(typeof ce=="object"&&(0,r.shouldUseRule)(F.schema,ce)){const{type:de}=ce.definition;de.length&&!de.some(he=>ae(q,he))&&R(F,`missing type "${de.join(",")}" for keyword "${ie}"`)}}}function ae(F,q){return F.includes(q)||q==="number"&&F.includes("integer")}function U(F,q){return F.includes(q)||q==="integer"&&F.includes("number")}function H(F,q){const X=[];for(const ie of F.dataTypes)U(q,ie)?X.push(ie):q.includes("integer")&&ie==="number"&&X.push("integer");F.dataTypes=X}function R(F,q){const X=F.schemaEnv.baseId+F.errSchemaPath;q+=` at "${X}" (strictTypes)`,(0,c.checkStrictMode)(F,q,F.opts.strictTypes)}class ee{constructor(q,X,ie){if((0,i.validateKeywordUsage)(q,X,ie),this.gen=q.gen,this.allErrors=q.allErrors,this.keyword=ie,this.data=q.data,this.schema=q.schema[ie],this.$data=X.$data&&q.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c.schemaRefOrVal)(q,this.schema,ie,this.$data),this.schemaType=X.schemaType,this.parentSchema=q.schema,this.params={},this.it=q,this.def=X,this.$data)this.schemaCode=q.gen.const("vSchema",te(this.$data,q));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,X.schemaType,X.allowUndefined))throw new Error(`${ie} value must be ${JSON.stringify(X.schemaType)}`);("code"in X?X.trackErrors:X.errors!==!1)&&(this.errsCount=q.gen.const("_errs",s.default.errors))}result(q,X,ie){this.failResult((0,l.not)(q),X,ie)}failResult(q,X,ie){this.gen.if(q),ie?ie():this.error(),X?(this.gen.else(),X(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(q,X){this.failResult((0,l.not)(q),void 0,X)}fail(q){if(q===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(q),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(q){if(!this.$data)return this.fail(q);const{schemaCode:X}=this;this.fail((0,l._)`${X} !== undefined && (${(0,l.or)(this.invalid$data(),q)})`)}error(q,X,ie){if(X){this.setParams(X),this._error(q,ie),this.setParams({});return}this._error(q,ie)}_error(q,X){(q?h.reportExtraError:h.reportError)(this,this.def.error,X)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(q){this.allErrors||this.gen.if(q)}setParams(q,X){X?Object.assign(this.params,q):this.params=q}block$data(q,X,ie=l.nil){this.gen.block(()=>{this.check$data(q,ie),X()})}check$data(q=l.nil,X=l.nil){if(!this.$data)return;const{gen:ie,schemaCode:ce,schemaType:de,def:he}=this;ie.if((0,l.or)((0,l._)`${ce} === undefined`,X)),q!==l.nil&&ie.assign(q,!0),(de.length||he.validateSchema)&&(ie.elseIf(this.invalid$data()),this.$dataError(),q!==l.nil&&ie.assign(q,!1)),ie.else()}invalid$data(){const{gen:q,schemaCode:X,schemaType:ie,def:ce,it:de}=this;return(0,l.or)(he(),Oe());function he(){if(ie.length){if(!(X instanceof l.Name))throw new Error("ajv implementation error");const Ne=Array.isArray(ie)?ie:[ie];return(0,l._)`${(0,n.checkDataTypes)(Ne,X,de.opts.strictNumbers,n.DataType.Wrong)}`}return l.nil}function Oe(){if(ce.validateSchema){const Ne=q.scopeValue("validate$data",{ref:ce.validateSchema});return(0,l._)`!${Ne}(${X})`}return l.nil}}subschema(q,X){const ie=(0,o.getSubschema)(this.it,q);(0,o.extendSubschemaData)(ie,this.it,q),(0,o.extendSubschemaMode)(ie,q);const ce={...this.it,...ie,items:void 0,props:void 0};return C(ce,X),ce}mergeEvaluated(q,X){const{it:ie,gen:ce}=this;ie.opts.unevaluated&&(ie.props!==!0&&q.props!==void 0&&(ie.props=c.mergeEvaluated.props(ce,q.props,ie.props,X)),ie.items!==!0&&q.items!==void 0&&(ie.items=c.mergeEvaluated.items(ce,q.items,ie.items,X)))}mergeValidEvaluated(q,X){const{it:ie,gen:ce}=this;if(ie.opts.unevaluated&&(ie.props!==!0||ie.items!==!0))return ce.if(X,()=>this.mergeEvaluated(q,l.Name)),!0}}I0.KeywordCxt=ee;function J(F,q,X,ie){const ce=new ee(F,X,q);"code"in X?X.code(ce,ie):ce.$data&&X.validate?(0,i.funcKeywordCode)(ce,X):"macro"in X?(0,i.macroKeywordCode)(ce,X):(X.compile||X.validate)&&(0,i.funcKeywordCode)(ce,X)}const Z=/^\/(?:[^~]|~0|~1)*$/,re=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function te(F,{dataLevel:q,dataNames:X,dataPathArr:ie}){let ce,de;if(F==="")return s.default.rootData;if(F[0]==="/"){if(!Z.test(F))throw new Error(`Invalid JSON-pointer: ${F}`);ce=F,de=s.default.rootData}else{const Te=re.exec(F);if(!Te)throw new Error(`Invalid JSON-pointer: ${F}`);const _e=+Te[1];if(ce=Te[2],ce==="#"){if(_e>=q)throw new Error(Ne("property/index",_e));return ie[q-_e]}if(_e>q)throw new Error(Ne("data",_e));if(de=X[q-_e],!ce)return de}let he=de;const Oe=ce.split("/");for(const Te of Oe)Te&&(de=(0,l._)`${de}${(0,l.getProperty)((0,c.unescapeJsonPointer)(Te))}`,he=(0,l._)`${he} && ${de}`);return he;function Ne(Te,_e){return`Cannot access ${Te} ${_e} levels up, current level is ${q}`}}return I0.getData=te,I0}var C5={},hE;function gw(){if(hE)return C5;hE=1,Object.defineProperty(C5,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return C5.default=t,C5}var k5={},pE;function qf(){if(pE)return k5;pE=1,Object.defineProperty(k5,"__esModule",{value:!0});const t=zf();class e extends Error{constructor(n,a,i,o){super(o||`can't resolve reference ${i} from id ${a}`),this.missingRef=(0,t.resolveUrl)(n,a,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return k5.default=e,k5}var ji={},mE;function yw(){if(mE)return ji;mE=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.resolveSchema=ji.getCompilingSchema=ji.resolveRef=ji.compileSchema=ji.SchemaEnv=void 0;const t=Fr(),e=gw(),r=Q2(),n=zf(),a=an(),i=Hf();class o{constructor(S){var w;this.refs={},this.dynamicAnchors={};let C;typeof S.schema=="object"&&(C=S.schema),this.schema=S.schema,this.schemaId=S.schemaId,this.root=S.root||this,this.baseId=(w=S.baseId)!==null&&w!==void 0?w:(0,n.normalizeId)(C==null?void 0:C[S.schemaId||"$id"]),this.schemaPath=S.schemaPath,this.localRefs=S.localRefs,this.meta=S.meta,this.$async=C==null?void 0:C.$async,this.refs={}}}ji.SchemaEnv=o;function l(b){const S=c.call(this,b);if(S)return S;const w=(0,n.getFullPath)(this.opts.uriResolver,b.root.baseId),{es5:C,lines:k}=this.opts.code,{ownProperties:_}=this.opts,D=new t.CodeGen(this.scope,{es5:C,lines:k,ownProperties:_});let T;b.$async&&(T=D.scopeValue("Error",{ref:e.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const A=D.scopeName("validate");b.validateName=A;const M={gen:D,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:D.scopeValue("schema",this.opts.code.source===!0?{ref:b.schema,code:(0,t.stringify)(b.schema)}:{ref:b.schema}),validateName:A,ValidationError:T,schema:b.schema,schemaEnv:b,rootId:w,baseId:b.baseId||w,schemaPath:t.nil,errSchemaPath:b.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let E;try{this._compilations.add(b),(0,i.validateFunctionCode)(M),D.optimize(this.opts.code.optimize);const N=D.toString();E=`${D.scopeRefs(r.default.scope)}return ${N}`,this.opts.code.process&&(E=this.opts.code.process(E,b));const ne=new Function(`${r.default.self}`,`${r.default.scope}`,E)(this,this.scope.get());if(this.scope.value(A,{ref:ne}),ne.errors=null,ne.schema=b.schema,ne.schemaEnv=b,b.$async&&(ne.$async=!0),this.opts.code.source===!0&&(ne.source={validateName:A,validateCode:N,scopeValues:D._values}),this.opts.unevaluated){const{props:K,items:B}=M;ne.evaluated={props:K instanceof t.Name?void 0:K,items:B instanceof t.Name?void 0:B,dynamicProps:K instanceof t.Name,dynamicItems:B instanceof t.Name},ne.source&&(ne.source.evaluated=(0,t.stringify)(ne.evaluated))}return b.validate=ne,b}catch(N){throw delete b.validate,delete b.validateName,E&&this.logger.error("Error compiling schema, function code:",E),N}finally{this._compilations.delete(b)}}ji.compileSchema=l;function s(b,S,w){var C;w=(0,n.resolveUrl)(this.opts.uriResolver,S,w);const k=b.refs[w];if(k)return k;let _=d.call(this,b,w);if(_===void 0){const D=(C=b.localRefs)===null||C===void 0?void 0:C[w],{schemaId:T}=this.opts;D&&(_=new o({schema:D,schemaId:T,root:b,baseId:S}))}if(_!==void 0)return b.refs[w]=f.call(this,_)}ji.resolveRef=s;function f(b){return(0,n.inlineRef)(b.schema,this.opts.inlineRefs)?b.schema:b.validate?b:l.call(this,b)}function c(b){for(const S of this._compilations)if(h(S,b))return S}ji.getCompilingSchema=c;function h(b,S){return b.schema===S.schema&&b.root===S.root&&b.baseId===S.baseId}function d(b,S){let w;for(;typeof(w=this.refs[S])=="string";)S=w;return w||this.schemas[S]||m.call(this,b,S)}function m(b,S){const w=this.opts.uriResolver.parse(S),C=(0,n._getFullPath)(this.opts.uriResolver,w);let k=(0,n.getFullPath)(this.opts.uriResolver,b.baseId,void 0);if(Object.keys(b.schema).length>0&&C===k)return y.call(this,w,b);const _=(0,n.normalizeId)(C),D=this.refs[_]||this.schemas[_];if(typeof D=="string"){const T=m.call(this,b,D);return typeof(T==null?void 0:T.schema)!="object"?void 0:y.call(this,w,T)}if(typeof(D==null?void 0:D.schema)=="object"){if(D.validate||l.call(this,D),_===(0,n.normalizeId)(S)){const{schema:T}=D,{schemaId:A}=this.opts,M=T[A];return M&&(k=(0,n.resolveUrl)(this.opts.uriResolver,k,M)),new o({schema:T,schemaId:A,root:b,baseId:k})}return y.call(this,w,D)}}ji.resolveSchema=m;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(b,{baseId:S,schema:w,root:C}){var k;if(((k=b.fragment)===null||k===void 0?void 0:k[0])!=="/")return;for(const T of b.fragment.slice(1).split("/")){if(typeof w=="boolean")return;const A=w[(0,a.unescapeFragment)(T)];if(A===void 0)return;w=A;const M=typeof w=="object"&&w[this.opts.schemaId];!g.has(T)&&M&&(S=(0,n.resolveUrl)(this.opts.uriResolver,S,M))}let _;if(typeof w!="boolean"&&w.$ref&&!(0,a.schemaHasRulesButRef)(w,this.RULES)){const T=(0,n.resolveUrl)(this.opts.uriResolver,S,w.$ref);_=m.call(this,C,T)}const{schemaId:D}=this.opts;if(_=_||new o({schema:w,schemaId:D,root:C,baseId:S}),_.schema!==_.root.schema)return _}return ji}const Lve="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Nve="Meta-schema for $data reference (JSON AnySchema extension proposal)",Ive="object",Pve=["$data"],Rve={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},$ve=!1,Bve={$id:Lve,description:Nve,type:Ive,required:Pve,properties:Rve,additionalProperties:$ve};var _5={},Ml={exports:{}},Im,gE;function Vve(){return gE||(gE=1,Im={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),Im}var Pm,yE;function Fve(){if(yE)return Pm;yE=1;const{HEX:t}=Vve(),e=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function r(y){if(l(y,".")<3)return{host:y,isIPV4:!1};const b=y.match(e)||[],[S]=b;return S?{host:o(S,"."),isIPV4:!0}:{host:y,isIPV4:!1}}function n(y,b=!1){let S="",w=!0;for(const C of y){if(t[C]===void 0)return;C!=="0"&&w===!0&&(w=!1),w||(S+=C)}return b&&S.length===0&&(S="0"),S}function a(y){let b=0;const S={error:!1,address:"",zone:""},w=[],C=[];let k=!1,_=!1,D=!1;function T(){if(C.length){if(k===!1){const A=n(C);if(A!==void 0)w.push(A);else return S.error=!0,!1}C.length=0}return!0}for(let A=0;A<y.length;A++){const M=y[A];if(!(M==="["||M==="]"))if(M===":"){if(_===!0&&(D=!0),!T())break;if(b++,w.push(":"),b>7){S.error=!0;break}A-1>=0&&y[A-1]===":"&&(_=!0);continue}else if(M==="%"){if(!T())break;k=!0}else{C.push(M);continue}}return C.length&&(k?S.zone=C.join(""):D?w.push(C.join("")):w.push(n(C))),S.address=w.join(""),S}function i(y){if(l(y,":")<2)return{host:y,isIPV6:!1};const b=a(y);if(b.error)return{host:y,isIPV6:!1};{let S=b.address,w=b.address;return b.zone&&(S+="%"+b.zone,w+="%25"+b.zone),{host:S,escapedHost:w,isIPV6:!0}}}function o(y,b){let S="",w=!0;const C=y.length;for(let k=0;k<C;k++){const _=y[k];_==="0"&&w?(k+1<=C&&y[k+1]===b||k+1===C)&&(S+=_,w=!1):(_===b?w=!0:w=!1,S+=_)}return S}function l(y,b){let S=0;for(let w=0;w<y.length;w++)y[w]===b&&S++;return S}const s=/^\.\.?\//u,f=/^\/\.(?:\/|$)/u,c=/^\/\.\.(?:\/|$)/u,h=/^\/?(?:.|\n)*?(?=\/|$)/u;function d(y){const b=[];for(;y.length;)if(y.match(s))y=y.replace(s,"");else if(y.match(f))y=y.replace(f,"/");else if(y.match(c))y=y.replace(c,"/"),b.pop();else if(y==="."||y==="..")y="";else{const S=y.match(h);if(S){const w=S[0];y=y.slice(w.length),b.push(w)}else throw new Error("Unexpected dot segment condition")}return b.join("")}function m(y,b){const S=b!==!0?escape:unescape;return y.scheme!==void 0&&(y.scheme=S(y.scheme)),y.userinfo!==void 0&&(y.userinfo=S(y.userinfo)),y.host!==void 0&&(y.host=S(y.host)),y.path!==void 0&&(y.path=S(y.path)),y.query!==void 0&&(y.query=S(y.query)),y.fragment!==void 0&&(y.fragment=S(y.fragment)),y}function g(y){const b=[];if(y.userinfo!==void 0&&(b.push(y.userinfo),b.push("@")),y.host!==void 0){let S=unescape(y.host);const w=r(S);if(w.isIPV4)S=w.host;else{const C=i(w.host);C.isIPV6===!0?S=`[${C.escapedHost}]`:S=y.host}b.push(S)}return(typeof y.port=="number"||typeof y.port=="string")&&(b.push(":"),b.push(String(y.port))),b.length?b.join(""):void 0}return Pm={recomposeAuthority:g,normalizeComponentEncoding:m,removeDotSegments:d,normalizeIPv4:r,normalizeIPv6:i,stringArrayToHexStripped:n},Pm}var Rm,vE;function zve(){if(vE)return Rm;vE=1;const t=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(w){return typeof w.secure=="boolean"?w.secure:String(w.scheme).toLowerCase()==="wss"}function n(w){return w.host||(w.error=w.error||"HTTP URIs must have a host."),w}function a(w){const C=String(w.scheme).toLowerCase()==="https";return(w.port===(C?443:80)||w.port==="")&&(w.port=void 0),w.path||(w.path="/"),w}function i(w){return w.secure=r(w),w.resourceName=(w.path||"/")+(w.query?"?"+w.query:""),w.path=void 0,w.query=void 0,w}function o(w){if((w.port===(r(w)?443:80)||w.port==="")&&(w.port=void 0),typeof w.secure=="boolean"&&(w.scheme=w.secure?"wss":"ws",w.secure=void 0),w.resourceName){const[C,k]=w.resourceName.split("?");w.path=C&&C!=="/"?C:void 0,w.query=k,w.resourceName=void 0}return w.fragment=void 0,w}function l(w,C){if(!w.path)return w.error="URN can not be parsed",w;const k=w.path.match(e);if(k){const _=C.scheme||w.scheme||"urn";w.nid=k[1].toLowerCase(),w.nss=k[2];const D=`${_}:${C.nid||w.nid}`,T=S[D];w.path=void 0,T&&(w=T.parse(w,C))}else w.error=w.error||"URN can not be parsed.";return w}function s(w,C){const k=C.scheme||w.scheme||"urn",_=w.nid.toLowerCase(),D=`${k}:${C.nid||_}`,T=S[D];T&&(w=T.serialize(w,C));const A=w,M=w.nss;return A.path=`${_||C.nid}:${M}`,C.skipEscape=!0,A}function f(w,C){const k=w;return k.uuid=k.nss,k.nss=void 0,!C.tolerant&&(!k.uuid||!t.test(k.uuid))&&(k.error=k.error||"UUID is not valid."),k}function c(w){const C=w;return C.nss=(w.uuid||"").toLowerCase(),C}const h={scheme:"http",domainHost:!0,parse:n,serialize:a},d={scheme:"https",domainHost:h.domainHost,parse:n,serialize:a},m={scheme:"ws",domainHost:!0,parse:i,serialize:o},g={scheme:"wss",domainHost:m.domainHost,parse:m.parse,serialize:m.serialize},S={http:h,https:d,ws:m,wss:g,urn:{scheme:"urn",parse:l,serialize:s,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:f,serialize:c,skipNormalize:!0}};return Rm=S,Rm}var bE;function Hve(){if(bE)return Ml.exports;bE=1;const{normalizeIPv6:t,normalizeIPv4:e,removeDotSegments:r,recomposeAuthority:n,normalizeComponentEncoding:a}=Fve(),i=zve();function o(b,S){return typeof b=="string"?b=c(g(b,S),S):typeof b=="object"&&(b=g(c(b,S),S)),b}function l(b,S,w){const C=Object.assign({scheme:"null"},w),k=s(g(b,C),g(S,C),C,!0);return c(k,{...C,skipEscape:!0})}function s(b,S,w,C){const k={};return C||(b=g(c(b,w),w),S=g(c(S,w),w)),w=w||{},!w.tolerant&&S.scheme?(k.scheme=S.scheme,k.userinfo=S.userinfo,k.host=S.host,k.port=S.port,k.path=r(S.path||""),k.query=S.query):(S.userinfo!==void 0||S.host!==void 0||S.port!==void 0?(k.userinfo=S.userinfo,k.host=S.host,k.port=S.port,k.path=r(S.path||""),k.query=S.query):(S.path?(S.path.charAt(0)==="/"?k.path=r(S.path):((b.userinfo!==void 0||b.host!==void 0||b.port!==void 0)&&!b.path?k.path="/"+S.path:b.path?k.path=b.path.slice(0,b.path.lastIndexOf("/")+1)+S.path:k.path=S.path,k.path=r(k.path)),k.query=S.query):(k.path=b.path,S.query!==void 0?k.query=S.query:k.query=b.query),k.userinfo=b.userinfo,k.host=b.host,k.port=b.port),k.scheme=b.scheme),k.fragment=S.fragment,k}function f(b,S,w){return typeof b=="string"?(b=unescape(b),b=c(a(g(b,w),!0),{...w,skipEscape:!0})):typeof b=="object"&&(b=c(a(b,!0),{...w,skipEscape:!0})),typeof S=="string"?(S=unescape(S),S=c(a(g(S,w),!0),{...w,skipEscape:!0})):typeof S=="object"&&(S=c(a(S,!0),{...w,skipEscape:!0})),b.toLowerCase()===S.toLowerCase()}function c(b,S){const w={host:b.host,scheme:b.scheme,userinfo:b.userinfo,port:b.port,path:b.path,query:b.query,nid:b.nid,nss:b.nss,uuid:b.uuid,fragment:b.fragment,reference:b.reference,resourceName:b.resourceName,secure:b.secure,error:""},C=Object.assign({},S),k=[],_=i[(C.scheme||w.scheme||"").toLowerCase()];_&&_.serialize&&_.serialize(w,C),w.path!==void 0&&(C.skipEscape?w.path=unescape(w.path):(w.path=escape(w.path),w.scheme!==void 0&&(w.path=w.path.split("%3A").join(":")))),C.reference!=="suffix"&&w.scheme&&k.push(w.scheme,":");const D=n(w);if(D!==void 0&&(C.reference!=="suffix"&&k.push("//"),k.push(D),w.path&&w.path.charAt(0)!=="/"&&k.push("/")),w.path!==void 0){let T=w.path;!C.absolutePath&&(!_||!_.absolutePath)&&(T=r(T)),D===void 0&&(T=T.replace(/^\/\//u,"/%2F")),k.push(T)}return w.query!==void 0&&k.push("?",w.query),w.fragment!==void 0&&k.push("#",w.fragment),k.join("")}const h=Array.from({length:127},(b,S)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(S)));function d(b){let S=0;for(let w=0,C=b.length;w<C;++w)if(S=b.charCodeAt(w),S>126||h[S])return!0;return!1}const m=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(b,S){const w=Object.assign({},S),C={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},k=b.indexOf("%")!==-1;let _=!1;w.reference==="suffix"&&(b=(w.scheme?w.scheme+":":"")+"//"+b);const D=b.match(m);if(D){if(C.scheme=D[1],C.userinfo=D[3],C.host=D[4],C.port=parseInt(D[5],10),C.path=D[6]||"",C.query=D[7],C.fragment=D[8],isNaN(C.port)&&(C.port=D[5]),C.host){const A=e(C.host);if(A.isIPV4===!1){const M=t(A.host);C.host=M.host.toLowerCase(),_=M.isIPV6}else C.host=A.host,_=!0}C.scheme===void 0&&C.userinfo===void 0&&C.host===void 0&&C.port===void 0&&C.query===void 0&&!C.path?C.reference="same-document":C.scheme===void 0?C.reference="relative":C.fragment===void 0?C.reference="absolute":C.reference="uri",w.reference&&w.reference!=="suffix"&&w.reference!==C.reference&&(C.error=C.error||"URI is not a "+w.reference+" reference.");const T=i[(w.scheme||C.scheme||"").toLowerCase()];if(!w.unicodeSupport&&(!T||!T.unicodeSupport)&&C.host&&(w.domainHost||T&&T.domainHost)&&_===!1&&d(C.host))try{C.host=URL.domainToASCII(C.host.toLowerCase())}catch(A){C.error=C.error||"Host's domain name can not be converted to ASCII: "+A}(!T||T&&!T.skipNormalize)&&(k&&C.scheme!==void 0&&(C.scheme=unescape(C.scheme)),k&&C.host!==void 0&&(C.host=unescape(C.host)),C.path&&(C.path=escape(unescape(C.path))),C.fragment&&(C.fragment=encodeURI(decodeURIComponent(C.fragment)))),T&&T.parse&&T.parse(C,w)}else C.error=C.error||"URI can not be parsed.";return C}const y={SCHEMES:i,normalize:o,resolve:l,resolveComponents:s,equal:f,serialize:c,parse:g};return Ml.exports=y,Ml.exports.default=y,Ml.exports.fastUri=y,Ml.exports}var xE;function qve(){if(xE)return _5;xE=1,Object.defineProperty(_5,"__esModule",{value:!0});const t=Hve();return t.code='require("ajv/dist/runtime/uri").default',_5.default=t,_5}var wE;function Wve(){return wE||(wE=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Hf();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Fr();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=gw(),a=qf(),i=bq(),o=yw(),l=Fr(),s=zf(),f=$c(),c=an(),h=Bve,d=qve(),m=(W,G)=>new RegExp(W,G);m.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},S={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},w=200;function C(W){var G,ae,U,H,R,ee,J,Z,re,te,F,q,X,ie,ce,de,he,Oe,Ne,Te,_e,xe,we,ge,ve;const le=W.strict,ue=(G=W.code)===null||G===void 0?void 0:G.optimize,Ce=ue===!0||ue===void 0?1:ue||0,pe=(U=(ae=W.code)===null||ae===void 0?void 0:ae.regExp)!==null&&U!==void 0?U:m,ye=(H=W.uriResolver)!==null&&H!==void 0?H:d.default;return{strictSchema:(ee=(R=W.strictSchema)!==null&&R!==void 0?R:le)!==null&&ee!==void 0?ee:!0,strictNumbers:(Z=(J=W.strictNumbers)!==null&&J!==void 0?J:le)!==null&&Z!==void 0?Z:!0,strictTypes:(te=(re=W.strictTypes)!==null&&re!==void 0?re:le)!==null&&te!==void 0?te:"log",strictTuples:(q=(F=W.strictTuples)!==null&&F!==void 0?F:le)!==null&&q!==void 0?q:"log",strictRequired:(ie=(X=W.strictRequired)!==null&&X!==void 0?X:le)!==null&&ie!==void 0?ie:!1,code:W.code?{...W.code,optimize:Ce,regExp:pe}:{optimize:Ce,regExp:pe},loopRequired:(ce=W.loopRequired)!==null&&ce!==void 0?ce:w,loopEnum:(de=W.loopEnum)!==null&&de!==void 0?de:w,meta:(he=W.meta)!==null&&he!==void 0?he:!0,messages:(Oe=W.messages)!==null&&Oe!==void 0?Oe:!0,inlineRefs:(Ne=W.inlineRefs)!==null&&Ne!==void 0?Ne:!0,schemaId:(Te=W.schemaId)!==null&&Te!==void 0?Te:"$id",addUsedSchema:(_e=W.addUsedSchema)!==null&&_e!==void 0?_e:!0,validateSchema:(xe=W.validateSchema)!==null&&xe!==void 0?xe:!0,validateFormats:(we=W.validateFormats)!==null&&we!==void 0?we:!0,unicodeRegExp:(ge=W.unicodeRegExp)!==null&&ge!==void 0?ge:!0,int32range:(ve=W.int32range)!==null&&ve!==void 0?ve:!0,uriResolver:ye}}class k{constructor(G={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,G=this.opts={...G,...C(G)};const{es5:ae,lines:U}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:y,es5:ae,lines:U}),this.logger=Y(G.logger);const H=G.validateFormats;G.validateFormats=!1,this.RULES=(0,i.getRules)(),_.call(this,b,G,"NOT SUPPORTED"),_.call(this,S,G,"DEPRECATED","warn"),this._metaOpts=E.call(this),G.formats&&A.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),G.keywords&&M.call(this,G.keywords),typeof G.meta=="object"&&this.addMetaSchema(G.meta),T.call(this),G.validateFormats=H}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:G,meta:ae,schemaId:U}=this.opts;let H=h;U==="id"&&(H={...h},H.id=H.$id,delete H.$id),ae&&G&&this.addMetaSchema(H,H[U],!1)}defaultMeta(){const{meta:G,schemaId:ae}=this.opts;return this.opts.defaultMeta=typeof G=="object"?G[ae]||G:void 0}validate(G,ae){let U;if(typeof G=="string"){if(U=this.getSchema(G),!U)throw new Error(`no schema with key or ref "${G}"`)}else U=this.compile(G);const H=U(ae);return"$async"in U||(this.errors=U.errors),H}compile(G,ae){const U=this._addSchema(G,ae);return U.validate||this._compileSchemaEnv(U)}compileAsync(G,ae){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:U}=this.opts;return H.call(this,G,ae);async function H(te,F){await R.call(this,te.$schema);const q=this._addSchema(te,F);return q.validate||ee.call(this,q)}async function R(te){te&&!this.getSchema(te)&&await H.call(this,{$ref:te},!0)}async function ee(te){try{return this._compileSchemaEnv(te)}catch(F){if(!(F instanceof a.default))throw F;return J.call(this,F),await Z.call(this,F.missingSchema),ee.call(this,te)}}function J({missingSchema:te,missingRef:F}){if(this.refs[te])throw new Error(`AnySchema ${te} is loaded but ${F} cannot be resolved`)}async function Z(te){const F=await re.call(this,te);this.refs[te]||await R.call(this,F.$schema),this.refs[te]||this.addSchema(F,te,ae)}async function re(te){const F=this._loading[te];if(F)return F;try{return await(this._loading[te]=U(te))}finally{delete this._loading[te]}}}addSchema(G,ae,U,H=this.opts.validateSchema){if(Array.isArray(G)){for(const ee of G)this.addSchema(ee,void 0,U,H);return this}let R;if(typeof G=="object"){const{schemaId:ee}=this.opts;if(R=G[ee],R!==void 0&&typeof R!="string")throw new Error(`schema ${ee} must be string`)}return ae=(0,s.normalizeId)(ae||R),this._checkUnique(ae),this.schemas[ae]=this._addSchema(G,U,ae,H,!0),this}addMetaSchema(G,ae,U=this.opts.validateSchema){return this.addSchema(G,ae,!0,U),this}validateSchema(G,ae){if(typeof G=="boolean")return!0;let U;if(U=G.$schema,U!==void 0&&typeof U!="string")throw new Error("$schema must be a string");if(U=U||this.opts.defaultMeta||this.defaultMeta(),!U)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const H=this.validate(U,G);if(!H&&ae){const R="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(R);else throw new Error(R)}return H}getSchema(G){let ae;for(;typeof(ae=D.call(this,G))=="string";)G=ae;if(ae===void 0){const{schemaId:U}=this.opts,H=new o.SchemaEnv({schema:{},schemaId:U});if(ae=o.resolveSchema.call(this,H,G),!ae)return;this.refs[G]=ae}return ae.validate||this._compileSchemaEnv(ae)}removeSchema(G){if(G instanceof RegExp)return this._removeAllSchemas(this.schemas,G),this._removeAllSchemas(this.refs,G),this;switch(typeof G){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const ae=D.call(this,G);return typeof ae=="object"&&this._cache.delete(ae.schema),delete this.schemas[G],delete this.refs[G],this}case"object":{const ae=G;this._cache.delete(ae);let U=G[this.opts.schemaId];return U&&(U=(0,s.normalizeId)(U),delete this.schemas[U],delete this.refs[U]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(G){for(const ae of G)this.addKeyword(ae);return this}addKeyword(G,ae){let U;if(typeof G=="string")U=G,typeof ae=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),ae.keyword=U);else if(typeof G=="object"&&ae===void 0){if(ae=G,U=ae.keyword,Array.isArray(U)&&!U.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(K.call(this,U,ae),!ae)return(0,c.eachItem)(U,R=>B.call(this,R)),this;$.call(this,ae);const H={...ae,type:(0,f.getJSONTypes)(ae.type),schemaType:(0,f.getJSONTypes)(ae.schemaType)};return(0,c.eachItem)(U,H.type.length===0?R=>B.call(this,R,H):R=>H.type.forEach(ee=>B.call(this,R,H,ee))),this}getKeyword(G){const ae=this.RULES.all[G];return typeof ae=="object"?ae.definition:!!ae}removeKeyword(G){const{RULES:ae}=this;delete ae.keywords[G],delete ae.all[G];for(const U of ae.rules){const H=U.rules.findIndex(R=>R.keyword===G);H>=0&&U.rules.splice(H,1)}return this}addFormat(G,ae){return typeof ae=="string"&&(ae=new RegExp(ae)),this.formats[G]=ae,this}errorsText(G=this.errors,{separator:ae=", ",dataVar:U="data"}={}){return!G||G.length===0?"No errors":G.map(H=>`${U}${H.instancePath} ${H.message}`).reduce((H,R)=>H+ae+R)}$dataMetaSchema(G,ae){const U=this.RULES.all;G=JSON.parse(JSON.stringify(G));for(const H of ae){const R=H.split("/").slice(1);let ee=G;for(const J of R)ee=ee[J];for(const J in U){const Z=U[J];if(typeof Z!="object")continue;const{$data:re}=Z.definition,te=ee[J];re&&te&&(ee[J]=z(te))}}return G}_removeAllSchemas(G,ae){for(const U in G){const H=G[U];(!ae||ae.test(U))&&(typeof H=="string"?delete G[U]:H&&!H.meta&&(this._cache.delete(H.schema),delete G[U]))}}_addSchema(G,ae,U,H=this.opts.validateSchema,R=this.opts.addUsedSchema){let ee;const{schemaId:J}=this.opts;if(typeof G=="object")ee=G[J];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof G!="boolean")throw new Error("schema must be object or boolean")}let Z=this._cache.get(G);if(Z!==void 0)return Z;U=(0,s.normalizeId)(ee||U);const re=s.getSchemaRefs.call(this,G,U);return Z=new o.SchemaEnv({schema:G,schemaId:J,meta:ae,baseId:U,localRefs:re}),this._cache.set(Z.schema,Z),R&&!U.startsWith("#")&&(U&&this._checkUnique(U),this.refs[U]=Z),H&&this.validateSchema(G,!0),Z}_checkUnique(G){if(this.schemas[G]||this.refs[G])throw new Error(`schema with key or id "${G}" already exists`)}_compileSchemaEnv(G){if(G.meta?this._compileMetaSchema(G):o.compileSchema.call(this,G),!G.validate)throw new Error("ajv implementation error");return G.validate}_compileMetaSchema(G){const ae=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,G)}finally{this.opts=ae}}}k.ValidationError=n.default,k.MissingRefError=a.default,t.default=k;function _(W,G,ae,U="error"){for(const H in W){const R=H;R in G&&this.logger[U](`${ae}: option ${H}. ${W[R]}`)}}function D(W){return W=(0,s.normalizeId)(W),this.schemas[W]||this.refs[W]}function T(){const W=this.opts.schemas;if(W)if(Array.isArray(W))this.addSchema(W);else for(const G in W)this.addSchema(W[G],G)}function A(){for(const W in this.opts.formats){const G=this.opts.formats[W];G&&this.addFormat(W,G)}}function M(W){if(Array.isArray(W)){this.addVocabulary(W);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const G in W){const ae=W[G];ae.keyword||(ae.keyword=G),this.addKeyword(ae)}}function E(){const W={...this.opts};for(const G of g)delete W[G];return W}const N={log(){},warn(){},error(){}};function Y(W){if(W===!1)return N;if(W===void 0)return console;if(W.log&&W.warn&&W.error)return W;throw new Error("logger must implement log, warn and error methods")}const ne=/^[a-z_$][a-z0-9_$:-]*$/i;function K(W,G){const{RULES:ae}=this;if((0,c.eachItem)(W,U=>{if(ae.keywords[U])throw new Error(`Keyword ${U} is already defined`);if(!ne.test(U))throw new Error(`Keyword ${U} has invalid name`)}),!!G&&G.$data&&!("code"in G||"validate"in G))throw new Error('$data keyword must have "code" or "validate" function')}function B(W,G,ae){var U;const H=G==null?void 0:G.post;if(ae&&H)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:R}=this;let ee=H?R.post:R.rules.find(({type:Z})=>Z===ae);if(ee||(ee={type:ae,rules:[]},R.rules.push(ee)),R.keywords[W]=!0,!G)return;const J={keyword:W,definition:{...G,type:(0,f.getJSONTypes)(G.type),schemaType:(0,f.getJSONTypes)(G.schemaType)}};G.before?j.call(this,ee,J,G.before):ee.rules.push(J),R.all[W]=J,(U=G.implements)===null||U===void 0||U.forEach(Z=>this.addKeyword(Z))}function j(W,G,ae){const U=W.rules.findIndex(H=>H.keyword===ae);U>=0?W.rules.splice(U,0,G):(W.rules.push(G),this.logger.warn(`rule ${ae} is not defined`))}function $(W){let{metaSchema:G}=W;G!==void 0&&(W.$data&&this.opts.$data&&(G=z(G)),W.validateSchema=this.compile(G,!0))}const V={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function z(W){return{anyOf:[W,V]}}}(Tm)),Tm}var O5={},D5={},A5={},SE;function Uve(){if(SE)return A5;SE=1,Object.defineProperty(A5,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return A5.default=t,A5}var A2={},CE;function Gve(){if(CE)return A2;CE=1,Object.defineProperty(A2,"__esModule",{value:!0}),A2.callRef=A2.getValidate=void 0;const t=qf(),e=qo(),r=Fr(),n=Q2(),a=yw(),i=an(),o={keyword:"$ref",schemaType:"string",code(f){const{gen:c,schema:h,it:d}=f,{baseId:m,schemaEnv:g,validateName:y,opts:b,self:S}=d,{root:w}=g;if((h==="#"||h==="#/")&&m===w.baseId)return k();const C=a.resolveRef.call(S,w,m,h);if(C===void 0)throw new t.default(d.opts.uriResolver,m,h);if(C instanceof a.SchemaEnv)return _(C);return D(C);function k(){if(g===w)return s(f,y,g,g.$async);const T=c.scopeValue("root",{ref:w});return s(f,(0,r._)`${T}.validate`,w,w.$async)}function _(T){const A=l(f,T);s(f,A,T,T.$async)}function D(T){const A=c.scopeValue("schema",b.code.source===!0?{ref:T,code:(0,r.stringify)(T)}:{ref:T}),M=c.name("valid"),E=f.subschema({schema:T,dataTypes:[],schemaPath:r.nil,topSchemaRef:A,errSchemaPath:h},M);f.mergeEvaluated(E),f.ok(M)}}};function l(f,c){const{gen:h}=f;return c.validate?h.scopeValue("validate",{ref:c.validate}):(0,r._)`${h.scopeValue("wrapper",{ref:c})}.validate`}A2.getValidate=l;function s(f,c,h,d){const{gen:m,it:g}=f,{allErrors:y,schemaEnv:b,opts:S}=g,w=S.passContext?n.default.this:r.nil;d?C():k();function C(){if(!b.$async)throw new Error("async schema referenced by sync schema");const T=m.let("valid");m.try(()=>{m.code((0,r._)`await ${(0,e.callValidateCode)(f,c,w)}`),D(c),y||m.assign(T,!0)},A=>{m.if((0,r._)`!(${A} instanceof ${g.ValidationError})`,()=>m.throw(A)),_(A),y||m.assign(T,!1)}),f.ok(T)}function k(){f.result((0,e.callValidateCode)(f,c,w),()=>D(c),()=>_(c))}function _(T){const A=(0,r._)`${T}.errors`;m.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${A} : ${n.default.vErrors}.concat(${A})`),m.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function D(T){var A;if(!g.opts.unevaluated)return;const M=(A=h==null?void 0:h.validate)===null||A===void 0?void 0:A.evaluated;if(g.props!==!0)if(M&&!M.dynamicProps)M.props!==void 0&&(g.props=i.mergeEvaluated.props(m,M.props,g.props));else{const E=m.var("props",(0,r._)`${T}.evaluated.props`);g.props=i.mergeEvaluated.props(m,E,g.props,r.Name)}if(g.items!==!0)if(M&&!M.dynamicItems)M.items!==void 0&&(g.items=i.mergeEvaluated.items(m,M.items,g.items));else{const E=m.var("items",(0,r._)`${T}.evaluated.items`);g.items=i.mergeEvaluated.items(m,E,g.items,r.Name)}}}return A2.callRef=s,A2.default=o,A2}var kE;function Yve(){if(kE)return D5;kE=1,Object.defineProperty(D5,"__esModule",{value:!0});const t=Uve(),e=Gve(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return D5.default=r,D5}var T5={},M5={},_E;function Xve(){if(_E)return M5;_E=1,Object.defineProperty(M5,"__esModule",{value:!0});const t=Fr(),e=t.operators,r={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},n={message:({keyword:i,schemaCode:o})=>(0,t.str)`must be ${r[i].okStr} ${o}`,params:({keyword:i,schemaCode:o})=>(0,t._)`{comparison: ${r[i].okStr}, limit: ${o}}`},a={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(i){const{keyword:o,data:l,schemaCode:s}=i;i.fail$data((0,t._)`${l} ${r[o].fail} ${s} || isNaN(${l})`)}};return M5.default=a,M5}var E5={},OE;function Kve(){if(OE)return E5;OE=1,Object.defineProperty(E5,"__esModule",{value:!0});const t=Fr(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,t._)`{multipleOf: ${n}}`},code(n){const{gen:a,data:i,schemaCode:o,it:l}=n,s=l.opts.multipleOfPrecision,f=a.let("res"),c=s?(0,t._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${s}`:(0,t._)`${f} !== parseInt(${f})`;n.fail$data((0,t._)`(${o} === 0 || (${f} = ${i}/${o}, ${c}))`)}};return E5.default=r,E5}var j5={},L5={},DE;function Jve(){if(DE)return L5;DE=1,Object.defineProperty(L5,"__esModule",{value:!0});function t(e){const r=e.length;let n=0,a=0,i;for(;a<r;)n++,i=e.charCodeAt(a++),i>=55296&&i<=56319&&a<r&&(i=e.charCodeAt(a),(i&64512)===56320&&a++);return n}return L5.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',L5}var AE;function Zve(){if(AE)return j5;AE=1,Object.defineProperty(j5,"__esModule",{value:!0});const t=Fr(),e=an(),r=Jve(),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:o}){const l=i==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${l} than ${o} characters`},params:({schemaCode:i})=>(0,t._)`{limit: ${i}}`},code(i){const{keyword:o,data:l,schemaCode:s,it:f}=i,c=o==="maxLength"?t.operators.GT:t.operators.LT,h=f.opts.unicode===!1?(0,t._)`${l}.length`:(0,t._)`${(0,e.useFunc)(i.gen,r.default)}(${l})`;i.fail$data((0,t._)`${h} ${c} ${s}`)}};return j5.default=a,j5}var N5={},TE;function Qve(){if(TE)return N5;TE=1,Object.defineProperty(N5,"__esModule",{value:!0});const t=qo(),e=Fr(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:a})=>(0,e.str)`must match pattern "${a}"`,params:({schemaCode:a})=>(0,e._)`{pattern: ${a}}`},code(a){const{data:i,$data:o,schema:l,schemaCode:s,it:f}=a,c=f.opts.unicodeRegExp?"u":"",h=o?(0,e._)`(new RegExp(${s}, ${c}))`:(0,t.usePattern)(a,l);a.fail$data((0,e._)`!${h}.test(${i})`)}};return N5.default=n,N5}var I5={},ME;function ebe(){if(ME)return I5;ME=1,Object.defineProperty(I5,"__esModule",{value:!0});const t=Fr(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:a}){const i=n==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${i} than ${a} properties`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:a,data:i,schemaCode:o}=n,l=a==="maxProperties"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`Object.keys(${i}).length ${l} ${o}`)}};return I5.default=r,I5}var P5={},EE;function tbe(){if(EE)return P5;EE=1,Object.defineProperty(P5,"__esModule",{value:!0});const t=qo(),e=Fr(),r=an(),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,e.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,e._)`{missingProperty: ${i}}`},code(i){const{gen:o,schema:l,schemaCode:s,data:f,$data:c,it:h}=i,{opts:d}=h;if(!c&&l.length===0)return;const m=l.length>=d.loopRequired;if(h.allErrors?g():y(),d.strictRequired){const w=i.parentSchema.properties,{definedProperties:C}=i.it;for(const k of l)if((w==null?void 0:w[k])===void 0&&!C.has(k)){const _=h.schemaEnv.baseId+h.errSchemaPath,D=`required property "${k}" is not defined at "${_}" (strictRequired)`;(0,r.checkStrictMode)(h,D,h.opts.strictRequired)}}function g(){if(m||c)i.block$data(e.nil,b);else for(const w of l)(0,t.checkReportMissingProp)(i,w)}function y(){const w=o.let("missing");if(m||c){const C=o.let("valid",!0);i.block$data(C,()=>S(w,C)),i.ok(C)}else o.if((0,t.checkMissingProp)(i,l,w)),(0,t.reportMissingProp)(i,w),o.else()}function b(){o.forOf("prop",s,w=>{i.setParams({missingProperty:w}),o.if((0,t.noPropertyInData)(o,f,w,d.ownProperties),()=>i.error())})}function S(w,C){i.setParams({missingProperty:w}),o.forOf(w,s,()=>{o.assign(C,(0,t.propertyInData)(o,f,w,d.ownProperties)),o.if((0,e.not)(C),()=>{i.error(),o.break()})},e.nil)}}};return P5.default=a,P5}var R5={},jE;function rbe(){if(jE)return R5;jE=1,Object.defineProperty(R5,"__esModule",{value:!0});const t=Fr(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:a}){const i=n==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${i} than ${a} items`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:a,data:i,schemaCode:o}=n,l=a==="maxItems"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`${i}.length ${l} ${o}`)}};return R5.default=r,R5}var $5={},B5={},LE;function vw(){if(LE)return B5;LE=1,Object.defineProperty(B5,"__esModule",{value:!0});const t=pb();return t.code='require("ajv/dist/runtime/equal").default',B5.default=t,B5}var NE;function nbe(){if(NE)return $5;NE=1,Object.defineProperty($5,"__esModule",{value:!0});const t=$c(),e=Fr(),r=an(),n=vw(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:o,j:l}})=>(0,e.str)`must NOT have duplicate items (items ## ${l} and ${o} are identical)`,params:({params:{i:o,j:l}})=>(0,e._)`{i: ${o}, j: ${l}}`},code(o){const{gen:l,data:s,$data:f,schema:c,parentSchema:h,schemaCode:d,it:m}=o;if(!f&&!c)return;const g=l.let("valid"),y=h.items?(0,t.getSchemaTypes)(h.items):[];o.block$data(g,b,(0,e._)`${d} === false`),o.ok(g);function b(){const k=l.let("i",(0,e._)`${s}.length`),_=l.let("j");o.setParams({i:k,j:_}),l.assign(g,!0),l.if((0,e._)`${k} > 1`,()=>(S()?w:C)(k,_))}function S(){return y.length>0&&!y.some(k=>k==="object"||k==="array")}function w(k,_){const D=l.name("item"),T=(0,t.checkDataTypes)(y,D,m.opts.strictNumbers,t.DataType.Wrong),A=l.const("indices",(0,e._)`{}`);l.for((0,e._)`;${k}--;`,()=>{l.let(D,(0,e._)`${s}[${k}]`),l.if(T,(0,e._)`continue`),y.length>1&&l.if((0,e._)`typeof ${D} == "string"`,(0,e._)`${D} += "_"`),l.if((0,e._)`typeof ${A}[${D}] == "number"`,()=>{l.assign(_,(0,e._)`${A}[${D}]`),o.error(),l.assign(g,!1).break()}).code((0,e._)`${A}[${D}] = ${k}`)})}function C(k,_){const D=(0,r.useFunc)(l,n.default),T=l.name("outer");l.label(T).for((0,e._)`;${k}--;`,()=>l.for((0,e._)`${_} = ${k}; ${_}--;`,()=>l.if((0,e._)`${D}(${s}[${k}], ${s}[${_}])`,()=>{o.error(),l.assign(g,!1).break(T)})))}}};return $5.default=i,$5}var V5={},IE;function abe(){if(IE)return V5;IE=1,Object.defineProperty(V5,"__esModule",{value:!0});const t=Fr(),e=an(),r=vw(),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,t._)`{allowedValue: ${i}}`},code(i){const{gen:o,data:l,$data:s,schemaCode:f,schema:c}=i;s||c&&typeof c=="object"?i.fail$data((0,t._)`!${(0,e.useFunc)(o,r.default)}(${l}, ${f})`):i.fail((0,t._)`${c} !== ${l}`)}};return V5.default=a,V5}var F5={},PE;function ibe(){if(PE)return F5;PE=1,Object.defineProperty(F5,"__esModule",{value:!0});const t=Fr(),e=an(),r=vw(),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,t._)`{allowedValues: ${i}}`},code(i){const{gen:o,data:l,$data:s,schema:f,schemaCode:c,it:h}=i;if(!s&&f.length===0)throw new Error("enum must have non-empty array");const d=f.length>=h.opts.loopEnum;let m;const g=()=>m??(m=(0,e.useFunc)(o,r.default));let y;if(d||s)y=o.let("valid"),i.block$data(y,b);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const w=o.const("vSchema",c);y=(0,t.or)(...f.map((C,k)=>S(w,k)))}i.pass(y);function b(){o.assign(y,!1),o.forOf("v",c,w=>o.if((0,t._)`${g()}(${l}, ${w})`,()=>o.assign(y,!0).break()))}function S(w,C){const k=f[C];return typeof k=="object"&&k!==null?(0,t._)`${g()}(${l}, ${w}[${C}])`:(0,t._)`${l} === ${k}`}}};return F5.default=a,F5}var RE;function obe(){if(RE)return T5;RE=1,Object.defineProperty(T5,"__esModule",{value:!0});const t=Xve(),e=Kve(),r=Zve(),n=Qve(),a=ebe(),i=tbe(),o=rbe(),l=nbe(),s=abe(),f=ibe(),c=[t.default,e.default,r.default,n.default,a.default,i.default,o.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},s.default,f.default];return T5.default=c,T5}var z5={},i6={},$E;function wq(){if($E)return i6;$E=1,Object.defineProperty(i6,"__esModule",{value:!0}),i6.validateAdditionalItems=void 0;const t=Fr(),e=an(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,t.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,t._)`{limit: ${i}}`},code(i){const{parentSchema:o,it:l}=i,{items:s}=o;if(!Array.isArray(s)){(0,e.checkStrictMode)(l,'"additionalItems" is ignored when "items" is not an array of schemas');return}a(i,s)}};function a(i,o){const{gen:l,schema:s,data:f,keyword:c,it:h}=i;h.items=!0;const d=l.const("len",(0,t._)`${f}.length`);if(s===!1)i.setParams({len:o.length}),i.pass((0,t._)`${d} <= ${o.length}`);else if(typeof s=="object"&&!(0,e.alwaysValidSchema)(h,s)){const g=l.var("valid",(0,t._)`${d} <= ${o.length}`);l.if((0,t.not)(g),()=>m(g)),i.ok(g)}function m(g){l.forRange("i",o.length,d,y=>{i.subschema({keyword:c,dataProp:y,dataPropType:e.Type.Num},g),h.allErrors||l.if((0,t.not)(g),()=>l.break())})}}return i6.validateAdditionalItems=a,i6.default=n,i6}var H5={},o6={},BE;function Sq(){if(BE)return o6;BE=1,Object.defineProperty(o6,"__esModule",{value:!0}),o6.validateTuple=void 0;const t=Fr(),e=an(),r=qo(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:o,it:l}=i;if(Array.isArray(o))return a(i,"additionalItems",o);l.items=!0,!(0,e.alwaysValidSchema)(l,o)&&i.ok((0,r.validateArray)(i))}};function a(i,o,l=i.schema){const{gen:s,parentSchema:f,data:c,keyword:h,it:d}=i;y(f),d.opts.unevaluated&&l.length&&d.items!==!0&&(d.items=e.mergeEvaluated.items(s,l.length,d.items));const m=s.name("valid"),g=s.const("len",(0,t._)`${c}.length`);l.forEach((b,S)=>{(0,e.alwaysValidSchema)(d,b)||(s.if((0,t._)`${g} > ${S}`,()=>i.subschema({keyword:h,schemaProp:S,dataProp:S},m)),i.ok(m))});function y(b){const{opts:S,errSchemaPath:w}=d,C=l.length,k=C===b.minItems&&(C===b.maxItems||b[o]===!1);if(S.strictTuples&&!k){const _=`"${h}" is ${C}-tuple, but minItems or maxItems/${o} are not specified or different at path "${w}"`;(0,e.checkStrictMode)(d,_,S.strictTuples)}}}return o6.validateTuple=a,o6.default=n,o6}var VE;function lbe(){if(VE)return H5;VE=1,Object.defineProperty(H5,"__esModule",{value:!0});const t=Sq(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return H5.default=e,H5}var q5={},FE;function sbe(){if(FE)return q5;FE=1,Object.defineProperty(q5,"__esModule",{value:!0});const t=Fr(),e=an(),r=qo(),n=wq(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){const{schema:l,parentSchema:s,it:f}=o,{prefixItems:c}=s;f.items=!0,!(0,e.alwaysValidSchema)(f,l)&&(c?(0,n.validateAdditionalItems)(o,c):o.ok((0,r.validateArray)(o)))}};return q5.default=i,q5}var W5={},zE;function ube(){if(zE)return W5;zE=1,Object.defineProperty(W5,"__esModule",{value:!0});const t=Fr(),e=an(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:a,max:i}})=>i===void 0?(0,t.str)`must contain at least ${a} valid item(s)`:(0,t.str)`must contain at least ${a} and no more than ${i} valid item(s)`,params:({params:{min:a,max:i}})=>i===void 0?(0,t._)`{minContains: ${a}}`:(0,t._)`{minContains: ${a}, maxContains: ${i}}`},code(a){const{gen:i,schema:o,parentSchema:l,data:s,it:f}=a;let c,h;const{minContains:d,maxContains:m}=l;f.opts.next?(c=d===void 0?1:d,h=m):c=1;const g=i.const("len",(0,t._)`${s}.length`);if(a.setParams({min:c,max:h}),h===void 0&&c===0){(0,e.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(h!==void 0&&c>h){(0,e.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),a.fail();return}if((0,e.alwaysValidSchema)(f,o)){let C=(0,t._)`${g} >= ${c}`;h!==void 0&&(C=(0,t._)`${C} && ${g} <= ${h}`),a.pass(C);return}f.items=!0;const y=i.name("valid");h===void 0&&c===1?S(y,()=>i.if(y,()=>i.break())):c===0?(i.let(y,!0),h!==void 0&&i.if((0,t._)`${s}.length > 0`,b)):(i.let(y,!1),b()),a.result(y,()=>a.reset());function b(){const C=i.name("_valid"),k=i.let("count",0);S(C,()=>i.if(C,()=>w(k)))}function S(C,k){i.forRange("i",0,g,_=>{a.subschema({keyword:"contains",dataProp:_,dataPropType:e.Type.Num,compositeRule:!0},C),k()})}function w(C){i.code((0,t._)`${C}++`),h===void 0?i.if((0,t._)`${C} >= ${c}`,()=>i.assign(y,!0).break()):(i.if((0,t._)`${C} > ${h}`,()=>i.assign(y,!1).break()),c===1?i.assign(y,!0):i.if((0,t._)`${C} >= ${c}`,()=>i.assign(y,!0)))}}};return W5.default=n,W5}var $m={},HE;function cbe(){return HE||(HE=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=Fr(),r=an(),n=qo();t.error={message:({params:{property:s,depsCount:f,deps:c}})=>{const h=f===1?"property":"properties";return(0,e.str)`must have ${h} ${c} when property ${s} is present`},params:({params:{property:s,depsCount:f,deps:c,missingProperty:h}})=>(0,e._)`{property: ${s},
283
283
  missingProperty: ${h},
284
284
  depsCount: ${f},
285
- deps: ${c}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(s){const[f,c]=i(s);o(s,f),l(s,c)}};function i({schema:s}){const f={},c={};for(const h in s){if(h==="__proto__")continue;const d=Array.isArray(s[h])?f:c;d[h]=s[h]}return[f,c]}function o(s,f=s.schema){const{gen:c,data:h,it:d}=s;if(Object.keys(f).length===0)return;const m=c.let("missing");for(const g in f){const y=f[g];if(y.length===0)continue;const b=(0,n.propertyInData)(c,h,g,d.opts.ownProperties);s.setParams({property:g,depsCount:y.length,deps:y.join(", ")}),d.allErrors?c.if(b,()=>{for(const S of y)(0,n.checkReportMissingProp)(s,S)}):(c.if((0,e._)`${b} && (${(0,n.checkMissingProp)(s,y,m)})`),(0,n.reportMissingProp)(s,m),c.else())}}t.validatePropertyDeps=o;function l(s,f=s.schema){const{gen:c,data:h,keyword:d,it:m}=s,g=c.name("valid");for(const y in f)(0,r.alwaysValidSchema)(m,f[y])||(c.if((0,n.propertyInData)(c,h,y,m.opts.ownProperties),()=>{const b=s.subschema({keyword:d,schemaProp:y},g);s.mergeValidEvaluated(b,g)},()=>c.var(g,!0)),s.ok(g))}t.validateSchemaDeps=l,t.default=a}($m)),$m}var U5={},qE;function fbe(){if(qE)return U5;qE=1,Object.defineProperty(U5,"__esModule",{value:!0});const t=Fr(),e=an(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:a})=>(0,t._)`{propertyName: ${a.propertyName}}`},code(a){const{gen:i,schema:o,data:l,it:s}=a;if((0,e.alwaysValidSchema)(s,o))return;const f=i.name("valid");i.forIn("key",l,c=>{a.setParams({propertyName:c}),a.subschema({keyword:"propertyNames",data:c,dataTypes:["string"],propertyName:c,compositeRule:!0},f),i.if((0,t.not)(f),()=>{a.error(!0),s.allErrors||i.break()})}),a.ok(f)}};return U5.default=n,U5}var G5={},WE;function Cq(){if(WE)return G5;WE=1,Object.defineProperty(G5,"__esModule",{value:!0});const t=qo(),e=Fr(),r=Q2(),n=an(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:o})=>(0,e._)`{additionalProperty: ${o.additionalProperty}}`},code(o){const{gen:l,schema:s,parentSchema:f,data:c,errsCount:h,it:d}=o;if(!h)throw new Error("ajv implementation error");const{allErrors:m,opts:g}=d;if(d.props=!0,g.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(d,s))return;const y=(0,t.allSchemaProperties)(f.properties),b=(0,t.allSchemaProperties)(f.patternProperties);S(),o.ok((0,e._)`${h} === ${r.default.errors}`);function S(){l.forIn("key",c,D=>{!y.length&&!b.length?k(D):l.if(w(D),()=>k(D))})}function w(D){let T;if(y.length>8){const A=(0,n.schemaRefOrVal)(d,f.properties,"properties");T=(0,t.isOwnProperty)(l,A,D)}else y.length?T=(0,e.or)(...y.map(A=>(0,e._)`${D} === ${A}`)):T=e.nil;return b.length&&(T=(0,e.or)(T,...b.map(A=>(0,e._)`${(0,t.usePattern)(o,A)}.test(${D})`))),(0,e.not)(T)}function C(D){l.code((0,e._)`delete ${c}[${D}]`)}function k(D){if(g.removeAdditional==="all"||g.removeAdditional&&s===!1){C(D);return}if(s===!1){o.setParams({additionalProperty:D}),o.error(),m||l.break();return}if(typeof s=="object"&&!(0,n.alwaysValidSchema)(d,s)){const T=l.name("valid");g.removeAdditional==="failing"?(_(D,T,!1),l.if((0,e.not)(T),()=>{o.reset(),C(D)})):(_(D,T),m||l.if((0,e.not)(T),()=>l.break()))}}function _(D,T,A){const M={keyword:"additionalProperties",dataProp:D,dataPropType:n.Type.Str};A===!1&&Object.assign(M,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(M,T)}}};return G5.default=i,G5}var Y5={},UE;function dbe(){if(UE)return Y5;UE=1,Object.defineProperty(Y5,"__esModule",{value:!0});const t=Hf(),e=qo(),r=an(),n=Cq(),a={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:o,schema:l,parentSchema:s,data:f,it:c}=i;c.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(c,n.default,"additionalProperties"));const h=(0,e.allSchemaProperties)(l);for(const b of h)c.definedProperties.add(b);c.opts.unevaluated&&h.length&&c.props!==!0&&(c.props=r.mergeEvaluated.props(o,(0,r.toHash)(h),c.props));const d=h.filter(b=>!(0,r.alwaysValidSchema)(c,l[b]));if(d.length===0)return;const m=o.name("valid");for(const b of d)g(b)?y(b):(o.if((0,e.propertyInData)(o,f,b,c.opts.ownProperties)),y(b),c.allErrors||o.else().var(m,!0),o.endIf()),i.it.definedProperties.add(b),i.ok(m);function g(b){return c.opts.useDefaults&&!c.compositeRule&&l[b].default!==void 0}function y(b){i.subschema({keyword:"properties",schemaProp:b,dataProp:b},m)}}};return Y5.default=a,Y5}var X5={},GE;function hbe(){if(GE)return X5;GE=1,Object.defineProperty(X5,"__esModule",{value:!0});const t=qo(),e=Fr(),r=an(),n=an(),a={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:o,schema:l,data:s,parentSchema:f,it:c}=i,{opts:h}=c,d=(0,t.allSchemaProperties)(l),m=d.filter(k=>(0,r.alwaysValidSchema)(c,l[k]));if(d.length===0||m.length===d.length&&(!c.opts.unevaluated||c.props===!0))return;const g=h.strictSchema&&!h.allowMatchingProperties&&f.properties,y=o.name("valid");c.props!==!0&&!(c.props instanceof e.Name)&&(c.props=(0,n.evaluatedPropsToName)(o,c.props));const{props:b}=c;S();function S(){for(const k of d)g&&w(k),c.allErrors?C(k):(o.var(y,!0),C(k),o.if(y))}function w(k){for(const _ in g)new RegExp(k).test(_)&&(0,r.checkStrictMode)(c,`property ${_} matches pattern ${k} (use allowMatchingProperties)`)}function C(k){o.forIn("key",s,_=>{o.if((0,e._)`${(0,t.usePattern)(i,k)}.test(${_})`,()=>{const D=m.includes(k);D||i.subschema({keyword:"patternProperties",schemaProp:k,dataProp:_,dataPropType:n.Type.Str},y),c.opts.unevaluated&&b!==!0?o.assign((0,e._)`${b}[${_}]`,!0):!D&&!c.allErrors&&o.if((0,e.not)(y),()=>o.break())})})}}};return X5.default=a,X5}var K5={},YE;function pbe(){if(YE)return K5;YE=1,Object.defineProperty(K5,"__esModule",{value:!0});const t=an(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:a,it:i}=r;if((0,t.alwaysValidSchema)(i,a)){r.fail();return}const o=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),r.failResult(o,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return K5.default=e,K5}var J5={},XE;function mbe(){if(XE)return J5;XE=1,Object.defineProperty(J5,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:qo().validateUnion,error:{message:"must match a schema in anyOf"}};return J5.default=e,J5}var Z5={},KE;function gbe(){if(KE)return Z5;KE=1,Object.defineProperty(Z5,"__esModule",{value:!0});const t=Fr(),e=an(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:a})=>(0,t._)`{passingSchemas: ${a.passing}}`},code(a){const{gen:i,schema:o,parentSchema:l,it:s}=a;if(!Array.isArray(o))throw new Error("ajv implementation error");if(s.opts.discriminator&&l.discriminator)return;const f=o,c=i.let("valid",!1),h=i.let("passing",null),d=i.name("_valid");a.setParams({passing:h}),i.block(m),a.result(c,()=>a.reset(),()=>a.error(!0));function m(){f.forEach((g,y)=>{let b;(0,e.alwaysValidSchema)(s,g)?i.var(d,!0):b=a.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},d),y>0&&i.if((0,t._)`${d} && ${c}`).assign(c,!1).assign(h,(0,t._)`[${h}, ${y}]`).else(),i.if(d,()=>{i.assign(c,!0),i.assign(h,y),b&&a.mergeEvaluated(b,t.Name)})})}}};return Z5.default=n,Z5}var Q5={},JE;function ybe(){if(JE)return Q5;JE=1,Object.defineProperty(Q5,"__esModule",{value:!0});const t=an(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:a,it:i}=r;if(!Array.isArray(a))throw new Error("ajv implementation error");const o=n.name("valid");a.forEach((l,s)=>{if((0,t.alwaysValidSchema)(i,l))return;const f=r.subschema({keyword:"allOf",schemaProp:s},o);r.ok(o),r.mergeEvaluated(f)})}};return Q5.default=e,Q5}var eu={},ZE;function vbe(){if(ZE)return eu;ZE=1,Object.defineProperty(eu,"__esModule",{value:!0});const t=Fr(),e=an(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,t.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,t._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:o,parentSchema:l,it:s}=i;l.then===void 0&&l.else===void 0&&(0,e.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const f=a(s,"then"),c=a(s,"else");if(!f&&!c)return;const h=o.let("valid",!0),d=o.name("_valid");if(m(),i.reset(),f&&c){const y=o.let("ifClause");i.setParams({ifClause:y}),o.if(d,g("then",y),g("else",y))}else f?o.if(d,g("then")):o.if((0,t.not)(d),g("else"));i.pass(h,()=>i.error(!0));function m(){const y=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);i.mergeEvaluated(y)}function g(y,b){return()=>{const S=i.subschema({keyword:y},d);o.assign(h,d),i.mergeValidEvaluated(S,h),b?o.assign(b,(0,t._)`${y}`):i.setParams({ifClause:y})}}}};function a(i,o){const l=i.schema[o];return l!==void 0&&!(0,e.alwaysValidSchema)(i,l)}return eu.default=n,eu}var tu={},QE;function bbe(){if(QE)return tu;QE=1,Object.defineProperty(tu,"__esModule",{value:!0});const t=an(),e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:a}){n.if===void 0&&(0,t.checkStrictMode)(a,`"${r}" without "if" is ignored`)}};return tu.default=e,tu}var ej;function xbe(){if(ej)return z5;ej=1,Object.defineProperty(z5,"__esModule",{value:!0});const t=wq(),e=lbe(),r=Sq(),n=sbe(),a=ube(),i=cbe(),o=fbe(),l=Cq(),s=dbe(),f=hbe(),c=pbe(),h=mbe(),d=gbe(),m=ybe(),g=vbe(),y=bbe();function b(S=!1){const w=[c.default,h.default,d.default,m.default,g.default,y.default,o.default,l.default,i.default,s.default,f.default];return S?w.push(e.default,n.default):w.push(t.default,r.default),w.push(a.default),w}return z5.default=b,z5}var ru={},nu={},tj;function wbe(){if(tj)return nu;tj=1,Object.defineProperty(nu,"__esModule",{value:!0});const t=Fr(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,t._)`{format: ${n}}`},code(n,a){const{gen:i,data:o,$data:l,schema:s,schemaCode:f,it:c}=n,{opts:h,errSchemaPath:d,schemaEnv:m,self:g}=c;if(!h.validateFormats)return;l?y():b();function y(){const S=i.scopeValue("formats",{ref:g.formats,code:h.code.formats}),w=i.const("fDef",(0,t._)`${S}[${f}]`),C=i.let("fType"),k=i.let("format");i.if((0,t._)`typeof ${w} == "object" && !(${w} instanceof RegExp)`,()=>i.assign(C,(0,t._)`${w}.type || "string"`).assign(k,(0,t._)`${w}.validate`),()=>i.assign(C,(0,t._)`"string"`).assign(k,w)),n.fail$data((0,t.or)(_(),D()));function _(){return h.strictSchema===!1?t.nil:(0,t._)`${f} && !${k}`}function D(){const T=m.$async?(0,t._)`(${w}.async ? await ${k}(${o}) : ${k}(${o}))`:(0,t._)`${k}(${o})`,A=(0,t._)`(typeof ${k} == "function" ? ${T} : ${k}.test(${o}))`;return(0,t._)`${k} && ${k} !== true && ${C} === ${a} && !${A}`}}function b(){const S=g.formats[s];if(!S){_();return}if(S===!0)return;const[w,C,k]=D(S);w===a&&n.pass(T());function _(){if(h.strictSchema===!1){g.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${s}" ignored in schema at path "${d}"`}}function D(A){const M=A instanceof RegExp?(0,t.regexpCode)(A):h.code.formats?(0,t._)`${h.code.formats}${(0,t.getProperty)(s)}`:void 0,E=i.scopeValue("formats",{key:s,ref:A,code:M});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,t._)`${E}.validate`]:["string",A,E]}function T(){if(typeof S=="object"&&!(S instanceof RegExp)&&S.async){if(!m.$async)throw new Error("async format in sync schema");return(0,t._)`await ${k}(${o})`}return typeof C=="function"?(0,t._)`${k}(${o})`:(0,t._)`${k}.test(${o})`}}}};return nu.default=r,nu}var rj;function Sbe(){if(rj)return ru;rj=1,Object.defineProperty(ru,"__esModule",{value:!0});const e=[wbe().default];return ru.default=e,ru}var k3={},nj;function Cbe(){return nj||(nj=1,Object.defineProperty(k3,"__esModule",{value:!0}),k3.contentVocabulary=k3.metadataVocabulary=void 0,k3.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],k3.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),k3}var aj;function kbe(){if(aj)return O5;aj=1,Object.defineProperty(O5,"__esModule",{value:!0});const t=Yve(),e=obe(),r=xbe(),n=Sbe(),a=Cbe(),i=[t.default,e.default,(0,r.default)(),n.default,a.metadataVocabulary,a.contentVocabulary];return O5.default=i,O5}var au={},El={},ij;function _be(){if(ij)return El;ij=1,Object.defineProperty(El,"__esModule",{value:!0}),El.DiscrError=void 0;var t;return function(e){e.Tag="tag",e.Mapping="mapping"}(t||(El.DiscrError=t={})),El}var oj;function Obe(){if(oj)return au;oj=1,Object.defineProperty(au,"__esModule",{value:!0});const t=Fr(),e=_be(),r=yw(),n=qf(),a=an(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:l,tagName:s}})=>l===e.DiscrError.Tag?`tag "${s}" must be string`:`value of tag "${s}" must be in oneOf`,params:({params:{discrError:l,tag:s,tagName:f}})=>(0,t._)`{error: ${l}, tag: ${f}, tagValue: ${s}}`},code(l){const{gen:s,data:f,schema:c,parentSchema:h,it:d}=l,{oneOf:m}=h;if(!d.opts.discriminator)throw new Error("discriminator: requires discriminator option");const g=c.propertyName;if(typeof g!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!m)throw new Error("discriminator: requires oneOf keyword");const y=s.let("valid",!1),b=s.const("tag",(0,t._)`${f}${(0,t.getProperty)(g)}`);s.if((0,t._)`typeof ${b} == "string"`,()=>S(),()=>l.error(!1,{discrError:e.DiscrError.Tag,tag:b,tagName:g})),l.ok(y);function S(){const k=C();s.if(!1);for(const _ in k)s.elseIf((0,t._)`${b} === ${_}`),s.assign(y,w(k[_]));s.else(),l.error(!1,{discrError:e.DiscrError.Mapping,tag:b,tagName:g}),s.endIf()}function w(k){const _=s.name("valid"),D=l.subschema({keyword:"oneOf",schemaProp:k},_);return l.mergeEvaluated(D,t.Name),_}function C(){var k;const _={},D=A(h);let T=!0;for(let N=0;N<m.length;N++){let Y=m[N];if(Y!=null&&Y.$ref&&!(0,a.schemaHasRulesButRef)(Y,d.self.RULES)){const K=Y.$ref;if(Y=r.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,K),Y instanceof r.SchemaEnv&&(Y=Y.schema),Y===void 0)throw new n.default(d.opts.uriResolver,d.baseId,K)}const ne=(k=Y==null?void 0:Y.properties)===null||k===void 0?void 0:k[g];if(typeof ne!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${g}"`);T=T&&(D||A(Y)),M(ne,N)}if(!T)throw new Error(`discriminator: "${g}" must be required`);return _;function A({required:N}){return Array.isArray(N)&&N.includes(g)}function M(N,Y){if(N.const)E(N.const,Y);else if(N.enum)for(const ne of N.enum)E(ne,Y);else throw new Error(`discriminator: "properties/${g}" must have "const" or "enum"`)}function E(N,Y){if(typeof N!="string"||N in _)throw new Error(`discriminator: "${g}" values must be unique strings`);_[N]=Y}}}};return au.default=o,au}const Dbe="http://json-schema.org/draft-07/schema#",Abe="http://json-schema.org/draft-07/schema#",Tbe="Core schema meta-schema",Mbe={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Ebe=["object","boolean"],jbe={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},Lbe={$schema:Dbe,$id:Abe,title:Tbe,definitions:Mbe,type:Ebe,properties:jbe,default:!0};var lj;function Nbe(){return lj||(lj=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=Wve(),n=kbe(),a=Obe(),i=Lbe,o=["/properties"],l="http://json-schema.org/draft-07/schema";class s extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(g=>this.addVocabulary(g)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const g=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(g,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}e.Ajv=s,t.exports=e=s,t.exports.Ajv=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var f=Hf();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var c=Fr();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var h=gw();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return h.default}});var d=qf();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(w5,w5.exports)),w5.exports}var Ibe=Nbe();const Pbe=_a(Ibe),jo=[{graphName:"Bar graph",graphID:"barChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!0},{graphName:"Stacked bar graph",graphID:"stackedBarChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Grouped bar graph",graphID:"groupedBarChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated bar chart",graphID:"animatedBarChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated bar chart",graphID:"radarChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated stacked bar chart",graphID:"animatedStackedBarChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated grouped bar chart",graphID:"animatedGroupedBarChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Bee swarm chart",graphID:"beeSwarmChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Butterfly chart",graphID:"butterflyChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated butterfly chart",graphID:"animatedButterflyChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Circle packing",graphID:"circlePacking",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!0},{graphName:"Data table",graphID:"dataTable",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Pie/donut chart",graphID:"donutChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!0},{graphName:"Dumbbell chart",graphID:"dumbbellChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated dumbbell chart",graphID:"animatedDumbbellChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Heat map",graphID:"heatMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Histogram",graphID:"histogram",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Line chart",graphID:"lineChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Multi-line chart",graphID:"multiLineChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Multi-line chart alternative",graphID:"multiLineChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Difference line chart",graphID:"differenceLineChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Dual-axes line chart",graphID:"dualAxisLineChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Line chart with interval",graphID:"lineChartWithConfidenceInterval",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Spark line",graphID:"sparkLine",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Choropleth map",graphID:"choroplethMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Bi-variate choropleth map",graphID:"biVariateChoroplethMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Dot density map",graphID:"dotDensityMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated choropleth map",graphID:"animatedChoroplethMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated bi-variate choropleth map",graphID:"animatedBiVariateChoroplethMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated dot density map",graphID:"animatedDotDensityMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"GeoHub map with comparison",graphID:"geoHubCompareMap",availableInGriddedGraph:!1,geoHubMapPresentation:!0,availableInWideToLongFormat:!1},{graphName:"GeoHub map",graphID:"geoHubMap",availableInGriddedGraph:!1,geoHubMapPresentation:!0,availableInWideToLongFormat:!1},{graphName:"GeoHub map with layer selection",graphID:"geoHubMapWithLayerSelection",availableInGriddedGraph:!1,geoHubMapPresentation:!0,availableInWideToLongFormat:!1},{graphName:"Pareto chart",graphID:"paretoChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Scatter plot",graphID:"scatterPlot",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated scatter plot",graphID:"animatedScatterPlot",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Slope chart",graphID:"slopeChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Stacked area chart/area chart",graphID:"stackedAreaChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Statistic card",graphID:"statCard",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Strip chart",graphID:"stripChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Tree map",graphID:"treeMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!0},{graphName:"Unit chart",graphID:"unitChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!0},{graphName:"Sankey chart",graphID:"sankeyChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Data cards list",graphID:"dataCards",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Radar chart",graphID:"radarChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1}],Rbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{oneOf:[{type:"number"},{type:"null"}]},color:{type:"string"},data:{type:"object"}},required:["label"]}},$be={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{oneOf:[{type:"number"},{type:"null"}]},color:{type:"string"},data:{type:"object"}},required:["label"]}},Bbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},values:{type:"array",items:{type:"number"}},color:{type:"string"},data:{type:"object"}},required:["values"]}},Vbe={type:"array",items:{type:"object",properties:{source:{oneOf:[{type:"string"},{type:"number"}]},target:{oneOf:[{type:"string"},{type:"number"}]},value:{type:"number"},data:{type:"object"}},required:["source","target","value"]}},Fbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},leftBar:{oneOf:[{type:"number"},{type:"null"}]},rightBar:{oneOf:[{type:"number"},{type:"null"}]},data:{type:"object"}},required:["label"]}},zbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},leftBar:{oneOf:[{type:"number"},{type:"null"}]},rightBar:{oneOf:[{type:"number"},{type:"null"}]},date:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["label","date"]}},Hbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{oneOf:[{type:"number"},{type:"null"}]},color:{type:"string"},data:{type:"object"}},required:["label"]}},qbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]}},data:{type:"object"}},required:["label","size"]}},Wbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]}},data:{type:"object"}},required:["label","size"]}},Ube={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{oneOf:[{type:"number"},{type:"null"}]},date:{oneOf:[{type:"string"},{type:"number"}]},color:{type:"string"},data:{type:"object"}},required:["label","date"]}},Gbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]}},date:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["label","size","date"]}},Ybe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]}},date:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["label","size","date"]}},Xbe={type:"array",items:{type:"object",properties:{x:{type:"array",items:{oneOf:[{type:"null"},{type:"number"}]}},label:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["x","label"]}},Kbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},value:{type:"number"},data:{type:"object"}},required:["value","label"]}},Jbe={type:"array",items:{type:"object",properties:{x:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]}},label:{oneOf:[{type:"string"},{type:"number"}]},date:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["x","label","date"]}},Zbe={type:"array",items:{type:"object",properties:{size:{type:"number"},label:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["size","label"]}},Qbe={type:"array",items:{type:"object",properties:{value:{type:"number"},data:{type:"object"}},required:["value"]}},exe={type:"array",items:{type:"object",properties:{x:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},id:{type:"string"},data:{type:"object"}},required:["id"]}},txe={type:"array",items:{type:"object",properties:{x:{oneOf:[{type:"number"},{type:"null"}]},y:{oneOf:[{type:"number"},{type:"null"}]},id:{type:"string"},data:{type:"object"}},required:["id"]}},rxe={type:"array",items:{type:"object",properties:{x:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},id:{type:"string"},date:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["id","date"]}},nxe={type:"array",items:{type:"object",properties:{x:{oneOf:[{type:"number"},{type:"null"}]},y:{oneOf:[{type:"number"},{type:"null"}]},id:{type:"string"},data:{type:"object"},date:{oneOf:[{type:"string"},{type:"number"}]}},required:["id","date"]}},sj={type:"array",items:{type:"object",properties:{date:{oneOf:[{type:"number"},{type:"string"}]},y:{type:"number"},data:{type:"object"}},required:["date","y"]}},axe={type:"array",items:{type:"object",properties:{date:{oneOf:[{type:"number"},{type:"string"}]},y:{type:"number"},yMin:{type:"number"},yMax:{type:"number"},data:{type:"object"}},required:["date"]}},ixe={type:"array",items:{type:"object",properties:{date:{oneOf:[{type:"number"},{type:"string"}]},y:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]}},data:{type:"object"}},required:["date","y"]}},oxe={type:"array",items:{type:"object",properties:{date:{oneOf:[{type:"number"},{type:"string"}]},y:{oneOf:[{type:"number"},{type:"null"}]},label:{oneOf:[{type:"number"},{type:"string"}]},color:{oneOf:[{type:"number"},{type:"string"}]},data:{type:"object"}},required:["date","y","label"]}},lxe={type:"array",items:{type:"object",properties:{date:{oneOf:[{type:"number"},{type:"string"}]},y:{type:"array",items:{type:"number"}},data:{type:"object"}},required:["date","y"]}},sxe={type:"array",items:{type:"object",properties:{x:{oneOf:[{type:"number"},{type:"null"}]},y:{oneOf:[{type:"number"},{type:"null"}]},radius:{type:"number"},color:{type:"string"},label:{oneOf:[{type:"number"},{type:"string"}]},data:{type:"object"}}}},uxe={type:"array",items:{type:"object",properties:{x:{oneOf:[{type:"number"},{type:"null"}]},y:{oneOf:[{type:"number"},{type:"null"}]},radius:{type:"number"},color:{type:"string"},date:{oneOf:[{type:"string"},{type:"number"}]},label:{oneOf:[{type:"number"},{type:"string"}]},data:{type:"object"}},required:["label","date"]}},cxe={type:"array",items:{type:"object",properties:{date:{oneOf:[{type:"number"},{type:"string"}]},y1:{oneOf:[{type:"number"},{type:"null"}]},y2:{oneOf:[{type:"number"},{type:"null"}]},data:{type:"object"}},required:["date"]}},fxe={type:"array",items:{type:"object",properties:{date:{oneOf:[{type:"number"},{type:"string"}]},y1:{oneOf:[{type:"number"}]},y2:{oneOf:[{type:"number"}]},data:{type:"object"}},required:["date","y1","y2"]}},dxe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"number"},{type:"string"}]},bar:{oneOf:[{type:"number"},{type:"null"}]},line:{oneOf:[{type:"number"},{type:"null"}]},data:{type:"object"}},required:["label"]}},hxe={type:"array",items:{type:"object",properties:{lat:{type:"number"},long:{type:"number"},radius:{type:"number"},color:{oneOf:[{type:"string"},{type:"number"}]},label:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["lat","long"]}},pxe={type:"array",items:{type:"object",properties:{lat:{type:"number"},long:{type:"number"},radius:{type:"number"},color:{oneOf:[{type:"string"},{type:"number"}]},label:{oneOf:[{type:"string"},{type:"number"}]},date:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["lat","long","date"]}},mxe={type:"array",items:{type:"object",properties:{y1:{type:"number"},y2:{type:"number"},color:{oneOf:[{type:"string"},{type:"number"}]},label:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["y1","y2","label"]}},gxe={type:"array",items:{type:"object",properties:{row:{type:"string"},column:{type:"string"},value:{oneOf:[{type:"string"},{type:"number"},{type:"null"}]},data:{type:"object"}},required:["row","column"]}},yxe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},position:{type:"number"},radius:{type:"number"},color:{type:"string"},data:{type:"object"}},required:["label","position"]}},vxe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},position:{type:"number"},color:{type:"string"},data:{type:"object"}},required:["label","position"]}},bxe={type:"array",items:{type:"object",properties:{value:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["value"]}},xxe={type:"object",properties:{detailsOnClick:{type:"string"},styles:{type:"object"},classNames:{type:"object"},graphTitle:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},showValues:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},truncateBy:{type:"number"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},tooltip:{type:"string"},graphID:{type:"string"},highlightedSourceDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},highlightedTargetDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},sortNodes:{type:"string",enum:["asc","desc","mostReadable","none"]},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},ariaLabel:{type:"string"},nodePadding:{type:"number"},nodeWidth:{type:"number"},defaultLinkOpacity:{type:"number",minimum:0,maximum:1},sourceTitle:{type:"string"},targetTitle:{type:"string"},fillContainer:{type:"boolean"},animateLinks:{oneOf:[{type:"number"},{type:"boolean"}]},sourceColors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},targetColors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},sourceColorDomain:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},targetColorDomain:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}}}},wxe={type:"object",properties:{detailsOnClick:{type:"string"},styles:{type:"object"},classNames:{type:"object"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},labelOrder:{type:"array",items:{type:"string"}},filterNA:{type:"boolean"},graphTitle:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showValues:{type:"boolean"},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},showColorScale:{type:"boolean"},maxValue:{type:"number"},minValue:{type:"number"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showNAColor:{type:"boolean"},sortData:{type:"string",enum:["asc","desc"]},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},maxBarThickness:{type:"number"},minBarThickness:{type:"number"},maxNumberOfBars:{type:"number"},ariaLabel:{type:"string"},valueColor:{type:"string"},barAxisTitle:{type:"string"},noOfTicks:{type:"number"},orientation:{type:"string",enum:["vertical","horizontal"]}}},Sxe={type:"object",properties:{detailsOnClick:{type:"string"},styles:{type:"object"},classNames:{type:"object"},colors:{type:"array",items:{type:"string"}},labelOrder:{type:"array",items:{type:"string"}},graphTitle:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showTicks:{type:"boolean"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},suffix:{type:"string"},prefix:{type:"string"},showValues:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},maxBarThickness:{type:"number"},ariaLabel:{type:"string"},valueColor:{type:"string"},barAxisTitle:{type:"string"},noOfTicks:{type:"number"},orientation:{type:"string",enum:["vertical","horizontal"]}},required:["colorDomain"]},Cxe={type:"object",properties:{detailsOnClick:{type:"string"},styles:{type:"object"},classNames:{type:"object"},colors:{type:"array",items:{type:"string"}},labelOrder:{type:"array",items:{type:"string"}},graphTitle:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},ariaLabel:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},showValues:{type:"boolean"},showLabels:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},maxValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},sortParameter:{oneOf:[{type:"string",enum:["total"]},{type:"number"}]},maxBarThickness:{type:"number"},minBarThickness:{type:"number"},maxNumberOfBars:{type:"number"},valueColor:{type:"string"},barAxisTitle:{type:"string"},noOfTicks:{type:"number"},orientation:{type:"string",enum:["vertical","horizontal"]}},required:["colorDomain"]},kxe={type:"object",properties:{detailsOnClick:{type:"string"},styles:{type:"object"},classNames:{type:"object"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},ariaLabel:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showValues:{type:"boolean"},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},showColorScale:{type:"boolean"},maxValue:{type:"number"},minValue:{type:"number"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showNAColor:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},autoPlay:{type:"boolean"},autoSort:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},theme:{type:"string",enum:["light","dark"]},maxBarThickness:{type:"number"},minBarThickness:{type:"number"},valueColor:{type:"string"},barAxisTitle:{type:"string"},noOfTicks:{type:"number"},orientation:{type:"string",enum:["vertical","horizontal"]}}},_xe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},orientation:{type:"string",enum:["vertical","horizontal"]},detailsOnClick:{type:"string"},colors:{type:"array",items:{type:"string"}},ariaLabel:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showTicks:{type:"boolean"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},suffix:{type:"string"},prefix:{type:"string"},showValues:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},tooltip:{type:"string"},maxBarThickness:{type:"number"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},theme:{type:"string",enum:["light","dark"]},valueColor:{type:"string"},barAxisTitle:{type:"string"},noOfTicks:{type:"number"}},required:["colorDomain"]},Oxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},orientation:{type:"string",enum:["vertical","horizontal"]},detailsOnClick:{type:"string"},colors:{type:"array",items:{type:"string"}},ariaLabel:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},showValues:{type:"boolean"},showLabels:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},maxValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},theme:{type:"string",enum:["light","dark"]},autoSort:{type:"boolean"},sortParameter:{oneOf:[{type:"string",enum:["total"]},{type:"number"}]},maxBarThickness:{type:"number"},minBarThickness:{type:"number"},valueColor:{type:"string"},barAxisTitle:{type:"string"},noOfTicks:{type:"number"}},required:["colorDomain"]},Dxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},orientation:{type:"string",enum:["vertical","horizontal"]},ariaLabel:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},showColorScale:{type:"boolean"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},radius:{type:"number"},maxRadiusValue:{type:"number"},maxPositionValue:{type:"number"},minPositionValue:{type:"number"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showNAColor:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]}}},Axe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphDescription:{type:"string"},ariaLabel:{type:"string"},leftBarTitle:{type:"string"},rightBarTitle:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},barColors:{type:"array",items:{type:"string"},minItems:2,maxItems:2},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},barPadding:{type:"number"},truncateBy:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},showTicks:{type:"boolean"},showValues:{type:"boolean"},centerGap:{type:"number"},maxValue:{type:"number"},minValue:{type:"number"},showColorScale:{type:"boolean"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]}}},Txe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},ariaLabel:{type:"string"},graphDescription:{type:"string"},leftBarTitle:{type:"string"},rightBarTitle:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},barColors:{type:"array",items:{type:"string"},minItems:2,maxItems:2},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},barPadding:{type:"number"},truncateBy:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},showTicks:{type:"boolean"},showValues:{type:"boolean"},centerGap:{type:"number"},maxValue:{type:"number"},minValue:{type:"number"},showColorScale:{type:"boolean"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},theme:{type:"string",enum:["light","dark"]}}},Mxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},resetSelectionOnDoubleClick:{type:"boolean"},ariaLabel:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},leftMargin:{type:"number"},rightMargin:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},tooltip:{type:"string"},showColorScale:{type:"boolean"},showValues:{type:"boolean"},graphID:{type:"string"},showNAColor:{type:"boolean"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},radius:{type:"number"},maxRadiusValue:{type:"number"}}},Exe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},graphTitle:{type:"string"},ariaLabel:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},graphDescription:{type:"string"},footNote:{type:"string"},graphID:{type:"string"},width:{type:"number"},height:{type:"number"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},theme:{type:"string",enum:["light","dark"]},columnData:{type:"array",items:{type:"object",properties:{columnTitle:{type:"string"},columnId:{type:"string"},sortable:{type:"boolean"},filterOptions:{type:"array",items:{type:"string"}},chip:{type:"boolean"},chipColors:{type:"array",items:{type:"object",properties:{value:{type:"string"},color:{type:"string"}},required:["value","color"]}},separator:{type:"string"},align:{type:"string",enum:["left","right","center"]},suffix:{type:"string"},prefix:{type:"string"},columnWidth:{type:"number"}},required:["columnId"]}},resetSelectionOnDoubleClick:{type:"boolean"}},required:["columnData"]},jxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},graphTitle:{type:"string"},ariaLabel:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},graphDescription:{type:"string"},footNote:{type:"string"},graphID:{type:"string"},width:{type:"number"},height:{type:"number"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},uiMode:{type:"string",enum:["light","normal"]},cardTemplate:{type:"string"},cardBackgroundColor:{type:"string"},cardFilters:{type:"array",items:{type:"object",properties:{column:{type:"string"},width:{type:"string"},label:{type:"string"},defaultValue:{oneOf:[{type:"string"},{type:"number"}]},excludeValues:{type:"array",items:{type:"string"}}},required:["column"]}},cardSearchColumns:{type:"array",items:{type:"string"}},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},cardSortingOptions:{type:"object",properties:{defaultValue:{type:"string"},width:{type:"string"},options:{type:"array",items:{type:"object",properties:{value:{type:"string"},label:{type:"string"},type:{type:"string",enum:["asc","desc"]}},required:["value","label","type"]},minItems:1}}},cardMinWidth:{type:"number"},detailsOnClick:{type:"string"},allowDataDownloadOnDetail:{oneOf:[{type:"string"},{type:"boolean"}]},noOfItemsInAPage:{type:"number",minimum:0}},required:["cardTemplate"]},Lxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},leftMargin:{type:"number"},rightMargin:{type:"number"},ariaLabel:{type:"string"},legendMaxWidth:{type:"string"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},graphTitle:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},graphDescription:{type:"string"},footNote:{type:"string"},radius:{type:"number"},strokeWidth:{type:"number"},showNAColor:{type:"boolean"},showValues:{type:"boolean"},showDots:{type:"boolean"},fillShape:{type:"boolean"},showColorScale:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},colorLegendTitle:{type:"string"},padding:{type:"string"},tooltip:{type:"string"},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},colorDomain:{type:"array",items:{type:"string"}},axisLabels:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},curveType:{type:"string",enum:["linear","curve"]},highlightedLines:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},noOfTicks:{type:"number"},maxValue:{type:"number"},minValue:{type:"number"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},width:{type:"number"},height:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},resetSelectionOnDoubleClick:{type:"boolean"}},required:["axisLabels"]},Nxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},mainText:{oneOf:[{type:"string"},{type:"object",properties:{label:{type:"string"},suffix:{type:"string"},prefix:{type:"string"}},required:["label"]}]},topMargin:{type:"number"},bottomMargin:{type:"number"},ariaLabel:{type:"string"},legendMaxWidth:{type:"string"},colors:{type:"array",items:{type:"string"}},graphTitle:{type:"string"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},graphDescription:{type:"string"},subNote:{type:"string"},footNote:{type:"string"},radius:{type:"number"},strokeWidth:{type:"number"},showColorScale:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},tooltip:{type:"string"},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},colorDomain:{type:"array",items:{type:"string"}},sortData:{type:"string",enum:["asc","desc"]},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},width:{type:"number"},height:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},resetSelectionOnDoubleClick:{type:"boolean"}}},Ixe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},ariaLabel:{type:"string"},colors:{type:"array",items:{type:"string"}},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},labelOrder:{type:"array",items:{type:"string"}},orientation:{type:"string",enum:["vertical","horizontal"]},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showValues:{type:"boolean"},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},radius:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},tooltip:{type:"string"},graphID:{type:"string"},maxPositionValue:{type:"number"},minPositionValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},sortParameter:{oneOf:[{type:"string",enum:["diff"]},{type:"number"}]},arrowConnector:{type:"boolean"},connectorStrokeWidth:{type:"number"},theme:{type:"string",enum:["light","dark"]},maxBarThickness:{type:"number"},minBarThickness:{type:"number"},maxNumberOfBars:{type:"number"},resetSelectionOnDoubleClick:{type:"boolean"},valueColor:{type:"string"},axisTitle:{type:"string"},noOfTicks:{type:"number"}},required:["colorDomain"]},Pxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},ariaLabel:{type:"string"},colors:{type:"array",items:{type:"string"}},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},orientation:{type:"string",enum:["vertical","horizontal"]},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showValues:{type:"boolean"},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},radius:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},tooltip:{type:"string"},graphID:{type:"string"},maxPositionValue:{type:"number"},minPositionValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},sortParameter:{oneOf:[{type:"string",enum:["diff"]},{type:"number"}]},arrowConnector:{type:"boolean"},connectorStrokeWidth:{type:"number"},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},theme:{type:"string",enum:["light","dark"]},maxBarThickness:{type:"number"},minBarThickness:{type:"number"},valueColor:{type:"string"},axisTitle:{type:"string"},noOfTicks:{type:"number"},resetSelectionOnDoubleClick:{type:"boolean"}},required:["colorDomain"]},Rxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},ariaLabel:{type:"string"},colors:{type:"array",items:{type:"string"}},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},scaleType:{type:"string",enum:["linear","categorical","threshold"]},colorDomain:{oneOf:[{type:"array",items:{type:"number"}},{type:"array",items:{type:"string"}}]},showColumnLabels:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},truncateBy:{type:"number"},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},showValues:{type:"boolean"},showRowLabels:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},graphID:{type:"string"},noDataColor:{type:"string"},showColorScale:{type:"boolean"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},fillContainer:{type:"boolean"},showNAColor:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}},required:["colorDomain"]},$xe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},ariaLabel:{type:"string"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showValues:{type:"boolean"},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},maxValue:{type:"number"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},numberOfBins:{type:"number"},truncateBy:{type:"number"},donutStrokeWidth:{type:"number"},sortData:{type:"string",enum:["asc","desc"]},barGraphLayout:{type:"string",enum:["horizontal","vertical"]},graphType:{type:"string",enum:["circlePacking","treeMap","barGraph","donutChart"]},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},maxBarThickness:{type:"number"},detailsOnClick:{type:"string"}}},Bxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},ariaLabel:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},labels:{type:"array",items:{type:"string"},minItems:2,maxItems:2},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},noOfXTicks:{type:"number"},dateFormat:{type:"string"},showValues:{type:"boolean"},showColorScale:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},lineColors:{type:"array",items:{type:"string"},minItems:2,maxItems:2},sameAxes:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},animateLine:{oneOf:[{type:"number"},{type:"boolean"}]},strokeWidth:{type:"number"},showDots:{type:"boolean"},colorLegendTitle:{type:"string"},theme:{type:"string",enum:["light","dark"]},noOfYTicks:{type:"number"},minDate:{oneOf:[{type:"string"},{type:"number"}]},maxDate:{oneOf:[{type:"string"},{type:"number"}]},yAxisTitle:{type:"string"},lineSuffixes:{type:"array",items:{type:"string"},minItems:2,maxItems:2},linePrefixes:{type:"array",items:{type:"string"},minItems:2,maxItems:2}}},Vxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},ariaLabel:{type:"string"},graphID:{type:"string"},regressionLine:{oneOf:[{type:"string"},{type:"boolean"}]},lineColor:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},noOfXTicks:{type:"number"},dateFormat:{type:"string"},showValues:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},theme:{type:"string",enum:["light","dark"]},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},animateLine:{oneOf:[{type:"number"},{type:"boolean"}]},strokeWidth:{type:"number"},showDots:{type:"boolean"},noOfYTicks:{type:"number"},minDate:{oneOf:[{type:"string"},{type:"number"}]},maxDate:{oneOf:[{type:"string"},{type:"number"}]},yAxisTitle:{type:"string"}}},Fxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},ariaLabel:{type:"string"},graphID:{type:"string"},regressionLine:{oneOf:[{type:"string"},{type:"boolean"}]},lineColor:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},noOfXTicks:{type:"number"},dateFormat:{type:"string"},showValues:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},theme:{type:"string",enum:["light","dark"]},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},animateLine:{oneOf:[{type:"number"},{type:"boolean"}]},strokeWidth:{type:"number"},showDots:{type:"boolean"},showIntervalDots:{type:"boolean"},showIntervalValues:{type:"boolean"},intervalLineStrokeWidth:{type:"number"},intervalLineColors:{type:"array",items:{type:"string"},minItems:2,maxItems:2},intervalAreaColor:{type:"string"},intervalAreaOpacity:{type:"number"},noOfYTicks:{type:"number"},minDate:{oneOf:[{type:"string"},{type:"number"}]},maxDate:{oneOf:[{type:"string"},{type:"number"}]},yAxisTitle:{type:"string"},colorLegendTitle:{type:"string"},colorLegendColors:{type:"array",items:{type:"string"}},colorLegendDomain:{type:"array",items:{type:"string"}}}},zxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},ariaLabel:{type:"string"},lineColors:{type:"array",items:{type:"string"},minItems:2,maxItems:2},diffAreaColors:{type:"array",items:{type:"string"},minItems:2,maxItems:2},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},noOfXTicks:{type:"number"},dateFormat:{type:"string"},showValues:{type:"boolean"},suffix:{type:"string"},prefix:{type:"string"},labels:{type:"array",items:{type:"string"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showColorLegendAtTop:{type:"boolean"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},animateLine:{oneOf:[{type:"number"},{type:"boolean"}]},strokeWidth:{type:"number"},showDots:{type:"boolean"},colorLegendTitle:{type:"string"},noOfYTicks:{type:"number"},minDate:{oneOf:[{type:"string"},{type:"number"}]},maxDate:{oneOf:[{type:"string"},{type:"number"}]},yAxisTitle:{type:"string"}},required:["labels"]},Hxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},ariaLabel:{type:"string"},lineColors:{type:"array",items:{type:"string"}},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},noOfXTicks:{type:"number"},dateFormat:{type:"string"},suffix:{type:"string"},prefix:{type:"string"},labels:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:1},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},showValues:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},showColorLegendAtTop:{type:"boolean"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},highlightedLines:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},animateLine:{oneOf:[{type:"number"},{type:"boolean"}]},strokeWidth:{type:"number"},showDots:{type:"boolean"},colorLegendTitle:{type:"string"},noOfYTicks:{type:"number"},minDate:{oneOf:[{type:"string"},{type:"number"}]},maxDate:{oneOf:[{type:"string"},{type:"number"}]},yAxisTitle:{type:"string"}},required:["labels"]},qxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},ariaLabel:{type:"string"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},noOfXTicks:{type:"number"},dateFormat:{type:"string"},suffix:{type:"string"},prefix:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},highlightedLines:{type:"array",items:{oneOf:[{type:"number"},{type:"string"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},animateLine:{oneOf:[{type:"number"},{type:"boolean"}]},strokeWidth:{type:"number"},showDots:{type:"boolean"},colorLegendTitle:{type:"string"},noOfYTicks:{type:"number"},minDate:{oneOf:[{type:"string"},{type:"number"}]},maxDate:{oneOf:[{type:"string"},{type:"number"}]},yAxisTitle:{type:"string"}}},Wxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},lineColor:{type:"string"},ariaLabel:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},dateFormat:{type:"string"},area:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]}}},Uxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},ariaLabel:{type:"string"},mapData:{oneOf:[{type:"object"},{type:"string"}]},mapProjection:{enum:["mercator","equalEarth","naturalEarth","orthographic","albersUSA"],type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},colorDomain:{oneOf:[{type:"array",items:{type:"number"},minItems:1},{type:"array",items:{type:"string"},minItems:1}]},colors:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},categorical:{type:"boolean"},scale:{type:"number"},centerPoint:{type:"array",items:{type:"number"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},mapBorderWidth:{type:"number"},mapNoDataColor:{type:"string"},mapBorderColor:{type:"string"},relativeHeight:{type:"number"},minHeight:{type:"number"},padding:{type:"string"},isWorldMap:{type:"boolean"},tooltip:{type:"string"},showColorScale:{type:"boolean"},zoomScaleExtend:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomTranslateExtend:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2},graphID:{type:"string"},highlightedIds:{type:"array",items:{type:"string"}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},mapProperty:{type:"string"},showAntarctica:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}}},Gxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},ariaLabel:{type:"string"},mapData:{oneOf:[{type:"object"},{type:"string"}]},mapProjection:{enum:["mercator","equalEarth","naturalEarth","orthographic","albersUSA"],type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},xColorLegendTitle:{type:"string"},yColorLegendTitle:{type:"string"},xDomain:{type:"array",items:{type:"number"}},yDomain:{type:"array",items:{type:"number"}},colors:{type:"array",items:{type:"array",items:{type:"string"}}},scale:{type:"number"},centerPoint:{type:"array",items:{type:"number"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},mapBorderWidth:{type:"number"},mapNoDataColor:{type:"string"},padding:{type:"string"},mapBorderColor:{type:"string"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},isWorldMap:{type:"boolean"},zoomScaleExtend:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomTranslateExtend:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2},graphID:{type:"string"},highlightedIds:{type:"array",items:{type:"string"}},mapProperty:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showAntarctica:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}}},Yxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},ariaLabel:{type:"string"},graphTitle:{type:"string"},mapData:{oneOf:[{type:"object"},{type:"string"}]},mapProjection:{enum:["mercator","equalEarth","naturalEarth","orthographic","albersUSA"],type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},radius:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},scale:{type:"number"},centerPoint:{type:"array",items:{type:"number"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},mapBorderWidth:{type:"number"},mapNoDataColor:{type:"string"},mapBorderColor:{type:"string"},padding:{type:"string"},showLabels:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},isWorldMap:{type:"boolean"},tooltip:{type:"string"},showColorScale:{type:"boolean"},zoomScaleExtend:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomTranslateExtend:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2},graphID:{type:"string"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showAntarctica:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}}},Xxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},ariaLabel:{type:"string"},graphTitle:{type:"string"},mapData:{oneOf:[{type:"object"},{type:"string"}]},mapProjection:{enum:["mercator","equalEarth","naturalEarth","orthographic","albersUSA"],type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},colorDomain:{oneOf:[{type:"array",items:{type:"number"},minItems:1},{type:"array",items:{type:"string"},minItems:1}]},colors:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},categorical:{type:"boolean"},scale:{type:"number"},centerPoint:{type:"array",items:{type:"number"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},mapBorderWidth:{type:"number"},mapNoDataColor:{type:"string"},mapBorderColor:{type:"string"},relativeHeight:{type:"number"},minHeight:{type:"number"},padding:{type:"string"},isWorldMap:{type:"boolean"},tooltip:{type:"string"},showColorScale:{type:"boolean"},zoomScaleExtend:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomTranslateExtend:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2},graphID:{type:"string"},highlightedIds:{type:"array",items:{type:"string"}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},mapProperty:{type:"string"},showAntarctica:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}}},Kxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},mapData:{oneOf:[{type:"object"},{type:"string"}]},mapProjection:{enum:["mercator","equalEarth","naturalEarth","orthographic","albersUSA"],type:"string"},ariaLabel:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},xColorLegendTitle:{type:"string"},yColorLegendTitle:{type:"string"},xDomain:{type:"array",items:{type:"number"}},yDomain:{type:"array",items:{type:"number"}},colors:{type:"array",items:{type:"array",items:{type:"string"}}},scale:{type:"number"},centerPoint:{type:"array",items:{type:"number"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},mapBorderWidth:{type:"number"},mapNoDataColor:{type:"string"},padding:{type:"string"},mapBorderColor:{type:"string"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},isWorldMap:{type:"boolean"},zoomScaleExtend:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomTranslateExtend:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2},graphID:{type:"string"},highlightedIds:{type:"array",items:{type:"string"}},mapProperty:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showAntarctica:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}}},Jxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},ariaLabel:{type:"string"},mapData:{oneOf:[{type:"object"},{type:"string"}]},mapProjection:{enum:["mercator","equalEarth","naturalEarth","orthographic","albersUSA"],type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},radius:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},scale:{type:"number"},centerPoint:{type:"array",items:{type:"number"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},mapBorderWidth:{type:"number"},mapNoDataColor:{type:"string"},mapBorderColor:{type:"string"},padding:{type:"string"},showLabels:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},isWorldMap:{type:"boolean"},tooltip:{type:"string"},showColorScale:{type:"boolean"},zoomScaleExtend:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomTranslateExtend:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2},graphID:{type:"string"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showAntarctica:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"}}},Zxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},graphTitle:{type:"string"},ariaLabel:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},graphDescription:{type:"string"},footNote:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},width:{type:"number"},height:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},graphID:{type:"string"},mapStyles:{type:"array",items:{type:"string"},minItems:2,maxItems:2},center:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomLevel:{type:"number"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]}},required:["mapStyles"]},Qxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},mapStyle:{oneOf:[{type:"string"},{type:"array",items:{type:"object",properties:{name:{type:"string"},style:{type:"string"}},required:["name","style"]},minItems:1}]},center:{type:"array",items:{type:"number"},minItems:2,maxItems:2},ariaLabel:{type:"string"},zoomLevel:{type:"number"},graphTitle:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},graphDescription:{type:"string"},footNote:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},width:{type:"number"},height:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},graphID:{type:"string"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},uiMode:{type:"string",enum:["light","normal"]},includeLayers:{type:"array",items:{type:"string"}},excludeLayers:{type:"array",items:{type:"string"}}},required:["mapStyle"]},ewe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},mapStyle:{type:"string"},center:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomLevel:{type:"number"},graphTitle:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},ariaLabel:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},width:{type:"number"},height:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},graphID:{type:"string"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},uiMode:{type:"string",enum:["light","normal"]},layerSelection:{type:"array",items:{type:"object",properties:{name:{type:"string"},layerID:{type:"array",items:{type:"string"},minItems:1}},required:["name","layerID"]},minItems:1},excludeLayers:{type:"array",items:{type:"string"}}},required:["mapStyle","layerSelection"]},twe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},showValues:{type:"boolean"},graphTitle:{type:"string"},ariaLabel:{type:"string"},graphDescription:{type:"string"},barTitle:{type:"string"},lineTitle:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},barColor:{type:"string"},lineColor:{type:"string"},sameAxes:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},barPadding:{type:"number"},truncateBy:{type:"number"},showLabels:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},noOfTicks:{type:"number"},lineSuffix:{type:"string"},barSuffix:{type:"string"},linePrefix:{type:"string"},barPrefix:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"}}},rwe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},ariaLabel:{type:"string"},regressionLine:{oneOf:[{type:"string"},{type:"boolean"}]},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},showLabels:{type:"boolean"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},radius:{type:"number"},xAxisTitle:{type:"string"},yAxisTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},refXValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},refYValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]},minItems:4,maxItems:4},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},showColorScale:{type:"boolean"},graphID:{type:"string"},maxRadiusValue:{type:"number"},maxXValue:{type:"number"},minXValue:{type:"number"},maxYValue:{type:"number"},minYValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showNAColor:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{type:"number"},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},noOfXTicks:{type:"number"},noOfYTicks:{type:"number"},labelColor:{type:"string"},xSuffix:{type:"string"},ySuffix:{type:"string"},xPrefix:{type:"string"},yPrefix:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"}}},nwe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},ariaLabel:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},showLabels:{type:"boolean"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},radius:{type:"number"},xAxisTitle:{type:"string"},yAxisTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},refXValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},refYValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]},minItems:4,maxItems:4},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},showColorScale:{type:"boolean"},graphID:{type:"string"},maxRadiusValue:{type:"number"},maxXValue:{type:"number"},minXValue:{type:"number"},maxYValue:{type:"number"},minYValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showNAColor:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{type:"number"},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},noOfXTicks:{type:"number"},noOfYTicks:{type:"number"},labelColor:{type:"string"},xSuffix:{type:"string"},ySuffix:{type:"string"},xPrefix:{type:"string"},yPrefix:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"}}},awe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},ariaLabel:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},showLabels:{type:"boolean"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},radius:{type:"number"},axisTitles:{type:"array",items:{type:"string"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},showColorScale:{type:"boolean"},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},fillContainer:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}}},iwe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},colors:{type:"array",items:{type:"string"},minItems:0},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},ariaLabel:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},noOfXTicks:{type:"number"},dateFormat:{type:"string"},colorDomain:{type:"array",items:{type:"string"},minItems:1},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},colorLegendTitle:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},bottomMargin:{type:"number"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showColorScale:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},yAxisTitle:{type:"string"},noOfYTicks:{type:"number"},prefix:{type:"string"},suffix:{type:"string"}},required:["colorDomain"]},owe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},year:{oneOf:[{type:"number"},{type:"string"}]},ariaLabel:{type:"string"},textBackground:{type:"boolean"},centerAlign:{type:"boolean"},verticalAlign:{type:"string",enum:["center","top","bottom"]},headingFontSize:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},footNote:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},graphID:{type:"string"},aggregationMethod:{type:"string",enum:["count","max","min","average","sum"]},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},countOnly:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}}}},lwe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},valueColor:{type:"string"},ariaLabel:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},stripType:{type:"string",enum:["strip","dot"]},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},radius:{type:"number"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},showColorScale:{type:"boolean"},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},showAxis:{type:"boolean"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},prefix:{type:"string"},suffix:{type:"string"},showNAColor:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},highlightColor:{type:"string"},dotOpacity:{type:"number"},theme:{type:"string",enum:["light","dark"]},orientation:{type:"string",enum:["vertical","horizontal"]},resetSelectionOnDoubleClick:{type:"boolean"}}},swe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},graphTitle:{type:"string"},ariaLabel:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},leftMargin:{type:"number"},rightMargin:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},showLabels:{type:"boolean"},tooltip:{type:"string"},showColorScale:{type:"boolean"},showValues:{type:"boolean"},graphID:{type:"string"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showNAColor:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}}},uwe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},totalNoOfDots:{type:"number"},ariaLabel:{type:"string"},gridSize:{type:"number"},unitPadding:{type:"number"},size:{type:"number"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},colors:{type:"array",items:{type:"string"}},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},showColorScale:{type:"boolean"},showStrokeForWhiteDots:{type:"boolean"},note:{type:"string"},theme:{type:"string",enum:["light","dark"]},width:{type:"number"},height:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"}}},Bc={properties:{styles:{type:"object"},classNames:{type:"object"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},axisTitle:{type:"string"},theme:{type:"string",enum:["light","dark"]},textBackground:{type:"boolean"},headingFontSize:{type:"string"},centerAlign:{type:"boolean"},verticalAlign:{type:"string",enum:["center","top","bottom"]},regressionLine:{oneOf:[{type:"string"},{type:"boolean"}]},ariaLabel:{type:"string"},includeLayers:{type:"array",items:{type:"string"}},excludeLayers:{type:"array",items:{type:"string"}},layerSelection:{type:"array",items:{type:"object",properties:{name:{type:"string"},layerID:{type:"array",items:{type:"string"},minItems:1}},required:["name","layerID"]},minItems:1},maxBarThickness:{type:"number"},minBarThickness:{type:"number"},maxNumberOfBars:{type:"number"},aggregationMethod:{enum:["average","count","max","min","sum"],type:"string"},mapProjection:{enum:["mercator","equalEarth","naturalEarth","orthographic","albersUSA"],type:"string"},animateLine:{oneOf:[{type:"number"},{type:"boolean"}]},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},area:{type:"boolean"},arrowConnector:{type:"boolean"},autoPlay:{type:"boolean"},autoSort:{type:"boolean"},axisTitles:{items:{type:"string"},maxItems:2,minItems:2,type:"array"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},barColor:{type:"string"},barColors:{items:{type:"string"},maxItems:2,minItems:2,type:"array"},barGraphLayout:{enum:["horizontal","vertical"],type:"string"},barPadding:{type:"number"},barTitle:{type:"string"},bottomMargin:{type:"number"},categorical:{type:"boolean"},center:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},centerGap:{type:"number"},centerPoint:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},color:{anyOf:[{items:{type:"string"},type:"array"},{type:"string"}]},oneOf:[{type:"array",items:{type:"number"}},{type:"array",items:{type:"string"}}],colorLegendTitle:{type:"string"},colors:{anyOf:[{items:{type:"string"},type:"array"},{items:{items:{type:"string"},type:"array"},type:"array"},{type:"string"}]},columnData:{items:{properties:{align:{enum:["center","left","right"],type:"string"},chip:{type:"boolean"},chipColors:{items:{properties:{color:{type:"string"},value:{type:"string"}},type:"object"},type:"array"},columnId:{type:"string"},columnTitle:{type:"string"},columnWidth:{type:"number"},filterOptions:{items:{type:"string"},type:"array"},prefix:{type:"string"},separator:{type:"string"},sortable:{type:"boolean"},suffix:{type:"string"}},type:"object",required:["columnId"]},type:"array"},connectorStrokeWidth:{type:"number"},countOnly:{items:{oneOf:[{type:"string"},{type:"number"}]},type:"array"},dataDownload:{type:"boolean"},dateFormat:{type:"string"},donutColorDomain:{items:{type:"string"},type:"array"},donutStrokeWidth:{type:"number"},dotOpacity:{type:"number"},fillContainer:{type:"boolean"},footNote:{type:"string"},graphDescription:{type:"string"},graphDownload:{type:"boolean"},graphID:{type:"string"},showColorScale:{type:"boolean"},graphTitle:{type:"string"},graphType:{enum:["barGraph","circlePacking","donutChart","treeMap"],type:"string"},gridSize:{type:"number"},height:{type:"number"},highlightAreaColor:{type:"string"},highlightAreaSettings:{anyOf:[{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]},minItems:4,maxItems:4},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}}]},highlightColor:{type:"string"},highlightedIds:{items:{type:"string"},type:"array"},highlightedDataPoints:{items:{oneOf:[{type:"string"},{type:"number"}]},type:"array"},highlightedLines:{items:{oneOf:[{type:"string"},{type:"number"}]},type:"array"},isWorldMap:{type:"boolean"},labelOrder:{items:{type:"string"},type:"array"},labels:{items:{oneOf:[{type:"string"},{type:"number"}]},type:"array"},language:{enum:["ar","en","he"],type:"string"},leftBarTitle:{type:"string"},leftMargin:{type:"number"},lineColor:{type:"string"},lineColors:{items:{type:"string"},maxItems:2,minItems:2,type:"array"},lineTitle:{type:"string"},mainText:{oneOf:[{type:"string"},{type:"object",properties:{label:{type:"string"},suffix:{type:"string"},prefix:{type:"string"}},required:["label"]}]},mapBorderColor:{type:"string"},mapBorderWidth:{type:"number"},mapData:{oneOf:[{type:"object"},{type:"string"}]},mapNoDataColor:{type:"string"},mapProperty:{type:"string"},mapStyle:{oneOf:[{type:"string"},{type:"array",items:{type:"object",properties:{name:{type:"string"},style:{type:"string"}},required:["name","style"]},minItems:1}]},mapStyles:{items:{type:"string"},maxItems:2,minItems:2,type:"array"},maxPositionValue:{type:"number"},maxRadiusValue:{type:"number"},maxValue:{type:"number"},maxXValue:{type:"number"},maxYValue:{type:"number"},minHeight:{type:"number"},minPositionValue:{type:"number"},minValue:{type:"number"},minXValue:{type:"number"},minYValue:{type:"number"},noDataColor:{type:"string"},noOfXTicks:{type:"number"},note:{type:"string"},numberOfBins:{type:"number"},padding:{type:"string"},prefix:{type:"string"},radius:{type:"number"},refValues:{items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]},type:"array"},refXValues:{items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]},type:"array"},refYValues:{items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]},type:"array"},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},relativeHeight:{type:"number"},rightBarTitle:{type:"string"},rightMargin:{type:"number"},sameAxes:{type:"boolean"},scale:{type:"number"},scaleType:{enum:["categorical","linear","threshold"],type:"string"},showAntarctica:{type:"boolean"},showAxis:{type:"boolean"},showColorLegendAtTop:{type:"boolean"},showColumnLabels:{type:"boolean"},showLabels:{type:"boolean"},showNAColor:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},showRowLabels:{type:"boolean"},showStrokeForWhiteDots:{type:"boolean"},showTicks:{type:"boolean"},showValues:{type:"boolean"},size:{type:"number"},sortData:{enum:["asc","desc"],type:"string"},sortParameter:{anyOf:[{type:"string",enum:["diff","total"]},{type:"number"}]},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},stripType:{enum:["dot","strip"],type:"string"},strokeWidth:{type:"number"},subNote:{type:"string"},suffix:{type:"string"},tooltip:{type:"string"},topMargin:{type:"number"},totalNoOfDots:{type:"number"},truncateBy:{type:"number"},unitPadding:{type:"number"},value:{type:"number"},width:{type:"number"},xAxisTitle:{type:"string"},xColorLegendTitle:{type:"string"},xDomain:{items:{type:"number"},type:"array"},yAxisTitle:{type:"string"},yColorLegendTitle:{type:"string"},yDomain:{items:{type:"number"},type:"array"},year:{oneOf:[{type:"string"},{type:"number"}]},zoomLevel:{type:"number"},zoomScaleExtend:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},zoomTranslateExtend:{items:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},maxItems:2,minItems:2,type:"array"},sortNodes:{type:"string",enum:["asc","desc","mostReadable","none"]},nodePadding:{type:"number"},nodeWidth:{type:"number"},defaultLinkOpacity:{type:"number",minimum:0,maximum:1},animateLinks:{oneOf:[{type:"number"},{type:"boolean"}]},sourceColors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},targetColors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},sourceColorDomain:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},targetColorDomain:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},sourceTitle:{type:"string"},targetTitle:{type:"string"},highlightedSourceDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},highlightedTargetDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},cardSearchColumns:{type:"array",items:{type:"string"}},cardTemplate:{type:"string"},cardBackgroundColor:{type:"string"},cardFilters:{type:"array",items:{type:"object",properties:{column:{type:"string"},width:{type:"string"},label:{type:"string"},defaultValue:{oneOf:[{type:"string"},{type:"number"}]},excludeValues:{type:"array",items:{type:"string"}}},required:["column"]}},cardSortingOptions:{type:"object",properties:{defaultValue:{type:"string"},width:{type:"string"},options:{type:"array",items:{type:"object",properties:{value:{type:"string"},label:{type:"string"},type:{type:"string",enum:["asc","desc"]}},required:["value","label","type"]},minItems:1}}},cardMinWidth:{type:"number"},detailsOnClick:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},legendMaxWidth:{type:"string"},intervalAreaOpacity:{type:"number"},valueColor:{type:"string"},labelColor:{type:"string"},noOfYTicks:{type:"number"},noOfTicks:{type:"number"},minDate:{oneOf:[{type:"string"},{type:"number"}]},maxDate:{oneOf:[{type:"string"},{type:"number"}]},colorLegendColors:{type:"array",items:{type:"string"}},colorLegendDomain:{type:"array",items:{type:"string"}},lineSuffixes:{type:"array",items:{type:"string"},minItems:2,maxItems:2},linePrefixes:{type:"array",items:{type:"string"},minItems:2,maxItems:2},barSuffix:{type:"string"},barPrefix:{type:"string"},lineSuffix:{type:"string"},barAxisTitle:{type:"string"},linePrefix:{type:"string"},xSuffix:{type:"string"},xPrefix:{type:"string"},ySuffix:{type:"string"},yPrefix:{type:"string"},filterNA:{type:"boolean"},uiMode:{type:"string",enum:["light","normal"]},allowDataDownloadOnDetail:{oneOf:[{type:"string"},{type:"boolean"}]},noOfItemsInAPage:{type:"number",minimum:0},orientation:{type:"string",enum:["vertical","horizontal"]},showDots:{type:"boolean"},fillShape:{type:"boolean"},colorScaleMaxWidth:{type:"string"},axisLabels:{type:"array",items:{type:"string"},minItems:1}},type:"object"};function kq(t){if(jo.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(t)!==-1)return null;switch(t){case"dataTable":return{type:"array",items:{type:"object",additionalProperties:!0}};case"dataCards":return{type:"array",items:{type:"object",additionalProperties:!0}};case"barChart":return Hbe;case"stackedBarChart":return Wbe;case"groupedBarChart":return qbe;case"animatedBarChart":return Ube;case"animatedStackedBarChart":return Ybe;case"animatedGroupedBarChart":return Gbe;case"lineChart":return sj;case"dualAxisLineChart":return cxe;case"differenceLineChart":return fxe;case"multiLineChart":return ixe;case"multiLineAltChart":return oxe;case"stackedAreaChart":return lxe;case"choroplethMap":return exe;case"biVariateChoroplethMap":return txe;case"dotDensityMap":return hxe;case"animatedChoroplethMap":return rxe;case"animatedBiVariateChoroplethMap":return nxe;case"animatedDotDensityMap":return pxe;case"donutChart":return Zbe;case"slopeChart":return mxe;case"scatterPlot":return sxe;case"animatedScatterPlot":return uxe;case"dumbbellChart":return Xbe;case"animatedDumbbellChart":return Jbe;case"treeMap":return Rbe;case"circlePacking":return $be;case"heatMap":return gxe;case"stripChart":return vxe;case"beeSwarmChart":return yxe;case"butterflyChart":return Fbe;case"animatedButterflyChart":return zbe;case"histogram":return Qbe;case"sparkLine":return sj;case"paretoChart":return dxe;case"statCard":return bxe;case"unitChart":return Kbe;case"sankeyChart":return Vbe;case"lineChartWithConfidenceInterval":return axe;case"radarChart":return Bbe;default:return console.error("Unknown chart type:",t),null}}function To(t){switch(t){case"barChart":return wxe;case"stackedBarChart":return Cxe;case"groupedBarChart":return Sxe;case"animatedBarChart":return kxe;case"animatedStackedBarChart":return Oxe;case"animatedGroupedBarChart":return _xe;case"lineChart":return Vxe;case"dualAxisLineChart":return Bxe;case"multiLineChart":return Hxe;case"multiLineAltChart":return qxe;case"differenceLineChart":return zxe;case"stackedAreaChart":return iwe;case"choroplethMap":return Uxe;case"biVariateChoroplethMap":return Gxe;case"dotDensityMap":return Yxe;case"animatedChoroplethMap":return Xxe;case"animatedBiVariateChoroplethMap":return Kxe;case"animatedDotDensityMap":return Jxe;case"donutChart":return Nxe;case"slopeChart":return awe;case"scatterPlot":return rwe;case"animatedScatterPlot":return nwe;case"dumbbellChart":return Ixe;case"animatedDumbbellChart":return Pxe;case"treeMap":return swe;case"circlePacking":return Mxe;case"heatMap":return Rxe;case"stripChart":return lwe;case"beeSwarmChart":return Dxe;case"butterflyChart":return Axe;case"animatedButterflyChart":return Txe;case"histogram":return $xe;case"sparkLine":return Wxe;case"paretoChart":return twe;case"dataTable":return Exe;case"statCard":return owe;case"geoHubCompareMap":return Zxe;case"geoHubMap":return Qxe;case"geoHubMapWithLayerSelection":return ewe;case"unitChart":return uwe;case"sankeyChart":return xxe;case"lineChartWithConfidenceInterval":return Fxe;case"dataCards":return jxe;case"allGraphs":return Bc;case"radarChart":return Lxe;default:return console.error("Unknown chart type:",t),null}}function cwe(t){switch(t){case"barChart":return["label","size","color"];case"animatedBarChart":return["label","size","color","date"];case"treeMap":return["label","size","color"];case"circlePacking":return["label","size","color"];case"butterflyChart":return["label","leftBar","rightBar"];case"groupedBarChart":return["label","size"];case"stackedBarChart":return["label","size"];case"animatedButterflyChart":return["label","leftBar","rightBar","date"];case"animatedGroupedBarChart":return["label","size","date"];case"animatedStackedBarChart":return["label","size","date"];case"dumbbellChart":return["x","label"];case"animatedDumbbellChart":return["x","label","date"];case"donutChart":return["size","label"];case"histogram":return["value"];case"choroplethMap":return["x","id"];case"biVariateChoroplethMap":return["x","y","id"];case"animatedChoroplethMap":return["x","id","date"];case"animatedBiVariateChoroplethMap":return["x","y","id","date"];case"lineChart":return["date","y"];case"multiLineChart":return["date","y"];case"multiLineAltChart":return["date","y","label","color"];case"radarChart":return["values","label","color"];case"stackedAreaChart":return["date","y"];case"scatterPlot":return["x","y","radius","color","label"];case"animatedScatterPlot":return["x","y","radius","color","label","date"];case"dualAxisLineChart":return["date","y1","y2"];case"paretoChart":return["label","bar","line"];case"dotDensityMap":return["lat","long","radius","color","label"];case"animatedDotDensityMap":return["lat","long","radius","color","label","date"];case"slopeChart":return["y1","y2","color","label"];case"heatMap":return["row","column","value"];case"beeSwarmChart":return["label","position","radius","color"];case"stripChart":return["label","position","color"];case"statCard":return["value"];case"sankeyChart":return["source","target","value"];case"differenceLineChart":return["date","y1","y2"];case"unitChart":return["label","value"];case"sparkLine":return["date","y"];case"lineChartWithConfidenceInterval":return["date","y","yMin","yMax"];case"dashboardWideToLong":return["label","size","color","value"];case"dashboard":return["label","radius","size","row","y1","y","rightBar","position","leftBar","x","bar","line","y2","column","date","value","color","long","lat","id","source","target","yMin","yMax"];default:return["label","radius","size","row","y1","y","rightBar","position","leftBar","x","bar","line","y2","column","date","value","color","long","lat","id","source","target","yMin","yMax"]}}function Lo(t){return!t||t.length===0?{}:{enum:t}}const uj=t=>({items:{properties:{column:{type:"string",...Lo(t)},delimiter:{type:"string"}},type:"object",required:["column"]},type:"array"}),Z3=t=>({properties:{columnsToArray:uj(t),data:{},dataURL:{oneOf:[{type:"string"},{type:"array",items:{type:"object",properties:{fileType:{enum:["csv","json","api"],type:"string"},apiHeaders:{},dataTransformation:{type:"string"},idColumnName:{type:"string"},dataURL:{type:"string"},delimiter:{type:"string"},columnsToArray:uj()},required:["dataURL","idColumnName"]}}]},delimiter:{type:"string"},fileType:{enum:["csv","json","api"],type:"string"},apiHeaders:{},dataTransformation:{type:"string"},idColumnTitle:{type:"string"}},type:"object"}),Q3=t=>({type:"array",items:{type:"object",properties:{value:{type:"string",...Lo(t)},label:{type:"string"}},required:["value","label"]}}),q6=t=>({items:{properties:{clearable:{type:"boolean"},allowSelectAll:{type:"boolean"},width:{type:"string"},excludeValues:{items:{type:"string"},type:"array"},column:{type:"string",...Lo(t)},defaultValue:{anyOf:[{items:{oneOf:[{type:"string"},{type:"number"}]},type:"array"},{type:"string"},{type:"number"}]},label:{type:"string"},singleSelect:{type:"boolean"}},required:["column"],type:"object"},type:"array"}),W6=t=>({type:"array",items:{type:"object",properties:{chartConfigId:{type:"string"},label:{type:"string"},width:{type:"string"},allowedColumnIds:{type:"array",items:{type:"object",properties:{value:{type:"string",...Lo(t)},label:{type:"string"},graphSettings:Bc},required:["value","label"]},minItems:1},ui:{type:"string",enum:["select","radio"]}},required:["chartConfigId","allowedColumnIds"]}}),Z0=t=>({type:"array",items:{type:"object",properties:{column:{type:"string",...Lo(t)},includeValues:{type:"array",items:{oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]}},excludeValues:{type:"array",items:{oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]}}},required:["column"]}}),U6=t=>({type:"object",properties:{keyColumn:{type:"string",...Lo(t)},aggregationColumnsSetting:{type:"array",items:{type:"object",properties:{column:{type:"string",...Lo(t)},aggregationMethod:{type:"string",enum:["sum","average","min","max"]}},required:["column"]}}},required:["keyColumn"]}),e4=(t,e)=>({type:"array",items:{type:"object",properties:{columnId:{oneOf:[{type:"string",...Lo(t)},{type:"array",items:{type:"string",...Lo(t)}}]},chartConfigId:{type:"string",...Lo(cwe(e))}},required:["columnId","chartConfigId"]}}),Is=(t,e)=>({type:"array",items:{type:"object",properties:{chartConfigId:{type:"string"},label:{type:"string"},width:{type:"string"},options:{type:"array",items:{type:"object",properties:{dataConfiguration:e4(t,e),label:{type:"string"},graphSettings:Bc},required:["dataConfiguration","label"]},minItems:1},defaultValue:{type:"array",items:{type:"object",properties:{dataConfiguration:e4(t,e),label:{type:"string"},graphSettings:Bc},required:["dataConfiguration","label"]},minItems:1},ui:{type:"string",enum:["select","radio"]}},required:["chartConfigId","options"]}}),_q=(t,e)=>e&&jo.filter(r=>r.geoHubMapPresentation).map(r=>r.graphID).indexOf(e)!==-1?{type:"object",properties:{graphSettings:To(e),graphType:{type:"string",enum:jo.filter(r=>r.geoHubMapPresentation).map(r=>r.graphID)},debugMode:{type:"boolean"},theme:{type:"string",enum:["dark","light"]},uiMode:{type:"string",enum:["light","normal"]},classNames:{type:"object"},highlightDataPointSettings:{type:"object",properties:{column:{type:"string"},label:{type:"string"},defaultValues:{oneOf:[{type:"array",items:{type:"string"}},{type:"array",items:{type:"number"}}]},excludeValues:{type:"array",items:{type:"string"}},allowSelectAll:{type:"boolean"},width:{type:"string"}},required:["column"]},styles:{type:"object"}},required:["graphType"]}:e==="dataTable"||e==="dataCards"?{type:"object",properties:{graphSettings:To(e),dataSettings:Z3(t),filters:q6(t),noOfFiltersPerRow:{type:"number"},graphType:{type:"string",enum:["dataTable","dataCards"]},dataTransform:U6(t),dataFilters:Z0(t),readableHeader:Q3(t),dataSelectionOptions:W6(t),advancedDataSelectionOptions:Is(t,e),debugMode:{type:"boolean"},theme:{type:"string",enum:["dark","light"]},uiMode:{type:"string",enum:["light","normal"]},classNames:{type:"object"},highlightDataPointSettings:{type:"object",properties:{column:{type:"string"},label:{type:"string"},defaultValues:{oneOf:[{type:"array",items:{type:"string"}},{type:"array",items:{type:"number"}}]},excludeValues:{type:"array",items:{type:"string"}},allowSelectAll:{type:"boolean"},width:{type:"string"}},required:["column"]},styles:{type:"object"}},required:["dataSettings","graphType"]}:{type:"object",properties:{graphSettings:To(e||"allGraphs"),dataSettings:Z3(t),filters:q6(t),classNames:{type:"object"},styles:{type:"object"},graphType:{type:"string",enum:jo.map(r=>r.graphID)},noOfFiltersPerRow:{type:"number"},dataTransform:U6(t),dataFilters:Z0(t),graphDataConfiguration:e4(t,e),readableHeader:Q3(t),dataSelectionOptions:W6(t),advancedDataSelectionOptions:Is(t,e),debugMode:{type:"boolean"},theme:{type:"string",enum:["dark","light"]},highlightDataPointSettings:{type:"object",properties:{column:{type:"string"},label:{type:"string"},defaultValues:{oneOf:[{type:"array",items:{type:"string"}},{type:"array",items:{type:"number"}}]},excludeValues:{type:"array",items:{type:"string"}},allowSelectAll:{type:"boolean"},width:{type:"string"}},required:["column"]},uiMode:{type:"string",enum:["light","normal"]}},required:e?["dataSettings","graphType","graphDataConfiguration"]:["graphType"]},Oq=(t,e)=>e==="dataTable"||e==="dataCards"?{type:"object",properties:{graphSettings:To(e),dataSettings:Z3(t),filters:q6(t),classNames:{type:"object"},styles:{type:"object"},noOfFiltersPerRow:{type:"number"},graphType:{type:"string",enum:["dataTable","dataCards"]},uiMode:{type:"string",enum:["light","normal"]},dataTransform:U6(t),dataFilters:Z0(t),noOfColumns:{type:"number"},columnGridBy:{type:"string"},showCommonColorScale:{type:"boolean"},minGraphHeight:{type:"number"},minGraphWidth:{type:"number"},readableHeader:Q3(t),dataSelectionOptions:W6(t),advancedDataSelectionOptions:Is(t,e),debugMode:{type:"boolean"},theme:{type:"string",enum:["dark","light"]}},required:["columnGridBy","dataSettings","graphType"]}:{type:"object",properties:{graphSettings:To(e||"allGraphs"),dataSettings:Z3(t),filters:q6(t),classNames:{type:"object"},styles:{type:"object"},noOfFiltersPerRow:{type:"number"},graphType:{type:"string",enum:jo.filter(r=>r.availableInGriddedGraph!==!1).map(r=>r.graphID)},uiMode:{type:"string",enum:["light","normal"]},dataTransform:U6(t),dataFilters:Z0(t),graphDataConfiguration:e4(t,e),noOfColumns:{type:"number"},columnGridBy:{type:"string"},showCommonColorScale:{type:"boolean"},minGraphHeight:{type:"number"},minGraphWidth:{type:"number"},readableHeader:Q3(t),dataSelectionOptions:W6(t),advancedDataSelectionOptions:Is(t,e),debugMode:{type:"boolean"},theme:{type:"string",enum:["dark","light"]}},required:e?["columnGridBy","dataSettings","graphType","graphDataConfiguration"]:["columnGridBy","dataSettings","graphType"]},Dq=t=>({properties:{dashboardID:{type:"string"},graphClassNames:{type:"object"},graphStyles:{type:"object"},dashboardLayout:{properties:{backgroundColor:{type:["string","boolean"]},description:{type:"string"},language:{enum:["ar","en","he"],type:"string"},padding:{type:"string"},title:{type:"string"},rows:{items:{properties:{columns:{items:{properties:{columnWidth:{type:"number"},dataFilters:Z0(),dataTransform:U6(),graphDataConfiguration:e4(void 0,"dashboard"),graphType:{enum:jo.map(e=>e.graphID),type:"string"},settings:To("allGraphs"),dataSelectionOptions:W6(),advancedDataSelectionOptions:Is(),attachedFilter:{type:"string",...Lo(t)}},type:"object",required:["graphType"]},type:"array"},height:{type:"number"}},type:"object",required:["columns"]},type:"array"}},type:"object",required:["rows"]},dataSettings:Z3(t),filters:q6(t),noOfFiltersPerRow:{type:"number"},uiMode:{type:"string",enum:["light","normal"]},filterPosition:{type:"string",enum:["top","side"]},readableHeader:Q3(t),dataFilters:Z0(t),debugMode:{type:"boolean"},theme:{type:"string",enum:["dark","light"]},graphBackgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]}},type:"object",required:["dashboardLayout","dataSettings"]}),Aq=()=>({properties:{dashboardID:{type:"string"},graphClassNames:{type:"object"},graphStyles:{type:"object"},dashboardLayout:{properties:{backgroundColor:{type:["string","boolean"]},description:{type:"string"},language:{enum:["ar","en","he"],type:"string"},padding:{type:"string"},dropdownLabel:{type:"string"},title:{type:"string"},rows:{items:{properties:{columns:{items:{properties:{columnWidth:{type:"number"},dataFilters:Z0(),graphDataConfiguration:e4(void 0,"dashboardWideToLong"),graphType:{enum:jo.filter(t=>t.availableInWideToLongFormat).map(t=>t.graphID),type:"string"},settings:To("allGraphs")},type:"object",required:["graphType"]},type:"array"},height:{type:"number"}},type:"object",required:["columns"]},type:"array"}},type:"object",required:["rows"]},dataSettings:{properties:{...Z3().properties,keyColumn:{type:"string"}},required:["keyColumn"],type:"object"},uiMode:{type:"string",enum:["light","normal"]},dataFilters:Z0(),readableHeader:Q3(),debugMode:{type:"boolean"},theme:{type:"string",enum:["dark","light"]},graphBackgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]}},type:"object",required:["dashboardLayout","dataSettings"]}),bw=new Pbe({allErrors:!0,allowUnionTypes:!0});function iv(t,e){var i;if(jo.filter(o=>o.geoHubMapPresentation).map(o=>o.graphID).indexOf(e)!==-1)return{isValid:!0,err:void 0};if(!t)return{isValid:!1,err:"No data provided"};if(e==="dataTable"||e==="dataCards"||t.length===0)return{isValid:!0,err:void 0};const r=kq(e);if(!r)return{isValid:!1,err:`Invalid chart type: ${e}`};const n=bw.compile(r);return n(t)?{isValid:!0,err:void 0}:(console.error(n.errors),{isValid:!1,err:(i=n.errors)==null?void 0:i.map(o=>`Error at ${o.instancePath}: ${o.message}`).join("; ")})}function Lu(t,e){var i;const r=To(e);if(!r)return{isValid:!1,err:`Invalid chart type: ${e}`};const n=bw.compile(r);return n(t)?{isValid:!0,err:void 0}:(console.error(n.errors),{isValid:!1,err:(i=n.errors)==null?void 0:i.map(o=>`Error at ${o.instancePath}: ${o.message}`).join("; ")})}function G6(t,e){var i;let r;switch(e){case"griddedGraph":r=Oq(void 0,t.graphType);break;case"multiGraphDashboard":r=Dq();break;case"singleGraphDashboard":r=_q(void 0,t.graphType);break;case"multiGraphDashboardWideToLongFormat":r=Aq();break}if(!r)return{isValid:!1,err:`Invalid chart type: ${e}`};const n=bw.compile(r);return n(t)?{isValid:!0,err:void 0}:(console.error(n.errors),{isValid:!1,err:(i=n.errors)==null?void 0:i.map(o=>`Error at ${o.instancePath}: ${o.message}`).join("; ")})}function Tq(t){const{settings:e,graph:r,graphData:n,debugMode:a,graphDataConfiguration:i,readableHeader:o,updateFilters:l}=t;if(a&&(console.log(`Graph: ${r}`),console.log("Transformed data:",n),console.log("Settings:",e)),typeof n=="string")return v.jsx("div",{className:`flex my-0 mx-auto grow flex-col justify-center ${e!=null&&e.width?"w-fit":"w-full"}`,style:{height:"inherit"},children:v.jsx(or,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:n})});const s={barChart:Hb,groupedBarChart:tV,stackedBarChart:rV,lineChart:Ez,dualAxisLineChart:Tz,multiLineChart:jz,multiLineAltChart:Lz,stackedAreaChart:HH,choroplethMap:rH,biVariateChoroplethMap:tH,dotDensityMap:nH,donutChart:rx,slopeChart:zH,scatterPlot:FH,dumbbellChart:gV,treeMap:mw,circlePacking:Qb,heatMap:JH,stripChart:eq,beeSwarmChart:yV,butterflyChart:rq,histogram:nq,sparkLine:Iz,paretoChart:tq,dataTable:ZH,statCard:qH,geoHubCompareMap:BH,geoHubMap:SH,unitChart:YH,animatedScatterPlot:pq,animatedBarChart:gq,animatedStackedBarChart:vq,animatedGroupedBarChart:yq,animatedChoroplethMap:dq,animatedBiVariateChoroplethMap:fq,animatedDotDensityMap:hq,animatedDumbbellChart:mq,animatedButterflyChart:cq,differenceLineChart:Nz,geoHubMapWithLayerSelection:VH,sankeyChart:oq,lineChartWithConfidenceInterval:Mz,dataCards:QH,radarChart:lq},f=d=>{switch(d){case"barChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,height:e==null?void 0:e.height,width:e==null?void 0:e.width,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showValues:e==null?void 0:e.showValues,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,truncateBy:e==null?void 0:e.truncateBy,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,showLabels:e==null?void 0:e.showLabels,showColorScale:e==null?void 0:e.showColorScale,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,labelOrder:e==null?void 0:e.labelOrder,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,sortData:e==null?void 0:e.sortData,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,maxBarThickness:e==null?void 0:e.maxBarThickness,minBarThickness:e==null?void 0:e.minBarThickness,maxNumberOfBars:e==null?void 0:e.maxNumberOfBars,ariaLabel:e==null?void 0:e.ariaLabel,onSeriesMouseClick:m=>{l==null||l(m.label)},resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,detailsOnClick:e==null?void 0:e.detailsOnClick,barAxisTitle:e==null?void 0:e.barAxisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames,filterNA:e==null?void 0:e.filterNA};case"groupedBarChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showTicks:e==null?void 0:e.showTicks,truncateBy:e==null?void 0:e.truncateBy,colorDomain:(e==null?void 0:e.colorDomain)||Lr("size",i||[],o||[]),colorLegendTitle:e==null?void 0:e.colorLegendTitle,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,showValues:e==null?void 0:e.showValues,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,showLabels:e==null?void 0:e.showLabels,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,labelOrder:e==null?void 0:e.labelOrder,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,maxBarThickness:e==null?void 0:e.maxBarThickness,ariaLabel:e==null?void 0:e.ariaLabel,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,detailsOnClick:e==null?void 0:e.detailsOnClick,barAxisTitle:e==null?void 0:e.barAxisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"stackedBarChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,truncateBy:e==null?void 0:e.truncateBy,colorDomain:(e==null?void 0:e.colorDomain)||Lr("size",i||[],o||[]),colorLegendTitle:e==null?void 0:e.colorLegendTitle,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,labelOrder:e==null?void 0:e.labelOrder,showValues:e==null?void 0:e.showValues,showLabels:e==null?void 0:e.showLabels,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,maxBarThickness:e==null?void 0:e.maxBarThickness,minBarThickness:e==null?void 0:e.minBarThickness,maxNumberOfBars:e==null?void 0:e.maxNumberOfBars,sortParameter:e==null?void 0:e.sortParameter,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,barAxisTitle:e==null?void 0:e.barAxisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedBarChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,height:e==null?void 0:e.height,width:e==null?void 0:e.width,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showValues:e==null?void 0:e.showValues,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,truncateBy:e==null?void 0:e.truncateBy,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,showLabels:e==null?void 0:e.showLabels,showColorScale:e==null?void 0:e.showColorScale,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,sortData:e==null?void 0:e.sortData,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,autoPlay:e==null?void 0:e.autoPlay,autoSort:e==null?void 0:e.autoSort,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,maxBarThickness:e==null?void 0:e.maxBarThickness,minBarThickness:e==null?void 0:e.minBarThickness,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,barAxisTitle:e==null?void 0:e.barAxisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedGroupedBarChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showTicks:e==null?void 0:e.showTicks,truncateBy:e==null?void 0:e.truncateBy,colorDomain:(e==null?void 0:e.colorDomain)||Lr("size",i||[],o||[]),colorLegendTitle:e==null?void 0:e.colorLegendTitle,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,showValues:e==null?void 0:e.showValues,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,showLabels:e==null?void 0:e.showLabels,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,maxBarThickness:e==null?void 0:e.maxBarThickness,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,barAxisTitle:e==null?void 0:e.barAxisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedStackedBarChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,truncateBy:e==null?void 0:e.truncateBy,colorDomain:(e==null?void 0:e.colorDomain)||Lr("size",i||[],o||[]),colorLegendTitle:e==null?void 0:e.colorLegendTitle,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,showValues:e==null?void 0:e.showValues,showLabels:e==null?void 0:e.showLabels,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,maxBarThickness:e==null?void 0:e.maxBarThickness,minBarThickness:e==null?void 0:e.minBarThickness,sortParameter:e==null?void 0:e.sortParameter,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,barAxisTitle:e==null?void 0:e.barAxisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"lineChart":return{theme:e==null?void 0:e.theme,curveType:e==null?void 0:e.curveType,data:n,graphID:e==null?void 0:e.graphID,lineColor:e==null?void 0:e.lineColor,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,noOfXTicks:e==null?void 0:e.noOfXTicks,dateFormat:e==null?void 0:e.dateFormat,showValues:e==null?void 0:e.showValues,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,animateLine:e==null?void 0:e.animateLine,strokeWidth:e==null?void 0:e.strokeWidth,showDots:e==null?void 0:e.showDots,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,regressionLine:e==null?void 0:e.regressionLine,ariaLabel:e==null?void 0:e.ariaLabel,yAxisTitle:e==null?void 0:e.yAxisTitle,noOfYTicks:e==null?void 0:e.noOfYTicks,minDate:e==null?void 0:e.minDate,maxDate:e==null?void 0:e.maxDate,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"lineChartWithConfidenceInterval":return{theme:e==null?void 0:e.theme,data:n,curveType:e==null?void 0:e.curveType,graphID:e==null?void 0:e.graphID,lineColor:e==null?void 0:e.lineColor,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,noOfXTicks:e==null?void 0:e.noOfXTicks,dateFormat:e==null?void 0:e.dateFormat,showValues:e==null?void 0:e.showValues,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,animateLine:e==null?void 0:e.animateLine,strokeWidth:e==null?void 0:e.strokeWidth,showDots:e==null?void 0:e.showDots,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,regressionLine:e==null?void 0:e.regressionLine,ariaLabel:e==null?void 0:e.ariaLabel,showIntervalDots:e==null?void 0:e.showIntervalDots,showIntervalValues:e==null?void 0:e.showIntervalValues,intervalLineStrokeWidth:e==null?void 0:e.intervalLineStrokeWidth,intervalLineColors:e==null?void 0:e.intervalLineColors,intervalAreaColor:e==null?void 0:e.intervalAreaColor,intervalAreaOpacity:e==null?void 0:e.intervalAreaOpacity,yAxisTitle:e==null?void 0:e.yAxisTitle,noOfYTicks:e==null?void 0:e.noOfYTicks,minDate:e==null?void 0:e.minDate,maxDate:e==null?void 0:e.maxDate,colorLegendTitle:e==null?void 0:e.colorLegendTitle,colorLegendColors:e==null?void 0:e.colorLegendColors,colorLegendDomain:e==null?void 0:e.colorLegendDomain,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"dualAxisLineChart":return{theme:e==null?void 0:e.theme,data:n,curveType:e==null?void 0:e.curveType,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,labels:(e==null?void 0:e.labels)||[Lr("y1",i||[],o||[]),Lr("y2",i||[],o||[])],footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,noOfXTicks:e==null?void 0:e.noOfXTicks,dateFormat:e==null?void 0:e.dateFormat,showValues:e==null?void 0:e.showValues,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,lineColors:e==null?void 0:e.lineColors,sameAxes:e==null?void 0:e.sameAxes,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,animateLine:e==null?void 0:e.animateLine,strokeWidth:e==null?void 0:e.strokeWidth,showDots:e==null?void 0:e.showDots,colorLegendTitle:e==null?void 0:e.colorLegendTitle,ariaLabel:e==null?void 0:e.ariaLabel,noOfYTicks:e==null?void 0:e.noOfYTicks,minDate:e==null?void 0:e.minDate,maxDate:e==null?void 0:e.maxDate,lineSuffixes:e==null?void 0:e.lineSuffixes,linePrefixes:e==null?void 0:e.linePrefixes,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"multiLineChart":return{theme:e==null?void 0:e.theme,data:n,curveType:e==null?void 0:e.curveType,lineColors:e==null?void 0:e.lineColors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,noOfXTicks:e==null?void 0:e.noOfXTicks,dateFormat:e==null?void 0:e.dateFormat,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,labels:(e==null?void 0:e.labels)||Lr("y",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,showValues:e==null?void 0:e.showValues,relativeHeight:e==null?void 0:e.relativeHeight,showColorLegendAtTop:e==null?void 0:e.showColorLegendAtTop,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,highlightedLines:e==null?void 0:e.highlightedLines,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,animateLine:e==null?void 0:e.animateLine,strokeWidth:e==null?void 0:e.strokeWidth,showDots:e==null?void 0:e.showDots,colorLegendTitle:e==null?void 0:e.colorLegendTitle,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,ariaLabel:e==null?void 0:e.ariaLabel,yAxisTitle:e==null?void 0:e.yAxisTitle,noOfYTicks:e==null?void 0:e.noOfYTicks,minDate:e==null?void 0:e.minDate,maxDate:e==null?void 0:e.maxDate,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"multiLineAltChart":return{theme:e==null?void 0:e.theme,data:n,curveType:e==null?void 0:e.curveType,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,noOfXTicks:e==null?void 0:e.noOfXTicks,dateFormat:e==null?void 0:e.dateFormat,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,highlightedLines:e==null?void 0:e.highlightedLines,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,animateLine:e==null?void 0:e.animateLine,strokeWidth:e==null?void 0:e.strokeWidth,showDots:e==null?void 0:e.showDots,colorLegendTitle:e==null?void 0:e.colorLegendTitle,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,ariaLabel:e==null?void 0:e.ariaLabel,yAxisTitle:e==null?void 0:e.yAxisTitle,noOfYTicks:e==null?void 0:e.noOfYTicks,minDate:e==null?void 0:e.minDate,maxDate:e==null?void 0:e.maxDate,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames,colorDomain:e==null?void 0:e.colorDomain,showNAColor:e==null?void 0:e.showNAColor};case"differenceLineChart":return{theme:e==null?void 0:e.theme,data:n,curveType:e==null?void 0:e.curveType,lineColors:e==null?void 0:e.colors,diffAreaColors:e==null?void 0:e.diffAreaColors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,noOfXTicks:e==null?void 0:e.noOfXTicks,dateFormat:e==null?void 0:e.dateFormat,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,labels:(e==null?void 0:e.labels)||[Lr("y1",i||[],o||[]),Lr("y2",i||[],o||[])],backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,showValues:e==null?void 0:e.showValues,relativeHeight:e==null?void 0:e.relativeHeight,showColorLegendAtTop:e==null?void 0:e.showColorLegendAtTop,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,animateLine:e==null?void 0:e.animateLine,strokeWidth:e==null?void 0:e.strokeWidth,showDots:e==null?void 0:e.showDots,colorLegendTitle:e==null?void 0:e.colorLegendTitle,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,ariaLabel:e==null?void 0:e.ariaLabel,yAxisTitle:e==null?void 0:e.yAxisTitle,noOfYTicks:e==null?void 0:e.noOfYTicks,minDate:e==null?void 0:e.minDate,maxDate:e==null?void 0:e.maxDate,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"stackedAreaChart":return{theme:e==null?void 0:e.theme,data:n,curveType:e==null?void 0:e.curveType,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,noOfXTicks:e==null?void 0:e.noOfXTicks,dateFormat:e==null?void 0:e.dateFormat,colorDomain:(e==null?void 0:e.colorDomain)||Lr("y",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,colorLegendTitle:e==null?void 0:e.colorLegendTitle,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,relativeHeight:e==null?void 0:e.relativeHeight,bottomMargin:e==null?void 0:e.bottomMargin,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,showColorScale:e==null?void 0:e.showColorScale,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,ariaLabel:e==null?void 0:e.ariaLabel,yAxisTitle:e==null?void 0:e.yAxisTitle,noOfYTicks:e==null?void 0:e.noOfYTicks,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"choroplethMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,graphTitle:e==null?void 0:e.graphTitle,mapData:e==null?void 0:e.mapData,mapProjection:e==null?void 0:e.mapProjection,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,colorDomain:e==null?void 0:e.colorDomain,colors:e==null?void 0:e.colors,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("x",i||[],o||[]),categorical:e==null?void 0:e.categorical,data:n,scale:e==null?void 0:e.scale,centerPoint:e==null?void 0:e.centerPoint,backgroundColor:e==null?void 0:e.backgroundColor,mapBorderWidth:e==null?void 0:e.mapBorderWidth,mapNoDataColor:e==null?void 0:e.mapNoDataColor,mapBorderColor:e==null?void 0:e.mapBorderColor,relativeHeight:e==null?void 0:e.relativeHeight,padding:e==null?void 0:e.padding,isWorldMap:e==null?void 0:e.isWorldMap,tooltip:e==null?void 0:e.tooltip,showColorScale:e==null?void 0:e.showColorScale,zoomScaleExtend:e==null?void 0:e.zoomScaleExtend,zoomTranslateExtend:e==null?void 0:e.zoomTranslateExtend,graphID:e==null?void 0:e.graphID,highlightedIds:e==null?void 0:e.highlightedIds,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,mapProperty:e==null?void 0:e.mapProperty,showAntarctica:e==null?void 0:e.showAntarctica,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,onSeriesMouseClick:m=>{l==null||l(m.id)},detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"biVariateChoroplethMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,mapData:e==null?void 0:e.mapData,mapProjection:e==null?void 0:e.mapProjection,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,xColorLegendTitle:Object.keys(e||{}).indexOf("xColorLegendTitle")!==-1?e==null?void 0:e.xColorLegendTitle:Lr("x",i||[],o||[]),yColorLegendTitle:Object.keys(e||{}).indexOf("yColorLegendTitle")!==-1?e==null?void 0:e.yColorLegendTitle:Lr("y",i||[],o||[]),xDomain:e==null?void 0:e.xDomain,yDomain:e==null?void 0:e.yDomain,colors:e==null?void 0:e.colors,scale:e==null?void 0:e.scale,centerPoint:e==null?void 0:e.centerPoint,backgroundColor:e==null?void 0:e.backgroundColor,mapBorderWidth:e==null?void 0:e.mapBorderWidth,mapNoDataColor:e==null?void 0:e.mapNoDataColor,padding:e==null?void 0:e.padding,mapBorderColor:e==null?void 0:e.mapBorderColor,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,isWorldMap:e==null?void 0:e.isWorldMap,zoomScaleExtend:e==null?void 0:e.zoomScaleExtend,zoomTranslateExtend:e==null?void 0:e.zoomTranslateExtend,graphID:e==null?void 0:e.graphID,highlightedIds:e==null?void 0:e.highlightedIds,mapProperty:e==null?void 0:e.mapProperty,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,showAntarctica:e==null?void 0:e.showAntarctica,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,onSeriesMouseClick:m=>{l==null||l(m.id)},detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"dotDensityMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,graphTitle:e==null?void 0:e.graphTitle,mapData:e==null?void 0:e.mapData,mapProjection:e==null?void 0:e.mapProjection,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,radius:e==null?void 0:e.radius,sources:e==null?void 0:e.sources,colors:e==null?void 0:e.colors,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),data:n,scale:e==null?void 0:e.scale,centerPoint:e==null?void 0:e.centerPoint,backgroundColor:e==null?void 0:e.backgroundColor,mapBorderWidth:e==null?void 0:e.mapBorderWidth,mapNoDataColor:e==null?void 0:e.mapNoDataColor,mapBorderColor:e==null?void 0:e.mapBorderColor,padding:e==null?void 0:e.padding,showLabels:e==null?void 0:e.showLabels,relativeHeight:e==null?void 0:e.relativeHeight,isWorldMap:e==null?void 0:e.isWorldMap,tooltip:e==null?void 0:e.tooltip,showColorScale:e==null?void 0:e.showColorScale,zoomScaleExtend:e==null?void 0:e.zoomScaleExtend,zoomTranslateExtend:e==null?void 0:e.zoomTranslateExtend,graphID:e==null?void 0:e.graphID,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,showAntarctica:e==null?void 0:e.showAntarctica,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"donutChart":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,mainText:e==null?void 0:e.mainText,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,graphDescription:e==null?void 0:e.graphDescription,subNote:e==null?void 0:e.subNote,footNote:e==null?void 0:e.footNote,radius:e==null?void 0:e.radius,strokeWidth:e==null?void 0:e.strokeWidth,showColorScale:e==null?void 0:e.showColorScale,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,colorDomain:e==null?void 0:e.colorDomain,sortData:e==null?void 0:e.sortData,language:e==null?void 0:e.language,width:e==null?void 0:e.width,height:e==null?void 0:e.height,minHeight:e==null?void 0:e.minHeight,relativeHeight:e==null?void 0:e.relativeHeight,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,ariaLabel:e==null?void 0:e.ariaLabel,legendMaxWidth:e==null?void 0:e.legendMaxWidth,onSeriesMouseClick:m=>{l==null||l(m.label)},detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames,colorScaleMaxWidth:e==null?void 0:e.colorScaleMaxWidth};case"slopeChart":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,showLabels:e==null?void 0:e.showLabels,colors:e==null?void 0:e.colors,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),radius:e==null?void 0:e.radius,axisTitles:e==null?void 0:e.axisTitles,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,showColorScale:e==null?void 0:e.showColorScale,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,fillContainer:e==null?void 0:e.fillContainer,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"scatterPlot":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,showLabels:e==null?void 0:e.showLabels,colors:e==null?void 0:e.colors,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),radius:e==null?void 0:e.radius,xAxisTitle:Object.keys(e||{}).indexOf("xAxisTitle")!==-1?e==null?void 0:e.xAxisTitle:Lr("x",i||[],o||[]),yAxisTitle:Object.keys(e||{}).indexOf("yAxisTitle")!==-1?e==null?void 0:e.yAxisTitle:Lr("y",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refXValues:e==null?void 0:e.refXValues,refYValues:e==null?void 0:e.refYValues,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,showColorScale:e==null?void 0:e.showColorScale,graphID:e==null?void 0:e.graphID,maxRadiusValue:e==null?void 0:e.maxRadiusValue,maxXValue:e==null?void 0:e.maxXValue,minXValue:e==null?void 0:e.minXValue,maxYValue:e==null?void 0:e.maxYValue,minYValue:e==null?void 0:e.minYValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,regressionLine:e==null?void 0:e.regressionLine,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,noOfXTicks:e==null?void 0:e.noOfXTicks,noOfYTicks:e==null?void 0:e.noOfYTicks,labelColor:e==null?void 0:e.labelColor,xSuffix:e==null?void 0:e.xSuffix,ySuffix:e==null?void 0:e.ySuffix,xPrefix:e==null?void 0:e.xPrefix,yPrefix:e==null?void 0:e.yPrefix,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"dumbbellChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,refValues:e==null?void 0:e.refValues,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,truncateBy:e==null?void 0:e.truncateBy,labelOrder:e==null?void 0:e.labelOrder,colorDomain:(e==null?void 0:e.colorDomain)||Lr("x",i||[],o||[]),colorLegendTitle:e==null?void 0:e.colorLegendTitle,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,radius:e==null?void 0:e.radius,relativeHeight:e==null?void 0:e.relativeHeight,showValues:e==null?void 0:e.showValues,showLabels:e==null?void 0:e.showLabels,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,maxPositionValue:e==null?void 0:e.maxPositionValue,minPositionValue:e==null?void 0:e.minPositionValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,sortParameter:e==null?void 0:e.sortParameter,arrowConnector:e==null?void 0:e.arrowConnector,connectorStrokeWidth:e==null?void 0:e.connectorStrokeWidth,maxBarThickness:e==null?void 0:e.maxBarThickness,minBarThickness:e==null?void 0:e.minBarThickness,maxNumberOfBars:e==null?void 0:e.maxNumberOfBars,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,axisTitle:e==null?void 0:e.axisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"treeMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,showLabels:e==null?void 0:e.showLabels,tooltip:e==null?void 0:e.tooltip,showColorScale:e==null?void 0:e.showColorScale,showValues:e==null?void 0:e.showValues,graphID:e==null?void 0:e.graphID,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,ariaLabel:e==null?void 0:e.ariaLabel,onSeriesMouseClick:m=>{l==null||l(m.label)},detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"circlePacking":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,showLabels:e==null?void 0:e.showLabels,tooltip:e==null?void 0:e.tooltip,showColorScale:e==null?void 0:e.showColorScale,showValues:e==null?void 0:e.showValues,graphID:e==null?void 0:e.graphID,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,ariaLabel:e==null?void 0:e.ariaLabel,radius:e==null?void 0:e.radius,maxRadiusValue:e==null?void 0:e.maxRadiusValue,onSeriesMouseClick:m=>{l==null||l(m.label)},detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"heatMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,scaleType:e==null?void 0:e.scaleType,colorDomain:e==null?void 0:e.colorDomain,showColumnLabels:e==null?void 0:e.showColumnLabels,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,truncateBy:e==null?void 0:e.truncateBy,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,showValues:e==null?void 0:e.showValues,showRowLabels:e==null?void 0:e.showRowLabels,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,noDataColor:e==null?void 0:e.noDataColor,showColorScale:e==null?void 0:e.showColorScale,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,fillContainer:e==null?void 0:e.fillContainer,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"stripChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,colors:e==null?void 0:e.colors,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),radius:e==null?void 0:e.radius,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,showColorScale:e==null?void 0:e.showColorScale,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,showAxis:e==null?void 0:e.showAxis,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,prefix:e==null?void 0:e.prefix,suffix:e==null?void 0:e.suffix,stripType:e==null?void 0:e.stripType,valueColor:e==null?void 0:e.valueColor,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,highlightColor:e==null?void 0:e.highlightColor,dotOpacity:e==null?void 0:e.dotOpacity,showNAColor:e==null?void 0:e.showNAColor,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"beeSwarmChart":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,showLabels:e==null?void 0:e.showLabels,showColorScale:e==null?void 0:e.showColorScale,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,radius:e==null?void 0:e.radius,maxRadiusValue:e==null?void 0:e.maxRadiusValue,maxPositionValue:e==null?void 0:e.maxPositionValue,minPositionValue:e==null?void 0:e.minPositionValue,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,orientation:e==null?void 0:e.orientation,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"butterflyChart":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,leftBarTitle:Object.keys(e||{}).indexOf("leftBarTitle")!==-1?e==null?void 0:e.leftBarTitle:Lr("leftBar",i||[],o||[]),rightBarTitle:Object.keys(e||{}).indexOf("rightBarTitle")!==-1?e==null?void 0:e.rightBarTitle:Lr("rightBar",i||[],o||[]),footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,barColors:e==null?void 0:e.barColors,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,barPadding:e==null?void 0:e.barPadding,truncateBy:e==null?void 0:e.truncateBy,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,showTicks:e==null?void 0:e.showTicks,showValues:e==null?void 0:e.showValues,centerGap:e==null?void 0:e.centerGap,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,showColorScale:e==null?void 0:e.showColorScale,refValues:e==null?void 0:e.refValues,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"histogram":return{theme:e==null?void 0:e.theme,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showValues:e==null?void 0:e.showValues,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,showLabels:e==null?void 0:e.showLabels,maxValue:e==null?void 0:e.maxValue,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,numberOfBins:e==null?void 0:e.numberOfBins,truncateBy:e==null?void 0:e.truncateBy,donutStrokeWidth:e==null?void 0:e.donutStrokeWidth,sortData:e==null?void 0:e.sortData,barGraphLayout:e==null?void 0:e.barGraphLayout,graphType:e==null?void 0:e.graphType,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,maxBarThickness:e==null?void 0:e.maxBarThickness,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"sparkLine":return{theme:e==null?void 0:e.theme,data:n,curveType:e==null?void 0:e.curveType,lineColor:e==null?void 0:e.lineColor,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,dateFormat:e==null?void 0:e.dateFormat,area:e==null?void 0:e.area,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"paretoChart":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,showValues:e==null?void 0:e.showValues,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,barTitle:Object.keys(e||{}).indexOf("barTitle")!==-1?e==null?void 0:e.barTitle:Lr("barTitle",i||[],o||[]),lineTitle:Object.keys(e||{}).indexOf("lineTitle")!==-1?e==null?void 0:e.lineTitle:Lr("lineTitle",i||[],o||[]),footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,barColor:e==null?void 0:e.barColor,curveType:e==null?void 0:e.curveType,lineColor:e==null?void 0:e.lineColor,sameAxes:e==null?void 0:e.sameAxes,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,barPadding:e==null?void 0:e.barPadding,truncateBy:e==null?void 0:e.truncateBy,showLabels:e==null?void 0:e.showLabels,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,noOfTicks:e==null?void 0:e.noOfTicks,lineSuffix:e==null?void 0:e.lineSuffix,barSuffix:e==null?void 0:e.barSuffix,linePrefix:e==null?void 0:e.lineSuffix,barPrefix:e==null?void 0:e.barPrefix,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"dataTable":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,graphTitle:e==null?void 0:e.graphTitle,sources:e==null?void 0:e.sources,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,graphID:e==null?void 0:e.graphID,width:e==null?void 0:e.width,height:e==null?void 0:e.height,columnData:(e==null?void 0:e.columnData)||[],data:n,language:e==null?void 0:e.language,ariaLabel:e==null?void 0:e.ariaLabel,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"statCard":return{theme:e==null?void 0:e.theme,year:e==null?void 0:e.year,data:n,graphTitle:(e==null?void 0:e.graphTitle)||"",graphDescription:e==null?void 0:e.graphDescription,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:(e==null?void 0:e.sources)||[],footNote:e==null?void 0:e.footNote,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,graphID:e==null?void 0:e.graphID,aggregationMethod:e==null?void 0:e.aggregationMethod,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,countOnly:e==null?void 0:e.countOnly,ariaLabel:e==null?void 0:e.ariaLabel,textBackground:e==null?void 0:e.textBackground,headingFontSize:e==null?void 0:e.headingFontSize,centerAlign:e==null?void 0:e.centerAlign,verticalAlign:e==null?void 0:e.verticalAlign,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"geoHubCompareMap":return{theme:e==null?void 0:e.theme,graphTitle:e==null?void 0:e.graphTitle,sources:e==null?void 0:e.sources,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,width:e==null?void 0:e.width,height:e==null?void 0:e.height,relativeHeight:e==null?void 0:e.relativeHeight,graphID:e==null?void 0:e.graphID,mapStyles:e==null?void 0:e.mapStyles,center:e==null?void 0:e.center,zoomLevel:e==null?void 0:e.zoomLevel,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"geoHubMap":return{theme:e==null?void 0:e.theme,mapStyle:e==null?void 0:e.mapStyle,center:e==null?void 0:e.center,zoomLevel:e==null?void 0:e.zoomLevel,graphTitle:e==null?void 0:e.graphTitle,sources:e==null?void 0:e.sources,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,width:e==null?void 0:e.width,height:e==null?void 0:e.height,relativeHeight:e==null?void 0:e.relativeHeight,graphID:e==null?void 0:e.graphID,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,includeLayers:e==null?void 0:e.includeLayers,excludeLayers:e==null?void 0:e.excludeLayers,ariaLabel:e==null?void 0:e.ariaLabel,uiMode:e==null?void 0:e.uiMode,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"geoHubMapWithLayerSelection":return{theme:e==null?void 0:e.theme,mapStyle:e==null?void 0:e.mapStyle,center:e==null?void 0:e.center,zoomLevel:e==null?void 0:e.zoomLevel,graphTitle:e==null?void 0:e.graphTitle,sources:e==null?void 0:e.sources,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,width:e==null?void 0:e.width,height:e==null?void 0:e.height,relativeHeight:e==null?void 0:e.relativeHeight,graphID:e==null?void 0:e.graphID,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,layerSelection:e==null?void 0:e.layerSelection,excludeLayers:e==null?void 0:e.excludeLayers,ariaLabel:e==null?void 0:e.ariaLabel,uiMode:e==null?void 0:e.uiMode};case"unitChart":return{theme:e==null?void 0:e.theme,totalNoOfDots:e==null?void 0:e.totalNoOfDots,gridSize:e==null?void 0:e.gridSize,unitPadding:e==null?void 0:e.unitPadding,size:e==null?void 0:e.size,graphTitle:e==null?void 0:e.graphTitle,sources:e==null?void 0:e.sources,colors:e==null?void 0:e.colors,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,showColorScale:e==null?void 0:e.showColorScale,showStrokeForWhiteDots:e==null?void 0:e.showStrokeForWhiteDots,note:e==null?void 0:e.note,data:n,width:e==null?void 0:e.width,height:e==null?void 0:e.height,minHeight:e==null?void 0:e.minHeight,relativeHeight:e==null?void 0:e.relativeHeight,ariaLabel:e==null?void 0:e.ariaLabel,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedBiVariateChoroplethMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,mapData:e==null?void 0:e.mapData,mapProjection:e==null?void 0:e.mapProjection,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,xColorLegendTitle:Object.keys(e||{}).indexOf("xColorLegendTitle")!==-1?e==null?void 0:e.xColorLegendTitle:Lr("x",i||[],o||[]),yColorLegendTitle:Object.keys(e||{}).indexOf("yColorLegendTitle")!==-1?e==null?void 0:e.yColorLegendTitle:Lr("y",i||[],o||[]),xDomain:e==null?void 0:e.xDomain,yDomain:e==null?void 0:e.yDomain,colors:e==null?void 0:e.colors,scale:e==null?void 0:e.scale,centerPoint:e==null?void 0:e.centerPoint,backgroundColor:e==null?void 0:e.backgroundColor,mapBorderWidth:e==null?void 0:e.mapBorderWidth,mapNoDataColor:e==null?void 0:e.mapNoDataColor,padding:e==null?void 0:e.padding,mapBorderColor:e==null?void 0:e.mapBorderColor,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,isWorldMap:e==null?void 0:e.isWorldMap,zoomScaleExtend:e==null?void 0:e.zoomScaleExtend,zoomTranslateExtend:e==null?void 0:e.zoomTranslateExtend,graphID:e==null?void 0:e.graphID,highlightedIds:e==null?void 0:e.highlightedIds,mapProperty:e==null?void 0:e.mapProperty,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,showAntarctica:e==null?void 0:e.showAntarctica,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedChoroplethMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,graphTitle:e==null?void 0:e.graphTitle,mapData:e==null?void 0:e.mapData,mapProjection:e==null?void 0:e.mapProjection,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,colorDomain:e==null?void 0:e.colorDomain,colors:e==null?void 0:e.colors,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("x",i||[],o||[]),categorical:e==null?void 0:e.categorical,data:n,scale:e==null?void 0:e.scale,centerPoint:e==null?void 0:e.centerPoint,backgroundColor:e==null?void 0:e.backgroundColor,mapBorderWidth:e==null?void 0:e.mapBorderWidth,mapNoDataColor:e==null?void 0:e.mapNoDataColor,mapBorderColor:e==null?void 0:e.mapBorderColor,relativeHeight:e==null?void 0:e.relativeHeight,padding:e==null?void 0:e.padding,isWorldMap:e==null?void 0:e.isWorldMap,tooltip:e==null?void 0:e.tooltip,showColorScale:e==null?void 0:e.showColorScale,zoomScaleExtend:e==null?void 0:e.zoomScaleExtend,zoomTranslateExtend:e==null?void 0:e.zoomTranslateExtend,graphID:e==null?void 0:e.graphID,highlightedIds:e==null?void 0:e.highlightedIds,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,mapProperty:e==null?void 0:e.mapProperty,showAntarctica:e==null?void 0:e.showAntarctica,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedDotDensityMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,graphTitle:e==null?void 0:e.graphTitle,mapData:e==null?void 0:e.mapData,mapProjection:e==null?void 0:e.mapProjection,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,radius:e==null?void 0:e.radius,sources:e==null?void 0:e.sources,colors:e==null?void 0:e.colors,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),data:n,scale:e==null?void 0:e.scale,centerPoint:e==null?void 0:e.centerPoint,backgroundColor:e==null?void 0:e.backgroundColor,mapBorderWidth:e==null?void 0:e.mapBorderWidth,mapNoDataColor:e==null?void 0:e.mapNoDataColor,mapBorderColor:e==null?void 0:e.mapBorderColor,padding:e==null?void 0:e.padding,showLabels:e==null?void 0:e.showLabels,relativeHeight:e==null?void 0:e.relativeHeight,isWorldMap:e==null?void 0:e.isWorldMap,tooltip:e==null?void 0:e.tooltip,showColorScale:e==null?void 0:e.showColorScale,zoomScaleExtend:e==null?void 0:e.zoomScaleExtend,zoomTranslateExtend:e==null?void 0:e.zoomTranslateExtend,graphID:e==null?void 0:e.graphID,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,showAntarctica:e==null?void 0:e.showAntarctica,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedButterflyChart":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,leftBarTitle:Object.keys(e||{}).indexOf("leftBarTitle")!==-1?e==null?void 0:e.leftBarTitle:Lr("leftBar",i||[],o||[]),rightBarTitle:Object.keys(e||{}).indexOf("rightBarTitle")!==-1?e==null?void 0:e.rightBarTitle:Lr("rightBar",i||[],o||[]),footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,barColors:e==null?void 0:e.barColors,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,barPadding:e==null?void 0:e.barPadding,truncateBy:e==null?void 0:e.truncateBy,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,showTicks:e==null?void 0:e.showTicks,showValues:e==null?void 0:e.showValues,centerGap:e==null?void 0:e.centerGap,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,showColorScale:e==null?void 0:e.showColorScale,refValues:e==null?void 0:e.refValues,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedDumbbellChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,refValues:e==null?void 0:e.refValues,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,truncateBy:e==null?void 0:e.truncateBy,colorDomain:(e==null?void 0:e.colorDomain)||Lr("x",i||[],o||[]),colorLegendTitle:e==null?void 0:e.colorLegendTitle,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,radius:e==null?void 0:e.radius,relativeHeight:e==null?void 0:e.relativeHeight,showValues:e==null?void 0:e.showValues,showLabels:e==null?void 0:e.showLabels,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,maxPositionValue:e==null?void 0:e.maxPositionValue,minPositionValue:e==null?void 0:e.minPositionValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,sortParameter:e==null?void 0:e.sortParameter,arrowConnector:e==null?void 0:e.arrowConnector,connectorStrokeWidth:e==null?void 0:e.connectorStrokeWidth,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,maxBarThickness:e==null?void 0:e.maxBarThickness,minBarThickness:e==null?void 0:e.minBarThickness,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,axisTitle:e==null?void 0:e.axisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedScatterPlot":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,showLabels:e==null?void 0:e.showLabels,colors:e==null?void 0:e.colors,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),radius:e==null?void 0:e.radius,xAxisTitle:e==null?void 0:e.xAxisTitle,yAxisTitle:e==null?void 0:e.yAxisTitle,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refXValues:e==null?void 0:e.refXValues,refYValues:e==null?void 0:e.refYValues,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,showColorScale:e==null?void 0:e.showColorScale,graphID:e==null?void 0:e.graphID,maxRadiusValue:e==null?void 0:e.maxRadiusValue,maxXValue:e==null?void 0:e.maxXValue,minXValue:e==null?void 0:e.minXValue,maxYValue:e==null?void 0:e.maxYValue,minYValue:e==null?void 0:e.minYValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,noOfXTicks:e==null?void 0:e.noOfXTicks,noOfYTicks:e==null?void 0:e.noOfYTicks,labelColor:e==null?void 0:e.labelColor,xSuffix:e==null?void 0:e.xSuffix,ySuffix:e==null?void 0:e.ySuffix,xPrefix:e==null?void 0:e.xPrefix,yPrefix:e==null?void 0:e.yPrefix,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"sankeyChart":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,showLabels:e==null?void 0:e.showLabels,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,truncateBy:e==null?void 0:e.truncateBy,padding:e==null?void 0:e.padding,backgroundColor:e==null?void 0:e.backgroundColor,tooltip:e==null?void 0:e.tooltip,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,relativeHeight:e==null?void 0:e.relativeHeight,showValues:e==null?void 0:e.showValues,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,fillContainer:e==null?void 0:e.fillContainer,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,sourceColors:e==null?void 0:e.sourceColors,targetColors:e==null?void 0:e.targetColors,sourceColorDomain:e==null?void 0:e.sourceColorDomain,targetColorDomain:e==null?void 0:e.targetColorDomain,nodePadding:e==null?void 0:e.nodePadding,nodeWidth:e==null?void 0:e.nodeWidth,highlightedSourceDataPoints:e==null?void 0:e.highlightedSourceDataPoints,highlightedTargetDataPoints:e==null?void 0:e.highlightedTargetDataPoints,defaultLinkOpacity:e==null?void 0:e.defaultLinkOpacity,sourceTitle:e==null?void 0:e.sourceTitle,targetTitle:e==null?void 0:e.targetTitle,animateLinks:e==null?void 0:e.animateLinks,sortNodes:e==null?void 0:e.sortNodes,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"dataCards":return{theme:e==null?void 0:e.theme,graphTitle:e==null?void 0:e.graphTitle,sources:e==null?void 0:e.sources,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,graphID:e==null?void 0:e.graphID,width:e==null?void 0:e.width,height:e==null?void 0:e.height,columnData:(e==null?void 0:e.columnData)||[],data:n,language:e==null?void 0:e.language,ariaLabel:e==null?void 0:e.ariaLabel,cardTemplate:e==null?void 0:e.cardTemplate,cardBackgroundColor:e==null?void 0:e.cardBackgroundColor,cardFilters:(e==null?void 0:e.cardFilters)||[],cardSortingOptions:e==null?void 0:e.cardSortingOptions,cardSearchColumns:e==null?void 0:e.cardSearchColumns,cardMinWidth:e==null?void 0:e.cardMinWidth,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,detailsOnClick:e==null?void 0:e.detailsOnClick,allowDataDownloadOnDetail:e==null?void 0:e.allowDataDownloadOnDetail,noOfItemsInAPage:e==null?void 0:e.noOfItemsInAPage,uiMode:e==null?void 0:e.uiMode,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"radarChart":return{graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,sources:e==null?void 0:e.sources,ariaLabel:e==null?void 0:e.ariaLabel,colors:e==null?void 0:e.colors,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:e==null?void 0:e.colorLegendTitle,backgroundColor:e==null?void 0:e.backgroundColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames,width:e==null?void 0:e.width,height:e==null?void 0:e.height,minHeight:e==null?void 0:e.minHeight,relativeHeight:e==null?void 0:e.relativeHeight,padding:e==null?void 0:e.padding,radius:e==null?void 0:e.radius,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,showValues:e==null?void 0:e.showValues,showDots:e==null?void 0:e.showDots,strokeWidth:e==null?void 0:e.strokeWidth,fillShape:e==null?void 0:e.fillShape,noOfTicks:e==null?void 0:e.noOfTicks,showColorScale:e==null?void 0:e.showColorScale,showNAColor:e==null?void 0:e.showNAColor,highlightedLines:e==null?void 0:e.highlightedLines,axisLabels:e==null?void 0:e.axisLabels,curveType:e==null?void 0:e.curveType,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,tooltip:e==null?void 0:e.tooltip,detailsOnClick:e==null?void 0:e.detailsOnClick,language:e==null?void 0:e.language,theme:e==null?void 0:e.theme,graphID:e==null?void 0:e.graphID};default:return{}}},c=s[r],h=f(r);return v.jsx("div",{className:`grow my-0 ${r!=="statCard"?"mx-auto":"mx-0"} flex flex-col h-inherit ${e!=null&&e.width?"w-fit":"w-full"} ${r!=="unitChart"&&r!=="statCard"?"justify-center":"justify-start"} ${(e==null?void 0:e.theme)||"light"}`,style:{minHeight:"inherit"},children:Lu(f(r)||{},r).isValid&&iv(n,r).isValid&&c?v.jsx(c,{...h}):v.jsx(or,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:c?Lu(e||{},r).isValid?`Error in data: ${iv(n,r).err}`:`Error in settings: ${Lu(e||{},r).err}`:`Invalid chart type: ${r}`})})}const Vc=[{chartID:"barChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",required:!0,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"radarChart",configuration:[{id:"label",required:!1,multiple:!1},{id:"values",required:!0,multiple:!0},{id:"color",required:!1,multiple:!1}]},{chartID:"stackedBarChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",multiple:!0,required:!0}]},{chartID:"groupedBarChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",multiple:!0,required:!0}]},{chartID:"animatedBarChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",required:!0,multiple:!1},{id:"color",required:!1,multiple:!1},{id:"date",required:!0,multiple:!1}]},{chartID:"animatedStackedBarChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",multiple:!0,required:!0},{id:"date",required:!0,multiple:!1}]},{chartID:"animatedGroupedBarChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",multiple:!0,required:!0},{id:"date",required:!0,multiple:!1}]},{chartID:"lineChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1}]},{chartID:"dualAxisLineChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y1",multiple:!1,required:!0},{id:"y2",multiple:!1,required:!0}]},{chartID:"differenceLineChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y1",multiple:!1,required:!0},{id:"y2",multiple:!1,required:!0}]},{chartID:"multiLineChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y",multiple:!0,required:!0}]},{chartID:"multiLineAltChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y",multiple:!1,required:!0},{id:"label",multiple:!1,required:!0},{id:"color",multiple:!1,required:!1}]},{chartID:"stackedAreaChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y",multiple:!0,required:!0}]},{chartID:"choroplethMap",configuration:[{id:"id",required:!0,multiple:!1},{id:"x",required:!0,multiple:!1}]},{chartID:"biVariateChoroplethMap",configuration:[{id:"id",required:!0,multiple:!1},{id:"x",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1}]},{chartID:"dotDensityMap",configuration:[{id:"lat",required:!0,multiple:!1},{id:"long",required:!0,multiple:!1},{id:"label",multiple:!1,required:!1},{id:"color",multiple:!1,required:!1},{id:"radius",required:!1,multiple:!1}]},{chartID:"animatedChoroplethMap",configuration:[{id:"id",required:!0,multiple:!1},{id:"x",required:!0,multiple:!1},{id:"date",required:!0,multiple:!1}]},{chartID:"animatedBiVariateChoroplethMap",configuration:[{id:"id",required:!0,multiple:!1},{id:"x",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1},{id:"date",required:!0,multiple:!1}]},{chartID:"animatedDotDensityMap",configuration:[{id:"lat",required:!0,multiple:!1},{id:"long",required:!0,multiple:!1},{id:"label",multiple:!1,required:!1},{id:"color",multiple:!1,required:!1},{id:"radius",required:!1,multiple:!1},{id:"date",required:!0,multiple:!1}]},{chartID:"donutChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",required:!0,multiple:!1}]},{chartID:"slopeChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"y1",required:!0,multiple:!1},{id:"y2",required:!0,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"scatterPlot",configuration:[{id:"x",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1},{id:"radius",required:!1,multiple:!1},{id:"color",required:!1,multiple:!1},{id:"label",required:!0,multiple:!1}]},{chartID:"animatedScatterPlot",configuration:[{id:"x",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1},{id:"radius",required:!1,multiple:!1},{id:"color",required:!1,multiple:!1},{id:"label",required:!0,multiple:!1},{id:"date",required:!0,multiple:!1}]},{chartID:"dumbbellChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"x",multiple:!0,required:!0}]},{chartID:"animatedDumbbellChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"x",multiple:!0,required:!0},{id:"date",required:!0,multiple:!1}]},{chartID:"treeMap",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",required:!0,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"circlePacking",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",required:!1,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"sankeyChart",configuration:[{id:"source",required:!0,multiple:!1},{id:"target",required:!0,multiple:!1},{id:"value",required:!1,multiple:!1}]},{chartID:"heatMap",configuration:[{id:"row",required:!0,multiple:!1},{id:"column",required:!0,multiple:!1},{id:"value",required:!0,multiple:!1}]},{chartID:"stripChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"position",required:!0,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"statCard",configuration:[{id:"value",required:!0,multiple:!1}]},{chartID:"beeSwarmChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"position",required:!0,multiple:!1},{id:"radius",required:!1,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"butterflyChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"leftBar",required:!0,multiple:!1},{id:"rightBar",required:!0,multiple:!1}]},{chartID:"animatedButterflyChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"leftBar",required:!0,multiple:!1},{id:"rightBar",required:!0,multiple:!1},{id:"date",required:!0,multiple:!1}]},{chartID:"lineChartWithConfidenceInterval",configuration:[{id:"date",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1},{id:"yMin",required:!1,multiple:!1},{id:"yMax",required:!1,multiple:!1}]},{chartID:"histogram",configuration:[{id:"value",required:!0,multiple:!1}]},{chartID:"sparkLine",configuration:[{id:"dale",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1}]},{chartID:"paretoChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"bar",required:!0,multiple:!1},{id:"line",required:!0,multiple:!1}]},{chartID:"unitChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"value",required:!0,multiple:!1}]}];function cj(t,e){return e.filter(r=>!t.includes(r))}function fwe(t,e,r){const n=f1(t.map(s=>s.columnId)),a=cj(r,n);if(a.length!==0)return{isValid:!1,err:`Key(s) in configuration that don't match keys in the data: ${a.join(", ")}. Possible reason: If you are using 'dataTransform' then the allowed keys (columns) are only the one present in 'aggregationColumnsSetting' array in 'dataTransform' object plus n additional key called 'count'.`};const i=t.map(s=>s.chartConfigId),o=Vc[Vc.findIndex(s=>s.chartID===e)].configuration.filter(s=>s.required).map(s=>s.id),l=cj(i,o);return{isValid:l.length===0,err:l.length===0?void 0:`Missing required ID(s) in configuration: ${l.join(", ")}`}}function Wf(t,e,r){if(jo.filter(a=>a.geoHubMapPresentation).map(a=>a.graphID).indexOf(e)!==-1)return t;if(!t)return"Cannot fetch data";if(e==="dataTable"||e==="dataCards"||t.length===0)return t;if(!r)return console.error("Your data configuration is not accurate"),"No graph configuration is provided";const n=fwe(r,e,Object.keys(t[0]));if(n.isValid){const a=Vc[Vc.findIndex(o=>o.chartID===e)].configuration;return t.map(o=>{const l={};return r.filter(s=>s.columnId).forEach(s=>{a[a.findIndex(f=>f.id===s.chartConfigId)].multiple?(l[a[a.findIndex(f=>f.id===s.chartConfigId)].id]=[],s.columnId.forEach(f=>{l[a[a.findIndex(c=>c.id===s.chartConfigId)].id].push(Fe(o[f])?null:o[f])})):l[a[a.findIndex(f=>f.id===s.chartConfigId)].id]=Fe(o[s.columnId])?null:o[s.columnId],l[`${s.chartConfigId}Columns`]=s.columnId}),l.data=o,l})}return console.error(n.err),n.err}function xw(t,e,r){return t.length===0?[]:typeof t[0][e]!="object"?Bt(t,o=>o[e]).map(o=>{const l={};l[e]=o[e];const s=t.filter(f=>f[e]===o[e]);return l.count=s.length,l.rollUpData=s,r==null||r.forEach(f=>{l[f.column]=f.aggregationMethod==="average"?parseFloat((fr(s.map(c=>c[f.column]))/s.length).toFixed(2)):f.aggregationMethod==="max"?Vr(s,c=>c[f.column])[f.column]:f.aggregationMethod==="min"?Br(s,c=>c[f.column])[f.column]:fr(s.map(c=>c[f.column]))}),l}):Bt(f1(t.map(i=>i[e])),i=>i).map(i=>{const o={};o[e]=i;const l=t.filter(s=>s[e].indexOf(i)!==-1);return o.rollUpData=l,o.count=l.length,r==null||r.forEach(s=>{o[s.column]=s.aggregationMethod==="average"?parseFloat((fr(l.map(f=>f[s.column]))/l.length).toFixed(2)):s.aggregationMethod==="max"?Vr(l,f=>f[s.column])[s.column]:s.aggregationMethod==="min"?Br(l,f=>f[s.column])[s.column]:fr(l.map(f=>f[s.column]))}),o})}function Mq(t,e){return e.findIndex(r=>r.chartConfigId===t)===-1?!1:typeof e[e.findIndex(r=>r.chartConfigId===t)].columnId!="string"}const dwe=t=>{if(t.findIndex(r=>r.chartConfigId==="yMin")!==-1&&t.findIndex(r=>r.chartConfigId==="yMax")!==-1)return t;const e=[...t];return t.findIndex(r=>r.chartConfigId==="yMin")===-1&&e.push({chartConfigId:"yMin",columnId:`${t[t.findIndex(r=>r.chartConfigId==="y")].columnId}Min`}),t.findIndex(r=>r.chartConfigId==="yMax")===-1&&e.push({chartConfigId:"yMax",columnId:`${t[t.findIndex(r=>r.chartConfigId==="y")].columnId}Max`}),e},Bm=(t,e)=>{const r=(e==null?void 0:e.map(n=>{var o,l;const a=t==null?void 0:t.findIndex(s=>s.chartConfigId===n.chartConfigId);if(a===-1)return{};const i=(l=(o=t[a])==null?void 0:o.allowedColumnIds)==null?void 0:l.findIndex(s=>s.value===n.columnId);return i===-1?{}:t[a].allowedColumnIds[i].graphSettings||{}}))||[];return Object.assign({},...r)};function Uf(t){var G,ae,U,H,R,ee,J;const{graphSettings:e,dataSettings:r,filters:n,graphType:a,dataTransform:i,graphDataConfiguration:o,dataFilters:l,debugMode:s,dataSelectionOptions:f,advancedDataSelectionOptions:c,readableHeader:h,noOfFiltersPerRow:d=4,updateFilters:m,uiMode:g="normal",theme:y="light",highlightDataPointSettings:b}=t,[S,w]=I.useState(void 0),[C,k]=I.useState(void 0),[_,D]=I.useState(o),[T,A]=I.useState({}),[M,E]=I.useState(void 0),[N,Y]=I.useState([]),ne=I.useRef(null),[K,B]=I.useState([]),j=I.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]),$=I.useCallback(async()=>{if(a!=="geoHubMap"&&a!=="geoHubCompareMap"&&a!=="geoHubMapWithLayerSelection"&&r)try{const re=await(r.dataURL?typeof r.dataURL=="string"?r.fileType==="json"?ka(r.dataURL,r.columnsToArray,r.dataTransformation,s):r.fileType==="api"?m4(r.dataURL,r.apiHeaders,r.columnsToArray,r.dataTransformation,s):p4(r.dataURL,r.dataTransformation,r.columnsToArray,s,r.delimiter,!0):y7(r.dataURL,r.idColumnTitle):n2(r.data,r.columnsToArray));k(re);const te=(n||[]).map(F=>({filter:F.column,label:F.label||`Filter by ${F.column}`,singleSelect:F.singleSelect,clearable:F.clearable,defaultValue:J3(F.defaultValue),value:J3(F.defaultValue),availableValues:J0(re,F.column).filter(q=>{var X;return!((X=F.excludeValues)!=null&&X.includes(`${q}`))}).map(q=>({value:q,label:q})),allowSelectAll:F.allowSelectAll,width:F.width}));B(te)}catch(Z){console.error("Data fetching error:",Z)}},[r,a,n,s]);I.useEffect(()=>{$()},[$]);const V=I.useMemo(()=>!C||K.length===0?C:C.filter(re=>K.every(te=>te.value&&f1([te.value]).length>0?K3(f1([re[te.filter]]),f1([te.value]).map(F=>F.value)).length>0:!0)),[K,C]);I.useEffect(()=>{f&&A(Bm(f,o))},[f,o]),I.useEffect(()=>{a!=="geoHubMap"&&a!=="geoHubCompareMap"&&a!=="geoHubMapWithLayerSelection"&&C&&w(V)},[V,a,C]),I.useEffect(()=>{b!=null&&b.column&&V&&Y(J0(V,b.column).filter(Z=>{var re;return!((re=b==null?void 0:b.excludeValues)!=null&&re.includes(`${Z}`))}).map(Z=>({value:Z,label:Z})))},[V,b]),I.useEffect(()=>{D(o)},[o]);const z=I.useCallback((Z,re)=>{B(te=>te.map(F=>F.filter===Z?{...F,value:re}:F))},[]),W=I.useMemo(()=>{if(!S)return;const Z=a==="lineChartWithConfidenceInterval"&&_?dwe(_):_;return a!=="geoHubMap"&&a!=="geoHubCompareMap"&&a!=="geoHubMapWithLayerSelection"?Wf(i?xw(po(S,l||[]),i.keyColumn,i.aggregationColumnsSetting):po(S,l||[]),a,Z):void 0},[a,_,S,l,i]);return!r&&a!=="geoHubMap"&&a!=="geoHubCompareMap"&&a!=="geoHubMapWithLayerSelection"?v.jsx(or,{size:"xs",className:"text-center text-accent-dark-red dark:text-accent-red p-2",children:"Please make sure either `dataSettings` props are present as they are required for data."}):v.jsx("div",{className:`${y||(e==null?void 0:e.theme)||"light"} flex ${e!=null&&e.width?"w-fit grow-0":"w-full grow"}`,dir:(e==null?void 0:e.language)==="he"||(e==null?void 0:e.language)==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${e!=null&&e.backgroundColor?(e==null?void 0:e.backgroundColor)===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${(e==null?void 0:e.language)||"en"}`,(G=e==null?void 0:e.classNames)==null?void 0:G.graphContainer),style:{...((ae=e==null?void 0:e.styles)==null?void 0:ae.graphContainer)||{},...e!=null&&e.backgroundColor&&(e==null?void 0:e.backgroundColor)!==!0?{backgroundColor:e==null?void 0:e.backgroundColor}:{}},id:e==null?void 0:e.graphID,ref:ne,children:v.jsx("div",{style:{padding:e!=null&&e.backgroundColor?(e==null?void 0:e.padding)||"1rem":(e==null?void 0:e.padding)||0,flexGrow:1,display:"flex"},children:v.jsx("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:S||jo.filter(Z=>Z.geoHubMapPresentation).map(Z=>Z.graphID).indexOf(a)!==-1?v.jsxs(v.Fragment,{children:[e!=null&&e.graphTitle||e!=null&&e.graphDescription||e!=null&&e.graphDownload||e!=null&&e.dataDownload?v.jsx(Zt,{styles:{title:(U=e==null?void 0:e.styles)==null?void 0:U.title,description:(H=e==null?void 0:e.styles)==null?void 0:H.description},classNames:{title:(R=e==null?void 0:e.classNames)==null?void 0:R.title,description:(ee=e==null?void 0:e.classNames)==null?void 0:ee.description},graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,width:e==null?void 0:e.width,graphDownload:e!=null&&e.graphDownload?ne.current:void 0,dataDownload:e!=null&&e.dataDownload&&S&&S.length>0?S:null}):null,K.length!==0||(f||[]).length!==0||(c||[]).length!==0||b?v.jsxs("div",{style:{display:"flex",gap:"1rem",flexWrap:"wrap",alignItems:"flex-start",width:"100%"},children:[c==null?void 0:c.map((Z,re)=>{var te,F;return v.jsxs("div",{style:{width:Z.width||`calc(${100/d}% - ${(d-1)/d}rem)`,flexGrow:1,flexShrink:Z.ui!=="radio"?0:1,minWidth:"240px"},children:[v.jsx(oo,{className:"mb-2",children:Z.label||"Graph by"}),Z.ui!=="radio"?v.jsx(s1,{options:Z.options.map(q=>({...q,value:q.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:Z.defaultValue?{...Z.defaultValue,value:(te=Z.defaultValue)==null?void 0:te.label}:{...Z.options[0],value:Z.options[0].label},onChange:q=>{A((q==null?void 0:q.graphSettings)||{}),D(q==null?void 0:q.dataConfiguration)}}):v.jsx(gs,{defaultValue:((F=Z.defaultValue)==null?void 0:F.label)||Z.options[0].label,variant:g,onValueChange:q=>{const X=Z.options[Z.options.findIndex(ie=>ie.label===q)];A(X.graphSettings||{}),D(X.dataConfiguration)},children:Z.options.map((q,X)=>v.jsx(ys,{label:q.label,value:q.label},X))})]},re)}),f==null?void 0:f.map((Z,re)=>v.jsxs("div",{style:{width:Z.width||`calc(${100/d}% - ${(d-1)/d}rem)`,flexGrow:1,flexShrink:Z.ui!=="radio"?0:1,minWidth:"240px"},children:[v.jsx(oo,{className:"mb-2",children:Z.label||`Visualize ${Z.chartConfigId} by`}),Mq(Z.chartConfigId,_||[])?Z.ui!=="radio"?v.jsx(s1,{options:Z.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:o?o[o.findIndex(te=>te.chartConfigId===Z.chartConfigId)].columnId.map(te=>Z.allowedColumnIds[Z.allowedColumnIds.findIndex(F=>F.value===te)]):void 0,filterOption:Z1(j),onChange:te=>{const F={columnId:(te||[]).map(X=>X.value),chartConfigId:Z.chartConfigId},q=_==null?void 0:_.map(X=>X.chartConfigId===F.chartConfigId?F:X);D(q)}}):v.jsx(Sv,{variant:g,defaultValue:o?o[o.findIndex(te=>te.chartConfigId===Z.chartConfigId)].columnId.map(te=>Z.allowedColumnIds[Z.allowedColumnIds.findIndex(F=>F.value===te)]).map(te=>te.value):[],onValueChange:te=>{const F={columnId:te||[],chartConfigId:Z.chartConfigId},q=_==null?void 0:_.map(X=>X.chartConfigId===F.chartConfigId?F:X);D(q)},children:Z.allowedColumnIds.map((te,F)=>v.jsx(Cv,{label:te.label,value:te.label},F))}):Z.ui!=="radio"?v.jsx(s1,{options:Z.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:o?Z.allowedColumnIds[Z.allowedColumnIds.findIndex(te=>te.value===o[o.findIndex(F=>F.chartConfigId===Z.chartConfigId)].columnId)]:void 0,onChange:te=>{const F={columnId:te==null?void 0:te.value,chartConfigId:Z.chartConfigId},q=_==null?void 0:_.map(X=>X.chartConfigId===F.chartConfigId?F:X);A(Bm(f,q)),D(q)}}):v.jsx(gs,{variant:g,defaultValue:o?Z.allowedColumnIds[Z.allowedColumnIds.findIndex(te=>te.value===o[o.findIndex(F=>F.chartConfigId===Z.chartConfigId)].columnId)].label:"",onValueChange:te=>{const q={columnId:Z.allowedColumnIds[Z.allowedColumnIds.findIndex(ie=>ie.label===te)].value,chartConfigId:Z.chartConfigId},X=_==null?void 0:_.map(ie=>ie.chartConfigId===q.chartConfigId?q:ie);A(Bm(f,X)),D(X)},children:Z.allowedColumnIds.map((te,F)=>v.jsx(ys,{label:te.label,value:te.label},F))})]},re)),K==null?void 0:K.map((Z,re)=>v.jsxs("div",{style:{width:Z.width||`calc(${100/d}% - ${(d-1)/d}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},children:[v.jsx(oo,{className:"mb-2",children:Z.label}),Z.singleSelect?v.jsx(s1,{options:Z.availableValues,variant:g,isClearable:Z.clearable===void 0?!0:Z.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:Z1(j),onChange:te=>{z(Z.filter,te)},value:Z.value,defaultValue:Z.defaultValue}):v.jsxs(v.Fragment,{children:[v.jsx(s1,{options:Z.availableValues,variant:g,size:"sm",isMulti:!0,isClearable:Z.clearable===void 0?!0:Z.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:Z1(j),onChange:te=>{z(Z.filter,te)},value:Z.value,defaultValue:Z.defaultValue}),Z.allowSelectAll?v.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{z(Z.filter,Z.availableValues)},children:"Select all options"}):null]})]},re)),b?v.jsxs("div",{style:{width:b.width||`calc(${100/d}% - ${(d-1)/d}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},children:[v.jsx(oo,{className:"mb-2",children:b.label||"Highlight data"}),v.jsx(s1,{options:N,variant:g,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:Z1(j),onChange:Z=>{E(Z==null?void 0:Z.map(re=>re.value))},value:M==null?void 0:M.map(Z=>({label:Z,value:Z})),defaultValue:(J=b.defaultValues)==null?void 0:J.map(Z=>({label:Z,value:Z}))})]}):null]}):null,v.jsx(Tq,{graph:a,graphData:W,graphDataConfiguration:_,debugMode:s,readableHeader:h||[],updateFilters:m,settings:{...e||{},...T,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,padding:"0",theme:(e==null?void 0:e.theme)||y,...M?{highlightedDataPoints:M,highlightedIds:M==null?void 0:M.map(Z=>`${Z}`),highlightedLines:M==null?void 0:M.map(Z=>Z)}:{}}})]}):v.jsx("div",{className:"w-full flex justify-center p-4",children:v.jsx(Fo,{})})})})})})}const Vm=t=>t.map(n=>n.columnWidth||1).reduce((n,a)=>n+a,0),hwe=["barChart","choroplethMap","biVariateChoroplethMap","circlePacking","treeMap"];function Eq(t){const{dashboardID:e,dashboardLayout:r,dataSettings:n,filters:a,debugMode:i,theme:o="light",readableHeader:l,dataFilters:s,noOfFiltersPerRow:f=4,filterPosition:c,uiMode:h="normal",graphStyles:d,graphClassNames:m}=t,[g,y]=I.useState(void 0),[b,S]=I.useState(void 0),[w,C]=I.useState([]),k=I.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]),_=I.useMemo(()=>!b||w.length===0?b:b.filter(M=>w.every(E=>E.value&&f1([E.value]).length>0?K3(f1([M[E.filter]]),f1([E.value]).map(N=>N.value)).length>0:!0)),[w,b]);I.useEffect(()=>{y(_)},[_]);const D=I.useCallback(async()=>{if(n)try{const M=await(n.dataURL?typeof n.dataURL=="string"?n.fileType==="json"?ka(n.dataURL,n.columnsToArray,n.dataTransformation,i):n.fileType==="api"?m4(n.dataURL,n.apiHeaders,n.columnsToArray,n.dataTransformation,i):p4(n.dataURL,n.dataTransformation,n.columnsToArray,i,n.delimiter,!0):y7(n.dataURL,n.idColumnTitle):n2(n.data,n.columnsToArray));S(M);const E=(a||[]).map(N=>({filter:N.column,label:N.label||`Filter by ${N.column}`,singleSelect:N.singleSelect,clearable:N.clearable,defaultValue:J3(N.defaultValue),value:J3(N.defaultValue),availableValues:J0(M,N.column).filter(Y=>{var ne;return!((ne=N.excludeValues)!=null&&ne.includes(`${Y}`))}).map(Y=>({value:Y,label:Y})),allowSelectAll:N.allowSelectAll,width:N.width}));C(E)}catch(A){console.error("Data fetching error:",A)}},[n,a,i]);I.useEffect(()=>{D()},[D]);const T=I.useCallback((A,M)=>{C(E=>E.map(N=>N.filter===A?{...N,value:M}:N))},[]);return v.jsx("div",{className:`${o||"light"} flex grow`,dir:r.language==="he"||r.language==="ar"?"rtl":void 0,children:v.jsx("div",{className:`${r.backgroundColor?r.backgroundColor===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto gap-4 flex flex-col w-full grow h-inherit ${r.language||"en"}`,style:{...r.backgroundColor&&r.backgroundColor!==!0?{backgroundColor:r.backgroundColor}:{}},id:e,children:v.jsx("div",{style:{padding:r.backgroundColor?r.padding||"1rem":r.padding||0,flexGrow:1,display:"flex"},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r.title||r.description?v.jsx(Zt,{graphTitle:r.title,graphDescription:r.description,isDashboard:!0}):null,v.jsxs("div",{style:{display:"flex",gap:"1rem",flexWrap:"wrap"},children:[w.length!==0?v.jsx("div",{style:{width:c==="side"?"280px":"100%",flexGrow:1,flexShrink:0},children:v.jsx("div",{style:{display:"flex",gap:"1rem",flexWrap:"wrap",alignItems:"flex-start",width:"100%",position:"sticky",top:"1rem"},children:w==null?void 0:w.map((A,M)=>v.jsxs("div",{style:{width:A.width||`calc(${100/f}% - ${(f-1)/f}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},children:[v.jsx(oo,{className:"mb-2",children:A.label}),A.singleSelect?v.jsx(s1,{options:A.availableValues,isClearable:A.clearable===void 0?!0:A.clearable,size:"sm",variant:h,isMulti:!1,isSearchable:!0,filterOption:Z1(k),onChange:E=>{T(A.filter,E)},defaultValue:A.defaultValue,value:A.value}):v.jsxs(v.Fragment,{children:[v.jsx(s1,{options:A.availableValues,isMulti:!0,size:"sm",isClearable:A.clearable===void 0?!0:A.clearable,variant:h,isSearchable:!0,controlShouldRenderValue:!0,closeMenuOnSelect:!1,hideSelectedOptions:!1,filterOption:Z1(k),onChange:E=>{T(A.filter,E)},value:A.value,defaultValue:A.defaultValue}),A.allowSelectAll?v.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{T(A.filter,A.availableValues)},children:"Select all options"}):null]})]},M))})}):null,v.jsx("div",{style:{width:c==="side"?"calc(100% - 280px - 1rem)":"100%",minWidth:"280px",flexGrow:1,display:"flex",gap:"1rem",flexWrap:"wrap",flexShrink:"0"},children:r.rows.map((A,M)=>v.jsx("div",{style:{display:"flex",gap:"1rem",alignItems:"stretch",minHeight:`${A.height||0}px`,height:"auto",width:"100%",flexWrap:"wrap"},children:A.columns.map((E,N)=>{var Y,ne,K,B,j,$,V;return v.jsx("div",{className:"flex bg-transparent h-inherit grow min-w-60",style:{width:`calc(${100*(E.columnWidth||1)/Vm(A.columns)}% - ${(Vm(A.columns)-(E.columnWidth||1))/Vm(A.columns)}rem)`,minHeight:"inherit"},children:v.jsx(Uf,{graphType:E.graphType,dataFilters:E.dataFilters,uiMode:h,graphSettings:{...E.settings||{},width:void 0,height:void 0,resetSelectionOnDoubleClick:E.attachedFilter?!1:(Y=E.settings)==null?void 0:Y.resetSelectionOnDoubleClick,styles:((ne=E.settings)==null?void 0:ne.styles)||d,classNames:((K=E.settings)==null?void 0:K.classNames)||m,radius:E.graphType==="donutChart"||(B=E.settings)==null?void 0:B.radius,size:E.graphType==="unitChart"?(j=E.settings)==null?void 0:j.size:void 0,language:(($=E.settings)==null?void 0:$.language)||r.language,theme:((V=E.settings)==null?void 0:V.theme)||o},dataSettings:{data:g?po(g,s||[]):void 0},updateFilters:E.attachedFilter&&hwe.indexOf(E.graphType)!==-1&&w.findIndex(z=>z.filter===E.attachedFilter)!==-1?z=>{const W=w.findIndex(ae=>ae.filter===E.attachedFilter),G=z?w[W].singleSelect?{value:z,label:z}:[{value:z,label:z}]:void 0;T(E.attachedFilter,G)}:void 0,dataTransform:E.dataTransform,dataSelectionOptions:E.dataSelectionOptions,advancedDataSelectionOptions:E.advancedDataSelectionOptions,graphDataConfiguration:E.graphDataConfiguration,debugMode:i,readableHeader:l||[]})},N)})},M))})]})]})})})})}function pwe(t,e,r,n){const a=[];return t.forEach(i=>{Object.entries(i).forEach(([o,l])=>{if(o!==e){const s={indicator:r.findIndex(f=>f.value===o)!==-1?r[r.findIndex(f=>f.value===o)].label:o,value:l};s[e]=i[e],a.push(s)}})}),n&&console.log(a),a}const Fm=t=>t.map(n=>n.columnWidth||1).reduce((n,a)=>n+a,0);function jq(t){const{dashboardID:e,dashboardLayout:r,dataSettings:n,debugMode:a,theme:i="light",readableHeader:o,dataFilters:l,uiMode:s="normal",graphStyles:f,graphClassNames:c}=t,h=I.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]),[d,m]=I.useState(void 0),[g,y]=I.useState([]),[b,S]=I.useState(void 0),[w,C]=I.useState(void 0);I.useEffect(()=>{if(w){const _=w.filter(D=>D[n.keyColumn]===b);m(_)}},[w,b,n.keyColumn]);const k=I.useCallback(async()=>{if(n)try{const D=await(n.dataURL?typeof n.dataURL=="string"?n.fileType==="json"?ka(n.dataURL,void 0,n.dataTransformation,a):n.fileType==="api"?m4(n.dataURL,n.apiHeaders,void 0,n.dataTransformation,a):p4(n.dataURL,n.dataTransformation,void 0,a,n.delimiter,!0):y7(n.dataURL,n.idColumnTitle):n2(n.data,void 0)),T=po(D,l||[]);y(T.map(M=>M[n.keyColumn])),S(T[0][n.keyColumn]);const A=pwe(T,n.keyColumn,o||[],a);C(A)}catch(_){console.error("Data fetching error:",_)}},[n,a,l,o]);return I.useEffect(()=>{k()},[k]),v.jsx("div",{className:`${i||"light"} flex grow`,dir:r.language==="he"||r.language==="ar"?"rtl":void 0,children:v.jsx("div",{className:`${r!=null&&r.backgroundColor?(r==null?void 0:r.backgroundColor)===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}flex flex-col h-inherit w-full ml-auto mr-auto grow gap-4 ${(r==null?void 0:r.language)||"en"}`,style:{...r!=null&&r.backgroundColor&&(r==null?void 0:r.backgroundColor)!==!0?{backgroundColor:r==null?void 0:r.backgroundColor}:{}},id:e,children:v.jsx("div",{className:"flex grow",style:{padding:r.backgroundColor?r.padding||"1rem":r.padding||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r.title||r.description?v.jsx(Zt,{graphTitle:r.title,graphDescription:r.description,isDashboard:!0}):null,d?v.jsxs(v.Fragment,{children:[v.jsx("div",{style:{display:"flex",gap:"1rem",flexWrap:"wrap",alignItems:"flex-start",width:"100%"},children:v.jsxs("div",{style:{width:"100%",flexGrow:1,flexShrink:0,minWidth:"240px"},children:[r.dropdownLabel?v.jsx(oo,{className:"mb-2",children:r.dropdownLabel}):null,v.jsx(s1,{options:g.map(_=>({value:_,label:_})),size:"sm",variant:s,isClearable:!1,isSearchable:!0,controlShouldRenderValue:!0,filterOption:Z1(h),onChange:_=>{S(_==null?void 0:_.value)},defaultValue:{value:b,label:b}})]})}),r.rows.map((_,D)=>v.jsx("div",{style:{display:"flex",gap:"1rem",alignItems:"stretch",minHeight:`${_.height||0}px`,height:"auto",width:"100%",flexWrap:"wrap"},children:_.columns.map((T,A)=>{var M,E,N,Y,ne;return v.jsx("div",{className:"flex bg-transparent h-inherit grow min-w-60",style:{width:`calc(${100*(T.columnWidth||1)/Fm(_.columns)}% - ${(Fm(_.columns)-(T.columnWidth||1))/Fm(_.columns)}rem)`,minHeight:"inherit"},children:v.jsx(Uf,{graphType:T.graphType,dataFilters:T.dataFilters,uiMode:s,graphSettings:{...T.settings||{},width:void 0,height:void 0,radius:T.graphType==="donutChart"||(M=T.settings)==null?void 0:M.radius,size:T.graphType==="unitChart"?T.settings.size:void 0,language:((E=T.settings)==null?void 0:E.language)||r.language,theme:((N=T.settings)==null?void 0:N.theme)||i,styles:((Y=T.settings)==null?void 0:Y.styles)||f,classNames:((ne=T.settings)==null?void 0:ne.classNames)||c},dataSettings:{data:d},graphDataConfiguration:T.graphDataConfiguration?T.graphDataConfiguration:T.graphType==="unitChart"?[{columnId:"indicator",chartConfigId:"label"},{columnId:"value",chartConfigId:"value"}]:[{columnId:"indicator",chartConfigId:"label"},{columnId:"value",chartConfigId:"size"}],debugMode:a,readableHeader:o||[]})},A)})},D))]}):v.jsx("div",{className:"w-full flex justify-center p-4",children:v.jsx(Fo,{})})]})})})})}function Lq(t){var G,ae,U,H,R,ee,J,Z;const{graphSettings:e,dataSettings:r,filters:n,graphType:a,dataTransform:i,graphDataConfiguration:o,noOfColumns:l,columnGridBy:s,dataFilters:f,showCommonColorScale:c,minGraphHeight:h,minGraphWidth:d,debugMode:m,dataSelectionOptions:g,advancedDataSelectionOptions:y,readableHeader:b,noOfFiltersPerRow:S=4,uiMode:w="normal",theme:C="light"}=t,[k,_]=I.useState(void 0),[D,T]=I.useState(void 0),[A,M]=I.useState([]),E=I.useRef(null),[N,Y]=I.useState(o),[ne,K]=I.useState([]),[B,j]=I.useState({}),$=I.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]),V=I.useMemo(()=>!D||ne.length===0?D:D.filter(te=>ne.every(F=>F.value&&f1([F.value]).length>0?K3(f1([te[F.filter]]),f1([F.value]).map(q=>q.value)).length>0:!0)),[ne,D]);I.useEffect(()=>{_(V)},[V]);const z=I.useCallback(async()=>{if(r)try{const te=await(r.dataURL?typeof r.dataURL=="string"?r.fileType==="json"?ka(r.dataURL,r.columnsToArray,r.dataTransformation,m):r.fileType==="api"?m4(r.dataURL,r.apiHeaders,r.columnsToArray,r.dataTransformation,m):p4(r.dataURL,r.dataTransformation,r.columnsToArray,m,r.delimiter,!0):y7(r.dataURL,r.idColumnTitle):n2(r.data,r.columnsToArray));T(te);const F=J0(te,s);M(F);const q=(n||[]).map(X=>({filter:X.column,label:X.label||`Filter by ${X.column}`,singleSelect:X.singleSelect,clearable:X.clearable,defaultValue:J3(X.defaultValue),value:J3(X.defaultValue),availableValues:J0(te,X.column).filter(ie=>{var ce;return!((ce=X.excludeValues)!=null&&ce.includes(`${ie}`))}).map(ie=>({value:ie,label:ie})),allowSelectAll:X.allowSelectAll,width:X.width}));K(q)}catch(re){console.error("Data fetching error:",re)}},[r,m,s,n]);I.useEffect(()=>{z()},[z]),I.useEffect(()=>{Y(o)},[o]);const W=I.useCallback((re,te)=>{K(F=>F.map(q=>q.filter===re?{...q,value:te}:q))},[]);return v.jsx("div",{className:`${C||(e==null?void 0:e.theme)||"light"} flex ${e!=null&&e.width?"w-fit grow-0":"w-full grow"}`,dir:(e==null?void 0:e.language)==="he"||(e==null?void 0:e.language)==="ar"?"rtl":void 0,children:v.jsx("div",{className:`${e!=null&&e.backgroundColor?(e==null?void 0:e.backgroundColor)===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${(e==null?void 0:e.language)||"en"}`,style:{...e!=null&&e.backgroundColor&&(e==null?void 0:e.backgroundColor)!==!0?{backgroundColor:e==null?void 0:e.backgroundColor}:{}},id:e==null?void 0:e.graphID,ref:E,"aria-label":(e==null?void 0:e.ariaLabel)||`${e!=null&&e.graphTitle?`The graph shows ${e==null?void 0:e.graphTitle}. `:""}This is a gridded chart.${e!=null&&e.graphDescription?` ${e==null?void 0:e.graphDescription}`:""}`,children:v.jsx("div",{style:{padding:e!=null&&e.backgroundColor?(e==null?void 0:e.padding)||"1rem":(e==null?void 0:e.padding)||0,flexGrow:1,display:"flex"},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[e!=null&&e.graphTitle||e!=null&&e.graphDescription||e!=null&&e.graphDownload||e!=null&&e.dataDownload?v.jsx(Zt,{styles:{title:(G=e==null?void 0:e.styles)==null?void 0:G.title,description:(ae=e==null?void 0:e.styles)==null?void 0:ae.description},classNames:{title:(U=e==null?void 0:e.classNames)==null?void 0:U.title,description:(H=e==null?void 0:e.classNames)==null?void 0:H.description},graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,width:e==null?void 0:e.width,graphDownload:e!=null&&e.graphDownload?E.current:void 0,dataDownload:e!=null&&e.dataDownload&&k&&k.length>0?k:null}):null,k&&A.length>0?v.jsxs(v.Fragment,{children:[ne.length!==0||(g||[]).length!==0||(y||[]).length!==0?v.jsxs("div",{style:{display:"flex",gap:"1rem",flexWrap:"wrap",alignItems:"flex-start",width:"100%"},children:[y==null?void 0:y.map((re,te)=>{var F,q;return v.jsxs("div",{style:{width:re.width||`calc(${100/S}% - ${(S-1)/S}rem)`,flexGrow:1,flexShrink:re.ui!=="radio"?0:1,minWidth:"240px"},children:[v.jsx(oo,{className:"mb-2",children:re.label||"Graph by"}),re.ui!=="radio"?v.jsx(s1,{options:re.options.map(X=>({...X,value:X.label})),isClearable:!1,isSearchable:!0,variant:w,controlShouldRenderValue:!0,defaultValue:re.defaultValue?{...re.defaultValue,value:(F=re.defaultValue)==null?void 0:F.label}:{...re.options[0],value:re.options[0].label},onChange:X=>{j((X==null?void 0:X.graphSettings)||{}),Y(X==null?void 0:X.dataConfiguration)}}):v.jsx(gs,{defaultValue:((q=re.defaultValue)==null?void 0:q.label)||re.options[0].label,variant:w,onValueChange:X=>{const ie=re.options[re.options.findIndex(ce=>ce.label===X)];j(ie.graphSettings||{}),Y(ie.dataConfiguration)},children:re.options.map((X,ie)=>v.jsx(ys,{label:X.label,value:X.label},ie))})]},te)}),g==null?void 0:g.map((re,te)=>v.jsxs("div",{style:{width:re.width||`calc(${100/S}% - ${(S-1)/S}rem)`,flexGrow:1,flexShrink:re.ui!=="radio"?0:1,minWidth:"240px"},children:[v.jsx(oo,{className:"mb-2",children:re.label||`Visualize ${re.chartConfigId} by`}),Mq(re.chartConfigId,N||[])?re.ui!=="radio"?v.jsx(s1,{options:re.allowedColumnIds,isMulti:!0,variant:w,isSearchable:!0,controlShouldRenderValue:!0,defaultValue:o?o[o.findIndex(F=>F.chartConfigId===re.chartConfigId)].columnId.map(F=>re.allowedColumnIds[re.allowedColumnIds.findIndex(q=>q.value===F)]):void 0,filterOption:Z1($),onChange:F=>{const q={columnId:F.map(ie=>ie.value),chartConfigId:re.chartConfigId},X=N==null?void 0:N.map(ie=>ie.chartConfigId===q.chartConfigId?q:ie);Y(X)},isRtl:(e==null?void 0:e.language)==="ar"||(e==null?void 0:e.language)==="he"}):v.jsx(Sv,{variant:w,defaultValue:o?o[o.findIndex(F=>F.chartConfigId===re.chartConfigId)].columnId.map(F=>re.allowedColumnIds[re.allowedColumnIds.findIndex(q=>q.value===F)]).map(F=>F.value):[],onValueChange:F=>{const q={columnId:F||[],chartConfigId:re.chartConfigId},X=N==null?void 0:N.map(ie=>ie.chartConfigId===q.chartConfigId?q:ie);Y(X)},children:re.allowedColumnIds.map((F,q)=>v.jsx(Cv,{label:F.label,value:F.label},q))}):re.ui!=="radio"?v.jsx(s1,{options:re.allowedColumnIds,isClearable:!1,isSearchable:!0,variant:w,defaultValue:o?re.allowedColumnIds[re.allowedColumnIds.findIndex(F=>F.value===o[o.findIndex(q=>q.chartConfigId===re.chartConfigId)].columnId)]:void 0,controlShouldRenderValue:!0,onChange:F=>{const q={columnId:F==null?void 0:F.value,chartConfigId:re.chartConfigId},X=N==null?void 0:N.map(ie=>ie.chartConfigId===q.chartConfigId?q:ie);j((F==null?void 0:F.graphSettings)||{}),Y(X)}}):v.jsx(gs,{variant:w,defaultValue:o?re.allowedColumnIds[re.allowedColumnIds.findIndex(F=>F.value===o[o.findIndex(q=>q.chartConfigId===re.chartConfigId)].columnId)].label:"",onValueChange:F=>{const q=re.allowedColumnIds[re.allowedColumnIds.findIndex(ce=>ce.label===F)],X={columnId:q.value,chartConfigId:re.chartConfigId},ie=N==null?void 0:N.map(ce=>ce.chartConfigId===X.chartConfigId?X:ce);j(q.graphSettings||{}),Y(ie)},children:re.allowedColumnIds.map((F,q)=>v.jsx(ys,{label:F.label,value:F.label},q))})]},te)),ne==null?void 0:ne.map((re,te)=>v.jsxs("div",{style:{width:re.width||`calc(${100/S}% - ${(S-1)/S}rem)`,flexGrow:1,flexShrink:0,flexWrap:"wrap"},children:[v.jsx(oo,{className:"mb-2",children:re.label}),re.singleSelect?v.jsx(s1,{variant:w,options:re.availableValues,isClearable:re.clearable===void 0?!0:re.clearable,isRtl:(e==null?void 0:e.language)==="ar"||(e==null?void 0:e.language)==="he",isSearchable:!0,controlShouldRenderValue:!0,filterOption:Z1($),onChange:F=>{W(re.filter,F)},defaultValue:re.defaultValue}):v.jsxs(v.Fragment,{children:[v.jsx(s1,{variant:w,options:re.availableValues,isMulti:!0,isClearable:re.clearable===void 0?!0:re.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:Z1($),onChange:F=>{W(re.filter,F)},defaultValue:re.defaultValue,isRtl:(e==null?void 0:e.language)==="ar"||(e==null?void 0:e.language)==="he"}),re.allowSelectAll?v.jsx("button",{className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",type:"button",onClick:()=>{W(re.filter,re.availableValues)},children:"Select all options"}):null]})]},te))]}):null,c!==!1&&(e!=null&&e.colorDomain)&&(e==null?void 0:e.showColorScale)!==!1?v.jsx(g0,{width:e==null?void 0:e.width,colorLegendTitle:e==null?void 0:e.colorLegendTitle,colors:(e==null?void 0:e.colors)||Qe[(e==null?void 0:e.theme)||"light"].categoricalColors.colors,colorDomain:e==null?void 0:e.colorDomain,showNAColor:(e==null?void 0:e.showNAColor)===void 0||(e==null?void 0:e.showNAColor)===null?!0:e==null?void 0:e.showNAColor}):null,v.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"1rem",flexDirection:(e==null?void 0:e.language)==="ar"||(e==null?void 0:e.language)==="he"?"row-reverse":"row",justifyContent:"center"},children:A.map((re,te)=>v.jsx("div",{style:{width:`calc(${100/(l||gr([4,A.length||0]))}% - ${((l||gr([4,A.length||0]))-1)/(l||gr([4,A.length||0]))}rem)`,minWidth:Fe(d)?"280px":`${d}px`},children:v.jsx(Tq,{graph:a,graphDataConfiguration:N,graphData:Wf(i?xw(po(k,f||[]).filter(F=>F[s]===re),i.keyColumn,i.aggregationColumnsSetting):po(k,f||[]).filter(F=>F[s]===re),a,N)||[],debugMode:m,settings:{...e||{},...B,theme:(e==null?void 0:e.theme)||C,width:void 0,height:void 0,relativeHeight:(e==null?void 0:e.relativeHeight)||.67,minHeight:h,graphTitle:`${re}`,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,padding:"0",footNote:void 0,sources:void 0,showColorScale:(e==null?void 0:e.showColorScale)===!1?!1:c===!1},readableHeader:b||[]})},te))})]}):v.jsx("div",{className:"w-full flex justify-center p-4",children:v.jsx(Fo,{})}),e!=null&&e.sources||e!=null&&e.footNote?v.jsx(tr,{styles:{footnote:(R=e==null?void 0:e.styles)==null?void 0:R.footnote,source:(ee=e==null?void 0:e.styles)==null?void 0:ee.source},classNames:{footnote:(J=e==null?void 0:e.classNames)==null?void 0:J.footnote,source:(Z=e==null?void 0:e.classNames)==null?void 0:Z.source},sources:e==null?void 0:e.sources,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width}):null]})})})})}function Nq(t){const{config:e}=t,[r,n]=I.useState(void 0);if(I.useEffect(()=>{(async()=>{if(typeof e=="string"){const o=await ka(e);n(o)}else n(e)})()},[e]),!r)return v.jsx("div",{className:"w-full flex justify-center p-4",children:v.jsx(Fo,{})});const a=G6(r,"multiGraphDashboard");return a.isValid?v.jsx(Eq,{dashboardID:r.dashboardID,dashboardLayout:r.dashboardLayout,dataSettings:r.dataSettings,filters:r.filters,debugMode:r.debugMode,theme:r.theme,readableHeader:r.readableHeader,dataFilters:r.dataFilters,noOfFiltersPerRow:r.noOfFiltersPerRow,filterPosition:r.filterPosition,uiMode:r.uiMode,graphStyles:r.graphStyles,graphClassNames:r.graphClassNames}):v.jsx(or,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:a.err})}function Iq(t){const{config:e}=t,[r,n]=I.useState(void 0);return I.useEffect(()=>{typeof e=="string"?ka(e).then(o=>{n(o)}):n(e)},[e]),r?G6(r,"multiGraphDashboardWideToLongFormat").isValid?v.jsx(jq,{dashboardID:r.dashboardID,dashboardLayout:r.dashboardLayout,dataSettings:r.dataSettings,debugMode:r.debugMode,theme:r.theme,readableHeader:r.readableHeader,dataFilters:r.dataFilters,uiMode:r.uiMode,graphStyles:r.graphStyles,graphClassNames:r.graphClassNames}):v.jsx(or,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:G6(r,"multiGraphDashboardWideToLongFormat").err}):v.jsx("div",{className:"w-full flex justify-center p-4",children:v.jsx(Fo,{})})}function Pq(t){const{config:e}=t,[r,n]=I.useState(void 0);if(I.useEffect(()=>{typeof e=="string"?ka(e).then(o=>{n(o)}):n(e)},[e]),!r)return v.jsx("div",{className:"w-full flex justify-center p-4",children:v.jsx(Fo,{})});const a=G6(r,"singleGraphDashboard");return a.isValid?v.jsx(Uf,{graphSettings:r.graphSettings,dataSettings:r.dataSettings,filters:r.filters,graphType:r.graphType,dataTransform:r.dataTransform,graphDataConfiguration:r.graphDataConfiguration,dataFilters:r.dataFilters,debugMode:r.debugMode,dataSelectionOptions:r.dataSelectionOptions,advancedDataSelectionOptions:r.advancedDataSelectionOptions,readableHeader:r.readableHeader,noOfFiltersPerRow:r.noOfFiltersPerRow,uiMode:r.uiMode,highlightDataPointSettings:r.highlightDataPointSettings}):v.jsx(or,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:a.err})}function Rq(t){const{config:e}=t,[r,n]=I.useState(void 0);if(I.useEffect(()=>{(async()=>{if(typeof e=="string"){const o=await ka(e);n(o)}else n(e)})()},[e]),!r)return v.jsx("div",{className:"w-full flex justify-center p-4",children:v.jsx(Fo,{})});const a=G6(r,"griddedGraph");return a.isValid?v.jsx(Lq,{noOfColumns:r.noOfColumns,columnGridBy:r.columnGridBy,graphSettings:r.graphSettings,dataSettings:r.dataSettings,filters:r.filters,graphType:r.graphType,minGraphHeight:r.minGraphHeight,minGraphWidth:r.minGraphWidth,dataTransform:r.dataTransform,graphDataConfiguration:r.graphDataConfiguration,dataFilters:r.dataFilters,showCommonColorScale:r.showCommonColorScale,debugMode:r.debugMode,dataSelectionOptions:r.dataSelectionOptions,advancedDataSelectionOptions:r.advancedDataSelectionOptions,readableHeader:r.readableHeader,noOfFiltersPerRow:r.noOfFiltersPerRow,theme:r.theme}):v.jsx(or,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:a.err})}var Nu={exports:{}},mwe=Nu.exports,fj;function gwe(){return fj||(fj=1,function(t,e){(function(r,n){n()})(mwe,function(){function r(f,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(f.type)?new Blob(["\uFEFF",f],{type:f.type}):f}function n(f,c,h){var d=new XMLHttpRequest;d.open("GET",f),d.responseType="blob",d.onload=function(){s(d.response,c,h)},d.onerror=function(){console.error("could not download file")},d.send()}function a(f){var c=new XMLHttpRequest;c.open("HEAD",f,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function i(f){try{f.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),f.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof kr=="object"&&kr.global===kr?kr:void 0,l=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(f,c,h){var d=o.URL||o.webkitURL,m=document.createElement("a");c=c||f.name||"download",m.download=c,m.rel="noopener",typeof f=="string"?(m.href=f,m.origin===location.origin?i(m):a(m.href)?n(f,c,h):i(m,m.target="_blank")):(m.href=d.createObjectURL(f),setTimeout(function(){d.revokeObjectURL(m.href)},4e4),setTimeout(function(){i(m)},0))}:"msSaveOrOpenBlob"in navigator?function(f,c,h){if(c=c||f.name||"download",typeof f!="string")navigator.msSaveOrOpenBlob(r(f,h),c);else if(a(f))n(f,c,h);else{var d=document.createElement("a");d.href=f,d.target="_blank",setTimeout(function(){i(d)})}}:function(f,c,h,d){if(d=d||open("","_blank"),d&&(d.document.title=d.document.body.innerText="downloading..."),typeof f=="string")return n(f,c,h);var m=f.type==="application/octet-stream",g=/constructor/i.test(o.HTMLElement)||o.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||m&&g||l)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var C=b.result;C=y?C:C.replace(/^data:[^;]*;/,"data:attachment/file;"),d?d.location.href=C:location=C,d=null},b.readAsDataURL(f)}else{var S=o.URL||o.webkitURL,w=S.createObjectURL(f);d?d.location=w:location.href=w,d=null,setTimeout(function(){S.revokeObjectURL(w)},4e4)}});o.saveAs=s.saveAs=s,t.exports=s})}(Nu)),Nu.exports}var ywe=gwe();const vwe=_a(ywe),$q=(t,e,r,n,a)=>{const i="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8",o=Hh.utils.json_to_sheet([n],{header:r,skipHeader:!0});o["!cols"]=a,Hh.utils.sheet_add_json(o,t,{header:r,skipHeader:!0,origin:-1});const l={Sheets:{data:o},SheetNames:["data"]},s=Hh.write(l,{bookType:"xlsx",type:"array"}),f=new Blob([s],{type:i});vwe.saveAs(f,`${e}.xlsx`)};function bwe(t){const{buttonContent:e,buttonType:r="tertiary",csvData:n,fileName:a="data",headers:i,xlsxHeader:o,wscols:l,buttonSmall:s,className:f=""}=t;return v.jsx(r4,{variant:r,className:`${s?"p-2":"py-4 px-6"} ${f}`,onClick:()=>$q(n,a,i,o,l),"aria-label":"Click to download the data as xlsx",children:e||v.jsx(Bb,{})})}var iu={exports:{}},dj;function xwe(){if(dj)return iu.exports;dj=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return iu.exports=e(),iu.exports.createColors=e,iu.exports}const wwe={},Swe=Object.freeze(Object.defineProperty({__proto__:null,default:wwe},Symbol.toStringTag,{value:"Module"})),Mo=AU(Swe);var zm,hj;function ww(){if(hj)return zm;hj=1;let t=xwe(),e=Mo;class r extends Error{constructor(a,i,o,l,s,f){super(a),this.name="CssSyntaxError",this.reason=a,s&&(this.file=s),l&&(this.source=l),f&&(this.plugin=f),typeof i<"u"&&typeof o<"u"&&(typeof i=="number"?(this.line=i,this.column=o):(this.line=i.line,this.column=i.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(a){if(!this.source)return"";let i=this.source;a==null&&(a=t.isColorSupported);let o=m=>m,l=m=>m,s=m=>m;if(a){let{bold:m,gray:g,red:y}=t.createColors(!0);l=b=>m(y(b)),o=b=>g(b),e&&(s=b=>e(b))}let f=i.split(/\r?\n/),c=Math.max(this.line-3,0),h=Math.min(this.line+2,f.length),d=String(h).length;return f.slice(c,h).map((m,g)=>{let y=c+1+g,b=" "+(" "+y).slice(-d)+" | ";if(y===this.line){if(m.length>160){let w=20,C=Math.max(0,this.column-w),k=Math.max(this.column+w,this.endColumn+w),_=m.slice(C,k),D=o(b.replace(/\d/g," "))+m.slice(0,Math.min(this.column-1,w-1)).replace(/[^\t]/g," ");return l(">")+o(b)+s(_)+`
285
+ deps: ${c}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(s){const[f,c]=i(s);o(s,f),l(s,c)}};function i({schema:s}){const f={},c={};for(const h in s){if(h==="__proto__")continue;const d=Array.isArray(s[h])?f:c;d[h]=s[h]}return[f,c]}function o(s,f=s.schema){const{gen:c,data:h,it:d}=s;if(Object.keys(f).length===0)return;const m=c.let("missing");for(const g in f){const y=f[g];if(y.length===0)continue;const b=(0,n.propertyInData)(c,h,g,d.opts.ownProperties);s.setParams({property:g,depsCount:y.length,deps:y.join(", ")}),d.allErrors?c.if(b,()=>{for(const S of y)(0,n.checkReportMissingProp)(s,S)}):(c.if((0,e._)`${b} && (${(0,n.checkMissingProp)(s,y,m)})`),(0,n.reportMissingProp)(s,m),c.else())}}t.validatePropertyDeps=o;function l(s,f=s.schema){const{gen:c,data:h,keyword:d,it:m}=s,g=c.name("valid");for(const y in f)(0,r.alwaysValidSchema)(m,f[y])||(c.if((0,n.propertyInData)(c,h,y,m.opts.ownProperties),()=>{const b=s.subschema({keyword:d,schemaProp:y},g);s.mergeValidEvaluated(b,g)},()=>c.var(g,!0)),s.ok(g))}t.validateSchemaDeps=l,t.default=a}($m)),$m}var U5={},qE;function fbe(){if(qE)return U5;qE=1,Object.defineProperty(U5,"__esModule",{value:!0});const t=Fr(),e=an(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:a})=>(0,t._)`{propertyName: ${a.propertyName}}`},code(a){const{gen:i,schema:o,data:l,it:s}=a;if((0,e.alwaysValidSchema)(s,o))return;const f=i.name("valid");i.forIn("key",l,c=>{a.setParams({propertyName:c}),a.subschema({keyword:"propertyNames",data:c,dataTypes:["string"],propertyName:c,compositeRule:!0},f),i.if((0,t.not)(f),()=>{a.error(!0),s.allErrors||i.break()})}),a.ok(f)}};return U5.default=n,U5}var G5={},WE;function Cq(){if(WE)return G5;WE=1,Object.defineProperty(G5,"__esModule",{value:!0});const t=qo(),e=Fr(),r=Q2(),n=an(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:o})=>(0,e._)`{additionalProperty: ${o.additionalProperty}}`},code(o){const{gen:l,schema:s,parentSchema:f,data:c,errsCount:h,it:d}=o;if(!h)throw new Error("ajv implementation error");const{allErrors:m,opts:g}=d;if(d.props=!0,g.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(d,s))return;const y=(0,t.allSchemaProperties)(f.properties),b=(0,t.allSchemaProperties)(f.patternProperties);S(),o.ok((0,e._)`${h} === ${r.default.errors}`);function S(){l.forIn("key",c,D=>{!y.length&&!b.length?k(D):l.if(w(D),()=>k(D))})}function w(D){let T;if(y.length>8){const A=(0,n.schemaRefOrVal)(d,f.properties,"properties");T=(0,t.isOwnProperty)(l,A,D)}else y.length?T=(0,e.or)(...y.map(A=>(0,e._)`${D} === ${A}`)):T=e.nil;return b.length&&(T=(0,e.or)(T,...b.map(A=>(0,e._)`${(0,t.usePattern)(o,A)}.test(${D})`))),(0,e.not)(T)}function C(D){l.code((0,e._)`delete ${c}[${D}]`)}function k(D){if(g.removeAdditional==="all"||g.removeAdditional&&s===!1){C(D);return}if(s===!1){o.setParams({additionalProperty:D}),o.error(),m||l.break();return}if(typeof s=="object"&&!(0,n.alwaysValidSchema)(d,s)){const T=l.name("valid");g.removeAdditional==="failing"?(_(D,T,!1),l.if((0,e.not)(T),()=>{o.reset(),C(D)})):(_(D,T),m||l.if((0,e.not)(T),()=>l.break()))}}function _(D,T,A){const M={keyword:"additionalProperties",dataProp:D,dataPropType:n.Type.Str};A===!1&&Object.assign(M,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(M,T)}}};return G5.default=i,G5}var Y5={},UE;function dbe(){if(UE)return Y5;UE=1,Object.defineProperty(Y5,"__esModule",{value:!0});const t=Hf(),e=qo(),r=an(),n=Cq(),a={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:o,schema:l,parentSchema:s,data:f,it:c}=i;c.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(c,n.default,"additionalProperties"));const h=(0,e.allSchemaProperties)(l);for(const b of h)c.definedProperties.add(b);c.opts.unevaluated&&h.length&&c.props!==!0&&(c.props=r.mergeEvaluated.props(o,(0,r.toHash)(h),c.props));const d=h.filter(b=>!(0,r.alwaysValidSchema)(c,l[b]));if(d.length===0)return;const m=o.name("valid");for(const b of d)g(b)?y(b):(o.if((0,e.propertyInData)(o,f,b,c.opts.ownProperties)),y(b),c.allErrors||o.else().var(m,!0),o.endIf()),i.it.definedProperties.add(b),i.ok(m);function g(b){return c.opts.useDefaults&&!c.compositeRule&&l[b].default!==void 0}function y(b){i.subschema({keyword:"properties",schemaProp:b,dataProp:b},m)}}};return Y5.default=a,Y5}var X5={},GE;function hbe(){if(GE)return X5;GE=1,Object.defineProperty(X5,"__esModule",{value:!0});const t=qo(),e=Fr(),r=an(),n=an(),a={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:o,schema:l,data:s,parentSchema:f,it:c}=i,{opts:h}=c,d=(0,t.allSchemaProperties)(l),m=d.filter(k=>(0,r.alwaysValidSchema)(c,l[k]));if(d.length===0||m.length===d.length&&(!c.opts.unevaluated||c.props===!0))return;const g=h.strictSchema&&!h.allowMatchingProperties&&f.properties,y=o.name("valid");c.props!==!0&&!(c.props instanceof e.Name)&&(c.props=(0,n.evaluatedPropsToName)(o,c.props));const{props:b}=c;S();function S(){for(const k of d)g&&w(k),c.allErrors?C(k):(o.var(y,!0),C(k),o.if(y))}function w(k){for(const _ in g)new RegExp(k).test(_)&&(0,r.checkStrictMode)(c,`property ${_} matches pattern ${k} (use allowMatchingProperties)`)}function C(k){o.forIn("key",s,_=>{o.if((0,e._)`${(0,t.usePattern)(i,k)}.test(${_})`,()=>{const D=m.includes(k);D||i.subschema({keyword:"patternProperties",schemaProp:k,dataProp:_,dataPropType:n.Type.Str},y),c.opts.unevaluated&&b!==!0?o.assign((0,e._)`${b}[${_}]`,!0):!D&&!c.allErrors&&o.if((0,e.not)(y),()=>o.break())})})}}};return X5.default=a,X5}var K5={},YE;function pbe(){if(YE)return K5;YE=1,Object.defineProperty(K5,"__esModule",{value:!0});const t=an(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:a,it:i}=r;if((0,t.alwaysValidSchema)(i,a)){r.fail();return}const o=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),r.failResult(o,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return K5.default=e,K5}var J5={},XE;function mbe(){if(XE)return J5;XE=1,Object.defineProperty(J5,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:qo().validateUnion,error:{message:"must match a schema in anyOf"}};return J5.default=e,J5}var Z5={},KE;function gbe(){if(KE)return Z5;KE=1,Object.defineProperty(Z5,"__esModule",{value:!0});const t=Fr(),e=an(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:a})=>(0,t._)`{passingSchemas: ${a.passing}}`},code(a){const{gen:i,schema:o,parentSchema:l,it:s}=a;if(!Array.isArray(o))throw new Error("ajv implementation error");if(s.opts.discriminator&&l.discriminator)return;const f=o,c=i.let("valid",!1),h=i.let("passing",null),d=i.name("_valid");a.setParams({passing:h}),i.block(m),a.result(c,()=>a.reset(),()=>a.error(!0));function m(){f.forEach((g,y)=>{let b;(0,e.alwaysValidSchema)(s,g)?i.var(d,!0):b=a.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},d),y>0&&i.if((0,t._)`${d} && ${c}`).assign(c,!1).assign(h,(0,t._)`[${h}, ${y}]`).else(),i.if(d,()=>{i.assign(c,!0),i.assign(h,y),b&&a.mergeEvaluated(b,t.Name)})})}}};return Z5.default=n,Z5}var Q5={},JE;function ybe(){if(JE)return Q5;JE=1,Object.defineProperty(Q5,"__esModule",{value:!0});const t=an(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:a,it:i}=r;if(!Array.isArray(a))throw new Error("ajv implementation error");const o=n.name("valid");a.forEach((l,s)=>{if((0,t.alwaysValidSchema)(i,l))return;const f=r.subschema({keyword:"allOf",schemaProp:s},o);r.ok(o),r.mergeEvaluated(f)})}};return Q5.default=e,Q5}var eu={},ZE;function vbe(){if(ZE)return eu;ZE=1,Object.defineProperty(eu,"__esModule",{value:!0});const t=Fr(),e=an(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,t.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,t._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:o,parentSchema:l,it:s}=i;l.then===void 0&&l.else===void 0&&(0,e.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const f=a(s,"then"),c=a(s,"else");if(!f&&!c)return;const h=o.let("valid",!0),d=o.name("_valid");if(m(),i.reset(),f&&c){const y=o.let("ifClause");i.setParams({ifClause:y}),o.if(d,g("then",y),g("else",y))}else f?o.if(d,g("then")):o.if((0,t.not)(d),g("else"));i.pass(h,()=>i.error(!0));function m(){const y=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);i.mergeEvaluated(y)}function g(y,b){return()=>{const S=i.subschema({keyword:y},d);o.assign(h,d),i.mergeValidEvaluated(S,h),b?o.assign(b,(0,t._)`${y}`):i.setParams({ifClause:y})}}}};function a(i,o){const l=i.schema[o];return l!==void 0&&!(0,e.alwaysValidSchema)(i,l)}return eu.default=n,eu}var tu={},QE;function bbe(){if(QE)return tu;QE=1,Object.defineProperty(tu,"__esModule",{value:!0});const t=an(),e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:a}){n.if===void 0&&(0,t.checkStrictMode)(a,`"${r}" without "if" is ignored`)}};return tu.default=e,tu}var ej;function xbe(){if(ej)return z5;ej=1,Object.defineProperty(z5,"__esModule",{value:!0});const t=wq(),e=lbe(),r=Sq(),n=sbe(),a=ube(),i=cbe(),o=fbe(),l=Cq(),s=dbe(),f=hbe(),c=pbe(),h=mbe(),d=gbe(),m=ybe(),g=vbe(),y=bbe();function b(S=!1){const w=[c.default,h.default,d.default,m.default,g.default,y.default,o.default,l.default,i.default,s.default,f.default];return S?w.push(e.default,n.default):w.push(t.default,r.default),w.push(a.default),w}return z5.default=b,z5}var ru={},nu={},tj;function wbe(){if(tj)return nu;tj=1,Object.defineProperty(nu,"__esModule",{value:!0});const t=Fr(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,t._)`{format: ${n}}`},code(n,a){const{gen:i,data:o,$data:l,schema:s,schemaCode:f,it:c}=n,{opts:h,errSchemaPath:d,schemaEnv:m,self:g}=c;if(!h.validateFormats)return;l?y():b();function y(){const S=i.scopeValue("formats",{ref:g.formats,code:h.code.formats}),w=i.const("fDef",(0,t._)`${S}[${f}]`),C=i.let("fType"),k=i.let("format");i.if((0,t._)`typeof ${w} == "object" && !(${w} instanceof RegExp)`,()=>i.assign(C,(0,t._)`${w}.type || "string"`).assign(k,(0,t._)`${w}.validate`),()=>i.assign(C,(0,t._)`"string"`).assign(k,w)),n.fail$data((0,t.or)(_(),D()));function _(){return h.strictSchema===!1?t.nil:(0,t._)`${f} && !${k}`}function D(){const T=m.$async?(0,t._)`(${w}.async ? await ${k}(${o}) : ${k}(${o}))`:(0,t._)`${k}(${o})`,A=(0,t._)`(typeof ${k} == "function" ? ${T} : ${k}.test(${o}))`;return(0,t._)`${k} && ${k} !== true && ${C} === ${a} && !${A}`}}function b(){const S=g.formats[s];if(!S){_();return}if(S===!0)return;const[w,C,k]=D(S);w===a&&n.pass(T());function _(){if(h.strictSchema===!1){g.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${s}" ignored in schema at path "${d}"`}}function D(A){const M=A instanceof RegExp?(0,t.regexpCode)(A):h.code.formats?(0,t._)`${h.code.formats}${(0,t.getProperty)(s)}`:void 0,E=i.scopeValue("formats",{key:s,ref:A,code:M});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,t._)`${E}.validate`]:["string",A,E]}function T(){if(typeof S=="object"&&!(S instanceof RegExp)&&S.async){if(!m.$async)throw new Error("async format in sync schema");return(0,t._)`await ${k}(${o})`}return typeof C=="function"?(0,t._)`${k}(${o})`:(0,t._)`${k}.test(${o})`}}}};return nu.default=r,nu}var rj;function Sbe(){if(rj)return ru;rj=1,Object.defineProperty(ru,"__esModule",{value:!0});const e=[wbe().default];return ru.default=e,ru}var k3={},nj;function Cbe(){return nj||(nj=1,Object.defineProperty(k3,"__esModule",{value:!0}),k3.contentVocabulary=k3.metadataVocabulary=void 0,k3.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],k3.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),k3}var aj;function kbe(){if(aj)return O5;aj=1,Object.defineProperty(O5,"__esModule",{value:!0});const t=Yve(),e=obe(),r=xbe(),n=Sbe(),a=Cbe(),i=[t.default,e.default,(0,r.default)(),n.default,a.metadataVocabulary,a.contentVocabulary];return O5.default=i,O5}var au={},El={},ij;function _be(){if(ij)return El;ij=1,Object.defineProperty(El,"__esModule",{value:!0}),El.DiscrError=void 0;var t;return function(e){e.Tag="tag",e.Mapping="mapping"}(t||(El.DiscrError=t={})),El}var oj;function Obe(){if(oj)return au;oj=1,Object.defineProperty(au,"__esModule",{value:!0});const t=Fr(),e=_be(),r=yw(),n=qf(),a=an(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:l,tagName:s}})=>l===e.DiscrError.Tag?`tag "${s}" must be string`:`value of tag "${s}" must be in oneOf`,params:({params:{discrError:l,tag:s,tagName:f}})=>(0,t._)`{error: ${l}, tag: ${f}, tagValue: ${s}}`},code(l){const{gen:s,data:f,schema:c,parentSchema:h,it:d}=l,{oneOf:m}=h;if(!d.opts.discriminator)throw new Error("discriminator: requires discriminator option");const g=c.propertyName;if(typeof g!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!m)throw new Error("discriminator: requires oneOf keyword");const y=s.let("valid",!1),b=s.const("tag",(0,t._)`${f}${(0,t.getProperty)(g)}`);s.if((0,t._)`typeof ${b} == "string"`,()=>S(),()=>l.error(!1,{discrError:e.DiscrError.Tag,tag:b,tagName:g})),l.ok(y);function S(){const k=C();s.if(!1);for(const _ in k)s.elseIf((0,t._)`${b} === ${_}`),s.assign(y,w(k[_]));s.else(),l.error(!1,{discrError:e.DiscrError.Mapping,tag:b,tagName:g}),s.endIf()}function w(k){const _=s.name("valid"),D=l.subschema({keyword:"oneOf",schemaProp:k},_);return l.mergeEvaluated(D,t.Name),_}function C(){var k;const _={},D=A(h);let T=!0;for(let N=0;N<m.length;N++){let Y=m[N];if(Y!=null&&Y.$ref&&!(0,a.schemaHasRulesButRef)(Y,d.self.RULES)){const K=Y.$ref;if(Y=r.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,K),Y instanceof r.SchemaEnv&&(Y=Y.schema),Y===void 0)throw new n.default(d.opts.uriResolver,d.baseId,K)}const ne=(k=Y==null?void 0:Y.properties)===null||k===void 0?void 0:k[g];if(typeof ne!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${g}"`);T=T&&(D||A(Y)),M(ne,N)}if(!T)throw new Error(`discriminator: "${g}" must be required`);return _;function A({required:N}){return Array.isArray(N)&&N.includes(g)}function M(N,Y){if(N.const)E(N.const,Y);else if(N.enum)for(const ne of N.enum)E(ne,Y);else throw new Error(`discriminator: "properties/${g}" must have "const" or "enum"`)}function E(N,Y){if(typeof N!="string"||N in _)throw new Error(`discriminator: "${g}" values must be unique strings`);_[N]=Y}}}};return au.default=o,au}const Dbe="http://json-schema.org/draft-07/schema#",Abe="http://json-schema.org/draft-07/schema#",Tbe="Core schema meta-schema",Mbe={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Ebe=["object","boolean"],jbe={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},Lbe={$schema:Dbe,$id:Abe,title:Tbe,definitions:Mbe,type:Ebe,properties:jbe,default:!0};var lj;function Nbe(){return lj||(lj=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=Wve(),n=kbe(),a=Obe(),i=Lbe,o=["/properties"],l="http://json-schema.org/draft-07/schema";class s extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(g=>this.addVocabulary(g)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const g=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(g,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}e.Ajv=s,t.exports=e=s,t.exports.Ajv=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var f=Hf();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var c=Fr();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var h=gw();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return h.default}});var d=qf();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(w5,w5.exports)),w5.exports}var Ibe=Nbe();const Pbe=_a(Ibe),jo=[{graphName:"Bar graph",graphID:"barChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!0},{graphName:"Stacked bar graph",graphID:"stackedBarChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Grouped bar graph",graphID:"groupedBarChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated bar chart",graphID:"animatedBarChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated bar chart",graphID:"radarChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated stacked bar chart",graphID:"animatedStackedBarChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated grouped bar chart",graphID:"animatedGroupedBarChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Bee swarm chart",graphID:"beeSwarmChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Butterfly chart",graphID:"butterflyChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated butterfly chart",graphID:"animatedButterflyChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Circle packing",graphID:"circlePacking",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!0},{graphName:"Data table",graphID:"dataTable",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Pie/donut chart",graphID:"donutChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!0},{graphName:"Dumbbell chart",graphID:"dumbbellChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated dumbbell chart",graphID:"animatedDumbbellChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Heat map",graphID:"heatMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Histogram",graphID:"histogram",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Line chart",graphID:"lineChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Multi-line chart",graphID:"multiLineChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Multi-line chart alternative",graphID:"multiLineChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Difference line chart",graphID:"differenceLineChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Dual-axes line chart",graphID:"dualAxisLineChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Line chart with interval",graphID:"lineChartWithConfidenceInterval",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Spark line",graphID:"sparkLine",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Choropleth map",graphID:"choroplethMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Bi-variate choropleth map",graphID:"biVariateChoroplethMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Dot density map",graphID:"dotDensityMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated choropleth map",graphID:"animatedChoroplethMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated bi-variate choropleth map",graphID:"animatedBiVariateChoroplethMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated dot density map",graphID:"animatedDotDensityMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"GeoHub map with comparison",graphID:"geoHubCompareMap",availableInGriddedGraph:!1,geoHubMapPresentation:!0,availableInWideToLongFormat:!1},{graphName:"GeoHub map",graphID:"geoHubMap",availableInGriddedGraph:!1,geoHubMapPresentation:!0,availableInWideToLongFormat:!1},{graphName:"GeoHub map with layer selection",graphID:"geoHubMapWithLayerSelection",availableInGriddedGraph:!1,geoHubMapPresentation:!0,availableInWideToLongFormat:!1},{graphName:"Pareto chart",graphID:"paretoChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Scatter plot",graphID:"scatterPlot",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Animated scatter plot",graphID:"animatedScatterPlot",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Slope chart",graphID:"slopeChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Stacked area chart/area chart",graphID:"stackedAreaChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Statistic card",graphID:"statCard",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Strip chart",graphID:"stripChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Tree map",graphID:"treeMap",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!0},{graphName:"Unit chart",graphID:"unitChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!0},{graphName:"Sankey chart",graphID:"sankeyChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Data cards list",graphID:"dataCards",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1},{graphName:"Radar chart",graphID:"radarChart",availableInGriddedGraph:!0,geoHubMapPresentation:!1,availableInWideToLongFormat:!1}],Rbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{oneOf:[{type:"number"},{type:"null"}]},color:{type:"string"},data:{type:"object"}},required:["label"]}},$be={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{oneOf:[{type:"number"},{type:"null"}]},color:{type:"string"},data:{type:"object"}},required:["label"]}},Bbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},values:{type:"array",items:{type:"number"}},color:{type:"string"},data:{type:"object"}},required:["values"]}},Vbe={type:"array",items:{type:"object",properties:{source:{oneOf:[{type:"string"},{type:"number"}]},target:{oneOf:[{type:"string"},{type:"number"}]},value:{type:"number"},data:{type:"object"}},required:["source","target","value"]}},Fbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},leftBar:{oneOf:[{type:"number"},{type:"null"}]},rightBar:{oneOf:[{type:"number"},{type:"null"}]},data:{type:"object"}},required:["label"]}},zbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},leftBar:{oneOf:[{type:"number"},{type:"null"}]},rightBar:{oneOf:[{type:"number"},{type:"null"}]},date:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["label","date"]}},Hbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{oneOf:[{type:"number"},{type:"null"}]},color:{type:"string"},data:{type:"object"}},required:["label"]}},qbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]}},data:{type:"object"}},required:["label","size"]}},Wbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]}},data:{type:"object"}},required:["label","size"]}},Ube={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{oneOf:[{type:"number"},{type:"null"}]},date:{oneOf:[{type:"string"},{type:"number"}]},color:{type:"string"},data:{type:"object"}},required:["label","date"]}},Gbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]}},date:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["label","size","date"]}},Ybe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},size:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]}},date:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["label","size","date"]}},Xbe={type:"array",items:{type:"object",properties:{x:{type:"array",items:{oneOf:[{type:"null"},{type:"number"}]}},label:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["x","label"]}},Kbe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},value:{type:"number"},data:{type:"object"}},required:["value","label"]}},Jbe={type:"array",items:{type:"object",properties:{x:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]}},label:{oneOf:[{type:"string"},{type:"number"}]},date:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["x","label","date"]}},Zbe={type:"array",items:{type:"object",properties:{size:{type:"number"},label:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["size","label"]}},Qbe={type:"array",items:{type:"object",properties:{value:{type:"number"},data:{type:"object"}},required:["value"]}},exe={type:"array",items:{type:"object",properties:{x:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},id:{type:"string"},data:{type:"object"}},required:["id"]}},txe={type:"array",items:{type:"object",properties:{x:{oneOf:[{type:"number"},{type:"null"}]},y:{oneOf:[{type:"number"},{type:"null"}]},id:{type:"string"},data:{type:"object"}},required:["id"]}},rxe={type:"array",items:{type:"object",properties:{x:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},id:{type:"string"},date:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["id","date"]}},nxe={type:"array",items:{type:"object",properties:{x:{oneOf:[{type:"number"},{type:"null"}]},y:{oneOf:[{type:"number"},{type:"null"}]},id:{type:"string"},data:{type:"object"},date:{oneOf:[{type:"string"},{type:"number"}]}},required:["id","date"]}},sj={type:"array",items:{type:"object",properties:{date:{oneOf:[{type:"number"},{type:"string"}]},y:{type:"number"},data:{type:"object"}},required:["date","y"]}},axe={type:"array",items:{type:"object",properties:{date:{oneOf:[{type:"number"},{type:"string"}]},y:{type:"number"},yMin:{type:"number"},yMax:{type:"number"},data:{type:"object"}},required:["date"]}},ixe={type:"array",items:{type:"object",properties:{date:{oneOf:[{type:"number"},{type:"string"}]},y:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]}},data:{type:"object"}},required:["date","y"]}},oxe={type:"array",items:{type:"object",properties:{date:{oneOf:[{type:"number"},{type:"string"}]},y:{oneOf:[{type:"number"},{type:"null"}]},label:{oneOf:[{type:"number"},{type:"string"}]},color:{oneOf:[{type:"number"},{type:"string"}]},data:{type:"object"}},required:["date","y","label"]}},lxe={type:"array",items:{type:"object",properties:{date:{oneOf:[{type:"number"},{type:"string"}]},y:{type:"array",items:{type:"number"}},data:{type:"object"}},required:["date","y"]}},sxe={type:"array",items:{type:"object",properties:{x:{oneOf:[{type:"number"},{type:"null"}]},y:{oneOf:[{type:"number"},{type:"null"}]},radius:{type:"number"},color:{type:"string"},label:{oneOf:[{type:"number"},{type:"string"}]},data:{type:"object"}}}},uxe={type:"array",items:{type:"object",properties:{x:{oneOf:[{type:"number"},{type:"null"}]},y:{oneOf:[{type:"number"},{type:"null"}]},radius:{type:"number"},color:{type:"string"},date:{oneOf:[{type:"string"},{type:"number"}]},label:{oneOf:[{type:"number"},{type:"string"}]},data:{type:"object"}},required:["label","date"]}},cxe={type:"array",items:{type:"object",properties:{date:{oneOf:[{type:"number"},{type:"string"}]},y1:{oneOf:[{type:"number"},{type:"null"}]},y2:{oneOf:[{type:"number"},{type:"null"}]},data:{type:"object"}},required:["date"]}},fxe={type:"array",items:{type:"object",properties:{date:{oneOf:[{type:"number"},{type:"string"}]},y1:{oneOf:[{type:"number"}]},y2:{oneOf:[{type:"number"}]},data:{type:"object"}},required:["date","y1","y2"]}},dxe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"number"},{type:"string"}]},bar:{oneOf:[{type:"number"},{type:"null"}]},line:{oneOf:[{type:"number"},{type:"null"}]},data:{type:"object"}},required:["label"]}},hxe={type:"array",items:{type:"object",properties:{lat:{type:"number"},long:{type:"number"},radius:{type:"number"},color:{oneOf:[{type:"string"},{type:"number"}]},label:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["lat","long"]}},pxe={type:"array",items:{type:"object",properties:{lat:{type:"number"},long:{type:"number"},radius:{type:"number"},color:{oneOf:[{type:"string"},{type:"number"}]},label:{oneOf:[{type:"string"},{type:"number"}]},date:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["lat","long","date"]}},mxe={type:"array",items:{type:"object",properties:{y1:{type:"number"},y2:{type:"number"},color:{oneOf:[{type:"string"},{type:"number"}]},label:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["y1","y2","label"]}},gxe={type:"array",items:{type:"object",properties:{row:{type:"string"},column:{type:"string"},value:{oneOf:[{type:"string"},{type:"number"},{type:"null"}]},data:{type:"object"}},required:["row","column"]}},yxe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},position:{type:"number"},radius:{type:"number"},color:{type:"string"},data:{type:"object"}},required:["label","position"]}},vxe={type:"array",items:{type:"object",properties:{label:{oneOf:[{type:"string"},{type:"number"}]},position:{type:"number"},color:{type:"string"},data:{type:"object"}},required:["label","position"]}},bxe={type:"array",items:{type:"object",properties:{value:{oneOf:[{type:"string"},{type:"number"}]},data:{type:"object"}},required:["value"]}},xxe={type:"object",properties:{detailsOnClick:{type:"string"},styles:{type:"object"},classNames:{type:"object"},graphTitle:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},showValues:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},truncateBy:{type:"number"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},tooltip:{type:"string"},graphID:{type:"string"},highlightedSourceDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},highlightedTargetDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},sortNodes:{type:"string",enum:["asc","desc","mostReadable","none"]},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},ariaLabel:{type:"string"},nodePadding:{type:"number"},nodeWidth:{type:"number"},defaultLinkOpacity:{type:"number",minimum:0,maximum:1},sourceTitle:{type:"string"},targetTitle:{type:"string"},fillContainer:{type:"boolean"},animateLinks:{oneOf:[{type:"number"},{type:"boolean"}]},sourceColors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},targetColors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},sourceColorDomain:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},targetColorDomain:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}}}},wxe={type:"object",properties:{detailsOnClick:{type:"string"},styles:{type:"object"},classNames:{type:"object"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},labelOrder:{type:"array",items:{type:"string"}},filterNA:{type:"boolean"},graphTitle:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showValues:{type:"boolean"},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},showColorScale:{type:"boolean"},maxValue:{type:"number"},minValue:{type:"number"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showNAColor:{type:"boolean"},sortData:{type:"string",enum:["asc","desc"]},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},maxBarThickness:{type:"number"},minBarThickness:{type:"number"},maxNumberOfBars:{type:"number"},ariaLabel:{type:"string"},valueColor:{type:"string"},barAxisTitle:{type:"string"},noOfTicks:{type:"number"},orientation:{type:"string",enum:["vertical","horizontal"]}}},Sxe={type:"object",properties:{detailsOnClick:{type:"string"},styles:{type:"object"},classNames:{type:"object"},colors:{type:"array",items:{type:"string"}},labelOrder:{type:"array",items:{type:"string"}},graphTitle:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showTicks:{type:"boolean"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},suffix:{type:"string"},prefix:{type:"string"},showValues:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},maxBarThickness:{type:"number"},ariaLabel:{type:"string"},valueColor:{type:"string"},barAxisTitle:{type:"string"},noOfTicks:{type:"number"},orientation:{type:"string",enum:["vertical","horizontal"]}},required:["colorDomain"]},Cxe={type:"object",properties:{detailsOnClick:{type:"string"},styles:{type:"object"},classNames:{type:"object"},colors:{type:"array",items:{type:"string"}},labelOrder:{type:"array",items:{type:"string"}},graphTitle:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},ariaLabel:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},showValues:{type:"boolean"},showLabels:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},maxValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},sortParameter:{oneOf:[{type:"string",enum:["total"]},{type:"number"}]},maxBarThickness:{type:"number"},minBarThickness:{type:"number"},maxNumberOfBars:{type:"number"},valueColor:{type:"string"},barAxisTitle:{type:"string"},noOfTicks:{type:"number"},orientation:{type:"string",enum:["vertical","horizontal"]}},required:["colorDomain"]},kxe={type:"object",properties:{detailsOnClick:{type:"string"},styles:{type:"object"},classNames:{type:"object"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},ariaLabel:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showValues:{type:"boolean"},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},showColorScale:{type:"boolean"},maxValue:{type:"number"},minValue:{type:"number"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showNAColor:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},autoPlay:{type:"boolean"},autoSort:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},theme:{type:"string",enum:["light","dark"]},maxBarThickness:{type:"number"},minBarThickness:{type:"number"},valueColor:{type:"string"},barAxisTitle:{type:"string"},noOfTicks:{type:"number"},orientation:{type:"string",enum:["vertical","horizontal"]}}},_xe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},orientation:{type:"string",enum:["vertical","horizontal"]},detailsOnClick:{type:"string"},colors:{type:"array",items:{type:"string"}},ariaLabel:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showTicks:{type:"boolean"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},suffix:{type:"string"},prefix:{type:"string"},showValues:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},tooltip:{type:"string"},maxBarThickness:{type:"number"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},theme:{type:"string",enum:["light","dark"]},valueColor:{type:"string"},barAxisTitle:{type:"string"},noOfTicks:{type:"number"}},required:["colorDomain"]},Oxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},orientation:{type:"string",enum:["vertical","horizontal"]},detailsOnClick:{type:"string"},colors:{type:"array",items:{type:"string"}},ariaLabel:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},showValues:{type:"boolean"},showLabels:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},maxValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},theme:{type:"string",enum:["light","dark"]},autoSort:{type:"boolean"},sortParameter:{oneOf:[{type:"string",enum:["total"]},{type:"number"}]},maxBarThickness:{type:"number"},minBarThickness:{type:"number"},valueColor:{type:"string"},barAxisTitle:{type:"string"},noOfTicks:{type:"number"}},required:["colorDomain"]},Dxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},orientation:{type:"string",enum:["vertical","horizontal"]},ariaLabel:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},showColorScale:{type:"boolean"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},radius:{type:"number"},maxRadiusValue:{type:"number"},maxPositionValue:{type:"number"},minPositionValue:{type:"number"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showNAColor:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]}}},Axe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},graphDescription:{type:"string"},ariaLabel:{type:"string"},leftBarTitle:{type:"string"},rightBarTitle:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},barColors:{type:"array",items:{type:"string"},minItems:2,maxItems:2},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},barPadding:{type:"number"},truncateBy:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},showTicks:{type:"boolean"},showValues:{type:"boolean"},centerGap:{type:"number"},maxValue:{type:"number"},minValue:{type:"number"},showColorScale:{type:"boolean"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]}}},Txe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},ariaLabel:{type:"string"},graphDescription:{type:"string"},leftBarTitle:{type:"string"},rightBarTitle:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},barColors:{type:"array",items:{type:"string"},minItems:2,maxItems:2},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},barPadding:{type:"number"},truncateBy:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},showTicks:{type:"boolean"},showValues:{type:"boolean"},centerGap:{type:"number"},maxValue:{type:"number"},minValue:{type:"number"},showColorScale:{type:"boolean"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},theme:{type:"string",enum:["light","dark"]}}},Mxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},resetSelectionOnDoubleClick:{type:"boolean"},ariaLabel:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},leftMargin:{type:"number"},rightMargin:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},tooltip:{type:"string"},showColorScale:{type:"boolean"},showValues:{type:"boolean"},graphID:{type:"string"},showNAColor:{type:"boolean"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},radius:{type:"number"},maxRadiusValue:{type:"number"}}},Exe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},graphTitle:{type:"string"},ariaLabel:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},graphDescription:{type:"string"},footNote:{type:"string"},graphID:{type:"string"},width:{type:"number"},height:{type:"number"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},theme:{type:"string",enum:["light","dark"]},columnData:{type:"array",items:{type:"object",properties:{columnTitle:{type:"string"},columnId:{type:"string"},sortable:{type:"boolean"},filterOptions:{type:"array",items:{type:"string"}},chip:{type:"boolean"},chipColors:{type:"array",items:{type:"object",properties:{value:{type:"string"},color:{type:"string"}},required:["value","color"]}},separator:{type:"string"},align:{type:"string",enum:["left","right","center"]},suffix:{type:"string"},prefix:{type:"string"},columnWidth:{type:"number"}},required:["columnId"]}},resetSelectionOnDoubleClick:{type:"boolean"}},required:["columnData"]},jxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},graphTitle:{type:"string"},ariaLabel:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},graphDescription:{type:"string"},footNote:{type:"string"},graphID:{type:"string"},width:{type:"number"},height:{type:"number"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},uiMode:{type:"string",enum:["light","normal"]},cardTemplate:{type:"string"},cardBackgroundColor:{type:"string"},cardFilters:{type:"array",items:{type:"object",properties:{column:{type:"string"},width:{type:"string"},label:{type:"string"},defaultValue:{oneOf:[{type:"string"},{type:"number"}]},excludeValues:{type:"array",items:{type:"string"}}},required:["column"]}},cardSearchColumns:{type:"array",items:{type:"string"}},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},cardSortingOptions:{type:"object",properties:{defaultValue:{type:"string"},width:{type:"string"},options:{type:"array",items:{type:"object",properties:{value:{type:"string"},label:{type:"string"},type:{type:"string",enum:["asc","desc"]}},required:["value","label","type"]},minItems:1}}},cardMinWidth:{type:"number"},detailsOnClick:{type:"string"},allowDataDownloadOnDetail:{oneOf:[{type:"string"},{type:"boolean"}]},noOfItemsInAPage:{type:"number",minimum:0}},required:["cardTemplate"]},Lxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},leftMargin:{type:"number"},rightMargin:{type:"number"},ariaLabel:{type:"string"},legendMaxWidth:{type:"string"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},graphTitle:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},graphDescription:{type:"string"},footNote:{type:"string"},radius:{type:"number"},strokeWidth:{type:"number"},showNAColor:{type:"boolean"},showValues:{type:"boolean"},showDots:{type:"boolean"},fillShape:{type:"boolean"},showColorScale:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},colorLegendTitle:{type:"string"},padding:{type:"string"},tooltip:{type:"string"},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},colorDomain:{type:"array",items:{type:"string"}},axisLabels:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},curveType:{type:"string",enum:["linear","curve"]},highlightedLines:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},noOfTicks:{type:"number"},maxValue:{type:"number"},minValue:{type:"number"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},width:{type:"number"},height:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},resetSelectionOnDoubleClick:{type:"boolean"}},required:["axisLabels"]},Nxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},mainText:{oneOf:[{type:"string"},{type:"object",properties:{label:{type:"string"},suffix:{type:"string"},prefix:{type:"string"}},required:["label"]}]},topMargin:{type:"number"},bottomMargin:{type:"number"},ariaLabel:{type:"string"},legendMaxWidth:{type:"string"},colors:{type:"array",items:{type:"string"}},graphTitle:{type:"string"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},graphDescription:{type:"string"},subNote:{type:"string"},footNote:{type:"string"},radius:{type:"number"},strokeWidth:{type:"number"},showColorScale:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},tooltip:{type:"string"},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},colorDomain:{type:"array",items:{type:"string"}},sortData:{type:"string",enum:["asc","desc"]},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},width:{type:"number"},height:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},resetSelectionOnDoubleClick:{type:"boolean"}}},Ixe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},ariaLabel:{type:"string"},colors:{type:"array",items:{type:"string"}},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},labelOrder:{type:"array",items:{type:"string"}},orientation:{type:"string",enum:["vertical","horizontal"]},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showValues:{type:"boolean"},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},radius:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},tooltip:{type:"string"},graphID:{type:"string"},maxPositionValue:{type:"number"},minPositionValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},sortParameter:{oneOf:[{type:"string",enum:["diff"]},{type:"number"}]},arrowConnector:{type:"boolean"},connectorStrokeWidth:{type:"number"},theme:{type:"string",enum:["light","dark"]},maxBarThickness:{type:"number"},minBarThickness:{type:"number"},maxNumberOfBars:{type:"number"},resetSelectionOnDoubleClick:{type:"boolean"},valueColor:{type:"string"},axisTitle:{type:"string"},noOfTicks:{type:"number"}},required:["colorDomain"]},Pxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},ariaLabel:{type:"string"},colors:{type:"array",items:{type:"string"}},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},orientation:{type:"string",enum:["vertical","horizontal"]},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showValues:{type:"boolean"},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},truncateBy:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},radius:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},tooltip:{type:"string"},graphID:{type:"string"},maxPositionValue:{type:"number"},minPositionValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},sortParameter:{oneOf:[{type:"string",enum:["diff"]},{type:"number"}]},arrowConnector:{type:"boolean"},connectorStrokeWidth:{type:"number"},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},theme:{type:"string",enum:["light","dark"]},maxBarThickness:{type:"number"},minBarThickness:{type:"number"},valueColor:{type:"string"},axisTitle:{type:"string"},noOfTicks:{type:"number"},resetSelectionOnDoubleClick:{type:"boolean"}},required:["colorDomain"]},Rxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},ariaLabel:{type:"string"},colors:{type:"array",items:{type:"string"}},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},scaleType:{type:"string",enum:["linear","categorical","threshold"]},colorDomain:{oneOf:[{type:"array",items:{type:"number"}},{type:"array",items:{type:"string"}}]},showColumnLabels:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},truncateBy:{type:"number"},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},showValues:{type:"boolean"},showRowLabels:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},graphID:{type:"string"},noDataColor:{type:"string"},showColorScale:{type:"boolean"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},fillContainer:{type:"boolean"},showNAColor:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}},required:["colorDomain"]},$xe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},ariaLabel:{type:"string"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},barPadding:{type:"number"},showValues:{type:"boolean"},showTicks:{type:"boolean"},leftMargin:{type:"number"},rightMargin:{type:"number"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showLabels:{type:"boolean"},maxValue:{type:"number"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},numberOfBins:{type:"number"},truncateBy:{type:"number"},donutStrokeWidth:{type:"number"},sortData:{type:"string",enum:["asc","desc"]},barGraphLayout:{type:"string",enum:["horizontal","vertical"]},graphType:{type:"string",enum:["circlePacking","treeMap","barGraph","donutChart"]},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},maxBarThickness:{type:"number"},detailsOnClick:{type:"string"}}},Bxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},ariaLabel:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},labels:{type:"array",items:{type:"string"},minItems:2,maxItems:2},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},noOfXTicks:{type:"number"},dateFormat:{type:"string"},showValues:{type:"boolean"},showColorScale:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},lineColors:{type:"array",items:{type:"string"},minItems:2,maxItems:2},sameAxes:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},animateLine:{oneOf:[{type:"number"},{type:"boolean"}]},strokeWidth:{type:"number"},showDots:{type:"boolean"},colorLegendTitle:{type:"string"},theme:{type:"string",enum:["light","dark"]},noOfYTicks:{type:"number"},minDate:{oneOf:[{type:"string"},{type:"number"}]},maxDate:{oneOf:[{type:"string"},{type:"number"}]},yAxisTitle:{type:"string"},lineSuffixes:{type:"array",items:{type:"string"},minItems:2,maxItems:2},linePrefixes:{type:"array",items:{type:"string"},minItems:2,maxItems:2}}},Vxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},ariaLabel:{type:"string"},graphID:{type:"string"},regressionLine:{oneOf:[{type:"string"},{type:"boolean"}]},lineColor:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},noOfXTicks:{type:"number"},dateFormat:{type:"string"},showValues:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},theme:{type:"string",enum:["light","dark"]},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},animateLine:{oneOf:[{type:"number"},{type:"boolean"}]},strokeWidth:{type:"number"},showDots:{type:"boolean"},noOfYTicks:{type:"number"},minDate:{oneOf:[{type:"string"},{type:"number"}]},maxDate:{oneOf:[{type:"string"},{type:"number"}]},yAxisTitle:{type:"string"}}},Fxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},ariaLabel:{type:"string"},graphID:{type:"string"},regressionLine:{oneOf:[{type:"string"},{type:"boolean"}]},lineColor:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},noOfXTicks:{type:"number"},dateFormat:{type:"string"},showValues:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},theme:{type:"string",enum:["light","dark"]},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},animateLine:{oneOf:[{type:"number"},{type:"boolean"}]},strokeWidth:{type:"number"},showDots:{type:"boolean"},showIntervalDots:{type:"boolean"},showIntervalValues:{type:"boolean"},intervalLineStrokeWidth:{type:"number"},intervalLineColors:{type:"array",items:{type:"string"},minItems:2,maxItems:2},intervalAreaColor:{type:"string"},intervalAreaOpacity:{type:"number"},noOfYTicks:{type:"number"},minDate:{oneOf:[{type:"string"},{type:"number"}]},maxDate:{oneOf:[{type:"string"},{type:"number"}]},yAxisTitle:{type:"string"},colorLegendTitle:{type:"string"},colorLegendColors:{type:"array",items:{type:"string"}},colorLegendDomain:{type:"array",items:{type:"string"}}}},zxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},ariaLabel:{type:"string"},lineColors:{type:"array",items:{type:"string"},minItems:2,maxItems:2},diffAreaColors:{type:"array",items:{type:"string"},minItems:2,maxItems:2},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},noOfXTicks:{type:"number"},dateFormat:{type:"string"},showValues:{type:"boolean"},suffix:{type:"string"},prefix:{type:"string"},labels:{type:"array",items:{type:"string"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},showColorLegendAtTop:{type:"boolean"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},animateLine:{oneOf:[{type:"number"},{type:"boolean"}]},strokeWidth:{type:"number"},showDots:{type:"boolean"},colorLegendTitle:{type:"string"},noOfYTicks:{type:"number"},minDate:{oneOf:[{type:"string"},{type:"number"}]},maxDate:{oneOf:[{type:"string"},{type:"number"}]},yAxisTitle:{type:"string"}},required:["labels"]},Hxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},ariaLabel:{type:"string"},lineColors:{type:"array",items:{type:"string"}},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},noOfXTicks:{type:"number"},dateFormat:{type:"string"},suffix:{type:"string"},prefix:{type:"string"},labels:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:1},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},showValues:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},showColorLegendAtTop:{type:"boolean"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},highlightedLines:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},animateLine:{oneOf:[{type:"number"},{type:"boolean"}]},strokeWidth:{type:"number"},showDots:{type:"boolean"},colorLegendTitle:{type:"string"},noOfYTicks:{type:"number"},minDate:{oneOf:[{type:"string"},{type:"number"}]},maxDate:{oneOf:[{type:"string"},{type:"number"}]},yAxisTitle:{type:"string"}},required:["labels"]},qxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},ariaLabel:{type:"string"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},noOfXTicks:{type:"number"},dateFormat:{type:"string"},suffix:{type:"string"},prefix:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},highlightedLines:{type:"array",items:{oneOf:[{type:"number"},{type:"string"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},animateLine:{oneOf:[{type:"number"},{type:"boolean"}]},strokeWidth:{type:"number"},showDots:{type:"boolean"},colorLegendTitle:{type:"string"},noOfYTicks:{type:"number"},minDate:{oneOf:[{type:"string"},{type:"number"}]},maxDate:{oneOf:[{type:"string"},{type:"number"}]},yAxisTitle:{type:"string"}}},Wxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},lineColor:{type:"string"},ariaLabel:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},dateFormat:{type:"string"},area:{type:"boolean"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]}}},Uxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},ariaLabel:{type:"string"},mapData:{oneOf:[{type:"object"},{type:"string"}]},mapProjection:{enum:["mercator","equalEarth","naturalEarth","orthographic","albersUSA"],type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},colorDomain:{oneOf:[{type:"array",items:{type:"number"},minItems:1},{type:"array",items:{type:"string"},minItems:1}]},colors:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},scaleType:{type:"string",enum:["categorical","threshold"]},scale:{type:"number"},centerPoint:{type:"array",items:{type:"number"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},mapBorderWidth:{type:"number"},mapNoDataColor:{type:"string"},mapBorderColor:{type:"string"},relativeHeight:{type:"number"},minHeight:{type:"number"},padding:{type:"string"},isWorldMap:{type:"boolean"},tooltip:{type:"string"},showColorScale:{type:"boolean"},zoomScaleExtend:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomTranslateExtend:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2},graphID:{type:"string"},highlightedIds:{type:"array",items:{type:"string"}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},mapProperty:{type:"string"},showAntarctica:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}}},Gxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},ariaLabel:{type:"string"},mapData:{oneOf:[{type:"object"},{type:"string"}]},mapProjection:{enum:["mercator","equalEarth","naturalEarth","orthographic","albersUSA"],type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},xColorLegendTitle:{type:"string"},yColorLegendTitle:{type:"string"},xDomain:{type:"array",items:{type:"number"}},yDomain:{type:"array",items:{type:"number"}},colors:{type:"array",items:{type:"array",items:{type:"string"}}},scale:{type:"number"},centerPoint:{type:"array",items:{type:"number"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},mapBorderWidth:{type:"number"},mapNoDataColor:{type:"string"},padding:{type:"string"},mapBorderColor:{type:"string"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},isWorldMap:{type:"boolean"},zoomScaleExtend:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomTranslateExtend:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2},graphID:{type:"string"},highlightedIds:{type:"array",items:{type:"string"}},mapProperty:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showAntarctica:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}}},Yxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},ariaLabel:{type:"string"},graphTitle:{type:"string"},mapData:{oneOf:[{type:"object"},{type:"string"}]},mapProjection:{enum:["mercator","equalEarth","naturalEarth","orthographic","albersUSA"],type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},radius:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},scale:{type:"number"},centerPoint:{type:"array",items:{type:"number"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},mapBorderWidth:{type:"number"},mapNoDataColor:{type:"string"},mapBorderColor:{type:"string"},padding:{type:"string"},showLabels:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},isWorldMap:{type:"boolean"},tooltip:{type:"string"},showColorScale:{type:"boolean"},zoomScaleExtend:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomTranslateExtend:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2},graphID:{type:"string"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showAntarctica:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}}},Xxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},ariaLabel:{type:"string"},graphTitle:{type:"string"},mapData:{oneOf:[{type:"object"},{type:"string"}]},mapProjection:{enum:["mercator","equalEarth","naturalEarth","orthographic","albersUSA"],type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},colorDomain:{oneOf:[{type:"array",items:{type:"number"},minItems:1},{type:"array",items:{type:"string"},minItems:1}]},colors:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},scaleType:{type:"string",enum:["categorical","threshold"]},scale:{type:"number"},centerPoint:{type:"array",items:{type:"number"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},mapBorderWidth:{type:"number"},mapNoDataColor:{type:"string"},mapBorderColor:{type:"string"},relativeHeight:{type:"number"},minHeight:{type:"number"},padding:{type:"string"},isWorldMap:{type:"boolean"},tooltip:{type:"string"},showColorScale:{type:"boolean"},zoomScaleExtend:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomTranslateExtend:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2},graphID:{type:"string"},highlightedIds:{type:"array",items:{type:"string"}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},mapProperty:{type:"string"},showAntarctica:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}}},Kxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},mapData:{oneOf:[{type:"object"},{type:"string"}]},mapProjection:{enum:["mercator","equalEarth","naturalEarth","orthographic","albersUSA"],type:"string"},ariaLabel:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},xColorLegendTitle:{type:"string"},yColorLegendTitle:{type:"string"},xDomain:{type:"array",items:{type:"number"}},yDomain:{type:"array",items:{type:"number"}},colors:{type:"array",items:{type:"array",items:{type:"string"}}},scale:{type:"number"},centerPoint:{type:"array",items:{type:"number"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},mapBorderWidth:{type:"number"},mapNoDataColor:{type:"string"},padding:{type:"string"},mapBorderColor:{type:"string"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},isWorldMap:{type:"boolean"},zoomScaleExtend:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomTranslateExtend:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2},graphID:{type:"string"},highlightedIds:{type:"array",items:{type:"string"}},mapProperty:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showAntarctica:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}}},Jxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},ariaLabel:{type:"string"},mapData:{oneOf:[{type:"object"},{type:"string"}]},mapProjection:{enum:["mercator","equalEarth","naturalEarth","orthographic","albersUSA"],type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},radius:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},scale:{type:"number"},centerPoint:{type:"array",items:{type:"number"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},mapBorderWidth:{type:"number"},mapNoDataColor:{type:"string"},mapBorderColor:{type:"string"},padding:{type:"string"},showLabels:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},isWorldMap:{type:"boolean"},tooltip:{type:"string"},showColorScale:{type:"boolean"},zoomScaleExtend:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomTranslateExtend:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2},graphID:{type:"string"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showAntarctica:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"}}},Zxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},graphTitle:{type:"string"},ariaLabel:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},graphDescription:{type:"string"},footNote:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},width:{type:"number"},height:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},graphID:{type:"string"},mapStyles:{type:"array",items:{type:"string"},minItems:2,maxItems:2},center:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomLevel:{type:"number"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]}},required:["mapStyles"]},Qxe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},mapStyle:{oneOf:[{type:"string"},{type:"array",items:{type:"object",properties:{name:{type:"string"},style:{type:"string"}},required:["name","style"]},minItems:1}]},center:{type:"array",items:{type:"number"},minItems:2,maxItems:2},ariaLabel:{type:"string"},zoomLevel:{type:"number"},graphTitle:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},graphDescription:{type:"string"},footNote:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},width:{type:"number"},height:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},graphID:{type:"string"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},uiMode:{type:"string",enum:["light","normal"]},includeLayers:{type:"array",items:{type:"string"}},excludeLayers:{type:"array",items:{type:"string"}}},required:["mapStyle"]},ewe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},mapStyle:{type:"string"},center:{type:"array",items:{type:"number"},minItems:2,maxItems:2},zoomLevel:{type:"number"},graphTitle:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},ariaLabel:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},width:{type:"number"},height:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},graphID:{type:"string"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},uiMode:{type:"string",enum:["light","normal"]},layerSelection:{type:"array",items:{type:"object",properties:{name:{type:"string"},layerID:{type:"array",items:{type:"string"},minItems:1}},required:["name","layerID"]},minItems:1},excludeLayers:{type:"array",items:{type:"string"}}},required:["mapStyle","layerSelection"]},twe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},showValues:{type:"boolean"},graphTitle:{type:"string"},ariaLabel:{type:"string"},graphDescription:{type:"string"},barTitle:{type:"string"},lineTitle:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},barColor:{type:"string"},lineColor:{type:"string"},sameAxes:{type:"boolean"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},barPadding:{type:"number"},truncateBy:{type:"number"},showLabels:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},noOfTicks:{type:"number"},lineSuffix:{type:"string"},barSuffix:{type:"string"},linePrefix:{type:"string"},barPrefix:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"}}},rwe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},ariaLabel:{type:"string"},regressionLine:{oneOf:[{type:"string"},{type:"boolean"}]},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},showLabels:{type:"boolean"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},radius:{type:"number"},xAxisTitle:{type:"string"},yAxisTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},refXValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},refYValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]},minItems:4,maxItems:4},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},showColorScale:{type:"boolean"},graphID:{type:"string"},maxRadiusValue:{type:"number"},maxXValue:{type:"number"},minXValue:{type:"number"},maxYValue:{type:"number"},minYValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showNAColor:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{type:"number"},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},noOfXTicks:{type:"number"},noOfYTicks:{type:"number"},labelColor:{type:"string"},xSuffix:{type:"string"},ySuffix:{type:"string"},xPrefix:{type:"string"},yPrefix:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"}}},nwe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},ariaLabel:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},showLabels:{type:"boolean"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},radius:{type:"number"},xAxisTitle:{type:"string"},yAxisTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},refXValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},refYValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]},minItems:4,maxItems:4},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},showColorScale:{type:"boolean"},graphID:{type:"string"},maxRadiusValue:{type:"number"},maxXValue:{type:"number"},minXValue:{type:"number"},maxYValue:{type:"number"},minYValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showNAColor:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},autoPlay:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},dateFormat:{type:"string"},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{type:"number"},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},noOfXTicks:{type:"number"},noOfYTicks:{type:"number"},labelColor:{type:"string"},xSuffix:{type:"string"},ySuffix:{type:"string"},xPrefix:{type:"string"},yPrefix:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"}}},awe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},ariaLabel:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},showLabels:{type:"boolean"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},radius:{type:"number"},axisTitles:{type:"array",items:{type:"string"},minItems:2,maxItems:2},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},showColorScale:{type:"boolean"},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},fillContainer:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}}},iwe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},colors:{type:"array",items:{type:"string"},minItems:0},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},ariaLabel:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},noOfXTicks:{type:"number"},dateFormat:{type:"string"},colorDomain:{type:"array",items:{type:"string"},minItems:1},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},colorLegendTitle:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},bottomMargin:{type:"number"},tooltip:{type:"string"},refValues:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]}},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},highlightAreaSettings:{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showColorScale:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},yAxisTitle:{type:"string"},noOfYTicks:{type:"number"},prefix:{type:"string"},suffix:{type:"string"}},required:["colorDomain"]},owe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},year:{oneOf:[{type:"number"},{type:"string"}]},ariaLabel:{type:"string"},textBackground:{type:"boolean"},centerAlign:{type:"boolean"},verticalAlign:{type:"string",enum:["center","top","bottom"]},headingFontSize:{type:"string"},graphTitle:{type:"string"},graphDescription:{type:"string"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},footNote:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},graphID:{type:"string"},aggregationMethod:{type:"string",enum:["count","max","min","average","sum"]},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},countOnly:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}}}},lwe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},graphTitle:{type:"string"},valueColor:{type:"string"},ariaLabel:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},stripType:{type:"string",enum:["strip","dot"]},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},radius:{type:"number"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},leftMargin:{type:"number"},rightMargin:{type:"number"},topMargin:{type:"number"},bottomMargin:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},tooltip:{type:"string"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},showColorScale:{type:"boolean"},graphID:{type:"string"},maxValue:{type:"number"},minValue:{type:"number"},showAxis:{type:"boolean"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},prefix:{type:"string"},suffix:{type:"string"},showNAColor:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},highlightColor:{type:"string"},dotOpacity:{type:"number"},theme:{type:"string",enum:["light","dark"]},orientation:{type:"string",enum:["vertical","horizontal"]},resetSelectionOnDoubleClick:{type:"boolean"}}},swe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},detailsOnClick:{type:"string"},colors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},graphTitle:{type:"string"},ariaLabel:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},width:{type:"number"},height:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"},suffix:{type:"string"},prefix:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},leftMargin:{type:"number"},rightMargin:{type:"number"},colorDomain:{type:"array",items:{type:"string"}},colorLegendTitle:{type:"string"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},topMargin:{type:"number"},bottomMargin:{type:"number"},showLabels:{type:"boolean"},tooltip:{type:"string"},showColorScale:{type:"boolean"},showValues:{type:"boolean"},graphID:{type:"string"},highlightedDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},showNAColor:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},theme:{type:"string",enum:["light","dark"]},resetSelectionOnDoubleClick:{type:"boolean"}}},uwe={type:"object",properties:{styles:{type:"object"},classNames:{type:"object"},totalNoOfDots:{type:"number"},ariaLabel:{type:"string"},gridSize:{type:"number"},unitPadding:{type:"number"},size:{type:"number"},graphTitle:{type:"string"},graphDescription:{type:"string"},footNote:{type:"string"},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},colors:{type:"array",items:{type:"string"}},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},padding:{type:"string"},graphID:{type:"string"},graphDownload:{type:"boolean"},dataDownload:{type:"boolean"},language:{type:"string",enum:["en","ar","az","bn","cy","he","hi","jp","ka","km","ko","my","ne","zh","custom"]},showColorScale:{type:"boolean"},showStrokeForWhiteDots:{type:"boolean"},note:{type:"string"},theme:{type:"string",enum:["light","dark"]},width:{type:"number"},height:{type:"number"},relativeHeight:{type:"number"},minHeight:{type:"number"}}},Bc={properties:{styles:{type:"object"},classNames:{type:"object"},curveType:{type:"string",enum:["linear","curve","step","stepAfter","stepBefore"]},axisTitle:{type:"string"},theme:{type:"string",enum:["light","dark"]},textBackground:{type:"boolean"},headingFontSize:{type:"string"},centerAlign:{type:"boolean"},verticalAlign:{type:"string",enum:["center","top","bottom"]},regressionLine:{oneOf:[{type:"string"},{type:"boolean"}]},ariaLabel:{type:"string"},includeLayers:{type:"array",items:{type:"string"}},excludeLayers:{type:"array",items:{type:"string"}},layerSelection:{type:"array",items:{type:"object",properties:{name:{type:"string"},layerID:{type:"array",items:{type:"string"},minItems:1}},required:["name","layerID"]},minItems:1},maxBarThickness:{type:"number"},minBarThickness:{type:"number"},maxNumberOfBars:{type:"number"},aggregationMethod:{enum:["average","count","max","min","sum"],type:"string"},mapProjection:{enum:["mercator","equalEarth","naturalEarth","orthographic","albersUSA"],type:"string"},animateLine:{oneOf:[{type:"number"},{type:"boolean"}]},annotations:{type:"array",items:{properties:{color:{type:"string"},text:{type:"string"},xCoordinate:{oneOf:[{type:"string"},{type:"number"}]},yCoordinate:{oneOf:[{type:"string"},{type:"number"}]},xOffset:{type:"number"},yOffset:{type:"number"},align:{type:"string",enum:["center","left","right"]},fontWeight:{type:"string",enum:["regular","bold","medium"]},showConnector:{oneOf:[{type:"boolean"},{type:"number"}]},connectorRadius:{type:"number"},maxWidth:{type:"number"},styles:{type:"object",properties:{connector:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{connector:{type:"string"},text:{type:"string"}}}},type:"object",required:["text"]}},area:{type:"boolean"},arrowConnector:{type:"boolean"},autoPlay:{type:"boolean"},autoSort:{type:"boolean"},axisTitles:{items:{type:"string"},maxItems:2,minItems:2,type:"array"},backgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]},barColor:{type:"string"},barColors:{items:{type:"string"},maxItems:2,minItems:2,type:"array"},barGraphLayout:{enum:["horizontal","vertical"],type:"string"},barPadding:{type:"number"},barTitle:{type:"string"},bottomMargin:{type:"number"},center:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},centerGap:{type:"number"},centerPoint:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},color:{anyOf:[{items:{type:"string"},type:"array"},{type:"string"}]},oneOf:[{type:"array",items:{type:"number"}},{type:"array",items:{type:"string"}}],colorLegendTitle:{type:"string"},colors:{anyOf:[{items:{type:"string"},type:"array"},{items:{items:{type:"string"},type:"array"},type:"array"},{type:"string"}]},columnData:{items:{properties:{align:{enum:["center","left","right"],type:"string"},chip:{type:"boolean"},chipColors:{items:{properties:{color:{type:"string"},value:{type:"string"}},type:"object"},type:"array"},columnId:{type:"string"},columnTitle:{type:"string"},columnWidth:{type:"number"},filterOptions:{items:{type:"string"},type:"array"},prefix:{type:"string"},separator:{type:"string"},sortable:{type:"boolean"},suffix:{type:"string"}},type:"object",required:["columnId"]},type:"array"},connectorStrokeWidth:{type:"number"},countOnly:{items:{oneOf:[{type:"string"},{type:"number"}]},type:"array"},dataDownload:{type:"boolean"},dateFormat:{type:"string"},donutColorDomain:{items:{type:"string"},type:"array"},donutStrokeWidth:{type:"number"},dotOpacity:{type:"number"},fillContainer:{type:"boolean"},footNote:{type:"string"},graphDescription:{type:"string"},graphDownload:{type:"boolean"},graphID:{type:"string"},showColorScale:{type:"boolean"},graphTitle:{type:"string"},graphType:{enum:["barGraph","circlePacking","donutChart","treeMap"],type:"string"},gridSize:{type:"number"},height:{type:"number"},highlightAreaColor:{type:"string"},highlightAreaSettings:{anyOf:[{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"string"},{type:"null"}]},minItems:2,maxItems:2},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}},{type:"array",items:{type:"object",properties:{coordinates:{type:"array",items:{oneOf:[{type:"number"},{type:"null"}]},minItems:4,maxItems:4},style:{type:"object"},className:{type:"string"},color:{type:"string"},strokeWidth:{type:"number"}},required:["coordinates"]}}]},highlightColor:{type:"string"},highlightedIds:{items:{type:"string"},type:"array"},highlightedDataPoints:{items:{oneOf:[{type:"string"},{type:"number"}]},type:"array"},highlightedLines:{items:{oneOf:[{type:"string"},{type:"number"}]},type:"array"},isWorldMap:{type:"boolean"},labelOrder:{items:{type:"string"},type:"array"},labels:{items:{oneOf:[{type:"string"},{type:"number"}]},type:"array"},language:{enum:["ar","en","he"],type:"string"},leftBarTitle:{type:"string"},leftMargin:{type:"number"},lineColor:{type:"string"},lineColors:{items:{type:"string"},maxItems:2,minItems:2,type:"array"},lineTitle:{type:"string"},mainText:{oneOf:[{type:"string"},{type:"object",properties:{label:{type:"string"},suffix:{type:"string"},prefix:{type:"string"}},required:["label"]}]},mapBorderColor:{type:"string"},mapBorderWidth:{type:"number"},mapData:{oneOf:[{type:"object"},{type:"string"}]},mapNoDataColor:{type:"string"},mapProperty:{type:"string"},mapStyle:{oneOf:[{type:"string"},{type:"array",items:{type:"object",properties:{name:{type:"string"},style:{type:"string"}},required:["name","style"]},minItems:1}]},mapStyles:{items:{type:"string"},maxItems:2,minItems:2,type:"array"},maxPositionValue:{type:"number"},maxRadiusValue:{type:"number"},maxValue:{type:"number"},maxXValue:{type:"number"},maxYValue:{type:"number"},minHeight:{type:"number"},minPositionValue:{type:"number"},minValue:{type:"number"},minXValue:{type:"number"},minYValue:{type:"number"},noDataColor:{type:"string"},noOfXTicks:{type:"number"},note:{type:"string"},numberOfBins:{type:"number"},padding:{type:"string"},prefix:{type:"string"},radius:{type:"number"},refValues:{items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]},type:"array"},refXValues:{items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]},type:"array"},refYValues:{items:{properties:{color:{type:"string"},text:{type:"string"},value:{type:"number"},styles:{type:"object",properties:{line:{type:"object"},text:{type:"object"}}},classNames:{type:"object",properties:{line:{type:"string"},text:{type:"string"}}}},type:"object",required:["value","text"]},type:"array"},customHighlightAreaSettings:{type:"array",items:{properties:{coordinates:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]},minItems:4},color:{type:"string"},strokeWidth:{type:"number"},dashedStroke:{type:"boolean"},closePath:{type:"boolean"}},type:"object",required:["coordinates"]}},relativeHeight:{type:"number"},rightBarTitle:{type:"string"},rightMargin:{type:"number"},sameAxes:{type:"boolean"},scale:{type:"number"},scaleType:{enum:["categorical","linear","threshold"],type:"string"},showAntarctica:{type:"boolean"},showAxis:{type:"boolean"},showColorLegendAtTop:{type:"boolean"},showColumnLabels:{type:"boolean"},showLabels:{type:"boolean"},showNAColor:{type:"boolean"},showOnlyActiveDate:{type:"boolean"},showRowLabels:{type:"boolean"},showStrokeForWhiteDots:{type:"boolean"},showTicks:{type:"boolean"},showValues:{type:"boolean"},size:{type:"number"},sortData:{enum:["asc","desc"],type:"string"},sortParameter:{anyOf:[{type:"string",enum:["diff","total"]},{type:"number"}]},sources:{type:"array",items:{type:"object",properties:{source:{type:"string"},link:{type:"string"}},required:["source"]}},stripType:{enum:["dot","strip"],type:"string"},strokeWidth:{type:"number"},subNote:{type:"string"},suffix:{type:"string"},tooltip:{type:"string"},topMargin:{type:"number"},totalNoOfDots:{type:"number"},truncateBy:{type:"number"},unitPadding:{type:"number"},value:{type:"number"},width:{type:"number"},xAxisTitle:{type:"string"},xColorLegendTitle:{type:"string"},xDomain:{items:{type:"number"},type:"array"},yAxisTitle:{type:"string"},yColorLegendTitle:{type:"string"},yDomain:{items:{type:"number"},type:"array"},year:{oneOf:[{type:"string"},{type:"number"}]},zoomLevel:{type:"number"},zoomScaleExtend:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},zoomTranslateExtend:{items:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},maxItems:2,minItems:2,type:"array"},sortNodes:{type:"string",enum:["asc","desc","mostReadable","none"]},nodePadding:{type:"number"},nodeWidth:{type:"number"},defaultLinkOpacity:{type:"number",minimum:0,maximum:1},animateLinks:{oneOf:[{type:"number"},{type:"boolean"}]},sourceColors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},targetColors:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},sourceColorDomain:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},targetColorDomain:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},sourceTitle:{type:"string"},targetTitle:{type:"string"},highlightedSourceDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},highlightedTargetDataPoints:{type:"array",items:{oneOf:[{type:"string"},{type:"number"}]}},cardSearchColumns:{type:"array",items:{type:"string"}},cardTemplate:{type:"string"},cardBackgroundColor:{type:"string"},cardFilters:{type:"array",items:{type:"object",properties:{column:{type:"string"},width:{type:"string"},label:{type:"string"},defaultValue:{oneOf:[{type:"string"},{type:"number"}]},excludeValues:{type:"array",items:{type:"string"}}},required:["column"]}},cardSortingOptions:{type:"object",properties:{defaultValue:{type:"string"},width:{type:"string"},options:{type:"array",items:{type:"object",properties:{value:{type:"string"},label:{type:"string"},type:{type:"string",enum:["asc","desc"]}},required:["value","label","type"]},minItems:1}}},cardMinWidth:{type:"number"},detailsOnClick:{type:"string"},resetSelectionOnDoubleClick:{type:"boolean"},legendMaxWidth:{type:"string"},intervalAreaOpacity:{type:"number"},valueColor:{type:"string"},labelColor:{type:"string"},noOfYTicks:{type:"number"},noOfTicks:{type:"number"},minDate:{oneOf:[{type:"string"},{type:"number"}]},maxDate:{oneOf:[{type:"string"},{type:"number"}]},colorLegendColors:{type:"array",items:{type:"string"}},colorLegendDomain:{type:"array",items:{type:"string"}},lineSuffixes:{type:"array",items:{type:"string"},minItems:2,maxItems:2},linePrefixes:{type:"array",items:{type:"string"},minItems:2,maxItems:2},barSuffix:{type:"string"},barPrefix:{type:"string"},lineSuffix:{type:"string"},barAxisTitle:{type:"string"},linePrefix:{type:"string"},xSuffix:{type:"string"},xPrefix:{type:"string"},ySuffix:{type:"string"},yPrefix:{type:"string"},filterNA:{type:"boolean"},uiMode:{type:"string",enum:["light","normal"]},allowDataDownloadOnDetail:{oneOf:[{type:"string"},{type:"boolean"}]},noOfItemsInAPage:{type:"number",minimum:0},orientation:{type:"string",enum:["vertical","horizontal"]},showDots:{type:"boolean"},fillShape:{type:"boolean"},colorScaleMaxWidth:{type:"string"},axisLabels:{type:"array",items:{type:"string"},minItems:1}},type:"object"};function kq(t){if(jo.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(t)!==-1)return null;switch(t){case"dataTable":return{type:"array",items:{type:"object",additionalProperties:!0}};case"dataCards":return{type:"array",items:{type:"object",additionalProperties:!0}};case"barChart":return Hbe;case"stackedBarChart":return Wbe;case"groupedBarChart":return qbe;case"animatedBarChart":return Ube;case"animatedStackedBarChart":return Ybe;case"animatedGroupedBarChart":return Gbe;case"lineChart":return sj;case"dualAxisLineChart":return cxe;case"differenceLineChart":return fxe;case"multiLineChart":return ixe;case"multiLineAltChart":return oxe;case"stackedAreaChart":return lxe;case"choroplethMap":return exe;case"biVariateChoroplethMap":return txe;case"dotDensityMap":return hxe;case"animatedChoroplethMap":return rxe;case"animatedBiVariateChoroplethMap":return nxe;case"animatedDotDensityMap":return pxe;case"donutChart":return Zbe;case"slopeChart":return mxe;case"scatterPlot":return sxe;case"animatedScatterPlot":return uxe;case"dumbbellChart":return Xbe;case"animatedDumbbellChart":return Jbe;case"treeMap":return Rbe;case"circlePacking":return $be;case"heatMap":return gxe;case"stripChart":return vxe;case"beeSwarmChart":return yxe;case"butterflyChart":return Fbe;case"animatedButterflyChart":return zbe;case"histogram":return Qbe;case"sparkLine":return sj;case"paretoChart":return dxe;case"statCard":return bxe;case"unitChart":return Kbe;case"sankeyChart":return Vbe;case"lineChartWithConfidenceInterval":return axe;case"radarChart":return Bbe;default:return console.error("Unknown chart type:",t),null}}function To(t){switch(t){case"barChart":return wxe;case"stackedBarChart":return Cxe;case"groupedBarChart":return Sxe;case"animatedBarChart":return kxe;case"animatedStackedBarChart":return Oxe;case"animatedGroupedBarChart":return _xe;case"lineChart":return Vxe;case"dualAxisLineChart":return Bxe;case"multiLineChart":return Hxe;case"multiLineAltChart":return qxe;case"differenceLineChart":return zxe;case"stackedAreaChart":return iwe;case"choroplethMap":return Uxe;case"biVariateChoroplethMap":return Gxe;case"dotDensityMap":return Yxe;case"animatedChoroplethMap":return Xxe;case"animatedBiVariateChoroplethMap":return Kxe;case"animatedDotDensityMap":return Jxe;case"donutChart":return Nxe;case"slopeChart":return awe;case"scatterPlot":return rwe;case"animatedScatterPlot":return nwe;case"dumbbellChart":return Ixe;case"animatedDumbbellChart":return Pxe;case"treeMap":return swe;case"circlePacking":return Mxe;case"heatMap":return Rxe;case"stripChart":return lwe;case"beeSwarmChart":return Dxe;case"butterflyChart":return Axe;case"animatedButterflyChart":return Txe;case"histogram":return $xe;case"sparkLine":return Wxe;case"paretoChart":return twe;case"dataTable":return Exe;case"statCard":return owe;case"geoHubCompareMap":return Zxe;case"geoHubMap":return Qxe;case"geoHubMapWithLayerSelection":return ewe;case"unitChart":return uwe;case"sankeyChart":return xxe;case"lineChartWithConfidenceInterval":return Fxe;case"dataCards":return jxe;case"allGraphs":return Bc;case"radarChart":return Lxe;default:return console.error("Unknown chart type:",t),null}}function cwe(t){switch(t){case"barChart":return["label","size","color"];case"animatedBarChart":return["label","size","color","date"];case"treeMap":return["label","size","color"];case"circlePacking":return["label","size","color"];case"butterflyChart":return["label","leftBar","rightBar"];case"groupedBarChart":return["label","size"];case"stackedBarChart":return["label","size"];case"animatedButterflyChart":return["label","leftBar","rightBar","date"];case"animatedGroupedBarChart":return["label","size","date"];case"animatedStackedBarChart":return["label","size","date"];case"dumbbellChart":return["x","label"];case"animatedDumbbellChart":return["x","label","date"];case"donutChart":return["size","label"];case"histogram":return["value"];case"choroplethMap":return["x","id"];case"biVariateChoroplethMap":return["x","y","id"];case"animatedChoroplethMap":return["x","id","date"];case"animatedBiVariateChoroplethMap":return["x","y","id","date"];case"lineChart":return["date","y"];case"multiLineChart":return["date","y"];case"multiLineAltChart":return["date","y","label","color"];case"radarChart":return["values","label","color"];case"stackedAreaChart":return["date","y"];case"scatterPlot":return["x","y","radius","color","label"];case"animatedScatterPlot":return["x","y","radius","color","label","date"];case"dualAxisLineChart":return["date","y1","y2"];case"paretoChart":return["label","bar","line"];case"dotDensityMap":return["lat","long","radius","color","label"];case"animatedDotDensityMap":return["lat","long","radius","color","label","date"];case"slopeChart":return["y1","y2","color","label"];case"heatMap":return["row","column","value"];case"beeSwarmChart":return["label","position","radius","color"];case"stripChart":return["label","position","color"];case"statCard":return["value"];case"sankeyChart":return["source","target","value"];case"differenceLineChart":return["date","y1","y2"];case"unitChart":return["label","value"];case"sparkLine":return["date","y"];case"lineChartWithConfidenceInterval":return["date","y","yMin","yMax"];case"dashboardWideToLong":return["label","size","color","value"];case"dashboard":return["label","radius","size","row","y1","y","rightBar","position","leftBar","x","bar","line","y2","column","date","value","color","long","lat","id","source","target","yMin","yMax"];default:return["label","radius","size","row","y1","y","rightBar","position","leftBar","x","bar","line","y2","column","date","value","color","long","lat","id","source","target","yMin","yMax"]}}function Lo(t){return!t||t.length===0?{}:{enum:t}}const uj=t=>({items:{properties:{column:{type:"string",...Lo(t)},delimiter:{type:"string"}},type:"object",required:["column"]},type:"array"}),Z3=t=>({properties:{columnsToArray:uj(t),data:{},dataURL:{oneOf:[{type:"string"},{type:"array",items:{type:"object",properties:{fileType:{enum:["csv","json","api"],type:"string"},apiHeaders:{},dataTransformation:{type:"string"},idColumnName:{type:"string"},dataURL:{type:"string"},delimiter:{type:"string"},columnsToArray:uj()},required:["dataURL","idColumnName"]}}]},delimiter:{type:"string"},fileType:{enum:["csv","json","api"],type:"string"},apiHeaders:{},dataTransformation:{type:"string"},idColumnTitle:{type:"string"}},type:"object"}),Q3=t=>({type:"array",items:{type:"object",properties:{value:{type:"string",...Lo(t)},label:{type:"string"}},required:["value","label"]}}),q6=t=>({items:{properties:{clearable:{type:"boolean"},allowSelectAll:{type:"boolean"},width:{type:"string"},excludeValues:{items:{type:"string"},type:"array"},column:{type:"string",...Lo(t)},defaultValue:{anyOf:[{items:{oneOf:[{type:"string"},{type:"number"}]},type:"array"},{type:"string"},{type:"number"}]},label:{type:"string"},singleSelect:{type:"boolean"}},required:["column"],type:"object"},type:"array"}),W6=t=>({type:"array",items:{type:"object",properties:{chartConfigId:{type:"string"},label:{type:"string"},width:{type:"string"},allowedColumnIds:{type:"array",items:{type:"object",properties:{value:{type:"string",...Lo(t)},label:{type:"string"},graphSettings:Bc},required:["value","label"]},minItems:1},ui:{type:"string",enum:["select","radio"]}},required:["chartConfigId","allowedColumnIds"]}}),Z0=t=>({type:"array",items:{type:"object",properties:{column:{type:"string",...Lo(t)},includeValues:{type:"array",items:{oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]}},excludeValues:{type:"array",items:{oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]}}},required:["column"]}}),U6=t=>({type:"object",properties:{keyColumn:{type:"string",...Lo(t)},aggregationColumnsSetting:{type:"array",items:{type:"object",properties:{column:{type:"string",...Lo(t)},aggregationMethod:{type:"string",enum:["sum","average","min","max"]}},required:["column"]}}},required:["keyColumn"]}),e4=(t,e)=>({type:"array",items:{type:"object",properties:{columnId:{oneOf:[{type:"string",...Lo(t)},{type:"array",items:{type:"string",...Lo(t)}}]},chartConfigId:{type:"string",...Lo(cwe(e))}},required:["columnId","chartConfigId"]}}),Is=(t,e)=>({type:"array",items:{type:"object",properties:{chartConfigId:{type:"string"},label:{type:"string"},width:{type:"string"},options:{type:"array",items:{type:"object",properties:{dataConfiguration:e4(t,e),label:{type:"string"},graphSettings:Bc},required:["dataConfiguration","label"]},minItems:1},defaultValue:{type:"array",items:{type:"object",properties:{dataConfiguration:e4(t,e),label:{type:"string"},graphSettings:Bc},required:["dataConfiguration","label"]},minItems:1},ui:{type:"string",enum:["select","radio"]}},required:["chartConfigId","options"]}}),_q=(t,e)=>e&&jo.filter(r=>r.geoHubMapPresentation).map(r=>r.graphID).indexOf(e)!==-1?{type:"object",properties:{graphSettings:To(e),graphType:{type:"string",enum:jo.filter(r=>r.geoHubMapPresentation).map(r=>r.graphID)},debugMode:{type:"boolean"},theme:{type:"string",enum:["dark","light"]},uiMode:{type:"string",enum:["light","normal"]},classNames:{type:"object"},highlightDataPointSettings:{type:"object",properties:{column:{type:"string"},label:{type:"string"},defaultValues:{oneOf:[{type:"array",items:{type:"string"}},{type:"array",items:{type:"number"}}]},excludeValues:{type:"array",items:{type:"string"}},allowSelectAll:{type:"boolean"},width:{type:"string"}},required:["column"]},styles:{type:"object"}},required:["graphType"]}:e==="dataTable"||e==="dataCards"?{type:"object",properties:{graphSettings:To(e),dataSettings:Z3(t),filters:q6(t),noOfFiltersPerRow:{type:"number"},graphType:{type:"string",enum:["dataTable","dataCards"]},dataTransform:U6(t),dataFilters:Z0(t),readableHeader:Q3(t),dataSelectionOptions:W6(t),advancedDataSelectionOptions:Is(t,e),debugMode:{type:"boolean"},theme:{type:"string",enum:["dark","light"]},uiMode:{type:"string",enum:["light","normal"]},classNames:{type:"object"},highlightDataPointSettings:{type:"object",properties:{column:{type:"string"},label:{type:"string"},defaultValues:{oneOf:[{type:"array",items:{type:"string"}},{type:"array",items:{type:"number"}}]},excludeValues:{type:"array",items:{type:"string"}},allowSelectAll:{type:"boolean"},width:{type:"string"}},required:["column"]},styles:{type:"object"}},required:["dataSettings","graphType"]}:{type:"object",properties:{graphSettings:To(e||"allGraphs"),dataSettings:Z3(t),filters:q6(t),classNames:{type:"object"},styles:{type:"object"},graphType:{type:"string",enum:jo.map(r=>r.graphID)},noOfFiltersPerRow:{type:"number"},dataTransform:U6(t),dataFilters:Z0(t),graphDataConfiguration:e4(t,e),readableHeader:Q3(t),dataSelectionOptions:W6(t),advancedDataSelectionOptions:Is(t,e),debugMode:{type:"boolean"},theme:{type:"string",enum:["dark","light"]},highlightDataPointSettings:{type:"object",properties:{column:{type:"string"},label:{type:"string"},defaultValues:{oneOf:[{type:"array",items:{type:"string"}},{type:"array",items:{type:"number"}}]},excludeValues:{type:"array",items:{type:"string"}},allowSelectAll:{type:"boolean"},width:{type:"string"}},required:["column"]},uiMode:{type:"string",enum:["light","normal"]}},required:e?["dataSettings","graphType","graphDataConfiguration"]:["graphType"]},Oq=(t,e)=>e==="dataTable"||e==="dataCards"?{type:"object",properties:{graphSettings:To(e),dataSettings:Z3(t),filters:q6(t),classNames:{type:"object"},styles:{type:"object"},noOfFiltersPerRow:{type:"number"},graphType:{type:"string",enum:["dataTable","dataCards"]},uiMode:{type:"string",enum:["light","normal"]},dataTransform:U6(t),dataFilters:Z0(t),noOfColumns:{type:"number"},columnGridBy:{type:"string"},showCommonColorScale:{type:"boolean"},minGraphHeight:{type:"number"},minGraphWidth:{type:"number"},readableHeader:Q3(t),dataSelectionOptions:W6(t),advancedDataSelectionOptions:Is(t,e),debugMode:{type:"boolean"},theme:{type:"string",enum:["dark","light"]}},required:["columnGridBy","dataSettings","graphType"]}:{type:"object",properties:{graphSettings:To(e||"allGraphs"),dataSettings:Z3(t),filters:q6(t),classNames:{type:"object"},styles:{type:"object"},noOfFiltersPerRow:{type:"number"},graphType:{type:"string",enum:jo.filter(r=>r.availableInGriddedGraph!==!1).map(r=>r.graphID)},uiMode:{type:"string",enum:["light","normal"]},dataTransform:U6(t),dataFilters:Z0(t),graphDataConfiguration:e4(t,e),noOfColumns:{type:"number"},columnGridBy:{type:"string"},showCommonColorScale:{type:"boolean"},minGraphHeight:{type:"number"},minGraphWidth:{type:"number"},readableHeader:Q3(t),dataSelectionOptions:W6(t),advancedDataSelectionOptions:Is(t,e),debugMode:{type:"boolean"},theme:{type:"string",enum:["dark","light"]}},required:e?["columnGridBy","dataSettings","graphType","graphDataConfiguration"]:["columnGridBy","dataSettings","graphType"]},Dq=t=>({properties:{dashboardID:{type:"string"},graphClassNames:{type:"object"},graphStyles:{type:"object"},dashboardLayout:{properties:{backgroundColor:{type:["string","boolean"]},description:{type:"string"},language:{enum:["ar","en","he"],type:"string"},padding:{type:"string"},title:{type:"string"},rows:{items:{properties:{columns:{items:{properties:{columnWidth:{type:"number"},dataFilters:Z0(),dataTransform:U6(),graphDataConfiguration:e4(void 0,"dashboard"),graphType:{enum:jo.map(e=>e.graphID),type:"string"},settings:To("allGraphs"),dataSelectionOptions:W6(),advancedDataSelectionOptions:Is(),attachedFilter:{type:"string",...Lo(t)}},type:"object",required:["graphType"]},type:"array"},height:{type:"number"}},type:"object",required:["columns"]},type:"array"}},type:"object",required:["rows"]},dataSettings:Z3(t),filters:q6(t),noOfFiltersPerRow:{type:"number"},uiMode:{type:"string",enum:["light","normal"]},filterPosition:{type:"string",enum:["top","side"]},readableHeader:Q3(t),dataFilters:Z0(t),debugMode:{type:"boolean"},theme:{type:"string",enum:["dark","light"]},graphBackgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]}},type:"object",required:["dashboardLayout","dataSettings"]}),Aq=()=>({properties:{dashboardID:{type:"string"},graphClassNames:{type:"object"},graphStyles:{type:"object"},dashboardLayout:{properties:{backgroundColor:{type:["string","boolean"]},description:{type:"string"},language:{enum:["ar","en","he"],type:"string"},padding:{type:"string"},dropdownLabel:{type:"string"},title:{type:"string"},rows:{items:{properties:{columns:{items:{properties:{columnWidth:{type:"number"},dataFilters:Z0(),graphDataConfiguration:e4(void 0,"dashboardWideToLong"),graphType:{enum:jo.filter(t=>t.availableInWideToLongFormat).map(t=>t.graphID),type:"string"},settings:To("allGraphs")},type:"object",required:["graphType"]},type:"array"},height:{type:"number"}},type:"object",required:["columns"]},type:"array"}},type:"object",required:["rows"]},dataSettings:{properties:{...Z3().properties,keyColumn:{type:"string"}},required:["keyColumn"],type:"object"},uiMode:{type:"string",enum:["light","normal"]},dataFilters:Z0(),readableHeader:Q3(),debugMode:{type:"boolean"},theme:{type:"string",enum:["dark","light"]},graphBackgroundColor:{oneOf:[{type:"string"},{type:"boolean"}]}},type:"object",required:["dashboardLayout","dataSettings"]}),bw=new Pbe({allErrors:!0,allowUnionTypes:!0});function iv(t,e){var i;if(jo.filter(o=>o.geoHubMapPresentation).map(o=>o.graphID).indexOf(e)!==-1)return{isValid:!0,err:void 0};if(!t)return{isValid:!1,err:"No data provided"};if(e==="dataTable"||e==="dataCards"||t.length===0)return{isValid:!0,err:void 0};const r=kq(e);if(!r)return{isValid:!1,err:`Invalid chart type: ${e}`};const n=bw.compile(r);return n(t)?{isValid:!0,err:void 0}:(console.error(n.errors),{isValid:!1,err:(i=n.errors)==null?void 0:i.map(o=>`Error at ${o.instancePath}: ${o.message}`).join("; ")})}function Lu(t,e){var i;const r=To(e);if(!r)return{isValid:!1,err:`Invalid chart type: ${e}`};const n=bw.compile(r);return n(t)?{isValid:!0,err:void 0}:(console.error(n.errors),{isValid:!1,err:(i=n.errors)==null?void 0:i.map(o=>`Error at ${o.instancePath}: ${o.message}`).join("; ")})}function G6(t,e){var i;let r;switch(e){case"griddedGraph":r=Oq(void 0,t.graphType);break;case"multiGraphDashboard":r=Dq();break;case"singleGraphDashboard":r=_q(void 0,t.graphType);break;case"multiGraphDashboardWideToLongFormat":r=Aq();break}if(!r)return{isValid:!1,err:`Invalid chart type: ${e}`};const n=bw.compile(r);return n(t)?{isValid:!0,err:void 0}:(console.error(n.errors),{isValid:!1,err:(i=n.errors)==null?void 0:i.map(o=>`Error at ${o.instancePath}: ${o.message}`).join("; ")})}function Tq(t){const{settings:e,graph:r,graphData:n,debugMode:a,graphDataConfiguration:i,readableHeader:o,updateFilters:l}=t;if(a&&(console.log(`Graph: ${r}`),console.log("Transformed data:",n),console.log("Settings:",e)),typeof n=="string")return v.jsx("div",{className:`flex my-0 mx-auto grow flex-col justify-center ${e!=null&&e.width?"w-fit":"w-full"}`,style:{height:"inherit"},children:v.jsx(or,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:n})});const s={barChart:Hb,groupedBarChart:tV,stackedBarChart:rV,lineChart:Ez,dualAxisLineChart:Tz,multiLineChart:jz,multiLineAltChart:Lz,stackedAreaChart:HH,choroplethMap:rH,biVariateChoroplethMap:tH,dotDensityMap:nH,donutChart:rx,slopeChart:zH,scatterPlot:FH,dumbbellChart:gV,treeMap:mw,circlePacking:Qb,heatMap:JH,stripChart:eq,beeSwarmChart:yV,butterflyChart:rq,histogram:nq,sparkLine:Iz,paretoChart:tq,dataTable:ZH,statCard:qH,geoHubCompareMap:BH,geoHubMap:SH,unitChart:YH,animatedScatterPlot:pq,animatedBarChart:gq,animatedStackedBarChart:vq,animatedGroupedBarChart:yq,animatedChoroplethMap:dq,animatedBiVariateChoroplethMap:fq,animatedDotDensityMap:hq,animatedDumbbellChart:mq,animatedButterflyChart:cq,differenceLineChart:Nz,geoHubMapWithLayerSelection:VH,sankeyChart:oq,lineChartWithConfidenceInterval:Mz,dataCards:QH,radarChart:lq},f=d=>{switch(d){case"barChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,height:e==null?void 0:e.height,width:e==null?void 0:e.width,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showValues:e==null?void 0:e.showValues,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,truncateBy:e==null?void 0:e.truncateBy,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,showLabels:e==null?void 0:e.showLabels,showColorScale:e==null?void 0:e.showColorScale,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,labelOrder:e==null?void 0:e.labelOrder,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,sortData:e==null?void 0:e.sortData,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,maxBarThickness:e==null?void 0:e.maxBarThickness,minBarThickness:e==null?void 0:e.minBarThickness,maxNumberOfBars:e==null?void 0:e.maxNumberOfBars,ariaLabel:e==null?void 0:e.ariaLabel,onSeriesMouseClick:m=>{l==null||l(m.label)},resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,detailsOnClick:e==null?void 0:e.detailsOnClick,barAxisTitle:e==null?void 0:e.barAxisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames,filterNA:e==null?void 0:e.filterNA};case"groupedBarChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showTicks:e==null?void 0:e.showTicks,truncateBy:e==null?void 0:e.truncateBy,colorDomain:(e==null?void 0:e.colorDomain)||Lr("size",i||[],o||[]),colorLegendTitle:e==null?void 0:e.colorLegendTitle,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,showValues:e==null?void 0:e.showValues,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,showLabels:e==null?void 0:e.showLabels,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,labelOrder:e==null?void 0:e.labelOrder,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,maxBarThickness:e==null?void 0:e.maxBarThickness,ariaLabel:e==null?void 0:e.ariaLabel,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,detailsOnClick:e==null?void 0:e.detailsOnClick,barAxisTitle:e==null?void 0:e.barAxisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"stackedBarChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,truncateBy:e==null?void 0:e.truncateBy,colorDomain:(e==null?void 0:e.colorDomain)||Lr("size",i||[],o||[]),colorLegendTitle:e==null?void 0:e.colorLegendTitle,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,labelOrder:e==null?void 0:e.labelOrder,showValues:e==null?void 0:e.showValues,showLabels:e==null?void 0:e.showLabels,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,maxBarThickness:e==null?void 0:e.maxBarThickness,minBarThickness:e==null?void 0:e.minBarThickness,maxNumberOfBars:e==null?void 0:e.maxNumberOfBars,sortParameter:e==null?void 0:e.sortParameter,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,barAxisTitle:e==null?void 0:e.barAxisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedBarChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,height:e==null?void 0:e.height,width:e==null?void 0:e.width,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showValues:e==null?void 0:e.showValues,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,truncateBy:e==null?void 0:e.truncateBy,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,showLabels:e==null?void 0:e.showLabels,showColorScale:e==null?void 0:e.showColorScale,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,sortData:e==null?void 0:e.sortData,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,autoPlay:e==null?void 0:e.autoPlay,autoSort:e==null?void 0:e.autoSort,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,maxBarThickness:e==null?void 0:e.maxBarThickness,minBarThickness:e==null?void 0:e.minBarThickness,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,barAxisTitle:e==null?void 0:e.barAxisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedGroupedBarChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showTicks:e==null?void 0:e.showTicks,truncateBy:e==null?void 0:e.truncateBy,colorDomain:(e==null?void 0:e.colorDomain)||Lr("size",i||[],o||[]),colorLegendTitle:e==null?void 0:e.colorLegendTitle,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,showValues:e==null?void 0:e.showValues,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,showLabels:e==null?void 0:e.showLabels,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,maxBarThickness:e==null?void 0:e.maxBarThickness,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,barAxisTitle:e==null?void 0:e.barAxisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedStackedBarChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,truncateBy:e==null?void 0:e.truncateBy,colorDomain:(e==null?void 0:e.colorDomain)||Lr("size",i||[],o||[]),colorLegendTitle:e==null?void 0:e.colorLegendTitle,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,showValues:e==null?void 0:e.showValues,showLabels:e==null?void 0:e.showLabels,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,maxBarThickness:e==null?void 0:e.maxBarThickness,minBarThickness:e==null?void 0:e.minBarThickness,sortParameter:e==null?void 0:e.sortParameter,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,barAxisTitle:e==null?void 0:e.barAxisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"lineChart":return{theme:e==null?void 0:e.theme,curveType:e==null?void 0:e.curveType,data:n,graphID:e==null?void 0:e.graphID,lineColor:e==null?void 0:e.lineColor,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,noOfXTicks:e==null?void 0:e.noOfXTicks,dateFormat:e==null?void 0:e.dateFormat,showValues:e==null?void 0:e.showValues,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,animateLine:e==null?void 0:e.animateLine,strokeWidth:e==null?void 0:e.strokeWidth,showDots:e==null?void 0:e.showDots,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,regressionLine:e==null?void 0:e.regressionLine,ariaLabel:e==null?void 0:e.ariaLabel,yAxisTitle:e==null?void 0:e.yAxisTitle,noOfYTicks:e==null?void 0:e.noOfYTicks,minDate:e==null?void 0:e.minDate,maxDate:e==null?void 0:e.maxDate,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"lineChartWithConfidenceInterval":return{theme:e==null?void 0:e.theme,data:n,curveType:e==null?void 0:e.curveType,graphID:e==null?void 0:e.graphID,lineColor:e==null?void 0:e.lineColor,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,noOfXTicks:e==null?void 0:e.noOfXTicks,dateFormat:e==null?void 0:e.dateFormat,showValues:e==null?void 0:e.showValues,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,animateLine:e==null?void 0:e.animateLine,strokeWidth:e==null?void 0:e.strokeWidth,showDots:e==null?void 0:e.showDots,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,regressionLine:e==null?void 0:e.regressionLine,ariaLabel:e==null?void 0:e.ariaLabel,showIntervalDots:e==null?void 0:e.showIntervalDots,showIntervalValues:e==null?void 0:e.showIntervalValues,intervalLineStrokeWidth:e==null?void 0:e.intervalLineStrokeWidth,intervalLineColors:e==null?void 0:e.intervalLineColors,intervalAreaColor:e==null?void 0:e.intervalAreaColor,intervalAreaOpacity:e==null?void 0:e.intervalAreaOpacity,yAxisTitle:e==null?void 0:e.yAxisTitle,noOfYTicks:e==null?void 0:e.noOfYTicks,minDate:e==null?void 0:e.minDate,maxDate:e==null?void 0:e.maxDate,colorLegendTitle:e==null?void 0:e.colorLegendTitle,colorLegendColors:e==null?void 0:e.colorLegendColors,colorLegendDomain:e==null?void 0:e.colorLegendDomain,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"dualAxisLineChart":return{theme:e==null?void 0:e.theme,data:n,curveType:e==null?void 0:e.curveType,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,labels:(e==null?void 0:e.labels)||[Lr("y1",i||[],o||[]),Lr("y2",i||[],o||[])],footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,noOfXTicks:e==null?void 0:e.noOfXTicks,dateFormat:e==null?void 0:e.dateFormat,showValues:e==null?void 0:e.showValues,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,lineColors:e==null?void 0:e.lineColors,sameAxes:e==null?void 0:e.sameAxes,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,animateLine:e==null?void 0:e.animateLine,strokeWidth:e==null?void 0:e.strokeWidth,showDots:e==null?void 0:e.showDots,colorLegendTitle:e==null?void 0:e.colorLegendTitle,ariaLabel:e==null?void 0:e.ariaLabel,noOfYTicks:e==null?void 0:e.noOfYTicks,minDate:e==null?void 0:e.minDate,maxDate:e==null?void 0:e.maxDate,lineSuffixes:e==null?void 0:e.lineSuffixes,linePrefixes:e==null?void 0:e.linePrefixes,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"multiLineChart":return{theme:e==null?void 0:e.theme,data:n,curveType:e==null?void 0:e.curveType,lineColors:e==null?void 0:e.lineColors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,noOfXTicks:e==null?void 0:e.noOfXTicks,dateFormat:e==null?void 0:e.dateFormat,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,labels:(e==null?void 0:e.labels)||Lr("y",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,showValues:e==null?void 0:e.showValues,relativeHeight:e==null?void 0:e.relativeHeight,showColorLegendAtTop:e==null?void 0:e.showColorLegendAtTop,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,highlightedLines:e==null?void 0:e.highlightedLines,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,animateLine:e==null?void 0:e.animateLine,strokeWidth:e==null?void 0:e.strokeWidth,showDots:e==null?void 0:e.showDots,colorLegendTitle:e==null?void 0:e.colorLegendTitle,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,ariaLabel:e==null?void 0:e.ariaLabel,yAxisTitle:e==null?void 0:e.yAxisTitle,noOfYTicks:e==null?void 0:e.noOfYTicks,minDate:e==null?void 0:e.minDate,maxDate:e==null?void 0:e.maxDate,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"multiLineAltChart":return{theme:e==null?void 0:e.theme,data:n,curveType:e==null?void 0:e.curveType,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,noOfXTicks:e==null?void 0:e.noOfXTicks,dateFormat:e==null?void 0:e.dateFormat,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,highlightedLines:e==null?void 0:e.highlightedLines,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,animateLine:e==null?void 0:e.animateLine,strokeWidth:e==null?void 0:e.strokeWidth,showDots:e==null?void 0:e.showDots,colorLegendTitle:e==null?void 0:e.colorLegendTitle,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,ariaLabel:e==null?void 0:e.ariaLabel,yAxisTitle:e==null?void 0:e.yAxisTitle,noOfYTicks:e==null?void 0:e.noOfYTicks,minDate:e==null?void 0:e.minDate,maxDate:e==null?void 0:e.maxDate,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames,colorDomain:e==null?void 0:e.colorDomain,showNAColor:e==null?void 0:e.showNAColor};case"differenceLineChart":return{theme:e==null?void 0:e.theme,data:n,curveType:e==null?void 0:e.curveType,lineColors:e==null?void 0:e.colors,diffAreaColors:e==null?void 0:e.diffAreaColors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,noOfXTicks:e==null?void 0:e.noOfXTicks,dateFormat:e==null?void 0:e.dateFormat,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,labels:(e==null?void 0:e.labels)||[Lr("y1",i||[],o||[]),Lr("y2",i||[],o||[])],backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,showValues:e==null?void 0:e.showValues,relativeHeight:e==null?void 0:e.relativeHeight,showColorLegendAtTop:e==null?void 0:e.showColorLegendAtTop,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,animateLine:e==null?void 0:e.animateLine,strokeWidth:e==null?void 0:e.strokeWidth,showDots:e==null?void 0:e.showDots,colorLegendTitle:e==null?void 0:e.colorLegendTitle,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,ariaLabel:e==null?void 0:e.ariaLabel,yAxisTitle:e==null?void 0:e.yAxisTitle,noOfYTicks:e==null?void 0:e.noOfYTicks,minDate:e==null?void 0:e.minDate,maxDate:e==null?void 0:e.maxDate,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"stackedAreaChart":return{theme:e==null?void 0:e.theme,data:n,curveType:e==null?void 0:e.curveType,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,noOfXTicks:e==null?void 0:e.noOfXTicks,dateFormat:e==null?void 0:e.dateFormat,colorDomain:(e==null?void 0:e.colorDomain)||Lr("y",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,colorLegendTitle:e==null?void 0:e.colorLegendTitle,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,relativeHeight:e==null?void 0:e.relativeHeight,bottomMargin:e==null?void 0:e.bottomMargin,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,showColorScale:e==null?void 0:e.showColorScale,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,ariaLabel:e==null?void 0:e.ariaLabel,yAxisTitle:e==null?void 0:e.yAxisTitle,noOfYTicks:e==null?void 0:e.noOfYTicks,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"choroplethMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,graphTitle:e==null?void 0:e.graphTitle,mapData:e==null?void 0:e.mapData,mapProjection:e==null?void 0:e.mapProjection,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,colorDomain:e==null?void 0:e.colorDomain,colors:e==null?void 0:e.colors,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("x",i||[],o||[]),scaleType:e==null?void 0:e.scaleType,data:n,scale:e==null?void 0:e.scale,centerPoint:e==null?void 0:e.centerPoint,backgroundColor:e==null?void 0:e.backgroundColor,mapBorderWidth:e==null?void 0:e.mapBorderWidth,mapNoDataColor:e==null?void 0:e.mapNoDataColor,mapBorderColor:e==null?void 0:e.mapBorderColor,relativeHeight:e==null?void 0:e.relativeHeight,padding:e==null?void 0:e.padding,isWorldMap:e==null?void 0:e.isWorldMap,tooltip:e==null?void 0:e.tooltip,showColorScale:e==null?void 0:e.showColorScale,zoomScaleExtend:e==null?void 0:e.zoomScaleExtend,zoomTranslateExtend:e==null?void 0:e.zoomTranslateExtend,graphID:e==null?void 0:e.graphID,highlightedIds:e==null?void 0:e.highlightedIds,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,mapProperty:e==null?void 0:e.mapProperty,showAntarctica:e==null?void 0:e.showAntarctica,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,onSeriesMouseClick:m=>{l==null||l(m.id)},detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"biVariateChoroplethMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,mapData:e==null?void 0:e.mapData,mapProjection:e==null?void 0:e.mapProjection,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,xColorLegendTitle:Object.keys(e||{}).indexOf("xColorLegendTitle")!==-1?e==null?void 0:e.xColorLegendTitle:Lr("x",i||[],o||[]),yColorLegendTitle:Object.keys(e||{}).indexOf("yColorLegendTitle")!==-1?e==null?void 0:e.yColorLegendTitle:Lr("y",i||[],o||[]),xDomain:e==null?void 0:e.xDomain,yDomain:e==null?void 0:e.yDomain,colors:e==null?void 0:e.colors,scale:e==null?void 0:e.scale,centerPoint:e==null?void 0:e.centerPoint,backgroundColor:e==null?void 0:e.backgroundColor,mapBorderWidth:e==null?void 0:e.mapBorderWidth,mapNoDataColor:e==null?void 0:e.mapNoDataColor,padding:e==null?void 0:e.padding,mapBorderColor:e==null?void 0:e.mapBorderColor,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,isWorldMap:e==null?void 0:e.isWorldMap,zoomScaleExtend:e==null?void 0:e.zoomScaleExtend,zoomTranslateExtend:e==null?void 0:e.zoomTranslateExtend,graphID:e==null?void 0:e.graphID,highlightedIds:e==null?void 0:e.highlightedIds,mapProperty:e==null?void 0:e.mapProperty,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,showAntarctica:e==null?void 0:e.showAntarctica,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,onSeriesMouseClick:m=>{l==null||l(m.id)},detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"dotDensityMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,graphTitle:e==null?void 0:e.graphTitle,mapData:e==null?void 0:e.mapData,mapProjection:e==null?void 0:e.mapProjection,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,radius:e==null?void 0:e.radius,sources:e==null?void 0:e.sources,colors:e==null?void 0:e.colors,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),data:n,scale:e==null?void 0:e.scale,centerPoint:e==null?void 0:e.centerPoint,backgroundColor:e==null?void 0:e.backgroundColor,mapBorderWidth:e==null?void 0:e.mapBorderWidth,mapNoDataColor:e==null?void 0:e.mapNoDataColor,mapBorderColor:e==null?void 0:e.mapBorderColor,padding:e==null?void 0:e.padding,showLabels:e==null?void 0:e.showLabels,relativeHeight:e==null?void 0:e.relativeHeight,isWorldMap:e==null?void 0:e.isWorldMap,tooltip:e==null?void 0:e.tooltip,showColorScale:e==null?void 0:e.showColorScale,zoomScaleExtend:e==null?void 0:e.zoomScaleExtend,zoomTranslateExtend:e==null?void 0:e.zoomTranslateExtend,graphID:e==null?void 0:e.graphID,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,showAntarctica:e==null?void 0:e.showAntarctica,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"donutChart":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,mainText:e==null?void 0:e.mainText,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,graphDescription:e==null?void 0:e.graphDescription,subNote:e==null?void 0:e.subNote,footNote:e==null?void 0:e.footNote,radius:e==null?void 0:e.radius,strokeWidth:e==null?void 0:e.strokeWidth,showColorScale:e==null?void 0:e.showColorScale,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,colorDomain:e==null?void 0:e.colorDomain,sortData:e==null?void 0:e.sortData,language:e==null?void 0:e.language,width:e==null?void 0:e.width,height:e==null?void 0:e.height,minHeight:e==null?void 0:e.minHeight,relativeHeight:e==null?void 0:e.relativeHeight,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,ariaLabel:e==null?void 0:e.ariaLabel,legendMaxWidth:e==null?void 0:e.legendMaxWidth,onSeriesMouseClick:m=>{l==null||l(m.label)},detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames,colorScaleMaxWidth:e==null?void 0:e.colorScaleMaxWidth};case"slopeChart":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,showLabels:e==null?void 0:e.showLabels,colors:e==null?void 0:e.colors,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),radius:e==null?void 0:e.radius,axisTitles:e==null?void 0:e.axisTitles,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,showColorScale:e==null?void 0:e.showColorScale,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,fillContainer:e==null?void 0:e.fillContainer,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"scatterPlot":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,showLabels:e==null?void 0:e.showLabels,colors:e==null?void 0:e.colors,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),radius:e==null?void 0:e.radius,xAxisTitle:Object.keys(e||{}).indexOf("xAxisTitle")!==-1?e==null?void 0:e.xAxisTitle:Lr("x",i||[],o||[]),yAxisTitle:Object.keys(e||{}).indexOf("yAxisTitle")!==-1?e==null?void 0:e.yAxisTitle:Lr("y",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refXValues:e==null?void 0:e.refXValues,refYValues:e==null?void 0:e.refYValues,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,showColorScale:e==null?void 0:e.showColorScale,graphID:e==null?void 0:e.graphID,maxRadiusValue:e==null?void 0:e.maxRadiusValue,maxXValue:e==null?void 0:e.maxXValue,minXValue:e==null?void 0:e.minXValue,maxYValue:e==null?void 0:e.maxYValue,minYValue:e==null?void 0:e.minYValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,regressionLine:e==null?void 0:e.regressionLine,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,noOfXTicks:e==null?void 0:e.noOfXTicks,noOfYTicks:e==null?void 0:e.noOfYTicks,labelColor:e==null?void 0:e.labelColor,xSuffix:e==null?void 0:e.xSuffix,ySuffix:e==null?void 0:e.ySuffix,xPrefix:e==null?void 0:e.xPrefix,yPrefix:e==null?void 0:e.yPrefix,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"dumbbellChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,refValues:e==null?void 0:e.refValues,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,truncateBy:e==null?void 0:e.truncateBy,labelOrder:e==null?void 0:e.labelOrder,colorDomain:(e==null?void 0:e.colorDomain)||Lr("x",i||[],o||[]),colorLegendTitle:e==null?void 0:e.colorLegendTitle,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,radius:e==null?void 0:e.radius,relativeHeight:e==null?void 0:e.relativeHeight,showValues:e==null?void 0:e.showValues,showLabels:e==null?void 0:e.showLabels,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,maxPositionValue:e==null?void 0:e.maxPositionValue,minPositionValue:e==null?void 0:e.minPositionValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,sortParameter:e==null?void 0:e.sortParameter,arrowConnector:e==null?void 0:e.arrowConnector,connectorStrokeWidth:e==null?void 0:e.connectorStrokeWidth,maxBarThickness:e==null?void 0:e.maxBarThickness,minBarThickness:e==null?void 0:e.minBarThickness,maxNumberOfBars:e==null?void 0:e.maxNumberOfBars,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,axisTitle:e==null?void 0:e.axisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"treeMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,showLabels:e==null?void 0:e.showLabels,tooltip:e==null?void 0:e.tooltip,showColorScale:e==null?void 0:e.showColorScale,showValues:e==null?void 0:e.showValues,graphID:e==null?void 0:e.graphID,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,ariaLabel:e==null?void 0:e.ariaLabel,onSeriesMouseClick:m=>{l==null||l(m.label)},detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"circlePacking":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:e==null?void 0:e.sources,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,showLabels:e==null?void 0:e.showLabels,tooltip:e==null?void 0:e.tooltip,showColorScale:e==null?void 0:e.showColorScale,showValues:e==null?void 0:e.showValues,graphID:e==null?void 0:e.graphID,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,ariaLabel:e==null?void 0:e.ariaLabel,radius:e==null?void 0:e.radius,maxRadiusValue:e==null?void 0:e.maxRadiusValue,onSeriesMouseClick:m=>{l==null||l(m.label)},detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"heatMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,scaleType:e==null?void 0:e.scaleType,colorDomain:e==null?void 0:e.colorDomain,showColumnLabels:e==null?void 0:e.showColumnLabels,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,truncateBy:e==null?void 0:e.truncateBy,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,showValues:e==null?void 0:e.showValues,showRowLabels:e==null?void 0:e.showRowLabels,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,noDataColor:e==null?void 0:e.noDataColor,showColorScale:e==null?void 0:e.showColorScale,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,fillContainer:e==null?void 0:e.fillContainer,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"stripChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,colors:e==null?void 0:e.colors,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),radius:e==null?void 0:e.radius,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,showColorScale:e==null?void 0:e.showColorScale,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,showAxis:e==null?void 0:e.showAxis,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,prefix:e==null?void 0:e.prefix,suffix:e==null?void 0:e.suffix,stripType:e==null?void 0:e.stripType,valueColor:e==null?void 0:e.valueColor,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,highlightColor:e==null?void 0:e.highlightColor,dotOpacity:e==null?void 0:e.dotOpacity,showNAColor:e==null?void 0:e.showNAColor,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"beeSwarmChart":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,showLabels:e==null?void 0:e.showLabels,showColorScale:e==null?void 0:e.showColorScale,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,radius:e==null?void 0:e.radius,maxRadiusValue:e==null?void 0:e.maxRadiusValue,maxPositionValue:e==null?void 0:e.maxPositionValue,minPositionValue:e==null?void 0:e.minPositionValue,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,orientation:e==null?void 0:e.orientation,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"butterflyChart":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,leftBarTitle:Object.keys(e||{}).indexOf("leftBarTitle")!==-1?e==null?void 0:e.leftBarTitle:Lr("leftBar",i||[],o||[]),rightBarTitle:Object.keys(e||{}).indexOf("rightBarTitle")!==-1?e==null?void 0:e.rightBarTitle:Lr("rightBar",i||[],o||[]),footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,barColors:e==null?void 0:e.barColors,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,barPadding:e==null?void 0:e.barPadding,truncateBy:e==null?void 0:e.truncateBy,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,showTicks:e==null?void 0:e.showTicks,showValues:e==null?void 0:e.showValues,centerGap:e==null?void 0:e.centerGap,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,showColorScale:e==null?void 0:e.showColorScale,refValues:e==null?void 0:e.refValues,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"histogram":return{theme:e==null?void 0:e.theme,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showValues:e==null?void 0:e.showValues,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,showLabels:e==null?void 0:e.showLabels,maxValue:e==null?void 0:e.maxValue,tooltip:e==null?void 0:e.tooltip,refValues:e==null?void 0:e.refValues,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,numberOfBins:e==null?void 0:e.numberOfBins,truncateBy:e==null?void 0:e.truncateBy,donutStrokeWidth:e==null?void 0:e.donutStrokeWidth,sortData:e==null?void 0:e.sortData,barGraphLayout:e==null?void 0:e.barGraphLayout,graphType:e==null?void 0:e.graphType,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,maxBarThickness:e==null?void 0:e.maxBarThickness,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"sparkLine":return{theme:e==null?void 0:e.theme,data:n,curveType:e==null?void 0:e.curveType,lineColor:e==null?void 0:e.lineColor,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,dateFormat:e==null?void 0:e.dateFormat,area:e==null?void 0:e.area,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"paretoChart":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,showValues:e==null?void 0:e.showValues,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,barTitle:Object.keys(e||{}).indexOf("barTitle")!==-1?e==null?void 0:e.barTitle:Lr("barTitle",i||[],o||[]),lineTitle:Object.keys(e||{}).indexOf("lineTitle")!==-1?e==null?void 0:e.lineTitle:Lr("lineTitle",i||[],o||[]),footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,barColor:e==null?void 0:e.barColor,curveType:e==null?void 0:e.curveType,lineColor:e==null?void 0:e.lineColor,sameAxes:e==null?void 0:e.sameAxes,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,barPadding:e==null?void 0:e.barPadding,truncateBy:e==null?void 0:e.truncateBy,showLabels:e==null?void 0:e.showLabels,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,noOfTicks:e==null?void 0:e.noOfTicks,lineSuffix:e==null?void 0:e.lineSuffix,barSuffix:e==null?void 0:e.barSuffix,linePrefix:e==null?void 0:e.lineSuffix,barPrefix:e==null?void 0:e.barPrefix,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"dataTable":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,graphTitle:e==null?void 0:e.graphTitle,sources:e==null?void 0:e.sources,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,graphID:e==null?void 0:e.graphID,width:e==null?void 0:e.width,height:e==null?void 0:e.height,columnData:(e==null?void 0:e.columnData)||[],data:n,language:e==null?void 0:e.language,ariaLabel:e==null?void 0:e.ariaLabel,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"statCard":return{theme:e==null?void 0:e.theme,year:e==null?void 0:e.year,data:n,graphTitle:(e==null?void 0:e.graphTitle)||"",graphDescription:e==null?void 0:e.graphDescription,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,sources:(e==null?void 0:e.sources)||[],footNote:e==null?void 0:e.footNote,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,graphID:e==null?void 0:e.graphID,aggregationMethod:e==null?void 0:e.aggregationMethod,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,countOnly:e==null?void 0:e.countOnly,ariaLabel:e==null?void 0:e.ariaLabel,textBackground:e==null?void 0:e.textBackground,headingFontSize:e==null?void 0:e.headingFontSize,centerAlign:e==null?void 0:e.centerAlign,verticalAlign:e==null?void 0:e.verticalAlign,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"geoHubCompareMap":return{theme:e==null?void 0:e.theme,graphTitle:e==null?void 0:e.graphTitle,sources:e==null?void 0:e.sources,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,width:e==null?void 0:e.width,height:e==null?void 0:e.height,relativeHeight:e==null?void 0:e.relativeHeight,graphID:e==null?void 0:e.graphID,mapStyles:e==null?void 0:e.mapStyles,center:e==null?void 0:e.center,zoomLevel:e==null?void 0:e.zoomLevel,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"geoHubMap":return{theme:e==null?void 0:e.theme,mapStyle:e==null?void 0:e.mapStyle,center:e==null?void 0:e.center,zoomLevel:e==null?void 0:e.zoomLevel,graphTitle:e==null?void 0:e.graphTitle,sources:e==null?void 0:e.sources,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,width:e==null?void 0:e.width,height:e==null?void 0:e.height,relativeHeight:e==null?void 0:e.relativeHeight,graphID:e==null?void 0:e.graphID,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,includeLayers:e==null?void 0:e.includeLayers,excludeLayers:e==null?void 0:e.excludeLayers,ariaLabel:e==null?void 0:e.ariaLabel,uiMode:e==null?void 0:e.uiMode,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"geoHubMapWithLayerSelection":return{theme:e==null?void 0:e.theme,mapStyle:e==null?void 0:e.mapStyle,center:e==null?void 0:e.center,zoomLevel:e==null?void 0:e.zoomLevel,graphTitle:e==null?void 0:e.graphTitle,sources:e==null?void 0:e.sources,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,width:e==null?void 0:e.width,height:e==null?void 0:e.height,relativeHeight:e==null?void 0:e.relativeHeight,graphID:e==null?void 0:e.graphID,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,layerSelection:e==null?void 0:e.layerSelection,excludeLayers:e==null?void 0:e.excludeLayers,ariaLabel:e==null?void 0:e.ariaLabel,uiMode:e==null?void 0:e.uiMode};case"unitChart":return{theme:e==null?void 0:e.theme,totalNoOfDots:e==null?void 0:e.totalNoOfDots,gridSize:e==null?void 0:e.gridSize,unitPadding:e==null?void 0:e.unitPadding,size:e==null?void 0:e.size,graphTitle:e==null?void 0:e.graphTitle,sources:e==null?void 0:e.sources,colors:e==null?void 0:e.colors,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,showColorScale:e==null?void 0:e.showColorScale,showStrokeForWhiteDots:e==null?void 0:e.showStrokeForWhiteDots,note:e==null?void 0:e.note,data:n,width:e==null?void 0:e.width,height:e==null?void 0:e.height,minHeight:e==null?void 0:e.minHeight,relativeHeight:e==null?void 0:e.relativeHeight,ariaLabel:e==null?void 0:e.ariaLabel,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedBiVariateChoroplethMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,mapData:e==null?void 0:e.mapData,mapProjection:e==null?void 0:e.mapProjection,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,xColorLegendTitle:Object.keys(e||{}).indexOf("xColorLegendTitle")!==-1?e==null?void 0:e.xColorLegendTitle:Lr("x",i||[],o||[]),yColorLegendTitle:Object.keys(e||{}).indexOf("yColorLegendTitle")!==-1?e==null?void 0:e.yColorLegendTitle:Lr("y",i||[],o||[]),xDomain:e==null?void 0:e.xDomain,yDomain:e==null?void 0:e.yDomain,colors:e==null?void 0:e.colors,scale:e==null?void 0:e.scale,centerPoint:e==null?void 0:e.centerPoint,backgroundColor:e==null?void 0:e.backgroundColor,mapBorderWidth:e==null?void 0:e.mapBorderWidth,mapNoDataColor:e==null?void 0:e.mapNoDataColor,padding:e==null?void 0:e.padding,mapBorderColor:e==null?void 0:e.mapBorderColor,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,isWorldMap:e==null?void 0:e.isWorldMap,zoomScaleExtend:e==null?void 0:e.zoomScaleExtend,zoomTranslateExtend:e==null?void 0:e.zoomTranslateExtend,graphID:e==null?void 0:e.graphID,highlightedIds:e==null?void 0:e.highlightedIds,mapProperty:e==null?void 0:e.mapProperty,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,showAntarctica:e==null?void 0:e.showAntarctica,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedChoroplethMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,graphTitle:e==null?void 0:e.graphTitle,mapData:e==null?void 0:e.mapData,mapProjection:e==null?void 0:e.mapProjection,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,colorDomain:e==null?void 0:e.colorDomain,colors:e==null?void 0:e.colors,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("x",i||[],o||[]),scaleType:e==null?void 0:e.scaleType,data:n,scale:e==null?void 0:e.scale,centerPoint:e==null?void 0:e.centerPoint,backgroundColor:e==null?void 0:e.backgroundColor,mapBorderWidth:e==null?void 0:e.mapBorderWidth,mapNoDataColor:e==null?void 0:e.mapNoDataColor,mapBorderColor:e==null?void 0:e.mapBorderColor,relativeHeight:e==null?void 0:e.relativeHeight,padding:e==null?void 0:e.padding,isWorldMap:e==null?void 0:e.isWorldMap,tooltip:e==null?void 0:e.tooltip,showColorScale:e==null?void 0:e.showColorScale,zoomScaleExtend:e==null?void 0:e.zoomScaleExtend,zoomTranslateExtend:e==null?void 0:e.zoomTranslateExtend,graphID:e==null?void 0:e.graphID,highlightedIds:e==null?void 0:e.highlightedIds,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,mapProperty:e==null?void 0:e.mapProperty,showAntarctica:e==null?void 0:e.showAntarctica,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedDotDensityMap":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,graphTitle:e==null?void 0:e.graphTitle,mapData:e==null?void 0:e.mapData,mapProjection:e==null?void 0:e.mapProjection,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,radius:e==null?void 0:e.radius,sources:e==null?void 0:e.sources,colors:e==null?void 0:e.colors,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),data:n,scale:e==null?void 0:e.scale,centerPoint:e==null?void 0:e.centerPoint,backgroundColor:e==null?void 0:e.backgroundColor,mapBorderWidth:e==null?void 0:e.mapBorderWidth,mapNoDataColor:e==null?void 0:e.mapNoDataColor,mapBorderColor:e==null?void 0:e.mapBorderColor,padding:e==null?void 0:e.padding,showLabels:e==null?void 0:e.showLabels,relativeHeight:e==null?void 0:e.relativeHeight,isWorldMap:e==null?void 0:e.isWorldMap,tooltip:e==null?void 0:e.tooltip,showColorScale:e==null?void 0:e.showColorScale,zoomScaleExtend:e==null?void 0:e.zoomScaleExtend,zoomTranslateExtend:e==null?void 0:e.zoomTranslateExtend,graphID:e==null?void 0:e.graphID,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,showAntarctica:e==null?void 0:e.showAntarctica,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedButterflyChart":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,leftBarTitle:Object.keys(e||{}).indexOf("leftBarTitle")!==-1?e==null?void 0:e.leftBarTitle:Lr("leftBar",i||[],o||[]),rightBarTitle:Object.keys(e||{}).indexOf("rightBarTitle")!==-1?e==null?void 0:e.rightBarTitle:Lr("rightBar",i||[],o||[]),footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,barColors:e==null?void 0:e.barColors,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,barPadding:e==null?void 0:e.barPadding,truncateBy:e==null?void 0:e.truncateBy,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,showTicks:e==null?void 0:e.showTicks,showValues:e==null?void 0:e.showValues,centerGap:e==null?void 0:e.centerGap,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,showColorScale:e==null?void 0:e.showColorScale,refValues:e==null?void 0:e.refValues,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedDumbbellChart":return{theme:e==null?void 0:e.theme,orientation:e==null?void 0:e.orientation,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,colors:e==null?void 0:e.colors,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,refValues:e==null?void 0:e.refValues,sources:e==null?void 0:e.sources,barPadding:e==null?void 0:e.barPadding,showTicks:e==null?void 0:e.showTicks,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,truncateBy:e==null?void 0:e.truncateBy,colorDomain:(e==null?void 0:e.colorDomain)||Lr("x",i||[],o||[]),colorLegendTitle:e==null?void 0:e.colorLegendTitle,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,radius:e==null?void 0:e.radius,relativeHeight:e==null?void 0:e.relativeHeight,showValues:e==null?void 0:e.showValues,showLabels:e==null?void 0:e.showLabels,tooltip:e==null?void 0:e.tooltip,graphID:e==null?void 0:e.graphID,maxPositionValue:e==null?void 0:e.maxPositionValue,minPositionValue:e==null?void 0:e.minPositionValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,sortParameter:e==null?void 0:e.sortParameter,arrowConnector:e==null?void 0:e.arrowConnector,connectorStrokeWidth:e==null?void 0:e.connectorStrokeWidth,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,maxBarThickness:e==null?void 0:e.maxBarThickness,minBarThickness:e==null?void 0:e.minBarThickness,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,axisTitle:e==null?void 0:e.axisTitle,noOfTicks:e==null?void 0:e.noOfTicks,valueColor:e==null?void 0:e.valueColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"animatedScatterPlot":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,showLabels:e==null?void 0:e.showLabels,colors:e==null?void 0:e.colors,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e==null?void 0:e.colorLegendTitle:Lr("color",i||[],o||[]),radius:e==null?void 0:e.radius,xAxisTitle:e==null?void 0:e.xAxisTitle,yAxisTitle:e==null?void 0:e.yAxisTitle,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,relativeHeight:e==null?void 0:e.relativeHeight,tooltip:e==null?void 0:e.tooltip,refXValues:e==null?void 0:e.refXValues,refYValues:e==null?void 0:e.refYValues,highlightedDataPoints:e==null?void 0:e.highlightedDataPoints,highlightAreaSettings:e==null?void 0:e.highlightAreaSettings,showColorScale:e==null?void 0:e.showColorScale,graphID:e==null?void 0:e.graphID,maxRadiusValue:e==null?void 0:e.maxRadiusValue,maxXValue:e==null?void 0:e.maxXValue,minXValue:e==null?void 0:e.minXValue,maxYValue:e==null?void 0:e.maxYValue,minYValue:e==null?void 0:e.minYValue,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,showNAColor:e==null?void 0:e.showNAColor,autoPlay:e==null?void 0:e.autoPlay,showOnlyActiveDate:e==null?void 0:e.showOnlyActiveDate,dateFormat:e==null?void 0:e.dateFormat,customHighlightAreaSettings:e==null?void 0:e.customHighlightAreaSettings,annotations:e==null?void 0:e.annotations,ariaLabel:e==null?void 0:e.ariaLabel,detailsOnClick:e==null?void 0:e.detailsOnClick,noOfXTicks:e==null?void 0:e.noOfXTicks,noOfYTicks:e==null?void 0:e.noOfYTicks,labelColor:e==null?void 0:e.labelColor,xSuffix:e==null?void 0:e.xSuffix,ySuffix:e==null?void 0:e.ySuffix,xPrefix:e==null?void 0:e.xPrefix,yPrefix:e==null?void 0:e.yPrefix,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"sankeyChart":return{theme:e==null?void 0:e.theme,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,data:n,graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width,height:e==null?void 0:e.height,sources:e==null?void 0:e.sources,showLabels:e==null?void 0:e.showLabels,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,truncateBy:e==null?void 0:e.truncateBy,padding:e==null?void 0:e.padding,backgroundColor:e==null?void 0:e.backgroundColor,tooltip:e==null?void 0:e.tooltip,suffix:e==null?void 0:e.suffix,prefix:e==null?void 0:e.prefix,relativeHeight:e==null?void 0:e.relativeHeight,showValues:e==null?void 0:e.showValues,graphID:e==null?void 0:e.graphID,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,fillContainer:e==null?void 0:e.fillContainer,language:e==null?void 0:e.language,minHeight:e==null?void 0:e.minHeight,ariaLabel:e==null?void 0:e.ariaLabel,sourceColors:e==null?void 0:e.sourceColors,targetColors:e==null?void 0:e.targetColors,sourceColorDomain:e==null?void 0:e.sourceColorDomain,targetColorDomain:e==null?void 0:e.targetColorDomain,nodePadding:e==null?void 0:e.nodePadding,nodeWidth:e==null?void 0:e.nodeWidth,highlightedSourceDataPoints:e==null?void 0:e.highlightedSourceDataPoints,highlightedTargetDataPoints:e==null?void 0:e.highlightedTargetDataPoints,defaultLinkOpacity:e==null?void 0:e.defaultLinkOpacity,sourceTitle:e==null?void 0:e.sourceTitle,targetTitle:e==null?void 0:e.targetTitle,animateLinks:e==null?void 0:e.animateLinks,sortNodes:e==null?void 0:e.sortNodes,detailsOnClick:e==null?void 0:e.detailsOnClick,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"dataCards":return{theme:e==null?void 0:e.theme,graphTitle:e==null?void 0:e.graphTitle,sources:e==null?void 0:e.sources,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,graphID:e==null?void 0:e.graphID,width:e==null?void 0:e.width,height:e==null?void 0:e.height,columnData:(e==null?void 0:e.columnData)||[],data:n,language:e==null?void 0:e.language,ariaLabel:e==null?void 0:e.ariaLabel,cardTemplate:e==null?void 0:e.cardTemplate,cardBackgroundColor:e==null?void 0:e.cardBackgroundColor,cardFilters:(e==null?void 0:e.cardFilters)||[],cardSortingOptions:e==null?void 0:e.cardSortingOptions,cardSearchColumns:e==null?void 0:e.cardSearchColumns,cardMinWidth:e==null?void 0:e.cardMinWidth,backgroundColor:e==null?void 0:e.backgroundColor,padding:e==null?void 0:e.padding,detailsOnClick:e==null?void 0:e.detailsOnClick,allowDataDownloadOnDetail:e==null?void 0:e.allowDataDownloadOnDetail,noOfItemsInAPage:e==null?void 0:e.noOfItemsInAPage,uiMode:e==null?void 0:e.uiMode,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames};case"radarChart":return{graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,footNote:e==null?void 0:e.footNote,sources:e==null?void 0:e.sources,ariaLabel:e==null?void 0:e.ariaLabel,colors:e==null?void 0:e.colors,colorDomain:e==null?void 0:e.colorDomain,colorLegendTitle:e==null?void 0:e.colorLegendTitle,backgroundColor:e==null?void 0:e.backgroundColor,styles:e==null?void 0:e.styles,classNames:e==null?void 0:e.classNames,width:e==null?void 0:e.width,height:e==null?void 0:e.height,minHeight:e==null?void 0:e.minHeight,relativeHeight:e==null?void 0:e.relativeHeight,padding:e==null?void 0:e.padding,radius:e==null?void 0:e.radius,leftMargin:e==null?void 0:e.leftMargin,rightMargin:e==null?void 0:e.rightMargin,topMargin:e==null?void 0:e.topMargin,bottomMargin:e==null?void 0:e.bottomMargin,maxValue:e==null?void 0:e.maxValue,minValue:e==null?void 0:e.minValue,showValues:e==null?void 0:e.showValues,showDots:e==null?void 0:e.showDots,strokeWidth:e==null?void 0:e.strokeWidth,fillShape:e==null?void 0:e.fillShape,noOfTicks:e==null?void 0:e.noOfTicks,showColorScale:e==null?void 0:e.showColorScale,showNAColor:e==null?void 0:e.showNAColor,highlightedLines:e==null?void 0:e.highlightedLines,axisLabels:e==null?void 0:e.axisLabels,curveType:e==null?void 0:e.curveType,resetSelectionOnDoubleClick:e==null?void 0:e.resetSelectionOnDoubleClick,graphDownload:e==null?void 0:e.graphDownload,dataDownload:e==null?void 0:e.dataDownload,tooltip:e==null?void 0:e.tooltip,detailsOnClick:e==null?void 0:e.detailsOnClick,language:e==null?void 0:e.language,theme:e==null?void 0:e.theme,graphID:e==null?void 0:e.graphID};default:return{}}},c=s[r],h=f(r);return v.jsx("div",{className:`grow my-0 ${r!=="statCard"?"mx-auto":"mx-0"} flex flex-col h-inherit ${e!=null&&e.width?"w-fit":"w-full"} ${r!=="unitChart"&&r!=="statCard"?"justify-center":"justify-start"} ${(e==null?void 0:e.theme)||"light"}`,style:{minHeight:"inherit"},children:Lu(f(r)||{},r).isValid&&iv(n,r).isValid&&c?v.jsx(c,{...h}):v.jsx(or,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:c?Lu(e||{},r).isValid?`Error in data: ${iv(n,r).err}`:`Error in settings: ${Lu(e||{},r).err}`:`Invalid chart type: ${r}`})})}const Vc=[{chartID:"barChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",required:!0,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"radarChart",configuration:[{id:"label",required:!1,multiple:!1},{id:"values",required:!0,multiple:!0},{id:"color",required:!1,multiple:!1}]},{chartID:"stackedBarChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",multiple:!0,required:!0}]},{chartID:"groupedBarChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",multiple:!0,required:!0}]},{chartID:"animatedBarChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",required:!0,multiple:!1},{id:"color",required:!1,multiple:!1},{id:"date",required:!0,multiple:!1}]},{chartID:"animatedStackedBarChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",multiple:!0,required:!0},{id:"date",required:!0,multiple:!1}]},{chartID:"animatedGroupedBarChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",multiple:!0,required:!0},{id:"date",required:!0,multiple:!1}]},{chartID:"lineChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1}]},{chartID:"dualAxisLineChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y1",multiple:!1,required:!0},{id:"y2",multiple:!1,required:!0}]},{chartID:"differenceLineChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y1",multiple:!1,required:!0},{id:"y2",multiple:!1,required:!0}]},{chartID:"multiLineChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y",multiple:!0,required:!0}]},{chartID:"multiLineAltChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y",multiple:!1,required:!0},{id:"label",multiple:!1,required:!0},{id:"color",multiple:!1,required:!1}]},{chartID:"stackedAreaChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y",multiple:!0,required:!0}]},{chartID:"choroplethMap",configuration:[{id:"id",required:!0,multiple:!1},{id:"x",required:!0,multiple:!1}]},{chartID:"biVariateChoroplethMap",configuration:[{id:"id",required:!0,multiple:!1},{id:"x",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1}]},{chartID:"dotDensityMap",configuration:[{id:"lat",required:!0,multiple:!1},{id:"long",required:!0,multiple:!1},{id:"label",multiple:!1,required:!1},{id:"color",multiple:!1,required:!1},{id:"radius",required:!1,multiple:!1}]},{chartID:"animatedChoroplethMap",configuration:[{id:"id",required:!0,multiple:!1},{id:"x",required:!0,multiple:!1},{id:"date",required:!0,multiple:!1}]},{chartID:"animatedBiVariateChoroplethMap",configuration:[{id:"id",required:!0,multiple:!1},{id:"x",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1},{id:"date",required:!0,multiple:!1}]},{chartID:"animatedDotDensityMap",configuration:[{id:"lat",required:!0,multiple:!1},{id:"long",required:!0,multiple:!1},{id:"label",multiple:!1,required:!1},{id:"color",multiple:!1,required:!1},{id:"radius",required:!1,multiple:!1},{id:"date",required:!0,multiple:!1}]},{chartID:"donutChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",required:!0,multiple:!1}]},{chartID:"slopeChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"y1",required:!0,multiple:!1},{id:"y2",required:!0,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"scatterPlot",configuration:[{id:"x",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1},{id:"radius",required:!1,multiple:!1},{id:"color",required:!1,multiple:!1},{id:"label",required:!0,multiple:!1}]},{chartID:"animatedScatterPlot",configuration:[{id:"x",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1},{id:"radius",required:!1,multiple:!1},{id:"color",required:!1,multiple:!1},{id:"label",required:!0,multiple:!1},{id:"date",required:!0,multiple:!1}]},{chartID:"dumbbellChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"x",multiple:!0,required:!0}]},{chartID:"animatedDumbbellChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"x",multiple:!0,required:!0},{id:"date",required:!0,multiple:!1}]},{chartID:"treeMap",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",required:!0,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"circlePacking",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",required:!1,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"sankeyChart",configuration:[{id:"source",required:!0,multiple:!1},{id:"target",required:!0,multiple:!1},{id:"value",required:!1,multiple:!1}]},{chartID:"heatMap",configuration:[{id:"row",required:!0,multiple:!1},{id:"column",required:!0,multiple:!1},{id:"value",required:!0,multiple:!1}]},{chartID:"stripChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"position",required:!0,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"statCard",configuration:[{id:"value",required:!0,multiple:!1}]},{chartID:"beeSwarmChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"position",required:!0,multiple:!1},{id:"radius",required:!1,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"butterflyChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"leftBar",required:!0,multiple:!1},{id:"rightBar",required:!0,multiple:!1}]},{chartID:"animatedButterflyChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"leftBar",required:!0,multiple:!1},{id:"rightBar",required:!0,multiple:!1},{id:"date",required:!0,multiple:!1}]},{chartID:"lineChartWithConfidenceInterval",configuration:[{id:"date",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1},{id:"yMin",required:!1,multiple:!1},{id:"yMax",required:!1,multiple:!1}]},{chartID:"histogram",configuration:[{id:"value",required:!0,multiple:!1}]},{chartID:"sparkLine",configuration:[{id:"dale",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1}]},{chartID:"paretoChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"bar",required:!0,multiple:!1},{id:"line",required:!0,multiple:!1}]},{chartID:"unitChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"value",required:!0,multiple:!1}]}];function cj(t,e){return e.filter(r=>!t.includes(r))}function fwe(t,e,r){const n=f1(t.map(s=>s.columnId)),a=cj(r,n);if(a.length!==0)return{isValid:!1,err:`Key(s) in configuration that don't match keys in the data: ${a.join(", ")}. Possible reason: If you are using 'dataTransform' then the allowed keys (columns) are only the one present in 'aggregationColumnsSetting' array in 'dataTransform' object plus n additional key called 'count'.`};const i=t.map(s=>s.chartConfigId),o=Vc[Vc.findIndex(s=>s.chartID===e)].configuration.filter(s=>s.required).map(s=>s.id),l=cj(i,o);return{isValid:l.length===0,err:l.length===0?void 0:`Missing required ID(s) in configuration: ${l.join(", ")}`}}function Wf(t,e,r){if(jo.filter(a=>a.geoHubMapPresentation).map(a=>a.graphID).indexOf(e)!==-1)return t;if(!t)return"Cannot fetch data";if(e==="dataTable"||e==="dataCards"||t.length===0)return t;if(!r)return console.error("Your data configuration is not accurate"),"No graph configuration is provided";const n=fwe(r,e,Object.keys(t[0]));if(n.isValid){const a=Vc[Vc.findIndex(o=>o.chartID===e)].configuration;return t.map(o=>{const l={};return r.filter(s=>s.columnId).forEach(s=>{a[a.findIndex(f=>f.id===s.chartConfigId)].multiple?(l[a[a.findIndex(f=>f.id===s.chartConfigId)].id]=[],s.columnId.forEach(f=>{l[a[a.findIndex(c=>c.id===s.chartConfigId)].id].push(Fe(o[f])?null:o[f])})):l[a[a.findIndex(f=>f.id===s.chartConfigId)].id]=Fe(o[s.columnId])?null:o[s.columnId],l[`${s.chartConfigId}Columns`]=s.columnId}),l.data=o,l})}return console.error(n.err),n.err}function xw(t,e,r){return t.length===0?[]:typeof t[0][e]!="object"?Bt(t,o=>o[e]).map(o=>{const l={};l[e]=o[e];const s=t.filter(f=>f[e]===o[e]);return l.count=s.length,l.rollUpData=s,r==null||r.forEach(f=>{l[f.column]=f.aggregationMethod==="average"?parseFloat((fr(s.map(c=>c[f.column]))/s.length).toFixed(2)):f.aggregationMethod==="max"?Vr(s,c=>c[f.column])[f.column]:f.aggregationMethod==="min"?Br(s,c=>c[f.column])[f.column]:fr(s.map(c=>c[f.column]))}),l}):Bt(f1(t.map(i=>i[e])),i=>i).map(i=>{const o={};o[e]=i;const l=t.filter(s=>s[e].indexOf(i)!==-1);return o.rollUpData=l,o.count=l.length,r==null||r.forEach(s=>{o[s.column]=s.aggregationMethod==="average"?parseFloat((fr(l.map(f=>f[s.column]))/l.length).toFixed(2)):s.aggregationMethod==="max"?Vr(l,f=>f[s.column])[s.column]:s.aggregationMethod==="min"?Br(l,f=>f[s.column])[s.column]:fr(l.map(f=>f[s.column]))}),o})}function Mq(t,e){return e.findIndex(r=>r.chartConfigId===t)===-1?!1:typeof e[e.findIndex(r=>r.chartConfigId===t)].columnId!="string"}const dwe=t=>{if(t.findIndex(r=>r.chartConfigId==="yMin")!==-1&&t.findIndex(r=>r.chartConfigId==="yMax")!==-1)return t;const e=[...t];return t.findIndex(r=>r.chartConfigId==="yMin")===-1&&e.push({chartConfigId:"yMin",columnId:`${t[t.findIndex(r=>r.chartConfigId==="y")].columnId}Min`}),t.findIndex(r=>r.chartConfigId==="yMax")===-1&&e.push({chartConfigId:"yMax",columnId:`${t[t.findIndex(r=>r.chartConfigId==="y")].columnId}Max`}),e},Bm=(t,e)=>{const r=(e==null?void 0:e.map(n=>{var o,l;const a=t==null?void 0:t.findIndex(s=>s.chartConfigId===n.chartConfigId);if(a===-1)return{};const i=(l=(o=t[a])==null?void 0:o.allowedColumnIds)==null?void 0:l.findIndex(s=>s.value===n.columnId);return i===-1?{}:t[a].allowedColumnIds[i].graphSettings||{}}))||[];return Object.assign({},...r)};function Uf(t){var G,ae,U,H,R,ee,J;const{graphSettings:e,dataSettings:r,filters:n,graphType:a,dataTransform:i,graphDataConfiguration:o,dataFilters:l,debugMode:s,dataSelectionOptions:f,advancedDataSelectionOptions:c,readableHeader:h,noOfFiltersPerRow:d=4,updateFilters:m,uiMode:g="normal",theme:y="light",highlightDataPointSettings:b}=t,[S,w]=I.useState(void 0),[C,k]=I.useState(void 0),[_,D]=I.useState(o),[T,A]=I.useState({}),[M,E]=I.useState(void 0),[N,Y]=I.useState([]),ne=I.useRef(null),[K,B]=I.useState([]),j=I.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]),$=I.useCallback(async()=>{if(a!=="geoHubMap"&&a!=="geoHubCompareMap"&&a!=="geoHubMapWithLayerSelection"&&r)try{const re=await(r.dataURL?typeof r.dataURL=="string"?r.fileType==="json"?ka(r.dataURL,r.columnsToArray,r.dataTransformation,s):r.fileType==="api"?m4(r.dataURL,r.apiHeaders,r.columnsToArray,r.dataTransformation,s):p4(r.dataURL,r.dataTransformation,r.columnsToArray,s,r.delimiter,!0):y7(r.dataURL,r.idColumnTitle):n2(r.data,r.columnsToArray));k(re);const te=(n||[]).map(F=>({filter:F.column,label:F.label||`Filter by ${F.column}`,singleSelect:F.singleSelect,clearable:F.clearable,defaultValue:J3(F.defaultValue),value:J3(F.defaultValue),availableValues:J0(re,F.column).filter(q=>{var X;return!((X=F.excludeValues)!=null&&X.includes(`${q}`))}).map(q=>({value:q,label:q})),allowSelectAll:F.allowSelectAll,width:F.width}));B(te)}catch(Z){console.error("Data fetching error:",Z)}},[r,a,n,s]);I.useEffect(()=>{$()},[$]);const V=I.useMemo(()=>!C||K.length===0?C:C.filter(re=>K.every(te=>te.value&&f1([te.value]).length>0?K3(f1([re[te.filter]]),f1([te.value]).map(F=>F.value)).length>0:!0)),[K,C]);I.useEffect(()=>{f&&A(Bm(f,o))},[f,o]),I.useEffect(()=>{a!=="geoHubMap"&&a!=="geoHubCompareMap"&&a!=="geoHubMapWithLayerSelection"&&C&&w(V)},[V,a,C]),I.useEffect(()=>{b!=null&&b.column&&V&&Y(J0(V,b.column).filter(Z=>{var re;return!((re=b==null?void 0:b.excludeValues)!=null&&re.includes(`${Z}`))}).map(Z=>({value:Z,label:Z})))},[V,b]),I.useEffect(()=>{D(o)},[o]);const z=I.useCallback((Z,re)=>{B(te=>te.map(F=>F.filter===Z?{...F,value:re}:F))},[]),W=I.useMemo(()=>{if(!S)return;const Z=a==="lineChartWithConfidenceInterval"&&_?dwe(_):_;return a!=="geoHubMap"&&a!=="geoHubCompareMap"&&a!=="geoHubMapWithLayerSelection"?Wf(i?xw(po(S,l||[]),i.keyColumn,i.aggregationColumnsSetting):po(S,l||[]),a,Z):void 0},[a,_,S,l,i]);return!r&&a!=="geoHubMap"&&a!=="geoHubCompareMap"&&a!=="geoHubMapWithLayerSelection"?v.jsx(or,{size:"xs",className:"text-center text-accent-dark-red dark:text-accent-red p-2",children:"Please make sure either `dataSettings` props are present as they are required for data."}):v.jsx("div",{className:`${y||(e==null?void 0:e.theme)||"light"} flex ${e!=null&&e.width?"w-fit grow-0":"w-full grow"}`,dir:(e==null?void 0:e.language)==="he"||(e==null?void 0:e.language)==="ar"?"rtl":void 0,children:v.jsx("div",{className:Be(`${e!=null&&e.backgroundColor?(e==null?void 0:e.backgroundColor)===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${(e==null?void 0:e.language)||"en"}`,(G=e==null?void 0:e.classNames)==null?void 0:G.graphContainer),style:{...((ae=e==null?void 0:e.styles)==null?void 0:ae.graphContainer)||{},...e!=null&&e.backgroundColor&&(e==null?void 0:e.backgroundColor)!==!0?{backgroundColor:e==null?void 0:e.backgroundColor}:{}},id:e==null?void 0:e.graphID,ref:ne,children:v.jsx("div",{style:{padding:e!=null&&e.backgroundColor?(e==null?void 0:e.padding)||"1rem":(e==null?void 0:e.padding)||0,flexGrow:1,display:"flex"},children:v.jsx("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:S||jo.filter(Z=>Z.geoHubMapPresentation).map(Z=>Z.graphID).indexOf(a)!==-1?v.jsxs(v.Fragment,{children:[e!=null&&e.graphTitle||e!=null&&e.graphDescription||e!=null&&e.graphDownload||e!=null&&e.dataDownload?v.jsx(Zt,{styles:{title:(U=e==null?void 0:e.styles)==null?void 0:U.title,description:(H=e==null?void 0:e.styles)==null?void 0:H.description},classNames:{title:(R=e==null?void 0:e.classNames)==null?void 0:R.title,description:(ee=e==null?void 0:e.classNames)==null?void 0:ee.description},graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,width:e==null?void 0:e.width,graphDownload:e!=null&&e.graphDownload?ne.current:void 0,dataDownload:e!=null&&e.dataDownload&&S&&S.length>0?S:null}):null,K.length!==0||(f||[]).length!==0||(c||[]).length!==0||b?v.jsxs("div",{style:{display:"flex",gap:"1rem",flexWrap:"wrap",alignItems:"flex-start",width:"100%"},children:[c==null?void 0:c.map((Z,re)=>{var te,F;return v.jsxs("div",{style:{width:Z.width||`calc(${100/d}% - ${(d-1)/d}rem)`,flexGrow:1,flexShrink:Z.ui!=="radio"?0:1,minWidth:"240px"},children:[v.jsx(oo,{className:"mb-2",children:Z.label||"Graph by"}),Z.ui!=="radio"?v.jsx(s1,{options:Z.options.map(q=>({...q,value:q.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:Z.defaultValue?{...Z.defaultValue,value:(te=Z.defaultValue)==null?void 0:te.label}:{...Z.options[0],value:Z.options[0].label},onChange:q=>{A((q==null?void 0:q.graphSettings)||{}),D(q==null?void 0:q.dataConfiguration)}}):v.jsx(gs,{defaultValue:((F=Z.defaultValue)==null?void 0:F.label)||Z.options[0].label,variant:g,onValueChange:q=>{const X=Z.options[Z.options.findIndex(ie=>ie.label===q)];A(X.graphSettings||{}),D(X.dataConfiguration)},children:Z.options.map((q,X)=>v.jsx(ys,{label:q.label,value:q.label},X))})]},re)}),f==null?void 0:f.map((Z,re)=>v.jsxs("div",{style:{width:Z.width||`calc(${100/d}% - ${(d-1)/d}rem)`,flexGrow:1,flexShrink:Z.ui!=="radio"?0:1,minWidth:"240px"},children:[v.jsx(oo,{className:"mb-2",children:Z.label||`Visualize ${Z.chartConfigId} by`}),Mq(Z.chartConfigId,_||[])?Z.ui!=="radio"?v.jsx(s1,{options:Z.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:o?o[o.findIndex(te=>te.chartConfigId===Z.chartConfigId)].columnId.map(te=>Z.allowedColumnIds[Z.allowedColumnIds.findIndex(F=>F.value===te)]):void 0,filterOption:Z1(j),onChange:te=>{const F={columnId:(te||[]).map(X=>X.value),chartConfigId:Z.chartConfigId},q=_==null?void 0:_.map(X=>X.chartConfigId===F.chartConfigId?F:X);D(q)}}):v.jsx(Sv,{variant:g,defaultValue:o?o[o.findIndex(te=>te.chartConfigId===Z.chartConfigId)].columnId.map(te=>Z.allowedColumnIds[Z.allowedColumnIds.findIndex(F=>F.value===te)]).map(te=>te.value):[],onValueChange:te=>{const F={columnId:te||[],chartConfigId:Z.chartConfigId},q=_==null?void 0:_.map(X=>X.chartConfigId===F.chartConfigId?F:X);D(q)},children:Z.allowedColumnIds.map((te,F)=>v.jsx(Cv,{label:te.label,value:te.label},F))}):Z.ui!=="radio"?v.jsx(s1,{options:Z.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:o?Z.allowedColumnIds[Z.allowedColumnIds.findIndex(te=>te.value===o[o.findIndex(F=>F.chartConfigId===Z.chartConfigId)].columnId)]:void 0,onChange:te=>{const F={columnId:te==null?void 0:te.value,chartConfigId:Z.chartConfigId},q=_==null?void 0:_.map(X=>X.chartConfigId===F.chartConfigId?F:X);A(Bm(f,q)),D(q)}}):v.jsx(gs,{variant:g,defaultValue:o?Z.allowedColumnIds[Z.allowedColumnIds.findIndex(te=>te.value===o[o.findIndex(F=>F.chartConfigId===Z.chartConfigId)].columnId)].label:"",onValueChange:te=>{const q={columnId:Z.allowedColumnIds[Z.allowedColumnIds.findIndex(ie=>ie.label===te)].value,chartConfigId:Z.chartConfigId},X=_==null?void 0:_.map(ie=>ie.chartConfigId===q.chartConfigId?q:ie);A(Bm(f,X)),D(X)},children:Z.allowedColumnIds.map((te,F)=>v.jsx(ys,{label:te.label,value:te.label},F))})]},re)),K==null?void 0:K.map((Z,re)=>v.jsxs("div",{style:{width:Z.width||`calc(${100/d}% - ${(d-1)/d}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},children:[v.jsx(oo,{className:"mb-2",children:Z.label}),Z.singleSelect?v.jsx(s1,{options:Z.availableValues,variant:g,isClearable:Z.clearable===void 0?!0:Z.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:Z1(j),onChange:te=>{z(Z.filter,te)},value:Z.value,defaultValue:Z.defaultValue}):v.jsxs(v.Fragment,{children:[v.jsx(s1,{options:Z.availableValues,variant:g,size:"sm",isMulti:!0,isClearable:Z.clearable===void 0?!0:Z.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:Z1(j),onChange:te=>{z(Z.filter,te)},value:Z.value,defaultValue:Z.defaultValue}),Z.allowSelectAll?v.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{z(Z.filter,Z.availableValues)},children:"Select all options"}):null]})]},re)),b?v.jsxs("div",{style:{width:b.width||`calc(${100/d}% - ${(d-1)/d}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},children:[v.jsx(oo,{className:"mb-2",children:b.label||"Highlight data"}),v.jsx(s1,{options:N,variant:g,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:Z1(j),onChange:Z=>{E(Z==null?void 0:Z.map(re=>re.value))},value:M==null?void 0:M.map(Z=>({label:Z,value:Z})),defaultValue:(J=b.defaultValues)==null?void 0:J.map(Z=>({label:Z,value:Z}))})]}):null]}):null,v.jsx(Tq,{graph:a,graphData:W,graphDataConfiguration:_,debugMode:s,readableHeader:h||[],updateFilters:m,settings:{...e||{},...T,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,padding:"0",theme:(e==null?void 0:e.theme)||y,...M?{highlightedDataPoints:M,highlightedIds:M==null?void 0:M.map(Z=>`${Z}`),highlightedLines:M==null?void 0:M.map(Z=>Z)}:{}}})]}):v.jsx("div",{className:"w-full flex justify-center p-4",children:v.jsx(Fo,{})})})})})})}const Vm=t=>t.map(n=>n.columnWidth||1).reduce((n,a)=>n+a,0),hwe=["barChart","choroplethMap","biVariateChoroplethMap","circlePacking","treeMap"];function Eq(t){const{dashboardID:e,dashboardLayout:r,dataSettings:n,filters:a,debugMode:i,theme:o="light",readableHeader:l,dataFilters:s,noOfFiltersPerRow:f=4,filterPosition:c,uiMode:h="normal",graphStyles:d,graphClassNames:m}=t,[g,y]=I.useState(void 0),[b,S]=I.useState(void 0),[w,C]=I.useState([]),k=I.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]),_=I.useMemo(()=>!b||w.length===0?b:b.filter(M=>w.every(E=>E.value&&f1([E.value]).length>0?K3(f1([M[E.filter]]),f1([E.value]).map(N=>N.value)).length>0:!0)),[w,b]);I.useEffect(()=>{y(_)},[_]);const D=I.useCallback(async()=>{if(n)try{const M=await(n.dataURL?typeof n.dataURL=="string"?n.fileType==="json"?ka(n.dataURL,n.columnsToArray,n.dataTransformation,i):n.fileType==="api"?m4(n.dataURL,n.apiHeaders,n.columnsToArray,n.dataTransformation,i):p4(n.dataURL,n.dataTransformation,n.columnsToArray,i,n.delimiter,!0):y7(n.dataURL,n.idColumnTitle):n2(n.data,n.columnsToArray));S(M);const E=(a||[]).map(N=>({filter:N.column,label:N.label||`Filter by ${N.column}`,singleSelect:N.singleSelect,clearable:N.clearable,defaultValue:J3(N.defaultValue),value:J3(N.defaultValue),availableValues:J0(M,N.column).filter(Y=>{var ne;return!((ne=N.excludeValues)!=null&&ne.includes(`${Y}`))}).map(Y=>({value:Y,label:Y})),allowSelectAll:N.allowSelectAll,width:N.width}));C(E)}catch(A){console.error("Data fetching error:",A)}},[n,a,i]);I.useEffect(()=>{D()},[D]);const T=I.useCallback((A,M)=>{C(E=>E.map(N=>N.filter===A?{...N,value:M}:N))},[]);return v.jsx("div",{className:`${o||"light"} flex grow`,dir:r.language==="he"||r.language==="ar"?"rtl":void 0,children:v.jsx("div",{className:`${r.backgroundColor?r.backgroundColor===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto gap-4 flex flex-col w-full grow h-inherit ${r.language||"en"}`,style:{...r.backgroundColor&&r.backgroundColor!==!0?{backgroundColor:r.backgroundColor}:{}},id:e,children:v.jsx("div",{style:{padding:r.backgroundColor?r.padding||"1rem":r.padding||0,flexGrow:1,display:"flex"},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r.title||r.description?v.jsx(Zt,{graphTitle:r.title,graphDescription:r.description,isDashboard:!0}):null,v.jsxs("div",{style:{display:"flex",gap:"1rem",flexWrap:"wrap"},children:[w.length!==0?v.jsx("div",{style:{width:c==="side"?"280px":"100%",flexGrow:1,flexShrink:0},children:v.jsx("div",{style:{display:"flex",gap:"1rem",flexWrap:"wrap",alignItems:"flex-start",width:"100%",position:"sticky",top:"1rem"},children:w==null?void 0:w.map((A,M)=>v.jsxs("div",{style:{width:A.width||`calc(${100/f}% - ${(f-1)/f}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},children:[v.jsx(oo,{className:"mb-2",children:A.label}),A.singleSelect?v.jsx(s1,{options:A.availableValues,isClearable:A.clearable===void 0?!0:A.clearable,size:"sm",variant:h,isMulti:!1,isSearchable:!0,filterOption:Z1(k),onChange:E=>{T(A.filter,E)},defaultValue:A.defaultValue,value:A.value}):v.jsxs(v.Fragment,{children:[v.jsx(s1,{options:A.availableValues,isMulti:!0,size:"sm",isClearable:A.clearable===void 0?!0:A.clearable,variant:h,isSearchable:!0,controlShouldRenderValue:!0,closeMenuOnSelect:!1,hideSelectedOptions:!1,filterOption:Z1(k),onChange:E=>{T(A.filter,E)},value:A.value,defaultValue:A.defaultValue}),A.allowSelectAll?v.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{T(A.filter,A.availableValues)},children:"Select all options"}):null]})]},M))})}):null,v.jsx("div",{style:{width:c==="side"?"calc(100% - 280px - 1rem)":"100%",minWidth:"280px",flexGrow:1,display:"flex",gap:"1rem",flexWrap:"wrap",flexShrink:"0"},children:r.rows.map((A,M)=>v.jsx("div",{style:{display:"flex",gap:"1rem",alignItems:"stretch",minHeight:`${A.height||0}px`,height:"auto",width:"100%",flexWrap:"wrap"},children:A.columns.map((E,N)=>{var Y,ne,K,B,j,$,V;return v.jsx("div",{className:"flex bg-transparent h-inherit grow min-w-60",style:{width:`calc(${100*(E.columnWidth||1)/Vm(A.columns)}% - ${(Vm(A.columns)-(E.columnWidth||1))/Vm(A.columns)}rem)`,minHeight:"inherit"},children:v.jsx(Uf,{graphType:E.graphType,dataFilters:E.dataFilters,uiMode:h,graphSettings:{...E.settings||{},width:void 0,height:void 0,resetSelectionOnDoubleClick:E.attachedFilter?!1:(Y=E.settings)==null?void 0:Y.resetSelectionOnDoubleClick,styles:((ne=E.settings)==null?void 0:ne.styles)||d,classNames:((K=E.settings)==null?void 0:K.classNames)||m,radius:E.graphType==="donutChart"||(B=E.settings)==null?void 0:B.radius,size:E.graphType==="unitChart"?(j=E.settings)==null?void 0:j.size:void 0,language:(($=E.settings)==null?void 0:$.language)||r.language,theme:((V=E.settings)==null?void 0:V.theme)||o},dataSettings:{data:g?po(g,s||[]):void 0},updateFilters:E.attachedFilter&&hwe.indexOf(E.graphType)!==-1&&w.findIndex(z=>z.filter===E.attachedFilter)!==-1?z=>{const W=w.findIndex(ae=>ae.filter===E.attachedFilter),G=z?w[W].singleSelect?{value:z,label:z}:[{value:z,label:z}]:void 0;T(E.attachedFilter,G)}:void 0,dataTransform:E.dataTransform,dataSelectionOptions:E.dataSelectionOptions,advancedDataSelectionOptions:E.advancedDataSelectionOptions,graphDataConfiguration:E.graphDataConfiguration,debugMode:i,readableHeader:l||[]})},N)})},M))})]})]})})})})}function pwe(t,e,r,n){const a=[];return t.forEach(i=>{Object.entries(i).forEach(([o,l])=>{if(o!==e){const s={indicator:r.findIndex(f=>f.value===o)!==-1?r[r.findIndex(f=>f.value===o)].label:o,value:l};s[e]=i[e],a.push(s)}})}),n&&console.log(a),a}const Fm=t=>t.map(n=>n.columnWidth||1).reduce((n,a)=>n+a,0);function jq(t){const{dashboardID:e,dashboardLayout:r,dataSettings:n,debugMode:a,theme:i="light",readableHeader:o,dataFilters:l,uiMode:s="normal",graphStyles:f,graphClassNames:c}=t,h=I.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]),[d,m]=I.useState(void 0),[g,y]=I.useState([]),[b,S]=I.useState(void 0),[w,C]=I.useState(void 0);I.useEffect(()=>{if(w){const _=w.filter(D=>D[n.keyColumn]===b);m(_)}},[w,b,n.keyColumn]);const k=I.useCallback(async()=>{if(n)try{const D=await(n.dataURL?typeof n.dataURL=="string"?n.fileType==="json"?ka(n.dataURL,void 0,n.dataTransformation,a):n.fileType==="api"?m4(n.dataURL,n.apiHeaders,void 0,n.dataTransformation,a):p4(n.dataURL,n.dataTransformation,void 0,a,n.delimiter,!0):y7(n.dataURL,n.idColumnTitle):n2(n.data,void 0)),T=po(D,l||[]);y(T.map(M=>M[n.keyColumn])),S(T[0][n.keyColumn]);const A=pwe(T,n.keyColumn,o||[],a);C(A)}catch(_){console.error("Data fetching error:",_)}},[n,a,l,o]);return I.useEffect(()=>{k()},[k]),v.jsx("div",{className:`${i||"light"} flex grow`,dir:r.language==="he"||r.language==="ar"?"rtl":void 0,children:v.jsx("div",{className:`${r!=null&&r.backgroundColor?(r==null?void 0:r.backgroundColor)===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}flex flex-col h-inherit w-full ml-auto mr-auto grow gap-4 ${(r==null?void 0:r.language)||"en"}`,style:{...r!=null&&r.backgroundColor&&(r==null?void 0:r.backgroundColor)!==!0?{backgroundColor:r==null?void 0:r.backgroundColor}:{}},id:e,children:v.jsx("div",{className:"flex grow",style:{padding:r.backgroundColor?r.padding||"1rem":r.padding||0},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[r.title||r.description?v.jsx(Zt,{graphTitle:r.title,graphDescription:r.description,isDashboard:!0}):null,d?v.jsxs(v.Fragment,{children:[v.jsx("div",{style:{display:"flex",gap:"1rem",flexWrap:"wrap",alignItems:"flex-start",width:"100%"},children:v.jsxs("div",{style:{width:"100%",flexGrow:1,flexShrink:0,minWidth:"240px"},children:[r.dropdownLabel?v.jsx(oo,{className:"mb-2",children:r.dropdownLabel}):null,v.jsx(s1,{options:g.map(_=>({value:_,label:_})),size:"sm",variant:s,isClearable:!1,isSearchable:!0,controlShouldRenderValue:!0,filterOption:Z1(h),onChange:_=>{S(_==null?void 0:_.value)},defaultValue:{value:b,label:b}})]})}),r.rows.map((_,D)=>v.jsx("div",{style:{display:"flex",gap:"1rem",alignItems:"stretch",minHeight:`${_.height||0}px`,height:"auto",width:"100%",flexWrap:"wrap"},children:_.columns.map((T,A)=>{var M,E,N,Y,ne;return v.jsx("div",{className:"flex bg-transparent h-inherit grow min-w-60",style:{width:`calc(${100*(T.columnWidth||1)/Fm(_.columns)}% - ${(Fm(_.columns)-(T.columnWidth||1))/Fm(_.columns)}rem)`,minHeight:"inherit"},children:v.jsx(Uf,{graphType:T.graphType,dataFilters:T.dataFilters,uiMode:s,graphSettings:{...T.settings||{},width:void 0,height:void 0,radius:T.graphType==="donutChart"||(M=T.settings)==null?void 0:M.radius,size:T.graphType==="unitChart"?T.settings.size:void 0,language:((E=T.settings)==null?void 0:E.language)||r.language,theme:((N=T.settings)==null?void 0:N.theme)||i,styles:((Y=T.settings)==null?void 0:Y.styles)||f,classNames:((ne=T.settings)==null?void 0:ne.classNames)||c},dataSettings:{data:d},graphDataConfiguration:T.graphDataConfiguration?T.graphDataConfiguration:T.graphType==="unitChart"?[{columnId:"indicator",chartConfigId:"label"},{columnId:"value",chartConfigId:"value"}]:[{columnId:"indicator",chartConfigId:"label"},{columnId:"value",chartConfigId:"size"}],debugMode:a,readableHeader:o||[]})},A)})},D))]}):v.jsx("div",{className:"w-full flex justify-center p-4",children:v.jsx(Fo,{})})]})})})})}function Lq(t){var G,ae,U,H,R,ee,J,Z;const{graphSettings:e,dataSettings:r,filters:n,graphType:a,dataTransform:i,graphDataConfiguration:o,noOfColumns:l,columnGridBy:s,dataFilters:f,showCommonColorScale:c,minGraphHeight:h,minGraphWidth:d,debugMode:m,dataSelectionOptions:g,advancedDataSelectionOptions:y,readableHeader:b,noOfFiltersPerRow:S=4,uiMode:w="normal",theme:C="light"}=t,[k,_]=I.useState(void 0),[D,T]=I.useState(void 0),[A,M]=I.useState([]),E=I.useRef(null),[N,Y]=I.useState(o),[ne,K]=I.useState([]),[B,j]=I.useState({}),$=I.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]),V=I.useMemo(()=>!D||ne.length===0?D:D.filter(te=>ne.every(F=>F.value&&f1([F.value]).length>0?K3(f1([te[F.filter]]),f1([F.value]).map(q=>q.value)).length>0:!0)),[ne,D]);I.useEffect(()=>{_(V)},[V]);const z=I.useCallback(async()=>{if(r)try{const te=await(r.dataURL?typeof r.dataURL=="string"?r.fileType==="json"?ka(r.dataURL,r.columnsToArray,r.dataTransformation,m):r.fileType==="api"?m4(r.dataURL,r.apiHeaders,r.columnsToArray,r.dataTransformation,m):p4(r.dataURL,r.dataTransformation,r.columnsToArray,m,r.delimiter,!0):y7(r.dataURL,r.idColumnTitle):n2(r.data,r.columnsToArray));T(te);const F=J0(te,s);M(F);const q=(n||[]).map(X=>({filter:X.column,label:X.label||`Filter by ${X.column}`,singleSelect:X.singleSelect,clearable:X.clearable,defaultValue:J3(X.defaultValue),value:J3(X.defaultValue),availableValues:J0(te,X.column).filter(ie=>{var ce;return!((ce=X.excludeValues)!=null&&ce.includes(`${ie}`))}).map(ie=>({value:ie,label:ie})),allowSelectAll:X.allowSelectAll,width:X.width}));K(q)}catch(re){console.error("Data fetching error:",re)}},[r,m,s,n]);I.useEffect(()=>{z()},[z]),I.useEffect(()=>{Y(o)},[o]);const W=I.useCallback((re,te)=>{K(F=>F.map(q=>q.filter===re?{...q,value:te}:q))},[]);return v.jsx("div",{className:`${C||(e==null?void 0:e.theme)||"light"} flex ${e!=null&&e.width?"w-fit grow-0":"w-full grow"}`,dir:(e==null?void 0:e.language)==="he"||(e==null?void 0:e.language)==="ar"?"rtl":void 0,children:v.jsx("div",{className:`${e!=null&&e.backgroundColor?(e==null?void 0:e.backgroundColor)===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${(e==null?void 0:e.language)||"en"}`,style:{...e!=null&&e.backgroundColor&&(e==null?void 0:e.backgroundColor)!==!0?{backgroundColor:e==null?void 0:e.backgroundColor}:{}},id:e==null?void 0:e.graphID,ref:E,"aria-label":(e==null?void 0:e.ariaLabel)||`${e!=null&&e.graphTitle?`The graph shows ${e==null?void 0:e.graphTitle}. `:""}This is a gridded chart.${e!=null&&e.graphDescription?` ${e==null?void 0:e.graphDescription}`:""}`,children:v.jsx("div",{style:{padding:e!=null&&e.backgroundColor?(e==null?void 0:e.padding)||"1rem":(e==null?void 0:e.padding)||0,flexGrow:1,display:"flex"},children:v.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[e!=null&&e.graphTitle||e!=null&&e.graphDescription||e!=null&&e.graphDownload||e!=null&&e.dataDownload?v.jsx(Zt,{styles:{title:(G=e==null?void 0:e.styles)==null?void 0:G.title,description:(ae=e==null?void 0:e.styles)==null?void 0:ae.description},classNames:{title:(U=e==null?void 0:e.classNames)==null?void 0:U.title,description:(H=e==null?void 0:e.classNames)==null?void 0:H.description},graphTitle:e==null?void 0:e.graphTitle,graphDescription:e==null?void 0:e.graphDescription,width:e==null?void 0:e.width,graphDownload:e!=null&&e.graphDownload?E.current:void 0,dataDownload:e!=null&&e.dataDownload&&k&&k.length>0?k:null}):null,k&&A.length>0?v.jsxs(v.Fragment,{children:[ne.length!==0||(g||[]).length!==0||(y||[]).length!==0?v.jsxs("div",{style:{display:"flex",gap:"1rem",flexWrap:"wrap",alignItems:"flex-start",width:"100%"},children:[y==null?void 0:y.map((re,te)=>{var F,q;return v.jsxs("div",{style:{width:re.width||`calc(${100/S}% - ${(S-1)/S}rem)`,flexGrow:1,flexShrink:re.ui!=="radio"?0:1,minWidth:"240px"},children:[v.jsx(oo,{className:"mb-2",children:re.label||"Graph by"}),re.ui!=="radio"?v.jsx(s1,{options:re.options.map(X=>({...X,value:X.label})),isClearable:!1,isSearchable:!0,variant:w,controlShouldRenderValue:!0,defaultValue:re.defaultValue?{...re.defaultValue,value:(F=re.defaultValue)==null?void 0:F.label}:{...re.options[0],value:re.options[0].label},onChange:X=>{j((X==null?void 0:X.graphSettings)||{}),Y(X==null?void 0:X.dataConfiguration)}}):v.jsx(gs,{defaultValue:((q=re.defaultValue)==null?void 0:q.label)||re.options[0].label,variant:w,onValueChange:X=>{const ie=re.options[re.options.findIndex(ce=>ce.label===X)];j(ie.graphSettings||{}),Y(ie.dataConfiguration)},children:re.options.map((X,ie)=>v.jsx(ys,{label:X.label,value:X.label},ie))})]},te)}),g==null?void 0:g.map((re,te)=>v.jsxs("div",{style:{width:re.width||`calc(${100/S}% - ${(S-1)/S}rem)`,flexGrow:1,flexShrink:re.ui!=="radio"?0:1,minWidth:"240px"},children:[v.jsx(oo,{className:"mb-2",children:re.label||`Visualize ${re.chartConfigId} by`}),Mq(re.chartConfigId,N||[])?re.ui!=="radio"?v.jsx(s1,{options:re.allowedColumnIds,isMulti:!0,variant:w,isSearchable:!0,controlShouldRenderValue:!0,defaultValue:o?o[o.findIndex(F=>F.chartConfigId===re.chartConfigId)].columnId.map(F=>re.allowedColumnIds[re.allowedColumnIds.findIndex(q=>q.value===F)]):void 0,filterOption:Z1($),onChange:F=>{const q={columnId:F.map(ie=>ie.value),chartConfigId:re.chartConfigId},X=N==null?void 0:N.map(ie=>ie.chartConfigId===q.chartConfigId?q:ie);Y(X)},isRtl:(e==null?void 0:e.language)==="ar"||(e==null?void 0:e.language)==="he"}):v.jsx(Sv,{variant:w,defaultValue:o?o[o.findIndex(F=>F.chartConfigId===re.chartConfigId)].columnId.map(F=>re.allowedColumnIds[re.allowedColumnIds.findIndex(q=>q.value===F)]).map(F=>F.value):[],onValueChange:F=>{const q={columnId:F||[],chartConfigId:re.chartConfigId},X=N==null?void 0:N.map(ie=>ie.chartConfigId===q.chartConfigId?q:ie);Y(X)},children:re.allowedColumnIds.map((F,q)=>v.jsx(Cv,{label:F.label,value:F.label},q))}):re.ui!=="radio"?v.jsx(s1,{options:re.allowedColumnIds,isClearable:!1,isSearchable:!0,variant:w,defaultValue:o?re.allowedColumnIds[re.allowedColumnIds.findIndex(F=>F.value===o[o.findIndex(q=>q.chartConfigId===re.chartConfigId)].columnId)]:void 0,controlShouldRenderValue:!0,onChange:F=>{const q={columnId:F==null?void 0:F.value,chartConfigId:re.chartConfigId},X=N==null?void 0:N.map(ie=>ie.chartConfigId===q.chartConfigId?q:ie);j((F==null?void 0:F.graphSettings)||{}),Y(X)}}):v.jsx(gs,{variant:w,defaultValue:o?re.allowedColumnIds[re.allowedColumnIds.findIndex(F=>F.value===o[o.findIndex(q=>q.chartConfigId===re.chartConfigId)].columnId)].label:"",onValueChange:F=>{const q=re.allowedColumnIds[re.allowedColumnIds.findIndex(ce=>ce.label===F)],X={columnId:q.value,chartConfigId:re.chartConfigId},ie=N==null?void 0:N.map(ce=>ce.chartConfigId===X.chartConfigId?X:ce);j(q.graphSettings||{}),Y(ie)},children:re.allowedColumnIds.map((F,q)=>v.jsx(ys,{label:F.label,value:F.label},q))})]},te)),ne==null?void 0:ne.map((re,te)=>v.jsxs("div",{style:{width:re.width||`calc(${100/S}% - ${(S-1)/S}rem)`,flexGrow:1,flexShrink:0,flexWrap:"wrap"},children:[v.jsx(oo,{className:"mb-2",children:re.label}),re.singleSelect?v.jsx(s1,{variant:w,options:re.availableValues,isClearable:re.clearable===void 0?!0:re.clearable,isRtl:(e==null?void 0:e.language)==="ar"||(e==null?void 0:e.language)==="he",isSearchable:!0,controlShouldRenderValue:!0,filterOption:Z1($),onChange:F=>{W(re.filter,F)},defaultValue:re.defaultValue}):v.jsxs(v.Fragment,{children:[v.jsx(s1,{variant:w,options:re.availableValues,isMulti:!0,isClearable:re.clearable===void 0?!0:re.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:Z1($),onChange:F=>{W(re.filter,F)},defaultValue:re.defaultValue,isRtl:(e==null?void 0:e.language)==="ar"||(e==null?void 0:e.language)==="he"}),re.allowSelectAll?v.jsx("button",{className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",type:"button",onClick:()=>{W(re.filter,re.availableValues)},children:"Select all options"}):null]})]},te))]}):null,c!==!1&&(e!=null&&e.colorDomain)&&(e==null?void 0:e.showColorScale)!==!1?v.jsx(g0,{width:e==null?void 0:e.width,colorLegendTitle:e==null?void 0:e.colorLegendTitle,colors:(e==null?void 0:e.colors)||Qe[(e==null?void 0:e.theme)||"light"].categoricalColors.colors,colorDomain:e==null?void 0:e.colorDomain,showNAColor:(e==null?void 0:e.showNAColor)===void 0||(e==null?void 0:e.showNAColor)===null?!0:e==null?void 0:e.showNAColor}):null,v.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"1rem",flexDirection:(e==null?void 0:e.language)==="ar"||(e==null?void 0:e.language)==="he"?"row-reverse":"row",justifyContent:"center"},children:A.map((re,te)=>v.jsx("div",{style:{width:`calc(${100/(l||gr([4,A.length||0]))}% - ${((l||gr([4,A.length||0]))-1)/(l||gr([4,A.length||0]))}rem)`,minWidth:Fe(d)?"280px":`${d}px`},children:v.jsx(Tq,{graph:a,graphDataConfiguration:N,graphData:Wf(i?xw(po(k,f||[]).filter(F=>F[s]===re),i.keyColumn,i.aggregationColumnsSetting):po(k,f||[]).filter(F=>F[s]===re),a,N)||[],debugMode:m,settings:{...e||{},...B,theme:(e==null?void 0:e.theme)||C,width:void 0,height:void 0,relativeHeight:(e==null?void 0:e.relativeHeight)||.67,minHeight:h,graphTitle:`${re}`,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,padding:"0",footNote:void 0,sources:void 0,showColorScale:(e==null?void 0:e.showColorScale)===!1?!1:c===!1},readableHeader:b||[]})},te))})]}):v.jsx("div",{className:"w-full flex justify-center p-4",children:v.jsx(Fo,{})}),e!=null&&e.sources||e!=null&&e.footNote?v.jsx(tr,{styles:{footnote:(R=e==null?void 0:e.styles)==null?void 0:R.footnote,source:(ee=e==null?void 0:e.styles)==null?void 0:ee.source},classNames:{footnote:(J=e==null?void 0:e.classNames)==null?void 0:J.footnote,source:(Z=e==null?void 0:e.classNames)==null?void 0:Z.source},sources:e==null?void 0:e.sources,footNote:e==null?void 0:e.footNote,width:e==null?void 0:e.width}):null]})})})})}function Nq(t){const{config:e}=t,[r,n]=I.useState(void 0);if(I.useEffect(()=>{(async()=>{if(typeof e=="string"){const o=await ka(e);n(o)}else n(e)})()},[e]),!r)return v.jsx("div",{className:"w-full flex justify-center p-4",children:v.jsx(Fo,{})});const a=G6(r,"multiGraphDashboard");return a.isValid?v.jsx(Eq,{dashboardID:r.dashboardID,dashboardLayout:r.dashboardLayout,dataSettings:r.dataSettings,filters:r.filters,debugMode:r.debugMode,theme:r.theme,readableHeader:r.readableHeader,dataFilters:r.dataFilters,noOfFiltersPerRow:r.noOfFiltersPerRow,filterPosition:r.filterPosition,uiMode:r.uiMode,graphStyles:r.graphStyles,graphClassNames:r.graphClassNames}):v.jsx(or,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:a.err})}function Iq(t){const{config:e}=t,[r,n]=I.useState(void 0);return I.useEffect(()=>{typeof e=="string"?ka(e).then(o=>{n(o)}):n(e)},[e]),r?G6(r,"multiGraphDashboardWideToLongFormat").isValid?v.jsx(jq,{dashboardID:r.dashboardID,dashboardLayout:r.dashboardLayout,dataSettings:r.dataSettings,debugMode:r.debugMode,theme:r.theme,readableHeader:r.readableHeader,dataFilters:r.dataFilters,uiMode:r.uiMode,graphStyles:r.graphStyles,graphClassNames:r.graphClassNames}):v.jsx(or,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:G6(r,"multiGraphDashboardWideToLongFormat").err}):v.jsx("div",{className:"w-full flex justify-center p-4",children:v.jsx(Fo,{})})}function Pq(t){const{config:e}=t,[r,n]=I.useState(void 0);if(I.useEffect(()=>{typeof e=="string"?ka(e).then(o=>{n(o)}):n(e)},[e]),!r)return v.jsx("div",{className:"w-full flex justify-center p-4",children:v.jsx(Fo,{})});const a=G6(r,"singleGraphDashboard");return a.isValid?v.jsx(Uf,{graphSettings:r.graphSettings,dataSettings:r.dataSettings,filters:r.filters,graphType:r.graphType,dataTransform:r.dataTransform,graphDataConfiguration:r.graphDataConfiguration,dataFilters:r.dataFilters,debugMode:r.debugMode,dataSelectionOptions:r.dataSelectionOptions,advancedDataSelectionOptions:r.advancedDataSelectionOptions,readableHeader:r.readableHeader,noOfFiltersPerRow:r.noOfFiltersPerRow,uiMode:r.uiMode,highlightDataPointSettings:r.highlightDataPointSettings}):v.jsx(or,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:a.err})}function Rq(t){const{config:e}=t,[r,n]=I.useState(void 0);if(I.useEffect(()=>{(async()=>{if(typeof e=="string"){const o=await ka(e);n(o)}else n(e)})()},[e]),!r)return v.jsx("div",{className:"w-full flex justify-center p-4",children:v.jsx(Fo,{})});const a=G6(r,"griddedGraph");return a.isValid?v.jsx(Lq,{noOfColumns:r.noOfColumns,columnGridBy:r.columnGridBy,graphSettings:r.graphSettings,dataSettings:r.dataSettings,filters:r.filters,graphType:r.graphType,minGraphHeight:r.minGraphHeight,minGraphWidth:r.minGraphWidth,dataTransform:r.dataTransform,graphDataConfiguration:r.graphDataConfiguration,dataFilters:r.dataFilters,showCommonColorScale:r.showCommonColorScale,debugMode:r.debugMode,dataSelectionOptions:r.dataSelectionOptions,advancedDataSelectionOptions:r.advancedDataSelectionOptions,readableHeader:r.readableHeader,noOfFiltersPerRow:r.noOfFiltersPerRow,theme:r.theme}):v.jsx(or,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:a.err})}var Nu={exports:{}},mwe=Nu.exports,fj;function gwe(){return fj||(fj=1,function(t,e){(function(r,n){n()})(mwe,function(){function r(f,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(f.type)?new Blob(["\uFEFF",f],{type:f.type}):f}function n(f,c,h){var d=new XMLHttpRequest;d.open("GET",f),d.responseType="blob",d.onload=function(){s(d.response,c,h)},d.onerror=function(){console.error("could not download file")},d.send()}function a(f){var c=new XMLHttpRequest;c.open("HEAD",f,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function i(f){try{f.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),f.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof kr=="object"&&kr.global===kr?kr:void 0,l=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(f,c,h){var d=o.URL||o.webkitURL,m=document.createElement("a");c=c||f.name||"download",m.download=c,m.rel="noopener",typeof f=="string"?(m.href=f,m.origin===location.origin?i(m):a(m.href)?n(f,c,h):i(m,m.target="_blank")):(m.href=d.createObjectURL(f),setTimeout(function(){d.revokeObjectURL(m.href)},4e4),setTimeout(function(){i(m)},0))}:"msSaveOrOpenBlob"in navigator?function(f,c,h){if(c=c||f.name||"download",typeof f!="string")navigator.msSaveOrOpenBlob(r(f,h),c);else if(a(f))n(f,c,h);else{var d=document.createElement("a");d.href=f,d.target="_blank",setTimeout(function(){i(d)})}}:function(f,c,h,d){if(d=d||open("","_blank"),d&&(d.document.title=d.document.body.innerText="downloading..."),typeof f=="string")return n(f,c,h);var m=f.type==="application/octet-stream",g=/constructor/i.test(o.HTMLElement)||o.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||m&&g||l)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var C=b.result;C=y?C:C.replace(/^data:[^;]*;/,"data:attachment/file;"),d?d.location.href=C:location=C,d=null},b.readAsDataURL(f)}else{var S=o.URL||o.webkitURL,w=S.createObjectURL(f);d?d.location=w:location.href=w,d=null,setTimeout(function(){S.revokeObjectURL(w)},4e4)}});o.saveAs=s.saveAs=s,t.exports=s})}(Nu)),Nu.exports}var ywe=gwe();const vwe=_a(ywe),$q=(t,e,r,n,a)=>{const i="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8",o=Hh.utils.json_to_sheet([n],{header:r,skipHeader:!0});o["!cols"]=a,Hh.utils.sheet_add_json(o,t,{header:r,skipHeader:!0,origin:-1});const l={Sheets:{data:o},SheetNames:["data"]},s=Hh.write(l,{bookType:"xlsx",type:"array"}),f=new Blob([s],{type:i});vwe.saveAs(f,`${e}.xlsx`)};function bwe(t){const{buttonContent:e,buttonType:r="tertiary",csvData:n,fileName:a="data",headers:i,xlsxHeader:o,wscols:l,buttonSmall:s,className:f=""}=t;return v.jsx(r4,{variant:r,className:`${s?"p-2":"py-4 px-6"} ${f}`,onClick:()=>$q(n,a,i,o,l),"aria-label":"Click to download the data as xlsx",children:e||v.jsx(Bb,{})})}var iu={exports:{}},dj;function xwe(){if(dj)return iu.exports;dj=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return iu.exports=e(),iu.exports.createColors=e,iu.exports}const wwe={},Swe=Object.freeze(Object.defineProperty({__proto__:null,default:wwe},Symbol.toStringTag,{value:"Module"})),Mo=AU(Swe);var zm,hj;function ww(){if(hj)return zm;hj=1;let t=xwe(),e=Mo;class r extends Error{constructor(a,i,o,l,s,f){super(a),this.name="CssSyntaxError",this.reason=a,s&&(this.file=s),l&&(this.source=l),f&&(this.plugin=f),typeof i<"u"&&typeof o<"u"&&(typeof i=="number"?(this.line=i,this.column=o):(this.line=i.line,this.column=i.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(a){if(!this.source)return"";let i=this.source;a==null&&(a=t.isColorSupported);let o=m=>m,l=m=>m,s=m=>m;if(a){let{bold:m,gray:g,red:y}=t.createColors(!0);l=b=>m(y(b)),o=b=>g(b),e&&(s=b=>e(b))}let f=i.split(/\r?\n/),c=Math.max(this.line-3,0),h=Math.min(this.line+2,f.length),d=String(h).length;return f.slice(c,h).map((m,g)=>{let y=c+1+g,b=" "+(" "+y).slice(-d)+" | ";if(y===this.line){if(m.length>160){let w=20,C=Math.max(0,this.column-w),k=Math.max(this.column+w,this.endColumn+w),_=m.slice(C,k),D=o(b.replace(/\d/g," "))+m.slice(0,Math.min(this.column-1,w-1)).replace(/[^\t]/g," ");return l(">")+o(b)+s(_)+`
286
286
  `+D+l("^")}let S=o(b.replace(/\d/g," "))+m.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(b)+s(m)+`
287
287
  `+S+l("^")}return" "+o(b)+s(m)}).join(`
288
288
  `)}toString(){let a=this.showSourceCode();return a&&(a=`