@tmf_ciclica/ciclicastorybook 1.1.24 → 1.1.26
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 +4 -0
- package/dist/index.es.js +2526 -0
- package/dist/vite.svg +1 -0
- package/package.json +4 -2
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,2526 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('@charset "UTF-8";@import"https://unpkg.com/maplibre-gl@^5.3.0/dist/maplibre-gl.css";@import"https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap";._ambitSelector_tqnnf_2{display:flex;flex-wrap:nowrap;justify-content:center;gap:0;flex-direction:column;align-items:flex-start;width:100%}._ambitSelector_tqnnf_2 ._header_tqnnf_11{width:100%;display:flex;flex-wrap:nowrap;justify-content:space-between;gap:0;flex-direction:row;align-items:center;padding-bottom:26px}._ambitSelector_tqnnf_2 ._header_tqnnf_11 ._nameDateContainer_tqnnf_21{justify-content:flex-start;width:100%;flex:1;display:flex;flex-wrap:nowrap;justify-content:center;gap:0;flex-direction:row;align-items:center}._ambitSelector_tqnnf_2 ._header_tqnnf_11 ._nameDateContainer_tqnnf_21 ._ambitName_tqnnf_37{font-size:18px;font-weight:600;flex:1}._ambitSelector_tqnnf_2 ._header_tqnnf_11 ._nameDateContainer_tqnnf_21 ._ambitName_tqnnf_37 button{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:0;flex-direction:row;align-items:center;gap:5px}._ambitSelector_tqnnf_2 ._header_tqnnf_11 ._nameDateContainer_tqnnf_21 ._ambitDate_tqnnf_51{font-size:18px;font-weight:600;flex:.5}._ambitSelector_tqnnf_2 ._header_tqnnf_11 ._nameDateContainer_tqnnf_21 ._ambitDate_tqnnf_51 button{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:0;flex-direction:row;align-items:center;gap:5px}._ambitSelector_tqnnf_2 ._header_tqnnf_11 ._buttonsContainer_tqnnf_65{flex:.3;display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:0;flex-direction:row;align-items:center}._ambitItem_1ueih_2{display:flex;flex-wrap:nowrap;justify-content:space-between;gap:0;flex-direction:row;align-items:center;gap:10px;width:100%;padding-bottom:30px;padding-top:30px}._ambitItem_1ueih_2 ._ambitNameDate_1ueih_16{flex:1;display:flex;flex-wrap:nowrap;justify-content:center;gap:0;flex-direction:row;align-items:center;cursor:pointer}._ambitItem_1ueih_2 ._ambitNameDate_1ueih_16 ._ambitName_1ueih_16{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:0;flex-direction:row;align-items:center;flex:1}._ambitItem_1ueih_2 ._ambitNameDate_1ueih_16 ._ambitDate_1ueih_35{flex:.5}._ambitItem_1ueih_2 ._ambitButtons_1ueih_38{flex:.3;display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:0;flex-direction:row;align-items:center;gap:8px}._buttonsContainer_1audx_2{display:flex;gap:8px}._buttonsContainer_1audx_2._vertical_1audx_6{flex-direction:column}._buttonsContainer_1audx_2._horizontal_1audx_9{flex-direction:row}._button_1audx_2{background:transparent;border:none;display:flex;align-items:center;cursor:pointer;padding:4px;position:relative}._button_1audx_2:hover{opacity:.8}._button_1audx_2._active_1audx_25{font-weight:700}._button_1audx_2 ._buttonName_1audx_28{margin:0 4px}._left_19lnt_3{position:absolute;width:auto;bottom:50%;right:calc(100% + 10px);transform:translateY(50%);font-size:16px;background-color:#fff;border-radius:4px;padding:10px;margin:0;white-space:nowrap;color:#000}._left_19lnt_3:after{content:"";z-index:-1;left:100%;top:50%;transform:translateY(-50%);border-width:.5em;border-style:solid;border-color:#fff;position:absolute;border-top-color:transparent;border-bottom-color:transparent;border-right-color:transparent;transform-origin:center right}._top_19lnt_33{position:absolute;width:auto;bottom:calc(100% + 10px);right:50%;transform:translate(50%);font-size:16px;background-color:#fff;border-radius:4px;padding:10px;margin:0;white-space:nowrap;z-index:10;color:#000}._top_19lnt_33:after{content:"";z-index:-1;right:50%;top:100%;transform:translate(50%);border-width:.5em;border-style:solid;border-color:#fff;position:absolute;border-bottom-color:transparent;border-left-color:transparent;border-right-color:transparent;color:#000;transform-origin:center right}._bottom_19lnt_66{position:absolute;width:auto;top:calc(100% + 10px);right:50%;height:fit-content;transform:translate(50%);font-size:16px;background-color:#fff;border-radius:4px;padding:10px;margin:0;z-index:10;color:#000}._bottom_19lnt_66:after{content:"";z-index:-1;right:50%;bottom:100%;transform:translate(50%);border-width:.5em;border-style:solid;border-color:transparent;border-bottom-color:#fff;position:absolute;transform-origin:center right}._right_19lnt_97{position:absolute;width:auto;bottom:50%;left:calc(100% + 10px);transform:translateY(50%);font-size:16px;background-color:#fff;border-radius:4px;padding:20px;margin:0;white-space:nowrap;height:fit-content;color:#000;z-index:10}._right_19lnt_97:after{content:"";z-index:-1;right:100%;top:50%;color:#000;transform:translateY(-50%);border-width:.5em;border-style:solid;border-color:#fff;position:absolute;border-top-color:transparent;border-bottom-color:transparent;border-left-color:transparent;transform-origin:center right}._AppliedFiltersContainer_s8ooe_2{display:flex;flex-wrap:nowrap;justify-content:start;gap:10px;flex-direction:row;align-items:start}._AppliedFiltersContainer_s8ooe_2 ._AppliedFilterContent_s8ooe_10{display:flex;flex-wrap:nowrap;justify-content:center;gap:10px;flex-direction:row;align-items:center;font-size:16px;font-weight:400;height:35px;width:fit-content;padding:0 20px;border-radius:100px}._checkboxContainer_zld97_2{display:flex;align-items:center;gap:.5rem;font-size:14px;font-weight:400;cursor:pointer}._checkboxContainer_zld97_2 input[type=checkbox]{-moz-appearance:none;appearance:none;-webkit-appearance:none;width:10px;height:10px;border-radius:1px;background-color:#fff;cursor:pointer}._container_15vgv_2{padding-top:15px;font-size:14px}._container_15vgv_2 span{font-size:14px}._container_15vgv_2 ._unitLabel_15vgv_9{height:40px}._container_15vgv_2 ._slider_15vgv_12{height:6px;background-color:#ddd;border-radius:3px;position:relative}._container_15vgv_2 ._thumb_15vgv_18{height:20px;width:20px;background-color:#605b56;border-radius:50%;cursor:grab;top:-7px;position:absolute}._container_15vgv_2 ._track_15vgv_27{top:0;bottom:0;background:#605b56;border-radius:3px}._container_15vgv_2 ._labels_15vgv_33{display:flex;justify-content:space-between;font-size:14px;margin-top:10px}._tematicalFiltersInputContainer_1vm1r_2 ._inputTypeContainer_1vm1r_2{display:flex;flex-wrap:nowrap;justify-content:center;gap:0;flex-direction:column;align-items:flex-start;gap:14px;padding-bottom:14px}._tematicalFiltersInputContainer_1vm1r_2 ._inputTypeContainer_1vm1r_2 label,._tematicalFiltersInputContainer_1vm1r_2 ._inputTypeContainer_1vm1r_2 input{cursor:pointer;font-size:14px}._tematicalFiltersInputContainer_1vm1r_2 ._inputTypeContainer_1vm1r_2 input[type=radio]{-moz-appearance:none;appearance:none;-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background-color:#fff;transition:background-color .2s ease;cursor:pointer;vertical-align:middle}._tematicalFiltersInputContainer_1vm1r_2 ._checkboxContainer_1vm1r_28{display:flex;flex-wrap:nowrap;justify-content:center;gap:0;flex-direction:column;align-items:flex-start;gap:14px}._tematicalFiltersInputContainer_1vm1r_2 ._absoluteSliderContainer_1vm1r_37{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:0;flex-direction:row;align-items:flex-start}._FiltersAmbitContainer_6o4gt_2{width:100%;height:100%;padding:28.5px 0 0 24px}._FiltersAmbitContainer_6o4gt_2 ._FiltersAmbitHeader_6o4gt_7{display:flex;flex-wrap:nowrap;justify-content:start;gap:30px;flex-direction:column;align-items:start}._FiltersAmbitContainer_6o4gt_2 ._FiltersAmbitHeader_6o4gt_7 ._FiltersAmbitTitle_6o4gt_15{font-size:18px;font-weight:600;padding:0 0 26px;border-bottom:1.5px solid #605B56;width:100%}._FiltersAmbitContainer_6o4gt_2 ._FiltersAmbitHeader_6o4gt_7 ._FiltersAmbitDescription_6o4gt_22{display:flex;flex-wrap:nowrap;justify-content:start;gap:10px;flex-direction:column;align-items:start;padding:0 0 26px;font-size:16px;font-weight:400}._FiltersAmbitContainer_6o4gt_2 ._FiltersAmbitHeader_6o4gt_7 ._FiltersAmbitDescription_6o4gt_22 ._FiltersAmbitDescriptionTitle_6o4gt_33{font-size:18px;font-weight:600}._barChartContainer_d2f1z_2{height:100%;width:100%;display:flex;flex-wrap:nowrap;justify-content:center;gap:0;flex-direction:row;align-items:center}._graphicContainer_c9zrg_2{display:flex;flex-wrap:nowrap;justify-content:center;gap:0;flex-direction:column;align-items:center;width:100%;border:1.5px solid black;padding:33px 50px;border-radius:20px}._graphicContainer_c9zrg_2 ._titleContainer_c9zrg_14{display:flex;flex-wrap:nowrap;gap:0;flex-direction:row;align-items:center;justify-content:center;margin-bottom:83px}._indicatorsCategory_1cu33_2{overflow:hidden}._indicatorsCategory_1cu33_2 ._title_1cu33_5{align-items:center;gap:10px;cursor:pointer;margin-bottom:25px}._indicatorsCategory_1cu33_2 ._list_1cu33_11{display:flex;flex-wrap:nowrap;justify-content:start;flex-direction:column;align-items:start;width:100%;gap:20px;padding-bottom:20px}._indicatorContainer_lw8gx_2{display:flex;flex-wrap:nowrap;justify-content:start;gap:0;flex-direction:column;align-items:center;gap:10px}._indicatorContainer_lw8gx_2 ._indicatorNameContainer_lw8gx_11{display:flex;flex-wrap:nowrap;justify-content:start;gap:0;flex-direction:row;align-items:center;gap:10px}._indicatorContainer_lw8gx_2 ._dot_lw8gx_20{border-radius:100px;width:16px;height:16px}._indicatorContainer_lw8gx_2 ._indicatorName_lw8gx_11{cursor:pointer;font-weight:400;text-align:left}._switchExternalContainer_lw8gx_31{display:flex;flex-wrap:nowrap;justify-content:start;gap:0;flex-direction:column;align-items:start;margin:20px 0 0}._switchExternalContainer_lw8gx_31 ._switchType_lw8gx_40{margin:0;width:100%}._switchExternalContainer_lw8gx_31 ._switchType_lw8gx_40 ._switchTypeOptions_lw8gx_44{gap:20px;display:flex;flex-wrap:nowrap;justify-content:start;gap:0;flex-direction:column;align-items:start;margin:0 0 20px 23px}._switchExternalContainer_lw8gx_31 ._switchType_lw8gx_40 ._switchTypeOptions_lw8gx_44 ._optionContainer_lw8gx_55{display:flex;flex-wrap:nowrap;justify-content:center;gap:0;flex-direction:row;align-items:center;gap:10px;cursor:pointer}._switchExternalContainer_lw8gx_31 ._switchType_lw8gx_40 ._switchTypeOptions_lw8gx_44 ._optionContainer_lw8gx_55 ._customRadious_lw8gx_65{width:16px;height:16px;border-radius:100px;border:1px solid;padding:0}._switchExternalContainer_lw8gx_31 ._switchType_lw8gx_40 ._switchTypeOptions_lw8gx_44 ._optionContainer_lw8gx_55 ._optionText_lw8gx_72{font-weight:400}._indicatorsSubCategory_1dzsi_2{overflow:hidden}._indicatorsSubCategory_1dzsi_2 h3{text-align:left}._indicatorsSubCategory_1dzsi_2 ._list_1dzsi_8{display:flex;flex-wrap:nowrap;justify-content:center;gap:0;flex-direction:column;align-items:start;margin:20px 0;gap:20px}._indicatorsList_fklyu_2{width:100%;padding-left:30px}._indicatorsList_fklyu_2 ._title_fklyu_6{border-bottom:1px solid;padding-bottom:25px;margin-bottom:32px}._langSelector_1of0g_2{position:relative;width:fit-content}._currentLang_1of0g_7{color:#404040;cursor:pointer;display:flex;flex-wrap:nowrap;justify-content:center;gap:0;flex-direction:row;align-items:center;gap:5px;text-transform:capitalize}._currentLang_1of0g_7 ._arrow_1of0g_19{width:10px}._currentLang_1of0g_7 ._prevImg_1of0g_22{width:20px}._langMenu_1of0g_26{position:absolute;width:80px;background:#000!important;border-radius:8px}._langMenu_1of0g_26 button{cursor:pointer;background:#000!important;color:#ccc;width:100%;padding:4px 8px;text-align:left}._langMenu_1of0g_26 button:first-child{border-radius:8px 8px 0 0}._langMenu_1of0g_26 button:last-child{border-radius:0 0 8px 8px}._langMenu_1of0g_26 button:hover{color:#cbcbcb;background-color:#fafafa!important}._legendContainer_atg3j_3{width:402px;background-color:#fdfdfd;color:#605b56;border:solid 1.5px #605b56;border-radius:10px;display:flex;flex-wrap:nowrap;justify-content:center;gap:0;flex-direction:column;align-items:flexStart;padding:20px;position:relative}._legendContainer_atg3j_3 ._closeButton_atg3j_18{position:absolute;right:20px;top:20px;width:24px;height:24px;border:none;background:transparent;cursor:pointer;padding:0;display:inline-flex;align-items:center;justify-content:center}._legendContainer_atg3j_3 ._closeButton_atg3j_18:before,._legendContainer_atg3j_3 ._closeButton_atg3j_18:after{content:"";position:absolute;width:16px;height:2px;background-color:#333}._legendContainer_atg3j_3 ._closeButton_atg3j_18:before{transform:rotate(45deg)}._legendContainer_atg3j_3 ._closeButton_atg3j_18:after{transform:rotate(-45deg)}._legendContainer_atg3j_3 ._titleContainer_atg3j_46{border-bottom:solid 1.5px #605b56}._legendContainer_atg3j_3 ._titleContainer_atg3j_46 h2{padding-bottom:16px}._legendContainer_atg3j_3 ._infoContainer_atg3j_52{padding-top:20px}._legendContainer_atg3j_3 ._infoContainer_atg3j_52 ul li{display:flex;flex-wrap:nowrap;justify-content:start;gap:0;flex-direction:row;align-items:center}._legendContainer_atg3j_3 ._titleLegendList_atg3j_63{font-size:20px;padding-bottom:20px;margin-bottom:20px;margin-top:30px;border-bottom:solid 1.5px #605b56}._legendContainer_atg3j_3 ._legendListContainer_atg3j_70 ._gridContainer_atg3j_70{display:grid;grid-template-columns:auto;column-gap:20px;row-gap:15px}._legendContainer_atg3j_3 ._legendListContainer_atg3j_70 ._gridContainer_atg3j_70 ._elementLegendContainer_atg3j_76{display:grid;grid-template-columns:23px auto;align-items:center;gap:5px}._legendContainer_atg3j_3 ._legendListContainer_atg3j_70 ._gridContainer_atg3j_70 ._elementLegendContainer_atg3j_76 ._colorDot_atg3j_82{width:22px;height:22px;border-radius:50%;margin-right:10px}._legendContainer_atg3j_3 ._legendListContainer_atg3j_70 ._absoluteValueContainer_atg3j_88{position:relative}._legendContainer_atg3j_3 ._legendListContainer_atg3j_70 ._absoluteValueContainer_atg3j_88 ._absoluteValueColor_atg3j_91{height:130px;width:22px;border-radius:20px}._legendContainer_atg3j_3 ._legendListContainer_atg3j_70 ._absoluteValueContainer_atg3j_88 ._absoluteValueText_atg3j_96{display:flex;flex-wrap:nowrap;justify-content:space-between;gap:0;flex-direction:column;align-items:flex-start;position:absolute;left:30px;top:0;height:100%}._legendContainer_atg3j_3 ._moreInfoContainer_atg3j_108{margin-top:30px;padding:8.5px 20px;display:flex;flex-wrap:nowrap;justify-content:center;gap:0;flex-direction:row;align-items:center;border:1.5px solid #605b56;border-radius:25px;font-size:16px;font-weight:600}._logo_1ewa6_2{padding:10px;height:100%}._logo_1ewa6_2 img{height:100%}._mapContainer_84pkf_2{width:100vw;height:100vh}._mapContainer_b0pyr_3{width:100vw;height:100vh;position:absolute;top:0;z-index:0}._FeaturePopUp_1gd6w_2 ._title_1gd6w_2{font-weight:600}._sectionBar_1egwc_2{height:70px;width:100%;background-color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid black;transition:width .3s ease}._leftContent_1egwc_14{display:flex;align-items:center;gap:12px}._textContainer_1egwc_20{display:flex;flex-direction:row;align-items:center;gap:8px}._title_1egwc_27{font-size:16px;font-weight:600;color:#000}._subtitle_1egwc_33{font-size:16px;color:#000}._rightContent_1egwc_38{display:flex;align-items:center;gap:8px}._slider_a19yo_2{position:absolute;padding:5px 20px;right:150px;border:1px solid;border-radius:10px;display:flex;gap:20px;color:#605b56;justify-content:center;align-items:center;background-color:#fff;top:188px;transition:all .5s ease-out}._slider_a19yo_2 ._playButton_a19yo_17,._slider_a19yo_2 ._playButton_a19yo_17._hover_a19yo_20{background-color:transparent!important}._slider_a19yo_2 ._playButton_a19yo_17 img{height:30px;width:30px}._sliderOpen_a19yo_28{right:490px}._sliderResults_a19yo_32{position:absolute;top:75px;right:430px;padding:5px 20px;border:1px solid;border-radius:10px;display:flex;gap:20px;color:#605b56;justify-content:center;align-items:center;background-color:#fff;transition:all .5s ease-out}._sliderResults_a19yo_32 ._playButton_a19yo_17,._sliderResults_a19yo_32 ._playButton_a19yo_17._hover_a19yo_20{background-color:transparent!important}._sliderResults_a19yo_32 ._playButton_a19yo_17 img{height:30px;width:30px}._TopNavMenuContainer_15agj_2{display:flex;flex-wrap:nowrap;justify-content:start;gap:0;flex-direction:row;align-items:start;width:fit-content;gap:80px}._TopNavMenuContainer_15agj_2 ._topNavOptions_15agj_12{display:flex;flex-wrap:nowrap;justify-content:center;gap:0;flex-direction:row;align-items:center;cursor:pointer;padding:0 10px;text-align:center}._TopNavMenuContainer_15agj_2 ._active_15agj_23{border-bottom:5px solid white}._UserMenuTrigger_uglss_2{height:100%;display:flex;flex-wrap:nowrap;justify-content:space-between;gap:0;flex-direction:row;align-items:center}._header_t7qdl_2{width:100%;display:flex;align-items:center;position:relative;padding:0 16px;background-color:#fff;border-bottom:1px solid black;z-index:10}._header_t7qdl_2 ._leftComponents_t7qdl_12,._header_t7qdl_2 ._centerComponents_t7qdl_13,._header_t7qdl_2 ._rightComponents_t7qdl_14{position:absolute;top:0;bottom:0;display:flex;align-items:center}._header_t7qdl_2 ._leftComponents_t7qdl_12{left:16px}._header_t7qdl_2 ._centerComponents_t7qdl_13{left:50%;transform:translate(-50%)}._header_t7qdl_2 ._rightComponents_t7qdl_14{right:16px}._sidebar_1jqo2_2{position:fixed;top:0;right:0;height:100%;background-color:#fff;box-shadow:-2px 0 5px #0000001a;overflow-x:hidden;overflow-y:auto;transition:width .3s ease;z-index:1000;width:0}._open_1jqo2_16{border-left:1px solid #ddd}._content_1jqo2_20{position:relative;padding:20px;height:100%}._closeButton_1jqo2_26{position:absolute;top:10px;right:10px;font-size:24px;background:none;border:none;cursor:pointer;color:#333;transition:color .2s ease}._closeButton_1jqo2_26:hover{color:#000}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import { jsxs as m, jsx as r, Fragment as qe } from "react/jsx-runtime";
|
|
3
|
+
import Z, { useState as B, useEffect as F, useMemo as te, useLayoutEffect as Ee, useRef as me } from "react";
|
|
4
|
+
import e from "prop-types";
|
|
5
|
+
import { useTranslation as k, Trans as ge } from "react-i18next";
|
|
6
|
+
import { motion as Ce } from "framer-motion";
|
|
7
|
+
import { create as Ke } from "zustand";
|
|
8
|
+
import * as ye from "d3";
|
|
9
|
+
import Ze from "mapbox-gl";
|
|
10
|
+
import { useSelector as de, useDispatch as Te } from "react-redux";
|
|
11
|
+
import Ue, { Source as He, Layer as Ge, NavigationControl as Ye, Popup as We } from "react-map-gl/mapbox";
|
|
12
|
+
import ie from "maplibre-gl";
|
|
13
|
+
import { Protocol as Xe } from "pmtiles";
|
|
14
|
+
import Je, { Source as Qe, Layer as et, NavigationControl as tt, Popup as nt } from "react-map-gl/maplibre";
|
|
15
|
+
import { createSlice as Me } from "@reduxjs/toolkit";
|
|
16
|
+
import it from "@mui/material/Slider";
|
|
17
|
+
import { createTheme as ot, Box as st } from "@mui/material";
|
|
18
|
+
import { ThemeProvider as rt } from "@emotion/react";
|
|
19
|
+
import { NavLink as at } from "react-router-dom";
|
|
20
|
+
const lt = "_ambitSelector_tqnnf_2", ct = "_header_tqnnf_11", dt = "_nameDateContainer_tqnnf_21", pt = "_ambitName_tqnnf_37", ut = "_ambitDate_tqnnf_51", ht = "_buttonsContainer_tqnnf_65", q = {
|
|
21
|
+
ambitSelector: lt,
|
|
22
|
+
header: ct,
|
|
23
|
+
nameDateContainer: dt,
|
|
24
|
+
ambitName: pt,
|
|
25
|
+
ambitDate: ut,
|
|
26
|
+
buttonsContainer: ht
|
|
27
|
+
}, mt = "_ambitItem_1ueih_2", gt = "_ambitNameDate_1ueih_16", Ct = "_ambitName_1ueih_16", bt = "_ambitDate_1ueih_35", ft = "_ambitButtons_1ueih_38", H = {
|
|
28
|
+
ambitItem: mt,
|
|
29
|
+
ambitNameDate: gt,
|
|
30
|
+
ambitName: Ct,
|
|
31
|
+
ambitDate: bt,
|
|
32
|
+
ambitButtons: ft
|
|
33
|
+
}, yt = "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", vt = "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", _t = "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", 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='Group%206725'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.1021'%20cy='15.7148'%20r='14.3521'%20stroke='%23605B56'%20stroke-opacity='0.5'%20stroke-width='1.5'/%3e%3cg%20id='Group%206724'%3e%3cpath%20id='Vector'%20d='M17.4114%2023.3302C17.4114%2024.5419%2016.4269%2027.4724%2015.2126%2027.4724C13.9982%2027.4724%2013.0137%2024.5419%2013.0137%2023.3302C13.0137%2022.7483%2013.2453%2022.1902%2013.6577%2021.7787C14.0701%2021.3673%2014.6294%2021.1361%2015.2126%2021.1361C15.7957%2021.1361%2016.355%2021.3673%2016.7674%2021.7787C17.1798%2022.1902%2017.4114%2022.7483%2017.4114%2023.3302Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Union'%20d='M15.2919%2020.6088H11.2899L11.289%2020.6078C10.6273%2020.7718%209.36856%2021.3396%209.39931%2023.2845C9.39931%2023.2845%207.41254%2021.7976%208.17372%2019.0179L8.25575%2018.7445C8.59675%2017.7118%209.66004%2016.7306%2010.7714%2016.2435C10.7337%2012.8666%2011.5045%208.19644%2015.2919%204.724V20.6088ZM10.6835%2017.4164C10.5323%2017.5091%2010.3819%2017.6125%2010.2372%2017.7279C9.77215%2018.099%209.43634%2018.5195%209.26747%2018.8988L9.20595%2019.058C8.95666%2019.8145%208.9632%2020.4347%209.07607%2020.9291C9.34144%2020.5645%209.66233%2020.2832%209.9999%2020.0746C10.2365%2019.9284%2010.4715%2019.8251%2010.6835%2019.7494V17.4164Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Union_2'%20d='M15.293%204.724C19.0931%208.20817%2019.8548%2012.8981%2019.8115%2016.2777C20.8629%2016.7859%2021.8411%2017.7218%2022.165%2018.7045C23.1398%2021.6599%2021.0225%2023.2445%2021.0225%2023.2445C21.051%2021.4361%2019.9648%2020.8184%2019.2803%2020.6088H15.293V4.724ZM19.7676%2017.3949C19.7586%2017.5313%2019.7493%2017.6646%2019.7383%2017.7943V19.7094C19.9502%2019.7851%2020.1854%2019.8884%2020.4219%2020.0345C20.7595%2020.2432%2021.0794%2020.5253%2021.3447%2020.89C21.4466%2020.444%2021.4627%2019.8956%2021.2812%2019.2367L21.2148%2019.0179C21.0772%2018.6004%2020.7157%2018.1118%2020.1846%2017.6879C20.0493%2017.58%2019.9088%2017.4829%2019.7676%2017.3949Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cg%20id='Vector_2'%3e%3cpath%20d='M12.541%208.28445C12.541%208.28445%2014.8218%209.81829%2018.0434%208.28445C18.0434%208.28445%2016.9978%206.03912%2015.2919%204.61267C15.2919%204.61267%2013.7894%205.92343%2012.541%208.28445Z'%20fill='%23FDFDFD'/%3e%3cpath%20d='M15.3057%205.29626C15.9532%205.9116%2016.4918%206.63792%2016.8867%207.2533C17.0801%207.55466%2017.2355%207.82605%2017.3516%208.03748C16.0573%208.54342%2014.966%208.52427%2014.1807%208.36951C13.781%208.29074%2013.4584%208.17533%2013.2266%208.07556C13.7607%207.14513%2014.32%206.40895%2014.7646%205.88806C14.9759%205.64056%2015.1621%205.44302%2015.3057%205.29626Z'%20stroke='%23605B56'%20stroke-opacity='0.5'/%3e%3c/g%3e%3cpath%20id='Vector_3'%20d='M17.6984%2012.9862C17.6985%2013.4539%2017.5596%2013.9111%2017.2993%2014.3001C17.039%2014.689%2016.669%2014.9922%2016.236%2015.1712C15.803%2015.3503%2015.3265%2015.3972%2014.8668%2015.3061C14.4071%2015.2149%2013.9848%2014.9898%2013.6533%2014.6591C13.3218%2014.3285%2013.0961%2013.9072%2013.0046%2013.4485C12.9131%2012.9898%2012.96%2012.5143%2013.1393%2012.0822C13.3186%2011.6501%2013.6224%2011.2808%2014.0121%2011.021C14.4018%2010.7611%2014.86%2010.6224%2015.3287%2010.6224C15.957%2010.6224%2016.5597%2010.8715%2017.004%2011.3147C17.4484%2011.758%2017.6982%2012.3593%2017.6984%2012.9862Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_4'%20d='M17.1358%2013.0038C17.1358%2013.36%2017.0299%2013.7083%2016.8316%2014.0045C16.6332%2014.3007%2016.3513%2014.5316%2016.0214%2014.6679C15.6916%2014.8042%2015.3286%2014.8399%2014.9784%2014.7704C14.6282%2014.7009%2014.3066%2014.5294%2014.0541%2014.2774C13.8017%2014.0255%2013.6297%2013.7046%2013.5601%2013.3552C13.4904%2013.0058%2013.5262%2012.6436%2013.6628%2012.3145C13.7994%2011.9853%2014.0308%2011.704%2014.3277%2011.5061C14.6245%2011.3082%2014.9736%2011.2025%2015.3306%2011.2025C15.8094%2011.2025%2016.2685%2011.3923%2016.6071%2011.7301C16.9456%2012.0679%2017.1358%2012.526%2017.1358%2013.0038Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_5'%20d='M16.7061%2013.2093C16.6508%2013.2093%2016.5978%2013.1874%2016.5588%2013.1485C16.5197%2013.1095%2016.4978%2013.0566%2016.4978%2013.0015C16.4974%2012.7236%2016.3866%2012.4572%2016.1897%2012.2607C15.9928%2012.0642%2015.7258%2011.9537%2015.4473%2011.9533C15.4175%2011.9582%2015.3869%2011.9566%2015.3578%2011.9485C15.3287%2011.9405%2015.3017%2011.9262%2015.2786%2011.9067C15.2556%2011.8872%2015.237%2011.8629%2015.2244%2011.8356C15.2117%2011.8082%2015.2051%2011.7784%2015.2051%2011.7482C15.2051%2011.7181%2015.2117%2011.6883%2015.2244%2011.6609C15.237%2011.6336%2015.2556%2011.6093%2015.2786%2011.5898C15.3017%2011.5703%2015.3287%2011.556%2015.3578%2011.5479C15.3869%2011.5399%2015.4175%2011.5383%2015.4473%2011.5432C15.8348%2011.5435%2016.2063%2011.6973%2016.4803%2011.9707C16.7543%2012.2441%2016.9084%2012.6148%2016.9088%2013.0015C16.9088%2013.0557%2016.8876%2013.1077%2016.8498%2013.1465C16.8119%2013.1854%2016.7603%2013.2079%2016.7061%2013.2093Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_6'%20d='M16.8082%2013.6607C16.8082%2013.7106%2016.7934%2013.7594%2016.7656%2013.8008C16.7378%2013.8423%2016.6984%2013.8746%2016.6522%2013.8937C16.606%2013.9128%2016.5552%2013.9178%2016.5062%2013.9081C16.4571%2013.8983%2016.4121%2013.8743%2016.3768%2013.8391C16.3414%2013.8038%2016.3173%2013.7589%2016.3076%2013.7099C16.2978%2013.661%2016.3028%2013.6103%2016.322%2013.5642C16.3411%2013.5182%2016.3735%2013.4788%2016.4151%2013.4511C16.4566%2013.4234%2016.5055%2013.4086%2016.5555%2013.4086C16.6225%2013.4086%2016.6868%2013.4351%2016.7342%2013.4824C16.7816%2013.5297%2016.8082%2013.5939%2016.8082%2013.6607Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_7'%20d='M15.6008%2016.0612C15.5633%2016.0097%2015.5141%2015.9677%2015.4573%2015.9388C15.4005%2015.9099%2015.3376%2015.8949%2015.2738%2015.8949H15.1898C15.126%2015.8948%2015.0631%2015.9099%2015.0062%2015.9388C14.9494%2015.9677%2014.9002%2016.0096%2014.8627%2016.0612C14.8627%2016.0612%2013.6074%2017.4973%2014.1816%2021.0915C14.4989%2023.0777%2015.2314%2023.6694%2015.2314%2023.6694C15.2314%2023.6694%2015.9639%2023.0777%2016.2819%2021.0915C16.8561%2017.4973%2015.6008%2016.0612%2015.6008%2016.0612Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_8'%20d='M15.1468%2015.8949C15.083%2015.8948%2015.0201%2015.9099%2014.9632%2015.9388C14.9064%2015.9677%2014.8572%2016.0096%2014.8198%2016.0612C14.8198%2016.0612%2013.5645%2017.4973%2014.1387%2021.0915C14.456%2023.0777%2015.1884%2023.6694%2015.1884%2023.6694V15.8949H15.1468Z'%20fill='%23FDFDFD'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", wt = "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", kt = "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", Fe = ({
|
|
34
|
+
ambit: i,
|
|
35
|
+
onClickCopy: d,
|
|
36
|
+
onClickDelete: s,
|
|
37
|
+
onClickFilters: n,
|
|
38
|
+
onClickAmbit: t,
|
|
39
|
+
isActive: o,
|
|
40
|
+
activeColor: l,
|
|
41
|
+
fontColor: a,
|
|
42
|
+
moreInfo: c
|
|
43
|
+
}) => {
|
|
44
|
+
const { name: p, date: u, id: h, isBeingProcessed: g } = i;
|
|
45
|
+
return /* @__PURE__ */ m(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
className: H.ambitItem,
|
|
49
|
+
style: { borderBottom: `1px solid ${a}` },
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ m("div", { className: H.ambitNameDate, onClick: () => t(h), children: [
|
|
52
|
+
/* @__PURE__ */ m("div", { className: H.ambitName, children: [
|
|
53
|
+
/* @__PURE__ */ r(
|
|
54
|
+
"img",
|
|
55
|
+
{
|
|
56
|
+
style: { marginRight: 9 },
|
|
57
|
+
src: o ? wt : kt
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ r("span", { style: { color: o ? l : a }, children: p })
|
|
61
|
+
] }),
|
|
62
|
+
/* @__PURE__ */ r("div", { className: H.ambitDate, children: new Date(u).toLocaleDateString() })
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ m("div", { className: H.ambitButtons, children: [
|
|
65
|
+
g && /* @__PURE__ */ r("img", { src: xt }),
|
|
66
|
+
/* @__PURE__ */ r("button", { onClick: () => n(h), children: /* @__PURE__ */ r("img", { src: _t }) }),
|
|
67
|
+
/* @__PURE__ */ r("button", { onClick: () => d(h), children: /* @__PURE__ */ r("img", { src: vt }) }),
|
|
68
|
+
/* @__PURE__ */ r("button", { onClick: () => s(h), children: /* @__PURE__ */ r("img", { src: yt }) })
|
|
69
|
+
] })
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
Fe.propTypes = {
|
|
75
|
+
ambit: e.shape({
|
|
76
|
+
name: e.string.isRequired,
|
|
77
|
+
date: e.string.isRequired,
|
|
78
|
+
id: e.string.isRequired,
|
|
79
|
+
isBeingProcessed: e.bool
|
|
80
|
+
}).isRequired,
|
|
81
|
+
onClickCopy: e.func.isRequired,
|
|
82
|
+
onClickDelete: e.func.isRequired,
|
|
83
|
+
onClickFilters: e.func.isRequired,
|
|
84
|
+
onClickAmbit: e.func.isRequired,
|
|
85
|
+
isBeingProcessed: e.bool,
|
|
86
|
+
isActive: e.bool,
|
|
87
|
+
activeColor: e.string,
|
|
88
|
+
fontColor: e.string,
|
|
89
|
+
moreInfo: e.object
|
|
90
|
+
// Optional, can be used for additional info
|
|
91
|
+
};
|
|
92
|
+
const ve = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%200%2014%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20id='Vector'%20d='M7%2015L7%201M7%2015L1%209M7%2015L13%209'%20stroke='%23605B56'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", Nt = ({
|
|
93
|
+
ambitList: i,
|
|
94
|
+
activeAmbitId: d,
|
|
95
|
+
fontColor: s = "#605B56",
|
|
96
|
+
activeColor: n,
|
|
97
|
+
nameLabel: t,
|
|
98
|
+
dateLabel: o,
|
|
99
|
+
onClickCopy: l = (u) => console.log(`Copy ambit: ${u}`),
|
|
100
|
+
onCLickDelete: a = (u) => console.log(`Delete ambit: ${u}`),
|
|
101
|
+
onClickFilters: c = (u) => console.log(`Filters clicked: ${u}`),
|
|
102
|
+
onClickAmbit: p = (u) => console.log(`OnCLickAmbit: ${u}`)
|
|
103
|
+
}) => {
|
|
104
|
+
const { t: u } = k(), [h, g] = B(i);
|
|
105
|
+
F(() => {
|
|
106
|
+
i && g(i);
|
|
107
|
+
}, [i]);
|
|
108
|
+
const C = (b) => {
|
|
109
|
+
if (h && h.length > 0) {
|
|
110
|
+
let f = [...h];
|
|
111
|
+
f.sort((v, y) => v[b].localeCompare(y[b])), g(f);
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
return /* @__PURE__ */ m("div", { className: q.ambitSelector, style: { color: s }, children: [
|
|
115
|
+
/* @__PURE__ */ m(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
className: q.header,
|
|
119
|
+
style: { borderBottom: `1px solid ${s}` },
|
|
120
|
+
children: [
|
|
121
|
+
/* @__PURE__ */ m("div", { className: q.nameDateContainer, children: [
|
|
122
|
+
/* @__PURE__ */ r("div", { className: q.ambitName, children: /* @__PURE__ */ m("button", { onClick: () => C("name"), children: [
|
|
123
|
+
/* @__PURE__ */ r("span", { children: u(t) }),
|
|
124
|
+
/* @__PURE__ */ r("img", { src: ve })
|
|
125
|
+
] }) }),
|
|
126
|
+
/* @__PURE__ */ r("div", { className: q.ambitDate, children: /* @__PURE__ */ m("button", { onClick: () => C("date"), children: [
|
|
127
|
+
/* @__PURE__ */ r("span", { children: u(o) }),
|
|
128
|
+
/* @__PURE__ */ r("img", { src: ve })
|
|
129
|
+
] }) })
|
|
130
|
+
] }),
|
|
131
|
+
/* @__PURE__ */ r("div", { className: q.buttonsContainer })
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
h && h.length > 0 && h.map((b) => /* @__PURE__ */ r(
|
|
136
|
+
Fe,
|
|
137
|
+
{
|
|
138
|
+
isActive: d == b.id,
|
|
139
|
+
ambit: b,
|
|
140
|
+
fontColor: s,
|
|
141
|
+
activeColor: n,
|
|
142
|
+
onClickCopy: l,
|
|
143
|
+
onClickDelete: a,
|
|
144
|
+
onClickFilters: c,
|
|
145
|
+
onClickAmbit: p
|
|
146
|
+
},
|
|
147
|
+
`ambitKey${b.id}`
|
|
148
|
+
))
|
|
149
|
+
] });
|
|
150
|
+
};
|
|
151
|
+
Nt.propTypes = {
|
|
152
|
+
ambitList: e.arrayOf(
|
|
153
|
+
e.shape({
|
|
154
|
+
name: e.string.isRequired,
|
|
155
|
+
date: e.string.isRequired,
|
|
156
|
+
id: e.string.isRequired
|
|
157
|
+
})
|
|
158
|
+
).isRequired,
|
|
159
|
+
activeAmbitId: e.string,
|
|
160
|
+
fontColor: e.string,
|
|
161
|
+
activeColor: e.string,
|
|
162
|
+
onClickCopy: e.func.isRequired,
|
|
163
|
+
onCLickDelete: e.func.isRequired,
|
|
164
|
+
onClickFilters: e.func.isRequired,
|
|
165
|
+
onClickAmbit: e.func.isRequired,
|
|
166
|
+
nameLabel: e.string,
|
|
167
|
+
dateLabel: e.string
|
|
168
|
+
};
|
|
169
|
+
const St = "_buttonsContainer_1audx_2", Tt = "_vertical_1audx_6", Mt = "_horizontal_1audx_9", Ft = "_button_1audx_2", Lt = "_active_1audx_25", Dt = "_buttonName_1audx_28", R = {
|
|
170
|
+
buttonsContainer: St,
|
|
171
|
+
vertical: Tt,
|
|
172
|
+
horizontal: Mt,
|
|
173
|
+
button: Ft,
|
|
174
|
+
active: Lt,
|
|
175
|
+
buttonName: Dt
|
|
176
|
+
}, Bt = "_left_19lnt_3", $t = "_top_19lnt_33", Ot = "_bottom_19lnt_66", At = "_right_19lnt_97", It = {
|
|
177
|
+
left: Bt,
|
|
178
|
+
top: $t,
|
|
179
|
+
bottom: Ot,
|
|
180
|
+
right: At
|
|
181
|
+
}, Le = ({ text: i, position: d, styleCustom: s = null }) => {
|
|
182
|
+
const { t: n } = k();
|
|
183
|
+
return /* @__PURE__ */ r("div", { className: `tooltip ${It[d]}`, style: s, children: n(i) });
|
|
184
|
+
};
|
|
185
|
+
Le.propTypes = {
|
|
186
|
+
text: e.string.isRequired,
|
|
187
|
+
position: e.oneOf(["top", "bottom", "left", "right"]).isRequired,
|
|
188
|
+
styleCustom: e.object
|
|
189
|
+
};
|
|
190
|
+
const Rt = ({
|
|
191
|
+
buttons: i = [],
|
|
192
|
+
orientation: d = "horizontal",
|
|
193
|
+
showName: s = !0,
|
|
194
|
+
namePosition: n = "right",
|
|
195
|
+
useTooltip: t = !1,
|
|
196
|
+
tooltipPosition: o = "top"
|
|
197
|
+
}) => {
|
|
198
|
+
const { t: l } = k();
|
|
199
|
+
return /* @__PURE__ */ r(
|
|
200
|
+
"div",
|
|
201
|
+
{
|
|
202
|
+
className: `${R.buttonsContainer} ${d === "vertical" && R.vertical}
|
|
203
|
+
${d === "horizontal" && R.horizontal}`,
|
|
204
|
+
children: i.map((a, c) => {
|
|
205
|
+
const {
|
|
206
|
+
icon: p,
|
|
207
|
+
activeIcon: u,
|
|
208
|
+
isActive: h,
|
|
209
|
+
name: g,
|
|
210
|
+
onClick: C
|
|
211
|
+
} = a, b = /* @__PURE__ */ m(qe, { children: [
|
|
212
|
+
s && n === "left" && /* @__PURE__ */ r("span", { className: R.buttonName, children: l(g) }),
|
|
213
|
+
/* @__PURE__ */ r("img", { src: h ? u : p, alt: l(g) }),
|
|
214
|
+
s && n === "right" && /* @__PURE__ */ r("span", { className: R.buttonName, children: l(g) })
|
|
215
|
+
] });
|
|
216
|
+
return /* @__PURE__ */ m("div", { className: "tooltip-parent", children: [
|
|
217
|
+
/* @__PURE__ */ r(
|
|
218
|
+
"button",
|
|
219
|
+
{
|
|
220
|
+
onClick: C,
|
|
221
|
+
className: `${R.button}
|
|
222
|
+
${h && R.active}`,
|
|
223
|
+
children: b
|
|
224
|
+
}
|
|
225
|
+
),
|
|
226
|
+
t && /* @__PURE__ */ r(Le, { text: g, position: o })
|
|
227
|
+
] }, c);
|
|
228
|
+
})
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
};
|
|
232
|
+
Rt.propTypes = {
|
|
233
|
+
buttons: e.arrayOf(
|
|
234
|
+
e.shape({
|
|
235
|
+
icon: e.node.isRequired,
|
|
236
|
+
activeIcon: e.node,
|
|
237
|
+
isActive: e.bool,
|
|
238
|
+
name: e.string,
|
|
239
|
+
// key de i18n
|
|
240
|
+
onClick: e.func
|
|
241
|
+
})
|
|
242
|
+
).isRequired,
|
|
243
|
+
orientation: e.oneOf(["horizontal", "vertical"]),
|
|
244
|
+
showName: e.bool,
|
|
245
|
+
namePosition: e.oneOf(["left", "right"]),
|
|
246
|
+
useTooltip: e.bool,
|
|
247
|
+
tooltipPosition: e.oneOf(["top", "bottom", "left", "right"])
|
|
248
|
+
};
|
|
249
|
+
const Vt = "_indicatorsCategory_1cu33_2", jt = "_title_1cu33_5", oe = {
|
|
250
|
+
indicatorsCategory: Vt,
|
|
251
|
+
title: jt
|
|
252
|
+
}, z = ({
|
|
253
|
+
isOpen: i,
|
|
254
|
+
onClick: d,
|
|
255
|
+
children: s,
|
|
256
|
+
color: n,
|
|
257
|
+
activeColor: t = "#F8A925",
|
|
258
|
+
title: o = "Title",
|
|
259
|
+
//Change the height only if the title is more than one line or you change title fontSize, otherwise should be 53px
|
|
260
|
+
height: l = 53,
|
|
261
|
+
//Adjust height if you change fontSize
|
|
262
|
+
titleFontStyles: a,
|
|
263
|
+
showBottomBar: c = !0,
|
|
264
|
+
titleMarginChildren: p = 25
|
|
265
|
+
}) => {
|
|
266
|
+
const { t: u } = k();
|
|
267
|
+
return /* @__PURE__ */ m(
|
|
268
|
+
Ce.div,
|
|
269
|
+
{
|
|
270
|
+
className: oe.indicatorsCategory,
|
|
271
|
+
initial: { height: `${l}px` },
|
|
272
|
+
animate: { height: i ? "auto" : `${l}px` },
|
|
273
|
+
transition: { duration: 0.4 },
|
|
274
|
+
style: {
|
|
275
|
+
backgroundColor: "white",
|
|
276
|
+
borderBottom: i && c ? `1px solid ${t}` : "0px",
|
|
277
|
+
marginBottom: i ? "20px" : "0px"
|
|
278
|
+
},
|
|
279
|
+
children: [
|
|
280
|
+
/* @__PURE__ */ m(
|
|
281
|
+
"h2",
|
|
282
|
+
{
|
|
283
|
+
style: {
|
|
284
|
+
...a,
|
|
285
|
+
marginBottom: p || "auto"
|
|
286
|
+
},
|
|
287
|
+
className: `${oe.title}`,
|
|
288
|
+
onClick: d,
|
|
289
|
+
children: [
|
|
290
|
+
/* @__PURE__ */ r("span", { style: { color: i ? t : n }, children: i ? "-" : "+" }),
|
|
291
|
+
/* @__PURE__ */ r("span", { style: { marginLeft: 12, color: i ? t : n }, children: u(o) })
|
|
292
|
+
]
|
|
293
|
+
}
|
|
294
|
+
),
|
|
295
|
+
/* @__PURE__ */ r("div", { className: oe.content, children: s })
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
);
|
|
299
|
+
};
|
|
300
|
+
z.propTypes = {
|
|
301
|
+
isOpen: e.bool,
|
|
302
|
+
onClick: e.func,
|
|
303
|
+
children: e.node,
|
|
304
|
+
color: e.string,
|
|
305
|
+
activeColor: e.string,
|
|
306
|
+
title: e.string,
|
|
307
|
+
height: e.number,
|
|
308
|
+
showBottomBar: e.bool,
|
|
309
|
+
titleFontStyles: e.object
|
|
310
|
+
};
|
|
311
|
+
const ao = () => /* @__PURE__ */ r("div", { children: "EditAmbit" }), zt = "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", Pt = "_AppliedFiltersContainer_s8ooe_2", qt = "_AppliedFilterContent_s8ooe_10", _e = {
|
|
312
|
+
AppliedFiltersContainer: Pt,
|
|
313
|
+
AppliedFilterContent: qt
|
|
314
|
+
}, T = Ke((i) => ({
|
|
315
|
+
activeCategory: "",
|
|
316
|
+
activeSubCategory: "",
|
|
317
|
+
selectedIndicator: "",
|
|
318
|
+
tematicalFiltersSelected: [],
|
|
319
|
+
fontColor: "#605B56",
|
|
320
|
+
inputsColor: "#605B56"
|
|
321
|
+
})), De = ({ title: i, onClick: d, isOpen: s = !0, textColor: n = "#ffffff", backgroundColor: t = "#605B5680", activeColor: o }) => {
|
|
322
|
+
const { t: l } = k(), { tematicalFiltersSelected: a } = T((p) => p), c = (p) => {
|
|
323
|
+
T.setState((u) => ({
|
|
324
|
+
tematicalFiltersSelected: u.tematicalFiltersSelected.filter(
|
|
325
|
+
(h) => h.code !== p
|
|
326
|
+
)
|
|
327
|
+
}));
|
|
328
|
+
};
|
|
329
|
+
return /* @__PURE__ */ r(
|
|
330
|
+
z,
|
|
331
|
+
{
|
|
332
|
+
isOpen: s,
|
|
333
|
+
onClick: d,
|
|
334
|
+
title: i ? l(i) : "Applied Filters",
|
|
335
|
+
activeColor: o,
|
|
336
|
+
children: /* @__PURE__ */ r("div", { className: _e.AppliedFiltersContainer, children: a == null ? void 0 : a.map((p, u) => /* @__PURE__ */ m("div", { className: _e.AppliedFilterContent, style: { color: n, background: t }, children: [
|
|
337
|
+
l(p.name),
|
|
338
|
+
/* @__PURE__ */ r("img", { src: zt, alt: "CloseIcon", onClick: () => c(p.code), style: { cursor: "pointer" } })
|
|
339
|
+
] }, u)) })
|
|
340
|
+
}
|
|
341
|
+
);
|
|
342
|
+
};
|
|
343
|
+
De.propTypes = {
|
|
344
|
+
isOpen: e.bool,
|
|
345
|
+
onClick: e.func,
|
|
346
|
+
title: e.string,
|
|
347
|
+
textColor: e.string,
|
|
348
|
+
backgroundColor: e.string,
|
|
349
|
+
indicators: e.arrayOf(
|
|
350
|
+
e.shape({
|
|
351
|
+
title: e.string.isRequired,
|
|
352
|
+
Codename: e.string.isRequired
|
|
353
|
+
})
|
|
354
|
+
),
|
|
355
|
+
activeColor: e.string
|
|
356
|
+
};
|
|
357
|
+
const Be = ({ title: i, onClick: d, isOpen: s = !0, textColor: n = "#ffffff", backgroundColor: t = "#605B5680", activeColor: o }) => {
|
|
358
|
+
const { t: l } = k(), { tematicalFiltersSelected: a } = T((c) => c);
|
|
359
|
+
return /* @__PURE__ */ r(
|
|
360
|
+
z,
|
|
361
|
+
{
|
|
362
|
+
isOpen: s,
|
|
363
|
+
onClick: d,
|
|
364
|
+
title: i ? l(i) : "Geographical Filters",
|
|
365
|
+
activeColor: o,
|
|
366
|
+
children: "A"
|
|
367
|
+
}
|
|
368
|
+
);
|
|
369
|
+
};
|
|
370
|
+
Be.propTypes = {
|
|
371
|
+
isOpen: e.bool,
|
|
372
|
+
onClick: e.func,
|
|
373
|
+
title: e.string,
|
|
374
|
+
textColor: e.string,
|
|
375
|
+
backgroundColor: e.string,
|
|
376
|
+
activeColor: e.string
|
|
377
|
+
};
|
|
378
|
+
const Et = "_checkboxContainer_zld97_2", Kt = {
|
|
379
|
+
checkboxContainer: Et
|
|
380
|
+
}, $e = ({
|
|
381
|
+
onClick: i,
|
|
382
|
+
containerStyles: d,
|
|
383
|
+
color: s = "#605B56",
|
|
384
|
+
indicator: n,
|
|
385
|
+
value: t
|
|
386
|
+
}) => {
|
|
387
|
+
const { t: o } = k(), { title: l } = n || {}, { fontColor: a, inputsColor: c } = T((p) => p);
|
|
388
|
+
return /* @__PURE__ */ m(
|
|
389
|
+
"div",
|
|
390
|
+
{
|
|
391
|
+
style: { ...d, color: s },
|
|
392
|
+
role: "checkbox",
|
|
393
|
+
className: Kt.checkboxContainer,
|
|
394
|
+
onClick: i,
|
|
395
|
+
children: [
|
|
396
|
+
/* @__PURE__ */ r(
|
|
397
|
+
"input",
|
|
398
|
+
{
|
|
399
|
+
type: "checkbox",
|
|
400
|
+
checked: typeof t == "boolean" ? t : !0,
|
|
401
|
+
value: t,
|
|
402
|
+
readOnly: !0,
|
|
403
|
+
style: {
|
|
404
|
+
border: `1.5px solid ${t ? c : a}`,
|
|
405
|
+
backgroundColor: t ? c : "white"
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
),
|
|
409
|
+
/* @__PURE__ */ r("span", { className: "checkmark", children: o(l) })
|
|
410
|
+
]
|
|
411
|
+
}
|
|
412
|
+
);
|
|
413
|
+
};
|
|
414
|
+
$e.propTypes = {
|
|
415
|
+
onClick: e.func,
|
|
416
|
+
value: e.bool,
|
|
417
|
+
containerStyles: e.object,
|
|
418
|
+
color: e.string,
|
|
419
|
+
indicator: e.shape({
|
|
420
|
+
title: e.string,
|
|
421
|
+
codename: e.array
|
|
422
|
+
}),
|
|
423
|
+
checkedColor: e.string
|
|
424
|
+
};
|
|
425
|
+
function pe(i, d) {
|
|
426
|
+
return pe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(s, n) {
|
|
427
|
+
return s.__proto__ = n, s;
|
|
428
|
+
}, pe(i, d);
|
|
429
|
+
}
|
|
430
|
+
function Zt(i, d) {
|
|
431
|
+
i.prototype = Object.create(d.prototype), i.prototype.constructor = i, pe(i, d);
|
|
432
|
+
}
|
|
433
|
+
function se(i) {
|
|
434
|
+
return i && i.stopPropagation && i.stopPropagation(), i && i.preventDefault && i.preventDefault(), !1;
|
|
435
|
+
}
|
|
436
|
+
function re(i) {
|
|
437
|
+
return i == null ? [] : Array.isArray(i) ? i.slice() : [i];
|
|
438
|
+
}
|
|
439
|
+
function W(i) {
|
|
440
|
+
return i !== null && i.length === 1 ? i[0] : i.slice();
|
|
441
|
+
}
|
|
442
|
+
function X(i) {
|
|
443
|
+
Object.keys(i).forEach((d) => {
|
|
444
|
+
typeof document < "u" && document.addEventListener(d, i[d], !1);
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
function V(i, d) {
|
|
448
|
+
return ue(function(s, n) {
|
|
449
|
+
let t = s;
|
|
450
|
+
return t <= n.min && (t = n.min), t >= n.max && (t = n.max), t;
|
|
451
|
+
}(i, d), d);
|
|
452
|
+
}
|
|
453
|
+
function ue(i, d) {
|
|
454
|
+
const s = (i - d.min) % d.step;
|
|
455
|
+
let n = i - s;
|
|
456
|
+
return 2 * Math.abs(s) >= d.step && (n += s > 0 ? d.step : -d.step), parseFloat(n.toFixed(5));
|
|
457
|
+
}
|
|
458
|
+
let he = function(i) {
|
|
459
|
+
function d(n) {
|
|
460
|
+
var t;
|
|
461
|
+
(t = i.call(this, n) || this).onKeyUp = () => {
|
|
462
|
+
t.onEnd();
|
|
463
|
+
}, t.onMouseUp = () => {
|
|
464
|
+
t.onEnd(t.getMouseEventMap());
|
|
465
|
+
}, t.onTouchEnd = (a) => {
|
|
466
|
+
a.preventDefault(), t.onEnd(t.getTouchEventMap());
|
|
467
|
+
}, t.onBlur = () => {
|
|
468
|
+
t.setState({ index: -1 }, t.onEnd(t.getKeyDownEventMap()));
|
|
469
|
+
}, t.onMouseMove = (a) => {
|
|
470
|
+
t.setState({ pending: !0 });
|
|
471
|
+
const c = t.getMousePosition(a), p = t.getDiffPosition(c[0]), u = t.getValueFromPosition(p);
|
|
472
|
+
t.move(u);
|
|
473
|
+
}, t.onTouchMove = (a) => {
|
|
474
|
+
if (a.touches.length > 1) return;
|
|
475
|
+
t.setState({ pending: !0 });
|
|
476
|
+
const c = t.getTouchPosition(a);
|
|
477
|
+
if (t.isScrolling === void 0) {
|
|
478
|
+
const h = c[0] - t.startPosition[0], g = c[1] - t.startPosition[1];
|
|
479
|
+
t.isScrolling = Math.abs(g) > Math.abs(h);
|
|
480
|
+
}
|
|
481
|
+
if (t.isScrolling) return void t.setState({ index: -1 });
|
|
482
|
+
const p = t.getDiffPosition(c[0]), u = t.getValueFromPosition(p);
|
|
483
|
+
t.move(u);
|
|
484
|
+
}, t.onKeyDown = (a) => {
|
|
485
|
+
if (!(a.ctrlKey || a.shiftKey || a.altKey || a.metaKey)) switch (t.setState({ pending: !0 }), a.key) {
|
|
486
|
+
case "ArrowLeft":
|
|
487
|
+
case "ArrowDown":
|
|
488
|
+
case "Left":
|
|
489
|
+
case "Down":
|
|
490
|
+
a.preventDefault(), t.moveDownByStep();
|
|
491
|
+
break;
|
|
492
|
+
case "ArrowRight":
|
|
493
|
+
case "ArrowUp":
|
|
494
|
+
case "Right":
|
|
495
|
+
case "Up":
|
|
496
|
+
a.preventDefault(), t.moveUpByStep();
|
|
497
|
+
break;
|
|
498
|
+
case "Home":
|
|
499
|
+
a.preventDefault(), t.move(t.props.min);
|
|
500
|
+
break;
|
|
501
|
+
case "End":
|
|
502
|
+
a.preventDefault(), t.move(t.props.max);
|
|
503
|
+
break;
|
|
504
|
+
case "PageDown":
|
|
505
|
+
a.preventDefault(), t.moveDownByStep(t.props.pageFn(t.props.step));
|
|
506
|
+
break;
|
|
507
|
+
case "PageUp":
|
|
508
|
+
a.preventDefault(), t.moveUpByStep(t.props.pageFn(t.props.step));
|
|
509
|
+
}
|
|
510
|
+
}, t.onSliderMouseDown = (a) => {
|
|
511
|
+
if (!t.props.disabled && a.button !== 2) {
|
|
512
|
+
if (t.setState({ pending: !0 }), !t.props.snapDragDisabled) {
|
|
513
|
+
const c = t.getMousePosition(a);
|
|
514
|
+
t.forceValueFromPosition(c[0], (p) => {
|
|
515
|
+
t.start(p, c[0]), X(t.getMouseEventMap());
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
se(a);
|
|
519
|
+
}
|
|
520
|
+
}, t.onSliderClick = (a) => {
|
|
521
|
+
if (!t.props.disabled && t.props.onSliderClick && !t.hasMoved) {
|
|
522
|
+
const c = t.getMousePosition(a), p = V(t.calcValue(t.calcOffsetFromPosition(c[0])), t.props);
|
|
523
|
+
t.props.onSliderClick(p);
|
|
524
|
+
}
|
|
525
|
+
}, t.createOnKeyDown = (a) => (c) => {
|
|
526
|
+
t.props.disabled || (t.start(a), X(t.getKeyDownEventMap()), se(c));
|
|
527
|
+
}, t.createOnMouseDown = (a) => (c) => {
|
|
528
|
+
if (t.props.disabled || c.button === 2) return;
|
|
529
|
+
t.setState({ pending: !0 });
|
|
530
|
+
const p = t.getMousePosition(c);
|
|
531
|
+
t.start(a, p[0]), X(t.getMouseEventMap()), se(c);
|
|
532
|
+
}, t.createOnTouchStart = (a) => (c) => {
|
|
533
|
+
if (t.props.disabled || c.touches.length > 1) return;
|
|
534
|
+
t.setState({ pending: !0 });
|
|
535
|
+
const p = t.getTouchPosition(c);
|
|
536
|
+
t.startPosition = p, t.isScrolling = void 0, t.start(a, p[0]), X(t.getTouchEventMap()), function(u) {
|
|
537
|
+
u.stopPropagation && u.stopPropagation();
|
|
538
|
+
}(c);
|
|
539
|
+
}, t.handleResize = () => {
|
|
540
|
+
const a = window.setTimeout(() => {
|
|
541
|
+
t.pendingResizeTimeouts.shift(), t.resize();
|
|
542
|
+
}, 0);
|
|
543
|
+
t.pendingResizeTimeouts.push(a);
|
|
544
|
+
}, t.renderThumb = (a, c) => {
|
|
545
|
+
const p = t.props.thumbClassName + " " + t.props.thumbClassName + "-" + c + " " + (t.state.index === c ? t.props.thumbActiveClassName : ""), u = { ref: (g) => {
|
|
546
|
+
t["thumb" + c] = g;
|
|
547
|
+
}, key: t.props.thumbClassName + "-" + c, className: p, 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] };
|
|
548
|
+
return t.props.ariaValuetext && (u["aria-valuetext"] = typeof t.props.ariaValuetext == "string" ? t.props.ariaValuetext : t.props.ariaValuetext(h)), t.props.renderThumb(u, h);
|
|
549
|
+
}, t.renderTrack = (a, c, p) => {
|
|
550
|
+
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) };
|
|
551
|
+
return t.props.renderTrack(u, h);
|
|
552
|
+
};
|
|
553
|
+
let o = re(n.value);
|
|
554
|
+
o.length || (o = re(n.defaultValue)), t.pendingResizeTimeouts = [];
|
|
555
|
+
const l = [];
|
|
556
|
+
for (let a = 0; a < o.length; a += 1) o[a] = V(o[a], n), l.push(a);
|
|
557
|
+
return t.resizeObserver = null, t.resizeElementRef = Z.createRef(), t.state = { index: -1, upperBound: 0, sliderLength: 0, value: o, zIndices: l }, t;
|
|
558
|
+
}
|
|
559
|
+
Zt(d, i);
|
|
560
|
+
var s = d.prototype;
|
|
561
|
+
return s.componentDidMount = function() {
|
|
562
|
+
typeof window < "u" && (this.resizeObserver = new ResizeObserver(this.handleResize), this.resizeObserver.observe(this.resizeElementRef.current), this.resize());
|
|
563
|
+
}, d.getDerivedStateFromProps = function(n, t) {
|
|
564
|
+
const o = re(n.value);
|
|
565
|
+
return o.length ? t.pending ? null : { value: o.map((l) => V(l, n)) } : null;
|
|
566
|
+
}, s.componentDidUpdate = function() {
|
|
567
|
+
this.state.upperBound === 0 && this.resize();
|
|
568
|
+
}, s.componentWillUnmount = function() {
|
|
569
|
+
this.clearPendingResizeTimeouts(), this.resizeObserver && this.resizeObserver.disconnect();
|
|
570
|
+
}, s.onEnd = function(n) {
|
|
571
|
+
n && function(t) {
|
|
572
|
+
Object.keys(t).forEach((o) => {
|
|
573
|
+
typeof document < "u" && document.removeEventListener(o, t[o], !1);
|
|
574
|
+
});
|
|
575
|
+
}(n), this.hasMoved && this.fireChangeEvent("onAfterChange"), this.setState({ pending: !1 }), this.hasMoved = !1;
|
|
576
|
+
}, s.getValue = function() {
|
|
577
|
+
return W(this.state.value);
|
|
578
|
+
}, s.getClosestIndex = function(n) {
|
|
579
|
+
let t = Number.MAX_VALUE, o = -1;
|
|
580
|
+
const { value: l } = this.state, a = l.length;
|
|
581
|
+
for (let c = 0; c < a; c += 1) {
|
|
582
|
+
const p = this.calcOffset(l[c]), u = Math.abs(n - p);
|
|
583
|
+
u < t && (t = u, o = c);
|
|
584
|
+
}
|
|
585
|
+
return o;
|
|
586
|
+
}, s.getMousePosition = function(n) {
|
|
587
|
+
return [n["page" + this.axisKey()], n["page" + this.orthogonalAxisKey()]];
|
|
588
|
+
}, s.getTouchPosition = function(n) {
|
|
589
|
+
const t = n.touches[0];
|
|
590
|
+
return [t["page" + this.axisKey()], t["page" + this.orthogonalAxisKey()]];
|
|
591
|
+
}, s.getKeyDownEventMap = function() {
|
|
592
|
+
return { keydown: this.onKeyDown, keyup: this.onKeyUp, focusout: this.onBlur };
|
|
593
|
+
}, s.getMouseEventMap = function() {
|
|
594
|
+
return { mousemove: this.onMouseMove, mouseup: this.onMouseUp };
|
|
595
|
+
}, s.getTouchEventMap = function() {
|
|
596
|
+
return { touchmove: this.onTouchMove, touchend: this.onTouchEnd };
|
|
597
|
+
}, s.getValueFromPosition = function(n) {
|
|
598
|
+
const t = n / (this.state.sliderLength - this.state.thumbSize) * (this.props.max - this.props.min);
|
|
599
|
+
return V(this.state.startValue + t, this.props);
|
|
600
|
+
}, s.getDiffPosition = function(n) {
|
|
601
|
+
let t = n - this.state.startPosition;
|
|
602
|
+
return this.props.invert && (t *= -1), t;
|
|
603
|
+
}, s.resize = function() {
|
|
604
|
+
const { slider: n, thumb0: t } = this;
|
|
605
|
+
if (!n || !t) return;
|
|
606
|
+
const o = this.sizeKey(), l = n.getBoundingClientRect(), a = n[o], c = l[this.posMaxKey()], p = l[this.posMinKey()], u = t.getBoundingClientRect()[o.replace("client", "").toLowerCase()], h = a - u, g = Math.abs(c - p);
|
|
607
|
+
this.state.upperBound === h && this.state.sliderLength === g && this.state.thumbSize === u || this.setState({ upperBound: h, sliderLength: g, thumbSize: u });
|
|
608
|
+
}, s.calcOffset = function(n) {
|
|
609
|
+
const t = this.props.max - this.props.min;
|
|
610
|
+
return t === 0 ? 0 : (n - this.props.min) / t * this.state.upperBound;
|
|
611
|
+
}, s.calcValue = function(n) {
|
|
612
|
+
return n / this.state.upperBound * (this.props.max - this.props.min) + this.props.min;
|
|
613
|
+
}, s.calcOffsetFromPosition = function(n) {
|
|
614
|
+
const { slider: t } = this, o = t.getBoundingClientRect(), l = o[this.posMaxKey()], a = o[this.posMinKey()];
|
|
615
|
+
let c = n - (window["page" + this.axisKey() + "Offset"] + (this.props.invert ? l : a));
|
|
616
|
+
return this.props.invert && (c = this.state.sliderLength - c), c -= this.state.thumbSize / 2, c;
|
|
617
|
+
}, s.forceValueFromPosition = function(n, t) {
|
|
618
|
+
const o = this.calcOffsetFromPosition(n), l = this.getClosestIndex(o), a = V(this.calcValue(o), this.props), c = this.state.value.slice();
|
|
619
|
+
c[l] = a;
|
|
620
|
+
for (let p = 0; p < c.length - 1; p += 1) if (c[p + 1] - c[p] < this.props.minDistance) return;
|
|
621
|
+
this.fireChangeEvent("onBeforeChange"), this.hasMoved = !0, this.setState({ value: c }, () => {
|
|
622
|
+
t(l), this.fireChangeEvent("onChange");
|
|
623
|
+
});
|
|
624
|
+
}, s.clearPendingResizeTimeouts = function() {
|
|
625
|
+
do {
|
|
626
|
+
const n = this.pendingResizeTimeouts.shift();
|
|
627
|
+
clearTimeout(n);
|
|
628
|
+
} while (this.pendingResizeTimeouts.length);
|
|
629
|
+
}, s.start = function(n, t) {
|
|
630
|
+
const o = this["thumb" + n];
|
|
631
|
+
o && o.focus();
|
|
632
|
+
const { zIndices: l } = this.state;
|
|
633
|
+
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 }));
|
|
634
|
+
}, s.moveUpByStep = function(n) {
|
|
635
|
+
n === void 0 && (n = this.props.step);
|
|
636
|
+
const t = this.state.value[this.state.index], o = V(this.props.invert && this.props.orientation === "horizontal" ? t - n : t + n, this.props);
|
|
637
|
+
this.move(Math.min(o, this.props.max));
|
|
638
|
+
}, s.moveDownByStep = function(n) {
|
|
639
|
+
n === void 0 && (n = this.props.step);
|
|
640
|
+
const t = this.state.value[this.state.index], o = V(this.props.invert && this.props.orientation === "horizontal" ? t + n : t - n, this.props);
|
|
641
|
+
this.move(Math.max(o, this.props.min));
|
|
642
|
+
}, s.move = function(n) {
|
|
643
|
+
const t = this.state.value.slice(), { index: o } = this.state, { length: l } = t, a = t[o];
|
|
644
|
+
if (n === a) return;
|
|
645
|
+
this.hasMoved || this.fireChangeEvent("onBeforeChange"), this.hasMoved = !0;
|
|
646
|
+
const { pearling: c, max: p, min: u, minDistance: h } = this.props;
|
|
647
|
+
if (!c) {
|
|
648
|
+
if (o > 0) {
|
|
649
|
+
const g = t[o - 1];
|
|
650
|
+
n < g + h && (n = g + h);
|
|
651
|
+
}
|
|
652
|
+
if (o < l - 1) {
|
|
653
|
+
const g = t[o + 1];
|
|
654
|
+
n > g - h && (n = g - h);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
t[o] = n, c && l > 1 && (n > a ? (this.pushSucceeding(t, h, o), function(g, C, b, f) {
|
|
658
|
+
for (let v = 0; v < g; v += 1) {
|
|
659
|
+
const y = f - v * b;
|
|
660
|
+
C[g - 1 - v] > y && (C[g - 1 - v] = y);
|
|
661
|
+
}
|
|
662
|
+
}(l, t, h, p)) : n < a && (this.pushPreceding(t, h, o), function(g, C, b, f) {
|
|
663
|
+
for (let v = 0; v < g; v += 1) {
|
|
664
|
+
const y = f + v * b;
|
|
665
|
+
C[v] < y && (C[v] = y);
|
|
666
|
+
}
|
|
667
|
+
}(l, t, h, u))), this.setState({ value: t }, this.fireChangeEvent.bind(this, "onChange"));
|
|
668
|
+
}, s.pushSucceeding = function(n, t, o) {
|
|
669
|
+
let l, a;
|
|
670
|
+
for (l = o, a = n[l] + t; n[l + 1] !== null && a > n[l + 1]; l += 1, a = n[l] + t) n[l + 1] = ue(a, this.props);
|
|
671
|
+
}, s.pushPreceding = function(n, t, o) {
|
|
672
|
+
for (let l = o, a = n[l] - t; n[l - 1] !== null && a < n[l - 1]; l -= 1, a = n[l] - t) n[l - 1] = ue(a, this.props);
|
|
673
|
+
}, s.axisKey = function() {
|
|
674
|
+
return this.props.orientation === "vertical" ? "Y" : "X";
|
|
675
|
+
}, s.orthogonalAxisKey = function() {
|
|
676
|
+
return this.props.orientation === "vertical" ? "X" : "Y";
|
|
677
|
+
}, s.posMinKey = function() {
|
|
678
|
+
return this.props.orientation === "vertical" ? this.props.invert ? "bottom" : "top" : this.props.invert ? "right" : "left";
|
|
679
|
+
}, s.posMaxKey = function() {
|
|
680
|
+
return this.props.orientation === "vertical" ? this.props.invert ? "top" : "bottom" : this.props.invert ? "left" : "right";
|
|
681
|
+
}, s.sizeKey = function() {
|
|
682
|
+
return this.props.orientation === "vertical" ? "clientHeight" : "clientWidth";
|
|
683
|
+
}, s.fireChangeEvent = function(n) {
|
|
684
|
+
this.props[n] && this.props[n](W(this.state.value), this.state.index);
|
|
685
|
+
}, s.buildThumbStyle = function(n, t) {
|
|
686
|
+
const o = { position: "absolute", touchAction: "none", willChange: this.state.index >= 0 ? this.posMinKey() : void 0, zIndex: this.state.zIndices.indexOf(t) + 1 };
|
|
687
|
+
return o[this.posMinKey()] = n + "px", o;
|
|
688
|
+
}, s.buildTrackStyle = function(n, t) {
|
|
689
|
+
const o = { position: "absolute", willChange: this.state.index >= 0 ? this.posMinKey() + "," + this.posMaxKey() : void 0 };
|
|
690
|
+
return o[this.posMinKey()] = n, o[this.posMaxKey()] = t, o;
|
|
691
|
+
}, s.buildMarkStyle = function(n) {
|
|
692
|
+
var t;
|
|
693
|
+
return (t = { position: "absolute" })[this.posMinKey()] = n, t;
|
|
694
|
+
}, s.renderThumbs = function(n) {
|
|
695
|
+
const { length: t } = n, o = [];
|
|
696
|
+
for (let a = 0; a < t; a += 1) o[a] = this.buildThumbStyle(n[a], a);
|
|
697
|
+
const l = [];
|
|
698
|
+
for (let a = 0; a < t; a += 1) l[a] = this.renderThumb(o[a], a);
|
|
699
|
+
return l;
|
|
700
|
+
}, s.renderTracks = function(n) {
|
|
701
|
+
const t = [], o = n.length - 1;
|
|
702
|
+
t.push(this.renderTrack(0, 0, n[0]));
|
|
703
|
+
for (let l = 0; l < o; l += 1) t.push(this.renderTrack(l + 1, n[l], n[l + 1]));
|
|
704
|
+
return t.push(this.renderTrack(o + 1, n[o], this.state.upperBound)), t;
|
|
705
|
+
}, s.renderMarks = function() {
|
|
706
|
+
let { marks: n } = this.props;
|
|
707
|
+
const t = this.props.max - this.props.min + 1;
|
|
708
|
+
return typeof n == "boolean" ? n = Array.from({ length: t }).map((o, l) => l) : typeof n == "number" && (n = Array.from({ length: t }).map((o, l) => l).filter((o) => o % n == 0)), n.map(parseFloat).sort((o, l) => o - l).map((o) => {
|
|
709
|
+
const l = this.calcOffset(o), a = { key: o, className: this.props.markClassName, style: this.buildMarkStyle(l) };
|
|
710
|
+
return this.props.renderMark(a);
|
|
711
|
+
});
|
|
712
|
+
}, s.render = function() {
|
|
713
|
+
const n = [], { value: t } = this.state, o = t.length;
|
|
714
|
+
for (let p = 0; p < o; p += 1) n[p] = this.calcOffset(t[p], p);
|
|
715
|
+
const l = this.props.withTracks ? this.renderTracks(n) : null, a = this.renderThumbs(n), c = this.props.marks ? this.renderMarks() : null;
|
|
716
|
+
return Z.createElement("div", { ref: (p) => {
|
|
717
|
+
this.slider = p, this.resizeElementRef.current = p;
|
|
718
|
+
}, style: { position: "relative" }, className: this.props.className + (this.props.disabled ? " disabled" : ""), onMouseDown: this.onSliderMouseDown, onClick: this.onSliderClick }, l, a, c);
|
|
719
|
+
}, d;
|
|
720
|
+
}(Z.Component);
|
|
721
|
+
he.displayName = "ReactSlider", he.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) => Z.createElement("div", i), renderTrack: (i) => Z.createElement("div", i), renderMark: (i) => Z.createElement("span", i) };
|
|
722
|
+
var Ut = he;
|
|
723
|
+
const Ht = "_container_15vgv_2", Gt = "_unitLabel_15vgv_9", Yt = "_slider_15vgv_12", Wt = "_thumb_15vgv_18", Xt = "_track_15vgv_27", Jt = "_labels_15vgv_33", E = {
|
|
724
|
+
container: Ht,
|
|
725
|
+
unitLabel: Gt,
|
|
726
|
+
slider: Yt,
|
|
727
|
+
thumb: Wt,
|
|
728
|
+
track: Xt,
|
|
729
|
+
labels: Jt
|
|
730
|
+
}, Oe = ({
|
|
731
|
+
min: i = 0,
|
|
732
|
+
max: d = 100,
|
|
733
|
+
step: s = 1,
|
|
734
|
+
onChange: n,
|
|
735
|
+
width: t = 300,
|
|
736
|
+
unit: o,
|
|
737
|
+
fontColor: l = "#605B56",
|
|
738
|
+
value: a = [i, d]
|
|
739
|
+
}) => {
|
|
740
|
+
const { t: c } = k(), p = (u) => {
|
|
741
|
+
n == null || n({ min: u[0], max: u[1] });
|
|
742
|
+
};
|
|
743
|
+
return /* @__PURE__ */ m(
|
|
744
|
+
"div",
|
|
745
|
+
{
|
|
746
|
+
className: E.container,
|
|
747
|
+
style: { width: `${t}px`, color: `${l}` },
|
|
748
|
+
children: [
|
|
749
|
+
/* @__PURE__ */ r("div", { className: E.unitLabel, children: /* @__PURE__ */ r("span", { children: c(o) }) }),
|
|
750
|
+
/* @__PURE__ */ r(
|
|
751
|
+
Ut,
|
|
752
|
+
{
|
|
753
|
+
className: E.slider,
|
|
754
|
+
thumbClassName: E.thumb,
|
|
755
|
+
trackClassName: E.track,
|
|
756
|
+
min: i,
|
|
757
|
+
max: d,
|
|
758
|
+
step: s,
|
|
759
|
+
value: a,
|
|
760
|
+
onChange: p,
|
|
761
|
+
withTracks: !0,
|
|
762
|
+
pearling: !0,
|
|
763
|
+
minDistance: 1
|
|
764
|
+
}
|
|
765
|
+
),
|
|
766
|
+
/* @__PURE__ */ m("div", { className: E.labels, children: [
|
|
767
|
+
/* @__PURE__ */ r("span", { children: a[0] }),
|
|
768
|
+
/* @__PURE__ */ r("span", { children: a[1] })
|
|
769
|
+
] })
|
|
770
|
+
]
|
|
771
|
+
}
|
|
772
|
+
);
|
|
773
|
+
};
|
|
774
|
+
Oe.propTypes = {
|
|
775
|
+
min: e.number,
|
|
776
|
+
max: e.number,
|
|
777
|
+
step: e.number,
|
|
778
|
+
initialMin: e.number,
|
|
779
|
+
initialMax: e.number,
|
|
780
|
+
onChange: e.func,
|
|
781
|
+
width: e.number,
|
|
782
|
+
unit: e.string,
|
|
783
|
+
fontColor: e.string,
|
|
784
|
+
value: e.arrayOf(e.number)
|
|
785
|
+
};
|
|
786
|
+
const Qt = "_tematicalFiltersInputContainer_1vm1r_2", en = "_inputTypeContainer_1vm1r_2", tn = "_checkboxContainer_1vm1r_28", nn = "_absoluteSliderContainer_1vm1r_37", J = {
|
|
787
|
+
tematicalFiltersInputContainer: Qt,
|
|
788
|
+
inputTypeContainer: en,
|
|
789
|
+
checkboxContainer: tn,
|
|
790
|
+
absoluteSliderContainer: nn
|
|
791
|
+
}, be = ({
|
|
792
|
+
indicator: i,
|
|
793
|
+
//onChangeBothType
|
|
794
|
+
activeColor: d
|
|
795
|
+
}) => {
|
|
796
|
+
const [s, n] = B(), {
|
|
797
|
+
type: t,
|
|
798
|
+
name: o,
|
|
799
|
+
values: l,
|
|
800
|
+
minValue: a,
|
|
801
|
+
maxValue: c,
|
|
802
|
+
unit: p
|
|
803
|
+
} = i || {}, u = te(
|
|
804
|
+
() => t == "cat" || s == "cat",
|
|
805
|
+
[s, t]
|
|
806
|
+
), h = te(
|
|
807
|
+
() => t == "abs" || s == "abs",
|
|
808
|
+
[s, t]
|
|
809
|
+
), {
|
|
810
|
+
tematicalFiltersSelected: g,
|
|
811
|
+
selectedIndicator: C,
|
|
812
|
+
fontColor: b,
|
|
813
|
+
inputsColor: f
|
|
814
|
+
} = T((x) => x), v = (x) => {
|
|
815
|
+
if (x) {
|
|
816
|
+
const { min: w, max: _, valueClicked: N, allValues: $ } = x || {}, { code: O, type: ne } = i || {}, U = h ? "abs" : u ? "cat" : "both";
|
|
817
|
+
let A = O[0];
|
|
818
|
+
ne == "both" && (A = U == "cat" ? O[1] : O[0]), U == "cat" ? T.setState((P) => {
|
|
819
|
+
let I = P.tematicalFiltersSelected.find(
|
|
820
|
+
(L) => L.code === A
|
|
821
|
+
);
|
|
822
|
+
if (I) {
|
|
823
|
+
let L = [I.values];
|
|
824
|
+
if (I.values.includes(N)) {
|
|
825
|
+
if (L = I.values.filter(
|
|
826
|
+
(D) => D !== N
|
|
827
|
+
), L.length < 1)
|
|
828
|
+
return {
|
|
829
|
+
tematicalFiltersSelected: P.tematicalFiltersSelected.filter(
|
|
830
|
+
(D) => D.code !== A
|
|
831
|
+
)
|
|
832
|
+
};
|
|
833
|
+
} else
|
|
834
|
+
L = [...I.values, N];
|
|
835
|
+
return {
|
|
836
|
+
tematicalFiltersSelected: P.tematicalFiltersSelected.map(
|
|
837
|
+
(D) => D.code === A ? { ...D, values: L } : D
|
|
838
|
+
)
|
|
839
|
+
};
|
|
840
|
+
} else {
|
|
841
|
+
console.log("entra aqui: ", $, " ", N);
|
|
842
|
+
let L = $.map((D, Pe) => Pe);
|
|
843
|
+
return {
|
|
844
|
+
tematicalFiltersSelected: [
|
|
845
|
+
...g,
|
|
846
|
+
{
|
|
847
|
+
type: "cat",
|
|
848
|
+
code: A,
|
|
849
|
+
values: L.filter((D) => D !== N),
|
|
850
|
+
name: i.name
|
|
851
|
+
}
|
|
852
|
+
]
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
}) : U == "abs" && T.setState((P) => {
|
|
856
|
+
let I = P.tematicalFiltersSelected.find(
|
|
857
|
+
(L) => L.code === A
|
|
858
|
+
);
|
|
859
|
+
if (I) {
|
|
860
|
+
let L = { ...I };
|
|
861
|
+
return L.min = w, L.max = _, {
|
|
862
|
+
tematicalFiltersSelected: P.tematicalFiltersSelected.map(
|
|
863
|
+
(D) => D.code === A ? L : D
|
|
864
|
+
)
|
|
865
|
+
};
|
|
866
|
+
} else
|
|
867
|
+
return {
|
|
868
|
+
tematicalFiltersSelected: [
|
|
869
|
+
...g,
|
|
870
|
+
{ type: "abs", code: A, min: w, max: _ }
|
|
871
|
+
]
|
|
872
|
+
};
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
}, y = te(() => {
|
|
876
|
+
const x = {};
|
|
877
|
+
if ((g == null ? void 0 : g.length) > 0)
|
|
878
|
+
for (const w of g)
|
|
879
|
+
w.type === "cat" ? x[w.code] = new Set(w.values) : x[w.code] = [w.min, w.max];
|
|
880
|
+
return x;
|
|
881
|
+
}, [g]);
|
|
882
|
+
return /* @__PURE__ */ r("div", { className: J.tematicalFiltersInputContainer, children: /* @__PURE__ */ m(
|
|
883
|
+
z,
|
|
884
|
+
{
|
|
885
|
+
titleFontStyles: { fontSize: 16, fontWeight: 400 },
|
|
886
|
+
title: o,
|
|
887
|
+
isOpen: C == `id${o}`,
|
|
888
|
+
onClick: () => T.setState(() => ({
|
|
889
|
+
selectedIndicator: C == `id${o}` ? "" : `id${o}`
|
|
890
|
+
})),
|
|
891
|
+
showBottomBar: !1,
|
|
892
|
+
height: 38,
|
|
893
|
+
titleMarginChildren: 14,
|
|
894
|
+
className: "tematicalFiltersInputContainer",
|
|
895
|
+
color: b,
|
|
896
|
+
activeColor: d,
|
|
897
|
+
children: [
|
|
898
|
+
t == "both" && /* @__PURE__ */ m(
|
|
899
|
+
"div",
|
|
900
|
+
{
|
|
901
|
+
className: J.inputTypeContainer,
|
|
902
|
+
style: { color: b },
|
|
903
|
+
children: [
|
|
904
|
+
/* @__PURE__ */ m("label", { children: [
|
|
905
|
+
/* @__PURE__ */ r(
|
|
906
|
+
"input",
|
|
907
|
+
{
|
|
908
|
+
type: "radio",
|
|
909
|
+
name: "tipo",
|
|
910
|
+
value: "abs",
|
|
911
|
+
onChange: () => {
|
|
912
|
+
n("abs");
|
|
913
|
+
},
|
|
914
|
+
style: {
|
|
915
|
+
marginRight: 4,
|
|
916
|
+
backgroundColor: s == "abs" ? f : "white",
|
|
917
|
+
border: `1.5px solid ${s == "abs" ? f : b}`
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
),
|
|
921
|
+
"Absoluto"
|
|
922
|
+
] }),
|
|
923
|
+
/* @__PURE__ */ m("label", { children: [
|
|
924
|
+
/* @__PURE__ */ r(
|
|
925
|
+
"input",
|
|
926
|
+
{
|
|
927
|
+
type: "radio",
|
|
928
|
+
name: "tipo",
|
|
929
|
+
value: "cat",
|
|
930
|
+
onChange: () => {
|
|
931
|
+
n("cat");
|
|
932
|
+
},
|
|
933
|
+
style: {
|
|
934
|
+
marginRight: 4,
|
|
935
|
+
backgroundColor: s == "cat" ? f : "white",
|
|
936
|
+
border: `1.5px solid ${s == "cat" ? f : b}`
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
),
|
|
940
|
+
"Categórico"
|
|
941
|
+
] })
|
|
942
|
+
]
|
|
943
|
+
}
|
|
944
|
+
),
|
|
945
|
+
u && /* @__PURE__ */ r("div", { className: J.checkboxContainer, children: l.map((x, w) => {
|
|
946
|
+
var _;
|
|
947
|
+
return /* @__PURE__ */ r(
|
|
948
|
+
$e,
|
|
949
|
+
{
|
|
950
|
+
onClick: () => v({ valueClicked: w, allValues: l }),
|
|
951
|
+
indicator: x,
|
|
952
|
+
value: ((_ = y[i.code[t == "both" ? 1 : 0]]) == null ? void 0 : _.has(w)) || !y[i.code[t == "both" ? 1 : 0]]
|
|
953
|
+
},
|
|
954
|
+
`checkbox-${w}`
|
|
955
|
+
);
|
|
956
|
+
}) }),
|
|
957
|
+
h && /* @__PURE__ */ r("div", { className: J.absoluteSliderContainer, children: /* @__PURE__ */ r(
|
|
958
|
+
Oe,
|
|
959
|
+
{
|
|
960
|
+
onChange: v,
|
|
961
|
+
min: a,
|
|
962
|
+
max: c,
|
|
963
|
+
unit: p,
|
|
964
|
+
value: y[i.code[0]]
|
|
965
|
+
}
|
|
966
|
+
) })
|
|
967
|
+
]
|
|
968
|
+
}
|
|
969
|
+
) });
|
|
970
|
+
};
|
|
971
|
+
be.propTypes = {
|
|
972
|
+
indicator: e.shape({
|
|
973
|
+
name: e.string,
|
|
974
|
+
type: e.string,
|
|
975
|
+
code: e.arrayOf(e.string),
|
|
976
|
+
values: e.arrayOf(
|
|
977
|
+
e.shape({
|
|
978
|
+
codename: e.oneOfType(e.array, e.string),
|
|
979
|
+
title: e.string
|
|
980
|
+
})
|
|
981
|
+
)
|
|
982
|
+
}),
|
|
983
|
+
activeColor: e.string
|
|
984
|
+
//onChangeBothType: PropTypes.func,
|
|
985
|
+
};
|
|
986
|
+
const Ae = ({
|
|
987
|
+
subcategory: i,
|
|
988
|
+
fontColor: d,
|
|
989
|
+
activeColor: s
|
|
990
|
+
//onChangeBothType,
|
|
991
|
+
}) => {
|
|
992
|
+
const { activeSubcategory: n } = T((l) => l), { name: t, indicators: o } = i || {};
|
|
993
|
+
return /* @__PURE__ */ r(
|
|
994
|
+
z,
|
|
995
|
+
{
|
|
996
|
+
title: t,
|
|
997
|
+
isOpen: n == `id${t}`,
|
|
998
|
+
onClick: () => {
|
|
999
|
+
T.setState((l) => ({
|
|
1000
|
+
activeSubcategory: l.activeSubcategory === `id${t}` ? "" : `id${t}`
|
|
1001
|
+
}));
|
|
1002
|
+
},
|
|
1003
|
+
titleFontStyles: { fontSize: 16, fontWeight: 400 },
|
|
1004
|
+
showBottomBar: !1,
|
|
1005
|
+
titleMarginChildren: 20,
|
|
1006
|
+
height: 49,
|
|
1007
|
+
color: d,
|
|
1008
|
+
activeColor: s,
|
|
1009
|
+
children: o == null ? void 0 : o.map((l, a) => /* @__PURE__ */ r(
|
|
1010
|
+
be,
|
|
1011
|
+
{
|
|
1012
|
+
indicator: l,
|
|
1013
|
+
fontColor: d
|
|
1014
|
+
},
|
|
1015
|
+
`indicatorSub-${a}`
|
|
1016
|
+
))
|
|
1017
|
+
}
|
|
1018
|
+
);
|
|
1019
|
+
};
|
|
1020
|
+
Ae.propTypes = {
|
|
1021
|
+
subcategory: e.shape({
|
|
1022
|
+
name: e.string,
|
|
1023
|
+
indicators: e.arrayOf(
|
|
1024
|
+
e.shape({
|
|
1025
|
+
name: e.string,
|
|
1026
|
+
value: e.string
|
|
1027
|
+
})
|
|
1028
|
+
)
|
|
1029
|
+
}),
|
|
1030
|
+
activeColor: e.string
|
|
1031
|
+
//onChangeBothType: PropTypes.func,
|
|
1032
|
+
};
|
|
1033
|
+
const Ie = ({
|
|
1034
|
+
category: i,
|
|
1035
|
+
// onChangeBothType,
|
|
1036
|
+
activeColor: d
|
|
1037
|
+
}) => {
|
|
1038
|
+
const { name: s, subcategories: n, indicators: t } = i || {}, { activeCategory: o, fontColor: l } = T((a) => a);
|
|
1039
|
+
return i && /* @__PURE__ */ r(
|
|
1040
|
+
z,
|
|
1041
|
+
{
|
|
1042
|
+
onClick: () => {
|
|
1043
|
+
T.setState((a) => ({
|
|
1044
|
+
activeCategory: o === `id${s}` ? "" : `id${s}`
|
|
1045
|
+
}));
|
|
1046
|
+
},
|
|
1047
|
+
title: s,
|
|
1048
|
+
isOpen: o === `id${s}`,
|
|
1049
|
+
titleFontStyles: { fontSize: 18, fontWeight: "bold" },
|
|
1050
|
+
showBottomBar: !1,
|
|
1051
|
+
color: l,
|
|
1052
|
+
activeColor: d,
|
|
1053
|
+
children: n ? n.map((a, c) => /* @__PURE__ */ r(
|
|
1054
|
+
Ae,
|
|
1055
|
+
{
|
|
1056
|
+
subcategory: a,
|
|
1057
|
+
fontColor: l,
|
|
1058
|
+
activeColor: d
|
|
1059
|
+
},
|
|
1060
|
+
`subcategory-${c}`
|
|
1061
|
+
)) : t && t.map((a, c) => /* @__PURE__ */ r(
|
|
1062
|
+
be,
|
|
1063
|
+
{
|
|
1064
|
+
indicator: a,
|
|
1065
|
+
fontColor: l,
|
|
1066
|
+
activeColor: d
|
|
1067
|
+
},
|
|
1068
|
+
`indicator-${c}`
|
|
1069
|
+
))
|
|
1070
|
+
}
|
|
1071
|
+
);
|
|
1072
|
+
};
|
|
1073
|
+
Ie.propTypes = {
|
|
1074
|
+
category: e.shape({
|
|
1075
|
+
name: e.string.isRequired,
|
|
1076
|
+
subcategories: e.array,
|
|
1077
|
+
indicators: e.array
|
|
1078
|
+
}),
|
|
1079
|
+
activeColor: e.string
|
|
1080
|
+
//onChangeBothType: PropTypes.func,
|
|
1081
|
+
};
|
|
1082
|
+
const Re = ({
|
|
1083
|
+
indicators: i,
|
|
1084
|
+
isOpen: d = !0,
|
|
1085
|
+
title: s,
|
|
1086
|
+
fontColor: n = "#605B56",
|
|
1087
|
+
//The color of the slider and the checkbox when is checked
|
|
1088
|
+
inputsColor: t = "#605B56",
|
|
1089
|
+
activeColor: o
|
|
1090
|
+
}) => {
|
|
1091
|
+
const { tematicalFiltersSelected: l } = T((c) => c), { t: a } = k();
|
|
1092
|
+
return F(() => {
|
|
1093
|
+
console.log("filtersSelected changed: ", l);
|
|
1094
|
+
}, [l]), F(() => {
|
|
1095
|
+
n && T.setState(() => ({ fontColor: n }));
|
|
1096
|
+
}, [n]), F(() => {
|
|
1097
|
+
t && T.setState(() => ({ inputsColor: t }));
|
|
1098
|
+
}, [t]), /* @__PURE__ */ r(
|
|
1099
|
+
z,
|
|
1100
|
+
{
|
|
1101
|
+
isOpen: d,
|
|
1102
|
+
title: s ? a(s) : "Tematical filters",
|
|
1103
|
+
color: n,
|
|
1104
|
+
activeColor: o,
|
|
1105
|
+
children: i == null ? void 0 : i.map((c, p) => /* @__PURE__ */ r(
|
|
1106
|
+
Ie,
|
|
1107
|
+
{
|
|
1108
|
+
category: c,
|
|
1109
|
+
fontColor: n,
|
|
1110
|
+
activeColor: o
|
|
1111
|
+
},
|
|
1112
|
+
`category-${p}`
|
|
1113
|
+
))
|
|
1114
|
+
}
|
|
1115
|
+
);
|
|
1116
|
+
};
|
|
1117
|
+
Re.propTypes = {
|
|
1118
|
+
isOpen: e.bool,
|
|
1119
|
+
title: e.string,
|
|
1120
|
+
indicators: e.arrayOf(e.object),
|
|
1121
|
+
fontColor: e.string,
|
|
1122
|
+
onChangeTematicalFilters: e.func,
|
|
1123
|
+
inputsColor: e.string,
|
|
1124
|
+
activeColor: e.string
|
|
1125
|
+
};
|
|
1126
|
+
const on = "_FiltersAmbitContainer_6o4gt_2", sn = "_FiltersAmbitHeader_6o4gt_7", rn = "_FiltersAmbitTitle_6o4gt_15", an = "_FiltersAmbitDescription_6o4gt_22", ln = "_FiltersAmbitDescriptionTitle_6o4gt_33", G = {
|
|
1127
|
+
FiltersAmbitContainer: on,
|
|
1128
|
+
FiltersAmbitHeader: sn,
|
|
1129
|
+
FiltersAmbitTitle: rn,
|
|
1130
|
+
FiltersAmbitDescription: an,
|
|
1131
|
+
FiltersAmbitDescriptionTitle: ln
|
|
1132
|
+
}, cn = ({
|
|
1133
|
+
ambitName: i,
|
|
1134
|
+
ambitDescription: d,
|
|
1135
|
+
defaultFilters: s,
|
|
1136
|
+
indicators: n,
|
|
1137
|
+
activeColor: t,
|
|
1138
|
+
textColor: o,
|
|
1139
|
+
backgroundColor: l,
|
|
1140
|
+
onChangeAppliedFilters: a,
|
|
1141
|
+
saveAmbit: c
|
|
1142
|
+
}) => {
|
|
1143
|
+
const { t: p } = k(), { tematicalFiltersSelected: u } = T((h) => h);
|
|
1144
|
+
return F(() => {
|
|
1145
|
+
s && s.length > 0 && T.setState((h) => ({
|
|
1146
|
+
tematicalFiltersSelected: s
|
|
1147
|
+
}));
|
|
1148
|
+
}, [s]), F(() => {
|
|
1149
|
+
console.log("filtersSelected changed: ", u), a(u);
|
|
1150
|
+
}, [u]), /* @__PURE__ */ m("div", { className: G.FiltersAmbitContainer, children: [
|
|
1151
|
+
/* @__PURE__ */ m("div", { className: G.FiltersAmbitHeader, children: [
|
|
1152
|
+
/* @__PURE__ */ r("div", { className: G.FiltersAmbitTitle, children: i }),
|
|
1153
|
+
/* @__PURE__ */ m("div", { className: G.FiltersAmbitDescription, children: [
|
|
1154
|
+
/* @__PURE__ */ r("div", { className: G.FiltersAmbitDescriptionTitle, children: p("description") }),
|
|
1155
|
+
d
|
|
1156
|
+
] })
|
|
1157
|
+
] }),
|
|
1158
|
+
/* @__PURE__ */ r(
|
|
1159
|
+
De,
|
|
1160
|
+
{
|
|
1161
|
+
title: p("applied_filters"),
|
|
1162
|
+
isOpen: !0,
|
|
1163
|
+
textColor: o || "#fff",
|
|
1164
|
+
backgroundColor: l || "#605B5680",
|
|
1165
|
+
activeColor: t
|
|
1166
|
+
}
|
|
1167
|
+
),
|
|
1168
|
+
/* @__PURE__ */ r(Be, { activeColor: t }),
|
|
1169
|
+
/* @__PURE__ */ r(
|
|
1170
|
+
Re,
|
|
1171
|
+
{
|
|
1172
|
+
indicators: n,
|
|
1173
|
+
inputsColor: t,
|
|
1174
|
+
textColor: o,
|
|
1175
|
+
title: "tematical_filters",
|
|
1176
|
+
activeColor: t
|
|
1177
|
+
}
|
|
1178
|
+
),
|
|
1179
|
+
/* @__PURE__ */ r("div", { className: "buttonContainer", children: /* @__PURE__ */ r("button", { className: "mainButton", onClick: c, children: p("guardar_ambit") }) })
|
|
1180
|
+
] });
|
|
1181
|
+
};
|
|
1182
|
+
cn.propTypes = {
|
|
1183
|
+
indicators: e.arrayOf(e.object).isRequired,
|
|
1184
|
+
ambitName: e.string,
|
|
1185
|
+
ambitDescription: e.string,
|
|
1186
|
+
defaultFilters: e.arrayOf(e.object),
|
|
1187
|
+
activeColor: e.string,
|
|
1188
|
+
backgroundColor: e.string,
|
|
1189
|
+
textColor: e.string,
|
|
1190
|
+
onChangeAppliedFilters: e.func,
|
|
1191
|
+
saveAmbit: e.func
|
|
1192
|
+
};
|
|
1193
|
+
const dn = "_barChartContainer_d2f1z_2", pn = {
|
|
1194
|
+
barChartContainer: dn
|
|
1195
|
+
}, Ve = ({
|
|
1196
|
+
data: i,
|
|
1197
|
+
width: d = 700,
|
|
1198
|
+
barHeight: s = 25,
|
|
1199
|
+
gap: n = 23,
|
|
1200
|
+
fontColor: t = "#605B56",
|
|
1201
|
+
verticalPaddign: o = 10,
|
|
1202
|
+
horizontalPaddign: l = 20,
|
|
1203
|
+
leftPadding: a = 200,
|
|
1204
|
+
numberOfDivisions: c = 7,
|
|
1205
|
+
maxValue: p = null
|
|
1206
|
+
}) => {
|
|
1207
|
+
const { t: u } = k(), { xScale: h, ticks: g, height: C } = te(() => {
|
|
1208
|
+
if (i && i.length > 0) {
|
|
1209
|
+
const b = (i == null ? void 0 : i.length) * (s + n) + o * 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, w) => p ? p / c * w : f / c * w);
|
|
1210
|
+
return {
|
|
1211
|
+
xScale: v,
|
|
1212
|
+
ticks: y,
|
|
1213
|
+
height: b,
|
|
1214
|
+
width: d,
|
|
1215
|
+
verticalPaddign: o,
|
|
1216
|
+
horizontalPaddign: l
|
|
1217
|
+
};
|
|
1218
|
+
} else
|
|
1219
|
+
return { xScale: null, ticks: [], height: 0 };
|
|
1220
|
+
}, [
|
|
1221
|
+
i,
|
|
1222
|
+
d,
|
|
1223
|
+
c,
|
|
1224
|
+
s,
|
|
1225
|
+
n,
|
|
1226
|
+
l,
|
|
1227
|
+
o,
|
|
1228
|
+
p
|
|
1229
|
+
]);
|
|
1230
|
+
return /* @__PURE__ */ r("div", { className: pn.barChartContainer, children: /* @__PURE__ */ r("svg", { width: d + l * 2, height: C, children: /* @__PURE__ */ m("g", { transform: `translate(0,${n})`, children: [
|
|
1231
|
+
/* @__PURE__ */ r("g", { transform: `translate(${a + l}, 0)`, children: g.map((b, f) => {
|
|
1232
|
+
const v = h(b);
|
|
1233
|
+
return /* @__PURE__ */ m("g", { transform: `translate(${v}, 0)`, children: [
|
|
1234
|
+
/* @__PURE__ */ r(
|
|
1235
|
+
"line",
|
|
1236
|
+
{
|
|
1237
|
+
y1: 0,
|
|
1238
|
+
y2: C - n * 2,
|
|
1239
|
+
stroke: "#ccc"
|
|
1240
|
+
}
|
|
1241
|
+
),
|
|
1242
|
+
/* @__PURE__ */ r(
|
|
1243
|
+
"text",
|
|
1244
|
+
{
|
|
1245
|
+
y: C - n,
|
|
1246
|
+
textAnchor: "middle",
|
|
1247
|
+
fontSize: 10,
|
|
1248
|
+
fill: t,
|
|
1249
|
+
children: parseInt(b)
|
|
1250
|
+
}
|
|
1251
|
+
)
|
|
1252
|
+
] }, f);
|
|
1253
|
+
}) }),
|
|
1254
|
+
i && i.length > 0 && (i == null ? void 0 : i.map((b, f) => {
|
|
1255
|
+
const v = h(b.value), y = f * (s + n);
|
|
1256
|
+
return /* @__PURE__ */ m(
|
|
1257
|
+
"g",
|
|
1258
|
+
{
|
|
1259
|
+
transform: `translate(${a + l}, ${y})`,
|
|
1260
|
+
children: [
|
|
1261
|
+
/* @__PURE__ */ r(
|
|
1262
|
+
"text",
|
|
1263
|
+
{
|
|
1264
|
+
x: -24,
|
|
1265
|
+
y: s / 2 + 5,
|
|
1266
|
+
textAnchor: "end",
|
|
1267
|
+
fill: t,
|
|
1268
|
+
children: u(b.title)
|
|
1269
|
+
}
|
|
1270
|
+
),
|
|
1271
|
+
/* @__PURE__ */ r(
|
|
1272
|
+
"rect",
|
|
1273
|
+
{
|
|
1274
|
+
width: v,
|
|
1275
|
+
height: s,
|
|
1276
|
+
fill: b.color,
|
|
1277
|
+
rx: 0
|
|
1278
|
+
}
|
|
1279
|
+
)
|
|
1280
|
+
]
|
|
1281
|
+
},
|
|
1282
|
+
f
|
|
1283
|
+
);
|
|
1284
|
+
}))
|
|
1285
|
+
] }) }) });
|
|
1286
|
+
};
|
|
1287
|
+
Ve.propTypes = {
|
|
1288
|
+
data: e.arrayOf(
|
|
1289
|
+
e.shape({
|
|
1290
|
+
title: e.string,
|
|
1291
|
+
value: e.number,
|
|
1292
|
+
color: e.string
|
|
1293
|
+
})
|
|
1294
|
+
),
|
|
1295
|
+
width: e.number,
|
|
1296
|
+
barHeight: e.number,
|
|
1297
|
+
gap: e.number,
|
|
1298
|
+
verticalPaddign: e.number,
|
|
1299
|
+
horizontalPaddign: e.number,
|
|
1300
|
+
numberOfDivisions: e.number,
|
|
1301
|
+
fontColor: e.string
|
|
1302
|
+
};
|
|
1303
|
+
const un = "_graphicContainer_c9zrg_2", hn = "_titleContainer_c9zrg_14", xe = {
|
|
1304
|
+
graphicContainer: un,
|
|
1305
|
+
titleContainer: hn
|
|
1306
|
+
}, mn = ({
|
|
1307
|
+
data: i,
|
|
1308
|
+
graphWidth: d = 700,
|
|
1309
|
+
containerStyle: s,
|
|
1310
|
+
borderColor: n = "#605B56",
|
|
1311
|
+
title: t = "Graphic Title",
|
|
1312
|
+
fontColor: o = "#605B56",
|
|
1313
|
+
maxValue: l = null,
|
|
1314
|
+
numberOfDivisions: a = 7,
|
|
1315
|
+
leftPadding: c = 200
|
|
1316
|
+
}) => {
|
|
1317
|
+
const { t: p } = k();
|
|
1318
|
+
return /* @__PURE__ */ m(
|
|
1319
|
+
"div",
|
|
1320
|
+
{
|
|
1321
|
+
className: xe.graphicContainer,
|
|
1322
|
+
style: {
|
|
1323
|
+
...s || {},
|
|
1324
|
+
border: `1.5px solid ${n}`
|
|
1325
|
+
},
|
|
1326
|
+
children: [
|
|
1327
|
+
/* @__PURE__ */ r("div", { className: xe.titleContainer, children: /* @__PURE__ */ r("h2", { children: p(t) }) }),
|
|
1328
|
+
/* @__PURE__ */ r(
|
|
1329
|
+
Ve,
|
|
1330
|
+
{
|
|
1331
|
+
data: i,
|
|
1332
|
+
width: d,
|
|
1333
|
+
fontColor: o,
|
|
1334
|
+
maxValue: l,
|
|
1335
|
+
numberOfDivisions: a,
|
|
1336
|
+
leftPadding: c
|
|
1337
|
+
}
|
|
1338
|
+
)
|
|
1339
|
+
]
|
|
1340
|
+
}
|
|
1341
|
+
);
|
|
1342
|
+
};
|
|
1343
|
+
mn.propTypes = {
|
|
1344
|
+
data: e.arrayOf(
|
|
1345
|
+
e.shape({
|
|
1346
|
+
color: e.string.isRequired,
|
|
1347
|
+
value: e.number.isRequired,
|
|
1348
|
+
title: e.string.isRequired
|
|
1349
|
+
})
|
|
1350
|
+
),
|
|
1351
|
+
borderColor: e.string,
|
|
1352
|
+
title: e.string,
|
|
1353
|
+
graphWidth: e.number,
|
|
1354
|
+
containerStyle: e.object,
|
|
1355
|
+
fontColor: e.string,
|
|
1356
|
+
maxValue: e.number,
|
|
1357
|
+
numberOfDivisions: e.number,
|
|
1358
|
+
leftPadding: e.number
|
|
1359
|
+
};
|
|
1360
|
+
const gn = "_indicatorsCategory_1cu33_2", Cn = "_title_1cu33_5", bn = "_list_1cu33_11", ae = {
|
|
1361
|
+
indicatorsCategory: gn,
|
|
1362
|
+
title: Cn,
|
|
1363
|
+
list: bn
|
|
1364
|
+
}, fn = "_indicatorContainer_lw8gx_2", yn = "_indicatorNameContainer_lw8gx_11", vn = "_dot_lw8gx_20", _n = "_indicatorName_lw8gx_11", xn = "_switchExternalContainer_lw8gx_31", wn = "_switchType_lw8gx_40", kn = "_switchTypeOptions_lw8gx_44", Nn = "_optionContainer_lw8gx_55", Sn = "_customRadious_lw8gx_65", Tn = "_optionText_lw8gx_72", S = {
|
|
1365
|
+
indicatorContainer: fn,
|
|
1366
|
+
indicatorNameContainer: yn,
|
|
1367
|
+
dot: vn,
|
|
1368
|
+
indicatorName: _n,
|
|
1369
|
+
switchExternalContainer: xn,
|
|
1370
|
+
switchType: wn,
|
|
1371
|
+
switchTypeOptions: kn,
|
|
1372
|
+
optionContainer: Nn,
|
|
1373
|
+
customRadious: Sn,
|
|
1374
|
+
optionText: Tn
|
|
1375
|
+
}, fe = ({
|
|
1376
|
+
indicator: i,
|
|
1377
|
+
values: d = [],
|
|
1378
|
+
activeColor: s,
|
|
1379
|
+
defaultColor: n = "#92898A",
|
|
1380
|
+
activeIndicator: t,
|
|
1381
|
+
activeIndicatorType: o,
|
|
1382
|
+
onClickIndicator: l,
|
|
1383
|
+
multiple: a = !1,
|
|
1384
|
+
onChangeType: c
|
|
1385
|
+
}) => {
|
|
1386
|
+
const { t: p } = k(), { name: u, type: h } = i, [g, C] = B(!1);
|
|
1387
|
+
F(() => {
|
|
1388
|
+
t && C(
|
|
1389
|
+
a ? t.some(
|
|
1390
|
+
(v) => v.name == String(u)
|
|
1391
|
+
) : t.name == u
|
|
1392
|
+
);
|
|
1393
|
+
}, [t]);
|
|
1394
|
+
const b = () => /* @__PURE__ */ r("div", { className: S.switchExternalContainer, children: /* @__PURE__ */ r("div", { className: S.switchType, children: /* @__PURE__ */ m("div", { className: S.switchTypeOptions, children: [
|
|
1395
|
+
/* @__PURE__ */ m(
|
|
1396
|
+
"div",
|
|
1397
|
+
{
|
|
1398
|
+
className: S.optionContainer,
|
|
1399
|
+
onClick: () => c("cat"),
|
|
1400
|
+
children: [
|
|
1401
|
+
/* @__PURE__ */ r(
|
|
1402
|
+
"span",
|
|
1403
|
+
{
|
|
1404
|
+
className: `${S.customRadious}`,
|
|
1405
|
+
style: {
|
|
1406
|
+
backgroundColor: o === "cat" ? s : "transparent",
|
|
1407
|
+
borderColor: o === "cat" ? s : n
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
),
|
|
1411
|
+
/* @__PURE__ */ r(
|
|
1412
|
+
"h4",
|
|
1413
|
+
{
|
|
1414
|
+
className: S.optionText,
|
|
1415
|
+
style: {
|
|
1416
|
+
color: o === "cat" ? s : n
|
|
1417
|
+
},
|
|
1418
|
+
children: p("indicators.cat")
|
|
1419
|
+
}
|
|
1420
|
+
)
|
|
1421
|
+
]
|
|
1422
|
+
}
|
|
1423
|
+
),
|
|
1424
|
+
/* @__PURE__ */ m(
|
|
1425
|
+
"div",
|
|
1426
|
+
{
|
|
1427
|
+
className: S.optionContainer,
|
|
1428
|
+
onClick: () => c("abs"),
|
|
1429
|
+
children: [
|
|
1430
|
+
/* @__PURE__ */ r(
|
|
1431
|
+
"span",
|
|
1432
|
+
{
|
|
1433
|
+
className: `${S.customRadious}`,
|
|
1434
|
+
style: {
|
|
1435
|
+
backgroundColor: o === "abs" ? s : "transparent",
|
|
1436
|
+
borderColor: o === "abs" ? s : n
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
),
|
|
1440
|
+
/* @__PURE__ */ r(
|
|
1441
|
+
"h4",
|
|
1442
|
+
{
|
|
1443
|
+
className: S.optionText,
|
|
1444
|
+
style: {
|
|
1445
|
+
color: o === "abs" ? s : n
|
|
1446
|
+
},
|
|
1447
|
+
children: p("indicators.abs")
|
|
1448
|
+
}
|
|
1449
|
+
)
|
|
1450
|
+
]
|
|
1451
|
+
}
|
|
1452
|
+
)
|
|
1453
|
+
] }) }) }), f = () => /* @__PURE__ */ r("div", { className: S.switchExternalContainer, children: /* @__PURE__ */ r("div", { className: S.switchType, children: /* @__PURE__ */ r("div", { className: S.switchTypeOptions, children: d.map((v, y) => /* @__PURE__ */ m(
|
|
1454
|
+
"div",
|
|
1455
|
+
{
|
|
1456
|
+
className: S.optionContainer,
|
|
1457
|
+
children: [
|
|
1458
|
+
/* @__PURE__ */ r(
|
|
1459
|
+
"span",
|
|
1460
|
+
{
|
|
1461
|
+
className: S.customRadious
|
|
1462
|
+
}
|
|
1463
|
+
),
|
|
1464
|
+
/* @__PURE__ */ r("h4", { children: p(v.unit) })
|
|
1465
|
+
]
|
|
1466
|
+
},
|
|
1467
|
+
y
|
|
1468
|
+
)) }) }) });
|
|
1469
|
+
return /* @__PURE__ */ m(
|
|
1470
|
+
"div",
|
|
1471
|
+
{
|
|
1472
|
+
className: S.indicatorContainer,
|
|
1473
|
+
children: [
|
|
1474
|
+
/* @__PURE__ */ m(
|
|
1475
|
+
"div",
|
|
1476
|
+
{
|
|
1477
|
+
className: S.indicatorNameContainer,
|
|
1478
|
+
onClick: () => l({ indicator: i }),
|
|
1479
|
+
children: [
|
|
1480
|
+
/* @__PURE__ */ r(
|
|
1481
|
+
"div",
|
|
1482
|
+
{
|
|
1483
|
+
style: {
|
|
1484
|
+
border: g ? `1px solid ${s}` : `1px solid ${n}`
|
|
1485
|
+
},
|
|
1486
|
+
className: S.dot
|
|
1487
|
+
}
|
|
1488
|
+
),
|
|
1489
|
+
/* @__PURE__ */ r(
|
|
1490
|
+
"h4",
|
|
1491
|
+
{
|
|
1492
|
+
className: S.indicatorName,
|
|
1493
|
+
style: { color: g ? s : n },
|
|
1494
|
+
children: /* @__PURE__ */ r(ge, { i18nKey: u, components: { sup: /* @__PURE__ */ r("sup", {}) } })
|
|
1495
|
+
}
|
|
1496
|
+
)
|
|
1497
|
+
]
|
|
1498
|
+
}
|
|
1499
|
+
),
|
|
1500
|
+
(t == null ? void 0 : t.name) === u && h === "both" && /* @__PURE__ */ r("div", { children: b() }),
|
|
1501
|
+
(t == null ? void 0 : t.name) === u && h === "twoUnits" && /* @__PURE__ */ r("div", { children: f() })
|
|
1502
|
+
]
|
|
1503
|
+
}
|
|
1504
|
+
);
|
|
1505
|
+
};
|
|
1506
|
+
fe.propTypes = {
|
|
1507
|
+
indicator: e.shape({
|
|
1508
|
+
name: e.string,
|
|
1509
|
+
type: e.string
|
|
1510
|
+
}),
|
|
1511
|
+
values: e.oneOfType([e.bool, e.array]),
|
|
1512
|
+
activeColor: e.string,
|
|
1513
|
+
defaultColor: e.string,
|
|
1514
|
+
activeIndicator: e.oneOfType([e.object, e.array]),
|
|
1515
|
+
multiple: e.bool,
|
|
1516
|
+
onClickIndicator: e.func
|
|
1517
|
+
};
|
|
1518
|
+
const Mn = "_indicatorsSubCategory_1dzsi_2", Fn = "_list_1dzsi_8", we = {
|
|
1519
|
+
indicatorsSubCategory: Mn,
|
|
1520
|
+
list: Fn
|
|
1521
|
+
}, je = ({
|
|
1522
|
+
subcName: i,
|
|
1523
|
+
indicators: d,
|
|
1524
|
+
defaultColor: s,
|
|
1525
|
+
activeColor: n,
|
|
1526
|
+
activeSubCategory: t,
|
|
1527
|
+
onClickSubCategory: o,
|
|
1528
|
+
id: l,
|
|
1529
|
+
activeIndicator: a,
|
|
1530
|
+
onClickIndicator: c,
|
|
1531
|
+
multiple: p,
|
|
1532
|
+
activeIndicatorType: u,
|
|
1533
|
+
onChangeType: h
|
|
1534
|
+
}) => {
|
|
1535
|
+
const { t: g } = k(), [C, b] = B(!1);
|
|
1536
|
+
return F(() => {
|
|
1537
|
+
b(t == l);
|
|
1538
|
+
}, [t, l]), /* @__PURE__ */ m(
|
|
1539
|
+
Ce.div,
|
|
1540
|
+
{
|
|
1541
|
+
className: we.indicatorsSubCategory,
|
|
1542
|
+
initial: { height: "43px" },
|
|
1543
|
+
animate: { height: C ? "auto" : "43px" },
|
|
1544
|
+
transition: { duration: 0.4 },
|
|
1545
|
+
children: [
|
|
1546
|
+
/* @__PURE__ */ r("button", { onClick: () => o(l), children: /* @__PURE__ */ m("h3", { style: { color: C ? n : s }, children: [
|
|
1547
|
+
/* @__PURE__ */ r("span", { style: { color: C ? n : s }, children: C ? "-" : "+" }),
|
|
1548
|
+
/* @__PURE__ */ r(
|
|
1549
|
+
"span",
|
|
1550
|
+
{
|
|
1551
|
+
style: { marginLeft: 12, color: C ? n : s },
|
|
1552
|
+
children: g(i)
|
|
1553
|
+
}
|
|
1554
|
+
)
|
|
1555
|
+
] }) }),
|
|
1556
|
+
d && /* @__PURE__ */ r("div", { className: we.list, children: d == null ? void 0 : d.map((f, v) => /* @__PURE__ */ r(
|
|
1557
|
+
fe,
|
|
1558
|
+
{
|
|
1559
|
+
indicator: f,
|
|
1560
|
+
defaultColor: s,
|
|
1561
|
+
activeColor: n,
|
|
1562
|
+
activeIndicator: a,
|
|
1563
|
+
onClickIndicator: c,
|
|
1564
|
+
multiple: p,
|
|
1565
|
+
activeIndicatorType: u,
|
|
1566
|
+
onChangeType: h
|
|
1567
|
+
},
|
|
1568
|
+
"indicator" + v
|
|
1569
|
+
)) })
|
|
1570
|
+
]
|
|
1571
|
+
}
|
|
1572
|
+
);
|
|
1573
|
+
};
|
|
1574
|
+
je.propTypes = {
|
|
1575
|
+
subcName: e.string,
|
|
1576
|
+
indicators: e.array,
|
|
1577
|
+
activeColor: e.string,
|
|
1578
|
+
defaultColor: e.string,
|
|
1579
|
+
activeSubCategory: e.string,
|
|
1580
|
+
id: e.string,
|
|
1581
|
+
activeIndicator: e.oneOfType([e.object, e.array]),
|
|
1582
|
+
multiple: e.bool,
|
|
1583
|
+
onClickSubCategory: e.func,
|
|
1584
|
+
onClickIndicator: e.func
|
|
1585
|
+
};
|
|
1586
|
+
const ze = ({
|
|
1587
|
+
cat: i,
|
|
1588
|
+
id: d,
|
|
1589
|
+
activeColor: s,
|
|
1590
|
+
defaultColor: n,
|
|
1591
|
+
onClickCategory: t,
|
|
1592
|
+
activeCategory: o,
|
|
1593
|
+
activeSubCategory: l,
|
|
1594
|
+
onClickSubCategory: a,
|
|
1595
|
+
activeIndicator: c,
|
|
1596
|
+
onClickIndicator: p,
|
|
1597
|
+
multiple: u,
|
|
1598
|
+
activeIndicatorType: h,
|
|
1599
|
+
onChangeType: g
|
|
1600
|
+
}) => {
|
|
1601
|
+
var v;
|
|
1602
|
+
const { t: C } = k(), [b, f] = B(!1);
|
|
1603
|
+
return F(() => {
|
|
1604
|
+
f(o === d);
|
|
1605
|
+
}, [o, d]), /* @__PURE__ */ m(
|
|
1606
|
+
Ce.div,
|
|
1607
|
+
{
|
|
1608
|
+
className: ae.indicatorsCategory,
|
|
1609
|
+
initial: { height: "53px" },
|
|
1610
|
+
animate: { height: b ? "auto" : "53px" },
|
|
1611
|
+
transition: { duration: 0.4 },
|
|
1612
|
+
style: {
|
|
1613
|
+
backgroundColor: "white",
|
|
1614
|
+
borderBottom: b ? `1px solid ${s}` : "0px",
|
|
1615
|
+
marginBottom: b ? "20px" : "0px"
|
|
1616
|
+
},
|
|
1617
|
+
children: [
|
|
1618
|
+
/* @__PURE__ */ m("h2", { className: `${ae.title}`, onClick: () => t(d), children: [
|
|
1619
|
+
/* @__PURE__ */ r("span", { style: { color: b ? s : n }, children: b ? "-" : "+" }),
|
|
1620
|
+
/* @__PURE__ */ r(
|
|
1621
|
+
"span",
|
|
1622
|
+
{
|
|
1623
|
+
style: { marginLeft: 12, color: b ? s : n },
|
|
1624
|
+
children: C(i.name)
|
|
1625
|
+
}
|
|
1626
|
+
)
|
|
1627
|
+
] }),
|
|
1628
|
+
i.subcategories ? i.subcategories.map(
|
|
1629
|
+
({ name: y, subcategory: x, indicators: w }, _) => /* @__PURE__ */ r(
|
|
1630
|
+
je,
|
|
1631
|
+
{
|
|
1632
|
+
id: x,
|
|
1633
|
+
activeSubCategory: l,
|
|
1634
|
+
subcName: y,
|
|
1635
|
+
onClickSubCategory: a,
|
|
1636
|
+
activeIndicator: c,
|
|
1637
|
+
onClickIndicator: p,
|
|
1638
|
+
multiple: u,
|
|
1639
|
+
activeColor: s,
|
|
1640
|
+
defaultColor: n,
|
|
1641
|
+
indicators: w,
|
|
1642
|
+
activeIndicatorType: h,
|
|
1643
|
+
onChangeType: g
|
|
1644
|
+
},
|
|
1645
|
+
`subcKey ${_}`
|
|
1646
|
+
)
|
|
1647
|
+
) : /* @__PURE__ */ r("div", { className: ae.list, children: (v = i.indicators) == null ? void 0 : v.map((y, x) => /* @__PURE__ */ r(
|
|
1648
|
+
fe,
|
|
1649
|
+
{
|
|
1650
|
+
indicator: y,
|
|
1651
|
+
values: y.type == "twoUnits" && y.values,
|
|
1652
|
+
activeColor: s,
|
|
1653
|
+
defaultColor: n,
|
|
1654
|
+
activeIndicator: c,
|
|
1655
|
+
onClickIndicator: p,
|
|
1656
|
+
multiple: u,
|
|
1657
|
+
activeIndicatorType: h,
|
|
1658
|
+
onChangeType: g
|
|
1659
|
+
},
|
|
1660
|
+
`indicator${x}`
|
|
1661
|
+
)) })
|
|
1662
|
+
]
|
|
1663
|
+
}
|
|
1664
|
+
);
|
|
1665
|
+
};
|
|
1666
|
+
ze.propTypes = {
|
|
1667
|
+
cat: e.object,
|
|
1668
|
+
id: e.string,
|
|
1669
|
+
onChange: e.func,
|
|
1670
|
+
onClickCategory: e.func,
|
|
1671
|
+
activeCategory: e.string,
|
|
1672
|
+
activeSubCategory: e.string,
|
|
1673
|
+
onClickSubCategory: e.func,
|
|
1674
|
+
onClickIndicator: e.func,
|
|
1675
|
+
activeIndicator: e.oneOfType([e.object, e.array]),
|
|
1676
|
+
multiple: e.bool,
|
|
1677
|
+
activeColor: e.string,
|
|
1678
|
+
defaultColor: e.string
|
|
1679
|
+
};
|
|
1680
|
+
const Ln = "_indicatorsList_fklyu_2", Dn = "_title_fklyu_6", ke = {
|
|
1681
|
+
indicatorsList: Ln,
|
|
1682
|
+
title: Dn
|
|
1683
|
+
}, Bn = ({
|
|
1684
|
+
indicators: i,
|
|
1685
|
+
activeColor: d,
|
|
1686
|
+
defaultColor: s = "#92898A",
|
|
1687
|
+
// Función que se ejecuta al seleccionar un indicador, recibe el o los ikeys como parametro
|
|
1688
|
+
onChange: n,
|
|
1689
|
+
// Selección multiple
|
|
1690
|
+
multiple: t = !1,
|
|
1691
|
+
// Si multiple es true, debe ser un array de strings, sino un string
|
|
1692
|
+
defaultValue: o = null,
|
|
1693
|
+
//si el indicador es tipo "both" cuando se cambia el tipo
|
|
1694
|
+
changeIndType: l,
|
|
1695
|
+
activeIndicatorType: a
|
|
1696
|
+
}) => {
|
|
1697
|
+
const { t: c } = k(), [p, u] = B(), [h, g] = B(), [C, b] = B(), f = (_) => {
|
|
1698
|
+
u(p == _ ? null : _);
|
|
1699
|
+
}, v = (_) => {
|
|
1700
|
+
g(h == _ ? null : _);
|
|
1701
|
+
}, y = ({ indicator: _ }) => {
|
|
1702
|
+
console.log("onClickIndicator: ", _), x(_);
|
|
1703
|
+
}, x = (_) => {
|
|
1704
|
+
if (!t)
|
|
1705
|
+
b(
|
|
1706
|
+
(C == null ? void 0 : C.name) == _.name ? null : _
|
|
1707
|
+
);
|
|
1708
|
+
else {
|
|
1709
|
+
let N = C && C.length > 0 ? [...C] : [];
|
|
1710
|
+
b(
|
|
1711
|
+
N != null && N.some(
|
|
1712
|
+
($) => $.name == _.name
|
|
1713
|
+
) ? N.filter(
|
|
1714
|
+
($) => $.name != String(_.name)
|
|
1715
|
+
) : [...N, _]
|
|
1716
|
+
), _.type == "both" && l("cat");
|
|
1717
|
+
}
|
|
1718
|
+
};
|
|
1719
|
+
F(() => {
|
|
1720
|
+
console.log("activeindicator changed to: ", C), n && typeof n == "function" && C && n({ activeIndicator: C });
|
|
1721
|
+
}, [C]), Ee(() => {
|
|
1722
|
+
if (o && !C)
|
|
1723
|
+
if (t && o && Array.isArray(o)) {
|
|
1724
|
+
let _ = C && C.length > 0 ? [...C] : [];
|
|
1725
|
+
b([..._, ...o]), w(o[0].name);
|
|
1726
|
+
} else
|
|
1727
|
+
x(o), w(o.name);
|
|
1728
|
+
}, []);
|
|
1729
|
+
const w = (_) => {
|
|
1730
|
+
const N = i.find(($) => {
|
|
1731
|
+
if ($.subcategories) {
|
|
1732
|
+
let O = $.subcategories.find(
|
|
1733
|
+
(ne) => ne.indicators.find((U) => U.name == _)
|
|
1734
|
+
);
|
|
1735
|
+
if (O)
|
|
1736
|
+
return g(O.subcategory), O;
|
|
1737
|
+
} else
|
|
1738
|
+
return $.indicators.some((O) => O.name == _);
|
|
1739
|
+
});
|
|
1740
|
+
N && u(N.category);
|
|
1741
|
+
};
|
|
1742
|
+
return /* @__PURE__ */ m("div", { className: ke.indicatorsList, children: [
|
|
1743
|
+
/* @__PURE__ */ r("h2", { className: ke.title, style: { color: s }, children: c("indicators.indicators") }),
|
|
1744
|
+
i.map((_, N) => /* @__PURE__ */ r(
|
|
1745
|
+
ze,
|
|
1746
|
+
{
|
|
1747
|
+
id: _.category,
|
|
1748
|
+
cat: _,
|
|
1749
|
+
onClickCategory: f,
|
|
1750
|
+
activeCategory: p,
|
|
1751
|
+
onClickSubCategory: v,
|
|
1752
|
+
activeSubCategory: h,
|
|
1753
|
+
onClickIndicator: y,
|
|
1754
|
+
activeIndicator: C,
|
|
1755
|
+
activeColor: d,
|
|
1756
|
+
defaultColor: s,
|
|
1757
|
+
multiple: t,
|
|
1758
|
+
onChange: n,
|
|
1759
|
+
onChangeType: l,
|
|
1760
|
+
activeIndicatorType: a
|
|
1761
|
+
},
|
|
1762
|
+
`categoryKey${N}`
|
|
1763
|
+
))
|
|
1764
|
+
] });
|
|
1765
|
+
};
|
|
1766
|
+
Bn.propTypes = {
|
|
1767
|
+
indicators: e.arrayOf(e.object),
|
|
1768
|
+
activeColor: e.string,
|
|
1769
|
+
defaultColor: e.string,
|
|
1770
|
+
onChange: e.func,
|
|
1771
|
+
changeIndType: e.func,
|
|
1772
|
+
multiple: e.bool,
|
|
1773
|
+
activeIndicator: e.oneOfType([e.object, e.array]),
|
|
1774
|
+
defaultValue: e.oneOfType([e.object, e.array]),
|
|
1775
|
+
activeIndicatorType: e.string
|
|
1776
|
+
};
|
|
1777
|
+
const $n = "_langSelector_1of0g_2", On = "_currentLang_1of0g_7", An = "_arrow_1of0g_19", In = "_prevImg_1of0g_22", Rn = "_langMenu_1of0g_26", K = {
|
|
1778
|
+
langSelector: $n,
|
|
1779
|
+
currentLang: On,
|
|
1780
|
+
arrow: An,
|
|
1781
|
+
prevImg: In,
|
|
1782
|
+
langMenu: Rn
|
|
1783
|
+
}, Vn = ({ langs: i, arrow: d, imgPrev: s }) => {
|
|
1784
|
+
const [n, t] = B(!1), { i18n: o } = k(), l = i.find((c) => c.code == o.language), a = (c) => {
|
|
1785
|
+
o.changeLanguage(c), t(!1);
|
|
1786
|
+
};
|
|
1787
|
+
return /* @__PURE__ */ m("div", { className: K.langSelector, children: [
|
|
1788
|
+
/* @__PURE__ */ m(
|
|
1789
|
+
"div",
|
|
1790
|
+
{
|
|
1791
|
+
className: K.currentLang,
|
|
1792
|
+
onClick: () => {
|
|
1793
|
+
t(!n);
|
|
1794
|
+
},
|
|
1795
|
+
children: [
|
|
1796
|
+
s && /* @__PURE__ */ r("img", { className: K.prevImg, src: s }),
|
|
1797
|
+
l.titleSelected || l.title,
|
|
1798
|
+
/* @__PURE__ */ r("img", { src: d, className: K.arrow })
|
|
1799
|
+
]
|
|
1800
|
+
}
|
|
1801
|
+
),
|
|
1802
|
+
n && /* @__PURE__ */ r("div", { className: K.langMenu, children: i.map((c) => /* @__PURE__ */ r(
|
|
1803
|
+
"button",
|
|
1804
|
+
{
|
|
1805
|
+
className: l.code == c.code ? K.active : "",
|
|
1806
|
+
onClick: () => a(c.code),
|
|
1807
|
+
children: c.title
|
|
1808
|
+
},
|
|
1809
|
+
c.code
|
|
1810
|
+
)) })
|
|
1811
|
+
] });
|
|
1812
|
+
};
|
|
1813
|
+
Vn.propTypes = {
|
|
1814
|
+
langs: e.arrayOf(
|
|
1815
|
+
e.shape({
|
|
1816
|
+
code: e.string,
|
|
1817
|
+
title: e.string,
|
|
1818
|
+
titleSelected: e.string
|
|
1819
|
+
})
|
|
1820
|
+
),
|
|
1821
|
+
color: e.string,
|
|
1822
|
+
bckColor: e.string,
|
|
1823
|
+
hoverColor: e.string,
|
|
1824
|
+
arrow: e.object,
|
|
1825
|
+
imgPrev: e.object
|
|
1826
|
+
};
|
|
1827
|
+
const jn = "_legendContainer_atg3j_3", zn = "_closeButton_atg3j_18", Pn = "_titleContainer_atg3j_46", qn = "_infoContainer_atg3j_52", En = "_titleLegendList_atg3j_63", Kn = "_legendListContainer_atg3j_70", Zn = "_gridContainer_atg3j_70", Un = "_elementLegendContainer_atg3j_76", Hn = "_colorDot_atg3j_82", Gn = "_absoluteValueContainer_atg3j_88", Yn = "_absoluteValueColor_atg3j_91", Wn = "_absoluteValueText_atg3j_96", Xn = "_moreInfoContainer_atg3j_108", M = {
|
|
1828
|
+
legendContainer: jn,
|
|
1829
|
+
closeButton: zn,
|
|
1830
|
+
titleContainer: Pn,
|
|
1831
|
+
infoContainer: qn,
|
|
1832
|
+
titleLegendList: En,
|
|
1833
|
+
legendListContainer: Kn,
|
|
1834
|
+
gridContainer: Zn,
|
|
1835
|
+
elementLegendContainer: Un,
|
|
1836
|
+
colorDot: Hn,
|
|
1837
|
+
absoluteValueContainer: Gn,
|
|
1838
|
+
absoluteValueColor: Yn,
|
|
1839
|
+
absoluteValueText: Wn,
|
|
1840
|
+
moreInfoContainer: Xn
|
|
1841
|
+
}, Jn = ({
|
|
1842
|
+
//JSON with the styles of the container (optional)
|
|
1843
|
+
containerStyles: i,
|
|
1844
|
+
//Title on top of the legend
|
|
1845
|
+
title: d,
|
|
1846
|
+
//Array to display the info behind the title should have: [{title, value}, ...]
|
|
1847
|
+
infoList: s,
|
|
1848
|
+
//Array to display the items of the legend: [{title, color}, ...]
|
|
1849
|
+
//color should be a string with hexadecimal value
|
|
1850
|
+
legendList: n,
|
|
1851
|
+
//If not passed it will read t("mainUser")
|
|
1852
|
+
legendListTitle: t,
|
|
1853
|
+
//Should be an object with {maxColor, minColor, maxValue, minValue}
|
|
1854
|
+
//If this has is not null or undefined, the legendList values wont be displayed.
|
|
1855
|
+
//It will display only the absolute value indicator.
|
|
1856
|
+
absoluteValue: o,
|
|
1857
|
+
//Function to be called when the button is clicked (optional).
|
|
1858
|
+
//If this is null or undefined the button wont be displayed.
|
|
1859
|
+
onClickMoreInfo: l,
|
|
1860
|
+
//If not passed it will read t("moreInformation")
|
|
1861
|
+
buttonTitle: a,
|
|
1862
|
+
onClickClose: c
|
|
1863
|
+
}) => {
|
|
1864
|
+
const { t: p } = k();
|
|
1865
|
+
return /* @__PURE__ */ m(
|
|
1866
|
+
"div",
|
|
1867
|
+
{
|
|
1868
|
+
style: i ? { ...i } : {},
|
|
1869
|
+
className: `${M.legendContainer}`,
|
|
1870
|
+
children: [
|
|
1871
|
+
/* @__PURE__ */ r("button", { className: M.closeButton, onClick: c }),
|
|
1872
|
+
d && /* @__PURE__ */ r("div", { className: M.titleContainer, children: /* @__PURE__ */ r("h2", { children: d }) }),
|
|
1873
|
+
s && s.length > 0 && /* @__PURE__ */ r("div", { className: M.infoContainer, children: /* @__PURE__ */ r("ul", { children: s.map(({ title: u, value: h }) => /* @__PURE__ */ m("li", { children: [
|
|
1874
|
+
/* @__PURE__ */ r("h3", { className: M.title, children: `${u}:` }),
|
|
1875
|
+
/* @__PURE__ */ m("span", { className: M.value, children: [
|
|
1876
|
+
" ",
|
|
1877
|
+
h
|
|
1878
|
+
] })
|
|
1879
|
+
] }, d)) }) }),
|
|
1880
|
+
/* @__PURE__ */ r("h3", { className: M.titleLegendList, children: t ? /* @__PURE__ */ r(ge, { i18nKey: t, components: { sup: /* @__PURE__ */ r("sup", {}) } }) : p("mainUse") }),
|
|
1881
|
+
/* @__PURE__ */ r("div", { className: M.legendListContainer, children: o ? /* @__PURE__ */ m("div", { className: M.absoluteValueContainer, children: [
|
|
1882
|
+
/* @__PURE__ */ r(
|
|
1883
|
+
"div",
|
|
1884
|
+
{
|
|
1885
|
+
className: M.absoluteValueColor,
|
|
1886
|
+
style: {
|
|
1887
|
+
background: `linear-gradient(to bottom, ${o.maxColor} 0%, ${o.minColor} 100%)`
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
),
|
|
1891
|
+
/* @__PURE__ */ m("div", { className: M.absoluteValueText, children: [
|
|
1892
|
+
/* @__PURE__ */ m("span", { children: [
|
|
1893
|
+
o.maxValue,
|
|
1894
|
+
" ",
|
|
1895
|
+
p(o.unit)
|
|
1896
|
+
] }),
|
|
1897
|
+
/* @__PURE__ */ m("span", { children: [
|
|
1898
|
+
o.minValue,
|
|
1899
|
+
" ",
|
|
1900
|
+
p(o.unit)
|
|
1901
|
+
] })
|
|
1902
|
+
] })
|
|
1903
|
+
] }) : n && n.length > 0 && /* @__PURE__ */ r("div", { className: M.gridContainer, children: n.map(
|
|
1904
|
+
({ title: u, color: h }) => /* @__PURE__ */ m("div", { className: M.elementLegendContainer, children: [
|
|
1905
|
+
/* @__PURE__ */ r(
|
|
1906
|
+
"div",
|
|
1907
|
+
{
|
|
1908
|
+
className: M.colorDot,
|
|
1909
|
+
style: { backgroundColor: h }
|
|
1910
|
+
}
|
|
1911
|
+
),
|
|
1912
|
+
/* @__PURE__ */ m("div", { className: M.titleLegendElement, children: [
|
|
1913
|
+
p(u),
|
|
1914
|
+
" "
|
|
1915
|
+
] })
|
|
1916
|
+
] }, d)
|
|
1917
|
+
) }) }),
|
|
1918
|
+
l && /* @__PURE__ */ r("button", { className: M.moreInfoContainer, onClick: l, children: a || p("moreInformation") })
|
|
1919
|
+
]
|
|
1920
|
+
}
|
|
1921
|
+
);
|
|
1922
|
+
};
|
|
1923
|
+
Jn.propTypes = {
|
|
1924
|
+
title: e.string,
|
|
1925
|
+
containerStyles: e.object,
|
|
1926
|
+
infoList: e.arrayOf(
|
|
1927
|
+
e.shape({
|
|
1928
|
+
title: e.string.isRequired,
|
|
1929
|
+
value: e.oneOfType([e.string, e.number])
|
|
1930
|
+
})
|
|
1931
|
+
),
|
|
1932
|
+
legendList: e.arrayOf(
|
|
1933
|
+
e.shape({
|
|
1934
|
+
title: e.string,
|
|
1935
|
+
color: e.string
|
|
1936
|
+
})
|
|
1937
|
+
),
|
|
1938
|
+
legendListTitle: e.string,
|
|
1939
|
+
absoluteValue: e.shape({
|
|
1940
|
+
maxColor: e.string,
|
|
1941
|
+
minColor: e.string,
|
|
1942
|
+
maxValue: e.number,
|
|
1943
|
+
minValue: e.number
|
|
1944
|
+
}),
|
|
1945
|
+
onClickMoreInfo: e.func,
|
|
1946
|
+
buttonTitle: e.string,
|
|
1947
|
+
onClickClose: e.func
|
|
1948
|
+
};
|
|
1949
|
+
const Qn = "_logo_1ewa6_2", Ne = {
|
|
1950
|
+
logo: Qn
|
|
1951
|
+
}, ei = ({ src: i, alt: d, href: s }) => {
|
|
1952
|
+
const { t: n } = k(), t = /* @__PURE__ */ r("img", { src: i, alt: n(d) });
|
|
1953
|
+
return s ? /* @__PURE__ */ r("div", { className: Ne.logo, children: /* @__PURE__ */ r("a", { href: s, children: t }) }) : /* @__PURE__ */ r("div", { className: Ne.logo, children: t });
|
|
1954
|
+
};
|
|
1955
|
+
ei.propTypes = {
|
|
1956
|
+
src: e.string.isRequired,
|
|
1957
|
+
alt: e.string.isRequired,
|
|
1958
|
+
href: e.string,
|
|
1959
|
+
className: e.string
|
|
1960
|
+
};
|
|
1961
|
+
const ti = "_mapContainer_84pkf_2", ni = {
|
|
1962
|
+
mapContainer: ti
|
|
1963
|
+
};
|
|
1964
|
+
Ze.accessToken = "pk.eyJ1IjoiY2ljbGljYSIsImEiOiJja3llODhxZ2UwYzF1Mm5xcHVhMzI3anhqIn0.-r56FLAzEH57eVsB2ZeVcA";
|
|
1965
|
+
const ii = ({
|
|
1966
|
+
initialView: i = { latitude: 39.4699, longitude: -0.3763, zoom: 12 },
|
|
1967
|
+
maxZoom: d = 17,
|
|
1968
|
+
minZoom: s = 8,
|
|
1969
|
+
mapStyle: n,
|
|
1970
|
+
firstSymbolLayer: t,
|
|
1971
|
+
cssProps: o = "",
|
|
1972
|
+
onClick: l = "",
|
|
1973
|
+
interactiveLayers: a = [],
|
|
1974
|
+
popUp: c = !1,
|
|
1975
|
+
sources: p = [],
|
|
1976
|
+
layers: u = []
|
|
1977
|
+
}) => {
|
|
1978
|
+
const h = me(), [g, C] = B(null), b = de((f) => f.mapState.showTexts);
|
|
1979
|
+
return F(() => {
|
|
1980
|
+
if (h.current) {
|
|
1981
|
+
const f = h.current.getMap();
|
|
1982
|
+
f.getStyle().layers.map((y) => {
|
|
1983
|
+
y.type == "symbol" && y.id != "professionals" && (b ? f.setLayoutProperty(y.id, "visibility", "visible") : f.setLayoutProperty(y.id, "visibility", "none"));
|
|
1984
|
+
});
|
|
1985
|
+
}
|
|
1986
|
+
}, [b]), /* @__PURE__ */ r("div", { className: `${ni.mapContainer}`, style: o, children: /* @__PURE__ */ m(
|
|
1987
|
+
Ue,
|
|
1988
|
+
{
|
|
1989
|
+
initialViewState: i,
|
|
1990
|
+
ref: h,
|
|
1991
|
+
hash: !1,
|
|
1992
|
+
maxZoom: d,
|
|
1993
|
+
minZoom: s,
|
|
1994
|
+
mapStyle: n,
|
|
1995
|
+
onClick: l,
|
|
1996
|
+
interactiveLayerIds: a,
|
|
1997
|
+
children: [
|
|
1998
|
+
p.length && p.map((f, v) => /* @__PURE__ */ r(
|
|
1999
|
+
He,
|
|
2000
|
+
{
|
|
2001
|
+
...f,
|
|
2002
|
+
children: u.length && u.map((y, x) => {
|
|
2003
|
+
if (y.sourceId == f.id) return /* @__PURE__ */ r(
|
|
2004
|
+
Ge,
|
|
2005
|
+
{
|
|
2006
|
+
...y.layer,
|
|
2007
|
+
beforeId: t
|
|
2008
|
+
},
|
|
2009
|
+
x
|
|
2010
|
+
);
|
|
2011
|
+
})
|
|
2012
|
+
},
|
|
2013
|
+
v
|
|
2014
|
+
)),
|
|
2015
|
+
/* @__PURE__ */ r(Ye, { position: "bottom-right", visualizePitch: !0 }),
|
|
2016
|
+
c && g && /* @__PURE__ */ r(
|
|
2017
|
+
We,
|
|
2018
|
+
{
|
|
2019
|
+
longitude: c.longitude,
|
|
2020
|
+
latitude: c.latitude,
|
|
2021
|
+
anchor: c.anchor,
|
|
2022
|
+
onClose: () => C(null),
|
|
2023
|
+
children: c.content
|
|
2024
|
+
}
|
|
2025
|
+
)
|
|
2026
|
+
]
|
|
2027
|
+
}
|
|
2028
|
+
) });
|
|
2029
|
+
};
|
|
2030
|
+
ii.propTypes = {
|
|
2031
|
+
initialView: e.shape({
|
|
2032
|
+
latitude: e.number.isRequired,
|
|
2033
|
+
longitude: e.number.isRequired,
|
|
2034
|
+
zoom: e.number.isRequired
|
|
2035
|
+
}),
|
|
2036
|
+
mapStyle: e.object,
|
|
2037
|
+
firstSymbolLayer: e.string,
|
|
2038
|
+
cssProps: e.object,
|
|
2039
|
+
style: e.object,
|
|
2040
|
+
maxZoom: e.number,
|
|
2041
|
+
minZoom: e.number,
|
|
2042
|
+
onClick: e.func,
|
|
2043
|
+
interactiveLayers: e.array,
|
|
2044
|
+
popUp: e.shape({
|
|
2045
|
+
latitude: e.number,
|
|
2046
|
+
longitude: e.number,
|
|
2047
|
+
anchor: e.string,
|
|
2048
|
+
content: e.element
|
|
2049
|
+
}),
|
|
2050
|
+
textsUrl: e.string,
|
|
2051
|
+
sources: e.arrayOf(
|
|
2052
|
+
e.shape({
|
|
2053
|
+
id: e.string,
|
|
2054
|
+
type: e.string,
|
|
2055
|
+
url: e.string,
|
|
2056
|
+
//si es type: vector
|
|
2057
|
+
data: e.object
|
|
2058
|
+
//si es type: geojson
|
|
2059
|
+
})
|
|
2060
|
+
),
|
|
2061
|
+
layers: e.arrayOf(
|
|
2062
|
+
e.shape({
|
|
2063
|
+
sourceId: e.string,
|
|
2064
|
+
layer: e.shape({
|
|
2065
|
+
id: e.string,
|
|
2066
|
+
type: e.string,
|
|
2067
|
+
sourceLayer: e.string,
|
|
2068
|
+
minZoom: e.number,
|
|
2069
|
+
maxZoom: e.number,
|
|
2070
|
+
paint: e.object
|
|
2071
|
+
})
|
|
2072
|
+
})
|
|
2073
|
+
)
|
|
2074
|
+
};
|
|
2075
|
+
const oi = "_mapContainer_b0pyr_3", si = {
|
|
2076
|
+
mapContainer: oi
|
|
2077
|
+
}, ri = "_FeaturePopUp_1gd6w_2", ai = "_title_1gd6w_2", Se = {
|
|
2078
|
+
FeaturePopUp: ri,
|
|
2079
|
+
title: ai
|
|
2080
|
+
}, li = ({ props: i }) => {
|
|
2081
|
+
const { t: d } = k();
|
|
2082
|
+
return /* @__PURE__ */ r("div", { className: Se.FeaturePopUp, children: i.map((s) => /* @__PURE__ */ m("p", { children: [
|
|
2083
|
+
/* @__PURE__ */ m("span", { className: Se.title, children: [
|
|
2084
|
+
/* @__PURE__ */ r(ge, { i18nKey: s.name, components: { sup: /* @__PURE__ */ r("sup", {}) } }),
|
|
2085
|
+
": "
|
|
2086
|
+
] }),
|
|
2087
|
+
s.value.toLocaleString("de", { maximumFractionDigits: 2 }),
|
|
2088
|
+
" ",
|
|
2089
|
+
d(s.unit)
|
|
2090
|
+
] })) });
|
|
2091
|
+
}, ci = ({
|
|
2092
|
+
initialView: i = { latitude: 39.4699, longitude: -0.3763, zoom: 12 },
|
|
2093
|
+
maxZoom: d = 17,
|
|
2094
|
+
minZoom: s = 8,
|
|
2095
|
+
mapStyle: n,
|
|
2096
|
+
firstSymbolLayer: t,
|
|
2097
|
+
cssProps: o = {},
|
|
2098
|
+
onClick: l = "",
|
|
2099
|
+
interactiveLayers: a = [],
|
|
2100
|
+
sources: c = [],
|
|
2101
|
+
layers: p = [],
|
|
2102
|
+
filters: u,
|
|
2103
|
+
popUpParams: h,
|
|
2104
|
+
onClosePopUp: g,
|
|
2105
|
+
showTexts: C
|
|
2106
|
+
}) => {
|
|
2107
|
+
console.log(u);
|
|
2108
|
+
const b = me();
|
|
2109
|
+
return F(() => {
|
|
2110
|
+
if (b.current) {
|
|
2111
|
+
const f = b.current.getMap();
|
|
2112
|
+
f.getStyle().layers.map((y) => {
|
|
2113
|
+
y.type == "symbol" && y.id != "professionals" && (C ? f.setLayoutProperty(y.id, "visibility", "visible") : f.setLayoutProperty(y.id, "visibility", "none"));
|
|
2114
|
+
});
|
|
2115
|
+
}
|
|
2116
|
+
}, [C]), F(() => {
|
|
2117
|
+
let f = new Xe();
|
|
2118
|
+
return ie.addProtocol("pmtiles", f.tile), () => {
|
|
2119
|
+
ie.removeProtocol("pmtiles");
|
|
2120
|
+
};
|
|
2121
|
+
}, []), /* @__PURE__ */ r("div", { className: `${si.mapContainer}`, style: o && o, children: /* @__PURE__ */ m(
|
|
2122
|
+
Je,
|
|
2123
|
+
{
|
|
2124
|
+
mapLib: ie,
|
|
2125
|
+
initialViewState: i,
|
|
2126
|
+
ref: b,
|
|
2127
|
+
hash: !1,
|
|
2128
|
+
maxZoom: d,
|
|
2129
|
+
minZoom: s,
|
|
2130
|
+
mapStyle: n,
|
|
2131
|
+
onClick: l,
|
|
2132
|
+
interactiveLayerIds: a,
|
|
2133
|
+
children: [
|
|
2134
|
+
c.length && c.map((f, v) => /* @__PURE__ */ r(
|
|
2135
|
+
Qe,
|
|
2136
|
+
{
|
|
2137
|
+
...f,
|
|
2138
|
+
children: p.length && p.map((y, x) => {
|
|
2139
|
+
if (y.sourceId == f.id) return /* @__PURE__ */ r(
|
|
2140
|
+
et,
|
|
2141
|
+
{
|
|
2142
|
+
...y.layer,
|
|
2143
|
+
beforeId: t,
|
|
2144
|
+
filter: u && u
|
|
2145
|
+
},
|
|
2146
|
+
x
|
|
2147
|
+
);
|
|
2148
|
+
})
|
|
2149
|
+
},
|
|
2150
|
+
v
|
|
2151
|
+
)),
|
|
2152
|
+
/* @__PURE__ */ r(tt, { position: "bottom-right", visualizePitch: !0 }),
|
|
2153
|
+
h && /* @__PURE__ */ r(
|
|
2154
|
+
nt,
|
|
2155
|
+
{
|
|
2156
|
+
longitude: h.lng,
|
|
2157
|
+
latitude: h.lat,
|
|
2158
|
+
onClose: g,
|
|
2159
|
+
children: /* @__PURE__ */ r(li, { props: h.props })
|
|
2160
|
+
}
|
|
2161
|
+
)
|
|
2162
|
+
]
|
|
2163
|
+
}
|
|
2164
|
+
) });
|
|
2165
|
+
};
|
|
2166
|
+
ci.propTypes = {
|
|
2167
|
+
initialView: e.shape({
|
|
2168
|
+
latitude: e.number.isRequired,
|
|
2169
|
+
longitude: e.number.isRequired,
|
|
2170
|
+
zoom: e.number.isRequired
|
|
2171
|
+
}),
|
|
2172
|
+
mapStyle: e.string,
|
|
2173
|
+
firstSymbolLayer: e.string,
|
|
2174
|
+
cssProps: e.object,
|
|
2175
|
+
style: e.object,
|
|
2176
|
+
maxZoom: e.number,
|
|
2177
|
+
minZoom: e.number,
|
|
2178
|
+
onClick: e.func,
|
|
2179
|
+
interactiveLayers: e.array,
|
|
2180
|
+
popUp: e.bool,
|
|
2181
|
+
sources: e.arrayOf(
|
|
2182
|
+
e.shape({
|
|
2183
|
+
id: e.string,
|
|
2184
|
+
type: e.string,
|
|
2185
|
+
url: e.string,
|
|
2186
|
+
//si es type: vector
|
|
2187
|
+
data: e.object
|
|
2188
|
+
//si es type: geojson
|
|
2189
|
+
})
|
|
2190
|
+
),
|
|
2191
|
+
layers: e.arrayOf(
|
|
2192
|
+
e.shape({
|
|
2193
|
+
sourceId: e.string,
|
|
2194
|
+
layer: e.shape({
|
|
2195
|
+
id: e.string,
|
|
2196
|
+
type: e.string,
|
|
2197
|
+
sourceLayer: e.string,
|
|
2198
|
+
minZoom: e.number,
|
|
2199
|
+
maxZoom: e.number,
|
|
2200
|
+
paint: e.object
|
|
2201
|
+
})
|
|
2202
|
+
})
|
|
2203
|
+
),
|
|
2204
|
+
showTexts: e.bool,
|
|
2205
|
+
filters: e.array,
|
|
2206
|
+
popUpParams: e.object,
|
|
2207
|
+
onClosePopUp: e.func
|
|
2208
|
+
};
|
|
2209
|
+
const di = "_sectionBar_1egwc_2", pi = "_leftContent_1egwc_14", ui = "_textContainer_1egwc_20", hi = "_title_1egwc_27", mi = "_subtitle_1egwc_33", gi = "_rightContent_1egwc_38", j = {
|
|
2210
|
+
sectionBar: di,
|
|
2211
|
+
leftContent: pi,
|
|
2212
|
+
textContainer: ui,
|
|
2213
|
+
title: hi,
|
|
2214
|
+
subtitle: mi,
|
|
2215
|
+
rightContent: gi
|
|
2216
|
+
}, lo = ({
|
|
2217
|
+
leftIcon: i,
|
|
2218
|
+
title: d,
|
|
2219
|
+
subtitle: s,
|
|
2220
|
+
rightContent: n,
|
|
2221
|
+
mainColor: t,
|
|
2222
|
+
width: o
|
|
2223
|
+
}) => {
|
|
2224
|
+
const { t: l } = k();
|
|
2225
|
+
return /* @__PURE__ */ m("div", { className: j.sectionBar, style: { width: o && o }, children: [
|
|
2226
|
+
/* @__PURE__ */ m("div", { className: j.leftContent, children: [
|
|
2227
|
+
i && /* @__PURE__ */ r("img", { src: i, alt: "Icono", className: j.icon }),
|
|
2228
|
+
/* @__PURE__ */ m("div", { className: j.textContainer, children: [
|
|
2229
|
+
/* @__PURE__ */ r("div", { className: j.title, children: l(d) }),
|
|
2230
|
+
s && /* @__PURE__ */ r("div", { className: j.subtitle, children: s })
|
|
2231
|
+
] })
|
|
2232
|
+
] }),
|
|
2233
|
+
/* @__PURE__ */ r("div", { className: j.rightContent, children: n })
|
|
2234
|
+
] });
|
|
2235
|
+
}, Ci = Me({
|
|
2236
|
+
name: "mapSlice",
|
|
2237
|
+
initialState: {
|
|
2238
|
+
showTexts: !0,
|
|
2239
|
+
sliderSelectedYear: 2025,
|
|
2240
|
+
activeIndicatorKey: 0,
|
|
2241
|
+
activeIndicatorType: "cat",
|
|
2242
|
+
activeIndicatorUnit: null
|
|
2243
|
+
},
|
|
2244
|
+
reducers: {
|
|
2245
|
+
setShowTexts: (i, d) => {
|
|
2246
|
+
i.showTexts = d.payload;
|
|
2247
|
+
},
|
|
2248
|
+
setYear: (i, d) => {
|
|
2249
|
+
i.sliderSelectedYear = d.payload;
|
|
2250
|
+
},
|
|
2251
|
+
setActiveIndicatorKey: (i, d) => {
|
|
2252
|
+
i.activeIndicatorKey = d.payload;
|
|
2253
|
+
},
|
|
2254
|
+
setActiveIndicatorType: (i, d) => {
|
|
2255
|
+
i.activeIndicatorType = d.payload;
|
|
2256
|
+
},
|
|
2257
|
+
setActiveIndicatorUnit: (i, d) => {
|
|
2258
|
+
i.activeIndicatorUnit = d.payload;
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
}), { setShowTexts: co, setYear: le, setActiveIndicatorKey: po, setActiveIndicatorType: uo, setActiveIndicatorUnit: ho } = Ci.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", vi = "_playButton_a19yo_17", _i = "_sliderOpen_a19yo_28", xi = "_sliderResults_a19yo_32", Y = {
|
|
2262
|
+
slider: yi,
|
|
2263
|
+
playButton: vi,
|
|
2264
|
+
sliderOpen: _i,
|
|
2265
|
+
sliderResults: xi
|
|
2266
|
+
}, wi = ({ onResults: i = !1, defaultYear: d = 2025, firstYear: s = 2025, lastYear: n = 2050, zIndex: t = 10, rightBarOpen: o = !1 }) => {
|
|
2267
|
+
const [l, a] = B(d), c = Te(), p = (y, x) => {
|
|
2268
|
+
a(x), c(le(x - 2e3));
|
|
2269
|
+
}, [u, h] = B(!1), g = () => {
|
|
2270
|
+
h(!0);
|
|
2271
|
+
}, C = () => {
|
|
2272
|
+
h(!1);
|
|
2273
|
+
};
|
|
2274
|
+
((y, x) => {
|
|
2275
|
+
const w = me();
|
|
2276
|
+
F(() => {
|
|
2277
|
+
w.current = y;
|
|
2278
|
+
}, [y]), F(() => {
|
|
2279
|
+
function _() {
|
|
2280
|
+
w.current();
|
|
2281
|
+
}
|
|
2282
|
+
{
|
|
2283
|
+
let N = setInterval(_, x);
|
|
2284
|
+
return () => clearInterval(N);
|
|
2285
|
+
}
|
|
2286
|
+
}, [x]);
|
|
2287
|
+
})(() => {
|
|
2288
|
+
u && (l != 2050 ? (a(l + 1), c(le(l - 2e3 + 1))) : (a(2025), c(le(25))));
|
|
2289
|
+
}, 1e3);
|
|
2290
|
+
const f = ot({
|
|
2291
|
+
palette: {
|
|
2292
|
+
primary: {
|
|
2293
|
+
main: "#605b56"
|
|
2294
|
+
}
|
|
2295
|
+
},
|
|
2296
|
+
components: {
|
|
2297
|
+
MuiSlider: {
|
|
2298
|
+
styleOverrides: {
|
|
2299
|
+
mark: {
|
|
2300
|
+
height: 10,
|
|
2301
|
+
backgroundColor: "#605b56"
|
|
2302
|
+
},
|
|
2303
|
+
valueLabel: {
|
|
2304
|
+
backgroundColor: "transparent",
|
|
2305
|
+
color: "#605b56",
|
|
2306
|
+
padding: 0,
|
|
2307
|
+
top: 3
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
}
|
|
2312
|
+
}), v = [
|
|
2313
|
+
{ label: "", value: 2025 },
|
|
2314
|
+
{ label: "", value: 2032 },
|
|
2315
|
+
{ label: "", value: 2041 },
|
|
2316
|
+
{ label: "", value: 2050 }
|
|
2317
|
+
];
|
|
2318
|
+
return /* @__PURE__ */ r(rt, { theme: f, children: /* @__PURE__ */ m(
|
|
2319
|
+
st,
|
|
2320
|
+
{
|
|
2321
|
+
sx: { width: 400 },
|
|
2322
|
+
className: `${i ? Y.sliderResults : Y.slider} ${o ? Y.sliderOpen : ""}`,
|
|
2323
|
+
style: { zIndex: t },
|
|
2324
|
+
children: [
|
|
2325
|
+
s,
|
|
2326
|
+
/* @__PURE__ */ r(
|
|
2327
|
+
it,
|
|
2328
|
+
{
|
|
2329
|
+
"aria-label": "TimeSlider",
|
|
2330
|
+
value: l,
|
|
2331
|
+
valueLabelDisplay: "on",
|
|
2332
|
+
step: 1,
|
|
2333
|
+
marks: v,
|
|
2334
|
+
min: s,
|
|
2335
|
+
max: n,
|
|
2336
|
+
onChange: p,
|
|
2337
|
+
color: "primary",
|
|
2338
|
+
size: "small"
|
|
2339
|
+
}
|
|
2340
|
+
),
|
|
2341
|
+
n,
|
|
2342
|
+
!u && /* @__PURE__ */ r("button", { className: Y.playButton, onClick: g, children: /* @__PURE__ */ r("img", { src: bi, alt: "Play" }) }),
|
|
2343
|
+
u && /* @__PURE__ */ r("button", { className: Y.playButton, onClick: C, children: /* @__PURE__ */ r("img", { src: fi, alt: "Pause" }) })
|
|
2344
|
+
]
|
|
2345
|
+
}
|
|
2346
|
+
) });
|
|
2347
|
+
};
|
|
2348
|
+
wi.propTypes = {
|
|
2349
|
+
defaultYear: e.number,
|
|
2350
|
+
onResults: e.bool,
|
|
2351
|
+
firstYear: e.number,
|
|
2352
|
+
lastYear: e.number,
|
|
2353
|
+
zIndex: e.number,
|
|
2354
|
+
rightBarOpen: e.bool
|
|
2355
|
+
};
|
|
2356
|
+
const ki = "_TopNavMenuContainer_15agj_2", Ni = "_topNavOptions_15agj_12", Si = "_active_15agj_23", ce = {
|
|
2357
|
+
TopNavMenuContainer: ki,
|
|
2358
|
+
topNavOptions: Ni,
|
|
2359
|
+
active: Si
|
|
2360
|
+
}, Ti = ({
|
|
2361
|
+
options: i = [],
|
|
2362
|
+
cssProps: d = {},
|
|
2363
|
+
containerStyles: s
|
|
2364
|
+
}) => {
|
|
2365
|
+
const { t: n } = k(), t = d.textColor || "inherit", o = d.borderColor || "transparent", l = d.height || "100%";
|
|
2366
|
+
return /* @__PURE__ */ r(
|
|
2367
|
+
"div",
|
|
2368
|
+
{
|
|
2369
|
+
className: ce.TopNavMenuContainer,
|
|
2370
|
+
style: s || {},
|
|
2371
|
+
children: i.map((a, c) => /* @__PURE__ */ r(
|
|
2372
|
+
at,
|
|
2373
|
+
{
|
|
2374
|
+
to: a.url,
|
|
2375
|
+
className: ({ isActive: p }) => `${ce.topNavOptions} ${p ? ce.active : ""}`,
|
|
2376
|
+
style: ({ isActive: p }) => ({
|
|
2377
|
+
color: t,
|
|
2378
|
+
borderColor: p ? o : "transparent",
|
|
2379
|
+
height: `calc(${l} - 10px)`
|
|
2380
|
+
}),
|
|
2381
|
+
children: n(a.name)
|
|
2382
|
+
},
|
|
2383
|
+
c
|
|
2384
|
+
))
|
|
2385
|
+
}
|
|
2386
|
+
);
|
|
2387
|
+
};
|
|
2388
|
+
Ti.propTypes = {
|
|
2389
|
+
options: e.arrayOf(e.object),
|
|
2390
|
+
cssProps: e.shape({
|
|
2391
|
+
borderColor: e.string.isRequired,
|
|
2392
|
+
textColor: e.string.isRequired
|
|
2393
|
+
// height: PropTypes.string.isRequired,
|
|
2394
|
+
})
|
|
2395
|
+
// activeColor: PropTypes.string,
|
|
2396
|
+
// defaultColor: PropTypes.string
|
|
2397
|
+
};
|
|
2398
|
+
const Mi = Me({
|
|
2399
|
+
name: "userSlice",
|
|
2400
|
+
initialState: {
|
|
2401
|
+
user: {
|
|
2402
|
+
isLoggedIn: !1,
|
|
2403
|
+
username: ""
|
|
2404
|
+
},
|
|
2405
|
+
showLogIn: !1,
|
|
2406
|
+
showUserMenu: !1
|
|
2407
|
+
},
|
|
2408
|
+
reducers: {
|
|
2409
|
+
setShowLogIn: (i, d) => {
|
|
2410
|
+
i.showLogIn = d.payload;
|
|
2411
|
+
},
|
|
2412
|
+
setShowUserMenu: (i, d) => {
|
|
2413
|
+
i.showUserMenu = d.payload;
|
|
2414
|
+
}
|
|
2415
|
+
}
|
|
2416
|
+
}), { setShowLogIn: Fi, setShowUserMenu: Li } = Mi.actions, Di = "_UserMenuTrigger_uglss_2", Bi = {
|
|
2417
|
+
UserMenuTrigger: Di
|
|
2418
|
+
}, $i = ({ cssClass: i, loginLocale: d = "login" }) => {
|
|
2419
|
+
const s = Te(), n = de((a) => a.userState.user.isLoggedIn), t = de((a) => a.userState.user.username), { t: o } = k(), l = () => {
|
|
2420
|
+
s(n ? Fi(!0) : Li(!0));
|
|
2421
|
+
};
|
|
2422
|
+
return /* @__PURE__ */ r("div", { className: `${Bi.UserMenuTrigger} link ${i}`, onClick: l, children: n ? t : o(d) });
|
|
2423
|
+
};
|
|
2424
|
+
$i.propTypes = {
|
|
2425
|
+
onClickLoggedIn: e.func.isRequired,
|
|
2426
|
+
onClickLoggedOut: e.func.isRequired,
|
|
2427
|
+
log: e.bool,
|
|
2428
|
+
name: e.string,
|
|
2429
|
+
cssClass: e.string,
|
|
2430
|
+
loginLocale: e.string
|
|
2431
|
+
};
|
|
2432
|
+
const Oi = "_header_t7qdl_2", Ai = "_leftComponents_t7qdl_12", Ii = "_centerComponents_t7qdl_13", Ri = "_rightComponents_t7qdl_14", Q = {
|
|
2433
|
+
header: Oi,
|
|
2434
|
+
leftComponents: Ai,
|
|
2435
|
+
centerComponents: Ii,
|
|
2436
|
+
rightComponents: Ri
|
|
2437
|
+
}, Vi = ({
|
|
2438
|
+
cssProps: i,
|
|
2439
|
+
leftComponents: d = [],
|
|
2440
|
+
centerComponents: s = [],
|
|
2441
|
+
rightComponents: n = []
|
|
2442
|
+
}) => /* @__PURE__ */ m("div", { className: Q.header, style: i, children: [
|
|
2443
|
+
/* @__PURE__ */ r(
|
|
2444
|
+
"div",
|
|
2445
|
+
{
|
|
2446
|
+
className: Q.leftComponents,
|
|
2447
|
+
style: { height: i.height },
|
|
2448
|
+
children: d.map((t, o) => /* @__PURE__ */ r("div", { style: { height: i.height }, children: t }, o))
|
|
2449
|
+
}
|
|
2450
|
+
),
|
|
2451
|
+
/* @__PURE__ */ r(
|
|
2452
|
+
"div",
|
|
2453
|
+
{
|
|
2454
|
+
className: Q.centerComponents,
|
|
2455
|
+
style: { height: i.height },
|
|
2456
|
+
children: s.map((t, o) => /* @__PURE__ */ r("div", { style: { height: i.height }, children: t }, o))
|
|
2457
|
+
}
|
|
2458
|
+
),
|
|
2459
|
+
/* @__PURE__ */ r(
|
|
2460
|
+
"div",
|
|
2461
|
+
{
|
|
2462
|
+
className: Q.rightComponents,
|
|
2463
|
+
style: { height: i.height },
|
|
2464
|
+
children: n.map((t, o) => /* @__PURE__ */ r("div", { style: { height: i.height }, children: t }, o))
|
|
2465
|
+
}
|
|
2466
|
+
)
|
|
2467
|
+
] });
|
|
2468
|
+
Vi.propTypes = {
|
|
2469
|
+
cssProps: e.shape({
|
|
2470
|
+
backgroundColor: e.string.isRequired,
|
|
2471
|
+
height: e.string.isRequired,
|
|
2472
|
+
borderColor: e.string,
|
|
2473
|
+
textColor: e.string
|
|
2474
|
+
}),
|
|
2475
|
+
leftComponents: e.arrayOf(e.node),
|
|
2476
|
+
centerComponents: e.arrayOf(e.node),
|
|
2477
|
+
rightComponents: e.arrayOf(e.node)
|
|
2478
|
+
};
|
|
2479
|
+
const ji = "_sidebar_1jqo2_2", zi = "_open_1jqo2_16", Pi = "_content_1jqo2_20", qi = "_closeButton_1jqo2_26", ee = {
|
|
2480
|
+
sidebar: ji,
|
|
2481
|
+
open: zi,
|
|
2482
|
+
content: Pi,
|
|
2483
|
+
closeButton: qi
|
|
2484
|
+
}, Ei = ({ width: i = "300px", children: d, showRightBar: s, onCloseBar: n }) => {
|
|
2485
|
+
const t = () => {
|
|
2486
|
+
n();
|
|
2487
|
+
};
|
|
2488
|
+
return /* @__PURE__ */ r(
|
|
2489
|
+
"div",
|
|
2490
|
+
{
|
|
2491
|
+
className: `${ee.sidebar} ${s ? ee.open : ""}`,
|
|
2492
|
+
style: { width: s ? i : 0 },
|
|
2493
|
+
children: s && /* @__PURE__ */ m("div", { className: ee.content, children: [
|
|
2494
|
+
/* @__PURE__ */ r("button", { className: ee.closeButton, onClick: t, children: "×" }),
|
|
2495
|
+
d
|
|
2496
|
+
] })
|
|
2497
|
+
}
|
|
2498
|
+
);
|
|
2499
|
+
};
|
|
2500
|
+
Ei.propTypes = {
|
|
2501
|
+
width: e.string,
|
|
2502
|
+
children: e.node,
|
|
2503
|
+
showRightBar: e.bool,
|
|
2504
|
+
onCloseBar: e.func
|
|
2505
|
+
};
|
|
2506
|
+
export {
|
|
2507
|
+
Nt as AmbitSelector,
|
|
2508
|
+
Rt as ButtonsList,
|
|
2509
|
+
z as DropdownList,
|
|
2510
|
+
ao as EditAmbit,
|
|
2511
|
+
cn as FiltersAmbit,
|
|
2512
|
+
mn as Graphic,
|
|
2513
|
+
Vi as HeaderSection,
|
|
2514
|
+
Bn as IndicatorsList,
|
|
2515
|
+
Vn as LangSelector,
|
|
2516
|
+
Jn as Legend,
|
|
2517
|
+
ei as LogoApp,
|
|
2518
|
+
ii as MapboxMap,
|
|
2519
|
+
ci as MaplibreMap,
|
|
2520
|
+
Ei as RightSidebar,
|
|
2521
|
+
lo as SectionBar,
|
|
2522
|
+
wi as TimeSlider,
|
|
2523
|
+
Le as Tooltip,
|
|
2524
|
+
Ti as TopNavMenu,
|
|
2525
|
+
$i as UserMenuTrigger
|
|
2526
|
+
};
|