@tmf_ciclica/ciclicastorybook 1.2.165 → 1.2.166

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.js CHANGED
@@ -20,7 +20,7 @@ object-assign
20
20
  */var hr,es;function Za(){if(es)return hr;es=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},c=0;c<10;c++)a["_"+String.fromCharCode(c)]=c;var u=Object.getOwnPropertyNames(a).map(function(m){return a[m]});if(u.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(m){d[m]=m}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return hr=o()?Object.assign:function(i,a){for(var c,u=r(i),d,m=1;m<arguments.length;m++){c=Object(arguments[m]);for(var g in c)t.call(c,g)&&(u[g]=c[g]);if(e){d=e(c);for(var y=0;y<d.length;y++)n.call(c,d[y])&&(u[d[y]]=c[d[y]])}}return u},hr}var gr,ts;function Kr(){if(ts)return gr;ts=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return gr=e,gr}var yr,ns;function Ci(){return ns||(ns=1,yr=Function.call.bind(Object.prototype.hasOwnProperty)),yr}var br,rs;function Ga(){if(rs)return br;rs=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Kr(),n={},r=Ci();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,c,u,d){if(process.env.NODE_ENV!=="production"){for(var m in i)if(r(i,m)){var g;try{if(typeof i[m]!="function"){var y=Error((u||"React class")+": "+c+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw y.name="Invariant Violation",y}g=i[m](a,m,u,c,null,t)}catch(b){g=b}if(g&&!(g instanceof Error)&&e((u||"React class")+": type specification of "+c+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in n)){n[g.message]=!0;var h=d?d():"";e("Failed "+c+" type: "+g.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},br=o,br}var vr,os;function Ya(){if(os)return vr;os=1;var e=xi(),t=Za(),n=Kr(),r=Ci(),o=Ga(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(c){var u="Warning: "+c;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function a(){return null}return vr=function(c,u){var d=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function g(O){var L=O&&(d&&O[d]||O[m]);if(typeof L=="function")return L}var y="<<anonymous>>",h={array:_("array"),bigint:_("bigint"),bool:_("boolean"),func:_("function"),number:_("number"),object:_("object"),string:_("string"),symbol:_("symbol"),any:w(),arrayOf:N,element:C(),elementType:v(),instanceOf:T,node:P(),objectOf:j,oneOf:M,oneOfType:$,shape:p,exact:E};function b(O,L){return O===L?O!==0||1/O===1/L:O!==O&&L!==L}function f(O,L){this.message=O,this.data=L&&typeof L=="object"?L:{},this.stack=""}f.prototype=Error.prototype;function x(O){if(process.env.NODE_ENV!=="production")var L={},K=0;function ee(Z,re,ne,oe,te,Y,be){if(oe=oe||y,Y=Y||ne,be!==n){if(u){var W=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw W.name="Invariant Violation",W}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var le=oe+":"+ne;!L[le]&&K<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+oe+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[le]=!0,K++)}}return re[ne]==null?Z?re[ne]===null?new f("The "+te+" `"+Y+"` is marked as required "+("in `"+oe+"`, but its value is `null`.")):new f("The "+te+" `"+Y+"` is marked as required in "+("`"+oe+"`, but its value is `undefined`.")):null:O(re,ne,oe,te,Y)}var q=ee.bind(null,!1);return q.isRequired=ee.bind(null,!0),q}function _(O){function L(K,ee,q,Z,re,ne){var oe=K[ee],te=V(oe);if(te!==O){var Y=I(oe);return new f("Invalid "+Z+" `"+re+"` of type "+("`"+Y+"` supplied to `"+q+"`, expected ")+("`"+O+"`."),{expectedType:O})}return null}return x(L)}function w(){return x(a)}function N(O){function L(K,ee,q,Z,re){if(typeof O!="function")return new f("Property `"+re+"` of component `"+q+"` has invalid PropType notation inside arrayOf.");var ne=K[ee];if(!Array.isArray(ne)){var oe=V(ne);return new f("Invalid "+Z+" `"+re+"` of type "+("`"+oe+"` supplied to `"+q+"`, expected an array."))}for(var te=0;te<ne.length;te++){var Y=O(ne,te,q,Z,re+"["+te+"]",n);if(Y instanceof Error)return Y}return null}return x(L)}function C(){function O(L,K,ee,q,Z){var re=L[K];if(!c(re)){var ne=V(re);return new f("Invalid "+q+" `"+Z+"` of type "+("`"+ne+"` supplied to `"+ee+"`, expected a single ReactElement."))}return null}return x(O)}function v(){function O(L,K,ee,q,Z){var re=L[K];if(!e.isValidElementType(re)){var ne=V(re);return new f("Invalid "+q+" `"+Z+"` of type "+("`"+ne+"` supplied to `"+ee+"`, expected a single ReactElement type."))}return null}return x(O)}function T(O){function L(K,ee,q,Z,re){if(!(K[ee]instanceof O)){var ne=O.name||y,oe=G(K[ee]);return new f("Invalid "+Z+" `"+re+"` of type "+("`"+oe+"` supplied to `"+q+"`, expected ")+("instance of `"+ne+"`."))}return null}return x(L)}function M(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function L(K,ee,q,Z,re){for(var ne=K[ee],oe=0;oe<O.length;oe++)if(b(ne,O[oe]))return null;var te=JSON.stringify(O,function(be,W){var le=I(W);return le==="symbol"?String(W):W});return new f("Invalid "+Z+" `"+re+"` of value `"+String(ne)+"` "+("supplied to `"+q+"`, expected one of "+te+"."))}return x(L)}function j(O){function L(K,ee,q,Z,re){if(typeof O!="function")return new f("Property `"+re+"` of component `"+q+"` has invalid PropType notation inside objectOf.");var ne=K[ee],oe=V(ne);if(oe!=="object")return new f("Invalid "+Z+" `"+re+"` of type "+("`"+oe+"` supplied to `"+q+"`, expected an object."));for(var te in ne)if(r(ne,te)){var Y=O(ne,te,q,Z,re+"."+te,n);if(Y instanceof Error)return Y}return null}return x(L)}function $(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var L=0;L<O.length;L++){var K=O[L];if(typeof K!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(K)+" at index "+L+"."),a}function ee(q,Z,re,ne,oe){for(var te=[],Y=0;Y<O.length;Y++){var be=O[Y],W=be(q,Z,re,ne,oe,n);if(W==null)return null;W.data&&r(W.data,"expectedType")&&te.push(W.data.expectedType)}var le=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new f("Invalid "+ne+" `"+oe+"` supplied to "+("`"+re+"`"+le+"."))}return x(ee)}function P(){function O(L,K,ee,q,Z){return k(L[K])?null:new f("Invalid "+q+" `"+Z+"` supplied to "+("`"+ee+"`, expected a ReactNode."))}return x(O)}function D(O,L,K,ee,q){return new f((O||"React class")+": "+L+" type `"+K+"."+ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+q+"`.")}function p(O){function L(K,ee,q,Z,re){var ne=K[ee],oe=V(ne);if(oe!=="object")return new f("Invalid "+Z+" `"+re+"` of type `"+oe+"` "+("supplied to `"+q+"`, expected `object`."));for(var te in O){var Y=O[te];if(typeof Y!="function")return D(q,Z,re,te,I(Y));var be=Y(ne,te,q,Z,re+"."+te,n);if(be)return be}return null}return x(L)}function E(O){function L(K,ee,q,Z,re){var ne=K[ee],oe=V(ne);if(oe!=="object")return new f("Invalid "+Z+" `"+re+"` of type `"+oe+"` "+("supplied to `"+q+"`, expected `object`."));var te=t({},K[ee],O);for(var Y in te){var be=O[Y];if(r(O,Y)&&typeof be!="function")return D(q,Z,re,Y,I(be));if(!be)return new f("Invalid "+Z+" `"+re+"` key `"+Y+"` supplied to `"+q+"`.\nBad object: "+JSON.stringify(K[ee],null," ")+`
21
21
  Valid keys: `+JSON.stringify(Object.keys(O),null," "));var W=be(ne,Y,q,Z,re+"."+Y,n);if(W)return W}return null}return x(L)}function k(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every(k);if(O===null||c(O))return!0;var L=g(O);if(L){var K=L.call(O),ee;if(L!==O.entries){for(;!(ee=K.next()).done;)if(!k(ee.value))return!1}else for(;!(ee=K.next()).done;){var q=ee.value;if(q&&!k(q[1]))return!1}}else return!1;return!0;default:return!1}}function R(O,L){return O==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function V(O){var L=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":R(L,O)?"symbol":L}function I(O){if(typeof O>"u"||O===null)return""+O;var L=V(O);if(L==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return L}function z(O){var L=I(O);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function G(O){return!O.constructor||!O.constructor.name?y:O.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},vr}var xr,ss;function Xa(){if(ss)return xr;ss=1;var e=Kr();function t(){}function n(){}return n.resetWarningCache=t,xr=function(){function r(a,c,u,d,m,g){if(g!==e){var y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw y.name="Invariant Violation",y}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},xr}var is;function Qa(){if(is)return yn.exports;if(is=1,process.env.NODE_ENV!=="production"){var e=xi(),t=!0;yn.exports=Ya()(e.isElement,t)}else yn.exports=Xa()();return yn.exports}var Ja=Qa();const s=Ua(Ja),Zr=({ambit:e,onClickCopy:t,onClickDelete:n,onClickFilters:r,onClickAmbit:o,isActive:i,activeColor:a,fontColor:c,moreInfo:u})=>{const{name:d,created_at:m,id:g,isBeingProcessed:y}=e;return l.jsxs("div",{className:Qt.ambitItem,style:{borderBottom:`1px solid ${c}`},children:[l.jsxs("div",{className:Qt.ambitNameDate,onClick:()=>o(g),children:[l.jsxs("div",{className:Qt.ambitName,children:[l.jsx("img",{style:{marginRight:9},src:i?qa:Wa}),l.jsx("span",{style:{color:i?a:c},children:d})]}),l.jsx("div",{className:Qt.ambitDate,children:m?new Date(m).toLocaleDateString():""})]}),l.jsxs("div",{className:Qt.ambitButtons,children:[y&&l.jsx("img",{src:za}),l.jsx("button",{onClick:()=>r(g),disabled:e.is_default,children:l.jsx("img",{src:Va})}),l.jsx("button",{onClick:()=>t(g),children:l.jsx("img",{src:Fa})}),l.jsx("button",{onClick:()=>n(g),disabled:e.is_default,children:l.jsx("img",{src:Pa})})]})]})};Zr.displayName="AmbitItem";Zr.propTypes={ambit:s.shape({name:s.string.isRequired,created_at:s.string,id:s.string.isRequired,isBeingProcessed:s.bool}).isRequired,onClickCopy:s.func.isRequired,onClickDelete:s.func.isRequired,onClickFilters:s.func.isRequired,onClickAmbit:s.func.isRequired,isBeingProcessed:s.bool,isActive:s.bool,activeColor:s.string,fontColor:s.string,moreInfo:s.object};const as="data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%200%2014%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20id='Vector'%20d='M7%2015L7%201M7%2015L1%209M7%2015L13%209'%20stroke='%23605B56'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",el="_generalButton_phq4n_2",tl={generalButton:el},Zt=({children:e,onClick:t,fontColor:n="#605B56",borderColor:r="#605B56",backgroundColor:o="#fff",type:i="button",containerStyles:a={},disabled:c=!1})=>l.jsx("button",{className:tl.generalButton,style:{color:n,border:`1.5px solid ${r}`,background:o,...a},onClick:t,type:i,disabled:c,children:e});Zt.displayName="GeneralButton";const Gr=({ambitList:e,activeAmbitId:t,fontColor:n="#605B56",activeColor:r,nameLabel:o,dateLabel:i,newAmbitLabel:a="New field",buttonContainerStyles:c={},containerStyles:u={},onCLickNewAmbit:d=()=>console.log("New ambit clicked"),onClickCopy:m=b=>console.log(`Copy ambit: ${b}`),onCLickDelete:g=b=>console.log(`Delete ambit: ${b}`),onClickFilters:y=b=>console.log(`Filters clicked: ${b}`),onClickAmbit:h=b=>console.log(`OnCLickAmbit: ${b}`)})=>{const{t:b}=se.useTranslation(),[f,x]=S.useState(e);S.useEffect(()=>{e&&x(e)},[e]);const _=w=>{if(f&&f.length>0){let N=[...f];N.sort((C,v)=>C[w].localeCompare(v[w])),x(N)}};return l.jsxs("div",{className:dt.ambitSelector,style:{color:n,...u},children:[l.jsxs("div",{className:dt.header,style:{borderBottom:`1px solid ${n}`},children:[l.jsxs("div",{className:dt.nameDateContainer,children:[l.jsx("div",{className:dt.ambitName,children:l.jsxs("button",{onClick:()=>_("name"),children:[l.jsx("span",{children:b(o)}),l.jsx("img",{src:as})]})}),l.jsx("div",{className:dt.ambitDate,children:l.jsxs("button",{onClick:()=>_("date"),children:[l.jsx("span",{children:b(i)}),l.jsx("img",{src:as})]})})]}),l.jsx("div",{className:dt.buttonsContainer})]}),l.jsx("div",{className:dt.ambitListContainer,children:f&&f.length>0&&f.map(w=>l.jsx(Zr,{isActive:t==w.id,ambit:w,fontColor:n,activeColor:r,onClickCopy:m,onClickDelete:g,onClickFilters:y,onClickAmbit:h},`ambitKey${w.id}`))}),l.jsx("div",{className:dt.newAmbitButtonContainer,children:l.jsx(Zt,{style:{...c},onClick:d,borderColor:"grey",children:b(a)})})]})};Gr.displayName="AmbitSelector";Gr.propTypes={ambitList:s.arrayOf(s.shape({name:s.string.isRequired,date:s.string.isRequired,id:s.string.isRequired})).isRequired,activeAmbitId:s.string,fontColor:s.string,activeColor:s.string,onClickCopy:s.func.isRequired,onCLickDelete:s.func.isRequired,onClickFilters:s.func.isRequired,onClickAmbit:s.func.isRequired,nameLabel:s.string,dateLabel:s.string,newAmbitLabel:s.string,buttonContainerStyles:s.object,containerStyles:s.object,onCLickNewAmbit:s.func};class _i extends S.Component{constructor(t){super(t),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){this.setState({errorInfo:n}),console.error(`[CiclicaStorybook] Error capturado en el componente: ${this.props.name||"desconocido"}`,t,n==null?void 0:n.componentStack)}render(){var t,n;return this.state.hasError?this.props.fallback?this.props.fallback(this.state.error,this.state.errorInfo):l.jsxs("div",{style:{padding:"16px",margin:"8px 0",border:"1px solid #f44336",borderRadius:"4px",backgroundColor:"#fdecea",color:"#b71c1c",fontFamily:"monospace",fontSize:"13px",whiteSpace:"pre-wrap"},children:[l.jsx("strong",{children:"Error en componente de CiclicaStorybook"}),this.props.name&&l.jsxs("div",{children:["Componente: ",l.jsx("code",{children:this.props.name})]}),l.jsx("div",{style:{marginTop:"8px"},children:((t=this.state.error)==null?void 0:t.message)||String(this.state.error)}),((n=this.state.errorInfo)==null?void 0:n.componentStack)&&l.jsxs("details",{style:{marginTop:"8px"},children:[l.jsx("summary",{children:"Ver stack del componente"}),l.jsx("div",{style:{marginTop:"8px",fontSize:"12px"},children:this.state.errorInfo.componentStack})]})]}):this.props.children}}_i.propTypes={children:s.node.isRequired,name:s.string,fallback:s.func};const nl="_buttonsContainer_1ks7x_2",rl="_vertical_1ks7x_6",ol="_horizontal_1ks7x_9",sl="_button_1ks7x_2",il="_active_1ks7x_25",al="_buttonName_1ks7x_28",vt={buttonsContainer:nl,vertical:rl,horizontal:ol,button:sl,active:il,buttonName:al},ll="_left_1l4m4_2",cl="_top_1l4m4_40",ul="_bottom_1l4m4_79",dl="_right_1l4m4_118",fl={left:ll,top:cl,bottom:ul,right:dl},Ge=({text:e,position:t,styleCustom:n=null})=>{const{t:r}=se.useTranslation();return l.jsx("div",{className:`tooltip ${fl[t]}`,style:n,children:r(e)})};Ge.displayName="Tooltip";Ge.propTypes={text:s.string.isRequired,position:s.oneOf(["top","bottom","left","right"]).isRequired,styleCustom:s.object};const Yr=({buttons:e=[],orientation:t="horizontal",showName:n=!0,namePosition:r="right",useTooltip:o=!1,tooltipPosition:i="top"})=>{const{t:a}=se.useTranslation();return l.jsx("div",{className:`${vt.buttonsContainer} ${t==="vertical"&&vt.vertical}
22
22
  ${t==="horizontal"&&vt.horizontal}`,children:e.map((c,u)=>{const{icon:d,activeIcon:m,isActive:g,name:y,onClick:h,disabled:b}=c,f=l.jsxs(l.Fragment,{children:[n&&r==="left"&&l.jsx("span",{className:vt.buttonName,children:a(y)}),l.jsx("img",{src:g?m:d,alt:a(y)}),n&&r==="right"&&l.jsx("span",{className:vt.buttonName,children:a(y)})]});return l.jsxs("div",{className:"tooltip-parent",children:[l.jsx("button",{onClick:h,className:`${vt.button}
23
- ${g&&vt.active}`,disabled:b,children:f}),o&&l.jsx(Ge,{text:y,position:i})]},u)})})};Yr.displayName="ButtonsList";Yr.propTypes={buttons:s.arrayOf(s.shape({icon:s.node.isRequired,activeIcon:s.node,isActive:s.bool,name:s.string,onClick:s.func,disabled:s.bool})).isRequired,orientation:s.oneOf(["horizontal","vertical"]),showName:s.bool,namePosition:s.oneOf(["left","right"]),useTooltip:s.bool,tooltipPosition:s.oneOf(["top","bottom","left","right"])};const pl="_indicatorsCategory_11gdl_2",ml="_title_11gdl_6",hl="_mainTitle_11gdl_14",vn={indicatorsCategory:pl,title:ml,mainTitle:hl},ct=({isOpen:e,onClick:t,children:n,color:r,activeColor:o="#F8A925",title:i="Title",height:a=53,titleFontStyles:c,showBottomBar:u=!0,titleMarginChildren:d=15,mainTitle:m=!1})=>{const{t:g}=se.useTranslation();return l.jsxs(Ur.motion.div,{className:vn.indicatorsCategory,initial:{height:`${a}px`},animate:{height:e?"auto":`${a}px`},transition:{duration:.4},style:{backgroundColor:"white",borderBottom:e&&u?`1px solid ${o}`:"0px",minHeight:m?"70px":"50px"},children:[l.jsxs("h2",{style:{...c},className:`${vn.title} ${m&&vn.mainTitle}`,onClick:t,children:[l.jsx("span",{style:{color:e?o:r},children:e?"-":"+"}),l.jsx("span",{style:{color:e?o:r},children:g(i)})]}),l.jsx("div",{className:vn.content,style:{padding:m?"20px 0px":"0px"},children:n})]})};ct.displayName="DropdownList";ct.propTypes={isOpen:s.bool,onClick:s.func,children:s.node,color:s.string,activeColor:s.string,title:s.string,height:s.number,showBottomBar:s.bool,titleFontStyles:s.object};const Si=()=>l.jsx("div",{children:"EditAmbit"});Si.displayName="EditAmbit";const gl="data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1%201L13.9996%2013.9996'%20stroke='%23FDFDFD'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3cpath%20d='M14%201L1.00044%2013.9996'%20stroke='%23FDFDFD'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/svg%3e",yl="_AppliedFiltersContainer_cokx9_2",bl="_AppliedFilterContent_cokx9_11",ls={AppliedFiltersContainer:yl,AppliedFilterContent:bl},ye=Hr.create(e=>({activeCategory:"",activeSubCategory:"",selectedIndicator:"",tematicalFiltersSelected:[],fontColor:"#605B56",inputsColor:"#605B56",activeFiltersType:null})),Xr=({title:e,onClick:t,isOpen:n=!0,textColor:r="#ffffff",backgroundColor:o="#605B5680",activeColor:i,fontColor:a="#605B56"})=>{const{t:c}=se.useTranslation(),{tematicalFiltersSelected:u,activeFiltersType:d}=ye(y=>y),m=y=>{ye.setState(h=>({tematicalFiltersSelected:h.tematicalFiltersSelected.filter(b=>b.code!==y)}))},g=()=>{d=="applied"?ye.setState(()=>({activeFiltersType:null})):ye.setState(()=>({activeFiltersType:"applied"}))};return l.jsx(ct,{isOpen:n,onClick:g,title:e?c(e):"Applied Filters",activeColor:i,mainTitle:!0,color:a,children:l.jsx("div",{className:ls.AppliedFiltersContainer,children:u==null?void 0:u.map((y,h)=>l.jsxs("div",{className:ls.AppliedFilterContent,style:{color:r,background:o},children:[c(y.name),l.jsx("img",{src:gl,alt:"CloseIcon",onClick:()=>m(y.code),style:{cursor:"pointer"}})]},h))})})};Xr.displayName="AppliedFilters";Xr.propTypes={isOpen:s.bool,onClick:s.func,title:s.string,textColor:s.string,backgroundColor:s.string,indicators:s.arrayOf(s.shape({title:s.string.isRequired,Codename:s.string.isRequired})),activeColor:s.string};const vl="_layersList_cn837_25",xl="_layerName_cn837_34",cs={layersList:vl,layerName:xl},Qr=({title:e,isOpen:t=!0,fontColor:n="#605B56",backgroundColor:r="#605B5680",activeColor:o,geoLayers:i=[],onGeoLayersChange:a})=>{const{t:c}=se.useTranslation(),{activeFiltersType:u}=ye(g=>g),d=()=>{u==="geographical"?ye.setState({activeFiltersType:null}):ye.setState({activeFiltersType:"geographical"})},m=g=>{const y=i.map(h=>({...h,active:h.name===g.name}));a==null||a(y)};return l.jsx(ct,{isOpen:u==="geographical",onClick:d,title:e?c(e):"Geographical Filters",activeColor:o,color:n,mainTitle:!0,children:l.jsx("div",{className:cs.layersList,children:i.map(g=>l.jsx("div",{className:cs.layerName,style:{color:g.active?o:n,fontWeight:g.active?"bold":"normal"},onClick:()=>m(g),children:c(g.name)},g.name))})})};Qr.displayName="GeographicalFilters";Qr.propTypes={isOpen:s.bool,onClick:s.func,title:s.string,textColor:s.string,backgroundColor:s.string,activeColor:s.string};const Cl="_checkboxContainer_1nxra_2",_l={checkboxContainer:Cl},Jr=({onClick:e,containerStyles:t,color:n="#605B56",indicator:r,value:o})=>{const{t:i}=se.useTranslation(),{title:a}=r||{},{fontColor:c,inputsColor:u}=ye(d=>d);return l.jsxs("div",{style:{...t,color:n},role:"checkbox",className:_l.checkboxContainer,onClick:e,children:[l.jsx("input",{type:"checkbox",checked:typeof o=="boolean"?o:!0,value:o,readOnly:!0,style:{border:`1.5px solid ${o?u:c}`,backgroundColor:o?u:"white"}}),l.jsx("span",{className:"checkmark",children:i(a)})]})};Jr.displayName="CategoryCheckbox";Jr.propTypes={onClick:s.func,value:s.bool,containerStyles:s.object,color:s.string,indicator:s.shape({title:s.string,codename:s.array}),checkedColor:s.string};function Lr(e,t){return Lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Lr(e,t)}function Sl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Lr(e,t)}function Cr(e){return e&&e.stopPropagation&&e.stopPropagation(),e&&e.preventDefault&&e.preventDefault(),!1}function _r(e){return e==null?[]:Array.isArray(e)?e.slice():[e]}function xn(e){return e!==null&&e.length===1?e[0]:e.slice()}function Cn(e){Object.keys(e).forEach(t=>{typeof document<"u"&&document.addEventListener(t,e[t],!1)})}function xt(e,t){return Rr(function(n,r){let o=n;return o<=r.min&&(o=r.min),o>=r.max&&(o=r.max),o}(e,t),t)}function Rr(e,t){const n=(e-t.min)%t.step;let r=e-n;return 2*Math.abs(n)>=t.step&&(r+=n>0?t.step:-t.step),parseFloat(r.toFixed(5))}let Ir=function(e){function t(r){var o;(o=e.call(this,r)||this).onKeyUp=()=>{o.onEnd()},o.onMouseUp=()=>{o.onEnd(o.getMouseEventMap())},o.onTouchEnd=c=>{c.preventDefault(),o.onEnd(o.getTouchEventMap())},o.onBlur=()=>{o.setState({index:-1},o.onEnd(o.getKeyDownEventMap()))},o.onMouseMove=c=>{o.setState({pending:!0});const u=o.getMousePosition(c),d=o.getDiffPosition(u[0]),m=o.getValueFromPosition(d);o.move(m)},o.onTouchMove=c=>{if(c.touches.length>1)return;o.setState({pending:!0});const u=o.getTouchPosition(c);if(o.isScrolling===void 0){const g=u[0]-o.startPosition[0],y=u[1]-o.startPosition[1];o.isScrolling=Math.abs(y)>Math.abs(g)}if(o.isScrolling)return void o.setState({index:-1});const d=o.getDiffPosition(u[0]),m=o.getValueFromPosition(d);o.move(m)},o.onKeyDown=c=>{if(!(c.ctrlKey||c.shiftKey||c.altKey||c.metaKey))switch(o.setState({pending:!0}),c.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":c.preventDefault(),o.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":c.preventDefault(),o.moveUpByStep();break;case"Home":c.preventDefault(),o.move(o.props.min);break;case"End":c.preventDefault(),o.move(o.props.max);break;case"PageDown":c.preventDefault(),o.moveDownByStep(o.props.pageFn(o.props.step));break;case"PageUp":c.preventDefault(),o.moveUpByStep(o.props.pageFn(o.props.step))}},o.onSliderMouseDown=c=>{if(!o.props.disabled&&c.button!==2){if(o.setState({pending:!0}),!o.props.snapDragDisabled){const u=o.getMousePosition(c);o.forceValueFromPosition(u[0],d=>{o.start(d,u[0]),Cn(o.getMouseEventMap())})}Cr(c)}},o.onSliderClick=c=>{if(!o.props.disabled&&o.props.onSliderClick&&!o.hasMoved){const u=o.getMousePosition(c),d=xt(o.calcValue(o.calcOffsetFromPosition(u[0])),o.props);o.props.onSliderClick(d)}},o.createOnKeyDown=c=>u=>{o.props.disabled||(o.start(c),Cn(o.getKeyDownEventMap()),Cr(u))},o.createOnMouseDown=c=>u=>{if(o.props.disabled||u.button===2)return;o.setState({pending:!0});const d=o.getMousePosition(u);o.start(c,d[0]),Cn(o.getMouseEventMap()),Cr(u)},o.createOnTouchStart=c=>u=>{if(o.props.disabled||u.touches.length>1)return;o.setState({pending:!0});const d=o.getTouchPosition(u);o.startPosition=d,o.isScrolling=void 0,o.start(c,d[0]),Cn(o.getTouchEventMap()),function(m){m.stopPropagation&&m.stopPropagation()}(u)},o.handleResize=()=>{const c=window.setTimeout(()=>{o.pendingResizeTimeouts.shift(),o.resize()},0);o.pendingResizeTimeouts.push(c)},o.renderThumb=(c,u)=>{const d=o.props.thumbClassName+" "+o.props.thumbClassName+"-"+u+" "+(o.state.index===u?o.props.thumbActiveClassName:""),m={ref:y=>{o["thumb"+u]=y},key:o.props.thumbClassName+"-"+u,className:d,style:c,onMouseDown:o.createOnMouseDown(u),onTouchStart:o.createOnTouchStart(u),onFocus:o.createOnKeyDown(u),tabIndex:0,role:"slider","aria-orientation":o.props.orientation,"aria-valuenow":o.state.value[u],"aria-valuemin":o.props.min,"aria-valuemax":o.props.max,"aria-label":Array.isArray(o.props.ariaLabel)?o.props.ariaLabel[u]:o.props.ariaLabel,"aria-labelledby":Array.isArray(o.props.ariaLabelledby)?o.props.ariaLabelledby[u]:o.props.ariaLabelledby,"aria-disabled":o.props.disabled},g={index:u,value:xn(o.state.value),valueNow:o.state.value[u]};return o.props.ariaValuetext&&(m["aria-valuetext"]=typeof o.props.ariaValuetext=="string"?o.props.ariaValuetext:o.props.ariaValuetext(g)),o.props.renderThumb(m,g)},o.renderTrack=(c,u,d)=>{const m={key:o.props.trackClassName+"-"+c,className:o.props.trackClassName+" "+o.props.trackClassName+"-"+c,style:o.buildTrackStyle(u,o.state.upperBound-d)},g={index:c,value:xn(o.state.value)};return o.props.renderTrack(m,g)};let i=_r(r.value);i.length||(i=_r(r.defaultValue)),o.pendingResizeTimeouts=[];const a=[];for(let c=0;c<i.length;c+=1)i[c]=xt(i[c],r),a.push(c);return o.resizeObserver=null,o.resizeElementRef=S.createRef(),o.state={index:-1,upperBound:0,sliderLength:0,value:i,zIndices:a},o}Sl(t,e);var n=t.prototype;return n.componentDidMount=function(){typeof window<"u"&&(this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.resizeElementRef.current),this.resize())},t.getDerivedStateFromProps=function(r,o){const i=_r(r.value);return i.length?o.pending?null:{value:i.map(a=>xt(a,r))}:null},n.componentDidUpdate=function(){this.state.upperBound===0&&this.resize()},n.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),this.resizeObserver&&this.resizeObserver.disconnect()},n.onEnd=function(r){r&&function(o){Object.keys(o).forEach(i=>{typeof document<"u"&&document.removeEventListener(i,o[i],!1)})}(r),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pending:!1}),this.hasMoved=!1},n.getValue=function(){return xn(this.state.value)},n.getClosestIndex=function(r){let o=Number.MAX_VALUE,i=-1;const{value:a}=this.state,c=a.length;for(let u=0;u<c;u+=1){const d=this.calcOffset(a[u]),m=Math.abs(r-d);m<o&&(o=m,i=u)}return i},n.getMousePosition=function(r){return[r["page"+this.axisKey()],r["page"+this.orthogonalAxisKey()]]},n.getTouchPosition=function(r){const o=r.touches[0];return[o["page"+this.axisKey()],o["page"+this.orthogonalAxisKey()]]},n.getKeyDownEventMap=function(){return{keydown:this.onKeyDown,keyup:this.onKeyUp,focusout:this.onBlur}},n.getMouseEventMap=function(){return{mousemove:this.onMouseMove,mouseup:this.onMouseUp}},n.getTouchEventMap=function(){return{touchmove:this.onTouchMove,touchend:this.onTouchEnd}},n.getValueFromPosition=function(r){const o=r/(this.state.sliderLength-this.state.thumbSize)*(this.props.max-this.props.min);return xt(this.state.startValue+o,this.props)},n.getDiffPosition=function(r){let o=r-this.state.startPosition;return this.props.invert&&(o*=-1),o},n.resize=function(){const{slider:r,thumb0:o}=this;if(!r||!o)return;const i=this.sizeKey(),a=r.getBoundingClientRect(),c=r[i],u=a[this.posMaxKey()],d=a[this.posMinKey()],m=o.getBoundingClientRect()[i.replace("client","").toLowerCase()],g=c-m,y=Math.abs(u-d);this.state.upperBound===g&&this.state.sliderLength===y&&this.state.thumbSize===m||this.setState({upperBound:g,sliderLength:y,thumbSize:m})},n.calcOffset=function(r){const o=this.props.max-this.props.min;return o===0?0:(r-this.props.min)/o*this.state.upperBound},n.calcValue=function(r){return r/this.state.upperBound*(this.props.max-this.props.min)+this.props.min},n.calcOffsetFromPosition=function(r){const{slider:o}=this,i=o.getBoundingClientRect(),a=i[this.posMaxKey()],c=i[this.posMinKey()];let u=r-(window["page"+this.axisKey()+"Offset"]+(this.props.invert?a:c));return this.props.invert&&(u=this.state.sliderLength-u),u-=this.state.thumbSize/2,u},n.forceValueFromPosition=function(r,o){const i=this.calcOffsetFromPosition(r),a=this.getClosestIndex(i),c=xt(this.calcValue(i),this.props),u=this.state.value.slice();u[a]=c;for(let d=0;d<u.length-1;d+=1)if(u[d+1]-u[d]<this.props.minDistance)return;this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0,this.setState({value:u},()=>{o(a),this.fireChangeEvent("onChange")})},n.clearPendingResizeTimeouts=function(){do{const r=this.pendingResizeTimeouts.shift();clearTimeout(r)}while(this.pendingResizeTimeouts.length)},n.start=function(r,o){const i=this["thumb"+r];i&&i.focus();const{zIndices:a}=this.state;a.splice(a.indexOf(r),1),a.push(r),this.setState(c=>({startValue:c.value[r],startPosition:o!==void 0?o:c.startPosition,index:r,zIndices:a}))},n.moveUpByStep=function(r){r===void 0&&(r=this.props.step);const o=this.state.value[this.state.index],i=xt(this.props.invert&&this.props.orientation==="horizontal"?o-r:o+r,this.props);this.move(Math.min(i,this.props.max))},n.moveDownByStep=function(r){r===void 0&&(r=this.props.step);const o=this.state.value[this.state.index],i=xt(this.props.invert&&this.props.orientation==="horizontal"?o+r:o-r,this.props);this.move(Math.max(i,this.props.min))},n.move=function(r){const o=this.state.value.slice(),{index:i}=this.state,{length:a}=o,c=o[i];if(r===c)return;this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;const{pearling:u,max:d,min:m,minDistance:g}=this.props;if(!u){if(i>0){const y=o[i-1];r<y+g&&(r=y+g)}if(i<a-1){const y=o[i+1];r>y-g&&(r=y-g)}}o[i]=r,u&&a>1&&(r>c?(this.pushSucceeding(o,g,i),function(y,h,b,f){for(let x=0;x<y;x+=1){const _=f-x*b;h[y-1-x]>_&&(h[y-1-x]=_)}}(a,o,g,d)):r<c&&(this.pushPreceding(o,g,i),function(y,h,b,f){for(let x=0;x<y;x+=1){const _=f+x*b;h[x]<_&&(h[x]=_)}}(a,o,g,m))),this.setState({value:o},this.fireChangeEvent.bind(this,"onChange"))},n.pushSucceeding=function(r,o,i){let a,c;for(a=i,c=r[a]+o;r[a+1]!==null&&c>r[a+1];a+=1,c=r[a]+o)r[a+1]=Rr(c,this.props)},n.pushPreceding=function(r,o,i){for(let a=i,c=r[a]-o;r[a-1]!==null&&c<r[a-1];a-=1,c=r[a]-o)r[a-1]=Rr(c,this.props)},n.axisKey=function(){return this.props.orientation==="vertical"?"Y":"X"},n.orthogonalAxisKey=function(){return this.props.orientation==="vertical"?"X":"Y"},n.posMinKey=function(){return this.props.orientation==="vertical"?this.props.invert?"bottom":"top":this.props.invert?"right":"left"},n.posMaxKey=function(){return this.props.orientation==="vertical"?this.props.invert?"top":"bottom":this.props.invert?"left":"right"},n.sizeKey=function(){return this.props.orientation==="vertical"?"clientHeight":"clientWidth"},n.fireChangeEvent=function(r){this.props[r]&&this.props[r](xn(this.state.value),this.state.index)},n.buildThumbStyle=function(r,o){const i={position:"absolute",touchAction:"none",willChange:this.state.index>=0?this.posMinKey():void 0,zIndex:this.state.zIndices.indexOf(o)+1};return i[this.posMinKey()]=r+"px",i},n.buildTrackStyle=function(r,o){const i={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():void 0};return i[this.posMinKey()]=r,i[this.posMaxKey()]=o,i},n.buildMarkStyle=function(r){var o;return(o={position:"absolute"})[this.posMinKey()]=r,o},n.renderThumbs=function(r){const{length:o}=r,i=[];for(let c=0;c<o;c+=1)i[c]=this.buildThumbStyle(r[c],c);const a=[];for(let c=0;c<o;c+=1)a[c]=this.renderThumb(i[c],c);return a},n.renderTracks=function(r){const o=[],i=r.length-1;o.push(this.renderTrack(0,0,r[0]));for(let a=0;a<i;a+=1)o.push(this.renderTrack(a+1,r[a],r[a+1]));return o.push(this.renderTrack(i+1,r[i],this.state.upperBound)),o},n.renderMarks=function(){let{marks:r}=this.props;const o=this.props.max-this.props.min+1;return typeof r=="boolean"?r=Array.from({length:o}).map((i,a)=>a):typeof r=="number"&&(r=Array.from({length:o}).map((i,a)=>a).filter(i=>i%r==0)),r.map(parseFloat).sort((i,a)=>i-a).map(i=>{const a=this.calcOffset(i),c={key:i,className:this.props.markClassName,style:this.buildMarkStyle(a)};return this.props.renderMark(c)})},n.render=function(){const r=[],{value:o}=this.state,i=o.length;for(let d=0;d<i;d+=1)r[d]=this.calcOffset(o[d],d);const a=this.props.withTracks?this.renderTracks(r):null,c=this.renderThumbs(r),u=this.props.marks?this.renderMarks():null;return S.createElement("div",{ref:d=>{this.slider=d,this.resizeElementRef.current=d},style:{position:"relative"},className:this.props.className+(this.props.disabled?" disabled":""),onMouseDown:this.onSliderMouseDown,onClick:this.onSliderClick},a,c,u)},t}(S.Component);Ir.displayName="ReactSlider",Ir.defaultProps={min:0,max:100,step:1,pageFn:e=>10*e,minDistance:0,defaultValue:0,orientation:"horizontal",className:"slider",thumbClassName:"thumb",thumbActiveClassName:"active",trackClassName:"track",markClassName:"mark",withTracks:!0,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1,marks:[],renderThumb:e=>S.createElement("div",e),renderTrack:e=>S.createElement("div",e),renderMark:e=>S.createElement("span",e)};var Dr=Ir;const wl="_container_4u41i_2",Tl="_unitLabel_4u41i_8",kl="_slider_4u41i_11",jl="_thumb_4u41i_17",$l="_track_4u41i_26",Nl="_labels_4u41i_32",Ot={container:wl,unitLabel:Tl,slider:kl,thumb:jl,track:$l,labels:Nl},eo=({min:e=0,max:t=100,step:n=1,onChange:r,width:o=300,unit:i,fontColor:a="#605B56",defaultValue:c,isDate:u})=>{const{t:d}=se.useTranslation(),m=u?new Date(e).getTime():null,g=u?new Date(t).getTime():null,[y,h]=S.useState(u?[m,g]:[e,t]),b=f=>{h(f),r==null||r({min:f[0],max:f[1]})};return S.useEffect(()=>{h(c||(u?[m,g]:[e,t]))},[c,u]),l.jsxs("div",{className:Ot.container,style:{width:`${o}px`,color:`${a}`},children:[l.jsx("div",{className:Ot.unitLabel,children:l.jsx("span",{children:d(i)})}),l.jsx(Dr,{className:Ot.slider,thumbClassName:Ot.thumb,trackClassName:Ot.track,min:u?m:e,max:u?g:t,step:u?(g-m)/30:n,value:y,onAfterChange:b,withTracks:!0,pearling:!u,minDistance:u?0:.1}),l.jsxs("div",{className:Ot.labels,children:[l.jsx("span",{children:u?new Date(y[0]).toLocaleDateString("en-EN",{day:"2-digit",month:"short",year:"numeric"}):y[0]}),l.jsx("span",{children:u?new Date(y[1]).toLocaleDateString("en-EN",{day:"2-digit",month:"short",year:"numeric"}):y[1]})]})]})};eo.displayName="AbsoluteSlider";eo.propTypes={min:s.number,max:s.number,step:s.number,initialMin:s.number,initialMax:s.number,onChange:s.func,width:s.number,unit:s.string,fontColor:s.string,value:s.arrayOf(s.number)};const El="_tematicalFiltersInputContainer_1vm1r_2",Al="_inputTypeContainer_1vm1r_2",Ol="_checkboxContainer_1vm1r_28",Ml="_absoluteSliderContainer_1vm1r_37",_n={tematicalFiltersInputContainer:El,inputTypeContainer:Al,checkboxContainer:Ol,absoluteSliderContainer:Ml},Hn=({indicator:e,activeColor:t})=>{const[n,r]=S.useState(),{type:o,name:i,values:a,minValue:c,maxValue:u,unit:d,step:m,disabled:g,isDate:y}=e||{},h=S.useMemo(()=>o=="cat"||n=="cat",[n,o]),b=S.useMemo(()=>o=="abs"||n=="abs",[n,o]),{tematicalFiltersSelected:f,selectedIndicator:x,fontColor:_,inputsColor:w}=ye(v=>v),N=v=>{if(v){const{min:T,max:M,valueClicked:j,allValues:$}=v||{},{code:P,type:D,source:p}=e||{},E=b?"abs":h?"cat":"both";let k=P[0];D=="both"&&(k=E=="cat"?P[1]:P[0]),E=="cat"?ye.setState(R=>{let V=R.tematicalFiltersSelected.find(I=>I.code===k);if(V){let I=[V.values];return V.values.includes(j)?I=V.values.filter(z=>z!==j):I=[...V.values,j],I.length==$.length?{tematicalFiltersSelected:R.tematicalFiltersSelected.filter(z=>z.code!==k)}:{tematicalFiltersSelected:R.tematicalFiltersSelected.map(z=>z.code===k?{...z,values:I}:z)}}else{let I=($||[]).map((z,G)=>G);return{tematicalFiltersSelected:[...f,{type:"cat",code:k,values:I.filter(z=>z!==j),name:e.name,source:p,isDate:y}]}}}):E=="abs"&&ye.setState(R=>{let V=R.tematicalFiltersSelected.find(I=>I.code===k);if(T==e.minValue&&M==e.maxValue)return{tematicalFiltersSelected:R.tematicalFiltersSelected.filter(I=>I.code!==k)};if(V){let I={...V,min:T,max:M,type:E,isDate:y};return{tematicalFiltersSelected:R.tematicalFiltersSelected.map(z=>z.code===k?I:z)}}else return{tematicalFiltersSelected:[...f,{type:E,code:k,min:T,max:M,name:e.name,source:e.source}]}})}},C=S.useMemo(()=>{const v={};if((f==null?void 0:f.length)>0)for(const T of f)T.type==="cat"?v[T.code]=new Set(T.values):v[T.code]=[T.min,T.max];return v},[f]);return l.jsx("div",{className:_n.tematicalFiltersInputContainer,children:l.jsxs(ct,{titleFontStyles:{fontSize:16,fontWeight:400,opacity:g?.5:1},title:i,isOpen:x==`id${i}`,onClick:()=>{g||ye.setState(()=>({selectedIndicator:x==`id${i}`?"":`id${i}`}))},showBottomBar:!1,height:42,titleMarginChildren:14,className:"tematicalFiltersInputContainer",color:_,activeColor:t,children:[o=="both"&&l.jsxs("div",{className:_n.inputTypeContainer,style:{color:_},children:[l.jsxs("label",{children:[l.jsx("input",{type:"radio",name:"tipo",value:"abs",onChange:()=>{r("abs")},style:{marginRight:4,backgroundColor:n=="abs"?w:"white",border:`1.5px solid ${n=="abs"?w:_}`}}),"Absoluto"]}),l.jsxs("label",{children:[l.jsx("input",{type:"radio",name:"tipo",value:"cat",onChange:()=>{r("cat")},style:{marginRight:4,backgroundColor:n=="cat"?w:"white",border:`1.5px solid ${n=="cat"?w:_}`}}),"Categórico"]})]}),h&&l.jsx("div",{className:_n.checkboxContainer,children:(a||[]).map((v,T)=>{var M;return l.jsx(Jr,{onClick:()=>N({valueClicked:T,allValues:a}),indicator:v,value:((M=C[e.code[o=="both"?1:0]])==null?void 0:M.has(T))||!C[e.code[o=="both"?1:0]]},`checkbox-${T}`)})}),(b||o=="glb")&&l.jsx("div",{className:_n.absoluteSliderContainer,children:l.jsx(eo,{onChange:N,min:c,max:u,unit:d,defaultValue:C[e.code[0]]?C[e.code[0]]:"",isDate:y,step:m})})]})})};Hn.displayName="TematicalFiltersInput";Hn.propTypes={indicator:s.shape({name:s.string,type:s.string,code:s.arrayOf(s.string),values:s.arrayOf(s.shape({codename:s.oneOfType(s.array,s.string),title:s.string}))}),activeColor:s.string};const to=({subcategory:e,fontColor:t,activeColor:n})=>{const{activeSubcategory:r}=ye(a=>a),{name:o,indicators:i}=e||{};return l.jsx(ct,{title:o,isOpen:r==`id${o}`,onClick:()=>{ye.setState(a=>({activeSubcategory:a.activeSubcategory===`id${o}`?"":`id${o}`}))},titleFontStyles:{fontSize:16,fontWeight:400},showBottomBar:!1,titleMarginChildren:20,height:48,color:t,activeColor:n,children:i==null?void 0:i.map((a,c)=>l.jsx(Hn,{indicator:a,fontColor:t,activeColor:n},`indicatorSub-${c}`))})};to.displayName="TematicalFiltersSubcat";to.propTypes={subcategory:s.shape({name:s.string,indicators:s.arrayOf(s.shape({name:s.string,value:s.string}))}),activeColor:s.string};const no=({category:e,activeColor:t})=>{const{name:n,subcategories:r,indicators:o}=e||{},{activeCategory:i,fontColor:a}=ye(c=>c);return e&&l.jsx(ct,{onClick:()=>{ye.setState(c=>({activeCategory:i===`id${n}`?"":`id${n}`}))},title:n,isOpen:i===`id${n}`,titleFontStyles:{fontSize:18,fontWeight:"bold"},showBottomBar:!1,color:a,activeColor:t,children:r?r.map((c,u)=>l.jsx(to,{subcategory:c,fontColor:a,activeColor:t},`subcategory-${u}`)):o&&o.map((c,u)=>l.jsx(Hn,{indicator:c,fontColor:a,activeColor:t},`indicator-${u}`))})};no.displayName="TematicalFiltersCategory";no.propTypes={category:s.shape({name:s.string.isRequired,subcategories:s.array,indicators:s.array}),activeColor:s.string};const Bn=({indicators:e,isOpen:t=!0,title:n,fontColor:r="#605B56",inputsColor:o="#605B56",activeColor:i,isExtra:a=!1})=>{const{tematicalFiltersSelected:c,activeFiltersType:u}=ye(g=>g),{t:d}=se.useTranslation();S.useEffect(()=>{r&&ye.setState(()=>({fontColor:r}))},[r]),S.useEffect(()=>{o&&ye.setState(()=>({inputsColor:o}))},[o]);const m=()=>{a?u==a?ye.setState(()=>({activeFiltersType:null})):ye.setState(()=>({activeFiltersType:a})):u=="tematical"?ye.setState(()=>({activeFiltersType:null})):ye.setState(()=>({activeFiltersType:"tematical"}))};return l.jsx(ct,{isOpen:a&&u==a||!a&&u=="tematical",title:n?d(n):"Tematical filters",color:r,activeColor:i,onClick:m,mainTitle:!0,children:e==null?void 0:e.map((g,y)=>l.jsx(no,{category:g,fontColor:r,activeColor:i},`category-${y}`))})};Bn.displayName="TematicalFilters";Bn.propTypes={isOpen:s.bool,title:s.string,indicators:s.arrayOf(s.object),fontColor:s.string,onChangeTematicalFilters:s.func,inputsColor:s.string,activeColor:s.string};const Ll="_FiltersAmbitContainer_ei39o_2",Rl="_FiltersContainer_ei39o_15",Il="_FiltersAmbitHeader_ei39o_18",Dl="_FiltersAmbitTitle_ei39o_26",Bl="_FiltersAmbitDescription_ei39o_35",Pl="_FiltersAmbitDescriptionTitle_ei39o_48",Fl="_warning_ei39o_57",Vl="_buttonContainer_ei39o_60",ft={FiltersAmbitContainer:Ll,FiltersContainer:Rl,FiltersAmbitHeader:Il,FiltersAmbitTitle:Dl,FiltersAmbitDescription:Bl,FiltersAmbitDescriptionTitle:Pl,warning:Fl,buttonContainer:Vl},ro=({ambitName:e,ambitDescription:t,defaultFilters:n,indicators:r,activeColor:o,textColor:i,backgroundColor:a,onChangeAppliedFilters:c,saveAmbit:u,namePlaceholder:d,descPlaceholder:m,filtersTypes:g=["geographical","tematical"],nameRequiredText:y,geoLayers:h=[],onGeoLayersChange:b,onlyFilters:f=!1,descriptionRequired:x=!1,extraLists:_=!1})=>{const{t:w}=se.useTranslation(),{tematicalFiltersSelected:N,activeFiltersType:C}=ye(p=>p),[v,T]=S.useState(e||null),[M,j]=S.useState(t||null),[$,P]=S.useState(!1);S.useEffect(()=>{ye.setState({tematicalFiltersSelected:n||[]})},[n]),S.useRef(!1),S.useEffect(()=>{c(N)},[N]);const D=()=>{x?v&&M?u({name:v,description:M}):P(!0):v?u({name:v,description:M}):P(!0)};return S.useEffect(()=>{if(g.includes("geographical")&&C!="geographical"&&h.length>0){const p=h.map(E=>({...E,active:!1}));b==null||b(p)}},[C]),l.jsxs("div",{className:ft.FiltersAmbitContainer,children:[l.jsxs("div",{className:ft.FiltersContainer,children:[!f&&l.jsxs("div",{className:ft.FiltersAmbitHeader,children:[l.jsx("div",{className:ft.FiltersAmbitTitle,children:l.jsx("input",{type:"text",onChange:p=>{P(!1),T(p.target.value)},value:v,placeholder:w(d)})}),l.jsx("div",{className:ft.FiltersAmbitDescription,children:l.jsx("div",{className:ft.FiltersAmbitDescriptionTitle,children:l.jsx("textarea",{value:M,onChange:p=>{x&&P(!1),j(p.target.value)},placeholder:w(m)})})})]}),l.jsx(Xr,{title:w("applied_filters"),isOpen:C=="applied",textColor:i||"#fff",backgroundColor:a||"#605B5680",activeColor:o}),g.includes("geographical")&&l.jsx(Qr,{title:"geo_filters",activeColor:o,geoLayers:h,onGeoLayersChange:b}),g.includes("extra")&&_.map(p=>l.jsx(Bn,{indicators:p.indicators,inputsColor:o,textColor:i,title:p.title,activeColor:o,isExtra:p.title})),g.includes("tematical")&&l.jsx(Bn,{indicators:r,inputsColor:o,textColor:i,title:"tematical_filters",activeColor:o,isExtra:!1})]}),!f&&l.jsxs("div",{className:ft.buttonContainer,children:[$&&l.jsx("div",{className:ft.warning,children:w(y)}),l.jsx(Zt,{onClick:()=>D(),children:w("save_ambit")})]})]})};ro.displayName="FiltersAmbit";ro.propTypes={indicators:s.arrayOf(s.object).isRequired,ambitName:s.string,ambitDescription:s.string,defaultFilters:s.arrayOf(s.object),activeColor:s.string,backgroundColor:s.string,textColor:s.string,onChangeAppliedFilters:s.func,saveAmbit:s.func,namePlaceholder:s.string,descPlaceholder:s.string,filtersTypes:s.arrayOf(s.string).isRequired,nameRequiredText:s.string,extraLists:s.arrayOf(s.object)};const zl="_barChartContainer_1ly7h_2",us={barChartContainer:zl},Kn=({data:e,barHeight:t=25,gap:n=23,fontColor:r="#605B56",leftPadding:o=200,numberOfDivisions:i=7,maxValue:a=null,orientation:c="horizontal",horizontalPadding:u=c=="vertical"?50:20,verticalPadding:d=10,xLabelPadding:m=c=="vertical"?50:40,containerWidth:g=700,containerHeight:y=500,mainColor:h="#000"})=>{const{xScale:b,yScale:f,ticks:x,height:_,chartWidth:w,svgWidth:N,svgHeight:C,contentWidth:v}=S.useMemo(()=>{if(e&&e.length>0){const T=mr.max(e,j=>j.value)||1,M=a||T;if(c==="vertical"){const j=e.length*(t+n)+u*2,$=Math.max(j,g||0),P=y,p=mr.scaleLinear().domain([0,M]).range([P-100,d]),E=Array.from({length:i+1},(k,R)=>M/i*R);return{yScale:p,ticks:E,height:P,chartWidth:$,svgWidth:$,svgHeight:P,contentWidth:j}}else{const j=e.length*(t+n);console.log("barsHeight: ",j);const $=j+d*2+m+30,P=g+o+u*2,D=mr.scaleLinear().domain([0,M]).range([0,g-u*2]),p=Array.from({length:i+1},(E,k)=>M/i*k);return{xScale:D,ticks:p,height:$,chartWidth:g,svgWidth:P,svgHeight:$,contentWidth:P}}}else return{xScale:null,yScale:null,ticks:[],height:0,svgHeight:0}},[e,i,t,n,u,d,a,c,o,g,y]);return c==="vertical"?l.jsx("div",{style:{width:"100%",height:y?`${y}px`:"100%","--main-color":h},className:us.barChartContainer,children:l.jsx("svg",{width:N,height:C,style:{display:"block",width:N,height:C,maxWidth:"none","--main-color":h},children:l.jsxs("g",{transform:`translate(${u}, 0)`,children:[l.jsx("g",{children:x.map((T,M)=>{const j=f(T);return l.jsxs("g",{children:[l.jsx("line",{x1:0,x2:w-u*2,y1:j,y2:j,stroke:"#ccc"}),l.jsx("text",{x:-10,y:j+4,textAnchor:"end",fontSize:10,fill:r,children:parseInt(T)})]},M)})}),e&&e.length>0&&e.map((T,M)=>{const j=f(0)-f(T.value),$=M*(t+n),P=f(T.value);return l.jsxs("g",{children:[l.jsx("rect",{x:$,y:P,width:t,height:j,fill:T.color,rx:0}),l.jsx("text",{x:$+t/2,y:_-m,textAnchor:"start",fill:r,fontSize:12,transform:`rotate(-90, ${$+t/2}, ${_-m})`,children:T.title})]},M)})]})})}):(console.log("svgHeight: ",C),l.jsx("div",{style:{width:"100%",height:y?`${y}px`:"100%","--main-color":h},className:us.barChartContainer,children:l.jsx("svg",{width:N,height:C,style:{minWidth:"100%",height:C,width:v,maxWidth:"none"},children:l.jsxs("g",{transform:`translate(0,${d})`,children:[l.jsx("g",{transform:`translate(${o+u}, 0)`,children:x.map((T,M)=>{const j=b(T);return l.jsxs("g",{transform:`translate(${j}, 0)`,children:[l.jsx("line",{y1:0,y2:e.length*(t+n),stroke:"#ccc"}),l.jsx("text",{y:e.length*(t+n)+30,textAnchor:"middle",fontSize:10,fill:r,children:parseInt(T)})]},M)})}),e&&e.length>0&&e.map((T,M)=>{const j=b(T.value),$=M*(t+n);return console.log("y: ",$),l.jsxs("g",{transform:`translate(${o+u}, ${$})`,children:[l.jsx("text",{x:-24,y:t/2+5,textAnchor:"end",fill:r,fontSize:12,children:T.title}),l.jsx("rect",{width:j,height:t,fill:T.color,rx:0})]},M)})]})})}))};Kn.displayName="BarChart";Kn.propTypes={data:s.arrayOf(s.shape({title:s.string,value:s.number,color:s.string})),length:s.number,barHeight:s.number,gap:s.number,verticalPadding:s.number,horizontalPadding:s.number,numberOfDivisions:s.number,fontColor:s.string,leftPadding:s.number,maxValue:s.number,orientation:s.oneOf(["horizontal","vertical"]),xLabelPadding:s.number,containerWidth:s.number,containerHeight:s.number,minBarWidth:s.number};const ql="_graphicContainer_1ozwp_2",Wl="_titleContainer_1ozwp_13",ds={graphicContainer:ql,titleContainer:Wl},oo=({data:e,graphLength:t=700,containerStyle:n,borderColor:r="#605B56",title:o="Graphic Title",fontColor:i="#605B56",maxValue:a=null,numberOfDivisions:c=7,leftPadding:u=-200,orientation:d="horizontal",xLabelPadding:m=0,mainColor:g})=>{const{t:y}=se.useTranslation();return l.jsxs("div",{className:ds.graphicContainer,style:{...n||{},paddingBottom:40},children:[l.jsx("div",{className:ds.titleContainer,children:l.jsx("h2",{children:y(o)})}),l.jsx(Kn,{data:e,length:t,fontColor:i,maxValue:a,numberOfDivisions:c,leftPadding:u,orientation:d,xLabelPadding:m,mainColor:g})]})};oo.displayName="Graphic";oo.propTypes={data:s.arrayOf(s.shape({color:s.string.isRequired,value:s.number.isRequired,title:s.string.isRequired})),borderColor:s.string,title:s.string,graphLength:s.number,containerStyle:s.object,fontColor:s.string,mainColor:s.string,maxValue:s.number,numberOfDivisions:s.number,leftPadding:s.number,xLabelPadding:s.number};const Ul="_indicatorsCategory_arwy3_2",Hl="_title_arwy3_5",Kl="_list_arwy3_13",Sn={indicatorsCategory:Ul,title:Hl,list:Kl},Zl="data:image/svg+xml,%3csvg%20width='8'%20height='8'%20viewBox='0%200%208%208'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.32549%200H4.65882V3.40392H8V4.61176H4.65882V8H3.32549V4.61176H0V3.40392H3.32549V0Z'%20fill='%23605B56'/%3e%3c/svg%3e",Gl="data:image/svg+xml,%3csvg%20width='8'%20height='8'%20viewBox='0%200%208%208'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.32549%200H4.65882V3.40392H8V4.61176H4.65882V8H3.32549V4.61176H0V3.40392H3.32549V0Z'%20fill='%23ffffff'/%3e%3c/svg%3e",et=Hr.create(e=>({activeColor:null,defaultColor:"#92898A",multiple:!1,activeIndicatorType:null,activeIndicatorSubcategory:""})),wi=({indicator:e,subcatIndex:t,indicatorSubcategory:n})=>{const r={},o=new Set;return Object.entries(e).forEach(([i,a])=>{const c=i.match(/^(.*)_subcat_(\d+)$/);if(c){const[u,d,m]=c;Number(m)===t&&(r[d]=a,o.add(d))}}),Object.entries(e).forEach(([i,a])=>{!i.includes("_subcat_")&&!o.has(i)&&(r[i]=a)}),r.activeIndicatorSubcategory=n,r},Yl="_indicatorContainer_swmx0_2",Xl="_indicatorNameContainer_swmx0_12",Ql="_dot_swmx0_19",Jl="_indicatorName_swmx0_12",ec="_switchExternalContainer_swmx0_33",tc="_switchType_swmx0_42",nc="_switchTypeOptions_swmx0_46",rc="_optionContainer_swmx0_57",oc="_customRadious_swmx0_67",sc="_optionText_swmx0_74",ve={indicatorContainer:Yl,indicatorNameContainer:Xl,dot:Ql,indicatorName:Jl,switchExternalContainer:ec,switchType:tc,switchTypeOptions:nc,optionContainer:rc,customRadious:oc,optionText:sc},Zn=({indicator:e,values:t=[],activeIndicator:n,onClickIndicator:r,onChangeType:o,onChangeIndicatorSubcategory:i})=>{const{t:a}=se.useTranslation(),{name:c,type:u,disabled:d,indicatorSubcategories:m}=e,{activeIndicatorType:g,activeColor:y,defaultColor:h,multiple:b,activeIndicatorSubcategory:f}=et(v=>v),[x,_]=S.useState(!1);S.useEffect(()=>{n&&_(b?n.some(v=>v.name==String(c)):n.name==c)},[n]);const w=()=>l.jsx("div",{className:ve.switchExternalContainer,children:l.jsx("div",{className:ve.switchType,children:l.jsxs("div",{className:ve.switchTypeOptions,children:[l.jsxs("div",{className:ve.optionContainer,onClick:()=>{et.setState(v=>({...v,activeIndicatorType:"cat"})),o("cat")},children:[l.jsx("span",{className:`${ve.customRadious}`,style:{backgroundColor:g==="cat"?y:"transparent",borderColor:g==="cat"?y:h}}),l.jsx("h4",{className:ve.optionText,style:{color:g==="cat"?y:h},children:a("indicators.cat")})]}),l.jsxs("div",{className:ve.optionContainer,onClick:()=>{et.setState(v=>({...v,activeIndicatorType:"abs"})),o("abs")},children:[l.jsx("span",{className:`${ve.customRadious}`,style:{backgroundColor:g==="abs"?y:"transparent",borderColor:g==="abs"?y:h}}),l.jsx("h4",{className:ve.optionText,style:{color:g==="abs"?y:h},children:a("indicators.abs")})]})]})})}),N=()=>l.jsx("div",{className:ve.switchExternalContainer,children:l.jsx("div",{className:ve.switchType,children:l.jsx("div",{className:ve.switchTypeOptions,children:m==null?void 0:m.map((v,T)=>l.jsxs("div",{className:ve.optionContainer,onClick:()=>{et.setState(j=>({...j,activeIndicatorSubcategory:v.title}));let M=wi({indicator:e,subcatIndex:T,indicatorSubcategory:v.title});i&&i({indicator:M})},children:[l.jsx("span",{className:`${ve.customRadious}`,style:{backgroundColor:f===v.title?y:"transparent",borderColor:f===v.title?y:h}}),l.jsx("h4",{className:ve.optionText,style:{color:f===v.title?y:h},children:a(v.title)})]},`indicatorSubcategory-${v.title}`))})})}),C=()=>l.jsx("div",{className:ve.switchExternalContainer,children:l.jsx("div",{className:ve.switchType,children:l.jsx("div",{className:ve.switchTypeOptions,children:t.map((v,T)=>l.jsxs("div",{className:ve.optionContainer,children:[l.jsx("span",{className:ve.customRadious}),l.jsx("h4",{children:a(v.unit)})]},T))})})});return l.jsxs("div",{className:ve.indicatorContainer,children:[l.jsxs("div",{className:ve.indicatorNameContainer,onClick:()=>!d&&r({indicator:e}),children:[l.jsx("div",{style:{border:x?`1px solid ${y}`:`1px solid ${h}`,opacity:d?.5:1,backgroundColor:x?y:"transparent"},className:ve.dot,children:b&&l.jsx("img",{src:x?Gl:Zl,alt:""})}),l.jsx("h4",{className:ve.indicatorName,style:{color:x?y:h,opacity:d?.5:1},children:l.jsx(se.Trans,{i18nKey:c,components:{sup:l.jsx("sup",{})},shouldUnescape:!0})})]}),(n==null?void 0:n.name)===c&&u==="both"&&w(),(n==null?void 0:n.name)===c&&u==="twoUnits"&&C(),(n==null?void 0:n.name)===c&&m&&m.length>0&&N()]})};Zn.displayName="Indicator";Zn.propTypes={indicator:s.shape({name:s.string,type:s.string}),values:s.oneOfType([s.bool,s.array]),activeColor:s.string,defaultColor:s.string,activeIndicator:s.oneOfType([s.object,s.array]),multiple:s.bool,onClickIndicator:s.func};const ic="_indicatorsSubCategory_1nuug_2",ac="_list_1nuug_11",fs={indicatorsSubCategory:ic,list:ac},so=({subcName:e,indicators:t,activeSubCategory:n,onClickSubCategory:r,id:o,activeIndicator:i,onClickIndicator:a,onChangeType:c,onChangeIndicatorSubcategory:u})=>{const{t:d}=se.useTranslation(),[m,g]=S.useState(!1);S.useEffect(()=>{g(n==o)},[n,o]);const{activeIndicatorType:y,activeColor:h,defaultColor:b,multiple:f,activeIndicatorSubcategory:x}=et(_=>_);return l.jsxs(Ur.motion.div,{className:fs.indicatorsSubCategory,initial:{height:"43px"},animate:{height:m?"auto":"43px"},transition:{duration:.4},children:[l.jsx("button",{onClick:()=>r(o),children:l.jsxs("h3",{style:{color:m?h:b},children:[l.jsx("span",{style:{color:m?h:b},children:m?"-":"+"}),l.jsx("span",{style:{color:m?h:b},children:d(e)})]})}),t&&l.jsx("div",{className:fs.list,children:t==null?void 0:t.map((_,w)=>l.jsx(Zn,{indicator:_,activeIndicator:i,onClickIndicator:a,onChangeType:c,onChangeIndicatorSubcategory:u},"indicator"+w))})]})};so.displayName="IndicatorSubCategory";so.propTypes={subcName:s.string,indicators:s.array,activeColor:s.string,defaultColor:s.string,activeSubCategory:s.string,id:s.string,activeIndicator:s.oneOfType([s.object,s.array]),multiple:s.bool,onClickSubCategory:s.func,onClickIndicator:s.func};const io=({cat:e,id:t,onClickCategory:n,activeCategory:r,activeSubCategory:o,onClickSubCategory:i,activeIndicator:a,onClickIndicator:c,onChangeType:u,onChangeIndicatorSubcategory:d})=>{var _;const{t:m}=se.useTranslation(),{activeIndicatorType:g,activeColor:y,defaultColor:h,multiple:b}=et(w=>w),[f,x]=S.useState(!1);return S.useEffect(()=>{x(r===t)},[r,t]),l.jsxs(Ur.motion.div,{className:Sn.indicatorsCategory,initial:{height:"53px"},animate:{height:f?"auto":"53px"},transition:{duration:.4},style:{backgroundColor:"white",borderBottom:f?`1px solid ${y}`:"0px",marginBottom:f?"20px":"0px"},children:[l.jsxs("h2",{className:`${Sn.title}`,onClick:()=>n(t),children:[l.jsx("span",{className:Sn.plus,style:{color:f?y:h},children:f?"-":"+"}),l.jsx("span",{style:{color:f?y:h},children:m(e.name)})]}),e.subcategories?e.subcategories.map(({name:w,subcategory:N,indicators:C},v)=>l.jsx(so,{id:N,activeSubCategory:o,subcName:w,onClickSubCategory:i,activeIndicator:a,onClickIndicator:c,indicators:C,onChangeType:u,onChangeIndicatorSubcategory:d},`subcKey ${v}`)):l.jsx("div",{className:Sn.list,children:(_=e.indicators)==null?void 0:_.map((w,N)=>l.jsx(Zn,{indicator:w,values:w.type=="twoUnits"&&w.values,activeIndicator:a,onClickIndicator:c,onChangeType:u,onChangeIndicatorSubcategory:d},`indicator${N}`))})]})};io.displayName="IndicatorsCategory";io.propTypes={cat:s.object,id:s.string,onChange:s.func,onClickCategory:s.func,activeCategory:s.string,activeSubCategory:s.string,onClickSubCategory:s.func,onClickIndicator:s.func,activeIndicator:s.oneOfType([s.object,s.array]),multiple:s.bool,activeColor:s.string,defaultColor:s.string};const lc="_indicatorsList_13b3m_2",cc="_title_13b3m_6",ps={indicatorsList:lc,title:cc},Br=(e,t)=>{if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>Br(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(o=>Br(e[o],t[o]))}return!1},ao=({indicators:e,activeColor:t,defaultColor:n="#92898A",onChange:r,multiple:o=!1,defaultValue:i=null,changeIndType:a,activeIndicatorType:c,onChangeIndicatorSubcategory:u})=>{const{t:d}=se.useTranslation(),[m,g]=S.useState(),[y,h]=S.useState(),[b,f]=S.useState(),x=S.useRef(i),_=S.useRef(!1);S.useEffect(()=>{et.setState({activeColor:t||"",defaultColor:n||"",multiple:o||!1,activeIndicatorType:c||null})},[t,n,o,c]);const w=j=>{g(m==j?null:j)},N=j=>{h(y==j?null:j)},C=({indicator:j})=>{if(j!=null&&j.indicatorSubcategories&&j.indicatorSubcategories.length>0){const $=j.indicatorSubcategories[0],P=wi({indicator:j,subcatIndex:0,indicatorSubcategory:$.title});et.setState({activeIndicatorSubcategory:$.title}),T(P,!0),u&&u({indicator:P})}else et.setState({activeIndicatorSubcategory:null}),T(j)},v=({indicator:j})=>{T(j,!0),u&&u({indicator:j})},T=(j,$=!1,P=!1)=>{if(o){let D=b&&b.length>0?[...b]:[];const p=D==null?void 0:D.some(k=>k.name==j.name);let E;$?E=j:E=p?D.filter(k=>k.name!=String(j.name)):[...D,j],f(E),j.type=="both"&&a("cat"),r&&typeof r=="function"&&($||!(j!=null&&j.indicatorSubcategories))&&!P&&r({activeIndicator:E})}else{let D;$?D=j:D=(b==null?void 0:b.name)==j.name?null:j,f(D),(j==null?void 0:j.type)=="both"&&a("cat"),r&&typeof r=="function"&&($||!(j!=null&&j.indicatorSubcategories))&&!P&&r({activeIndicator:D})}};S.useLayoutEffect(()=>{var j;if(x.current&&!b){_.current=!0;try{o&&Array.isArray(x.current)?(f([...x.current]),M((j=x.current[0])==null?void 0:j.name)):x.current&&(T(x.current,!1,!0),M(x.current.name))}finally{_.current=!1}}},[]),S.useEffect(()=>{var j;if(!_.current&&!Br(i,b)){_.current=!0;try{const{activeIndicatorSubcategory:$}=i||{};$&&et.setState({activeIndicatorSubcategory:$}),o&&Array.isArray(i)?(f([...i]),M((j=i[0])==null?void 0:j.name)):i?(T(i,!1,!0),M(i.name)):(f(o?[]:null),g(null),h(null))}finally{_.current=!1}}},[i]);const M=j=>{const $=e.find(P=>{if(P.subcategories){let D=P.subcategories.find(p=>p.indicators.find(E=>E.name==j));if(D)return h(D.subcategory),D}else return P.indicators.some(D=>D.name==j)});$&&g($.category)};return l.jsxs("div",{className:ps.indicatorsList,children:[l.jsx("h2",{className:ps.title,style:{color:n},children:d("indicators.indicators")}),e.map((j,$)=>l.jsx(io,{id:j.category,cat:j,onClickCategory:w,activeCategory:m,onClickSubCategory:N,activeSubCategory:y,onClickIndicator:C,activeIndicator:b,onChange:r,onChangeType:a,onChangeIndicatorSubcategory:v},`categoryKey${$}`))]})};ao.displayName="IndicatorsList";ao.propTypes={indicators:s.arrayOf(s.object),activeColor:s.string,defaultColor:s.string,onChange:s.func,changeIndType:s.func,multiple:s.bool,activeIndicator:s.oneOfType([s.object,s.array]),defaultValue:s.oneOfType([s.object,s.array]),activeIndicatorType:s.string,onChangeIndicatorSubcategory:s.func};const uc="_langSelector_o9enq_2",dc="_currentLang_o9enq_14",fc="_arrow_o9enq_26",pc="_prevImg_o9enq_29",mc="_langMenu_o9enq_33",Mt={langSelector:uc,currentLang:dc,arrow:fc,prevImg:pc,langMenu:mc},lo=({langs:e,arrow:t,imgPrev:n})=>{const[r,o]=S.useState(!1),{i18n:i}=se.useTranslation(),a=e.find(u=>u.code==i.language),c=u=>{i.changeLanguage(u),o(!1)};return l.jsxs("div",{className:Mt.langSelector,children:[l.jsxs("div",{className:Mt.currentLang,onClick:()=>{o(!r)},children:[n&&l.jsx("img",{className:Mt.prevImg,src:n}),(a==null?void 0:a.titleSelected)||(a==null?void 0:a.title),l.jsx("img",{src:t,className:Mt.arrow})]}),r&&l.jsx("div",{className:Mt.langMenu,children:e.map(u=>l.jsx("button",{className:(a==null?void 0:a.code)==u.code?Mt.active:"",onClick:()=>c(u.code),children:u.title},u.code))})]})};lo.displayName="LangSelector";lo.propTypes={langs:s.arrayOf(s.shape({code:s.string,title:s.string,titleSelected:s.string})),color:s.string,bckColor:s.string,hoverColor:s.string,arrow:s.object,imgPrev:s.string||s.object};const hc="_legendContainer_r9cd6_3",gc="_closeButton_r9cd6_43",yc="_titleContainer_r9cd6_71",bc="_infoContainer_r9cd6_77",vc="_titleLegendList_r9cd6_88",xc="_legendListContainer_r9cd6_94",Cc="_gridContainer_r9cd6_94",_c="_elementLegendContainer_r9cd6_100",Sc="_colorDot_r9cd6_106",wc="_absoluteValueContainer_r9cd6_112",Tc="_absoluteValueColor_r9cd6_115",kc="_absoluteValueText_r9cd6_120",jc="_noDataContainer_r9cd6_132",$c="_noData_r9cd6_132",Nc="_moreInfoContainer_r9cd6_153",Ae={legendContainer:hc,closeButton:gc,titleContainer:yc,infoContainer:bc,titleLegendList:vc,legendListContainer:xc,gridContainer:Cc,elementLegendContainer:_c,colorDot:Sc,absoluteValueContainer:wc,absoluteValueColor:Tc,absoluteValueText:kc,noDataContainer:jc,noData:$c,moreInfoContainer:Nc},co=({containerStyles:e,title:t,infoList:n,legendItems:r,onClickMoreInfo:o,buttonTitle:i,onClickClose:a})=>{const{t:c}=se.useTranslation();return l.jsxs("div",{style:e?{...e}:{},className:`${Ae.legendContainer}`,children:[l.jsx("button",{className:Ae.closeButton,onClick:a}),t&&l.jsx("div",{className:Ae.titleContainer,style:{marginBottom:(!n||n.length==0)&&"15px"},children:l.jsx("h2",{children:t})}),n&&n.length>0&&l.jsx("div",{className:Ae.infoContainer,children:l.jsx("ul",{children:n.map(({title:u,value:d},m)=>l.jsxs("li",{children:[l.jsx("h3",{className:Ae.title,children:`${u}:`}),l.jsxs("span",{className:Ae.value,children:["  ",d]})]},`${u}-${m}`))})}),r&&r.length>0&&r.map((u,d)=>l.jsxs("div",{children:[l.jsx("h3",{className:Ae.titleLegendList,style:{marginTop:n&&n.length>0&&d===0?"30px":d>0?"20px":"0px"},children:u.title&&l.jsx(se.Trans,{i18nKey:u.title,components:{sup:l.jsx("sup",{})},shouldUnescape:!0})}),l.jsxs("div",{className:Ae.legendListContainer,children:[u.absolute?l.jsxs("div",{className:Ae.absoluteValueContainer,children:[l.jsx("div",{className:Ae.absoluteValueColor,style:{background:`linear-gradient(to bottom, ${u.absolute.maxColor} 0%, ${u.absolute.midColor?`${u.absolute.midColor} 50%,`:""} ${u.absolute.minColor} 100%)`}}),l.jsxs("div",{className:Ae.absoluteValueText,children:[l.jsxs("span",{children:[u.absolute.maxValue," ",c(u.absolute.unit)," ",u.absolute.offlimits&&c(u.moreText)]}),u.absolute.midValue&&l.jsxs("span",{children:[u.absolute.midValue," ",c(u.absolute.unit)]}),l.jsxs("span",{children:[u.absolute.minValue," ",c(u.absolute.unit)," ",u.absolute.offlimits&&c(u.lessText)]})]})]}):u.categories&&u.categories.length>0&&l.jsx("div",{className:Ae.gridContainer,children:u.categories.map(({title:m,color:g},y)=>l.jsxs("div",{className:Ae.elementLegendContainer,children:[l.jsx("div",{className:Ae.colorDot,style:{backgroundColor:g}}),l.jsxs("div",{className:Ae.titleLegendElement,children:[c(m)," "]})]},y))}),u.absolute&&u.absolute.noDataColor&&l.jsxs("div",{className:Ae.noDataContainer,children:[l.jsx("div",{className:Ae.noData,style:{background:u.absolute.noDataColor}}),l.jsx("div",{className:Ae.absoluteValueText,children:l.jsx("span",{children:c(u.absolute.noDataText)})})]})]})]},d)),o&&l.jsx("button",{className:Ae.moreInfoContainer,onClick:o,children:i||c("moreInformation")})]})};co.displayName="Legend";co.propTypes={title:s.string,containerStyles:s.object,infoList:s.arrayOf(s.shape({title:s.string.isRequired,value:s.oneOfType([s.string,s.number])})),legendItems:s.arrayOf(s.shape({title:s.string,categories:s.arrayOf(s.shape({title:s.string,color:s.string})),absolute:s.shape({maxColor:s.string,minColor:s.string,midColor:s.string,maxValue:s.number,minValue:s.number,midValue:s.number,unit:s.string,noDataColor:s.string,noDataText:s.string})})),onClickMoreInfo:s.func,buttonTitle:s.string,onClickClose:s.func};const Ec="_logo_1ewa6_2",ms={logo:Ec},uo=({src:e,alt:t,href:n})=>{const{t:r}=se.useTranslation(),o=l.jsx("img",{src:e,alt:r(t)});return n?l.jsx("div",{className:ms.logo,children:l.jsx("a",{href:n,children:o})}):l.jsx("div",{className:ms.logo,children:o})};uo.displayName="LogoApp";uo.propTypes={src:s.string.isRequired,alt:s.string.isRequired,href:s.string,className:s.string};const Ac=J.createContext(null);function Oc(e,t){const n=Array.isArray(e)?e[0]:e?e.x:0,r=Array.isArray(e)?e[1]:e?e.y:0,o=Array.isArray(t)?t[0]:t?t.x:0,i=Array.isArray(t)?t[1]:t?t.y:0;return n===o&&r===i}function Ve(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Ve(e[n],t[n]))return!1;return!0}else if(Array.isArray(t))return!1;if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!t.hasOwnProperty(o)||!Ve(e[o],t[o]))return!1;return!0}return!1}function Mc(e){const t=e.clone();return t.pixelsToGLUnits=e.pixelsToGLUnits,t}function hs(e,t){if(!e.getProjection)return;const n=e.getProjection(),r=t.getProjection();Ve(n,r)||t.setProjection(n)}function gs(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function ys(e,t){const n=t.viewState||t;let r=!1;if("zoom"in n){const o=e.zoom;e.zoom=n.zoom,r=r||o!==e.zoom}if("bearing"in n){const o=e.bearing;e.bearing=n.bearing,r=r||o!==e.bearing}if("pitch"in n){const o=e.pitch;e.pitch=n.pitch,r=r||o!==e.pitch}if(n.padding&&!e.isPaddingEqual(n.padding)&&(r=!0,e.padding=n.padding),"longitude"in n&&"latitude"in n){const o=e.center;e.center=new o.constructor(n.longitude,n.latitude),r=r||o!==e.center}return r}const Lc=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function bs(e){if(!e)return null;if(typeof e=="string"||("toJS"in e&&(e=e.toJS()),!e.layers))return e;const t={};for(const r of e.layers)t[r.id]=r;const n=e.layers.map(r=>{let o=null;"interactive"in r&&(o=Object.assign({},r),delete o.interactive);const i=t[r.ref];if(i){o=o||Object.assign({},r),delete o.ref;for(const a of Lc)a in i&&(o[a]=i[a])}return o||r});return{...e,layers:n}}const vs={version:8,sources:{},layers:[]},xs={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},Sr={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},Cs={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},Rc=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],Ic=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class Ht{constructor(t,n,r){this._map=null,this._internalUpdate=!1,this._inRender=!1,this._hoveredFeatures=null,this._deferredEvents={move:!1,zoom:!1,pitch:!1,rotate:!1},this._onEvent=o=>{const i=this.props[Cs[o.type]];i?i(o):o.type==="error"&&console.error(o.error)},this._onPointerEvent=o=>{(o.type==="mousemove"||o.type==="mouseout")&&this._updateHover(o);const i=this.props[xs[o.type]];i&&(this.props.interactiveLayerIds&&o.type!=="mouseover"&&o.type!=="mouseout"&&(o.features=this._hoveredFeatures||this._queryRenderedFeatures(o.point)),i(o),delete o.features)},this._onCameraEvent=o=>{if(!this._internalUpdate){const i=this.props[Sr[o.type]];i&&i(o)}o.type in this._deferredEvents&&(this._deferredEvents[o.type]=!1)},this._MapClass=t,this.props=n,this._initialize(r)}get map(){return this._map}get transform(){return this._renderTransform}setProps(t){const n=this.props;this.props=t;const r=this._updateSettings(t,n);r&&this._createShadowTransform(this._map);const o=this._updateSize(t),i=this._updateViewState(t,!0);this._updateStyle(t,n),this._updateStyleComponents(t,n),this._updateHandlers(t,n),(r||o||i&&!this._map.isMoving())&&this.redraw()}static reuse(t,n){const r=Ht.savedMaps.pop();if(!r)return null;const o=r.map,i=o.getContainer();for(n.className=i.className;i.childNodes.length>0;)n.appendChild(i.childNodes[0]);o._container=n;const a=o._resizeObserver;a&&(a.disconnect(),a.observe(n)),r.setProps({...t,styleDiffing:!1}),o.resize();const{initialViewState:c}=t;return c&&(c.bounds?o.fitBounds(c.bounds,{...c.fitBoundsOptions,duration:0}):r._updateViewState(c,!1)),o.isStyleLoaded()?o.fire("load"):o.once("styledata",()=>o.fire("load")),o._update(),r}_initialize(t){const{props:n}=this,{mapStyle:r=vs}=n,o={...n,...n.initialViewState,accessToken:n.mapboxAccessToken||Dc()||null,container:t,style:bs(r)},i=o.initialViewState||o.viewState||o;if(Object.assign(o,{center:[i.longitude||0,i.latitude||0],zoom:i.zoom||0,pitch:i.pitch||0,bearing:i.bearing||0}),n.gl){const m=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=m,n.gl)}const a=new this._MapClass(o);i.padding&&a.setPadding(i.padding),n.cursor&&(a.getCanvas().style.cursor=n.cursor),this._createShadowTransform(a);const c=a._render;a._render=m=>{this._inRender=!0,c.call(a,m),this._inRender=!1};const u=a._renderTaskQueue.run;a._renderTaskQueue.run=m=>{u.call(a._renderTaskQueue,m),this._onBeforeRepaint()},a.on("render",()=>this._onAfterRepaint());const d=a.fire;a.fire=this._fireEvent.bind(this,d),a.on("resize",()=>{this._renderTransform.resize(a.transform.width,a.transform.height)}),a.on("styledata",()=>{this._updateStyleComponents(this.props,{}),hs(a.transform,this._renderTransform)}),a.on("sourcedata",()=>this._updateStyleComponents(this.props,{}));for(const m in xs)a.on(m,this._onPointerEvent);for(const m in Sr)a.on(m,this._onCameraEvent);for(const m in Cs)a.on(m,this._onEvent);this._map=a}recycle(){const n=this.map.getContainer().querySelector("[mapboxgl-children]");n==null||n.remove(),Ht.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const t=this._map;!this._inRender&&t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}_createShadowTransform(t){const n=Mc(t.transform);t.painter.transform=n,this._renderTransform=n}_updateSize(t){const{viewState:n}=t;if(n){const r=this._map;if(n.width!==r.transform.width||n.height!==r.transform.height)return r.resize(),!0}return!1}_updateViewState(t,n){if(this._internalUpdate)return!1;const r=this._map,o=this._renderTransform,{zoom:i,pitch:a,bearing:c}=o,u=r.isMoving();u&&(o.cameraElevationReference="sea");const d=ys(o,{...gs(r.transform),...t});if(u&&(o.cameraElevationReference="ground"),d&&n){const m=this._deferredEvents;m.move=!0,m.zoom||(m.zoom=i!==o.zoom),m.rotate||(m.rotate=c!==o.bearing),m.pitch||(m.pitch=a!==o.pitch)}return u||ys(r.transform,t),d}_updateSettings(t,n){const r=this._map;let o=!1;for(const i of Rc)if(i in t&&!Ve(t[i],n[i])){o=!0;const a=r[`set${i[0].toUpperCase()}${i.slice(1)}`];a==null||a.call(r,t[i])}return o}_updateStyle(t,n){if(t.cursor!==n.cursor&&(this._map.getCanvas().style.cursor=t.cursor||""),t.mapStyle!==n.mapStyle){const{mapStyle:r=vs,styleDiffing:o=!0}=t,i={diff:o};return"localIdeographFontFamily"in t&&(i.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(bs(r),i),!0}return!1}_updateStyleComponents(t,n){const r=this._map;let o=!1;return r.isStyleLoaded()&&("light"in t&&r.setLight&&!Ve(t.light,n.light)&&(o=!0,r.setLight(t.light)),"fog"in t&&r.setFog&&!Ve(t.fog,n.fog)&&(o=!0,r.setFog(t.fog)),"terrain"in t&&r.setTerrain&&!Ve(t.terrain,n.terrain)&&(!t.terrain||r.getSource(t.terrain.source))&&(o=!0,r.setTerrain(t.terrain))),o}_updateHandlers(t,n){var r,o;const i=this._map;let a=!1;for(const c of Ic){const u=(r=t[c])!==null&&r!==void 0?r:!0,d=(o=n[c])!==null&&o!==void 0?o:!0;Ve(u,d)||(a=!0,u?i[c].enable(u):i[c].disable())}return a}_queryRenderedFeatures(t){const n=this._map,r=n.transform,{interactiveLayerIds:o=[]}=this.props;try{return n.transform=this._renderTransform,n.queryRenderedFeatures(t,{layers:o.filter(n.getLayer.bind(n))})}catch{return[]}finally{n.transform=r}}_updateHover(t){var n;const{props:r}=this;if(r.interactiveLayerIds&&(r.onMouseMove||r.onMouseEnter||r.onMouseLeave)){const i=t.type,a=((n=this._hoveredFeatures)===null||n===void 0?void 0:n.length)>0,c=this._queryRenderedFeatures(t.point),u=c.length>0;!u&&a&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=c,u&&!a&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=i}else this._hoveredFeatures=null}_fireEvent(t,n,r){const o=this._map,i=o.transform,a=typeof n=="string"?n:n.type;return a==="move"&&this._updateViewState(this.props,!1),a in Sr&&(typeof n=="object"&&(n.viewState=gs(i)),this._map.isMoving())?(o.transform=this._renderTransform,t.call(o,n,r),o.transform=i,o):(t.call(o,n,r),o)}_onBeforeRepaint(){const t=this._map;this._internalUpdate=!0;for(const r in this._deferredEvents)this._deferredEvents[r]&&t.fire(r);this._internalUpdate=!1;const n=this._map.transform;t.transform=this._renderTransform,this._onAfterRepaint=()=>{hs(this._renderTransform,n),t.transform=n}}}Ht.savedMaps=[];function Dc(){let e=null;if(typeof location<"u"){const t=/access_token=([^&\/]*)/.exec(location.search);e=t&&t[1]}try{e=e||process.env.MapboxAccessToken}catch{}try{e=e||process.env.REACT_APP_MAPBOX_ACCESS_TOKEN}catch{}return e}const Bc=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function Pc(e){if(!e)return null;const t=e.map,n={getMap:()=>t,getCenter:()=>e.transform.center,getZoom:()=>e.transform.zoom,getBearing:()=>e.transform.bearing,getPitch:()=>e.transform.pitch,getPadding:()=>e.transform.padding,getBounds:()=>e.transform.getBounds(),project:r=>{const o=t.transform;t.transform=e.transform;const i=t.project(r);return t.transform=o,i},unproject:r=>{const o=t.transform;t.transform=e.transform;const i=t.unproject(r);return t.transform=o,i},queryTerrainElevation:(r,o)=>{const i=t.transform;t.transform=e.transform;const a=t.queryTerrainElevation(r,o);return t.transform=i,a},queryRenderedFeatures:(r,o)=>{const i=t.transform;t.transform=e.transform;const a=t.queryRenderedFeatures(r,o);return t.transform=i,a}};for(const r of Fc(t))!(r in n)&&!Bc.includes(r)&&(n[r]=t[r].bind(t));return n}function Fc(e){const t=new Set;let n=e;for(;n;){for(const r of Object.getOwnPropertyNames(n))r[0]!=="_"&&typeof e[r]=="function"&&r!=="fire"&&r!=="setEventedParent"&&t.add(r);n=Object.getPrototypeOf(n)}return Array.from(t)}const Vc=typeof document<"u"?S.useLayoutEffect:S.useEffect,zc=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"];function qc(e,t){for(const r of zc)r in t&&(e[r]=t[r]);const{RTLTextPlugin:n="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js"}=t;n&&e.getRTLTextPluginStatus&&e.getRTLTextPluginStatus()==="unavailable"&&e.setRTLTextPlugin(n,r=>{r&&console.error(r)},!0)}const Gt=J.createContext(null);function Wc(e,t,n){const r=S.useContext(Ac),[o,i]=S.useState(null),a=S.useRef(),{current:c}=S.useRef({mapLib:null,map:null});S.useEffect(()=>{const m=e.mapLib;let g=!0,y;return Promise.resolve(m||n).then(h=>{if(!g)return;if(!h)throw new Error("Invalid mapLib");const b="Map"in h?h:h.default;if(!b.Map)throw new Error("Invalid mapLib");if(qc(b,e),!b.supported||b.supported(e))e.reuseMaps&&(y=Ht.reuse(e,a.current)),y||(y=new Ht(b.Map,e,a.current)),c.map=Pc(y),c.mapLib=b,i(y),r==null||r.onMapMount(c.map,e.id);else throw new Error("Map is not supported by this browser")}).catch(h=>{const{onError:b}=e;b?b({type:"error",target:null,originalEvent:null,error:h}):console.error(h)}),()=>{g=!1,y&&(r==null||r.onMapUnmount(e.id),e.reuseMaps?y.recycle():y.destroy())}},[]),Vc(()=>{o&&o.setProps(e)}),S.useImperativeHandle(t,()=>c.map,[o]);const u=S.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]),d={height:"100%"};return J.createElement("div",{id:e.id,ref:a,style:u},o&&J.createElement(Gt.Provider,{value:c},J.createElement("div",{"mapboxgl-children":"",style:d},e.children)))}const Uc=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function Nt(e,t){if(!e||!t)return;const n=e.style;for(const r in t){const o=t[r];Number.isFinite(o)&&!Uc.test(r)?n[r]=`${o}px`:n[r]=o}}function Hc(e,t){const{map:n,mapLib:r}=S.useContext(Gt),o=S.useRef({props:e});o.current.props=e;const i=S.useMemo(()=>{let f=!1;J.Children.forEach(e.children,w=>{w&&(f=!0)});const x={...e,element:f?document.createElement("div"):null},_=new r.Marker(x);return _.setLngLat([e.longitude,e.latitude]),_.getElement().addEventListener("click",w=>{var N,C;(C=(N=o.current.props).onClick)===null||C===void 0||C.call(N,{type:"click",target:_,originalEvent:w})}),_.on("dragstart",w=>{var N,C;const v=w;v.lngLat=i.getLngLat(),(C=(N=o.current.props).onDragStart)===null||C===void 0||C.call(N,v)}),_.on("drag",w=>{var N,C;const v=w;v.lngLat=i.getLngLat(),(C=(N=o.current.props).onDrag)===null||C===void 0||C.call(N,v)}),_.on("dragend",w=>{var N,C;const v=w;v.lngLat=i.getLngLat(),(C=(N=o.current.props).onDragEnd)===null||C===void 0||C.call(N,v)}),_},[]);S.useEffect(()=>(i.addTo(n.getMap()),()=>{i.remove()}),[]);const{longitude:a,latitude:c,offset:u,style:d,draggable:m=!1,popup:g=null,rotation:y=0,rotationAlignment:h="auto",pitchAlignment:b="auto"}=e;return S.useEffect(()=>{Nt(i.getElement(),d)},[d]),S.useImperativeHandle(t,()=>i,[]),(i.getLngLat().lng!==a||i.getLngLat().lat!==c)&&i.setLngLat([a,c]),u&&!Oc(i.getOffset(),u)&&i.setOffset(u),i.isDraggable()!==m&&i.setDraggable(m),i.getRotation()!==y&&i.setRotation(y),i.getRotationAlignment()!==h&&i.setRotationAlignment(h),i.getPitchAlignment()!==b&&i.setPitchAlignment(b),i.getPopup()!==g&&i.setPopup(g),yi.createPortal(e.children,i.getElement())}S.memo(S.forwardRef(Hc));function _s(e){return new Set(e?e.trim().split(/\s+/):[])}function Kc(e,t){const{map:n,mapLib:r}=S.useContext(Gt),o=S.useMemo(()=>document.createElement("div"),[]),i=S.useRef({props:e});i.current.props=e;const a=S.useMemo(()=>{const c={...e},u=new r.Popup(c);return u.setLngLat([e.longitude,e.latitude]),u.once("open",d=>{var m,g;(g=(m=i.current.props).onOpen)===null||g===void 0||g.call(m,d)}),u},[]);if(S.useEffect(()=>{const c=u=>{var d,m;(m=(d=i.current.props).onClose)===null||m===void 0||m.call(d,u)};return a.on("close",c),a.setDOMContent(o).addTo(n.getMap()),()=>{a.off("close",c),a.isOpen()&&a.remove()}},[]),S.useEffect(()=>{Nt(a.getElement(),e.style)},[e.style]),S.useImperativeHandle(t,()=>a,[]),a.isOpen()&&((a.getLngLat().lng!==e.longitude||a.getLngLat().lat!==e.latitude)&&a.setLngLat([e.longitude,e.latitude]),e.offset&&!Ve(a.options.offset,e.offset)&&a.setOffset(e.offset),(a.options.anchor!==e.anchor||a.options.maxWidth!==e.maxWidth)&&(a.options.anchor=e.anchor,a.setMaxWidth(e.maxWidth)),a.options.className!==e.className)){const c=_s(a.options.className),u=_s(e.className);for(const d of c)u.has(d)||a.removeClassName(d);for(const d of u)c.has(d)||a.addClassName(d);a.options.className=e.className}return yi.createPortal(e.children,o)}const Zc=S.memo(S.forwardRef(Kc));function dn(e,t,n,r){const o=S.useContext(Gt),i=S.useMemo(()=>e(o),[]);return S.useEffect(()=>{const a=t,c=null,u=typeof t=="function"?t:null,{map:d}=o;return d.hasControl(i)||(d.addControl(i,a==null?void 0:a.position),c&&c(o)),()=>{u&&u(o),d.hasControl(i)&&d.removeControl(i)}},[]),i}function Gc(e){const t=dn(({mapLib:n})=>new n.AttributionControl(e),{position:e.position});return S.useEffect(()=>{Nt(t._container,e.style)},[e.style]),null}S.memo(Gc);function Yc(e){const t=dn(({mapLib:n})=>new n.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return S.useEffect(()=>{Nt(t._controlContainer,e.style)},[e.style]),null}S.memo(Yc);function Xc(e,t){const n=S.useRef({props:e}),r=dn(({mapLib:o})=>{const i=new o.GeolocateControl(e),a=i._setupUI;return i._setupUI=c=>{i._container.hasChildNodes()||a(c)},i.on("geolocate",c=>{var u,d;(d=(u=n.current.props).onGeolocate)===null||d===void 0||d.call(u,c)}),i.on("error",c=>{var u,d;(d=(u=n.current.props).onError)===null||d===void 0||d.call(u,c)}),i.on("outofmaxbounds",c=>{var u,d;(d=(u=n.current.props).onOutOfMaxBounds)===null||d===void 0||d.call(u,c)}),i.on("trackuserlocationstart",c=>{var u,d;(d=(u=n.current.props).onTrackUserLocationStart)===null||d===void 0||d.call(u,c)}),i.on("trackuserlocationend",c=>{var u,d;(d=(u=n.current.props).onTrackUserLocationEnd)===null||d===void 0||d.call(u,c)}),i},{position:e.position});return n.current.props=e,S.useImperativeHandle(t,()=>r,[]),S.useEffect(()=>{Nt(r._container,e.style)},[e.style]),null}S.memo(S.forwardRef(Xc));function Qc(e){const t=dn(({mapLib:n})=>new n.NavigationControl(e),{position:e.position});return S.useEffect(()=>{Nt(t._container,e.style)},[e.style]),null}const Jc=S.memo(Qc);function e0(e){const t=dn(({mapLib:i})=>new i.ScaleControl(e),{position:e.position}),n=S.useRef(e),r=n.current;n.current=e;const{style:o}=e;return e.maxWidth!==void 0&&e.maxWidth!==r.maxWidth&&(t.options.maxWidth=e.maxWidth),e.unit!==void 0&&e.unit!==r.unit&&t.setUnit(e.unit),S.useEffect(()=>{Nt(t._container,o)},[o]),null}S.memo(e0);function Pn(e,t){if(!e)throw new Error(t)}function t0(e,t,n,r){if(Pn(n.id===r.id,"layer id changed"),Pn(n.type===r.type,"layer type changed"),n.type==="custom"||r.type==="custom")return;const{layout:o={},paint:i={},filter:a,minzoom:c,maxzoom:u,beforeId:d}=n;if(d!==r.beforeId&&e.moveLayer(t,d),o!==r.layout){const m=r.layout||{};for(const g in o)Ve(o[g],m[g])||e.setLayoutProperty(t,g,o[g]);for(const g in m)o.hasOwnProperty(g)||e.setLayoutProperty(t,g,void 0)}if(i!==r.paint){const m=r.paint||{};for(const g in i)Ve(i[g],m[g])||e.setPaintProperty(t,g,i[g]);for(const g in m)i.hasOwnProperty(g)||e.setPaintProperty(t,g,void 0)}Ve(a,r.filter)||e.setFilter(t,a),(c!==r.minzoom||u!==r.maxzoom)&&e.setLayerZoomRange(t,c,u)}function n0(e,t,n){if(e.style&&e.style._loaded&&(!("source"in n)||e.getSource(n.source))){const r={...n,id:t};delete r.beforeId,e.addLayer(r,n.beforeId)}}let r0=0;function o0(e){const t=S.useContext(Gt).map.getMap(),n=S.useRef(e),[,r]=S.useState(0),o=S.useMemo(()=>e.id||`jsx-layer-${r0++}`,[]);if(S.useEffect(()=>{if(t){const a=()=>r(c=>c+1);return t.on("styledata",a),a(),()=>{t.off("styledata",a),t.style&&t.style._loaded&&t.getLayer(o)&&t.removeLayer(o)}}},[t]),t&&t.style&&t.getLayer(o))try{t0(t,o,e,n.current)}catch(a){console.warn(a)}else n0(t,o,e);return n.current=e,null}let s0=0;function i0(e,t,n){if(e.style&&e.style._loaded){const r={...n};return delete r.id,delete r.children,e.addSource(t,r),e.getSource(t)}return null}function a0(e,t,n){Pn(t.id===n.id,"source id changed"),Pn(t.type===n.type,"source type changed");let r="",o=0;for(const a in t)a!=="children"&&a!=="id"&&!Ve(n[a],t[a])&&(r=a,o++);if(!o)return;const i=t.type;i==="geojson"?e.setData(t.data):i==="image"?e.updateImage({url:t.url,coordinates:t.coordinates}):"setCoordinates"in e&&o===1&&r==="coordinates"?e.setCoordinates(t.coordinates):"setUrl"in e&&r==="url"?e.setUrl(t.url):"setTiles"in e&&r==="tiles"?e.setTiles(t.tiles):console.warn(`Unable to update <Source> prop: ${r}`)}function l0(e){const t=S.useContext(Gt).map.getMap(),n=S.useRef(e),[,r]=S.useState(0),o=S.useMemo(()=>e.id||`jsx-source-${s0++}`,[]);S.useEffect(()=>{if(t){const a=()=>setTimeout(()=>r(c=>c+1),0);return t.on("styledata",a),a(),()=>{var c;if(t.off("styledata",a),t.style&&t.style._loaded&&t.getSource(o)){const u=(c=t.getStyle())===null||c===void 0?void 0:c.layers;if(u)for(const d of u)d.source===o&&t.removeLayer(d.id);t.removeSource(o)}}}},[t]);let i=t&&t.style&&t.getSource(o);return i?a0(i,e,n.current):i=i0(t,o,e),n.current=e,i&&J.Children.map(e.children,a=>a&&S.cloneElement(a,{source:o}))||null}const c0=import("mapbox-gl"),Ti=J.forwardRef(function(t,n){return Wc(t,n,c0)}),ki=Zc,ji=Jc,$i=o0,Ni=l0,u0="_mapContainer_84pkf_2",d0={mapContainer:u0};xa.accessToken="pk.eyJ1IjoiY2ljbGljYSIsImEiOiJja3llODhxZ2UwYzF1Mm5xcHVhMzI3anhqIn0.-r56FLAzEH57eVsB2ZeVcA";const fo=({initialView:e={latitude:39.4699,longitude:-.3763,zoom:12},maxZoom:t=17,minZoom:n=8,mapStyle:r,firstSymbolLayer:o,cssProps:i={},onClick:a="",interactiveLayers:c=[],popUp:u=!1,sources:d=[],layers:m=[]})=>{const g=S.useRef(),[y,h]=S.useState(null),b=Ca.useSelector(f=>f.mapState.showTexts);return S.useEffect(()=>{if(g.current){const f=g.current.getMap();f.getStyle().layers.map(_=>{_.type=="symbol"&&_.id!="professionals"&&(b?f.setLayoutProperty(_.id,"visibility","visible"):f.setLayoutProperty(_.id,"visibility","none"))})}},[b]),l.jsx("div",{className:`${d0.mapContainer}`,style:i,children:l.jsxs(Ti,{initialViewState:e,ref:g,hash:!1,maxZoom:t,minZoom:n,mapStyle:r,onClick:a,interactiveLayerIds:c,children:[d.length&&d.map((f,x)=>l.jsx(Ni,{...f,children:m.length&&m.map((_,w)=>{if(_.sourceId==f.id)return l.jsx($i,{..._.layer,beforeId:o},w)})},x)),l.jsx(ji,{position:"bottom-right",visualizePitch:!0}),u&&y&&l.jsx(ki,{longitude:u.longitude,latitude:u.latitude,anchor:u.anchor,onClose:()=>h(null),children:u.content})]})})};fo.displayName="MapboxMap";fo.propTypes={initialView:s.shape({latitude:s.number.isRequired,longitude:s.number.isRequired,zoom:s.number.isRequired}),mapStyle:s.object,firstSymbolLayer:s.string,cssProps:s.object,style:s.object,maxZoom:s.number,minZoom:s.number,onClick:s.func,interactiveLayers:s.array,popUp:s.shape({latitude:s.number,longitude:s.number,anchor:s.string,content:s.element}),textsUrl:s.string,sources:s.arrayOf(s.shape({id:s.string,type:s.string,url:s.string,data:s.object})),layers:s.arrayOf(s.shape({sourceId:s.string,layer:s.shape({id:s.string,type:s.string,sourceLayer:s.string,minZoom:s.number,maxZoom:s.number,paint:s.object})}))};const f0="_mapContainer_1r3q4_3",p0={mapContainer:f0},m0="_FeaturePopUp_oymb1_2",h0="_title_oymb1_10",g0="_button_oymb1_15",wr={FeaturePopUp:m0,title:h0,button:g0},Ei=({props:e})=>{const{t}=se.useTranslation();return l.jsx("div",{className:wr.FeaturePopUp,children:e.map((n,r)=>n.type!="button"?l.jsxs("p",{children:[l.jsxs("span",{className:wr.title,children:[l.jsx(se.Trans,{i18nKey:n.name,components:{sup:l.jsx("sup",{})},shouldUnescape:!0}),":"]}),n.type&&n.type=="html"?l.jsx("span",{dangerouslySetInnerHTML:{__html:n.value}}):isNaN(n.value)?l.jsx(l.Fragment,{children:t(n.value)}):l.jsxs(l.Fragment,{children:[n.value.toLocaleString("de",{maximumFractionDigits:2})," ",t(n.unit)]})]},r):l.jsx("button",{className:wr.button,onClick:()=>n.onClick(),children:n.name},r))})};Ei.displayName="FeaturePopUp";const po=({initialView:e={latitude:39.4699,longitude:-.3763,zoom:12},maxZoom:t=17,minZoom:n=8,mapStyle:r,firstSymbolLayer:o,cssProps:i={},onClick:a="",interactiveLayers:c=[],sources:u=[],layers:d=[],popUpParams:m,onClosePopUp:g,showTexts:y,hash:h=!1})=>{const b=S.useRef();return S.useEffect(()=>{if(b.current){const f=b.current.getMap();f.getStyle().layers.map(_=>{_.type=="symbol"&&_.id!="professionals"&&(y?f.setLayoutProperty(_.id,"visibility","visible"):f.setLayoutProperty(_.id,"visibility","none"))})}},[y]),S.useEffect(()=>{let f=new _a.Protocol;return pr.addProtocol("pmtiles",f.tile),()=>{pr.removeProtocol("pmtiles")}},[]),l.jsx("div",{className:`${p0.mapContainer}`,style:i,children:l.jsxs(Ti,{mapLib:pr,initialViewState:e,ref:b,hash:h,maxZoom:t,minZoom:n,mapStyle:r,onClick:a,interactiveLayerIds:c,children:[u.length&&u.map((f,x)=>l.jsx(Ni,{...f,children:d.length&&d.map((_,w)=>{if(_.sourceId==f.id)return l.jsx($i,{..._.layer,beforeId:o,filter:_.filters?_.filters:["all"],layout:{visibility:_.layer.visibility||"visible"}},w)})},x)),l.jsx(ji,{position:"bottom-right",visualizePitch:!0}),m&&l.jsx(ki,{longitude:m.lng,latitude:m.lat,onClose:g,children:l.jsx(Ei,{props:m.props})})]})})};po.displayName="MaplibreMap";po.propTypes={initialView:s.shape({latitude:s.number.isRequired,longitude:s.number.isRequired,zoom:s.number.isRequired}),mapStyle:s.string,firstSymbolLayer:s.string,cssProps:s.object,style:s.object,maxZoom:s.number,minZoom:s.number,onClick:s.func,interactiveLayers:s.array,popUp:s.bool,sources:s.arrayOf(s.shape({id:s.string,type:s.string,url:s.string,data:s.object})),layers:s.arrayOf(s.shape({sourceId:s.string,layer:s.shape({id:s.string,type:s.string,sourceLayer:s.string,minzoom:s.number,maxzoom:s.number,paint:s.object,visibility:s.string}),filters:s.array})),showTexts:s.bool,popUpParams:s.object,onClosePopUp:s.func};const y0="_sectionBar_yf2vy_2",b0="_leftContent_yf2vy_14",v0="_textContainer_yf2vy_20",x0="_title_yf2vy_27",C0="_subtitle_yf2vy_33",_0="_rightContent_yf2vy_38",Ct={sectionBar:y0,leftContent:b0,textContainer:v0,title:x0,subtitle:C0,rightContent:_0},mo=({leftIcon:e,title:t,subtitle:n,rightContent:r,mainColor:o,width:i,titleColor:a="#605b56",subTitleColor:c="#605b56",borderTop:u=!1})=>{const{t:d}=se.useTranslation();return l.jsxs("div",{className:Ct.sectionBar,style:{width:i&&i,borderTop:u?"1px solid #000":"0px"},children:[l.jsxs("div",{className:Ct.leftContent,children:[e&&l.jsx("img",{src:e,alt:"Icono",className:Ct.icon}),l.jsxs("div",{className:Ct.textContainer,children:[l.jsx("div",{className:Ct.title,style:{color:a},children:d(t)}),n&&l.jsx("div",{className:Ct.subtitle,style:{color:c},children:n})]})]}),l.jsx("div",{className:Ct.rightContent,children:r})]})};mo.displayName="SectionBar";mo.propTypes={leftIcon:s.string,title:s.string.isRequired,subtitle:s.string,rightContent:s.node,mainColor:s.string,width:s.oneOfType([s.string,s.number]),borderTop:s.bool};const S0=Sa.createSlice({name:"mapSlice",initialState:{showTexts:!0,sliderSelectedYear:2025,activeIndicatorKey:0,activeIndicatorType:"cat",activeIndicatorUnit:null},reducers:{setShowTexts:(e,t)=>{e.showTexts=t.payload},setYear:(e,t)=>{e.sliderSelectedYear=t.payload},setActiveIndicatorKey:(e,t)=>{e.activeIndicatorKey=t.payload},setActiveIndicatorType:(e,t)=>{e.activeIndicatorType=t.payload},setActiveIndicatorUnit:(e,t)=>{e.activeIndicatorUnit=t.payload}}}),{setShowTexts:Bp,setYear:Pp,setActiveIndicatorKey:Fp,setActiveIndicatorType:Vp,setActiveIndicatorUnit:zp}=S0.actions,w0="data:image/svg+xml,%3csvg%20width='42'%20height='42'%20viewBox='0%200%2042%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='21'%20cy='21'%20r='20.25'%20fill='%23FDFDFD'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cpath%20d='M15.2722%2012.6627C15.2722%2011.8929%2016.1055%2011.4118%2016.7722%2011.7967L31.5641%2020.3368C32.2308%2020.7217%2032.2308%2021.684%2031.5641%2022.0689L16.7722%2030.609C16.1055%2030.9939%2015.2722%2030.5128%2015.2722%2029.743L15.2722%2012.6627Z'%20fill='%23605B56'/%3e%3c/svg%3e",T0="data:image/svg+xml,%3csvg%20width='42'%20height='42'%20viewBox='0%200%2042%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='21'%20cy='21'%20r='20.25'%20fill='%23FDFDFD'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3crect%20x='15'%20y='12'%20width='4'%20height='19'%20rx='1'%20fill='%23605B56'/%3e%3crect%20x='23'%20y='12'%20width='4'%20height='19'%20rx='1'%20fill='%23605B56'/%3e%3c/svg%3e";function Ai(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ai(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gt(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ai(e))&&(r&&(r+=" "),r+=t);return r}function Ss(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function k0(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",c=!0;for(let u=0;u<i.length;u+=1){const d=i[u];d&&(a+=(c===!0?"":" ")+t(d),c=!1,n&&n[d]&&(a+=" "+n[d]))}r[o]=a}return r}const j0=J.createContext();process.env.NODE_ENV!=="production"&&(s.node,s.bool);const $0=()=>J.useContext(j0)??!1;function Oi(...e){const t=J.useRef(void 0),n=J.useCallback(r=>{const o=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,c=a(r);return typeof c=="function"?c:()=>{a(null)}}return i.current=r,()=>{i.current=null}});return()=>{o.forEach(i=>i==null?void 0:i())}},e);return J.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function ln(e){return typeof e=="string"}function N0(e,t,n){return e===void 0||ln(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Ln(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function ws(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function E0(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const h=gt(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),b={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},f={...n,...o,...r};return h.length>0&&(f.className=h),Object.keys(b).length>0&&(f.style=b),{props:f,internalRef:void 0}}const a=Ln({...o,...r}),c=ws(r),u=ws(o),d=t(a),m=gt(d==null?void 0:d.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),g={...d==null?void 0:d.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},y={...d,...n,...u,...c};return m.length>0&&(y.className=m),Object.keys(g).length>0&&(y.style=g),{props:y,internalRef:d.ref}}function A0(e,t,n){return typeof e=="function"?e(t,n):e}function pt(e){var g;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:A0(n,r),{props:c,internalRef:u}=E0({...i,externalSlotProps:a}),d=Oi(u,a==null?void 0:a.ref,(g=e.additionalProps)==null?void 0:g.ref);return N0(t,{...c,ref:d},r)}function Rn(e){return e&&e.ownerDocument||document}function O0(e){const{controlled:t,default:n,name:r,state:o="value"}=e,{current:i}=J.useRef(t!==void 0),[a,c]=J.useState(n),u=i?t:a;if(process.env.NODE_ENV!=="production"){J.useEffect(()=>{i!==(t!==void 0)&&console.error([`MUI: A component is changing the ${i?"":"un"}controlled ${o} state of ${r} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
23
+ ${g&&vt.active}`,disabled:b,children:f}),o&&l.jsx(Ge,{text:y,position:i})]},u)})})};Yr.displayName="ButtonsList";Yr.propTypes={buttons:s.arrayOf(s.shape({icon:s.node.isRequired,activeIcon:s.node,isActive:s.bool,name:s.string,onClick:s.func,disabled:s.bool})).isRequired,orientation:s.oneOf(["horizontal","vertical"]),showName:s.bool,namePosition:s.oneOf(["left","right"]),useTooltip:s.bool,tooltipPosition:s.oneOf(["top","bottom","left","right"])};const pl="_indicatorsCategory_11gdl_2",ml="_title_11gdl_6",hl="_mainTitle_11gdl_14",vn={indicatorsCategory:pl,title:ml,mainTitle:hl},ct=({isOpen:e,onClick:t,children:n,color:r,activeColor:o="#F8A925",title:i="Title",height:a=53,titleFontStyles:c,showBottomBar:u=!0,titleMarginChildren:d=15,mainTitle:m=!1})=>{const{t:g}=se.useTranslation();return l.jsxs(Ur.motion.div,{className:vn.indicatorsCategory,initial:{height:`${a}px`},animate:{height:e?"auto":`${a}px`},transition:{duration:.4},style:{backgroundColor:"white",borderBottom:e&&u?`1px solid ${o}`:"0px",minHeight:m?"70px":"50px"},children:[l.jsxs("h2",{style:{...c},className:`${vn.title} ${m&&vn.mainTitle}`,onClick:t,children:[l.jsx("span",{style:{color:e?o:r},children:e?"-":"+"}),l.jsx("span",{style:{color:e?o:r},children:g(i)})]}),l.jsx("div",{className:vn.content,style:{padding:m?"20px 0px":"0px"},children:n})]})};ct.displayName="DropdownList";ct.propTypes={isOpen:s.bool,onClick:s.func,children:s.node,color:s.string,activeColor:s.string,title:s.string,height:s.number,showBottomBar:s.bool,titleFontStyles:s.object};const Si=()=>l.jsx("div",{children:"EditAmbit"});Si.displayName="EditAmbit";const gl="data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1%201L13.9996%2013.9996'%20stroke='%23FDFDFD'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3cpath%20d='M14%201L1.00044%2013.9996'%20stroke='%23FDFDFD'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/svg%3e",yl="_AppliedFiltersContainer_cokx9_2",bl="_AppliedFilterContent_cokx9_11",ls={AppliedFiltersContainer:yl,AppliedFilterContent:bl},ye=Hr.create(e=>({activeCategory:"",activeSubCategory:"",selectedIndicator:"",tematicalFiltersSelected:[],fontColor:"#605B56",inputsColor:"#605B56",activeFiltersType:null})),Xr=({title:e,onClick:t,isOpen:n=!0,textColor:r="#ffffff",backgroundColor:o="#605B5680",activeColor:i,fontColor:a="#605B56"})=>{const{t:c}=se.useTranslation(),{tematicalFiltersSelected:u,activeFiltersType:d}=ye(y=>y),m=y=>{ye.setState(h=>({tematicalFiltersSelected:h.tematicalFiltersSelected.filter(b=>b.code!==y)}))},g=()=>{d=="applied"?ye.setState(()=>({activeFiltersType:null})):ye.setState(()=>({activeFiltersType:"applied"}))};return l.jsx(ct,{isOpen:n,onClick:g,title:e?c(e):"Applied Filters",activeColor:i,mainTitle:!0,color:a,children:l.jsx("div",{className:ls.AppliedFiltersContainer,children:u==null?void 0:u.map((y,h)=>l.jsxs("div",{className:ls.AppliedFilterContent,style:{color:r,background:o},children:[c(y.name),l.jsx("img",{src:gl,alt:"CloseIcon",onClick:()=>m(y.code),style:{cursor:"pointer"}})]},h))})})};Xr.displayName="AppliedFilters";Xr.propTypes={isOpen:s.bool,onClick:s.func,title:s.string,textColor:s.string,backgroundColor:s.string,indicators:s.arrayOf(s.shape({title:s.string.isRequired,Codename:s.string.isRequired})),activeColor:s.string};const vl="_layersList_cn837_25",xl="_layerName_cn837_34",cs={layersList:vl,layerName:xl},Qr=({title:e,isOpen:t=!0,fontColor:n="#605B56",backgroundColor:r="#605B5680",activeColor:o,geoLayers:i=[],onGeoLayersChange:a})=>{const{t:c}=se.useTranslation(),{activeFiltersType:u}=ye(g=>g),d=()=>{u==="geographical"?ye.setState({activeFiltersType:null}):ye.setState({activeFiltersType:"geographical"})},m=g=>{const y=i.map(h=>({...h,active:h.name===g.name}));a==null||a(y)};return l.jsx(ct,{isOpen:u==="geographical",onClick:d,title:e?c(e):"Geographical Filters",activeColor:o,color:n,mainTitle:!0,children:l.jsx("div",{className:cs.layersList,children:i.map(g=>l.jsx("div",{className:cs.layerName,style:{color:g.active?o:n,fontWeight:g.active?"bold":"normal"},onClick:()=>m(g),children:c(g.name)},g.name))})})};Qr.displayName="GeographicalFilters";Qr.propTypes={isOpen:s.bool,onClick:s.func,title:s.string,textColor:s.string,backgroundColor:s.string,activeColor:s.string};const Cl="_checkboxContainer_1nxra_2",_l={checkboxContainer:Cl},Jr=({onClick:e,containerStyles:t,color:n="#605B56",indicator:r,value:o})=>{const{t:i}=se.useTranslation(),{title:a}=r||{},{fontColor:c,inputsColor:u}=ye(d=>d);return l.jsxs("div",{style:{...t,color:n},role:"checkbox",className:_l.checkboxContainer,onClick:e,children:[l.jsx("input",{type:"checkbox",checked:typeof o=="boolean"?o:!0,value:o,readOnly:!0,style:{border:`1.5px solid ${o?u:c}`,backgroundColor:o?u:"white"}}),l.jsx("span",{className:"checkmark",children:i(a)})]})};Jr.displayName="CategoryCheckbox";Jr.propTypes={onClick:s.func,value:s.bool,containerStyles:s.object,color:s.string,indicator:s.shape({title:s.string,codename:s.array}),checkedColor:s.string};function Lr(e,t){return Lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Lr(e,t)}function Sl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Lr(e,t)}function Cr(e){return e&&e.stopPropagation&&e.stopPropagation(),e&&e.preventDefault&&e.preventDefault(),!1}function _r(e){return e==null?[]:Array.isArray(e)?e.slice():[e]}function xn(e){return e!==null&&e.length===1?e[0]:e.slice()}function Cn(e){Object.keys(e).forEach(t=>{typeof document<"u"&&document.addEventListener(t,e[t],!1)})}function xt(e,t){return Rr(function(n,r){let o=n;return o<=r.min&&(o=r.min),o>=r.max&&(o=r.max),o}(e,t),t)}function Rr(e,t){const n=(e-t.min)%t.step;let r=e-n;return 2*Math.abs(n)>=t.step&&(r+=n>0?t.step:-t.step),parseFloat(r.toFixed(5))}let Ir=function(e){function t(r){var o;(o=e.call(this,r)||this).onKeyUp=()=>{o.onEnd()},o.onMouseUp=()=>{o.onEnd(o.getMouseEventMap())},o.onTouchEnd=c=>{c.preventDefault(),o.onEnd(o.getTouchEventMap())},o.onBlur=()=>{o.setState({index:-1},o.onEnd(o.getKeyDownEventMap()))},o.onMouseMove=c=>{o.setState({pending:!0});const u=o.getMousePosition(c),d=o.getDiffPosition(u[0]),m=o.getValueFromPosition(d);o.move(m)},o.onTouchMove=c=>{if(c.touches.length>1)return;o.setState({pending:!0});const u=o.getTouchPosition(c);if(o.isScrolling===void 0){const g=u[0]-o.startPosition[0],y=u[1]-o.startPosition[1];o.isScrolling=Math.abs(y)>Math.abs(g)}if(o.isScrolling)return void o.setState({index:-1});const d=o.getDiffPosition(u[0]),m=o.getValueFromPosition(d);o.move(m)},o.onKeyDown=c=>{if(!(c.ctrlKey||c.shiftKey||c.altKey||c.metaKey))switch(o.setState({pending:!0}),c.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":c.preventDefault(),o.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":c.preventDefault(),o.moveUpByStep();break;case"Home":c.preventDefault(),o.move(o.props.min);break;case"End":c.preventDefault(),o.move(o.props.max);break;case"PageDown":c.preventDefault(),o.moveDownByStep(o.props.pageFn(o.props.step));break;case"PageUp":c.preventDefault(),o.moveUpByStep(o.props.pageFn(o.props.step))}},o.onSliderMouseDown=c=>{if(!o.props.disabled&&c.button!==2){if(o.setState({pending:!0}),!o.props.snapDragDisabled){const u=o.getMousePosition(c);o.forceValueFromPosition(u[0],d=>{o.start(d,u[0]),Cn(o.getMouseEventMap())})}Cr(c)}},o.onSliderClick=c=>{if(!o.props.disabled&&o.props.onSliderClick&&!o.hasMoved){const u=o.getMousePosition(c),d=xt(o.calcValue(o.calcOffsetFromPosition(u[0])),o.props);o.props.onSliderClick(d)}},o.createOnKeyDown=c=>u=>{o.props.disabled||(o.start(c),Cn(o.getKeyDownEventMap()),Cr(u))},o.createOnMouseDown=c=>u=>{if(o.props.disabled||u.button===2)return;o.setState({pending:!0});const d=o.getMousePosition(u);o.start(c,d[0]),Cn(o.getMouseEventMap()),Cr(u)},o.createOnTouchStart=c=>u=>{if(o.props.disabled||u.touches.length>1)return;o.setState({pending:!0});const d=o.getTouchPosition(u);o.startPosition=d,o.isScrolling=void 0,o.start(c,d[0]),Cn(o.getTouchEventMap()),function(m){m.stopPropagation&&m.stopPropagation()}(u)},o.handleResize=()=>{const c=window.setTimeout(()=>{o.pendingResizeTimeouts.shift(),o.resize()},0);o.pendingResizeTimeouts.push(c)},o.renderThumb=(c,u)=>{const d=o.props.thumbClassName+" "+o.props.thumbClassName+"-"+u+" "+(o.state.index===u?o.props.thumbActiveClassName:""),m={ref:y=>{o["thumb"+u]=y},key:o.props.thumbClassName+"-"+u,className:d,style:c,onMouseDown:o.createOnMouseDown(u),onTouchStart:o.createOnTouchStart(u),onFocus:o.createOnKeyDown(u),tabIndex:0,role:"slider","aria-orientation":o.props.orientation,"aria-valuenow":o.state.value[u],"aria-valuemin":o.props.min,"aria-valuemax":o.props.max,"aria-label":Array.isArray(o.props.ariaLabel)?o.props.ariaLabel[u]:o.props.ariaLabel,"aria-labelledby":Array.isArray(o.props.ariaLabelledby)?o.props.ariaLabelledby[u]:o.props.ariaLabelledby,"aria-disabled":o.props.disabled},g={index:u,value:xn(o.state.value),valueNow:o.state.value[u]};return o.props.ariaValuetext&&(m["aria-valuetext"]=typeof o.props.ariaValuetext=="string"?o.props.ariaValuetext:o.props.ariaValuetext(g)),o.props.renderThumb(m,g)},o.renderTrack=(c,u,d)=>{const m={key:o.props.trackClassName+"-"+c,className:o.props.trackClassName+" "+o.props.trackClassName+"-"+c,style:o.buildTrackStyle(u,o.state.upperBound-d)},g={index:c,value:xn(o.state.value)};return o.props.renderTrack(m,g)};let i=_r(r.value);i.length||(i=_r(r.defaultValue)),o.pendingResizeTimeouts=[];const a=[];for(let c=0;c<i.length;c+=1)i[c]=xt(i[c],r),a.push(c);return o.resizeObserver=null,o.resizeElementRef=S.createRef(),o.state={index:-1,upperBound:0,sliderLength:0,value:i,zIndices:a},o}Sl(t,e);var n=t.prototype;return n.componentDidMount=function(){typeof window<"u"&&(this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.resizeElementRef.current),this.resize())},t.getDerivedStateFromProps=function(r,o){const i=_r(r.value);return i.length?o.pending?null:{value:i.map(a=>xt(a,r))}:null},n.componentDidUpdate=function(){this.state.upperBound===0&&this.resize()},n.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),this.resizeObserver&&this.resizeObserver.disconnect()},n.onEnd=function(r){r&&function(o){Object.keys(o).forEach(i=>{typeof document<"u"&&document.removeEventListener(i,o[i],!1)})}(r),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pending:!1}),this.hasMoved=!1},n.getValue=function(){return xn(this.state.value)},n.getClosestIndex=function(r){let o=Number.MAX_VALUE,i=-1;const{value:a}=this.state,c=a.length;for(let u=0;u<c;u+=1){const d=this.calcOffset(a[u]),m=Math.abs(r-d);m<o&&(o=m,i=u)}return i},n.getMousePosition=function(r){return[r["page"+this.axisKey()],r["page"+this.orthogonalAxisKey()]]},n.getTouchPosition=function(r){const o=r.touches[0];return[o["page"+this.axisKey()],o["page"+this.orthogonalAxisKey()]]},n.getKeyDownEventMap=function(){return{keydown:this.onKeyDown,keyup:this.onKeyUp,focusout:this.onBlur}},n.getMouseEventMap=function(){return{mousemove:this.onMouseMove,mouseup:this.onMouseUp}},n.getTouchEventMap=function(){return{touchmove:this.onTouchMove,touchend:this.onTouchEnd}},n.getValueFromPosition=function(r){const o=r/(this.state.sliderLength-this.state.thumbSize)*(this.props.max-this.props.min);return xt(this.state.startValue+o,this.props)},n.getDiffPosition=function(r){let o=r-this.state.startPosition;return this.props.invert&&(o*=-1),o},n.resize=function(){const{slider:r,thumb0:o}=this;if(!r||!o)return;const i=this.sizeKey(),a=r.getBoundingClientRect(),c=r[i],u=a[this.posMaxKey()],d=a[this.posMinKey()],m=o.getBoundingClientRect()[i.replace("client","").toLowerCase()],g=c-m,y=Math.abs(u-d);this.state.upperBound===g&&this.state.sliderLength===y&&this.state.thumbSize===m||this.setState({upperBound:g,sliderLength:y,thumbSize:m})},n.calcOffset=function(r){const o=this.props.max-this.props.min;return o===0?0:(r-this.props.min)/o*this.state.upperBound},n.calcValue=function(r){return r/this.state.upperBound*(this.props.max-this.props.min)+this.props.min},n.calcOffsetFromPosition=function(r){const{slider:o}=this,i=o.getBoundingClientRect(),a=i[this.posMaxKey()],c=i[this.posMinKey()];let u=r-(window["page"+this.axisKey()+"Offset"]+(this.props.invert?a:c));return this.props.invert&&(u=this.state.sliderLength-u),u-=this.state.thumbSize/2,u},n.forceValueFromPosition=function(r,o){const i=this.calcOffsetFromPosition(r),a=this.getClosestIndex(i),c=xt(this.calcValue(i),this.props),u=this.state.value.slice();u[a]=c;for(let d=0;d<u.length-1;d+=1)if(u[d+1]-u[d]<this.props.minDistance)return;this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0,this.setState({value:u},()=>{o(a),this.fireChangeEvent("onChange")})},n.clearPendingResizeTimeouts=function(){do{const r=this.pendingResizeTimeouts.shift();clearTimeout(r)}while(this.pendingResizeTimeouts.length)},n.start=function(r,o){const i=this["thumb"+r];i&&i.focus();const{zIndices:a}=this.state;a.splice(a.indexOf(r),1),a.push(r),this.setState(c=>({startValue:c.value[r],startPosition:o!==void 0?o:c.startPosition,index:r,zIndices:a}))},n.moveUpByStep=function(r){r===void 0&&(r=this.props.step);const o=this.state.value[this.state.index],i=xt(this.props.invert&&this.props.orientation==="horizontal"?o-r:o+r,this.props);this.move(Math.min(i,this.props.max))},n.moveDownByStep=function(r){r===void 0&&(r=this.props.step);const o=this.state.value[this.state.index],i=xt(this.props.invert&&this.props.orientation==="horizontal"?o+r:o-r,this.props);this.move(Math.max(i,this.props.min))},n.move=function(r){const o=this.state.value.slice(),{index:i}=this.state,{length:a}=o,c=o[i];if(r===c)return;this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;const{pearling:u,max:d,min:m,minDistance:g}=this.props;if(!u){if(i>0){const y=o[i-1];r<y+g&&(r=y+g)}if(i<a-1){const y=o[i+1];r>y-g&&(r=y-g)}}o[i]=r,u&&a>1&&(r>c?(this.pushSucceeding(o,g,i),function(y,h,b,f){for(let x=0;x<y;x+=1){const _=f-x*b;h[y-1-x]>_&&(h[y-1-x]=_)}}(a,o,g,d)):r<c&&(this.pushPreceding(o,g,i),function(y,h,b,f){for(let x=0;x<y;x+=1){const _=f+x*b;h[x]<_&&(h[x]=_)}}(a,o,g,m))),this.setState({value:o},this.fireChangeEvent.bind(this,"onChange"))},n.pushSucceeding=function(r,o,i){let a,c;for(a=i,c=r[a]+o;r[a+1]!==null&&c>r[a+1];a+=1,c=r[a]+o)r[a+1]=Rr(c,this.props)},n.pushPreceding=function(r,o,i){for(let a=i,c=r[a]-o;r[a-1]!==null&&c<r[a-1];a-=1,c=r[a]-o)r[a-1]=Rr(c,this.props)},n.axisKey=function(){return this.props.orientation==="vertical"?"Y":"X"},n.orthogonalAxisKey=function(){return this.props.orientation==="vertical"?"X":"Y"},n.posMinKey=function(){return this.props.orientation==="vertical"?this.props.invert?"bottom":"top":this.props.invert?"right":"left"},n.posMaxKey=function(){return this.props.orientation==="vertical"?this.props.invert?"top":"bottom":this.props.invert?"left":"right"},n.sizeKey=function(){return this.props.orientation==="vertical"?"clientHeight":"clientWidth"},n.fireChangeEvent=function(r){this.props[r]&&this.props[r](xn(this.state.value),this.state.index)},n.buildThumbStyle=function(r,o){const i={position:"absolute",touchAction:"none",willChange:this.state.index>=0?this.posMinKey():void 0,zIndex:this.state.zIndices.indexOf(o)+1};return i[this.posMinKey()]=r+"px",i},n.buildTrackStyle=function(r,o){const i={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():void 0};return i[this.posMinKey()]=r,i[this.posMaxKey()]=o,i},n.buildMarkStyle=function(r){var o;return(o={position:"absolute"})[this.posMinKey()]=r,o},n.renderThumbs=function(r){const{length:o}=r,i=[];for(let c=0;c<o;c+=1)i[c]=this.buildThumbStyle(r[c],c);const a=[];for(let c=0;c<o;c+=1)a[c]=this.renderThumb(i[c],c);return a},n.renderTracks=function(r){const o=[],i=r.length-1;o.push(this.renderTrack(0,0,r[0]));for(let a=0;a<i;a+=1)o.push(this.renderTrack(a+1,r[a],r[a+1]));return o.push(this.renderTrack(i+1,r[i],this.state.upperBound)),o},n.renderMarks=function(){let{marks:r}=this.props;const o=this.props.max-this.props.min+1;return typeof r=="boolean"?r=Array.from({length:o}).map((i,a)=>a):typeof r=="number"&&(r=Array.from({length:o}).map((i,a)=>a).filter(i=>i%r==0)),r.map(parseFloat).sort((i,a)=>i-a).map(i=>{const a=this.calcOffset(i),c={key:i,className:this.props.markClassName,style:this.buildMarkStyle(a)};return this.props.renderMark(c)})},n.render=function(){const r=[],{value:o}=this.state,i=o.length;for(let d=0;d<i;d+=1)r[d]=this.calcOffset(o[d],d);const a=this.props.withTracks?this.renderTracks(r):null,c=this.renderThumbs(r),u=this.props.marks?this.renderMarks():null;return S.createElement("div",{ref:d=>{this.slider=d,this.resizeElementRef.current=d},style:{position:"relative"},className:this.props.className+(this.props.disabled?" disabled":""),onMouseDown:this.onSliderMouseDown,onClick:this.onSliderClick},a,c,u)},t}(S.Component);Ir.displayName="ReactSlider",Ir.defaultProps={min:0,max:100,step:1,pageFn:e=>10*e,minDistance:0,defaultValue:0,orientation:"horizontal",className:"slider",thumbClassName:"thumb",thumbActiveClassName:"active",trackClassName:"track",markClassName:"mark",withTracks:!0,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1,marks:[],renderThumb:e=>S.createElement("div",e),renderTrack:e=>S.createElement("div",e),renderMark:e=>S.createElement("span",e)};var Dr=Ir;const wl="_container_4u41i_2",Tl="_unitLabel_4u41i_8",kl="_slider_4u41i_11",jl="_thumb_4u41i_17",$l="_track_4u41i_26",Nl="_labels_4u41i_32",Ot={container:wl,unitLabel:Tl,slider:kl,thumb:jl,track:$l,labels:Nl},eo=({min:e=0,max:t=100,step:n=1,onChange:r,width:o=300,unit:i,fontColor:a="#605B56",defaultValue:c,isDate:u})=>{const{t:d}=se.useTranslation(),m=u?new Date(e).getTime():null,g=u?new Date(t).getTime():null,[y,h]=S.useState(u?[m,g]:[e,t]),b=f=>{h(f),r==null||r({min:f[0],max:f[1]})};return S.useEffect(()=>{h(c||(u?[m,g]:[e,t]))},[c,u]),l.jsxs("div",{className:Ot.container,style:{width:`${o}px`,color:`${a}`},children:[l.jsx("div",{className:Ot.unitLabel,children:l.jsx("span",{children:d(i)})}),l.jsx(Dr,{className:Ot.slider,thumbClassName:Ot.thumb,trackClassName:Ot.track,min:u?m:e,max:u?g:t,step:u?(g-m)/30:n,value:y,onAfterChange:b,withTracks:!0,pearling:!u,minDistance:u?0:.1}),l.jsxs("div",{className:Ot.labels,children:[l.jsx("span",{children:u?new Date(y[0]).toLocaleDateString("en-EN",{day:"2-digit",month:"short",year:"numeric"}):y[0]}),l.jsx("span",{children:u?new Date(y[1]).toLocaleDateString("en-EN",{day:"2-digit",month:"short",year:"numeric"}):y[1]})]})]})};eo.displayName="AbsoluteSlider";eo.propTypes={min:s.number,max:s.number,step:s.number,initialMin:s.number,initialMax:s.number,onChange:s.func,width:s.number,unit:s.string,fontColor:s.string,value:s.arrayOf(s.number)};const El="_tematicalFiltersInputContainer_1vm1r_2",Al="_inputTypeContainer_1vm1r_2",Ol="_checkboxContainer_1vm1r_28",Ml="_absoluteSliderContainer_1vm1r_37",_n={tematicalFiltersInputContainer:El,inputTypeContainer:Al,checkboxContainer:Ol,absoluteSliderContainer:Ml},Hn=({indicator:e,activeColor:t})=>{const[n,r]=S.useState(),{type:o,name:i,values:a,minValue:c,maxValue:u,unit:d,step:m,disabled:g,isDate:y}=e||{},h=S.useMemo(()=>o=="cat"||n=="cat",[n,o]),b=S.useMemo(()=>o=="abs"||n=="abs",[n,o]),{tematicalFiltersSelected:f,selectedIndicator:x,fontColor:_,inputsColor:w}=ye(v=>v),N=v=>{if(v){const{min:T,max:M,valueClicked:j,allValues:$}=v||{},{code:P,type:D,source:p}=e||{},E=b?"abs":h?"cat":"both";let k=P[0];D=="both"&&(k=E=="cat"?P[1]:P[0]),E=="cat"?ye.setState(R=>{let V=R.tematicalFiltersSelected.find(I=>I.code===k);if(V){let I=[V.values];return V.values.includes(j)?I=V.values.filter(z=>z!==j):I=[...V.values,j],I.length==$.length?{tematicalFiltersSelected:R.tematicalFiltersSelected.filter(z=>z.code!==k)}:{tematicalFiltersSelected:R.tematicalFiltersSelected.map(z=>z.code===k?{...z,values:I}:z)}}else{let I=($||[]).map((z,G)=>G);return{tematicalFiltersSelected:[...f,{type:"cat",code:k,values:I.filter(z=>z!==j),name:e.name,source:p,isDate:y}]}}}):E=="abs"&&ye.setState(R=>{let V=R.tematicalFiltersSelected.find(I=>I.code===k);if(T==e.minValue&&M==e.maxValue)return{tematicalFiltersSelected:R.tematicalFiltersSelected.filter(I=>I.code!==k)};if(V){let I={...V,min:T,max:M,type:E,isDate:y};return{tematicalFiltersSelected:R.tematicalFiltersSelected.map(z=>z.code===k?I:z)}}else return{tematicalFiltersSelected:[...f,{type:E,code:k,min:T,max:M,name:e.name,source:e.source}]}})}},C=S.useMemo(()=>{const v={};if((f==null?void 0:f.length)>0)for(const T of f)T.type==="cat"?v[T.code]=new Set(T.values):v[T.code]=[T.min,T.max];return v},[f]);return l.jsx("div",{className:_n.tematicalFiltersInputContainer,children:l.jsxs(ct,{titleFontStyles:{fontSize:16,fontWeight:400,opacity:g?.5:1},title:i,isOpen:x==`id${i}`,onClick:()=>{g||ye.setState(()=>({selectedIndicator:x==`id${i}`?"":`id${i}`}))},showBottomBar:!1,height:42,titleMarginChildren:14,className:"tematicalFiltersInputContainer",color:_,activeColor:t,children:[o=="both"&&l.jsxs("div",{className:_n.inputTypeContainer,style:{color:_},children:[l.jsxs("label",{children:[l.jsx("input",{type:"radio",name:"tipo",value:"abs",onChange:()=>{r("abs")},style:{marginRight:4,backgroundColor:n=="abs"?w:"white",border:`1.5px solid ${n=="abs"?w:_}`}}),"Absoluto"]}),l.jsxs("label",{children:[l.jsx("input",{type:"radio",name:"tipo",value:"cat",onChange:()=>{r("cat")},style:{marginRight:4,backgroundColor:n=="cat"?w:"white",border:`1.5px solid ${n=="cat"?w:_}`}}),"Categórico"]})]}),h&&l.jsx("div",{className:_n.checkboxContainer,children:(a||[]).map((v,T)=>{var M;return l.jsx(Jr,{onClick:()=>N({valueClicked:T,allValues:a}),indicator:v,value:((M=C[e.code[o=="both"?1:0]])==null?void 0:M.has(T))||!C[e.code[o=="both"?1:0]]},`checkbox-${T}`)})}),(b||o=="glb")&&l.jsx("div",{className:_n.absoluteSliderContainer,children:l.jsx(eo,{onChange:N,min:c,max:u,unit:d,defaultValue:C[e.code[0]]?C[e.code[0]]:"",isDate:y,step:m})})]})})};Hn.displayName="TematicalFiltersInput";Hn.propTypes={indicator:s.shape({name:s.string,type:s.string,code:s.arrayOf(s.string),values:s.arrayOf(s.shape({codename:s.oneOfType([s.array,s.string]),title:s.string}))}),activeColor:s.string};const to=({subcategory:e,fontColor:t,activeColor:n})=>{const{activeSubcategory:r}=ye(a=>a),{name:o,indicators:i}=e||{};return l.jsx(ct,{title:o,isOpen:r==`id${o}`,onClick:()=>{ye.setState(a=>({activeSubcategory:a.activeSubcategory===`id${o}`?"":`id${o}`}))},titleFontStyles:{fontSize:16,fontWeight:400},showBottomBar:!1,titleMarginChildren:20,height:48,color:t,activeColor:n,children:i==null?void 0:i.map((a,c)=>l.jsx(Hn,{indicator:a,fontColor:t,activeColor:n},`indicatorSub-${c}`))})};to.displayName="TematicalFiltersSubcat";to.propTypes={subcategory:s.shape({name:s.string,indicators:s.arrayOf(s.shape({name:s.string,value:s.string}))}),activeColor:s.string};const no=({category:e,activeColor:t})=>{const{name:n,subcategories:r,indicators:o}=e||{},{activeCategory:i,fontColor:a}=ye(c=>c);return e&&l.jsx(ct,{onClick:()=>{ye.setState(c=>({activeCategory:i===`id${n}`?"":`id${n}`}))},title:n,isOpen:i===`id${n}`,titleFontStyles:{fontSize:18,fontWeight:"bold"},showBottomBar:!1,color:a,activeColor:t,children:r?r.map((c,u)=>l.jsx(to,{subcategory:c,fontColor:a,activeColor:t},`subcategory-${u}`)):o&&o.map((c,u)=>l.jsx(Hn,{indicator:c,fontColor:a,activeColor:t},`indicator-${u}`))})};no.displayName="TematicalFiltersCategory";no.propTypes={category:s.shape({name:s.string.isRequired,subcategories:s.array,indicators:s.array}),activeColor:s.string};const Bn=({indicators:e,isOpen:t=!0,title:n,fontColor:r="#605B56",inputsColor:o="#605B56",activeColor:i,isExtra:a=!1})=>{const{tematicalFiltersSelected:c,activeFiltersType:u}=ye(g=>g),{t:d}=se.useTranslation();S.useEffect(()=>{r&&ye.setState(()=>({fontColor:r}))},[r]),S.useEffect(()=>{o&&ye.setState(()=>({inputsColor:o}))},[o]);const m=()=>{a?u==a?ye.setState(()=>({activeFiltersType:null})):ye.setState(()=>({activeFiltersType:a})):u=="tematical"?ye.setState(()=>({activeFiltersType:null})):ye.setState(()=>({activeFiltersType:"tematical"}))};return l.jsx(ct,{isOpen:a&&u==a||!a&&u=="tematical",title:n?d(n):"Tematical filters",color:r,activeColor:i,onClick:m,mainTitle:!0,children:e==null?void 0:e.map((g,y)=>l.jsx(no,{category:g,fontColor:r,activeColor:i},`category-${y}`))})};Bn.displayName="TematicalFilters";Bn.propTypes={isOpen:s.bool,title:s.string,indicators:s.arrayOf(s.object),fontColor:s.string,onChangeTematicalFilters:s.func,inputsColor:s.string,activeColor:s.string};const Ll="_FiltersAmbitContainer_ei39o_2",Rl="_FiltersContainer_ei39o_15",Il="_FiltersAmbitHeader_ei39o_18",Dl="_FiltersAmbitTitle_ei39o_26",Bl="_FiltersAmbitDescription_ei39o_35",Pl="_FiltersAmbitDescriptionTitle_ei39o_48",Fl="_warning_ei39o_57",Vl="_buttonContainer_ei39o_60",ft={FiltersAmbitContainer:Ll,FiltersContainer:Rl,FiltersAmbitHeader:Il,FiltersAmbitTitle:Dl,FiltersAmbitDescription:Bl,FiltersAmbitDescriptionTitle:Pl,warning:Fl,buttonContainer:Vl},ro=({ambitName:e,ambitDescription:t,defaultFilters:n,indicators:r,activeColor:o,textColor:i,backgroundColor:a,onChangeAppliedFilters:c,saveAmbit:u,namePlaceholder:d,descPlaceholder:m,filtersTypes:g=["geographical","tematical"],nameRequiredText:y,geoLayers:h=[],onGeoLayersChange:b,onlyFilters:f=!1,descriptionRequired:x=!1,extraLists:_=!1})=>{const{t:w}=se.useTranslation(),{tematicalFiltersSelected:N,activeFiltersType:C}=ye(p=>p),[v,T]=S.useState(e||null),[M,j]=S.useState(t||null),[$,P]=S.useState(!1);S.useEffect(()=>{ye.setState({tematicalFiltersSelected:n||[]})},[n]),S.useRef(!1),S.useEffect(()=>{c(N)},[N]);const D=()=>{x?v&&M?u({name:v,description:M}):P(!0):v?u({name:v,description:M}):P(!0)};return S.useEffect(()=>{if(g.includes("geographical")&&C!="geographical"&&h.length>0){const p=h.map(E=>({...E,active:!1}));b==null||b(p)}},[C]),l.jsxs("div",{className:ft.FiltersAmbitContainer,children:[l.jsxs("div",{className:ft.FiltersContainer,children:[!f&&l.jsxs("div",{className:ft.FiltersAmbitHeader,children:[l.jsx("div",{className:ft.FiltersAmbitTitle,children:l.jsx("input",{type:"text",onChange:p=>{P(!1),T(p.target.value)},value:v,placeholder:w(d)})}),l.jsx("div",{className:ft.FiltersAmbitDescription,children:l.jsx("div",{className:ft.FiltersAmbitDescriptionTitle,children:l.jsx("textarea",{value:M,onChange:p=>{x&&P(!1),j(p.target.value)},placeholder:w(m)})})})]}),l.jsx(Xr,{title:w("applied_filters"),isOpen:C=="applied",textColor:i||"#fff",backgroundColor:a||"#605B5680",activeColor:o}),g.includes("geographical")&&l.jsx(Qr,{title:"geo_filters",activeColor:o,geoLayers:h,onGeoLayersChange:b}),g.includes("extra")&&_.map(p=>l.jsx(Bn,{indicators:p.indicators,inputsColor:o,textColor:i,title:p.title,activeColor:o,isExtra:p.title})),g.includes("tematical")&&l.jsx(Bn,{indicators:r,inputsColor:o,textColor:i,title:"tematical_filters",activeColor:o,isExtra:!1})]}),!f&&l.jsxs("div",{className:ft.buttonContainer,children:[$&&l.jsx("div",{className:ft.warning,children:w(y)}),l.jsx(Zt,{onClick:()=>D(),children:w("save_ambit")})]})]})};ro.displayName="FiltersAmbit";ro.propTypes={indicators:s.arrayOf(s.object).isRequired,ambitName:s.string,ambitDescription:s.string,defaultFilters:s.arrayOf(s.object),activeColor:s.string,backgroundColor:s.string,textColor:s.string,onChangeAppliedFilters:s.func,saveAmbit:s.func,namePlaceholder:s.string,descPlaceholder:s.string,filtersTypes:s.arrayOf(s.string).isRequired,nameRequiredText:s.string,extraLists:s.arrayOf(s.object)};const zl="_barChartContainer_1ly7h_2",us={barChartContainer:zl},Kn=({data:e,barHeight:t=25,gap:n=23,fontColor:r="#605B56",leftPadding:o=200,numberOfDivisions:i=7,maxValue:a=null,orientation:c="horizontal",horizontalPadding:u=c=="vertical"?50:20,verticalPadding:d=10,xLabelPadding:m=c=="vertical"?50:40,containerWidth:g=700,containerHeight:y=500,mainColor:h="#000"})=>{const{xScale:b,yScale:f,ticks:x,height:_,chartWidth:w,svgWidth:N,svgHeight:C,contentWidth:v}=S.useMemo(()=>{if(e&&e.length>0){const T=mr.max(e,j=>j.value)||1,M=a||T;if(c==="vertical"){const j=e.length*(t+n)+u*2,$=Math.max(j,g||0),P=y,p=mr.scaleLinear().domain([0,M]).range([P-100,d]),E=Array.from({length:i+1},(k,R)=>M/i*R);return{yScale:p,ticks:E,height:P,chartWidth:$,svgWidth:$,svgHeight:P,contentWidth:j}}else{const j=e.length*(t+n);console.log("barsHeight: ",j);const $=j+d*2+m+30,P=g+o+u*2,D=mr.scaleLinear().domain([0,M]).range([0,g-u*2]),p=Array.from({length:i+1},(E,k)=>M/i*k);return{xScale:D,ticks:p,height:$,chartWidth:g,svgWidth:P,svgHeight:$,contentWidth:P}}}else return{xScale:null,yScale:null,ticks:[],height:0,svgHeight:0}},[e,i,t,n,u,d,a,c,o,g,y]);return c==="vertical"?l.jsx("div",{style:{width:"100%",height:y?`${y}px`:"100%","--main-color":h},className:us.barChartContainer,children:l.jsx("svg",{width:N,height:C,style:{display:"block",width:N,height:C,maxWidth:"none","--main-color":h},children:l.jsxs("g",{transform:`translate(${u}, 0)`,children:[l.jsx("g",{children:x.map((T,M)=>{const j=f(T);return l.jsxs("g",{children:[l.jsx("line",{x1:0,x2:w-u*2,y1:j,y2:j,stroke:"#ccc"}),l.jsx("text",{x:-10,y:j+4,textAnchor:"end",fontSize:10,fill:r,children:parseInt(T)})]},M)})}),e&&e.length>0&&e.map((T,M)=>{const j=f(0)-f(T.value),$=M*(t+n),P=f(T.value);return l.jsxs("g",{children:[l.jsx("rect",{x:$,y:P,width:t,height:j,fill:T.color,rx:0}),l.jsx("text",{x:$+t/2,y:_-m,textAnchor:"start",fill:r,fontSize:12,transform:`rotate(-90, ${$+t/2}, ${_-m})`,children:T.title})]},M)})]})})}):(console.log("svgHeight: ",C),l.jsx("div",{style:{width:"100%",height:y?`${y}px`:"100%","--main-color":h},className:us.barChartContainer,children:l.jsx("svg",{width:N,height:C,style:{minWidth:"100%",height:C,width:v,maxWidth:"none"},children:l.jsxs("g",{transform:`translate(0,${d})`,children:[l.jsx("g",{transform:`translate(${o+u}, 0)`,children:x.map((T,M)=>{const j=b(T);return l.jsxs("g",{transform:`translate(${j}, 0)`,children:[l.jsx("line",{y1:0,y2:e.length*(t+n),stroke:"#ccc"}),l.jsx("text",{y:e.length*(t+n)+30,textAnchor:"middle",fontSize:10,fill:r,children:parseInt(T)})]},M)})}),e&&e.length>0&&e.map((T,M)=>{const j=b(T.value),$=M*(t+n);return console.log("y: ",$),l.jsxs("g",{transform:`translate(${o+u}, ${$})`,children:[l.jsx("text",{x:-24,y:t/2+5,textAnchor:"end",fill:r,fontSize:12,children:T.title}),l.jsx("rect",{width:j,height:t,fill:T.color,rx:0})]},M)})]})})}))};Kn.displayName="BarChart";Kn.propTypes={data:s.arrayOf(s.shape({title:s.string,value:s.number,color:s.string})),length:s.number,barHeight:s.number,gap:s.number,verticalPadding:s.number,horizontalPadding:s.number,numberOfDivisions:s.number,fontColor:s.string,leftPadding:s.number,maxValue:s.number,orientation:s.oneOf(["horizontal","vertical"]),xLabelPadding:s.number,containerWidth:s.number,containerHeight:s.number,minBarWidth:s.number};const ql="_graphicContainer_1ozwp_2",Wl="_titleContainer_1ozwp_13",ds={graphicContainer:ql,titleContainer:Wl},oo=({data:e,graphLength:t=700,containerStyle:n,borderColor:r="#605B56",title:o="Graphic Title",fontColor:i="#605B56",maxValue:a=null,numberOfDivisions:c=7,leftPadding:u=-200,orientation:d="horizontal",xLabelPadding:m=0,mainColor:g})=>{const{t:y}=se.useTranslation();return l.jsxs("div",{className:ds.graphicContainer,style:{...n||{},paddingBottom:40},children:[l.jsx("div",{className:ds.titleContainer,children:l.jsx("h2",{children:y(o)})}),l.jsx(Kn,{data:e,length:t,fontColor:i,maxValue:a,numberOfDivisions:c,leftPadding:u,orientation:d,xLabelPadding:m,mainColor:g})]})};oo.displayName="Graphic";oo.propTypes={data:s.arrayOf(s.shape({color:s.string.isRequired,value:s.number.isRequired,title:s.string.isRequired})),borderColor:s.string,title:s.string,graphLength:s.number,containerStyle:s.object,fontColor:s.string,mainColor:s.string,maxValue:s.number,numberOfDivisions:s.number,leftPadding:s.number,xLabelPadding:s.number};const Ul="_indicatorsCategory_arwy3_2",Hl="_title_arwy3_5",Kl="_list_arwy3_13",Sn={indicatorsCategory:Ul,title:Hl,list:Kl},Zl="data:image/svg+xml,%3csvg%20width='8'%20height='8'%20viewBox='0%200%208%208'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.32549%200H4.65882V3.40392H8V4.61176H4.65882V8H3.32549V4.61176H0V3.40392H3.32549V0Z'%20fill='%23605B56'/%3e%3c/svg%3e",Gl="data:image/svg+xml,%3csvg%20width='8'%20height='8'%20viewBox='0%200%208%208'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.32549%200H4.65882V3.40392H8V4.61176H4.65882V8H3.32549V4.61176H0V3.40392H3.32549V0Z'%20fill='%23ffffff'/%3e%3c/svg%3e",et=Hr.create(e=>({activeColor:null,defaultColor:"#92898A",multiple:!1,activeIndicatorType:null,activeIndicatorSubcategory:""})),wi=({indicator:e,subcatIndex:t,indicatorSubcategory:n})=>{const r={},o=new Set;return Object.entries(e).forEach(([i,a])=>{const c=i.match(/^(.*)_subcat_(\d+)$/);if(c){const[u,d,m]=c;Number(m)===t&&(r[d]=a,o.add(d))}}),Object.entries(e).forEach(([i,a])=>{!i.includes("_subcat_")&&!o.has(i)&&(r[i]=a)}),r.activeIndicatorSubcategory=n,r},Yl="_indicatorContainer_swmx0_2",Xl="_indicatorNameContainer_swmx0_12",Ql="_dot_swmx0_19",Jl="_indicatorName_swmx0_12",ec="_switchExternalContainer_swmx0_33",tc="_switchType_swmx0_42",nc="_switchTypeOptions_swmx0_46",rc="_optionContainer_swmx0_57",oc="_customRadious_swmx0_67",sc="_optionText_swmx0_74",ve={indicatorContainer:Yl,indicatorNameContainer:Xl,dot:Ql,indicatorName:Jl,switchExternalContainer:ec,switchType:tc,switchTypeOptions:nc,optionContainer:rc,customRadious:oc,optionText:sc},Zn=({indicator:e,values:t=[],activeIndicator:n,onClickIndicator:r,onChangeType:o,onChangeIndicatorSubcategory:i})=>{const{t:a}=se.useTranslation(),{name:c,type:u,disabled:d,indicatorSubcategories:m}=e,{activeIndicatorType:g,activeColor:y,defaultColor:h,multiple:b,activeIndicatorSubcategory:f}=et(v=>v),[x,_]=S.useState(!1);S.useEffect(()=>{n&&_(b?n.some(v=>v.name==String(c)):n.name==c)},[n]);const w=()=>l.jsx("div",{className:ve.switchExternalContainer,children:l.jsx("div",{className:ve.switchType,children:l.jsxs("div",{className:ve.switchTypeOptions,children:[l.jsxs("div",{className:ve.optionContainer,onClick:()=>{et.setState(v=>({...v,activeIndicatorType:"cat"})),o("cat")},children:[l.jsx("span",{className:`${ve.customRadious}`,style:{backgroundColor:g==="cat"?y:"transparent",borderColor:g==="cat"?y:h}}),l.jsx("h4",{className:ve.optionText,style:{color:g==="cat"?y:h},children:a("indicators.cat")})]}),l.jsxs("div",{className:ve.optionContainer,onClick:()=>{et.setState(v=>({...v,activeIndicatorType:"abs"})),o("abs")},children:[l.jsx("span",{className:`${ve.customRadious}`,style:{backgroundColor:g==="abs"?y:"transparent",borderColor:g==="abs"?y:h}}),l.jsx("h4",{className:ve.optionText,style:{color:g==="abs"?y:h},children:a("indicators.abs")})]})]})})}),N=()=>l.jsx("div",{className:ve.switchExternalContainer,children:l.jsx("div",{className:ve.switchType,children:l.jsx("div",{className:ve.switchTypeOptions,children:m==null?void 0:m.map((v,T)=>l.jsxs("div",{className:ve.optionContainer,onClick:()=>{et.setState(j=>({...j,activeIndicatorSubcategory:v.title}));let M=wi({indicator:e,subcatIndex:T,indicatorSubcategory:v.title});i&&i({indicator:M})},children:[l.jsx("span",{className:`${ve.customRadious}`,style:{backgroundColor:f===v.title?y:"transparent",borderColor:f===v.title?y:h}}),l.jsx("h4",{className:ve.optionText,style:{color:f===v.title?y:h},children:a(v.title)})]},`indicatorSubcategory-${v.title}`))})})}),C=()=>l.jsx("div",{className:ve.switchExternalContainer,children:l.jsx("div",{className:ve.switchType,children:l.jsx("div",{className:ve.switchTypeOptions,children:t.map((v,T)=>l.jsxs("div",{className:ve.optionContainer,children:[l.jsx("span",{className:ve.customRadious}),l.jsx("h4",{children:a(v.unit)})]},T))})})});return l.jsxs("div",{className:ve.indicatorContainer,children:[l.jsxs("div",{className:ve.indicatorNameContainer,onClick:()=>!d&&r({indicator:e}),children:[l.jsx("div",{style:{border:x?`1px solid ${y}`:`1px solid ${h}`,opacity:d?.5:1,backgroundColor:x?y:"transparent"},className:ve.dot,children:b&&l.jsx("img",{src:x?Gl:Zl,alt:""})}),l.jsx("h4",{className:ve.indicatorName,style:{color:x?y:h,opacity:d?.5:1},children:l.jsx(se.Trans,{i18nKey:c,components:{sup:l.jsx("sup",{})},shouldUnescape:!0})})]}),(n==null?void 0:n.name)===c&&u==="both"&&w(),(n==null?void 0:n.name)===c&&u==="twoUnits"&&C(),(n==null?void 0:n.name)===c&&m&&m.length>0&&N()]})};Zn.displayName="Indicator";Zn.propTypes={indicator:s.shape({name:s.string,type:s.string}),values:s.oneOfType([s.bool,s.array]),activeColor:s.string,defaultColor:s.string,activeIndicator:s.oneOfType([s.object,s.array]),multiple:s.bool,onClickIndicator:s.func};const ic="_indicatorsSubCategory_1nuug_2",ac="_list_1nuug_11",fs={indicatorsSubCategory:ic,list:ac},so=({subcName:e,indicators:t,activeSubCategory:n,onClickSubCategory:r,id:o,activeIndicator:i,onClickIndicator:a,onChangeType:c,onChangeIndicatorSubcategory:u})=>{const{t:d}=se.useTranslation(),[m,g]=S.useState(!1);S.useEffect(()=>{g(n==o)},[n,o]);const{activeIndicatorType:y,activeColor:h,defaultColor:b,multiple:f,activeIndicatorSubcategory:x}=et(_=>_);return l.jsxs(Ur.motion.div,{className:fs.indicatorsSubCategory,initial:{height:"43px"},animate:{height:m?"auto":"43px"},transition:{duration:.4},children:[l.jsx("button",{onClick:()=>r(o),children:l.jsxs("h3",{style:{color:m?h:b},children:[l.jsx("span",{style:{color:m?h:b},children:m?"-":"+"}),l.jsx("span",{style:{color:m?h:b},children:d(e)})]})}),t&&l.jsx("div",{className:fs.list,children:t==null?void 0:t.map((_,w)=>l.jsx(Zn,{indicator:_,activeIndicator:i,onClickIndicator:a,onChangeType:c,onChangeIndicatorSubcategory:u},"indicator"+w))})]})};so.displayName="IndicatorSubCategory";so.propTypes={subcName:s.string,indicators:s.array,activeColor:s.string,defaultColor:s.string,activeSubCategory:s.string,id:s.string,activeIndicator:s.oneOfType([s.object,s.array]),multiple:s.bool,onClickSubCategory:s.func,onClickIndicator:s.func};const io=({cat:e,id:t,onClickCategory:n,activeCategory:r,activeSubCategory:o,onClickSubCategory:i,activeIndicator:a,onClickIndicator:c,onChangeType:u,onChangeIndicatorSubcategory:d})=>{var _;const{t:m}=se.useTranslation(),{activeIndicatorType:g,activeColor:y,defaultColor:h,multiple:b}=et(w=>w),[f,x]=S.useState(!1);return S.useEffect(()=>{x(r===t)},[r,t]),l.jsxs(Ur.motion.div,{className:Sn.indicatorsCategory,initial:{height:"53px"},animate:{height:f?"auto":"53px"},transition:{duration:.4},style:{backgroundColor:"white",borderBottom:f?`1px solid ${y}`:"0px",marginBottom:f?"20px":"0px"},children:[l.jsxs("h2",{className:`${Sn.title}`,onClick:()=>n(t),children:[l.jsx("span",{className:Sn.plus,style:{color:f?y:h},children:f?"-":"+"}),l.jsx("span",{style:{color:f?y:h},children:m(e.name)})]}),e.subcategories?e.subcategories.map(({name:w,subcategory:N,indicators:C},v)=>l.jsx(so,{id:N,activeSubCategory:o,subcName:w,onClickSubCategory:i,activeIndicator:a,onClickIndicator:c,indicators:C,onChangeType:u,onChangeIndicatorSubcategory:d},`subcKey ${v}`)):l.jsx("div",{className:Sn.list,children:(_=e.indicators)==null?void 0:_.map((w,N)=>l.jsx(Zn,{indicator:w,values:w.type=="twoUnits"&&w.values,activeIndicator:a,onClickIndicator:c,onChangeType:u,onChangeIndicatorSubcategory:d},`indicator${N}`))})]})};io.displayName="IndicatorsCategory";io.propTypes={cat:s.object,id:s.string,onChange:s.func,onClickCategory:s.func,activeCategory:s.string,activeSubCategory:s.string,onClickSubCategory:s.func,onClickIndicator:s.func,activeIndicator:s.oneOfType([s.object,s.array]),multiple:s.bool,activeColor:s.string,defaultColor:s.string};const lc="_indicatorsList_13b3m_2",cc="_title_13b3m_6",ps={indicatorsList:lc,title:cc},Br=(e,t)=>{if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>Br(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(o=>Br(e[o],t[o]))}return!1},ao=({indicators:e,activeColor:t,defaultColor:n="#92898A",onChange:r,multiple:o=!1,defaultValue:i=null,changeIndType:a,activeIndicatorType:c,onChangeIndicatorSubcategory:u})=>{const{t:d}=se.useTranslation(),[m,g]=S.useState(),[y,h]=S.useState(),[b,f]=S.useState(),x=S.useRef(i),_=S.useRef(!1);S.useEffect(()=>{et.setState({activeColor:t||"",defaultColor:n||"",multiple:o||!1,activeIndicatorType:c||null})},[t,n,o,c]);const w=j=>{g(m==j?null:j)},N=j=>{h(y==j?null:j)},C=({indicator:j})=>{if(j!=null&&j.indicatorSubcategories&&j.indicatorSubcategories.length>0){const $=j.indicatorSubcategories[0],P=wi({indicator:j,subcatIndex:0,indicatorSubcategory:$.title});et.setState({activeIndicatorSubcategory:$.title}),T(P,!0),u&&u({indicator:P})}else et.setState({activeIndicatorSubcategory:null}),T(j)},v=({indicator:j})=>{T(j,!0),u&&u({indicator:j})},T=(j,$=!1,P=!1)=>{if(o){let D=b&&b.length>0?[...b]:[];const p=D==null?void 0:D.some(k=>k.name==j.name);let E;$?E=j:E=p?D.filter(k=>k.name!=String(j.name)):[...D,j],f(E),j.type=="both"&&a("cat"),r&&typeof r=="function"&&($||!(j!=null&&j.indicatorSubcategories))&&!P&&r({activeIndicator:E})}else{let D;$?D=j:D=(b==null?void 0:b.name)==j.name?null:j,f(D),(j==null?void 0:j.type)=="both"&&a("cat"),r&&typeof r=="function"&&($||!(j!=null&&j.indicatorSubcategories))&&!P&&r({activeIndicator:D})}};S.useLayoutEffect(()=>{var j;if(x.current&&!b){_.current=!0;try{o&&Array.isArray(x.current)?(f([...x.current]),M((j=x.current[0])==null?void 0:j.name)):x.current&&(T(x.current,!1,!0),M(x.current.name))}finally{_.current=!1}}},[]),S.useEffect(()=>{var j;if(!_.current&&!Br(i,b)){_.current=!0;try{const{activeIndicatorSubcategory:$}=i||{};$&&et.setState({activeIndicatorSubcategory:$}),o&&Array.isArray(i)?(f([...i]),M((j=i[0])==null?void 0:j.name)):i?(T(i,!1,!0),M(i.name)):(f(o?[]:null),g(null),h(null))}finally{_.current=!1}}},[i]);const M=j=>{const $=e.find(P=>{if(P.subcategories){let D=P.subcategories.find(p=>p.indicators.find(E=>E.name==j));if(D)return h(D.subcategory),D}else return P.indicators.some(D=>D.name==j)});$&&g($.category)};return l.jsxs("div",{className:ps.indicatorsList,children:[l.jsx("h2",{className:ps.title,style:{color:n},children:d("indicators.indicators")}),e.map((j,$)=>l.jsx(io,{id:j.category,cat:j,onClickCategory:w,activeCategory:m,onClickSubCategory:N,activeSubCategory:y,onClickIndicator:C,activeIndicator:b,onChange:r,onChangeType:a,onChangeIndicatorSubcategory:v},`categoryKey${$}`))]})};ao.displayName="IndicatorsList";ao.propTypes={indicators:s.arrayOf(s.object),activeColor:s.string,defaultColor:s.string,onChange:s.func,changeIndType:s.func,multiple:s.bool,activeIndicator:s.oneOfType([s.object,s.array]),defaultValue:s.oneOfType([s.object,s.array]),activeIndicatorType:s.string,onChangeIndicatorSubcategory:s.func};const uc="_langSelector_o9enq_2",dc="_currentLang_o9enq_14",fc="_arrow_o9enq_26",pc="_prevImg_o9enq_29",mc="_langMenu_o9enq_33",Mt={langSelector:uc,currentLang:dc,arrow:fc,prevImg:pc,langMenu:mc},lo=({langs:e,arrow:t,imgPrev:n})=>{const[r,o]=S.useState(!1),{i18n:i}=se.useTranslation(),a=e.find(u=>u.code==i.language),c=u=>{i.changeLanguage(u),o(!1)};return l.jsxs("div",{className:Mt.langSelector,children:[l.jsxs("div",{className:Mt.currentLang,onClick:()=>{o(!r)},children:[n&&l.jsx("img",{className:Mt.prevImg,src:n}),(a==null?void 0:a.titleSelected)||(a==null?void 0:a.title),l.jsx("img",{src:t,className:Mt.arrow})]}),r&&l.jsx("div",{className:Mt.langMenu,children:e.map(u=>l.jsx("button",{className:(a==null?void 0:a.code)==u.code?Mt.active:"",onClick:()=>c(u.code),children:u.title},u.code))})]})};lo.displayName="LangSelector";lo.propTypes={langs:s.arrayOf(s.shape({code:s.string,title:s.string,titleSelected:s.string})),color:s.string,bckColor:s.string,hoverColor:s.string,arrow:s.object,imgPrev:s.string||s.object};const hc="_legendContainer_r9cd6_3",gc="_closeButton_r9cd6_43",yc="_titleContainer_r9cd6_71",bc="_infoContainer_r9cd6_77",vc="_titleLegendList_r9cd6_88",xc="_legendListContainer_r9cd6_94",Cc="_gridContainer_r9cd6_94",_c="_elementLegendContainer_r9cd6_100",Sc="_colorDot_r9cd6_106",wc="_absoluteValueContainer_r9cd6_112",Tc="_absoluteValueColor_r9cd6_115",kc="_absoluteValueText_r9cd6_120",jc="_noDataContainer_r9cd6_132",$c="_noData_r9cd6_132",Nc="_moreInfoContainer_r9cd6_153",Ae={legendContainer:hc,closeButton:gc,titleContainer:yc,infoContainer:bc,titleLegendList:vc,legendListContainer:xc,gridContainer:Cc,elementLegendContainer:_c,colorDot:Sc,absoluteValueContainer:wc,absoluteValueColor:Tc,absoluteValueText:kc,noDataContainer:jc,noData:$c,moreInfoContainer:Nc},co=({containerStyles:e,title:t,infoList:n,legendItems:r,onClickMoreInfo:o,buttonTitle:i,onClickClose:a})=>{const{t:c}=se.useTranslation();return l.jsxs("div",{style:e?{...e}:{},className:`${Ae.legendContainer}`,children:[l.jsx("button",{className:Ae.closeButton,onClick:a}),t&&l.jsx("div",{className:Ae.titleContainer,style:{marginBottom:(!n||n.length==0)&&"15px"},children:l.jsx("h2",{children:t})}),n&&n.length>0&&l.jsx("div",{className:Ae.infoContainer,children:l.jsx("ul",{children:n.map(({title:u,value:d},m)=>l.jsxs("li",{children:[l.jsx("h3",{className:Ae.title,children:`${u}:`}),l.jsxs("span",{className:Ae.value,children:["  ",d]})]},`${u}-${m}`))})}),r&&r.length>0&&r.map((u,d)=>l.jsxs("div",{children:[l.jsx("h3",{className:Ae.titleLegendList,style:{marginTop:n&&n.length>0&&d===0?"30px":d>0?"20px":"0px"},children:u.title&&l.jsx(se.Trans,{i18nKey:u.title,components:{sup:l.jsx("sup",{})},shouldUnescape:!0})}),l.jsxs("div",{className:Ae.legendListContainer,children:[u.absolute?l.jsxs("div",{className:Ae.absoluteValueContainer,children:[l.jsx("div",{className:Ae.absoluteValueColor,style:{background:`linear-gradient(to bottom, ${u.absolute.maxColor} 0%, ${u.absolute.midColor?`${u.absolute.midColor} 50%,`:""} ${u.absolute.minColor} 100%)`}}),l.jsxs("div",{className:Ae.absoluteValueText,children:[l.jsxs("span",{children:[u.absolute.maxValue," ",c(u.absolute.unit)," ",u.absolute.offlimits&&c(u.moreText)]}),u.absolute.midValue&&l.jsxs("span",{children:[u.absolute.midValue," ",c(u.absolute.unit)]}),l.jsxs("span",{children:[u.absolute.minValue," ",c(u.absolute.unit)," ",u.absolute.offlimits&&c(u.lessText)]})]})]}):u.categories&&u.categories.length>0&&l.jsx("div",{className:Ae.gridContainer,children:u.categories.map(({title:m,color:g},y)=>l.jsxs("div",{className:Ae.elementLegendContainer,children:[l.jsx("div",{className:Ae.colorDot,style:{backgroundColor:g}}),l.jsxs("div",{className:Ae.titleLegendElement,children:[c(m)," "]})]},y))}),u.absolute&&u.absolute.noDataColor&&l.jsxs("div",{className:Ae.noDataContainer,children:[l.jsx("div",{className:Ae.noData,style:{background:u.absolute.noDataColor}}),l.jsx("div",{className:Ae.absoluteValueText,children:l.jsx("span",{children:c(u.absolute.noDataText)})})]})]})]},d)),o&&l.jsx("button",{className:Ae.moreInfoContainer,onClick:o,children:i||c("moreInformation")})]})};co.displayName="Legend";co.propTypes={title:s.string,containerStyles:s.object,infoList:s.arrayOf(s.shape({title:s.string.isRequired,value:s.oneOfType([s.string,s.number])})),legendItems:s.arrayOf(s.shape({title:s.string,categories:s.arrayOf(s.shape({title:s.string,color:s.string})),absolute:s.shape({maxColor:s.string,minColor:s.string,midColor:s.string,maxValue:s.number,minValue:s.number,midValue:s.number,unit:s.string,noDataColor:s.string,noDataText:s.string})})),onClickMoreInfo:s.func,buttonTitle:s.string,onClickClose:s.func};const Ec="_logo_1ewa6_2",ms={logo:Ec},uo=({src:e,alt:t,href:n})=>{const{t:r}=se.useTranslation(),o=l.jsx("img",{src:e,alt:r(t)});return n?l.jsx("div",{className:ms.logo,children:l.jsx("a",{href:n,children:o})}):l.jsx("div",{className:ms.logo,children:o})};uo.displayName="LogoApp";uo.propTypes={src:s.string.isRequired,alt:s.string.isRequired,href:s.string,className:s.string};const Ac=J.createContext(null);function Oc(e,t){const n=Array.isArray(e)?e[0]:e?e.x:0,r=Array.isArray(e)?e[1]:e?e.y:0,o=Array.isArray(t)?t[0]:t?t.x:0,i=Array.isArray(t)?t[1]:t?t.y:0;return n===o&&r===i}function Ve(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Ve(e[n],t[n]))return!1;return!0}else if(Array.isArray(t))return!1;if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!t.hasOwnProperty(o)||!Ve(e[o],t[o]))return!1;return!0}return!1}function Mc(e){const t=e.clone();return t.pixelsToGLUnits=e.pixelsToGLUnits,t}function hs(e,t){if(!e.getProjection)return;const n=e.getProjection(),r=t.getProjection();Ve(n,r)||t.setProjection(n)}function gs(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function ys(e,t){const n=t.viewState||t;let r=!1;if("zoom"in n){const o=e.zoom;e.zoom=n.zoom,r=r||o!==e.zoom}if("bearing"in n){const o=e.bearing;e.bearing=n.bearing,r=r||o!==e.bearing}if("pitch"in n){const o=e.pitch;e.pitch=n.pitch,r=r||o!==e.pitch}if(n.padding&&!e.isPaddingEqual(n.padding)&&(r=!0,e.padding=n.padding),"longitude"in n&&"latitude"in n){const o=e.center;e.center=new o.constructor(n.longitude,n.latitude),r=r||o!==e.center}return r}const Lc=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function bs(e){if(!e)return null;if(typeof e=="string"||("toJS"in e&&(e=e.toJS()),!e.layers))return e;const t={};for(const r of e.layers)t[r.id]=r;const n=e.layers.map(r=>{let o=null;"interactive"in r&&(o=Object.assign({},r),delete o.interactive);const i=t[r.ref];if(i){o=o||Object.assign({},r),delete o.ref;for(const a of Lc)a in i&&(o[a]=i[a])}return o||r});return{...e,layers:n}}const vs={version:8,sources:{},layers:[]},xs={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},Sr={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},Cs={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},Rc=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],Ic=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class Ht{constructor(t,n,r){this._map=null,this._internalUpdate=!1,this._inRender=!1,this._hoveredFeatures=null,this._deferredEvents={move:!1,zoom:!1,pitch:!1,rotate:!1},this._onEvent=o=>{const i=this.props[Cs[o.type]];i?i(o):o.type==="error"&&console.error(o.error)},this._onPointerEvent=o=>{(o.type==="mousemove"||o.type==="mouseout")&&this._updateHover(o);const i=this.props[xs[o.type]];i&&(this.props.interactiveLayerIds&&o.type!=="mouseover"&&o.type!=="mouseout"&&(o.features=this._hoveredFeatures||this._queryRenderedFeatures(o.point)),i(o),delete o.features)},this._onCameraEvent=o=>{if(!this._internalUpdate){const i=this.props[Sr[o.type]];i&&i(o)}o.type in this._deferredEvents&&(this._deferredEvents[o.type]=!1)},this._MapClass=t,this.props=n,this._initialize(r)}get map(){return this._map}get transform(){return this._renderTransform}setProps(t){const n=this.props;this.props=t;const r=this._updateSettings(t,n);r&&this._createShadowTransform(this._map);const o=this._updateSize(t),i=this._updateViewState(t,!0);this._updateStyle(t,n),this._updateStyleComponents(t,n),this._updateHandlers(t,n),(r||o||i&&!this._map.isMoving())&&this.redraw()}static reuse(t,n){const r=Ht.savedMaps.pop();if(!r)return null;const o=r.map,i=o.getContainer();for(n.className=i.className;i.childNodes.length>0;)n.appendChild(i.childNodes[0]);o._container=n;const a=o._resizeObserver;a&&(a.disconnect(),a.observe(n)),r.setProps({...t,styleDiffing:!1}),o.resize();const{initialViewState:c}=t;return c&&(c.bounds?o.fitBounds(c.bounds,{...c.fitBoundsOptions,duration:0}):r._updateViewState(c,!1)),o.isStyleLoaded()?o.fire("load"):o.once("styledata",()=>o.fire("load")),o._update(),r}_initialize(t){const{props:n}=this,{mapStyle:r=vs}=n,o={...n,...n.initialViewState,accessToken:n.mapboxAccessToken||Dc()||null,container:t,style:bs(r)},i=o.initialViewState||o.viewState||o;if(Object.assign(o,{center:[i.longitude||0,i.latitude||0],zoom:i.zoom||0,pitch:i.pitch||0,bearing:i.bearing||0}),n.gl){const m=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=m,n.gl)}const a=new this._MapClass(o);i.padding&&a.setPadding(i.padding),n.cursor&&(a.getCanvas().style.cursor=n.cursor),this._createShadowTransform(a);const c=a._render;a._render=m=>{this._inRender=!0,c.call(a,m),this._inRender=!1};const u=a._renderTaskQueue.run;a._renderTaskQueue.run=m=>{u.call(a._renderTaskQueue,m),this._onBeforeRepaint()},a.on("render",()=>this._onAfterRepaint());const d=a.fire;a.fire=this._fireEvent.bind(this,d),a.on("resize",()=>{this._renderTransform.resize(a.transform.width,a.transform.height)}),a.on("styledata",()=>{this._updateStyleComponents(this.props,{}),hs(a.transform,this._renderTransform)}),a.on("sourcedata",()=>this._updateStyleComponents(this.props,{}));for(const m in xs)a.on(m,this._onPointerEvent);for(const m in Sr)a.on(m,this._onCameraEvent);for(const m in Cs)a.on(m,this._onEvent);this._map=a}recycle(){const n=this.map.getContainer().querySelector("[mapboxgl-children]");n==null||n.remove(),Ht.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const t=this._map;!this._inRender&&t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}_createShadowTransform(t){const n=Mc(t.transform);t.painter.transform=n,this._renderTransform=n}_updateSize(t){const{viewState:n}=t;if(n){const r=this._map;if(n.width!==r.transform.width||n.height!==r.transform.height)return r.resize(),!0}return!1}_updateViewState(t,n){if(this._internalUpdate)return!1;const r=this._map,o=this._renderTransform,{zoom:i,pitch:a,bearing:c}=o,u=r.isMoving();u&&(o.cameraElevationReference="sea");const d=ys(o,{...gs(r.transform),...t});if(u&&(o.cameraElevationReference="ground"),d&&n){const m=this._deferredEvents;m.move=!0,m.zoom||(m.zoom=i!==o.zoom),m.rotate||(m.rotate=c!==o.bearing),m.pitch||(m.pitch=a!==o.pitch)}return u||ys(r.transform,t),d}_updateSettings(t,n){const r=this._map;let o=!1;for(const i of Rc)if(i in t&&!Ve(t[i],n[i])){o=!0;const a=r[`set${i[0].toUpperCase()}${i.slice(1)}`];a==null||a.call(r,t[i])}return o}_updateStyle(t,n){if(t.cursor!==n.cursor&&(this._map.getCanvas().style.cursor=t.cursor||""),t.mapStyle!==n.mapStyle){const{mapStyle:r=vs,styleDiffing:o=!0}=t,i={diff:o};return"localIdeographFontFamily"in t&&(i.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(bs(r),i),!0}return!1}_updateStyleComponents(t,n){const r=this._map;let o=!1;return r.isStyleLoaded()&&("light"in t&&r.setLight&&!Ve(t.light,n.light)&&(o=!0,r.setLight(t.light)),"fog"in t&&r.setFog&&!Ve(t.fog,n.fog)&&(o=!0,r.setFog(t.fog)),"terrain"in t&&r.setTerrain&&!Ve(t.terrain,n.terrain)&&(!t.terrain||r.getSource(t.terrain.source))&&(o=!0,r.setTerrain(t.terrain))),o}_updateHandlers(t,n){var r,o;const i=this._map;let a=!1;for(const c of Ic){const u=(r=t[c])!==null&&r!==void 0?r:!0,d=(o=n[c])!==null&&o!==void 0?o:!0;Ve(u,d)||(a=!0,u?i[c].enable(u):i[c].disable())}return a}_queryRenderedFeatures(t){const n=this._map,r=n.transform,{interactiveLayerIds:o=[]}=this.props;try{return n.transform=this._renderTransform,n.queryRenderedFeatures(t,{layers:o.filter(n.getLayer.bind(n))})}catch{return[]}finally{n.transform=r}}_updateHover(t){var n;const{props:r}=this;if(r.interactiveLayerIds&&(r.onMouseMove||r.onMouseEnter||r.onMouseLeave)){const i=t.type,a=((n=this._hoveredFeatures)===null||n===void 0?void 0:n.length)>0,c=this._queryRenderedFeatures(t.point),u=c.length>0;!u&&a&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=c,u&&!a&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=i}else this._hoveredFeatures=null}_fireEvent(t,n,r){const o=this._map,i=o.transform,a=typeof n=="string"?n:n.type;return a==="move"&&this._updateViewState(this.props,!1),a in Sr&&(typeof n=="object"&&(n.viewState=gs(i)),this._map.isMoving())?(o.transform=this._renderTransform,t.call(o,n,r),o.transform=i,o):(t.call(o,n,r),o)}_onBeforeRepaint(){const t=this._map;this._internalUpdate=!0;for(const r in this._deferredEvents)this._deferredEvents[r]&&t.fire(r);this._internalUpdate=!1;const n=this._map.transform;t.transform=this._renderTransform,this._onAfterRepaint=()=>{hs(this._renderTransform,n),t.transform=n}}}Ht.savedMaps=[];function Dc(){let e=null;if(typeof location<"u"){const t=/access_token=([^&\/]*)/.exec(location.search);e=t&&t[1]}try{e=e||process.env.MapboxAccessToken}catch{}try{e=e||process.env.REACT_APP_MAPBOX_ACCESS_TOKEN}catch{}return e}const Bc=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function Pc(e){if(!e)return null;const t=e.map,n={getMap:()=>t,getCenter:()=>e.transform.center,getZoom:()=>e.transform.zoom,getBearing:()=>e.transform.bearing,getPitch:()=>e.transform.pitch,getPadding:()=>e.transform.padding,getBounds:()=>e.transform.getBounds(),project:r=>{const o=t.transform;t.transform=e.transform;const i=t.project(r);return t.transform=o,i},unproject:r=>{const o=t.transform;t.transform=e.transform;const i=t.unproject(r);return t.transform=o,i},queryTerrainElevation:(r,o)=>{const i=t.transform;t.transform=e.transform;const a=t.queryTerrainElevation(r,o);return t.transform=i,a},queryRenderedFeatures:(r,o)=>{const i=t.transform;t.transform=e.transform;const a=t.queryRenderedFeatures(r,o);return t.transform=i,a}};for(const r of Fc(t))!(r in n)&&!Bc.includes(r)&&(n[r]=t[r].bind(t));return n}function Fc(e){const t=new Set;let n=e;for(;n;){for(const r of Object.getOwnPropertyNames(n))r[0]!=="_"&&typeof e[r]=="function"&&r!=="fire"&&r!=="setEventedParent"&&t.add(r);n=Object.getPrototypeOf(n)}return Array.from(t)}const Vc=typeof document<"u"?S.useLayoutEffect:S.useEffect,zc=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"];function qc(e,t){for(const r of zc)r in t&&(e[r]=t[r]);const{RTLTextPlugin:n="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js"}=t;n&&e.getRTLTextPluginStatus&&e.getRTLTextPluginStatus()==="unavailable"&&e.setRTLTextPlugin(n,r=>{r&&console.error(r)},!0)}const Gt=J.createContext(null);function Wc(e,t,n){const r=S.useContext(Ac),[o,i]=S.useState(null),a=S.useRef(),{current:c}=S.useRef({mapLib:null,map:null});S.useEffect(()=>{const m=e.mapLib;let g=!0,y;return Promise.resolve(m||n).then(h=>{if(!g)return;if(!h)throw new Error("Invalid mapLib");const b="Map"in h?h:h.default;if(!b.Map)throw new Error("Invalid mapLib");if(qc(b,e),!b.supported||b.supported(e))e.reuseMaps&&(y=Ht.reuse(e,a.current)),y||(y=new Ht(b.Map,e,a.current)),c.map=Pc(y),c.mapLib=b,i(y),r==null||r.onMapMount(c.map,e.id);else throw new Error("Map is not supported by this browser")}).catch(h=>{const{onError:b}=e;b?b({type:"error",target:null,originalEvent:null,error:h}):console.error(h)}),()=>{g=!1,y&&(r==null||r.onMapUnmount(e.id),e.reuseMaps?y.recycle():y.destroy())}},[]),Vc(()=>{o&&o.setProps(e)}),S.useImperativeHandle(t,()=>c.map,[o]);const u=S.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]),d={height:"100%"};return J.createElement("div",{id:e.id,ref:a,style:u},o&&J.createElement(Gt.Provider,{value:c},J.createElement("div",{"mapboxgl-children":"",style:d},e.children)))}const Uc=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function Nt(e,t){if(!e||!t)return;const n=e.style;for(const r in t){const o=t[r];Number.isFinite(o)&&!Uc.test(r)?n[r]=`${o}px`:n[r]=o}}function Hc(e,t){const{map:n,mapLib:r}=S.useContext(Gt),o=S.useRef({props:e});o.current.props=e;const i=S.useMemo(()=>{let f=!1;J.Children.forEach(e.children,w=>{w&&(f=!0)});const x={...e,element:f?document.createElement("div"):null},_=new r.Marker(x);return _.setLngLat([e.longitude,e.latitude]),_.getElement().addEventListener("click",w=>{var N,C;(C=(N=o.current.props).onClick)===null||C===void 0||C.call(N,{type:"click",target:_,originalEvent:w})}),_.on("dragstart",w=>{var N,C;const v=w;v.lngLat=i.getLngLat(),(C=(N=o.current.props).onDragStart)===null||C===void 0||C.call(N,v)}),_.on("drag",w=>{var N,C;const v=w;v.lngLat=i.getLngLat(),(C=(N=o.current.props).onDrag)===null||C===void 0||C.call(N,v)}),_.on("dragend",w=>{var N,C;const v=w;v.lngLat=i.getLngLat(),(C=(N=o.current.props).onDragEnd)===null||C===void 0||C.call(N,v)}),_},[]);S.useEffect(()=>(i.addTo(n.getMap()),()=>{i.remove()}),[]);const{longitude:a,latitude:c,offset:u,style:d,draggable:m=!1,popup:g=null,rotation:y=0,rotationAlignment:h="auto",pitchAlignment:b="auto"}=e;return S.useEffect(()=>{Nt(i.getElement(),d)},[d]),S.useImperativeHandle(t,()=>i,[]),(i.getLngLat().lng!==a||i.getLngLat().lat!==c)&&i.setLngLat([a,c]),u&&!Oc(i.getOffset(),u)&&i.setOffset(u),i.isDraggable()!==m&&i.setDraggable(m),i.getRotation()!==y&&i.setRotation(y),i.getRotationAlignment()!==h&&i.setRotationAlignment(h),i.getPitchAlignment()!==b&&i.setPitchAlignment(b),i.getPopup()!==g&&i.setPopup(g),yi.createPortal(e.children,i.getElement())}S.memo(S.forwardRef(Hc));function _s(e){return new Set(e?e.trim().split(/\s+/):[])}function Kc(e,t){const{map:n,mapLib:r}=S.useContext(Gt),o=S.useMemo(()=>document.createElement("div"),[]),i=S.useRef({props:e});i.current.props=e;const a=S.useMemo(()=>{const c={...e},u=new r.Popup(c);return u.setLngLat([e.longitude,e.latitude]),u.once("open",d=>{var m,g;(g=(m=i.current.props).onOpen)===null||g===void 0||g.call(m,d)}),u},[]);if(S.useEffect(()=>{const c=u=>{var d,m;(m=(d=i.current.props).onClose)===null||m===void 0||m.call(d,u)};return a.on("close",c),a.setDOMContent(o).addTo(n.getMap()),()=>{a.off("close",c),a.isOpen()&&a.remove()}},[]),S.useEffect(()=>{Nt(a.getElement(),e.style)},[e.style]),S.useImperativeHandle(t,()=>a,[]),a.isOpen()&&((a.getLngLat().lng!==e.longitude||a.getLngLat().lat!==e.latitude)&&a.setLngLat([e.longitude,e.latitude]),e.offset&&!Ve(a.options.offset,e.offset)&&a.setOffset(e.offset),(a.options.anchor!==e.anchor||a.options.maxWidth!==e.maxWidth)&&(a.options.anchor=e.anchor,a.setMaxWidth(e.maxWidth)),a.options.className!==e.className)){const c=_s(a.options.className),u=_s(e.className);for(const d of c)u.has(d)||a.removeClassName(d);for(const d of u)c.has(d)||a.addClassName(d);a.options.className=e.className}return yi.createPortal(e.children,o)}const Zc=S.memo(S.forwardRef(Kc));function dn(e,t,n,r){const o=S.useContext(Gt),i=S.useMemo(()=>e(o),[]);return S.useEffect(()=>{const a=t,c=null,u=typeof t=="function"?t:null,{map:d}=o;return d.hasControl(i)||(d.addControl(i,a==null?void 0:a.position),c&&c(o)),()=>{u&&u(o),d.hasControl(i)&&d.removeControl(i)}},[]),i}function Gc(e){const t=dn(({mapLib:n})=>new n.AttributionControl(e),{position:e.position});return S.useEffect(()=>{Nt(t._container,e.style)},[e.style]),null}S.memo(Gc);function Yc(e){const t=dn(({mapLib:n})=>new n.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return S.useEffect(()=>{Nt(t._controlContainer,e.style)},[e.style]),null}S.memo(Yc);function Xc(e,t){const n=S.useRef({props:e}),r=dn(({mapLib:o})=>{const i=new o.GeolocateControl(e),a=i._setupUI;return i._setupUI=c=>{i._container.hasChildNodes()||a(c)},i.on("geolocate",c=>{var u,d;(d=(u=n.current.props).onGeolocate)===null||d===void 0||d.call(u,c)}),i.on("error",c=>{var u,d;(d=(u=n.current.props).onError)===null||d===void 0||d.call(u,c)}),i.on("outofmaxbounds",c=>{var u,d;(d=(u=n.current.props).onOutOfMaxBounds)===null||d===void 0||d.call(u,c)}),i.on("trackuserlocationstart",c=>{var u,d;(d=(u=n.current.props).onTrackUserLocationStart)===null||d===void 0||d.call(u,c)}),i.on("trackuserlocationend",c=>{var u,d;(d=(u=n.current.props).onTrackUserLocationEnd)===null||d===void 0||d.call(u,c)}),i},{position:e.position});return n.current.props=e,S.useImperativeHandle(t,()=>r,[]),S.useEffect(()=>{Nt(r._container,e.style)},[e.style]),null}S.memo(S.forwardRef(Xc));function Qc(e){const t=dn(({mapLib:n})=>new n.NavigationControl(e),{position:e.position});return S.useEffect(()=>{Nt(t._container,e.style)},[e.style]),null}const Jc=S.memo(Qc);function e0(e){const t=dn(({mapLib:i})=>new i.ScaleControl(e),{position:e.position}),n=S.useRef(e),r=n.current;n.current=e;const{style:o}=e;return e.maxWidth!==void 0&&e.maxWidth!==r.maxWidth&&(t.options.maxWidth=e.maxWidth),e.unit!==void 0&&e.unit!==r.unit&&t.setUnit(e.unit),S.useEffect(()=>{Nt(t._container,o)},[o]),null}S.memo(e0);function Pn(e,t){if(!e)throw new Error(t)}function t0(e,t,n,r){if(Pn(n.id===r.id,"layer id changed"),Pn(n.type===r.type,"layer type changed"),n.type==="custom"||r.type==="custom")return;const{layout:o={},paint:i={},filter:a,minzoom:c,maxzoom:u,beforeId:d}=n;if(d!==r.beforeId&&e.moveLayer(t,d),o!==r.layout){const m=r.layout||{};for(const g in o)Ve(o[g],m[g])||e.setLayoutProperty(t,g,o[g]);for(const g in m)o.hasOwnProperty(g)||e.setLayoutProperty(t,g,void 0)}if(i!==r.paint){const m=r.paint||{};for(const g in i)Ve(i[g],m[g])||e.setPaintProperty(t,g,i[g]);for(const g in m)i.hasOwnProperty(g)||e.setPaintProperty(t,g,void 0)}Ve(a,r.filter)||e.setFilter(t,a),(c!==r.minzoom||u!==r.maxzoom)&&e.setLayerZoomRange(t,c,u)}function n0(e,t,n){if(e.style&&e.style._loaded&&(!("source"in n)||e.getSource(n.source))){const r={...n,id:t};delete r.beforeId,e.addLayer(r,n.beforeId)}}let r0=0;function o0(e){const t=S.useContext(Gt).map.getMap(),n=S.useRef(e),[,r]=S.useState(0),o=S.useMemo(()=>e.id||`jsx-layer-${r0++}`,[]);if(S.useEffect(()=>{if(t){const a=()=>r(c=>c+1);return t.on("styledata",a),a(),()=>{t.off("styledata",a),t.style&&t.style._loaded&&t.getLayer(o)&&t.removeLayer(o)}}},[t]),t&&t.style&&t.getLayer(o))try{t0(t,o,e,n.current)}catch(a){console.warn(a)}else n0(t,o,e);return n.current=e,null}let s0=0;function i0(e,t,n){if(e.style&&e.style._loaded){const r={...n};return delete r.id,delete r.children,e.addSource(t,r),e.getSource(t)}return null}function a0(e,t,n){Pn(t.id===n.id,"source id changed"),Pn(t.type===n.type,"source type changed");let r="",o=0;for(const a in t)a!=="children"&&a!=="id"&&!Ve(n[a],t[a])&&(r=a,o++);if(!o)return;const i=t.type;i==="geojson"?e.setData(t.data):i==="image"?e.updateImage({url:t.url,coordinates:t.coordinates}):"setCoordinates"in e&&o===1&&r==="coordinates"?e.setCoordinates(t.coordinates):"setUrl"in e&&r==="url"?e.setUrl(t.url):"setTiles"in e&&r==="tiles"?e.setTiles(t.tiles):console.warn(`Unable to update <Source> prop: ${r}`)}function l0(e){const t=S.useContext(Gt).map.getMap(),n=S.useRef(e),[,r]=S.useState(0),o=S.useMemo(()=>e.id||`jsx-source-${s0++}`,[]);S.useEffect(()=>{if(t){const a=()=>setTimeout(()=>r(c=>c+1),0);return t.on("styledata",a),a(),()=>{var c;if(t.off("styledata",a),t.style&&t.style._loaded&&t.getSource(o)){const u=(c=t.getStyle())===null||c===void 0?void 0:c.layers;if(u)for(const d of u)d.source===o&&t.removeLayer(d.id);t.removeSource(o)}}}},[t]);let i=t&&t.style&&t.getSource(o);return i?a0(i,e,n.current):i=i0(t,o,e),n.current=e,i&&J.Children.map(e.children,a=>a&&S.cloneElement(a,{source:o}))||null}const c0=import("mapbox-gl"),Ti=J.forwardRef(function(t,n){return Wc(t,n,c0)}),ki=Zc,ji=Jc,$i=o0,Ni=l0,u0="_mapContainer_84pkf_2",d0={mapContainer:u0};xa.accessToken="pk.eyJ1IjoiY2ljbGljYSIsImEiOiJja3llODhxZ2UwYzF1Mm5xcHVhMzI3anhqIn0.-r56FLAzEH57eVsB2ZeVcA";const fo=({initialView:e={latitude:39.4699,longitude:-.3763,zoom:12},maxZoom:t=17,minZoom:n=8,mapStyle:r,firstSymbolLayer:o,cssProps:i={},onClick:a="",interactiveLayers:c=[],popUp:u=!1,sources:d=[],layers:m=[]})=>{const g=S.useRef(),[y,h]=S.useState(null),b=Ca.useSelector(f=>f.mapState.showTexts);return S.useEffect(()=>{if(g.current){const f=g.current.getMap();f.getStyle().layers.map(_=>{_.type=="symbol"&&_.id!="professionals"&&(b?f.setLayoutProperty(_.id,"visibility","visible"):f.setLayoutProperty(_.id,"visibility","none"))})}},[b]),l.jsx("div",{className:`${d0.mapContainer}`,style:i,children:l.jsxs(Ti,{initialViewState:e,ref:g,hash:!1,maxZoom:t,minZoom:n,mapStyle:r,onClick:a,interactiveLayerIds:c,children:[d.length&&d.map((f,x)=>l.jsx(Ni,{...f,children:m.length&&m.map((_,w)=>{if(_.sourceId==f.id)return l.jsx($i,{..._.layer,beforeId:o},w)})},x)),l.jsx(ji,{position:"bottom-right",visualizePitch:!0}),u&&y&&l.jsx(ki,{longitude:u.longitude,latitude:u.latitude,anchor:u.anchor,onClose:()=>h(null),children:u.content})]})})};fo.displayName="MapboxMap";fo.propTypes={initialView:s.shape({latitude:s.number.isRequired,longitude:s.number.isRequired,zoom:s.number.isRequired}),mapStyle:s.object,firstSymbolLayer:s.string,cssProps:s.object,style:s.object,maxZoom:s.number,minZoom:s.number,onClick:s.func,interactiveLayers:s.array,popUp:s.shape({latitude:s.number,longitude:s.number,anchor:s.string,content:s.element}),textsUrl:s.string,sources:s.arrayOf(s.shape({id:s.string,type:s.string,url:s.string,data:s.object})),layers:s.arrayOf(s.shape({sourceId:s.string,layer:s.shape({id:s.string,type:s.string,sourceLayer:s.string,minZoom:s.number,maxZoom:s.number,paint:s.object})}))};const f0="_mapContainer_1r3q4_3",p0={mapContainer:f0},m0="_FeaturePopUp_oymb1_2",h0="_title_oymb1_10",g0="_button_oymb1_15",wr={FeaturePopUp:m0,title:h0,button:g0},Ei=({props:e})=>{const{t}=se.useTranslation();return l.jsx("div",{className:wr.FeaturePopUp,children:e.map((n,r)=>n.type!="button"?l.jsxs("p",{children:[l.jsxs("span",{className:wr.title,children:[l.jsx(se.Trans,{i18nKey:n.name,components:{sup:l.jsx("sup",{})},shouldUnescape:!0}),":"]}),n.type&&n.type=="html"?l.jsx("span",{dangerouslySetInnerHTML:{__html:n.value}}):isNaN(n.value)?l.jsx(l.Fragment,{children:t(n.value)}):l.jsxs(l.Fragment,{children:[n.value.toLocaleString("de",{maximumFractionDigits:2})," ",t(n.unit)]})]},r):l.jsx("button",{className:wr.button,onClick:()=>n.onClick(),children:n.name},r))})};Ei.displayName="FeaturePopUp";const po=({initialView:e={latitude:39.4699,longitude:-.3763,zoom:12},maxZoom:t=17,minZoom:n=8,mapStyle:r,firstSymbolLayer:o,cssProps:i={},onClick:a="",interactiveLayers:c=[],sources:u=[],layers:d=[],popUpParams:m,onClosePopUp:g,showTexts:y,hash:h=!1})=>{const b=S.useRef();return S.useEffect(()=>{if(b.current){const f=b.current.getMap();f.getStyle().layers.map(_=>{_.type=="symbol"&&_.id!="professionals"&&(y?f.setLayoutProperty(_.id,"visibility","visible"):f.setLayoutProperty(_.id,"visibility","none"))})}},[y]),S.useEffect(()=>{let f=new _a.Protocol;return pr.addProtocol("pmtiles",f.tile),()=>{pr.removeProtocol("pmtiles")}},[]),l.jsx("div",{className:`${p0.mapContainer}`,style:i,children:l.jsxs(Ti,{mapLib:pr,initialViewState:e,ref:b,hash:h,maxZoom:t,minZoom:n,mapStyle:r,onClick:a,interactiveLayerIds:c,children:[u.length&&u.map((f,x)=>l.jsx(Ni,{...f,children:d.length&&d.map((_,w)=>{if(_.sourceId==f.id)return l.jsx($i,{..._.layer,beforeId:o,filter:_.filters?_.filters:["all"],layout:{visibility:_.layer.visibility||"visible"}},w)})},x)),l.jsx(ji,{position:"bottom-right",visualizePitch:!0}),m&&l.jsx(ki,{longitude:m.lng,latitude:m.lat,onClose:g,children:l.jsx(Ei,{props:m.props})})]})})};po.displayName="MaplibreMap";po.propTypes={initialView:s.shape({latitude:s.number.isRequired,longitude:s.number.isRequired,zoom:s.number.isRequired}),mapStyle:s.string,firstSymbolLayer:s.string,cssProps:s.object,style:s.object,maxZoom:s.number,minZoom:s.number,onClick:s.func,interactiveLayers:s.array,popUp:s.bool,sources:s.arrayOf(s.shape({id:s.string,type:s.string,url:s.string,data:s.object})),layers:s.arrayOf(s.shape({sourceId:s.string,layer:s.shape({id:s.string,type:s.string,sourceLayer:s.string,minzoom:s.number,maxzoom:s.number,paint:s.object,visibility:s.string}),filters:s.array})),showTexts:s.bool,popUpParams:s.object,onClosePopUp:s.func};const y0="_sectionBar_yf2vy_2",b0="_leftContent_yf2vy_14",v0="_textContainer_yf2vy_20",x0="_title_yf2vy_27",C0="_subtitle_yf2vy_33",_0="_rightContent_yf2vy_38",Ct={sectionBar:y0,leftContent:b0,textContainer:v0,title:x0,subtitle:C0,rightContent:_0},mo=({leftIcon:e,title:t,subtitle:n,rightContent:r,mainColor:o,width:i,titleColor:a="#605b56",subTitleColor:c="#605b56",borderTop:u=!1})=>{const{t:d}=se.useTranslation();return l.jsxs("div",{className:Ct.sectionBar,style:{width:i&&i,borderTop:u?"1px solid #000":"0px"},children:[l.jsxs("div",{className:Ct.leftContent,children:[e&&l.jsx("img",{src:e,alt:"Icono",className:Ct.icon}),l.jsxs("div",{className:Ct.textContainer,children:[l.jsx("div",{className:Ct.title,style:{color:a},children:d(t)}),n&&l.jsx("div",{className:Ct.subtitle,style:{color:c},children:n})]})]}),l.jsx("div",{className:Ct.rightContent,children:r})]})};mo.displayName="SectionBar";mo.propTypes={leftIcon:s.string,title:s.string.isRequired,subtitle:s.string,rightContent:s.node,mainColor:s.string,width:s.oneOfType([s.string,s.number]),borderTop:s.bool};const S0=Sa.createSlice({name:"mapSlice",initialState:{showTexts:!0,sliderSelectedYear:2025,activeIndicatorKey:0,activeIndicatorType:"cat",activeIndicatorUnit:null},reducers:{setShowTexts:(e,t)=>{e.showTexts=t.payload},setYear:(e,t)=>{e.sliderSelectedYear=t.payload},setActiveIndicatorKey:(e,t)=>{e.activeIndicatorKey=t.payload},setActiveIndicatorType:(e,t)=>{e.activeIndicatorType=t.payload},setActiveIndicatorUnit:(e,t)=>{e.activeIndicatorUnit=t.payload}}}),{setShowTexts:Bp,setYear:Pp,setActiveIndicatorKey:Fp,setActiveIndicatorType:Vp,setActiveIndicatorUnit:zp}=S0.actions,w0="data:image/svg+xml,%3csvg%20width='42'%20height='42'%20viewBox='0%200%2042%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='21'%20cy='21'%20r='20.25'%20fill='%23FDFDFD'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cpath%20d='M15.2722%2012.6627C15.2722%2011.8929%2016.1055%2011.4118%2016.7722%2011.7967L31.5641%2020.3368C32.2308%2020.7217%2032.2308%2021.684%2031.5641%2022.0689L16.7722%2030.609C16.1055%2030.9939%2015.2722%2030.5128%2015.2722%2029.743L15.2722%2012.6627Z'%20fill='%23605B56'/%3e%3c/svg%3e",T0="data:image/svg+xml,%3csvg%20width='42'%20height='42'%20viewBox='0%200%2042%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='21'%20cy='21'%20r='20.25'%20fill='%23FDFDFD'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3crect%20x='15'%20y='12'%20width='4'%20height='19'%20rx='1'%20fill='%23605B56'/%3e%3crect%20x='23'%20y='12'%20width='4'%20height='19'%20rx='1'%20fill='%23605B56'/%3e%3c/svg%3e";function Ai(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ai(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gt(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ai(e))&&(r&&(r+=" "),r+=t);return r}function Ss(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function k0(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",c=!0;for(let u=0;u<i.length;u+=1){const d=i[u];d&&(a+=(c===!0?"":" ")+t(d),c=!1,n&&n[d]&&(a+=" "+n[d]))}r[o]=a}return r}const j0=J.createContext();process.env.NODE_ENV!=="production"&&(s.node,s.bool);const $0=()=>J.useContext(j0)??!1;function Oi(...e){const t=J.useRef(void 0),n=J.useCallback(r=>{const o=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,c=a(r);return typeof c=="function"?c:()=>{a(null)}}return i.current=r,()=>{i.current=null}});return()=>{o.forEach(i=>i==null?void 0:i())}},e);return J.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function ln(e){return typeof e=="string"}function N0(e,t,n){return e===void 0||ln(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Ln(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function ws(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function E0(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const h=gt(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),b={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},f={...n,...o,...r};return h.length>0&&(f.className=h),Object.keys(b).length>0&&(f.style=b),{props:f,internalRef:void 0}}const a=Ln({...o,...r}),c=ws(r),u=ws(o),d=t(a),m=gt(d==null?void 0:d.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),g={...d==null?void 0:d.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},y={...d,...n,...u,...c};return m.length>0&&(y.className=m),Object.keys(g).length>0&&(y.style=g),{props:y,internalRef:d.ref}}function A0(e,t,n){return typeof e=="function"?e(t,n):e}function pt(e){var g;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:A0(n,r),{props:c,internalRef:u}=E0({...i,externalSlotProps:a}),d=Oi(u,a==null?void 0:a.ref,(g=e.additionalProps)==null?void 0:g.ref);return N0(t,{...c,ref:d},r)}function Rn(e){return e&&e.ownerDocument||document}function O0(e){const{controlled:t,default:n,name:r,state:o="value"}=e,{current:i}=J.useRef(t!==void 0),[a,c]=J.useState(n),u=i?t:a;if(process.env.NODE_ENV!=="production"){J.useEffect(()=>{i!==(t!==void 0)&&console.error([`MUI: A component is changing the ${i?"":"un"}controlled ${o} state of ${r} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
24
24
  `))},[o,r,t]);const{current:m}=J.useRef(n);J.useEffect(()=>{!i&&JSON.stringify(n)!==JSON.stringify(m)&&console.error([`MUI: A component is changing the default ${o} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
25
25
  `))},[JSON.stringify(n)])}const d=J.useCallback(m=>{i||c(m)},[]);return[u,d]}const Mi=typeof window<"u"?J.useLayoutEffect:J.useEffect;function Tr(e){const t=J.useRef(e);return Mi(()=>{t.current=e}),J.useRef((...n)=>(0,t.current)(...n)).current}function Ts(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!window.navigator.userAgent.includes("jsdom")&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
26
26
  `))}return!1}const M0={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function qt(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function L0(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const R0=2;function Lt(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}function Li(e,t){return e-t}function ks(e,t){const{index:n}=e.reduce((r,o,i)=>{const a=Math.abs(t-o);return r===null||a<r.distance||a===r.distance?{distance:a,index:i}:r},null)??{};return n}function wn(e,t){if(t.current!==void 0&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Fn(e,t,n){return(e-t)*100/(n-t)}function I0(e,t,n){return(n-t)*e+t}function D0(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function B0(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(D0(t)))}function js({values:e,newValue:t,index:n}){const r=e.slice();return r[n]=t,r.sort(Li)}function Tn({sliderRef:e,activeIndex:t,setActive:n}){var o,i,a;const r=Rn(e.current);(!((o=e.current)!=null&&o.contains(r.activeElement))||Number((i=r==null?void 0:r.activeElement)==null?void 0:i.getAttribute("data-index"))!==t)&&((a=e.current)==null||a.querySelector(`[type="range"][data-index="${t}"]`).focus()),n&&n(t)}function kn(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?L0(e,t):!1}const P0={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},F0=e=>e;let jn;function $s(){return jn===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?jn=CSS.supports("touch-action","none"):jn=!0),jn}function V0(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:o=!1,isRtl:i=!1,marks:a=!1,max:c=100,min:u=0,name:d,onChange:m,onChangeCommitted:g,orientation:y="horizontal",rootRef:h,scale:b=F0,step:f=1,shiftStep:x=10,tabIndex:_,value:w}=e,N=J.useRef(void 0),[C,v]=J.useState(-1),[T,M]=J.useState(-1),[j,$]=J.useState(!1),P=J.useRef(0),D=J.useRef(null),[p,E]=O0({controlled:w,default:n??u,name:"Slider"}),k=m&&((B,F,H)=>{const Q=B.nativeEvent||B,ie=new Q.constructor(Q.type,Q);Object.defineProperty(ie,"target",{writable:!0,value:{value:F,name:d}}),D.current=F,m(ie,F,H)}),R=Array.isArray(p);let V=R?p.slice().sort(Li):[p];V=V.map(B=>B==null?u:qt(B,u,c));const I=a===!0&&f!==null?[...Array(Math.floor((c-u)/f)+1)].map((B,F)=>({value:u+f*F})):a||[],z=I.map(B=>B.value),[G,O]=J.useState(-1),L=J.useRef(null),K=Oi(h,L),ee=B=>F=>{var Q;const H=Number(F.currentTarget.getAttribute("data-index"));Ts(F.target)&&O(H),M(H),(Q=B==null?void 0:B.onFocus)==null||Q.call(B,F)},q=B=>F=>{var H;Ts(F.target)||O(-1),M(-1),(H=B==null?void 0:B.onBlur)==null||H.call(B,F)},Z=(B,F)=>{const H=Number(B.currentTarget.getAttribute("data-index")),Q=V[H],ie=z.indexOf(Q);let X=F;if(I&&f==null){const Oe=z[z.length-1];X>=Oe?X=Oe:X<=z[0]?X=z[0]:X=X<Q?z[ie-1]:z[ie+1]}if(X=qt(X,u,c),R){o&&(X=qt(X,V[H-1]||-1/0,V[H+1]||1/0));const Oe=X;X=js({values:V,newValue:X,index:H});let Re=H;o||(Re=X.indexOf(Oe)),Tn({sliderRef:L,activeIndex:Re})}E(X),O(H),k&&!kn(X,p)&&k(B,X,H),g&&g(B,D.current??X)},re=B=>F=>{var H;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(F.key)){F.preventDefault();const Q=Number(F.currentTarget.getAttribute("data-index")),ie=V[Q];let X=null;if(f!=null){const Oe=F.shiftKey?x:f;switch(F.key){case"ArrowUp":X=Lt(ie,Oe,1,u,c);break;case"ArrowRight":X=Lt(ie,Oe,i?-1:1,u,c);break;case"ArrowDown":X=Lt(ie,Oe,-1,u,c);break;case"ArrowLeft":X=Lt(ie,Oe,i?1:-1,u,c);break;case"PageUp":X=Lt(ie,x,1,u,c);break;case"PageDown":X=Lt(ie,x,-1,u,c);break;case"Home":X=u;break;case"End":X=c;break}}else if(I){const Oe=z[z.length-1],Re=z.indexOf(ie),Ee=[i?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],We=[i?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Ee.includes(F.key)?Re===0?X=z[0]:X=z[Re-1]:We.includes(F.key)&&(Re===z.length-1?X=Oe:X=z[Re+1])}X!=null&&Z(F,X)}(H=B==null?void 0:B.onKeyDown)==null||H.call(B,F)};Mi(()=>{var B;r&&L.current.contains(document.activeElement)&&((B=document.activeElement)==null||B.blur())},[r]),r&&C!==-1&&v(-1),r&&G!==-1&&O(-1);const ne=B=>F=>{var H;(H=B.onChange)==null||H.call(B,F),Z(F,F.target.valueAsNumber)},oe=J.useRef(void 0);let te=y;i&&y==="horizontal"&&(te+="-reverse");const Y=({finger:B,move:F=!1})=>{const{current:H}=L,{width:Q,height:ie,bottom:X,left:Oe}=H.getBoundingClientRect();let Re;te.startsWith("vertical")?Re=(X-B.y)/ie:Re=(B.x-Oe)/Q,te.includes("-reverse")&&(Re=1-Re);let Ee;if(Ee=I0(Re,u,c),f)Ee=B0(Ee,f,u);else{const Xt=ks(z,Ee);Ee=z[Xt]}Ee=qt(Ee,u,c);let We=0;if(R){F?We=oe.current:We=ks(V,Ee),o&&(Ee=qt(Ee,V[We-1]||-1/0,V[We+1]||1/0));const Xt=Ee;Ee=js({values:V,newValue:Ee,index:We}),o&&F||(We=Ee.indexOf(Xt),oe.current=We)}return{newValue:Ee,activeIndex:We}},be=Tr(B=>{const F=wn(B,N);if(!F)return;if(P.current+=1,B.type==="mousemove"&&B.buttons===0){W(B);return}const{newValue:H,activeIndex:Q}=Y({finger:F,move:!0});Tn({sliderRef:L,activeIndex:Q,setActive:v}),E(H),!j&&P.current>R0&&$(!0),k&&!kn(H,p)&&k(B,H,Q)}),W=Tr(B=>{const F=wn(B,N);if($(!1),!F)return;const{newValue:H}=Y({finger:F,move:!0});v(-1),B.type==="touchend"&&M(-1),g&&g(B,D.current??H),N.current=void 0,Ce()}),le=Tr(B=>{if(r)return;$s()||B.preventDefault();const F=B.changedTouches[0];F!=null&&(N.current=F.identifier);const H=wn(B,N);if(H!==!1){const{newValue:ie,activeIndex:X}=Y({finger:H});Tn({sliderRef:L,activeIndex:X,setActive:v}),E(ie),k&&!kn(ie,p)&&k(B,ie,X)}P.current=0;const Q=Rn(L.current);Q.addEventListener("touchmove",be,{passive:!0}),Q.addEventListener("touchend",W,{passive:!0})}),Ce=J.useCallback(()=>{const B=Rn(L.current);B.removeEventListener("mousemove",be),B.removeEventListener("mouseup",W),B.removeEventListener("touchmove",be),B.removeEventListener("touchend",W)},[W,be]);J.useEffect(()=>{const{current:B}=L;return B.addEventListener("touchstart",le,{passive:$s()}),()=>{B.removeEventListener("touchstart",le),Ce()}},[Ce,le]),J.useEffect(()=>{r&&Ce()},[r,Ce]);const ut=B=>F=>{var ie;if((ie=B.onMouseDown)==null||ie.call(B,F),r||F.defaultPrevented||F.button!==0)return;F.preventDefault();const H=wn(F,N);if(H!==!1){const{newValue:X,activeIndex:Oe}=Y({finger:H});Tn({sliderRef:L,activeIndex:Oe,setActive:v}),E(X),k&&!kn(X,p)&&k(F,X,Oe)}P.current=0;const Q=Rn(L.current);Q.addEventListener("mousemove",be,{passive:!0}),Q.addEventListener("mouseup",W)},De=Fn(R?V[0]:u,u,c),Ne=Fn(V[V.length-1],u,c)-De,tt=(B={})=>{const F=Ln(B),H={onMouseDown:ut(F||{})},Q={...F,...H};return{...B,ref:K,...Q}},U=B=>F=>{var Q;(Q=B.onMouseOver)==null||Q.call(B,F);const H=Number(F.currentTarget.getAttribute("data-index"));M(H)},ae=B=>F=>{var H;(H=B.onMouseLeave)==null||H.call(B,F),M(-1)},me=(B={})=>{const F=Ln(B),H={onMouseOver:U(F||{}),onMouseLeave:ae(F||{})};return{...B,...F,...H}},_e=B=>({pointerEvents:C!==-1&&C!==B?"none":void 0});let ke;return y==="vertical"&&(ke=i?"vertical-rl":"vertical-lr"),{active:C,axis:te,axisProps:P0,dragging:j,focusedThumbIndex:G,getHiddenInputProps:(B={})=>{const F=Ln(B),H={onChange:ne(F||{}),onFocus:ee(F||{}),onBlur:q(F||{}),onKeyDown:re(F||{})},Q={...F,...H};return{tabIndex:_,"aria-labelledby":t,"aria-orientation":y,"aria-valuemax":b(c),"aria-valuemin":b(u),name:d,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:r,...B,...Q,style:{...M0,direction:i?"rtl":"ltr",width:"100%",height:"100%",writingMode:ke}}},getRootProps:tt,getThumbProps:me,marks:I,open:T,range:R,rootRef:K,trackLeap:Ne,trackOffset:De,values:V,getThumbStyle:_e}}function jt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Ye(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":jt(7));return e.charAt(0).toUpperCase()+e.slice(1)}var $n={exports:{}},he={};/**
@@ -80,5 +80,5 @@ export default theme;`}function Ys(e){return typeof e=="number"?`${(e*100).toFix
80
80
  To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function X2(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Xe=e=>{try{return e()}catch{}},Q2=(e="mui")=>h2(e);function Nr(e,t,n,r,o){if(!n)return;n=n===!0?{}:n;const i=o==="dark"?"dark":"light";if(!r){t[o]=H2({...n,palette:{mode:i,...n==null?void 0:n.palette},colorSpace:e});return}const{palette:a,...c}=zr({...r,palette:{mode:i,...n==null?void 0:n.palette},colorSpace:e});return t[o]={...n,palette:a,opacity:{...Yi(i),...n==null?void 0:n.opacity},overlays:(n==null?void 0:n.overlays)||Xi(i)},c}function J2(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:c=K2,colorSchemeSelector:u=n.light&&n.dark?"media":void 0,rootSelector:d=":root",...m}=e,g=Object.keys(n)[0],y=r||(n.light&&g!=="light"?"light":g),h=Q2(i),{[y]:b,light:f,dark:x,..._}=n,w={..._};let N=b;if((y==="dark"&&!("dark"in n)||y==="light"&&!("light"in n))&&(N=!0),!N)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${y}\` option is either missing or invalid.`:jt(21,y));let C;a&&(C="oklch");const v=Nr(C,w,N,m,y);f&&!w.light&&Nr(C,w,f,void 0,"light"),x&&!w.dark&&Nr(C,w,x,void 0,"dark");let T={defaultColorScheme:y,...v,cssVarPrefix:i,colorSchemeSelector:u,rootSelector:d,getCssVar:h,colorSchemes:w,font:{...$2(v.typography),...v.font},spacing:X2(m.spacing)};Object.keys(T.colorSchemes).forEach(D=>{const p=T.colorSchemes[D].palette,E=R=>{const V=R.split("-"),I=V[1],z=V[2];return h(R,p[I][z])};p.mode==="light"&&(A(p.common,"background","#fff"),A(p.common,"onBackground","#000")),p.mode==="dark"&&(A(p.common,"background","#000"),A(p.common,"onBackground","#fff"));function k(R,V,I){if(C){let z;return R===_t&&(z=`transparent ${((1-I)*100).toFixed(0)}%`),R===fe&&(z=`#000 ${(I*100).toFixed(0)}%`),R===pe&&(z=`#fff ${(I*100).toFixed(0)}%`),`color-mix(in ${C}, ${V}, ${z})`}return R(V,I)}if(Y2(p,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),p.mode==="light"){A(p.Alert,"errorColor",k(fe,a?h("palette-error-light"):p.error.light,.6)),A(p.Alert,"infoColor",k(fe,a?h("palette-info-light"):p.info.light,.6)),A(p.Alert,"successColor",k(fe,a?h("palette-success-light"):p.success.light,.6)),A(p.Alert,"warningColor",k(fe,a?h("palette-warning-light"):p.warning.light,.6)),A(p.Alert,"errorFilledBg",E("palette-error-main")),A(p.Alert,"infoFilledBg",E("palette-info-main")),A(p.Alert,"successFilledBg",E("palette-success-main")),A(p.Alert,"warningFilledBg",E("palette-warning-main")),A(p.Alert,"errorFilledColor",Xe(()=>p.getContrastText(p.error.main))),A(p.Alert,"infoFilledColor",Xe(()=>p.getContrastText(p.info.main))),A(p.Alert,"successFilledColor",Xe(()=>p.getContrastText(p.success.main))),A(p.Alert,"warningFilledColor",Xe(()=>p.getContrastText(p.warning.main))),A(p.Alert,"errorStandardBg",k(pe,a?h("palette-error-light"):p.error.light,.9)),A(p.Alert,"infoStandardBg",k(pe,a?h("palette-info-light"):p.info.light,.9)),A(p.Alert,"successStandardBg",k(pe,a?h("palette-success-light"):p.success.light,.9)),A(p.Alert,"warningStandardBg",k(pe,a?h("palette-warning-light"):p.warning.light,.9)),A(p.Alert,"errorIconColor",E("palette-error-main")),A(p.Alert,"infoIconColor",E("palette-info-main")),A(p.Alert,"successIconColor",E("palette-success-main")),A(p.Alert,"warningIconColor",E("palette-warning-main")),A(p.AppBar,"defaultBg",E("palette-grey-100")),A(p.Avatar,"defaultBg",E("palette-grey-400")),A(p.Button,"inheritContainedBg",E("palette-grey-300")),A(p.Button,"inheritContainedHoverBg",E("palette-grey-A100")),A(p.Chip,"defaultBorder",E("palette-grey-400")),A(p.Chip,"defaultAvatarColor",E("palette-grey-700")),A(p.Chip,"defaultIconColor",E("palette-grey-700")),A(p.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),A(p.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),A(p.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),A(p.LinearProgress,"primaryBg",k(pe,a?h("palette-primary-main"):p.primary.main,.62)),A(p.LinearProgress,"secondaryBg",k(pe,a?h("palette-secondary-main"):p.secondary.main,.62)),A(p.LinearProgress,"errorBg",k(pe,a?h("palette-error-main"):p.error.main,.62)),A(p.LinearProgress,"infoBg",k(pe,a?h("palette-info-main"):p.info.main,.62)),A(p.LinearProgress,"successBg",k(pe,a?h("palette-success-main"):p.success.main,.62)),A(p.LinearProgress,"warningBg",k(pe,a?h("palette-warning-light"):p.warning.main,.62)),A(p.Skeleton,"bg",C?k(_t,a?h("palette-text-primary"):p.text.primary,.11):`rgba(${E("palette-text-primaryChannel")} / 0.11)`),A(p.Slider,"primaryTrack",k(pe,a?h("palette-primary-main"):p.primary.main,.62)),A(p.Slider,"secondaryTrack",k(pe,a?h("palette-secondary-main"):p.secondary.main,.62)),A(p.Slider,"errorTrack",k(pe,a?h("palette-error-main"):p.error.main,.62)),A(p.Slider,"infoTrack",k(pe,a?h("palette-info-main"):p.info.main,.62)),A(p.Slider,"successTrack",k(pe,a?h("palette-success-main"):p.success.main,.62)),A(p.Slider,"warningTrack",k(pe,a?h("palette-warning-main"):p.warning.main,.62));const R=C?k(fe,a?h("palette-background-default"):p.background.default,.6825):Nn(p.background.default,.8);A(p.SnackbarContent,"bg",R),A(p.SnackbarContent,"color",Xe(()=>C?Vr.text.primary:p.getContrastText(R))),A(p.SpeedDialAction,"fabHoverBg",Nn(p.background.paper,.15)),A(p.StepConnector,"border",E("palette-grey-400")),A(p.StepContent,"border",E("palette-grey-400")),A(p.Switch,"defaultColor",E("palette-common-white")),A(p.Switch,"defaultDisabledColor",E("palette-grey-100")),A(p.Switch,"primaryDisabledColor",k(pe,a?h("palette-primary-main"):p.primary.main,.62)),A(p.Switch,"secondaryDisabledColor",k(pe,a?h("palette-secondary-main"):p.secondary.main,.62)),A(p.Switch,"errorDisabledColor",k(pe,a?h("palette-error-main"):p.error.main,.62)),A(p.Switch,"infoDisabledColor",k(pe,a?h("palette-info-main"):p.info.main,.62)),A(p.Switch,"successDisabledColor",k(pe,a?h("palette-success-main"):p.success.main,.62)),A(p.Switch,"warningDisabledColor",k(pe,a?h("palette-warning-main"):p.warning.main,.62)),A(p.TableCell,"border",k(pe,_t(a?h("palette-divider"):p.divider,1),.88)),A(p.Tooltip,"bg",k(_t,a?h("palette-grey-700"):p.grey[700],.92))}if(p.mode==="dark"){A(p.Alert,"errorColor",k(pe,a?h("palette-error-light"):p.error.light,.6)),A(p.Alert,"infoColor",k(pe,a?h("palette-info-light"):p.info.light,.6)),A(p.Alert,"successColor",k(pe,a?h("palette-success-light"):p.success.light,.6)),A(p.Alert,"warningColor",k(pe,a?h("palette-warning-light"):p.warning.light,.6)),A(p.Alert,"errorFilledBg",E("palette-error-dark")),A(p.Alert,"infoFilledBg",E("palette-info-dark")),A(p.Alert,"successFilledBg",E("palette-success-dark")),A(p.Alert,"warningFilledBg",E("palette-warning-dark")),A(p.Alert,"errorFilledColor",Xe(()=>p.getContrastText(p.error.dark))),A(p.Alert,"infoFilledColor",Xe(()=>p.getContrastText(p.info.dark))),A(p.Alert,"successFilledColor",Xe(()=>p.getContrastText(p.success.dark))),A(p.Alert,"warningFilledColor",Xe(()=>p.getContrastText(p.warning.dark))),A(p.Alert,"errorStandardBg",k(fe,a?h("palette-error-light"):p.error.light,.9)),A(p.Alert,"infoStandardBg",k(fe,a?h("palette-info-light"):p.info.light,.9)),A(p.Alert,"successStandardBg",k(fe,a?h("palette-success-light"):p.success.light,.9)),A(p.Alert,"warningStandardBg",k(fe,a?h("palette-warning-light"):p.warning.light,.9)),A(p.Alert,"errorIconColor",E("palette-error-main")),A(p.Alert,"infoIconColor",E("palette-info-main")),A(p.Alert,"successIconColor",E("palette-success-main")),A(p.Alert,"warningIconColor",E("palette-warning-main")),A(p.AppBar,"defaultBg",E("palette-grey-900")),A(p.AppBar,"darkBg",E("palette-background-paper")),A(p.AppBar,"darkColor",E("palette-text-primary")),A(p.Avatar,"defaultBg",E("palette-grey-600")),A(p.Button,"inheritContainedBg",E("palette-grey-800")),A(p.Button,"inheritContainedHoverBg",E("palette-grey-700")),A(p.Chip,"defaultBorder",E("palette-grey-700")),A(p.Chip,"defaultAvatarColor",E("palette-grey-300")),A(p.Chip,"defaultIconColor",E("palette-grey-300")),A(p.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),A(p.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),A(p.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),A(p.LinearProgress,"primaryBg",k(fe,a?h("palette-primary-main"):p.primary.main,.5)),A(p.LinearProgress,"secondaryBg",k(fe,a?h("palette-secondary-main"):p.secondary.main,.5)),A(p.LinearProgress,"errorBg",k(fe,a?h("palette-error-main"):p.error.main,.5)),A(p.LinearProgress,"infoBg",k(fe,a?h("palette-info-main"):p.info.main,.5)),A(p.LinearProgress,"successBg",k(fe,a?h("palette-success-main"):p.success.main,.5)),A(p.LinearProgress,"warningBg",k(fe,a?h("palette-warning-main"):p.warning.main,.5)),A(p.Skeleton,"bg",C?k(_t,a?h("palette-text-primary"):p.text.primary,.13):`rgba(${E("palette-text-primaryChannel")} / 0.13)`),A(p.Slider,"primaryTrack",k(fe,a?h("palette-primary-main"):p.primary.main,.5)),A(p.Slider,"secondaryTrack",k(fe,a?h("palette-secondary-main"):p.secondary.main,.5)),A(p.Slider,"errorTrack",k(fe,a?h("palette-error-main"):p.error.main,.5)),A(p.Slider,"infoTrack",k(fe,a?h("palette-info-main"):p.info.main,.5)),A(p.Slider,"successTrack",k(fe,a?h("palette-success-main"):p.success.main,.5)),A(p.Slider,"warningTrack",k(fe,a?h("palette-warning-light"):p.warning.main,.5));const R=C?k(pe,a?h("palette-background-default"):p.background.default,.985):Nn(p.background.default,.98);A(p.SnackbarContent,"bg",R),A(p.SnackbarContent,"color",Xe(()=>C?Ki.text.primary:p.getContrastText(R))),A(p.SpeedDialAction,"fabHoverBg",Nn(p.background.paper,.15)),A(p.StepConnector,"border",E("palette-grey-600")),A(p.StepContent,"border",E("palette-grey-600")),A(p.Switch,"defaultColor",E("palette-grey-300")),A(p.Switch,"defaultDisabledColor",E("palette-grey-600")),A(p.Switch,"primaryDisabledColor",k(fe,a?h("palette-primary-main"):p.primary.main,.55)),A(p.Switch,"secondaryDisabledColor",k(fe,a?h("palette-secondary-main"):p.secondary.main,.55)),A(p.Switch,"errorDisabledColor",k(fe,a?h("palette-error-main"):p.error.main,.55)),A(p.Switch,"infoDisabledColor",k(fe,a?h("palette-info-main"):p.info.main,.55)),A(p.Switch,"successDisabledColor",k(fe,a?h("palette-success-main"):p.success.main,.55)),A(p.Switch,"warningDisabledColor",k(fe,a?h("palette-warning-light"):p.warning.main,.55)),A(p.TableCell,"border",k(fe,_t(a?h("palette-divider"):p.divider,1),.68)),A(p.Tooltip,"bg",k(_t,a?h("palette-grey-700"):p.grey[700],.92))}a||(rt(p.background,"default"),rt(p.background,"paper"),rt(p.common,"background"),rt(p.common,"onBackground"),rt(p,"divider")),Object.keys(p).forEach(R=>{const V=p[R];R!=="tonalOffset"&&!a&&V&&typeof V=="object"&&(V.main&&A(p[R],"mainChannel",on(sn(V.main))),V.light&&A(p[R],"lightChannel",on(sn(V.light))),V.dark&&A(p[R],"darkChannel",on(sn(V.dark))),V.contrastText&&A(p[R],"contrastTextChannel",on(sn(V.contrastText))),R==="text"&&(rt(p[R],"primary"),rt(p[R],"secondary")),R==="action"&&(V.active&&rt(p[R],"active"),V.selected&&rt(p[R],"selected")))})}),T=t.reduce((D,p)=>qe(D,p),T);const M={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:c,getSelector:G2(T),enableContrastVars:a},{vars:j,generateThemeVars:$,generateStyleSheets:P}=b2(T,M);return T.vars=j,Object.entries(T.colorSchemes[T.defaultColorScheme]).forEach(([D,p])=>{T[D]=p}),T.generateThemeVars=$,T.generateStyleSheets=P,T.generateSpacing=function(){return Bi(m.spacing,ho(this))},T.getColorSchemeSelector=v2(u),T.spacing=T.generateSpacing(),T.shouldSkipGeneratingVar=c,T.unstable_sxConfig={...or,...m==null?void 0:m.unstable_sxConfig},T.unstable_sx=function(p){return Kt({sx:p,theme:this})},T.toRuntimeSource=Gi,T}function Xs(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:vo({...n===!0?{}:n.palette,mode:t})})}function ed(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...a}=e,c=i||"light",u=o==null?void 0:o[c],d={...o,...n?{[c]:{...typeof u!="boolean"&&u,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return zr(e,...t);let m=n;"palette"in e||d[c]&&(d[c]!==!0?m=d[c].palette:c==="dark"&&(m={mode:"dark"}));const g=zr({...e,palette:m},...t);return g.defaultColorScheme=c,g.colorSchemes=d,g.palette.mode==="light"&&(g.colorSchemes.light={...d.light!==!0&&d.light,palette:g.palette},Xs(g,"dark",d.dark)),g.palette.mode==="dark"&&(g.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:g.palette},Xs(g,"light",d.light)),g}return!n&&!("light"in d)&&c==="light"&&(d.light=!0),J2({...a,colorSchemes:d,defaultColorScheme:c,...typeof r!="boolean"&&r},...t)}const td=ed(),nd="$$material";function xo(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const rd=e=>xo(e)&&e!=="classes",Et=r2({themeId:nd,defaultTheme:td,rootShouldForwardProp:rd}),Yt=m2;process.env.NODE_ENV!=="production"&&(s.node,s.object.isRequired);function od(e){return p2(e)}const sd=e=>!e||!ln(e);function id(e){return typeof e.main=="string"}function ad(e,t=[]){if(!id(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Co(e=[]){return([,t])=>t&&ad(t,e)}function ld(e){return yo("MuiSlider",e)}const Ke=Qu("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),cd=e=>{const{open:t}=e;return{offset:gt(t&&Ke.valueLabelOpen),circle:Ke.valueLabelCircle,label:Ke.valueLabelLabel}};function Qi(e){const{children:t,className:n,value:r}=e,o=cd(e);return t?J.cloneElement(t,{className:t.props.className},l.jsxs(J.Fragment,{children:[t.props.children,l.jsx("span",{className:gt(o.offset,n),"aria-hidden":!0,children:l.jsx("span",{className:o.circle,children:l.jsx("span",{className:o.label,children:r})})})]})):null}process.env.NODE_ENV!=="production"&&(Qi.propTypes={children:s.element.isRequired,className:s.string,value:s.node});function Qs(e){return e}const ud=Et("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Ye(n.color)}`],n.size!=="medium"&&t[`size${Ye(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(Yt(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Ke.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Ke.dragging}`]:{[`& .${Ke.thumb}, & .${Ke.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Co()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),dd=Et("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),fd=Et("span",{name:"MuiSlider",slot:"Track"})(Yt(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(Co()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:e.lighten(e.palette[t].main,.62),borderColor:e.lighten(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:e.darken(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:e.darken(e.palette[t].main,.5)})}}}))]}))),pd=Et("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${Ye(n.color)}`],n.size!=="medium"&&t[`thumbSize${Ye(n.size)}`]]}})(Yt(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${Ke.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(Co()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${Ke.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${Ke.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),Ji=Et(Qi,{name:"MuiSlider",slot:"ValueLabel"})(Yt(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${Ke.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${Ke.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(Ji.propTypes={children:s.element.isRequired,index:s.number.isRequired,open:s.bool.isRequired,value:s.node});const md=Et("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>xo(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(Yt(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),hd=Et("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>xo(e)&&e!=="markLabelActive"})(Yt(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),gd=e=>{const{disabled:t,dragging:n,marked:r,orientation:o,track:i,classes:a,color:c,size:u}=e,d={root:["root",t&&"disabled",n&&"dragging",r&&"marked",o==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",c&&`color${Ye(c)}`,u&&`size${Ye(u)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",u&&`thumbSize${Ye(u)}`,c&&`thumbColor${Ye(c)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return k0(d,ld,a)},yd=({children:e})=>e,ea=J.forwardRef(function(t,n){const r=od({props:t,name:"MuiSlider"}),o=$0(),{"aria-label":i,"aria-valuetext":a,"aria-labelledby":c,component:u="span",components:d={},componentsProps:m={},color:g="primary",classes:y,className:h,disableSwap:b=!1,disabled:f=!1,getAriaLabel:x,getAriaValueText:_,marks:w=!1,max:N=100,min:C=0,name:v,onChange:T,onChangeCommitted:M,orientation:j="horizontal",shiftStep:$=10,size:P="medium",step:D=1,scale:p=Qs,slotProps:E,slots:k,tabIndex:R,track:V="normal",value:I,valueLabelDisplay:z="off",valueLabelFormat:G=Qs,...O}=r,L={...r,isRtl:o,max:N,min:C,classes:y,disabled:f,disableSwap:b,orientation:j,marks:w,color:g,size:P,step:D,shiftStep:$,scale:p,track:V,valueLabelDisplay:z,valueLabelFormat:G},{axisProps:K,getRootProps:ee,getHiddenInputProps:q,getThumbProps:Z,open:re,active:ne,axis:oe,focusedThumbIndex:te,range:Y,dragging:be,marks:W,values:le,trackOffset:Ce,trackLeap:ut,getThumbStyle:De}=V0({...L,rootRef:n});L.marked=W.length>0&&W.some(je=>je.label),L.dragging=be,L.focusedThumbIndex=te;const Ne=gd(L),tt=(k==null?void 0:k.root)??d.Root??ud,U=(k==null?void 0:k.rail)??d.Rail??dd,ae=(k==null?void 0:k.track)??d.Track??fd,me=(k==null?void 0:k.thumb)??d.Thumb??pd,_e=(k==null?void 0:k.valueLabel)??d.ValueLabel??Ji,ke=(k==null?void 0:k.mark)??d.Mark??md,Fe=(k==null?void 0:k.markLabel)??d.MarkLabel??hd,B=(k==null?void 0:k.input)??d.Input??"input",F=(E==null?void 0:E.root)??m.root,H=(E==null?void 0:E.rail)??m.rail,Q=(E==null?void 0:E.track)??m.track,ie=(E==null?void 0:E.thumb)??m.thumb,X=(E==null?void 0:E.valueLabel)??m.valueLabel,Oe=(E==null?void 0:E.mark)??m.mark,Re=(E==null?void 0:E.markLabel)??m.markLabel,Ee=(E==null?void 0:E.input)??m.input,We=pt({elementType:tt,getSlotProps:ee,externalSlotProps:F,externalForwardedProps:O,additionalProps:{...sd(tt)&&{as:u}},ownerState:{...L,...F==null?void 0:F.ownerState},className:[Ne.root,h]}),Xt=pt({elementType:U,externalSlotProps:H,ownerState:L,className:Ne.rail}),ua=pt({elementType:ae,externalSlotProps:Q,additionalProps:{style:{...K[oe].offset(Ce),...K[oe].leap(ut)}},ownerState:{...L,...Q==null?void 0:Q.ownerState},className:Ne.track}),cr=pt({elementType:me,getSlotProps:Z,externalSlotProps:ie,ownerState:{...L,...ie==null?void 0:ie.ownerState},className:Ne.thumb}),da=pt({elementType:_e,externalSlotProps:X,ownerState:{...L,...X==null?void 0:X.ownerState},className:Ne.valueLabel}),ur=pt({elementType:ke,externalSlotProps:Oe,ownerState:L,className:Ne.mark}),dr=pt({elementType:Fe,externalSlotProps:Re,ownerState:L,className:Ne.markLabel}),fa=pt({elementType:B,getSlotProps:q,externalSlotProps:Ee,ownerState:L});return l.jsxs(tt,{...We,children:[l.jsx(U,{...Xt}),l.jsx(ae,{...ua}),W.filter(je=>je.value>=C&&je.value<=N).map((je,Me)=>{const fr=Fn(je.value,C,N),gn=K[oe].offset(fr);let nt;return V===!1?nt=le.includes(je.value):nt=V==="normal"&&(Y?je.value>=le[0]&&je.value<=le[le.length-1]:je.value<=le[0])||V==="inverted"&&(Y?je.value<=le[0]||je.value>=le[le.length-1]:je.value>=le[0]),l.jsxs(J.Fragment,{children:[l.jsx(ke,{"data-index":Me,...ur,...!ln(ke)&&{markActive:nt},style:{...gn,...ur.style},className:gt(ur.className,nt&&Ne.markActive)}),je.label!=null?l.jsx(Fe,{"aria-hidden":!0,"data-index":Me,...dr,...!ln(Fe)&&{markLabelActive:nt},style:{...gn,...dr.style},className:gt(Ne.markLabel,dr.className,nt&&Ne.markLabelActive),children:je.label}):null]},Me)}),le.map((je,Me)=>{const fr=Fn(je,C,N),gn=K[oe].offset(fr),nt=z==="off"?yd:_e;return l.jsx(nt,{...!ln(nt)&&{valueLabelFormat:G,valueLabelDisplay:z,value:typeof G=="function"?G(p(je),Me):G,index:Me,open:re===Me||ne===Me||z==="on",disabled:f},...da,children:l.jsx(me,{"data-index":Me,...cr,className:gt(Ne.thumb,cr.className,ne===Me&&Ne.active,te===Me&&Ne.focusVisible),style:{...gn,...De(Me),...cr.style},children:l.jsx(B,{"data-index":Me,"aria-label":x?x(Me):i,"aria-valuenow":p(je),"aria-labelledby":c,"aria-valuetext":_?_(p(je),Me):a,value:le[Me],...fa})})},Me)})]})});process.env.NODE_ENV!=="production"&&(ea.propTypes={"aria-label":Ss(s.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-label"]!=null?new Error("MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider."):null),"aria-labelledby":s.string,"aria-valuetext":Ss(s.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-valuetext"]!=null?new Error("MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider."):null),children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["primary","secondary","error","info","success","warning"]),s.string]),components:s.shape({Input:s.elementType,Mark:s.elementType,MarkLabel:s.elementType,Rail:s.elementType,Root:s.elementType,Thumb:s.elementType,Track:s.elementType,ValueLabel:s.elementType}),componentsProps:s.shape({input:s.oneOfType([s.func,s.object]),mark:s.oneOfType([s.func,s.object]),markLabel:s.oneOfType([s.func,s.object]),rail:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),thumb:s.oneOfType([s.func,s.object]),track:s.oneOfType([s.func,s.object]),valueLabel:s.oneOfType([s.func,s.shape({children:s.element,className:s.string,open:s.bool,style:s.object,value:s.node,valueLabelDisplay:s.oneOf(["auto","off","on"])})])}),defaultValue:s.oneOfType([s.arrayOf(s.number),s.number]),disabled:s.bool,disableSwap:s.bool,getAriaLabel:s.func,getAriaValueText:s.func,marks:s.oneOfType([s.arrayOf(s.shape({label:s.node,value:s.number.isRequired})),s.bool]),max:s.number,min:s.number,name:s.string,onChange:s.func,onChangeCommitted:s.func,orientation:s.oneOf(["horizontal","vertical"]),scale:s.func,shiftStep:s.number,size:s.oneOfType([s.oneOf(["small","medium"]),s.string]),slotProps:s.shape({input:s.oneOfType([s.func,s.object]),mark:s.oneOfType([s.func,s.object]),markLabel:s.oneOfType([s.func,s.object]),rail:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),thumb:s.oneOfType([s.func,s.object]),track:s.oneOfType([s.func,s.object]),valueLabel:s.oneOfType([s.func,s.shape({children:s.element,className:s.string,open:s.bool,style:s.object,value:s.node,valueLabelDisplay:s.oneOf(["auto","off","on"])})])}),slots:s.shape({input:s.elementType,mark:s.elementType,markLabel:s.elementType,rail:s.elementType,root:s.elementType,thumb:s.elementType,track:s.elementType,valueLabel:s.elementType}),step:s.number,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number,track:s.oneOf(["inverted","normal",!1]),value:s.oneOfType([s.arrayOf(s.number),s.number]),valueLabelDisplay:s.oneOf(["auto","off","on"]),valueLabelFormat:s.oneOfType([s.func,s.string])});const bd="_slider_1prh1_2",vd="_playButton_1prh1_14",xd="_sliderOpen_1prh1_25",Cd="_sliderResults_1prh1_29",en={slider:bd,playButton:vd,sliderOpen:xd,sliderResults:Cd},_o=({onResults:e=!1,defaultYear:t=2025,firstYear:n=2025,lastYear:r=2050,marcas:o=null,zIndex:i=10,rightBarOpen:a=!1,conditionToBeRuning:c=null,onChange:u=d=>{console.log("year changed to ",d)}})=>{const m=o||((C,v)=>{const T=[];T.push({label:"",value:C});const M=Math.ceil(C/10)*10;for(let j=M;j<v;j+=10)T.push({label:"",value:j});return T[T.length-1].value!==v&&T.push({label:"",value:v}),T})(n,r),[g,y]=S.useState(t);S.useEffect(()=>{y(t)},[t]);const h=(C,v)=>{y(v),u(v)},[b,f]=S.useState(!1);S.useEffect(()=>{t&&console.log("defaultYear changed:",t),t&&y(t)},[t]),S.useEffect(()=>{c===!1&&f(!1)},[c]);const x=()=>{f(!0)},_=()=>{f(!1)};((C,v,T=[])=>{const M=S.useRef();S.useEffect(()=>{M.current=C},[C]),S.useEffect(()=>{function j(){M.current()}{let $=setInterval(j,v);return()=>clearInterval($)}},[v,...T])})(()=>{b&&y(C=>{const v=C+1;return v>r?(u(n),n):(u(v),v)})},1e3,[n,r,b]);const N=Yo.createTheme({palette:{primary:{main:"#605b56"}},components:{MuiSlider:{styleOverrides:{mark:{height:10,backgroundColor:"#605b56"},valueLabel:{backgroundColor:"transparent",color:"#605b56",padding:0,top:3}}}}});return l.jsx(wa.ThemeProvider,{theme:N,children:l.jsxs(Yo.Box,{sx:{width:400},className:`${e?en.sliderResults:en.slider} ${a?en.sliderOpen:""}`,style:{zIndex:i},children:[n,l.jsx(ea,{"aria-label":"TimeSlider",value:g,valueLabelDisplay:"on",step:1,marks:m,min:n,max:r,onChange:h,color:"primary",size:"small"}),r,!b&&l.jsx("button",{className:en.playButton,onClick:x,children:l.jsx("img",{src:w0,alt:"Play"})}),b&&l.jsx("button",{className:en.playButton,onClick:_,children:l.jsx("img",{src:T0,alt:"Pause"})})]})})};_o.displayName="TimeSlider";_o.propTypes={defaultYear:s.number,onResults:s.bool,firstYear:s.number,lastYear:s.number,marcas:s.arrayOf(s.shape({label:s.string,value:s.number})),zIndex:s.number,rightBarOpen:s.bool,onChange:s.func};const _d="_TopNavMenuContainer_12mp4_2",Sd="_topNavOptions_12mp4_13",wd="_active_12mp4_27",Er={TopNavMenuContainer:_d,topNavOptions:Sd,active:wd},So=({options:e=[],containerStyles:t,borderColor:n="red",textColor:r="white",onChangeNavLink:o=i=>{console.log("Changed NavLink",i)}})=>{const{t:i}=se.useTranslation();return l.jsx("div",{className:Er.TopNavMenuContainer,style:{...t},children:e.map((a,c)=>l.jsx(bi.NavLink,{to:a.url,className:({isActive:u})=>`${Er.topNavOptions} ${u?Er.active:""} `,onClick:()=>o(a.url),style:({isActive:u})=>({color:r,borderBottom:u?`5px solid ${n}`:"5px solid transparent"}),children:i(a.name)},c))})};So.displayName="TopNavMenu";So.propTypes={options:s.arrayOf(s.object),cssProps:s.shape({borderColor:s.string.isRequired,textColor:s.string.isRequired})};const Td="_LogInButton_1vxj5_2",kd={LogInButton:Td},wo=({cssClass:e,notLoggedInLabel:t="Log in",loggedInLabel:n="Log out",containerStyles:r,userName:o="",isLoggedIn:i=!1,onClickLogIn:a=()=>{console.log("Login clicked")},onClickLogOut:c=()=>{console.log("Logout clicked")}})=>{const{t:u}=se.useTranslation();return l.jsx("div",{style:{...r},className:`${kd.LogInButton} link ${e}`,onClick:i?c:a,children:i?o||u(n):u(t)})};wo.displayName="LogInButton";wo.propTypes={cssClass:s.string,notLoggedInLabel:s.string,loggedInLabel:s.string,containerStyles:s.object,userName:s.string,isLoggedIn:s.bool};const jd="_elementSelector_1ox68_2",$d="_header_1ox68_14",Nd="_nameDateContainer_1ox68_24",Ed="_elementName_1ox68_40",Ad="_elementDate_1ox68_54",Od="_buttonsContainer_1ox68_68",Md="_elementListContainer_1ox68_77",Ld="_newElementButtonContainer_1ox68_81",ot={elementSelector:jd,header:$d,nameDateContainer:Nd,elementName:Ed,elementDate:Ad,buttonsContainer:Od,elementListContainer:Md,newElementButtonContainer:Ld},Rd="_listElement_s4s4h_3",Id="_elementNameDate_s4s4h_19",Dd="_elementNameContainer_s4s4h_30",Bd="_elementName_s4s4h_19",Pd="_elementDate_s4s4h_47",Fd="_nameAndEye_s4s4h_50",Vd="_elementButtons_s4s4h_55",zd="_moreInfoContainer_s4s4h_78",qd="_moreInfo_s4s4h_78",Ue={listElement:Rd,elementNameDate:Id,elementNameContainer:Dd,elementName:Bd,elementDate:Pd,nameAndEye:Fd,elementButtons:Vd,break:"_break_s4s4h_73",moreInfoContainer:zd,moreInfo:qd},Wd="data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Eliminar'%3e%3ccircle%20id='Ellipse%20220'%20cx='15.5106'%20cy='15.8063'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cpath%20id='Vector'%20d='M20.8581%2010.5548H17.5491V10.4015C17.5491%209.17493%2016.6257%208.255%2015.4714%208.255C14.3171%208.255%2013.3167%209.17493%2013.3167%2010.4015V10.5548H10.0846C9.69985%2010.5548%209.46899%2010.7848%209.46899%2011.1681C9.46899%2011.5514%209.69985%2011.7814%2010.0846%2011.7814H10.2385V21.2106C10.2385%2022.3605%2011.162%2023.3571%2012.3932%2023.3571H18.5495C19.7038%2023.3571%2020.7042%2022.4372%2020.7042%2021.2106V11.7047H20.9351C21.2429%2011.7047%2021.5507%2011.4747%2021.5507%2011.0914C21.5507%2010.7081%2021.1659%2010.5548%2020.8581%2010.5548ZM14.471%2010.4015C14.471%209.86488%2014.9327%209.40491%2015.4714%209.40491C16.01%209.40491%2016.3948%209.86488%2016.3948%2010.4015V10.5548H14.471V10.4015ZM16.3948%2018.8342V15.0011C16.3948%2014.6178%2016.6257%2014.3878%2017.0104%2014.3878C17.3952%2014.3878%2017.6261%2014.6178%2017.6261%2015.0011V18.8342C17.6261%2019.1408%2017.3952%2019.4474%2017.0104%2019.4474C16.6257%2019.4474%2016.3948%2019.1408%2016.3948%2018.8342ZM13.3167%2018.8342V15.0011C13.3167%2014.6178%2013.5475%2014.3878%2013.9323%2014.3878C14.3171%2014.3878%2014.5479%2014.6178%2014.5479%2015.0011V18.8342C14.5479%2019.1408%2014.3171%2019.4474%2013.9323%2019.4474C13.5475%2019.4474%2013.3167%2019.1408%2013.3167%2018.8342Z'%20fill='%23605B56'/%3e%3c/g%3e%3c/svg%3e",Ud="data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%209259'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.3062'%20cy='15.8063'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cg%20id='Group%203973'%3e%3cg%20id='Rectangle%20495'%3e%3cmask%20id='path-2-inside-1_4451_10560'%20fill='white'%3e%3crect%20x='10.4033'%20y='7.70422'%20width='12.8'%20height='12.8'%20rx='1'/%3e%3c/mask%3e%3crect%20x='10.4033'%20y='7.70422'%20width='12.8'%20height='12.8'%20rx='1'%20stroke='%23605B56'%20stroke-width='3'%20mask='url(%23path-2-inside-1_4451_10560)'/%3e%3c/g%3e%3cg%20id='Group%203972'%3e%3crect%20id='Rectangle%20496'%20x='7.2041'%20y='10.9042'%20width='12.8'%20height='12.8'%20rx='1'%20fill='%23605B56'/%3e%3cpath%20id='+'%20d='M16.3785%2018.0509H14.3838V20.0776H12.9331V18.0509H10.9385V16.6749H12.9331V14.6376H14.3838V16.6749H16.3785V18.0509Z'%20fill='%23FDFDFD'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Hd="data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%209260'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.1021'%20cy='15.8063'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cpath%20id='Vector'%20d='M8.20744%208.70422C7.34769%208.70422%206.88873%209.71735%207.45568%2010.3637L13.3518%2017.085C13.5118%2017.2675%2013.6%2017.5018%2013.6%2017.7445V23.2443C13.6%2023.6283%2013.8199%2023.9783%2014.1658%2024.1451L15.9658%2025.0128C16.6297%2025.3329%2017.4%2024.8491%2017.4%2024.112V17.7445C17.4%2017.5018%2017.4882%2017.2675%2017.6482%2017.085L23.5443%2010.3637C24.1113%209.71735%2023.6523%208.70422%2022.7926%208.70422H8.20744Z'%20fill='%23605B56'/%3e%3c/g%3e%3c/svg%3e",Kd="data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%206725'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.1021'%20cy='15.7148'%20r='14.3521'%20stroke='%23605B56'%20stroke-opacity='0.5'%20stroke-width='1.5'/%3e%3cg%20id='Group%206724'%3e%3cpath%20id='Vector'%20d='M17.4114%2023.3302C17.4114%2024.5419%2016.4269%2027.4724%2015.2126%2027.4724C13.9982%2027.4724%2013.0137%2024.5419%2013.0137%2023.3302C13.0137%2022.7483%2013.2453%2022.1902%2013.6577%2021.7787C14.0701%2021.3673%2014.6294%2021.1361%2015.2126%2021.1361C15.7957%2021.1361%2016.355%2021.3673%2016.7674%2021.7787C17.1798%2022.1902%2017.4114%2022.7483%2017.4114%2023.3302Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Union'%20d='M15.2919%2020.6088H11.2899L11.289%2020.6078C10.6273%2020.7718%209.36856%2021.3396%209.39931%2023.2845C9.39931%2023.2845%207.41254%2021.7976%208.17372%2019.0179L8.25575%2018.7445C8.59675%2017.7118%209.66004%2016.7306%2010.7714%2016.2435C10.7337%2012.8666%2011.5045%208.19644%2015.2919%204.724V20.6088ZM10.6835%2017.4164C10.5323%2017.5091%2010.3819%2017.6125%2010.2372%2017.7279C9.77215%2018.099%209.43634%2018.5195%209.26747%2018.8988L9.20595%2019.058C8.95666%2019.8145%208.9632%2020.4347%209.07607%2020.9291C9.34144%2020.5645%209.66233%2020.2832%209.9999%2020.0746C10.2365%2019.9284%2010.4715%2019.8251%2010.6835%2019.7494V17.4164Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Union_2'%20d='M15.293%204.724C19.0931%208.20817%2019.8548%2012.8981%2019.8115%2016.2777C20.8629%2016.7859%2021.8411%2017.7218%2022.165%2018.7045C23.1398%2021.6599%2021.0225%2023.2445%2021.0225%2023.2445C21.051%2021.4361%2019.9648%2020.8184%2019.2803%2020.6088H15.293V4.724ZM19.7676%2017.3949C19.7586%2017.5313%2019.7493%2017.6646%2019.7383%2017.7943V19.7094C19.9502%2019.7851%2020.1854%2019.8884%2020.4219%2020.0345C20.7595%2020.2432%2021.0794%2020.5253%2021.3447%2020.89C21.4466%2020.444%2021.4627%2019.8956%2021.2812%2019.2367L21.2148%2019.0179C21.0772%2018.6004%2020.7157%2018.1118%2020.1846%2017.6879C20.0493%2017.58%2019.9088%2017.4829%2019.7676%2017.3949Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cg%20id='Vector_2'%3e%3cpath%20d='M12.541%208.28445C12.541%208.28445%2014.8218%209.81829%2018.0434%208.28445C18.0434%208.28445%2016.9978%206.03912%2015.2919%204.61267C15.2919%204.61267%2013.7894%205.92343%2012.541%208.28445Z'%20fill='%23FDFDFD'/%3e%3cpath%20d='M15.3057%205.29626C15.9532%205.9116%2016.4918%206.63792%2016.8867%207.2533C17.0801%207.55466%2017.2355%207.82605%2017.3516%208.03748C16.0573%208.54342%2014.966%208.52427%2014.1807%208.36951C13.781%208.29074%2013.4584%208.17533%2013.2266%208.07556C13.7607%207.14513%2014.32%206.40895%2014.7646%205.88806C14.9759%205.64056%2015.1621%205.44302%2015.3057%205.29626Z'%20stroke='%23605B56'%20stroke-opacity='0.5'/%3e%3c/g%3e%3cpath%20id='Vector_3'%20d='M17.6984%2012.9862C17.6985%2013.4539%2017.5596%2013.9111%2017.2993%2014.3001C17.039%2014.689%2016.669%2014.9922%2016.236%2015.1712C15.803%2015.3503%2015.3265%2015.3972%2014.8668%2015.3061C14.4071%2015.2149%2013.9848%2014.9898%2013.6533%2014.6591C13.3218%2014.3285%2013.0961%2013.9072%2013.0046%2013.4485C12.9131%2012.9898%2012.96%2012.5143%2013.1393%2012.0822C13.3186%2011.6501%2013.6224%2011.2808%2014.0121%2011.021C14.4018%2010.7611%2014.86%2010.6224%2015.3287%2010.6224C15.957%2010.6224%2016.5597%2010.8715%2017.004%2011.3147C17.4484%2011.758%2017.6982%2012.3593%2017.6984%2012.9862Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_4'%20d='M17.1358%2013.0038C17.1358%2013.36%2017.0299%2013.7083%2016.8316%2014.0045C16.6332%2014.3007%2016.3513%2014.5316%2016.0214%2014.6679C15.6916%2014.8042%2015.3286%2014.8399%2014.9784%2014.7704C14.6282%2014.7009%2014.3066%2014.5294%2014.0541%2014.2774C13.8017%2014.0255%2013.6297%2013.7046%2013.5601%2013.3552C13.4904%2013.0058%2013.5262%2012.6436%2013.6628%2012.3145C13.7994%2011.9853%2014.0308%2011.704%2014.3277%2011.5061C14.6245%2011.3082%2014.9736%2011.2025%2015.3306%2011.2025C15.8094%2011.2025%2016.2685%2011.3923%2016.6071%2011.7301C16.9456%2012.0679%2017.1358%2012.526%2017.1358%2013.0038Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_5'%20d='M16.7061%2013.2093C16.6508%2013.2093%2016.5978%2013.1874%2016.5588%2013.1485C16.5197%2013.1095%2016.4978%2013.0566%2016.4978%2013.0015C16.4974%2012.7236%2016.3866%2012.4572%2016.1897%2012.2607C15.9928%2012.0642%2015.7258%2011.9537%2015.4473%2011.9533C15.4175%2011.9582%2015.3869%2011.9566%2015.3578%2011.9485C15.3287%2011.9405%2015.3017%2011.9262%2015.2786%2011.9067C15.2556%2011.8872%2015.237%2011.8629%2015.2244%2011.8356C15.2117%2011.8082%2015.2051%2011.7784%2015.2051%2011.7482C15.2051%2011.7181%2015.2117%2011.6883%2015.2244%2011.6609C15.237%2011.6336%2015.2556%2011.6093%2015.2786%2011.5898C15.3017%2011.5703%2015.3287%2011.556%2015.3578%2011.5479C15.3869%2011.5399%2015.4175%2011.5383%2015.4473%2011.5432C15.8348%2011.5435%2016.2063%2011.6973%2016.4803%2011.9707C16.7543%2012.2441%2016.9084%2012.6148%2016.9088%2013.0015C16.9088%2013.0557%2016.8876%2013.1077%2016.8498%2013.1465C16.8119%2013.1854%2016.7603%2013.2079%2016.7061%2013.2093Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_6'%20d='M16.8082%2013.6607C16.8082%2013.7106%2016.7934%2013.7594%2016.7656%2013.8008C16.7378%2013.8423%2016.6984%2013.8746%2016.6522%2013.8937C16.606%2013.9128%2016.5552%2013.9178%2016.5062%2013.9081C16.4571%2013.8983%2016.4121%2013.8743%2016.3768%2013.8391C16.3414%2013.8038%2016.3173%2013.7589%2016.3076%2013.7099C16.2978%2013.661%2016.3028%2013.6103%2016.322%2013.5642C16.3411%2013.5182%2016.3735%2013.4788%2016.4151%2013.4511C16.4566%2013.4234%2016.5055%2013.4086%2016.5555%2013.4086C16.6225%2013.4086%2016.6868%2013.4351%2016.7342%2013.4824C16.7816%2013.5297%2016.8082%2013.5939%2016.8082%2013.6607Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_7'%20d='M15.6008%2016.0612C15.5633%2016.0097%2015.5141%2015.9677%2015.4573%2015.9388C15.4005%2015.9099%2015.3376%2015.8949%2015.2738%2015.8949H15.1898C15.126%2015.8948%2015.0631%2015.9099%2015.0062%2015.9388C14.9494%2015.9677%2014.9002%2016.0096%2014.8627%2016.0612C14.8627%2016.0612%2013.6074%2017.4973%2014.1816%2021.0915C14.4989%2023.0777%2015.2314%2023.6694%2015.2314%2023.6694C15.2314%2023.6694%2015.9639%2023.0777%2016.2819%2021.0915C16.8561%2017.4973%2015.6008%2016.0612%2015.6008%2016.0612Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_8'%20d='M15.1468%2015.8949C15.083%2015.8948%2015.0201%2015.9099%2014.9632%2015.9388C14.9064%2015.9677%2014.8572%2016.0096%2014.8198%2016.0612C14.8198%2016.0612%2013.5645%2017.4973%2014.1387%2021.0915C14.456%2023.0777%2015.1884%2023.6694%2015.1884%2023.6694V15.8949H15.1468Z'%20fill='%23FDFDFD'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Zd="data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='15.3062'%20cy='15.2144'%20r='14.3521'%20stroke='%2392898A'%20stroke-width='1.5'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11.9898%2012.7234V9.89008C11.9898%208.88815%2012.3811%207.92726%2013.0777%207.21879C13.7743%206.51032%2014.719%206.1123%2015.7041%206.1123C16.6892%206.1123%2017.6339%206.51032%2018.3305%207.21879C19.0271%207.92726%2019.4184%208.88815%2019.4184%209.89008V12.7234H20.347C20.8395%2012.7234%2021.3119%2012.9224%2021.6602%2013.2767C22.0084%2013.6309%2022.2041%2014.1113%2022.2041%2014.6123V21.2234C22.2041%2021.7244%2022.0084%2022.2048%2021.6602%2022.5591C21.3119%2022.9133%2020.8395%2023.1123%2020.347%2023.1123H11.0612C10.5687%2023.1123%2010.0963%2022.9133%209.74805%2022.5591C9.39976%2022.2048%209.2041%2021.7244%209.2041%2021.2234V14.6123C9.2041%2014.1113%209.39976%2013.6309%209.74805%2013.2767C10.0963%2012.9224%2010.5687%2012.7234%2011.0612%2012.7234H11.9898ZM13.847%209.89008C13.847%209.38912%2014.0426%208.90867%2014.3909%208.55444C14.7392%208.2002%2015.2116%208.00119%2015.7041%208.00119C16.1966%208.00119%2016.669%208.2002%2017.0173%208.55444C17.3656%208.90867%2017.5612%209.38912%2017.5612%209.89008V12.7234H13.847V9.89008ZM15.7041%2015.5567C15.9504%2015.5567%2016.1866%2015.6563%2016.3607%2015.8334C16.5348%2016.0105%2016.6327%2016.2507%2016.6327%2016.5012V19.3345C16.6327%2019.585%2016.5348%2019.8252%2016.3607%2020.0023C16.1866%2020.1795%2015.9504%2020.279%2015.7041%2020.279C15.4578%2020.279%2015.2216%2020.1795%2015.0475%2020.0023C14.8734%2019.8252%2014.7755%2019.585%2014.7755%2019.3345V16.5012C14.7755%2016.2507%2014.8734%2016.0105%2015.0475%2015.8334C15.2216%2015.6563%2015.4578%2015.5567%2015.7041%2015.5567Z'%20fill='%2392898A'/%3e%3c/svg%3e",Gd="data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Editar'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.1021'%20cy='15.1021'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cg%20id='Group%203792'%3e%3cpath%20id='Vector%20530'%20d='M22.469%2010.8343L19.54%207.90531C19.3447%207.71005%2019.0281%207.71005%2018.8329%207.90531L8.39131%2018.3469C8.31762%2018.4206%208.2688%2018.5154%208.25167%2018.6182L7.66586%2022.1331C7.60946%2022.4715%207.90285%2022.7649%208.24126%2022.7085L11.7561%2022.1227C11.8589%2022.1055%2011.9538%2022.0567%2012.0275%2021.983L22.469%2011.5415C22.6643%2011.3462%2022.6643%2011.0296%2022.469%2010.8343Z'%20stroke='%23605B56'/%3e%3cpath%20id='Vector%20531'%20d='M9.00391%2017.7334L12.6401%2021.3695'%20stroke='%23605B56'/%3e%3cpath%20id='Vector%20614'%20d='M19.4292%207.55176L9.24805%2017.733L12.6418%2021.1267L22.823%2010.9455L19.4292%207.55176Z'%20fill='%23605B56'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Yd="data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%206729'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.1021'%20cy='15.1021'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cpath%20id='i'%20d='M14%209.008C14%208.708%2014.102%208.468%2014.306%208.288C14.51%208.096%2014.78%208%2015.116%208C15.452%208%2015.722%208.096%2015.926%208.288C16.13%208.468%2016.232%208.708%2016.232%209.008C16.232%209.308%2016.13%209.554%2015.926%209.746C15.722%209.926%2015.452%2010.016%2015.116%2010.016C14.78%2010.016%2014.51%209.926%2014.306%209.746C14.102%209.554%2014%209.308%2014%209.008ZM15.926%2011.906V21.788H14.288V11.906H15.926Z'%20fill='%23605B56'/%3e%3c/g%3e%3c/svg%3e";var Js;function qr(){return qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qr.apply(null,arguments)}var Xd=function(t){return J.createElement("svg",qr({xmlns:"http://www.w3.org/2000/svg",width:26,height:14,fill:"none"},t),Js||(Js=J.createElement("g",{fill:"currentColor"},J.createElement("path",{d:"M12.95.408C7.659.408 2.849 2.772.083 6.726a.47.47 0 0 0 0 .532c2.761 3.955 7.571 6.313 12.867 6.313s10.106-2.358 12.867-6.313a.47.47 0 0 0 0-.532C23.05 2.772 18.24.408 12.95.408m0 10.814A4.24 4.24 0 0 1 8.718 6.99a4.24 4.24 0 0 1 4.232-4.232 4.24 4.24 0 0 1 4.232 4.232 4.24 4.24 0 0 1-4.232 4.232"}),J.createElement("path",{d:"M12.951 10.297a3.307 3.307 0 1 0 0-6.614 3.307 3.307 0 0 0 0 6.614"}))))};const Qd="data:image/svg+xml,%3csvg%20width='26'%20height='18'%20viewBox='0%200%2026%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%205207'%3e%3cpath%20id='Vector'%20d='M12.9837%206.40625C11.1707%206.40625%209.69531%207.88162%209.69531%209.69462C9.69531%2010.0276%209.74618%2010.3514%209.83869%2010.652C9.93579%2010.9711%2010.0792%2011.2718%2010.2642%2011.54L14.8291%206.97512C14.5562%206.79013%2014.2602%206.64676%2013.9411%206.54962C13.6404%206.45712%2013.3167%206.40625%2012.9837%206.40625Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_2'%20d='M19.4938%204.44079C19.318%204.36678%2019.1191%204.40841%2018.985%204.53792L16.3534%207.16955V7.17415C16.543%207.42855%2016.7049%207.70604%2016.8344%208.00204C17.0656%208.52004%2017.1905%209.09354%2017.1905%209.69478C17.1905%2012.0165%2015.3035%2013.9035%2012.9818%2013.9035C12.3805%2013.9035%2011.807%2013.7787%2011.289%2013.5474C10.993%2013.4179%2010.7155%2013.256%2010.4611%2013.0664H10.4565L8.52788%2014.995C8.41225%2015.1153%208.36601%2015.2864%208.41225%2015.4437C8.45389%2015.6055%208.57875%2015.7304%208.74063%2015.772C10.0958%2016.1189%2011.511%2016.2947%2012.9494%2016.2947C18.245%2016.2947%2023.055%2013.9359%2025.8161%209.98153C25.9271%209.82429%2025.9271%209.61153%2025.8161%209.45427C24.2991%207.27591%2022.1115%205.54154%2019.4938%204.44079Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_3'%20d='M12.9843%2012.979C14.7973%2012.979%2016.268%2011.5082%2016.268%209.6952C16.268%209.35295%2016.2171%209.0292%2016.12%208.71933C16.0229%208.4002%2015.8749%208.10419%2015.6899%207.83594L11.125%2012.4008C11.3933%2012.5858%2011.6893%2012.7338%2012.0084%2012.831C12.3183%2012.9281%2012.6466%2012.979%2012.9843%2012.979Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_4'%20d='M9.12048%2011.3694C8.89386%2010.856%208.769%2010.2918%208.769%209.69516C8.769%207.3734%2010.656%205.48178%2012.9824%205.48178C13.579%205.48178%2014.1433%205.60667%2014.6566%205.83329C14.9526%205.95815%2015.2347%206.12004%2015.4891%206.31428L17.3808%204.42267L21.0114%200.792026C21.1918%200.611646%2021.1918%200.315664%2021.0114%200.135285C20.831%20-0.0450949%2020.535%20-0.0450949%2020.3546%200.135285L16.8951%203.59478C15.6186%203.28491%2014.2959%203.13228%2012.95%203.13228C7.65437%203.13228%202.84439%205.49565%200.0832465%209.45464C-0.0277488%209.61191%20-0.0277488%209.82467%200.0832465%209.9819C1.48001%2011.9845%203.44563%2013.6079%205.78125%2014.7087L3.37162%2017.1183C3.19127%2017.2986%203.19127%2017.5947%203.37162%2017.775C3.46412%2017.8629%203.57975%2017.9091%203.7%2017.9091C3.82026%2017.9091%203.93588%2017.8629%204.02839%2017.775L9.60151%2012.2019C9.40727%2011.9429%209.24536%2011.6654%209.12048%2011.3694Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3c/g%3e%3c/svg%3e",To=({listelement:e,onClickElement:t,isActive:n,activeColor:r,fontColor:o,moreInfo:i,columns:a,elementButtons:c,processTooltip:u,defaultTooltip:d,showEye:m=!0})=>{const{name:g,created_at:y,id:h,isBeingProcessed:b}=e,[f,x]=S.useState(!1),{t:_}=se.useTranslation(),w=c&&c.edit&&!e.is_default&&!e.is_baseline,N=c&&c.trash&&!e.is_default&&!e.is_baseline;return l.jsxs("div",{className:Ue.listElement,style:{borderBottom:`1px solid ${o}`},children:[l.jsx("div",{className:Ue.elementNameDate,onClick:()=>t(h),children:Object.keys(a).map((C,v)=>C==="name"?l.jsx("div",{className:Ue.elementNameContainer,children:l.jsxs("div",{className:`${Ue.elementName} ${m&&Ue.nameAndEye}`,children:[m&&(n?l.jsx(Xd,{style:{color:r,marginRight:9}}):l.jsx("img",{style:{marginRight:9},src:Qd,alt:"eye"})),l.jsx("span",{style:{color:n?r:o},children:g})]})},`col${v}`):C=="data"?l.jsx("div",{className:Ue.elementDate,children:y?new Date(y).toLocaleDateString():""},`col${v}data`):l.jsx("div",{className:Ue.elementDate,children:e[C]},`col${v}other`))}),l.jsxs("div",{className:Ue.elementButtons,children:[e.processing&&l.jsxs("div",{className:"tooltip-parent",children:[l.jsx("img",{src:Kd}),l.jsx(Ge,{text:u,position:"left"})]}),c.filter&&!e.is_default&&l.jsxs("div",{className:"tooltip-parent",children:[l.jsx("button",{onClick:()=>c.filter.onclick(e),disabled:c.filter.disabled||!1,children:l.jsx("img",{src:Hd})}),l.jsx(Ge,{text:c.filter.tooltiptext,position:"left"})]}),c.copy&&!e.is_default&&l.jsxs("div",{className:"tooltip-parent",children:[l.jsx("button",{onClick:()=>c.copy.onclick(e),disabled:c.copy.disabled||!1,children:l.jsx("img",{src:Ud})}),l.jsx(Ge,{text:c.copy.tooltiptext,position:"left"})]}),w&&l.jsxs("div",{className:"tooltip-parent",children:[l.jsx("button",{onClick:()=>c.edit.onclick(e),disabled:c.edit.disabled||!1,children:l.jsx("img",{src:Gd})}),l.jsx(Ge,{text:c.edit.tooltiptext,position:"left"})]}),c.info&&e.is_default&&l.jsxs("div",{className:"tooltip-parent",children:[l.jsx("button",{onClick:()=>c.info.onclick(e),disabled:c.info.disabled||!1,children:l.jsx("img",{src:Yd})}),l.jsx(Ge,{text:c.info.tooltiptext,position:"left"})]}),N&&l.jsxs("div",{className:"tooltip-parent",children:[l.jsx("button",{onClick:()=>c.trash.onclick(e),disabled:c.trash.disabled||!1,children:l.jsx("img",{src:Wd})}),l.jsx(Ge,{text:c.trash.tooltiptext,position:"left"})]}),e.is_default&&l.jsxs("div",{className:"tooltip-parent",children:[l.jsx("img",{src:Zd}),l.jsx(Ge,{text:d,position:"left"})]})]}),i&&l.jsx("div",{className:Ue.break}),i&&l.jsxs("div",{className:Ue.moreInfoContainer,children:[l.jsxs("div",{className:Ue.moreInfo,onClick:()=>x(!f),children:[l.jsx("span",{children:f?"-":"+"}),_(i.label)]}),i&&f&&l.jsx("div",{className:Ue.moreInfoInfo,children:e[i.info]})]})]})};To.displayName="ListElement";To.propTypes={listelement:s.shape({name:s.string.isRequired,created_at:s.string,id:s.any.isRequired,isBeingProcessed:s.bool}).isRequired,onClickElement:s.func.isRequired,isActive:s.bool,activeColor:s.string,fontColor:s.string,moreInfo:s.any,columns:s.shape({name:s.string,data:s.string,ambit:s.string,escenari:s.string}),elementButtons:s.shape({copy:s.shape({onclick:s.func,tooltiptext:s.string}),delete:s.shape({onclick:s.func,tooltiptext:s.string}),filter:s.shape({onclick:s.func,tooltiptext:s.string})}),processTooltip:s.string,defaultTooltip:s.string,showEye:s.bool};const ei="data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%200%2014%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20id='Vector'%20d='M7%2015L7%201M7%2015L1%209M7%2015L13%209'%20stroke='%23605B56'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ko=({elementsList:e,activeElementId:t,fontColor:n="#605B56",activeColor:r,buttonContainerStyles:o={},containerStyles:i={},newElementButton:a,onClickElement:c=b=>console.log(`OnCLickElement: ${b}`),columns:u,elementButtons:d,moreInfo:m=!1,processTooltip:g,defaultTooltip:y,showEye:h=!0})=>{const{t:b}=se.useTranslation(),[f,x]=S.useState(e);S.useEffect(()=>{e&&x(e)},[e]);const _=C=>{if(typeof C!="string")return null;if(/^\d{4}[-/]\d{2}[-/]\d{2}$/.test(C))return new Date(C);const v=/^(\d{2})[-/.]\s*(\d{2})[-/.]\s*(\d{4})$/.exec(C);if(v)return new Date(`${v[3]}-${v[2]}-${v[1]}`);const T=/^(\d{2})[-/]\s*(\d{2})[-/]\s*(\d{4})$/.exec(C);return T?parseInt(T[1])>12?new Date(`${T[3]}-${T[2]}-${T[1]}`):new Date(`${T[3]}-${T[1]}-${T[2]}`):null},w=C=>_(C)!==null,N=C=>{if(!f||f.length===0)return;let v=[...f];const T=v.find(j=>j[C]!==null&&j[C]!==void 0),M=T?w(T[C]):!1;v.sort((j,$)=>{const P=j[C],D=$[C];if(P==null&&D==null)return 0;if(P==null)return 1;if(D==null)return-1;if(M){const k=_(P),R=_(D);return!k&&!R?0:k?R?k-R:-1:1}const p=String(P||"").trim(),E=String(D||"").trim();return p.localeCompare(E)}),x(v)};return l.jsxs("div",{className:ot.elementSelector,style:{color:n,...i},children:[l.jsxs("div",{className:ot.header,style:{borderBottom:`1px solid ${n}`},children:[l.jsx("div",{className:ot.nameDateContainer,children:Object.keys(u).map(C=>C==="name"?l.jsx("div",{className:ot.elementName,children:l.jsxs("button",{onClick:()=>N("name"),children:[l.jsx("span",{children:b(u.name)}),l.jsx("img",{src:ei,alt:"order arrow"})]})},C):C==="data"?l.jsx("div",{className:ot.elementDate,children:l.jsxs("button",{onClick:()=>N("created_at"),children:[l.jsx("span",{children:b(u.data)}),l.jsx("img",{src:ei,alt:"order arrow"})]})},C):l.jsx("div",{className:ot.elementDate,children:l.jsx("span",{children:b(u[C])})},C))}),l.jsx("div",{className:ot.buttonsContainer})]}),l.jsx("div",{className:ot.elementListContainer,children:f&&f.length>0&&f.map(C=>l.jsx(To,{isActive:t==C.id,listelement:C,fontColor:n,activeColor:r,onClickElement:c,columns:u,elementButtons:d,moreInfo:m,processTooltip:g,defaultTooltip:y,showEye:h},`elementKey${C.id}`))}),a&&l.jsx("div",{className:ot.newElementButtonContainer,children:l.jsx(Zt,{style:{...o},onClick:a.onClick,borderColor:"grey",disabled:a.disabled||!1,children:b(a.label)})})]})};ko.displayName="ListSelector";ko.propTypes={elementsList:s.arrayOf(s.shape({name:s.string.isRequired,created_at:s.string,id:s.any.isRequired})).isRequired,activeElementId:s.any,fontColor:s.string,activeColor:s.string,onClickElement:s.func.isRequired,newElementButton:s.shape({label:s.string,onClick:s.func}),columns:s.shape({name:s.string,data:s.string,ambit:s.string,escenari:s.string}),elementButtons:s.shape({copy:s.shape({onclick:s.func,tooltiptext:s.string}),delete:s.shape({onclick:s.func,tooltiptext:s.string}),filter:s.shape({onclick:s.func,tooltiptext:s.string})}),buttonContainerStyles:s.object,containerStyles:s.object,onCLickNewElement:s.func,moreInfo:s.shape({label:s.string,info:s.any}),processTooltip:s.string,defaultTooltip:s.string,showEye:s.bool};const Jd="_formContainer_asv64_2",e1="_categorySelectorContainer_asv64_11",t1="_formObjectContainer_asv64_15",n1="_buttonContainer_asv64_26",tn={formContainer:Jd,categorySelectorContainer:e1,formObjectContainer:t1,buttonContainer:n1},Ft={text:"text",password:"password",radioList:"radioList",select:"select",textDescription:"textDescription",rankingSlider:"rankingSlider"};var r1=e=>e.type==="checkbox",an=e=>e instanceof Date,jo=e=>e==null;const ta=e=>typeof e=="object";var $t=e=>!jo(e)&&!Array.isArray(e)&&ta(e)&&!an(e),o1=e=>$t(e)&&e.target?r1(e.target)?e.target.checked:e.target.value:e,s1=(e,t)=>t.split(".").some((n,r,o)=>!isNaN(Number(n))&&e.has(o.slice(0,r).join("."))),i1=e=>{const t=e.constructor&&e.constructor.prototype;return $t(t)&&t.hasOwnProperty("isPrototypeOf")},a1=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function na(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(a1&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!($t(e)&&i1(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=na(e[o]));return r}var ra=e=>/^\w*$/.test(e),Wr=e=>e===void 0,l1=e=>Array.isArray(e)?e.filter(Boolean):[],oa=e=>l1(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Pe=(e,t,n)=>{if(!t||!$t(e))return n;const r=(ra(t)?[t]:oa(t)).reduce((o,i)=>jo(o)?o:o[i],e);return Wr(r)||r===e?Wr(e[t])?n:e[t]:r},Ar=e=>typeof e=="boolean",En=e=>typeof e=="function",ti=(e,t,n)=>{let r=-1;const o=ra(t)?[t]:oa(t),i=o.length,a=i-1;for(;++r<i;){const c=o[r];let u=n;if(r!==a){const d=e[c];u=$t(d)||Array.isArray(d)?d:isNaN(+o[r+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=u,e=e[c]}};const ni={BLUR:"blur",CHANGE:"change"},ri={all:"all"},sa=S.createContext(null);sa.displayName="HookFormControlContext";const $o=()=>S.useContext(sa);var c1=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==ri.all&&(t._proxyFormState[a]=!r||ri.all),n&&(n[a]=!0),e[a]}});return o};const ia=typeof window<"u"?S.useLayoutEffect:S.useEffect;function u1(e){const t=$o(),{control:n=t,disabled:r,name:o,exact:i}=e||{},[a,c]=S.useState(n._formState),u=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return ia(()=>n._subscribe({name:o,formState:u.current,exact:i,callback:d=>{!r&&c({...n._formState,...d})}}),[o,r,i]),S.useEffect(()=>{u.current.isValid&&n._setValid(!0)},[n]),S.useMemo(()=>c1(a,n,u.current,!1),[a,n])}var d1=e=>typeof e=="string",oi=(e,t,n,r,o)=>d1(e)?Pe(n,e,o):Array.isArray(e)?e.map(i=>Pe(n,i)):n,si=e=>jo(e)||!ta(e);function Dn(e,t,n=new WeakSet){if(si(e)||si(t))return Object.is(e,t);if(an(e)&&an(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const i of r){const a=e[i];if(!o.includes(i))return!1;if(i!=="ref"){const c=t[i];if(an(a)&&an(c)||($t(a)||Array.isArray(a))&&($t(c)||Array.isArray(c))?!Dn(a,c,n):!Object.is(a,c))return!1}}return!0}function f1(e){const t=$o(),{control:n=t,name:r,defaultValue:o,disabled:i,exact:a,compute:c}=e||{},u=S.useRef(o),d=S.useRef(c),m=S.useRef(void 0),g=S.useRef(n),y=S.useRef(r);d.current=c;const[h,b]=S.useState(()=>{const C=n._getWatch(r,u.current);return d.current?d.current(C):C}),f=S.useCallback(C=>{const v=oi(r,n._names,C||n._formValues,!1,u.current);return d.current?d.current(v):v},[n._formValues,n._names,r]),x=S.useCallback(C=>{if(!i){const v=oi(r,n._names,C||n._formValues,!1,u.current);if(d.current){const T=d.current(v);Dn(T,m.current)||(b(T),m.current=T)}else b(v)}},[n._formValues,n._names,i,r]);ia(()=>((g.current!==n||!Dn(y.current,r))&&(g.current=n,y.current=r,x()),n._subscribe({name:r,formState:{values:!0},exact:a,callback:C=>{x(C.values)}})),[n,a,r,x]),S.useEffect(()=>n._removeUnmounted());const _=g.current!==n,w=y.current,N=S.useMemo(()=>{if(i)return null;const C=!_&&!Dn(w,r);return _||C?f():null},[i,_,r,w,f]);return N!==null?N:h}function p1(e){const t=$o(),{name:n,disabled:r,control:o=t,shouldUnregister:i,defaultValue:a,exact:c=!0}=e,u=s1(o._names.array,n),d=S.useMemo(()=>Pe(o._formValues,n,Pe(o._defaultValues,n,a)),[o,n,a]),m=f1({control:o,name:n,defaultValue:d,exact:c}),g=u1({control:o,name:n,exact:c}),y=S.useRef(e),h=S.useRef(void 0),b=S.useRef(o.register(n,{...e.rules,value:m,...Ar(e.disabled)?{disabled:e.disabled}:{}}));y.current=e;const f=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Pe(g.errors,n)},isDirty:{enumerable:!0,get:()=>!!Pe(g.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Pe(g.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Pe(g.validatingFields,n)},error:{enumerable:!0,get:()=>Pe(g.errors,n)}}),[g,n]),x=S.useCallback(C=>b.current.onChange({target:{value:o1(C),name:n},type:ni.CHANGE}),[n]),_=S.useCallback(()=>b.current.onBlur({target:{value:Pe(o._formValues,n),name:n},type:ni.BLUR}),[n,o._formValues]),w=S.useCallback(C=>{const v=Pe(o._fields,n);v&&v._f&&C&&(v._f.ref={focus:()=>En(C.focus)&&C.focus(),select:()=>En(C.select)&&C.select(),setCustomValidity:T=>En(C.setCustomValidity)&&C.setCustomValidity(T),reportValidity:()=>En(C.reportValidity)&&C.reportValidity()})},[o._fields,n]),N=S.useMemo(()=>({name:n,value:m,...Ar(r)||g.disabled?{disabled:g.disabled||r}:{},onChange:x,onBlur:_,ref:w}),[n,r,g.disabled,x,_,w,m]);return S.useEffect(()=>{const C=o._options.shouldUnregister||i,v=h.current;v&&v!==n&&!u&&o.unregister(v),o.register(n,{...y.current.rules,...Ar(y.current.disabled)?{disabled:y.current.disabled}:{}});const T=(M,j)=>{const $=Pe(o._fields,M);$&&$._f&&($._f.mount=j)};if(T(n,!0),C){const M=na(Pe(o._options.defaultValues,n,y.current.defaultValue));ti(o._defaultValues,n,M),Wr(Pe(o._formValues,n))&&ti(o._formValues,n,M)}return!u&&o.register(n),h.current=n,()=>{(u?C&&!o._state.action:C)?o.unregister(n):T(n,!1)}},[n,o,u,i]),S.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),S.useMemo(()=>({field:N,formState:g,fieldState:f}),[N,g,f])}const mn=e=>e.render(p1(e)),m1=S.createContext(null);m1.displayName="HookFormContext";const h1="_textInputContainer_1o3iy_2",g1="_labelContainer_1o3iy_5",y1="_inputContainer_1o3iy_8",b1="_showPasswordButton_1o3iy_14",v1="_forgotPassButton_1o3iy_26",nn={textInputContainer:h1,labelContainer:g1,inputContainer:y1,showPasswordButton:b1,forgotPassButton:v1},x1="_errorMessage_1xiyb_2",C1={errorMessage:x1},At=({errorMessage:e,errorColor:t="red",containerStyles:n})=>{const{t:r}=se.useTranslation();return l.jsx("div",{className:C1.errorMessage,style:{color:t,...n},children:e?r(e):""})};At.displayName="ErrorMessage";const _1="data:image/svg+xml,%3csvg%20width='26'%20height='14'%20viewBox='0%200%2026%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%205763'%3e%3cpath%20id='Vector'%20d='M12.95%200C7.659%200%202.84899%202.3634%200.0832465%206.31776C-0.0277488%206.47963%20-0.0277488%206.68776%200.0832465%206.84962C2.84439%2010.804%207.65437%2013.1628%2012.95%2013.1628C18.2456%2013.1628%2023.0556%2010.804%2025.8168%206.84962C25.9278%206.68775%2025.9278%206.47963%2025.8168%206.31776C23.051%202.36339%2018.241%200%2012.95%200ZM12.95%2010.8132C10.619%2010.8132%208.71812%208.91238%208.71812%206.58139C8.71812%204.25041%2010.619%202.34951%2012.95%202.34951C15.281%202.34951%2017.1819%204.25038%2017.1819%206.58139C17.1819%208.91241%2015.281%2010.8132%2012.95%2010.8132Z'%20fill='white'/%3e%3cpath%20id='Vector_2'%20d='M12.9514%209.88816C14.7777%209.88816%2016.2583%208.40763%2016.2583%206.58129C16.2583%204.75495%2014.7777%203.27441%2012.9514%203.27441C11.1251%203.27441%209.64453%204.75495%209.64453%206.58129C9.64453%208.40763%2011.1251%209.88816%2012.9514%209.88816Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",S1="data:image/svg+xml,%3csvg%20width='26'%20height='18'%20viewBox='0%200%2026%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%205995'%3e%3cpath%20id='Vector'%20d='M12.9837%206.40625C11.1707%206.40625%209.69531%207.88162%209.69531%209.69462C9.69531%2010.0276%209.74618%2010.3514%209.83869%2010.652C9.93579%2010.9711%2010.0792%2011.2718%2010.2642%2011.54L14.8291%206.97512C14.5562%206.79013%2014.2602%206.64676%2013.9411%206.54962C13.6404%206.45712%2013.3167%206.40625%2012.9837%206.40625Z'%20fill='white'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_2'%20d='M19.4938%204.44079C19.318%204.36678%2019.1191%204.40841%2018.985%204.53792L16.3534%207.16955V7.17415C16.543%207.42855%2016.7049%207.70604%2016.8344%208.00204C17.0656%208.52004%2017.1905%209.09354%2017.1905%209.69478C17.1905%2012.0165%2015.3035%2013.9035%2012.9818%2013.9035C12.3805%2013.9035%2011.807%2013.7787%2011.289%2013.5474C10.993%2013.4179%2010.7155%2013.256%2010.4611%2013.0664H10.4565L8.52788%2014.995C8.41225%2015.1153%208.36601%2015.2864%208.41225%2015.4437C8.45389%2015.6055%208.57875%2015.7304%208.74063%2015.772C10.0958%2016.1189%2011.511%2016.2947%2012.9494%2016.2947C18.245%2016.2947%2023.055%2013.9359%2025.8161%209.98153C25.9271%209.82429%2025.9271%209.61153%2025.8161%209.45427C24.2991%207.27591%2022.1115%205.54154%2019.4938%204.44079Z'%20fill='white'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_3'%20d='M12.9843%2012.979C14.7973%2012.979%2016.268%2011.5082%2016.268%209.6952C16.268%209.35295%2016.2171%209.0292%2016.12%208.71933C16.0229%208.4002%2015.8749%208.10419%2015.6899%207.83594L11.125%2012.4008C11.3933%2012.5858%2011.6893%2012.7338%2012.0084%2012.831C12.3183%2012.9281%2012.6466%2012.979%2012.9843%2012.979Z'%20fill='white'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_4'%20d='M9.12048%2011.3694C8.89386%2010.856%208.769%2010.2918%208.769%209.69516C8.769%207.3734%2010.656%205.48178%2012.9824%205.48178C13.579%205.48178%2014.1433%205.60667%2014.6566%205.83329C14.9526%205.95815%2015.2347%206.12004%2015.4891%206.31428L17.3808%204.42267L21.0114%200.792026C21.1918%200.611646%2021.1918%200.315664%2021.0114%200.135285C20.831%20-0.0450949%2020.535%20-0.0450949%2020.3546%200.135285L16.8951%203.59478C15.6186%203.28491%2014.2959%203.13228%2012.95%203.13228C7.65437%203.13228%202.84439%205.49565%200.0832465%209.45464C-0.0277488%209.61191%20-0.0277488%209.82467%200.0832465%209.9819C1.48001%2011.9845%203.44563%2013.6079%205.78125%2014.7087L3.37162%2017.1183C3.19127%2017.2986%203.19127%2017.5947%203.37162%2017.775C3.46412%2017.8629%203.57975%2017.9091%203.7%2017.9091C3.82026%2017.9091%203.93588%2017.8629%204.02839%2017.775L9.60151%2012.2019C9.40727%2011.9429%209.24536%2011.6654%209.12048%2011.3694Z'%20fill='white'%20fill-opacity='0.5'/%3e%3c/g%3e%3c/svg%3e",hn=Hr.create(e=>({errorColor:"red"})),Wn=({input:e,reactHookFormInstance:t})=>{const{code:n,type:r,label:o,maxLength:i,required:a,validateFunction:c,placeholder:u,errorColor:d="red",width:m=325,onClickForgotPass:g=()=>{console.log("Click on forgot password")},forgotPassLabel:y="forgot-password",onChangeExtraFunction:h=()=>{}}=e,{t:b}=se.useTranslation(),{control:f,trigger:x,clearErrors:_}=t,{errorColor:w}=hn(T=>T),[N,C]=S.useState(!1);S.useRef(a);const v=()=>r?r==="password"&&N?"text":r:"text";return l.jsx(mn,{name:n,control:f,rules:{required:a?`${b(o)} ${b("errorMessages.required")}`:!1,maxLength:i||void 0,validate:c||void 0},render:({field:T,fieldState:M})=>{var D;const{onChange:j,...$}=T,P=p=>{j(p),h&&h(p)};return l.jsxs("div",{className:nn.textInputContainer,children:[l.jsxs("h3",{className:nn.labelContainer,children:[b(o)," ",a&&l.jsx("label",{style:{color:M.error?d:""},children:"*"})]}),l.jsxs("div",{style:{position:"relative",width:m},className:nn.inputContainer,children:[l.jsx("input",{...$,type:v(),onChange:P,placeholder:u?b(u):"",maxLength:i||void 0}),r=="password"&&l.jsx("button",{onClick:()=>C(!N),type:"button",className:nn.showPasswordButton,children:l.jsx("img",{src:N?S1:_1,alt:b("show-password")})})]}),r=="password"&&l.jsx("div",{className:nn.forgotPassButton,children:l.jsx("button",{onClick:g,children:b(y)})}),l.jsx(At,{errorMessage:(D=M.error)==null?void 0:D.message,errorColor:w||d})]})}})};Wn.displayName="TextInput";const w1="_inputsContainer_10t9s_2",Vt={inputsContainer:w1},T1="_selectInputContainer_zzz6o_2",k1="_labelContainer_zzz6o_6",j1="_selectWrapper_zzz6o_9",$1="_inputContainer_zzz6o_15",N1="_selectInput_zzz6o_2",E1="_option_zzz6o_29",A1="_dropdownArrow_zzz6o_32",Ie={selectInputContainer:T1,labelContainer:k1,selectWrapper:j1,inputContainer:$1,selectInput:N1,option:E1,dropdownArrow:A1},ii="data:image/svg+xml,%3csvg%20width='19'%20height='10'%20viewBox='0%200%2019%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20id='Vector%20311'%20d='M1%201.09961L8.79289%208.8925C9.18342%209.28303%209.81658%209.28303%2010.2071%208.8925L18%201.09961'%20stroke='%23605B56'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/svg%3e",No=({input:e,reactHookFormInstance:t,onChange:n})=>{const{code:r,type:o,label:i,maxLength:a,required:c,validateFunction:u,placeholder:d,errorColor:m="red",width:g=325,options:y=[]}=e,{t:h}=se.useTranslation(),{control:b,trigger:f,clearErrors:x}=t||{},{errorColor:_}=hn(C=>C);S.useRef(c);const[w,N]=S.useState(null);return S.useEffect(()=>{w&&n&&n(w)},[w,n]),t?l.jsx(mn,{name:r,control:b,rules:{required:c?`${h(i)} ${h("errorMessages.required")}`:!1,validate:u?C=>{let v=t.getValues();return u(C,v)}:void 0},render:({field:C,fieldState:v})=>{var M;const T=y.find(j=>j.value===C.value);return l.jsxs("div",{className:Ie.selectInputContainer,children:[i&&l.jsxs("h3",{className:Ie.labelContainer,children:[h(i)," ",c&&l.jsx("label",{style:{color:v.error?m:""},children:"*"})]}),l.jsxs("div",{className:Ie.selectWrapper,children:[l.jsxs("div",{className:Ie.inputContainer,style:{width:g},children:[l.jsxs("select",{...C,value:C.value??"",onChange:j=>{const $=j.target.value,P=y.every(D=>typeof D.value=="number")?Number($):$;C.onChange(P)},className:Ie.selectInput,children:[l.jsx("option",{value:"",disabled:!0,hidden:!0,children:h(d||"selectOption")}),y.map((j,$)=>l.jsx("option",{value:j.value,className:Ie.option,children:h(j.label)},$))]}),l.jsx("img",{src:ii,alt:"Open",className:Ie.dropdownArrow})]}),T&&T.description&&l.jsx("div",{className:Ie.optionDescription,children:h(T.description)})]}),l.jsx(At,{errorMessage:(M=v.error)==null?void 0:M.message,errorColor:_||m})]})}}):l.jsxs("div",{className:Ie.selectInputContainer,children:[i&&l.jsxs("h3",{className:Ie.labelContainer,children:[h(i)," ",c&&l.jsx("label",{children:"*"})]}),l.jsxs("div",{className:Ie.inputContainer,style:{width:g},children:[l.jsxs("select",{value:w??"",onChange:C=>{const v=C.target.value,T=y.every(M=>typeof M.value=="number")?Number(v):v;N(T)},className:Ie.selectInput,children:[l.jsx("option",{value:"",disabled:!0,hidden:!0,children:h(d||"selectOption")}),y.map((C,v)=>l.jsx("option",{value:C.value,className:Ie.option,children:h(C.label)},v))]}),l.jsx("img",{src:ii,alt:"Open",className:Ie.dropdownArrow})]}),(()=>{const C=y.find(v=>v.value===w);return C&&C.description?l.jsx("div",{className:Ie.optionDescription,children:h(C.description)}):null})()]})};No.displayName="SelectInput";const O1="_radioButtonContainer_1e994_2",M1="_wholeInputContainer_1e994_5",L1="_questionContainer_1e994_27",R1="_radioQuestion_1e994_59",I1="_inputContainer_1e994_63",D1="_radioInput_1e994_93",St={radioButtonContainer:O1,wholeInputContainer:M1,questionContainer:L1,radioQuestion:R1,inputContainer:I1,radioInput:D1},Eo=({input:e,reactHookFormInstance:t})=>{const{code:n,label:r,required:o,validateFunction:i,errorColor:a="red",options:c=[],multi:u=!1}=e,{t:d}=se.useTranslation(),{control:m,trigger:g,clearErrors:y}=t,{errorColor:h}=hn(x=>x),b=({options:x,onChange:_,actualValue:w})=>{if(u&&w&&w.length>0){let N=w.filter(C=>C!==x);_(N)}},f=({options:x,onChange:_,actualValue:w})=>{u?w&&w.length>0?_([...w,x]):_([x]):_(x)};return S.useRef(o),l.jsx(mn,{control:m,name:n,rules:{validate:x=>o&&(x==null||x==="")?`${d(r)} ${d("errorMessages.required")}`:null},render:({formState:{errors:x},field:{onChange:_,onBlur:w,value:N,ref:C},fieldState:v})=>{var T;return l.jsx("div",{id:n+"id",className:St.radioButtonContainer,children:l.jsxs("div",{className:St.wholeInputContainer,children:[r&&l.jsx("div",{className:St.questionContainer,children:l.jsxs("h3",{htmlFor:n+"id",className:`${St.radioQuestion} ${o&&St.required}`,children:[d(r)," ",o&&l.jsx("label",{style:{color:v.error?a:""},children:"*"})]})}),l.jsxs("div",{className:St.inputContainer,children:[c.map(({label:M,value:j,disabled:$=!1,italicLabel:P},D)=>{const p=N&&u?N.isArray&&(N==null?void 0:N.length)>0&&N.some(E=>E===j):N===j;return l.jsxs("label",{children:[l.jsx("input",{type:"radio",checked:p,onChange:()=>{u?p?b({actualValue:N,options:c,onChange:_}):f({actualValue:N,options:c,onChange:_}):_(j)},className:St.radioInput}),l.jsx("span",{className:"radio-custom"}),d(M)]},`inputRadio ${D}`)}),l.jsx(At,{errorMessage:(T=v.error)==null?void 0:T.message,errorColor:h||a})]})]})})}})};Eo.displayName="RadioButtonInput";const B1="_rankingSliderContainer_1dvpb_2",P1="_labelContainer_1dvpb_6",F1="_inputContainer_1dvpb_10",V1="_slider_1dvpb_20",z1="_thumb_1dvpb_27",q1="_labels_1dvpb_37",W1="_minLabel_1dvpb_67",U1="_maxLabel_1dvpb_68",$e={rankingSliderContainer:B1,labelContainer:P1,inputContainer:F1,slider:V1,thumb:z1,labels:q1,minLabel:W1,maxLabel:U1},lr=({input:e,reactHookFormInstance:t,onChange:n})=>{const{code:r,label:o,minValue:i=1,maxValue:a=5,defValue:c=3,thumbColor:u="#B32F5D",required:d,errorColor:m="red",labelWidth:g="300px",sliderWidth:y="300px",minText:h,maxText:b,disabled:f=!1,marks:x=Array.from({length:a-i+1},($,P)=>i+P),showMarksNumber:_=!0}=e,{t:w}=se.useTranslation(),{control:N,trigger:C,clearErrors:v}=t||{};S.useRef(d);const{errorColorForm:T}=hn($=>$),[M,j]=S.useState(c);return t?l.jsx(mn,{name:r,control:N,defaultValue:c,rules:{required:d?`${w(o)} ${w("errorMessages.required")}`:!1},render:({field:$,fieldState:P})=>{var D;return l.jsxs("div",{className:$e.rankingSliderContainer,style:{gridTemplateColumns:`${o&&g} ${y}`},children:[o&&l.jsx("p",{className:$e.labelContainer,style:{color:f?"#CCCCCC":"#605B56"},children:w(o)}),l.jsxs("div",{className:$e.inputContainer,children:[h&&l.jsx("div",{className:$e.minLabel,children:w(h)}),l.jsxs("div",{children:[l.jsx(Dr,{min:i,max:a,step:1,value:$.value??c,onChange:p=>{$.onChange(p)},marks:!0,className:$e.slider,thumbClassName:$e.thumb,renderThumb:p=>l.jsx("div",{...p,style:{...p.style,backgroundColor:f?"#CCCCCC":u,cursor:f?"not-allowed":"grab"}}),trackClassName:$e.track,markClassName:$e.mark,disabled:f}),x&&l.jsx("div",{className:$e.labels,children:x.map(p=>l.jsx("span",{children:_&&p},p))})]}),b&&l.jsx("div",{className:$e.maxLabel,children:w(b)})]}),l.jsx(At,{errorMessage:(D=P.error)==null?void 0:D.message,errorColor:T||m})]})}}):l.jsxs("div",{className:$e.rankingSliderContainer,style:{gridTemplateColumns:`${o&&g} ${y}`},children:[o&&l.jsx("p",{className:$e.labelContainer,style:{color:f?"#CCCCCC":"#605B56"},children:w(o)}),l.jsxs("div",{className:$e.inputContainer,children:[h&&l.jsx("div",{className:$e.minLabel,children:w(h)}),l.jsxs("div",{children:[l.jsx(Dr,{min:i,max:a,step:1,value:M,onChange:$=>{j($),n&&n($)},marks:!0,className:$e.slider,thumbClassName:$e.thumb,renderThumb:$=>l.jsx("div",{...$,style:{...$.style,backgroundColor:f?"#CCCCCC":u,cursor:f?"not-allowed":"grab"}}),trackClassName:$e.track,markClassName:$e.mark,disabled:f}),x&&l.jsx("div",{className:$e.labels,children:x.map($=>l.jsx("span",{children:_&&$},$))})]}),b&&l.jsx("div",{className:$e.maxLabel,children:w(b)})]})]})};lr.displayName="RankingSlider";lr.propTypes={input:s.shape({code:s.string,label:s.string,minValue:s.number,maxValue:s.number,defValue:s.number,thumbColor:s.string,required:s.bool,errorColor:s.string,labelWidth:s.string,sliderWidth:s.string,minText:s.string,maxText:s.string}),reactHookFormInstance:s.object};const H1="_textDescriptionContainer_163pc_2",K1="_textDescriptionText_163pc_6",ai={textDescriptionContainer:H1,textDescriptionText:K1},aa=({input:e,inputContainerStyles:t})=>l.jsx("div",{className:ai.textDescriptionContainer,style:{margin:"10px 0",...t},children:l.jsx("p",{className:ai.textDescriptionText,children:e.text})});aa.displayName="TextDescription";const Wt=({inputs:e,inputContainerStyles:t,reactHookFormInstance:n})=>{const{watch:r}=n,o=r(),i=S.useMemo(()=>e==null?void 0:e.map(a=>{const c=typeof a.required=="function"?a.required(o):a.required;return{...a,required:c}}),[e,o]);return l.jsx("div",{className:Vt.inputsContainer,children:i==null?void 0:i.map((a,c)=>{const{inputType:u}=a;switch(u){case Ft.text:return l.jsx("div",{className:Vt.inputContainer,style:{...t},children:l.jsx(Wn,{input:a,reactHookFormInstance:n})},`${a.code}${c}`);case Ft.password:return l.jsx("div",{className:Vt.inputContainer,style:{...t},children:l.jsx(Wn,{input:a,reactHookFormInstance:n})},`${a.code}${c}`);case Ft.select:return l.jsx("div",{className:Vt.inputContainer,style:{...t},children:l.jsx(No,{input:a,reactHookFormInstance:n})},`${a.code}${c}`);case Ft.radioList:return l.jsx("div",{className:Vt.inputContainer,style:{...t},children:l.jsx(Eo,{input:a,reactHookFormInstance:n})},`${a.code}${c}`);case Ft.rankingSlider:return l.jsx("div",{className:Vt.inputContainer,style:{...t},children:l.jsx(lr,{input:a,reactHookFormInstance:n})},`${a.code}${c}`);case Ft.textDescription:return l.jsx(aa,{input:a,inputContainerStyles:t},`${a.code}${c}`);default:return l.jsx("div",{children:l.jsx("h4",{children:"Default"})},`${a.code}${c}`)}})})};Wt.displayName="RenderInputs";const Z1="_categorySelector_1guuv_2",G1="_sectionItemActive_1guuv_16",Y1="_sectionItem_1guuv_16",X1="_sectionItemError_1guuv_32",rn={categorySelector:Z1,sectionItemActive:G1,sectionItem:Y1,sectionItemError:X1},Un=({categories:e,onChange:t,activeCategory:n,activeColor:r,containerStyles:o={},categoriesWithErrors:i=[]})=>{const{t:a}=se.useTranslation(),c=u=>{t(u)};return l.jsx("div",{className:rn.categorySelector,style:o?{...o}:{},children:e.map((u,d)=>{const{id:m,label:g}=u,y=n==m,h=i.includes(m);return l.jsx("button",{className:`${rn.sectionItem} ${y?rn.sectionItemActive:""} ${h?rn.sectionItemError:""}`,type:"button",style:{backgroundColor:y?r:"inherit"},onClick:()=>c(m),children:l.jsx("span",{style:{color:y?"white":"inherit"},className:rn.sectionLabel,children:a(g)})},`keySection${d}`)})})};Un.displayName="CategorySelector";const la=({reactHookFormInstance:e,formObject:t,CategoryComponent:n,inputContainerStyles:r,generalError:o,errorColor:i="red",submitButtonLabel:a="Submit",submitButtonStyles:c={width:325},showCategorySelector:u=!0,defaultCategory:d=null,categoryLabel:m="Select Category",activeCategory:g=null,activeCategoryColor:y="#b32f5d",categoriesWithErrors:h=[],onSubmit:b=f=>console.log("Form submitted with: ",f)})=>{const{t:f}=se.useTranslation(),{handleSubmit:x,control:_}=e;S.useEffect(()=>{i&&hn.setState(()=>({errorColor:i}))},[i]);const w=S.useMemo(()=>t?t.filter($=>$.category).map($=>{var P;return{id:$.categoryId,label:$.category,hasSubcategories:((P=$.subcategories)==null?void 0:P.length)>0}}):[],[t]),N=$=>{const P=t==null?void 0:t.find(D=>D.categoryId===$);return(P==null?void 0:P.subcategories)||[]},[C,v]=S.useState(g||d||null),[T,M]=S.useState(null);S.useEffect(()=>{!C&&w.length>0&&v(w[0].id)},[w,C]),S.useEffect(()=>{const $=N(C);!T&&($==null?void 0:$.length)>0&&M($[0].id)},[C,T,t]);const j=($,P)=>{var D;if(((D=$.subcategories)==null?void 0:D.length)>0){const p=$.subcategories;return l.jsxs("div",{children:[l.jsx("div",{className:tn.categorySelectorContainer,children:l.jsx(Un,{activeCategory:T,categories:p,categoriesWithErrors:h,onChange:E=>M(E),activeColor:y})},$.categoryId),p.map((E,k)=>{const R=!T||E.id===T;return n?l.jsx("div",{style:{display:R?"block":"none",width:"100%"},children:l.jsx(n,{title:E.label,children:l.jsx(Wt,{inputs:E.inputs,control:_,inputContainerStyles:r,errorColor:i,reactHookFormInstance:e})},E.id)},`${E.id}${k}`):l.jsxs("div",{style:{width:"100%",display:R?"block":"none"},children:[l.jsx("h3",{style:{marginBottom:15},children:f(E.label)}),l.jsx(Wt,{inputs:E.inputs,control:_,inputContainerStyles:r,errorColor:i,reactHookFormInstance:e})]},`${E.id}${k}`)})]})}return n?l.jsx(n,{title:$.category,children:l.jsx(Wt,{inputs:$.inputs,control:_,inputContainerStyles:r,errorColor:i,reactHookFormInstance:e})},$.categoryId):l.jsxs("div",{style:{width:"100%"},children:[l.jsx("h2",{children:f($.category)}),l.jsx(Wt,{inputs:$.inputs,control:_,inputContainerStyles:r,errorColor:i,reactHookFormInstance:e})]},$.categoryId)};return l.jsxs("form",{className:tn.formContainer,onSubmit:x(b),children:[u&&w.length>0&&l.jsx("div",{className:tn.categorySelectorContainer,children:l.jsx(Un,{activeCategory:C,categories:w,categoriesWithErrors:h,onChange:$=>{v($),M(null)},activeColor:y})}),l.jsx("div",{className:tn.formObjectContainer,children:t==null?void 0:t.map(($,P)=>{const D=$.categoryId===C;return $.category?l.jsx("div",{style:{width:"100%",display:D?"block":"none"},children:j($)},$.categoryId):l.jsx(Wt,{inputs:$.inputs,control:_,inputContainerStyles:r,errorColor:i,reactHookFormInstance:e},`no-category-${P}`)})}),l.jsxs("div",{className:tn.buttonContainer,children:[l.jsx(Zt,{containerStyles:c,type:"submit",children:f(a)}),l.jsx(At,{errorMessage:o,errorColor:i})]})]})};la.displayName="Form";const Q1="_overlay_mnd4j_2",J1="_modal_mnd4j_15",ef="_closeButton_mnd4j_29",tf="_icon_mnd4j_39",nf="_message_mnd4j_45",rf="_submessage_mnd4j_51",of="_buttonsContainer_mnd4j_57",sf="_buttonWrapper_mnd4j_64",mt={overlay:Q1,modal:J1,closeButton:ef,icon:tf,message:nf,submessage:rf,buttonsContainer:of,buttonWrapper:sf},Ao=({onClose:e,icon:t,message:n,submessage:r,buttons:o,maxHeight:i="450px",maxWidth:a="450px"})=>l.jsx("div",{className:mt.overlay,children:l.jsxs("div",{className:mt.modal,style:{maxHeight:i,maxWidth:a},children:[l.jsx("button",{className:mt.closeButton,onClick:e,"aria-label":"Close modal",children:"✕"}),t&&l.jsx("img",{src:t,alt:"icon",className:mt.icon}),l.jsx("p",{className:mt.message,children:n}),r&&l.jsx("p",{className:mt.submessage,children:r}),o.length>0&&l.jsx("div",{className:mt.buttonsContainer,children:o.map((c,u)=>l.jsx("div",{className:mt.buttonWrapper,children:c},u))})]})});Ao.displayName="ModalAlert";Ao.propTypes={onClose:s.func.isRequired,icon:s.string,message:s.string.isRequired,submessage:s.string,buttons:s.arrayOf(s.node),maxHeight:s.string,maxWidth:s.string};const af="_stepsContainer_1cyua_3",lf="_stepWrapper_1cyua_9",cf="_circleContainer_1cyua_19",uf="_circle_1cyua_19",df="_active_1cyua_39",ff="_completed_1cyua_44",pf="_label_1cyua_50",mf="_labelActive_1cyua_56",hf="_connector_1cyua_61",st={stepsContainer:af,stepWrapper:lf,circleContainer:cf,circle:uf,active:df,completed:ff,label:pf,labelActive:mf,connector:hf},Oo=({steps:e,activeColor:t="#C2185B"})=>l.jsx("div",{className:st.stepsContainer,children:e.map((n,r)=>{const o=n.status==="active",i=n.status==="completed";return l.jsxs("div",{className:st.stepWrapper,children:[l.jsxs("div",{className:st.circleContainer,children:[l.jsx("div",{className:`${st.circle}
81
81
  ${o?st.active:""}
82
82
  ${i?st.completed:""}`,style:o?{backgroundColor:t}:{},onClick:n.onClick,children:r+1}),r<e.length-1&&l.jsx("div",{className:st.connector})]}),l.jsx("div",{className:`${st.label} ${o?st.labelActive:""}`,children:n.name})]},r)})});Oo.displayName="Steps";Oo.propTypes={steps:s.arrayOf(s.shape({name:s.string.isRequired,onClick:s.func,status:s.oneOf(["inactive","active","completed"]).isRequired})).isRequired,activeColor:s.string};const gf="_statusTextContainer_ch14r_2",yf={statusTextContainer:gf},Mo=({text:e,color:t="#C2185B"})=>l.jsx("div",{className:yf.statusTextContainer,style:{background:t},children:l.jsx("span",{children:e})});Mo.displayName="StatusText";Mo.propTypes={text:s.string,color:s.string};const bf="_buttonsContainer_1c7dw_2",vf="_button_1c7dw_2",xf="_active_1c7dw_20",An={buttonsContainer:bf,button:vf,active:xf},Lo=({buttons:e=[]})=>{const{t}=se.useTranslation();return l.jsx("div",{className:`${An.buttonsContainer}`,children:e.map((n,r)=>{const{isActive:o,name:i,onClick:a}=n;return l.jsx("div",{children:l.jsx("button",{onClick:a,className:`${An.button}
83
- ${o&&An.active}`,children:l.jsx("span",{className:An.buttonName,children:t(i)})})},r)})})};Lo.displayName="ButtonsBar";Lo.propTypes={buttons:s.arrayOf(s.shape({isActive:s.bool,name:s.string,onClick:s.func})).isRequired};const Cf="_switchContainer_194wl_2",_f="_labelRight_194wl_9",Sf="_labelLeft_194wl_9",wf="_slider_194wl_28",Tf="_disabled_194wl_54",zt={switchContainer:Cf,labelRight:_f,labelLeft:Sf,switch:"_switch_194wl_2",slider:wf,disabled:Tf},Ro=({input:e,reactHookFormInstance:t,onChange:n,onoff:r=!0})=>{const{code:o,labelLeft:i,labelRight:a,defValue:c=!1,colorOn:u="#5A514D",disabled:d=!1,width:m=240}=e,{t:g}=se.useTranslation(),{control:y}=t||{},[h,b]=S.useState(c),f=_=>{b(_),n&&n(_)},x=(_,w)=>l.jsxs("div",{className:zt.switchContainer,style:{width:`${m}px`},children:[i&&l.jsx("span",{className:zt.labelLeft,style:{width:`${(m-74)/2}px`},children:g(i)}),l.jsxs("label",{className:`${zt.switch} ${d?zt.disabled:""}`,children:[l.jsx("input",{type:"checkbox",checked:!!_,onChange:()=>w(!_),disabled:d}),l.jsx("span",{className:zt.slider,style:{"--switch-thumb-color":r?_?u:"#ccc":u}})]}),a&&l.jsx("span",{className:zt.labelRight,style:{width:`${(m-74)/2}px`},children:g(a)})]});return t?l.jsx(mn,{name:o,control:y,defaultValue:c,render:({field:_})=>x(_.value,_.onChange)}):x(h,f)};Ro.displayName="Switch";Ro.propTypes={input:s.shape({code:s.string,labelLeft:s.string,labelRight:s.string,defValue:s.bool,colorOn:s.string,disabled:s.bool}),reactHookFormInstance:s.object,onChange:s.func};const kf="_overlay_1xyw2_2",jf="_popup_1xyw2_15",$f="_gif_1xyw2_25",Nf="_message_1xyw2_31",On={overlay:kf,popup:jf,gif:$f,message:Nf},Io=({gifSrc:e,message:t})=>l.jsx("div",{className:On.overlay,children:l.jsxs("div",{className:On.popup,children:[e&&l.jsx("img",{src:e,alt:"loading animation",className:On.gif}),t&&l.jsx("p",{className:On.message,children:t})]})});Io.displayName="Loader";Io.propTypes={gifSrc:s.string,message:s.string};const Ef="_container_1pl8d_3",Af="_burger_1pl8d_10",Of="_menu_1pl8d_21",Mf="_menuOpen_1pl8d_35",Lf="_menuClose_1pl8d_40",Rf="_list_1pl8d_46",If="_item_1pl8d_56",Df="_button_1pl8d_91",Qe={container:Ef,burger:Af,menu:Of,menuOpen:Mf,menuClose:Lf,list:Rf,item:If,button:Df},Do=({options:e,backgroundColor:t="#ffffff",textColor:n="#000000",iconColor:r="#000000"})=>{const[o,i]=S.useState(!1),a=()=>i(b=>!b),c=()=>i(!1),u=7,d=o?11:0,m=o?13:0,g=o?-11.51666:0,y=o?-13:0,h="0.35s";return l.jsxs("div",{className:Qe.container,children:[l.jsx("button",{onClick:a,className:Qe.burger,children:l.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[l.jsx("g",{style:{transform:`translateY(${d}px)`,transition:`transform ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"20",cy:"9",r:u,fill:r})}),l.jsx("g",{style:{transform:`translate(${m}px, ${g}px)`,transition:`transform ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"7",cy:"31.51666",r:u,fill:r})}),l.jsx("g",{style:{transform:`translate(${y}px, ${g}px)`,transition:`transform ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"33",cy:"31.51666",r:u,fill:r})}),l.jsx("g",{style:{opacity:o?1:0,transition:`opacity ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"20",cy:"20",r:"10",fill:r})}),l.jsxs("g",{stroke:t,strokeWidth:"2",strokeLinecap:"round",style:{opacity:o?1:0,transition:`opacity ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:[l.jsx("line",{x1:"17",y1:"17",x2:"23",y2:"23"}),l.jsx("line",{x1:"23",y1:"17",x2:"17",y2:"23"})]})]})}),l.jsx("div",{className:`${Qe.menu} ${o?Qe.menuOpen:Qe.menuClose}`,style:{backgroundColor:t,color:n},children:l.jsx("ul",{className:Qe.list,children:e.map((b,f)=>l.jsxs("li",{className:Qe.item,children:[b.url&&l.jsx(bi.NavLink,{to:b.url,className:({isActive:x})=>`${Qe.link} ${x?Qe.active:""}`,onClick:c,style:{color:n},children:b.name}),b.onclick&&l.jsx("button",{className:Qe.button,onClick:()=>{b.onclick(),c()},children:b.name}),b.component&&b.component]},f))})})]})};Do.displayName="BurgerMenu";Do.propTypes={options:s.array.isRequired,backgroundColor:s.string,textColor:s.string,iconColor:s.string};const Bf="_svgContainer_1rxoe_2",Pf="_svg_1rxoe_2",li={svgContainer:Bf,svg:Pf},Bo=({data:e,keys:t,colors:n,width:r="100%",height:o=300,margin:i={top:20,right:20,bottom:60,left:60},className:a="",showXAxisLabels:c=!0,showYAxisLabels:u=!0,showGrid:d=!0,xAxisTickRotation:m=-90,yAxisTickFormat:g=C=>C.toLocaleString("es-ES"),barPadding:y=.1,groupPadding:h=.05,animationDuration:b=750,onBarHover:f,onBarClick:x,title:_,xAxisLabel:w,yAxisLabel:N})=>{const C=S.useRef(),v=S.useRef(),[T,M]=S.useState({width:0,height:0});return S.useEffect(()=>{const j=()=>{if(v.current){const $=v.current.getBoundingClientRect().width;M({width:typeof r=="number"?r:$,height:o})}};return j(),window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[r,o]),S.useEffect(()=>{if(!e||e.length===0||T.width===0)return;const j=ce.select(C.current),$=T.width,P=T.height,D=$-i.left-i.right,p=P-i.top-i.bottom;if(D<=0||p<=0)return;const E=e.map(q=>q.anyo||q.year||q.x),k=t,R=ce.min(e,q=>ce.min(k,Z=>q[Z]))||0,V=ce.max(e,q=>ce.max(k,Z=>q[Z]))||0,I=ce.scaleBand().domain(E).rangeRound([0,D]).paddingInner(y),z=ce.scaleBand().domain(k).rangeRound([0,I.bandwidth()]).padding(h),G=ce.scaleLinear().domain([Math.min(0,R),V]).nice().rangeRound([p,0]),O=ce.scaleOrdinal().domain(k).range(Array.isArray(n)?n:Object.values(n||{}));j.selectAll("*").remove();const L=j.append("g").attr("transform",`translate(${i.left},${i.top})`);_&&j.append("text").attr("x",$/2).attr("y",i.top/2).attr("text-anchor","middle").style("font-size","16px").style("font-weight","bold").style("fill","#333").text(_),d&&L.append("g").attr("class","grid").selectAll("line").data(G.ticks()).enter().append("line").attr("x1",0).attr("x2",D).attr("y1",q=>G(q)).attr("y2",q=>G(q)).style("stroke","#e0e0e0").style("stroke-width",.5),c&&(L.append("g").attr("transform",`translate(0,${p})`).call(ce.axisBottom(I).tickSizeOuter(0)).attr("class","x-axis").selectAll("text").attr("transform",`translate(0,10)rotate(${m})`).style("text-anchor",m<0?"end":"middle").style("font-size","12px").style("fill","#605B56"),w&&L.append("text").attr("transform",`translate(${D/2}, ${p+i.bottom-5})`).style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(w)),u&&(L.append("g").call(ce.axisLeft(G).ticks(6).tickFormat(g)).attr("class","y-axis").call(q=>q.select(".domain").remove()),N&&L.append("text").attr("transform","rotate(-90)").attr("y",0-i.left).attr("x",0-p/2).attr("dy","1em").style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(N));const ee=L.append("g").selectAll(".bar-group").data(e).enter().append("g").attr("class","bar-group").attr("transform",q=>`translate(${I(q.anyo||q.year||q.x)},0)`).selectAll(".bar").data(q=>k.map(Z=>({key:Z,value:q[Z],data:q}))).enter().append("rect").attr("class","bar").attr("x",q=>z(q.key)).attr("y",p).attr("width",z.bandwidth()).attr("height",0).attr("fill",q=>O(q.key)).style("cursor",f||x?"pointer":"default");ee.transition().duration(b).attr("y",q=>G(Math.max(0,q.value))).attr("height",q=>Math.abs(G(q.value)-G(0))),f&&ee.on("mouseover",function(q,Z){ce.select(this).style("opacity",.8),f(q,Z)}).on("mouseout",function(q,Z){ce.select(this).style("opacity",1)}),x&&ee.on("click",x)},[e,t,n,T,i,y,h,c,u,d,m,g,b,f,x,_,w,N]),l.jsx("div",{ref:v,className:`${li.svgContainer} ${a}`,style:{width:r,height:o+i.top+i.bottom},children:l.jsx("svg",{ref:C,className:li.svg,width:T.width,height:T.height})})};Bo.displayName="Groupedbarchart";Bo.propTypes={data:s.arrayOf(s.object).isRequired,keys:s.arrayOf(s.string).isRequired,colors:s.oneOfType([s.arrayOf(s.string),s.object]),width:s.oneOfType([s.string,s.number]),height:s.number,margin:s.shape({top:s.number,right:s.number,bottom:s.number,left:s.number}),className:s.string,showXAxisLabels:s.bool,showYAxisLabels:s.bool,showGrid:s.bool,xAxisTickRotation:s.number,yAxisTickFormat:s.func,barPadding:s.number,groupPadding:s.number,animationDuration:s.number,onBarHover:s.func,onBarClick:s.func,title:s.string,xAxisLabel:s.string,yAxisLabel:s.string};const Ff="_svgContainer_7fkic_2",Vf="_svg_7fkic_2",ci={svgContainer:Ff,svg:Vf},Po=({data:e,keys:t,colors:n,lineData:r=null,width:o="100%",height:i=300,margin:a={top:20,right:20,bottom:90,left:60},className:c="",showXAxisLabels:u=!0,showYAxisLabels:d=!0,showGrid:m=!0,xAxisTickRotation:g=-90,yAxisTickFormat:y=P=>P.toLocaleString("es-ES"),barPadding:h=.4,animationDuration:b=750,onBarHover:f,onBarClick:x,title:_,xAxisLabel:w,yAxisLabel:N,stackOrder:C="reverse",showTooltip:v=!0,reverseKeys:T=!0,minBarSlotWidth:M=60,wrapXAxisLabels:j=!0,mode:$="stacked"})=>{const P=S.useRef(),D=S.useRef();S.useRef();const[p,E]=S.useState({containerWidth:0,height:0}),{t:k}=se.useTranslation();return S.useEffect(()=>{const R=()=>{if(D.current){const V=D.current.getBoundingClientRect().width;E({containerWidth:typeof o=="number"?o:V,height:i})}};return R(),window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[o,i]),S.useEffect(()=>{if(!e||e.length===0||p.containerWidth===0)return;const R=ce.select(P.current),{containerWidth:V,height:I}=p,z=V-a.left-a.right,G=e.length*M,O=Math.max(z,G),L=O+a.left+a.right,K=I-a.top-a.bottom;if(O<=0||K<=0)return;R.attr("width",L).attr("height",I).style("overflow","visible");const ee=$==="stacked"?T?[...t].reverse():t:[],q=U=>$==="single"?U.title:U.any||U.year||U.x,Z=[];e.forEach(U=>{const ae=q(U);if($==="single"){const me=Number(U.value)||0;Z.push({key:U.title,value:me,y0:Math.min(0,me),y1:Math.max(0,me),height:Math.abs(me),data:U,xKey:ae,color:U.color})}else{const me=ee.map(F=>({key:F,value:Number(U[F])||0,data:U})),_e=me.filter(F=>F.value<0),ke=me.filter(F=>F.value>=0);let Fe=0;_e.forEach(F=>{const H=Fe,Q=Fe+F.value,ie=Math.abs(Q-H);Z.push({key:F.key,value:F.value,y0:Math.max(H,Q),y1:Math.min(H,Q),height:ie,data:F.data,xKey:ae}),Fe=Q});let B=0;ke.forEach(F=>{const H=B,Q=B+F.value,ie=Q-H;Z.push({key:F.key,value:F.value,y0:Math.min(H,Q),y1:Math.max(H,Q),height:ie,data:F.data,xKey:ae}),B=Q})}});const re=[ce.min(Z,U=>Math.min(U.y0,U.y1))||0,ce.max(Z,U=>Math.max(U.y0,U.y1))||0];let ne=[0,0];r&&r.length>0&&(ne=[ce.min(r)||0,ce.max(r)||0]);const oe=[Math.min(re[0],ne[0]),Math.max(re[1],ne[1])],te=ce.scaleBand().domain(e.map(U=>q(U))).range([0,O]).padding(h),Y=ce.scaleLinear().domain([oe[0],oe[1]]).nice(6).range([K,0]),be=t?ce.scaleOrdinal().domain(t).range(Array.isArray(n)?n:Object.values(n||{})):null,W=$==="single"?U=>U.color||(Array.isArray(n)?n[0]:Object.values(n||{})[0])||"#888":U=>be(U.key),le=r&&r.length>0?e.map((U,ae)=>{const me=te(q(U))+te.bandwidth()/2,_e=Y(r[ae]||0);return{x:me,y:_e}}):[];R.selectAll("*").remove();const Ce=R.append("g").attr("transform",`translate(${a.left},${a.top})`);_&&R.append("text").attr("x",L/2).attr("y",a.top-4).attr("text-anchor","middle").style("font-size","16px").style("font-weight","bold").style("fill","#333").text(_),m&&Ce.append("g").attr("class","grid").selectAll("line").data(Y.ticks(6)).enter().append("line").attr("x1",0).attr("x2",O).attr("y1",U=>Y(U)).attr("y2",U=>Y(U)).style("stroke","#e0e0e0").style("stroke-width",.5);const ut=(U,ae=12)=>{if(!j||U.length<=ae)return[U];const me=Math.floor(U.length/2);let _e=me;for(let ke=me;ke>=0;ke--)if(U[ke]===" "){_e=ke;break}if(_e===me){for(let ke=me;ke<U.length;ke++)if(U[ke]===" "){_e=ke;break}}return _e===me&&(_e=me),[U.substring(0,_e),U.substring(_e+1)]};u&&(Ce.append("g").attr("class","x-axis").attr("transform",`translate(0, ${K})`).call(ce.axisBottom(te).tickSizeOuter(0)).selectAll("text").remove(),Ce.append("g").attr("class","x-axis-labels").attr("transform",`translate(0, ${K})`).selectAll(".x-label-group").data(e).enter().append("g").attr("class","x-label-group").attr("transform",_e=>`translate(${te(q(_e))+te.bandwidth()/2}, 0)`).each(function(_e){const ke=String(q(_e)),Fe=ut(ke),B=ce.select(this);if(Fe.length===1)B.append("text").attr("y",19).style("text-anchor",g===0?"middle":g<0?"end":"start").style("font-size","12px").style("fill","#605B56").attr("transform",g!==0?`rotate(${g} 0 15)`:null).text(Fe[0]);else{const Q=-(Fe.length*14/2)+14/2;Fe.forEach((ie,X)=>{B.append("text").attr("x",Q+X*14).attr("y",19).style("text-anchor","end").style("font-size","11px").style("fill","#605B56").attr("transform",`rotate(${g} ${Q+X*14} 15)`).text(ie)})}}),w&&Ce.append("text").attr("transform",`translate(${O/2}, ${K+a.bottom-5})`).style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(w)),d&&(Ce.append("g").attr("class","y-axis").call(ce.axisLeft(Y).ticks(6).tickFormat(y)).call(U=>U.select(".domain").remove()),Ce.append("g").attr("class","y-ticks").attr("transform",`translate(${O}, 0)`).call(ce.axisLeft(Y).ticks(6).tickSizeInner(O)).call(U=>U.select(".domain").remove()).call(U=>U.selectAll(".tick text").remove()),N&&Ce.append("text").attr("transform","rotate(-90)").attr("y",0-a.left).attr("x",0-K/2).attr("dy","1em").style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(N));let De;v&&(De=ce.select("body").append("div").attr("class","chart-tooltip").style("position","absolute").style("visibility","hidden").style("background","rgba(0, 0, 0, 0.8)").style("color","white").style("padding","8px").style("border-radius","4px").style("font-size","12px").style("pointer-events","none").style("z-index","1000"));const Ne=Ce.selectAll(".segment").data(Z,U=>`${U.xKey}-${U.key}`);Ne.exit().remove();const tt=Ne.enter().append("rect").attr("class","segment").attr("x",U=>te(U.xKey)).attr("width",te.bandwidth()).attr("y",U=>Y(0)).attr("height",0).attr("fill",U=>W(U)).style("cursor",f||x||v?"pointer":"default").merge(Ne);if(tt.transition().duration(b).attr("x",U=>te(U.xKey)).attr("y",U=>Math.min(Y(U.y0),Y(U.y1))).attr("height",U=>Math.abs(Y(U.y1)-Y(U.y0))),(v||f)&&tt.on("mouseover",function(U,ae){const me=ae.value;if(v&&De){const _e=$==="single"?ae.data.title:k(ae.key);De.style("visibility","visible").html($==="single"?`<strong>${_e}</strong><br/>${y(me)}`:`<strong>${_e}</strong><br/>${ae.xKey}<br/>${y(me)}`)}ce.select(this).style("opacity",.8),f&&f(U,{key:ae.key,value:me,data:ae.data})}).on("mousemove",function(U){v&&De&&De.style("top",U.pageY-10+"px").style("left",U.pageX+10+"px")}).on("mouseout",function(){v&&De&&De.style("visibility","hidden"),ce.select(this).style("opacity",1)}),x&&tt.on("click",function(U,ae){const me=ae.value;x(U,{key:ae.key,value:me,data:ae.data})}),le&&le.length>1){const U=ce.line().x(ae=>ae.x).y(ae=>ae.y).curve(ce.curveMonotoneX);Ce.append("path").datum(le).attr("class","line").attr("d",U).attr("fill","none").attr("stroke","#ff6b6b").attr("stroke-width",2).attr("stroke-linecap","round").attr("stroke-linejoin","round"),Ce.selectAll(".line-point").data(le).enter().append("circle").attr("class","line-point").attr("cx",ae=>ae.x).attr("cy",ae=>ae.y).attr("r",4).attr("fill","#ff6b6b").attr("stroke","white").attr("stroke-width",1)}return()=>{De&&De.remove()}},[e,t,n,r,p,a,h,u,d,m,g,y,b,f,x,_,w,N,C,v,T,j,$]),l.jsx("div",{ref:D,className:`${ci.svgContainer} ${c}`,style:{width:o,height:i+a.top+a.bottom,overflowX:"auto"},children:l.jsx("svg",{ref:P,className:ci.svg})})};Po.displayName="Stackedbarchart";Po.propTypes={data:s.arrayOf(s.object).isRequired,keys:s.arrayOf(s.string),colors:s.oneOfType([s.arrayOf(s.string),s.object]),lineData:s.arrayOf(s.number),width:s.oneOfType([s.string,s.number]),height:s.number,margin:s.shape({top:s.number,right:s.number,bottom:s.number,left:s.number}),className:s.string,showXAxisLabels:s.bool,showYAxisLabels:s.bool,showGrid:s.bool,xAxisTickRotation:s.number,yAxisTickFormat:s.func,barPadding:s.number,animationDuration:s.number,onBarHover:s.func,onBarClick:s.func,title:s.string,xAxisLabel:s.string,yAxisLabel:s.string,stackOrder:s.oneOf(["reverse","ascending","descending","insideOut","none"]),showTooltip:s.bool,reverseKeys:s.bool,minBarSlotWidth:s.number,wrapXAxisLabels:s.bool,mode:s.oneOf(["single","stacked"])};const zf="_externalContainer_1er0i_2",qf="_externalSintetic_1er0i_9",Wf="_titles_1er0i_13",Uf="_titleContainer_1er0i_22",Hf="_yearTitles_1er0i_36",Kf="_yearTitle_1er0i_36",Zf="_yearDatas_1er0i_50",Gf="_yearDataContainer_1er0i_58",Yf="_yearDataContent_1er0i_66",Xf="_bigNumber_1er0i_79",Qf="_circle_1er0i_82",Jf="_totalContainer_1er0i_99",ep="_total_1er0i_99",Be={externalContainer:zf,externalSintetic:qf,titles:Wf,titleContainer:Uf,yearTitles:Hf,yearTitle:Kf,yearDatas:Zf,yearDataContainer:Gf,yearDataContent:Yf,bigNumber:Xf,circle:Qf,totalContainer:Jf,total:ep},tp=e=>{if(e>=1e3||e<=-1e3)return parseInt(e.toFixed());if(e>=100||e<=-100)return parseFloat(e.toFixed(1));if(e>=10||e<=-10)return parseFloat(e.toFixed(2));if(e>0||e<0)return parseFloat(e.toFixed(3));if(e===0)return e},np=(e,t)=>{let n=0;return t.forEach(r=>{r[e]&&(n+=r[e])}),n},Fo=({data:e,keys:t,colors:n,locales:r,total:o=!1,years:i=!1,activeGraphics:a="ind",units:c={},translate:u,getTotal:d=np,columnWidth:m=50})=>{const g=u||(h=>h),y=h=>h==="demanda_red"||h==="reduccio_demanda_red"?(c.demanda||"").replace("(","").replace(")",""):c[h]||"";return l.jsxs("div",{className:`${Be.externalContainer} ${a==="sin"?Be.externalSintetic:""}`,children:[i===!0&&l.jsxs(l.Fragment,{children:[l.jsx("div",{}),l.jsx("div",{className:Be.yearTitles,children:e.map((h,b)=>l.jsx("div",{className:Be.yearTitle,style:{width:m},children:h.anyo},b))})]}),l.jsx("div",{className:Be.titles,children:t.map((h,b)=>l.jsxs("div",{className:Be.titleContainer,children:[g(r[h]),a!=="sin"&&l.jsx("span",{className:Be.circle,style:{background:n[h]}})]},b))}),o===!0&&l.jsx("div",{className:Be.totalContainer,children:t.map((h,b)=>{var f;return l.jsxs("div",{className:`${Be.total} ${d(h,e)>9999||d(h,e)<-9999?Be.bigNumber:""}`,children:[(f=d(h,e))==null?void 0:f.toLocaleString("es-ES")," ",y(h)]},b)})}),l.jsx("div",{className:Be.yearDatas,children:e.map((h,b)=>l.jsx("div",{className:Be.yearDataContainer,style:{width:m},children:t.map((f,x)=>{var _,w;return isNaN(h[f])?null:l.jsx("div",{className:`${Be.yearDataContent} ${h[f]>9999||h[f]<-9999?Be.bigNumber:""}`,children:h[f]<1e4||h[f]>-1e4?(_=tp(h[f]))==null?void 0:_.toLocaleString("es-ES"):(w=h[f])==null?void 0:w.toLocaleString("es-ES")},x)})},b))})]})};Fo.displayName="GraphicLegend";Fo.propTypes={data:s.arrayOf(s.shape({anyo:s.oneOfType([s.string,s.number]).isRequired})).isRequired,keys:s.arrayOf(s.string).isRequired,colors:s.objectOf(s.string).isRequired,locales:s.objectOf(s.string).isRequired,total:s.bool,years:s.bool,activeGraphics:s.oneOf(["ind","sin"]),units:s.objectOf(s.string),translate:s.func,getTotal:s.func,columnWidth:s.number};const Vo=({minValue:e=0,maxValue:t=100,value:n=0,title:r=!1,percent:o=!1,unit:i=!1,greenColor:a="#00CF1E",orangeColor:c="#FFAC00",redColor:u="#FF1E37",categoryRanges:d=null,fontColor:m="#9B9B9B",valueFontSize:g="24px"})=>{const y=[a,c,u],h=d&&d.length>0?d:y.map(()=>(t-e)/y.length),b=e+h.reduce((k,R)=>k+R,0);let f=n;f<e&&(f=e),f>b&&(f=b);const x=(f-e)/(b-e),_=270+x*180,w=o?Math.round(x*100):f,N=122,C=122,v=99,T=122,M=132,j=2,$=(k,R)=>{const V=k*Math.PI/180;return{x:N+R*Math.sin(V),y:C-R*Math.cos(V)}},P=(k,R)=>{const V=R-k>180?1:0,I=$(k,T),z=$(R,T),G=$(R,v),O=$(k,v);return`M ${I.x} ${I.y} A ${T} ${T} 0 ${V} 1 ${z.x} ${z.y} L ${G.x} ${G.y} A ${v} ${v} 0 ${V} 0 ${O.x} ${O.y} Z`},D=h.reduce((k,R)=>[...k,k[k.length-1]+R],[e]),p=y.map((k,R)=>{const V=(D[R]-e)/(b-e),I=(D[R+1]-e)/(b-e),z=270+V*180,G=270+I*180,O=z+(R>0?j/2:0),L=G-(R<y.length-1?j/2:0);return{color:k,path:P(O,L)}}),E=D.map(k=>{const V=270+(k-e)/(b-e)*180,{x:I,y:z}=$(V,M),G=I<N-4?"end":I>N+4?"start":"middle",O=z<C-4?"-2":"0.32em";return{value:Math.round(k),x:I,y:z,textAnchor:G,dy:O}});return l.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",fontFamily:"sans-serif"},children:[l.jsxs("svg",{width:"324",height:"170",viewBox:"-40 -30 324 170",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.map((k,R)=>l.jsx("path",{d:k.path,fill:k.color},R)),l.jsx("g",{transform:`rotate(${_} ${N} ${C})`,children:l.jsx("path",{d:`M ${N-1} 119.5V33`,stroke:"#605B56",strokeWidth:"2"})}),E.map((k,R)=>l.jsx("text",{x:k.x,y:k.y,dy:k.dy,textAnchor:k.textAnchor,fill:m,fontSize:"11",fontWeight:"600",children:k.value},R))]}),l.jsxs("div",{style:{fontSize:g,fontWeight:600,color:m,marginTop:"-8px"},children:[w,o&&"%",i&&i]}),r&&l.jsx("div",{style:{fontSize:"13px",color:"#8a8a8a",marginTop:"4px"},children:r})]})};Vo.displayName="SpeedGraphic";Vo.propTypes={minValue:s.number.isRequired,maxValue:s.number.isRequired,value:s.number.isRequired,percent:s.bool,title:s.string,unit:s.string,greenColor:s.string,orangeColor:s.string,redColor:s.string,categoryRanges:s.arrayOf(s.number),fontColor:s.string,valueFontSize:s.string};const Or="#ffffff",rp="#ffffff";function at(e,t,n,r){const o=(r-90)*Math.PI/180;return{x:e+n*Math.cos(o),y:t+n*Math.sin(o)}}function ui(e,t,n,r,o,i){if(Math.abs(i-o)>=359.99)return n===0?`M ${e-r} ${t} A ${r} ${r} 0 1 1 ${e+r} ${t} A ${r} ${r} 0 1 1 ${e-r} ${t} Z`:[`M ${e-r} ${t} A ${r} ${r} 0 1 1 ${e+r} ${t} A ${r} ${r} 0 1 1 ${e-r} ${t} Z`,`M ${e-n} ${t} A ${n} ${n} 0 1 0 ${e+n} ${t} A ${n} ${n} 0 1 0 ${e-n} ${t} Z`].join(" ");const a=at(e,t,r,o),c=at(e,t,r,i),u=i-o>180?1:0;if(n===0)return`M ${e} ${t} L ${a.x} ${a.y} A ${r} ${r} 0 ${u} 1 ${c.x} ${c.y} Z`;const d=at(e,t,n,i),m=at(e,t,n,o);return[`M ${a.x} ${a.y}`,`A ${r} ${r} 0 ${u} 1 ${c.x} ${c.y}`,`L ${d.x} ${d.y}`,`A ${n} ${n} 0 ${u} 0 ${m.x} ${m.y}`,"Z"].join(" ")}function op(e,t=0){const n=e.reduce((d,m)=>d+(m.value||0),0),r=e.length;if(n<=0||r===0)return[];const o=e.map(d=>d.value/n*100),i=Math.min(t,r>0?360/r-.01:0);let a=o.map(d=>d/100*360),c=new Array(r).fill(!1);if(i>0){let d=0,m=!0;for(;m&&d<r+2;){m=!1,d+=1;for(let g=0;g<r;g++)!c[g]&&a[g]<i&&(a[g]=i,c[g]=!0,m=!0);if(m){const g=a.reduce((f,x,_)=>c[_]?f+x:f,0),y=a.map((f,x)=>x).filter(f=>!c[f]),h=360-g,b=y.reduce((f,x)=>f+o[x]/100*360,0);y.forEach(f=>{const x=o[f]/100*360;a[f]=b>0?x/b*h:h/y.length})}}}let u=0;return e.map((d,m)=>{const g=u,y=u+a[m];return u=y,{...d,sa:g,ea:y,percent:o[m]}})}function ca(e){const t=Math.round(e*10)/10;return Number.isInteger(t)?t:t.toFixed(1)}function sp(e){return typeof e=="number"?e.toLocaleString():e}function di(e,t){return t?`${ca(e.percent)}%`:sp(e.value)}function fi(e,t,n,r,o){const i=n+(r-n)/2,a=at(e,t,o,i);return{tx:a.x-e,ty:a.y-t}}const zo=({type:e="cheese",data:t=[],title:n,size:r=260,donutThickness:o=56,gapWidth:i=3,gapColor:a,backgroundColor:c="transparent",fontColor:u="black",fontColorInside:d="white",containerStyles:m={},alignLeft:g=!1,valuesArePercentages:y=!0,minSliceAngle:h=8})=>{const[b,f]=S.useState(null),[x,_]=S.useState(()=>t.map(()=>!0)),w=t.map(I=>I.title).join("|"),[N,C]=S.useState(w);w!==N&&(C(w),_(t.map(()=>!0)));const v=x.filter(Boolean).length;function T(I){_(z=>{const G=z.filter(Boolean).length;if(z[I]&&G<=1)return z;const O=[...z];return O[I]=!O[I],O}),f(null)}const M=r/2,j=r/2,$=r/2-14,P=e==="donut"?$-o:0,D=e==="donut"?$-o/2:$*.62,p=S.useMemo(()=>t.reduce((I,z,G)=>(x[G]&&I.push({...z,origIndex:G}),I),[]),[t,x]),E=S.useMemo(()=>op(p,h),[p,h]),k=b!==null&&E.find(I=>I.origIndex===b)||null,R=E.some(I=>I.ea-I.sa>=359.99),V=a||(c==="transparent"?rp:c);return l.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:"4px",padding:"0px",background:c,borderRadius:"16px",fontFamily:"'Segoe UI', sans-serif",...m},children:[l.jsxs("div",{style:{minHeight:"40px",display:"flex",flexDirection:"column",gap:"2px"},children:[n&&l.jsx("h2",{style:{margin:0,color:u,fontSize:"22px",fontWeight:"700",letterSpacing:"-0.5px"},children:n}),l.jsx("div",{style:{height:"22px",display:"flex",alignItems:"center",gap:"8px",transition:"opacity 0.15s",opacity:k?1:0},children:k&&l.jsxs(l.Fragment,{children:[l.jsx("span",{style:{display:"inline-block",width:"10px",height:"10px",borderRadius:"50%",background:k.color||Or,flexShrink:0}}),l.jsxs("span",{style:{color:u,fontSize:"14px",fontWeight:"600"},children:[k.title," —"," ",di(k,y),!y&&` (${ca(k.percent)}%)`]})]})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g?"flex-start":"center",gap:"16px"},children:[l.jsxs("svg",{width:r,height:r,viewBox:`0 0 ${r} ${r}`,style:{overflow:"visible"},children:[E.map(I=>{const z=b===I.origIndex,{tx:G,ty:O}=z&&!R?fi(M,j,I.sa,I.ea,10):{tx:0,ty:0};return l.jsx("g",{transform:`translate(${G}, ${O})`,style:{transition:"transform 0.18s ease",pointerEvents:"none"},children:l.jsx("path",{d:ui(M,j,P,$,I.sa,I.ea),fill:I.color||Or,style:{filter:z?"brightness(1.25)":"brightness(1)",transition:"filter 0.18s ease"}})},I.origIndex)}),!R&&E.map(I=>{const z=at(M,j,$,I.sa),G=e==="cheese"?M:at(M,j,P,I.sa).x,O=e==="cheese"?j:at(M,j,P,I.sa).y;return l.jsx("line",{x1:G,y1:O,x2:z.x,y2:z.y,stroke:V,strokeWidth:i,strokeLinecap:"butt",style:{pointerEvents:"none"}},`gap-${I.origIndex}`)}),E.map(I=>{if(I.ea-I.sa<20)return null;const z=b===I.origIndex,{tx:G,ty:O}=z&&!R?fi(M,j,I.sa,I.ea,10):{tx:0,ty:0},L=I.sa+(I.ea-I.sa)/2,K=at(M,j,D,L);return l.jsx("text",{x:K.x+G,y:K.y+O,textAnchor:"middle",dominantBaseline:"middle",fill:d,fontSize:"14",fontWeight:"700",fontFamily:"'Segoe UI', sans-serif",pointerEvents:"none",style:{transition:"x 0.18s ease, y 0.18s ease"},children:di(I,y)},`lbl-${I.origIndex}`)}),E.map(I=>l.jsx("path",{d:ui(M,j,P,$,I.sa,I.ea),fill:"transparent",style:{cursor:"pointer"},onMouseEnter:()=>f(I.origIndex),onMouseLeave:()=>f(null)},`hit-${I.origIndex}`))]}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px 24px",justifyContent:g?"flex-start":"center"},children:t.map((I,z)=>{const G=x[z],O=G&&v<=1;return l.jsxs("div",{role:"button",tabIndex:0,"aria-pressed":G,"aria-label":`${G?"Ocultar":"Mostrar"} ${I.title}`,title:O?"Debe quedar al menos una categoría activa":G?"Ocultar del gráfico":"Mostrar en el gráfico",onClick:()=>T(z),onKeyDown:L=>{(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),T(z))},style:{display:"flex",alignItems:"center",gap:"8px",opacity:G&&(b===null||b===z)?1:.4,cursor:O?"not-allowed":"pointer",transition:"opacity 0.15s",userSelect:"none"},onMouseEnter:()=>G&&f(z),onMouseLeave:()=>f(null),children:[l.jsx("span",{style:{width:"32px",height:"14px",borderRadius:"3px",background:I.color||Or,flexShrink:0}}),l.jsx("span",{style:{color:u,fontSize:"13px",fontWeight:"400"},children:I.title})]},z)})})]})]})};zo.displayName="PieChart";zo.propTypes={type:s.oneOf(["cheese","donut"]),data:s.arrayOf(s.shape({value:s.number.isRequired,title:s.string.isRequired,color:s.string})).isRequired,title:s.string,size:s.number,donutThickness:s.number,gapWidth:s.number,gapColor:s.string,backgroundColor:s.string,fontColor:s.string,fontColorInside:s.string,containerStyles:s.object,alignLeft:s.bool,valuesArePercentages:s.bool,minSliceAngle:s.number};const pi=["#a8d8cf","#3bbfa0","#5dd4b8","#7ed4c2","#2aa88a"],qo=({data:e=[],title:t,backgroundColor:n="#0d3d4a",fontColor:r="#ffffff",barHeight:o=52,animated:i=!0,borderRadius:a,containerStyles:c={},fontColorInside:u="white",borderFontColorInside:d})=>{const[m,g]=S.useState(i?0:1);S.useEffect(()=>{if(!i)return;const b=requestAnimationFrame(()=>g(1));return()=>cancelAnimationFrame(b)},[i]);const y=Math.max(...e.map(b=>b.value),1),h=a??"6px";return l.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:"0px",background:n,borderRadius:"16px",fontFamily:"'Segoe UI', sans-serif",minWidth:"420px",...c},children:[t&&l.jsx("h2",{style:{margin:"0 0 20px 0",color:r,fontSize:"22px",fontWeight:"700",letterSpacing:"-0.4px"},children:t}),l.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"18px"},children:e.map((b,f)=>{const x=b.color||pi[f%pi.length],_=b.value/y*100*m;return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[l.jsx("span",{style:{color:r,fontSize:"14px",fontWeight:"400",opacity:.9},children:b.title}),l.jsxs("div",{style:{position:"relative",height:`${o}px`,background:"transparent",borderRadius:h,overflow:"hidden"},children:[l.jsx("div",{style:{position:"absolute",left:0,top:0,height:"100%",width:`${_}%`,background:x,borderRadius:h,transition:i?"width 0.8s cubic-bezier(0.16, 1, 0.3, 1)":"none"}}),l.jsx("span",{style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:u||n,fontSize:"18px",fontWeight:"700",pointerEvents:"none",letterSpacing:"-0.3px",...d?{WebkitTextStroke:`1px ${d}`,paintOrder:"stroke fill"}:{}},children:b.value})]})]},f)})})]})};qo.displayName="HorizontalBarChart";qo.propTypes={data:s.arrayOf(s.shape({title:s.string.isRequired,value:s.number.isRequired,color:s.string})),title:s.string,backgroundColor:s.string,fontColor:s.string,fontColorInside:s.string,borderFontColorInside:s.string,barHeight:s.number,animated:s.bool,borderRadius:s.oneOfType([s.string,s.number]),containerStyles:s.object};const mi=["#a8d8cf","#3bbfa0","#5dd4b8","#7ed4c2","#2aa88a"],Wo=({data:e=[],title:t,backgroundColor:n="black",fontColor:r="#ffffff",fontColorInside:o="#0d3d4a",borderFontColorInside:i,barWidth:a=52,maxBarHeight:c=200,animated:u=!0,separatorColor:d,containerStyles:m={}})=>{const[g,y]=S.useState(u?0:1);S.useEffect(()=>{if(!u)return;const N=requestAnimationFrame(()=>requestAnimationFrame(()=>y(1)));return()=>cancelAnimationFrame(N)},[u]);const h=Math.max(...e.map(N=>N.value),1),b=d||(r==="#ffffff"?"rgba(255,255,255,0.25)":"rgba(0,0,0,0.15)"),f=12,x=12,_=e.length*a+Math.max(0,e.length-1)*f,w={fontSize:"15px",fontWeight:"700",letterSpacing:"-0.3px",lineHeight:1,pointerEvents:"none",whiteSpace:"nowrap",...i?{WebkitTextStroke:`1px ${i}`,paintOrder:"stroke fill"}:{}};return l.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:"0",background:n,borderRadius:"16px",fontFamily:"'Segoe UI', sans-serif",...m},children:[t&&l.jsx("h2",{style:{margin:"0 0 24px 0",color:r,fontSize:"22px",fontWeight:"700",letterSpacing:"-0.4px"},children:t}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:0,overflow:"visible"},children:[l.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:`${f}px`,width:`${_}px`,height:`${c}px`},children:e.map((N,C)=>{const v=N.color||mi[C%mi.length],T=N.value===0,M=T?0:N.value/h*c*g;return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",width:`${a}px`,height:"100%"},children:T?l.jsx("span",{style:{...w,color:o,marginBottom:"6px"},children:N.value}):l.jsx("div",{style:{position:"relative",width:"100%",height:`${M}px`,background:v,borderRadius:"6px 6px 0 0",transition:u?"height 0.85s cubic-bezier(0.16, 1, 0.3, 1)":"none",display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"10px"},children:l.jsx("span",{style:{...w,color:o},children:N.value})})},C)})}),l.jsx("div",{style:{width:`${_+x*2}px`,marginLeft:`-${x}px`,height:"1.5px",background:b,borderRadius:"1px"}}),l.jsx("div",{style:{display:"flex",gap:`${f}px`,width:`${_}px`,marginTop:"10px"},children:e.map((N,C)=>l.jsx("div",{style:{width:`${a}px`,textAlign:"center",color:r,fontSize:"13px",fontWeight:"400",opacity:.8,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:N.title},C))})]})]})};Wo.displayName="VerticalBarChart";Wo.propTypes={data:s.arrayOf(s.shape({title:s.string.isRequired,value:s.number.isRequired,color:s.string})).isRequired,title:s.string,backgroundColor:s.string,fontColor:s.string,fontColorInside:s.string,borderFontColorInside:s.string,barWidth:s.number,maxBarHeight:s.number,animated:s.bool,separatorColor:s.string,containerStyles:s.object};const ip="_percentageBarContainer_lgkme_3",ap="_barContainer_lgkme_10",lp="_segment_lgkme_19",cp="_handle_lgkme_36",up="_labelsContainer_lgkme_68",dp="_labelItem_lgkme_73",fp="_labelsListContainer_lgkme_85",pp="_labelColor_lgkme_105",mp="_labelText_lgkme_114",hp="_labelValue_lgkme_122",gp="_labelTranslation_lgkme_126",Le={percentageBarContainer:ip,barContainer:ap,segment:lp,handle:cp,labelsContainer:up,labelItem:dp,labelsListContainer:fp,labelColor:pp,labelText:mp,labelValue:hp,labelTranslation:gp},yp=2,hi=e=>{const t=e.reduce((n,r)=>n+r.value,0);return t===0?e.map(()=>100/e.length):e.map(n=>n.value/t*100)},Mr=(e,t=100)=>e.map(n=>n.value/t*100),gi=(e,t)=>{try{const r=new Function("x",`return (${t})`)(e);return isNaN(r)?"N/A":r.toFixed(2)}catch{return"N/A"}},Uo=({items:e,showLabels:t="bar",showTranslations:n=!0,onChange:r,minPercentage:o=yp,maxValue:i=100,labelTextColor:a,labelValueColor:c})=>{const[u,d]=S.useState(()=>hi(e)),m=S.useRef(null),g=S.useRef(null);S.useEffect(()=>{e&&e.length>0&&d(hi(e))},[e]);const y=S.useCallback(f=>{if(!m.current||!g.current)return;const{dividerIndex:x}=m.current,_=g.current.getBoundingClientRect(),w=(f.touches?f.touches[0].clientX:f.clientX)-_.left,N=Math.max(0,Math.min(100,w/_.width*100));d(C=>{const v=[...C],T=C.slice(0,x).reduce((P,D)=>P+D,0),M=T+C[x]+C[x+1];let j=N-T,$=M-N;if(j<o&&(j=o,$=M-T-o),$<o&&($=o,j=M-T-o),v[x]=j,v[x+1]=$,r)try{const P=e.reduce((D,p)=>D+p.value,0);r(e.map((D,p)=>({...D,value:v[p]/100*P})))}catch(P){console.error("PercentageBar onChange error:",P)}return v})},[o,r,e]),h=S.useCallback(()=>{m.current&&(m.current=null,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",h),d(f=>{if(r){const x=e.reduce((_,w)=>_+w.value,0);r(e.map((_,w)=>({..._,value:f[w]/100*x})))}return f}))},[y,r,e]),b=(f,x)=>{x.preventDefault(),m.current={dividerIndex:f},document.addEventListener("mousemove",y),document.addEventListener("mouseup",h),document.addEventListener("touchmove",y,{passive:!1}),document.addEventListener("touchend",h)};return l.jsxs("div",{className:Le.percentageBarContainer,children:[l.jsx("div",{className:Le.barContainer,ref:g,children:e.map((f,x)=>{var _;return l.jsx("div",{className:Le.segment,style:{width:`${u[x]}%`,backgroundColor:f.color||"#ccc"},children:x>0&&l.jsx("div",{className:Le.handle,onMouseDown:w=>b(x-1,w),onTouchStart:w=>b(x-1,w),role:"slider","aria-label":`Divisor entre ${(_=e[x-1])==null?void 0:_.title} y ${f.title}`,"aria-valuenow":Math.round(u[x]),tabIndex:0})},f.id??x)})}),t==="bar"&&l.jsx("div",{className:Le.labelsContainer,children:e.map((f,x)=>l.jsxs("div",{className:Le.labelItem,style:{width:`${u[x]}%`},children:[l.jsx("span",{className:Le.labelColor,style:{backgroundColor:f.color}}),l.jsx("span",{className:Le.labelText,style:{color:a||"#fff"},children:f.title}),l.jsxs("span",{className:Le.labelValue,style:{color:c||"#fff"},children:[Mr(e,i)[x].toFixed(1),"%"]}),n&&f.translationFormula&&l.jsxs("span",{className:Le.labelTranslation,children:["(",gi(u[x],f.translationFormula),")"]})]},f.id??x))}),t==="list"&&l.jsx("div",{className:Le.labelsListContainer,children:e.map((f,x)=>l.jsxs("div",{className:Le.labelItem,children:[l.jsx("span",{className:Le.labelColor,style:{backgroundColor:f.color}}),l.jsx("span",{className:Le.labelText,children:f.title}),l.jsxs("span",{className:Le.labelValue,children:[Mr(e,i)[x].toFixed(1),"%"]}),n&&f.translationFormula&&l.jsxs("span",{className:Le.labelTranslation,children:["(",gi(Mr(e,i)[x],f.translationFormula),")"]})]},f.id??x))})]})};Uo.displayName="PercentageBar";Uo.propTypes={items:s.arrayOf(s.shape({id:s.oneOfType([s.string,s.number]),title:s.string.isRequired,value:s.number.isRequired,color:s.string.isRequired,translationFormula:s.string})).isRequired,showLabels:s.string,showTranslations:s.bool,onChange:s.func,minPercentage:s.number,maxValue:s.number,labelTextColor:s.string,labelValueColor:s.string};const bp="_overlay_1vbid_2",vp="_modal_1vbid_16",xp="_content_1vbid_28",Cp="_iconContainer_1vbid_36",_p="_iconSvg_1vbid_43",Sp="_textContainer_1vbid_48",wp="_title_1vbid_55",Tp="_message_1vbid_62",kp="_closeButton_1vbid_69",Je={overlay:bp,modal:vp,content:xp,iconContainer:Cp,iconSvg:_p,textContainer:Sp,title:wp,message:Tp,closeButton:kp},Ho=({isOpen:e,onClose:t,title:n,message:r,isError:o=!1,isSuccess:i=!1,customIcon:a=null,iconColor:c=null,textColor:u=null,backgroundColor:d=null,borderColor:m=null,showCloseButton:g=!0,autoClose:y=!1,autoCloseDelay:h=3e3})=>{if(S.useEffect(()=>{if(y&&e){const w=setTimeout(()=>{t()},h);return()=>clearTimeout(w)}},[y,e,t,h]),!e)return null;const b=()=>{const w={};return d&&(w.backgroundColor=d),m&&(w.borderColor=m),o&&!d?(w.backgroundColor="#fff5f5",w.borderColor="#feb2b2"):i&&!d&&(w.backgroundColor="#f0fff4",w.borderColor="#9ae6b4"),w},f=()=>{const w={};return u&&(w.color=u),o&&!u?w.color="#c53030":i&&!u&&(w.color="#276749"),w},x=()=>{const w={};return c&&(w.color=c),o&&!c?w.color="#c53030":i&&!c&&(w.color="#276749"),w},_=()=>a||(o?l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:Je.iconSvg,style:x(),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("circle",{cx:"12",cy:"12",r:"10"}),l.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),l.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}):i?l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:Je.iconSvg,style:x(),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),l.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}):null);return l.jsx("div",{className:Je.overlay,children:l.jsx("div",{className:Je.modal,style:b(),children:l.jsxs("div",{className:Je.content,children:[l.jsx("div",{className:Je.iconContainer,children:_()}),l.jsxs("div",{className:Je.textContainer,children:[n&&l.jsx("h3",{className:Je.title,style:f(),children:n}),l.jsx("p",{className:Je.message,style:f(),children:r})]}),g&&l.jsx("button",{className:Je.closeButton,onClick:t,"aria-label":"Close modal",style:f(),children:"✕"})]})})})};Ho.displayName="StatusModal";Ho.propTypes={isOpen:s.bool.isRequired,onClose:s.func.isRequired,title:s.string,message:s.string.isRequired,isError:s.bool,isSuccess:s.bool,customIcon:s.node,iconColor:s.string,textColor:s.string,backgroundColor:s.string,borderColor:s.string,showCloseButton:s.bool,autoClose:s.bool,autoCloseDelay:s.number};const jp="_header_13kbt_2",$p="_leftComponents_13kbt_13",Np="_centerComponents_13kbt_14",Ep="_rightComponents_13kbt_15",Ap="_componentsContainer_13kbt_32",wt={header:jp,leftComponents:$p,centerComponents:Np,rightComponents:Ep,componentsContainer:Ap},Ko=({cssProps:e,leftComponents:t=[],centerComponents:n=[],rightComponents:r=[],zIndex:o=10,height:i=60,backgroundColor:a="#605B56",isFooter:c=!1})=>l.jsxs("div",{className:wt.header,style:{...e,zIndex:o,height:i,backgroundColor:a,top:c?"auto":0,bottom:c?0:"auto"},children:[l.jsx("div",{className:wt.leftComponents,children:t.map((u,d)=>l.jsx("div",{className:wt.componentsContainer,children:u},d))}),l.jsx("div",{className:wt.centerComponents,children:n.map((u,d)=>l.jsx("div",{className:wt.componentsContainer,children:u},d))}),l.jsx("div",{className:wt.rightComponents,children:r.map((u,d)=>l.jsx("div",{className:wt.componentsContainer,children:u},d))})]});Ko.displayName="HeaderSection";Ko.propTypes={leftComponents:s.arrayOf(s.node),centerComponents:s.arrayOf(s.node),rightComponents:s.arrayOf(s.node),cssProps:s.object,zIndex:s.number,height:s.number,backgroundColor:s.string,isFooter:s.bool};const Op="_sidebar_1kaqu_2",Mp="_open_1kaqu_16",Lp="_content_1kaqu_20",Rp="_closeButton_1kaqu_25",Mn={sidebar:Op,open:Mp,content:Lp,closeButton:Rp},Ip="data:image/svg+xml,%3csvg%20width='19'%20height='19'%20viewBox='0%200%2019%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%203699'%3e%3cpath%20id='Vector%20223'%20d='M1%201L18.1566%2018.1566'%20stroke='%23605B56'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3cpath%20id='Vector%20224'%20d='M18.1575%201L1.00083%2018.1566'%20stroke='%23605B56'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/g%3e%3c/svg%3e",Zo=({width:e="300px",children:t,showRightBar:n,onCloseBar:r})=>{const o=()=>{r()};return l.jsx("div",{className:`${Mn.sidebar} ${n?Mn.open:""}`,style:{width:n?e:0},children:n&&l.jsxs("div",{className:Mn.content,children:[l.jsx("button",{className:Mn.closeButton,onClick:o,children:l.jsx("img",{src:Ip,alt:"Close Sidebar"})}),t]})})};Zo.displayName="RightSidebar";Zo.propTypes={width:s.string||s.number,children:s.node,showRightBar:s.bool,onCloseBar:s.func};exports.AmbitSelector=Gr;exports.BarChart=Kn;exports.BurgerMenu=Do;exports.ButtonsBar=Lo;exports.ButtonsList=Yr;exports.CategorySelector=Un;exports.DropdownList=ct;exports.EditAmbit=Si;exports.ErrorBoundary=_i;exports.ErrorMessage=At;exports.FiltersAmbit=ro;exports.Form=la;exports.GeneralButton=Zt;exports.Graphic=oo;exports.GraphicLegend=Fo;exports.Groupedbarchart=Bo;exports.HeaderSection=Ko;exports.HorizontalBarChart=qo;exports.IndicatorsList=ao;exports.LangSelector=lo;exports.Legend=co;exports.ListSelector=ko;exports.Loader=Io;exports.LogInButton=wo;exports.LogoApp=uo;exports.MapboxMap=fo;exports.MaplibreMap=po;exports.ModalAlert=Ao;exports.PercentageBar=Uo;exports.PieChart=zo;exports.RadioButtonInput=Eo;exports.RankingSlider=lr;exports.RightSidebar=Zo;exports.SectionBar=mo;exports.SelectInput=No;exports.SpeedGraphic=Vo;exports.Stackedbarchart=Po;exports.StatusModal=Ho;exports.StatusText=Mo;exports.Steps=Oo;exports.Switch=Ro;exports.TextInput=Wn;exports.TimeSlider=_o;exports.Tooltip=Ge;exports.TopNavMenu=So;exports.VerticalBarChart=Wo;
83
+ ${o&&An.active}`,children:l.jsx("span",{className:An.buttonName,children:t(i)})})},r)})})};Lo.displayName="ButtonsBar";Lo.propTypes={buttons:s.arrayOf(s.shape({isActive:s.bool,name:s.string,onClick:s.func})).isRequired};const Cf="_switchContainer_194wl_2",_f="_labelRight_194wl_9",Sf="_labelLeft_194wl_9",wf="_slider_194wl_28",Tf="_disabled_194wl_54",zt={switchContainer:Cf,labelRight:_f,labelLeft:Sf,switch:"_switch_194wl_2",slider:wf,disabled:Tf},Ro=({input:e,reactHookFormInstance:t,onChange:n,onoff:r=!0})=>{const{code:o,labelLeft:i,labelRight:a,defValue:c=!1,colorOn:u="#5A514D",disabled:d=!1,width:m=240}=e,{t:g}=se.useTranslation(),{control:y}=t||{},[h,b]=S.useState(c),f=_=>{b(_),n&&n(_)},x=(_,w)=>l.jsxs("div",{className:zt.switchContainer,style:{width:`${m}px`},children:[i&&l.jsx("span",{className:zt.labelLeft,style:{width:`${(m-74)/2}px`},children:g(i)}),l.jsxs("label",{className:`${zt.switch} ${d?zt.disabled:""}`,children:[l.jsx("input",{type:"checkbox",checked:!!_,onChange:()=>w(!_),disabled:d}),l.jsx("span",{className:zt.slider,style:{"--switch-thumb-color":r?_?u:"#ccc":u}})]}),a&&l.jsx("span",{className:zt.labelRight,style:{width:`${(m-74)/2}px`},children:g(a)})]});return t?l.jsx(mn,{name:o,control:y,defaultValue:c,render:({field:_})=>x(_.value,_.onChange)}):x(h,f)};Ro.displayName="Switch";Ro.propTypes={input:s.shape({code:s.string,labelLeft:s.string,labelRight:s.string,defValue:s.bool,colorOn:s.string,disabled:s.bool}),reactHookFormInstance:s.object,onChange:s.func};const kf="_overlay_1xyw2_2",jf="_popup_1xyw2_15",$f="_gif_1xyw2_25",Nf="_message_1xyw2_31",On={overlay:kf,popup:jf,gif:$f,message:Nf},Io=({gifSrc:e,message:t})=>l.jsx("div",{className:On.overlay,children:l.jsxs("div",{className:On.popup,children:[e&&l.jsx("img",{src:e,alt:"loading animation",className:On.gif}),t&&l.jsx("p",{className:On.message,children:t})]})});Io.displayName="Loader";Io.propTypes={gifSrc:s.string,message:s.string};const Ef="_container_1pl8d_3",Af="_burger_1pl8d_10",Of="_menu_1pl8d_21",Mf="_menuOpen_1pl8d_35",Lf="_menuClose_1pl8d_40",Rf="_list_1pl8d_46",If="_item_1pl8d_56",Df="_button_1pl8d_91",Qe={container:Ef,burger:Af,menu:Of,menuOpen:Mf,menuClose:Lf,list:Rf,item:If,button:Df},Do=({options:e,backgroundColor:t="#ffffff",textColor:n="#000000",iconColor:r="#000000"})=>{const[o,i]=S.useState(!1),a=()=>i(b=>!b),c=()=>i(!1),u=7,d=o?11:0,m=o?13:0,g=o?-11.51666:0,y=o?-13:0,h="0.35s";return l.jsxs("div",{className:Qe.container,children:[l.jsx("button",{onClick:a,className:Qe.burger,children:l.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[l.jsx("g",{style:{transform:`translateY(${d}px)`,transition:`transform ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"20",cy:"9",r:u,fill:r})}),l.jsx("g",{style:{transform:`translate(${m}px, ${g}px)`,transition:`transform ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"7",cy:"31.51666",r:u,fill:r})}),l.jsx("g",{style:{transform:`translate(${y}px, ${g}px)`,transition:`transform ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"33",cy:"31.51666",r:u,fill:r})}),l.jsx("g",{style:{opacity:o?1:0,transition:`opacity ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"20",cy:"20",r:"10",fill:r})}),l.jsxs("g",{stroke:t,strokeWidth:"2",strokeLinecap:"round",style:{opacity:o?1:0,transition:`opacity ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:[l.jsx("line",{x1:"17",y1:"17",x2:"23",y2:"23"}),l.jsx("line",{x1:"23",y1:"17",x2:"17",y2:"23"})]})]})}),l.jsx("div",{className:`${Qe.menu} ${o?Qe.menuOpen:Qe.menuClose}`,style:{backgroundColor:t,color:n},children:l.jsx("ul",{className:Qe.list,children:e.map((b,f)=>l.jsxs("li",{className:Qe.item,children:[b.url&&l.jsx(bi.NavLink,{to:b.url,className:({isActive:x})=>`${Qe.link} ${x?Qe.active:""}`,onClick:c,style:{color:n},children:b.name}),b.onclick&&l.jsx("button",{className:Qe.button,onClick:()=>{b.onclick(),c()},children:b.name}),b.component&&b.component]},f))})})]})};Do.displayName="BurgerMenu";Do.propTypes={options:s.array.isRequired,backgroundColor:s.string,textColor:s.string,iconColor:s.string};const Bf="_svgContainer_1rxoe_2",Pf="_svg_1rxoe_2",li={svgContainer:Bf,svg:Pf},Bo=({data:e,keys:t,colors:n,width:r="100%",height:o=300,margin:i={top:20,right:20,bottom:60,left:60},className:a="",showXAxisLabels:c=!0,showYAxisLabels:u=!0,showGrid:d=!0,xAxisTickRotation:m=-90,yAxisTickFormat:g=C=>C.toLocaleString("es-ES"),barPadding:y=.1,groupPadding:h=.05,animationDuration:b=750,onBarHover:f,onBarClick:x,title:_,xAxisLabel:w,yAxisLabel:N})=>{const C=S.useRef(),v=S.useRef(),[T,M]=S.useState({width:0,height:0});return S.useEffect(()=>{const j=()=>{if(v.current){const $=v.current.getBoundingClientRect().width;M({width:typeof r=="number"?r:$,height:o})}};return j(),window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[r,o]),S.useEffect(()=>{if(!e||e.length===0||T.width===0)return;const j=ce.select(C.current),$=T.width,P=T.height,D=$-i.left-i.right,p=P-i.top-i.bottom;if(D<=0||p<=0)return;const E=e.map(q=>q.anyo||q.year||q.x),k=t,R=ce.min(e,q=>ce.min(k,Z=>q[Z]))||0,V=ce.max(e,q=>ce.max(k,Z=>q[Z]))||0,I=ce.scaleBand().domain(E).rangeRound([0,D]).paddingInner(y),z=ce.scaleBand().domain(k).rangeRound([0,I.bandwidth()]).padding(h),G=ce.scaleLinear().domain([Math.min(0,R),V]).nice().rangeRound([p,0]),O=ce.scaleOrdinal().domain(k).range(Array.isArray(n)?n:Object.values(n||{}));j.selectAll("*").remove();const L=j.append("g").attr("transform",`translate(${i.left},${i.top})`);_&&j.append("text").attr("x",$/2).attr("y",i.top/2).attr("text-anchor","middle").style("font-size","16px").style("font-weight","bold").style("fill","#333").text(_),d&&L.append("g").attr("class","grid").selectAll("line").data(G.ticks()).enter().append("line").attr("x1",0).attr("x2",D).attr("y1",q=>G(q)).attr("y2",q=>G(q)).style("stroke","#e0e0e0").style("stroke-width",.5),c&&(L.append("g").attr("transform",`translate(0,${p})`).call(ce.axisBottom(I).tickSizeOuter(0)).attr("class","x-axis").selectAll("text").attr("transform",`translate(0,10)rotate(${m})`).style("text-anchor",m<0?"end":"middle").style("font-size","12px").style("fill","#605B56"),w&&L.append("text").attr("transform",`translate(${D/2}, ${p+i.bottom-5})`).style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(w)),u&&(L.append("g").call(ce.axisLeft(G).ticks(6).tickFormat(g)).attr("class","y-axis").call(q=>q.select(".domain").remove()),N&&L.append("text").attr("transform","rotate(-90)").attr("y",0-i.left).attr("x",0-p/2).attr("dy","1em").style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(N));const ee=L.append("g").selectAll(".bar-group").data(e).enter().append("g").attr("class","bar-group").attr("transform",q=>`translate(${I(q.anyo||q.year||q.x)},0)`).selectAll(".bar").data(q=>k.map(Z=>({key:Z,value:q[Z],data:q}))).enter().append("rect").attr("class","bar").attr("x",q=>z(q.key)).attr("y",p).attr("width",z.bandwidth()).attr("height",0).attr("fill",q=>O(q.key)).style("cursor",f||x?"pointer":"default");ee.transition().duration(b).attr("y",q=>G(Math.max(0,q.value))).attr("height",q=>Math.abs(G(q.value)-G(0))),f&&ee.on("mouseover",function(q,Z){ce.select(this).style("opacity",.8),f(q,Z)}).on("mouseout",function(q,Z){ce.select(this).style("opacity",1)}),x&&ee.on("click",x)},[e,t,n,T,i,y,h,c,u,d,m,g,b,f,x,_,w,N]),l.jsx("div",{ref:v,className:`${li.svgContainer} ${a}`,style:{width:r,height:o+i.top+i.bottom},children:l.jsx("svg",{ref:C,className:li.svg,width:T.width,height:T.height})})};Bo.displayName="Groupedbarchart";Bo.propTypes={data:s.arrayOf(s.object).isRequired,keys:s.arrayOf(s.string).isRequired,colors:s.oneOfType([s.arrayOf(s.string),s.object]),width:s.oneOfType([s.string,s.number]),height:s.number,margin:s.shape({top:s.number,right:s.number,bottom:s.number,left:s.number}),className:s.string,showXAxisLabels:s.bool,showYAxisLabels:s.bool,showGrid:s.bool,xAxisTickRotation:s.number,yAxisTickFormat:s.func,barPadding:s.number,groupPadding:s.number,animationDuration:s.number,onBarHover:s.func,onBarClick:s.func,title:s.string,xAxisLabel:s.string,yAxisLabel:s.string};const Ff="_svgContainer_7fkic_2",Vf="_svg_7fkic_2",ci={svgContainer:Ff,svg:Vf},Po=({data:e,keys:t,colors:n,lineData:r=null,width:o="100%",height:i=300,margin:a={top:20,right:20,bottom:90,left:60},className:c="",showXAxisLabels:u=!0,showYAxisLabels:d=!0,showGrid:m=!0,xAxisTickRotation:g=-90,yAxisTickFormat:y=P=>P.toLocaleString("es-ES"),barPadding:h=.4,animationDuration:b=750,onBarHover:f,onBarClick:x,title:_,xAxisLabel:w,yAxisLabel:N,stackOrder:C="reverse",showTooltip:v=!0,reverseKeys:T=!0,minBarSlotWidth:M=60,wrapXAxisLabels:j=!0,mode:$="stacked"})=>{const P=S.useRef(),D=S.useRef();S.useRef();const[p,E]=S.useState({containerWidth:0,height:0}),{t:k}=se.useTranslation();return S.useEffect(()=>{const R=()=>{if(D.current){const V=D.current.getBoundingClientRect().width;E({containerWidth:typeof o=="number"?o:V,height:i})}};return R(),window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[o,i]),S.useEffect(()=>{if(!e||e.length===0||p.containerWidth===0)return;const R=ce.select(P.current),{containerWidth:V,height:I}=p,z=V-a.left-a.right,G=e.length*M,O=Math.max(z,G),L=O+a.left+a.right,K=I-a.top-a.bottom;if(O<=0||K<=0)return;R.attr("width",L).attr("height",I).style("overflow","visible");const ee=$==="stacked"?T?[...t].reverse():t:[],q=U=>$==="single"?U.title:U.any||U.year||U.x,Z=[];e.forEach(U=>{const ae=q(U);if($==="single"){const me=Number(U.value)||0;Z.push({key:U.title,value:me,y0:Math.min(0,me),y1:Math.max(0,me),height:Math.abs(me),data:U,xKey:ae,color:U.color})}else{const me=ee.map(F=>({key:F,value:Number(U[F])||0,data:U})),_e=me.filter(F=>F.value<0),ke=me.filter(F=>F.value>=0);let Fe=0;_e.forEach(F=>{const H=Fe,Q=Fe+F.value,ie=Math.abs(Q-H);Z.push({key:F.key,value:F.value,y0:Math.max(H,Q),y1:Math.min(H,Q),height:ie,data:F.data,xKey:ae}),Fe=Q});let B=0;ke.forEach(F=>{const H=B,Q=B+F.value,ie=Q-H;Z.push({key:F.key,value:F.value,y0:Math.min(H,Q),y1:Math.max(H,Q),height:ie,data:F.data,xKey:ae}),B=Q})}});const re=[ce.min(Z,U=>Math.min(U.y0,U.y1))||0,ce.max(Z,U=>Math.max(U.y0,U.y1))||0];let ne=[0,0];r&&r.length>0&&(ne=[ce.min(r)||0,ce.max(r)||0]);const oe=[Math.min(re[0],ne[0]),Math.max(re[1],ne[1])],te=ce.scaleBand().domain(e.map(U=>q(U))).range([0,O]).padding(h),Y=ce.scaleLinear().domain([oe[0],oe[1]]).nice(6).range([K,0]),be=t?ce.scaleOrdinal().domain(t).range(Array.isArray(n)?n:Object.values(n||{})):null,W=$==="single"?U=>U.color||(Array.isArray(n)?n[0]:Object.values(n||{})[0])||"#888":U=>be(U.key),le=r&&r.length>0?e.map((U,ae)=>{const me=te(q(U))+te.bandwidth()/2,_e=Y(r[ae]||0);return{x:me,y:_e}}):[];R.selectAll("*").remove();const Ce=R.append("g").attr("transform",`translate(${a.left},${a.top})`);_&&R.append("text").attr("x",L/2).attr("y",a.top-4).attr("text-anchor","middle").style("font-size","16px").style("font-weight","bold").style("fill","#333").text(_),m&&Ce.append("g").attr("class","grid").selectAll("line").data(Y.ticks(6)).enter().append("line").attr("x1",0).attr("x2",O).attr("y1",U=>Y(U)).attr("y2",U=>Y(U)).style("stroke","#e0e0e0").style("stroke-width",.5);const ut=(U,ae=12)=>{if(!j||U.length<=ae)return[U];const me=Math.floor(U.length/2);let _e=me;for(let ke=me;ke>=0;ke--)if(U[ke]===" "){_e=ke;break}if(_e===me){for(let ke=me;ke<U.length;ke++)if(U[ke]===" "){_e=ke;break}}return _e===me&&(_e=me),[U.substring(0,_e),U.substring(_e+1)]};u&&(Ce.append("g").attr("class","x-axis").attr("transform",`translate(0, ${K})`).call(ce.axisBottom(te).tickSizeOuter(0)).selectAll("text").remove(),Ce.append("g").attr("class","x-axis-labels").attr("transform",`translate(0, ${K})`).selectAll(".x-label-group").data(e).enter().append("g").attr("class","x-label-group").attr("transform",_e=>`translate(${te(q(_e))+te.bandwidth()/2}, 0)`).each(function(_e){const ke=String(q(_e)),Fe=ut(ke),B=ce.select(this);if(Fe.length===1)B.append("text").attr("y",19).style("text-anchor",g===0?"middle":g<0?"end":"start").style("font-size","12px").style("fill","#605B56").attr("transform",g!==0?`rotate(${g} 0 15)`:null).text(Fe[0]);else{const Q=-(Fe.length*14/2)+14/2;Fe.forEach((ie,X)=>{B.append("text").attr("x",Q+X*14).attr("y",19).style("text-anchor","end").style("font-size","11px").style("fill","#605B56").attr("transform",`rotate(${g} ${Q+X*14} 15)`).text(ie)})}}),w&&Ce.append("text").attr("transform",`translate(${O/2}, ${K+a.bottom-5})`).style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(w)),d&&(Ce.append("g").attr("class","y-axis").call(ce.axisLeft(Y).ticks(6).tickFormat(y)).call(U=>U.select(".domain").remove()),Ce.append("g").attr("class","y-ticks").attr("transform",`translate(${O}, 0)`).call(ce.axisLeft(Y).ticks(6).tickSizeInner(O)).call(U=>U.select(".domain").remove()).call(U=>U.selectAll(".tick text").remove()),N&&Ce.append("text").attr("transform","rotate(-90)").attr("y",0-a.left).attr("x",0-K/2).attr("dy","1em").style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(N));let De;v&&(De=ce.select("body").append("div").attr("class","chart-tooltip").style("position","absolute").style("visibility","hidden").style("background","rgba(0, 0, 0, 0.8)").style("color","white").style("padding","8px").style("border-radius","4px").style("font-size","12px").style("pointer-events","none").style("z-index","1000"));const Ne=Ce.selectAll(".segment").data(Z,U=>`${U.xKey}-${U.key}`);Ne.exit().remove();const tt=Ne.enter().append("rect").attr("class","segment").attr("x",U=>te(U.xKey)).attr("width",te.bandwidth()).attr("y",U=>Y(0)).attr("height",0).attr("fill",U=>W(U)).style("cursor",f||x||v?"pointer":"default").merge(Ne);if(tt.transition().duration(b).attr("x",U=>te(U.xKey)).attr("y",U=>Math.min(Y(U.y0),Y(U.y1))).attr("height",U=>Math.abs(Y(U.y1)-Y(U.y0))),(v||f)&&tt.on("mouseover",function(U,ae){const me=ae.value;if(v&&De){const _e=$==="single"?ae.data.title:k(ae.key);De.style("visibility","visible").html($==="single"?`<strong>${_e}</strong><br/>${y(me)}`:`<strong>${_e}</strong><br/>${ae.xKey}<br/>${y(me)}`)}ce.select(this).style("opacity",.8),f&&f(U,{key:ae.key,value:me,data:ae.data})}).on("mousemove",function(U){v&&De&&De.style("top",U.pageY-10+"px").style("left",U.pageX+10+"px")}).on("mouseout",function(){v&&De&&De.style("visibility","hidden"),ce.select(this).style("opacity",1)}),x&&tt.on("click",function(U,ae){const me=ae.value;x(U,{key:ae.key,value:me,data:ae.data})}),le&&le.length>1){const U=ce.line().x(ae=>ae.x).y(ae=>ae.y).curve(ce.curveMonotoneX);Ce.append("path").datum(le).attr("class","line").attr("d",U).attr("fill","none").attr("stroke","#ff6b6b").attr("stroke-width",2).attr("stroke-linecap","round").attr("stroke-linejoin","round"),Ce.selectAll(".line-point").data(le).enter().append("circle").attr("class","line-point").attr("cx",ae=>ae.x).attr("cy",ae=>ae.y).attr("r",4).attr("fill","#ff6b6b").attr("stroke","white").attr("stroke-width",1)}return()=>{De&&De.remove()}},[e,t,n,r,p,a,h,u,d,m,g,y,b,f,x,_,w,N,C,v,T,j,$]),l.jsx("div",{ref:D,className:`${ci.svgContainer} ${c}`,style:{width:o,height:i+a.top+a.bottom,overflowX:"auto"},children:l.jsx("svg",{ref:P,className:ci.svg})})};Po.displayName="Stackedbarchart";Po.propTypes={data:s.arrayOf(s.object).isRequired,keys:s.arrayOf(s.string),colors:s.oneOfType([s.arrayOf(s.string),s.object]),lineData:s.arrayOf(s.number),width:s.oneOfType([s.string,s.number]),height:s.number,margin:s.shape({top:s.number,right:s.number,bottom:s.number,left:s.number}),className:s.string,showXAxisLabels:s.bool,showYAxisLabels:s.bool,showGrid:s.bool,xAxisTickRotation:s.number,yAxisTickFormat:s.func,barPadding:s.number,animationDuration:s.number,onBarHover:s.func,onBarClick:s.func,title:s.string,xAxisLabel:s.string,yAxisLabel:s.string,stackOrder:s.oneOf(["reverse","ascending","descending","insideOut","none"]),showTooltip:s.bool,reverseKeys:s.bool,minBarSlotWidth:s.number,wrapXAxisLabels:s.bool,mode:s.oneOf(["single","stacked"])};const zf="_externalContainer_1er0i_2",qf="_externalSintetic_1er0i_9",Wf="_titles_1er0i_13",Uf="_titleContainer_1er0i_22",Hf="_yearTitles_1er0i_36",Kf="_yearTitle_1er0i_36",Zf="_yearDatas_1er0i_50",Gf="_yearDataContainer_1er0i_58",Yf="_yearDataContent_1er0i_66",Xf="_bigNumber_1er0i_79",Qf="_circle_1er0i_82",Jf="_totalContainer_1er0i_99",ep="_total_1er0i_99",Be={externalContainer:zf,externalSintetic:qf,titles:Wf,titleContainer:Uf,yearTitles:Hf,yearTitle:Kf,yearDatas:Zf,yearDataContainer:Gf,yearDataContent:Yf,bigNumber:Xf,circle:Qf,totalContainer:Jf,total:ep},tp=e=>{if(e>=1e3||e<=-1e3)return parseInt(e.toFixed());if(e>=100||e<=-100)return parseFloat(e.toFixed(1));if(e>=10||e<=-10)return parseFloat(e.toFixed(2));if(e>0||e<0)return parseFloat(e.toFixed(3));if(e===0)return e},np=(e,t)=>{let n=0;return t.forEach(r=>{r[e]&&(n+=r[e])}),n},Fo=({data:e,keys:t,colors:n,locales:r,total:o=!1,years:i=!1,activeGraphics:a="ind",units:c={},translate:u,getTotal:d=np,columnWidth:m=50})=>{const g=u||(h=>h),y=h=>h==="demanda_red"||h==="reduccio_demanda_red"?(c.demanda||"").replace("(","").replace(")",""):c[h]||"";return l.jsxs("div",{className:`${Be.externalContainer} ${a==="sin"?Be.externalSintetic:""}`,children:[i===!0&&l.jsxs(l.Fragment,{children:[l.jsx("div",{}),l.jsx("div",{className:Be.yearTitles,children:e.map((h,b)=>l.jsx("div",{className:Be.yearTitle,style:{width:m},children:h.anyo},b))})]}),l.jsx("div",{className:Be.titles,children:t.map((h,b)=>l.jsxs("div",{className:Be.titleContainer,children:[g(r[h]),a!=="sin"&&l.jsx("span",{className:Be.circle,style:{background:n[h]}})]},b))}),o===!0&&l.jsx("div",{className:Be.totalContainer,children:t.map((h,b)=>{var f;return l.jsxs("div",{className:`${Be.total} ${d(h,e)>9999||d(h,e)<-9999?Be.bigNumber:""}`,children:[(f=d(h,e))==null?void 0:f.toLocaleString("es-ES")," ",y(h)]},b)})}),l.jsx("div",{className:Be.yearDatas,children:e.map((h,b)=>l.jsx("div",{className:Be.yearDataContainer,style:{width:m},children:t.map((f,x)=>{var _,w;return isNaN(h[f])?null:l.jsx("div",{className:`${Be.yearDataContent} ${h[f]>9999||h[f]<-9999?Be.bigNumber:""}`,children:h[f]<1e4||h[f]>-1e4?(_=tp(h[f]))==null?void 0:_.toLocaleString("es-ES"):(w=h[f])==null?void 0:w.toLocaleString("es-ES")},x)})},b))})]})};Fo.displayName="GraphicLegend";Fo.propTypes={data:s.arrayOf(s.shape({anyo:s.oneOfType([s.string,s.number]).isRequired})).isRequired,keys:s.arrayOf(s.string).isRequired,colors:s.objectOf(s.string).isRequired,locales:s.objectOf(s.string).isRequired,total:s.bool,years:s.bool,activeGraphics:s.oneOf(["ind","sin"]),units:s.objectOf(s.string),translate:s.func,getTotal:s.func,columnWidth:s.number};const Vo=({minValue:e=0,maxValue:t=100,value:n=0,title:r=!1,percent:o=!1,unit:i=!1,greenColor:a="#00CF1E",orangeColor:c="#FFAC00",redColor:u="#FF1E37",categoryRanges:d=null,fontColor:m="#9B9B9B",valueFontSize:g="24px"})=>{const y=[a,c,u],h=d&&d.length>0?d:y.map(()=>(t-e)/y.length),b=e+h.reduce((k,R)=>k+R,0);let f=n;f<e&&(f=e),f>b&&(f=b);const x=(f-e)/(b-e),_=270+x*180,w=o?Math.round(x*100):f,N=122,C=122,v=99,T=122,M=132,j=2,$=(k,R)=>{const V=k*Math.PI/180;return{x:N+R*Math.sin(V),y:C-R*Math.cos(V)}},P=(k,R)=>{const V=R-k>180?1:0,I=$(k,T),z=$(R,T),G=$(R,v),O=$(k,v);return`M ${I.x} ${I.y} A ${T} ${T} 0 ${V} 1 ${z.x} ${z.y} L ${G.x} ${G.y} A ${v} ${v} 0 ${V} 0 ${O.x} ${O.y} Z`},D=h.reduce((k,R)=>[...k,k[k.length-1]+R],[e]),p=y.map((k,R)=>{const V=(D[R]-e)/(b-e),I=(D[R+1]-e)/(b-e),z=270+V*180,G=270+I*180,O=z+(R>0?j/2:0),L=G-(R<y.length-1?j/2:0);return{color:k,path:P(O,L)}}),E=D.map(k=>{const V=270+(k-e)/(b-e)*180,{x:I,y:z}=$(V,M),G=I<N-4?"end":I>N+4?"start":"middle",O=z<C-4?"-2":"0.32em";return{value:Math.round(k),x:I,y:z,textAnchor:G,dy:O}});return l.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",fontFamily:"sans-serif"},children:[l.jsxs("svg",{width:"324",height:"170",viewBox:"-40 -30 324 170",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.map((k,R)=>l.jsx("path",{d:k.path,fill:k.color},R)),l.jsx("g",{transform:`rotate(${_} ${N} ${C})`,children:l.jsx("path",{d:`M ${N-1} 119.5V33`,stroke:"#605B56",strokeWidth:"2"})}),E.map((k,R)=>l.jsx("text",{x:k.x,y:k.y,dy:k.dy,textAnchor:k.textAnchor,fill:m,fontSize:"11",fontWeight:"600",children:k.value},R))]}),l.jsxs("div",{style:{fontSize:g,fontWeight:600,color:m,marginTop:"-8px"},children:[w,o&&"%",i&&i]}),r&&l.jsx("div",{style:{fontSize:"13px",color:"#8a8a8a",marginTop:"4px"},children:r})]})};Vo.displayName="SpeedGraphic";Vo.propTypes={minValue:s.number.isRequired,maxValue:s.number.isRequired,value:s.number.isRequired,percent:s.bool,title:s.string,unit:s.string,greenColor:s.string,orangeColor:s.string,redColor:s.string,categoryRanges:s.arrayOf(s.number),fontColor:s.string,valueFontSize:s.string};const Or="#ffffff",rp="#ffffff";function at(e,t,n,r){const o=(r-90)*Math.PI/180;return{x:e+n*Math.cos(o),y:t+n*Math.sin(o)}}function ui(e,t,n,r,o,i){if(Math.abs(i-o)>=359.99)return n===0?`M ${e-r} ${t} A ${r} ${r} 0 1 1 ${e+r} ${t} A ${r} ${r} 0 1 1 ${e-r} ${t} Z`:[`M ${e-r} ${t} A ${r} ${r} 0 1 1 ${e+r} ${t} A ${r} ${r} 0 1 1 ${e-r} ${t} Z`,`M ${e-n} ${t} A ${n} ${n} 0 1 0 ${e+n} ${t} A ${n} ${n} 0 1 0 ${e-n} ${t} Z`].join(" ");const a=at(e,t,r,o),c=at(e,t,r,i),u=i-o>180?1:0;if(n===0)return`M ${e} ${t} L ${a.x} ${a.y} A ${r} ${r} 0 ${u} 1 ${c.x} ${c.y} Z`;const d=at(e,t,n,i),m=at(e,t,n,o);return[`M ${a.x} ${a.y}`,`A ${r} ${r} 0 ${u} 1 ${c.x} ${c.y}`,`L ${d.x} ${d.y}`,`A ${n} ${n} 0 ${u} 0 ${m.x} ${m.y}`,"Z"].join(" ")}function op(e,t=0){const n=e.reduce((d,m)=>d+(m.value||0),0),r=e.length;if(n<=0||r===0)return[];const o=e.map(d=>d.value/n*100),i=Math.min(t,r>0?360/r-.01:0);let a=o.map(d=>d/100*360),c=new Array(r).fill(!1);if(i>0){let d=0,m=!0;for(;m&&d<r+2;){m=!1,d+=1;for(let g=0;g<r;g++)!c[g]&&a[g]<i&&(a[g]=i,c[g]=!0,m=!0);if(m){const g=a.reduce((f,x,_)=>c[_]?f+x:f,0),y=a.map((f,x)=>x).filter(f=>!c[f]),h=360-g,b=y.reduce((f,x)=>f+o[x]/100*360,0);y.forEach(f=>{const x=o[f]/100*360;a[f]=b>0?x/b*h:h/y.length})}}}let u=0;return e.map((d,m)=>{const g=u,y=u+a[m];return u=y,{...d,sa:g,ea:y,percent:o[m]}})}function ca(e){const t=Math.round(e*10)/10;return Number.isInteger(t)?t:t.toFixed(1)}function sp(e){return typeof e=="number"?e.toLocaleString():e}function di(e,t){return t?`${ca(e.percent)}%`:sp(e.value)}function fi(e,t,n,r,o){const i=n+(r-n)/2,a=at(e,t,o,i);return{tx:a.x-e,ty:a.y-t}}const zo=({type:e="cheese",data:t=[],title:n,size:r=260,donutThickness:o=56,gapWidth:i=3,gapColor:a,backgroundColor:c="transparent",fontColor:u="black",fontColorInside:d="white",containerStyles:m={},alignLeft:g=!1,valuesArePercentages:y=!0,minSliceAngle:h=8})=>{const[b,f]=S.useState(null),[x,_]=S.useState(()=>t.map(()=>!0)),w=t.map(I=>I.title).join("|"),[N,C]=S.useState(w);w!==N&&(C(w),_(t.map(()=>!0)));const v=x.filter(Boolean).length;function T(I){_(z=>{const G=z.filter(Boolean).length;if(z[I]&&G<=1)return z;const O=[...z];return O[I]=!O[I],O}),f(null)}const M=r/2,j=r/2,$=r/2-14,P=e==="donut"?$-o:0,D=e==="donut"?$-o/2:$*.62,p=S.useMemo(()=>t.reduce((I,z,G)=>(x[G]&&I.push({...z,origIndex:G}),I),[]),[t,x]),E=S.useMemo(()=>op(p,h),[p,h]),k=b!==null&&E.find(I=>I.origIndex===b)||null,R=E.some(I=>I.ea-I.sa>=359.99),V=a||(c==="transparent"?rp:c);return l.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:"4px",padding:"0px",background:c,borderRadius:"16px",fontFamily:"'Segoe UI', sans-serif",...m},children:[l.jsxs("div",{style:{minHeight:"40px",display:"flex",flexDirection:"column",gap:"2px"},children:[n&&l.jsx("h2",{style:{margin:0,color:u,fontSize:"22px",fontWeight:"700",letterSpacing:"-0.5px"},children:n}),l.jsx("div",{style:{height:"22px",display:"flex",alignItems:"center",gap:"8px",transition:"opacity 0.15s",opacity:k?1:0},children:k&&l.jsxs(l.Fragment,{children:[l.jsx("span",{style:{display:"inline-block",width:"10px",height:"10px",borderRadius:"50%",background:k.color||Or,flexShrink:0}}),l.jsxs("span",{style:{color:u,fontSize:"14px",fontWeight:"600"},children:[k.title," —"," ",di(k,y),!y&&` (${ca(k.percent)}%)`]})]})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g?"flex-start":"center",gap:"16px"},children:[l.jsxs("svg",{width:r,height:r,viewBox:`0 0 ${r} ${r}`,style:{overflow:"visible"},children:[E.map(I=>{const z=b===I.origIndex,{tx:G,ty:O}=z&&!R?fi(M,j,I.sa,I.ea,10):{tx:0,ty:0};return l.jsx("g",{transform:`translate(${G}, ${O})`,style:{transition:"transform 0.18s ease",pointerEvents:"none"},children:l.jsx("path",{d:ui(M,j,P,$,I.sa,I.ea),fill:I.color||Or,style:{filter:z?"brightness(1.25)":"brightness(1)",transition:"filter 0.18s ease"}})},I.origIndex)}),!R&&E.map(I=>{const z=at(M,j,$,I.sa),G=e==="cheese"?M:at(M,j,P,I.sa).x,O=e==="cheese"?j:at(M,j,P,I.sa).y;return l.jsx("line",{x1:G,y1:O,x2:z.x,y2:z.y,stroke:V,strokeWidth:i,strokeLinecap:"butt",style:{pointerEvents:"none"}},`gap-${I.origIndex}`)}),E.map(I=>{if(I.ea-I.sa<20)return null;const z=b===I.origIndex,{tx:G,ty:O}=z&&!R?fi(M,j,I.sa,I.ea,10):{tx:0,ty:0},L=I.sa+(I.ea-I.sa)/2,K=at(M,j,D,L);return l.jsx("text",{x:K.x+G,y:K.y+O,textAnchor:"middle",dominantBaseline:"middle",fill:d,fontSize:"14",fontWeight:"700",fontFamily:"'Segoe UI', sans-serif",pointerEvents:"none",style:{transition:"x 0.18s ease, y 0.18s ease"},children:di(I,y)},`lbl-${I.origIndex}`)}),E.map(I=>l.jsx("path",{d:ui(M,j,P,$,I.sa,I.ea),fill:"transparent",style:{cursor:"pointer"},onMouseEnter:()=>f(I.origIndex),onMouseLeave:()=>f(null)},`hit-${I.origIndex}`))]}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px 24px",justifyContent:g?"flex-start":"center"},children:t.map((I,z)=>{const G=x[z],O=G&&v<=1;return l.jsxs("div",{role:"button",tabIndex:0,"aria-pressed":G,"aria-label":`${G?"Ocultar":"Mostrar"} ${I.title}`,title:O?"Debe quedar al menos una categoría activa":G?"Ocultar del gráfico":"Mostrar en el gráfico",onClick:()=>T(z),onKeyDown:L=>{(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),T(z))},style:{display:"flex",alignItems:"center",gap:"8px",opacity:G&&(b===null||b===z)?1:.4,cursor:O?"not-allowed":"pointer",transition:"opacity 0.15s",userSelect:"none"},onMouseEnter:()=>G&&f(z),onMouseLeave:()=>f(null),children:[l.jsx("span",{style:{width:"32px",height:"14px",borderRadius:"3px",background:I.color||Or,flexShrink:0}}),l.jsx("span",{style:{color:u,fontSize:"13px",fontWeight:"400"},children:I.title})]},z)})})]})]})};zo.displayName="PieChart";zo.propTypes={type:s.oneOf(["cheese","donut"]),data:s.arrayOf(s.shape({value:s.number.isRequired,title:s.string.isRequired,color:s.string})).isRequired,title:s.string,size:s.number,donutThickness:s.number,gapWidth:s.number,gapColor:s.string,backgroundColor:s.string,fontColor:s.string,fontColorInside:s.string,containerStyles:s.object,alignLeft:s.bool,valuesArePercentages:s.bool,minSliceAngle:s.number};const pi=["#a8d8cf","#3bbfa0","#5dd4b8","#7ed4c2","#2aa88a"],qo=({data:e=[],title:t,backgroundColor:n="#0d3d4a",fontColor:r="#ffffff",barHeight:o=52,animated:i=!0,borderRadius:a,containerStyles:c={},fontColorInside:u="white",borderFontColorInside:d})=>{const[m,g]=S.useState(i?0:1);S.useEffect(()=>{if(!i)return;const b=requestAnimationFrame(()=>g(1));return()=>cancelAnimationFrame(b)},[i]);const y=Math.max(...e.map(b=>b.value),1),h=a??"6px";return l.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:"0px",background:n,borderRadius:"16px",fontFamily:"'Segoe UI', sans-serif",minWidth:"420px",...c},children:[t&&l.jsx("h2",{style:{margin:"0 0 20px 0",color:r,fontSize:"22px",fontWeight:"700",letterSpacing:"-0.4px"},children:t}),l.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"18px"},children:e.map((b,f)=>{const x=b.color||pi[f%pi.length],_=b.value/y*100*m;return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[l.jsx("span",{style:{color:r,fontSize:"14px",fontWeight:"400",opacity:.9},children:b.title}),l.jsxs("div",{style:{position:"relative",height:`${o}px`,background:"transparent",borderRadius:h,overflow:"hidden"},children:[l.jsx("div",{style:{position:"absolute",left:0,top:0,height:"100%",width:`${_}%`,background:x,borderRadius:h,transition:i?"width 0.8s cubic-bezier(0.16, 1, 0.3, 1)":"none"}}),l.jsx("span",{style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:u||n,fontSize:"18px",fontWeight:"700",pointerEvents:"none",letterSpacing:"-0.3px",...d?{WebkitTextStroke:`1px ${d}`,paintOrder:"stroke fill"}:{}},children:b.value})]})]},f)})})]})};qo.displayName="HorizontalBarChart";qo.propTypes={data:s.arrayOf(s.shape({title:s.string.isRequired,value:s.number.isRequired,color:s.string})),title:s.string,backgroundColor:s.string,fontColor:s.string,fontColorInside:s.string,borderFontColorInside:s.string,barHeight:s.number,animated:s.bool,borderRadius:s.oneOfType([s.string,s.number]),containerStyles:s.object};const mi=["#a8d8cf","#3bbfa0","#5dd4b8","#7ed4c2","#2aa88a"],Wo=({data:e=[],title:t,backgroundColor:n="black",fontColor:r="#ffffff",fontColorInside:o="#0d3d4a",borderFontColorInside:i,barWidth:a=52,maxBarHeight:c=200,animated:u=!0,separatorColor:d,containerStyles:m={}})=>{const[g,y]=S.useState(u?0:1);S.useEffect(()=>{if(!u)return;const N=requestAnimationFrame(()=>requestAnimationFrame(()=>y(1)));return()=>cancelAnimationFrame(N)},[u]);const h=Math.max(...e.map(N=>N.value),1),b=d||(r==="#ffffff"?"rgba(255,255,255,0.25)":"rgba(0,0,0,0.15)"),f=12,x=12,_=e.length*a+Math.max(0,e.length-1)*f,w={fontSize:"15px",fontWeight:"700",letterSpacing:"-0.3px",lineHeight:1,pointerEvents:"none",whiteSpace:"nowrap",...i?{WebkitTextStroke:`1px ${i}`,paintOrder:"stroke fill"}:{}};return l.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:"0",background:n,borderRadius:"16px",fontFamily:"'Segoe UI', sans-serif",...m},children:[t&&l.jsx("h2",{style:{margin:"0 0 24px 0",color:r,fontSize:"22px",fontWeight:"700",letterSpacing:"-0.4px"},children:t}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:0,overflow:"visible"},children:[l.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:`${f}px`,width:`${_}px`,height:`${c}px`},children:e.map((N,C)=>{const v=N.color||mi[C%mi.length],T=N.value===0,M=T?0:N.value/h*c*g;return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",width:`${a}px`,height:"100%"},children:T?l.jsx("span",{style:{...w,color:o,marginBottom:"6px"},children:N.value}):l.jsx("div",{style:{position:"relative",width:"100%",height:`${M}px`,background:v,borderRadius:"6px 6px 0 0",transition:u?"height 0.85s cubic-bezier(0.16, 1, 0.3, 1)":"none",display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"10px"},children:l.jsx("span",{style:{...w,color:o},children:N.value})})},C)})}),l.jsx("div",{style:{width:`${_+x*2}px`,marginLeft:`-${x}px`,height:"1.5px",background:b,borderRadius:"1px"}}),l.jsx("div",{style:{display:"flex",gap:`${f}px`,width:`${_}px`,marginTop:"10px"},children:e.map((N,C)=>l.jsx("div",{style:{width:`${a}px`,textAlign:"center",color:r,fontSize:"13px",fontWeight:"400",opacity:.8,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:N.title},C))})]})]})};Wo.displayName="VerticalBarChart";Wo.propTypes={data:s.arrayOf(s.shape({title:s.string.isRequired,value:s.number.isRequired,color:s.string})).isRequired,title:s.string,backgroundColor:s.string,fontColor:s.string,fontColorInside:s.string,borderFontColorInside:s.string,barWidth:s.number,maxBarHeight:s.number,animated:s.bool,separatorColor:s.string,containerStyles:s.object};const ip="_percentageBarContainer_lgkme_3",ap="_barContainer_lgkme_10",lp="_segment_lgkme_19",cp="_handle_lgkme_36",up="_labelsContainer_lgkme_68",dp="_labelItem_lgkme_73",fp="_labelsListContainer_lgkme_85",pp="_labelColor_lgkme_105",mp="_labelText_lgkme_114",hp="_labelValue_lgkme_122",gp="_labelTranslation_lgkme_126",Le={percentageBarContainer:ip,barContainer:ap,segment:lp,handle:cp,labelsContainer:up,labelItem:dp,labelsListContainer:fp,labelColor:pp,labelText:mp,labelValue:hp,labelTranslation:gp},yp=2,hi=e=>{const t=e.reduce((n,r)=>n+r.value,0);return t===0?e.map(()=>100/e.length):e.map(n=>n.value/t*100)},Mr=(e,t=100)=>e.map(n=>n.value/t*100),gi=(e,t)=>{try{const r=new Function("x",`return (${t})`)(e);return isNaN(r)?"N/A":r.toFixed(2)}catch{return"N/A"}},Uo=({items:e,showLabels:t="bar",showTranslations:n=!0,onChange:r,minPercentage:o=yp,maxValue:i=100,labelTextColor:a,labelValueColor:c})=>{const[u,d]=S.useState(()=>hi(e)),m=S.useRef(null),g=S.useRef(null);S.useEffect(()=>{e&&e.length>0&&d(hi(e))},[e]);const y=S.useCallback(f=>{if(!m.current||!g.current)return;const{dividerIndex:x}=m.current,_=g.current.getBoundingClientRect(),w=(f.touches?f.touches[0].clientX:f.clientX)-_.left,N=Math.max(0,Math.min(100,w/_.width*100));d(C=>{const v=[...C],T=C.slice(0,x).reduce((P,D)=>P+D,0),M=T+C[x]+C[x+1];let j=N-T,$=M-N;if(j<o&&(j=o,$=M-T-o),$<o&&($=o,j=M-T-o),v[x]=j,v[x+1]=$,r)try{const P=e.reduce((D,p)=>D+p.value,0);r(e.map((D,p)=>({...D,value:v[p]/100*P})))}catch(P){console.error("PercentageBar onChange error:",P)}return v})},[o,r,e]),h=S.useCallback(()=>{m.current&&(m.current=null,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",h),d(f=>{if(r){const x=e.reduce((_,w)=>_+w.value,0);r(e.map((_,w)=>({..._,value:f[w]/100*x})))}return f}))},[y,r,e]),b=(f,x)=>{x.preventDefault(),m.current={dividerIndex:f},document.addEventListener("mousemove",y),document.addEventListener("mouseup",h),document.addEventListener("touchmove",y,{passive:!1}),document.addEventListener("touchend",h)};return l.jsxs("div",{className:Le.percentageBarContainer,children:[l.jsx("div",{className:Le.barContainer,ref:g,children:e.map((f,x)=>{var _;return l.jsx("div",{className:Le.segment,style:{width:`${u[x]}%`,backgroundColor:f.color||"#ccc"},children:x>0&&l.jsx("div",{className:Le.handle,onMouseDown:w=>b(x-1,w),onTouchStart:w=>b(x-1,w),role:"slider","aria-label":`Divisor entre ${(_=e[x-1])==null?void 0:_.title} y ${f.title}`,"aria-valuenow":Math.round(u[x]),tabIndex:0})},f.id??x)})}),t==="bar"&&l.jsx("div",{className:Le.labelsContainer,children:e.map((f,x)=>l.jsxs("div",{className:Le.labelItem,style:{width:`${u[x]}%`},children:[l.jsx("span",{className:Le.labelColor,style:{backgroundColor:f.color}}),l.jsx("span",{className:Le.labelText,style:{color:a||"#fff"},children:f.title}),l.jsxs("span",{className:Le.labelValue,style:{color:c||"#fff"},children:[Mr(e,i)[x].toFixed(1),"%"]}),n&&f.translationFormula&&l.jsxs("span",{className:Le.labelTranslation,children:["(",gi(u[x],f.translationFormula),")"]})]},f.id??x))}),t==="list"&&l.jsx("div",{className:Le.labelsListContainer,children:e.map((f,x)=>l.jsxs("div",{className:Le.labelItem,children:[l.jsx("span",{className:Le.labelColor,style:{backgroundColor:f.color}}),l.jsx("span",{className:Le.labelText,children:f.title}),l.jsxs("span",{className:Le.labelValue,children:[Mr(e,i)[x].toFixed(1),"%"]}),n&&f.translationFormula&&l.jsxs("span",{className:Le.labelTranslation,children:["(",gi(Mr(e,i)[x],f.translationFormula),")"]})]},f.id??x))})]})};Uo.displayName="PercentageBar";Uo.propTypes={items:s.arrayOf(s.shape({id:s.oneOfType([s.string,s.number]),title:s.string.isRequired,value:s.number.isRequired,color:s.string.isRequired,translationFormula:s.string})).isRequired,showLabels:s.string,showTranslations:s.bool,onChange:s.func,minPercentage:s.number,maxValue:s.number,labelTextColor:s.string,labelValueColor:s.string};const bp="_overlay_1vbid_2",vp="_modal_1vbid_16",xp="_content_1vbid_28",Cp="_iconContainer_1vbid_36",_p="_iconSvg_1vbid_43",Sp="_textContainer_1vbid_48",wp="_title_1vbid_55",Tp="_message_1vbid_62",kp="_closeButton_1vbid_69",Je={overlay:bp,modal:vp,content:xp,iconContainer:Cp,iconSvg:_p,textContainer:Sp,title:wp,message:Tp,closeButton:kp},Ho=({isOpen:e,onClose:t,title:n,message:r,isError:o=!1,isSuccess:i=!1,customIcon:a=null,iconColor:c=null,textColor:u=null,backgroundColor:d=null,borderColor:m=null,showCloseButton:g=!0,autoClose:y=!1,autoCloseDelay:h=3e3})=>{if(S.useEffect(()=>{if(y&&e){const w=setTimeout(()=>{t()},h);return()=>clearTimeout(w)}},[y,e,t,h]),!e)return null;const b=()=>{const w={};return d&&(w.backgroundColor=d),m&&(w.borderColor=m),o&&!d?(w.backgroundColor="#fff5f5",w.borderColor="#feb2b2"):i&&!d&&(w.backgroundColor="#f0fff4",w.borderColor="#9ae6b4"),w},f=()=>{const w={};return u&&(w.color=u),o&&!u?w.color="#c53030":i&&!u&&(w.color="#276749"),w},x=()=>{const w={};return c&&(w.color=c),o&&!c?w.color="#c53030":i&&!c&&(w.color="#276749"),w},_=()=>a||(o?l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:Je.iconSvg,style:x(),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("circle",{cx:"12",cy:"12",r:"10"}),l.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),l.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}):i?l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:Je.iconSvg,style:x(),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),l.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}):null);return l.jsx("div",{className:Je.overlay,children:l.jsx("div",{className:Je.modal,style:b(),children:l.jsxs("div",{className:Je.content,children:[l.jsx("div",{className:Je.iconContainer,children:_()}),l.jsxs("div",{className:Je.textContainer,children:[n&&l.jsx("h3",{className:Je.title,style:f(),children:n}),l.jsx("p",{className:Je.message,style:f(),children:r})]}),g&&l.jsx("button",{className:Je.closeButton,onClick:t,"aria-label":"Close modal",style:f(),children:"✕"})]})})})};Ho.displayName="StatusModal";Ho.propTypes={isOpen:s.bool.isRequired,onClose:s.func.isRequired,title:s.string,message:s.string.isRequired,isError:s.bool,isSuccess:s.bool,customIcon:s.node,iconColor:s.string,textColor:s.string,backgroundColor:s.string,borderColor:s.string,showCloseButton:s.bool,autoClose:s.bool,autoCloseDelay:s.number};const jp="_header_13kbt_2",$p="_leftComponents_13kbt_13",Np="_centerComponents_13kbt_14",Ep="_rightComponents_13kbt_15",Ap="_componentsContainer_13kbt_32",wt={header:jp,leftComponents:$p,centerComponents:Np,rightComponents:Ep,componentsContainer:Ap},Ko=({cssProps:e,leftComponents:t=[],centerComponents:n=[],rightComponents:r=[],zIndex:o=10,height:i=60,backgroundColor:a="#605B56",isFooter:c=!1})=>l.jsxs("div",{className:wt.header,style:{...e,zIndex:o,height:i,backgroundColor:a,top:c?"auto":0,bottom:c?0:"auto"},children:[l.jsx("div",{className:wt.leftComponents,children:t.map((u,d)=>l.jsx("div",{className:wt.componentsContainer,children:u},d))}),l.jsx("div",{className:wt.centerComponents,children:n.map((u,d)=>l.jsx("div",{className:wt.componentsContainer,children:u},d))}),l.jsx("div",{className:wt.rightComponents,children:r.map((u,d)=>l.jsx("div",{className:wt.componentsContainer,children:u},d))})]});Ko.displayName="HeaderSection";Ko.propTypes={leftComponents:s.arrayOf(s.node),centerComponents:s.arrayOf(s.node),rightComponents:s.arrayOf(s.node),cssProps:s.object,zIndex:s.number,height:s.number,backgroundColor:s.string,isFooter:s.bool};const Op="_sidebar_1kaqu_2",Mp="_open_1kaqu_16",Lp="_content_1kaqu_20",Rp="_closeButton_1kaqu_25",Mn={sidebar:Op,open:Mp,content:Lp,closeButton:Rp},Ip="data:image/svg+xml,%3csvg%20width='19'%20height='19'%20viewBox='0%200%2019%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%203699'%3e%3cpath%20id='Vector%20223'%20d='M1%201L18.1566%2018.1566'%20stroke='%23605B56'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3cpath%20id='Vector%20224'%20d='M18.1575%201L1.00083%2018.1566'%20stroke='%23605B56'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/g%3e%3c/svg%3e",Zo=({width:e="300px",children:t,showRightBar:n,onCloseBar:r})=>{const o=()=>{r()};return l.jsx("div",{className:`${Mn.sidebar} ${n?Mn.open:""}`,style:{width:n?e:0},children:n&&l.jsxs("div",{className:Mn.content,children:[l.jsx("button",{className:Mn.closeButton,onClick:o,children:l.jsx("img",{src:Ip,alt:"Close Sidebar"})}),t]})})};Zo.displayName="RightSidebar";Zo.propTypes={width:s.oneOfType([s.string,s.number]),children:s.node,showRightBar:s.bool,onCloseBar:s.func};exports.AmbitSelector=Gr;exports.BarChart=Kn;exports.BurgerMenu=Do;exports.ButtonsBar=Lo;exports.ButtonsList=Yr;exports.CategorySelector=Un;exports.DropdownList=ct;exports.EditAmbit=Si;exports.ErrorBoundary=_i;exports.ErrorMessage=At;exports.FiltersAmbit=ro;exports.Form=la;exports.GeneralButton=Zt;exports.Graphic=oo;exports.GraphicLegend=Fo;exports.Groupedbarchart=Bo;exports.HeaderSection=Ko;exports.HorizontalBarChart=qo;exports.IndicatorsList=ao;exports.LangSelector=lo;exports.Legend=co;exports.ListSelector=ko;exports.Loader=Io;exports.LogInButton=wo;exports.LogoApp=uo;exports.MapboxMap=fo;exports.MaplibreMap=po;exports.ModalAlert=Ao;exports.PercentageBar=Uo;exports.PieChart=zo;exports.RadioButtonInput=Eo;exports.RankingSlider=lr;exports.RightSidebar=Zo;exports.SectionBar=mo;exports.SelectInput=No;exports.SpeedGraphic=Vo;exports.Stackedbarchart=Po;exports.StatusModal=Ho;exports.StatusText=Mo;exports.Steps=Oo;exports.Switch=Ro;exports.TextInput=Wn;exports.TimeSlider=_o;exports.Tooltip=Ge;exports.TopNavMenu=So;exports.VerticalBarChart=Wo;
84
84
  //# sourceMappingURL=index.cjs.js.map