From a6019111b52fd0ac152b25794aba0f68634fe718 Mon Sep 17 00:00:00 2001 From: Jose Date: Thu, 6 Mar 2025 16:52:27 +0100 Subject: [PATCH] Fixed CORS error --- .idea/.gitignore | 8 + .idea/compiler.xml | 13 ++ .idea/jarRepositories.xml | 20 +++ .idea/misc.xml | 14 ++ .idea/modules.xml | 8 + .idea/vcs.xml | 6 + ContaminUS.iml | 10 ++ .../contaminus/common/ConfigManager.java | 10 +- .../contaminus/database/DatabaseManager.java | 14 +- .../contaminus/database/QueryBuilder.java | 5 +- .../miarma/contaminus/server/ApiVerticle.java | 159 +++++++++++------- .../contaminus/server/DatabaseVerticle.java | 2 + .../contaminus/server/HttpServerVerticle.java | 17 +- .../contaminus/server/MainVerticle.java | 24 +-- .../src/main/resources/default.properties | 8 +- .../{index-Ch0_cdBw.js => index-B9-ngIAm.js} | 4 +- .../src/main/resources/webroot/index.html | 2 +- backend/vertx/target/classes/.gitignore | 2 +- .../vertx/target/classes/default.properties | 8 +- .../{index-Ch0_cdBw.js => index-B9-ngIAm.js} | 4 +- .../vertx/target/classes/webroot/index.html | 2 +- frontend/public/config/settings.json | 2 +- frontend/src/components/HistoryCharts.jsx | 4 - frontend/src/components/SummaryCards.jsx | 3 +- 24 files changed, 239 insertions(+), 110 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/compiler.xml create mode 100644 .idea/jarRepositories.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 ContaminUS.iml rename backend/vertx/src/main/resources/webroot/assets/{index-Ch0_cdBw.js => index-B9-ngIAm.js} (98%) rename backend/vertx/target/classes/webroot/assets/{index-Ch0_cdBw.js => index-B9-ngIAm.js} (98%) diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..170b576 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..dda4560 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..f261d12 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ContaminUS.iml b/ContaminUS.iml new file mode 100644 index 0000000..64f8ad0 --- /dev/null +++ b/ContaminUS.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/backend/vertx/src/main/java/net/miarma/contaminus/common/ConfigManager.java b/backend/vertx/src/main/java/net/miarma/contaminus/common/ConfigManager.java index cbafdf5..98086bf 100644 --- a/backend/vertx/src/main/java/net/miarma/contaminus/common/ConfigManager.java +++ b/backend/vertx/src/main/java/net/miarma/contaminus/common/ConfigManager.java @@ -57,9 +57,17 @@ public class ConfigManager { } } - public String getProperty(String key) { + public String getStringProperty(String key) { return config.getProperty(key); } + + public int getIntProperty(String key) { + return Integer.parseInt(config.getProperty(key)); + } + + public boolean getBooleanProperty(String key) { + return Boolean.parseBoolean(config.getProperty(key)); + } public void setProperty(String key, String value) { config.setProperty(key, value); diff --git a/backend/vertx/src/main/java/net/miarma/contaminus/database/DatabaseManager.java b/backend/vertx/src/main/java/net/miarma/contaminus/database/DatabaseManager.java index 03978e9..c40c9b7 100644 --- a/backend/vertx/src/main/java/net/miarma/contaminus/database/DatabaseManager.java +++ b/backend/vertx/src/main/java/net/miarma/contaminus/database/DatabaseManager.java @@ -13,13 +13,13 @@ public class DatabaseManager { ConfigManager config = ConfigManager.getInstance(); JsonObject dbConfig = new JsonObject() - .put("url", config.getProperty("db.protocol") + "//" + - config.getProperty("db.host") + ":" + - config.getProperty("db.port") + "/" + - config.getProperty("db.name")) - .put("user", config.getProperty("db.user")) - .put("password", config.getProperty("db.pwd")) - .put("max_pool_size", config.getProperty("db.poolSize")); + .put("url", config.getStringProperty("db.protocol") + "//" + + config.getStringProperty("db.host") + ":" + + config.getStringProperty("db.port") + "/" + + config.getStringProperty("db.name")) + .put("user", config.getStringProperty("db.user")) + .put("password", config.getStringProperty("db.pwd")) + .put("max_pool_size", config.getStringProperty("db.poolSize")); pool = JDBCPool.pool(vertx, dbConfig); } diff --git a/backend/vertx/src/main/java/net/miarma/contaminus/database/QueryBuilder.java b/backend/vertx/src/main/java/net/miarma/contaminus/database/QueryBuilder.java index c6f644e..c303ff1 100644 --- a/backend/vertx/src/main/java/net/miarma/contaminus/database/QueryBuilder.java +++ b/backend/vertx/src/main/java/net/miarma/contaminus/database/QueryBuilder.java @@ -29,8 +29,9 @@ public class QueryBuilder { return this; } - public QueryBuilder where(String condition) { - conditions.add(condition); + public QueryBuilder where(String conditionsString, Object... values) { + conditionsString = conditionsString.replaceAll("\\?", "%s"); + conditions.add(String.format(conditionsString, values)); return this; } diff --git a/backend/vertx/src/main/java/net/miarma/contaminus/server/ApiVerticle.java b/backend/vertx/src/main/java/net/miarma/contaminus/server/ApiVerticle.java index f764286..99975fb 100644 --- a/backend/vertx/src/main/java/net/miarma/contaminus/server/ApiVerticle.java +++ b/backend/vertx/src/main/java/net/miarma/contaminus/server/ApiVerticle.java @@ -1,83 +1,118 @@ package net.miarma.contaminus.server; -import java.util.Optional; - import io.vertx.core.AbstractVerticle; import io.vertx.core.Promise; -import io.vertx.core.eventbus.DeliveryOptions; import io.vertx.core.eventbus.Message; +import io.vertx.core.http.HttpMethod; import io.vertx.core.json.JsonArray; import io.vertx.core.json.JsonObject; import io.vertx.ext.web.Router; import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.CorsHandler; +import net.miarma.contaminus.common.ConfigManager; import net.miarma.contaminus.common.Constants; import net.miarma.contaminus.database.QueryBuilder; +import java.util.HashSet; +import java.util.Optional; +import java.util.Set; + public class ApiVerticle extends AbstractVerticle { - @Override - public void start(Promise startPromise) { - Constants.LOGGER.info("🟢 Iniciando ApiVerticle..."); - Router router = Router.router(vertx); - router.get(Constants.API_PREFIX + "/sensors").blockingHandler(this::getAllSensors); + private ConfigManager configManager = ConfigManager.getInstance(); + + @Override + public void start(Promise startPromise) { + Constants.LOGGER.info("🟢 Iniciando ApiVerticle..."); + Router router = Router.router(vertx); + + Set allowedHeaders = new HashSet<>(); + allowedHeaders.add("x-requested-with"); + allowedHeaders.add("Access-Control-Allow-Origin"); + allowedHeaders.add("origin"); + allowedHeaders.add("Content-Type"); + allowedHeaders.add("accept"); + + Set allowedMethods = new HashSet<>(); + allowedMethods.add(io.vertx.core.http.HttpMethod.GET); + allowedMethods.add(io.vertx.core.http.HttpMethod.POST); + allowedMethods.add(io.vertx.core.http.HttpMethod.OPTIONS); + + router.route().handler(CorsHandler.create() + .addOrigin("http://"+configManager.getStringProperty("inet.host")+":"+configManager.getIntProperty("webserver.port")) + .allowCredentials(true) + .allowedHeaders(allowedHeaders) + .allowedMethods(allowedMethods)); + + router.get(Constants.API_PREFIX + "/sensors").blockingHandler(this::getAllSensors); router.get(Constants.API_PREFIX + "/sensors/:id").blockingHandler(this::getSensorById); - router.get(Constants.API_PREFIX + "/status").handler(ctx -> - ctx.json(new JsonObject().put("status", "OK")) - ); - vertx.createHttpServer().requestHandler(router).listen(8081); - startPromise.complete(); - } - - private void getAllSensors(RoutingContext context) { - Optional sort = Optional.ofNullable(context.request().getParam("_sort")); - Optional order = Optional.ofNullable(context.request().getParam("_order")); - // forma tela de rara que me ha dado chatgpt para parsear esto XD - Optional limit = Optional.ofNullable(context.request().getParam("_limit")) - .map(s -> { - try { - return Integer.parseInt(s); - } catch (NumberFormatException e) { - return null; - } - }); - - - String query = QueryBuilder - .select("*") - .from("sensor_mq_data") - .orderBy(sort, order) - .limit(limit) - .build(); - - vertx.eventBus().request("db.query", query, new DeliveryOptions(), ar -> { - if (ar.succeeded()) { - Message result = ar.result(); + router.get(Constants.API_PREFIX + "/status").handler(ctx -> ctx.json(new JsonObject().put("status", "OK"))); + + vertx.createHttpServer() + .requestHandler(router) + .listen( + configManager.getIntProperty("api.port"), + configManager.getStringProperty("inet.host"), + result -> { + if (result.succeeded()) { + Constants.LOGGER.info(String.format( + "📡 ApiVerticle desplegado. (http://%s:%d)", + configManager.getStringProperty("inet.host"), + configManager.getIntProperty("api.port") + )); + startPromise.complete(); + } else { + Constants.LOGGER.error("❌ Error al desplegar ApiVerticle", result.cause()); + startPromise.fail(result.cause()); + } + }); + } + + private void getAllSensors(RoutingContext context) { + Optional sort = Optional.ofNullable(context.request().getParam("_sort")); + Optional order = Optional.ofNullable(context.request().getParam("_order")); + Optional limit = Optional.ofNullable(context.request().getParam("_limit")) + .map(s -> { + try { + return Integer.parseInt(s); + } catch (NumberFormatException e) { + return null; + } + }); + + String query = QueryBuilder + .select("*") + .from("sensor_mq_data") + .orderBy(sort, order) + .limit(limit) + .build(); + + vertx.eventBus().request("db.query", query, req -> { + if (req.succeeded()) { + Message result = req.result(); JsonArray jsonArray = (JsonArray) result.body(); context.json(jsonArray); } else { - context.fail(500, ar.cause()); + context.fail(500, req.cause()); } }); } - - - private void getSensorById(RoutingContext context) { - String id = context.request().getParam("id"); - - String query = QueryBuilder - .select("*") - .from("sensor_mq_data") - .where("id = " + id) - .build(); - - vertx.eventBus().request("db.query", query, new DeliveryOptions(), ar -> { - if (ar.succeeded()) { - Message result = ar.result(); - JsonArray jsonArray = (JsonArray) result.body(); - context.json(jsonArray); - } else { - context.fail(500, ar.cause()); - } - }); - } -} + private void getSensorById(RoutingContext context) { + String id = context.request().getParam("id"); + String query = QueryBuilder + .select("*") + .from("sensor_mq_data") + .where("id = ?", id) + .build(); + + vertx.eventBus().request("db.query", query, req -> { + if (req.succeeded()) { + Message result = req.result(); + JsonArray jsonArray = (JsonArray) result.body(); + context.json(jsonArray); + } else { + context.fail(500, req.cause()); + } + }); + } +} \ No newline at end of file diff --git a/backend/vertx/src/main/java/net/miarma/contaminus/server/DatabaseVerticle.java b/backend/vertx/src/main/java/net/miarma/contaminus/server/DatabaseVerticle.java index 500a058..cdab45c 100644 --- a/backend/vertx/src/main/java/net/miarma/contaminus/server/DatabaseVerticle.java +++ b/backend/vertx/src/main/java/net/miarma/contaminus/server/DatabaseVerticle.java @@ -29,10 +29,12 @@ public class DatabaseVerticle extends AbstractVerticle { .execute() .onSuccess(_res -> { Constants.LOGGER.info("✅ Database connection ok"); + Constants.LOGGER.info("📡 DatabaseVerticle desplegado"); startPromise.complete(); }) .onFailure(err -> { Constants.LOGGER.error("❌ Database connection failed"); + Constants.LOGGER.error("❌ Error al desplegar DatabaseVerticle", err); startPromise.fail(err); }); diff --git a/backend/vertx/src/main/java/net/miarma/contaminus/server/HttpServerVerticle.java b/backend/vertx/src/main/java/net/miarma/contaminus/server/HttpServerVerticle.java index acb6445..0b9623e 100644 --- a/backend/vertx/src/main/java/net/miarma/contaminus/server/HttpServerVerticle.java +++ b/backend/vertx/src/main/java/net/miarma/contaminus/server/HttpServerVerticle.java @@ -3,15 +3,28 @@ package net.miarma.contaminus.server; import io.vertx.core.AbstractVerticle; import io.vertx.ext.web.Router; import io.vertx.ext.web.handler.StaticHandler; +import net.miarma.contaminus.common.ConfigManager; import net.miarma.contaminus.common.Constants; -public class HttpServerVerticle extends AbstractVerticle { +public class HttpServerVerticle extends AbstractVerticle { + private ConfigManager configManager = ConfigManager.getInstance(); + @Override public void start() { Constants.LOGGER.info("🟢 Iniciando HttpServerVerticle..."); Router router = Router.router(vertx); router.route("/*").handler(StaticHandler.create("webroot").setDefaultContentEncoding("UTF-8")); - vertx.createHttpServer().requestHandler(router).listen(8080); + + vertx.createHttpServer().requestHandler(router).listen( + configManager.getIntProperty("webserver.port"), configManager.getStringProperty("inet.host"), result -> { + if (result.succeeded()) { + Constants.LOGGER.info(String.format("📡 HttpServerVerticle desplegado. (http://%s:%d)", + configManager.getStringProperty("inet.host"), configManager.getIntProperty("api.port")) + ); + } else { + Constants.LOGGER.error("❌ Error al desplegar HttpServerVerticle", result.cause()); + } + }); } diff --git a/backend/vertx/src/main/java/net/miarma/contaminus/server/MainVerticle.java b/backend/vertx/src/main/java/net/miarma/contaminus/server/MainVerticle.java index 7052a69..f2c354e 100644 --- a/backend/vertx/src/main/java/net/miarma/contaminus/server/MainVerticle.java +++ b/backend/vertx/src/main/java/net/miarma/contaminus/server/MainVerticle.java @@ -13,27 +13,9 @@ public class MainVerticle extends AbstractVerticle { final DeploymentOptions options = new DeploymentOptions(); options.setThreadingModel(ThreadingModel.WORKER); - getVertx().deployVerticle(new DatabaseVerticle(), options, result -> { - if(result.succeeded()) { - Constants.LOGGER.info("📡 HttpServerVerticle desplegado.(http://localhost:8080)"); - } else { - Constants.LOGGER.error("❌ Error al desplegar HttpServerVerticle", result.cause()); - } - }); - getVertx().deployVerticle(new ApiVerticle(), options, result -> { - if(result.succeeded()) { - Constants.LOGGER.info("📡 ApiVerticle desplegado. (http://localhost:8081/api/v1)"); - } else { - Constants.LOGGER.error("❌ Error al desplegar ApiVerticle", result.cause()); - } - }); - getVertx().deployVerticle(new HttpServerVerticle(), result -> { - if(result.succeeded()) { - Constants.LOGGER.info("📡 DatabaseVerticle desplegado."); - } else { - Constants.LOGGER.error("❌ Error al desplegar HttpServerVerticle", result.cause()); - } - }); + getVertx().deployVerticle(new DatabaseVerticle(), options); + getVertx().deployVerticle(new ApiVerticle(), options); + getVertx().deployVerticle(new HttpServerVerticle()); } @Override diff --git a/backend/vertx/src/main/resources/default.properties b/backend/vertx/src/main/resources/default.properties index 9326418..0b63564 100644 --- a/backend/vertx/src/main/resources/default.properties +++ b/backend/vertx/src/main/resources/default.properties @@ -1,7 +1,13 @@ +# DB Configuration db.protocol=jdbc:mariadb: db.host=localhost db.port=3306 db.name=dad db.user=root db.pwd=root -dp.poolSize=5 \ No newline at end of file +dp.poolSize=5 + +# Server Configuration +inet.host=localhost +webserver.port=8080 +api.port=8081 diff --git a/backend/vertx/src/main/resources/webroot/assets/index-Ch0_cdBw.js b/backend/vertx/src/main/resources/webroot/assets/index-B9-ngIAm.js similarity index 98% rename from backend/vertx/src/main/resources/webroot/assets/index-Ch0_cdBw.js rename to backend/vertx/src/main/resources/webroot/assets/index-B9-ngIAm.js index 4d194f0..331c890 100644 --- a/backend/vertx/src/main/resources/webroot/assets/index-Ch0_cdBw.js +++ b/backend/vertx/src/main/resources/webroot/assets/index-B9-ngIAm.js @@ -34,7 +34,7 @@ Error generating stack: `+n.message+` * Bootstrap v5.3.3 (https://getbootstrap.com/) * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */var J0=Xc.exports,Km;function F0(){return Km||(Km=1,function(u,r){(function(f,o){u.exports=o()})(J0,function(){const f=new Map,o={set(h,i,c){f.has(h)||f.set(h,new Map);const p=f.get(h);p.has(i)||p.size===0?p.set(i,c):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(p.keys())[0]}.`)},get:(h,i)=>f.has(h)&&f.get(h).get(i)||null,remove(h,i){if(!f.has(h))return;const c=f.get(h);c.delete(i),c.size===0&&f.delete(h)}},m="transitionend",v=h=>(h&&window.CSS&&window.CSS.escape&&(h=h.replace(/#([^\s"#']+)/g,(i,c)=>`#${CSS.escape(c)}`)),h),S=h=>{h.dispatchEvent(new Event(m))},x=h=>!(!h||typeof h!="object")&&(h.jquery!==void 0&&(h=h[0]),h.nodeType!==void 0),N=h=>x(h)?h.jquery?h[0]:h:typeof h=="string"&&h.length>0?document.querySelector(v(h)):null,U=h=>{if(!x(h)||h.getClientRects().length===0)return!1;const i=getComputedStyle(h).getPropertyValue("visibility")==="visible",c=h.closest("details:not([open])");if(!c)return i;if(c!==h){const p=h.closest("summary");if(p&&p.parentNode!==c||p===null)return!1}return i},X=h=>!h||h.nodeType!==Node.ELEMENT_NODE||!!h.classList.contains("disabled")||(h.disabled!==void 0?h.disabled:h.hasAttribute("disabled")&&h.getAttribute("disabled")!=="false"),Z=h=>{if(!document.documentElement.attachShadow)return null;if(typeof h.getRootNode=="function"){const i=h.getRootNode();return i instanceof ShadowRoot?i:null}return h instanceof ShadowRoot?h:h.parentNode?Z(h.parentNode):null},Q=()=>{},tt=h=>{h.offsetHeight},ct=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Et=[],rt=()=>document.documentElement.dir==="rtl",ot=h=>{var i;i=()=>{const c=ct();if(c){const p=h.NAME,b=c.fn[p];c.fn[p]=h.jQueryInterface,c.fn[p].Constructor=h,c.fn[p].noConflict=()=>(c.fn[p]=b,h.jQueryInterface)}},document.readyState==="loading"?(Et.length||document.addEventListener("DOMContentLoaded",()=>{for(const c of Et)c()}),Et.push(i)):i()},it=(h,i=[],c=h)=>typeof h=="function"?h(...i):c,Ct=(h,i,c=!0)=>{if(!c)return void it(h);const p=(D=>{if(!D)return 0;let{transitionDuration:j,transitionDelay:k}=window.getComputedStyle(D);const L=Number.parseFloat(j),q=Number.parseFloat(k);return L||q?(j=j.split(",")[0],k=k.split(",")[0],1e3*(Number.parseFloat(j)+Number.parseFloat(k))):0})(i)+5;let b=!1;const E=({target:D})=>{D===i&&(b=!0,i.removeEventListener(m,E),it(h))};i.addEventListener(m,E),setTimeout(()=>{b||S(i)},p)},ee=(h,i,c,p)=>{const b=h.length;let E=h.indexOf(i);return E===-1?!c&&p?h[b-1]:h[0]:(E+=c?1:-1,p&&(E=(E+b)%b),h[Math.max(0,Math.min(E,b-1))])},ne=/[^.]*(?=\..*)\.|.*/,Re=/\..*/,Kn=/::\d+$/,hn={};let ft=1;const wt={mouseenter:"mouseover",mouseleave:"mouseout"},zn=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Ia(h,i){return i&&`${i}::${ft++}`||h.uidEvent||ft++}function $n(h){const i=Ia(h);return h.uidEvent=i,hn[i]=hn[i]||{},hn[i]}function Jn(h,i,c=null){return Object.values(h).find(p=>p.callable===i&&p.delegationSelector===c)}function Fn(h,i,c){const p=typeof i=="string",b=p?c:i||c;let E=Ht(h);return zn.has(E)||(E=h),[p,b,E]}function V(h,i,c,p,b){if(typeof i!="string"||!h)return;let[E,D,j]=Fn(i,c,p);i in wt&&(D=(at=>function(lt){if(!lt.relatedTarget||lt.relatedTarget!==lt.delegateTarget&&!lt.delegateTarget.contains(lt.relatedTarget))return at.call(this,lt)})(D));const k=$n(h),L=k[j]||(k[j]={}),q=Jn(L,D,E?c:null);if(q)return void(q.oneOff=q.oneOff&&b);const B=Ia(D,i.replace(ne,"")),ht=E?function(et,at,lt){return function st(Tt){const Lt=et.querySelectorAll(at);for(let{target:W}=Tt;W&&W!==this;W=W.parentNode)for(const Ot of Lt)if(Ot===W)return Wn(Tt,{delegateTarget:W}),st.oneOff&&w.off(et,Tt.type,at,lt),lt.apply(W,[Tt])}}(h,c,D):function(et,at){return function lt(st){return Wn(st,{delegateTarget:et}),lt.oneOff&&w.off(et,st.type,at),at.apply(et,[st])}}(h,D);ht.delegationSelector=E?c:null,ht.callable=D,ht.oneOff=b,ht.uidEvent=B,L[B]=ht,h.addEventListener(j,ht,E)}function mt(h,i,c,p,b){const E=Jn(i[c],p,b);E&&(h.removeEventListener(c,E,!!b),delete i[c][E.uidEvent])}function dt(h,i,c,p){const b=i[c]||{};for(const[E,D]of Object.entries(b))E.includes(p)&&mt(h,i,c,D.callable,D.delegationSelector)}function Ht(h){return h=h.replace(Re,""),wt[h]||h}const w={on(h,i,c,p){V(h,i,c,p,!1)},one(h,i,c,p){V(h,i,c,p,!0)},off(h,i,c,p){if(typeof i!="string"||!h)return;const[b,E,D]=Fn(i,c,p),j=D!==i,k=$n(h),L=k[D]||{},q=i.startsWith(".");if(E===void 0){if(q)for(const B of Object.keys(k))dt(h,k,B,i.slice(1));for(const[B,ht]of Object.entries(L)){const et=B.replace(Kn,"");j&&!i.includes(et)||mt(h,k,D,ht.callable,ht.delegationSelector)}}else{if(!Object.keys(L).length)return;mt(h,k,D,E,b?c:null)}},trigger(h,i,c){if(typeof i!="string"||!h)return null;const p=ct();let b=null,E=!0,D=!0,j=!1;i!==Ht(i)&&p&&(b=p.Event(i,c),p(h).trigger(b),E=!b.isPropagationStopped(),D=!b.isImmediatePropagationStopped(),j=b.isDefaultPrevented());const k=Wn(new Event(i,{bubbles:E,cancelable:!0}),c);return j&&k.preventDefault(),D&&h.dispatchEvent(k),k.defaultPrevented&&b&&b.preventDefault(),k}};function Wn(h,i={}){for(const[c,p]of Object.entries(i))try{h[c]=p}catch{Object.defineProperty(h,c,{configurable:!0,get:()=>p})}return h}function Pn(h){if(h==="true")return!0;if(h==="false")return!1;if(h===Number(h).toString())return Number(h);if(h===""||h==="null")return null;if(typeof h!="string")return h;try{return JSON.parse(decodeURIComponent(h))}catch{return h}}function Ie(h){return h.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}const vt={setDataAttribute(h,i,c){h.setAttribute(`data-bs-${Ie(i)}`,c)},removeDataAttribute(h,i){h.removeAttribute(`data-bs-${Ie(i)}`)},getDataAttributes(h){if(!h)return{};const i={},c=Object.keys(h.dataset).filter(p=>p.startsWith("bs")&&!p.startsWith("bsConfig"));for(const p of c){let b=p.replace(/^bs/,"");b=b.charAt(0).toLowerCase()+b.slice(1,b.length),i[b]=Pn(h.dataset[p])}return i},getDataAttribute:(h,i)=>Pn(h.getAttribute(`data-bs-${Ie(i)}`))};class oe{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(i){return i=this._mergeConfigObj(i),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}_configAfterMerge(i){return i}_mergeConfigObj(i,c){const p=x(c)?vt.getDataAttribute(c,"config"):{};return{...this.constructor.Default,...typeof p=="object"?p:{},...x(c)?vt.getDataAttributes(c):{},...typeof i=="object"?i:{}}}_typeCheckConfig(i,c=this.constructor.DefaultType){for(const[b,E]of Object.entries(c)){const D=i[b],j=x(D)?"element":(p=D)==null?`${p}`:Object.prototype.toString.call(p).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(E).test(j))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${b}" provided type "${j}" but expected type "${E}".`)}var p}}class je extends oe{constructor(i,c){super(),(i=N(i))&&(this._element=i,this._config=this._getConfig(c),o.set(this._element,this.constructor.DATA_KEY,this))}dispose(){o.remove(this._element,this.constructor.DATA_KEY),w.off(this._element,this.constructor.EVENT_KEY);for(const i of Object.getOwnPropertyNames(this))this[i]=null}_queueCallback(i,c,p=!0){Ct(i,c,p)}_getConfig(i){return i=this._mergeConfigObj(i,this._element),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}static getInstance(i){return o.get(N(i),this.DATA_KEY)}static getOrCreateInstance(i,c={}){return this.getInstance(i)||new this(i,typeof c=="object"?c:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(i){return`${i}${this.EVENT_KEY}`}}const In=h=>{let i=h.getAttribute("data-bs-target");if(!i||i==="#"){let c=h.getAttribute("href");if(!c||!c.includes("#")&&!c.startsWith("."))return null;c.includes("#")&&!c.startsWith("#")&&(c=`#${c.split("#")[1]}`),i=c&&c!=="#"?c.trim():null}return i?i.split(",").map(c=>v(c)).join(","):null},$={find:(h,i=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(i,h)),findOne:(h,i=document.documentElement)=>Element.prototype.querySelector.call(i,h),children:(h,i)=>[].concat(...h.children).filter(c=>c.matches(i)),parents(h,i){const c=[];let p=h.parentNode.closest(i);for(;p;)c.push(p),p=p.parentNode.closest(i);return c},prev(h,i){let c=h.previousElementSibling;for(;c;){if(c.matches(i))return[c];c=c.previousElementSibling}return[]},next(h,i){let c=h.nextElementSibling;for(;c;){if(c.matches(i))return[c];c=c.nextElementSibling}return[]},focusableChildren(h){const i=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(c=>`${c}:not([tabindex^="-"])`).join(",");return this.find(i,h).filter(c=>!X(c)&&U(c))},getSelectorFromElement(h){const i=In(h);return i&&$.findOne(i)?i:null},getElementFromSelector(h){const i=In(h);return i?$.findOne(i):null},getMultipleElementsFromSelector(h){const i=In(h);return i?$.find(i):[]}},Kt=(h,i="hide")=>{const c=`click.dismiss${h.EVENT_KEY}`,p=h.NAME;w.on(document,c,`[data-bs-dismiss="${p}"]`,function(b){if(["A","AREA"].includes(this.tagName)&&b.preventDefault(),X(this))return;const E=$.getElementFromSelector(this)||this.closest(`.${p}`);h.getOrCreateInstance(E)[i]()})},qt=".bs.alert",mn=`close${qt}`,Vl=`closed${qt}`;class Ve extends je{static get NAME(){return"alert"}close(){if(w.trigger(this._element,mn).defaultPrevented)return;this._element.classList.remove("show");const i=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,i)}_destroyElement(){this._element.remove(),w.trigger(this._element,Vl),this.dispose()}static jQueryInterface(i){return this.each(function(){const c=Ve.getOrCreateInstance(this);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i](this)}})}}Kt(Ve,"close"),ot(Ve);const Zl='[data-bs-toggle="button"]';class ta extends je{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(i){return this.each(function(){const c=ta.getOrCreateInstance(this);i==="toggle"&&c[i]()})}}w.on(document,"click.bs.button.data-api",Zl,h=>{h.preventDefault();const i=h.target.closest(Zl);ta.getOrCreateInstance(i).toggle()}),ot(ta);const tn=".bs.swipe",ks=`touchstart${tn}`,Ui=`touchmove${tn}`,Xs=`touchend${tn}`,Gs=`pointerdown${tn}`,Qs=`pointerup${tn}`,ao={endCallback:null,leftCallback:null,rightCallback:null},lo={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Le extends oe{constructor(i,c){super(),this._element=i,i&&Le.isSupported()&&(this._config=this._getConfig(c),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return ao}static get DefaultType(){return lo}static get NAME(){return"swipe"}dispose(){w.off(this._element,tn)}_start(i){this._supportPointerEvents?this._eventIsPointerPenTouch(i)&&(this._deltaX=i.clientX):this._deltaX=i.touches[0].clientX}_end(i){this._eventIsPointerPenTouch(i)&&(this._deltaX=i.clientX-this._deltaX),this._handleSwipe(),it(this._config.endCallback)}_move(i){this._deltaX=i.touches&&i.touches.length>1?0:i.touches[0].clientX-this._deltaX}_handleSwipe(){const i=Math.abs(this._deltaX);if(i<=40)return;const c=i/this._deltaX;this._deltaX=0,c&&it(c>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(w.on(this._element,Gs,i=>this._start(i)),w.on(this._element,Qs,i=>this._end(i)),this._element.classList.add("pointer-event")):(w.on(this._element,ks,i=>this._start(i)),w.on(this._element,Ui,i=>this._move(i)),w.on(this._element,Xs,i=>this._end(i)))}_eventIsPointerPenTouch(i){return this._supportPointerEvents&&(i.pointerType==="pen"||i.pointerType==="touch")}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ea=".bs.carousel",Vs=".data-api",tl="next",Nn="prev",el="left",Kl="right",io=`slide${ea}`,Zs=`slid${ea}`,$l=`keydown${ea}`,Ue=`mouseenter${ea}`,so=`mouseleave${ea}`,na=`dragstart${ea}`,He=`load${ea}${Vs}`,uo=`click${ea}${Vs}`,vr="carousel",Hi="active",Jl=".active",Fl=".carousel-item",Ea=Jl+Fl,qi={ArrowLeft:Kl,ArrowRight:el},Wl={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ro={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ta extends je{constructor(i,c){super(i,c),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=$.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===vr&&this.cycle()}static get Default(){return Wl}static get DefaultType(){return ro}static get NAME(){return"carousel"}next(){this._slide(tl)}nextWhenVisible(){!document.hidden&&U(this._element)&&this.next()}prev(){this._slide(Nn)}pause(){this._isSliding&&S(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?w.one(this._element,Zs,()=>this.cycle()):this.cycle())}to(i){const c=this._getItems();if(i>c.length-1||i<0)return;if(this._isSliding)return void w.one(this._element,Zs,()=>this.to(i));const p=this._getItemIndex(this._getActive());if(p===i)return;const b=i>p?tl:Nn;this._slide(b,c[i])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(i){return i.defaultInterval=i.interval,i}_addEventListeners(){this._config.keyboard&&w.on(this._element,$l,i=>this._keydown(i)),this._config.pause==="hover"&&(w.on(this._element,Ue,()=>this.pause()),w.on(this._element,so,()=>this._maybeEnableCycle())),this._config.touch&&Le.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const c of $.find(".carousel-item img",this._element))w.on(c,na,p=>p.preventDefault());const i={leftCallback:()=>this._slide(this._directionToOrder(el)),rightCallback:()=>this._slide(this._directionToOrder(Kl)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new Le(this._element,i)}_keydown(i){if(/input|textarea/i.test(i.target.tagName))return;const c=qi[i.key];c&&(i.preventDefault(),this._slide(this._directionToOrder(c)))}_getItemIndex(i){return this._getItems().indexOf(i)}_setActiveIndicatorElement(i){if(!this._indicatorsElement)return;const c=$.findOne(Jl,this._indicatorsElement);c.classList.remove(Hi),c.removeAttribute("aria-current");const p=$.findOne(`[data-bs-slide-to="${i}"]`,this._indicatorsElement);p&&(p.classList.add(Hi),p.setAttribute("aria-current","true"))}_updateInterval(){const i=this._activeElement||this._getActive();if(!i)return;const c=Number.parseInt(i.getAttribute("data-bs-interval"),10);this._config.interval=c||this._config.defaultInterval}_slide(i,c=null){if(this._isSliding)return;const p=this._getActive(),b=i===tl,E=c||ee(this._getItems(),p,b,this._config.wrap);if(E===p)return;const D=this._getItemIndex(E),j=B=>w.trigger(this._element,B,{relatedTarget:E,direction:this._orderToDirection(i),from:this._getItemIndex(p),to:D});if(j(io).defaultPrevented||!p||!E)return;const k=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(D),this._activeElement=E;const L=b?"carousel-item-start":"carousel-item-end",q=b?"carousel-item-next":"carousel-item-prev";E.classList.add(q),tt(E),p.classList.add(L),E.classList.add(L),this._queueCallback(()=>{E.classList.remove(L,q),E.classList.add(Hi),p.classList.remove(Hi,q,L),this._isSliding=!1,j(Zs)},p,this._isAnimated()),k&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return $.findOne(Ea,this._element)}_getItems(){return $.find(Fl,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(i){return rt()?i===el?Nn:tl:i===el?tl:Nn}_orderToDirection(i){return rt()?i===Nn?el:Kl:i===Nn?Kl:el}static jQueryInterface(i){return this.each(function(){const c=Ta.getOrCreateInstance(this,i);if(typeof i!="number"){if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i]()}}else c.to(i)})}}w.on(document,uo,"[data-bs-slide], [data-bs-slide-to]",function(h){const i=$.getElementFromSelector(this);if(!i||!i.classList.contains(vr))return;h.preventDefault();const c=Ta.getOrCreateInstance(i),p=this.getAttribute("data-bs-slide-to");return p?(c.to(p),void c._maybeEnableCycle()):vt.getDataAttribute(this,"slide")==="next"?(c.next(),void c._maybeEnableCycle()):(c.prev(),void c._maybeEnableCycle())}),w.on(window,He,()=>{const h=$.find('[data-bs-ride="carousel"]');for(const i of h)Ta.getOrCreateInstance(i)}),ot(Ta);const nl=".bs.collapse",Ks=`show${nl}`,Pl=`shown${nl}`,co=`hide${nl}`,yr=`hidden${nl}`,br=`click${nl}.data-api`,Bi="show",Oa="collapse",Yi="collapsing",aa=`:scope .${Oa} .${Oa}`,se='[data-bs-toggle="collapse"]',xe={parent:null,toggle:!0},al={parent:"(null|element)",toggle:"boolean"};class la extends je{constructor(i,c){super(i,c),this._isTransitioning=!1,this._triggerArray=[];const p=$.find(se);for(const b of p){const E=$.getSelectorFromElement(b),D=$.find(E).filter(j=>j===this._element);E!==null&&D.length&&this._triggerArray.push(b)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return xe}static get DefaultType(){return al}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let i=[];if(this._config.parent&&(i=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(b=>b!==this._element).map(b=>la.getOrCreateInstance(b,{toggle:!1}))),i.length&&i[0]._isTransitioning||w.trigger(this._element,Ks).defaultPrevented)return;for(const b of i)b.hide();const c=this._getDimension();this._element.classList.remove(Oa),this._element.classList.add(Yi),this._element.style[c]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const p=`scroll${c[0].toUpperCase()+c.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Yi),this._element.classList.add(Oa,Bi),this._element.style[c]="",w.trigger(this._element,Pl)},this._element,!0),this._element.style[c]=`${this._element[p]}px`}hide(){if(this._isTransitioning||!this._isShown()||w.trigger(this._element,co).defaultPrevented)return;const i=this._getDimension();this._element.style[i]=`${this._element.getBoundingClientRect()[i]}px`,tt(this._element),this._element.classList.add(Yi),this._element.classList.remove(Oa,Bi);for(const c of this._triggerArray){const p=$.getElementFromSelector(c);p&&!this._isShown(p)&&this._addAriaAndCollapsedClass([c],!1)}this._isTransitioning=!0,this._element.style[i]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Yi),this._element.classList.add(Oa),w.trigger(this._element,yr)},this._element,!0)}_isShown(i=this._element){return i.classList.contains(Bi)}_configAfterMerge(i){return i.toggle=!!i.toggle,i.parent=N(i.parent),i}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const i=this._getFirstLevelChildren(se);for(const c of i){const p=$.getElementFromSelector(c);p&&this._addAriaAndCollapsedClass([c],this._isShown(p))}}_getFirstLevelChildren(i){const c=$.find(aa,this._config.parent);return $.find(i,this._config.parent).filter(p=>!c.includes(p))}_addAriaAndCollapsedClass(i,c){if(i.length)for(const p of i)p.classList.toggle("collapsed",!c),p.setAttribute("aria-expanded",c)}static jQueryInterface(i){const c={};return typeof i=="string"&&/show|hide/.test(i)&&(c.toggle=!1),this.each(function(){const p=la.getOrCreateInstance(this,c);if(typeof i=="string"){if(p[i]===void 0)throw new TypeError(`No method named "${i}"`);p[i]()}})}}w.on(document,br,se,function(h){(h.target.tagName==="A"||h.delegateTarget&&h.delegateTarget.tagName==="A")&&h.preventDefault();for(const i of $.getMultipleElementsFromSelector(this))la.getOrCreateInstance(i,{toggle:!1}).toggle()}),ot(la);var ye="top",qe="bottom",Ce="right",ae="left",ll="auto",Ze=[ye,qe,Ce,ae],Ke="start",gn="end",xa="clippingParents",Ft="viewport",Ca="popper",$s="reference",Rn=Ze.reduce(function(h,i){return h.concat([i+"-"+Ke,i+"-"+gn])},[]),ia=[].concat(Ze,[ll]).reduce(function(h,i){return h.concat([i,i+"-"+Ke,i+"-"+gn])},[]),pn="beforeRead",_r="read",Js="afterRead",Fs="beforeMain",Sr="main",Il="afterMain",ti="beforeWrite",vn="write",Be="afterWrite",Ws=[pn,_r,Js,Fs,Sr,Il,ti,vn,Be];function yn(h){return h?(h.nodeName||"").toLowerCase():null}function fe(h){if(h==null)return window;if(h.toString()!=="[object Window]"){var i=h.ownerDocument;return i&&i.defaultView||window}return h}function sa(h){return h instanceof fe(h).Element||h instanceof Element}function be(h){return h instanceof fe(h).HTMLElement||h instanceof HTMLElement}function Ps(h){return typeof ShadowRoot<"u"&&(h instanceof fe(h).ShadowRoot||h instanceof ShadowRoot)}const De={name:"applyStyles",enabled:!0,phase:"write",fn:function(h){var i=h.state;Object.keys(i.elements).forEach(function(c){var p=i.styles[c]||{},b=i.attributes[c]||{},E=i.elements[c];be(E)&&yn(E)&&(Object.assign(E.style,p),Object.keys(b).forEach(function(D){var j=b[D];j===!1?E.removeAttribute(D):E.setAttribute(D,j===!0?"":j)}))})},effect:function(h){var i=h.state,c={popper:{position:i.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(i.elements.popper.style,c.popper),i.styles=c,i.elements.arrow&&Object.assign(i.elements.arrow.style,c.arrow),function(){Object.keys(i.elements).forEach(function(p){var b=i.elements[p],E=i.attributes[p]||{},D=Object.keys(i.styles.hasOwnProperty(p)?i.styles[p]:c[p]).reduce(function(j,k){return j[k]="",j},{});be(b)&&yn(b)&&(Object.assign(b.style,D),Object.keys(E).forEach(function(j){b.removeAttribute(j)}))})}},requires:["computeStyles"]};function $e(h){return h.split("-")[0]}var ua=Math.max,il=Math.min,en=Math.round;function ki(){var h=navigator.userAgentData;return h!=null&&h.brands&&Array.isArray(h.brands)?h.brands.map(function(i){return i.brand+"/"+i.version}).join(" "):navigator.userAgent}function Is(){return!/^((?!chrome|android).)*safari/i.test(ki())}function nn(h,i,c){i===void 0&&(i=!1),c===void 0&&(c=!1);var p=h.getBoundingClientRect(),b=1,E=1;i&&be(h)&&(b=h.offsetWidth>0&&en(p.width)/h.offsetWidth||1,E=h.offsetHeight>0&&en(p.height)/h.offsetHeight||1);var D=(sa(h)?fe(h):window).visualViewport,j=!Is()&&c,k=(p.left+(j&&D?D.offsetLeft:0))/b,L=(p.top+(j&&D?D.offsetTop:0))/E,q=p.width/b,B=p.height/E;return{width:q,height:B,top:L,right:k+q,bottom:L+B,left:k,x:k,y:L}}function tu(h){var i=nn(h),c=h.offsetWidth,p=h.offsetHeight;return Math.abs(i.width-c)<=1&&(c=i.width),Math.abs(i.height-p)<=1&&(p=i.height),{x:h.offsetLeft,y:h.offsetTop,width:c,height:p}}function eu(h,i){var c=i.getRootNode&&i.getRootNode();if(h.contains(i))return!0;if(c&&Ps(c)){var p=i;do{if(p&&h.isSameNode(p))return!0;p=p.parentNode||p.host}while(p)}return!1}function bn(h){return fe(h).getComputedStyle(h)}function nu(h){return["table","td","th"].indexOf(yn(h))>=0}function ra(h){return((sa(h)?h.ownerDocument:h.document)||window.document).documentElement}function Xi(h){return yn(h)==="html"?h:h.assignedSlot||h.parentNode||(Ps(h)?h.host:null)||ra(h)}function ei(h){return be(h)&&bn(h).position!=="fixed"?h.offsetParent:null}function Da(h){for(var i=fe(h),c=ei(h);c&&nu(c)&&bn(c).position==="static";)c=ei(c);return c&&(yn(c)==="html"||yn(c)==="body"&&bn(c).position==="static")?i:c||function(p){var b=/firefox/i.test(ki());if(/Trident/i.test(ki())&&be(p)&&bn(p).position==="fixed")return null;var E=Xi(p);for(Ps(E)&&(E=E.host);be(E)&&["html","body"].indexOf(yn(E))<0;){var D=bn(E);if(D.transform!=="none"||D.perspective!=="none"||D.contain==="paint"||["transform","perspective"].indexOf(D.willChange)!==-1||b&&D.willChange==="filter"||b&&D.filter&&D.filter!=="none")return E;E=E.parentNode}return null}(h)||i}function ni(h){return["top","bottom"].indexOf(h)>=0?"x":"y"}function _n(h,i,c){return ua(h,il(i,c))}function Ma(h){return Object.assign({},{top:0,right:0,bottom:0,left:0},h)}function au(h,i){return i.reduce(function(c,p){return c[p]=h,c},{})}const Gi={name:"arrow",enabled:!0,phase:"main",fn:function(h){var i,c=h.state,p=h.name,b=h.options,E=c.elements.arrow,D=c.modifiersData.popperOffsets,j=$e(c.placement),k=ni(j),L=[ae,Ce].indexOf(j)>=0?"height":"width";if(E&&D){var q=function(jt,Mt){return Ma(typeof(jt=typeof jt=="function"?jt(Object.assign({},Mt.rects,{placement:Mt.placement})):jt)!="number"?jt:au(jt,Ze))}(b.padding,c),B=tu(E),ht=k==="y"?ye:ae,et=k==="y"?qe:Ce,at=c.rects.reference[L]+c.rects.reference[k]-D[k]-c.rects.popper[L],lt=D[k]-c.rects.reference[k],st=Da(E),Tt=st?k==="y"?st.clientHeight||0:st.clientWidth||0:0,Lt=at/2-lt/2,W=q[ht],Ot=Tt-B[L]-q[et],gt=Tt/2-B[L]/2+Lt,yt=_n(W,gt,Ot),zt=k;c.modifiersData[p]=((i={})[zt]=yt,i.centerOffset=yt-gt,i)}},effect:function(h){var i=h.state,c=h.options.element,p=c===void 0?"[data-popper-arrow]":c;p!=null&&(typeof p!="string"||(p=i.elements.popper.querySelector(p)))&&eu(i.elements.popper,p)&&(i.elements.arrow=p)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wa(h){return h.split("-")[1]}var ai={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Qi(h){var i,c=h.popper,p=h.popperRect,b=h.placement,E=h.variation,D=h.offsets,j=h.position,k=h.gpuAcceleration,L=h.adaptive,q=h.roundOffsets,B=h.isFixed,ht=D.x,et=ht===void 0?0:ht,at=D.y,lt=at===void 0?0:at,st=typeof q=="function"?q({x:et,y:lt}):{x:et,y:lt};et=st.x,lt=st.y;var Tt=D.hasOwnProperty("x"),Lt=D.hasOwnProperty("y"),W=ae,Ot=ye,gt=window;if(L){var yt=Da(c),zt="clientHeight",jt="clientWidth";yt===fe(c)&&bn(yt=ra(c)).position!=="static"&&j==="absolute"&&(zt="scrollHeight",jt="scrollWidth"),(b===ye||(b===ae||b===Ce)&&E===gn)&&(Ot=qe,lt-=(B&&yt===gt&>.visualViewport?gt.visualViewport.height:yt[zt])-p.height,lt*=k?1:-1),b!==ae&&(b!==ye&&b!==qe||E!==gn)||(W=Ce,et-=(B&&yt===gt&>.visualViewport?gt.visualViewport.width:yt[jt])-p.width,et*=k?1:-1)}var Mt,Vt=Object.assign({position:j},L&&ai),Ae=q===!0?function(Xt,At){var Ee=Xt.x,he=Xt.y,Bt=At.devicePixelRatio||1;return{x:en(Ee*Bt)/Bt||0,y:en(he*Bt)/Bt||0}}({x:et,y:lt},fe(c)):{x:et,y:lt};return et=Ae.x,lt=Ae.y,k?Object.assign({},Vt,((Mt={})[Ot]=Lt?"0":"",Mt[W]=Tt?"0":"",Mt.transform=(gt.devicePixelRatio||1)<=1?"translate("+et+"px, "+lt+"px)":"translate3d("+et+"px, "+lt+"px, 0)",Mt)):Object.assign({},Vt,((i={})[Ot]=Lt?lt+"px":"",i[W]=Tt?et+"px":"",i.transform="",i))}const za={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(h){var i=h.state,c=h.options,p=c.gpuAcceleration,b=p===void 0||p,E=c.adaptive,D=E===void 0||E,j=c.roundOffsets,k=j===void 0||j,L={placement:$e(i.placement),variation:wa(i.placement),popper:i.elements.popper,popperRect:i.rects.popper,gpuAcceleration:b,isFixed:i.options.strategy==="fixed"};i.modifiersData.popperOffsets!=null&&(i.styles.popper=Object.assign({},i.styles.popper,Qi(Object.assign({},L,{offsets:i.modifiersData.popperOffsets,position:i.options.strategy,adaptive:D,roundOffsets:k})))),i.modifiersData.arrow!=null&&(i.styles.arrow=Object.assign({},i.styles.arrow,Qi(Object.assign({},L,{offsets:i.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:k})))),i.attributes.popper=Object.assign({},i.attributes.popper,{"data-popper-placement":i.placement})},data:{}};var an={passive:!0};const li={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(h){var i=h.state,c=h.instance,p=h.options,b=p.scroll,E=b===void 0||b,D=p.resize,j=D===void 0||D,k=fe(i.elements.popper),L=[].concat(i.scrollParents.reference,i.scrollParents.popper);return E&&L.forEach(function(q){q.addEventListener("scroll",c.update,an)}),j&&k.addEventListener("resize",c.update,an),function(){E&&L.forEach(function(q){q.removeEventListener("scroll",c.update,an)}),j&&k.removeEventListener("resize",c.update,an)}},data:{}};var Vi={left:"right",right:"left",bottom:"top",top:"bottom"};function ii(h){return h.replace(/left|right|bottom|top/g,function(i){return Vi[i]})}var Zi={start:"end",end:"start"};function si(h){return h.replace(/start|end/g,function(i){return Zi[i]})}function Ki(h){var i=fe(h);return{scrollLeft:i.pageXOffset,scrollTop:i.pageYOffset}}function de(h){return nn(ra(h)).left+Ki(h).scrollLeft}function jn(h){var i=bn(h),c=i.overflow,p=i.overflowX,b=i.overflowY;return/auto|scroll|overlay|hidden/.test(c+b+p)}function ui(h){return["html","body","#document"].indexOf(yn(h))>=0?h.ownerDocument.body:be(h)&&jn(h)?h:ui(Xi(h))}function Ln(h,i){var c;i===void 0&&(i=[]);var p=ui(h),b=p===((c=h.ownerDocument)==null?void 0:c.body),E=fe(p),D=b?[E].concat(E.visualViewport||[],jn(p)?p:[]):p,j=i.concat(D);return b?j:j.concat(Ln(Xi(D)))}function lu(h){return Object.assign({},h,{left:h.x,top:h.y,right:h.x+h.width,bottom:h.y+h.height})}function $i(h,i,c){return i===Ft?lu(function(p,b){var E=fe(p),D=ra(p),j=E.visualViewport,k=D.clientWidth,L=D.clientHeight,q=0,B=0;if(j){k=j.width,L=j.height;var ht=Is();(ht||!ht&&b==="fixed")&&(q=j.offsetLeft,B=j.offsetTop)}return{width:k,height:L,x:q+de(p),y:B}}(h,c)):sa(i)?function(p,b){var E=nn(p,!1,b==="fixed");return E.top=E.top+p.clientTop,E.left=E.left+p.clientLeft,E.bottom=E.top+p.clientHeight,E.right=E.left+p.clientWidth,E.width=p.clientWidth,E.height=p.clientHeight,E.x=E.left,E.y=E.top,E}(i,c):lu(function(p){var b,E=ra(p),D=Ki(p),j=(b=p.ownerDocument)==null?void 0:b.body,k=ua(E.scrollWidth,E.clientWidth,j?j.scrollWidth:0,j?j.clientWidth:0),L=ua(E.scrollHeight,E.clientHeight,j?j.scrollHeight:0,j?j.clientHeight:0),q=-D.scrollLeft+de(p),B=-D.scrollTop;return bn(j||E).direction==="rtl"&&(q+=ua(E.clientWidth,j?j.clientWidth:0)-k),{width:k,height:L,x:q,y:B}}(ra(h)))}function Ji(h){var i,c=h.reference,p=h.element,b=h.placement,E=b?$e(b):null,D=b?wa(b):null,j=c.x+c.width/2-p.width/2,k=c.y+c.height/2-p.height/2;switch(E){case ye:i={x:j,y:c.y-p.height};break;case qe:i={x:j,y:c.y+c.height};break;case Ce:i={x:c.x+c.width,y:k};break;case ae:i={x:c.x-p.width,y:k};break;default:i={x:c.x,y:c.y}}var L=E?ni(E):null;if(L!=null){var q=L==="y"?"height":"width";switch(D){case Ke:i[L]=i[L]-(c[q]/2-p[q]/2);break;case gn:i[L]=i[L]+(c[q]/2-p[q]/2)}}return i}function Sn(h,i){i===void 0&&(i={});var c=i,p=c.placement,b=p===void 0?h.placement:p,E=c.strategy,D=E===void 0?h.strategy:E,j=c.boundary,k=j===void 0?xa:j,L=c.rootBoundary,q=L===void 0?Ft:L,B=c.elementContext,ht=B===void 0?Ca:B,et=c.altBoundary,at=et!==void 0&&et,lt=c.padding,st=lt===void 0?0:lt,Tt=Ma(typeof st!="number"?st:au(st,Ze)),Lt=ht===Ca?$s:Ca,W=h.rects.popper,Ot=h.elements[at?Lt:ht],gt=function(At,Ee,he,Bt){var Pe=Ee==="clippingParents"?function(Rt){var me=Ln(Xi(Rt)),Ge=["absolute","fixed"].indexOf(bn(Rt).position)>=0&&be(Rt)?Da(Rt):Rt;return sa(Ge)?me.filter(function(Qn){return sa(Qn)&&eu(Qn,Ge)&&yn(Qn)!=="body"}):[]}(At):[].concat(Ee),ue=[].concat(Pe,[he]),Gn=ue[0],Wt=ue.reduce(function(Rt,me){var Ge=$i(At,me,Bt);return Rt.top=ua(Ge.top,Rt.top),Rt.right=il(Ge.right,Rt.right),Rt.bottom=il(Ge.bottom,Rt.bottom),Rt.left=ua(Ge.left,Rt.left),Rt},$i(At,Gn,Bt));return Wt.width=Wt.right-Wt.left,Wt.height=Wt.bottom-Wt.top,Wt.x=Wt.left,Wt.y=Wt.top,Wt}(sa(Ot)?Ot:Ot.contextElement||ra(h.elements.popper),k,q,D),yt=nn(h.elements.reference),zt=Ji({reference:yt,element:W,placement:b}),jt=lu(Object.assign({},W,zt)),Mt=ht===Ca?jt:yt,Vt={top:gt.top-Mt.top+Tt.top,bottom:Mt.bottom-gt.bottom+Tt.bottom,left:gt.left-Mt.left+Tt.left,right:Mt.right-gt.right+Tt.right},Ae=h.modifiersData.offset;if(ht===Ca&&Ae){var Xt=Ae[b];Object.keys(Vt).forEach(function(At){var Ee=[Ce,qe].indexOf(At)>=0?1:-1,he=[ye,qe].indexOf(At)>=0?"y":"x";Vt[At]+=Xt[he]*Ee})}return Vt}function Fi(h,i){i===void 0&&(i={});var c=i,p=c.placement,b=c.boundary,E=c.rootBoundary,D=c.padding,j=c.flipVariations,k=c.allowedAutoPlacements,L=k===void 0?ia:k,q=wa(p),B=q?j?Rn:Rn.filter(function(at){return wa(at)===q}):Ze,ht=B.filter(function(at){return L.indexOf(at)>=0});ht.length===0&&(ht=B);var et=ht.reduce(function(at,lt){return at[lt]=Sn(h,{placement:lt,boundary:b,rootBoundary:E,padding:D})[$e(lt)],at},{});return Object.keys(et).sort(function(at,lt){return et[at]-et[lt]})}const iu={name:"flip",enabled:!0,phase:"main",fn:function(h){var i=h.state,c=h.options,p=h.name;if(!i.modifiersData[p]._skip){for(var b=c.mainAxis,E=b===void 0||b,D=c.altAxis,j=D===void 0||D,k=c.fallbackPlacements,L=c.padding,q=c.boundary,B=c.rootBoundary,ht=c.altBoundary,et=c.flipVariations,at=et===void 0||et,lt=c.allowedAutoPlacements,st=i.options.placement,Tt=$e(st),Lt=k||(Tt!==st&&at?function(Rt){if($e(Rt)===ll)return[];var me=ii(Rt);return[si(Rt),me,si(me)]}(st):[ii(st)]),W=[st].concat(Lt).reduce(function(Rt,me){return Rt.concat($e(me)===ll?Fi(i,{placement:me,boundary:q,rootBoundary:B,padding:L,flipVariations:at,allowedAutoPlacements:lt}):me)},[]),Ot=i.rects.reference,gt=i.rects.popper,yt=new Map,zt=!0,jt=W[0],Mt=0;Mt=0,Ee=At?"width":"height",he=Sn(i,{placement:Vt,boundary:q,rootBoundary:B,altBoundary:ht,padding:L}),Bt=At?Xt?Ce:ae:Xt?qe:ye;Ot[Ee]>gt[Ee]&&(Bt=ii(Bt));var Pe=ii(Bt),ue=[];if(E&&ue.push(he[Ae]<=0),j&&ue.push(he[Bt]<=0,he[Pe]<=0),ue.every(function(Rt){return Rt})){jt=Vt,zt=!1;break}yt.set(Vt,ue)}if(zt)for(var Gn=function(Rt){var me=W.find(function(Ge){var Qn=yt.get(Ge);if(Qn)return Qn.slice(0,Rt).every(function(bi){return bi})});if(me)return jt=me,"break"},Wt=at?3:1;Wt>0&&Gn(Wt)!=="break";Wt--);i.placement!==jt&&(i.modifiersData[p]._skip=!0,i.placement=jt,i.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ar(h,i,c){return c===void 0&&(c={x:0,y:0}),{top:h.top-i.height-c.y,right:h.right-i.width+c.x,bottom:h.bottom-i.height+c.y,left:h.left-i.width-c.x}}function Er(h){return[ye,Ce,qe,ae].some(function(i){return h[i]>=0})}const Tr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(h){var i=h.state,c=h.name,p=i.rects.reference,b=i.rects.popper,E=i.modifiersData.preventOverflow,D=Sn(i,{elementContext:"reference"}),j=Sn(i,{altBoundary:!0}),k=Ar(D,p),L=Ar(j,b,E),q=Er(k),B=Er(L);i.modifiersData[c]={referenceClippingOffsets:k,popperEscapeOffsets:L,isReferenceHidden:q,hasPopperEscaped:B},i.attributes.popper=Object.assign({},i.attributes.popper,{"data-popper-reference-hidden":q,"data-popper-escaped":B})}},Wi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(h){var i=h.state,c=h.options,p=h.name,b=c.offset,E=b===void 0?[0,0]:b,D=ia.reduce(function(q,B){return q[B]=function(ht,et,at){var lt=$e(ht),st=[ae,ye].indexOf(lt)>=0?-1:1,Tt=typeof at=="function"?at(Object.assign({},et,{placement:ht})):at,Lt=Tt[0],W=Tt[1];return Lt=Lt||0,W=(W||0)*st,[ae,Ce].indexOf(lt)>=0?{x:W,y:Lt}:{x:Lt,y:W}}(B,i.rects,E),q},{}),j=D[i.placement],k=j.x,L=j.y;i.modifiersData.popperOffsets!=null&&(i.modifiersData.popperOffsets.x+=k,i.modifiersData.popperOffsets.y+=L),i.modifiersData[p]=D}},su={name:"popperOffsets",enabled:!0,phase:"read",fn:function(h){var i=h.state,c=h.name;i.modifiersData[c]=Ji({reference:i.rects.reference,element:i.rects.popper,placement:i.placement})},data:{}},Or={name:"preventOverflow",enabled:!0,phase:"main",fn:function(h){var i=h.state,c=h.options,p=h.name,b=c.mainAxis,E=b===void 0||b,D=c.altAxis,j=D!==void 0&&D,k=c.boundary,L=c.rootBoundary,q=c.altBoundary,B=c.padding,ht=c.tether,et=ht===void 0||ht,at=c.tetherOffset,lt=at===void 0?0:at,st=Sn(i,{boundary:k,rootBoundary:L,padding:B,altBoundary:q}),Tt=$e(i.placement),Lt=wa(i.placement),W=!Lt,Ot=ni(Tt),gt=Ot==="x"?"y":"x",yt=i.modifiersData.popperOffsets,zt=i.rects.reference,jt=i.rects.popper,Mt=typeof lt=="function"?lt(Object.assign({},i.rects,{placement:i.placement})):lt,Vt=typeof Mt=="number"?{mainAxis:Mt,altAxis:Mt}:Object.assign({mainAxis:0,altAxis:0},Mt),Ae=i.modifiersData.offset?i.modifiersData.offset[i.placement]:null,Xt={x:0,y:0};if(yt){if(E){var At,Ee=Ot==="y"?ye:ae,he=Ot==="y"?qe:Ce,Bt=Ot==="y"?"height":"width",Pe=yt[Ot],ue=Pe+st[Ee],Gn=Pe-st[he],Wt=et?-jt[Bt]/2:0,Rt=Lt===Ke?zt[Bt]:jt[Bt],me=Lt===Ke?-jt[Bt]:-zt[Bt],Ge=i.elements.arrow,Qn=et&&Ge?tu(Ge):{width:0,height:0},bi=i.modifiersData["arrow#persistent"]?i.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Cu=bi[Ee],Du=bi[he],El=_n(0,zt[Bt],Qn[Bt]),nc=W?zt[Bt]/2-Wt-El-Cu-Vt.mainAxis:Rt-El-Cu-Vt.mainAxis,Mo=W?-zt[Bt]/2+Wt+El+Du+Vt.mainAxis:me+El+Du+Vt.mainAxis,ys=i.elements.arrow&&Da(i.elements.arrow),ac=ys?Ot==="y"?ys.clientTop||0:ys.clientLeft||0:0,Mu=(At=Ae==null?void 0:Ae[Ot])!=null?At:0,wu=Pe+Mo-Mu,zu=_n(et?il(ue,Pe+nc-Mu-ac):ue,Pe,et?ua(Gn,wu):Gn);yt[Ot]=zu,Xt[Ot]=zu-Pe}if(j){var Nu,lc=Ot==="x"?ye:ae,ic=Ot==="x"?qe:Ce,pa=yt[gt],bs=gt==="y"?"height":"width",Ru=pa+st[lc],qa=pa-st[ic],_s=[ye,ae].indexOf(Tt)!==-1,_i=(Nu=Ae==null?void 0:Ae[gt])!=null?Nu:0,Si=_s?Ru:pa-zt[bs]-jt[bs]-_i+Vt.altAxis,ju=_s?pa+zt[bs]+jt[bs]-_i-Vt.altAxis:qa,Ss=et&&_s?function(sc,uc,As){var Lu=_n(sc,uc,As);return Lu>As?As:Lu}(Si,pa,ju):_n(et?Si:Ru,pa,et?ju:qa);yt[gt]=Ss,Xt[gt]=Ss-pa}i.modifiersData[p]=Xt}},requiresIfExists:["offset"]};function oo(h,i,c){c===void 0&&(c=!1);var p,b,E=be(i),D=be(i)&&function(B){var ht=B.getBoundingClientRect(),et=en(ht.width)/B.offsetWidth||1,at=en(ht.height)/B.offsetHeight||1;return et!==1||at!==1}(i),j=ra(i),k=nn(h,D,c),L={scrollLeft:0,scrollTop:0},q={x:0,y:0};return(E||!E&&!c)&&((yn(i)!=="body"||jn(j))&&(L=(p=i)!==fe(p)&&be(p)?{scrollLeft:(b=p).scrollLeft,scrollTop:b.scrollTop}:Ki(p)),be(i)?((q=nn(i,!0)).x+=i.clientLeft,q.y+=i.clientTop):j&&(q.x=de(j))),{x:k.left+L.scrollLeft-q.x,y:k.top+L.scrollTop-q.y,width:k.width,height:k.height}}function fo(h){var i=new Map,c=new Set,p=[];function b(E){c.add(E.name),[].concat(E.requires||[],E.requiresIfExists||[]).forEach(function(D){if(!c.has(D)){var j=i.get(D);j&&b(j)}}),p.push(E)}return h.forEach(function(E){i.set(E.name,E)}),h.forEach(function(E){c.has(E.name)||b(E)}),p}var xr={placement:"bottom",modifiers:[],strategy:"absolute"};function uu(){for(var h=arguments.length,i=new Array(h),c=0;cNumber.parseInt(c,10)):typeof i=="function"?c=>i(c,this._element):i}_getPopperConfig(){const i={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(vt.setDataAttribute(this._menu,"popper","static"),i.modifiers=[{name:"applyStyles",enabled:!1}]),{...i,...it(this._config.popperConfig,[i])}}_selectMenuItem({key:i,target:c}){const p=$.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(b=>U(b));p.length&&ee(p,c,i===Mr,!p.includes(c)).focus()}static jQueryInterface(i){return this.each(function(){const c=ln.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i]()}})}static clearMenus(i){if(i.button===2||i.type==="keyup"&&i.key!=="Tab")return;const c=$.find(ri);for(const p of c){const b=ln.getInstance(p);if(!b||b._config.autoClose===!1)continue;const E=i.composedPath(),D=E.includes(b._menu);if(E.includes(b._element)||b._config.autoClose==="inside"&&!D||b._config.autoClose==="outside"&&D||b._menu.contains(i.target)&&(i.type==="keyup"&&i.key==="Tab"||/input|select|option|textarea|form/i.test(i.target.tagName)))continue;const j={relatedTarget:b._element};i.type==="click"&&(j.clickEvent=i),b._completeHide(j)}}static dataApiKeydownHandler(i){const c=/input|textarea/i.test(i.target.tagName),p=i.key==="Escape",b=[Dr,Mr].includes(i.key);if(!b&&!p||c&&!p)return;i.preventDefault();const E=this.matches(Un)?this:$.prev(this,Un)[0]||$.next(this,Un)[0]||$.findOne(Un,i.delegateTarget.parentNode),D=ln.getOrCreateInstance(E);if(b)return i.stopPropagation(),D.show(),void D._selectMenuItem(i);D._isShown()&&(i.stopPropagation(),D.hide(),E.focus())}}w.on(document,zr,Un,ln.dataApiKeydownHandler),w.on(document,zr,ts,ln.dataApiKeydownHandler),w.on(document,wr,ln.clearMenus),w.on(document,bo,ln.clearMenus),w.on(document,wr,Un,function(h){h.preventDefault(),ln.getOrCreateInstance(this).toggle()}),ot(ln);const ou="backdrop",fu="show",rl=`mousedown.bs.${ou}`,ci={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Ao={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class oi extends oe{constructor(i){super(),this._config=this._getConfig(i),this._isAppended=!1,this._element=null}static get Default(){return ci}static get DefaultType(){return Ao}static get NAME(){return ou}show(i){if(!this._config.isVisible)return void it(i);this._append();const c=this._getElement();this._config.isAnimated&&tt(c),c.classList.add(fu),this._emulateAnimation(()=>{it(i)})}hide(i){this._config.isVisible?(this._getElement().classList.remove(fu),this._emulateAnimation(()=>{this.dispose(),it(i)})):it(i)}dispose(){this._isAppended&&(w.off(this._element,rl),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const i=document.createElement("div");i.className=this._config.className,this._config.isAnimated&&i.classList.add("fade"),this._element=i}return this._element}_configAfterMerge(i){return i.rootElement=N(i.rootElement),i}_append(){if(this._isAppended)return;const i=this._getElement();this._config.rootElement.append(i),w.on(i,rl,()=>{it(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(i){Ct(i,this._getElement(),this._config.isAnimated)}}const fi=".bs.focustrap",Hr=`focusin${fi}`,du=`keydown.tab${fi}`,es="backward",qr={autofocus:!0,trapElement:null},Br={autofocus:"boolean",trapElement:"element"};class hu extends oe{constructor(i){super(),this._config=this._getConfig(i),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return qr}static get DefaultType(){return Br}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),w.off(document,fi),w.on(document,Hr,i=>this._handleFocusin(i)),w.on(document,du,i=>this._handleKeydown(i)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,w.off(document,fi))}_handleFocusin(i){const{trapElement:c}=this._config;if(i.target===document||i.target===c||c.contains(i.target))return;const p=$.focusableChildren(c);p.length===0?c.focus():this._lastTabNavDirection===es?p[p.length-1].focus():p[0].focus()}_handleKeydown(i){i.key==="Tab"&&(this._lastTabNavDirection=i.shiftKey?es:"forward")}}const Yr=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",kr=".sticky-top",ns="padding-right",Xr="margin-right";class mu{constructor(){this._element=document.body}getWidth(){const i=document.documentElement.clientWidth;return Math.abs(window.innerWidth-i)}hide(){const i=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,ns,c=>c+i),this._setElementAttributes(Yr,ns,c=>c+i),this._setElementAttributes(kr,Xr,c=>c-i)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ns),this._resetElementAttributes(Yr,ns),this._resetElementAttributes(kr,Xr)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(i,c,p){const b=this.getWidth();this._applyManipulationCallback(i,E=>{if(E!==this._element&&window.innerWidth>E.clientWidth+b)return;this._saveInitialAttribute(E,c);const D=window.getComputedStyle(E).getPropertyValue(c);E.style.setProperty(c,`${p(Number.parseFloat(D))}px`)})}_saveInitialAttribute(i,c){const p=i.style.getPropertyValue(c);p&&vt.setDataAttribute(i,c,p)}_resetElementAttributes(i,c){this._applyManipulationCallback(i,p=>{const b=vt.getDataAttribute(p,c);b!==null?(vt.removeDataAttribute(p,c),p.style.setProperty(c,b)):p.style.removeProperty(c)})}_applyManipulationCallback(i,c){if(x(i))c(i);else for(const p of $.find(i,this._element))c(p)}}const kt=".bs.modal",di=`hide${kt}`,Gr=`hidePrevented${kt}`,gu=`hidden${kt}`,pu=`show${kt}`,Qr=`shown${kt}`,vu=`resize${kt}`,Eo=`click.dismiss${kt}`,To=`mousedown.dismiss${kt}`,cl=`keydown.dismiss${kt}`,yu=`click${kt}.data-api`,ol="modal-open",as="show",ls="modal-static",Ra={backdrop:!0,focus:!0,keyboard:!0},fl={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Hn extends je{constructor(i,c){super(i,c),this._dialog=$.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new mu,this._addEventListeners()}static get Default(){return Ra}static get DefaultType(){return fl}static get NAME(){return"modal"}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){this._isShown||this._isTransitioning||w.trigger(this._element,pu,{relatedTarget:i}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(ol),this._adjustDialog(),this._backdrop.show(()=>this._showElement(i)))}hide(){this._isShown&&!this._isTransitioning&&(w.trigger(this._element,di).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(as),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){w.off(window,kt),w.off(this._dialog,kt),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new oi({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new hu({trapElement:this._element})}_showElement(i){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const c=$.findOne(".modal-body",this._dialog);c&&(c.scrollTop=0),tt(this._element),this._element.classList.add(as),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,w.trigger(this._element,Qr,{relatedTarget:i})},this._dialog,this._isAnimated())}_addEventListeners(){w.on(this._element,cl,i=>{i.key==="Escape"&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),w.on(window,vu,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),w.on(this._element,To,i=>{w.one(this._element,Eo,c=>{this._element===i.target&&this._element===c.target&&(this._config.backdrop!=="static"?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(ol),this._resetAdjustments(),this._scrollBar.reset(),w.trigger(this._element,gu)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(w.trigger(this._element,Gr).defaultPrevented)return;const i=this._element.scrollHeight>document.documentElement.clientHeight,c=this._element.style.overflowY;c==="hidden"||this._element.classList.contains(ls)||(i||(this._element.style.overflowY="hidden"),this._element.classList.add(ls),this._queueCallback(()=>{this._element.classList.remove(ls),this._queueCallback(()=>{this._element.style.overflowY=c},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const i=this._element.scrollHeight>document.documentElement.clientHeight,c=this._scrollBar.getWidth(),p=c>0;if(p&&!i){const b=rt()?"paddingLeft":"paddingRight";this._element.style[b]=`${c}px`}if(!p&&i){const b=rt()?"paddingRight":"paddingLeft";this._element.style[b]=`${c}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(i,c){return this.each(function(){const p=Hn.getOrCreateInstance(this,i);if(typeof i=="string"){if(p[i]===void 0)throw new TypeError(`No method named "${i}"`);p[i](c)}})}}w.on(document,yu,'[data-bs-toggle="modal"]',function(h){const i=$.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&h.preventDefault(),w.one(i,pu,p=>{p.defaultPrevented||w.one(i,gu,()=>{U(this)&&this.focus()})});const c=$.findOne(".modal.show");c&&Hn.getInstance(c).hide(),Hn.getOrCreateInstance(i).toggle(this)}),Kt(Hn),ot(Hn);const An=".bs.offcanvas",ca=".data-api",Vr=`load${An}${ca}`,bu="show",_u="showing",Zr="hiding",Kr=".offcanvas.show",Oo=`show${An}`,$r=`shown${An}`,Jr=`hide${An}`,Su=`hidePrevented${An}`,Je=`hidden${An}`,Fe=`resize${An}`,dl=`click${An}${ca}`,Au=`keydown.dismiss${An}`,is={backdrop:!0,keyboard:!0,scroll:!1},ss={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class sn extends je{constructor(i,c){super(i,c),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return is}static get DefaultType(){return ss}static get NAME(){return"offcanvas"}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){this._isShown||w.trigger(this._element,Oo,{relatedTarget:i}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||new mu().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(_u),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(bu),this._element.classList.remove(_u),w.trigger(this._element,$r,{relatedTarget:i})},this._element,!0))}hide(){this._isShown&&(w.trigger(this._element,Jr).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Zr),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(bu,Zr),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new mu().reset(),w.trigger(this._element,Je)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const i=!!this._config.backdrop;return new oi({className:"offcanvas-backdrop",isVisible:i,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:i?()=>{this._config.backdrop!=="static"?this.hide():w.trigger(this._element,Su)}:null})}_initializeFocusTrap(){return new hu({trapElement:this._element})}_addEventListeners(){w.on(this._element,Au,i=>{i.key==="Escape"&&(this._config.keyboard?this.hide():w.trigger(this._element,Su))})}static jQueryInterface(i){return this.each(function(){const c=sn.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i](this)}})}}w.on(document,dl,'[data-bs-toggle="offcanvas"]',function(h){const i=$.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&h.preventDefault(),X(this))return;w.one(i,Je,()=>{U(this)&&this.focus()});const c=$.findOne(Kr);c&&c!==i&&sn.getInstance(c).hide(),sn.getOrCreateInstance(i).toggle(this)}),w.on(window,Vr,()=>{for(const h of $.find(Kr))sn.getOrCreateInstance(h).show()}),w.on(window,Fe,()=>{for(const h of $.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(h).position!=="fixed"&&sn.getOrCreateInstance(h).hide()}),Kt(sn),ot(sn);const qn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Fr=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),us=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,hl=(h,i)=>{const c=h.nodeName.toLowerCase();return i.includes(c)?!Fr.has(c)||!!us.test(h.nodeValue):i.filter(p=>p instanceof RegExp).some(p=>p.test(c))},Wr={allowList:qn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},We={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ml={entry:"(string|element|function|null)",selector:"(string|element)"};class gl extends oe{constructor(i){super(),this._config=this._getConfig(i)}static get Default(){return Wr}static get DefaultType(){return We}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(i=>this._resolvePossibleFunction(i)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(i){return this._checkContent(i),this._config.content={...this._config.content,...i},this}toHtml(){const i=document.createElement("div");i.innerHTML=this._maybeSanitize(this._config.template);for(const[b,E]of Object.entries(this._config.content))this._setContent(i,E,b);const c=i.children[0],p=this._resolvePossibleFunction(this._config.extraClass);return p&&c.classList.add(...p.split(" ")),c}_typeCheckConfig(i){super._typeCheckConfig(i),this._checkContent(i.content)}_checkContent(i){for(const[c,p]of Object.entries(i))super._typeCheckConfig({selector:c,entry:p},ml)}_setContent(i,c,p){const b=$.findOne(p,i);b&&((c=this._resolvePossibleFunction(c))?x(c)?this._putElementInTemplate(N(c),b):this._config.html?b.innerHTML=this._maybeSanitize(c):b.textContent=c:b.remove())}_maybeSanitize(i){return this._config.sanitize?function(c,p,b){if(!c.length)return c;if(b&&typeof b=="function")return b(c);const E=new window.DOMParser().parseFromString(c,"text/html"),D=[].concat(...E.body.querySelectorAll("*"));for(const j of D){const k=j.nodeName.toLowerCase();if(!Object.keys(p).includes(k)){j.remove();continue}const L=[].concat(...j.attributes),q=[].concat(p["*"]||[],p[k]||[]);for(const B of L)hl(B,q)||j.removeAttribute(B.nodeName)}return E.body.innerHTML}(i,this._config.allowList,this._config.sanitizeFn):i}_resolvePossibleFunction(i){return it(i,[this])}_putElementInTemplate(i,c){if(this._config.html)return c.innerHTML="",void c.append(i);c.textContent=i.textContent}}const rs=new Set(["sanitize","allowList","sanitizeFn"]),pl="fade",_e="show",Ye=".modal",oa="hide.bs.modal",ke="hover",un="focus",ja={AUTO:"auto",TOP:"top",RIGHT:rt()?"left":"right",BOTTOM:"bottom",LEFT:rt()?"right":"left"},Pr={allowList:qn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Eu={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Bn extends je{constructor(i,c){if(Ii===void 0)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(i,c),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Pr}static get DefaultType(){return Eu}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),w.off(this._element.closest(Ye),oa,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const i=w.trigger(this._element,this.constructor.eventName("show")),c=(Z(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(i.defaultPrevented||!c)return;this._disposePopper();const p=this._getTipElement();this._element.setAttribute("aria-describedby",p.getAttribute("id"));const{container:b}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(b.append(p),w.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(p),p.classList.add(_e),"ontouchstart"in document.documentElement)for(const E of[].concat(...document.body.children))w.on(E,"mouseover",Q);this._queueCallback(()=>{w.trigger(this._element,this.constructor.eventName("shown")),this._isHovered===!1&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!w.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(_e),"ontouchstart"in document.documentElement)for(const i of[].concat(...document.body.children))w.off(i,"mouseover",Q);this._activeTrigger.click=!1,this._activeTrigger[un]=!1,this._activeTrigger[ke]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),w.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(i){const c=this._getTemplateFactory(i).toHtml();if(!c)return null;c.classList.remove(pl,_e),c.classList.add(`bs-${this.constructor.NAME}-auto`);const p=(b=>{do b+=Math.floor(1e6*Math.random());while(document.getElementById(b));return b})(this.constructor.NAME).toString();return c.setAttribute("id",p),this._isAnimated()&&c.classList.add(pl),c}setContent(i){this._newContent=i,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(i){return this._templateFactory?this._templateFactory.changeContent(i):this._templateFactory=new gl({...this._config,content:i,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(i){return this.constructor.getOrCreateInstance(i.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(pl)}_isShown(){return this.tip&&this.tip.classList.contains(_e)}_createPopper(i){const c=it(this._config.placement,[this,i,this._element]),p=ja[c.toUpperCase()];return ru(this._element,i,this._getPopperConfig(p))}_getOffset(){const{offset:i}=this._config;return typeof i=="string"?i.split(",").map(c=>Number.parseInt(c,10)):typeof i=="function"?c=>i(c,this._element):i}_resolvePossibleFunction(i){return it(i,[this._element])}_getPopperConfig(i){const c={placement:i,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:p=>{this._getTipElement().setAttribute("data-popper-placement",p.state.placement)}}]};return{...c,...it(this._config.popperConfig,[c])}}_setListeners(){const i=this._config.trigger.split(" ");for(const c of i)if(c==="click")w.on(this._element,this.constructor.eventName("click"),this._config.selector,p=>{this._initializeOnDelegatedTarget(p).toggle()});else if(c!=="manual"){const p=c===ke?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),b=c===ke?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");w.on(this._element,p,this._config.selector,E=>{const D=this._initializeOnDelegatedTarget(E);D._activeTrigger[E.type==="focusin"?un:ke]=!0,D._enter()}),w.on(this._element,b,this._config.selector,E=>{const D=this._initializeOnDelegatedTarget(E);D._activeTrigger[E.type==="focusout"?un:ke]=D._element.contains(E.relatedTarget),D._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},w.on(this._element.closest(Ye),oa,this._hideModalHandler)}_fixTitle(){const i=this._element.getAttribute("title");i&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",i),this._element.setAttribute("data-bs-original-title",i),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(i,c){clearTimeout(this._timeout),this._timeout=setTimeout(i,c)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(i){const c=vt.getDataAttributes(this._element);for(const p of Object.keys(c))rs.has(p)&&delete c[p];return i={...c,...typeof i=="object"&&i?i:{}},i=this._mergeConfigObj(i),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}_configAfterMerge(i){return i.container=i.container===!1?document.body:N(i.container),typeof i.delay=="number"&&(i.delay={show:i.delay,hide:i.delay}),typeof i.title=="number"&&(i.title=i.title.toString()),typeof i.content=="number"&&(i.content=i.content.toString()),i}_getDelegateConfig(){const i={};for(const[c,p]of Object.entries(this._config))this.constructor.Default[c]!==p&&(i[c]=p);return i.selector=!1,i.trigger="manual",i}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(i){return this.each(function(){const c=Bn.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i]()}})}}ot(Bn);const Se={...Bn.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},ce={...Bn.DefaultType,content:"(null|string|element|function)"};class _t extends Bn{static get Default(){return Se}static get DefaultType(){return ce}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(i){return this.each(function(){const c=_t.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i]()}})}}ot(_t);const Xe=".bs.scrollspy",En=`activate${Xe}`,cs=`click${Xe}`,La=`load${Xe}.data-api`,Ua="active",os="[href]",vl=".nav-link",hi=`${vl}, .nav-item > ${vl}, .list-group-item`,mi={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},gi={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class yl extends je{constructor(i,c){super(i,c),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return mi}static get DefaultType(){return gi}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const i of this._observableSections.values())this._observer.observe(i)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(i){return i.target=N(i.target)||document.body,i.rootMargin=i.offset?`${i.offset}px 0px -30%`:i.rootMargin,typeof i.threshold=="string"&&(i.threshold=i.threshold.split(",").map(c=>Number.parseFloat(c))),i}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(w.off(this._config.target,cs),w.on(this._config.target,cs,os,i=>{const c=this._observableSections.get(i.target.hash);if(c){i.preventDefault();const p=this._rootElement||window,b=c.offsetTop-this._element.offsetTop;if(p.scrollTo)return void p.scrollTo({top:b,behavior:"smooth"});p.scrollTop=b}}))}_getNewObserver(){const i={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(c=>this._observerCallback(c),i)}_observerCallback(i){const c=D=>this._targetLinks.get(`#${D.target.id}`),p=D=>{this._previousScrollData.visibleEntryTop=D.target.offsetTop,this._process(c(D))},b=(this._rootElement||document.documentElement).scrollTop,E=b>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=b;for(const D of i){if(!D.isIntersecting){this._activeTarget=null,this._clearActiveClass(c(D));continue}const j=D.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(E&&j){if(p(D),!b)return}else E||j||p(D)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const i=$.find(os,this._config.target);for(const c of i){if(!c.hash||X(c))continue;const p=$.findOne(decodeURI(c.hash),this._element);U(p)&&(this._targetLinks.set(decodeURI(c.hash),c),this._observableSections.set(c.hash,p))}}_process(i){this._activeTarget!==i&&(this._clearActiveClass(this._config.target),this._activeTarget=i,i.classList.add(Ua),this._activateParents(i),w.trigger(this._element,En,{relatedTarget:i}))}_activateParents(i){if(i.classList.contains("dropdown-item"))$.findOne(".dropdown-toggle",i.closest(".dropdown")).classList.add(Ua);else for(const c of $.parents(i,".nav, .list-group"))for(const p of $.prev(c,hi))p.classList.add(Ua)}_clearActiveClass(i){i.classList.remove(Ua);const c=$.find(`${os}.${Ua}`,i);for(const p of c)p.classList.remove(Ua)}static jQueryInterface(i){return this.each(function(){const c=yl.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i]()}})}}w.on(window,La,()=>{for(const h of $.find('[data-bs-spy="scroll"]'))yl.getOrCreateInstance(h)}),ot(yl);const Yn=".bs.tab",Ir=`hide${Yn}`,fs=`hidden${Yn}`,tc=`show${Yn}`,pi=`shown${Yn}`,ec=`click${Yn}`,bl=`keydown${Yn}`,vi=`load${Yn}`,ds="ArrowLeft",_l="ArrowRight",hs="ArrowUp",Tu="ArrowDown",ms="Home",fa="End",da="active",Ha="fade",Sl="show",Ou=".dropdown-toggle",yi=`:not(${Ou})`,gs='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Me=`.nav-link${yi}, .list-group-item${yi}, [role="tab"]${yi}, ${gs}`,Tn=`.${da}[data-bs-toggle="tab"], .${da}[data-bs-toggle="pill"], .${da}[data-bs-toggle="list"]`;class we extends je{constructor(i){super(i),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),w.on(this._element,bl,c=>this._keydown(c)))}static get NAME(){return"tab"}show(){const i=this._element;if(this._elemIsActive(i))return;const c=this._getActiveElem(),p=c?w.trigger(c,Ir,{relatedTarget:i}):null;w.trigger(i,tc,{relatedTarget:c}).defaultPrevented||p&&p.defaultPrevented||(this._deactivate(c,i),this._activate(i,c))}_activate(i,c){i&&(i.classList.add(da),this._activate($.getElementFromSelector(i)),this._queueCallback(()=>{i.getAttribute("role")==="tab"?(i.removeAttribute("tabindex"),i.setAttribute("aria-selected",!0),this._toggleDropDown(i,!0),w.trigger(i,pi,{relatedTarget:c})):i.classList.add(Sl)},i,i.classList.contains(Ha)))}_deactivate(i,c){i&&(i.classList.remove(da),i.blur(),this._deactivate($.getElementFromSelector(i)),this._queueCallback(()=>{i.getAttribute("role")==="tab"?(i.setAttribute("aria-selected",!1),i.setAttribute("tabindex","-1"),this._toggleDropDown(i,!1),w.trigger(i,fs,{relatedTarget:c})):i.classList.remove(Sl)},i,i.classList.contains(Ha)))}_keydown(i){if(![ds,_l,hs,Tu,ms,fa].includes(i.key))return;i.stopPropagation(),i.preventDefault();const c=this._getChildren().filter(b=>!X(b));let p;if([ms,fa].includes(i.key))p=c[i.key===ms?0:c.length-1];else{const b=[_l,Tu].includes(i.key);p=ee(c,i.target,b,!0)}p&&(p.focus({preventScroll:!0}),we.getOrCreateInstance(p).show())}_getChildren(){return $.find(Me,this._parent)}_getActiveElem(){return this._getChildren().find(i=>this._elemIsActive(i))||null}_setInitialAttributes(i,c){this._setAttributeIfNotExists(i,"role","tablist");for(const p of c)this._setInitialAttributesOnChild(p)}_setInitialAttributesOnChild(i){i=this._getInnerElement(i);const c=this._elemIsActive(i),p=this._getOuterElement(i);i.setAttribute("aria-selected",c),p!==i&&this._setAttributeIfNotExists(p,"role","presentation"),c||i.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(i,"role","tab"),this._setInitialAttributesOnTargetPanel(i)}_setInitialAttributesOnTargetPanel(i){const c=$.getElementFromSelector(i);c&&(this._setAttributeIfNotExists(c,"role","tabpanel"),i.id&&this._setAttributeIfNotExists(c,"aria-labelledby",`${i.id}`))}_toggleDropDown(i,c){const p=this._getOuterElement(i);if(!p.classList.contains("dropdown"))return;const b=(E,D)=>{const j=$.findOne(E,p);j&&j.classList.toggle(D,c)};b(Ou,da),b(".dropdown-menu",Sl),p.setAttribute("aria-expanded",c)}_setAttributeIfNotExists(i,c,p){i.hasAttribute(c)||i.setAttribute(c,p)}_elemIsActive(i){return i.classList.contains(da)}_getInnerElement(i){return i.matches(Me)?i:$.findOne(Me,i)}_getOuterElement(i){return i.closest(".nav-item, .list-group-item")||i}static jQueryInterface(i){return this.each(function(){const c=we.getOrCreateInstance(this);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i]()}})}}w.on(document,ec,gs,function(h){["A","AREA"].includes(this.tagName)&&h.preventDefault(),X(this)||we.getOrCreateInstance(this).show()}),w.on(window,vi,()=>{for(const h of $.find(Tn))we.getOrCreateInstance(h)}),ot(we);const kn=".bs.toast",ha=`mouseover${kn}`,Xn=`mouseout${kn}`,le=`focusin${kn}`,ps=`focusout${kn}`,xo=`hide${kn}`,Co=`hidden${kn}`,Do=`show${kn}`,ie=`shown${kn}`,vs="hide",ma="show",ga="showing",xu={animation:"boolean",autohide:"boolean",delay:"number"},Al={animation:!0,autohide:!0,delay:5e3};class On extends je{constructor(i,c){super(i,c),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Al}static get DefaultType(){return xu}static get NAME(){return"toast"}show(){w.trigger(this._element,Do).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(vs),tt(this._element),this._element.classList.add(ma,ga),this._queueCallback(()=>{this._element.classList.remove(ga),w.trigger(this._element,ie),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(w.trigger(this._element,xo).defaultPrevented||(this._element.classList.add(ga),this._queueCallback(()=>{this._element.classList.add(vs),this._element.classList.remove(ga,ma),w.trigger(this._element,Co)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ma),super.dispose()}isShown(){return this._element.classList.contains(ma)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(i,c){switch(i.type){case"mouseover":case"mouseout":this._hasMouseInteraction=c;break;case"focusin":case"focusout":this._hasKeyboardInteraction=c}if(c)return void this._clearTimeout();const p=i.relatedTarget;this._element===p||this._element.contains(p)||this._maybeScheduleHide()}_setListeners(){w.on(this._element,ha,i=>this._onInteraction(i,!0)),w.on(this._element,Xn,i=>this._onInteraction(i,!1)),w.on(this._element,le,i=>this._onInteraction(i,!0)),w.on(this._element,ps,i=>this._onInteraction(i,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(i){return this.each(function(){const c=On.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i](this)}})}}return Kt(On),ot(On),{Alert:Ve,Button:ta,Carousel:Ta,Collapse:la,Dropdown:ln,Modal:Hn,Offcanvas:sn,Popover:_t,ScrollSpy:yl,Tab:we,Toast:On,Tooltip:Bn}})}(Xc)),Xc.exports}F0();var Ff={exports:{}},Wf,$m;function W0(){if($m)return Wf;$m=1;var u="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Wf=u,Wf}var Pf,Jm;function P0(){if(Jm)return Pf;Jm=1;var u=W0();function r(){}function f(){}return f.resetWarningCache=r,Pf=function(){function o(S,x,N,U,X,Z){if(Z!==u){var Q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw Q.name="Invariant Violation",Q}}o.isRequired=o;function m(){return o}var v={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:m,element:o,elementType:o,instanceOf:m,node:o,objectOf:m,oneOf:m,oneOfType:m,shape:m,exact:m,checkPropTypes:f,resetWarningCache:r};return v.PropTypes=v,v},Pf}var Fm;function I0(){return Fm||(Fm=1,Ff.exports=P0()()),Ff.exports}var tv=I0();const K=wg(tv),Ng=u=>G.jsx("main",{className:"container justify-content-center",children:u.children});Ng.propTypes={children:K.node};function Rg(u,r){const f=F.useRef(r);F.useEffect(function(){r!==f.current&&u.attributionControl!=null&&(f.current!=null&&u.attributionControl.removeAttribution(f.current),r!=null&&u.attributionControl.addAttribution(r)),f.current=r},[u,r])}function ev(u,r,f){r.center!==f.center&&u.setLatLng(r.center),r.radius!=null&&r.radius!==f.radius&&u.setRadius(r.radius)}var nv=zg();const av=1;function lv(u){return Object.freeze({__version:av,map:u})}function iv(u,r){return Object.freeze({...u,...r})}const Od=F.createContext(null);function xd(){const u=F.use(Od);if(u==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return u}function sv(u){function r(f,o){const{instance:m,context:v}=u(f).current;F.useImperativeHandle(o,()=>m);const{children:S}=f;return S==null?null:Ri.createElement(Od,{value:v},S)}return F.forwardRef(r)}function uv(u){function r(f,o){const[m,v]=F.useState(!1),{instance:S}=u(f,v).current;F.useImperativeHandle(o,()=>S),F.useEffect(function(){m&&S.update()},[S,m,f.children]);const x=S._contentNode;return x?nv.createPortal(f.children,x):null}return F.forwardRef(r)}function rv(u){function r(f,o){const{instance:m}=u(f).current;return F.useImperativeHandle(o,()=>m),null}return F.forwardRef(r)}function Cd(u,r){const f=F.useRef(void 0);F.useEffect(function(){return r!=null&&u.instance.on(r),f.current=r,function(){f.current!=null&&u.instance.off(f.current),f.current=null}},[u,r])}function $c(u,r){const f=u.pane??r.pane;return f?{...u,pane:f}:u}function cv(u,r){return function(o,m){const v=xd(),S=u($c(o,v),v);return Rg(v.map,o.attribution),Cd(S.current,o.eventHandlers),r(S.current,v,o,m),S}}var Jc=L0();function Dd(u,r,f){return Object.freeze({instance:u,context:r,container:f})}function Md(u,r){return r==null?function(o,m){const v=F.useRef(void 0);return v.current||(v.current=u(o,m)),v}:function(o,m){const v=F.useRef(void 0);v.current||(v.current=u(o,m));const S=F.useRef(o),{instance:x}=v.current;return F.useEffect(function(){S.current!==o&&(r(x,o,S.current),S.current=o)},[x,o,r]),v}}function jg(u,r){F.useEffect(function(){return(r.layerContainer??r.map).addLayer(u.instance),function(){var v;(v=r.layerContainer)==null||v.removeLayer(u.instance),r.map.removeLayer(u.instance)}},[r,u])}function ov(u){return function(f){const o=xd(),m=u($c(f,o),o);return Rg(o.map,f.attribution),Cd(m.current,f.eventHandlers),jg(m.current,o),m}}function fv(u,r){const f=F.useRef(void 0);F.useEffect(function(){if(r.pathOptions!==f.current){const m=r.pathOptions??{};u.instance.setStyle(m),f.current=m}},[u,r])}function dv(u){return function(f){const o=xd(),m=u($c(f,o),o);return Cd(m.current,f.eventHandlers),jg(m.current,o),fv(m.current,f),m}}function hv(u,r){const f=Md(u),o=cv(f,r);return uv(o)}function mv(u,r){const f=Md(u,r),o=dv(f);return sv(o)}function gv(u,r){const f=Md(u,r),o=ov(f);return rv(o)}function pv(u,r,f){const{opacity:o,zIndex:m}=r;o!=null&&o!==f.opacity&&u.setOpacity(o),m!=null&&m!==f.zIndex&&u.setZIndex(m)}const Wm=mv(function({center:r,children:f,...o},m){const v=new Jc.Circle(r,o);return Dd(v,iv(m,{overlayContainer:v}))},ev);function vv({bounds:u,boundsOptions:r,center:f,children:o,className:m,id:v,placeholder:S,style:x,whenReady:N,zoom:U,...X},Z){const[Q]=F.useState({className:m,id:v,style:x}),[tt,ct]=F.useState(null),Et=F.useRef(void 0);F.useImperativeHandle(Z,()=>(tt==null?void 0:tt.map)??null,[tt]);const rt=F.useCallback(it=>{if(it!==null&&!Et.current){const Ct=new Jc.Map(it,X);Et.current=Ct,f!=null&&U!=null?Ct.setView(f,U):u!=null&&Ct.fitBounds(u,r),N!=null&&Ct.whenReady(N),ct(lv(Ct))}},[]);F.useEffect(()=>()=>{tt==null||tt.map.remove()},[tt]);const ot=tt?Ri.createElement(Od,{value:tt},o):S??null;return Ri.createElement("div",{...Q,ref:rt},ot)}const yv=F.forwardRef(vv),bv=hv(function(r,f){const o=new Jc.Popup(r,f.overlayContainer);return Dd(o,f)},function(r,f,{position:o},m){F.useEffect(function(){const{instance:S}=r;function x(U){U.popup===S&&(S.update(),m(!0))}function N(U){U.popup===S&&m(!1)}return f.map.on({popupopen:x,popupclose:N}),f.overlayContainer==null?(o!=null&&S.setLatLng(o),S.openOn(f.map)):f.overlayContainer.bindPopup(S),function(){var X;f.map.off({popupopen:x,popupclose:N}),(X=f.overlayContainer)==null||X.unbindPopup(),f.map.removeLayer(S)}},[r,f,m,o])}),_v=gv(function({url:r,...f},o){const m=new Jc.TileLayer(r,$c(f,o));return Dd(m,o)},function(r,f,o){pv(r,f,o);const{url:m}=f;m!=null&&m!==o.url&&r.setUrl(m)}),Lg=F.createContext(),Ug=({children:u})=>{const[r,f]=F.useState(null),[o,m]=F.useState(!0),[v,S]=F.useState(null);return F.useEffect(()=>{(async()=>{try{const N=await fetch("/config/settings.json");if(!N.ok)throw new Error("Error al cargar settings.json");const U=await N.json();f(U)}catch(N){S(N.message)}finally{m(!1)}})()},[]),G.jsx(Lg.Provider,{value:{config:r,configLoading:o,configError:v},children:u})};Ug.propTypes={children:K.node.isRequired};const mr=()=>F.useContext(Lg),Hg=F.createContext(),Fc=({children:u,config:r})=>{const[f,o]=F.useState(null),[m,v]=F.useState(!0),[S,x]=F.useState(null);return F.useEffect(()=>{(async()=>{try{const U=new URLSearchParams(r.params).toString(),X=`${r.baseUrl}?${U}`,Z=await fetch(X);if(!Z.ok)throw new Error("Error al obtener datos");const Q=await Z.json();o(Q)}catch(U){x(U.message)}finally{v(!1)}})()},[r]),G.jsx(Hg.Provider,{value:{data:f,dataLoading:m,dataError:S},children:u})};Fc.propTypes={children:K.node.isRequired,config:K.shape({baseUrl:K.string.isRequired,params:K.object}).isRequired};const wd=()=>F.useContext(Hg),Sv=({data:u})=>u.map(({lat:r,lng:f,level:o},m)=>{const v=o<20?"#00FF85":o<60?"#FFA500":"#FF0000",S=4,N=400/S;return G.jsxs("div",{children:[[...Array(S)].map((U,X)=>{const Z=N*(X+1),Q=.6*((X+1)/S);return G.jsx(Wm,{center:[r,f],pathOptions:{color:v,fillColor:v,fillOpacity:Q,weight:1},radius:Z},`${m}-${X}`)}),G.jsx(Wm,{center:[r,f],pathOptions:{color:v,fillColor:v,fillOpacity:.8,weight:2},radius:50,children:G.jsxs(bv,{children:["Contaminación: ",o," µg/m³"]})})]},m)}),Av=()=>{const{config:u,configLoading:r,configError:f}=mr();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});const o=u.appConfig.endpoints.baseUrl,m=u.appConfig.endpoints.sensors,v={baseUrl:`${o}/${m}`,params:{}};return G.jsx(Fc,{config:v,children:G.jsx(Ev,{})})},Ev=()=>{const{config:u,configLoading:r,configError:f}=mr(),{data:o,dataLoading:m,dataError:v}=wd();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});if(m)return G.jsx("p",{children:"Cargando datos..."});if(v)return G.jsxs("p",{children:["Error al cargar datos: ",f]});if(!o)return G.jsx("p",{children:"Datos no disponibles."});const S=u==null?void 0:u.userConfig.city,x=o.map(N=>({lat:N.lat,lng:N.lon,level:N.value}));return G.jsx("div",{className:"p-3",children:G.jsxs(yv,{center:S,zoom:13,scrollWheelZoom:!1,style:Tv,children:[G.jsx(_v,{attribution:'© Contribuidores de OpenStreetMap',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),G.jsx(Sv,{data:x})]})})},Tv={height:"500px",width:"100%",borderRadius:"20px"},qg="label";function Pm(u,r){typeof u=="function"?u(r):u&&(u.current=r)}function Ov(u,r){const f=u.options;f&&r&&Object.assign(f,r)}function Bg(u,r){u.labels=r}function Yg(u,r){let f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:qg;const o=[];u.datasets=r.map(m=>{const v=u.datasets.find(S=>S[f]===m[f]);return!v||!m.data||o.includes(v)?{...m}:(o.push(v),Object.assign(v,m),v)})}function xv(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qg;const f={labels:[],datasets:[]};return Bg(f,u.labels),Yg(f,u.datasets,r),f}function Cv(u,r){const{height:f=150,width:o=300,redraw:m=!1,datasetIdKey:v,type:S,data:x,options:N,plugins:U=[],fallbackContent:X,updateMode:Z,...Q}=u,tt=F.useRef(null),ct=F.useRef(null),Et=()=>{tt.current&&(ct.current=new Td(tt.current,{type:S,data:xv(x,v),options:N&&{...N},plugins:U}),Pm(r,ct.current))},rt=()=>{Pm(r,null),ct.current&&(ct.current.destroy(),ct.current=null)};return F.useEffect(()=>{!m&&ct.current&&N&&Ov(ct.current,N)},[m,N]),F.useEffect(()=>{!m&&ct.current&&Bg(ct.current.config.data,x.labels)},[m,x.labels]),F.useEffect(()=>{!m&&ct.current&&x.datasets&&Yg(ct.current.config.data,x.datasets,v)},[m,x.datasets]),F.useEffect(()=>{ct.current&&(m?(rt(),setTimeout(Et)):ct.current.update(Z))},[m,N,x.labels,x.datasets,Z]),F.useEffect(()=>{ct.current&&(rt(),setTimeout(Et))},[S]),F.useEffect(()=>(Et(),()=>rt()),[]),Ri.createElement("canvas",{ref:tt,role:"img",height:f,width:o,...Q},X)}const Dv=F.forwardRef(Cv);function Mv(u,r){return Td.register(r),F.forwardRef((f,o)=>Ri.createElement(Dv,{...f,ref:o,type:u}))}const wv=Mv("line",U0),kg=F.createContext();function Xg({children:u}){const[r,f]=F.useState(()=>localStorage.getItem("theme")||"light");F.useEffect(()=>{document.body.classList.remove("light","dark"),document.body.classList.add(r),localStorage.setItem("theme",r)},[r]);const o=()=>{f(m=>m==="light"?"dark":"light")};return G.jsx(kg.Provider,{value:{theme:r,toggleTheme:o},children:u})}Xg.propTypes={children:K.node.isRequired};function Wc(){return F.useContext(kg)}const zd=({title:u,status:r,children:f,styleMode:o,className:m,titleIcon:v})=>{const S=F.useRef(null),[x,N]=F.useState(u),{theme:U}=Wc();return F.useEffect(()=>{const X=()=>{S.current&&(S.current.offsetWidth<300&&u.length>15?N(u.slice(0,10)+"."):N(u))};return X(),window.addEventListener("resize",X),()=>window.removeEventListener("resize",X)},[u]),G.jsx("div",{ref:S,className:o==="override"?`${m}`:`col-xl-3 col-sm-6 d-flex flex-column align-items-center p-3 card-container ${m}`,children:G.jsxs("div",{className:`card p-3 w-100 ${U}`,children:[G.jsxs("h3",{className:"text-center",children:[v,x]}),G.jsx("div",{className:"card-content",children:f}),r?G.jsx("span",{className:"status text-center mt-2",children:r}):null]})})};zd.propTypes={title:K.string.isRequired,status:K.string.isRequired,children:K.node.isRequired,styleMode:K.oneOf(["override",""]),className:K.string,titleIcon:K.node};zd.defaultProps={styleMode:""};const Nd=({cards:u,className:r})=>G.jsx("div",{className:`row justify-content-center g-0 ${r}`,children:u.map((f,o)=>G.jsx(zd,{title:f.title,status:f.status,styleMode:f.styleMode,className:f.className,titleIcon:f.titleIcon,children:G.jsx("p",{className:"card-text text-center",children:f.content})},o))});Nd.propTypes={cards:K.arrayOf(K.shape({title:K.string.isRequired,content:K.string.isRequired,status:K.string.isRequired})).isRequired,className:K.string};Td.register(H0,q0,B0,Y0,k0);const zv=()=>{const{config:u,configLoading:r,configError:f}=mr();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});const o=u.appConfig.endpoints.baseUrl,m=u.appConfig.endpoints.sensors,v={baseUrl:`${o}/${m}`,params:{}};return G.jsx(Fc,{config:v,children:G.jsx(Gg,{})})},Gg=()=>{var tt,ct,Et,rt;const{config:u}=mr(),{data:r,loading:f}=wd(),{theme:o}=Wc(),m=((ct=(tt=u==null?void 0:u.appConfig)==null?void 0:tt.historyChartConfig)==null?void 0:ct.chartOptionsDark)??{},v=((rt=(Et=u==null?void 0:u.appConfig)==null?void 0:Et.historyChartConfig)==null?void 0:rt.chartOptionsLight)??{},S=o==="dark"?m:v,x=new Date().getHours();console.log("currentHour",x);const N=[`${x-3}:00`,`${x-2}:00`,`${x-1}:00`,`${x}:00`,`${x+1}:00`,`${x+2}:00`,`${x+3}:00`];if(f)return G.jsx("p",{children:"Cargando datos..."});const U=[],X=[],Z=[];r==null||r.forEach(ot=>{ot.value!=null&&(ot.sensor_type==="MQ-135"?Z.push(ot.value):ot.sensor_type==="DHT-11"&&(U.push(ot.value),X.push(ot.value)))});const Q=[{title:"🌡️ Temperatura",data:U.length?U:[0],borderColor:"#00FF85",backgroundColor:"rgba(0, 255, 133, 0.2)"},{title:"💧 Humedad",data:X.length?X:[0],borderColor:"#00D4FF",backgroundColor:"rgba(0, 212, 255, 0.2)"},{title:"☁️ Contaminación",data:Z.length?Z:[0],borderColor:"#FFA500",backgroundColor:"rgba(255, 165, 0, 0.2)"}];return G.jsx(Nd,{cards:Q.map(({title:ot,data:it,borderColor:Ct,backgroundColor:ee})=>({title:ot,content:G.jsx(wv,{data:{labels:N,datasets:[{data:it,borderColor:Ct,backgroundColor:ee,fill:!0,tension:.4}]},options:S}),styleMode:"override",className:"col-lg-4 col-xxs-12 d-flex flex-column align-items-center p-3 card-container"})),className:""})};Gg.propTypes={options:K.object,timeLabels:K.array,data:K.array};/*! + */var J0=Xc.exports,Km;function F0(){return Km||(Km=1,function(u,r){(function(f,o){u.exports=o()})(J0,function(){const f=new Map,o={set(h,i,c){f.has(h)||f.set(h,new Map);const p=f.get(h);p.has(i)||p.size===0?p.set(i,c):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(p.keys())[0]}.`)},get:(h,i)=>f.has(h)&&f.get(h).get(i)||null,remove(h,i){if(!f.has(h))return;const c=f.get(h);c.delete(i),c.size===0&&f.delete(h)}},m="transitionend",v=h=>(h&&window.CSS&&window.CSS.escape&&(h=h.replace(/#([^\s"#']+)/g,(i,c)=>`#${CSS.escape(c)}`)),h),S=h=>{h.dispatchEvent(new Event(m))},x=h=>!(!h||typeof h!="object")&&(h.jquery!==void 0&&(h=h[0]),h.nodeType!==void 0),N=h=>x(h)?h.jquery?h[0]:h:typeof h=="string"&&h.length>0?document.querySelector(v(h)):null,U=h=>{if(!x(h)||h.getClientRects().length===0)return!1;const i=getComputedStyle(h).getPropertyValue("visibility")==="visible",c=h.closest("details:not([open])");if(!c)return i;if(c!==h){const p=h.closest("summary");if(p&&p.parentNode!==c||p===null)return!1}return i},X=h=>!h||h.nodeType!==Node.ELEMENT_NODE||!!h.classList.contains("disabled")||(h.disabled!==void 0?h.disabled:h.hasAttribute("disabled")&&h.getAttribute("disabled")!=="false"),Z=h=>{if(!document.documentElement.attachShadow)return null;if(typeof h.getRootNode=="function"){const i=h.getRootNode();return i instanceof ShadowRoot?i:null}return h instanceof ShadowRoot?h:h.parentNode?Z(h.parentNode):null},Q=()=>{},tt=h=>{h.offsetHeight},ct=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Et=[],rt=()=>document.documentElement.dir==="rtl",ot=h=>{var i;i=()=>{const c=ct();if(c){const p=h.NAME,b=c.fn[p];c.fn[p]=h.jQueryInterface,c.fn[p].Constructor=h,c.fn[p].noConflict=()=>(c.fn[p]=b,h.jQueryInterface)}},document.readyState==="loading"?(Et.length||document.addEventListener("DOMContentLoaded",()=>{for(const c of Et)c()}),Et.push(i)):i()},it=(h,i=[],c=h)=>typeof h=="function"?h(...i):c,Ct=(h,i,c=!0)=>{if(!c)return void it(h);const p=(D=>{if(!D)return 0;let{transitionDuration:j,transitionDelay:k}=window.getComputedStyle(D);const L=Number.parseFloat(j),q=Number.parseFloat(k);return L||q?(j=j.split(",")[0],k=k.split(",")[0],1e3*(Number.parseFloat(j)+Number.parseFloat(k))):0})(i)+5;let b=!1;const E=({target:D})=>{D===i&&(b=!0,i.removeEventListener(m,E),it(h))};i.addEventListener(m,E),setTimeout(()=>{b||S(i)},p)},ee=(h,i,c,p)=>{const b=h.length;let E=h.indexOf(i);return E===-1?!c&&p?h[b-1]:h[0]:(E+=c?1:-1,p&&(E=(E+b)%b),h[Math.max(0,Math.min(E,b-1))])},ne=/[^.]*(?=\..*)\.|.*/,Re=/\..*/,Kn=/::\d+$/,hn={};let ft=1;const wt={mouseenter:"mouseover",mouseleave:"mouseout"},zn=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Ia(h,i){return i&&`${i}::${ft++}`||h.uidEvent||ft++}function $n(h){const i=Ia(h);return h.uidEvent=i,hn[i]=hn[i]||{},hn[i]}function Jn(h,i,c=null){return Object.values(h).find(p=>p.callable===i&&p.delegationSelector===c)}function Fn(h,i,c){const p=typeof i=="string",b=p?c:i||c;let E=Ht(h);return zn.has(E)||(E=h),[p,b,E]}function V(h,i,c,p,b){if(typeof i!="string"||!h)return;let[E,D,j]=Fn(i,c,p);i in wt&&(D=(at=>function(lt){if(!lt.relatedTarget||lt.relatedTarget!==lt.delegateTarget&&!lt.delegateTarget.contains(lt.relatedTarget))return at.call(this,lt)})(D));const k=$n(h),L=k[j]||(k[j]={}),q=Jn(L,D,E?c:null);if(q)return void(q.oneOff=q.oneOff&&b);const B=Ia(D,i.replace(ne,"")),ht=E?function(et,at,lt){return function st(Tt){const Lt=et.querySelectorAll(at);for(let{target:W}=Tt;W&&W!==this;W=W.parentNode)for(const Ot of Lt)if(Ot===W)return Wn(Tt,{delegateTarget:W}),st.oneOff&&w.off(et,Tt.type,at,lt),lt.apply(W,[Tt])}}(h,c,D):function(et,at){return function lt(st){return Wn(st,{delegateTarget:et}),lt.oneOff&&w.off(et,st.type,at),at.apply(et,[st])}}(h,D);ht.delegationSelector=E?c:null,ht.callable=D,ht.oneOff=b,ht.uidEvent=B,L[B]=ht,h.addEventListener(j,ht,E)}function mt(h,i,c,p,b){const E=Jn(i[c],p,b);E&&(h.removeEventListener(c,E,!!b),delete i[c][E.uidEvent])}function dt(h,i,c,p){const b=i[c]||{};for(const[E,D]of Object.entries(b))E.includes(p)&&mt(h,i,c,D.callable,D.delegationSelector)}function Ht(h){return h=h.replace(Re,""),wt[h]||h}const w={on(h,i,c,p){V(h,i,c,p,!1)},one(h,i,c,p){V(h,i,c,p,!0)},off(h,i,c,p){if(typeof i!="string"||!h)return;const[b,E,D]=Fn(i,c,p),j=D!==i,k=$n(h),L=k[D]||{},q=i.startsWith(".");if(E===void 0){if(q)for(const B of Object.keys(k))dt(h,k,B,i.slice(1));for(const[B,ht]of Object.entries(L)){const et=B.replace(Kn,"");j&&!i.includes(et)||mt(h,k,D,ht.callable,ht.delegationSelector)}}else{if(!Object.keys(L).length)return;mt(h,k,D,E,b?c:null)}},trigger(h,i,c){if(typeof i!="string"||!h)return null;const p=ct();let b=null,E=!0,D=!0,j=!1;i!==Ht(i)&&p&&(b=p.Event(i,c),p(h).trigger(b),E=!b.isPropagationStopped(),D=!b.isImmediatePropagationStopped(),j=b.isDefaultPrevented());const k=Wn(new Event(i,{bubbles:E,cancelable:!0}),c);return j&&k.preventDefault(),D&&h.dispatchEvent(k),k.defaultPrevented&&b&&b.preventDefault(),k}};function Wn(h,i={}){for(const[c,p]of Object.entries(i))try{h[c]=p}catch{Object.defineProperty(h,c,{configurable:!0,get:()=>p})}return h}function Pn(h){if(h==="true")return!0;if(h==="false")return!1;if(h===Number(h).toString())return Number(h);if(h===""||h==="null")return null;if(typeof h!="string")return h;try{return JSON.parse(decodeURIComponent(h))}catch{return h}}function Ie(h){return h.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}const vt={setDataAttribute(h,i,c){h.setAttribute(`data-bs-${Ie(i)}`,c)},removeDataAttribute(h,i){h.removeAttribute(`data-bs-${Ie(i)}`)},getDataAttributes(h){if(!h)return{};const i={},c=Object.keys(h.dataset).filter(p=>p.startsWith("bs")&&!p.startsWith("bsConfig"));for(const p of c){let b=p.replace(/^bs/,"");b=b.charAt(0).toLowerCase()+b.slice(1,b.length),i[b]=Pn(h.dataset[p])}return i},getDataAttribute:(h,i)=>Pn(h.getAttribute(`data-bs-${Ie(i)}`))};class oe{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(i){return i=this._mergeConfigObj(i),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}_configAfterMerge(i){return i}_mergeConfigObj(i,c){const p=x(c)?vt.getDataAttribute(c,"config"):{};return{...this.constructor.Default,...typeof p=="object"?p:{},...x(c)?vt.getDataAttributes(c):{},...typeof i=="object"?i:{}}}_typeCheckConfig(i,c=this.constructor.DefaultType){for(const[b,E]of Object.entries(c)){const D=i[b],j=x(D)?"element":(p=D)==null?`${p}`:Object.prototype.toString.call(p).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(E).test(j))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${b}" provided type "${j}" but expected type "${E}".`)}var p}}class je extends oe{constructor(i,c){super(),(i=N(i))&&(this._element=i,this._config=this._getConfig(c),o.set(this._element,this.constructor.DATA_KEY,this))}dispose(){o.remove(this._element,this.constructor.DATA_KEY),w.off(this._element,this.constructor.EVENT_KEY);for(const i of Object.getOwnPropertyNames(this))this[i]=null}_queueCallback(i,c,p=!0){Ct(i,c,p)}_getConfig(i){return i=this._mergeConfigObj(i,this._element),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}static getInstance(i){return o.get(N(i),this.DATA_KEY)}static getOrCreateInstance(i,c={}){return this.getInstance(i)||new this(i,typeof c=="object"?c:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(i){return`${i}${this.EVENT_KEY}`}}const In=h=>{let i=h.getAttribute("data-bs-target");if(!i||i==="#"){let c=h.getAttribute("href");if(!c||!c.includes("#")&&!c.startsWith("."))return null;c.includes("#")&&!c.startsWith("#")&&(c=`#${c.split("#")[1]}`),i=c&&c!=="#"?c.trim():null}return i?i.split(",").map(c=>v(c)).join(","):null},$={find:(h,i=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(i,h)),findOne:(h,i=document.documentElement)=>Element.prototype.querySelector.call(i,h),children:(h,i)=>[].concat(...h.children).filter(c=>c.matches(i)),parents(h,i){const c=[];let p=h.parentNode.closest(i);for(;p;)c.push(p),p=p.parentNode.closest(i);return c},prev(h,i){let c=h.previousElementSibling;for(;c;){if(c.matches(i))return[c];c=c.previousElementSibling}return[]},next(h,i){let c=h.nextElementSibling;for(;c;){if(c.matches(i))return[c];c=c.nextElementSibling}return[]},focusableChildren(h){const i=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(c=>`${c}:not([tabindex^="-"])`).join(",");return this.find(i,h).filter(c=>!X(c)&&U(c))},getSelectorFromElement(h){const i=In(h);return i&&$.findOne(i)?i:null},getElementFromSelector(h){const i=In(h);return i?$.findOne(i):null},getMultipleElementsFromSelector(h){const i=In(h);return i?$.find(i):[]}},Kt=(h,i="hide")=>{const c=`click.dismiss${h.EVENT_KEY}`,p=h.NAME;w.on(document,c,`[data-bs-dismiss="${p}"]`,function(b){if(["A","AREA"].includes(this.tagName)&&b.preventDefault(),X(this))return;const E=$.getElementFromSelector(this)||this.closest(`.${p}`);h.getOrCreateInstance(E)[i]()})},qt=".bs.alert",mn=`close${qt}`,Vl=`closed${qt}`;class Ve extends je{static get NAME(){return"alert"}close(){if(w.trigger(this._element,mn).defaultPrevented)return;this._element.classList.remove("show");const i=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,i)}_destroyElement(){this._element.remove(),w.trigger(this._element,Vl),this.dispose()}static jQueryInterface(i){return this.each(function(){const c=Ve.getOrCreateInstance(this);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i](this)}})}}Kt(Ve,"close"),ot(Ve);const Zl='[data-bs-toggle="button"]';class ta extends je{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(i){return this.each(function(){const c=ta.getOrCreateInstance(this);i==="toggle"&&c[i]()})}}w.on(document,"click.bs.button.data-api",Zl,h=>{h.preventDefault();const i=h.target.closest(Zl);ta.getOrCreateInstance(i).toggle()}),ot(ta);const tn=".bs.swipe",ks=`touchstart${tn}`,Ui=`touchmove${tn}`,Xs=`touchend${tn}`,Gs=`pointerdown${tn}`,Qs=`pointerup${tn}`,ao={endCallback:null,leftCallback:null,rightCallback:null},lo={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Le extends oe{constructor(i,c){super(),this._element=i,i&&Le.isSupported()&&(this._config=this._getConfig(c),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return ao}static get DefaultType(){return lo}static get NAME(){return"swipe"}dispose(){w.off(this._element,tn)}_start(i){this._supportPointerEvents?this._eventIsPointerPenTouch(i)&&(this._deltaX=i.clientX):this._deltaX=i.touches[0].clientX}_end(i){this._eventIsPointerPenTouch(i)&&(this._deltaX=i.clientX-this._deltaX),this._handleSwipe(),it(this._config.endCallback)}_move(i){this._deltaX=i.touches&&i.touches.length>1?0:i.touches[0].clientX-this._deltaX}_handleSwipe(){const i=Math.abs(this._deltaX);if(i<=40)return;const c=i/this._deltaX;this._deltaX=0,c&&it(c>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(w.on(this._element,Gs,i=>this._start(i)),w.on(this._element,Qs,i=>this._end(i)),this._element.classList.add("pointer-event")):(w.on(this._element,ks,i=>this._start(i)),w.on(this._element,Ui,i=>this._move(i)),w.on(this._element,Xs,i=>this._end(i)))}_eventIsPointerPenTouch(i){return this._supportPointerEvents&&(i.pointerType==="pen"||i.pointerType==="touch")}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ea=".bs.carousel",Vs=".data-api",tl="next",Nn="prev",el="left",Kl="right",io=`slide${ea}`,Zs=`slid${ea}`,$l=`keydown${ea}`,Ue=`mouseenter${ea}`,so=`mouseleave${ea}`,na=`dragstart${ea}`,He=`load${ea}${Vs}`,uo=`click${ea}${Vs}`,vr="carousel",Hi="active",Jl=".active",Fl=".carousel-item",Ea=Jl+Fl,qi={ArrowLeft:Kl,ArrowRight:el},Wl={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ro={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ta extends je{constructor(i,c){super(i,c),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=$.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===vr&&this.cycle()}static get Default(){return Wl}static get DefaultType(){return ro}static get NAME(){return"carousel"}next(){this._slide(tl)}nextWhenVisible(){!document.hidden&&U(this._element)&&this.next()}prev(){this._slide(Nn)}pause(){this._isSliding&&S(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?w.one(this._element,Zs,()=>this.cycle()):this.cycle())}to(i){const c=this._getItems();if(i>c.length-1||i<0)return;if(this._isSliding)return void w.one(this._element,Zs,()=>this.to(i));const p=this._getItemIndex(this._getActive());if(p===i)return;const b=i>p?tl:Nn;this._slide(b,c[i])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(i){return i.defaultInterval=i.interval,i}_addEventListeners(){this._config.keyboard&&w.on(this._element,$l,i=>this._keydown(i)),this._config.pause==="hover"&&(w.on(this._element,Ue,()=>this.pause()),w.on(this._element,so,()=>this._maybeEnableCycle())),this._config.touch&&Le.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const c of $.find(".carousel-item img",this._element))w.on(c,na,p=>p.preventDefault());const i={leftCallback:()=>this._slide(this._directionToOrder(el)),rightCallback:()=>this._slide(this._directionToOrder(Kl)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new Le(this._element,i)}_keydown(i){if(/input|textarea/i.test(i.target.tagName))return;const c=qi[i.key];c&&(i.preventDefault(),this._slide(this._directionToOrder(c)))}_getItemIndex(i){return this._getItems().indexOf(i)}_setActiveIndicatorElement(i){if(!this._indicatorsElement)return;const c=$.findOne(Jl,this._indicatorsElement);c.classList.remove(Hi),c.removeAttribute("aria-current");const p=$.findOne(`[data-bs-slide-to="${i}"]`,this._indicatorsElement);p&&(p.classList.add(Hi),p.setAttribute("aria-current","true"))}_updateInterval(){const i=this._activeElement||this._getActive();if(!i)return;const c=Number.parseInt(i.getAttribute("data-bs-interval"),10);this._config.interval=c||this._config.defaultInterval}_slide(i,c=null){if(this._isSliding)return;const p=this._getActive(),b=i===tl,E=c||ee(this._getItems(),p,b,this._config.wrap);if(E===p)return;const D=this._getItemIndex(E),j=B=>w.trigger(this._element,B,{relatedTarget:E,direction:this._orderToDirection(i),from:this._getItemIndex(p),to:D});if(j(io).defaultPrevented||!p||!E)return;const k=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(D),this._activeElement=E;const L=b?"carousel-item-start":"carousel-item-end",q=b?"carousel-item-next":"carousel-item-prev";E.classList.add(q),tt(E),p.classList.add(L),E.classList.add(L),this._queueCallback(()=>{E.classList.remove(L,q),E.classList.add(Hi),p.classList.remove(Hi,q,L),this._isSliding=!1,j(Zs)},p,this._isAnimated()),k&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return $.findOne(Ea,this._element)}_getItems(){return $.find(Fl,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(i){return rt()?i===el?Nn:tl:i===el?tl:Nn}_orderToDirection(i){return rt()?i===Nn?el:Kl:i===Nn?Kl:el}static jQueryInterface(i){return this.each(function(){const c=Ta.getOrCreateInstance(this,i);if(typeof i!="number"){if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i]()}}else c.to(i)})}}w.on(document,uo,"[data-bs-slide], [data-bs-slide-to]",function(h){const i=$.getElementFromSelector(this);if(!i||!i.classList.contains(vr))return;h.preventDefault();const c=Ta.getOrCreateInstance(i),p=this.getAttribute("data-bs-slide-to");return p?(c.to(p),void c._maybeEnableCycle()):vt.getDataAttribute(this,"slide")==="next"?(c.next(),void c._maybeEnableCycle()):(c.prev(),void c._maybeEnableCycle())}),w.on(window,He,()=>{const h=$.find('[data-bs-ride="carousel"]');for(const i of h)Ta.getOrCreateInstance(i)}),ot(Ta);const nl=".bs.collapse",Ks=`show${nl}`,Pl=`shown${nl}`,co=`hide${nl}`,yr=`hidden${nl}`,br=`click${nl}.data-api`,Bi="show",Oa="collapse",Yi="collapsing",aa=`:scope .${Oa} .${Oa}`,se='[data-bs-toggle="collapse"]',xe={parent:null,toggle:!0},al={parent:"(null|element)",toggle:"boolean"};class la extends je{constructor(i,c){super(i,c),this._isTransitioning=!1,this._triggerArray=[];const p=$.find(se);for(const b of p){const E=$.getSelectorFromElement(b),D=$.find(E).filter(j=>j===this._element);E!==null&&D.length&&this._triggerArray.push(b)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return xe}static get DefaultType(){return al}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let i=[];if(this._config.parent&&(i=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(b=>b!==this._element).map(b=>la.getOrCreateInstance(b,{toggle:!1}))),i.length&&i[0]._isTransitioning||w.trigger(this._element,Ks).defaultPrevented)return;for(const b of i)b.hide();const c=this._getDimension();this._element.classList.remove(Oa),this._element.classList.add(Yi),this._element.style[c]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const p=`scroll${c[0].toUpperCase()+c.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Yi),this._element.classList.add(Oa,Bi),this._element.style[c]="",w.trigger(this._element,Pl)},this._element,!0),this._element.style[c]=`${this._element[p]}px`}hide(){if(this._isTransitioning||!this._isShown()||w.trigger(this._element,co).defaultPrevented)return;const i=this._getDimension();this._element.style[i]=`${this._element.getBoundingClientRect()[i]}px`,tt(this._element),this._element.classList.add(Yi),this._element.classList.remove(Oa,Bi);for(const c of this._triggerArray){const p=$.getElementFromSelector(c);p&&!this._isShown(p)&&this._addAriaAndCollapsedClass([c],!1)}this._isTransitioning=!0,this._element.style[i]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Yi),this._element.classList.add(Oa),w.trigger(this._element,yr)},this._element,!0)}_isShown(i=this._element){return i.classList.contains(Bi)}_configAfterMerge(i){return i.toggle=!!i.toggle,i.parent=N(i.parent),i}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const i=this._getFirstLevelChildren(se);for(const c of i){const p=$.getElementFromSelector(c);p&&this._addAriaAndCollapsedClass([c],this._isShown(p))}}_getFirstLevelChildren(i){const c=$.find(aa,this._config.parent);return $.find(i,this._config.parent).filter(p=>!c.includes(p))}_addAriaAndCollapsedClass(i,c){if(i.length)for(const p of i)p.classList.toggle("collapsed",!c),p.setAttribute("aria-expanded",c)}static jQueryInterface(i){const c={};return typeof i=="string"&&/show|hide/.test(i)&&(c.toggle=!1),this.each(function(){const p=la.getOrCreateInstance(this,c);if(typeof i=="string"){if(p[i]===void 0)throw new TypeError(`No method named "${i}"`);p[i]()}})}}w.on(document,br,se,function(h){(h.target.tagName==="A"||h.delegateTarget&&h.delegateTarget.tagName==="A")&&h.preventDefault();for(const i of $.getMultipleElementsFromSelector(this))la.getOrCreateInstance(i,{toggle:!1}).toggle()}),ot(la);var ye="top",qe="bottom",Ce="right",ae="left",ll="auto",Ze=[ye,qe,Ce,ae],Ke="start",gn="end",xa="clippingParents",Ft="viewport",Ca="popper",$s="reference",Rn=Ze.reduce(function(h,i){return h.concat([i+"-"+Ke,i+"-"+gn])},[]),ia=[].concat(Ze,[ll]).reduce(function(h,i){return h.concat([i,i+"-"+Ke,i+"-"+gn])},[]),pn="beforeRead",_r="read",Js="afterRead",Fs="beforeMain",Sr="main",Il="afterMain",ti="beforeWrite",vn="write",Be="afterWrite",Ws=[pn,_r,Js,Fs,Sr,Il,ti,vn,Be];function yn(h){return h?(h.nodeName||"").toLowerCase():null}function fe(h){if(h==null)return window;if(h.toString()!=="[object Window]"){var i=h.ownerDocument;return i&&i.defaultView||window}return h}function sa(h){return h instanceof fe(h).Element||h instanceof Element}function be(h){return h instanceof fe(h).HTMLElement||h instanceof HTMLElement}function Ps(h){return typeof ShadowRoot<"u"&&(h instanceof fe(h).ShadowRoot||h instanceof ShadowRoot)}const De={name:"applyStyles",enabled:!0,phase:"write",fn:function(h){var i=h.state;Object.keys(i.elements).forEach(function(c){var p=i.styles[c]||{},b=i.attributes[c]||{},E=i.elements[c];be(E)&&yn(E)&&(Object.assign(E.style,p),Object.keys(b).forEach(function(D){var j=b[D];j===!1?E.removeAttribute(D):E.setAttribute(D,j===!0?"":j)}))})},effect:function(h){var i=h.state,c={popper:{position:i.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(i.elements.popper.style,c.popper),i.styles=c,i.elements.arrow&&Object.assign(i.elements.arrow.style,c.arrow),function(){Object.keys(i.elements).forEach(function(p){var b=i.elements[p],E=i.attributes[p]||{},D=Object.keys(i.styles.hasOwnProperty(p)?i.styles[p]:c[p]).reduce(function(j,k){return j[k]="",j},{});be(b)&&yn(b)&&(Object.assign(b.style,D),Object.keys(E).forEach(function(j){b.removeAttribute(j)}))})}},requires:["computeStyles"]};function $e(h){return h.split("-")[0]}var ua=Math.max,il=Math.min,en=Math.round;function ki(){var h=navigator.userAgentData;return h!=null&&h.brands&&Array.isArray(h.brands)?h.brands.map(function(i){return i.brand+"/"+i.version}).join(" "):navigator.userAgent}function Is(){return!/^((?!chrome|android).)*safari/i.test(ki())}function nn(h,i,c){i===void 0&&(i=!1),c===void 0&&(c=!1);var p=h.getBoundingClientRect(),b=1,E=1;i&&be(h)&&(b=h.offsetWidth>0&&en(p.width)/h.offsetWidth||1,E=h.offsetHeight>0&&en(p.height)/h.offsetHeight||1);var D=(sa(h)?fe(h):window).visualViewport,j=!Is()&&c,k=(p.left+(j&&D?D.offsetLeft:0))/b,L=(p.top+(j&&D?D.offsetTop:0))/E,q=p.width/b,B=p.height/E;return{width:q,height:B,top:L,right:k+q,bottom:L+B,left:k,x:k,y:L}}function tu(h){var i=nn(h),c=h.offsetWidth,p=h.offsetHeight;return Math.abs(i.width-c)<=1&&(c=i.width),Math.abs(i.height-p)<=1&&(p=i.height),{x:h.offsetLeft,y:h.offsetTop,width:c,height:p}}function eu(h,i){var c=i.getRootNode&&i.getRootNode();if(h.contains(i))return!0;if(c&&Ps(c)){var p=i;do{if(p&&h.isSameNode(p))return!0;p=p.parentNode||p.host}while(p)}return!1}function bn(h){return fe(h).getComputedStyle(h)}function nu(h){return["table","td","th"].indexOf(yn(h))>=0}function ra(h){return((sa(h)?h.ownerDocument:h.document)||window.document).documentElement}function Xi(h){return yn(h)==="html"?h:h.assignedSlot||h.parentNode||(Ps(h)?h.host:null)||ra(h)}function ei(h){return be(h)&&bn(h).position!=="fixed"?h.offsetParent:null}function Da(h){for(var i=fe(h),c=ei(h);c&&nu(c)&&bn(c).position==="static";)c=ei(c);return c&&(yn(c)==="html"||yn(c)==="body"&&bn(c).position==="static")?i:c||function(p){var b=/firefox/i.test(ki());if(/Trident/i.test(ki())&&be(p)&&bn(p).position==="fixed")return null;var E=Xi(p);for(Ps(E)&&(E=E.host);be(E)&&["html","body"].indexOf(yn(E))<0;){var D=bn(E);if(D.transform!=="none"||D.perspective!=="none"||D.contain==="paint"||["transform","perspective"].indexOf(D.willChange)!==-1||b&&D.willChange==="filter"||b&&D.filter&&D.filter!=="none")return E;E=E.parentNode}return null}(h)||i}function ni(h){return["top","bottom"].indexOf(h)>=0?"x":"y"}function _n(h,i,c){return ua(h,il(i,c))}function Ma(h){return Object.assign({},{top:0,right:0,bottom:0,left:0},h)}function au(h,i){return i.reduce(function(c,p){return c[p]=h,c},{})}const Gi={name:"arrow",enabled:!0,phase:"main",fn:function(h){var i,c=h.state,p=h.name,b=h.options,E=c.elements.arrow,D=c.modifiersData.popperOffsets,j=$e(c.placement),k=ni(j),L=[ae,Ce].indexOf(j)>=0?"height":"width";if(E&&D){var q=function(jt,Mt){return Ma(typeof(jt=typeof jt=="function"?jt(Object.assign({},Mt.rects,{placement:Mt.placement})):jt)!="number"?jt:au(jt,Ze))}(b.padding,c),B=tu(E),ht=k==="y"?ye:ae,et=k==="y"?qe:Ce,at=c.rects.reference[L]+c.rects.reference[k]-D[k]-c.rects.popper[L],lt=D[k]-c.rects.reference[k],st=Da(E),Tt=st?k==="y"?st.clientHeight||0:st.clientWidth||0:0,Lt=at/2-lt/2,W=q[ht],Ot=Tt-B[L]-q[et],gt=Tt/2-B[L]/2+Lt,yt=_n(W,gt,Ot),zt=k;c.modifiersData[p]=((i={})[zt]=yt,i.centerOffset=yt-gt,i)}},effect:function(h){var i=h.state,c=h.options.element,p=c===void 0?"[data-popper-arrow]":c;p!=null&&(typeof p!="string"||(p=i.elements.popper.querySelector(p)))&&eu(i.elements.popper,p)&&(i.elements.arrow=p)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wa(h){return h.split("-")[1]}var ai={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Qi(h){var i,c=h.popper,p=h.popperRect,b=h.placement,E=h.variation,D=h.offsets,j=h.position,k=h.gpuAcceleration,L=h.adaptive,q=h.roundOffsets,B=h.isFixed,ht=D.x,et=ht===void 0?0:ht,at=D.y,lt=at===void 0?0:at,st=typeof q=="function"?q({x:et,y:lt}):{x:et,y:lt};et=st.x,lt=st.y;var Tt=D.hasOwnProperty("x"),Lt=D.hasOwnProperty("y"),W=ae,Ot=ye,gt=window;if(L){var yt=Da(c),zt="clientHeight",jt="clientWidth";yt===fe(c)&&bn(yt=ra(c)).position!=="static"&&j==="absolute"&&(zt="scrollHeight",jt="scrollWidth"),(b===ye||(b===ae||b===Ce)&&E===gn)&&(Ot=qe,lt-=(B&&yt===gt&>.visualViewport?gt.visualViewport.height:yt[zt])-p.height,lt*=k?1:-1),b!==ae&&(b!==ye&&b!==qe||E!==gn)||(W=Ce,et-=(B&&yt===gt&>.visualViewport?gt.visualViewport.width:yt[jt])-p.width,et*=k?1:-1)}var Mt,Vt=Object.assign({position:j},L&&ai),Ae=q===!0?function(Xt,At){var Ee=Xt.x,he=Xt.y,Bt=At.devicePixelRatio||1;return{x:en(Ee*Bt)/Bt||0,y:en(he*Bt)/Bt||0}}({x:et,y:lt},fe(c)):{x:et,y:lt};return et=Ae.x,lt=Ae.y,k?Object.assign({},Vt,((Mt={})[Ot]=Lt?"0":"",Mt[W]=Tt?"0":"",Mt.transform=(gt.devicePixelRatio||1)<=1?"translate("+et+"px, "+lt+"px)":"translate3d("+et+"px, "+lt+"px, 0)",Mt)):Object.assign({},Vt,((i={})[Ot]=Lt?lt+"px":"",i[W]=Tt?et+"px":"",i.transform="",i))}const za={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(h){var i=h.state,c=h.options,p=c.gpuAcceleration,b=p===void 0||p,E=c.adaptive,D=E===void 0||E,j=c.roundOffsets,k=j===void 0||j,L={placement:$e(i.placement),variation:wa(i.placement),popper:i.elements.popper,popperRect:i.rects.popper,gpuAcceleration:b,isFixed:i.options.strategy==="fixed"};i.modifiersData.popperOffsets!=null&&(i.styles.popper=Object.assign({},i.styles.popper,Qi(Object.assign({},L,{offsets:i.modifiersData.popperOffsets,position:i.options.strategy,adaptive:D,roundOffsets:k})))),i.modifiersData.arrow!=null&&(i.styles.arrow=Object.assign({},i.styles.arrow,Qi(Object.assign({},L,{offsets:i.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:k})))),i.attributes.popper=Object.assign({},i.attributes.popper,{"data-popper-placement":i.placement})},data:{}};var an={passive:!0};const li={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(h){var i=h.state,c=h.instance,p=h.options,b=p.scroll,E=b===void 0||b,D=p.resize,j=D===void 0||D,k=fe(i.elements.popper),L=[].concat(i.scrollParents.reference,i.scrollParents.popper);return E&&L.forEach(function(q){q.addEventListener("scroll",c.update,an)}),j&&k.addEventListener("resize",c.update,an),function(){E&&L.forEach(function(q){q.removeEventListener("scroll",c.update,an)}),j&&k.removeEventListener("resize",c.update,an)}},data:{}};var Vi={left:"right",right:"left",bottom:"top",top:"bottom"};function ii(h){return h.replace(/left|right|bottom|top/g,function(i){return Vi[i]})}var Zi={start:"end",end:"start"};function si(h){return h.replace(/start|end/g,function(i){return Zi[i]})}function Ki(h){var i=fe(h);return{scrollLeft:i.pageXOffset,scrollTop:i.pageYOffset}}function de(h){return nn(ra(h)).left+Ki(h).scrollLeft}function jn(h){var i=bn(h),c=i.overflow,p=i.overflowX,b=i.overflowY;return/auto|scroll|overlay|hidden/.test(c+b+p)}function ui(h){return["html","body","#document"].indexOf(yn(h))>=0?h.ownerDocument.body:be(h)&&jn(h)?h:ui(Xi(h))}function Ln(h,i){var c;i===void 0&&(i=[]);var p=ui(h),b=p===((c=h.ownerDocument)==null?void 0:c.body),E=fe(p),D=b?[E].concat(E.visualViewport||[],jn(p)?p:[]):p,j=i.concat(D);return b?j:j.concat(Ln(Xi(D)))}function lu(h){return Object.assign({},h,{left:h.x,top:h.y,right:h.x+h.width,bottom:h.y+h.height})}function $i(h,i,c){return i===Ft?lu(function(p,b){var E=fe(p),D=ra(p),j=E.visualViewport,k=D.clientWidth,L=D.clientHeight,q=0,B=0;if(j){k=j.width,L=j.height;var ht=Is();(ht||!ht&&b==="fixed")&&(q=j.offsetLeft,B=j.offsetTop)}return{width:k,height:L,x:q+de(p),y:B}}(h,c)):sa(i)?function(p,b){var E=nn(p,!1,b==="fixed");return E.top=E.top+p.clientTop,E.left=E.left+p.clientLeft,E.bottom=E.top+p.clientHeight,E.right=E.left+p.clientWidth,E.width=p.clientWidth,E.height=p.clientHeight,E.x=E.left,E.y=E.top,E}(i,c):lu(function(p){var b,E=ra(p),D=Ki(p),j=(b=p.ownerDocument)==null?void 0:b.body,k=ua(E.scrollWidth,E.clientWidth,j?j.scrollWidth:0,j?j.clientWidth:0),L=ua(E.scrollHeight,E.clientHeight,j?j.scrollHeight:0,j?j.clientHeight:0),q=-D.scrollLeft+de(p),B=-D.scrollTop;return bn(j||E).direction==="rtl"&&(q+=ua(E.clientWidth,j?j.clientWidth:0)-k),{width:k,height:L,x:q,y:B}}(ra(h)))}function Ji(h){var i,c=h.reference,p=h.element,b=h.placement,E=b?$e(b):null,D=b?wa(b):null,j=c.x+c.width/2-p.width/2,k=c.y+c.height/2-p.height/2;switch(E){case ye:i={x:j,y:c.y-p.height};break;case qe:i={x:j,y:c.y+c.height};break;case Ce:i={x:c.x+c.width,y:k};break;case ae:i={x:c.x-p.width,y:k};break;default:i={x:c.x,y:c.y}}var L=E?ni(E):null;if(L!=null){var q=L==="y"?"height":"width";switch(D){case Ke:i[L]=i[L]-(c[q]/2-p[q]/2);break;case gn:i[L]=i[L]+(c[q]/2-p[q]/2)}}return i}function Sn(h,i){i===void 0&&(i={});var c=i,p=c.placement,b=p===void 0?h.placement:p,E=c.strategy,D=E===void 0?h.strategy:E,j=c.boundary,k=j===void 0?xa:j,L=c.rootBoundary,q=L===void 0?Ft:L,B=c.elementContext,ht=B===void 0?Ca:B,et=c.altBoundary,at=et!==void 0&&et,lt=c.padding,st=lt===void 0?0:lt,Tt=Ma(typeof st!="number"?st:au(st,Ze)),Lt=ht===Ca?$s:Ca,W=h.rects.popper,Ot=h.elements[at?Lt:ht],gt=function(At,Ee,he,Bt){var Pe=Ee==="clippingParents"?function(Rt){var me=Ln(Xi(Rt)),Ge=["absolute","fixed"].indexOf(bn(Rt).position)>=0&&be(Rt)?Da(Rt):Rt;return sa(Ge)?me.filter(function(Qn){return sa(Qn)&&eu(Qn,Ge)&&yn(Qn)!=="body"}):[]}(At):[].concat(Ee),ue=[].concat(Pe,[he]),Gn=ue[0],Wt=ue.reduce(function(Rt,me){var Ge=$i(At,me,Bt);return Rt.top=ua(Ge.top,Rt.top),Rt.right=il(Ge.right,Rt.right),Rt.bottom=il(Ge.bottom,Rt.bottom),Rt.left=ua(Ge.left,Rt.left),Rt},$i(At,Gn,Bt));return Wt.width=Wt.right-Wt.left,Wt.height=Wt.bottom-Wt.top,Wt.x=Wt.left,Wt.y=Wt.top,Wt}(sa(Ot)?Ot:Ot.contextElement||ra(h.elements.popper),k,q,D),yt=nn(h.elements.reference),zt=Ji({reference:yt,element:W,placement:b}),jt=lu(Object.assign({},W,zt)),Mt=ht===Ca?jt:yt,Vt={top:gt.top-Mt.top+Tt.top,bottom:Mt.bottom-gt.bottom+Tt.bottom,left:gt.left-Mt.left+Tt.left,right:Mt.right-gt.right+Tt.right},Ae=h.modifiersData.offset;if(ht===Ca&&Ae){var Xt=Ae[b];Object.keys(Vt).forEach(function(At){var Ee=[Ce,qe].indexOf(At)>=0?1:-1,he=[ye,qe].indexOf(At)>=0?"y":"x";Vt[At]+=Xt[he]*Ee})}return Vt}function Fi(h,i){i===void 0&&(i={});var c=i,p=c.placement,b=c.boundary,E=c.rootBoundary,D=c.padding,j=c.flipVariations,k=c.allowedAutoPlacements,L=k===void 0?ia:k,q=wa(p),B=q?j?Rn:Rn.filter(function(at){return wa(at)===q}):Ze,ht=B.filter(function(at){return L.indexOf(at)>=0});ht.length===0&&(ht=B);var et=ht.reduce(function(at,lt){return at[lt]=Sn(h,{placement:lt,boundary:b,rootBoundary:E,padding:D})[$e(lt)],at},{});return Object.keys(et).sort(function(at,lt){return et[at]-et[lt]})}const iu={name:"flip",enabled:!0,phase:"main",fn:function(h){var i=h.state,c=h.options,p=h.name;if(!i.modifiersData[p]._skip){for(var b=c.mainAxis,E=b===void 0||b,D=c.altAxis,j=D===void 0||D,k=c.fallbackPlacements,L=c.padding,q=c.boundary,B=c.rootBoundary,ht=c.altBoundary,et=c.flipVariations,at=et===void 0||et,lt=c.allowedAutoPlacements,st=i.options.placement,Tt=$e(st),Lt=k||(Tt!==st&&at?function(Rt){if($e(Rt)===ll)return[];var me=ii(Rt);return[si(Rt),me,si(me)]}(st):[ii(st)]),W=[st].concat(Lt).reduce(function(Rt,me){return Rt.concat($e(me)===ll?Fi(i,{placement:me,boundary:q,rootBoundary:B,padding:L,flipVariations:at,allowedAutoPlacements:lt}):me)},[]),Ot=i.rects.reference,gt=i.rects.popper,yt=new Map,zt=!0,jt=W[0],Mt=0;Mt=0,Ee=At?"width":"height",he=Sn(i,{placement:Vt,boundary:q,rootBoundary:B,altBoundary:ht,padding:L}),Bt=At?Xt?Ce:ae:Xt?qe:ye;Ot[Ee]>gt[Ee]&&(Bt=ii(Bt));var Pe=ii(Bt),ue=[];if(E&&ue.push(he[Ae]<=0),j&&ue.push(he[Bt]<=0,he[Pe]<=0),ue.every(function(Rt){return Rt})){jt=Vt,zt=!1;break}yt.set(Vt,ue)}if(zt)for(var Gn=function(Rt){var me=W.find(function(Ge){var Qn=yt.get(Ge);if(Qn)return Qn.slice(0,Rt).every(function(bi){return bi})});if(me)return jt=me,"break"},Wt=at?3:1;Wt>0&&Gn(Wt)!=="break";Wt--);i.placement!==jt&&(i.modifiersData[p]._skip=!0,i.placement=jt,i.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ar(h,i,c){return c===void 0&&(c={x:0,y:0}),{top:h.top-i.height-c.y,right:h.right-i.width+c.x,bottom:h.bottom-i.height+c.y,left:h.left-i.width-c.x}}function Er(h){return[ye,Ce,qe,ae].some(function(i){return h[i]>=0})}const Tr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(h){var i=h.state,c=h.name,p=i.rects.reference,b=i.rects.popper,E=i.modifiersData.preventOverflow,D=Sn(i,{elementContext:"reference"}),j=Sn(i,{altBoundary:!0}),k=Ar(D,p),L=Ar(j,b,E),q=Er(k),B=Er(L);i.modifiersData[c]={referenceClippingOffsets:k,popperEscapeOffsets:L,isReferenceHidden:q,hasPopperEscaped:B},i.attributes.popper=Object.assign({},i.attributes.popper,{"data-popper-reference-hidden":q,"data-popper-escaped":B})}},Wi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(h){var i=h.state,c=h.options,p=h.name,b=c.offset,E=b===void 0?[0,0]:b,D=ia.reduce(function(q,B){return q[B]=function(ht,et,at){var lt=$e(ht),st=[ae,ye].indexOf(lt)>=0?-1:1,Tt=typeof at=="function"?at(Object.assign({},et,{placement:ht})):at,Lt=Tt[0],W=Tt[1];return Lt=Lt||0,W=(W||0)*st,[ae,Ce].indexOf(lt)>=0?{x:W,y:Lt}:{x:Lt,y:W}}(B,i.rects,E),q},{}),j=D[i.placement],k=j.x,L=j.y;i.modifiersData.popperOffsets!=null&&(i.modifiersData.popperOffsets.x+=k,i.modifiersData.popperOffsets.y+=L),i.modifiersData[p]=D}},su={name:"popperOffsets",enabled:!0,phase:"read",fn:function(h){var i=h.state,c=h.name;i.modifiersData[c]=Ji({reference:i.rects.reference,element:i.rects.popper,placement:i.placement})},data:{}},Or={name:"preventOverflow",enabled:!0,phase:"main",fn:function(h){var i=h.state,c=h.options,p=h.name,b=c.mainAxis,E=b===void 0||b,D=c.altAxis,j=D!==void 0&&D,k=c.boundary,L=c.rootBoundary,q=c.altBoundary,B=c.padding,ht=c.tether,et=ht===void 0||ht,at=c.tetherOffset,lt=at===void 0?0:at,st=Sn(i,{boundary:k,rootBoundary:L,padding:B,altBoundary:q}),Tt=$e(i.placement),Lt=wa(i.placement),W=!Lt,Ot=ni(Tt),gt=Ot==="x"?"y":"x",yt=i.modifiersData.popperOffsets,zt=i.rects.reference,jt=i.rects.popper,Mt=typeof lt=="function"?lt(Object.assign({},i.rects,{placement:i.placement})):lt,Vt=typeof Mt=="number"?{mainAxis:Mt,altAxis:Mt}:Object.assign({mainAxis:0,altAxis:0},Mt),Ae=i.modifiersData.offset?i.modifiersData.offset[i.placement]:null,Xt={x:0,y:0};if(yt){if(E){var At,Ee=Ot==="y"?ye:ae,he=Ot==="y"?qe:Ce,Bt=Ot==="y"?"height":"width",Pe=yt[Ot],ue=Pe+st[Ee],Gn=Pe-st[he],Wt=et?-jt[Bt]/2:0,Rt=Lt===Ke?zt[Bt]:jt[Bt],me=Lt===Ke?-jt[Bt]:-zt[Bt],Ge=i.elements.arrow,Qn=et&&Ge?tu(Ge):{width:0,height:0},bi=i.modifiersData["arrow#persistent"]?i.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Cu=bi[Ee],Du=bi[he],El=_n(0,zt[Bt],Qn[Bt]),nc=W?zt[Bt]/2-Wt-El-Cu-Vt.mainAxis:Rt-El-Cu-Vt.mainAxis,Mo=W?-zt[Bt]/2+Wt+El+Du+Vt.mainAxis:me+El+Du+Vt.mainAxis,ys=i.elements.arrow&&Da(i.elements.arrow),ac=ys?Ot==="y"?ys.clientTop||0:ys.clientLeft||0:0,Mu=(At=Ae==null?void 0:Ae[Ot])!=null?At:0,wu=Pe+Mo-Mu,zu=_n(et?il(ue,Pe+nc-Mu-ac):ue,Pe,et?ua(Gn,wu):Gn);yt[Ot]=zu,Xt[Ot]=zu-Pe}if(j){var Nu,lc=Ot==="x"?ye:ae,ic=Ot==="x"?qe:Ce,pa=yt[gt],bs=gt==="y"?"height":"width",Ru=pa+st[lc],qa=pa-st[ic],_s=[ye,ae].indexOf(Tt)!==-1,_i=(Nu=Ae==null?void 0:Ae[gt])!=null?Nu:0,Si=_s?Ru:pa-zt[bs]-jt[bs]-_i+Vt.altAxis,ju=_s?pa+zt[bs]+jt[bs]-_i-Vt.altAxis:qa,Ss=et&&_s?function(sc,uc,As){var Lu=_n(sc,uc,As);return Lu>As?As:Lu}(Si,pa,ju):_n(et?Si:Ru,pa,et?ju:qa);yt[gt]=Ss,Xt[gt]=Ss-pa}i.modifiersData[p]=Xt}},requiresIfExists:["offset"]};function oo(h,i,c){c===void 0&&(c=!1);var p,b,E=be(i),D=be(i)&&function(B){var ht=B.getBoundingClientRect(),et=en(ht.width)/B.offsetWidth||1,at=en(ht.height)/B.offsetHeight||1;return et!==1||at!==1}(i),j=ra(i),k=nn(h,D,c),L={scrollLeft:0,scrollTop:0},q={x:0,y:0};return(E||!E&&!c)&&((yn(i)!=="body"||jn(j))&&(L=(p=i)!==fe(p)&&be(p)?{scrollLeft:(b=p).scrollLeft,scrollTop:b.scrollTop}:Ki(p)),be(i)?((q=nn(i,!0)).x+=i.clientLeft,q.y+=i.clientTop):j&&(q.x=de(j))),{x:k.left+L.scrollLeft-q.x,y:k.top+L.scrollTop-q.y,width:k.width,height:k.height}}function fo(h){var i=new Map,c=new Set,p=[];function b(E){c.add(E.name),[].concat(E.requires||[],E.requiresIfExists||[]).forEach(function(D){if(!c.has(D)){var j=i.get(D);j&&b(j)}}),p.push(E)}return h.forEach(function(E){i.set(E.name,E)}),h.forEach(function(E){c.has(E.name)||b(E)}),p}var xr={placement:"bottom",modifiers:[],strategy:"absolute"};function uu(){for(var h=arguments.length,i=new Array(h),c=0;cNumber.parseInt(c,10)):typeof i=="function"?c=>i(c,this._element):i}_getPopperConfig(){const i={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(vt.setDataAttribute(this._menu,"popper","static"),i.modifiers=[{name:"applyStyles",enabled:!1}]),{...i,...it(this._config.popperConfig,[i])}}_selectMenuItem({key:i,target:c}){const p=$.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(b=>U(b));p.length&&ee(p,c,i===Mr,!p.includes(c)).focus()}static jQueryInterface(i){return this.each(function(){const c=ln.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i]()}})}static clearMenus(i){if(i.button===2||i.type==="keyup"&&i.key!=="Tab")return;const c=$.find(ri);for(const p of c){const b=ln.getInstance(p);if(!b||b._config.autoClose===!1)continue;const E=i.composedPath(),D=E.includes(b._menu);if(E.includes(b._element)||b._config.autoClose==="inside"&&!D||b._config.autoClose==="outside"&&D||b._menu.contains(i.target)&&(i.type==="keyup"&&i.key==="Tab"||/input|select|option|textarea|form/i.test(i.target.tagName)))continue;const j={relatedTarget:b._element};i.type==="click"&&(j.clickEvent=i),b._completeHide(j)}}static dataApiKeydownHandler(i){const c=/input|textarea/i.test(i.target.tagName),p=i.key==="Escape",b=[Dr,Mr].includes(i.key);if(!b&&!p||c&&!p)return;i.preventDefault();const E=this.matches(Un)?this:$.prev(this,Un)[0]||$.next(this,Un)[0]||$.findOne(Un,i.delegateTarget.parentNode),D=ln.getOrCreateInstance(E);if(b)return i.stopPropagation(),D.show(),void D._selectMenuItem(i);D._isShown()&&(i.stopPropagation(),D.hide(),E.focus())}}w.on(document,zr,Un,ln.dataApiKeydownHandler),w.on(document,zr,ts,ln.dataApiKeydownHandler),w.on(document,wr,ln.clearMenus),w.on(document,bo,ln.clearMenus),w.on(document,wr,Un,function(h){h.preventDefault(),ln.getOrCreateInstance(this).toggle()}),ot(ln);const ou="backdrop",fu="show",rl=`mousedown.bs.${ou}`,ci={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Ao={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class oi extends oe{constructor(i){super(),this._config=this._getConfig(i),this._isAppended=!1,this._element=null}static get Default(){return ci}static get DefaultType(){return Ao}static get NAME(){return ou}show(i){if(!this._config.isVisible)return void it(i);this._append();const c=this._getElement();this._config.isAnimated&&tt(c),c.classList.add(fu),this._emulateAnimation(()=>{it(i)})}hide(i){this._config.isVisible?(this._getElement().classList.remove(fu),this._emulateAnimation(()=>{this.dispose(),it(i)})):it(i)}dispose(){this._isAppended&&(w.off(this._element,rl),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const i=document.createElement("div");i.className=this._config.className,this._config.isAnimated&&i.classList.add("fade"),this._element=i}return this._element}_configAfterMerge(i){return i.rootElement=N(i.rootElement),i}_append(){if(this._isAppended)return;const i=this._getElement();this._config.rootElement.append(i),w.on(i,rl,()=>{it(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(i){Ct(i,this._getElement(),this._config.isAnimated)}}const fi=".bs.focustrap",Hr=`focusin${fi}`,du=`keydown.tab${fi}`,es="backward",qr={autofocus:!0,trapElement:null},Br={autofocus:"boolean",trapElement:"element"};class hu extends oe{constructor(i){super(),this._config=this._getConfig(i),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return qr}static get DefaultType(){return Br}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),w.off(document,fi),w.on(document,Hr,i=>this._handleFocusin(i)),w.on(document,du,i=>this._handleKeydown(i)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,w.off(document,fi))}_handleFocusin(i){const{trapElement:c}=this._config;if(i.target===document||i.target===c||c.contains(i.target))return;const p=$.focusableChildren(c);p.length===0?c.focus():this._lastTabNavDirection===es?p[p.length-1].focus():p[0].focus()}_handleKeydown(i){i.key==="Tab"&&(this._lastTabNavDirection=i.shiftKey?es:"forward")}}const Yr=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",kr=".sticky-top",ns="padding-right",Xr="margin-right";class mu{constructor(){this._element=document.body}getWidth(){const i=document.documentElement.clientWidth;return Math.abs(window.innerWidth-i)}hide(){const i=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,ns,c=>c+i),this._setElementAttributes(Yr,ns,c=>c+i),this._setElementAttributes(kr,Xr,c=>c-i)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ns),this._resetElementAttributes(Yr,ns),this._resetElementAttributes(kr,Xr)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(i,c,p){const b=this.getWidth();this._applyManipulationCallback(i,E=>{if(E!==this._element&&window.innerWidth>E.clientWidth+b)return;this._saveInitialAttribute(E,c);const D=window.getComputedStyle(E).getPropertyValue(c);E.style.setProperty(c,`${p(Number.parseFloat(D))}px`)})}_saveInitialAttribute(i,c){const p=i.style.getPropertyValue(c);p&&vt.setDataAttribute(i,c,p)}_resetElementAttributes(i,c){this._applyManipulationCallback(i,p=>{const b=vt.getDataAttribute(p,c);b!==null?(vt.removeDataAttribute(p,c),p.style.setProperty(c,b)):p.style.removeProperty(c)})}_applyManipulationCallback(i,c){if(x(i))c(i);else for(const p of $.find(i,this._element))c(p)}}const kt=".bs.modal",di=`hide${kt}`,Gr=`hidePrevented${kt}`,gu=`hidden${kt}`,pu=`show${kt}`,Qr=`shown${kt}`,vu=`resize${kt}`,Eo=`click.dismiss${kt}`,To=`mousedown.dismiss${kt}`,cl=`keydown.dismiss${kt}`,yu=`click${kt}.data-api`,ol="modal-open",as="show",ls="modal-static",Ra={backdrop:!0,focus:!0,keyboard:!0},fl={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Hn extends je{constructor(i,c){super(i,c),this._dialog=$.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new mu,this._addEventListeners()}static get Default(){return Ra}static get DefaultType(){return fl}static get NAME(){return"modal"}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){this._isShown||this._isTransitioning||w.trigger(this._element,pu,{relatedTarget:i}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(ol),this._adjustDialog(),this._backdrop.show(()=>this._showElement(i)))}hide(){this._isShown&&!this._isTransitioning&&(w.trigger(this._element,di).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(as),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){w.off(window,kt),w.off(this._dialog,kt),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new oi({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new hu({trapElement:this._element})}_showElement(i){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const c=$.findOne(".modal-body",this._dialog);c&&(c.scrollTop=0),tt(this._element),this._element.classList.add(as),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,w.trigger(this._element,Qr,{relatedTarget:i})},this._dialog,this._isAnimated())}_addEventListeners(){w.on(this._element,cl,i=>{i.key==="Escape"&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),w.on(window,vu,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),w.on(this._element,To,i=>{w.one(this._element,Eo,c=>{this._element===i.target&&this._element===c.target&&(this._config.backdrop!=="static"?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(ol),this._resetAdjustments(),this._scrollBar.reset(),w.trigger(this._element,gu)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(w.trigger(this._element,Gr).defaultPrevented)return;const i=this._element.scrollHeight>document.documentElement.clientHeight,c=this._element.style.overflowY;c==="hidden"||this._element.classList.contains(ls)||(i||(this._element.style.overflowY="hidden"),this._element.classList.add(ls),this._queueCallback(()=>{this._element.classList.remove(ls),this._queueCallback(()=>{this._element.style.overflowY=c},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const i=this._element.scrollHeight>document.documentElement.clientHeight,c=this._scrollBar.getWidth(),p=c>0;if(p&&!i){const b=rt()?"paddingLeft":"paddingRight";this._element.style[b]=`${c}px`}if(!p&&i){const b=rt()?"paddingRight":"paddingLeft";this._element.style[b]=`${c}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(i,c){return this.each(function(){const p=Hn.getOrCreateInstance(this,i);if(typeof i=="string"){if(p[i]===void 0)throw new TypeError(`No method named "${i}"`);p[i](c)}})}}w.on(document,yu,'[data-bs-toggle="modal"]',function(h){const i=$.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&h.preventDefault(),w.one(i,pu,p=>{p.defaultPrevented||w.one(i,gu,()=>{U(this)&&this.focus()})});const c=$.findOne(".modal.show");c&&Hn.getInstance(c).hide(),Hn.getOrCreateInstance(i).toggle(this)}),Kt(Hn),ot(Hn);const An=".bs.offcanvas",ca=".data-api",Vr=`load${An}${ca}`,bu="show",_u="showing",Zr="hiding",Kr=".offcanvas.show",Oo=`show${An}`,$r=`shown${An}`,Jr=`hide${An}`,Su=`hidePrevented${An}`,Je=`hidden${An}`,Fe=`resize${An}`,dl=`click${An}${ca}`,Au=`keydown.dismiss${An}`,is={backdrop:!0,keyboard:!0,scroll:!1},ss={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class sn extends je{constructor(i,c){super(i,c),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return is}static get DefaultType(){return ss}static get NAME(){return"offcanvas"}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){this._isShown||w.trigger(this._element,Oo,{relatedTarget:i}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||new mu().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(_u),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(bu),this._element.classList.remove(_u),w.trigger(this._element,$r,{relatedTarget:i})},this._element,!0))}hide(){this._isShown&&(w.trigger(this._element,Jr).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Zr),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(bu,Zr),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new mu().reset(),w.trigger(this._element,Je)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const i=!!this._config.backdrop;return new oi({className:"offcanvas-backdrop",isVisible:i,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:i?()=>{this._config.backdrop!=="static"?this.hide():w.trigger(this._element,Su)}:null})}_initializeFocusTrap(){return new hu({trapElement:this._element})}_addEventListeners(){w.on(this._element,Au,i=>{i.key==="Escape"&&(this._config.keyboard?this.hide():w.trigger(this._element,Su))})}static jQueryInterface(i){return this.each(function(){const c=sn.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i](this)}})}}w.on(document,dl,'[data-bs-toggle="offcanvas"]',function(h){const i=$.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&h.preventDefault(),X(this))return;w.one(i,Je,()=>{U(this)&&this.focus()});const c=$.findOne(Kr);c&&c!==i&&sn.getInstance(c).hide(),sn.getOrCreateInstance(i).toggle(this)}),w.on(window,Vr,()=>{for(const h of $.find(Kr))sn.getOrCreateInstance(h).show()}),w.on(window,Fe,()=>{for(const h of $.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(h).position!=="fixed"&&sn.getOrCreateInstance(h).hide()}),Kt(sn),ot(sn);const qn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Fr=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),us=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,hl=(h,i)=>{const c=h.nodeName.toLowerCase();return i.includes(c)?!Fr.has(c)||!!us.test(h.nodeValue):i.filter(p=>p instanceof RegExp).some(p=>p.test(c))},Wr={allowList:qn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},We={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ml={entry:"(string|element|function|null)",selector:"(string|element)"};class gl extends oe{constructor(i){super(),this._config=this._getConfig(i)}static get Default(){return Wr}static get DefaultType(){return We}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(i=>this._resolvePossibleFunction(i)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(i){return this._checkContent(i),this._config.content={...this._config.content,...i},this}toHtml(){const i=document.createElement("div");i.innerHTML=this._maybeSanitize(this._config.template);for(const[b,E]of Object.entries(this._config.content))this._setContent(i,E,b);const c=i.children[0],p=this._resolvePossibleFunction(this._config.extraClass);return p&&c.classList.add(...p.split(" ")),c}_typeCheckConfig(i){super._typeCheckConfig(i),this._checkContent(i.content)}_checkContent(i){for(const[c,p]of Object.entries(i))super._typeCheckConfig({selector:c,entry:p},ml)}_setContent(i,c,p){const b=$.findOne(p,i);b&&((c=this._resolvePossibleFunction(c))?x(c)?this._putElementInTemplate(N(c),b):this._config.html?b.innerHTML=this._maybeSanitize(c):b.textContent=c:b.remove())}_maybeSanitize(i){return this._config.sanitize?function(c,p,b){if(!c.length)return c;if(b&&typeof b=="function")return b(c);const E=new window.DOMParser().parseFromString(c,"text/html"),D=[].concat(...E.body.querySelectorAll("*"));for(const j of D){const k=j.nodeName.toLowerCase();if(!Object.keys(p).includes(k)){j.remove();continue}const L=[].concat(...j.attributes),q=[].concat(p["*"]||[],p[k]||[]);for(const B of L)hl(B,q)||j.removeAttribute(B.nodeName)}return E.body.innerHTML}(i,this._config.allowList,this._config.sanitizeFn):i}_resolvePossibleFunction(i){return it(i,[this])}_putElementInTemplate(i,c){if(this._config.html)return c.innerHTML="",void c.append(i);c.textContent=i.textContent}}const rs=new Set(["sanitize","allowList","sanitizeFn"]),pl="fade",_e="show",Ye=".modal",oa="hide.bs.modal",ke="hover",un="focus",ja={AUTO:"auto",TOP:"top",RIGHT:rt()?"left":"right",BOTTOM:"bottom",LEFT:rt()?"right":"left"},Pr={allowList:qn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Eu={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Bn extends je{constructor(i,c){if(Ii===void 0)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(i,c),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Pr}static get DefaultType(){return Eu}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),w.off(this._element.closest(Ye),oa,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const i=w.trigger(this._element,this.constructor.eventName("show")),c=(Z(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(i.defaultPrevented||!c)return;this._disposePopper();const p=this._getTipElement();this._element.setAttribute("aria-describedby",p.getAttribute("id"));const{container:b}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(b.append(p),w.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(p),p.classList.add(_e),"ontouchstart"in document.documentElement)for(const E of[].concat(...document.body.children))w.on(E,"mouseover",Q);this._queueCallback(()=>{w.trigger(this._element,this.constructor.eventName("shown")),this._isHovered===!1&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!w.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(_e),"ontouchstart"in document.documentElement)for(const i of[].concat(...document.body.children))w.off(i,"mouseover",Q);this._activeTrigger.click=!1,this._activeTrigger[un]=!1,this._activeTrigger[ke]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),w.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(i){const c=this._getTemplateFactory(i).toHtml();if(!c)return null;c.classList.remove(pl,_e),c.classList.add(`bs-${this.constructor.NAME}-auto`);const p=(b=>{do b+=Math.floor(1e6*Math.random());while(document.getElementById(b));return b})(this.constructor.NAME).toString();return c.setAttribute("id",p),this._isAnimated()&&c.classList.add(pl),c}setContent(i){this._newContent=i,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(i){return this._templateFactory?this._templateFactory.changeContent(i):this._templateFactory=new gl({...this._config,content:i,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(i){return this.constructor.getOrCreateInstance(i.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(pl)}_isShown(){return this.tip&&this.tip.classList.contains(_e)}_createPopper(i){const c=it(this._config.placement,[this,i,this._element]),p=ja[c.toUpperCase()];return ru(this._element,i,this._getPopperConfig(p))}_getOffset(){const{offset:i}=this._config;return typeof i=="string"?i.split(",").map(c=>Number.parseInt(c,10)):typeof i=="function"?c=>i(c,this._element):i}_resolvePossibleFunction(i){return it(i,[this._element])}_getPopperConfig(i){const c={placement:i,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:p=>{this._getTipElement().setAttribute("data-popper-placement",p.state.placement)}}]};return{...c,...it(this._config.popperConfig,[c])}}_setListeners(){const i=this._config.trigger.split(" ");for(const c of i)if(c==="click")w.on(this._element,this.constructor.eventName("click"),this._config.selector,p=>{this._initializeOnDelegatedTarget(p).toggle()});else if(c!=="manual"){const p=c===ke?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),b=c===ke?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");w.on(this._element,p,this._config.selector,E=>{const D=this._initializeOnDelegatedTarget(E);D._activeTrigger[E.type==="focusin"?un:ke]=!0,D._enter()}),w.on(this._element,b,this._config.selector,E=>{const D=this._initializeOnDelegatedTarget(E);D._activeTrigger[E.type==="focusout"?un:ke]=D._element.contains(E.relatedTarget),D._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},w.on(this._element.closest(Ye),oa,this._hideModalHandler)}_fixTitle(){const i=this._element.getAttribute("title");i&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",i),this._element.setAttribute("data-bs-original-title",i),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(i,c){clearTimeout(this._timeout),this._timeout=setTimeout(i,c)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(i){const c=vt.getDataAttributes(this._element);for(const p of Object.keys(c))rs.has(p)&&delete c[p];return i={...c,...typeof i=="object"&&i?i:{}},i=this._mergeConfigObj(i),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}_configAfterMerge(i){return i.container=i.container===!1?document.body:N(i.container),typeof i.delay=="number"&&(i.delay={show:i.delay,hide:i.delay}),typeof i.title=="number"&&(i.title=i.title.toString()),typeof i.content=="number"&&(i.content=i.content.toString()),i}_getDelegateConfig(){const i={};for(const[c,p]of Object.entries(this._config))this.constructor.Default[c]!==p&&(i[c]=p);return i.selector=!1,i.trigger="manual",i}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(i){return this.each(function(){const c=Bn.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i]()}})}}ot(Bn);const Se={...Bn.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},ce={...Bn.DefaultType,content:"(null|string|element|function)"};class _t extends Bn{static get Default(){return Se}static get DefaultType(){return ce}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(i){return this.each(function(){const c=_t.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i]()}})}}ot(_t);const Xe=".bs.scrollspy",En=`activate${Xe}`,cs=`click${Xe}`,La=`load${Xe}.data-api`,Ua="active",os="[href]",vl=".nav-link",hi=`${vl}, .nav-item > ${vl}, .list-group-item`,mi={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},gi={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class yl extends je{constructor(i,c){super(i,c),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return mi}static get DefaultType(){return gi}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const i of this._observableSections.values())this._observer.observe(i)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(i){return i.target=N(i.target)||document.body,i.rootMargin=i.offset?`${i.offset}px 0px -30%`:i.rootMargin,typeof i.threshold=="string"&&(i.threshold=i.threshold.split(",").map(c=>Number.parseFloat(c))),i}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(w.off(this._config.target,cs),w.on(this._config.target,cs,os,i=>{const c=this._observableSections.get(i.target.hash);if(c){i.preventDefault();const p=this._rootElement||window,b=c.offsetTop-this._element.offsetTop;if(p.scrollTo)return void p.scrollTo({top:b,behavior:"smooth"});p.scrollTop=b}}))}_getNewObserver(){const i={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(c=>this._observerCallback(c),i)}_observerCallback(i){const c=D=>this._targetLinks.get(`#${D.target.id}`),p=D=>{this._previousScrollData.visibleEntryTop=D.target.offsetTop,this._process(c(D))},b=(this._rootElement||document.documentElement).scrollTop,E=b>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=b;for(const D of i){if(!D.isIntersecting){this._activeTarget=null,this._clearActiveClass(c(D));continue}const j=D.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(E&&j){if(p(D),!b)return}else E||j||p(D)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const i=$.find(os,this._config.target);for(const c of i){if(!c.hash||X(c))continue;const p=$.findOne(decodeURI(c.hash),this._element);U(p)&&(this._targetLinks.set(decodeURI(c.hash),c),this._observableSections.set(c.hash,p))}}_process(i){this._activeTarget!==i&&(this._clearActiveClass(this._config.target),this._activeTarget=i,i.classList.add(Ua),this._activateParents(i),w.trigger(this._element,En,{relatedTarget:i}))}_activateParents(i){if(i.classList.contains("dropdown-item"))$.findOne(".dropdown-toggle",i.closest(".dropdown")).classList.add(Ua);else for(const c of $.parents(i,".nav, .list-group"))for(const p of $.prev(c,hi))p.classList.add(Ua)}_clearActiveClass(i){i.classList.remove(Ua);const c=$.find(`${os}.${Ua}`,i);for(const p of c)p.classList.remove(Ua)}static jQueryInterface(i){return this.each(function(){const c=yl.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i]()}})}}w.on(window,La,()=>{for(const h of $.find('[data-bs-spy="scroll"]'))yl.getOrCreateInstance(h)}),ot(yl);const Yn=".bs.tab",Ir=`hide${Yn}`,fs=`hidden${Yn}`,tc=`show${Yn}`,pi=`shown${Yn}`,ec=`click${Yn}`,bl=`keydown${Yn}`,vi=`load${Yn}`,ds="ArrowLeft",_l="ArrowRight",hs="ArrowUp",Tu="ArrowDown",ms="Home",fa="End",da="active",Ha="fade",Sl="show",Ou=".dropdown-toggle",yi=`:not(${Ou})`,gs='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Me=`.nav-link${yi}, .list-group-item${yi}, [role="tab"]${yi}, ${gs}`,Tn=`.${da}[data-bs-toggle="tab"], .${da}[data-bs-toggle="pill"], .${da}[data-bs-toggle="list"]`;class we extends je{constructor(i){super(i),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),w.on(this._element,bl,c=>this._keydown(c)))}static get NAME(){return"tab"}show(){const i=this._element;if(this._elemIsActive(i))return;const c=this._getActiveElem(),p=c?w.trigger(c,Ir,{relatedTarget:i}):null;w.trigger(i,tc,{relatedTarget:c}).defaultPrevented||p&&p.defaultPrevented||(this._deactivate(c,i),this._activate(i,c))}_activate(i,c){i&&(i.classList.add(da),this._activate($.getElementFromSelector(i)),this._queueCallback(()=>{i.getAttribute("role")==="tab"?(i.removeAttribute("tabindex"),i.setAttribute("aria-selected",!0),this._toggleDropDown(i,!0),w.trigger(i,pi,{relatedTarget:c})):i.classList.add(Sl)},i,i.classList.contains(Ha)))}_deactivate(i,c){i&&(i.classList.remove(da),i.blur(),this._deactivate($.getElementFromSelector(i)),this._queueCallback(()=>{i.getAttribute("role")==="tab"?(i.setAttribute("aria-selected",!1),i.setAttribute("tabindex","-1"),this._toggleDropDown(i,!1),w.trigger(i,fs,{relatedTarget:c})):i.classList.remove(Sl)},i,i.classList.contains(Ha)))}_keydown(i){if(![ds,_l,hs,Tu,ms,fa].includes(i.key))return;i.stopPropagation(),i.preventDefault();const c=this._getChildren().filter(b=>!X(b));let p;if([ms,fa].includes(i.key))p=c[i.key===ms?0:c.length-1];else{const b=[_l,Tu].includes(i.key);p=ee(c,i.target,b,!0)}p&&(p.focus({preventScroll:!0}),we.getOrCreateInstance(p).show())}_getChildren(){return $.find(Me,this._parent)}_getActiveElem(){return this._getChildren().find(i=>this._elemIsActive(i))||null}_setInitialAttributes(i,c){this._setAttributeIfNotExists(i,"role","tablist");for(const p of c)this._setInitialAttributesOnChild(p)}_setInitialAttributesOnChild(i){i=this._getInnerElement(i);const c=this._elemIsActive(i),p=this._getOuterElement(i);i.setAttribute("aria-selected",c),p!==i&&this._setAttributeIfNotExists(p,"role","presentation"),c||i.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(i,"role","tab"),this._setInitialAttributesOnTargetPanel(i)}_setInitialAttributesOnTargetPanel(i){const c=$.getElementFromSelector(i);c&&(this._setAttributeIfNotExists(c,"role","tabpanel"),i.id&&this._setAttributeIfNotExists(c,"aria-labelledby",`${i.id}`))}_toggleDropDown(i,c){const p=this._getOuterElement(i);if(!p.classList.contains("dropdown"))return;const b=(E,D)=>{const j=$.findOne(E,p);j&&j.classList.toggle(D,c)};b(Ou,da),b(".dropdown-menu",Sl),p.setAttribute("aria-expanded",c)}_setAttributeIfNotExists(i,c,p){i.hasAttribute(c)||i.setAttribute(c,p)}_elemIsActive(i){return i.classList.contains(da)}_getInnerElement(i){return i.matches(Me)?i:$.findOne(Me,i)}_getOuterElement(i){return i.closest(".nav-item, .list-group-item")||i}static jQueryInterface(i){return this.each(function(){const c=we.getOrCreateInstance(this);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i]()}})}}w.on(document,ec,gs,function(h){["A","AREA"].includes(this.tagName)&&h.preventDefault(),X(this)||we.getOrCreateInstance(this).show()}),w.on(window,vi,()=>{for(const h of $.find(Tn))we.getOrCreateInstance(h)}),ot(we);const kn=".bs.toast",ha=`mouseover${kn}`,Xn=`mouseout${kn}`,le=`focusin${kn}`,ps=`focusout${kn}`,xo=`hide${kn}`,Co=`hidden${kn}`,Do=`show${kn}`,ie=`shown${kn}`,vs="hide",ma="show",ga="showing",xu={animation:"boolean",autohide:"boolean",delay:"number"},Al={animation:!0,autohide:!0,delay:5e3};class On extends je{constructor(i,c){super(i,c),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Al}static get DefaultType(){return xu}static get NAME(){return"toast"}show(){w.trigger(this._element,Do).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(vs),tt(this._element),this._element.classList.add(ma,ga),this._queueCallback(()=>{this._element.classList.remove(ga),w.trigger(this._element,ie),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(w.trigger(this._element,xo).defaultPrevented||(this._element.classList.add(ga),this._queueCallback(()=>{this._element.classList.add(vs),this._element.classList.remove(ga,ma),w.trigger(this._element,Co)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ma),super.dispose()}isShown(){return this._element.classList.contains(ma)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(i,c){switch(i.type){case"mouseover":case"mouseout":this._hasMouseInteraction=c;break;case"focusin":case"focusout":this._hasKeyboardInteraction=c}if(c)return void this._clearTimeout();const p=i.relatedTarget;this._element===p||this._element.contains(p)||this._maybeScheduleHide()}_setListeners(){w.on(this._element,ha,i=>this._onInteraction(i,!0)),w.on(this._element,Xn,i=>this._onInteraction(i,!1)),w.on(this._element,le,i=>this._onInteraction(i,!0)),w.on(this._element,ps,i=>this._onInteraction(i,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(i){return this.each(function(){const c=On.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i](this)}})}}return Kt(On),ot(On),{Alert:Ve,Button:ta,Carousel:Ta,Collapse:la,Dropdown:ln,Modal:Hn,Offcanvas:sn,Popover:_t,ScrollSpy:yl,Tab:we,Toast:On,Tooltip:Bn}})}(Xc)),Xc.exports}F0();var Ff={exports:{}},Wf,$m;function W0(){if($m)return Wf;$m=1;var u="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Wf=u,Wf}var Pf,Jm;function P0(){if(Jm)return Pf;Jm=1;var u=W0();function r(){}function f(){}return f.resetWarningCache=r,Pf=function(){function o(S,x,N,U,X,Z){if(Z!==u){var Q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw Q.name="Invariant Violation",Q}}o.isRequired=o;function m(){return o}var v={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:m,element:o,elementType:o,instanceOf:m,node:o,objectOf:m,oneOf:m,oneOfType:m,shape:m,exact:m,checkPropTypes:f,resetWarningCache:r};return v.PropTypes=v,v},Pf}var Fm;function I0(){return Fm||(Fm=1,Ff.exports=P0()()),Ff.exports}var tv=I0();const K=wg(tv),Ng=u=>G.jsx("main",{className:"container justify-content-center",children:u.children});Ng.propTypes={children:K.node};function Rg(u,r){const f=F.useRef(r);F.useEffect(function(){r!==f.current&&u.attributionControl!=null&&(f.current!=null&&u.attributionControl.removeAttribution(f.current),r!=null&&u.attributionControl.addAttribution(r)),f.current=r},[u,r])}function ev(u,r,f){r.center!==f.center&&u.setLatLng(r.center),r.radius!=null&&r.radius!==f.radius&&u.setRadius(r.radius)}var nv=zg();const av=1;function lv(u){return Object.freeze({__version:av,map:u})}function iv(u,r){return Object.freeze({...u,...r})}const Od=F.createContext(null);function xd(){const u=F.use(Od);if(u==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return u}function sv(u){function r(f,o){const{instance:m,context:v}=u(f).current;F.useImperativeHandle(o,()=>m);const{children:S}=f;return S==null?null:Ri.createElement(Od,{value:v},S)}return F.forwardRef(r)}function uv(u){function r(f,o){const[m,v]=F.useState(!1),{instance:S}=u(f,v).current;F.useImperativeHandle(o,()=>S),F.useEffect(function(){m&&S.update()},[S,m,f.children]);const x=S._contentNode;return x?nv.createPortal(f.children,x):null}return F.forwardRef(r)}function rv(u){function r(f,o){const{instance:m}=u(f).current;return F.useImperativeHandle(o,()=>m),null}return F.forwardRef(r)}function Cd(u,r){const f=F.useRef(void 0);F.useEffect(function(){return r!=null&&u.instance.on(r),f.current=r,function(){f.current!=null&&u.instance.off(f.current),f.current=null}},[u,r])}function $c(u,r){const f=u.pane??r.pane;return f?{...u,pane:f}:u}function cv(u,r){return function(o,m){const v=xd(),S=u($c(o,v),v);return Rg(v.map,o.attribution),Cd(S.current,o.eventHandlers),r(S.current,v,o,m),S}}var Jc=L0();function Dd(u,r,f){return Object.freeze({instance:u,context:r,container:f})}function Md(u,r){return r==null?function(o,m){const v=F.useRef(void 0);return v.current||(v.current=u(o,m)),v}:function(o,m){const v=F.useRef(void 0);v.current||(v.current=u(o,m));const S=F.useRef(o),{instance:x}=v.current;return F.useEffect(function(){S.current!==o&&(r(x,o,S.current),S.current=o)},[x,o,r]),v}}function jg(u,r){F.useEffect(function(){return(r.layerContainer??r.map).addLayer(u.instance),function(){var v;(v=r.layerContainer)==null||v.removeLayer(u.instance),r.map.removeLayer(u.instance)}},[r,u])}function ov(u){return function(f){const o=xd(),m=u($c(f,o),o);return Rg(o.map,f.attribution),Cd(m.current,f.eventHandlers),jg(m.current,o),m}}function fv(u,r){const f=F.useRef(void 0);F.useEffect(function(){if(r.pathOptions!==f.current){const m=r.pathOptions??{};u.instance.setStyle(m),f.current=m}},[u,r])}function dv(u){return function(f){const o=xd(),m=u($c(f,o),o);return Cd(m.current,f.eventHandlers),jg(m.current,o),fv(m.current,f),m}}function hv(u,r){const f=Md(u),o=cv(f,r);return uv(o)}function mv(u,r){const f=Md(u,r),o=dv(f);return sv(o)}function gv(u,r){const f=Md(u,r),o=ov(f);return rv(o)}function pv(u,r,f){const{opacity:o,zIndex:m}=r;o!=null&&o!==f.opacity&&u.setOpacity(o),m!=null&&m!==f.zIndex&&u.setZIndex(m)}const Wm=mv(function({center:r,children:f,...o},m){const v=new Jc.Circle(r,o);return Dd(v,iv(m,{overlayContainer:v}))},ev);function vv({bounds:u,boundsOptions:r,center:f,children:o,className:m,id:v,placeholder:S,style:x,whenReady:N,zoom:U,...X},Z){const[Q]=F.useState({className:m,id:v,style:x}),[tt,ct]=F.useState(null),Et=F.useRef(void 0);F.useImperativeHandle(Z,()=>(tt==null?void 0:tt.map)??null,[tt]);const rt=F.useCallback(it=>{if(it!==null&&!Et.current){const Ct=new Jc.Map(it,X);Et.current=Ct,f!=null&&U!=null?Ct.setView(f,U):u!=null&&Ct.fitBounds(u,r),N!=null&&Ct.whenReady(N),ct(lv(Ct))}},[]);F.useEffect(()=>()=>{tt==null||tt.map.remove()},[tt]);const ot=tt?Ri.createElement(Od,{value:tt},o):S??null;return Ri.createElement("div",{...Q,ref:rt},ot)}const yv=F.forwardRef(vv),bv=hv(function(r,f){const o=new Jc.Popup(r,f.overlayContainer);return Dd(o,f)},function(r,f,{position:o},m){F.useEffect(function(){const{instance:S}=r;function x(U){U.popup===S&&(S.update(),m(!0))}function N(U){U.popup===S&&m(!1)}return f.map.on({popupopen:x,popupclose:N}),f.overlayContainer==null?(o!=null&&S.setLatLng(o),S.openOn(f.map)):f.overlayContainer.bindPopup(S),function(){var X;f.map.off({popupopen:x,popupclose:N}),(X=f.overlayContainer)==null||X.unbindPopup(),f.map.removeLayer(S)}},[r,f,m,o])}),_v=gv(function({url:r,...f},o){const m=new Jc.TileLayer(r,$c(f,o));return Dd(m,o)},function(r,f,o){pv(r,f,o);const{url:m}=f;m!=null&&m!==o.url&&r.setUrl(m)}),Lg=F.createContext(),Ug=({children:u})=>{const[r,f]=F.useState(null),[o,m]=F.useState(!0),[v,S]=F.useState(null);return F.useEffect(()=>{(async()=>{try{const N=await fetch("/config/settings.json");if(!N.ok)throw new Error("Error al cargar settings.json");const U=await N.json();f(U)}catch(N){S(N.message)}finally{m(!1)}})()},[]),G.jsx(Lg.Provider,{value:{config:r,configLoading:o,configError:v},children:u})};Ug.propTypes={children:K.node.isRequired};const mr=()=>F.useContext(Lg),Hg=F.createContext(),Fc=({children:u,config:r})=>{const[f,o]=F.useState(null),[m,v]=F.useState(!0),[S,x]=F.useState(null);return F.useEffect(()=>{(async()=>{try{const U=new URLSearchParams(r.params).toString(),X=`${r.baseUrl}?${U}`,Z=await fetch(X);if(!Z.ok)throw new Error("Error al obtener datos");const Q=await Z.json();o(Q)}catch(U){x(U.message)}finally{v(!1)}})()},[r]),G.jsx(Hg.Provider,{value:{data:f,dataLoading:m,dataError:S},children:u})};Fc.propTypes={children:K.node.isRequired,config:K.shape({baseUrl:K.string.isRequired,params:K.object}).isRequired};const wd=()=>F.useContext(Hg),Sv=({data:u})=>u.map(({lat:r,lng:f,level:o},m)=>{const v=o<20?"#00FF85":o<60?"#FFA500":"#FF0000",S=4,N=400/S;return G.jsxs("div",{children:[[...Array(S)].map((U,X)=>{const Z=N*(X+1),Q=.6*((X+1)/S);return G.jsx(Wm,{center:[r,f],pathOptions:{color:v,fillColor:v,fillOpacity:Q,weight:1},radius:Z},`${m}-${X}`)}),G.jsx(Wm,{center:[r,f],pathOptions:{color:v,fillColor:v,fillOpacity:.8,weight:2},radius:50,children:G.jsxs(bv,{children:["Contaminación: ",o," µg/m³"]})})]},m)}),Av=()=>{const{config:u,configLoading:r,configError:f}=mr();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});const o=u.appConfig.endpoints.baseUrl,m=u.appConfig.endpoints.sensors,v={baseUrl:`${o}/${m}`,params:{}};return G.jsx(Fc,{config:v,children:G.jsx(Ev,{})})},Ev=()=>{const{config:u,configLoading:r,configError:f}=mr(),{data:o,dataLoading:m,dataError:v}=wd();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});if(m)return G.jsx("p",{children:"Cargando datos..."});if(v)return G.jsxs("p",{children:["Error al cargar datos: ",f]});if(!o)return G.jsx("p",{children:"Datos no disponibles."});const S=u==null?void 0:u.userConfig.city,x=o.map(N=>({lat:N.lat,lng:N.lon,level:N.value}));return G.jsx("div",{className:"p-3",children:G.jsxs(yv,{center:S,zoom:13,scrollWheelZoom:!1,style:Tv,children:[G.jsx(_v,{attribution:'© Contribuidores de OpenStreetMap',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),G.jsx(Sv,{data:x})]})})},Tv={height:"500px",width:"100%",borderRadius:"20px"},qg="label";function Pm(u,r){typeof u=="function"?u(r):u&&(u.current=r)}function Ov(u,r){const f=u.options;f&&r&&Object.assign(f,r)}function Bg(u,r){u.labels=r}function Yg(u,r){let f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:qg;const o=[];u.datasets=r.map(m=>{const v=u.datasets.find(S=>S[f]===m[f]);return!v||!m.data||o.includes(v)?{...m}:(o.push(v),Object.assign(v,m),v)})}function xv(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qg;const f={labels:[],datasets:[]};return Bg(f,u.labels),Yg(f,u.datasets,r),f}function Cv(u,r){const{height:f=150,width:o=300,redraw:m=!1,datasetIdKey:v,type:S,data:x,options:N,plugins:U=[],fallbackContent:X,updateMode:Z,...Q}=u,tt=F.useRef(null),ct=F.useRef(null),Et=()=>{tt.current&&(ct.current=new Td(tt.current,{type:S,data:xv(x,v),options:N&&{...N},plugins:U}),Pm(r,ct.current))},rt=()=>{Pm(r,null),ct.current&&(ct.current.destroy(),ct.current=null)};return F.useEffect(()=>{!m&&ct.current&&N&&Ov(ct.current,N)},[m,N]),F.useEffect(()=>{!m&&ct.current&&Bg(ct.current.config.data,x.labels)},[m,x.labels]),F.useEffect(()=>{!m&&ct.current&&x.datasets&&Yg(ct.current.config.data,x.datasets,v)},[m,x.datasets]),F.useEffect(()=>{ct.current&&(m?(rt(),setTimeout(Et)):ct.current.update(Z))},[m,N,x.labels,x.datasets,Z]),F.useEffect(()=>{ct.current&&(rt(),setTimeout(Et))},[S]),F.useEffect(()=>(Et(),()=>rt()),[]),Ri.createElement("canvas",{ref:tt,role:"img",height:f,width:o,...Q},X)}const Dv=F.forwardRef(Cv);function Mv(u,r){return Td.register(r),F.forwardRef((f,o)=>Ri.createElement(Dv,{...f,ref:o,type:u}))}const wv=Mv("line",U0),kg=F.createContext();function Xg({children:u}){const[r,f]=F.useState(()=>localStorage.getItem("theme")||"light");F.useEffect(()=>{document.body.classList.remove("light","dark"),document.body.classList.add(r),localStorage.setItem("theme",r)},[r]);const o=()=>{f(m=>m==="light"?"dark":"light")};return G.jsx(kg.Provider,{value:{theme:r,toggleTheme:o},children:u})}Xg.propTypes={children:K.node.isRequired};function Wc(){return F.useContext(kg)}const zd=({title:u,status:r,children:f,styleMode:o,className:m,titleIcon:v})=>{const S=F.useRef(null),[x,N]=F.useState(u),{theme:U}=Wc();return F.useEffect(()=>{const X=()=>{S.current&&(S.current.offsetWidth<300&&u.length>15?N(u.slice(0,10)+"."):N(u))};return X(),window.addEventListener("resize",X),()=>window.removeEventListener("resize",X)},[u]),G.jsx("div",{ref:S,className:o==="override"?`${m}`:`col-xl-3 col-sm-6 d-flex flex-column align-items-center p-3 card-container ${m}`,children:G.jsxs("div",{className:`card p-3 w-100 ${U}`,children:[G.jsxs("h3",{className:"text-center",children:[v,x]}),G.jsx("div",{className:"card-content",children:f}),r?G.jsx("span",{className:"status text-center mt-2",children:r}):null]})})};zd.propTypes={title:K.string.isRequired,status:K.string.isRequired,children:K.node.isRequired,styleMode:K.oneOf(["override",""]),className:K.string,titleIcon:K.node};zd.defaultProps={styleMode:""};const Nd=({cards:u,className:r})=>G.jsx("div",{className:`row justify-content-center g-0 ${r}`,children:u.map((f,o)=>G.jsx(zd,{title:f.title,status:f.status,styleMode:f.styleMode,className:f.className,titleIcon:f.titleIcon,children:G.jsx("p",{className:"card-text text-center",children:f.content})},o))});Nd.propTypes={cards:K.arrayOf(K.shape({title:K.string.isRequired,content:K.string.isRequired,status:K.string.isRequired})).isRequired,className:K.string};Td.register(H0,q0,B0,Y0,k0);const zv=()=>{const{config:u,configLoading:r,configError:f}=mr();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});const o=u.appConfig.endpoints.baseUrl,m=u.appConfig.endpoints.sensors,v={baseUrl:`${o}/${m}`,params:{}};return G.jsx(Fc,{config:v,children:G.jsx(Gg,{})})},Gg=()=>{var tt,ct,Et,rt;const{config:u}=mr(),{data:r,loading:f}=wd(),{theme:o}=Wc(),m=((ct=(tt=u==null?void 0:u.appConfig)==null?void 0:tt.historyChartConfig)==null?void 0:ct.chartOptionsDark)??{},v=((rt=(Et=u==null?void 0:u.appConfig)==null?void 0:Et.historyChartConfig)==null?void 0:rt.chartOptionsLight)??{},S=o==="dark"?m:v,x=new Date().getHours(),N=[`${x-3}:00`,`${x-2}:00`,`${x-1}:00`,`${x}:00`,`${x+1}:00`,`${x+2}:00`,`${x+3}:00`];if(f)return G.jsx("p",{children:"Cargando datos..."});const U=[],X=[],Z=[];r==null||r.forEach(ot=>{ot.value!=null&&(ot.sensor_type==="MQ-135"?Z.push(ot.value):ot.sensor_type==="DHT-11"&&(U.push(ot.value),X.push(ot.value)))});const Q=[{title:"🌡️ Temperatura",data:U.length?U:[0],borderColor:"#00FF85",backgroundColor:"rgba(0, 255, 133, 0.2)"},{title:"💧 Humedad",data:X.length?X:[0],borderColor:"#00D4FF",backgroundColor:"rgba(0, 212, 255, 0.2)"},{title:"☁️ Contaminación",data:Z.length?Z:[0],borderColor:"#FFA500",backgroundColor:"rgba(255, 165, 0, 0.2)"}];return G.jsx(Nd,{cards:Q.map(({title:ot,data:it,borderColor:Ct,backgroundColor:ee})=>({title:ot,content:G.jsx(wv,{data:{labels:N,datasets:[{data:it,borderColor:Ct,backgroundColor:ee,fill:!0,tension:.4}]},options:S}),styleMode:"override",className:"col-lg-4 col-xxs-12 d-flex flex-column align-items-center p-3 card-container"})),className:""})};Gg.propTypes={options:K.object,timeLabels:K.array,data:K.array};/*! * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2024 Fonticons, Inc. @@ -598,4 +598,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2024 Fonticons, Inc. - */const Z1={prefix:"fas",iconName:"cloud",icon:[640,512,[9729],"f0c2","M0 336c0 79.5 64.5 144 144 144l368 0c70.7 0 128-57.3 128-128c0-61.9-44-113.6-102.4-125.4c4.1-10.7 6.4-22.4 6.4-34.6c0-53-43-96-96-96c-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32C167.6 32 96 103.6 96 192c0 2.7 .1 5.4 .2 8.1C40.2 219.8 0 273.2 0 336z"]},K1={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},$1={prefix:"fas",iconName:"gauge",icon:[512,512,["dashboard","gauge-med","tachometer-alt-average"],"f624","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm320 96c0-26.9-16.5-49.9-40-59.3L280 88c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 204.7c-23.5 9.5-40 32.5-40 59.3c0 35.3 28.7 64 64 64s64-28.7 64-64zM144 176a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm-16 80a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm288 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM400 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},J1={prefix:"fas",iconName:"temperature-empty",icon:[320,512,["temperature-0","thermometer-0","thermometer-empty"],"f2cb","M112 112c0-26.5 21.5-48 48-48s48 21.5 48 48l0 164.5c0 17.3 7.1 31.9 15.3 42.5C233.8 332.6 240 349.5 240 368c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-18.5 6.2-35.4 16.7-48.9c8.2-10.6 15.3-25.2 15.3-42.5L112 112zM160 0C98.1 0 48 50.2 48 112l0 164.4c0 .1-.1 .3-.2 .6c-.2 .6-.8 1.6-1.7 2.8C27.2 304.2 16 334.8 16 368c0 79.5 64.5 144 144 144s144-64.5 144-144c0-33.2-11.2-63.8-30.1-88.1c-.9-1.2-1.5-2.2-1.7-2.8c-.1-.3-.2-.5-.2-.6L272 112C272 50.2 221.9 0 160 0zm0 416a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]},F1=J1,W1={prefix:"fas",iconName:"water",icon:[576,512,[],"f773","M269.5 69.9c11.1-7.9 25.9-7.9 37 0C329 85.4 356.5 96 384 96c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 149.7 417 160 384 160c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4C42.8 92.6 61 83.5 75.3 71.6c11.1-9.5 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 85.2 165.1 96 192 96c27.5 0 55-10.6 77.5-26.1zm37 288C329 373.4 356.5 384 384 384c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 437.7 417 448 384 448c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.4 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 373.2 165.1 384 192 384c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0zm0-144C329 229.4 356.5 240 384 240c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 293.7 417 304 384 304c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.5 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 229.2 165.1 240 192 240c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0z"]},P1={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},I1=P1,xp=()=>{const{config:u,configLoading:r,configError:f}=mr();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});const o=u.appConfig.endpoints.baseUrl,m=u.appConfig.endpoints.sensors,v={baseUrl:`${o}/${m}`,params:{_sort:"timestamp",_order:"desc"}};return G.jsx(Fc,{config:v,children:G.jsx(tb,{})})},tb=()=>{const{data:u}=wd(),r=[{id:1,title:"Temperatura",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:F1})},{id:2,title:"Humedad",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:W1})},{id:3,title:"Contaminación",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:Z1})},{id:4,title:"Presión",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:$1})}];return u&&u.forEach(f=>{f.sensor_type==="MQ-135"?(r[2].content=`${f.value} µg/m³`,r[2].status=f.value>100?"Alta contaminación 😷":"Aire moderado 🌤️"):f.sensor_type==="DHT-11"&&(r[1].content=`${f.humidity}%`,r[1].status=f.humidity>70?"Humedad alta 🌧️":"Nivel normal 🌤️",r[0].content=`${f.temperature}°C`,r[0].status=f.temperature>30?"Calor intenso ☀️":"Clima agradable 🌤️")}),G.jsx(Nd,{cards:r})};xp.propTypes={data:K.array};const eb=()=>G.jsx(G.Fragment,{children:G.jsxs(Ng,{children:[G.jsx(xp,{}),G.jsx(Av,{}),G.jsx(zv,{})]})});function Cp({onClick:u}){return G.jsx("button",{className:"menuBtn",onClick:u,children:G.jsx(kl,{icon:K1})})}Cp.propTypes={onClick:K.func.isRequired};const Dp=({isOpen:u,onClose:r})=>G.jsxs("div",{className:`side-menu ${u?"open":""}`,children:[G.jsx("button",{className:"close-btn",onClick:r,children:G.jsx(kl,{icon:I1})}),G.jsxs("ul",{children:[G.jsx("li",{children:G.jsx("a",{href:"#inicio",children:"ɪɴɪᴄɪᴏ"})}),G.jsx("li",{children:G.jsx("a",{href:"#mapa",children:"ᴍᴀᴘᴀ"})}),G.jsx("li",{children:G.jsx("a",{href:"#historico",children:"ʜɪsᴛᴏʀɪᴄᴏ"})})]})]});Dp.propTypes={isOpen:K.bool.isRequired,onClose:K.func.isRequired};function nb(){const{theme:u,toggleTheme:r}=Wc();return G.jsx("button",{className:"theme-toggle",onClick:r,children:u==="dark"?"☀️":"🌙"})}const Mp=u=>{const{theme:r}=Wc();return G.jsxs("header",{className:`justify-content-center text-center mb-4 ${r}`,children:[G.jsx("h1",{children:u.title}),G.jsx("p",{className:"subtitle",children:u.subtitle})]})};Mp.propTypes={title:K.string.isRequired,subtitle:K.string};const ab=()=>{const[u,r]=F.useState(!1),f=()=>{r(!u)},o=()=>{r(!1)};return G.jsxs(G.Fragment,{children:[G.jsx(Cp,{onClick:f}),G.jsx(Dp,{isOpen:u,onClose:f}),G.jsx(nb,{}),G.jsxs("div",{className:u?"blur m-0 p-0":"m-0 p-0",onClick:o,children:[G.jsx(Mp,{title:"Contamin",subtitle:"Midiendo la calidad del aire y las calles en Sevilla 🌿🚛"}),G.jsx(eb,{})]})]})};$0.createRoot(document.getElementById("root")).render(G.jsx(F.StrictMode,{children:G.jsx(Xg,{children:G.jsx(Ug,{children:G.jsx(ab,{})})})})); + */const Z1={prefix:"fas",iconName:"cloud",icon:[640,512,[9729],"f0c2","M0 336c0 79.5 64.5 144 144 144l368 0c70.7 0 128-57.3 128-128c0-61.9-44-113.6-102.4-125.4c4.1-10.7 6.4-22.4 6.4-34.6c0-53-43-96-96-96c-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32C167.6 32 96 103.6 96 192c0 2.7 .1 5.4 .2 8.1C40.2 219.8 0 273.2 0 336z"]},K1={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},$1={prefix:"fas",iconName:"gauge",icon:[512,512,["dashboard","gauge-med","tachometer-alt-average"],"f624","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm320 96c0-26.9-16.5-49.9-40-59.3L280 88c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 204.7c-23.5 9.5-40 32.5-40 59.3c0 35.3 28.7 64 64 64s64-28.7 64-64zM144 176a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm-16 80a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm288 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM400 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},J1={prefix:"fas",iconName:"temperature-empty",icon:[320,512,["temperature-0","thermometer-0","thermometer-empty"],"f2cb","M112 112c0-26.5 21.5-48 48-48s48 21.5 48 48l0 164.5c0 17.3 7.1 31.9 15.3 42.5C233.8 332.6 240 349.5 240 368c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-18.5 6.2-35.4 16.7-48.9c8.2-10.6 15.3-25.2 15.3-42.5L112 112zM160 0C98.1 0 48 50.2 48 112l0 164.4c0 .1-.1 .3-.2 .6c-.2 .6-.8 1.6-1.7 2.8C27.2 304.2 16 334.8 16 368c0 79.5 64.5 144 144 144s144-64.5 144-144c0-33.2-11.2-63.8-30.1-88.1c-.9-1.2-1.5-2.2-1.7-2.8c-.1-.3-.2-.5-.2-.6L272 112C272 50.2 221.9 0 160 0zm0 416a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]},F1=J1,W1={prefix:"fas",iconName:"water",icon:[576,512,[],"f773","M269.5 69.9c11.1-7.9 25.9-7.9 37 0C329 85.4 356.5 96 384 96c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 149.7 417 160 384 160c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4C42.8 92.6 61 83.5 75.3 71.6c11.1-9.5 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 85.2 165.1 96 192 96c27.5 0 55-10.6 77.5-26.1zm37 288C329 373.4 356.5 384 384 384c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 437.7 417 448 384 448c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.4 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 373.2 165.1 384 192 384c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0zm0-144C329 229.4 356.5 240 384 240c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 293.7 417 304 384 304c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.5 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 229.2 165.1 240 192 240c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0z"]},P1={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},I1=P1,xp=()=>{const{config:u,configLoading:r,configError:f}=mr();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});const o=u.appConfig.endpoints.baseUrl,m=u.appConfig.endpoints.sensors,v={baseUrl:`${o}/${m}`,params:{_sort:"timestamp",_order:"desc",_limit:1}};return G.jsx(Fc,{config:v,children:G.jsx(tb,{})})},tb=()=>{const{data:u}=wd(),r=[{id:1,title:"Temperatura",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:F1})},{id:2,title:"Humedad",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:W1})},{id:3,title:"Contaminación",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:Z1})},{id:4,title:"Presión",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:$1})}];return u&&u.forEach(f=>{f.sensor_type==="MQ-135"?(r[2].content=`${f.value} µg/m³`,r[2].status=f.value>100?"Alta contaminación 😷":"Aire moderado 🌤️"):f.sensor_type==="DHT-11"&&(r[1].content=`${f.humidity}%`,r[1].status=f.humidity>70?"Humedad alta 🌧️":"Nivel normal 🌤️",r[0].content=`${f.temperature}°C`,r[0].status=f.temperature>30?"Calor intenso ☀️":"Clima agradable 🌤️")}),G.jsx(Nd,{cards:r})};xp.propTypes={data:K.array};const eb=()=>G.jsx(G.Fragment,{children:G.jsxs(Ng,{children:[G.jsx(xp,{}),G.jsx(Av,{}),G.jsx(zv,{})]})});function Cp({onClick:u}){return G.jsx("button",{className:"menuBtn",onClick:u,children:G.jsx(kl,{icon:K1})})}Cp.propTypes={onClick:K.func.isRequired};const Dp=({isOpen:u,onClose:r})=>G.jsxs("div",{className:`side-menu ${u?"open":""}`,children:[G.jsx("button",{className:"close-btn",onClick:r,children:G.jsx(kl,{icon:I1})}),G.jsxs("ul",{children:[G.jsx("li",{children:G.jsx("a",{href:"#inicio",children:"ɪɴɪᴄɪᴏ"})}),G.jsx("li",{children:G.jsx("a",{href:"#mapa",children:"ᴍᴀᴘᴀ"})}),G.jsx("li",{children:G.jsx("a",{href:"#historico",children:"ʜɪsᴛᴏʀɪᴄᴏ"})})]})]});Dp.propTypes={isOpen:K.bool.isRequired,onClose:K.func.isRequired};function nb(){const{theme:u,toggleTheme:r}=Wc();return G.jsx("button",{className:"theme-toggle",onClick:r,children:u==="dark"?"☀️":"🌙"})}const Mp=u=>{const{theme:r}=Wc();return G.jsxs("header",{className:`justify-content-center text-center mb-4 ${r}`,children:[G.jsx("h1",{children:u.title}),G.jsx("p",{className:"subtitle",children:u.subtitle})]})};Mp.propTypes={title:K.string.isRequired,subtitle:K.string};const ab=()=>{const[u,r]=F.useState(!1),f=()=>{r(!u)},o=()=>{r(!1)};return G.jsxs(G.Fragment,{children:[G.jsx(Cp,{onClick:f}),G.jsx(Dp,{isOpen:u,onClose:f}),G.jsx(nb,{}),G.jsxs("div",{className:u?"blur m-0 p-0":"m-0 p-0",onClick:o,children:[G.jsx(Mp,{title:"Contamin",subtitle:"Midiendo la calidad del aire y las calles en Sevilla 🌿🚛"}),G.jsx(eb,{})]})]})};$0.createRoot(document.getElementById("root")).render(G.jsx(F.StrictMode,{children:G.jsx(Xg,{children:G.jsx(Ug,{children:G.jsx(ab,{})})})})); diff --git a/backend/vertx/src/main/resources/webroot/index.html b/backend/vertx/src/main/resources/webroot/index.html index ec069e5..e477306 100644 --- a/backend/vertx/src/main/resources/webroot/index.html +++ b/backend/vertx/src/main/resources/webroot/index.html @@ -15,7 +15,7 @@ ContaminUS - + diff --git a/backend/vertx/target/classes/.gitignore b/backend/vertx/target/classes/.gitignore index eded030..64663da 100644 --- a/backend/vertx/target/classes/.gitignore +++ b/backend/vertx/target/classes/.gitignore @@ -1,2 +1,2 @@ -/net/ /META-INF/ +/net/ diff --git a/backend/vertx/target/classes/default.properties b/backend/vertx/target/classes/default.properties index 9326418..0b63564 100644 --- a/backend/vertx/target/classes/default.properties +++ b/backend/vertx/target/classes/default.properties @@ -1,7 +1,13 @@ +# DB Configuration db.protocol=jdbc:mariadb: db.host=localhost db.port=3306 db.name=dad db.user=root db.pwd=root -dp.poolSize=5 \ No newline at end of file +dp.poolSize=5 + +# Server Configuration +inet.host=localhost +webserver.port=8080 +api.port=8081 diff --git a/backend/vertx/target/classes/webroot/assets/index-Ch0_cdBw.js b/backend/vertx/target/classes/webroot/assets/index-B9-ngIAm.js similarity index 98% rename from backend/vertx/target/classes/webroot/assets/index-Ch0_cdBw.js rename to backend/vertx/target/classes/webroot/assets/index-B9-ngIAm.js index 4d194f0..331c890 100644 --- a/backend/vertx/target/classes/webroot/assets/index-Ch0_cdBw.js +++ b/backend/vertx/target/classes/webroot/assets/index-B9-ngIAm.js @@ -34,7 +34,7 @@ Error generating stack: `+n.message+` * Bootstrap v5.3.3 (https://getbootstrap.com/) * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */var J0=Xc.exports,Km;function F0(){return Km||(Km=1,function(u,r){(function(f,o){u.exports=o()})(J0,function(){const f=new Map,o={set(h,i,c){f.has(h)||f.set(h,new Map);const p=f.get(h);p.has(i)||p.size===0?p.set(i,c):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(p.keys())[0]}.`)},get:(h,i)=>f.has(h)&&f.get(h).get(i)||null,remove(h,i){if(!f.has(h))return;const c=f.get(h);c.delete(i),c.size===0&&f.delete(h)}},m="transitionend",v=h=>(h&&window.CSS&&window.CSS.escape&&(h=h.replace(/#([^\s"#']+)/g,(i,c)=>`#${CSS.escape(c)}`)),h),S=h=>{h.dispatchEvent(new Event(m))},x=h=>!(!h||typeof h!="object")&&(h.jquery!==void 0&&(h=h[0]),h.nodeType!==void 0),N=h=>x(h)?h.jquery?h[0]:h:typeof h=="string"&&h.length>0?document.querySelector(v(h)):null,U=h=>{if(!x(h)||h.getClientRects().length===0)return!1;const i=getComputedStyle(h).getPropertyValue("visibility")==="visible",c=h.closest("details:not([open])");if(!c)return i;if(c!==h){const p=h.closest("summary");if(p&&p.parentNode!==c||p===null)return!1}return i},X=h=>!h||h.nodeType!==Node.ELEMENT_NODE||!!h.classList.contains("disabled")||(h.disabled!==void 0?h.disabled:h.hasAttribute("disabled")&&h.getAttribute("disabled")!=="false"),Z=h=>{if(!document.documentElement.attachShadow)return null;if(typeof h.getRootNode=="function"){const i=h.getRootNode();return i instanceof ShadowRoot?i:null}return h instanceof ShadowRoot?h:h.parentNode?Z(h.parentNode):null},Q=()=>{},tt=h=>{h.offsetHeight},ct=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Et=[],rt=()=>document.documentElement.dir==="rtl",ot=h=>{var i;i=()=>{const c=ct();if(c){const p=h.NAME,b=c.fn[p];c.fn[p]=h.jQueryInterface,c.fn[p].Constructor=h,c.fn[p].noConflict=()=>(c.fn[p]=b,h.jQueryInterface)}},document.readyState==="loading"?(Et.length||document.addEventListener("DOMContentLoaded",()=>{for(const c of Et)c()}),Et.push(i)):i()},it=(h,i=[],c=h)=>typeof h=="function"?h(...i):c,Ct=(h,i,c=!0)=>{if(!c)return void it(h);const p=(D=>{if(!D)return 0;let{transitionDuration:j,transitionDelay:k}=window.getComputedStyle(D);const L=Number.parseFloat(j),q=Number.parseFloat(k);return L||q?(j=j.split(",")[0],k=k.split(",")[0],1e3*(Number.parseFloat(j)+Number.parseFloat(k))):0})(i)+5;let b=!1;const E=({target:D})=>{D===i&&(b=!0,i.removeEventListener(m,E),it(h))};i.addEventListener(m,E),setTimeout(()=>{b||S(i)},p)},ee=(h,i,c,p)=>{const b=h.length;let E=h.indexOf(i);return E===-1?!c&&p?h[b-1]:h[0]:(E+=c?1:-1,p&&(E=(E+b)%b),h[Math.max(0,Math.min(E,b-1))])},ne=/[^.]*(?=\..*)\.|.*/,Re=/\..*/,Kn=/::\d+$/,hn={};let ft=1;const wt={mouseenter:"mouseover",mouseleave:"mouseout"},zn=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Ia(h,i){return i&&`${i}::${ft++}`||h.uidEvent||ft++}function $n(h){const i=Ia(h);return h.uidEvent=i,hn[i]=hn[i]||{},hn[i]}function Jn(h,i,c=null){return Object.values(h).find(p=>p.callable===i&&p.delegationSelector===c)}function Fn(h,i,c){const p=typeof i=="string",b=p?c:i||c;let E=Ht(h);return zn.has(E)||(E=h),[p,b,E]}function V(h,i,c,p,b){if(typeof i!="string"||!h)return;let[E,D,j]=Fn(i,c,p);i in wt&&(D=(at=>function(lt){if(!lt.relatedTarget||lt.relatedTarget!==lt.delegateTarget&&!lt.delegateTarget.contains(lt.relatedTarget))return at.call(this,lt)})(D));const k=$n(h),L=k[j]||(k[j]={}),q=Jn(L,D,E?c:null);if(q)return void(q.oneOff=q.oneOff&&b);const B=Ia(D,i.replace(ne,"")),ht=E?function(et,at,lt){return function st(Tt){const Lt=et.querySelectorAll(at);for(let{target:W}=Tt;W&&W!==this;W=W.parentNode)for(const Ot of Lt)if(Ot===W)return Wn(Tt,{delegateTarget:W}),st.oneOff&&w.off(et,Tt.type,at,lt),lt.apply(W,[Tt])}}(h,c,D):function(et,at){return function lt(st){return Wn(st,{delegateTarget:et}),lt.oneOff&&w.off(et,st.type,at),at.apply(et,[st])}}(h,D);ht.delegationSelector=E?c:null,ht.callable=D,ht.oneOff=b,ht.uidEvent=B,L[B]=ht,h.addEventListener(j,ht,E)}function mt(h,i,c,p,b){const E=Jn(i[c],p,b);E&&(h.removeEventListener(c,E,!!b),delete i[c][E.uidEvent])}function dt(h,i,c,p){const b=i[c]||{};for(const[E,D]of Object.entries(b))E.includes(p)&&mt(h,i,c,D.callable,D.delegationSelector)}function Ht(h){return h=h.replace(Re,""),wt[h]||h}const w={on(h,i,c,p){V(h,i,c,p,!1)},one(h,i,c,p){V(h,i,c,p,!0)},off(h,i,c,p){if(typeof i!="string"||!h)return;const[b,E,D]=Fn(i,c,p),j=D!==i,k=$n(h),L=k[D]||{},q=i.startsWith(".");if(E===void 0){if(q)for(const B of Object.keys(k))dt(h,k,B,i.slice(1));for(const[B,ht]of Object.entries(L)){const et=B.replace(Kn,"");j&&!i.includes(et)||mt(h,k,D,ht.callable,ht.delegationSelector)}}else{if(!Object.keys(L).length)return;mt(h,k,D,E,b?c:null)}},trigger(h,i,c){if(typeof i!="string"||!h)return null;const p=ct();let b=null,E=!0,D=!0,j=!1;i!==Ht(i)&&p&&(b=p.Event(i,c),p(h).trigger(b),E=!b.isPropagationStopped(),D=!b.isImmediatePropagationStopped(),j=b.isDefaultPrevented());const k=Wn(new Event(i,{bubbles:E,cancelable:!0}),c);return j&&k.preventDefault(),D&&h.dispatchEvent(k),k.defaultPrevented&&b&&b.preventDefault(),k}};function Wn(h,i={}){for(const[c,p]of Object.entries(i))try{h[c]=p}catch{Object.defineProperty(h,c,{configurable:!0,get:()=>p})}return h}function Pn(h){if(h==="true")return!0;if(h==="false")return!1;if(h===Number(h).toString())return Number(h);if(h===""||h==="null")return null;if(typeof h!="string")return h;try{return JSON.parse(decodeURIComponent(h))}catch{return h}}function Ie(h){return h.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}const vt={setDataAttribute(h,i,c){h.setAttribute(`data-bs-${Ie(i)}`,c)},removeDataAttribute(h,i){h.removeAttribute(`data-bs-${Ie(i)}`)},getDataAttributes(h){if(!h)return{};const i={},c=Object.keys(h.dataset).filter(p=>p.startsWith("bs")&&!p.startsWith("bsConfig"));for(const p of c){let b=p.replace(/^bs/,"");b=b.charAt(0).toLowerCase()+b.slice(1,b.length),i[b]=Pn(h.dataset[p])}return i},getDataAttribute:(h,i)=>Pn(h.getAttribute(`data-bs-${Ie(i)}`))};class oe{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(i){return i=this._mergeConfigObj(i),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}_configAfterMerge(i){return i}_mergeConfigObj(i,c){const p=x(c)?vt.getDataAttribute(c,"config"):{};return{...this.constructor.Default,...typeof p=="object"?p:{},...x(c)?vt.getDataAttributes(c):{},...typeof i=="object"?i:{}}}_typeCheckConfig(i,c=this.constructor.DefaultType){for(const[b,E]of Object.entries(c)){const D=i[b],j=x(D)?"element":(p=D)==null?`${p}`:Object.prototype.toString.call(p).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(E).test(j))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${b}" provided type "${j}" but expected type "${E}".`)}var p}}class je extends oe{constructor(i,c){super(),(i=N(i))&&(this._element=i,this._config=this._getConfig(c),o.set(this._element,this.constructor.DATA_KEY,this))}dispose(){o.remove(this._element,this.constructor.DATA_KEY),w.off(this._element,this.constructor.EVENT_KEY);for(const i of Object.getOwnPropertyNames(this))this[i]=null}_queueCallback(i,c,p=!0){Ct(i,c,p)}_getConfig(i){return i=this._mergeConfigObj(i,this._element),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}static getInstance(i){return o.get(N(i),this.DATA_KEY)}static getOrCreateInstance(i,c={}){return this.getInstance(i)||new this(i,typeof c=="object"?c:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(i){return`${i}${this.EVENT_KEY}`}}const In=h=>{let i=h.getAttribute("data-bs-target");if(!i||i==="#"){let c=h.getAttribute("href");if(!c||!c.includes("#")&&!c.startsWith("."))return null;c.includes("#")&&!c.startsWith("#")&&(c=`#${c.split("#")[1]}`),i=c&&c!=="#"?c.trim():null}return i?i.split(",").map(c=>v(c)).join(","):null},$={find:(h,i=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(i,h)),findOne:(h,i=document.documentElement)=>Element.prototype.querySelector.call(i,h),children:(h,i)=>[].concat(...h.children).filter(c=>c.matches(i)),parents(h,i){const c=[];let p=h.parentNode.closest(i);for(;p;)c.push(p),p=p.parentNode.closest(i);return c},prev(h,i){let c=h.previousElementSibling;for(;c;){if(c.matches(i))return[c];c=c.previousElementSibling}return[]},next(h,i){let c=h.nextElementSibling;for(;c;){if(c.matches(i))return[c];c=c.nextElementSibling}return[]},focusableChildren(h){const i=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(c=>`${c}:not([tabindex^="-"])`).join(",");return this.find(i,h).filter(c=>!X(c)&&U(c))},getSelectorFromElement(h){const i=In(h);return i&&$.findOne(i)?i:null},getElementFromSelector(h){const i=In(h);return i?$.findOne(i):null},getMultipleElementsFromSelector(h){const i=In(h);return i?$.find(i):[]}},Kt=(h,i="hide")=>{const c=`click.dismiss${h.EVENT_KEY}`,p=h.NAME;w.on(document,c,`[data-bs-dismiss="${p}"]`,function(b){if(["A","AREA"].includes(this.tagName)&&b.preventDefault(),X(this))return;const E=$.getElementFromSelector(this)||this.closest(`.${p}`);h.getOrCreateInstance(E)[i]()})},qt=".bs.alert",mn=`close${qt}`,Vl=`closed${qt}`;class Ve extends je{static get NAME(){return"alert"}close(){if(w.trigger(this._element,mn).defaultPrevented)return;this._element.classList.remove("show");const i=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,i)}_destroyElement(){this._element.remove(),w.trigger(this._element,Vl),this.dispose()}static jQueryInterface(i){return this.each(function(){const c=Ve.getOrCreateInstance(this);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i](this)}})}}Kt(Ve,"close"),ot(Ve);const Zl='[data-bs-toggle="button"]';class ta extends je{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(i){return this.each(function(){const c=ta.getOrCreateInstance(this);i==="toggle"&&c[i]()})}}w.on(document,"click.bs.button.data-api",Zl,h=>{h.preventDefault();const i=h.target.closest(Zl);ta.getOrCreateInstance(i).toggle()}),ot(ta);const tn=".bs.swipe",ks=`touchstart${tn}`,Ui=`touchmove${tn}`,Xs=`touchend${tn}`,Gs=`pointerdown${tn}`,Qs=`pointerup${tn}`,ao={endCallback:null,leftCallback:null,rightCallback:null},lo={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Le extends oe{constructor(i,c){super(),this._element=i,i&&Le.isSupported()&&(this._config=this._getConfig(c),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return ao}static get DefaultType(){return lo}static get NAME(){return"swipe"}dispose(){w.off(this._element,tn)}_start(i){this._supportPointerEvents?this._eventIsPointerPenTouch(i)&&(this._deltaX=i.clientX):this._deltaX=i.touches[0].clientX}_end(i){this._eventIsPointerPenTouch(i)&&(this._deltaX=i.clientX-this._deltaX),this._handleSwipe(),it(this._config.endCallback)}_move(i){this._deltaX=i.touches&&i.touches.length>1?0:i.touches[0].clientX-this._deltaX}_handleSwipe(){const i=Math.abs(this._deltaX);if(i<=40)return;const c=i/this._deltaX;this._deltaX=0,c&&it(c>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(w.on(this._element,Gs,i=>this._start(i)),w.on(this._element,Qs,i=>this._end(i)),this._element.classList.add("pointer-event")):(w.on(this._element,ks,i=>this._start(i)),w.on(this._element,Ui,i=>this._move(i)),w.on(this._element,Xs,i=>this._end(i)))}_eventIsPointerPenTouch(i){return this._supportPointerEvents&&(i.pointerType==="pen"||i.pointerType==="touch")}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ea=".bs.carousel",Vs=".data-api",tl="next",Nn="prev",el="left",Kl="right",io=`slide${ea}`,Zs=`slid${ea}`,$l=`keydown${ea}`,Ue=`mouseenter${ea}`,so=`mouseleave${ea}`,na=`dragstart${ea}`,He=`load${ea}${Vs}`,uo=`click${ea}${Vs}`,vr="carousel",Hi="active",Jl=".active",Fl=".carousel-item",Ea=Jl+Fl,qi={ArrowLeft:Kl,ArrowRight:el},Wl={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ro={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ta extends je{constructor(i,c){super(i,c),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=$.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===vr&&this.cycle()}static get Default(){return Wl}static get DefaultType(){return ro}static get NAME(){return"carousel"}next(){this._slide(tl)}nextWhenVisible(){!document.hidden&&U(this._element)&&this.next()}prev(){this._slide(Nn)}pause(){this._isSliding&&S(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?w.one(this._element,Zs,()=>this.cycle()):this.cycle())}to(i){const c=this._getItems();if(i>c.length-1||i<0)return;if(this._isSliding)return void w.one(this._element,Zs,()=>this.to(i));const p=this._getItemIndex(this._getActive());if(p===i)return;const b=i>p?tl:Nn;this._slide(b,c[i])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(i){return i.defaultInterval=i.interval,i}_addEventListeners(){this._config.keyboard&&w.on(this._element,$l,i=>this._keydown(i)),this._config.pause==="hover"&&(w.on(this._element,Ue,()=>this.pause()),w.on(this._element,so,()=>this._maybeEnableCycle())),this._config.touch&&Le.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const c of $.find(".carousel-item img",this._element))w.on(c,na,p=>p.preventDefault());const i={leftCallback:()=>this._slide(this._directionToOrder(el)),rightCallback:()=>this._slide(this._directionToOrder(Kl)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new Le(this._element,i)}_keydown(i){if(/input|textarea/i.test(i.target.tagName))return;const c=qi[i.key];c&&(i.preventDefault(),this._slide(this._directionToOrder(c)))}_getItemIndex(i){return this._getItems().indexOf(i)}_setActiveIndicatorElement(i){if(!this._indicatorsElement)return;const c=$.findOne(Jl,this._indicatorsElement);c.classList.remove(Hi),c.removeAttribute("aria-current");const p=$.findOne(`[data-bs-slide-to="${i}"]`,this._indicatorsElement);p&&(p.classList.add(Hi),p.setAttribute("aria-current","true"))}_updateInterval(){const i=this._activeElement||this._getActive();if(!i)return;const c=Number.parseInt(i.getAttribute("data-bs-interval"),10);this._config.interval=c||this._config.defaultInterval}_slide(i,c=null){if(this._isSliding)return;const p=this._getActive(),b=i===tl,E=c||ee(this._getItems(),p,b,this._config.wrap);if(E===p)return;const D=this._getItemIndex(E),j=B=>w.trigger(this._element,B,{relatedTarget:E,direction:this._orderToDirection(i),from:this._getItemIndex(p),to:D});if(j(io).defaultPrevented||!p||!E)return;const k=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(D),this._activeElement=E;const L=b?"carousel-item-start":"carousel-item-end",q=b?"carousel-item-next":"carousel-item-prev";E.classList.add(q),tt(E),p.classList.add(L),E.classList.add(L),this._queueCallback(()=>{E.classList.remove(L,q),E.classList.add(Hi),p.classList.remove(Hi,q,L),this._isSliding=!1,j(Zs)},p,this._isAnimated()),k&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return $.findOne(Ea,this._element)}_getItems(){return $.find(Fl,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(i){return rt()?i===el?Nn:tl:i===el?tl:Nn}_orderToDirection(i){return rt()?i===Nn?el:Kl:i===Nn?Kl:el}static jQueryInterface(i){return this.each(function(){const c=Ta.getOrCreateInstance(this,i);if(typeof i!="number"){if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i]()}}else c.to(i)})}}w.on(document,uo,"[data-bs-slide], [data-bs-slide-to]",function(h){const i=$.getElementFromSelector(this);if(!i||!i.classList.contains(vr))return;h.preventDefault();const c=Ta.getOrCreateInstance(i),p=this.getAttribute("data-bs-slide-to");return p?(c.to(p),void c._maybeEnableCycle()):vt.getDataAttribute(this,"slide")==="next"?(c.next(),void c._maybeEnableCycle()):(c.prev(),void c._maybeEnableCycle())}),w.on(window,He,()=>{const h=$.find('[data-bs-ride="carousel"]');for(const i of h)Ta.getOrCreateInstance(i)}),ot(Ta);const nl=".bs.collapse",Ks=`show${nl}`,Pl=`shown${nl}`,co=`hide${nl}`,yr=`hidden${nl}`,br=`click${nl}.data-api`,Bi="show",Oa="collapse",Yi="collapsing",aa=`:scope .${Oa} .${Oa}`,se='[data-bs-toggle="collapse"]',xe={parent:null,toggle:!0},al={parent:"(null|element)",toggle:"boolean"};class la extends je{constructor(i,c){super(i,c),this._isTransitioning=!1,this._triggerArray=[];const p=$.find(se);for(const b of p){const E=$.getSelectorFromElement(b),D=$.find(E).filter(j=>j===this._element);E!==null&&D.length&&this._triggerArray.push(b)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return xe}static get DefaultType(){return al}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let i=[];if(this._config.parent&&(i=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(b=>b!==this._element).map(b=>la.getOrCreateInstance(b,{toggle:!1}))),i.length&&i[0]._isTransitioning||w.trigger(this._element,Ks).defaultPrevented)return;for(const b of i)b.hide();const c=this._getDimension();this._element.classList.remove(Oa),this._element.classList.add(Yi),this._element.style[c]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const p=`scroll${c[0].toUpperCase()+c.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Yi),this._element.classList.add(Oa,Bi),this._element.style[c]="",w.trigger(this._element,Pl)},this._element,!0),this._element.style[c]=`${this._element[p]}px`}hide(){if(this._isTransitioning||!this._isShown()||w.trigger(this._element,co).defaultPrevented)return;const i=this._getDimension();this._element.style[i]=`${this._element.getBoundingClientRect()[i]}px`,tt(this._element),this._element.classList.add(Yi),this._element.classList.remove(Oa,Bi);for(const c of this._triggerArray){const p=$.getElementFromSelector(c);p&&!this._isShown(p)&&this._addAriaAndCollapsedClass([c],!1)}this._isTransitioning=!0,this._element.style[i]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Yi),this._element.classList.add(Oa),w.trigger(this._element,yr)},this._element,!0)}_isShown(i=this._element){return i.classList.contains(Bi)}_configAfterMerge(i){return i.toggle=!!i.toggle,i.parent=N(i.parent),i}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const i=this._getFirstLevelChildren(se);for(const c of i){const p=$.getElementFromSelector(c);p&&this._addAriaAndCollapsedClass([c],this._isShown(p))}}_getFirstLevelChildren(i){const c=$.find(aa,this._config.parent);return $.find(i,this._config.parent).filter(p=>!c.includes(p))}_addAriaAndCollapsedClass(i,c){if(i.length)for(const p of i)p.classList.toggle("collapsed",!c),p.setAttribute("aria-expanded",c)}static jQueryInterface(i){const c={};return typeof i=="string"&&/show|hide/.test(i)&&(c.toggle=!1),this.each(function(){const p=la.getOrCreateInstance(this,c);if(typeof i=="string"){if(p[i]===void 0)throw new TypeError(`No method named "${i}"`);p[i]()}})}}w.on(document,br,se,function(h){(h.target.tagName==="A"||h.delegateTarget&&h.delegateTarget.tagName==="A")&&h.preventDefault();for(const i of $.getMultipleElementsFromSelector(this))la.getOrCreateInstance(i,{toggle:!1}).toggle()}),ot(la);var ye="top",qe="bottom",Ce="right",ae="left",ll="auto",Ze=[ye,qe,Ce,ae],Ke="start",gn="end",xa="clippingParents",Ft="viewport",Ca="popper",$s="reference",Rn=Ze.reduce(function(h,i){return h.concat([i+"-"+Ke,i+"-"+gn])},[]),ia=[].concat(Ze,[ll]).reduce(function(h,i){return h.concat([i,i+"-"+Ke,i+"-"+gn])},[]),pn="beforeRead",_r="read",Js="afterRead",Fs="beforeMain",Sr="main",Il="afterMain",ti="beforeWrite",vn="write",Be="afterWrite",Ws=[pn,_r,Js,Fs,Sr,Il,ti,vn,Be];function yn(h){return h?(h.nodeName||"").toLowerCase():null}function fe(h){if(h==null)return window;if(h.toString()!=="[object Window]"){var i=h.ownerDocument;return i&&i.defaultView||window}return h}function sa(h){return h instanceof fe(h).Element||h instanceof Element}function be(h){return h instanceof fe(h).HTMLElement||h instanceof HTMLElement}function Ps(h){return typeof ShadowRoot<"u"&&(h instanceof fe(h).ShadowRoot||h instanceof ShadowRoot)}const De={name:"applyStyles",enabled:!0,phase:"write",fn:function(h){var i=h.state;Object.keys(i.elements).forEach(function(c){var p=i.styles[c]||{},b=i.attributes[c]||{},E=i.elements[c];be(E)&&yn(E)&&(Object.assign(E.style,p),Object.keys(b).forEach(function(D){var j=b[D];j===!1?E.removeAttribute(D):E.setAttribute(D,j===!0?"":j)}))})},effect:function(h){var i=h.state,c={popper:{position:i.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(i.elements.popper.style,c.popper),i.styles=c,i.elements.arrow&&Object.assign(i.elements.arrow.style,c.arrow),function(){Object.keys(i.elements).forEach(function(p){var b=i.elements[p],E=i.attributes[p]||{},D=Object.keys(i.styles.hasOwnProperty(p)?i.styles[p]:c[p]).reduce(function(j,k){return j[k]="",j},{});be(b)&&yn(b)&&(Object.assign(b.style,D),Object.keys(E).forEach(function(j){b.removeAttribute(j)}))})}},requires:["computeStyles"]};function $e(h){return h.split("-")[0]}var ua=Math.max,il=Math.min,en=Math.round;function ki(){var h=navigator.userAgentData;return h!=null&&h.brands&&Array.isArray(h.brands)?h.brands.map(function(i){return i.brand+"/"+i.version}).join(" "):navigator.userAgent}function Is(){return!/^((?!chrome|android).)*safari/i.test(ki())}function nn(h,i,c){i===void 0&&(i=!1),c===void 0&&(c=!1);var p=h.getBoundingClientRect(),b=1,E=1;i&&be(h)&&(b=h.offsetWidth>0&&en(p.width)/h.offsetWidth||1,E=h.offsetHeight>0&&en(p.height)/h.offsetHeight||1);var D=(sa(h)?fe(h):window).visualViewport,j=!Is()&&c,k=(p.left+(j&&D?D.offsetLeft:0))/b,L=(p.top+(j&&D?D.offsetTop:0))/E,q=p.width/b,B=p.height/E;return{width:q,height:B,top:L,right:k+q,bottom:L+B,left:k,x:k,y:L}}function tu(h){var i=nn(h),c=h.offsetWidth,p=h.offsetHeight;return Math.abs(i.width-c)<=1&&(c=i.width),Math.abs(i.height-p)<=1&&(p=i.height),{x:h.offsetLeft,y:h.offsetTop,width:c,height:p}}function eu(h,i){var c=i.getRootNode&&i.getRootNode();if(h.contains(i))return!0;if(c&&Ps(c)){var p=i;do{if(p&&h.isSameNode(p))return!0;p=p.parentNode||p.host}while(p)}return!1}function bn(h){return fe(h).getComputedStyle(h)}function nu(h){return["table","td","th"].indexOf(yn(h))>=0}function ra(h){return((sa(h)?h.ownerDocument:h.document)||window.document).documentElement}function Xi(h){return yn(h)==="html"?h:h.assignedSlot||h.parentNode||(Ps(h)?h.host:null)||ra(h)}function ei(h){return be(h)&&bn(h).position!=="fixed"?h.offsetParent:null}function Da(h){for(var i=fe(h),c=ei(h);c&&nu(c)&&bn(c).position==="static";)c=ei(c);return c&&(yn(c)==="html"||yn(c)==="body"&&bn(c).position==="static")?i:c||function(p){var b=/firefox/i.test(ki());if(/Trident/i.test(ki())&&be(p)&&bn(p).position==="fixed")return null;var E=Xi(p);for(Ps(E)&&(E=E.host);be(E)&&["html","body"].indexOf(yn(E))<0;){var D=bn(E);if(D.transform!=="none"||D.perspective!=="none"||D.contain==="paint"||["transform","perspective"].indexOf(D.willChange)!==-1||b&&D.willChange==="filter"||b&&D.filter&&D.filter!=="none")return E;E=E.parentNode}return null}(h)||i}function ni(h){return["top","bottom"].indexOf(h)>=0?"x":"y"}function _n(h,i,c){return ua(h,il(i,c))}function Ma(h){return Object.assign({},{top:0,right:0,bottom:0,left:0},h)}function au(h,i){return i.reduce(function(c,p){return c[p]=h,c},{})}const Gi={name:"arrow",enabled:!0,phase:"main",fn:function(h){var i,c=h.state,p=h.name,b=h.options,E=c.elements.arrow,D=c.modifiersData.popperOffsets,j=$e(c.placement),k=ni(j),L=[ae,Ce].indexOf(j)>=0?"height":"width";if(E&&D){var q=function(jt,Mt){return Ma(typeof(jt=typeof jt=="function"?jt(Object.assign({},Mt.rects,{placement:Mt.placement})):jt)!="number"?jt:au(jt,Ze))}(b.padding,c),B=tu(E),ht=k==="y"?ye:ae,et=k==="y"?qe:Ce,at=c.rects.reference[L]+c.rects.reference[k]-D[k]-c.rects.popper[L],lt=D[k]-c.rects.reference[k],st=Da(E),Tt=st?k==="y"?st.clientHeight||0:st.clientWidth||0:0,Lt=at/2-lt/2,W=q[ht],Ot=Tt-B[L]-q[et],gt=Tt/2-B[L]/2+Lt,yt=_n(W,gt,Ot),zt=k;c.modifiersData[p]=((i={})[zt]=yt,i.centerOffset=yt-gt,i)}},effect:function(h){var i=h.state,c=h.options.element,p=c===void 0?"[data-popper-arrow]":c;p!=null&&(typeof p!="string"||(p=i.elements.popper.querySelector(p)))&&eu(i.elements.popper,p)&&(i.elements.arrow=p)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wa(h){return h.split("-")[1]}var ai={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Qi(h){var i,c=h.popper,p=h.popperRect,b=h.placement,E=h.variation,D=h.offsets,j=h.position,k=h.gpuAcceleration,L=h.adaptive,q=h.roundOffsets,B=h.isFixed,ht=D.x,et=ht===void 0?0:ht,at=D.y,lt=at===void 0?0:at,st=typeof q=="function"?q({x:et,y:lt}):{x:et,y:lt};et=st.x,lt=st.y;var Tt=D.hasOwnProperty("x"),Lt=D.hasOwnProperty("y"),W=ae,Ot=ye,gt=window;if(L){var yt=Da(c),zt="clientHeight",jt="clientWidth";yt===fe(c)&&bn(yt=ra(c)).position!=="static"&&j==="absolute"&&(zt="scrollHeight",jt="scrollWidth"),(b===ye||(b===ae||b===Ce)&&E===gn)&&(Ot=qe,lt-=(B&&yt===gt&>.visualViewport?gt.visualViewport.height:yt[zt])-p.height,lt*=k?1:-1),b!==ae&&(b!==ye&&b!==qe||E!==gn)||(W=Ce,et-=(B&&yt===gt&>.visualViewport?gt.visualViewport.width:yt[jt])-p.width,et*=k?1:-1)}var Mt,Vt=Object.assign({position:j},L&&ai),Ae=q===!0?function(Xt,At){var Ee=Xt.x,he=Xt.y,Bt=At.devicePixelRatio||1;return{x:en(Ee*Bt)/Bt||0,y:en(he*Bt)/Bt||0}}({x:et,y:lt},fe(c)):{x:et,y:lt};return et=Ae.x,lt=Ae.y,k?Object.assign({},Vt,((Mt={})[Ot]=Lt?"0":"",Mt[W]=Tt?"0":"",Mt.transform=(gt.devicePixelRatio||1)<=1?"translate("+et+"px, "+lt+"px)":"translate3d("+et+"px, "+lt+"px, 0)",Mt)):Object.assign({},Vt,((i={})[Ot]=Lt?lt+"px":"",i[W]=Tt?et+"px":"",i.transform="",i))}const za={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(h){var i=h.state,c=h.options,p=c.gpuAcceleration,b=p===void 0||p,E=c.adaptive,D=E===void 0||E,j=c.roundOffsets,k=j===void 0||j,L={placement:$e(i.placement),variation:wa(i.placement),popper:i.elements.popper,popperRect:i.rects.popper,gpuAcceleration:b,isFixed:i.options.strategy==="fixed"};i.modifiersData.popperOffsets!=null&&(i.styles.popper=Object.assign({},i.styles.popper,Qi(Object.assign({},L,{offsets:i.modifiersData.popperOffsets,position:i.options.strategy,adaptive:D,roundOffsets:k})))),i.modifiersData.arrow!=null&&(i.styles.arrow=Object.assign({},i.styles.arrow,Qi(Object.assign({},L,{offsets:i.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:k})))),i.attributes.popper=Object.assign({},i.attributes.popper,{"data-popper-placement":i.placement})},data:{}};var an={passive:!0};const li={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(h){var i=h.state,c=h.instance,p=h.options,b=p.scroll,E=b===void 0||b,D=p.resize,j=D===void 0||D,k=fe(i.elements.popper),L=[].concat(i.scrollParents.reference,i.scrollParents.popper);return E&&L.forEach(function(q){q.addEventListener("scroll",c.update,an)}),j&&k.addEventListener("resize",c.update,an),function(){E&&L.forEach(function(q){q.removeEventListener("scroll",c.update,an)}),j&&k.removeEventListener("resize",c.update,an)}},data:{}};var Vi={left:"right",right:"left",bottom:"top",top:"bottom"};function ii(h){return h.replace(/left|right|bottom|top/g,function(i){return Vi[i]})}var Zi={start:"end",end:"start"};function si(h){return h.replace(/start|end/g,function(i){return Zi[i]})}function Ki(h){var i=fe(h);return{scrollLeft:i.pageXOffset,scrollTop:i.pageYOffset}}function de(h){return nn(ra(h)).left+Ki(h).scrollLeft}function jn(h){var i=bn(h),c=i.overflow,p=i.overflowX,b=i.overflowY;return/auto|scroll|overlay|hidden/.test(c+b+p)}function ui(h){return["html","body","#document"].indexOf(yn(h))>=0?h.ownerDocument.body:be(h)&&jn(h)?h:ui(Xi(h))}function Ln(h,i){var c;i===void 0&&(i=[]);var p=ui(h),b=p===((c=h.ownerDocument)==null?void 0:c.body),E=fe(p),D=b?[E].concat(E.visualViewport||[],jn(p)?p:[]):p,j=i.concat(D);return b?j:j.concat(Ln(Xi(D)))}function lu(h){return Object.assign({},h,{left:h.x,top:h.y,right:h.x+h.width,bottom:h.y+h.height})}function $i(h,i,c){return i===Ft?lu(function(p,b){var E=fe(p),D=ra(p),j=E.visualViewport,k=D.clientWidth,L=D.clientHeight,q=0,B=0;if(j){k=j.width,L=j.height;var ht=Is();(ht||!ht&&b==="fixed")&&(q=j.offsetLeft,B=j.offsetTop)}return{width:k,height:L,x:q+de(p),y:B}}(h,c)):sa(i)?function(p,b){var E=nn(p,!1,b==="fixed");return E.top=E.top+p.clientTop,E.left=E.left+p.clientLeft,E.bottom=E.top+p.clientHeight,E.right=E.left+p.clientWidth,E.width=p.clientWidth,E.height=p.clientHeight,E.x=E.left,E.y=E.top,E}(i,c):lu(function(p){var b,E=ra(p),D=Ki(p),j=(b=p.ownerDocument)==null?void 0:b.body,k=ua(E.scrollWidth,E.clientWidth,j?j.scrollWidth:0,j?j.clientWidth:0),L=ua(E.scrollHeight,E.clientHeight,j?j.scrollHeight:0,j?j.clientHeight:0),q=-D.scrollLeft+de(p),B=-D.scrollTop;return bn(j||E).direction==="rtl"&&(q+=ua(E.clientWidth,j?j.clientWidth:0)-k),{width:k,height:L,x:q,y:B}}(ra(h)))}function Ji(h){var i,c=h.reference,p=h.element,b=h.placement,E=b?$e(b):null,D=b?wa(b):null,j=c.x+c.width/2-p.width/2,k=c.y+c.height/2-p.height/2;switch(E){case ye:i={x:j,y:c.y-p.height};break;case qe:i={x:j,y:c.y+c.height};break;case Ce:i={x:c.x+c.width,y:k};break;case ae:i={x:c.x-p.width,y:k};break;default:i={x:c.x,y:c.y}}var L=E?ni(E):null;if(L!=null){var q=L==="y"?"height":"width";switch(D){case Ke:i[L]=i[L]-(c[q]/2-p[q]/2);break;case gn:i[L]=i[L]+(c[q]/2-p[q]/2)}}return i}function Sn(h,i){i===void 0&&(i={});var c=i,p=c.placement,b=p===void 0?h.placement:p,E=c.strategy,D=E===void 0?h.strategy:E,j=c.boundary,k=j===void 0?xa:j,L=c.rootBoundary,q=L===void 0?Ft:L,B=c.elementContext,ht=B===void 0?Ca:B,et=c.altBoundary,at=et!==void 0&&et,lt=c.padding,st=lt===void 0?0:lt,Tt=Ma(typeof st!="number"?st:au(st,Ze)),Lt=ht===Ca?$s:Ca,W=h.rects.popper,Ot=h.elements[at?Lt:ht],gt=function(At,Ee,he,Bt){var Pe=Ee==="clippingParents"?function(Rt){var me=Ln(Xi(Rt)),Ge=["absolute","fixed"].indexOf(bn(Rt).position)>=0&&be(Rt)?Da(Rt):Rt;return sa(Ge)?me.filter(function(Qn){return sa(Qn)&&eu(Qn,Ge)&&yn(Qn)!=="body"}):[]}(At):[].concat(Ee),ue=[].concat(Pe,[he]),Gn=ue[0],Wt=ue.reduce(function(Rt,me){var Ge=$i(At,me,Bt);return Rt.top=ua(Ge.top,Rt.top),Rt.right=il(Ge.right,Rt.right),Rt.bottom=il(Ge.bottom,Rt.bottom),Rt.left=ua(Ge.left,Rt.left),Rt},$i(At,Gn,Bt));return Wt.width=Wt.right-Wt.left,Wt.height=Wt.bottom-Wt.top,Wt.x=Wt.left,Wt.y=Wt.top,Wt}(sa(Ot)?Ot:Ot.contextElement||ra(h.elements.popper),k,q,D),yt=nn(h.elements.reference),zt=Ji({reference:yt,element:W,placement:b}),jt=lu(Object.assign({},W,zt)),Mt=ht===Ca?jt:yt,Vt={top:gt.top-Mt.top+Tt.top,bottom:Mt.bottom-gt.bottom+Tt.bottom,left:gt.left-Mt.left+Tt.left,right:Mt.right-gt.right+Tt.right},Ae=h.modifiersData.offset;if(ht===Ca&&Ae){var Xt=Ae[b];Object.keys(Vt).forEach(function(At){var Ee=[Ce,qe].indexOf(At)>=0?1:-1,he=[ye,qe].indexOf(At)>=0?"y":"x";Vt[At]+=Xt[he]*Ee})}return Vt}function Fi(h,i){i===void 0&&(i={});var c=i,p=c.placement,b=c.boundary,E=c.rootBoundary,D=c.padding,j=c.flipVariations,k=c.allowedAutoPlacements,L=k===void 0?ia:k,q=wa(p),B=q?j?Rn:Rn.filter(function(at){return wa(at)===q}):Ze,ht=B.filter(function(at){return L.indexOf(at)>=0});ht.length===0&&(ht=B);var et=ht.reduce(function(at,lt){return at[lt]=Sn(h,{placement:lt,boundary:b,rootBoundary:E,padding:D})[$e(lt)],at},{});return Object.keys(et).sort(function(at,lt){return et[at]-et[lt]})}const iu={name:"flip",enabled:!0,phase:"main",fn:function(h){var i=h.state,c=h.options,p=h.name;if(!i.modifiersData[p]._skip){for(var b=c.mainAxis,E=b===void 0||b,D=c.altAxis,j=D===void 0||D,k=c.fallbackPlacements,L=c.padding,q=c.boundary,B=c.rootBoundary,ht=c.altBoundary,et=c.flipVariations,at=et===void 0||et,lt=c.allowedAutoPlacements,st=i.options.placement,Tt=$e(st),Lt=k||(Tt!==st&&at?function(Rt){if($e(Rt)===ll)return[];var me=ii(Rt);return[si(Rt),me,si(me)]}(st):[ii(st)]),W=[st].concat(Lt).reduce(function(Rt,me){return Rt.concat($e(me)===ll?Fi(i,{placement:me,boundary:q,rootBoundary:B,padding:L,flipVariations:at,allowedAutoPlacements:lt}):me)},[]),Ot=i.rects.reference,gt=i.rects.popper,yt=new Map,zt=!0,jt=W[0],Mt=0;Mt=0,Ee=At?"width":"height",he=Sn(i,{placement:Vt,boundary:q,rootBoundary:B,altBoundary:ht,padding:L}),Bt=At?Xt?Ce:ae:Xt?qe:ye;Ot[Ee]>gt[Ee]&&(Bt=ii(Bt));var Pe=ii(Bt),ue=[];if(E&&ue.push(he[Ae]<=0),j&&ue.push(he[Bt]<=0,he[Pe]<=0),ue.every(function(Rt){return Rt})){jt=Vt,zt=!1;break}yt.set(Vt,ue)}if(zt)for(var Gn=function(Rt){var me=W.find(function(Ge){var Qn=yt.get(Ge);if(Qn)return Qn.slice(0,Rt).every(function(bi){return bi})});if(me)return jt=me,"break"},Wt=at?3:1;Wt>0&&Gn(Wt)!=="break";Wt--);i.placement!==jt&&(i.modifiersData[p]._skip=!0,i.placement=jt,i.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ar(h,i,c){return c===void 0&&(c={x:0,y:0}),{top:h.top-i.height-c.y,right:h.right-i.width+c.x,bottom:h.bottom-i.height+c.y,left:h.left-i.width-c.x}}function Er(h){return[ye,Ce,qe,ae].some(function(i){return h[i]>=0})}const Tr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(h){var i=h.state,c=h.name,p=i.rects.reference,b=i.rects.popper,E=i.modifiersData.preventOverflow,D=Sn(i,{elementContext:"reference"}),j=Sn(i,{altBoundary:!0}),k=Ar(D,p),L=Ar(j,b,E),q=Er(k),B=Er(L);i.modifiersData[c]={referenceClippingOffsets:k,popperEscapeOffsets:L,isReferenceHidden:q,hasPopperEscaped:B},i.attributes.popper=Object.assign({},i.attributes.popper,{"data-popper-reference-hidden":q,"data-popper-escaped":B})}},Wi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(h){var i=h.state,c=h.options,p=h.name,b=c.offset,E=b===void 0?[0,0]:b,D=ia.reduce(function(q,B){return q[B]=function(ht,et,at){var lt=$e(ht),st=[ae,ye].indexOf(lt)>=0?-1:1,Tt=typeof at=="function"?at(Object.assign({},et,{placement:ht})):at,Lt=Tt[0],W=Tt[1];return Lt=Lt||0,W=(W||0)*st,[ae,Ce].indexOf(lt)>=0?{x:W,y:Lt}:{x:Lt,y:W}}(B,i.rects,E),q},{}),j=D[i.placement],k=j.x,L=j.y;i.modifiersData.popperOffsets!=null&&(i.modifiersData.popperOffsets.x+=k,i.modifiersData.popperOffsets.y+=L),i.modifiersData[p]=D}},su={name:"popperOffsets",enabled:!0,phase:"read",fn:function(h){var i=h.state,c=h.name;i.modifiersData[c]=Ji({reference:i.rects.reference,element:i.rects.popper,placement:i.placement})},data:{}},Or={name:"preventOverflow",enabled:!0,phase:"main",fn:function(h){var i=h.state,c=h.options,p=h.name,b=c.mainAxis,E=b===void 0||b,D=c.altAxis,j=D!==void 0&&D,k=c.boundary,L=c.rootBoundary,q=c.altBoundary,B=c.padding,ht=c.tether,et=ht===void 0||ht,at=c.tetherOffset,lt=at===void 0?0:at,st=Sn(i,{boundary:k,rootBoundary:L,padding:B,altBoundary:q}),Tt=$e(i.placement),Lt=wa(i.placement),W=!Lt,Ot=ni(Tt),gt=Ot==="x"?"y":"x",yt=i.modifiersData.popperOffsets,zt=i.rects.reference,jt=i.rects.popper,Mt=typeof lt=="function"?lt(Object.assign({},i.rects,{placement:i.placement})):lt,Vt=typeof Mt=="number"?{mainAxis:Mt,altAxis:Mt}:Object.assign({mainAxis:0,altAxis:0},Mt),Ae=i.modifiersData.offset?i.modifiersData.offset[i.placement]:null,Xt={x:0,y:0};if(yt){if(E){var At,Ee=Ot==="y"?ye:ae,he=Ot==="y"?qe:Ce,Bt=Ot==="y"?"height":"width",Pe=yt[Ot],ue=Pe+st[Ee],Gn=Pe-st[he],Wt=et?-jt[Bt]/2:0,Rt=Lt===Ke?zt[Bt]:jt[Bt],me=Lt===Ke?-jt[Bt]:-zt[Bt],Ge=i.elements.arrow,Qn=et&&Ge?tu(Ge):{width:0,height:0},bi=i.modifiersData["arrow#persistent"]?i.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Cu=bi[Ee],Du=bi[he],El=_n(0,zt[Bt],Qn[Bt]),nc=W?zt[Bt]/2-Wt-El-Cu-Vt.mainAxis:Rt-El-Cu-Vt.mainAxis,Mo=W?-zt[Bt]/2+Wt+El+Du+Vt.mainAxis:me+El+Du+Vt.mainAxis,ys=i.elements.arrow&&Da(i.elements.arrow),ac=ys?Ot==="y"?ys.clientTop||0:ys.clientLeft||0:0,Mu=(At=Ae==null?void 0:Ae[Ot])!=null?At:0,wu=Pe+Mo-Mu,zu=_n(et?il(ue,Pe+nc-Mu-ac):ue,Pe,et?ua(Gn,wu):Gn);yt[Ot]=zu,Xt[Ot]=zu-Pe}if(j){var Nu,lc=Ot==="x"?ye:ae,ic=Ot==="x"?qe:Ce,pa=yt[gt],bs=gt==="y"?"height":"width",Ru=pa+st[lc],qa=pa-st[ic],_s=[ye,ae].indexOf(Tt)!==-1,_i=(Nu=Ae==null?void 0:Ae[gt])!=null?Nu:0,Si=_s?Ru:pa-zt[bs]-jt[bs]-_i+Vt.altAxis,ju=_s?pa+zt[bs]+jt[bs]-_i-Vt.altAxis:qa,Ss=et&&_s?function(sc,uc,As){var Lu=_n(sc,uc,As);return Lu>As?As:Lu}(Si,pa,ju):_n(et?Si:Ru,pa,et?ju:qa);yt[gt]=Ss,Xt[gt]=Ss-pa}i.modifiersData[p]=Xt}},requiresIfExists:["offset"]};function oo(h,i,c){c===void 0&&(c=!1);var p,b,E=be(i),D=be(i)&&function(B){var ht=B.getBoundingClientRect(),et=en(ht.width)/B.offsetWidth||1,at=en(ht.height)/B.offsetHeight||1;return et!==1||at!==1}(i),j=ra(i),k=nn(h,D,c),L={scrollLeft:0,scrollTop:0},q={x:0,y:0};return(E||!E&&!c)&&((yn(i)!=="body"||jn(j))&&(L=(p=i)!==fe(p)&&be(p)?{scrollLeft:(b=p).scrollLeft,scrollTop:b.scrollTop}:Ki(p)),be(i)?((q=nn(i,!0)).x+=i.clientLeft,q.y+=i.clientTop):j&&(q.x=de(j))),{x:k.left+L.scrollLeft-q.x,y:k.top+L.scrollTop-q.y,width:k.width,height:k.height}}function fo(h){var i=new Map,c=new Set,p=[];function b(E){c.add(E.name),[].concat(E.requires||[],E.requiresIfExists||[]).forEach(function(D){if(!c.has(D)){var j=i.get(D);j&&b(j)}}),p.push(E)}return h.forEach(function(E){i.set(E.name,E)}),h.forEach(function(E){c.has(E.name)||b(E)}),p}var xr={placement:"bottom",modifiers:[],strategy:"absolute"};function uu(){for(var h=arguments.length,i=new Array(h),c=0;cNumber.parseInt(c,10)):typeof i=="function"?c=>i(c,this._element):i}_getPopperConfig(){const i={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(vt.setDataAttribute(this._menu,"popper","static"),i.modifiers=[{name:"applyStyles",enabled:!1}]),{...i,...it(this._config.popperConfig,[i])}}_selectMenuItem({key:i,target:c}){const p=$.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(b=>U(b));p.length&&ee(p,c,i===Mr,!p.includes(c)).focus()}static jQueryInterface(i){return this.each(function(){const c=ln.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i]()}})}static clearMenus(i){if(i.button===2||i.type==="keyup"&&i.key!=="Tab")return;const c=$.find(ri);for(const p of c){const b=ln.getInstance(p);if(!b||b._config.autoClose===!1)continue;const E=i.composedPath(),D=E.includes(b._menu);if(E.includes(b._element)||b._config.autoClose==="inside"&&!D||b._config.autoClose==="outside"&&D||b._menu.contains(i.target)&&(i.type==="keyup"&&i.key==="Tab"||/input|select|option|textarea|form/i.test(i.target.tagName)))continue;const j={relatedTarget:b._element};i.type==="click"&&(j.clickEvent=i),b._completeHide(j)}}static dataApiKeydownHandler(i){const c=/input|textarea/i.test(i.target.tagName),p=i.key==="Escape",b=[Dr,Mr].includes(i.key);if(!b&&!p||c&&!p)return;i.preventDefault();const E=this.matches(Un)?this:$.prev(this,Un)[0]||$.next(this,Un)[0]||$.findOne(Un,i.delegateTarget.parentNode),D=ln.getOrCreateInstance(E);if(b)return i.stopPropagation(),D.show(),void D._selectMenuItem(i);D._isShown()&&(i.stopPropagation(),D.hide(),E.focus())}}w.on(document,zr,Un,ln.dataApiKeydownHandler),w.on(document,zr,ts,ln.dataApiKeydownHandler),w.on(document,wr,ln.clearMenus),w.on(document,bo,ln.clearMenus),w.on(document,wr,Un,function(h){h.preventDefault(),ln.getOrCreateInstance(this).toggle()}),ot(ln);const ou="backdrop",fu="show",rl=`mousedown.bs.${ou}`,ci={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Ao={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class oi extends oe{constructor(i){super(),this._config=this._getConfig(i),this._isAppended=!1,this._element=null}static get Default(){return ci}static get DefaultType(){return Ao}static get NAME(){return ou}show(i){if(!this._config.isVisible)return void it(i);this._append();const c=this._getElement();this._config.isAnimated&&tt(c),c.classList.add(fu),this._emulateAnimation(()=>{it(i)})}hide(i){this._config.isVisible?(this._getElement().classList.remove(fu),this._emulateAnimation(()=>{this.dispose(),it(i)})):it(i)}dispose(){this._isAppended&&(w.off(this._element,rl),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const i=document.createElement("div");i.className=this._config.className,this._config.isAnimated&&i.classList.add("fade"),this._element=i}return this._element}_configAfterMerge(i){return i.rootElement=N(i.rootElement),i}_append(){if(this._isAppended)return;const i=this._getElement();this._config.rootElement.append(i),w.on(i,rl,()=>{it(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(i){Ct(i,this._getElement(),this._config.isAnimated)}}const fi=".bs.focustrap",Hr=`focusin${fi}`,du=`keydown.tab${fi}`,es="backward",qr={autofocus:!0,trapElement:null},Br={autofocus:"boolean",trapElement:"element"};class hu extends oe{constructor(i){super(),this._config=this._getConfig(i),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return qr}static get DefaultType(){return Br}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),w.off(document,fi),w.on(document,Hr,i=>this._handleFocusin(i)),w.on(document,du,i=>this._handleKeydown(i)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,w.off(document,fi))}_handleFocusin(i){const{trapElement:c}=this._config;if(i.target===document||i.target===c||c.contains(i.target))return;const p=$.focusableChildren(c);p.length===0?c.focus():this._lastTabNavDirection===es?p[p.length-1].focus():p[0].focus()}_handleKeydown(i){i.key==="Tab"&&(this._lastTabNavDirection=i.shiftKey?es:"forward")}}const Yr=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",kr=".sticky-top",ns="padding-right",Xr="margin-right";class mu{constructor(){this._element=document.body}getWidth(){const i=document.documentElement.clientWidth;return Math.abs(window.innerWidth-i)}hide(){const i=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,ns,c=>c+i),this._setElementAttributes(Yr,ns,c=>c+i),this._setElementAttributes(kr,Xr,c=>c-i)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ns),this._resetElementAttributes(Yr,ns),this._resetElementAttributes(kr,Xr)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(i,c,p){const b=this.getWidth();this._applyManipulationCallback(i,E=>{if(E!==this._element&&window.innerWidth>E.clientWidth+b)return;this._saveInitialAttribute(E,c);const D=window.getComputedStyle(E).getPropertyValue(c);E.style.setProperty(c,`${p(Number.parseFloat(D))}px`)})}_saveInitialAttribute(i,c){const p=i.style.getPropertyValue(c);p&&vt.setDataAttribute(i,c,p)}_resetElementAttributes(i,c){this._applyManipulationCallback(i,p=>{const b=vt.getDataAttribute(p,c);b!==null?(vt.removeDataAttribute(p,c),p.style.setProperty(c,b)):p.style.removeProperty(c)})}_applyManipulationCallback(i,c){if(x(i))c(i);else for(const p of $.find(i,this._element))c(p)}}const kt=".bs.modal",di=`hide${kt}`,Gr=`hidePrevented${kt}`,gu=`hidden${kt}`,pu=`show${kt}`,Qr=`shown${kt}`,vu=`resize${kt}`,Eo=`click.dismiss${kt}`,To=`mousedown.dismiss${kt}`,cl=`keydown.dismiss${kt}`,yu=`click${kt}.data-api`,ol="modal-open",as="show",ls="modal-static",Ra={backdrop:!0,focus:!0,keyboard:!0},fl={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Hn extends je{constructor(i,c){super(i,c),this._dialog=$.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new mu,this._addEventListeners()}static get Default(){return Ra}static get DefaultType(){return fl}static get NAME(){return"modal"}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){this._isShown||this._isTransitioning||w.trigger(this._element,pu,{relatedTarget:i}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(ol),this._adjustDialog(),this._backdrop.show(()=>this._showElement(i)))}hide(){this._isShown&&!this._isTransitioning&&(w.trigger(this._element,di).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(as),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){w.off(window,kt),w.off(this._dialog,kt),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new oi({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new hu({trapElement:this._element})}_showElement(i){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const c=$.findOne(".modal-body",this._dialog);c&&(c.scrollTop=0),tt(this._element),this._element.classList.add(as),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,w.trigger(this._element,Qr,{relatedTarget:i})},this._dialog,this._isAnimated())}_addEventListeners(){w.on(this._element,cl,i=>{i.key==="Escape"&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),w.on(window,vu,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),w.on(this._element,To,i=>{w.one(this._element,Eo,c=>{this._element===i.target&&this._element===c.target&&(this._config.backdrop!=="static"?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(ol),this._resetAdjustments(),this._scrollBar.reset(),w.trigger(this._element,gu)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(w.trigger(this._element,Gr).defaultPrevented)return;const i=this._element.scrollHeight>document.documentElement.clientHeight,c=this._element.style.overflowY;c==="hidden"||this._element.classList.contains(ls)||(i||(this._element.style.overflowY="hidden"),this._element.classList.add(ls),this._queueCallback(()=>{this._element.classList.remove(ls),this._queueCallback(()=>{this._element.style.overflowY=c},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const i=this._element.scrollHeight>document.documentElement.clientHeight,c=this._scrollBar.getWidth(),p=c>0;if(p&&!i){const b=rt()?"paddingLeft":"paddingRight";this._element.style[b]=`${c}px`}if(!p&&i){const b=rt()?"paddingRight":"paddingLeft";this._element.style[b]=`${c}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(i,c){return this.each(function(){const p=Hn.getOrCreateInstance(this,i);if(typeof i=="string"){if(p[i]===void 0)throw new TypeError(`No method named "${i}"`);p[i](c)}})}}w.on(document,yu,'[data-bs-toggle="modal"]',function(h){const i=$.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&h.preventDefault(),w.one(i,pu,p=>{p.defaultPrevented||w.one(i,gu,()=>{U(this)&&this.focus()})});const c=$.findOne(".modal.show");c&&Hn.getInstance(c).hide(),Hn.getOrCreateInstance(i).toggle(this)}),Kt(Hn),ot(Hn);const An=".bs.offcanvas",ca=".data-api",Vr=`load${An}${ca}`,bu="show",_u="showing",Zr="hiding",Kr=".offcanvas.show",Oo=`show${An}`,$r=`shown${An}`,Jr=`hide${An}`,Su=`hidePrevented${An}`,Je=`hidden${An}`,Fe=`resize${An}`,dl=`click${An}${ca}`,Au=`keydown.dismiss${An}`,is={backdrop:!0,keyboard:!0,scroll:!1},ss={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class sn extends je{constructor(i,c){super(i,c),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return is}static get DefaultType(){return ss}static get NAME(){return"offcanvas"}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){this._isShown||w.trigger(this._element,Oo,{relatedTarget:i}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||new mu().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(_u),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(bu),this._element.classList.remove(_u),w.trigger(this._element,$r,{relatedTarget:i})},this._element,!0))}hide(){this._isShown&&(w.trigger(this._element,Jr).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Zr),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(bu,Zr),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new mu().reset(),w.trigger(this._element,Je)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const i=!!this._config.backdrop;return new oi({className:"offcanvas-backdrop",isVisible:i,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:i?()=>{this._config.backdrop!=="static"?this.hide():w.trigger(this._element,Su)}:null})}_initializeFocusTrap(){return new hu({trapElement:this._element})}_addEventListeners(){w.on(this._element,Au,i=>{i.key==="Escape"&&(this._config.keyboard?this.hide():w.trigger(this._element,Su))})}static jQueryInterface(i){return this.each(function(){const c=sn.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i](this)}})}}w.on(document,dl,'[data-bs-toggle="offcanvas"]',function(h){const i=$.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&h.preventDefault(),X(this))return;w.one(i,Je,()=>{U(this)&&this.focus()});const c=$.findOne(Kr);c&&c!==i&&sn.getInstance(c).hide(),sn.getOrCreateInstance(i).toggle(this)}),w.on(window,Vr,()=>{for(const h of $.find(Kr))sn.getOrCreateInstance(h).show()}),w.on(window,Fe,()=>{for(const h of $.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(h).position!=="fixed"&&sn.getOrCreateInstance(h).hide()}),Kt(sn),ot(sn);const qn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Fr=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),us=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,hl=(h,i)=>{const c=h.nodeName.toLowerCase();return i.includes(c)?!Fr.has(c)||!!us.test(h.nodeValue):i.filter(p=>p instanceof RegExp).some(p=>p.test(c))},Wr={allowList:qn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},We={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ml={entry:"(string|element|function|null)",selector:"(string|element)"};class gl extends oe{constructor(i){super(),this._config=this._getConfig(i)}static get Default(){return Wr}static get DefaultType(){return We}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(i=>this._resolvePossibleFunction(i)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(i){return this._checkContent(i),this._config.content={...this._config.content,...i},this}toHtml(){const i=document.createElement("div");i.innerHTML=this._maybeSanitize(this._config.template);for(const[b,E]of Object.entries(this._config.content))this._setContent(i,E,b);const c=i.children[0],p=this._resolvePossibleFunction(this._config.extraClass);return p&&c.classList.add(...p.split(" ")),c}_typeCheckConfig(i){super._typeCheckConfig(i),this._checkContent(i.content)}_checkContent(i){for(const[c,p]of Object.entries(i))super._typeCheckConfig({selector:c,entry:p},ml)}_setContent(i,c,p){const b=$.findOne(p,i);b&&((c=this._resolvePossibleFunction(c))?x(c)?this._putElementInTemplate(N(c),b):this._config.html?b.innerHTML=this._maybeSanitize(c):b.textContent=c:b.remove())}_maybeSanitize(i){return this._config.sanitize?function(c,p,b){if(!c.length)return c;if(b&&typeof b=="function")return b(c);const E=new window.DOMParser().parseFromString(c,"text/html"),D=[].concat(...E.body.querySelectorAll("*"));for(const j of D){const k=j.nodeName.toLowerCase();if(!Object.keys(p).includes(k)){j.remove();continue}const L=[].concat(...j.attributes),q=[].concat(p["*"]||[],p[k]||[]);for(const B of L)hl(B,q)||j.removeAttribute(B.nodeName)}return E.body.innerHTML}(i,this._config.allowList,this._config.sanitizeFn):i}_resolvePossibleFunction(i){return it(i,[this])}_putElementInTemplate(i,c){if(this._config.html)return c.innerHTML="",void c.append(i);c.textContent=i.textContent}}const rs=new Set(["sanitize","allowList","sanitizeFn"]),pl="fade",_e="show",Ye=".modal",oa="hide.bs.modal",ke="hover",un="focus",ja={AUTO:"auto",TOP:"top",RIGHT:rt()?"left":"right",BOTTOM:"bottom",LEFT:rt()?"right":"left"},Pr={allowList:qn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Eu={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Bn extends je{constructor(i,c){if(Ii===void 0)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(i,c),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Pr}static get DefaultType(){return Eu}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),w.off(this._element.closest(Ye),oa,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const i=w.trigger(this._element,this.constructor.eventName("show")),c=(Z(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(i.defaultPrevented||!c)return;this._disposePopper();const p=this._getTipElement();this._element.setAttribute("aria-describedby",p.getAttribute("id"));const{container:b}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(b.append(p),w.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(p),p.classList.add(_e),"ontouchstart"in document.documentElement)for(const E of[].concat(...document.body.children))w.on(E,"mouseover",Q);this._queueCallback(()=>{w.trigger(this._element,this.constructor.eventName("shown")),this._isHovered===!1&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!w.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(_e),"ontouchstart"in document.documentElement)for(const i of[].concat(...document.body.children))w.off(i,"mouseover",Q);this._activeTrigger.click=!1,this._activeTrigger[un]=!1,this._activeTrigger[ke]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),w.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(i){const c=this._getTemplateFactory(i).toHtml();if(!c)return null;c.classList.remove(pl,_e),c.classList.add(`bs-${this.constructor.NAME}-auto`);const p=(b=>{do b+=Math.floor(1e6*Math.random());while(document.getElementById(b));return b})(this.constructor.NAME).toString();return c.setAttribute("id",p),this._isAnimated()&&c.classList.add(pl),c}setContent(i){this._newContent=i,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(i){return this._templateFactory?this._templateFactory.changeContent(i):this._templateFactory=new gl({...this._config,content:i,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(i){return this.constructor.getOrCreateInstance(i.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(pl)}_isShown(){return this.tip&&this.tip.classList.contains(_e)}_createPopper(i){const c=it(this._config.placement,[this,i,this._element]),p=ja[c.toUpperCase()];return ru(this._element,i,this._getPopperConfig(p))}_getOffset(){const{offset:i}=this._config;return typeof i=="string"?i.split(",").map(c=>Number.parseInt(c,10)):typeof i=="function"?c=>i(c,this._element):i}_resolvePossibleFunction(i){return it(i,[this._element])}_getPopperConfig(i){const c={placement:i,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:p=>{this._getTipElement().setAttribute("data-popper-placement",p.state.placement)}}]};return{...c,...it(this._config.popperConfig,[c])}}_setListeners(){const i=this._config.trigger.split(" ");for(const c of i)if(c==="click")w.on(this._element,this.constructor.eventName("click"),this._config.selector,p=>{this._initializeOnDelegatedTarget(p).toggle()});else if(c!=="manual"){const p=c===ke?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),b=c===ke?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");w.on(this._element,p,this._config.selector,E=>{const D=this._initializeOnDelegatedTarget(E);D._activeTrigger[E.type==="focusin"?un:ke]=!0,D._enter()}),w.on(this._element,b,this._config.selector,E=>{const D=this._initializeOnDelegatedTarget(E);D._activeTrigger[E.type==="focusout"?un:ke]=D._element.contains(E.relatedTarget),D._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},w.on(this._element.closest(Ye),oa,this._hideModalHandler)}_fixTitle(){const i=this._element.getAttribute("title");i&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",i),this._element.setAttribute("data-bs-original-title",i),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(i,c){clearTimeout(this._timeout),this._timeout=setTimeout(i,c)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(i){const c=vt.getDataAttributes(this._element);for(const p of Object.keys(c))rs.has(p)&&delete c[p];return i={...c,...typeof i=="object"&&i?i:{}},i=this._mergeConfigObj(i),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}_configAfterMerge(i){return i.container=i.container===!1?document.body:N(i.container),typeof i.delay=="number"&&(i.delay={show:i.delay,hide:i.delay}),typeof i.title=="number"&&(i.title=i.title.toString()),typeof i.content=="number"&&(i.content=i.content.toString()),i}_getDelegateConfig(){const i={};for(const[c,p]of Object.entries(this._config))this.constructor.Default[c]!==p&&(i[c]=p);return i.selector=!1,i.trigger="manual",i}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(i){return this.each(function(){const c=Bn.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i]()}})}}ot(Bn);const Se={...Bn.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},ce={...Bn.DefaultType,content:"(null|string|element|function)"};class _t extends Bn{static get Default(){return Se}static get DefaultType(){return ce}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(i){return this.each(function(){const c=_t.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i]()}})}}ot(_t);const Xe=".bs.scrollspy",En=`activate${Xe}`,cs=`click${Xe}`,La=`load${Xe}.data-api`,Ua="active",os="[href]",vl=".nav-link",hi=`${vl}, .nav-item > ${vl}, .list-group-item`,mi={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},gi={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class yl extends je{constructor(i,c){super(i,c),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return mi}static get DefaultType(){return gi}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const i of this._observableSections.values())this._observer.observe(i)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(i){return i.target=N(i.target)||document.body,i.rootMargin=i.offset?`${i.offset}px 0px -30%`:i.rootMargin,typeof i.threshold=="string"&&(i.threshold=i.threshold.split(",").map(c=>Number.parseFloat(c))),i}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(w.off(this._config.target,cs),w.on(this._config.target,cs,os,i=>{const c=this._observableSections.get(i.target.hash);if(c){i.preventDefault();const p=this._rootElement||window,b=c.offsetTop-this._element.offsetTop;if(p.scrollTo)return void p.scrollTo({top:b,behavior:"smooth"});p.scrollTop=b}}))}_getNewObserver(){const i={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(c=>this._observerCallback(c),i)}_observerCallback(i){const c=D=>this._targetLinks.get(`#${D.target.id}`),p=D=>{this._previousScrollData.visibleEntryTop=D.target.offsetTop,this._process(c(D))},b=(this._rootElement||document.documentElement).scrollTop,E=b>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=b;for(const D of i){if(!D.isIntersecting){this._activeTarget=null,this._clearActiveClass(c(D));continue}const j=D.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(E&&j){if(p(D),!b)return}else E||j||p(D)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const i=$.find(os,this._config.target);for(const c of i){if(!c.hash||X(c))continue;const p=$.findOne(decodeURI(c.hash),this._element);U(p)&&(this._targetLinks.set(decodeURI(c.hash),c),this._observableSections.set(c.hash,p))}}_process(i){this._activeTarget!==i&&(this._clearActiveClass(this._config.target),this._activeTarget=i,i.classList.add(Ua),this._activateParents(i),w.trigger(this._element,En,{relatedTarget:i}))}_activateParents(i){if(i.classList.contains("dropdown-item"))$.findOne(".dropdown-toggle",i.closest(".dropdown")).classList.add(Ua);else for(const c of $.parents(i,".nav, .list-group"))for(const p of $.prev(c,hi))p.classList.add(Ua)}_clearActiveClass(i){i.classList.remove(Ua);const c=$.find(`${os}.${Ua}`,i);for(const p of c)p.classList.remove(Ua)}static jQueryInterface(i){return this.each(function(){const c=yl.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i]()}})}}w.on(window,La,()=>{for(const h of $.find('[data-bs-spy="scroll"]'))yl.getOrCreateInstance(h)}),ot(yl);const Yn=".bs.tab",Ir=`hide${Yn}`,fs=`hidden${Yn}`,tc=`show${Yn}`,pi=`shown${Yn}`,ec=`click${Yn}`,bl=`keydown${Yn}`,vi=`load${Yn}`,ds="ArrowLeft",_l="ArrowRight",hs="ArrowUp",Tu="ArrowDown",ms="Home",fa="End",da="active",Ha="fade",Sl="show",Ou=".dropdown-toggle",yi=`:not(${Ou})`,gs='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Me=`.nav-link${yi}, .list-group-item${yi}, [role="tab"]${yi}, ${gs}`,Tn=`.${da}[data-bs-toggle="tab"], .${da}[data-bs-toggle="pill"], .${da}[data-bs-toggle="list"]`;class we extends je{constructor(i){super(i),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),w.on(this._element,bl,c=>this._keydown(c)))}static get NAME(){return"tab"}show(){const i=this._element;if(this._elemIsActive(i))return;const c=this._getActiveElem(),p=c?w.trigger(c,Ir,{relatedTarget:i}):null;w.trigger(i,tc,{relatedTarget:c}).defaultPrevented||p&&p.defaultPrevented||(this._deactivate(c,i),this._activate(i,c))}_activate(i,c){i&&(i.classList.add(da),this._activate($.getElementFromSelector(i)),this._queueCallback(()=>{i.getAttribute("role")==="tab"?(i.removeAttribute("tabindex"),i.setAttribute("aria-selected",!0),this._toggleDropDown(i,!0),w.trigger(i,pi,{relatedTarget:c})):i.classList.add(Sl)},i,i.classList.contains(Ha)))}_deactivate(i,c){i&&(i.classList.remove(da),i.blur(),this._deactivate($.getElementFromSelector(i)),this._queueCallback(()=>{i.getAttribute("role")==="tab"?(i.setAttribute("aria-selected",!1),i.setAttribute("tabindex","-1"),this._toggleDropDown(i,!1),w.trigger(i,fs,{relatedTarget:c})):i.classList.remove(Sl)},i,i.classList.contains(Ha)))}_keydown(i){if(![ds,_l,hs,Tu,ms,fa].includes(i.key))return;i.stopPropagation(),i.preventDefault();const c=this._getChildren().filter(b=>!X(b));let p;if([ms,fa].includes(i.key))p=c[i.key===ms?0:c.length-1];else{const b=[_l,Tu].includes(i.key);p=ee(c,i.target,b,!0)}p&&(p.focus({preventScroll:!0}),we.getOrCreateInstance(p).show())}_getChildren(){return $.find(Me,this._parent)}_getActiveElem(){return this._getChildren().find(i=>this._elemIsActive(i))||null}_setInitialAttributes(i,c){this._setAttributeIfNotExists(i,"role","tablist");for(const p of c)this._setInitialAttributesOnChild(p)}_setInitialAttributesOnChild(i){i=this._getInnerElement(i);const c=this._elemIsActive(i),p=this._getOuterElement(i);i.setAttribute("aria-selected",c),p!==i&&this._setAttributeIfNotExists(p,"role","presentation"),c||i.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(i,"role","tab"),this._setInitialAttributesOnTargetPanel(i)}_setInitialAttributesOnTargetPanel(i){const c=$.getElementFromSelector(i);c&&(this._setAttributeIfNotExists(c,"role","tabpanel"),i.id&&this._setAttributeIfNotExists(c,"aria-labelledby",`${i.id}`))}_toggleDropDown(i,c){const p=this._getOuterElement(i);if(!p.classList.contains("dropdown"))return;const b=(E,D)=>{const j=$.findOne(E,p);j&&j.classList.toggle(D,c)};b(Ou,da),b(".dropdown-menu",Sl),p.setAttribute("aria-expanded",c)}_setAttributeIfNotExists(i,c,p){i.hasAttribute(c)||i.setAttribute(c,p)}_elemIsActive(i){return i.classList.contains(da)}_getInnerElement(i){return i.matches(Me)?i:$.findOne(Me,i)}_getOuterElement(i){return i.closest(".nav-item, .list-group-item")||i}static jQueryInterface(i){return this.each(function(){const c=we.getOrCreateInstance(this);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i]()}})}}w.on(document,ec,gs,function(h){["A","AREA"].includes(this.tagName)&&h.preventDefault(),X(this)||we.getOrCreateInstance(this).show()}),w.on(window,vi,()=>{for(const h of $.find(Tn))we.getOrCreateInstance(h)}),ot(we);const kn=".bs.toast",ha=`mouseover${kn}`,Xn=`mouseout${kn}`,le=`focusin${kn}`,ps=`focusout${kn}`,xo=`hide${kn}`,Co=`hidden${kn}`,Do=`show${kn}`,ie=`shown${kn}`,vs="hide",ma="show",ga="showing",xu={animation:"boolean",autohide:"boolean",delay:"number"},Al={animation:!0,autohide:!0,delay:5e3};class On extends je{constructor(i,c){super(i,c),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Al}static get DefaultType(){return xu}static get NAME(){return"toast"}show(){w.trigger(this._element,Do).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(vs),tt(this._element),this._element.classList.add(ma,ga),this._queueCallback(()=>{this._element.classList.remove(ga),w.trigger(this._element,ie),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(w.trigger(this._element,xo).defaultPrevented||(this._element.classList.add(ga),this._queueCallback(()=>{this._element.classList.add(vs),this._element.classList.remove(ga,ma),w.trigger(this._element,Co)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ma),super.dispose()}isShown(){return this._element.classList.contains(ma)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(i,c){switch(i.type){case"mouseover":case"mouseout":this._hasMouseInteraction=c;break;case"focusin":case"focusout":this._hasKeyboardInteraction=c}if(c)return void this._clearTimeout();const p=i.relatedTarget;this._element===p||this._element.contains(p)||this._maybeScheduleHide()}_setListeners(){w.on(this._element,ha,i=>this._onInteraction(i,!0)),w.on(this._element,Xn,i=>this._onInteraction(i,!1)),w.on(this._element,le,i=>this._onInteraction(i,!0)),w.on(this._element,ps,i=>this._onInteraction(i,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(i){return this.each(function(){const c=On.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i](this)}})}}return Kt(On),ot(On),{Alert:Ve,Button:ta,Carousel:Ta,Collapse:la,Dropdown:ln,Modal:Hn,Offcanvas:sn,Popover:_t,ScrollSpy:yl,Tab:we,Toast:On,Tooltip:Bn}})}(Xc)),Xc.exports}F0();var Ff={exports:{}},Wf,$m;function W0(){if($m)return Wf;$m=1;var u="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Wf=u,Wf}var Pf,Jm;function P0(){if(Jm)return Pf;Jm=1;var u=W0();function r(){}function f(){}return f.resetWarningCache=r,Pf=function(){function o(S,x,N,U,X,Z){if(Z!==u){var Q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw Q.name="Invariant Violation",Q}}o.isRequired=o;function m(){return o}var v={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:m,element:o,elementType:o,instanceOf:m,node:o,objectOf:m,oneOf:m,oneOfType:m,shape:m,exact:m,checkPropTypes:f,resetWarningCache:r};return v.PropTypes=v,v},Pf}var Fm;function I0(){return Fm||(Fm=1,Ff.exports=P0()()),Ff.exports}var tv=I0();const K=wg(tv),Ng=u=>G.jsx("main",{className:"container justify-content-center",children:u.children});Ng.propTypes={children:K.node};function Rg(u,r){const f=F.useRef(r);F.useEffect(function(){r!==f.current&&u.attributionControl!=null&&(f.current!=null&&u.attributionControl.removeAttribution(f.current),r!=null&&u.attributionControl.addAttribution(r)),f.current=r},[u,r])}function ev(u,r,f){r.center!==f.center&&u.setLatLng(r.center),r.radius!=null&&r.radius!==f.radius&&u.setRadius(r.radius)}var nv=zg();const av=1;function lv(u){return Object.freeze({__version:av,map:u})}function iv(u,r){return Object.freeze({...u,...r})}const Od=F.createContext(null);function xd(){const u=F.use(Od);if(u==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return u}function sv(u){function r(f,o){const{instance:m,context:v}=u(f).current;F.useImperativeHandle(o,()=>m);const{children:S}=f;return S==null?null:Ri.createElement(Od,{value:v},S)}return F.forwardRef(r)}function uv(u){function r(f,o){const[m,v]=F.useState(!1),{instance:S}=u(f,v).current;F.useImperativeHandle(o,()=>S),F.useEffect(function(){m&&S.update()},[S,m,f.children]);const x=S._contentNode;return x?nv.createPortal(f.children,x):null}return F.forwardRef(r)}function rv(u){function r(f,o){const{instance:m}=u(f).current;return F.useImperativeHandle(o,()=>m),null}return F.forwardRef(r)}function Cd(u,r){const f=F.useRef(void 0);F.useEffect(function(){return r!=null&&u.instance.on(r),f.current=r,function(){f.current!=null&&u.instance.off(f.current),f.current=null}},[u,r])}function $c(u,r){const f=u.pane??r.pane;return f?{...u,pane:f}:u}function cv(u,r){return function(o,m){const v=xd(),S=u($c(o,v),v);return Rg(v.map,o.attribution),Cd(S.current,o.eventHandlers),r(S.current,v,o,m),S}}var Jc=L0();function Dd(u,r,f){return Object.freeze({instance:u,context:r,container:f})}function Md(u,r){return r==null?function(o,m){const v=F.useRef(void 0);return v.current||(v.current=u(o,m)),v}:function(o,m){const v=F.useRef(void 0);v.current||(v.current=u(o,m));const S=F.useRef(o),{instance:x}=v.current;return F.useEffect(function(){S.current!==o&&(r(x,o,S.current),S.current=o)},[x,o,r]),v}}function jg(u,r){F.useEffect(function(){return(r.layerContainer??r.map).addLayer(u.instance),function(){var v;(v=r.layerContainer)==null||v.removeLayer(u.instance),r.map.removeLayer(u.instance)}},[r,u])}function ov(u){return function(f){const o=xd(),m=u($c(f,o),o);return Rg(o.map,f.attribution),Cd(m.current,f.eventHandlers),jg(m.current,o),m}}function fv(u,r){const f=F.useRef(void 0);F.useEffect(function(){if(r.pathOptions!==f.current){const m=r.pathOptions??{};u.instance.setStyle(m),f.current=m}},[u,r])}function dv(u){return function(f){const o=xd(),m=u($c(f,o),o);return Cd(m.current,f.eventHandlers),jg(m.current,o),fv(m.current,f),m}}function hv(u,r){const f=Md(u),o=cv(f,r);return uv(o)}function mv(u,r){const f=Md(u,r),o=dv(f);return sv(o)}function gv(u,r){const f=Md(u,r),o=ov(f);return rv(o)}function pv(u,r,f){const{opacity:o,zIndex:m}=r;o!=null&&o!==f.opacity&&u.setOpacity(o),m!=null&&m!==f.zIndex&&u.setZIndex(m)}const Wm=mv(function({center:r,children:f,...o},m){const v=new Jc.Circle(r,o);return Dd(v,iv(m,{overlayContainer:v}))},ev);function vv({bounds:u,boundsOptions:r,center:f,children:o,className:m,id:v,placeholder:S,style:x,whenReady:N,zoom:U,...X},Z){const[Q]=F.useState({className:m,id:v,style:x}),[tt,ct]=F.useState(null),Et=F.useRef(void 0);F.useImperativeHandle(Z,()=>(tt==null?void 0:tt.map)??null,[tt]);const rt=F.useCallback(it=>{if(it!==null&&!Et.current){const Ct=new Jc.Map(it,X);Et.current=Ct,f!=null&&U!=null?Ct.setView(f,U):u!=null&&Ct.fitBounds(u,r),N!=null&&Ct.whenReady(N),ct(lv(Ct))}},[]);F.useEffect(()=>()=>{tt==null||tt.map.remove()},[tt]);const ot=tt?Ri.createElement(Od,{value:tt},o):S??null;return Ri.createElement("div",{...Q,ref:rt},ot)}const yv=F.forwardRef(vv),bv=hv(function(r,f){const o=new Jc.Popup(r,f.overlayContainer);return Dd(o,f)},function(r,f,{position:o},m){F.useEffect(function(){const{instance:S}=r;function x(U){U.popup===S&&(S.update(),m(!0))}function N(U){U.popup===S&&m(!1)}return f.map.on({popupopen:x,popupclose:N}),f.overlayContainer==null?(o!=null&&S.setLatLng(o),S.openOn(f.map)):f.overlayContainer.bindPopup(S),function(){var X;f.map.off({popupopen:x,popupclose:N}),(X=f.overlayContainer)==null||X.unbindPopup(),f.map.removeLayer(S)}},[r,f,m,o])}),_v=gv(function({url:r,...f},o){const m=new Jc.TileLayer(r,$c(f,o));return Dd(m,o)},function(r,f,o){pv(r,f,o);const{url:m}=f;m!=null&&m!==o.url&&r.setUrl(m)}),Lg=F.createContext(),Ug=({children:u})=>{const[r,f]=F.useState(null),[o,m]=F.useState(!0),[v,S]=F.useState(null);return F.useEffect(()=>{(async()=>{try{const N=await fetch("/config/settings.json");if(!N.ok)throw new Error("Error al cargar settings.json");const U=await N.json();f(U)}catch(N){S(N.message)}finally{m(!1)}})()},[]),G.jsx(Lg.Provider,{value:{config:r,configLoading:o,configError:v},children:u})};Ug.propTypes={children:K.node.isRequired};const mr=()=>F.useContext(Lg),Hg=F.createContext(),Fc=({children:u,config:r})=>{const[f,o]=F.useState(null),[m,v]=F.useState(!0),[S,x]=F.useState(null);return F.useEffect(()=>{(async()=>{try{const U=new URLSearchParams(r.params).toString(),X=`${r.baseUrl}?${U}`,Z=await fetch(X);if(!Z.ok)throw new Error("Error al obtener datos");const Q=await Z.json();o(Q)}catch(U){x(U.message)}finally{v(!1)}})()},[r]),G.jsx(Hg.Provider,{value:{data:f,dataLoading:m,dataError:S},children:u})};Fc.propTypes={children:K.node.isRequired,config:K.shape({baseUrl:K.string.isRequired,params:K.object}).isRequired};const wd=()=>F.useContext(Hg),Sv=({data:u})=>u.map(({lat:r,lng:f,level:o},m)=>{const v=o<20?"#00FF85":o<60?"#FFA500":"#FF0000",S=4,N=400/S;return G.jsxs("div",{children:[[...Array(S)].map((U,X)=>{const Z=N*(X+1),Q=.6*((X+1)/S);return G.jsx(Wm,{center:[r,f],pathOptions:{color:v,fillColor:v,fillOpacity:Q,weight:1},radius:Z},`${m}-${X}`)}),G.jsx(Wm,{center:[r,f],pathOptions:{color:v,fillColor:v,fillOpacity:.8,weight:2},radius:50,children:G.jsxs(bv,{children:["Contaminación: ",o," µg/m³"]})})]},m)}),Av=()=>{const{config:u,configLoading:r,configError:f}=mr();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});const o=u.appConfig.endpoints.baseUrl,m=u.appConfig.endpoints.sensors,v={baseUrl:`${o}/${m}`,params:{}};return G.jsx(Fc,{config:v,children:G.jsx(Ev,{})})},Ev=()=>{const{config:u,configLoading:r,configError:f}=mr(),{data:o,dataLoading:m,dataError:v}=wd();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});if(m)return G.jsx("p",{children:"Cargando datos..."});if(v)return G.jsxs("p",{children:["Error al cargar datos: ",f]});if(!o)return G.jsx("p",{children:"Datos no disponibles."});const S=u==null?void 0:u.userConfig.city,x=o.map(N=>({lat:N.lat,lng:N.lon,level:N.value}));return G.jsx("div",{className:"p-3",children:G.jsxs(yv,{center:S,zoom:13,scrollWheelZoom:!1,style:Tv,children:[G.jsx(_v,{attribution:'© Contribuidores de OpenStreetMap',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),G.jsx(Sv,{data:x})]})})},Tv={height:"500px",width:"100%",borderRadius:"20px"},qg="label";function Pm(u,r){typeof u=="function"?u(r):u&&(u.current=r)}function Ov(u,r){const f=u.options;f&&r&&Object.assign(f,r)}function Bg(u,r){u.labels=r}function Yg(u,r){let f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:qg;const o=[];u.datasets=r.map(m=>{const v=u.datasets.find(S=>S[f]===m[f]);return!v||!m.data||o.includes(v)?{...m}:(o.push(v),Object.assign(v,m),v)})}function xv(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qg;const f={labels:[],datasets:[]};return Bg(f,u.labels),Yg(f,u.datasets,r),f}function Cv(u,r){const{height:f=150,width:o=300,redraw:m=!1,datasetIdKey:v,type:S,data:x,options:N,plugins:U=[],fallbackContent:X,updateMode:Z,...Q}=u,tt=F.useRef(null),ct=F.useRef(null),Et=()=>{tt.current&&(ct.current=new Td(tt.current,{type:S,data:xv(x,v),options:N&&{...N},plugins:U}),Pm(r,ct.current))},rt=()=>{Pm(r,null),ct.current&&(ct.current.destroy(),ct.current=null)};return F.useEffect(()=>{!m&&ct.current&&N&&Ov(ct.current,N)},[m,N]),F.useEffect(()=>{!m&&ct.current&&Bg(ct.current.config.data,x.labels)},[m,x.labels]),F.useEffect(()=>{!m&&ct.current&&x.datasets&&Yg(ct.current.config.data,x.datasets,v)},[m,x.datasets]),F.useEffect(()=>{ct.current&&(m?(rt(),setTimeout(Et)):ct.current.update(Z))},[m,N,x.labels,x.datasets,Z]),F.useEffect(()=>{ct.current&&(rt(),setTimeout(Et))},[S]),F.useEffect(()=>(Et(),()=>rt()),[]),Ri.createElement("canvas",{ref:tt,role:"img",height:f,width:o,...Q},X)}const Dv=F.forwardRef(Cv);function Mv(u,r){return Td.register(r),F.forwardRef((f,o)=>Ri.createElement(Dv,{...f,ref:o,type:u}))}const wv=Mv("line",U0),kg=F.createContext();function Xg({children:u}){const[r,f]=F.useState(()=>localStorage.getItem("theme")||"light");F.useEffect(()=>{document.body.classList.remove("light","dark"),document.body.classList.add(r),localStorage.setItem("theme",r)},[r]);const o=()=>{f(m=>m==="light"?"dark":"light")};return G.jsx(kg.Provider,{value:{theme:r,toggleTheme:o},children:u})}Xg.propTypes={children:K.node.isRequired};function Wc(){return F.useContext(kg)}const zd=({title:u,status:r,children:f,styleMode:o,className:m,titleIcon:v})=>{const S=F.useRef(null),[x,N]=F.useState(u),{theme:U}=Wc();return F.useEffect(()=>{const X=()=>{S.current&&(S.current.offsetWidth<300&&u.length>15?N(u.slice(0,10)+"."):N(u))};return X(),window.addEventListener("resize",X),()=>window.removeEventListener("resize",X)},[u]),G.jsx("div",{ref:S,className:o==="override"?`${m}`:`col-xl-3 col-sm-6 d-flex flex-column align-items-center p-3 card-container ${m}`,children:G.jsxs("div",{className:`card p-3 w-100 ${U}`,children:[G.jsxs("h3",{className:"text-center",children:[v,x]}),G.jsx("div",{className:"card-content",children:f}),r?G.jsx("span",{className:"status text-center mt-2",children:r}):null]})})};zd.propTypes={title:K.string.isRequired,status:K.string.isRequired,children:K.node.isRequired,styleMode:K.oneOf(["override",""]),className:K.string,titleIcon:K.node};zd.defaultProps={styleMode:""};const Nd=({cards:u,className:r})=>G.jsx("div",{className:`row justify-content-center g-0 ${r}`,children:u.map((f,o)=>G.jsx(zd,{title:f.title,status:f.status,styleMode:f.styleMode,className:f.className,titleIcon:f.titleIcon,children:G.jsx("p",{className:"card-text text-center",children:f.content})},o))});Nd.propTypes={cards:K.arrayOf(K.shape({title:K.string.isRequired,content:K.string.isRequired,status:K.string.isRequired})).isRequired,className:K.string};Td.register(H0,q0,B0,Y0,k0);const zv=()=>{const{config:u,configLoading:r,configError:f}=mr();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});const o=u.appConfig.endpoints.baseUrl,m=u.appConfig.endpoints.sensors,v={baseUrl:`${o}/${m}`,params:{}};return G.jsx(Fc,{config:v,children:G.jsx(Gg,{})})},Gg=()=>{var tt,ct,Et,rt;const{config:u}=mr(),{data:r,loading:f}=wd(),{theme:o}=Wc(),m=((ct=(tt=u==null?void 0:u.appConfig)==null?void 0:tt.historyChartConfig)==null?void 0:ct.chartOptionsDark)??{},v=((rt=(Et=u==null?void 0:u.appConfig)==null?void 0:Et.historyChartConfig)==null?void 0:rt.chartOptionsLight)??{},S=o==="dark"?m:v,x=new Date().getHours();console.log("currentHour",x);const N=[`${x-3}:00`,`${x-2}:00`,`${x-1}:00`,`${x}:00`,`${x+1}:00`,`${x+2}:00`,`${x+3}:00`];if(f)return G.jsx("p",{children:"Cargando datos..."});const U=[],X=[],Z=[];r==null||r.forEach(ot=>{ot.value!=null&&(ot.sensor_type==="MQ-135"?Z.push(ot.value):ot.sensor_type==="DHT-11"&&(U.push(ot.value),X.push(ot.value)))});const Q=[{title:"🌡️ Temperatura",data:U.length?U:[0],borderColor:"#00FF85",backgroundColor:"rgba(0, 255, 133, 0.2)"},{title:"💧 Humedad",data:X.length?X:[0],borderColor:"#00D4FF",backgroundColor:"rgba(0, 212, 255, 0.2)"},{title:"☁️ Contaminación",data:Z.length?Z:[0],borderColor:"#FFA500",backgroundColor:"rgba(255, 165, 0, 0.2)"}];return G.jsx(Nd,{cards:Q.map(({title:ot,data:it,borderColor:Ct,backgroundColor:ee})=>({title:ot,content:G.jsx(wv,{data:{labels:N,datasets:[{data:it,borderColor:Ct,backgroundColor:ee,fill:!0,tension:.4}]},options:S}),styleMode:"override",className:"col-lg-4 col-xxs-12 d-flex flex-column align-items-center p-3 card-container"})),className:""})};Gg.propTypes={options:K.object,timeLabels:K.array,data:K.array};/*! + */var J0=Xc.exports,Km;function F0(){return Km||(Km=1,function(u,r){(function(f,o){u.exports=o()})(J0,function(){const f=new Map,o={set(h,i,c){f.has(h)||f.set(h,new Map);const p=f.get(h);p.has(i)||p.size===0?p.set(i,c):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(p.keys())[0]}.`)},get:(h,i)=>f.has(h)&&f.get(h).get(i)||null,remove(h,i){if(!f.has(h))return;const c=f.get(h);c.delete(i),c.size===0&&f.delete(h)}},m="transitionend",v=h=>(h&&window.CSS&&window.CSS.escape&&(h=h.replace(/#([^\s"#']+)/g,(i,c)=>`#${CSS.escape(c)}`)),h),S=h=>{h.dispatchEvent(new Event(m))},x=h=>!(!h||typeof h!="object")&&(h.jquery!==void 0&&(h=h[0]),h.nodeType!==void 0),N=h=>x(h)?h.jquery?h[0]:h:typeof h=="string"&&h.length>0?document.querySelector(v(h)):null,U=h=>{if(!x(h)||h.getClientRects().length===0)return!1;const i=getComputedStyle(h).getPropertyValue("visibility")==="visible",c=h.closest("details:not([open])");if(!c)return i;if(c!==h){const p=h.closest("summary");if(p&&p.parentNode!==c||p===null)return!1}return i},X=h=>!h||h.nodeType!==Node.ELEMENT_NODE||!!h.classList.contains("disabled")||(h.disabled!==void 0?h.disabled:h.hasAttribute("disabled")&&h.getAttribute("disabled")!=="false"),Z=h=>{if(!document.documentElement.attachShadow)return null;if(typeof h.getRootNode=="function"){const i=h.getRootNode();return i instanceof ShadowRoot?i:null}return h instanceof ShadowRoot?h:h.parentNode?Z(h.parentNode):null},Q=()=>{},tt=h=>{h.offsetHeight},ct=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Et=[],rt=()=>document.documentElement.dir==="rtl",ot=h=>{var i;i=()=>{const c=ct();if(c){const p=h.NAME,b=c.fn[p];c.fn[p]=h.jQueryInterface,c.fn[p].Constructor=h,c.fn[p].noConflict=()=>(c.fn[p]=b,h.jQueryInterface)}},document.readyState==="loading"?(Et.length||document.addEventListener("DOMContentLoaded",()=>{for(const c of Et)c()}),Et.push(i)):i()},it=(h,i=[],c=h)=>typeof h=="function"?h(...i):c,Ct=(h,i,c=!0)=>{if(!c)return void it(h);const p=(D=>{if(!D)return 0;let{transitionDuration:j,transitionDelay:k}=window.getComputedStyle(D);const L=Number.parseFloat(j),q=Number.parseFloat(k);return L||q?(j=j.split(",")[0],k=k.split(",")[0],1e3*(Number.parseFloat(j)+Number.parseFloat(k))):0})(i)+5;let b=!1;const E=({target:D})=>{D===i&&(b=!0,i.removeEventListener(m,E),it(h))};i.addEventListener(m,E),setTimeout(()=>{b||S(i)},p)},ee=(h,i,c,p)=>{const b=h.length;let E=h.indexOf(i);return E===-1?!c&&p?h[b-1]:h[0]:(E+=c?1:-1,p&&(E=(E+b)%b),h[Math.max(0,Math.min(E,b-1))])},ne=/[^.]*(?=\..*)\.|.*/,Re=/\..*/,Kn=/::\d+$/,hn={};let ft=1;const wt={mouseenter:"mouseover",mouseleave:"mouseout"},zn=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Ia(h,i){return i&&`${i}::${ft++}`||h.uidEvent||ft++}function $n(h){const i=Ia(h);return h.uidEvent=i,hn[i]=hn[i]||{},hn[i]}function Jn(h,i,c=null){return Object.values(h).find(p=>p.callable===i&&p.delegationSelector===c)}function Fn(h,i,c){const p=typeof i=="string",b=p?c:i||c;let E=Ht(h);return zn.has(E)||(E=h),[p,b,E]}function V(h,i,c,p,b){if(typeof i!="string"||!h)return;let[E,D,j]=Fn(i,c,p);i in wt&&(D=(at=>function(lt){if(!lt.relatedTarget||lt.relatedTarget!==lt.delegateTarget&&!lt.delegateTarget.contains(lt.relatedTarget))return at.call(this,lt)})(D));const k=$n(h),L=k[j]||(k[j]={}),q=Jn(L,D,E?c:null);if(q)return void(q.oneOff=q.oneOff&&b);const B=Ia(D,i.replace(ne,"")),ht=E?function(et,at,lt){return function st(Tt){const Lt=et.querySelectorAll(at);for(let{target:W}=Tt;W&&W!==this;W=W.parentNode)for(const Ot of Lt)if(Ot===W)return Wn(Tt,{delegateTarget:W}),st.oneOff&&w.off(et,Tt.type,at,lt),lt.apply(W,[Tt])}}(h,c,D):function(et,at){return function lt(st){return Wn(st,{delegateTarget:et}),lt.oneOff&&w.off(et,st.type,at),at.apply(et,[st])}}(h,D);ht.delegationSelector=E?c:null,ht.callable=D,ht.oneOff=b,ht.uidEvent=B,L[B]=ht,h.addEventListener(j,ht,E)}function mt(h,i,c,p,b){const E=Jn(i[c],p,b);E&&(h.removeEventListener(c,E,!!b),delete i[c][E.uidEvent])}function dt(h,i,c,p){const b=i[c]||{};for(const[E,D]of Object.entries(b))E.includes(p)&&mt(h,i,c,D.callable,D.delegationSelector)}function Ht(h){return h=h.replace(Re,""),wt[h]||h}const w={on(h,i,c,p){V(h,i,c,p,!1)},one(h,i,c,p){V(h,i,c,p,!0)},off(h,i,c,p){if(typeof i!="string"||!h)return;const[b,E,D]=Fn(i,c,p),j=D!==i,k=$n(h),L=k[D]||{},q=i.startsWith(".");if(E===void 0){if(q)for(const B of Object.keys(k))dt(h,k,B,i.slice(1));for(const[B,ht]of Object.entries(L)){const et=B.replace(Kn,"");j&&!i.includes(et)||mt(h,k,D,ht.callable,ht.delegationSelector)}}else{if(!Object.keys(L).length)return;mt(h,k,D,E,b?c:null)}},trigger(h,i,c){if(typeof i!="string"||!h)return null;const p=ct();let b=null,E=!0,D=!0,j=!1;i!==Ht(i)&&p&&(b=p.Event(i,c),p(h).trigger(b),E=!b.isPropagationStopped(),D=!b.isImmediatePropagationStopped(),j=b.isDefaultPrevented());const k=Wn(new Event(i,{bubbles:E,cancelable:!0}),c);return j&&k.preventDefault(),D&&h.dispatchEvent(k),k.defaultPrevented&&b&&b.preventDefault(),k}};function Wn(h,i={}){for(const[c,p]of Object.entries(i))try{h[c]=p}catch{Object.defineProperty(h,c,{configurable:!0,get:()=>p})}return h}function Pn(h){if(h==="true")return!0;if(h==="false")return!1;if(h===Number(h).toString())return Number(h);if(h===""||h==="null")return null;if(typeof h!="string")return h;try{return JSON.parse(decodeURIComponent(h))}catch{return h}}function Ie(h){return h.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}const vt={setDataAttribute(h,i,c){h.setAttribute(`data-bs-${Ie(i)}`,c)},removeDataAttribute(h,i){h.removeAttribute(`data-bs-${Ie(i)}`)},getDataAttributes(h){if(!h)return{};const i={},c=Object.keys(h.dataset).filter(p=>p.startsWith("bs")&&!p.startsWith("bsConfig"));for(const p of c){let b=p.replace(/^bs/,"");b=b.charAt(0).toLowerCase()+b.slice(1,b.length),i[b]=Pn(h.dataset[p])}return i},getDataAttribute:(h,i)=>Pn(h.getAttribute(`data-bs-${Ie(i)}`))};class oe{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(i){return i=this._mergeConfigObj(i),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}_configAfterMerge(i){return i}_mergeConfigObj(i,c){const p=x(c)?vt.getDataAttribute(c,"config"):{};return{...this.constructor.Default,...typeof p=="object"?p:{},...x(c)?vt.getDataAttributes(c):{},...typeof i=="object"?i:{}}}_typeCheckConfig(i,c=this.constructor.DefaultType){for(const[b,E]of Object.entries(c)){const D=i[b],j=x(D)?"element":(p=D)==null?`${p}`:Object.prototype.toString.call(p).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(E).test(j))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${b}" provided type "${j}" but expected type "${E}".`)}var p}}class je extends oe{constructor(i,c){super(),(i=N(i))&&(this._element=i,this._config=this._getConfig(c),o.set(this._element,this.constructor.DATA_KEY,this))}dispose(){o.remove(this._element,this.constructor.DATA_KEY),w.off(this._element,this.constructor.EVENT_KEY);for(const i of Object.getOwnPropertyNames(this))this[i]=null}_queueCallback(i,c,p=!0){Ct(i,c,p)}_getConfig(i){return i=this._mergeConfigObj(i,this._element),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}static getInstance(i){return o.get(N(i),this.DATA_KEY)}static getOrCreateInstance(i,c={}){return this.getInstance(i)||new this(i,typeof c=="object"?c:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(i){return`${i}${this.EVENT_KEY}`}}const In=h=>{let i=h.getAttribute("data-bs-target");if(!i||i==="#"){let c=h.getAttribute("href");if(!c||!c.includes("#")&&!c.startsWith("."))return null;c.includes("#")&&!c.startsWith("#")&&(c=`#${c.split("#")[1]}`),i=c&&c!=="#"?c.trim():null}return i?i.split(",").map(c=>v(c)).join(","):null},$={find:(h,i=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(i,h)),findOne:(h,i=document.documentElement)=>Element.prototype.querySelector.call(i,h),children:(h,i)=>[].concat(...h.children).filter(c=>c.matches(i)),parents(h,i){const c=[];let p=h.parentNode.closest(i);for(;p;)c.push(p),p=p.parentNode.closest(i);return c},prev(h,i){let c=h.previousElementSibling;for(;c;){if(c.matches(i))return[c];c=c.previousElementSibling}return[]},next(h,i){let c=h.nextElementSibling;for(;c;){if(c.matches(i))return[c];c=c.nextElementSibling}return[]},focusableChildren(h){const i=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(c=>`${c}:not([tabindex^="-"])`).join(",");return this.find(i,h).filter(c=>!X(c)&&U(c))},getSelectorFromElement(h){const i=In(h);return i&&$.findOne(i)?i:null},getElementFromSelector(h){const i=In(h);return i?$.findOne(i):null},getMultipleElementsFromSelector(h){const i=In(h);return i?$.find(i):[]}},Kt=(h,i="hide")=>{const c=`click.dismiss${h.EVENT_KEY}`,p=h.NAME;w.on(document,c,`[data-bs-dismiss="${p}"]`,function(b){if(["A","AREA"].includes(this.tagName)&&b.preventDefault(),X(this))return;const E=$.getElementFromSelector(this)||this.closest(`.${p}`);h.getOrCreateInstance(E)[i]()})},qt=".bs.alert",mn=`close${qt}`,Vl=`closed${qt}`;class Ve extends je{static get NAME(){return"alert"}close(){if(w.trigger(this._element,mn).defaultPrevented)return;this._element.classList.remove("show");const i=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,i)}_destroyElement(){this._element.remove(),w.trigger(this._element,Vl),this.dispose()}static jQueryInterface(i){return this.each(function(){const c=Ve.getOrCreateInstance(this);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i](this)}})}}Kt(Ve,"close"),ot(Ve);const Zl='[data-bs-toggle="button"]';class ta extends je{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(i){return this.each(function(){const c=ta.getOrCreateInstance(this);i==="toggle"&&c[i]()})}}w.on(document,"click.bs.button.data-api",Zl,h=>{h.preventDefault();const i=h.target.closest(Zl);ta.getOrCreateInstance(i).toggle()}),ot(ta);const tn=".bs.swipe",ks=`touchstart${tn}`,Ui=`touchmove${tn}`,Xs=`touchend${tn}`,Gs=`pointerdown${tn}`,Qs=`pointerup${tn}`,ao={endCallback:null,leftCallback:null,rightCallback:null},lo={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Le extends oe{constructor(i,c){super(),this._element=i,i&&Le.isSupported()&&(this._config=this._getConfig(c),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return ao}static get DefaultType(){return lo}static get NAME(){return"swipe"}dispose(){w.off(this._element,tn)}_start(i){this._supportPointerEvents?this._eventIsPointerPenTouch(i)&&(this._deltaX=i.clientX):this._deltaX=i.touches[0].clientX}_end(i){this._eventIsPointerPenTouch(i)&&(this._deltaX=i.clientX-this._deltaX),this._handleSwipe(),it(this._config.endCallback)}_move(i){this._deltaX=i.touches&&i.touches.length>1?0:i.touches[0].clientX-this._deltaX}_handleSwipe(){const i=Math.abs(this._deltaX);if(i<=40)return;const c=i/this._deltaX;this._deltaX=0,c&&it(c>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(w.on(this._element,Gs,i=>this._start(i)),w.on(this._element,Qs,i=>this._end(i)),this._element.classList.add("pointer-event")):(w.on(this._element,ks,i=>this._start(i)),w.on(this._element,Ui,i=>this._move(i)),w.on(this._element,Xs,i=>this._end(i)))}_eventIsPointerPenTouch(i){return this._supportPointerEvents&&(i.pointerType==="pen"||i.pointerType==="touch")}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ea=".bs.carousel",Vs=".data-api",tl="next",Nn="prev",el="left",Kl="right",io=`slide${ea}`,Zs=`slid${ea}`,$l=`keydown${ea}`,Ue=`mouseenter${ea}`,so=`mouseleave${ea}`,na=`dragstart${ea}`,He=`load${ea}${Vs}`,uo=`click${ea}${Vs}`,vr="carousel",Hi="active",Jl=".active",Fl=".carousel-item",Ea=Jl+Fl,qi={ArrowLeft:Kl,ArrowRight:el},Wl={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ro={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ta extends je{constructor(i,c){super(i,c),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=$.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===vr&&this.cycle()}static get Default(){return Wl}static get DefaultType(){return ro}static get NAME(){return"carousel"}next(){this._slide(tl)}nextWhenVisible(){!document.hidden&&U(this._element)&&this.next()}prev(){this._slide(Nn)}pause(){this._isSliding&&S(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?w.one(this._element,Zs,()=>this.cycle()):this.cycle())}to(i){const c=this._getItems();if(i>c.length-1||i<0)return;if(this._isSliding)return void w.one(this._element,Zs,()=>this.to(i));const p=this._getItemIndex(this._getActive());if(p===i)return;const b=i>p?tl:Nn;this._slide(b,c[i])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(i){return i.defaultInterval=i.interval,i}_addEventListeners(){this._config.keyboard&&w.on(this._element,$l,i=>this._keydown(i)),this._config.pause==="hover"&&(w.on(this._element,Ue,()=>this.pause()),w.on(this._element,so,()=>this._maybeEnableCycle())),this._config.touch&&Le.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const c of $.find(".carousel-item img",this._element))w.on(c,na,p=>p.preventDefault());const i={leftCallback:()=>this._slide(this._directionToOrder(el)),rightCallback:()=>this._slide(this._directionToOrder(Kl)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new Le(this._element,i)}_keydown(i){if(/input|textarea/i.test(i.target.tagName))return;const c=qi[i.key];c&&(i.preventDefault(),this._slide(this._directionToOrder(c)))}_getItemIndex(i){return this._getItems().indexOf(i)}_setActiveIndicatorElement(i){if(!this._indicatorsElement)return;const c=$.findOne(Jl,this._indicatorsElement);c.classList.remove(Hi),c.removeAttribute("aria-current");const p=$.findOne(`[data-bs-slide-to="${i}"]`,this._indicatorsElement);p&&(p.classList.add(Hi),p.setAttribute("aria-current","true"))}_updateInterval(){const i=this._activeElement||this._getActive();if(!i)return;const c=Number.parseInt(i.getAttribute("data-bs-interval"),10);this._config.interval=c||this._config.defaultInterval}_slide(i,c=null){if(this._isSliding)return;const p=this._getActive(),b=i===tl,E=c||ee(this._getItems(),p,b,this._config.wrap);if(E===p)return;const D=this._getItemIndex(E),j=B=>w.trigger(this._element,B,{relatedTarget:E,direction:this._orderToDirection(i),from:this._getItemIndex(p),to:D});if(j(io).defaultPrevented||!p||!E)return;const k=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(D),this._activeElement=E;const L=b?"carousel-item-start":"carousel-item-end",q=b?"carousel-item-next":"carousel-item-prev";E.classList.add(q),tt(E),p.classList.add(L),E.classList.add(L),this._queueCallback(()=>{E.classList.remove(L,q),E.classList.add(Hi),p.classList.remove(Hi,q,L),this._isSliding=!1,j(Zs)},p,this._isAnimated()),k&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return $.findOne(Ea,this._element)}_getItems(){return $.find(Fl,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(i){return rt()?i===el?Nn:tl:i===el?tl:Nn}_orderToDirection(i){return rt()?i===Nn?el:Kl:i===Nn?Kl:el}static jQueryInterface(i){return this.each(function(){const c=Ta.getOrCreateInstance(this,i);if(typeof i!="number"){if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i]()}}else c.to(i)})}}w.on(document,uo,"[data-bs-slide], [data-bs-slide-to]",function(h){const i=$.getElementFromSelector(this);if(!i||!i.classList.contains(vr))return;h.preventDefault();const c=Ta.getOrCreateInstance(i),p=this.getAttribute("data-bs-slide-to");return p?(c.to(p),void c._maybeEnableCycle()):vt.getDataAttribute(this,"slide")==="next"?(c.next(),void c._maybeEnableCycle()):(c.prev(),void c._maybeEnableCycle())}),w.on(window,He,()=>{const h=$.find('[data-bs-ride="carousel"]');for(const i of h)Ta.getOrCreateInstance(i)}),ot(Ta);const nl=".bs.collapse",Ks=`show${nl}`,Pl=`shown${nl}`,co=`hide${nl}`,yr=`hidden${nl}`,br=`click${nl}.data-api`,Bi="show",Oa="collapse",Yi="collapsing",aa=`:scope .${Oa} .${Oa}`,se='[data-bs-toggle="collapse"]',xe={parent:null,toggle:!0},al={parent:"(null|element)",toggle:"boolean"};class la extends je{constructor(i,c){super(i,c),this._isTransitioning=!1,this._triggerArray=[];const p=$.find(se);for(const b of p){const E=$.getSelectorFromElement(b),D=$.find(E).filter(j=>j===this._element);E!==null&&D.length&&this._triggerArray.push(b)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return xe}static get DefaultType(){return al}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let i=[];if(this._config.parent&&(i=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(b=>b!==this._element).map(b=>la.getOrCreateInstance(b,{toggle:!1}))),i.length&&i[0]._isTransitioning||w.trigger(this._element,Ks).defaultPrevented)return;for(const b of i)b.hide();const c=this._getDimension();this._element.classList.remove(Oa),this._element.classList.add(Yi),this._element.style[c]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const p=`scroll${c[0].toUpperCase()+c.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Yi),this._element.classList.add(Oa,Bi),this._element.style[c]="",w.trigger(this._element,Pl)},this._element,!0),this._element.style[c]=`${this._element[p]}px`}hide(){if(this._isTransitioning||!this._isShown()||w.trigger(this._element,co).defaultPrevented)return;const i=this._getDimension();this._element.style[i]=`${this._element.getBoundingClientRect()[i]}px`,tt(this._element),this._element.classList.add(Yi),this._element.classList.remove(Oa,Bi);for(const c of this._triggerArray){const p=$.getElementFromSelector(c);p&&!this._isShown(p)&&this._addAriaAndCollapsedClass([c],!1)}this._isTransitioning=!0,this._element.style[i]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Yi),this._element.classList.add(Oa),w.trigger(this._element,yr)},this._element,!0)}_isShown(i=this._element){return i.classList.contains(Bi)}_configAfterMerge(i){return i.toggle=!!i.toggle,i.parent=N(i.parent),i}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const i=this._getFirstLevelChildren(se);for(const c of i){const p=$.getElementFromSelector(c);p&&this._addAriaAndCollapsedClass([c],this._isShown(p))}}_getFirstLevelChildren(i){const c=$.find(aa,this._config.parent);return $.find(i,this._config.parent).filter(p=>!c.includes(p))}_addAriaAndCollapsedClass(i,c){if(i.length)for(const p of i)p.classList.toggle("collapsed",!c),p.setAttribute("aria-expanded",c)}static jQueryInterface(i){const c={};return typeof i=="string"&&/show|hide/.test(i)&&(c.toggle=!1),this.each(function(){const p=la.getOrCreateInstance(this,c);if(typeof i=="string"){if(p[i]===void 0)throw new TypeError(`No method named "${i}"`);p[i]()}})}}w.on(document,br,se,function(h){(h.target.tagName==="A"||h.delegateTarget&&h.delegateTarget.tagName==="A")&&h.preventDefault();for(const i of $.getMultipleElementsFromSelector(this))la.getOrCreateInstance(i,{toggle:!1}).toggle()}),ot(la);var ye="top",qe="bottom",Ce="right",ae="left",ll="auto",Ze=[ye,qe,Ce,ae],Ke="start",gn="end",xa="clippingParents",Ft="viewport",Ca="popper",$s="reference",Rn=Ze.reduce(function(h,i){return h.concat([i+"-"+Ke,i+"-"+gn])},[]),ia=[].concat(Ze,[ll]).reduce(function(h,i){return h.concat([i,i+"-"+Ke,i+"-"+gn])},[]),pn="beforeRead",_r="read",Js="afterRead",Fs="beforeMain",Sr="main",Il="afterMain",ti="beforeWrite",vn="write",Be="afterWrite",Ws=[pn,_r,Js,Fs,Sr,Il,ti,vn,Be];function yn(h){return h?(h.nodeName||"").toLowerCase():null}function fe(h){if(h==null)return window;if(h.toString()!=="[object Window]"){var i=h.ownerDocument;return i&&i.defaultView||window}return h}function sa(h){return h instanceof fe(h).Element||h instanceof Element}function be(h){return h instanceof fe(h).HTMLElement||h instanceof HTMLElement}function Ps(h){return typeof ShadowRoot<"u"&&(h instanceof fe(h).ShadowRoot||h instanceof ShadowRoot)}const De={name:"applyStyles",enabled:!0,phase:"write",fn:function(h){var i=h.state;Object.keys(i.elements).forEach(function(c){var p=i.styles[c]||{},b=i.attributes[c]||{},E=i.elements[c];be(E)&&yn(E)&&(Object.assign(E.style,p),Object.keys(b).forEach(function(D){var j=b[D];j===!1?E.removeAttribute(D):E.setAttribute(D,j===!0?"":j)}))})},effect:function(h){var i=h.state,c={popper:{position:i.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(i.elements.popper.style,c.popper),i.styles=c,i.elements.arrow&&Object.assign(i.elements.arrow.style,c.arrow),function(){Object.keys(i.elements).forEach(function(p){var b=i.elements[p],E=i.attributes[p]||{},D=Object.keys(i.styles.hasOwnProperty(p)?i.styles[p]:c[p]).reduce(function(j,k){return j[k]="",j},{});be(b)&&yn(b)&&(Object.assign(b.style,D),Object.keys(E).forEach(function(j){b.removeAttribute(j)}))})}},requires:["computeStyles"]};function $e(h){return h.split("-")[0]}var ua=Math.max,il=Math.min,en=Math.round;function ki(){var h=navigator.userAgentData;return h!=null&&h.brands&&Array.isArray(h.brands)?h.brands.map(function(i){return i.brand+"/"+i.version}).join(" "):navigator.userAgent}function Is(){return!/^((?!chrome|android).)*safari/i.test(ki())}function nn(h,i,c){i===void 0&&(i=!1),c===void 0&&(c=!1);var p=h.getBoundingClientRect(),b=1,E=1;i&&be(h)&&(b=h.offsetWidth>0&&en(p.width)/h.offsetWidth||1,E=h.offsetHeight>0&&en(p.height)/h.offsetHeight||1);var D=(sa(h)?fe(h):window).visualViewport,j=!Is()&&c,k=(p.left+(j&&D?D.offsetLeft:0))/b,L=(p.top+(j&&D?D.offsetTop:0))/E,q=p.width/b,B=p.height/E;return{width:q,height:B,top:L,right:k+q,bottom:L+B,left:k,x:k,y:L}}function tu(h){var i=nn(h),c=h.offsetWidth,p=h.offsetHeight;return Math.abs(i.width-c)<=1&&(c=i.width),Math.abs(i.height-p)<=1&&(p=i.height),{x:h.offsetLeft,y:h.offsetTop,width:c,height:p}}function eu(h,i){var c=i.getRootNode&&i.getRootNode();if(h.contains(i))return!0;if(c&&Ps(c)){var p=i;do{if(p&&h.isSameNode(p))return!0;p=p.parentNode||p.host}while(p)}return!1}function bn(h){return fe(h).getComputedStyle(h)}function nu(h){return["table","td","th"].indexOf(yn(h))>=0}function ra(h){return((sa(h)?h.ownerDocument:h.document)||window.document).documentElement}function Xi(h){return yn(h)==="html"?h:h.assignedSlot||h.parentNode||(Ps(h)?h.host:null)||ra(h)}function ei(h){return be(h)&&bn(h).position!=="fixed"?h.offsetParent:null}function Da(h){for(var i=fe(h),c=ei(h);c&&nu(c)&&bn(c).position==="static";)c=ei(c);return c&&(yn(c)==="html"||yn(c)==="body"&&bn(c).position==="static")?i:c||function(p){var b=/firefox/i.test(ki());if(/Trident/i.test(ki())&&be(p)&&bn(p).position==="fixed")return null;var E=Xi(p);for(Ps(E)&&(E=E.host);be(E)&&["html","body"].indexOf(yn(E))<0;){var D=bn(E);if(D.transform!=="none"||D.perspective!=="none"||D.contain==="paint"||["transform","perspective"].indexOf(D.willChange)!==-1||b&&D.willChange==="filter"||b&&D.filter&&D.filter!=="none")return E;E=E.parentNode}return null}(h)||i}function ni(h){return["top","bottom"].indexOf(h)>=0?"x":"y"}function _n(h,i,c){return ua(h,il(i,c))}function Ma(h){return Object.assign({},{top:0,right:0,bottom:0,left:0},h)}function au(h,i){return i.reduce(function(c,p){return c[p]=h,c},{})}const Gi={name:"arrow",enabled:!0,phase:"main",fn:function(h){var i,c=h.state,p=h.name,b=h.options,E=c.elements.arrow,D=c.modifiersData.popperOffsets,j=$e(c.placement),k=ni(j),L=[ae,Ce].indexOf(j)>=0?"height":"width";if(E&&D){var q=function(jt,Mt){return Ma(typeof(jt=typeof jt=="function"?jt(Object.assign({},Mt.rects,{placement:Mt.placement})):jt)!="number"?jt:au(jt,Ze))}(b.padding,c),B=tu(E),ht=k==="y"?ye:ae,et=k==="y"?qe:Ce,at=c.rects.reference[L]+c.rects.reference[k]-D[k]-c.rects.popper[L],lt=D[k]-c.rects.reference[k],st=Da(E),Tt=st?k==="y"?st.clientHeight||0:st.clientWidth||0:0,Lt=at/2-lt/2,W=q[ht],Ot=Tt-B[L]-q[et],gt=Tt/2-B[L]/2+Lt,yt=_n(W,gt,Ot),zt=k;c.modifiersData[p]=((i={})[zt]=yt,i.centerOffset=yt-gt,i)}},effect:function(h){var i=h.state,c=h.options.element,p=c===void 0?"[data-popper-arrow]":c;p!=null&&(typeof p!="string"||(p=i.elements.popper.querySelector(p)))&&eu(i.elements.popper,p)&&(i.elements.arrow=p)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wa(h){return h.split("-")[1]}var ai={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Qi(h){var i,c=h.popper,p=h.popperRect,b=h.placement,E=h.variation,D=h.offsets,j=h.position,k=h.gpuAcceleration,L=h.adaptive,q=h.roundOffsets,B=h.isFixed,ht=D.x,et=ht===void 0?0:ht,at=D.y,lt=at===void 0?0:at,st=typeof q=="function"?q({x:et,y:lt}):{x:et,y:lt};et=st.x,lt=st.y;var Tt=D.hasOwnProperty("x"),Lt=D.hasOwnProperty("y"),W=ae,Ot=ye,gt=window;if(L){var yt=Da(c),zt="clientHeight",jt="clientWidth";yt===fe(c)&&bn(yt=ra(c)).position!=="static"&&j==="absolute"&&(zt="scrollHeight",jt="scrollWidth"),(b===ye||(b===ae||b===Ce)&&E===gn)&&(Ot=qe,lt-=(B&&yt===gt&>.visualViewport?gt.visualViewport.height:yt[zt])-p.height,lt*=k?1:-1),b!==ae&&(b!==ye&&b!==qe||E!==gn)||(W=Ce,et-=(B&&yt===gt&>.visualViewport?gt.visualViewport.width:yt[jt])-p.width,et*=k?1:-1)}var Mt,Vt=Object.assign({position:j},L&&ai),Ae=q===!0?function(Xt,At){var Ee=Xt.x,he=Xt.y,Bt=At.devicePixelRatio||1;return{x:en(Ee*Bt)/Bt||0,y:en(he*Bt)/Bt||0}}({x:et,y:lt},fe(c)):{x:et,y:lt};return et=Ae.x,lt=Ae.y,k?Object.assign({},Vt,((Mt={})[Ot]=Lt?"0":"",Mt[W]=Tt?"0":"",Mt.transform=(gt.devicePixelRatio||1)<=1?"translate("+et+"px, "+lt+"px)":"translate3d("+et+"px, "+lt+"px, 0)",Mt)):Object.assign({},Vt,((i={})[Ot]=Lt?lt+"px":"",i[W]=Tt?et+"px":"",i.transform="",i))}const za={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(h){var i=h.state,c=h.options,p=c.gpuAcceleration,b=p===void 0||p,E=c.adaptive,D=E===void 0||E,j=c.roundOffsets,k=j===void 0||j,L={placement:$e(i.placement),variation:wa(i.placement),popper:i.elements.popper,popperRect:i.rects.popper,gpuAcceleration:b,isFixed:i.options.strategy==="fixed"};i.modifiersData.popperOffsets!=null&&(i.styles.popper=Object.assign({},i.styles.popper,Qi(Object.assign({},L,{offsets:i.modifiersData.popperOffsets,position:i.options.strategy,adaptive:D,roundOffsets:k})))),i.modifiersData.arrow!=null&&(i.styles.arrow=Object.assign({},i.styles.arrow,Qi(Object.assign({},L,{offsets:i.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:k})))),i.attributes.popper=Object.assign({},i.attributes.popper,{"data-popper-placement":i.placement})},data:{}};var an={passive:!0};const li={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(h){var i=h.state,c=h.instance,p=h.options,b=p.scroll,E=b===void 0||b,D=p.resize,j=D===void 0||D,k=fe(i.elements.popper),L=[].concat(i.scrollParents.reference,i.scrollParents.popper);return E&&L.forEach(function(q){q.addEventListener("scroll",c.update,an)}),j&&k.addEventListener("resize",c.update,an),function(){E&&L.forEach(function(q){q.removeEventListener("scroll",c.update,an)}),j&&k.removeEventListener("resize",c.update,an)}},data:{}};var Vi={left:"right",right:"left",bottom:"top",top:"bottom"};function ii(h){return h.replace(/left|right|bottom|top/g,function(i){return Vi[i]})}var Zi={start:"end",end:"start"};function si(h){return h.replace(/start|end/g,function(i){return Zi[i]})}function Ki(h){var i=fe(h);return{scrollLeft:i.pageXOffset,scrollTop:i.pageYOffset}}function de(h){return nn(ra(h)).left+Ki(h).scrollLeft}function jn(h){var i=bn(h),c=i.overflow,p=i.overflowX,b=i.overflowY;return/auto|scroll|overlay|hidden/.test(c+b+p)}function ui(h){return["html","body","#document"].indexOf(yn(h))>=0?h.ownerDocument.body:be(h)&&jn(h)?h:ui(Xi(h))}function Ln(h,i){var c;i===void 0&&(i=[]);var p=ui(h),b=p===((c=h.ownerDocument)==null?void 0:c.body),E=fe(p),D=b?[E].concat(E.visualViewport||[],jn(p)?p:[]):p,j=i.concat(D);return b?j:j.concat(Ln(Xi(D)))}function lu(h){return Object.assign({},h,{left:h.x,top:h.y,right:h.x+h.width,bottom:h.y+h.height})}function $i(h,i,c){return i===Ft?lu(function(p,b){var E=fe(p),D=ra(p),j=E.visualViewport,k=D.clientWidth,L=D.clientHeight,q=0,B=0;if(j){k=j.width,L=j.height;var ht=Is();(ht||!ht&&b==="fixed")&&(q=j.offsetLeft,B=j.offsetTop)}return{width:k,height:L,x:q+de(p),y:B}}(h,c)):sa(i)?function(p,b){var E=nn(p,!1,b==="fixed");return E.top=E.top+p.clientTop,E.left=E.left+p.clientLeft,E.bottom=E.top+p.clientHeight,E.right=E.left+p.clientWidth,E.width=p.clientWidth,E.height=p.clientHeight,E.x=E.left,E.y=E.top,E}(i,c):lu(function(p){var b,E=ra(p),D=Ki(p),j=(b=p.ownerDocument)==null?void 0:b.body,k=ua(E.scrollWidth,E.clientWidth,j?j.scrollWidth:0,j?j.clientWidth:0),L=ua(E.scrollHeight,E.clientHeight,j?j.scrollHeight:0,j?j.clientHeight:0),q=-D.scrollLeft+de(p),B=-D.scrollTop;return bn(j||E).direction==="rtl"&&(q+=ua(E.clientWidth,j?j.clientWidth:0)-k),{width:k,height:L,x:q,y:B}}(ra(h)))}function Ji(h){var i,c=h.reference,p=h.element,b=h.placement,E=b?$e(b):null,D=b?wa(b):null,j=c.x+c.width/2-p.width/2,k=c.y+c.height/2-p.height/2;switch(E){case ye:i={x:j,y:c.y-p.height};break;case qe:i={x:j,y:c.y+c.height};break;case Ce:i={x:c.x+c.width,y:k};break;case ae:i={x:c.x-p.width,y:k};break;default:i={x:c.x,y:c.y}}var L=E?ni(E):null;if(L!=null){var q=L==="y"?"height":"width";switch(D){case Ke:i[L]=i[L]-(c[q]/2-p[q]/2);break;case gn:i[L]=i[L]+(c[q]/2-p[q]/2)}}return i}function Sn(h,i){i===void 0&&(i={});var c=i,p=c.placement,b=p===void 0?h.placement:p,E=c.strategy,D=E===void 0?h.strategy:E,j=c.boundary,k=j===void 0?xa:j,L=c.rootBoundary,q=L===void 0?Ft:L,B=c.elementContext,ht=B===void 0?Ca:B,et=c.altBoundary,at=et!==void 0&&et,lt=c.padding,st=lt===void 0?0:lt,Tt=Ma(typeof st!="number"?st:au(st,Ze)),Lt=ht===Ca?$s:Ca,W=h.rects.popper,Ot=h.elements[at?Lt:ht],gt=function(At,Ee,he,Bt){var Pe=Ee==="clippingParents"?function(Rt){var me=Ln(Xi(Rt)),Ge=["absolute","fixed"].indexOf(bn(Rt).position)>=0&&be(Rt)?Da(Rt):Rt;return sa(Ge)?me.filter(function(Qn){return sa(Qn)&&eu(Qn,Ge)&&yn(Qn)!=="body"}):[]}(At):[].concat(Ee),ue=[].concat(Pe,[he]),Gn=ue[0],Wt=ue.reduce(function(Rt,me){var Ge=$i(At,me,Bt);return Rt.top=ua(Ge.top,Rt.top),Rt.right=il(Ge.right,Rt.right),Rt.bottom=il(Ge.bottom,Rt.bottom),Rt.left=ua(Ge.left,Rt.left),Rt},$i(At,Gn,Bt));return Wt.width=Wt.right-Wt.left,Wt.height=Wt.bottom-Wt.top,Wt.x=Wt.left,Wt.y=Wt.top,Wt}(sa(Ot)?Ot:Ot.contextElement||ra(h.elements.popper),k,q,D),yt=nn(h.elements.reference),zt=Ji({reference:yt,element:W,placement:b}),jt=lu(Object.assign({},W,zt)),Mt=ht===Ca?jt:yt,Vt={top:gt.top-Mt.top+Tt.top,bottom:Mt.bottom-gt.bottom+Tt.bottom,left:gt.left-Mt.left+Tt.left,right:Mt.right-gt.right+Tt.right},Ae=h.modifiersData.offset;if(ht===Ca&&Ae){var Xt=Ae[b];Object.keys(Vt).forEach(function(At){var Ee=[Ce,qe].indexOf(At)>=0?1:-1,he=[ye,qe].indexOf(At)>=0?"y":"x";Vt[At]+=Xt[he]*Ee})}return Vt}function Fi(h,i){i===void 0&&(i={});var c=i,p=c.placement,b=c.boundary,E=c.rootBoundary,D=c.padding,j=c.flipVariations,k=c.allowedAutoPlacements,L=k===void 0?ia:k,q=wa(p),B=q?j?Rn:Rn.filter(function(at){return wa(at)===q}):Ze,ht=B.filter(function(at){return L.indexOf(at)>=0});ht.length===0&&(ht=B);var et=ht.reduce(function(at,lt){return at[lt]=Sn(h,{placement:lt,boundary:b,rootBoundary:E,padding:D})[$e(lt)],at},{});return Object.keys(et).sort(function(at,lt){return et[at]-et[lt]})}const iu={name:"flip",enabled:!0,phase:"main",fn:function(h){var i=h.state,c=h.options,p=h.name;if(!i.modifiersData[p]._skip){for(var b=c.mainAxis,E=b===void 0||b,D=c.altAxis,j=D===void 0||D,k=c.fallbackPlacements,L=c.padding,q=c.boundary,B=c.rootBoundary,ht=c.altBoundary,et=c.flipVariations,at=et===void 0||et,lt=c.allowedAutoPlacements,st=i.options.placement,Tt=$e(st),Lt=k||(Tt!==st&&at?function(Rt){if($e(Rt)===ll)return[];var me=ii(Rt);return[si(Rt),me,si(me)]}(st):[ii(st)]),W=[st].concat(Lt).reduce(function(Rt,me){return Rt.concat($e(me)===ll?Fi(i,{placement:me,boundary:q,rootBoundary:B,padding:L,flipVariations:at,allowedAutoPlacements:lt}):me)},[]),Ot=i.rects.reference,gt=i.rects.popper,yt=new Map,zt=!0,jt=W[0],Mt=0;Mt=0,Ee=At?"width":"height",he=Sn(i,{placement:Vt,boundary:q,rootBoundary:B,altBoundary:ht,padding:L}),Bt=At?Xt?Ce:ae:Xt?qe:ye;Ot[Ee]>gt[Ee]&&(Bt=ii(Bt));var Pe=ii(Bt),ue=[];if(E&&ue.push(he[Ae]<=0),j&&ue.push(he[Bt]<=0,he[Pe]<=0),ue.every(function(Rt){return Rt})){jt=Vt,zt=!1;break}yt.set(Vt,ue)}if(zt)for(var Gn=function(Rt){var me=W.find(function(Ge){var Qn=yt.get(Ge);if(Qn)return Qn.slice(0,Rt).every(function(bi){return bi})});if(me)return jt=me,"break"},Wt=at?3:1;Wt>0&&Gn(Wt)!=="break";Wt--);i.placement!==jt&&(i.modifiersData[p]._skip=!0,i.placement=jt,i.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ar(h,i,c){return c===void 0&&(c={x:0,y:0}),{top:h.top-i.height-c.y,right:h.right-i.width+c.x,bottom:h.bottom-i.height+c.y,left:h.left-i.width-c.x}}function Er(h){return[ye,Ce,qe,ae].some(function(i){return h[i]>=0})}const Tr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(h){var i=h.state,c=h.name,p=i.rects.reference,b=i.rects.popper,E=i.modifiersData.preventOverflow,D=Sn(i,{elementContext:"reference"}),j=Sn(i,{altBoundary:!0}),k=Ar(D,p),L=Ar(j,b,E),q=Er(k),B=Er(L);i.modifiersData[c]={referenceClippingOffsets:k,popperEscapeOffsets:L,isReferenceHidden:q,hasPopperEscaped:B},i.attributes.popper=Object.assign({},i.attributes.popper,{"data-popper-reference-hidden":q,"data-popper-escaped":B})}},Wi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(h){var i=h.state,c=h.options,p=h.name,b=c.offset,E=b===void 0?[0,0]:b,D=ia.reduce(function(q,B){return q[B]=function(ht,et,at){var lt=$e(ht),st=[ae,ye].indexOf(lt)>=0?-1:1,Tt=typeof at=="function"?at(Object.assign({},et,{placement:ht})):at,Lt=Tt[0],W=Tt[1];return Lt=Lt||0,W=(W||0)*st,[ae,Ce].indexOf(lt)>=0?{x:W,y:Lt}:{x:Lt,y:W}}(B,i.rects,E),q},{}),j=D[i.placement],k=j.x,L=j.y;i.modifiersData.popperOffsets!=null&&(i.modifiersData.popperOffsets.x+=k,i.modifiersData.popperOffsets.y+=L),i.modifiersData[p]=D}},su={name:"popperOffsets",enabled:!0,phase:"read",fn:function(h){var i=h.state,c=h.name;i.modifiersData[c]=Ji({reference:i.rects.reference,element:i.rects.popper,placement:i.placement})},data:{}},Or={name:"preventOverflow",enabled:!0,phase:"main",fn:function(h){var i=h.state,c=h.options,p=h.name,b=c.mainAxis,E=b===void 0||b,D=c.altAxis,j=D!==void 0&&D,k=c.boundary,L=c.rootBoundary,q=c.altBoundary,B=c.padding,ht=c.tether,et=ht===void 0||ht,at=c.tetherOffset,lt=at===void 0?0:at,st=Sn(i,{boundary:k,rootBoundary:L,padding:B,altBoundary:q}),Tt=$e(i.placement),Lt=wa(i.placement),W=!Lt,Ot=ni(Tt),gt=Ot==="x"?"y":"x",yt=i.modifiersData.popperOffsets,zt=i.rects.reference,jt=i.rects.popper,Mt=typeof lt=="function"?lt(Object.assign({},i.rects,{placement:i.placement})):lt,Vt=typeof Mt=="number"?{mainAxis:Mt,altAxis:Mt}:Object.assign({mainAxis:0,altAxis:0},Mt),Ae=i.modifiersData.offset?i.modifiersData.offset[i.placement]:null,Xt={x:0,y:0};if(yt){if(E){var At,Ee=Ot==="y"?ye:ae,he=Ot==="y"?qe:Ce,Bt=Ot==="y"?"height":"width",Pe=yt[Ot],ue=Pe+st[Ee],Gn=Pe-st[he],Wt=et?-jt[Bt]/2:0,Rt=Lt===Ke?zt[Bt]:jt[Bt],me=Lt===Ke?-jt[Bt]:-zt[Bt],Ge=i.elements.arrow,Qn=et&&Ge?tu(Ge):{width:0,height:0},bi=i.modifiersData["arrow#persistent"]?i.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Cu=bi[Ee],Du=bi[he],El=_n(0,zt[Bt],Qn[Bt]),nc=W?zt[Bt]/2-Wt-El-Cu-Vt.mainAxis:Rt-El-Cu-Vt.mainAxis,Mo=W?-zt[Bt]/2+Wt+El+Du+Vt.mainAxis:me+El+Du+Vt.mainAxis,ys=i.elements.arrow&&Da(i.elements.arrow),ac=ys?Ot==="y"?ys.clientTop||0:ys.clientLeft||0:0,Mu=(At=Ae==null?void 0:Ae[Ot])!=null?At:0,wu=Pe+Mo-Mu,zu=_n(et?il(ue,Pe+nc-Mu-ac):ue,Pe,et?ua(Gn,wu):Gn);yt[Ot]=zu,Xt[Ot]=zu-Pe}if(j){var Nu,lc=Ot==="x"?ye:ae,ic=Ot==="x"?qe:Ce,pa=yt[gt],bs=gt==="y"?"height":"width",Ru=pa+st[lc],qa=pa-st[ic],_s=[ye,ae].indexOf(Tt)!==-1,_i=(Nu=Ae==null?void 0:Ae[gt])!=null?Nu:0,Si=_s?Ru:pa-zt[bs]-jt[bs]-_i+Vt.altAxis,ju=_s?pa+zt[bs]+jt[bs]-_i-Vt.altAxis:qa,Ss=et&&_s?function(sc,uc,As){var Lu=_n(sc,uc,As);return Lu>As?As:Lu}(Si,pa,ju):_n(et?Si:Ru,pa,et?ju:qa);yt[gt]=Ss,Xt[gt]=Ss-pa}i.modifiersData[p]=Xt}},requiresIfExists:["offset"]};function oo(h,i,c){c===void 0&&(c=!1);var p,b,E=be(i),D=be(i)&&function(B){var ht=B.getBoundingClientRect(),et=en(ht.width)/B.offsetWidth||1,at=en(ht.height)/B.offsetHeight||1;return et!==1||at!==1}(i),j=ra(i),k=nn(h,D,c),L={scrollLeft:0,scrollTop:0},q={x:0,y:0};return(E||!E&&!c)&&((yn(i)!=="body"||jn(j))&&(L=(p=i)!==fe(p)&&be(p)?{scrollLeft:(b=p).scrollLeft,scrollTop:b.scrollTop}:Ki(p)),be(i)?((q=nn(i,!0)).x+=i.clientLeft,q.y+=i.clientTop):j&&(q.x=de(j))),{x:k.left+L.scrollLeft-q.x,y:k.top+L.scrollTop-q.y,width:k.width,height:k.height}}function fo(h){var i=new Map,c=new Set,p=[];function b(E){c.add(E.name),[].concat(E.requires||[],E.requiresIfExists||[]).forEach(function(D){if(!c.has(D)){var j=i.get(D);j&&b(j)}}),p.push(E)}return h.forEach(function(E){i.set(E.name,E)}),h.forEach(function(E){c.has(E.name)||b(E)}),p}var xr={placement:"bottom",modifiers:[],strategy:"absolute"};function uu(){for(var h=arguments.length,i=new Array(h),c=0;cNumber.parseInt(c,10)):typeof i=="function"?c=>i(c,this._element):i}_getPopperConfig(){const i={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(vt.setDataAttribute(this._menu,"popper","static"),i.modifiers=[{name:"applyStyles",enabled:!1}]),{...i,...it(this._config.popperConfig,[i])}}_selectMenuItem({key:i,target:c}){const p=$.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(b=>U(b));p.length&&ee(p,c,i===Mr,!p.includes(c)).focus()}static jQueryInterface(i){return this.each(function(){const c=ln.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i]()}})}static clearMenus(i){if(i.button===2||i.type==="keyup"&&i.key!=="Tab")return;const c=$.find(ri);for(const p of c){const b=ln.getInstance(p);if(!b||b._config.autoClose===!1)continue;const E=i.composedPath(),D=E.includes(b._menu);if(E.includes(b._element)||b._config.autoClose==="inside"&&!D||b._config.autoClose==="outside"&&D||b._menu.contains(i.target)&&(i.type==="keyup"&&i.key==="Tab"||/input|select|option|textarea|form/i.test(i.target.tagName)))continue;const j={relatedTarget:b._element};i.type==="click"&&(j.clickEvent=i),b._completeHide(j)}}static dataApiKeydownHandler(i){const c=/input|textarea/i.test(i.target.tagName),p=i.key==="Escape",b=[Dr,Mr].includes(i.key);if(!b&&!p||c&&!p)return;i.preventDefault();const E=this.matches(Un)?this:$.prev(this,Un)[0]||$.next(this,Un)[0]||$.findOne(Un,i.delegateTarget.parentNode),D=ln.getOrCreateInstance(E);if(b)return i.stopPropagation(),D.show(),void D._selectMenuItem(i);D._isShown()&&(i.stopPropagation(),D.hide(),E.focus())}}w.on(document,zr,Un,ln.dataApiKeydownHandler),w.on(document,zr,ts,ln.dataApiKeydownHandler),w.on(document,wr,ln.clearMenus),w.on(document,bo,ln.clearMenus),w.on(document,wr,Un,function(h){h.preventDefault(),ln.getOrCreateInstance(this).toggle()}),ot(ln);const ou="backdrop",fu="show",rl=`mousedown.bs.${ou}`,ci={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Ao={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class oi extends oe{constructor(i){super(),this._config=this._getConfig(i),this._isAppended=!1,this._element=null}static get Default(){return ci}static get DefaultType(){return Ao}static get NAME(){return ou}show(i){if(!this._config.isVisible)return void it(i);this._append();const c=this._getElement();this._config.isAnimated&&tt(c),c.classList.add(fu),this._emulateAnimation(()=>{it(i)})}hide(i){this._config.isVisible?(this._getElement().classList.remove(fu),this._emulateAnimation(()=>{this.dispose(),it(i)})):it(i)}dispose(){this._isAppended&&(w.off(this._element,rl),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const i=document.createElement("div");i.className=this._config.className,this._config.isAnimated&&i.classList.add("fade"),this._element=i}return this._element}_configAfterMerge(i){return i.rootElement=N(i.rootElement),i}_append(){if(this._isAppended)return;const i=this._getElement();this._config.rootElement.append(i),w.on(i,rl,()=>{it(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(i){Ct(i,this._getElement(),this._config.isAnimated)}}const fi=".bs.focustrap",Hr=`focusin${fi}`,du=`keydown.tab${fi}`,es="backward",qr={autofocus:!0,trapElement:null},Br={autofocus:"boolean",trapElement:"element"};class hu extends oe{constructor(i){super(),this._config=this._getConfig(i),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return qr}static get DefaultType(){return Br}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),w.off(document,fi),w.on(document,Hr,i=>this._handleFocusin(i)),w.on(document,du,i=>this._handleKeydown(i)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,w.off(document,fi))}_handleFocusin(i){const{trapElement:c}=this._config;if(i.target===document||i.target===c||c.contains(i.target))return;const p=$.focusableChildren(c);p.length===0?c.focus():this._lastTabNavDirection===es?p[p.length-1].focus():p[0].focus()}_handleKeydown(i){i.key==="Tab"&&(this._lastTabNavDirection=i.shiftKey?es:"forward")}}const Yr=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",kr=".sticky-top",ns="padding-right",Xr="margin-right";class mu{constructor(){this._element=document.body}getWidth(){const i=document.documentElement.clientWidth;return Math.abs(window.innerWidth-i)}hide(){const i=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,ns,c=>c+i),this._setElementAttributes(Yr,ns,c=>c+i),this._setElementAttributes(kr,Xr,c=>c-i)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ns),this._resetElementAttributes(Yr,ns),this._resetElementAttributes(kr,Xr)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(i,c,p){const b=this.getWidth();this._applyManipulationCallback(i,E=>{if(E!==this._element&&window.innerWidth>E.clientWidth+b)return;this._saveInitialAttribute(E,c);const D=window.getComputedStyle(E).getPropertyValue(c);E.style.setProperty(c,`${p(Number.parseFloat(D))}px`)})}_saveInitialAttribute(i,c){const p=i.style.getPropertyValue(c);p&&vt.setDataAttribute(i,c,p)}_resetElementAttributes(i,c){this._applyManipulationCallback(i,p=>{const b=vt.getDataAttribute(p,c);b!==null?(vt.removeDataAttribute(p,c),p.style.setProperty(c,b)):p.style.removeProperty(c)})}_applyManipulationCallback(i,c){if(x(i))c(i);else for(const p of $.find(i,this._element))c(p)}}const kt=".bs.modal",di=`hide${kt}`,Gr=`hidePrevented${kt}`,gu=`hidden${kt}`,pu=`show${kt}`,Qr=`shown${kt}`,vu=`resize${kt}`,Eo=`click.dismiss${kt}`,To=`mousedown.dismiss${kt}`,cl=`keydown.dismiss${kt}`,yu=`click${kt}.data-api`,ol="modal-open",as="show",ls="modal-static",Ra={backdrop:!0,focus:!0,keyboard:!0},fl={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Hn extends je{constructor(i,c){super(i,c),this._dialog=$.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new mu,this._addEventListeners()}static get Default(){return Ra}static get DefaultType(){return fl}static get NAME(){return"modal"}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){this._isShown||this._isTransitioning||w.trigger(this._element,pu,{relatedTarget:i}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(ol),this._adjustDialog(),this._backdrop.show(()=>this._showElement(i)))}hide(){this._isShown&&!this._isTransitioning&&(w.trigger(this._element,di).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(as),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){w.off(window,kt),w.off(this._dialog,kt),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new oi({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new hu({trapElement:this._element})}_showElement(i){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const c=$.findOne(".modal-body",this._dialog);c&&(c.scrollTop=0),tt(this._element),this._element.classList.add(as),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,w.trigger(this._element,Qr,{relatedTarget:i})},this._dialog,this._isAnimated())}_addEventListeners(){w.on(this._element,cl,i=>{i.key==="Escape"&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),w.on(window,vu,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),w.on(this._element,To,i=>{w.one(this._element,Eo,c=>{this._element===i.target&&this._element===c.target&&(this._config.backdrop!=="static"?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(ol),this._resetAdjustments(),this._scrollBar.reset(),w.trigger(this._element,gu)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(w.trigger(this._element,Gr).defaultPrevented)return;const i=this._element.scrollHeight>document.documentElement.clientHeight,c=this._element.style.overflowY;c==="hidden"||this._element.classList.contains(ls)||(i||(this._element.style.overflowY="hidden"),this._element.classList.add(ls),this._queueCallback(()=>{this._element.classList.remove(ls),this._queueCallback(()=>{this._element.style.overflowY=c},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const i=this._element.scrollHeight>document.documentElement.clientHeight,c=this._scrollBar.getWidth(),p=c>0;if(p&&!i){const b=rt()?"paddingLeft":"paddingRight";this._element.style[b]=`${c}px`}if(!p&&i){const b=rt()?"paddingRight":"paddingLeft";this._element.style[b]=`${c}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(i,c){return this.each(function(){const p=Hn.getOrCreateInstance(this,i);if(typeof i=="string"){if(p[i]===void 0)throw new TypeError(`No method named "${i}"`);p[i](c)}})}}w.on(document,yu,'[data-bs-toggle="modal"]',function(h){const i=$.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&h.preventDefault(),w.one(i,pu,p=>{p.defaultPrevented||w.one(i,gu,()=>{U(this)&&this.focus()})});const c=$.findOne(".modal.show");c&&Hn.getInstance(c).hide(),Hn.getOrCreateInstance(i).toggle(this)}),Kt(Hn),ot(Hn);const An=".bs.offcanvas",ca=".data-api",Vr=`load${An}${ca}`,bu="show",_u="showing",Zr="hiding",Kr=".offcanvas.show",Oo=`show${An}`,$r=`shown${An}`,Jr=`hide${An}`,Su=`hidePrevented${An}`,Je=`hidden${An}`,Fe=`resize${An}`,dl=`click${An}${ca}`,Au=`keydown.dismiss${An}`,is={backdrop:!0,keyboard:!0,scroll:!1},ss={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class sn extends je{constructor(i,c){super(i,c),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return is}static get DefaultType(){return ss}static get NAME(){return"offcanvas"}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){this._isShown||w.trigger(this._element,Oo,{relatedTarget:i}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||new mu().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(_u),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(bu),this._element.classList.remove(_u),w.trigger(this._element,$r,{relatedTarget:i})},this._element,!0))}hide(){this._isShown&&(w.trigger(this._element,Jr).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Zr),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(bu,Zr),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new mu().reset(),w.trigger(this._element,Je)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const i=!!this._config.backdrop;return new oi({className:"offcanvas-backdrop",isVisible:i,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:i?()=>{this._config.backdrop!=="static"?this.hide():w.trigger(this._element,Su)}:null})}_initializeFocusTrap(){return new hu({trapElement:this._element})}_addEventListeners(){w.on(this._element,Au,i=>{i.key==="Escape"&&(this._config.keyboard?this.hide():w.trigger(this._element,Su))})}static jQueryInterface(i){return this.each(function(){const c=sn.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i](this)}})}}w.on(document,dl,'[data-bs-toggle="offcanvas"]',function(h){const i=$.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&h.preventDefault(),X(this))return;w.one(i,Je,()=>{U(this)&&this.focus()});const c=$.findOne(Kr);c&&c!==i&&sn.getInstance(c).hide(),sn.getOrCreateInstance(i).toggle(this)}),w.on(window,Vr,()=>{for(const h of $.find(Kr))sn.getOrCreateInstance(h).show()}),w.on(window,Fe,()=>{for(const h of $.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(h).position!=="fixed"&&sn.getOrCreateInstance(h).hide()}),Kt(sn),ot(sn);const qn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Fr=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),us=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,hl=(h,i)=>{const c=h.nodeName.toLowerCase();return i.includes(c)?!Fr.has(c)||!!us.test(h.nodeValue):i.filter(p=>p instanceof RegExp).some(p=>p.test(c))},Wr={allowList:qn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},We={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ml={entry:"(string|element|function|null)",selector:"(string|element)"};class gl extends oe{constructor(i){super(),this._config=this._getConfig(i)}static get Default(){return Wr}static get DefaultType(){return We}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(i=>this._resolvePossibleFunction(i)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(i){return this._checkContent(i),this._config.content={...this._config.content,...i},this}toHtml(){const i=document.createElement("div");i.innerHTML=this._maybeSanitize(this._config.template);for(const[b,E]of Object.entries(this._config.content))this._setContent(i,E,b);const c=i.children[0],p=this._resolvePossibleFunction(this._config.extraClass);return p&&c.classList.add(...p.split(" ")),c}_typeCheckConfig(i){super._typeCheckConfig(i),this._checkContent(i.content)}_checkContent(i){for(const[c,p]of Object.entries(i))super._typeCheckConfig({selector:c,entry:p},ml)}_setContent(i,c,p){const b=$.findOne(p,i);b&&((c=this._resolvePossibleFunction(c))?x(c)?this._putElementInTemplate(N(c),b):this._config.html?b.innerHTML=this._maybeSanitize(c):b.textContent=c:b.remove())}_maybeSanitize(i){return this._config.sanitize?function(c,p,b){if(!c.length)return c;if(b&&typeof b=="function")return b(c);const E=new window.DOMParser().parseFromString(c,"text/html"),D=[].concat(...E.body.querySelectorAll("*"));for(const j of D){const k=j.nodeName.toLowerCase();if(!Object.keys(p).includes(k)){j.remove();continue}const L=[].concat(...j.attributes),q=[].concat(p["*"]||[],p[k]||[]);for(const B of L)hl(B,q)||j.removeAttribute(B.nodeName)}return E.body.innerHTML}(i,this._config.allowList,this._config.sanitizeFn):i}_resolvePossibleFunction(i){return it(i,[this])}_putElementInTemplate(i,c){if(this._config.html)return c.innerHTML="",void c.append(i);c.textContent=i.textContent}}const rs=new Set(["sanitize","allowList","sanitizeFn"]),pl="fade",_e="show",Ye=".modal",oa="hide.bs.modal",ke="hover",un="focus",ja={AUTO:"auto",TOP:"top",RIGHT:rt()?"left":"right",BOTTOM:"bottom",LEFT:rt()?"right":"left"},Pr={allowList:qn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Eu={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Bn extends je{constructor(i,c){if(Ii===void 0)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(i,c),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Pr}static get DefaultType(){return Eu}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),w.off(this._element.closest(Ye),oa,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const i=w.trigger(this._element,this.constructor.eventName("show")),c=(Z(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(i.defaultPrevented||!c)return;this._disposePopper();const p=this._getTipElement();this._element.setAttribute("aria-describedby",p.getAttribute("id"));const{container:b}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(b.append(p),w.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(p),p.classList.add(_e),"ontouchstart"in document.documentElement)for(const E of[].concat(...document.body.children))w.on(E,"mouseover",Q);this._queueCallback(()=>{w.trigger(this._element,this.constructor.eventName("shown")),this._isHovered===!1&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!w.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(_e),"ontouchstart"in document.documentElement)for(const i of[].concat(...document.body.children))w.off(i,"mouseover",Q);this._activeTrigger.click=!1,this._activeTrigger[un]=!1,this._activeTrigger[ke]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),w.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(i){const c=this._getTemplateFactory(i).toHtml();if(!c)return null;c.classList.remove(pl,_e),c.classList.add(`bs-${this.constructor.NAME}-auto`);const p=(b=>{do b+=Math.floor(1e6*Math.random());while(document.getElementById(b));return b})(this.constructor.NAME).toString();return c.setAttribute("id",p),this._isAnimated()&&c.classList.add(pl),c}setContent(i){this._newContent=i,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(i){return this._templateFactory?this._templateFactory.changeContent(i):this._templateFactory=new gl({...this._config,content:i,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(i){return this.constructor.getOrCreateInstance(i.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(pl)}_isShown(){return this.tip&&this.tip.classList.contains(_e)}_createPopper(i){const c=it(this._config.placement,[this,i,this._element]),p=ja[c.toUpperCase()];return ru(this._element,i,this._getPopperConfig(p))}_getOffset(){const{offset:i}=this._config;return typeof i=="string"?i.split(",").map(c=>Number.parseInt(c,10)):typeof i=="function"?c=>i(c,this._element):i}_resolvePossibleFunction(i){return it(i,[this._element])}_getPopperConfig(i){const c={placement:i,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:p=>{this._getTipElement().setAttribute("data-popper-placement",p.state.placement)}}]};return{...c,...it(this._config.popperConfig,[c])}}_setListeners(){const i=this._config.trigger.split(" ");for(const c of i)if(c==="click")w.on(this._element,this.constructor.eventName("click"),this._config.selector,p=>{this._initializeOnDelegatedTarget(p).toggle()});else if(c!=="manual"){const p=c===ke?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),b=c===ke?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");w.on(this._element,p,this._config.selector,E=>{const D=this._initializeOnDelegatedTarget(E);D._activeTrigger[E.type==="focusin"?un:ke]=!0,D._enter()}),w.on(this._element,b,this._config.selector,E=>{const D=this._initializeOnDelegatedTarget(E);D._activeTrigger[E.type==="focusout"?un:ke]=D._element.contains(E.relatedTarget),D._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},w.on(this._element.closest(Ye),oa,this._hideModalHandler)}_fixTitle(){const i=this._element.getAttribute("title");i&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",i),this._element.setAttribute("data-bs-original-title",i),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(i,c){clearTimeout(this._timeout),this._timeout=setTimeout(i,c)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(i){const c=vt.getDataAttributes(this._element);for(const p of Object.keys(c))rs.has(p)&&delete c[p];return i={...c,...typeof i=="object"&&i?i:{}},i=this._mergeConfigObj(i),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}_configAfterMerge(i){return i.container=i.container===!1?document.body:N(i.container),typeof i.delay=="number"&&(i.delay={show:i.delay,hide:i.delay}),typeof i.title=="number"&&(i.title=i.title.toString()),typeof i.content=="number"&&(i.content=i.content.toString()),i}_getDelegateConfig(){const i={};for(const[c,p]of Object.entries(this._config))this.constructor.Default[c]!==p&&(i[c]=p);return i.selector=!1,i.trigger="manual",i}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(i){return this.each(function(){const c=Bn.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i]()}})}}ot(Bn);const Se={...Bn.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},ce={...Bn.DefaultType,content:"(null|string|element|function)"};class _t extends Bn{static get Default(){return Se}static get DefaultType(){return ce}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(i){return this.each(function(){const c=_t.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i]()}})}}ot(_t);const Xe=".bs.scrollspy",En=`activate${Xe}`,cs=`click${Xe}`,La=`load${Xe}.data-api`,Ua="active",os="[href]",vl=".nav-link",hi=`${vl}, .nav-item > ${vl}, .list-group-item`,mi={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},gi={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class yl extends je{constructor(i,c){super(i,c),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return mi}static get DefaultType(){return gi}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const i of this._observableSections.values())this._observer.observe(i)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(i){return i.target=N(i.target)||document.body,i.rootMargin=i.offset?`${i.offset}px 0px -30%`:i.rootMargin,typeof i.threshold=="string"&&(i.threshold=i.threshold.split(",").map(c=>Number.parseFloat(c))),i}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(w.off(this._config.target,cs),w.on(this._config.target,cs,os,i=>{const c=this._observableSections.get(i.target.hash);if(c){i.preventDefault();const p=this._rootElement||window,b=c.offsetTop-this._element.offsetTop;if(p.scrollTo)return void p.scrollTo({top:b,behavior:"smooth"});p.scrollTop=b}}))}_getNewObserver(){const i={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(c=>this._observerCallback(c),i)}_observerCallback(i){const c=D=>this._targetLinks.get(`#${D.target.id}`),p=D=>{this._previousScrollData.visibleEntryTop=D.target.offsetTop,this._process(c(D))},b=(this._rootElement||document.documentElement).scrollTop,E=b>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=b;for(const D of i){if(!D.isIntersecting){this._activeTarget=null,this._clearActiveClass(c(D));continue}const j=D.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(E&&j){if(p(D),!b)return}else E||j||p(D)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const i=$.find(os,this._config.target);for(const c of i){if(!c.hash||X(c))continue;const p=$.findOne(decodeURI(c.hash),this._element);U(p)&&(this._targetLinks.set(decodeURI(c.hash),c),this._observableSections.set(c.hash,p))}}_process(i){this._activeTarget!==i&&(this._clearActiveClass(this._config.target),this._activeTarget=i,i.classList.add(Ua),this._activateParents(i),w.trigger(this._element,En,{relatedTarget:i}))}_activateParents(i){if(i.classList.contains("dropdown-item"))$.findOne(".dropdown-toggle",i.closest(".dropdown")).classList.add(Ua);else for(const c of $.parents(i,".nav, .list-group"))for(const p of $.prev(c,hi))p.classList.add(Ua)}_clearActiveClass(i){i.classList.remove(Ua);const c=$.find(`${os}.${Ua}`,i);for(const p of c)p.classList.remove(Ua)}static jQueryInterface(i){return this.each(function(){const c=yl.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i]()}})}}w.on(window,La,()=>{for(const h of $.find('[data-bs-spy="scroll"]'))yl.getOrCreateInstance(h)}),ot(yl);const Yn=".bs.tab",Ir=`hide${Yn}`,fs=`hidden${Yn}`,tc=`show${Yn}`,pi=`shown${Yn}`,ec=`click${Yn}`,bl=`keydown${Yn}`,vi=`load${Yn}`,ds="ArrowLeft",_l="ArrowRight",hs="ArrowUp",Tu="ArrowDown",ms="Home",fa="End",da="active",Ha="fade",Sl="show",Ou=".dropdown-toggle",yi=`:not(${Ou})`,gs='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Me=`.nav-link${yi}, .list-group-item${yi}, [role="tab"]${yi}, ${gs}`,Tn=`.${da}[data-bs-toggle="tab"], .${da}[data-bs-toggle="pill"], .${da}[data-bs-toggle="list"]`;class we extends je{constructor(i){super(i),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),w.on(this._element,bl,c=>this._keydown(c)))}static get NAME(){return"tab"}show(){const i=this._element;if(this._elemIsActive(i))return;const c=this._getActiveElem(),p=c?w.trigger(c,Ir,{relatedTarget:i}):null;w.trigger(i,tc,{relatedTarget:c}).defaultPrevented||p&&p.defaultPrevented||(this._deactivate(c,i),this._activate(i,c))}_activate(i,c){i&&(i.classList.add(da),this._activate($.getElementFromSelector(i)),this._queueCallback(()=>{i.getAttribute("role")==="tab"?(i.removeAttribute("tabindex"),i.setAttribute("aria-selected",!0),this._toggleDropDown(i,!0),w.trigger(i,pi,{relatedTarget:c})):i.classList.add(Sl)},i,i.classList.contains(Ha)))}_deactivate(i,c){i&&(i.classList.remove(da),i.blur(),this._deactivate($.getElementFromSelector(i)),this._queueCallback(()=>{i.getAttribute("role")==="tab"?(i.setAttribute("aria-selected",!1),i.setAttribute("tabindex","-1"),this._toggleDropDown(i,!1),w.trigger(i,fs,{relatedTarget:c})):i.classList.remove(Sl)},i,i.classList.contains(Ha)))}_keydown(i){if(![ds,_l,hs,Tu,ms,fa].includes(i.key))return;i.stopPropagation(),i.preventDefault();const c=this._getChildren().filter(b=>!X(b));let p;if([ms,fa].includes(i.key))p=c[i.key===ms?0:c.length-1];else{const b=[_l,Tu].includes(i.key);p=ee(c,i.target,b,!0)}p&&(p.focus({preventScroll:!0}),we.getOrCreateInstance(p).show())}_getChildren(){return $.find(Me,this._parent)}_getActiveElem(){return this._getChildren().find(i=>this._elemIsActive(i))||null}_setInitialAttributes(i,c){this._setAttributeIfNotExists(i,"role","tablist");for(const p of c)this._setInitialAttributesOnChild(p)}_setInitialAttributesOnChild(i){i=this._getInnerElement(i);const c=this._elemIsActive(i),p=this._getOuterElement(i);i.setAttribute("aria-selected",c),p!==i&&this._setAttributeIfNotExists(p,"role","presentation"),c||i.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(i,"role","tab"),this._setInitialAttributesOnTargetPanel(i)}_setInitialAttributesOnTargetPanel(i){const c=$.getElementFromSelector(i);c&&(this._setAttributeIfNotExists(c,"role","tabpanel"),i.id&&this._setAttributeIfNotExists(c,"aria-labelledby",`${i.id}`))}_toggleDropDown(i,c){const p=this._getOuterElement(i);if(!p.classList.contains("dropdown"))return;const b=(E,D)=>{const j=$.findOne(E,p);j&&j.classList.toggle(D,c)};b(Ou,da),b(".dropdown-menu",Sl),p.setAttribute("aria-expanded",c)}_setAttributeIfNotExists(i,c,p){i.hasAttribute(c)||i.setAttribute(c,p)}_elemIsActive(i){return i.classList.contains(da)}_getInnerElement(i){return i.matches(Me)?i:$.findOne(Me,i)}_getOuterElement(i){return i.closest(".nav-item, .list-group-item")||i}static jQueryInterface(i){return this.each(function(){const c=we.getOrCreateInstance(this);if(typeof i=="string"){if(c[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);c[i]()}})}}w.on(document,ec,gs,function(h){["A","AREA"].includes(this.tagName)&&h.preventDefault(),X(this)||we.getOrCreateInstance(this).show()}),w.on(window,vi,()=>{for(const h of $.find(Tn))we.getOrCreateInstance(h)}),ot(we);const kn=".bs.toast",ha=`mouseover${kn}`,Xn=`mouseout${kn}`,le=`focusin${kn}`,ps=`focusout${kn}`,xo=`hide${kn}`,Co=`hidden${kn}`,Do=`show${kn}`,ie=`shown${kn}`,vs="hide",ma="show",ga="showing",xu={animation:"boolean",autohide:"boolean",delay:"number"},Al={animation:!0,autohide:!0,delay:5e3};class On extends je{constructor(i,c){super(i,c),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Al}static get DefaultType(){return xu}static get NAME(){return"toast"}show(){w.trigger(this._element,Do).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(vs),tt(this._element),this._element.classList.add(ma,ga),this._queueCallback(()=>{this._element.classList.remove(ga),w.trigger(this._element,ie),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(w.trigger(this._element,xo).defaultPrevented||(this._element.classList.add(ga),this._queueCallback(()=>{this._element.classList.add(vs),this._element.classList.remove(ga,ma),w.trigger(this._element,Co)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ma),super.dispose()}isShown(){return this._element.classList.contains(ma)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(i,c){switch(i.type){case"mouseover":case"mouseout":this._hasMouseInteraction=c;break;case"focusin":case"focusout":this._hasKeyboardInteraction=c}if(c)return void this._clearTimeout();const p=i.relatedTarget;this._element===p||this._element.contains(p)||this._maybeScheduleHide()}_setListeners(){w.on(this._element,ha,i=>this._onInteraction(i,!0)),w.on(this._element,Xn,i=>this._onInteraction(i,!1)),w.on(this._element,le,i=>this._onInteraction(i,!0)),w.on(this._element,ps,i=>this._onInteraction(i,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(i){return this.each(function(){const c=On.getOrCreateInstance(this,i);if(typeof i=="string"){if(c[i]===void 0)throw new TypeError(`No method named "${i}"`);c[i](this)}})}}return Kt(On),ot(On),{Alert:Ve,Button:ta,Carousel:Ta,Collapse:la,Dropdown:ln,Modal:Hn,Offcanvas:sn,Popover:_t,ScrollSpy:yl,Tab:we,Toast:On,Tooltip:Bn}})}(Xc)),Xc.exports}F0();var Ff={exports:{}},Wf,$m;function W0(){if($m)return Wf;$m=1;var u="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Wf=u,Wf}var Pf,Jm;function P0(){if(Jm)return Pf;Jm=1;var u=W0();function r(){}function f(){}return f.resetWarningCache=r,Pf=function(){function o(S,x,N,U,X,Z){if(Z!==u){var Q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw Q.name="Invariant Violation",Q}}o.isRequired=o;function m(){return o}var v={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:m,element:o,elementType:o,instanceOf:m,node:o,objectOf:m,oneOf:m,oneOfType:m,shape:m,exact:m,checkPropTypes:f,resetWarningCache:r};return v.PropTypes=v,v},Pf}var Fm;function I0(){return Fm||(Fm=1,Ff.exports=P0()()),Ff.exports}var tv=I0();const K=wg(tv),Ng=u=>G.jsx("main",{className:"container justify-content-center",children:u.children});Ng.propTypes={children:K.node};function Rg(u,r){const f=F.useRef(r);F.useEffect(function(){r!==f.current&&u.attributionControl!=null&&(f.current!=null&&u.attributionControl.removeAttribution(f.current),r!=null&&u.attributionControl.addAttribution(r)),f.current=r},[u,r])}function ev(u,r,f){r.center!==f.center&&u.setLatLng(r.center),r.radius!=null&&r.radius!==f.radius&&u.setRadius(r.radius)}var nv=zg();const av=1;function lv(u){return Object.freeze({__version:av,map:u})}function iv(u,r){return Object.freeze({...u,...r})}const Od=F.createContext(null);function xd(){const u=F.use(Od);if(u==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return u}function sv(u){function r(f,o){const{instance:m,context:v}=u(f).current;F.useImperativeHandle(o,()=>m);const{children:S}=f;return S==null?null:Ri.createElement(Od,{value:v},S)}return F.forwardRef(r)}function uv(u){function r(f,o){const[m,v]=F.useState(!1),{instance:S}=u(f,v).current;F.useImperativeHandle(o,()=>S),F.useEffect(function(){m&&S.update()},[S,m,f.children]);const x=S._contentNode;return x?nv.createPortal(f.children,x):null}return F.forwardRef(r)}function rv(u){function r(f,o){const{instance:m}=u(f).current;return F.useImperativeHandle(o,()=>m),null}return F.forwardRef(r)}function Cd(u,r){const f=F.useRef(void 0);F.useEffect(function(){return r!=null&&u.instance.on(r),f.current=r,function(){f.current!=null&&u.instance.off(f.current),f.current=null}},[u,r])}function $c(u,r){const f=u.pane??r.pane;return f?{...u,pane:f}:u}function cv(u,r){return function(o,m){const v=xd(),S=u($c(o,v),v);return Rg(v.map,o.attribution),Cd(S.current,o.eventHandlers),r(S.current,v,o,m),S}}var Jc=L0();function Dd(u,r,f){return Object.freeze({instance:u,context:r,container:f})}function Md(u,r){return r==null?function(o,m){const v=F.useRef(void 0);return v.current||(v.current=u(o,m)),v}:function(o,m){const v=F.useRef(void 0);v.current||(v.current=u(o,m));const S=F.useRef(o),{instance:x}=v.current;return F.useEffect(function(){S.current!==o&&(r(x,o,S.current),S.current=o)},[x,o,r]),v}}function jg(u,r){F.useEffect(function(){return(r.layerContainer??r.map).addLayer(u.instance),function(){var v;(v=r.layerContainer)==null||v.removeLayer(u.instance),r.map.removeLayer(u.instance)}},[r,u])}function ov(u){return function(f){const o=xd(),m=u($c(f,o),o);return Rg(o.map,f.attribution),Cd(m.current,f.eventHandlers),jg(m.current,o),m}}function fv(u,r){const f=F.useRef(void 0);F.useEffect(function(){if(r.pathOptions!==f.current){const m=r.pathOptions??{};u.instance.setStyle(m),f.current=m}},[u,r])}function dv(u){return function(f){const o=xd(),m=u($c(f,o),o);return Cd(m.current,f.eventHandlers),jg(m.current,o),fv(m.current,f),m}}function hv(u,r){const f=Md(u),o=cv(f,r);return uv(o)}function mv(u,r){const f=Md(u,r),o=dv(f);return sv(o)}function gv(u,r){const f=Md(u,r),o=ov(f);return rv(o)}function pv(u,r,f){const{opacity:o,zIndex:m}=r;o!=null&&o!==f.opacity&&u.setOpacity(o),m!=null&&m!==f.zIndex&&u.setZIndex(m)}const Wm=mv(function({center:r,children:f,...o},m){const v=new Jc.Circle(r,o);return Dd(v,iv(m,{overlayContainer:v}))},ev);function vv({bounds:u,boundsOptions:r,center:f,children:o,className:m,id:v,placeholder:S,style:x,whenReady:N,zoom:U,...X},Z){const[Q]=F.useState({className:m,id:v,style:x}),[tt,ct]=F.useState(null),Et=F.useRef(void 0);F.useImperativeHandle(Z,()=>(tt==null?void 0:tt.map)??null,[tt]);const rt=F.useCallback(it=>{if(it!==null&&!Et.current){const Ct=new Jc.Map(it,X);Et.current=Ct,f!=null&&U!=null?Ct.setView(f,U):u!=null&&Ct.fitBounds(u,r),N!=null&&Ct.whenReady(N),ct(lv(Ct))}},[]);F.useEffect(()=>()=>{tt==null||tt.map.remove()},[tt]);const ot=tt?Ri.createElement(Od,{value:tt},o):S??null;return Ri.createElement("div",{...Q,ref:rt},ot)}const yv=F.forwardRef(vv),bv=hv(function(r,f){const o=new Jc.Popup(r,f.overlayContainer);return Dd(o,f)},function(r,f,{position:o},m){F.useEffect(function(){const{instance:S}=r;function x(U){U.popup===S&&(S.update(),m(!0))}function N(U){U.popup===S&&m(!1)}return f.map.on({popupopen:x,popupclose:N}),f.overlayContainer==null?(o!=null&&S.setLatLng(o),S.openOn(f.map)):f.overlayContainer.bindPopup(S),function(){var X;f.map.off({popupopen:x,popupclose:N}),(X=f.overlayContainer)==null||X.unbindPopup(),f.map.removeLayer(S)}},[r,f,m,o])}),_v=gv(function({url:r,...f},o){const m=new Jc.TileLayer(r,$c(f,o));return Dd(m,o)},function(r,f,o){pv(r,f,o);const{url:m}=f;m!=null&&m!==o.url&&r.setUrl(m)}),Lg=F.createContext(),Ug=({children:u})=>{const[r,f]=F.useState(null),[o,m]=F.useState(!0),[v,S]=F.useState(null);return F.useEffect(()=>{(async()=>{try{const N=await fetch("/config/settings.json");if(!N.ok)throw new Error("Error al cargar settings.json");const U=await N.json();f(U)}catch(N){S(N.message)}finally{m(!1)}})()},[]),G.jsx(Lg.Provider,{value:{config:r,configLoading:o,configError:v},children:u})};Ug.propTypes={children:K.node.isRequired};const mr=()=>F.useContext(Lg),Hg=F.createContext(),Fc=({children:u,config:r})=>{const[f,o]=F.useState(null),[m,v]=F.useState(!0),[S,x]=F.useState(null);return F.useEffect(()=>{(async()=>{try{const U=new URLSearchParams(r.params).toString(),X=`${r.baseUrl}?${U}`,Z=await fetch(X);if(!Z.ok)throw new Error("Error al obtener datos");const Q=await Z.json();o(Q)}catch(U){x(U.message)}finally{v(!1)}})()},[r]),G.jsx(Hg.Provider,{value:{data:f,dataLoading:m,dataError:S},children:u})};Fc.propTypes={children:K.node.isRequired,config:K.shape({baseUrl:K.string.isRequired,params:K.object}).isRequired};const wd=()=>F.useContext(Hg),Sv=({data:u})=>u.map(({lat:r,lng:f,level:o},m)=>{const v=o<20?"#00FF85":o<60?"#FFA500":"#FF0000",S=4,N=400/S;return G.jsxs("div",{children:[[...Array(S)].map((U,X)=>{const Z=N*(X+1),Q=.6*((X+1)/S);return G.jsx(Wm,{center:[r,f],pathOptions:{color:v,fillColor:v,fillOpacity:Q,weight:1},radius:Z},`${m}-${X}`)}),G.jsx(Wm,{center:[r,f],pathOptions:{color:v,fillColor:v,fillOpacity:.8,weight:2},radius:50,children:G.jsxs(bv,{children:["Contaminación: ",o," µg/m³"]})})]},m)}),Av=()=>{const{config:u,configLoading:r,configError:f}=mr();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});const o=u.appConfig.endpoints.baseUrl,m=u.appConfig.endpoints.sensors,v={baseUrl:`${o}/${m}`,params:{}};return G.jsx(Fc,{config:v,children:G.jsx(Ev,{})})},Ev=()=>{const{config:u,configLoading:r,configError:f}=mr(),{data:o,dataLoading:m,dataError:v}=wd();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});if(m)return G.jsx("p",{children:"Cargando datos..."});if(v)return G.jsxs("p",{children:["Error al cargar datos: ",f]});if(!o)return G.jsx("p",{children:"Datos no disponibles."});const S=u==null?void 0:u.userConfig.city,x=o.map(N=>({lat:N.lat,lng:N.lon,level:N.value}));return G.jsx("div",{className:"p-3",children:G.jsxs(yv,{center:S,zoom:13,scrollWheelZoom:!1,style:Tv,children:[G.jsx(_v,{attribution:'© Contribuidores de OpenStreetMap',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),G.jsx(Sv,{data:x})]})})},Tv={height:"500px",width:"100%",borderRadius:"20px"},qg="label";function Pm(u,r){typeof u=="function"?u(r):u&&(u.current=r)}function Ov(u,r){const f=u.options;f&&r&&Object.assign(f,r)}function Bg(u,r){u.labels=r}function Yg(u,r){let f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:qg;const o=[];u.datasets=r.map(m=>{const v=u.datasets.find(S=>S[f]===m[f]);return!v||!m.data||o.includes(v)?{...m}:(o.push(v),Object.assign(v,m),v)})}function xv(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qg;const f={labels:[],datasets:[]};return Bg(f,u.labels),Yg(f,u.datasets,r),f}function Cv(u,r){const{height:f=150,width:o=300,redraw:m=!1,datasetIdKey:v,type:S,data:x,options:N,plugins:U=[],fallbackContent:X,updateMode:Z,...Q}=u,tt=F.useRef(null),ct=F.useRef(null),Et=()=>{tt.current&&(ct.current=new Td(tt.current,{type:S,data:xv(x,v),options:N&&{...N},plugins:U}),Pm(r,ct.current))},rt=()=>{Pm(r,null),ct.current&&(ct.current.destroy(),ct.current=null)};return F.useEffect(()=>{!m&&ct.current&&N&&Ov(ct.current,N)},[m,N]),F.useEffect(()=>{!m&&ct.current&&Bg(ct.current.config.data,x.labels)},[m,x.labels]),F.useEffect(()=>{!m&&ct.current&&x.datasets&&Yg(ct.current.config.data,x.datasets,v)},[m,x.datasets]),F.useEffect(()=>{ct.current&&(m?(rt(),setTimeout(Et)):ct.current.update(Z))},[m,N,x.labels,x.datasets,Z]),F.useEffect(()=>{ct.current&&(rt(),setTimeout(Et))},[S]),F.useEffect(()=>(Et(),()=>rt()),[]),Ri.createElement("canvas",{ref:tt,role:"img",height:f,width:o,...Q},X)}const Dv=F.forwardRef(Cv);function Mv(u,r){return Td.register(r),F.forwardRef((f,o)=>Ri.createElement(Dv,{...f,ref:o,type:u}))}const wv=Mv("line",U0),kg=F.createContext();function Xg({children:u}){const[r,f]=F.useState(()=>localStorage.getItem("theme")||"light");F.useEffect(()=>{document.body.classList.remove("light","dark"),document.body.classList.add(r),localStorage.setItem("theme",r)},[r]);const o=()=>{f(m=>m==="light"?"dark":"light")};return G.jsx(kg.Provider,{value:{theme:r,toggleTheme:o},children:u})}Xg.propTypes={children:K.node.isRequired};function Wc(){return F.useContext(kg)}const zd=({title:u,status:r,children:f,styleMode:o,className:m,titleIcon:v})=>{const S=F.useRef(null),[x,N]=F.useState(u),{theme:U}=Wc();return F.useEffect(()=>{const X=()=>{S.current&&(S.current.offsetWidth<300&&u.length>15?N(u.slice(0,10)+"."):N(u))};return X(),window.addEventListener("resize",X),()=>window.removeEventListener("resize",X)},[u]),G.jsx("div",{ref:S,className:o==="override"?`${m}`:`col-xl-3 col-sm-6 d-flex flex-column align-items-center p-3 card-container ${m}`,children:G.jsxs("div",{className:`card p-3 w-100 ${U}`,children:[G.jsxs("h3",{className:"text-center",children:[v,x]}),G.jsx("div",{className:"card-content",children:f}),r?G.jsx("span",{className:"status text-center mt-2",children:r}):null]})})};zd.propTypes={title:K.string.isRequired,status:K.string.isRequired,children:K.node.isRequired,styleMode:K.oneOf(["override",""]),className:K.string,titleIcon:K.node};zd.defaultProps={styleMode:""};const Nd=({cards:u,className:r})=>G.jsx("div",{className:`row justify-content-center g-0 ${r}`,children:u.map((f,o)=>G.jsx(zd,{title:f.title,status:f.status,styleMode:f.styleMode,className:f.className,titleIcon:f.titleIcon,children:G.jsx("p",{className:"card-text text-center",children:f.content})},o))});Nd.propTypes={cards:K.arrayOf(K.shape({title:K.string.isRequired,content:K.string.isRequired,status:K.string.isRequired})).isRequired,className:K.string};Td.register(H0,q0,B0,Y0,k0);const zv=()=>{const{config:u,configLoading:r,configError:f}=mr();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});const o=u.appConfig.endpoints.baseUrl,m=u.appConfig.endpoints.sensors,v={baseUrl:`${o}/${m}`,params:{}};return G.jsx(Fc,{config:v,children:G.jsx(Gg,{})})},Gg=()=>{var tt,ct,Et,rt;const{config:u}=mr(),{data:r,loading:f}=wd(),{theme:o}=Wc(),m=((ct=(tt=u==null?void 0:u.appConfig)==null?void 0:tt.historyChartConfig)==null?void 0:ct.chartOptionsDark)??{},v=((rt=(Et=u==null?void 0:u.appConfig)==null?void 0:Et.historyChartConfig)==null?void 0:rt.chartOptionsLight)??{},S=o==="dark"?m:v,x=new Date().getHours(),N=[`${x-3}:00`,`${x-2}:00`,`${x-1}:00`,`${x}:00`,`${x+1}:00`,`${x+2}:00`,`${x+3}:00`];if(f)return G.jsx("p",{children:"Cargando datos..."});const U=[],X=[],Z=[];r==null||r.forEach(ot=>{ot.value!=null&&(ot.sensor_type==="MQ-135"?Z.push(ot.value):ot.sensor_type==="DHT-11"&&(U.push(ot.value),X.push(ot.value)))});const Q=[{title:"🌡️ Temperatura",data:U.length?U:[0],borderColor:"#00FF85",backgroundColor:"rgba(0, 255, 133, 0.2)"},{title:"💧 Humedad",data:X.length?X:[0],borderColor:"#00D4FF",backgroundColor:"rgba(0, 212, 255, 0.2)"},{title:"☁️ Contaminación",data:Z.length?Z:[0],borderColor:"#FFA500",backgroundColor:"rgba(255, 165, 0, 0.2)"}];return G.jsx(Nd,{cards:Q.map(({title:ot,data:it,borderColor:Ct,backgroundColor:ee})=>({title:ot,content:G.jsx(wv,{data:{labels:N,datasets:[{data:it,borderColor:Ct,backgroundColor:ee,fill:!0,tension:.4}]},options:S}),styleMode:"override",className:"col-lg-4 col-xxs-12 d-flex flex-column align-items-center p-3 card-container"})),className:""})};Gg.propTypes={options:K.object,timeLabels:K.array,data:K.array};/*! * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2024 Fonticons, Inc. @@ -598,4 +598,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2024 Fonticons, Inc. - */const Z1={prefix:"fas",iconName:"cloud",icon:[640,512,[9729],"f0c2","M0 336c0 79.5 64.5 144 144 144l368 0c70.7 0 128-57.3 128-128c0-61.9-44-113.6-102.4-125.4c4.1-10.7 6.4-22.4 6.4-34.6c0-53-43-96-96-96c-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32C167.6 32 96 103.6 96 192c0 2.7 .1 5.4 .2 8.1C40.2 219.8 0 273.2 0 336z"]},K1={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},$1={prefix:"fas",iconName:"gauge",icon:[512,512,["dashboard","gauge-med","tachometer-alt-average"],"f624","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm320 96c0-26.9-16.5-49.9-40-59.3L280 88c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 204.7c-23.5 9.5-40 32.5-40 59.3c0 35.3 28.7 64 64 64s64-28.7 64-64zM144 176a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm-16 80a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm288 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM400 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},J1={prefix:"fas",iconName:"temperature-empty",icon:[320,512,["temperature-0","thermometer-0","thermometer-empty"],"f2cb","M112 112c0-26.5 21.5-48 48-48s48 21.5 48 48l0 164.5c0 17.3 7.1 31.9 15.3 42.5C233.8 332.6 240 349.5 240 368c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-18.5 6.2-35.4 16.7-48.9c8.2-10.6 15.3-25.2 15.3-42.5L112 112zM160 0C98.1 0 48 50.2 48 112l0 164.4c0 .1-.1 .3-.2 .6c-.2 .6-.8 1.6-1.7 2.8C27.2 304.2 16 334.8 16 368c0 79.5 64.5 144 144 144s144-64.5 144-144c0-33.2-11.2-63.8-30.1-88.1c-.9-1.2-1.5-2.2-1.7-2.8c-.1-.3-.2-.5-.2-.6L272 112C272 50.2 221.9 0 160 0zm0 416a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]},F1=J1,W1={prefix:"fas",iconName:"water",icon:[576,512,[],"f773","M269.5 69.9c11.1-7.9 25.9-7.9 37 0C329 85.4 356.5 96 384 96c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 149.7 417 160 384 160c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4C42.8 92.6 61 83.5 75.3 71.6c11.1-9.5 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 85.2 165.1 96 192 96c27.5 0 55-10.6 77.5-26.1zm37 288C329 373.4 356.5 384 384 384c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 437.7 417 448 384 448c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.4 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 373.2 165.1 384 192 384c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0zm0-144C329 229.4 356.5 240 384 240c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 293.7 417 304 384 304c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.5 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 229.2 165.1 240 192 240c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0z"]},P1={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},I1=P1,xp=()=>{const{config:u,configLoading:r,configError:f}=mr();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});const o=u.appConfig.endpoints.baseUrl,m=u.appConfig.endpoints.sensors,v={baseUrl:`${o}/${m}`,params:{_sort:"timestamp",_order:"desc"}};return G.jsx(Fc,{config:v,children:G.jsx(tb,{})})},tb=()=>{const{data:u}=wd(),r=[{id:1,title:"Temperatura",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:F1})},{id:2,title:"Humedad",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:W1})},{id:3,title:"Contaminación",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:Z1})},{id:4,title:"Presión",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:$1})}];return u&&u.forEach(f=>{f.sensor_type==="MQ-135"?(r[2].content=`${f.value} µg/m³`,r[2].status=f.value>100?"Alta contaminación 😷":"Aire moderado 🌤️"):f.sensor_type==="DHT-11"&&(r[1].content=`${f.humidity}%`,r[1].status=f.humidity>70?"Humedad alta 🌧️":"Nivel normal 🌤️",r[0].content=`${f.temperature}°C`,r[0].status=f.temperature>30?"Calor intenso ☀️":"Clima agradable 🌤️")}),G.jsx(Nd,{cards:r})};xp.propTypes={data:K.array};const eb=()=>G.jsx(G.Fragment,{children:G.jsxs(Ng,{children:[G.jsx(xp,{}),G.jsx(Av,{}),G.jsx(zv,{})]})});function Cp({onClick:u}){return G.jsx("button",{className:"menuBtn",onClick:u,children:G.jsx(kl,{icon:K1})})}Cp.propTypes={onClick:K.func.isRequired};const Dp=({isOpen:u,onClose:r})=>G.jsxs("div",{className:`side-menu ${u?"open":""}`,children:[G.jsx("button",{className:"close-btn",onClick:r,children:G.jsx(kl,{icon:I1})}),G.jsxs("ul",{children:[G.jsx("li",{children:G.jsx("a",{href:"#inicio",children:"ɪɴɪᴄɪᴏ"})}),G.jsx("li",{children:G.jsx("a",{href:"#mapa",children:"ᴍᴀᴘᴀ"})}),G.jsx("li",{children:G.jsx("a",{href:"#historico",children:"ʜɪsᴛᴏʀɪᴄᴏ"})})]})]});Dp.propTypes={isOpen:K.bool.isRequired,onClose:K.func.isRequired};function nb(){const{theme:u,toggleTheme:r}=Wc();return G.jsx("button",{className:"theme-toggle",onClick:r,children:u==="dark"?"☀️":"🌙"})}const Mp=u=>{const{theme:r}=Wc();return G.jsxs("header",{className:`justify-content-center text-center mb-4 ${r}`,children:[G.jsx("h1",{children:u.title}),G.jsx("p",{className:"subtitle",children:u.subtitle})]})};Mp.propTypes={title:K.string.isRequired,subtitle:K.string};const ab=()=>{const[u,r]=F.useState(!1),f=()=>{r(!u)},o=()=>{r(!1)};return G.jsxs(G.Fragment,{children:[G.jsx(Cp,{onClick:f}),G.jsx(Dp,{isOpen:u,onClose:f}),G.jsx(nb,{}),G.jsxs("div",{className:u?"blur m-0 p-0":"m-0 p-0",onClick:o,children:[G.jsx(Mp,{title:"Contamin",subtitle:"Midiendo la calidad del aire y las calles en Sevilla 🌿🚛"}),G.jsx(eb,{})]})]})};$0.createRoot(document.getElementById("root")).render(G.jsx(F.StrictMode,{children:G.jsx(Xg,{children:G.jsx(Ug,{children:G.jsx(ab,{})})})})); + */const Z1={prefix:"fas",iconName:"cloud",icon:[640,512,[9729],"f0c2","M0 336c0 79.5 64.5 144 144 144l368 0c70.7 0 128-57.3 128-128c0-61.9-44-113.6-102.4-125.4c4.1-10.7 6.4-22.4 6.4-34.6c0-53-43-96-96-96c-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32C167.6 32 96 103.6 96 192c0 2.7 .1 5.4 .2 8.1C40.2 219.8 0 273.2 0 336z"]},K1={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},$1={prefix:"fas",iconName:"gauge",icon:[512,512,["dashboard","gauge-med","tachometer-alt-average"],"f624","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm320 96c0-26.9-16.5-49.9-40-59.3L280 88c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 204.7c-23.5 9.5-40 32.5-40 59.3c0 35.3 28.7 64 64 64s64-28.7 64-64zM144 176a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm-16 80a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm288 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM400 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},J1={prefix:"fas",iconName:"temperature-empty",icon:[320,512,["temperature-0","thermometer-0","thermometer-empty"],"f2cb","M112 112c0-26.5 21.5-48 48-48s48 21.5 48 48l0 164.5c0 17.3 7.1 31.9 15.3 42.5C233.8 332.6 240 349.5 240 368c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-18.5 6.2-35.4 16.7-48.9c8.2-10.6 15.3-25.2 15.3-42.5L112 112zM160 0C98.1 0 48 50.2 48 112l0 164.4c0 .1-.1 .3-.2 .6c-.2 .6-.8 1.6-1.7 2.8C27.2 304.2 16 334.8 16 368c0 79.5 64.5 144 144 144s144-64.5 144-144c0-33.2-11.2-63.8-30.1-88.1c-.9-1.2-1.5-2.2-1.7-2.8c-.1-.3-.2-.5-.2-.6L272 112C272 50.2 221.9 0 160 0zm0 416a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]},F1=J1,W1={prefix:"fas",iconName:"water",icon:[576,512,[],"f773","M269.5 69.9c11.1-7.9 25.9-7.9 37 0C329 85.4 356.5 96 384 96c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 149.7 417 160 384 160c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4C42.8 92.6 61 83.5 75.3 71.6c11.1-9.5 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 85.2 165.1 96 192 96c27.5 0 55-10.6 77.5-26.1zm37 288C329 373.4 356.5 384 384 384c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 437.7 417 448 384 448c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.4 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 373.2 165.1 384 192 384c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0zm0-144C329 229.4 356.5 240 384 240c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 293.7 417 304 384 304c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.5 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 229.2 165.1 240 192 240c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0z"]},P1={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},I1=P1,xp=()=>{const{config:u,configLoading:r,configError:f}=mr();if(r)return G.jsx("p",{children:"Cargando configuración..."});if(f)return G.jsxs("p",{children:["Error al cargar configuración: ",f]});if(!u)return G.jsx("p",{children:"Configuración no disponible."});const o=u.appConfig.endpoints.baseUrl,m=u.appConfig.endpoints.sensors,v={baseUrl:`${o}/${m}`,params:{_sort:"timestamp",_order:"desc",_limit:1}};return G.jsx(Fc,{config:v,children:G.jsx(tb,{})})},tb=()=>{const{data:u}=wd(),r=[{id:1,title:"Temperatura",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:F1})},{id:2,title:"Humedad",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:W1})},{id:3,title:"Contaminación",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:Z1})},{id:4,title:"Presión",content:"N/A",status:"Esperando datos...",titleIcon:G.jsx(kl,{icon:$1})}];return u&&u.forEach(f=>{f.sensor_type==="MQ-135"?(r[2].content=`${f.value} µg/m³`,r[2].status=f.value>100?"Alta contaminación 😷":"Aire moderado 🌤️"):f.sensor_type==="DHT-11"&&(r[1].content=`${f.humidity}%`,r[1].status=f.humidity>70?"Humedad alta 🌧️":"Nivel normal 🌤️",r[0].content=`${f.temperature}°C`,r[0].status=f.temperature>30?"Calor intenso ☀️":"Clima agradable 🌤️")}),G.jsx(Nd,{cards:r})};xp.propTypes={data:K.array};const eb=()=>G.jsx(G.Fragment,{children:G.jsxs(Ng,{children:[G.jsx(xp,{}),G.jsx(Av,{}),G.jsx(zv,{})]})});function Cp({onClick:u}){return G.jsx("button",{className:"menuBtn",onClick:u,children:G.jsx(kl,{icon:K1})})}Cp.propTypes={onClick:K.func.isRequired};const Dp=({isOpen:u,onClose:r})=>G.jsxs("div",{className:`side-menu ${u?"open":""}`,children:[G.jsx("button",{className:"close-btn",onClick:r,children:G.jsx(kl,{icon:I1})}),G.jsxs("ul",{children:[G.jsx("li",{children:G.jsx("a",{href:"#inicio",children:"ɪɴɪᴄɪᴏ"})}),G.jsx("li",{children:G.jsx("a",{href:"#mapa",children:"ᴍᴀᴘᴀ"})}),G.jsx("li",{children:G.jsx("a",{href:"#historico",children:"ʜɪsᴛᴏʀɪᴄᴏ"})})]})]});Dp.propTypes={isOpen:K.bool.isRequired,onClose:K.func.isRequired};function nb(){const{theme:u,toggleTheme:r}=Wc();return G.jsx("button",{className:"theme-toggle",onClick:r,children:u==="dark"?"☀️":"🌙"})}const Mp=u=>{const{theme:r}=Wc();return G.jsxs("header",{className:`justify-content-center text-center mb-4 ${r}`,children:[G.jsx("h1",{children:u.title}),G.jsx("p",{className:"subtitle",children:u.subtitle})]})};Mp.propTypes={title:K.string.isRequired,subtitle:K.string};const ab=()=>{const[u,r]=F.useState(!1),f=()=>{r(!u)},o=()=>{r(!1)};return G.jsxs(G.Fragment,{children:[G.jsx(Cp,{onClick:f}),G.jsx(Dp,{isOpen:u,onClose:f}),G.jsx(nb,{}),G.jsxs("div",{className:u?"blur m-0 p-0":"m-0 p-0",onClick:o,children:[G.jsx(Mp,{title:"Contamin",subtitle:"Midiendo la calidad del aire y las calles en Sevilla 🌿🚛"}),G.jsx(eb,{})]})]})};$0.createRoot(document.getElementById("root")).render(G.jsx(F.StrictMode,{children:G.jsx(Xg,{children:G.jsx(Ug,{children:G.jsx(ab,{})})})})); diff --git a/backend/vertx/target/classes/webroot/index.html b/backend/vertx/target/classes/webroot/index.html index ec069e5..e477306 100644 --- a/backend/vertx/target/classes/webroot/index.html +++ b/backend/vertx/target/classes/webroot/index.html @@ -15,7 +15,7 @@ ContaminUS - + diff --git a/frontend/public/config/settings.json b/frontend/public/config/settings.json index e2b432d..255c3dd 100644 --- a/frontend/public/config/settings.json +++ b/frontend/public/config/settings.json @@ -7,7 +7,7 @@ }, "appConfig": { "endpoints": { - "baseUrl": "http://localhost:8080/api/v1", + "baseUrl": "http://localhost:80/api/v1", "sensors": "sensors", "sensor": "sensors/sensor" }, diff --git a/frontend/src/components/HistoryCharts.jsx b/frontend/src/components/HistoryCharts.jsx index 3087ba2..b82c4a4 100644 --- a/frontend/src/components/HistoryCharts.jsx +++ b/frontend/src/components/HistoryCharts.jsx @@ -69,14 +69,10 @@ const HistoryChartsContent = () => { const options = theme === "dark" ? optionsDark : optionsLight; const currentHour = new Date().getHours(); - console.log("currentHour", currentHour); - const timeLabels = [ `${currentHour - 3}:00`, `${currentHour - 2}:00`, `${currentHour - 1}:00`, `${currentHour}:00`, `${currentHour + 1}:00`, `${currentHour + 2}:00`, `${currentHour + 3}:00` ] - //const timeLabels = config?.appConfig?.historyChartConfig?.timeLabels ?? []; - if (loading) return

Cargando datos...

; const temperatureData = []; diff --git a/frontend/src/components/SummaryCards.jsx b/frontend/src/components/SummaryCards.jsx index 75dce0a..2920f8f 100644 --- a/frontend/src/components/SummaryCards.jsx +++ b/frontend/src/components/SummaryCards.jsx @@ -45,7 +45,8 @@ const SummaryCards = () => { baseUrl: `${BASE}/${ENDPOINT}`, params: { _sort: 'timestamp', - _order: 'desc' + _order: 'desc', + _limit: 1 } }