@tmf_ciclica/ciclicastorybook 1.1.19 → 1.1.20-beta.1
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 +2 -2
- package/dist/index.es.js +58 -57
- package/package.json +1 -3
package/dist/index.cjs.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),C=require("react"),e=require("prop-types"),j=require("react-i18next"),ue=require("framer-motion"),et=require("zustand"),tt=require("d3"),st=require("mapbox-gl"),Y=require("react-redux"),K=require("react-map-gl/mapbox"),me=require("maplibre-gl"),nt=require("pmtiles"),U=require("react-map-gl/maplibre"),ke=require("@reduxjs/toolkit"),it=require("@mui/material/Slider"),ge=require("@mui/material"),ot=require("@emotion/react"),rt=require("react-router-dom");function at(i){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const o in i)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(i,o);Object.defineProperty(u,o,n.get?n:{enumerable:!0,get:()=>i[o]})}}return u.default=i,Object.freeze(u)}const be=at(tt),lt="_ambitSelector_f07c1_2",ct="_header_f07c1_13",ut="_nameDateContainer_f07c1_23",dt="_ambitName_f07c1_39",pt="_ambitDate_f07c1_48",ht="_buttonsContainer_f07c1_51",E={ambitSelector:lt,header:ct,nameDateContainer:ut,ambitName:dt,ambitDate:pt,buttonsContainer:ht},mt="_ambitItem_1ueih_2",gt="_ambitNameDate_1ueih_16",bt="_ambitName_1ueih_16",ft="_ambitDate_1ueih_35",yt="_ambitButtons_1ueih_38",Z={ambitItem:mt,ambitNameDate:gt,ambitName:bt,ambitDate:ft,ambitButtons:yt},xt="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",Ct="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",fe="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",vt="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%205138'%3e%3cpath%20id='Vector'%20d='M12.95%200.408447C7.659%200.408447%202.84899%202.77185%200.0832465%206.72621C-0.0277488%206.88808%20-0.0277488%207.09621%200.0832465%207.25807C2.84439%2011.2125%207.65437%2013.5712%2012.95%2013.5712C18.2456%2013.5712%2023.0556%2011.2125%2025.8168%207.25807C25.9278%207.0962%2025.9278%206.88807%2025.8168%206.72621C23.051%202.77184%2018.241%200.408447%2012.95%200.408447ZM12.95%2011.2217C10.619%2011.2217%208.71812%209.32083%208.71812%206.98984C8.71812%204.65885%2010.619%202.75796%2012.95%202.75796C15.281%202.75796%2017.1819%204.65883%2017.1819%206.98984C17.1819%209.32085%2015.281%2011.2217%2012.95%2011.2217Z'%20fill='%23B32F5D'/%3e%3cpath%20id='Vector_2'%20d='M12.9514%2010.2966C14.7777%2010.2966%2016.2583%208.81607%2016.2583%206.98974C16.2583%205.1634%2014.7777%203.68286%2012.9514%203.68286C11.1251%203.68286%209.64453%205.1634%209.64453%206.98974C9.64453%208.81607%2011.1251%2010.2966%2012.9514%2010.2966Z'%20fill='%23B32F5D'/%3e%3c/g%3e%3c/svg%3e",_t="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",we=({ambit:i,onClickCopy:u,onClickDelete:o,onClickFilters:n,onClickAmbit:t,isBeingProcessed:r,isActive:l,activeColor:a,fontColor:c,moreInfo:d})=>{const{name:p,date:h,id:m}=i;return s.jsxs("div",{className:Z.ambitItem,style:{borderBottom:`1px solid ${c}`},children:[s.jsxs("div",{className:Z.ambitNameDate,onClick:()=>t(m),children:[s.jsxs("div",{className:Z.ambitName,children:[s.jsx("img",{src:l?vt:_t}),s.jsx("span",{style:{color:l?a:c},children:p})]}),s.jsx("div",{className:Z.ambitDate,children:new Date(h).toLocaleDateString()})]}),s.jsxs("div",{className:Z.ambitButtons,children:[r&&s.jsx("img",{src:fe}),s.jsx("button",{onClick:()=>n(m),children:s.jsx("img",{src:fe})}),s.jsx("button",{onClick:()=>u(m),children:s.jsx("img",{src:Ct})}),s.jsx("button",{onClick:()=>o(m),children:s.jsx("img",{src:xt})})]})]})};we.propTypes={ambit:e.shape({name:e.string.isRequired,date:e.string.isRequired,id:e.string.isRequired}).isRequired,onClickCopy:e.func.isRequired,onClickDelete:e.func.isRequired,onClickFilters:e.func.isRequired,onClickAmbit:e.func.isRequired,isBeingProcessed:e.bool,isActive:e.bool,activeColor:e.string,fontColor:e.string,moreInfo:e.object};const jt="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",Te=({ambitList:i,activeAmbitId:u,fontColor:o="#605B56",activeColor:n,nameLabel:t,dateLabel:r,onClickCopy:l=p=>console.log(`Copy ambit: ${p}`),onCLickDelete:a=p=>console.log(`Delete ambit: ${p}`),onClickFilters:c=p=>console.log(`Filters clicked: ${p}`),onClickAmbit:d=p=>console.log(`OnCLickAmbit: ${p}`)})=>{const{t:p}=j.useTranslation();return s.jsxs("div",{className:E.ambitSelector,style:{color:o},children:[s.jsxs("div",{className:E.header,style:{borderBottom:`1px solid ${o}`},children:[s.jsxs("div",{className:E.nameDateContainer,children:[s.jsx("div",{className:E.ambitName,children:s.jsx("span",{children:p(t)})}),s.jsx("div",{className:E.ambitDate,children:s.jsx("span",{children:p(r)})})]}),s.jsx("div",{className:E.buttonsContainer})]}),i&&i.length>0&&i.map(h=>s.jsx(we,{isActive:u==h.id,ambit:h,fontColor:o,activeColor:n,onClickCopy:l,onClickDelete:a,onClickFilters:c,onClickAmbit:d},`ambitKey${h.id}`))]})};Te.propTypes={ambitList:e.arrayOf(e.shape({name:e.string.isRequired,date:e.string.isRequired,id:e.string.isRequired})).isRequired,activeAmbitId:e.string,fontColor:e.string,activeColor:e.string,onClickCopy:e.func.isRequired,onCLickDelete:e.func.isRequired,onClickFilters:e.func.isRequired,onClickAmbit:e.func.isRequired};const St="_buttonsContainer_1audx_2",kt="_vertical_1audx_6",wt="_horizontal_1audx_9",Tt="_button_1audx_2",Nt="_active_1audx_25",Mt="_buttonName_1audx_28",A={buttonsContainer:St,vertical:kt,horizontal:wt,button:Tt,active:Nt,buttonName:Mt},$t="_left_19lnt_3",Lt="_top_19lnt_33",Ft="_bottom_19lnt_66",Bt="_right_19lnt_97",Dt={left:$t,top:Lt,bottom:Ft,right:Bt},de=({text:i,position:u,styleCustom:o=null})=>{const{t:n}=j.useTranslation();return s.jsx("div",{className:`tooltip ${Dt[u]}`,style:o,children:n(i)})};de.propTypes={text:e.string.isRequired,position:e.oneOf(["top","bottom","left","right"]).isRequired,styleCustom:e.object};const Ne=({buttons:i=[],orientation:u="horizontal",showName:o=!0,namePosition:n="right",useTooltip:t=!1,tooltipPosition:r="top"})=>{const{t:l}=j.useTranslation();return s.jsx("div",{className:`${A.buttonsContainer} ${u==="vertical"&&A.vertical}
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),C=require("react"),e=require("prop-types"),j=require("react-i18next"),de=require("framer-motion"),et=require("zustand"),tt=require("d3"),st=require("mapbox-gl"),Y=require("react-redux"),K=require("react-map-gl/mapbox"),se=require("maplibre-gl"),nt=require("pmtiles"),U=require("react-map-gl/maplibre"),ke=require("@reduxjs/toolkit"),it=require("@mui/material/Slider"),ge=require("@mui/material"),ot=require("@emotion/react"),rt=require("react-router-dom");function at(i){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const o in i)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(i,o);Object.defineProperty(u,o,n.get?n:{enumerable:!0,get:()=>i[o]})}}return u.default=i,Object.freeze(u)}const be=at(tt),lt="_ambitSelector_f07c1_2",ct="_header_f07c1_13",ut="_nameDateContainer_f07c1_23",dt="_ambitName_f07c1_39",pt="_ambitDate_f07c1_48",ht="_buttonsContainer_f07c1_51",E={ambitSelector:lt,header:ct,nameDateContainer:ut,ambitName:dt,ambitDate:pt,buttonsContainer:ht},mt="_ambitItem_1ueih_2",gt="_ambitNameDate_1ueih_16",bt="_ambitName_1ueih_16",ft="_ambitDate_1ueih_35",yt="_ambitButtons_1ueih_38",Z={ambitItem:mt,ambitNameDate:gt,ambitName:bt,ambitDate:ft,ambitButtons:yt},xt="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",Ct="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",fe="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",vt="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%205138'%3e%3cpath%20id='Vector'%20d='M12.95%200.408447C7.659%200.408447%202.84899%202.77185%200.0832465%206.72621C-0.0277488%206.88808%20-0.0277488%207.09621%200.0832465%207.25807C2.84439%2011.2125%207.65437%2013.5712%2012.95%2013.5712C18.2456%2013.5712%2023.0556%2011.2125%2025.8168%207.25807C25.9278%207.0962%2025.9278%206.88807%2025.8168%206.72621C23.051%202.77184%2018.241%200.408447%2012.95%200.408447ZM12.95%2011.2217C10.619%2011.2217%208.71812%209.32083%208.71812%206.98984C8.71812%204.65885%2010.619%202.75796%2012.95%202.75796C15.281%202.75796%2017.1819%204.65883%2017.1819%206.98984C17.1819%209.32085%2015.281%2011.2217%2012.95%2011.2217Z'%20fill='%23B32F5D'/%3e%3cpath%20id='Vector_2'%20d='M12.9514%2010.2966C14.7777%2010.2966%2016.2583%208.81607%2016.2583%206.98974C16.2583%205.1634%2014.7777%203.68286%2012.9514%203.68286C11.1251%203.68286%209.64453%205.1634%209.64453%206.98974C9.64453%208.81607%2011.1251%2010.2966%2012.9514%2010.2966Z'%20fill='%23B32F5D'/%3e%3c/g%3e%3c/svg%3e",_t="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",we=({ambit:i,onClickCopy:u,onClickDelete:o,onClickFilters:n,onClickAmbit:t,isBeingProcessed:r,isActive:l,activeColor:a,fontColor:c,moreInfo:d})=>{const{name:p,date:h,id:m}=i;return s.jsxs("div",{className:Z.ambitItem,style:{borderBottom:`1px solid ${c}`},children:[s.jsxs("div",{className:Z.ambitNameDate,onClick:()=>t(m),children:[s.jsxs("div",{className:Z.ambitName,children:[s.jsx("img",{src:l?vt:_t}),s.jsx("span",{style:{color:l?a:c},children:p})]}),s.jsx("div",{className:Z.ambitDate,children:new Date(h).toLocaleDateString()})]}),s.jsxs("div",{className:Z.ambitButtons,children:[r&&s.jsx("img",{src:fe}),s.jsx("button",{onClick:()=>n(m),children:s.jsx("img",{src:fe})}),s.jsx("button",{onClick:()=>u(m),children:s.jsx("img",{src:Ct})}),s.jsx("button",{onClick:()=>o(m),children:s.jsx("img",{src:xt})})]})]})};we.propTypes={ambit:e.shape({name:e.string.isRequired,date:e.string.isRequired,id:e.string.isRequired}).isRequired,onClickCopy:e.func.isRequired,onClickDelete:e.func.isRequired,onClickFilters:e.func.isRequired,onClickAmbit:e.func.isRequired,isBeingProcessed:e.bool,isActive:e.bool,activeColor:e.string,fontColor:e.string,moreInfo:e.object};const jt="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",Te=({ambitList:i,activeAmbitId:u,fontColor:o="#605B56",activeColor:n,nameLabel:t,dateLabel:r,onClickCopy:l=p=>console.log(`Copy ambit: ${p}`),onCLickDelete:a=p=>console.log(`Delete ambit: ${p}`),onClickFilters:c=p=>console.log(`Filters clicked: ${p}`),onClickAmbit:d=p=>console.log(`OnCLickAmbit: ${p}`)})=>{const{t:p}=j.useTranslation();return s.jsxs("div",{className:E.ambitSelector,style:{color:o},children:[s.jsxs("div",{className:E.header,style:{borderBottom:`1px solid ${o}`},children:[s.jsxs("div",{className:E.nameDateContainer,children:[s.jsx("div",{className:E.ambitName,children:s.jsx("span",{children:p(t)})}),s.jsx("div",{className:E.ambitDate,children:s.jsx("span",{children:p(r)})})]}),s.jsx("div",{className:E.buttonsContainer})]}),i&&i.length>0&&i.map(h=>s.jsx(we,{isActive:u==h.id,ambit:h,fontColor:o,activeColor:n,onClickCopy:l,onClickDelete:a,onClickFilters:c,onClickAmbit:d},`ambitKey${h.id}`))]})};Te.propTypes={ambitList:e.arrayOf(e.shape({name:e.string.isRequired,date:e.string.isRequired,id:e.string.isRequired})).isRequired,activeAmbitId:e.string,fontColor:e.string,activeColor:e.string,onClickCopy:e.func.isRequired,onCLickDelete:e.func.isRequired,onClickFilters:e.func.isRequired,onClickAmbit:e.func.isRequired};const St="_buttonsContainer_1audx_2",kt="_vertical_1audx_6",wt="_horizontal_1audx_9",Tt="_button_1audx_2",Nt="_active_1audx_25",Mt="_buttonName_1audx_28",A={buttonsContainer:St,vertical:kt,horizontal:wt,button:Tt,active:Nt,buttonName:Mt},Lt="_left_19lnt_3",$t="_top_19lnt_33",Ft="_bottom_19lnt_66",Bt="_right_19lnt_97",Dt={left:Lt,top:$t,bottom:Ft,right:Bt},pe=({text:i,position:u,styleCustom:o=null})=>{const{t:n}=j.useTranslation();return s.jsx("div",{className:`tooltip ${Dt[u]}`,style:o,children:n(i)})};pe.propTypes={text:e.string.isRequired,position:e.oneOf(["top","bottom","left","right"]).isRequired,styleCustom:e.object};const Ne=({buttons:i=[],orientation:u="horizontal",showName:o=!0,namePosition:n="right",useTooltip:t=!1,tooltipPosition:r="top"})=>{const{t:l}=j.useTranslation();return s.jsx("div",{className:`${A.buttonsContainer} ${u==="vertical"&&A.vertical}
|
|
2
2
|
${u==="horizontal"&&A.horizontal}`,children:i.map((a,c)=>{const{icon:d,activeIcon:p,isActive:h,name:m,onClick:g}=a,y=s.jsxs(s.Fragment,{children:[o&&n==="left"&&s.jsx("span",{className:A.buttonName,children:l(m)}),s.jsx("img",{src:h?p:d,alt:l(m)}),o&&n==="right"&&s.jsx("span",{className:A.buttonName,children:l(m)})]});return s.jsxs("div",{className:"tooltip-parent",children:[s.jsx("button",{onClick:g,className:`${A.button}
|
|
3
|
-
${h&&A.active}`,children:y}),t&&s.jsx(de,{text:m,position:r})]},c)})})};Ne.propTypes={buttons:e.arrayOf(e.shape({icon:e.node.isRequired,activeIcon:e.node,isActive:e.bool,name:e.string,onClick:e.func})).isRequired,orientation:e.oneOf(["horizontal","vertical"]),showName:e.bool,namePosition:e.oneOf(["left","right"]),useTooltip:e.bool,tooltipPosition:e.oneOf(["top","bottom","left","right"])};const Ot="_indicatorsCategory_1cu33_2",At="_title_1cu33_5",se={indicatorsCategory:Ot,title:At},O=({isOpen:i,onClick:u,children:o,color:n,activeColor:t="#F8A925",title:r="Title",height:l=53,titleFontStyles:a,showBottomBar:c=!0,titleMarginChildren:d=25})=>{const{t:p}=j.useTranslation();return s.jsxs(ue.motion.div,{className:se.indicatorsCategory,initial:{height:`${l}px`},animate:{height:i?"auto":`${l}px`},transition:{duration:.4},style:{backgroundColor:"white",borderBottom:i&&c?`1px solid ${t}`:"0px",marginBottom:i?"20px":"0px"},children:[s.jsxs("h2",{style:{...a,marginBottom:d||"auto"},className:`${se.title}`,onClick:u,children:[s.jsx("span",{style:{color:i?t:n},children:i?"-":"+"}),s.jsx("span",{style:{marginLeft:12,color:i?t:n},children:p(r)})]}),s.jsx("div",{className:se.content,children:o})]})};O.propTypes={isOpen:e.bool,onClick:e.func,children:e.node,color:e.string,activeColor:e.string,title:e.string,height:e.number,showBottomBar:e.bool,titleFontStyles:e.object};const Rt=()=>s.jsx("div",{children:"EditAmbit"}),It="_AppliedFiltersContainer_s8ooe_2",qt="_AppliedFilterContent_s8ooe_10",ye={AppliedFiltersContainer:It,AppliedFilterContent:qt},T=et.create(i=>({activeCategory:"",activeSubCategory:"",selectedIndicator:"",tematicalFiltersSelected:[],fontColor:"#605B56",inputsColor:"#605B56"})),Me=({title:i,onClick:u,isOpen:o=!0,textColor:n="#ffffff",backgroundColor:t="#605B5680",activeColor:r})=>{const{t:l}=j.useTranslation(),{tematicalFiltersSelected:a}=T(d=>d),c=d=>{T.setState(p=>({tematicalFiltersSelected:p.tematicalFiltersSelected.filter(h=>h.code!==d)}))};return s.jsx(O,{isOpen:o,onClick:u,title:i?l(i):"Applied Filters",activeColor:r,children:s.jsx("div",{className:ye.AppliedFiltersContainer,children:a==null?void 0:a.map((d,p)=>s.jsxs("div",{className:ye.AppliedFilterContent,style:{color:n,background:t},children:[l(d.name),s.jsx("img",{src:jt,alt:"CloseIcon",onClick:()=>c(d.code),style:{cursor:"pointer"}})]},p))})})};Me.propTypes={isOpen:e.bool,onClick:e.func,title:e.string,textColor:e.string,backgroundColor:e.string,indicators:e.arrayOf(e.shape({title:e.string.isRequired,Codename:e.string.isRequired})),activeColor:e.string};const $e=({title:i,onClick:u,isOpen:o=!0,textColor:n="#ffffff",backgroundColor:t="#605B5680",activeColor:r})=>{const{t:l}=j.useTranslation(),{tematicalFiltersSelected:a}=T(c=>c);return s.jsx(O,{isOpen:o,onClick:u,title:i?l(i):"Geographical Filters",activeColor:r,children:"A"})};$e.propTypes={isOpen:e.bool,onClick:e.func,title:e.string,textColor:e.string,backgroundColor:e.string,activeColor:e.string};const Et="_checkboxContainer_zld97_2",zt={checkboxContainer:Et},Le=({onClick:i,containerStyles:u,color:o="#605B56",indicator:n,value:t})=>{const{t:r}=j.useTranslation(),{title:l}=n||{},{fontColor:a,inputsColor:c}=T(d=>d);return s.jsxs("div",{style:{...u,color:o},role:"checkbox",className:zt.checkboxContainer,onClick:i,children:[s.jsx("input",{type:"checkbox",checked:typeof t=="boolean"?t:!0,value:t,readOnly:!0,style:{border:`1.5px solid ${t?c:a}`,backgroundColor:t?c:"white"}}),s.jsx("span",{className:"checkmark",children:r(l)})]})};Le.propTypes={onClick:e.func,value:e.bool,containerStyles:e.object,color:e.string,indicator:e.shape({title:e.string,codename:e.array}),checkedColor:e.string};function ae(i,u){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,n){return o.__proto__=n,o},ae(i,u)}function Pt(i,u){i.prototype=Object.create(u.prototype),i.prototype.constructor=i,ae(i,u)}function ne(i){return i&&i.stopPropagation&&i.stopPropagation(),i&&i.preventDefault&&i.preventDefault(),!1}function ie(i){return i==null?[]:Array.isArray(i)?i.slice():[i]}function W(i){return i!==null&&i.length===1?i[0]:i.slice()}function X(i){Object.keys(i).forEach(u=>{typeof document<"u"&&document.addEventListener(u,i[u],!1)})}function R(i,u){return le(function(o,n){let t=o;return t<=n.min&&(t=n.min),t>=n.max&&(t=n.max),t}(i,u),u)}function le(i,u){const o=(i-u.min)%u.step;let n=i-o;return 2*Math.abs(o)>=u.step&&(n+=o>0?u.step:-u.step),parseFloat(n.toFixed(5))}let ce=function(i){function u(n){var t;(t=i.call(this,n)||this).onKeyUp=()=>{t.onEnd()},t.onMouseUp=()=>{t.onEnd(t.getMouseEventMap())},t.onTouchEnd=a=>{a.preventDefault(),t.onEnd(t.getTouchEventMap())},t.onBlur=()=>{t.setState({index:-1},t.onEnd(t.getKeyDownEventMap()))},t.onMouseMove=a=>{t.setState({pending:!0});const c=t.getMousePosition(a),d=t.getDiffPosition(c[0]),p=t.getValueFromPosition(d);t.move(p)},t.onTouchMove=a=>{if(a.touches.length>1)return;t.setState({pending:!0});const c=t.getTouchPosition(a);if(t.isScrolling===void 0){const h=c[0]-t.startPosition[0],m=c[1]-t.startPosition[1];t.isScrolling=Math.abs(m)>Math.abs(h)}if(t.isScrolling)return void t.setState({index:-1});const d=t.getDiffPosition(c[0]),p=t.getValueFromPosition(d);t.move(p)},t.onKeyDown=a=>{if(!(a.ctrlKey||a.shiftKey||a.altKey||a.metaKey))switch(t.setState({pending:!0}),a.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":a.preventDefault(),t.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":a.preventDefault(),t.moveUpByStep();break;case"Home":a.preventDefault(),t.move(t.props.min);break;case"End":a.preventDefault(),t.move(t.props.max);break;case"PageDown":a.preventDefault(),t.moveDownByStep(t.props.pageFn(t.props.step));break;case"PageUp":a.preventDefault(),t.moveUpByStep(t.props.pageFn(t.props.step))}},t.onSliderMouseDown=a=>{if(!t.props.disabled&&a.button!==2){if(t.setState({pending:!0}),!t.props.snapDragDisabled){const c=t.getMousePosition(a);t.forceValueFromPosition(c[0],d=>{t.start(d,c[0]),X(t.getMouseEventMap())})}ne(a)}},t.onSliderClick=a=>{if(!t.props.disabled&&t.props.onSliderClick&&!t.hasMoved){const c=t.getMousePosition(a),d=R(t.calcValue(t.calcOffsetFromPosition(c[0])),t.props);t.props.onSliderClick(d)}},t.createOnKeyDown=a=>c=>{t.props.disabled||(t.start(a),X(t.getKeyDownEventMap()),ne(c))},t.createOnMouseDown=a=>c=>{if(t.props.disabled||c.button===2)return;t.setState({pending:!0});const d=t.getMousePosition(c);t.start(a,d[0]),X(t.getMouseEventMap()),ne(c)},t.createOnTouchStart=a=>c=>{if(t.props.disabled||c.touches.length>1)return;t.setState({pending:!0});const d=t.getTouchPosition(c);t.startPosition=d,t.isScrolling=void 0,t.start(a,d[0]),X(t.getTouchEventMap()),function(p){p.stopPropagation&&p.stopPropagation()}(c)},t.handleResize=()=>{const a=window.setTimeout(()=>{t.pendingResizeTimeouts.shift(),t.resize()},0);t.pendingResizeTimeouts.push(a)},t.renderThumb=(a,c)=>{const d=t.props.thumbClassName+" "+t.props.thumbClassName+"-"+c+" "+(t.state.index===c?t.props.thumbActiveClassName:""),p={ref:m=>{t["thumb"+c]=m},key:t.props.thumbClassName+"-"+c,className:d,style:a,onMouseDown:t.createOnMouseDown(c),onTouchStart:t.createOnTouchStart(c),onFocus:t.createOnKeyDown(c),tabIndex:0,role:"slider","aria-orientation":t.props.orientation,"aria-valuenow":t.state.value[c],"aria-valuemin":t.props.min,"aria-valuemax":t.props.max,"aria-label":Array.isArray(t.props.ariaLabel)?t.props.ariaLabel[c]:t.props.ariaLabel,"aria-labelledby":Array.isArray(t.props.ariaLabelledby)?t.props.ariaLabelledby[c]:t.props.ariaLabelledby,"aria-disabled":t.props.disabled},h={index:c,value:W(t.state.value),valueNow:t.state.value[c]};return t.props.ariaValuetext&&(p["aria-valuetext"]=typeof t.props.ariaValuetext=="string"?t.props.ariaValuetext:t.props.ariaValuetext(h)),t.props.renderThumb(p,h)},t.renderTrack=(a,c,d)=>{const p={key:t.props.trackClassName+"-"+a,className:t.props.trackClassName+" "+t.props.trackClassName+"-"+a,style:t.buildTrackStyle(c,t.state.upperBound-d)},h={index:a,value:W(t.state.value)};return t.props.renderTrack(p,h)};let r=ie(n.value);r.length||(r=ie(n.defaultValue)),t.pendingResizeTimeouts=[];const l=[];for(let a=0;a<r.length;a+=1)r[a]=R(r[a],n),l.push(a);return t.resizeObserver=null,t.resizeElementRef=C.createRef(),t.state={index:-1,upperBound:0,sliderLength:0,value:r,zIndices:l},t}Pt(u,i);var o=u.prototype;return o.componentDidMount=function(){typeof window<"u"&&(this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.resizeElementRef.current),this.resize())},u.getDerivedStateFromProps=function(n,t){const r=ie(n.value);return r.length?t.pending?null:{value:r.map(l=>R(l,n))}:null},o.componentDidUpdate=function(){this.state.upperBound===0&&this.resize()},o.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),this.resizeObserver&&this.resizeObserver.disconnect()},o.onEnd=function(n){n&&function(t){Object.keys(t).forEach(r=>{typeof document<"u"&&document.removeEventListener(r,t[r],!1)})}(n),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pending:!1}),this.hasMoved=!1},o.getValue=function(){return W(this.state.value)},o.getClosestIndex=function(n){let t=Number.MAX_VALUE,r=-1;const{value:l}=this.state,a=l.length;for(let c=0;c<a;c+=1){const d=this.calcOffset(l[c]),p=Math.abs(n-d);p<t&&(t=p,r=c)}return r},o.getMousePosition=function(n){return[n["page"+this.axisKey()],n["page"+this.orthogonalAxisKey()]]},o.getTouchPosition=function(n){const t=n.touches[0];return[t["page"+this.axisKey()],t["page"+this.orthogonalAxisKey()]]},o.getKeyDownEventMap=function(){return{keydown:this.onKeyDown,keyup:this.onKeyUp,focusout:this.onBlur}},o.getMouseEventMap=function(){return{mousemove:this.onMouseMove,mouseup:this.onMouseUp}},o.getTouchEventMap=function(){return{touchmove:this.onTouchMove,touchend:this.onTouchEnd}},o.getValueFromPosition=function(n){const t=n/(this.state.sliderLength-this.state.thumbSize)*(this.props.max-this.props.min);return R(this.state.startValue+t,this.props)},o.getDiffPosition=function(n){let t=n-this.state.startPosition;return this.props.invert&&(t*=-1),t},o.resize=function(){const{slider:n,thumb0:t}=this;if(!n||!t)return;const r=this.sizeKey(),l=n.getBoundingClientRect(),a=n[r],c=l[this.posMaxKey()],d=l[this.posMinKey()],p=t.getBoundingClientRect()[r.replace("client","").toLowerCase()],h=a-p,m=Math.abs(c-d);this.state.upperBound===h&&this.state.sliderLength===m&&this.state.thumbSize===p||this.setState({upperBound:h,sliderLength:m,thumbSize:p})},o.calcOffset=function(n){const t=this.props.max-this.props.min;return t===0?0:(n-this.props.min)/t*this.state.upperBound},o.calcValue=function(n){return n/this.state.upperBound*(this.props.max-this.props.min)+this.props.min},o.calcOffsetFromPosition=function(n){const{slider:t}=this,r=t.getBoundingClientRect(),l=r[this.posMaxKey()],a=r[this.posMinKey()];let c=n-(window["page"+this.axisKey()+"Offset"]+(this.props.invert?l:a));return this.props.invert&&(c=this.state.sliderLength-c),c-=this.state.thumbSize/2,c},o.forceValueFromPosition=function(n,t){const r=this.calcOffsetFromPosition(n),l=this.getClosestIndex(r),a=R(this.calcValue(r),this.props),c=this.state.value.slice();c[l]=a;for(let d=0;d<c.length-1;d+=1)if(c[d+1]-c[d]<this.props.minDistance)return;this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0,this.setState({value:c},()=>{t(l),this.fireChangeEvent("onChange")})},o.clearPendingResizeTimeouts=function(){do{const n=this.pendingResizeTimeouts.shift();clearTimeout(n)}while(this.pendingResizeTimeouts.length)},o.start=function(n,t){const r=this["thumb"+n];r&&r.focus();const{zIndices:l}=this.state;l.splice(l.indexOf(n),1),l.push(n),this.setState(a=>({startValue:a.value[n],startPosition:t!==void 0?t:a.startPosition,index:n,zIndices:l}))},o.moveUpByStep=function(n){n===void 0&&(n=this.props.step);const t=this.state.value[this.state.index],r=R(this.props.invert&&this.props.orientation==="horizontal"?t-n:t+n,this.props);this.move(Math.min(r,this.props.max))},o.moveDownByStep=function(n){n===void 0&&(n=this.props.step);const t=this.state.value[this.state.index],r=R(this.props.invert&&this.props.orientation==="horizontal"?t+n:t-n,this.props);this.move(Math.max(r,this.props.min))},o.move=function(n){const t=this.state.value.slice(),{index:r}=this.state,{length:l}=t,a=t[r];if(n===a)return;this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;const{pearling:c,max:d,min:p,minDistance:h}=this.props;if(!c){if(r>0){const m=t[r-1];n<m+h&&(n=m+h)}if(r<l-1){const m=t[r+1];n>m-h&&(n=m-h)}}t[r]=n,c&&l>1&&(n>a?(this.pushSucceeding(t,h,r),function(m,g,y,b){for(let x=0;x<m;x+=1){const f=b-x*y;g[m-1-x]>f&&(g[m-1-x]=f)}}(l,t,h,d)):n<a&&(this.pushPreceding(t,h,r),function(m,g,y,b){for(let x=0;x<m;x+=1){const f=b+x*y;g[x]<f&&(g[x]=f)}}(l,t,h,p))),this.setState({value:t},this.fireChangeEvent.bind(this,"onChange"))},o.pushSucceeding=function(n,t,r){let l,a;for(l=r,a=n[l]+t;n[l+1]!==null&&a>n[l+1];l+=1,a=n[l]+t)n[l+1]=le(a,this.props)},o.pushPreceding=function(n,t,r){for(let l=r,a=n[l]-t;n[l-1]!==null&&a<n[l-1];l-=1,a=n[l]-t)n[l-1]=le(a,this.props)},o.axisKey=function(){return this.props.orientation==="vertical"?"Y":"X"},o.orthogonalAxisKey=function(){return this.props.orientation==="vertical"?"X":"Y"},o.posMinKey=function(){return this.props.orientation==="vertical"?this.props.invert?"bottom":"top":this.props.invert?"right":"left"},o.posMaxKey=function(){return this.props.orientation==="vertical"?this.props.invert?"top":"bottom":this.props.invert?"left":"right"},o.sizeKey=function(){return this.props.orientation==="vertical"?"clientHeight":"clientWidth"},o.fireChangeEvent=function(n){this.props[n]&&this.props[n](W(this.state.value),this.state.index)},o.buildThumbStyle=function(n,t){const r={position:"absolute",touchAction:"none",willChange:this.state.index>=0?this.posMinKey():void 0,zIndex:this.state.zIndices.indexOf(t)+1};return r[this.posMinKey()]=n+"px",r},o.buildTrackStyle=function(n,t){const r={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():void 0};return r[this.posMinKey()]=n,r[this.posMaxKey()]=t,r},o.buildMarkStyle=function(n){var t;return(t={position:"absolute"})[this.posMinKey()]=n,t},o.renderThumbs=function(n){const{length:t}=n,r=[];for(let a=0;a<t;a+=1)r[a]=this.buildThumbStyle(n[a],a);const l=[];for(let a=0;a<t;a+=1)l[a]=this.renderThumb(r[a],a);return l},o.renderTracks=function(n){const t=[],r=n.length-1;t.push(this.renderTrack(0,0,n[0]));for(let l=0;l<r;l+=1)t.push(this.renderTrack(l+1,n[l],n[l+1]));return t.push(this.renderTrack(r+1,n[r],this.state.upperBound)),t},o.renderMarks=function(){let{marks:n}=this.props;const t=this.props.max-this.props.min+1;return typeof n=="boolean"?n=Array.from({length:t}).map((r,l)=>l):typeof n=="number"&&(n=Array.from({length:t}).map((r,l)=>l).filter(r=>r%n==0)),n.map(parseFloat).sort((r,l)=>r-l).map(r=>{const l=this.calcOffset(r),a={key:r,className:this.props.markClassName,style:this.buildMarkStyle(l)};return this.props.renderMark(a)})},o.render=function(){const n=[],{value:t}=this.state,r=t.length;for(let d=0;d<r;d+=1)n[d]=this.calcOffset(t[d],d);const l=this.props.withTracks?this.renderTracks(n):null,a=this.renderThumbs(n),c=this.props.marks?this.renderMarks():null;return C.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},l,a,c)},u}(C.Component);ce.displayName="ReactSlider",ce.defaultProps={min:0,max:100,step:1,pageFn:i=>10*i,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:i=>C.createElement("div",i),renderTrack:i=>C.createElement("div",i),renderMark:i=>C.createElement("span",i)};var Vt=ce;const Kt="_container_15vgv_2",Ut="_unitLabel_15vgv_9",Zt="_slider_15vgv_12",Ht="_thumb_15vgv_18",Gt="_track_15vgv_27",Yt="_labels_15vgv_33",z={container:Kt,unitLabel:Ut,slider:Zt,thumb:Ht,track:Gt,labels:Yt},Fe=({min:i=0,max:u=100,step:o=1,onChange:n,width:t=300,unit:r,fontColor:l="#605B56",value:a=[i,u]})=>{const{t:c}=j.useTranslation(),d=p=>{n==null||n({min:p[0],max:p[1]})};return s.jsxs("div",{className:z.container,style:{width:`${t}px`,color:`${l}`},children:[s.jsx("div",{className:z.unitLabel,children:s.jsx("span",{children:c(r)})}),s.jsx(Vt,{className:z.slider,thumbClassName:z.thumb,trackClassName:z.track,min:i,max:u,step:o,value:a,onChange:d,withTracks:!0,pearling:!0,minDistance:1}),s.jsxs("div",{className:z.labels,children:[s.jsx("span",{children:a[0]}),s.jsx("span",{children:a[1]})]})]})};Fe.propTypes={min:e.number,max:e.number,step:e.number,initialMin:e.number,initialMax:e.number,onChange:e.func,width:e.number,unit:e.string,fontColor:e.string,value:e.arrayOf(e.number)};const Wt="_tematicalFiltersInputContainer_1vm1r_2",Xt="_inputTypeContainer_1vm1r_2",Jt="_checkboxContainer_1vm1r_28",Qt="_absoluteSliderContainer_1vm1r_37",J={tematicalFiltersInputContainer:Wt,inputTypeContainer:Xt,checkboxContainer:Jt,absoluteSliderContainer:Qt},pe=({indicator:i,activeColor:u})=>{const[o,n]=C.useState(),{type:t,name:r,values:l,minValue:a,maxValue:c,unit:d}=i||{},p=C.useMemo(()=>t=="cat"||o=="cat",[o,t]),h=C.useMemo(()=>t=="abs"||o=="abs",[o,t]),{tematicalFiltersSelected:m,selectedIndicator:g,fontColor:y,inputsColor:b}=T(_=>_),x=_=>{if(_){const{min:S,max:v,valueClicked:k,allValues:L}=_||{},{code:F,type:te}=i||{},V=h?"abs":p?"cat":"both";let B=F[0];te=="both"&&(B=V=="cat"?F[1]:F[0]),V=="cat"?T.setState(q=>{let D=q.tematicalFiltersSelected.find(M=>M.code===B);if(D){let M=[D.values];if(D.values.includes(k)){if(M=D.values.filter($=>$!==k),M.length<1)return{tematicalFiltersSelected:q.tematicalFiltersSelected.filter($=>$.code!==B)}}else M=[...D.values,k];return{tematicalFiltersSelected:q.tematicalFiltersSelected.map($=>$.code===B?{...$,values:M}:$)}}else{console.log("entra aqui: ",L," ",k);let M=L.map(($,Qe)=>Qe);return{tematicalFiltersSelected:[...m,{type:"cat",code:B,values:M.filter($=>$!==k),name:i.name}]}}}):V=="abs"&&T.setState(q=>{let D=q.tematicalFiltersSelected.find(M=>M.code===B);if(D){let M={...D};return M.min=S,M.max=v,{tematicalFiltersSelected:q.tematicalFiltersSelected.map($=>$.code===B?M:$)}}else return{tematicalFiltersSelected:[...m,{type:"abs",code:B,min:S,max:v}]}})}},f=C.useMemo(()=>{const _={};if((m==null?void 0:m.length)>0)for(const S of m)S.type==="cat"?_[S.code]=new Set(S.values):_[S.code]=[S.min,S.max];return _},[m]);return s.jsx("div",{className:J.tematicalFiltersInputContainer,children:s.jsxs(O,{titleFontStyles:{fontSize:16,fontWeight:400},title:r,isOpen:g==`id${r}`,onClick:()=>T.setState(()=>({selectedIndicator:g==`id${r}`?"":`id${r}`})),showBottomBar:!1,height:38,titleMarginChildren:14,className:"tematicalFiltersInputContainer",color:y,activeColor:u,children:[t=="both"&&s.jsxs("div",{className:J.inputTypeContainer,style:{color:y},children:[s.jsxs("label",{children:[s.jsx("input",{type:"radio",name:"tipo",value:"abs",onChange:()=>{n("abs")},style:{marginRight:4,backgroundColor:o=="abs"?b:"white",border:`1.5px solid ${o=="abs"?b:y}`}}),"Absoluto"]}),s.jsxs("label",{children:[s.jsx("input",{type:"radio",name:"tipo",value:"cat",onChange:()=>{n("cat")},style:{marginRight:4,backgroundColor:o=="cat"?b:"white",border:`1.5px solid ${o=="cat"?b:y}`}}),"Categórico"]})]}),p&&s.jsx("div",{className:J.checkboxContainer,children:l.map((_,S)=>{var v;return s.jsx(Le,{onClick:()=>x({valueClicked:S,allValues:l}),indicator:_,value:((v=f[i.code[t=="both"?1:0]])==null?void 0:v.has(S))||!f[i.code[t=="both"?1:0]]},`checkbox-${S}`)})}),h&&s.jsx("div",{className:J.absoluteSliderContainer,children:s.jsx(Fe,{onChange:x,min:a,max:c,unit:d,value:f[i.code[0]]})})]})})};pe.propTypes={indicator:e.shape({name:e.string,type:e.string,code:e.arrayOf(e.string),values:e.arrayOf(e.shape({codename:e.oneOfType(e.array,e.string),title:e.string}))}),activeColor:e.string};const Be=({subcategory:i,fontColor:u,activeColor:o})=>{const{activeSubcategory:n}=T(l=>l),{name:t,indicators:r}=i||{};return s.jsx(O,{title:t,isOpen:n==`id${t}`,onClick:()=>{T.setState(l=>({activeSubcategory:l.activeSubcategory===`id${t}`?"":`id${t}`}))},titleFontStyles:{fontSize:16,fontWeight:400},showBottomBar:!1,titleMarginChildren:20,height:49,color:u,activeColor:o,children:r==null?void 0:r.map((l,a)=>s.jsx(pe,{indicator:l,fontColor:u},`indicatorSub-${a}`))})};Be.propTypes={subcategory:e.shape({name:e.string,indicators:e.arrayOf(e.shape({name:e.string,value:e.string}))}),activeColor:e.string};const De=({category:i,activeColor:u})=>{const{name:o,subcategories:n,indicators:t}=i||{},{activeCategory:r,fontColor:l}=T(a=>a);return i&&s.jsx(O,{onClick:()=>{T.setState(a=>({activeCategory:r===`id${o}`?"":`id${o}`}))},title:o,isOpen:r===`id${o}`,titleFontStyles:{fontSize:18,fontWeight:"bold"},showBottomBar:!1,color:l,activeColor:u,children:n?n.map((a,c)=>s.jsx(Be,{subcategory:a,fontColor:l,activeColor:u},`subcategory-${c}`)):t&&t.map((a,c)=>s.jsx(pe,{indicator:a,fontColor:l,activeColor:u},`indicator-${c}`))})};De.propTypes={category:e.shape({name:e.string.isRequired,subcategories:e.array,indicators:e.array}),activeColor:e.string};const Oe=({indicators:i,isOpen:u=!0,title:o,fontColor:n="#605B56",inputsColor:t="#605B56",activeColor:r})=>{const{tematicalFiltersSelected:l}=T(c=>c),{t:a}=j.useTranslation();return C.useEffect(()=>{console.log("filtersSelected changed: ",l)},[l]),C.useEffect(()=>{n&&T.setState(()=>({fontColor:n}))},[n]),C.useEffect(()=>{t&&T.setState(()=>({inputsColor:t}))},[t]),s.jsx(O,{isOpen:u,title:o?a(o):"Tematical filters",color:n,activeColor:r,children:i==null?void 0:i.map((c,d)=>s.jsx(De,{category:c,fontColor:n,activeColor:r},`category-${d}`))})};Oe.propTypes={isOpen:e.bool,title:e.string,indicators:e.arrayOf(e.object),fontColor:e.string,onChangeTematicalFilters:e.func,inputsColor:e.string,activeColor:e.string};const es="_FiltersAmbitContainer_6o4gt_2",ts="_FiltersAmbitHeader_6o4gt_7",ss="_FiltersAmbitTitle_6o4gt_15",ns="_FiltersAmbitDescription_6o4gt_22",is="_FiltersAmbitDescriptionTitle_6o4gt_33",H={FiltersAmbitContainer:es,FiltersAmbitHeader:ts,FiltersAmbitTitle:ss,FiltersAmbitDescription:ns,FiltersAmbitDescriptionTitle:is},Ae=({ambitName:i,ambitDescription:u,defaultFilters:o,indicators:n,activeColor:t,textColor:r,backgroundColor:l,onChangeAppliedFilters:a})=>{const{t:c}=j.useTranslation(),{tematicalFiltersSelected:d}=T(p=>p);return C.useEffect(()=>{o&&o.length>0&&T.setState(p=>({tematicalFiltersSelected:o}))},[o]),C.useEffect(()=>{console.log("filtersSelected changed: ",d),a(d)},[d]),s.jsxs("div",{className:H.FiltersAmbitContainer,children:[s.jsxs("div",{className:H.FiltersAmbitHeader,children:[s.jsx("div",{className:H.FiltersAmbitTitle,children:i}),s.jsxs("div",{className:H.FiltersAmbitDescription,children:[s.jsx("div",{className:H.FiltersAmbitDescriptionTitle,children:c("description")}),u]})]}),s.jsx(Me,{title:c("applied_filters"),isOpen:!0,textColor:r||"#fff",backgroundColor:l||"#605B5680",activeColor:t}),s.jsx($e,{activeColor:t}),s.jsx(Oe,{indicators:n,inputsColor:t,textColor:r,title:"tematical_filters",activeColor:t})]})};Ae.propTypes={indicators:e.arrayOf(e.object).isRequired,ambitName:e.string,ambitDescription:e.string,defaultFilters:e.arrayOf(e.object),activeColor:e.string,backgroundColor:e.string,textColor:e.string,onChangeAppliedFilters:e.func};const os="_barChartContainer_d2f1z_2",rs={barChartContainer:os},Re=({data:i,width:u=700,barHeight:o=25,gap:n=23,fontColor:t="#605B56",verticalPaddign:r=10,horizontalPaddign:l=20,leftPadding:a=200,numberOfDivisions:c=7,maxValue:d=null})=>{const{t:p}=j.useTranslation(),{xScale:h,ticks:m,height:g}=C.useMemo(()=>{if(i&&i.length>0){const y=(i==null?void 0:i.length)*(o+n)+r*2,b=be.max(i,_=>_.value)||1,x=be.scaleLinear().domain([0,d||b]).range([0,u-a]),f=Array.from({length:c+1},(_,S)=>d?d/c*S:b/c*S);return{xScale:x,ticks:f,height:y,width:u,verticalPaddign:r,horizontalPaddign:l}}else return{xScale:null,ticks:[],height:0}},[i,u,c,o,n,l,r,d]);return s.jsx("div",{className:rs.barChartContainer,children:s.jsx("svg",{width:u+l*2,height:g,children:s.jsxs("g",{transform:`translate(0,${n})`,children:[s.jsx("g",{transform:`translate(${a+l}, 0)`,children:m.map((y,b)=>{const x=h(y);return s.jsxs("g",{transform:`translate(${x}, 0)`,children:[s.jsx("line",{y1:0,y2:g-n*2,stroke:"#ccc"}),s.jsx("text",{y:g-n,textAnchor:"middle",fontSize:10,fill:t,children:parseInt(y)})]},b)})}),i&&i.length>0&&(i==null?void 0:i.map((y,b)=>{const x=h(y.value),f=b*(o+n);return s.jsxs("g",{transform:`translate(${a+l}, ${f})`,children:[s.jsx("text",{x:-24,y:o/2+5,textAnchor:"end",fill:t,children:p(y.title)}),s.jsx("rect",{width:x,height:o,fill:y.color,rx:0})]},b)}))]})})})};Re.propTypes={data:e.arrayOf(e.shape({title:e.string,value:e.number,color:e.string})),width:e.number,barHeight:e.number,gap:e.number,verticalPaddign:e.number,horizontalPaddign:e.number,numberOfDivisions:e.number,fontColor:e.string};const as="_graphicContainer_c9zrg_2",ls="_titleContainer_c9zrg_14",xe={graphicContainer:as,titleContainer:ls},Ie=({data:i,graphWidth:u=700,containerStyle:o,borderColor:n="#605B56",title:t="Graphic Title",fontColor:r="#605B56",maxValue:l=null,numberOfDivisions:a=7,leftPadding:c=200})=>{const{t:d}=j.useTranslation();return s.jsxs("div",{className:xe.graphicContainer,style:{...o||{},border:`1.5px solid ${n}`},children:[s.jsx("div",{className:xe.titleContainer,children:s.jsx("h2",{children:d(t)})}),s.jsx(Re,{data:i,width:u,fontColor:r,maxValue:l,numberOfDivisions:a,leftPadding:c})]})};Ie.propTypes={data:e.arrayOf(e.shape({color:e.string.isRequired,value:e.number.isRequired,title:e.string.isRequired})),borderColor:e.string,title:e.string,graphWidth:e.number,containerStyle:e.object,fontColor:e.string,maxValue:e.number,numberOfDivisions:e.number,leftPadding:e.number};const cs="_indicatorsCategory_1cu33_2",us="_title_1cu33_5",ds="_list_1cu33_11",oe={indicatorsCategory:cs,title:us,list:ds},ps="_indicatorContainer_lw8gx_2",hs="_indicatorNameContainer_lw8gx_11",ms="_dot_lw8gx_20",gs="_indicatorName_lw8gx_11",bs="_switchExternalContainer_lw8gx_31",fs="_switchType_lw8gx_40",ys="_switchTypeOptions_lw8gx_44",xs="_optionContainer_lw8gx_55",Cs="_customRadious_lw8gx_65",vs="_optionText_lw8gx_72",w={indicatorContainer:ps,indicatorNameContainer:hs,dot:ms,indicatorName:gs,switchExternalContainer:bs,switchType:fs,switchTypeOptions:ys,optionContainer:xs,customRadious:Cs,optionText:vs},he=({indicator:i,values:u=[],activeColor:o,defaultColor:n="#92898A",activeIndicator:t,activeIndicatorType:r,onClickIndicator:l,multiple:a=!1,onChangeType:c})=>{const{t:d}=j.useTranslation(),{name:p,type:h}=i,[m,g]=C.useState(!1);C.useEffect(()=>{t&&g(a?t.some(x=>x.name==String(p)):t.name==p)},[t]);const y=()=>s.jsx("div",{className:w.switchExternalContainer,children:s.jsx("div",{className:w.switchType,children:s.jsxs("div",{className:w.switchTypeOptions,children:[s.jsxs("div",{className:w.optionContainer,onClick:()=>c("cat"),children:[s.jsx("span",{className:`${w.customRadious}`,style:{backgroundColor:r==="cat"?o:"transparent",borderColor:r==="cat"?o:n}}),s.jsx("h4",{className:w.optionText,style:{color:r==="cat"?o:n},children:d("indicators.cat")})]}),s.jsxs("div",{className:w.optionContainer,onClick:()=>c("abs"),children:[s.jsx("span",{className:`${w.customRadious}`,style:{backgroundColor:r==="abs"?o:"transparent",borderColor:r==="abs"?o:n}}),s.jsx("h4",{className:w.optionText,style:{color:r==="abs"?o:n},children:d("indicators.abs")})]})]})})}),b=()=>s.jsx("div",{className:w.switchExternalContainer,children:s.jsx("div",{className:w.switchType,children:s.jsx("div",{className:w.switchTypeOptions,children:u.map((x,f)=>s.jsxs("div",{className:w.optionContainer,children:[s.jsx("span",{className:w.customRadious}),s.jsx("h4",{children:d(x.unit)})]},f))})})});return s.jsxs("div",{className:w.indicatorContainer,children:[s.jsxs("div",{className:w.indicatorNameContainer,onClick:()=>l({indicator:i}),children:[s.jsx("div",{style:{border:m?`1px solid ${o}`:`1px solid ${n}`},className:w.dot}),s.jsx("h4",{className:w.indicatorName,style:{color:m?o:n},children:s.jsx(j.Trans,{i18nKey:p,components:{sup:s.jsx("sup",{})}})})]}),(t==null?void 0:t.name)===p&&h==="both"&&s.jsx("div",{children:y()}),(t==null?void 0:t.name)===p&&h==="twoUnits"&&s.jsx("div",{children:b()})]})};he.propTypes={indicator:e.shape({name:e.string,type:e.string}),values:e.oneOfType([e.bool,e.array]),activeColor:e.string,defaultColor:e.string,activeIndicator:e.oneOfType([e.object,e.array]),multiple:e.bool,onClickIndicator:e.func};const _s="_indicatorsSubCategory_1dzsi_2",js="_list_1dzsi_8",Ce={indicatorsSubCategory:_s,list:js},qe=({subcName:i,indicators:u,defaultColor:o,activeColor:n,activeSubCategory:t,onClickSubCategory:r,id:l,activeIndicator:a,onClickIndicator:c,multiple:d,activeIndicatorType:p,onChangeType:h})=>{const{t:m}=j.useTranslation(),[g,y]=C.useState(!1);return C.useEffect(()=>{y(t==l)},[t,l]),s.jsxs(ue.motion.div,{className:Ce.indicatorsSubCategory,initial:{height:"43px"},animate:{height:g?"auto":"43px"},transition:{duration:.4},children:[s.jsx("button",{onClick:()=>r(l),children:s.jsxs("h3",{style:{color:g?n:o},children:[s.jsx("span",{style:{color:g?n:o},children:g?"-":"+"}),s.jsx("span",{style:{marginLeft:12,color:g?n:o},children:m(i)})]})}),u&&s.jsx("div",{className:Ce.list,children:u==null?void 0:u.map((b,x)=>s.jsx(he,{indicator:b,defaultColor:o,activeColor:n,activeIndicator:a,onClickIndicator:c,multiple:d,activeIndicatorType:p,onChangeType:h},"indicator"+x))})]})};qe.propTypes={subcName:e.string,indicators:e.array,activeColor:e.string,defaultColor:e.string,activeSubCategory:e.string,id:e.string,activeIndicator:e.oneOfType([e.object,e.array]),multiple:e.bool,onClickSubCategory:e.func,onClickIndicator:e.func};const Ee=({cat:i,id:u,activeColor:o,defaultColor:n,onClickCategory:t,activeCategory:r,activeSubCategory:l,onClickSubCategory:a,activeIndicator:c,onClickIndicator:d,multiple:p,activeIndicatorType:h,onChangeType:m})=>{var x;const{t:g}=j.useTranslation(),[y,b]=C.useState(!1);return C.useEffect(()=>{b(r===u)},[r,u]),s.jsxs(ue.motion.div,{className:oe.indicatorsCategory,initial:{height:"53px"},animate:{height:y?"auto":"53px"},transition:{duration:.4},style:{backgroundColor:"white",borderBottom:y?`1px solid ${o}`:"0px",marginBottom:y?"20px":"0px"},children:[s.jsxs("h2",{className:`${oe.title}`,onClick:()=>t(u),children:[s.jsx("span",{style:{color:y?o:n},children:y?"-":"+"}),s.jsx("span",{style:{marginLeft:12,color:y?o:n},children:g(i.name)})]}),i.subcategories?i.subcategories.map(({name:f,subcategory:_,indicators:S},v)=>s.jsx(qe,{id:_,activeSubCategory:l,subcName:f,onClickSubCategory:a,activeIndicator:c,onClickIndicator:d,multiple:p,activeColor:o,defaultColor:n,indicators:S,activeIndicatorType:h,onChangeType:m},`subcKey ${v}`)):s.jsx("div",{className:oe.list,children:(x=i.indicators)==null?void 0:x.map((f,_)=>s.jsx(he,{indicator:f,values:f.type=="twoUnits"&&f.values,activeColor:o,defaultColor:n,activeIndicator:c,onClickIndicator:d,multiple:p,activeIndicatorType:h,onChangeType:m},`indicator${_}`))})]})};Ee.propTypes={cat:e.object,id:e.string,onChange:e.func,onClickCategory:e.func,activeCategory:e.string,activeSubCategory:e.string,onClickSubCategory:e.func,onClickIndicator:e.func,activeIndicator:e.oneOfType([e.object,e.array]),multiple:e.bool,activeColor:e.string,defaultColor:e.string};const Ss="_indicatorsList_fklyu_2",ks="_title_fklyu_6",ve={indicatorsList:Ss,title:ks},ze=({indicators:i,activeColor:u,defaultColor:o="#92898A",onChange:n,multiple:t=!1,defaultValue:r=null,changeIndType:l,activeIndicatorType:a})=>{const{t:c}=j.useTranslation(),[d,p]=C.useState(),[h,m]=C.useState(),[g,y]=C.useState(),b=v=>{p(d==v?null:v)},x=v=>{m(h==v?null:v)},f=({indicator:v})=>{console.log("onClickIndicator: ",v),_(v)},_=v=>{if(!t)y((g==null?void 0:g.name)==v.name?null:v);else{let k=g&&g.length>0?[...g]:[];y(k!=null&&k.some(L=>L.name==v.name)?k.filter(L=>L.name!=String(v.name)):[...k,v]),v.type=="both"&&l("cat")}};C.useEffect(()=>{console.log("activeindicator changed to: ",g),n&&typeof n=="function"&&g&&n({activeIndicator:g})},[g]),C.useLayoutEffect(()=>{if(r&&!g)if(t&&r&&Array.isArray(r)){let v=g&&g.length>0?[...g]:[];y([...v,...r]),S(r[0].name)}else _(r),S(r.name)},[]);const S=v=>{const k=i.find(L=>{if(L.subcategories){let F=L.subcategories.find(te=>te.indicators.find(V=>V.name==v));if(F)return m(F.subcategory),F}else return L.indicators.some(F=>F.name==v)});k&&p(k.category)};return s.jsxs("div",{className:ve.indicatorsList,children:[s.jsx("h2",{className:ve.title,style:{color:o},children:c("indicators.indicators")}),i.map((v,k)=>s.jsx(Ee,{id:v.category,cat:v,onClickCategory:b,activeCategory:d,onClickSubCategory:x,activeSubCategory:h,onClickIndicator:f,activeIndicator:g,activeColor:u,defaultColor:o,multiple:t,onChange:n,onChangeType:l,activeIndicatorType:a},`categoryKey${k}`))]})};ze.propTypes={indicators:e.arrayOf(e.object),activeColor:e.string,defaultColor:e.string,onChange:e.func,changeIndType:e.func,multiple:e.bool,activeIndicator:e.oneOfType([e.object,e.array]),defaultValue:e.oneOfType([e.object,e.array]),activeIndicatorType:e.string};const ws="_langSelector_1of0g_2",Ts="_currentLang_1of0g_7",Ns="_arrow_1of0g_19",Ms="_prevImg_1of0g_22",$s="_langMenu_1of0g_26",P={langSelector:ws,currentLang:Ts,arrow:Ns,prevImg:Ms,langMenu:$s},Pe=({langs:i,arrow:u,imgPrev:o})=>{const[n,t]=C.useState(!1),{i18n:r}=j.useTranslation(),l=i.find(c=>c.code==r.language),a=c=>{r.changeLanguage(c),t(!1)};return s.jsxs("div",{className:P.langSelector,children:[s.jsxs("div",{className:P.currentLang,onClick:()=>{t(!n)},children:[o&&s.jsx("img",{className:P.prevImg,src:o}),l.titleSelected||l.title,s.jsx("img",{src:u,className:P.arrow})]}),n&&s.jsx("div",{className:P.langMenu,children:i.map(c=>s.jsx("button",{className:l.code==c.code?P.active:"",onClick:()=>a(c.code),children:c.title},c.code))})]})};Pe.propTypes={langs:e.arrayOf(e.shape({code:e.string,title:e.string,titleSelected:e.string})),color:e.string,bckColor:e.string,hoverColor:e.string,arrow:e.object,imgPrev:e.object};const Ls="_legendContainer_atg3j_3",Fs="_closeButton_atg3j_18",Bs="_titleContainer_atg3j_46",Ds="_infoContainer_atg3j_52",Os="_titleLegendList_atg3j_63",As="_legendListContainer_atg3j_70",Rs="_gridContainer_atg3j_70",Is="_elementLegendContainer_atg3j_76",qs="_colorDot_atg3j_82",Es="_absoluteValueContainer_atg3j_88",zs="_absoluteValueColor_atg3j_91",Ps="_absoluteValueText_atg3j_96",Vs="_moreInfoContainer_atg3j_108",N={legendContainer:Ls,closeButton:Fs,titleContainer:Bs,infoContainer:Ds,titleLegendList:Os,legendListContainer:As,gridContainer:Rs,elementLegendContainer:Is,colorDot:qs,absoluteValueContainer:Es,absoluteValueColor:zs,absoluteValueText:Ps,moreInfoContainer:Vs},Ve=({containerStyles:i,title:u,infoList:o,legendList:n,legendListTitle:t,absoluteValue:r,onClickMoreInfo:l,buttonTitle:a,onClickClose:c})=>{const{t:d}=j.useTranslation();return s.jsxs("div",{style:i?{...i}:{},className:`${N.legendContainer}`,children:[s.jsx("button",{className:N.closeButton,onClick:c}),u&&s.jsx("div",{className:N.titleContainer,children:s.jsx("h2",{children:u})}),o&&o.length>0&&s.jsx("div",{className:N.infoContainer,children:s.jsx("ul",{children:o.map(({title:p,value:h})=>s.jsxs("li",{children:[s.jsx("h3",{className:N.title,children:`${p}:`}),s.jsxs("span",{className:N.value,children:[" ",h]})]},u))})}),s.jsx("h3",{className:N.titleLegendList,children:t?s.jsx(j.Trans,{i18nKey:t,components:{sup:s.jsx("sup",{})}}):d("mainUse")}),s.jsx("div",{className:N.legendListContainer,children:r?s.jsxs("div",{className:N.absoluteValueContainer,children:[s.jsx("div",{className:N.absoluteValueColor,style:{background:`linear-gradient(to bottom, ${r.maxColor} 0%, ${r.minColor} 100%)`}}),s.jsxs("div",{className:N.absoluteValueText,children:[s.jsxs("span",{children:[r.maxValue," ",d(r.unit)]}),s.jsxs("span",{children:[r.minValue," ",d(r.unit)]})]})]}):n&&n.length>0&&s.jsx("div",{className:N.gridContainer,children:n.map(({title:p,color:h})=>s.jsxs("div",{className:N.elementLegendContainer,children:[s.jsx("div",{className:N.colorDot,style:{backgroundColor:h}}),s.jsxs("div",{className:N.titleLegendElement,children:[d(p)," "]})]},u))})}),l&&s.jsx("button",{className:N.moreInfoContainer,onClick:l,children:a||d("moreInformation")})]})};Ve.propTypes={title:e.string,containerStyles:e.object,infoList:e.arrayOf(e.shape({title:e.string.isRequired,value:e.oneOfType([e.string,e.number])})),legendList:e.arrayOf(e.shape({title:e.string,color:e.string})),legendListTitle:e.string,absoluteValue:e.shape({maxColor:e.string,minColor:e.string,maxValue:e.number,minValue:e.number}),onClickMoreInfo:e.func,buttonTitle:e.string,onClickClose:e.func};const Ks="_logo_1ewa6_2",_e={logo:Ks},Ke=({src:i,alt:u,href:o})=>{const{t:n}=j.useTranslation(),t=s.jsx("img",{src:i,alt:n(u)});return o?s.jsx("div",{className:_e.logo,children:s.jsx("a",{href:o,children:t})}):s.jsx("div",{className:_e.logo,children:t})};Ke.propTypes={src:e.string.isRequired,alt:e.string.isRequired,href:e.string,className:e.string};const Us="_mapContainer_84pkf_2",Zs={mapContainer:Us};st.accessToken="pk.eyJ1IjoiY2ljbGljYSIsImEiOiJja3llODhxZ2UwYzF1Mm5xcHVhMzI3anhqIn0.-r56FLAzEH57eVsB2ZeVcA";const Ue=({initialView:i={latitude:39.4699,longitude:-.3763,zoom:12},maxZoom:u=17,minZoom:o=8,mapStyle:n,firstSymbolLayer:t,cssProps:r="",onClick:l="",interactiveLayers:a=[],popUp:c=!1,sources:d=[],layers:p=[]})=>{const h=C.useRef(),[m,g]=C.useState(null),y=Y.useSelector(b=>b.mapState.showTexts);return C.useEffect(()=>{if(h.current){const b=h.current.getMap();b.getStyle().layers.map(f=>{f.type=="symbol"&&f.id!="professionals"&&(y?b.setLayoutProperty(f.id,"visibility","visible"):b.setLayoutProperty(f.id,"visibility","none"))})}},[y]),s.jsx("div",{className:`${Zs.mapContainer}`,style:r,children:s.jsxs(K,{initialViewState:i,ref:h,hash:!1,maxZoom:u,minZoom:o,mapStyle:n,onClick:l,interactiveLayerIds:a,children:[d.length&&d.map((b,x)=>s.jsx(K.Source,{...b,children:p.length&&p.map((f,_)=>{if(f.sourceId==b.id)return s.jsx(K.Layer,{...f.layer,beforeId:t},_)})},x)),s.jsx(K.NavigationControl,{position:"bottom-right",visualizePitch:!0}),c&&m&&s.jsx(K.Popup,{longitude:c.longitude,latitude:c.latitude,anchor:c.anchor,onClose:()=>g(null),children:c.content})]})})};Ue.propTypes={initialView:e.shape({latitude:e.number.isRequired,longitude:e.number.isRequired,zoom:e.number.isRequired}),mapStyle:e.object,firstSymbolLayer:e.string,cssProps:e.object,style:e.object,maxZoom:e.number,minZoom:e.number,onClick:e.func,interactiveLayers:e.array,popUp:e.shape({latitude:e.number,longitude:e.number,anchor:e.string,content:e.element}),textsUrl:e.string,sources:e.arrayOf(e.shape({id:e.string,type:e.string,url:e.string,data:e.object})),layers:e.arrayOf(e.shape({sourceId:e.string,layer:e.shape({id:e.string,type:e.string,sourceLayer:e.string,minZoom:e.number,maxZoom:e.number,paint:e.object})}))};const Hs="_mapContainer_b0pyr_3",Gs={mapContainer:Hs},Ys="_FeaturePopUp_1gd6w_2",Ws="_title_1gd6w_2",je={FeaturePopUp:Ys,title:Ws},Xs=({props:i})=>{const{t:u}=j.useTranslation();return s.jsx("div",{className:je.FeaturePopUp,children:i.map(o=>s.jsxs("p",{children:[s.jsxs("span",{className:je.title,children:[s.jsx(j.Trans,{i18nKey:o.name,components:{sup:s.jsx("sup",{})}}),": "]}),o.value.toLocaleString("de",{maximumFractionDigits:2})," ",u(o.unit)]}))})},Ze=({initialView:i={latitude:39.4699,longitude:-.3763,zoom:12},maxZoom:u=17,minZoom:o=8,mapStyle:n,firstSymbolLayer:t,cssProps:r={},onClick:l="",interactiveLayers:a=[],sources:c=[],layers:d=[],filters:p,popUpParams:h,onClosePopUp:m,showTexts:g})=>{console.log(p);const y=C.useRef();return C.useEffect(()=>{if(y.current){const b=y.current.getMap();b.getStyle().layers.map(f=>{f.type=="symbol"&&f.id!="professionals"&&(g?b.setLayoutProperty(f.id,"visibility","visible"):b.setLayoutProperty(f.id,"visibility","none"))})}},[g]),C.useEffect(()=>{let b=new nt.Protocol;return me.addProtocol("pmtiles",b.tile),()=>{me.removeProtocol("pmtiles")}},[]),s.jsx("div",{className:`${Gs.mapContainer}`,style:r&&r,children:s.jsxs(U,{initialViewState:i,ref:y,hash:!1,maxZoom:u,minZoom:o,mapStyle:n,onClick:l,interactiveLayerIds:a,children:[c.length&&c.map((b,x)=>s.jsx(U.Source,{...b,children:d.length&&d.map((f,_)=>{if(f.sourceId==b.id)return s.jsx(U.Layer,{...f.layer,beforeId:t,filter:p&&p},_)})},x)),s.jsx(U.NavigationControl,{position:"bottom-right",visualizePitch:!0}),h&&s.jsx(U.Popup,{longitude:h.lng,latitude:h.lat,onClose:m,children:s.jsx(Xs,{props:h.props})})]})})};Ze.propTypes={initialView:e.shape({latitude:e.number.isRequired,longitude:e.number.isRequired,zoom:e.number.isRequired}),mapStyle:e.string,firstSymbolLayer:e.string,cssProps:e.object,style:e.object,maxZoom:e.number,minZoom:e.number,onClick:e.func,interactiveLayers:e.array,popUp:e.bool,sources:e.arrayOf(e.shape({id:e.string,type:e.string,url:e.string,data:e.object})),layers:e.arrayOf(e.shape({sourceId:e.string,layer:e.shape({id:e.string,type:e.string,sourceLayer:e.string,minZoom:e.number,maxZoom:e.number,paint:e.object})})),showTexts:e.bool,filters:e.array,popUpParams:e.object,onClosePopUp:e.func};const Js="_sectionBar_1nshk_2",Qs="_leftContent_1nshk_14",en="_textContainer_1nshk_20",tn="_title_1nshk_27",sn="_subtitle_1nshk_33",nn="_rightContent_1nshk_38",I={sectionBar:Js,leftContent:Qs,textContainer:en,title:tn,subtitle:sn,rightContent:nn},He=({leftIcon:i,title:u,subtitle:o,rightContent:n,mainColor:t})=>{const{t:r}=j.useTranslation();return s.jsxs("div",{className:I.sectionBar,children:[s.jsxs("div",{className:I.leftContent,children:[i&&s.jsx("img",{src:i,alt:"Icono",className:I.icon}),s.jsxs("div",{className:I.textContainer,children:[s.jsx("div",{className:I.title,style:t?{color:t}:{},children:r(u)}),o&&s.jsx("div",{className:I.subtitle,children:o})]})]}),s.jsx("div",{className:I.rightContent,children:n})]})};He.propTypes={leftIcon:e.node.isRequired,title:e.string.isRequired,subtitle:e.string,rightContent:e.node.isRequired,mainColor:e.string};const on=ke.createSlice({name:"mapSlice",initialState:{showTexts:!0,sliderSelectedYear:2025,activeIndicatorKey:0,activeIndicatorType:"cat",activeIndicatorUnit:null},reducers:{setShowTexts:(i,u)=>{i.showTexts=u.payload},setYear:(i,u)=>{i.sliderSelectedYear=u.payload},setActiveIndicatorKey:(i,u)=>{i.activeIndicatorKey=u.payload},setActiveIndicatorType:(i,u)=>{i.activeIndicatorType=u.payload},setActiveIndicatorUnit:(i,u)=>{i.activeIndicatorUnit=u.payload}}}),{setShowTexts:Tn,setYear:re,setActiveIndicatorKey:Nn,setActiveIndicatorType:Mn,setActiveIndicatorUnit:$n}=on.actions,rn="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",an="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",ln="_slider_a19yo_2",cn="_playButton_a19yo_17",un="_sliderOpen_a19yo_28",dn="_sliderResults_a19yo_32",G={slider:ln,playButton:cn,sliderOpen:un,sliderResults:dn},Ge=({onResults:i=!1,defaultYear:u=2025,firstYear:o=2025,lastYear:n=2050,zIndex:t=10,rightBarOpen:r=!1})=>{const[l,a]=C.useState(u),c=Y.useDispatch(),d=(f,_)=>{a(_),c(re(_-2e3))},[p,h]=C.useState(!1),m=()=>{h(!0)},g=()=>{h(!1)};((f,_)=>{const S=C.useRef();C.useEffect(()=>{S.current=f},[f]),C.useEffect(()=>{function v(){S.current()}{let k=setInterval(v,_);return()=>clearInterval(k)}},[_])})(()=>{p&&(l!=2050?(a(l+1),c(re(l-2e3+1))):(a(2025),c(re(25))))},1e3);const b=ge.createTheme({palette:{primary:{main:"#605b56"}},components:{MuiSlider:{styleOverrides:{mark:{height:10,backgroundColor:"#605b56"},valueLabel:{backgroundColor:"transparent",color:"#605b56",padding:0,top:3}}}}}),x=[{label:"",value:2025},{label:"",value:2032},{label:"",value:2041},{label:"",value:2050}];return s.jsx(ot.ThemeProvider,{theme:b,children:s.jsxs(ge.Box,{sx:{width:400},className:`${i?G.sliderResults:G.slider} ${r?G.sliderOpen:""}`,style:{zIndex:t},children:[o,s.jsx(it,{"aria-label":"TimeSlider",value:l,valueLabelDisplay:"on",step:1,marks:x,min:o,max:n,onChange:d,color:"primary",size:"small"}),n,!p&&s.jsx("button",{className:G.playButton,onClick:m,children:s.jsx("img",{src:rn,alt:"Play"})}),p&&s.jsx("button",{className:G.playButton,onClick:g,children:s.jsx("img",{src:an,alt:"Pause"})})]})})};Ge.propTypes={defaultYear:e.number,onResults:e.bool,firstYear:e.number,lastYear:e.number,zIndex:e.number,rightBarOpen:e.bool};const pn="_TopNavMenuContainer_ku22g_2",hn="_topNavOptions_ku22g_11",Se={TopNavMenuContainer:pn,topNavOptions:hn},Ye=({options:i=[],cssProps:u={},activeColor:o})=>{const{t:n}=j.useTranslation(),t=u.textColor||"inherit";u.borderColor;const r=u.height||"calc(70px - 10px);";return s.jsx("div",{className:Se.TopNavMenuContainer,children:i.map((l,a)=>s.jsx(rt.NavLink,{to:l.url,className:({isActive:c})=>`${Se.topNavOptions}`,style:{color:t,height:r,boxShadow:isActive?`0 5px 0 0 ${o}`:"inherit"},children:n(l.name)},a))})};Ye.propTypes={options:e.arrayOf(e.object),cssProps:e.shape({borderColor:e.string.isRequired,textColor:e.string.isRequired})};const mn=ke.createSlice({name:"userSlice",initialState:{user:{isLoggedIn:!1,username:""},showLogIn:!1,showUserMenu:!1},reducers:{setShowLogIn:(i,u)=>{i.showLogIn=u.payload},setShowUserMenu:(i,u)=>{i.showUserMenu=u.payload}}}),{setShowLogIn:gn,setShowUserMenu:bn}=mn.actions,fn="_UserMenuTrigger_uglss_2",yn={UserMenuTrigger:fn},We=({cssClass:i,loginLocale:u="login"})=>{const o=Y.useDispatch(),n=Y.useSelector(a=>a.userState.user.isLoggedIn),t=Y.useSelector(a=>a.userState.user.username),{t:r}=j.useTranslation(),l=()=>{o(n?gn(!0):bn(!0))};return s.jsx("div",{className:`${yn.UserMenuTrigger} link ${i}`,onClick:l,children:n?t:r(u)})};We.propTypes={onClickLoggedIn:e.func.isRequired,onClickLoggedOut:e.func.isRequired,log:e.bool,name:e.string,cssClass:e.string,loginLocale:e.string};const xn="_header_t7qdl_2",Cn="_leftComponents_t7qdl_12",vn="_centerComponents_t7qdl_13",_n="_rightComponents_t7qdl_14",Q={header:xn,leftComponents:Cn,centerComponents:vn,rightComponents:_n},Xe=({cssProps:i,leftComponents:u=[],centerComponents:o=[],rightComponents:n=[]})=>s.jsxs("div",{className:Q.header,style:i,children:[s.jsx("div",{className:Q.leftComponents,style:{height:i.height},children:u.map((t,r)=>s.jsx("div",{style:{height:i.height},children:t},r))}),s.jsx("div",{className:Q.centerComponents,style:{height:i.height},children:o.map((t,r)=>s.jsx("div",{style:{height:i.height},children:t},r))}),s.jsx("div",{className:Q.rightComponents,style:{height:i.height},children:n.map((t,r)=>s.jsx("div",{style:{height:i.height},children:t},r))})]});Xe.propTypes={cssProps:e.shape({backgroundColor:e.string.isRequired,height:e.string.isRequired,borderColor:e.string,textColor:e.string}),leftComponents:e.arrayOf(e.node),centerComponents:e.arrayOf(e.node),rightComponents:e.arrayOf(e.node)};const jn="_sidebar_1jqo2_2",Sn="_open_1jqo2_16",kn="_content_1jqo2_20",wn="_closeButton_1jqo2_26",ee={sidebar:jn,open:Sn,content:kn,closeButton:wn},Je=({width:i="300px",children:u,showRightBar:o,onCloseBar:n})=>{const t=()=>{n()};return s.jsx("div",{className:`${ee.sidebar} ${o?ee.open:""}`,style:{width:o?i:0},children:o&&s.jsxs("div",{className:ee.content,children:[s.jsx("button",{className:ee.closeButton,onClick:t,children:"×"}),u]})})};Je.propTypes={width:e.string,children:e.node,showRightBar:e.bool,onCloseBar:e.func};exports.AmbitSelector=Te;exports.ButtonsList=Ne;exports.DropdownList=O;exports.EditAmbit=Rt;exports.FiltersAmbit=Ae;exports.Graphic=Ie;exports.HeaderSection=Xe;exports.IndicatorsList=ze;exports.LangSelector=Pe;exports.Legend=Ve;exports.LogoApp=Ke;exports.MapboxMap=Ue;exports.MaplibreMap=Ze;exports.RightSidebar=Je;exports.SectionBar=He;exports.TimeSlider=Ge;exports.Tooltip=de;exports.TopNavMenu=Ye;exports.UserMenuTrigger=We;
|
|
3
|
+
${h&&A.active}`,children:y}),t&&s.jsx(pe,{text:m,position:r})]},c)})})};Ne.propTypes={buttons:e.arrayOf(e.shape({icon:e.node.isRequired,activeIcon:e.node,isActive:e.bool,name:e.string,onClick:e.func})).isRequired,orientation:e.oneOf(["horizontal","vertical"]),showName:e.bool,namePosition:e.oneOf(["left","right"]),useTooltip:e.bool,tooltipPosition:e.oneOf(["top","bottom","left","right"])};const Ot="_indicatorsCategory_1cu33_2",At="_title_1cu33_5",ne={indicatorsCategory:Ot,title:At},O=({isOpen:i,onClick:u,children:o,color:n,activeColor:t="#F8A925",title:r="Title",height:l=53,titleFontStyles:a,showBottomBar:c=!0,titleMarginChildren:d=25})=>{const{t:p}=j.useTranslation();return s.jsxs(de.motion.div,{className:ne.indicatorsCategory,initial:{height:`${l}px`},animate:{height:i?"auto":`${l}px`},transition:{duration:.4},style:{backgroundColor:"white",borderBottom:i&&c?`1px solid ${t}`:"0px",marginBottom:i?"20px":"0px"},children:[s.jsxs("h2",{style:{...a,marginBottom:d||"auto"},className:`${ne.title}`,onClick:u,children:[s.jsx("span",{style:{color:i?t:n},children:i?"-":"+"}),s.jsx("span",{style:{marginLeft:12,color:i?t:n},children:p(r)})]}),s.jsx("div",{className:ne.content,children:o})]})};O.propTypes={isOpen:e.bool,onClick:e.func,children:e.node,color:e.string,activeColor:e.string,title:e.string,height:e.number,showBottomBar:e.bool,titleFontStyles:e.object};const Rt=()=>s.jsx("div",{children:"EditAmbit"}),It="_AppliedFiltersContainer_s8ooe_2",qt="_AppliedFilterContent_s8ooe_10",ye={AppliedFiltersContainer:It,AppliedFilterContent:qt},T=et.create(i=>({activeCategory:"",activeSubCategory:"",selectedIndicator:"",tematicalFiltersSelected:[],fontColor:"#605B56",inputsColor:"#605B56"})),Me=({title:i,onClick:u,isOpen:o=!0,textColor:n="#ffffff",backgroundColor:t="#605B5680",activeColor:r})=>{const{t:l}=j.useTranslation(),{tematicalFiltersSelected:a}=T(d=>d),c=d=>{T.setState(p=>({tematicalFiltersSelected:p.tematicalFiltersSelected.filter(h=>h.code!==d)}))};return s.jsx(O,{isOpen:o,onClick:u,title:i?l(i):"Applied Filters",activeColor:r,children:s.jsx("div",{className:ye.AppliedFiltersContainer,children:a==null?void 0:a.map((d,p)=>s.jsxs("div",{className:ye.AppliedFilterContent,style:{color:n,background:t},children:[l(d.name),s.jsx("img",{src:jt,alt:"CloseIcon",onClick:()=>c(d.code),style:{cursor:"pointer"}})]},p))})})};Me.propTypes={isOpen:e.bool,onClick:e.func,title:e.string,textColor:e.string,backgroundColor:e.string,indicators:e.arrayOf(e.shape({title:e.string.isRequired,Codename:e.string.isRequired})),activeColor:e.string};const Le=({title:i,onClick:u,isOpen:o=!0,textColor:n="#ffffff",backgroundColor:t="#605B5680",activeColor:r})=>{const{t:l}=j.useTranslation(),{tematicalFiltersSelected:a}=T(c=>c);return s.jsx(O,{isOpen:o,onClick:u,title:i?l(i):"Geographical Filters",activeColor:r,children:"A"})};Le.propTypes={isOpen:e.bool,onClick:e.func,title:e.string,textColor:e.string,backgroundColor:e.string,activeColor:e.string};const Et="_checkboxContainer_zld97_2",zt={checkboxContainer:Et},$e=({onClick:i,containerStyles:u,color:o="#605B56",indicator:n,value:t})=>{const{t:r}=j.useTranslation(),{title:l}=n||{},{fontColor:a,inputsColor:c}=T(d=>d);return s.jsxs("div",{style:{...u,color:o},role:"checkbox",className:zt.checkboxContainer,onClick:i,children:[s.jsx("input",{type:"checkbox",checked:typeof t=="boolean"?t:!0,value:t,readOnly:!0,style:{border:`1.5px solid ${t?c:a}`,backgroundColor:t?c:"white"}}),s.jsx("span",{className:"checkmark",children:r(l)})]})};$e.propTypes={onClick:e.func,value:e.bool,containerStyles:e.object,color:e.string,indicator:e.shape({title:e.string,codename:e.array}),checkedColor:e.string};function le(i,u){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,n){return o.__proto__=n,o},le(i,u)}function Pt(i,u){i.prototype=Object.create(u.prototype),i.prototype.constructor=i,le(i,u)}function ie(i){return i&&i.stopPropagation&&i.stopPropagation(),i&&i.preventDefault&&i.preventDefault(),!1}function oe(i){return i==null?[]:Array.isArray(i)?i.slice():[i]}function W(i){return i!==null&&i.length===1?i[0]:i.slice()}function X(i){Object.keys(i).forEach(u=>{typeof document<"u"&&document.addEventListener(u,i[u],!1)})}function R(i,u){return ce(function(o,n){let t=o;return t<=n.min&&(t=n.min),t>=n.max&&(t=n.max),t}(i,u),u)}function ce(i,u){const o=(i-u.min)%u.step;let n=i-o;return 2*Math.abs(o)>=u.step&&(n+=o>0?u.step:-u.step),parseFloat(n.toFixed(5))}let ue=function(i){function u(n){var t;(t=i.call(this,n)||this).onKeyUp=()=>{t.onEnd()},t.onMouseUp=()=>{t.onEnd(t.getMouseEventMap())},t.onTouchEnd=a=>{a.preventDefault(),t.onEnd(t.getTouchEventMap())},t.onBlur=()=>{t.setState({index:-1},t.onEnd(t.getKeyDownEventMap()))},t.onMouseMove=a=>{t.setState({pending:!0});const c=t.getMousePosition(a),d=t.getDiffPosition(c[0]),p=t.getValueFromPosition(d);t.move(p)},t.onTouchMove=a=>{if(a.touches.length>1)return;t.setState({pending:!0});const c=t.getTouchPosition(a);if(t.isScrolling===void 0){const h=c[0]-t.startPosition[0],m=c[1]-t.startPosition[1];t.isScrolling=Math.abs(m)>Math.abs(h)}if(t.isScrolling)return void t.setState({index:-1});const d=t.getDiffPosition(c[0]),p=t.getValueFromPosition(d);t.move(p)},t.onKeyDown=a=>{if(!(a.ctrlKey||a.shiftKey||a.altKey||a.metaKey))switch(t.setState({pending:!0}),a.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":a.preventDefault(),t.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":a.preventDefault(),t.moveUpByStep();break;case"Home":a.preventDefault(),t.move(t.props.min);break;case"End":a.preventDefault(),t.move(t.props.max);break;case"PageDown":a.preventDefault(),t.moveDownByStep(t.props.pageFn(t.props.step));break;case"PageUp":a.preventDefault(),t.moveUpByStep(t.props.pageFn(t.props.step))}},t.onSliderMouseDown=a=>{if(!t.props.disabled&&a.button!==2){if(t.setState({pending:!0}),!t.props.snapDragDisabled){const c=t.getMousePosition(a);t.forceValueFromPosition(c[0],d=>{t.start(d,c[0]),X(t.getMouseEventMap())})}ie(a)}},t.onSliderClick=a=>{if(!t.props.disabled&&t.props.onSliderClick&&!t.hasMoved){const c=t.getMousePosition(a),d=R(t.calcValue(t.calcOffsetFromPosition(c[0])),t.props);t.props.onSliderClick(d)}},t.createOnKeyDown=a=>c=>{t.props.disabled||(t.start(a),X(t.getKeyDownEventMap()),ie(c))},t.createOnMouseDown=a=>c=>{if(t.props.disabled||c.button===2)return;t.setState({pending:!0});const d=t.getMousePosition(c);t.start(a,d[0]),X(t.getMouseEventMap()),ie(c)},t.createOnTouchStart=a=>c=>{if(t.props.disabled||c.touches.length>1)return;t.setState({pending:!0});const d=t.getTouchPosition(c);t.startPosition=d,t.isScrolling=void 0,t.start(a,d[0]),X(t.getTouchEventMap()),function(p){p.stopPropagation&&p.stopPropagation()}(c)},t.handleResize=()=>{const a=window.setTimeout(()=>{t.pendingResizeTimeouts.shift(),t.resize()},0);t.pendingResizeTimeouts.push(a)},t.renderThumb=(a,c)=>{const d=t.props.thumbClassName+" "+t.props.thumbClassName+"-"+c+" "+(t.state.index===c?t.props.thumbActiveClassName:""),p={ref:m=>{t["thumb"+c]=m},key:t.props.thumbClassName+"-"+c,className:d,style:a,onMouseDown:t.createOnMouseDown(c),onTouchStart:t.createOnTouchStart(c),onFocus:t.createOnKeyDown(c),tabIndex:0,role:"slider","aria-orientation":t.props.orientation,"aria-valuenow":t.state.value[c],"aria-valuemin":t.props.min,"aria-valuemax":t.props.max,"aria-label":Array.isArray(t.props.ariaLabel)?t.props.ariaLabel[c]:t.props.ariaLabel,"aria-labelledby":Array.isArray(t.props.ariaLabelledby)?t.props.ariaLabelledby[c]:t.props.ariaLabelledby,"aria-disabled":t.props.disabled},h={index:c,value:W(t.state.value),valueNow:t.state.value[c]};return t.props.ariaValuetext&&(p["aria-valuetext"]=typeof t.props.ariaValuetext=="string"?t.props.ariaValuetext:t.props.ariaValuetext(h)),t.props.renderThumb(p,h)},t.renderTrack=(a,c,d)=>{const p={key:t.props.trackClassName+"-"+a,className:t.props.trackClassName+" "+t.props.trackClassName+"-"+a,style:t.buildTrackStyle(c,t.state.upperBound-d)},h={index:a,value:W(t.state.value)};return t.props.renderTrack(p,h)};let r=oe(n.value);r.length||(r=oe(n.defaultValue)),t.pendingResizeTimeouts=[];const l=[];for(let a=0;a<r.length;a+=1)r[a]=R(r[a],n),l.push(a);return t.resizeObserver=null,t.resizeElementRef=C.createRef(),t.state={index:-1,upperBound:0,sliderLength:0,value:r,zIndices:l},t}Pt(u,i);var o=u.prototype;return o.componentDidMount=function(){typeof window<"u"&&(this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.resizeElementRef.current),this.resize())},u.getDerivedStateFromProps=function(n,t){const r=oe(n.value);return r.length?t.pending?null:{value:r.map(l=>R(l,n))}:null},o.componentDidUpdate=function(){this.state.upperBound===0&&this.resize()},o.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),this.resizeObserver&&this.resizeObserver.disconnect()},o.onEnd=function(n){n&&function(t){Object.keys(t).forEach(r=>{typeof document<"u"&&document.removeEventListener(r,t[r],!1)})}(n),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pending:!1}),this.hasMoved=!1},o.getValue=function(){return W(this.state.value)},o.getClosestIndex=function(n){let t=Number.MAX_VALUE,r=-1;const{value:l}=this.state,a=l.length;for(let c=0;c<a;c+=1){const d=this.calcOffset(l[c]),p=Math.abs(n-d);p<t&&(t=p,r=c)}return r},o.getMousePosition=function(n){return[n["page"+this.axisKey()],n["page"+this.orthogonalAxisKey()]]},o.getTouchPosition=function(n){const t=n.touches[0];return[t["page"+this.axisKey()],t["page"+this.orthogonalAxisKey()]]},o.getKeyDownEventMap=function(){return{keydown:this.onKeyDown,keyup:this.onKeyUp,focusout:this.onBlur}},o.getMouseEventMap=function(){return{mousemove:this.onMouseMove,mouseup:this.onMouseUp}},o.getTouchEventMap=function(){return{touchmove:this.onTouchMove,touchend:this.onTouchEnd}},o.getValueFromPosition=function(n){const t=n/(this.state.sliderLength-this.state.thumbSize)*(this.props.max-this.props.min);return R(this.state.startValue+t,this.props)},o.getDiffPosition=function(n){let t=n-this.state.startPosition;return this.props.invert&&(t*=-1),t},o.resize=function(){const{slider:n,thumb0:t}=this;if(!n||!t)return;const r=this.sizeKey(),l=n.getBoundingClientRect(),a=n[r],c=l[this.posMaxKey()],d=l[this.posMinKey()],p=t.getBoundingClientRect()[r.replace("client","").toLowerCase()],h=a-p,m=Math.abs(c-d);this.state.upperBound===h&&this.state.sliderLength===m&&this.state.thumbSize===p||this.setState({upperBound:h,sliderLength:m,thumbSize:p})},o.calcOffset=function(n){const t=this.props.max-this.props.min;return t===0?0:(n-this.props.min)/t*this.state.upperBound},o.calcValue=function(n){return n/this.state.upperBound*(this.props.max-this.props.min)+this.props.min},o.calcOffsetFromPosition=function(n){const{slider:t}=this,r=t.getBoundingClientRect(),l=r[this.posMaxKey()],a=r[this.posMinKey()];let c=n-(window["page"+this.axisKey()+"Offset"]+(this.props.invert?l:a));return this.props.invert&&(c=this.state.sliderLength-c),c-=this.state.thumbSize/2,c},o.forceValueFromPosition=function(n,t){const r=this.calcOffsetFromPosition(n),l=this.getClosestIndex(r),a=R(this.calcValue(r),this.props),c=this.state.value.slice();c[l]=a;for(let d=0;d<c.length-1;d+=1)if(c[d+1]-c[d]<this.props.minDistance)return;this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0,this.setState({value:c},()=>{t(l),this.fireChangeEvent("onChange")})},o.clearPendingResizeTimeouts=function(){do{const n=this.pendingResizeTimeouts.shift();clearTimeout(n)}while(this.pendingResizeTimeouts.length)},o.start=function(n,t){const r=this["thumb"+n];r&&r.focus();const{zIndices:l}=this.state;l.splice(l.indexOf(n),1),l.push(n),this.setState(a=>({startValue:a.value[n],startPosition:t!==void 0?t:a.startPosition,index:n,zIndices:l}))},o.moveUpByStep=function(n){n===void 0&&(n=this.props.step);const t=this.state.value[this.state.index],r=R(this.props.invert&&this.props.orientation==="horizontal"?t-n:t+n,this.props);this.move(Math.min(r,this.props.max))},o.moveDownByStep=function(n){n===void 0&&(n=this.props.step);const t=this.state.value[this.state.index],r=R(this.props.invert&&this.props.orientation==="horizontal"?t+n:t-n,this.props);this.move(Math.max(r,this.props.min))},o.move=function(n){const t=this.state.value.slice(),{index:r}=this.state,{length:l}=t,a=t[r];if(n===a)return;this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;const{pearling:c,max:d,min:p,minDistance:h}=this.props;if(!c){if(r>0){const m=t[r-1];n<m+h&&(n=m+h)}if(r<l-1){const m=t[r+1];n>m-h&&(n=m-h)}}t[r]=n,c&&l>1&&(n>a?(this.pushSucceeding(t,h,r),function(m,g,y,b){for(let x=0;x<m;x+=1){const f=b-x*y;g[m-1-x]>f&&(g[m-1-x]=f)}}(l,t,h,d)):n<a&&(this.pushPreceding(t,h,r),function(m,g,y,b){for(let x=0;x<m;x+=1){const f=b+x*y;g[x]<f&&(g[x]=f)}}(l,t,h,p))),this.setState({value:t},this.fireChangeEvent.bind(this,"onChange"))},o.pushSucceeding=function(n,t,r){let l,a;for(l=r,a=n[l]+t;n[l+1]!==null&&a>n[l+1];l+=1,a=n[l]+t)n[l+1]=ce(a,this.props)},o.pushPreceding=function(n,t,r){for(let l=r,a=n[l]-t;n[l-1]!==null&&a<n[l-1];l-=1,a=n[l]-t)n[l-1]=ce(a,this.props)},o.axisKey=function(){return this.props.orientation==="vertical"?"Y":"X"},o.orthogonalAxisKey=function(){return this.props.orientation==="vertical"?"X":"Y"},o.posMinKey=function(){return this.props.orientation==="vertical"?this.props.invert?"bottom":"top":this.props.invert?"right":"left"},o.posMaxKey=function(){return this.props.orientation==="vertical"?this.props.invert?"top":"bottom":this.props.invert?"left":"right"},o.sizeKey=function(){return this.props.orientation==="vertical"?"clientHeight":"clientWidth"},o.fireChangeEvent=function(n){this.props[n]&&this.props[n](W(this.state.value),this.state.index)},o.buildThumbStyle=function(n,t){const r={position:"absolute",touchAction:"none",willChange:this.state.index>=0?this.posMinKey():void 0,zIndex:this.state.zIndices.indexOf(t)+1};return r[this.posMinKey()]=n+"px",r},o.buildTrackStyle=function(n,t){const r={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():void 0};return r[this.posMinKey()]=n,r[this.posMaxKey()]=t,r},o.buildMarkStyle=function(n){var t;return(t={position:"absolute"})[this.posMinKey()]=n,t},o.renderThumbs=function(n){const{length:t}=n,r=[];for(let a=0;a<t;a+=1)r[a]=this.buildThumbStyle(n[a],a);const l=[];for(let a=0;a<t;a+=1)l[a]=this.renderThumb(r[a],a);return l},o.renderTracks=function(n){const t=[],r=n.length-1;t.push(this.renderTrack(0,0,n[0]));for(let l=0;l<r;l+=1)t.push(this.renderTrack(l+1,n[l],n[l+1]));return t.push(this.renderTrack(r+1,n[r],this.state.upperBound)),t},o.renderMarks=function(){let{marks:n}=this.props;const t=this.props.max-this.props.min+1;return typeof n=="boolean"?n=Array.from({length:t}).map((r,l)=>l):typeof n=="number"&&(n=Array.from({length:t}).map((r,l)=>l).filter(r=>r%n==0)),n.map(parseFloat).sort((r,l)=>r-l).map(r=>{const l=this.calcOffset(r),a={key:r,className:this.props.markClassName,style:this.buildMarkStyle(l)};return this.props.renderMark(a)})},o.render=function(){const n=[],{value:t}=this.state,r=t.length;for(let d=0;d<r;d+=1)n[d]=this.calcOffset(t[d],d);const l=this.props.withTracks?this.renderTracks(n):null,a=this.renderThumbs(n),c=this.props.marks?this.renderMarks():null;return C.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},l,a,c)},u}(C.Component);ue.displayName="ReactSlider",ue.defaultProps={min:0,max:100,step:1,pageFn:i=>10*i,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:i=>C.createElement("div",i),renderTrack:i=>C.createElement("div",i),renderMark:i=>C.createElement("span",i)};var Vt=ue;const Kt="_container_15vgv_2",Ut="_unitLabel_15vgv_9",Zt="_slider_15vgv_12",Ht="_thumb_15vgv_18",Gt="_track_15vgv_27",Yt="_labels_15vgv_33",z={container:Kt,unitLabel:Ut,slider:Zt,thumb:Ht,track:Gt,labels:Yt},Fe=({min:i=0,max:u=100,step:o=1,onChange:n,width:t=300,unit:r,fontColor:l="#605B56",value:a=[i,u]})=>{const{t:c}=j.useTranslation(),d=p=>{n==null||n({min:p[0],max:p[1]})};return s.jsxs("div",{className:z.container,style:{width:`${t}px`,color:`${l}`},children:[s.jsx("div",{className:z.unitLabel,children:s.jsx("span",{children:c(r)})}),s.jsx(Vt,{className:z.slider,thumbClassName:z.thumb,trackClassName:z.track,min:i,max:u,step:o,value:a,onChange:d,withTracks:!0,pearling:!0,minDistance:1}),s.jsxs("div",{className:z.labels,children:[s.jsx("span",{children:a[0]}),s.jsx("span",{children:a[1]})]})]})};Fe.propTypes={min:e.number,max:e.number,step:e.number,initialMin:e.number,initialMax:e.number,onChange:e.func,width:e.number,unit:e.string,fontColor:e.string,value:e.arrayOf(e.number)};const Wt="_tematicalFiltersInputContainer_1vm1r_2",Xt="_inputTypeContainer_1vm1r_2",Jt="_checkboxContainer_1vm1r_28",Qt="_absoluteSliderContainer_1vm1r_37",J={tematicalFiltersInputContainer:Wt,inputTypeContainer:Xt,checkboxContainer:Jt,absoluteSliderContainer:Qt},he=({indicator:i,activeColor:u})=>{const[o,n]=C.useState(),{type:t,name:r,values:l,minValue:a,maxValue:c,unit:d}=i||{},p=C.useMemo(()=>t=="cat"||o=="cat",[o,t]),h=C.useMemo(()=>t=="abs"||o=="abs",[o,t]),{tematicalFiltersSelected:m,selectedIndicator:g,fontColor:y,inputsColor:b}=T(_=>_),x=_=>{if(_){const{min:S,max:v,valueClicked:k,allValues:$}=_||{},{code:F,type:te}=i||{},V=h?"abs":p?"cat":"both";let B=F[0];te=="both"&&(B=V=="cat"?F[1]:F[0]),V=="cat"?T.setState(q=>{let D=q.tematicalFiltersSelected.find(M=>M.code===B);if(D){let M=[D.values];if(D.values.includes(k)){if(M=D.values.filter(L=>L!==k),M.length<1)return{tematicalFiltersSelected:q.tematicalFiltersSelected.filter(L=>L.code!==B)}}else M=[...D.values,k];return{tematicalFiltersSelected:q.tematicalFiltersSelected.map(L=>L.code===B?{...L,values:M}:L)}}else{console.log("entra aqui: ",$," ",k);let M=$.map((L,Qe)=>Qe);return{tematicalFiltersSelected:[...m,{type:"cat",code:B,values:M.filter(L=>L!==k),name:i.name}]}}}):V=="abs"&&T.setState(q=>{let D=q.tematicalFiltersSelected.find(M=>M.code===B);if(D){let M={...D};return M.min=S,M.max=v,{tematicalFiltersSelected:q.tematicalFiltersSelected.map(L=>L.code===B?M:L)}}else return{tematicalFiltersSelected:[...m,{type:"abs",code:B,min:S,max:v}]}})}},f=C.useMemo(()=>{const _={};if((m==null?void 0:m.length)>0)for(const S of m)S.type==="cat"?_[S.code]=new Set(S.values):_[S.code]=[S.min,S.max];return _},[m]);return s.jsx("div",{className:J.tematicalFiltersInputContainer,children:s.jsxs(O,{titleFontStyles:{fontSize:16,fontWeight:400},title:r,isOpen:g==`id${r}`,onClick:()=>T.setState(()=>({selectedIndicator:g==`id${r}`?"":`id${r}`})),showBottomBar:!1,height:38,titleMarginChildren:14,className:"tematicalFiltersInputContainer",color:y,activeColor:u,children:[t=="both"&&s.jsxs("div",{className:J.inputTypeContainer,style:{color:y},children:[s.jsxs("label",{children:[s.jsx("input",{type:"radio",name:"tipo",value:"abs",onChange:()=>{n("abs")},style:{marginRight:4,backgroundColor:o=="abs"?b:"white",border:`1.5px solid ${o=="abs"?b:y}`}}),"Absoluto"]}),s.jsxs("label",{children:[s.jsx("input",{type:"radio",name:"tipo",value:"cat",onChange:()=>{n("cat")},style:{marginRight:4,backgroundColor:o=="cat"?b:"white",border:`1.5px solid ${o=="cat"?b:y}`}}),"Categórico"]})]}),p&&s.jsx("div",{className:J.checkboxContainer,children:l.map((_,S)=>{var v;return s.jsx($e,{onClick:()=>x({valueClicked:S,allValues:l}),indicator:_,value:((v=f[i.code[t=="both"?1:0]])==null?void 0:v.has(S))||!f[i.code[t=="both"?1:0]]},`checkbox-${S}`)})}),h&&s.jsx("div",{className:J.absoluteSliderContainer,children:s.jsx(Fe,{onChange:x,min:a,max:c,unit:d,value:f[i.code[0]]})})]})})};he.propTypes={indicator:e.shape({name:e.string,type:e.string,code:e.arrayOf(e.string),values:e.arrayOf(e.shape({codename:e.oneOfType(e.array,e.string),title:e.string}))}),activeColor:e.string};const Be=({subcategory:i,fontColor:u,activeColor:o})=>{const{activeSubcategory:n}=T(l=>l),{name:t,indicators:r}=i||{};return s.jsx(O,{title:t,isOpen:n==`id${t}`,onClick:()=>{T.setState(l=>({activeSubcategory:l.activeSubcategory===`id${t}`?"":`id${t}`}))},titleFontStyles:{fontSize:16,fontWeight:400},showBottomBar:!1,titleMarginChildren:20,height:49,color:u,activeColor:o,children:r==null?void 0:r.map((l,a)=>s.jsx(he,{indicator:l,fontColor:u},`indicatorSub-${a}`))})};Be.propTypes={subcategory:e.shape({name:e.string,indicators:e.arrayOf(e.shape({name:e.string,value:e.string}))}),activeColor:e.string};const De=({category:i,activeColor:u})=>{const{name:o,subcategories:n,indicators:t}=i||{},{activeCategory:r,fontColor:l}=T(a=>a);return i&&s.jsx(O,{onClick:()=>{T.setState(a=>({activeCategory:r===`id${o}`?"":`id${o}`}))},title:o,isOpen:r===`id${o}`,titleFontStyles:{fontSize:18,fontWeight:"bold"},showBottomBar:!1,color:l,activeColor:u,children:n?n.map((a,c)=>s.jsx(Be,{subcategory:a,fontColor:l,activeColor:u},`subcategory-${c}`)):t&&t.map((a,c)=>s.jsx(he,{indicator:a,fontColor:l,activeColor:u},`indicator-${c}`))})};De.propTypes={category:e.shape({name:e.string.isRequired,subcategories:e.array,indicators:e.array}),activeColor:e.string};const Oe=({indicators:i,isOpen:u=!0,title:o,fontColor:n="#605B56",inputsColor:t="#605B56",activeColor:r})=>{const{tematicalFiltersSelected:l}=T(c=>c),{t:a}=j.useTranslation();return C.useEffect(()=>{console.log("filtersSelected changed: ",l)},[l]),C.useEffect(()=>{n&&T.setState(()=>({fontColor:n}))},[n]),C.useEffect(()=>{t&&T.setState(()=>({inputsColor:t}))},[t]),s.jsx(O,{isOpen:u,title:o?a(o):"Tematical filters",color:n,activeColor:r,children:i==null?void 0:i.map((c,d)=>s.jsx(De,{category:c,fontColor:n,activeColor:r},`category-${d}`))})};Oe.propTypes={isOpen:e.bool,title:e.string,indicators:e.arrayOf(e.object),fontColor:e.string,onChangeTematicalFilters:e.func,inputsColor:e.string,activeColor:e.string};const es="_FiltersAmbitContainer_6o4gt_2",ts="_FiltersAmbitHeader_6o4gt_7",ss="_FiltersAmbitTitle_6o4gt_15",ns="_FiltersAmbitDescription_6o4gt_22",is="_FiltersAmbitDescriptionTitle_6o4gt_33",H={FiltersAmbitContainer:es,FiltersAmbitHeader:ts,FiltersAmbitTitle:ss,FiltersAmbitDescription:ns,FiltersAmbitDescriptionTitle:is},Ae=({ambitName:i,ambitDescription:u,defaultFilters:o,indicators:n,activeColor:t,textColor:r,backgroundColor:l,onChangeAppliedFilters:a})=>{const{t:c}=j.useTranslation(),{tematicalFiltersSelected:d}=T(p=>p);return C.useEffect(()=>{o&&o.length>0&&T.setState(p=>({tematicalFiltersSelected:o}))},[o]),C.useEffect(()=>{console.log("filtersSelected changed: ",d),a(d)},[d]),s.jsxs("div",{className:H.FiltersAmbitContainer,children:[s.jsxs("div",{className:H.FiltersAmbitHeader,children:[s.jsx("div",{className:H.FiltersAmbitTitle,children:i}),s.jsxs("div",{className:H.FiltersAmbitDescription,children:[s.jsx("div",{className:H.FiltersAmbitDescriptionTitle,children:c("description")}),u]})]}),s.jsx(Me,{title:c("applied_filters"),isOpen:!0,textColor:r||"#fff",backgroundColor:l||"#605B5680",activeColor:t}),s.jsx(Le,{activeColor:t}),s.jsx(Oe,{indicators:n,inputsColor:t,textColor:r,title:"tematical_filters",activeColor:t})]})};Ae.propTypes={indicators:e.arrayOf(e.object).isRequired,ambitName:e.string,ambitDescription:e.string,defaultFilters:e.arrayOf(e.object),activeColor:e.string,backgroundColor:e.string,textColor:e.string,onChangeAppliedFilters:e.func};const os="_barChartContainer_d2f1z_2",rs={barChartContainer:os},Re=({data:i,width:u=700,barHeight:o=25,gap:n=23,fontColor:t="#605B56",verticalPaddign:r=10,horizontalPaddign:l=20,leftPadding:a=200,numberOfDivisions:c=7,maxValue:d=null})=>{const{t:p}=j.useTranslation(),{xScale:h,ticks:m,height:g}=C.useMemo(()=>{if(i&&i.length>0){const y=(i==null?void 0:i.length)*(o+n)+r*2,b=be.max(i,_=>_.value)||1,x=be.scaleLinear().domain([0,d||b]).range([0,u-a]),f=Array.from({length:c+1},(_,S)=>d?d/c*S:b/c*S);return{xScale:x,ticks:f,height:y,width:u,verticalPaddign:r,horizontalPaddign:l}}else return{xScale:null,ticks:[],height:0}},[i,u,c,o,n,l,r,d]);return s.jsx("div",{className:rs.barChartContainer,children:s.jsx("svg",{width:u+l*2,height:g,children:s.jsxs("g",{transform:`translate(0,${n})`,children:[s.jsx("g",{transform:`translate(${a+l}, 0)`,children:m.map((y,b)=>{const x=h(y);return s.jsxs("g",{transform:`translate(${x}, 0)`,children:[s.jsx("line",{y1:0,y2:g-n*2,stroke:"#ccc"}),s.jsx("text",{y:g-n,textAnchor:"middle",fontSize:10,fill:t,children:parseInt(y)})]},b)})}),i&&i.length>0&&(i==null?void 0:i.map((y,b)=>{const x=h(y.value),f=b*(o+n);return s.jsxs("g",{transform:`translate(${a+l}, ${f})`,children:[s.jsx("text",{x:-24,y:o/2+5,textAnchor:"end",fill:t,children:p(y.title)}),s.jsx("rect",{width:x,height:o,fill:y.color,rx:0})]},b)}))]})})})};Re.propTypes={data:e.arrayOf(e.shape({title:e.string,value:e.number,color:e.string})),width:e.number,barHeight:e.number,gap:e.number,verticalPaddign:e.number,horizontalPaddign:e.number,numberOfDivisions:e.number,fontColor:e.string};const as="_graphicContainer_c9zrg_2",ls="_titleContainer_c9zrg_14",xe={graphicContainer:as,titleContainer:ls},Ie=({data:i,graphWidth:u=700,containerStyle:o,borderColor:n="#605B56",title:t="Graphic Title",fontColor:r="#605B56",maxValue:l=null,numberOfDivisions:a=7,leftPadding:c=200})=>{const{t:d}=j.useTranslation();return s.jsxs("div",{className:xe.graphicContainer,style:{...o||{},border:`1.5px solid ${n}`},children:[s.jsx("div",{className:xe.titleContainer,children:s.jsx("h2",{children:d(t)})}),s.jsx(Re,{data:i,width:u,fontColor:r,maxValue:l,numberOfDivisions:a,leftPadding:c})]})};Ie.propTypes={data:e.arrayOf(e.shape({color:e.string.isRequired,value:e.number.isRequired,title:e.string.isRequired})),borderColor:e.string,title:e.string,graphWidth:e.number,containerStyle:e.object,fontColor:e.string,maxValue:e.number,numberOfDivisions:e.number,leftPadding:e.number};const cs="_indicatorsCategory_1cu33_2",us="_title_1cu33_5",ds="_list_1cu33_11",re={indicatorsCategory:cs,title:us,list:ds},ps="_indicatorContainer_lw8gx_2",hs="_indicatorNameContainer_lw8gx_11",ms="_dot_lw8gx_20",gs="_indicatorName_lw8gx_11",bs="_switchExternalContainer_lw8gx_31",fs="_switchType_lw8gx_40",ys="_switchTypeOptions_lw8gx_44",xs="_optionContainer_lw8gx_55",Cs="_customRadious_lw8gx_65",vs="_optionText_lw8gx_72",w={indicatorContainer:ps,indicatorNameContainer:hs,dot:ms,indicatorName:gs,switchExternalContainer:bs,switchType:fs,switchTypeOptions:ys,optionContainer:xs,customRadious:Cs,optionText:vs},me=({indicator:i,values:u=[],activeColor:o,defaultColor:n="#92898A",activeIndicator:t,activeIndicatorType:r,onClickIndicator:l,multiple:a=!1,onChangeType:c})=>{const{t:d}=j.useTranslation(),{name:p,type:h}=i,[m,g]=C.useState(!1);C.useEffect(()=>{t&&g(a?t.some(x=>x.name==String(p)):t.name==p)},[t]);const y=()=>s.jsx("div",{className:w.switchExternalContainer,children:s.jsx("div",{className:w.switchType,children:s.jsxs("div",{className:w.switchTypeOptions,children:[s.jsxs("div",{className:w.optionContainer,onClick:()=>c("cat"),children:[s.jsx("span",{className:`${w.customRadious}`,style:{backgroundColor:r==="cat"?o:"transparent",borderColor:r==="cat"?o:n}}),s.jsx("h4",{className:w.optionText,style:{color:r==="cat"?o:n},children:d("indicators.cat")})]}),s.jsxs("div",{className:w.optionContainer,onClick:()=>c("abs"),children:[s.jsx("span",{className:`${w.customRadious}`,style:{backgroundColor:r==="abs"?o:"transparent",borderColor:r==="abs"?o:n}}),s.jsx("h4",{className:w.optionText,style:{color:r==="abs"?o:n},children:d("indicators.abs")})]})]})})}),b=()=>s.jsx("div",{className:w.switchExternalContainer,children:s.jsx("div",{className:w.switchType,children:s.jsx("div",{className:w.switchTypeOptions,children:u.map((x,f)=>s.jsxs("div",{className:w.optionContainer,children:[s.jsx("span",{className:w.customRadious}),s.jsx("h4",{children:d(x.unit)})]},f))})})});return s.jsxs("div",{className:w.indicatorContainer,children:[s.jsxs("div",{className:w.indicatorNameContainer,onClick:()=>l({indicator:i}),children:[s.jsx("div",{style:{border:m?`1px solid ${o}`:`1px solid ${n}`},className:w.dot}),s.jsx("h4",{className:w.indicatorName,style:{color:m?o:n},children:s.jsx(j.Trans,{i18nKey:p,components:{sup:s.jsx("sup",{})}})})]}),(t==null?void 0:t.name)===p&&h==="both"&&s.jsx("div",{children:y()}),(t==null?void 0:t.name)===p&&h==="twoUnits"&&s.jsx("div",{children:b()})]})};me.propTypes={indicator:e.shape({name:e.string,type:e.string}),values:e.oneOfType([e.bool,e.array]),activeColor:e.string,defaultColor:e.string,activeIndicator:e.oneOfType([e.object,e.array]),multiple:e.bool,onClickIndicator:e.func};const _s="_indicatorsSubCategory_1dzsi_2",js="_list_1dzsi_8",Ce={indicatorsSubCategory:_s,list:js},qe=({subcName:i,indicators:u,defaultColor:o,activeColor:n,activeSubCategory:t,onClickSubCategory:r,id:l,activeIndicator:a,onClickIndicator:c,multiple:d,activeIndicatorType:p,onChangeType:h})=>{const{t:m}=j.useTranslation(),[g,y]=C.useState(!1);return C.useEffect(()=>{y(t==l)},[t,l]),s.jsxs(de.motion.div,{className:Ce.indicatorsSubCategory,initial:{height:"43px"},animate:{height:g?"auto":"43px"},transition:{duration:.4},children:[s.jsx("button",{onClick:()=>r(l),children:s.jsxs("h3",{style:{color:g?n:o},children:[s.jsx("span",{style:{color:g?n:o},children:g?"-":"+"}),s.jsx("span",{style:{marginLeft:12,color:g?n:o},children:m(i)})]})}),u&&s.jsx("div",{className:Ce.list,children:u==null?void 0:u.map((b,x)=>s.jsx(me,{indicator:b,defaultColor:o,activeColor:n,activeIndicator:a,onClickIndicator:c,multiple:d,activeIndicatorType:p,onChangeType:h},"indicator"+x))})]})};qe.propTypes={subcName:e.string,indicators:e.array,activeColor:e.string,defaultColor:e.string,activeSubCategory:e.string,id:e.string,activeIndicator:e.oneOfType([e.object,e.array]),multiple:e.bool,onClickSubCategory:e.func,onClickIndicator:e.func};const Ee=({cat:i,id:u,activeColor:o,defaultColor:n,onClickCategory:t,activeCategory:r,activeSubCategory:l,onClickSubCategory:a,activeIndicator:c,onClickIndicator:d,multiple:p,activeIndicatorType:h,onChangeType:m})=>{var x;const{t:g}=j.useTranslation(),[y,b]=C.useState(!1);return C.useEffect(()=>{b(r===u)},[r,u]),s.jsxs(de.motion.div,{className:re.indicatorsCategory,initial:{height:"53px"},animate:{height:y?"auto":"53px"},transition:{duration:.4},style:{backgroundColor:"white",borderBottom:y?`1px solid ${o}`:"0px",marginBottom:y?"20px":"0px"},children:[s.jsxs("h2",{className:`${re.title}`,onClick:()=>t(u),children:[s.jsx("span",{style:{color:y?o:n},children:y?"-":"+"}),s.jsx("span",{style:{marginLeft:12,color:y?o:n},children:g(i.name)})]}),i.subcategories?i.subcategories.map(({name:f,subcategory:_,indicators:S},v)=>s.jsx(qe,{id:_,activeSubCategory:l,subcName:f,onClickSubCategory:a,activeIndicator:c,onClickIndicator:d,multiple:p,activeColor:o,defaultColor:n,indicators:S,activeIndicatorType:h,onChangeType:m},`subcKey ${v}`)):s.jsx("div",{className:re.list,children:(x=i.indicators)==null?void 0:x.map((f,_)=>s.jsx(me,{indicator:f,values:f.type=="twoUnits"&&f.values,activeColor:o,defaultColor:n,activeIndicator:c,onClickIndicator:d,multiple:p,activeIndicatorType:h,onChangeType:m},`indicator${_}`))})]})};Ee.propTypes={cat:e.object,id:e.string,onChange:e.func,onClickCategory:e.func,activeCategory:e.string,activeSubCategory:e.string,onClickSubCategory:e.func,onClickIndicator:e.func,activeIndicator:e.oneOfType([e.object,e.array]),multiple:e.bool,activeColor:e.string,defaultColor:e.string};const Ss="_indicatorsList_fklyu_2",ks="_title_fklyu_6",ve={indicatorsList:Ss,title:ks},ze=({indicators:i,activeColor:u,defaultColor:o="#92898A",onChange:n,multiple:t=!1,defaultValue:r=null,changeIndType:l,activeIndicatorType:a})=>{const{t:c}=j.useTranslation(),[d,p]=C.useState(),[h,m]=C.useState(),[g,y]=C.useState(),b=v=>{p(d==v?null:v)},x=v=>{m(h==v?null:v)},f=({indicator:v})=>{console.log("onClickIndicator: ",v),_(v)},_=v=>{if(!t)y((g==null?void 0:g.name)==v.name?null:v);else{let k=g&&g.length>0?[...g]:[];y(k!=null&&k.some($=>$.name==v.name)?k.filter($=>$.name!=String(v.name)):[...k,v]),v.type=="both"&&l("cat")}};C.useEffect(()=>{console.log("activeindicator changed to: ",g),n&&typeof n=="function"&&g&&n({activeIndicator:g})},[g]),C.useLayoutEffect(()=>{if(r&&!g)if(t&&r&&Array.isArray(r)){let v=g&&g.length>0?[...g]:[];y([...v,...r]),S(r[0].name)}else _(r),S(r.name)},[]);const S=v=>{const k=i.find($=>{if($.subcategories){let F=$.subcategories.find(te=>te.indicators.find(V=>V.name==v));if(F)return m(F.subcategory),F}else return $.indicators.some(F=>F.name==v)});k&&p(k.category)};return s.jsxs("div",{className:ve.indicatorsList,children:[s.jsx("h2",{className:ve.title,style:{color:o},children:c("indicators.indicators")}),i.map((v,k)=>s.jsx(Ee,{id:v.category,cat:v,onClickCategory:b,activeCategory:d,onClickSubCategory:x,activeSubCategory:h,onClickIndicator:f,activeIndicator:g,activeColor:u,defaultColor:o,multiple:t,onChange:n,onChangeType:l,activeIndicatorType:a},`categoryKey${k}`))]})};ze.propTypes={indicators:e.arrayOf(e.object),activeColor:e.string,defaultColor:e.string,onChange:e.func,changeIndType:e.func,multiple:e.bool,activeIndicator:e.oneOfType([e.object,e.array]),defaultValue:e.oneOfType([e.object,e.array]),activeIndicatorType:e.string};const ws="_langSelector_1of0g_2",Ts="_currentLang_1of0g_7",Ns="_arrow_1of0g_19",Ms="_prevImg_1of0g_22",Ls="_langMenu_1of0g_26",P={langSelector:ws,currentLang:Ts,arrow:Ns,prevImg:Ms,langMenu:Ls},Pe=({langs:i,arrow:u,imgPrev:o})=>{const[n,t]=C.useState(!1),{i18n:r}=j.useTranslation(),l=i.find(c=>c.code==r.language),a=c=>{r.changeLanguage(c),t(!1)};return s.jsxs("div",{className:P.langSelector,children:[s.jsxs("div",{className:P.currentLang,onClick:()=>{t(!n)},children:[o&&s.jsx("img",{className:P.prevImg,src:o}),l.titleSelected||l.title,s.jsx("img",{src:u,className:P.arrow})]}),n&&s.jsx("div",{className:P.langMenu,children:i.map(c=>s.jsx("button",{className:l.code==c.code?P.active:"",onClick:()=>a(c.code),children:c.title},c.code))})]})};Pe.propTypes={langs:e.arrayOf(e.shape({code:e.string,title:e.string,titleSelected:e.string})),color:e.string,bckColor:e.string,hoverColor:e.string,arrow:e.object,imgPrev:e.object};const $s="_legendContainer_atg3j_3",Fs="_closeButton_atg3j_18",Bs="_titleContainer_atg3j_46",Ds="_infoContainer_atg3j_52",Os="_titleLegendList_atg3j_63",As="_legendListContainer_atg3j_70",Rs="_gridContainer_atg3j_70",Is="_elementLegendContainer_atg3j_76",qs="_colorDot_atg3j_82",Es="_absoluteValueContainer_atg3j_88",zs="_absoluteValueColor_atg3j_91",Ps="_absoluteValueText_atg3j_96",Vs="_moreInfoContainer_atg3j_108",N={legendContainer:$s,closeButton:Fs,titleContainer:Bs,infoContainer:Ds,titleLegendList:Os,legendListContainer:As,gridContainer:Rs,elementLegendContainer:Is,colorDot:qs,absoluteValueContainer:Es,absoluteValueColor:zs,absoluteValueText:Ps,moreInfoContainer:Vs},Ve=({containerStyles:i,title:u,infoList:o,legendList:n,legendListTitle:t,absoluteValue:r,onClickMoreInfo:l,buttonTitle:a,onClickClose:c})=>{const{t:d}=j.useTranslation();return s.jsxs("div",{style:i?{...i}:{},className:`${N.legendContainer}`,children:[s.jsx("button",{className:N.closeButton,onClick:c}),u&&s.jsx("div",{className:N.titleContainer,children:s.jsx("h2",{children:u})}),o&&o.length>0&&s.jsx("div",{className:N.infoContainer,children:s.jsx("ul",{children:o.map(({title:p,value:h})=>s.jsxs("li",{children:[s.jsx("h3",{className:N.title,children:`${p}:`}),s.jsxs("span",{className:N.value,children:[" ",h]})]},u))})}),s.jsx("h3",{className:N.titleLegendList,children:t?s.jsx(j.Trans,{i18nKey:t,components:{sup:s.jsx("sup",{})}}):d("mainUse")}),s.jsx("div",{className:N.legendListContainer,children:r?s.jsxs("div",{className:N.absoluteValueContainer,children:[s.jsx("div",{className:N.absoluteValueColor,style:{background:`linear-gradient(to bottom, ${r.maxColor} 0%, ${r.minColor} 100%)`}}),s.jsxs("div",{className:N.absoluteValueText,children:[s.jsxs("span",{children:[r.maxValue," ",d(r.unit)]}),s.jsxs("span",{children:[r.minValue," ",d(r.unit)]})]})]}):n&&n.length>0&&s.jsx("div",{className:N.gridContainer,children:n.map(({title:p,color:h})=>s.jsxs("div",{className:N.elementLegendContainer,children:[s.jsx("div",{className:N.colorDot,style:{backgroundColor:h}}),s.jsxs("div",{className:N.titleLegendElement,children:[d(p)," "]})]},u))})}),l&&s.jsx("button",{className:N.moreInfoContainer,onClick:l,children:a||d("moreInformation")})]})};Ve.propTypes={title:e.string,containerStyles:e.object,infoList:e.arrayOf(e.shape({title:e.string.isRequired,value:e.oneOfType([e.string,e.number])})),legendList:e.arrayOf(e.shape({title:e.string,color:e.string})),legendListTitle:e.string,absoluteValue:e.shape({maxColor:e.string,minColor:e.string,maxValue:e.number,minValue:e.number}),onClickMoreInfo:e.func,buttonTitle:e.string,onClickClose:e.func};const Ks="_logo_1ewa6_2",_e={logo:Ks},Ke=({src:i,alt:u,href:o})=>{const{t:n}=j.useTranslation(),t=s.jsx("img",{src:i,alt:n(u)});return o?s.jsx("div",{className:_e.logo,children:s.jsx("a",{href:o,children:t})}):s.jsx("div",{className:_e.logo,children:t})};Ke.propTypes={src:e.string.isRequired,alt:e.string.isRequired,href:e.string,className:e.string};const Us="_mapContainer_84pkf_2",Zs={mapContainer:Us};st.accessToken="pk.eyJ1IjoiY2ljbGljYSIsImEiOiJja3llODhxZ2UwYzF1Mm5xcHVhMzI3anhqIn0.-r56FLAzEH57eVsB2ZeVcA";const Ue=({initialView:i={latitude:39.4699,longitude:-.3763,zoom:12},maxZoom:u=17,minZoom:o=8,mapStyle:n,firstSymbolLayer:t,cssProps:r="",onClick:l="",interactiveLayers:a=[],popUp:c=!1,sources:d=[],layers:p=[]})=>{const h=C.useRef(),[m,g]=C.useState(null),y=Y.useSelector(b=>b.mapState.showTexts);return C.useEffect(()=>{if(h.current){const b=h.current.getMap();b.getStyle().layers.map(f=>{f.type=="symbol"&&f.id!="professionals"&&(y?b.setLayoutProperty(f.id,"visibility","visible"):b.setLayoutProperty(f.id,"visibility","none"))})}},[y]),s.jsx("div",{className:`${Zs.mapContainer}`,style:r,children:s.jsxs(K,{initialViewState:i,ref:h,hash:!1,maxZoom:u,minZoom:o,mapStyle:n,onClick:l,interactiveLayerIds:a,children:[d.length&&d.map((b,x)=>s.jsx(K.Source,{...b,children:p.length&&p.map((f,_)=>{if(f.sourceId==b.id)return s.jsx(K.Layer,{...f.layer,beforeId:t},_)})},x)),s.jsx(K.NavigationControl,{position:"bottom-right",visualizePitch:!0}),c&&m&&s.jsx(K.Popup,{longitude:c.longitude,latitude:c.latitude,anchor:c.anchor,onClose:()=>g(null),children:c.content})]})})};Ue.propTypes={initialView:e.shape({latitude:e.number.isRequired,longitude:e.number.isRequired,zoom:e.number.isRequired}),mapStyle:e.object,firstSymbolLayer:e.string,cssProps:e.object,style:e.object,maxZoom:e.number,minZoom:e.number,onClick:e.func,interactiveLayers:e.array,popUp:e.shape({latitude:e.number,longitude:e.number,anchor:e.string,content:e.element}),textsUrl:e.string,sources:e.arrayOf(e.shape({id:e.string,type:e.string,url:e.string,data:e.object})),layers:e.arrayOf(e.shape({sourceId:e.string,layer:e.shape({id:e.string,type:e.string,sourceLayer:e.string,minZoom:e.number,maxZoom:e.number,paint:e.object})}))};const Hs="_mapContainer_b0pyr_3",Gs={mapContainer:Hs},Ys="_FeaturePopUp_1gd6w_2",Ws="_title_1gd6w_2",je={FeaturePopUp:Ys,title:Ws},Xs=({props:i})=>{const{t:u}=j.useTranslation();return s.jsx("div",{className:je.FeaturePopUp,children:i.map(o=>s.jsxs("p",{children:[s.jsxs("span",{className:je.title,children:[s.jsx(j.Trans,{i18nKey:o.name,components:{sup:s.jsx("sup",{})}}),": "]}),o.value.toLocaleString("de",{maximumFractionDigits:2})," ",u(o.unit)]}))})},Ze=({initialView:i={latitude:39.4699,longitude:-.3763,zoom:12},maxZoom:u=17,minZoom:o=8,mapStyle:n,firstSymbolLayer:t,cssProps:r={},onClick:l="",interactiveLayers:a=[],sources:c=[],layers:d=[],filters:p,popUpParams:h,onClosePopUp:m,showTexts:g})=>{console.log(p);const y=C.useRef();return C.useEffect(()=>{if(y.current){const b=y.current.getMap();b.getStyle().layers.map(f=>{f.type=="symbol"&&f.id!="professionals"&&(g?b.setLayoutProperty(f.id,"visibility","visible"):b.setLayoutProperty(f.id,"visibility","none"))})}},[g]),C.useEffect(()=>{let b=new nt.Protocol;return se.addProtocol("pmtiles",b.tile),()=>{se.removeProtocol("pmtiles")}},[]),s.jsx("div",{className:`${Gs.mapContainer}`,style:r&&r,children:s.jsxs(U,{mapLib:se,initialViewState:i,ref:y,hash:!1,maxZoom:u,minZoom:o,mapStyle:n,onClick:l,interactiveLayerIds:a,children:[c.length&&c.map((b,x)=>s.jsx(U.Source,{...b,children:d.length&&d.map((f,_)=>{if(f.sourceId==b.id)return s.jsx(U.Layer,{...f.layer,beforeId:t,filter:p&&p},_)})},x)),s.jsx(U.NavigationControl,{position:"bottom-right",visualizePitch:!0}),h&&s.jsx(U.Popup,{longitude:h.lng,latitude:h.lat,onClose:m,children:s.jsx(Xs,{props:h.props})})]})})};Ze.propTypes={initialView:e.shape({latitude:e.number.isRequired,longitude:e.number.isRequired,zoom:e.number.isRequired}),mapStyle:e.string,firstSymbolLayer:e.string,cssProps:e.object,style:e.object,maxZoom:e.number,minZoom:e.number,onClick:e.func,interactiveLayers:e.array,popUp:e.bool,sources:e.arrayOf(e.shape({id:e.string,type:e.string,url:e.string,data:e.object})),layers:e.arrayOf(e.shape({sourceId:e.string,layer:e.shape({id:e.string,type:e.string,sourceLayer:e.string,minZoom:e.number,maxZoom:e.number,paint:e.object})})),showTexts:e.bool,filters:e.array,popUpParams:e.object,onClosePopUp:e.func};const Js="_sectionBar_1nshk_2",Qs="_leftContent_1nshk_14",en="_textContainer_1nshk_20",tn="_title_1nshk_27",sn="_subtitle_1nshk_33",nn="_rightContent_1nshk_38",I={sectionBar:Js,leftContent:Qs,textContainer:en,title:tn,subtitle:sn,rightContent:nn},He=({leftIcon:i,title:u,subtitle:o,rightContent:n,mainColor:t})=>{const{t:r}=j.useTranslation();return s.jsxs("div",{className:I.sectionBar,children:[s.jsxs("div",{className:I.leftContent,children:[i&&s.jsx("img",{src:i,alt:"Icono",className:I.icon}),s.jsxs("div",{className:I.textContainer,children:[s.jsx("div",{className:I.title,style:t?{color:t}:{},children:r(u)}),o&&s.jsx("div",{className:I.subtitle,children:o})]})]}),s.jsx("div",{className:I.rightContent,children:n})]})};He.propTypes={leftIcon:e.node.isRequired,title:e.string.isRequired,subtitle:e.string,rightContent:e.node.isRequired,mainColor:e.string};const on=ke.createSlice({name:"mapSlice",initialState:{showTexts:!0,sliderSelectedYear:2025,activeIndicatorKey:0,activeIndicatorType:"cat",activeIndicatorUnit:null},reducers:{setShowTexts:(i,u)=>{i.showTexts=u.payload},setYear:(i,u)=>{i.sliderSelectedYear=u.payload},setActiveIndicatorKey:(i,u)=>{i.activeIndicatorKey=u.payload},setActiveIndicatorType:(i,u)=>{i.activeIndicatorType=u.payload},setActiveIndicatorUnit:(i,u)=>{i.activeIndicatorUnit=u.payload}}}),{setShowTexts:Tn,setYear:ae,setActiveIndicatorKey:Nn,setActiveIndicatorType:Mn,setActiveIndicatorUnit:Ln}=on.actions,rn="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",an="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",ln="_slider_a19yo_2",cn="_playButton_a19yo_17",un="_sliderOpen_a19yo_28",dn="_sliderResults_a19yo_32",G={slider:ln,playButton:cn,sliderOpen:un,sliderResults:dn},Ge=({onResults:i=!1,defaultYear:u=2025,firstYear:o=2025,lastYear:n=2050,zIndex:t=10,rightBarOpen:r=!1})=>{const[l,a]=C.useState(u),c=Y.useDispatch(),d=(f,_)=>{a(_),c(ae(_-2e3))},[p,h]=C.useState(!1),m=()=>{h(!0)},g=()=>{h(!1)};((f,_)=>{const S=C.useRef();C.useEffect(()=>{S.current=f},[f]),C.useEffect(()=>{function v(){S.current()}{let k=setInterval(v,_);return()=>clearInterval(k)}},[_])})(()=>{p&&(l!=2050?(a(l+1),c(ae(l-2e3+1))):(a(2025),c(ae(25))))},1e3);const b=ge.createTheme({palette:{primary:{main:"#605b56"}},components:{MuiSlider:{styleOverrides:{mark:{height:10,backgroundColor:"#605b56"},valueLabel:{backgroundColor:"transparent",color:"#605b56",padding:0,top:3}}}}}),x=[{label:"",value:2025},{label:"",value:2032},{label:"",value:2041},{label:"",value:2050}];return s.jsx(ot.ThemeProvider,{theme:b,children:s.jsxs(ge.Box,{sx:{width:400},className:`${i?G.sliderResults:G.slider} ${r?G.sliderOpen:""}`,style:{zIndex:t},children:[o,s.jsx(it,{"aria-label":"TimeSlider",value:l,valueLabelDisplay:"on",step:1,marks:x,min:o,max:n,onChange:d,color:"primary",size:"small"}),n,!p&&s.jsx("button",{className:G.playButton,onClick:m,children:s.jsx("img",{src:rn,alt:"Play"})}),p&&s.jsx("button",{className:G.playButton,onClick:g,children:s.jsx("img",{src:an,alt:"Pause"})})]})})};Ge.propTypes={defaultYear:e.number,onResults:e.bool,firstYear:e.number,lastYear:e.number,zIndex:e.number,rightBarOpen:e.bool};const pn="_TopNavMenuContainer_ku22g_2",hn="_topNavOptions_ku22g_11",Se={TopNavMenuContainer:pn,topNavOptions:hn},Ye=({options:i=[],cssProps:u={},activeColor:o})=>{const{t:n}=j.useTranslation(),t=u.textColor||"inherit";u.borderColor;const r=u.height||"calc(70px - 10px);";return s.jsx("div",{className:Se.TopNavMenuContainer,children:i.map((l,a)=>s.jsx(rt.NavLink,{to:l.url,className:({isActive:c})=>`${Se.topNavOptions}`,style:{color:t,height:r,boxShadow:isActive?`0 5px 0 0 ${o}`:"inherit"},children:n(l.name)},a))})};Ye.propTypes={options:e.arrayOf(e.object),cssProps:e.shape({borderColor:e.string.isRequired,textColor:e.string.isRequired})};const mn=ke.createSlice({name:"userSlice",initialState:{user:{isLoggedIn:!1,username:""},showLogIn:!1,showUserMenu:!1},reducers:{setShowLogIn:(i,u)=>{i.showLogIn=u.payload},setShowUserMenu:(i,u)=>{i.showUserMenu=u.payload}}}),{setShowLogIn:gn,setShowUserMenu:bn}=mn.actions,fn="_UserMenuTrigger_uglss_2",yn={UserMenuTrigger:fn},We=({cssClass:i,loginLocale:u="login"})=>{const o=Y.useDispatch(),n=Y.useSelector(a=>a.userState.user.isLoggedIn),t=Y.useSelector(a=>a.userState.user.username),{t:r}=j.useTranslation(),l=()=>{o(n?gn(!0):bn(!0))};return s.jsx("div",{className:`${yn.UserMenuTrigger} link ${i}`,onClick:l,children:n?t:r(u)})};We.propTypes={onClickLoggedIn:e.func.isRequired,onClickLoggedOut:e.func.isRequired,log:e.bool,name:e.string,cssClass:e.string,loginLocale:e.string};const xn="_header_t7qdl_2",Cn="_leftComponents_t7qdl_12",vn="_centerComponents_t7qdl_13",_n="_rightComponents_t7qdl_14",Q={header:xn,leftComponents:Cn,centerComponents:vn,rightComponents:_n},Xe=({cssProps:i,leftComponents:u=[],centerComponents:o=[],rightComponents:n=[]})=>s.jsxs("div",{className:Q.header,style:i,children:[s.jsx("div",{className:Q.leftComponents,style:{height:i.height},children:u.map((t,r)=>s.jsx("div",{style:{height:i.height},children:t},r))}),s.jsx("div",{className:Q.centerComponents,style:{height:i.height},children:o.map((t,r)=>s.jsx("div",{style:{height:i.height},children:t},r))}),s.jsx("div",{className:Q.rightComponents,style:{height:i.height},children:n.map((t,r)=>s.jsx("div",{style:{height:i.height},children:t},r))})]});Xe.propTypes={cssProps:e.shape({backgroundColor:e.string.isRequired,height:e.string.isRequired,borderColor:e.string,textColor:e.string}),leftComponents:e.arrayOf(e.node),centerComponents:e.arrayOf(e.node),rightComponents:e.arrayOf(e.node)};const jn="_sidebar_1jqo2_2",Sn="_open_1jqo2_16",kn="_content_1jqo2_20",wn="_closeButton_1jqo2_26",ee={sidebar:jn,open:Sn,content:kn,closeButton:wn},Je=({width:i="300px",children:u,showRightBar:o,onCloseBar:n})=>{const t=()=>{n()};return s.jsx("div",{className:`${ee.sidebar} ${o?ee.open:""}`,style:{width:o?i:0},children:o&&s.jsxs("div",{className:ee.content,children:[s.jsx("button",{className:ee.closeButton,onClick:t,children:"×"}),u]})})};Je.propTypes={width:e.string,children:e.node,showRightBar:e.bool,onCloseBar:e.func};exports.AmbitSelector=Te;exports.ButtonsList=Ne;exports.DropdownList=O;exports.EditAmbit=Rt;exports.FiltersAmbit=Ae;exports.Graphic=Ie;exports.HeaderSection=Xe;exports.IndicatorsList=ze;exports.LangSelector=Pe;exports.Legend=Ve;exports.LogoApp=Ke;exports.MapboxMap=Ue;exports.MaplibreMap=Ze;exports.RightSidebar=Je;exports.SectionBar=He;exports.TimeSlider=Ge;exports.Tooltip=pe;exports.TopNavMenu=Ye;exports.UserMenuTrigger=We;
|
package/dist/index.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as m, jsx as r, Fragment as qe } from "react/jsx-runtime";
|
|
2
|
-
import U, { useState as B, useMemo as te, useEffect as L, useLayoutEffect as Ee, useRef as
|
|
2
|
+
import U, { useState as B, useMemo as te, useEffect as L, useLayoutEffect as Ee, useRef as he } from "react";
|
|
3
3
|
import e from "prop-types";
|
|
4
|
-
import { useTranslation as w, Trans as
|
|
5
|
-
import { motion as
|
|
4
|
+
import { useTranslation as w, Trans as me } from "react-i18next";
|
|
5
|
+
import { motion as ge } from "framer-motion";
|
|
6
6
|
import { create as Ke } from "zustand";
|
|
7
|
-
import * as
|
|
7
|
+
import * as ye from "d3";
|
|
8
8
|
import Ue from "mapbox-gl";
|
|
9
|
-
import { useSelector as
|
|
9
|
+
import { useSelector as ce, useDispatch as Te } from "react-redux";
|
|
10
10
|
import Ze, { Source as He, Layer as Ge, NavigationControl as Ye, Popup as We } from "react-map-gl/mapbox";
|
|
11
|
-
import
|
|
11
|
+
import ie from "maplibre-gl";
|
|
12
12
|
import { Protocol as Xe } from "pmtiles";
|
|
13
13
|
import Je, { Source as Qe, Layer as et, NavigationControl as tt, Popup as nt } from "react-map-gl/maplibre";
|
|
14
14
|
import { createSlice as Me } from "@reduxjs/toolkit";
|
|
@@ -227,7 +227,7 @@ Rt.propTypes = {
|
|
|
227
227
|
useTooltip: e.bool,
|
|
228
228
|
tooltipPosition: e.oneOf(["top", "bottom", "left", "right"])
|
|
229
229
|
};
|
|
230
|
-
const It = "_indicatorsCategory_1cu33_2", zt = "_title_1cu33_5",
|
|
230
|
+
const It = "_indicatorsCategory_1cu33_2", zt = "_title_1cu33_5", se = {
|
|
231
231
|
indicatorsCategory: It,
|
|
232
232
|
title: zt
|
|
233
233
|
}, j = ({
|
|
@@ -246,9 +246,9 @@ const It = "_indicatorsCategory_1cu33_2", zt = "_title_1cu33_5", ie = {
|
|
|
246
246
|
}) => {
|
|
247
247
|
const { t: u } = w();
|
|
248
248
|
return /* @__PURE__ */ m(
|
|
249
|
-
|
|
249
|
+
ge.div,
|
|
250
250
|
{
|
|
251
|
-
className:
|
|
251
|
+
className: se.indicatorsCategory,
|
|
252
252
|
initial: { height: `${l}px` },
|
|
253
253
|
animate: { height: i ? "auto" : `${l}px` },
|
|
254
254
|
transition: { duration: 0.4 },
|
|
@@ -265,7 +265,7 @@ const It = "_indicatorsCategory_1cu33_2", zt = "_title_1cu33_5", ie = {
|
|
|
265
265
|
...a,
|
|
266
266
|
marginBottom: p || "auto"
|
|
267
267
|
},
|
|
268
|
-
className: `${
|
|
268
|
+
className: `${se.title}`,
|
|
269
269
|
onClick: d,
|
|
270
270
|
children: [
|
|
271
271
|
/* @__PURE__ */ r("span", { style: { color: i ? t : n }, children: i ? "-" : "+" }),
|
|
@@ -273,7 +273,7 @@ const It = "_indicatorsCategory_1cu33_2", zt = "_title_1cu33_5", ie = {
|
|
|
273
273
|
]
|
|
274
274
|
}
|
|
275
275
|
),
|
|
276
|
-
/* @__PURE__ */ r("div", { className:
|
|
276
|
+
/* @__PURE__ */ r("div", { className: se.content, children: o })
|
|
277
277
|
]
|
|
278
278
|
}
|
|
279
279
|
);
|
|
@@ -403,18 +403,18 @@ De.propTypes = {
|
|
|
403
403
|
}),
|
|
404
404
|
checkedColor: e.string
|
|
405
405
|
};
|
|
406
|
-
function
|
|
407
|
-
return
|
|
406
|
+
function de(i, d) {
|
|
407
|
+
return de = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, n) {
|
|
408
408
|
return o.__proto__ = n, o;
|
|
409
|
-
},
|
|
409
|
+
}, de(i, d);
|
|
410
410
|
}
|
|
411
411
|
function Et(i, d) {
|
|
412
|
-
i.prototype = Object.create(d.prototype), i.prototype.constructor = i,
|
|
412
|
+
i.prototype = Object.create(d.prototype), i.prototype.constructor = i, de(i, d);
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function oe(i) {
|
|
415
415
|
return i && i.stopPropagation && i.stopPropagation(), i && i.preventDefault && i.preventDefault(), !1;
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function re(i) {
|
|
418
418
|
return i == null ? [] : Array.isArray(i) ? i.slice() : [i];
|
|
419
419
|
}
|
|
420
420
|
function W(i) {
|
|
@@ -426,17 +426,17 @@ function X(i) {
|
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
428
|
function z(i, d) {
|
|
429
|
-
return
|
|
429
|
+
return pe(function(o, n) {
|
|
430
430
|
let t = o;
|
|
431
431
|
return t <= n.min && (t = n.min), t >= n.max && (t = n.max), t;
|
|
432
432
|
}(i, d), d);
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function pe(i, d) {
|
|
435
435
|
const o = (i - d.min) % d.step;
|
|
436
436
|
let n = i - o;
|
|
437
437
|
return 2 * Math.abs(o) >= d.step && (n += o > 0 ? d.step : -d.step), parseFloat(n.toFixed(5));
|
|
438
438
|
}
|
|
439
|
-
let
|
|
439
|
+
let ue = function(i) {
|
|
440
440
|
function d(n) {
|
|
441
441
|
var t;
|
|
442
442
|
(t = i.call(this, n) || this).onKeyUp = () => {
|
|
@@ -496,7 +496,7 @@ let pe = function(i) {
|
|
|
496
496
|
t.start(p, c[0]), X(t.getMouseEventMap());
|
|
497
497
|
});
|
|
498
498
|
}
|
|
499
|
-
|
|
499
|
+
oe(a);
|
|
500
500
|
}
|
|
501
501
|
}, t.onSliderClick = (a) => {
|
|
502
502
|
if (!t.props.disabled && t.props.onSliderClick && !t.hasMoved) {
|
|
@@ -504,12 +504,12 @@ let pe = function(i) {
|
|
|
504
504
|
t.props.onSliderClick(p);
|
|
505
505
|
}
|
|
506
506
|
}, t.createOnKeyDown = (a) => (c) => {
|
|
507
|
-
t.props.disabled || (t.start(a), X(t.getKeyDownEventMap()),
|
|
507
|
+
t.props.disabled || (t.start(a), X(t.getKeyDownEventMap()), oe(c));
|
|
508
508
|
}, t.createOnMouseDown = (a) => (c) => {
|
|
509
509
|
if (t.props.disabled || c.button === 2) return;
|
|
510
510
|
t.setState({ pending: !0 });
|
|
511
511
|
const p = t.getMousePosition(c);
|
|
512
|
-
t.start(a, p[0]), X(t.getMouseEventMap()),
|
|
512
|
+
t.start(a, p[0]), X(t.getMouseEventMap()), oe(c);
|
|
513
513
|
}, t.createOnTouchStart = (a) => (c) => {
|
|
514
514
|
if (t.props.disabled || c.touches.length > 1) return;
|
|
515
515
|
t.setState({ pending: !0 });
|
|
@@ -531,8 +531,8 @@ let pe = function(i) {
|
|
|
531
531
|
const u = { key: t.props.trackClassName + "-" + a, className: t.props.trackClassName + " " + t.props.trackClassName + "-" + a, style: t.buildTrackStyle(c, t.state.upperBound - p) }, h = { index: a, value: W(t.state.value) };
|
|
532
532
|
return t.props.renderTrack(u, h);
|
|
533
533
|
};
|
|
534
|
-
let s =
|
|
535
|
-
s.length || (s =
|
|
534
|
+
let s = re(n.value);
|
|
535
|
+
s.length || (s = re(n.defaultValue)), t.pendingResizeTimeouts = [];
|
|
536
536
|
const l = [];
|
|
537
537
|
for (let a = 0; a < s.length; a += 1) s[a] = z(s[a], n), l.push(a);
|
|
538
538
|
return t.resizeObserver = null, t.resizeElementRef = U.createRef(), t.state = { index: -1, upperBound: 0, sliderLength: 0, value: s, zIndices: l }, t;
|
|
@@ -542,7 +542,7 @@ let pe = function(i) {
|
|
|
542
542
|
return o.componentDidMount = function() {
|
|
543
543
|
typeof window < "u" && (this.resizeObserver = new ResizeObserver(this.handleResize), this.resizeObserver.observe(this.resizeElementRef.current), this.resize());
|
|
544
544
|
}, d.getDerivedStateFromProps = function(n, t) {
|
|
545
|
-
const s =
|
|
545
|
+
const s = re(n.value);
|
|
546
546
|
return s.length ? t.pending ? null : { value: s.map((l) => z(l, n)) } : null;
|
|
547
547
|
}, o.componentDidUpdate = function() {
|
|
548
548
|
this.state.upperBound === 0 && this.resize();
|
|
@@ -648,9 +648,9 @@ let pe = function(i) {
|
|
|
648
648
|
}(l, t, h, u))), this.setState({ value: t }, this.fireChangeEvent.bind(this, "onChange"));
|
|
649
649
|
}, o.pushSucceeding = function(n, t, s) {
|
|
650
650
|
let l, a;
|
|
651
|
-
for (l = s, a = n[l] + t; n[l + 1] !== null && a > n[l + 1]; l += 1, a = n[l] + t) n[l + 1] =
|
|
651
|
+
for (l = s, a = n[l] + t; n[l + 1] !== null && a > n[l + 1]; l += 1, a = n[l] + t) n[l + 1] = pe(a, this.props);
|
|
652
652
|
}, o.pushPreceding = function(n, t, s) {
|
|
653
|
-
for (let l = s, a = n[l] - t; n[l - 1] !== null && a < n[l - 1]; l -= 1, a = n[l] - t) n[l - 1] =
|
|
653
|
+
for (let l = s, a = n[l] - t; n[l - 1] !== null && a < n[l - 1]; l -= 1, a = n[l] - t) n[l - 1] = pe(a, this.props);
|
|
654
654
|
}, o.axisKey = function() {
|
|
655
655
|
return this.props.orientation === "vertical" ? "Y" : "X";
|
|
656
656
|
}, o.orthogonalAxisKey = function() {
|
|
@@ -699,8 +699,8 @@ let pe = function(i) {
|
|
|
699
699
|
}, style: { position: "relative" }, className: this.props.className + (this.props.disabled ? " disabled" : ""), onMouseDown: this.onSliderMouseDown, onClick: this.onSliderClick }, l, a, c);
|
|
700
700
|
}, d;
|
|
701
701
|
}(U.Component);
|
|
702
|
-
|
|
703
|
-
var Kt =
|
|
702
|
+
ue.displayName = "ReactSlider", ue.defaultProps = { min: 0, max: 100, step: 1, pageFn: (i) => 10 * i, 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: (i) => U.createElement("div", i), renderTrack: (i) => U.createElement("div", i), renderMark: (i) => U.createElement("span", i) };
|
|
703
|
+
var Kt = ue;
|
|
704
704
|
const Ut = "_container_15vgv_2", Zt = "_unitLabel_15vgv_9", Ht = "_slider_15vgv_12", Gt = "_thumb_15vgv_18", Yt = "_track_15vgv_27", Wt = "_labels_15vgv_33", E = {
|
|
705
705
|
container: Ut,
|
|
706
706
|
unitLabel: Zt,
|
|
@@ -769,7 +769,7 @@ const Xt = "_tematicalFiltersInputContainer_1vm1r_2", Jt = "_inputTypeContainer_
|
|
|
769
769
|
inputTypeContainer: Jt,
|
|
770
770
|
checkboxContainer: Qt,
|
|
771
771
|
absoluteSliderContainer: en
|
|
772
|
-
},
|
|
772
|
+
}, be = ({
|
|
773
773
|
indicator: i,
|
|
774
774
|
//onChangeBothType
|
|
775
775
|
activeColor: d
|
|
@@ -949,7 +949,7 @@ const Xt = "_tematicalFiltersInputContainer_1vm1r_2", Jt = "_inputTypeContainer_
|
|
|
949
949
|
}
|
|
950
950
|
) });
|
|
951
951
|
};
|
|
952
|
-
|
|
952
|
+
be.propTypes = {
|
|
953
953
|
indicator: e.shape({
|
|
954
954
|
name: e.string,
|
|
955
955
|
type: e.string,
|
|
@@ -988,7 +988,7 @@ const Oe = ({
|
|
|
988
988
|
color: d,
|
|
989
989
|
activeColor: o,
|
|
990
990
|
children: s == null ? void 0 : s.map((l, a) => /* @__PURE__ */ r(
|
|
991
|
-
|
|
991
|
+
be,
|
|
992
992
|
{
|
|
993
993
|
indicator: l,
|
|
994
994
|
fontColor: d
|
|
@@ -1040,7 +1040,7 @@ const Re = ({
|
|
|
1040
1040
|
},
|
|
1041
1041
|
`subcategory-${c}`
|
|
1042
1042
|
)) : t && t.map((a, c) => /* @__PURE__ */ r(
|
|
1043
|
-
|
|
1043
|
+
be,
|
|
1044
1044
|
{
|
|
1045
1045
|
indicator: a,
|
|
1046
1046
|
fontColor: l,
|
|
@@ -1184,7 +1184,7 @@ const ln = "_barChartContainer_d2f1z_2", cn = {
|
|
|
1184
1184
|
}) => {
|
|
1185
1185
|
const { t: u } = w(), { xScale: h, ticks: g, height: b } = te(() => {
|
|
1186
1186
|
if (i && i.length > 0) {
|
|
1187
|
-
const C = (i == null ? void 0 : i.length) * (o + n) + s * 2, f =
|
|
1187
|
+
const C = (i == null ? void 0 : i.length) * (o + n) + s * 2, f = ye.max(i, (x) => x.value) || 1, v = ye.scaleLinear().domain([0, p || f]).range([0, d - a]), y = Array.from({ length: c + 1 }, (x, k) => p ? p / c * k : f / c * k);
|
|
1188
1188
|
return {
|
|
1189
1189
|
xScale: v,
|
|
1190
1190
|
ticks: y,
|
|
@@ -1335,7 +1335,7 @@ un.propTypes = {
|
|
|
1335
1335
|
numberOfDivisions: e.number,
|
|
1336
1336
|
leftPadding: e.number
|
|
1337
1337
|
};
|
|
1338
|
-
const hn = "_indicatorsCategory_1cu33_2", mn = "_title_1cu33_5", gn = "_list_1cu33_11",
|
|
1338
|
+
const hn = "_indicatorsCategory_1cu33_2", mn = "_title_1cu33_5", gn = "_list_1cu33_11", ae = {
|
|
1339
1339
|
indicatorsCategory: hn,
|
|
1340
1340
|
title: mn,
|
|
1341
1341
|
list: gn
|
|
@@ -1350,7 +1350,7 @@ const hn = "_indicatorsCategory_1cu33_2", mn = "_title_1cu33_5", gn = "_list_1cu
|
|
|
1350
1350
|
optionContainer: kn,
|
|
1351
1351
|
customRadious: wn,
|
|
1352
1352
|
optionText: Nn
|
|
1353
|
-
},
|
|
1353
|
+
}, fe = ({
|
|
1354
1354
|
indicator: i,
|
|
1355
1355
|
values: d = [],
|
|
1356
1356
|
activeColor: o,
|
|
@@ -1469,7 +1469,7 @@ const hn = "_indicatorsCategory_1cu33_2", mn = "_title_1cu33_5", gn = "_list_1cu
|
|
|
1469
1469
|
{
|
|
1470
1470
|
className: S.indicatorName,
|
|
1471
1471
|
style: { color: g ? o : n },
|
|
1472
|
-
children: /* @__PURE__ */ r(
|
|
1472
|
+
children: /* @__PURE__ */ r(me, { i18nKey: u, components: { sup: /* @__PURE__ */ r("sup", {}) } })
|
|
1473
1473
|
}
|
|
1474
1474
|
)
|
|
1475
1475
|
]
|
|
@@ -1481,7 +1481,7 @@ const hn = "_indicatorsCategory_1cu33_2", mn = "_title_1cu33_5", gn = "_list_1cu
|
|
|
1481
1481
|
}
|
|
1482
1482
|
);
|
|
1483
1483
|
};
|
|
1484
|
-
|
|
1484
|
+
fe.propTypes = {
|
|
1485
1485
|
indicator: e.shape({
|
|
1486
1486
|
name: e.string,
|
|
1487
1487
|
type: e.string
|
|
@@ -1514,7 +1514,7 @@ const Sn = "_indicatorsSubCategory_1dzsi_2", Tn = "_list_1dzsi_8", xe = {
|
|
|
1514
1514
|
return L(() => {
|
|
1515
1515
|
C(t == l);
|
|
1516
1516
|
}, [t, l]), /* @__PURE__ */ m(
|
|
1517
|
-
|
|
1517
|
+
ge.div,
|
|
1518
1518
|
{
|
|
1519
1519
|
className: xe.indicatorsSubCategory,
|
|
1520
1520
|
initial: { height: "43px" },
|
|
@@ -1532,7 +1532,7 @@ const Sn = "_indicatorsSubCategory_1dzsi_2", Tn = "_list_1dzsi_8", xe = {
|
|
|
1532
1532
|
)
|
|
1533
1533
|
] }) }),
|
|
1534
1534
|
d && /* @__PURE__ */ r("div", { className: xe.list, children: d == null ? void 0 : d.map((f, v) => /* @__PURE__ */ r(
|
|
1535
|
-
|
|
1535
|
+
fe,
|
|
1536
1536
|
{
|
|
1537
1537
|
indicator: f,
|
|
1538
1538
|
defaultColor: o,
|
|
@@ -1581,9 +1581,9 @@ const je = ({
|
|
|
1581
1581
|
return L(() => {
|
|
1582
1582
|
f(s === d);
|
|
1583
1583
|
}, [s, d]), /* @__PURE__ */ m(
|
|
1584
|
-
|
|
1584
|
+
ge.div,
|
|
1585
1585
|
{
|
|
1586
|
-
className:
|
|
1586
|
+
className: ae.indicatorsCategory,
|
|
1587
1587
|
initial: { height: "53px" },
|
|
1588
1588
|
animate: { height: C ? "auto" : "53px" },
|
|
1589
1589
|
transition: { duration: 0.4 },
|
|
@@ -1593,7 +1593,7 @@ const je = ({
|
|
|
1593
1593
|
marginBottom: C ? "20px" : "0px"
|
|
1594
1594
|
},
|
|
1595
1595
|
children: [
|
|
1596
|
-
/* @__PURE__ */ m("h2", { className: `${
|
|
1596
|
+
/* @__PURE__ */ m("h2", { className: `${ae.title}`, onClick: () => t(d), children: [
|
|
1597
1597
|
/* @__PURE__ */ r("span", { style: { color: C ? o : n }, children: C ? "-" : "+" }),
|
|
1598
1598
|
/* @__PURE__ */ r(
|
|
1599
1599
|
"span",
|
|
@@ -1622,8 +1622,8 @@ const je = ({
|
|
|
1622
1622
|
},
|
|
1623
1623
|
`subcKey ${_}`
|
|
1624
1624
|
)
|
|
1625
|
-
) : /* @__PURE__ */ r("div", { className:
|
|
1626
|
-
|
|
1625
|
+
) : /* @__PURE__ */ r("div", { className: ae.list, children: (v = i.indicators) == null ? void 0 : v.map((y, x) => /* @__PURE__ */ r(
|
|
1626
|
+
fe,
|
|
1627
1627
|
{
|
|
1628
1628
|
indicator: y,
|
|
1629
1629
|
values: y.type == "twoUnits" && y.values,
|
|
@@ -1855,7 +1855,7 @@ const In = "_legendContainer_atg3j_3", zn = "_closeButton_atg3j_18", Vn = "_titl
|
|
|
1855
1855
|
h
|
|
1856
1856
|
] })
|
|
1857
1857
|
] }, d)) }) }),
|
|
1858
|
-
/* @__PURE__ */ r("h3", { className: M.titleLegendList, children: t ? /* @__PURE__ */ r(
|
|
1858
|
+
/* @__PURE__ */ r("h3", { className: M.titleLegendList, children: t ? /* @__PURE__ */ r(me, { i18nKey: t, components: { sup: /* @__PURE__ */ r("sup", {}) } }) : p("mainUse") }),
|
|
1859
1859
|
/* @__PURE__ */ r("div", { className: M.legendListContainer, children: s ? /* @__PURE__ */ m("div", { className: M.absoluteValueContainer, children: [
|
|
1860
1860
|
/* @__PURE__ */ r(
|
|
1861
1861
|
"div",
|
|
@@ -1953,7 +1953,7 @@ const ti = ({
|
|
|
1953
1953
|
sources: p = [],
|
|
1954
1954
|
layers: u = []
|
|
1955
1955
|
}) => {
|
|
1956
|
-
const h =
|
|
1956
|
+
const h = he(), [g, b] = B(null), C = ce((f) => f.mapState.showTexts);
|
|
1957
1957
|
return L(() => {
|
|
1958
1958
|
if (h.current) {
|
|
1959
1959
|
const f = h.current.getMap();
|
|
@@ -2059,7 +2059,7 @@ const ni = "_mapContainer_b0pyr_3", ii = {
|
|
|
2059
2059
|
const { t: d } = w();
|
|
2060
2060
|
return /* @__PURE__ */ r("div", { className: Ne.FeaturePopUp, children: i.map((o) => /* @__PURE__ */ m("p", { children: [
|
|
2061
2061
|
/* @__PURE__ */ m("span", { className: Ne.title, children: [
|
|
2062
|
-
/* @__PURE__ */ r(
|
|
2062
|
+
/* @__PURE__ */ r(me, { i18nKey: o.name, components: { sup: /* @__PURE__ */ r("sup", {}) } }),
|
|
2063
2063
|
": "
|
|
2064
2064
|
] }),
|
|
2065
2065
|
o.value.toLocaleString("de", { maximumFractionDigits: 2 }),
|
|
@@ -2083,7 +2083,7 @@ const ni = "_mapContainer_b0pyr_3", ii = {
|
|
|
2083
2083
|
showTexts: b
|
|
2084
2084
|
}) => {
|
|
2085
2085
|
console.log(u);
|
|
2086
|
-
const C =
|
|
2086
|
+
const C = he();
|
|
2087
2087
|
return L(() => {
|
|
2088
2088
|
if (C.current) {
|
|
2089
2089
|
const f = C.current.getMap();
|
|
@@ -2093,12 +2093,13 @@ const ni = "_mapContainer_b0pyr_3", ii = {
|
|
|
2093
2093
|
}
|
|
2094
2094
|
}, [b]), L(() => {
|
|
2095
2095
|
let f = new Xe();
|
|
2096
|
-
return
|
|
2097
|
-
|
|
2096
|
+
return ie.addProtocol("pmtiles", f.tile), () => {
|
|
2097
|
+
ie.removeProtocol("pmtiles");
|
|
2098
2098
|
};
|
|
2099
2099
|
}, []), /* @__PURE__ */ r("div", { className: `${ii.mapContainer}`, style: s && s, children: /* @__PURE__ */ m(
|
|
2100
2100
|
Je,
|
|
2101
2101
|
{
|
|
2102
|
+
mapLib: ie,
|
|
2102
2103
|
initialViewState: i,
|
|
2103
2104
|
ref: C,
|
|
2104
2105
|
hash: !1,
|
|
@@ -2236,21 +2237,21 @@ const gi = Me({
|
|
|
2236
2237
|
i.activeIndicatorUnit = d.payload;
|
|
2237
2238
|
}
|
|
2238
2239
|
}
|
|
2239
|
-
}), { setShowTexts: rs, setYear:
|
|
2240
|
+
}), { setShowTexts: rs, setYear: le, setActiveIndicatorKey: as, setActiveIndicatorType: ls, setActiveIndicatorUnit: cs } = gi.actions, bi = "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", fi = "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", yi = "_slider_a19yo_2", Ci = "_playButton_a19yo_17", vi = "_sliderOpen_a19yo_28", _i = "_sliderResults_a19yo_32", Y = {
|
|
2240
2241
|
slider: yi,
|
|
2241
2242
|
playButton: Ci,
|
|
2242
2243
|
sliderOpen: vi,
|
|
2243
2244
|
sliderResults: _i
|
|
2244
2245
|
}, xi = ({ onResults: i = !1, defaultYear: d = 2025, firstYear: o = 2025, lastYear: n = 2050, zIndex: t = 10, rightBarOpen: s = !1 }) => {
|
|
2245
2246
|
const [l, a] = B(d), c = Te(), p = (y, x) => {
|
|
2246
|
-
a(x), c(
|
|
2247
|
+
a(x), c(le(x - 2e3));
|
|
2247
2248
|
}, [u, h] = B(!1), g = () => {
|
|
2248
2249
|
h(!0);
|
|
2249
2250
|
}, b = () => {
|
|
2250
2251
|
h(!1);
|
|
2251
2252
|
};
|
|
2252
2253
|
((y, x) => {
|
|
2253
|
-
const k =
|
|
2254
|
+
const k = he();
|
|
2254
2255
|
L(() => {
|
|
2255
2256
|
k.current = y;
|
|
2256
2257
|
}, [y]), L(() => {
|
|
@@ -2263,7 +2264,7 @@ const gi = Me({
|
|
|
2263
2264
|
}
|
|
2264
2265
|
}, [x]);
|
|
2265
2266
|
})(() => {
|
|
2266
|
-
u && (l != 2050 ? (a(l + 1), c(
|
|
2267
|
+
u && (l != 2050 ? (a(l + 1), c(le(l - 2e3 + 1))) : (a(2025), c(le(25))));
|
|
2267
2268
|
}, 1e3);
|
|
2268
2269
|
const f = st({
|
|
2269
2270
|
palette: {
|
|
@@ -2386,7 +2387,7 @@ const Si = Me({
|
|
|
2386
2387
|
}), { setShowLogIn: Ti, setShowUserMenu: Mi } = Si.actions, $i = "_UserMenuTrigger_uglss_2", Li = {
|
|
2387
2388
|
UserMenuTrigger: $i
|
|
2388
2389
|
}, Fi = ({ cssClass: i, loginLocale: d = "login" }) => {
|
|
2389
|
-
const o = Te(), n =
|
|
2390
|
+
const o = Te(), n = ce((a) => a.userState.user.isLoggedIn), t = ce((a) => a.userState.user.username), { t: s } = w(), l = () => {
|
|
2390
2391
|
o(n ? Ti(!0) : Mi(!0));
|
|
2391
2392
|
};
|
|
2392
2393
|
return /* @__PURE__ */ r("div", { className: `${Li.UserMenuTrigger} link ${i}`, onClick: l, children: n ? t : s(d) });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tmf_ciclica/ciclicastorybook",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.20-beta.1",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
5
|
"module": "dist/index.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -63,11 +63,9 @@
|
|
|
63
63
|
"@vitejs/plugin-react": "^4.5.2",
|
|
64
64
|
"d3": "^7.9.0",
|
|
65
65
|
"framer-motion": "^12.17.3",
|
|
66
|
-
"i18next": "^25.2.1",
|
|
67
66
|
"mapbox-gl": "^3.12.0",
|
|
68
67
|
"maplibre-gl": "^5.6.0",
|
|
69
68
|
"pmtiles": "^4.3.0",
|
|
70
|
-
"react-i18next": "^15.5.3",
|
|
71
69
|
"react-map-gl": "^8.0.4",
|
|
72
70
|
"react-redux": "^9.2.0",
|
|
73
71
|
"react-router-dom": "^7.6.2",
|