From 2cb06bb4bb6c0d26d010ffa63e4cc77eb0eb8cbe Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Sat, 5 Oct 2024 16:10:36 +0800 Subject: [PATCH] Added total peers in peers count --- src/dashboard.py | 3 ++- src/static/app/dist/assets/index.css | 2 +- src/static/app/dist/assets/index.js | 18 +++++++++--------- src/static/app/package.json | 2 +- .../configurationComponents/peerList.vue | 4 +++- .../configurationCard.vue | 3 ++- 6 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/dashboard.py b/src/dashboard.py index a7fd514..0b640c0 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -913,7 +913,8 @@ class WireguardConfiguration: "Sent": sum(list(map(lambda x: x.cumu_sent + x.total_sent, self.Peers))), "Receive": sum(list(map(lambda x: x.cumu_receive + x.total_receive, self.Peers))) }, - "ConnectedPeers": len(list(filter(lambda x: x.status == "running", self.Peers))) + "ConnectedPeers": len(list(filter(lambda x: x.status == "running", self.Peers))), + "TotalPeers": len(self.Peers) } def updateConfigurationSettings(self, newData: dict) -> tuple[bool, str]: diff --git a/src/static/app/dist/assets/index.css b/src/static/app/dist/assets/index.css index 98b6144..4d0c72a 100644 --- a/src/static/app/dist/assets/index.css +++ b/src/static/app/dist/assets/index.css @@ -12,4 +12,4 @@ * Licensed under the MIT license - http://opensource.org/licenses/MIT * * Copyright (c) 2020 Animate.css - */:root{--animate-duration: 1s;--animate-delay: 1s;--animate-repeat: 1}.animate__animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-duration:var(--animate-duration);animation-duration:var(--animate-duration);-webkit-animation-fill-mode:both;animation-fill-mode:both}.animate__animated.animate__infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animate__animated.animate__repeat-1{-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-iteration-count:var(--animate-repeat);animation-iteration-count:var(--animate-repeat)}.animate__animated.animate__repeat-2{-webkit-animation-iteration-count:2;animation-iteration-count:2;-webkit-animation-iteration-count:calc(var(--animate-repeat) * 2);animation-iteration-count:calc(var(--animate-repeat) * 2)}.animate__animated.animate__repeat-3{-webkit-animation-iteration-count:3;animation-iteration-count:3;-webkit-animation-iteration-count:calc(var(--animate-repeat) * 3);animation-iteration-count:calc(var(--animate-repeat) * 3)}.animate__animated.animate__delay-1s{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-delay:var(--animate-delay);animation-delay:var(--animate-delay)}.animate__animated.animate__delay-2s{-webkit-animation-delay:2s;animation-delay:2s;-webkit-animation-delay:calc(var(--animate-delay) * 2);animation-delay:calc(var(--animate-delay) * 2)}.animate__animated.animate__delay-3s{-webkit-animation-delay:3s;animation-delay:3s;-webkit-animation-delay:calc(var(--animate-delay) * 3);animation-delay:calc(var(--animate-delay) * 3)}.animate__animated.animate__delay-4s{-webkit-animation-delay:4s;animation-delay:4s;-webkit-animation-delay:calc(var(--animate-delay) * 4);animation-delay:calc(var(--animate-delay) * 4)}.animate__animated.animate__delay-5s{-webkit-animation-delay:5s;animation-delay:5s;-webkit-animation-delay:calc(var(--animate-delay) * 5);animation-delay:calc(var(--animate-delay) * 5)}.animate__animated.animate__faster{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-duration:calc(var(--animate-duration) / 2);animation-duration:calc(var(--animate-duration) / 2)}.animate__animated.animate__fast{-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-duration:calc(var(--animate-duration) * .8);animation-duration:calc(var(--animate-duration) * .8)}.animate__animated.animate__slow{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-duration:calc(var(--animate-duration) * 2);animation-duration:calc(var(--animate-duration) * 2)}.animate__animated.animate__slower{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-duration:calc(var(--animate-duration) * 3);animation-duration:calc(var(--animate-duration) * 3)}@media print,(prefers-reduced-motion: reduce){.animate__animated{-webkit-animation-duration:1ms!important;animation-duration:1ms!important;-webkit-transition-duration:1ms!important;transition-duration:1ms!important;-webkit-animation-iteration-count:1!important;animation-iteration-count:1!important}.animate__animated[class*=Out]{opacity:0}}@-webkit-keyframes bounce{0%,20%,53%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0) scaleY(1.1);transform:translate3d(0,-30px,0) scaleY(1.1)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0) scaleY(1.05);transform:translate3d(0,-15px,0) scaleY(1.05)}80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0) scaleY(.95);transform:translateZ(0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-4px,0) scaleY(1.02);transform:translate3d(0,-4px,0) scaleY(1.02)}}@keyframes bounce{0%,20%,53%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0) scaleY(1.1);transform:translate3d(0,-30px,0) scaleY(1.1)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0) scaleY(1.05);transform:translate3d(0,-15px,0) scaleY(1.05)}80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0) scaleY(.95);transform:translateZ(0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-4px,0) scaleY(1.02);transform:translate3d(0,-4px,0) scaleY(1.02)}}.animate__bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}.animate__flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__pulse{-webkit-animation-name:pulse;animation-name:pulse;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}@-webkit-keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shakeX{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shakeX{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.animate__shakeX{-webkit-animation-name:shakeX;animation-name:shakeX}@-webkit-keyframes shakeY{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}20%,40%,60%,80%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}}@keyframes shakeY{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}20%,40%,60%,80%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}}.animate__shakeY{-webkit-animation-name:shakeY;animation-name:shakeY}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translate(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translate(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translate(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translate(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translate(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translate(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translate(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translate(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translate(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translate(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translate(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translate(0)}}.animate__headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0)}}.animate__swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes tada{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{0%,11.1%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skew(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skew(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skew(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skew(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skew(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skew(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skew(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{0%,11.1%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skew(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skew(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skew(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skew(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skew(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skew(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skew(-.1953125deg) skewY(-.1953125deg)}}.animate__jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}.animate__heartBeat{-webkit-animation-name:heartBeat;animation-name:heartBeat;-webkit-animation-duration:1.3s;animation-duration:1.3s;-webkit-animation-duration:calc(var(--animate-duration) * 1.3);animation-duration:calc(var(--animate-duration) * 1.3);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}@-webkit-keyframes backInDown{0%{-webkit-transform:translateY(-1200px) scale(.7);transform:translateY(-1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInDown{0%{-webkit-transform:translateY(-1200px) scale(.7);transform:translateY(-1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInDown{-webkit-animation-name:backInDown;animation-name:backInDown}@-webkit-keyframes backInLeft{0%{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInLeft{0%{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInLeft{-webkit-animation-name:backInLeft;animation-name:backInLeft}@-webkit-keyframes backInRight{0%{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInRight{0%{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInRight{-webkit-animation-name:backInRight;animation-name:backInRight}@-webkit-keyframes backInUp{0%{-webkit-transform:translateY(1200px) scale(.7);transform:translateY(1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInUp{0%{-webkit-transform:translateY(1200px) scale(.7);transform:translateY(1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInUp{-webkit-animation-name:backInUp;animation-name:backInUp}@-webkit-keyframes backOutDown{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(700px) scale(.7);transform:translateY(700px) scale(.7);opacity:.7}}@keyframes backOutDown{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(700px) scale(.7);transform:translateY(700px) scale(.7);opacity:.7}}.animate__backOutDown{-webkit-animation-name:backOutDown;animation-name:backOutDown}@-webkit-keyframes backOutLeft{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}}@keyframes backOutLeft{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}}.animate__backOutLeft{-webkit-animation-name:backOutLeft;animation-name:backOutLeft}@-webkit-keyframes backOutRight{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}}@keyframes backOutRight{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}}.animate__backOutRight{-webkit-animation-name:backOutRight;animation-name:backOutRight}@-webkit-keyframes backOutUp{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(-700px) scale(.7);transform:translateY(-700px) scale(.7);opacity:.7}}@keyframes backOutUp{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(-700px) scale(.7);transform:translateY(-700px) scale(.7);opacity:.7}}.animate__backOutUp{-webkit-animation-name:backOutUp;animation-name:backOutUp}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__bounceIn{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0) scaleY(3);transform:translate3d(0,-3000px,0) scaleY(3)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0) scaleY(.9);transform:translate3d(0,25px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,-10px,0) scaleY(.95);transform:translate3d(0,-10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,5px,0) scaleY(.985);transform:translate3d(0,5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0) scaleY(3);transform:translate3d(0,-3000px,0) scaleY(3)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0) scaleY(.9);transform:translate3d(0,25px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,-10px,0) scaleY(.95);transform:translate3d(0,-10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,5px,0) scaleY(.985);transform:translate3d(0,5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0) scaleX(3);transform:translate3d(-3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0) scaleX(1);transform:translate3d(25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(-10px,0,0) scaleX(.98);transform:translate3d(-10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(5px,0,0) scaleX(.995);transform:translate3d(5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0) scaleX(3);transform:translate3d(-3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0) scaleX(1);transform:translate3d(25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(-10px,0,0) scaleX(.98);transform:translate3d(-10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(5px,0,0) scaleX(.995);transform:translate3d(5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0) scaleX(3);transform:translate3d(3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0) scaleX(1);transform:translate3d(-25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(10px,0,0) scaleX(.98);transform:translate3d(10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(-5px,0,0) scaleX(.995);transform:translate3d(-5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0) scaleX(3);transform:translate3d(3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0) scaleX(1);transform:translate3d(-25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(10px,0,0) scaleX(.98);transform:translate3d(10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(-5px,0,0) scaleX(.995);transform:translate3d(-5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0) scaleY(5);transform:translate3d(0,3000px,0) scaleY(5)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,10px,0) scaleY(.95);transform:translate3d(0,10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-5px,0) scaleY(.985);transform:translate3d(0,-5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0) scaleY(5);transform:translate3d(0,3000px,0) scaleY(5)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,10px,0) scaleY(.95);transform:translate3d(0,10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-5px,0) scaleY(.985);transform:translate3d(0,-5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.animate__bounceOut{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0) scaleY(.985);transform:translate3d(0,10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0) scaleY(3);transform:translate3d(0,2000px,0) scaleY(3)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0) scaleY(.985);transform:translate3d(0,10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0) scaleY(3);transform:translate3d(0,2000px,0) scaleY(3)}}.animate__bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0) scaleX(.9);transform:translate3d(20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0) scaleX(2);transform:translate3d(-2000px,0,0) scaleX(2)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0) scaleX(.9);transform:translate3d(20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0) scaleX(2);transform:translate3d(-2000px,0,0) scaleX(2)}}.animate__bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0) scaleX(.9);transform:translate3d(-20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0) scaleX(2);transform:translate3d(2000px,0,0) scaleX(2)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0) scaleX(.9);transform:translate3d(-20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0) scaleX(2);transform:translate3d(2000px,0,0) scaleX(2)}}.animate__bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0) scaleY(.985);transform:translate3d(0,-10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0) scaleY(.9);transform:translate3d(0,20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0) scaleY(3);transform:translate3d(0,-2000px,0) scaleY(3)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0) scaleY(.985);transform:translate3d(0,-10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0) scaleY(.9);transform:translate3d(0,20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0) scaleY(3);transform:translate3d(0,-2000px,0) scaleY(3)}}.animate__bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate__fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeInTopLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInTopLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInTopLeft{-webkit-animation-name:fadeInTopLeft;animation-name:fadeInTopLeft}@-webkit-keyframes fadeInTopRight{0%{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInTopRight{0%{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInTopRight{-webkit-animation-name:fadeInTopRight;animation-name:fadeInTopRight}@-webkit-keyframes fadeInBottomLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInBottomLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInBottomLeft{-webkit-animation-name:fadeInBottomLeft;animation-name:fadeInBottomLeft}@-webkit-keyframes fadeInBottomRight{0%{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInBottomRight{0%{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInBottomRight{-webkit-animation-name:fadeInBottomRight;animation-name:fadeInBottomRight}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.animate__fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.animate__fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.animate__fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.animate__fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.animate__fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.animate__fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.animate__fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.animate__fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.animate__fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes fadeOutTopLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}}@keyframes fadeOutTopLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}}.animate__fadeOutTopLeft{-webkit-animation-name:fadeOutTopLeft;animation-name:fadeOutTopLeft}@-webkit-keyframes fadeOutTopRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}}@keyframes fadeOutTopRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}}.animate__fadeOutTopRight{-webkit-animation-name:fadeOutTopRight;animation-name:fadeOutTopRight}@-webkit-keyframes fadeOutBottomRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}}@keyframes fadeOutBottomRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}}.animate__fadeOutBottomRight{-webkit-animation-name:fadeOutBottomRight;animation-name:fadeOutBottomRight}@-webkit-keyframes fadeOutBottomLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}}@keyframes fadeOutBottomLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}}.animate__fadeOutBottomLeft{-webkit-animation-name:fadeOutBottomLeft;animation-name:fadeOutBottomLeft}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,-360deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{0%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,-360deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animate__animated.animate__flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.animate__flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.animate__flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}.animate__flipOutX{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}.animate__flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedInRight{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skew(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skew(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skew(-5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes lightSpeedInRight{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skew(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skew(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skew(-5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__lightSpeedInRight{-webkit-animation-name:lightSpeedInRight;animation-name:lightSpeedInRight;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedInLeft{0%{-webkit-transform:translate3d(-100%,0,0) skewX(30deg);transform:translate3d(-100%,0,0) skew(30deg);opacity:0}60%{-webkit-transform:skewX(-20deg);transform:skew(-20deg);opacity:1}80%{-webkit-transform:skewX(5deg);transform:skew(5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes lightSpeedInLeft{0%{-webkit-transform:translate3d(-100%,0,0) skewX(30deg);transform:translate3d(-100%,0,0) skew(30deg);opacity:0}60%{-webkit-transform:skewX(-20deg);transform:skew(-20deg);opacity:1}80%{-webkit-transform:skewX(5deg);transform:skew(5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__lightSpeedInLeft{-webkit-animation-name:lightSpeedInLeft;animation-name:lightSpeedInLeft;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skew(30deg);opacity:0}}@keyframes lightSpeedOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skew(30deg);opacity:0}}.animate__lightSpeedOutRight{-webkit-animation-name:lightSpeedOutRight;animation-name:lightSpeedOutRight;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes lightSpeedOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0) skewX(-30deg);transform:translate3d(-100%,0,0) skew(-30deg);opacity:0}}@keyframes lightSpeedOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0) skewX(-30deg);transform:translate3d(-100%,0,0) skew(-30deg);opacity:0}}.animate__lightSpeedOutLeft{-webkit-animation-name:lightSpeedOutLeft;animation-name:lightSpeedOutLeft;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateIn{0%{-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownLeft{0%{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownRight{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpLeft{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpRight{0%{-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateOut{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.animate__rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes rotateOutDownLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.animate__rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateOutDownRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.animate__rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateOutUpLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.animate__rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateOutUpRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.animate__rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.animate__hinge{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-duration:calc(var(--animate-duration) * 2);animation-duration:calc(var(--animate-duration) * 2);-webkit-animation-name:hinge;animation-name:hinge;-webkit-transform-origin:top left;transform-origin:top left}@-webkit-keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.animate__jackInTheBox{-webkit-animation-name:jackInTheBox;animation-name:jackInTheBox}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.animate__rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.animate__zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.animate__zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0)}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0)}}.animate__zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft;-webkit-transform-origin:left center;transform-origin:left center}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0)}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0)}}.animate__zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight;-webkit-transform-origin:right center;transform-origin:right center}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.animate__slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.animate__slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.animate__slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.animate__slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}.dropdown-menu[data-v-34ee3204]{right:1rem;min-width:200px}.dropdown-item.disabled[data-v-34ee3204],.dropdown-item[data-v-34ee3204]:disabled{opacity:.7}.slide-fade-leave-active[data-v-f14909a4],.slide-fade-enter-active[data-v-f14909a4]{transition:all .2s cubic-bezier(.82,.58,.17,.9)}.slide-fade-enter-from[data-v-f14909a4],.slide-fade-leave-to[data-v-f14909a4]{transform:translateY(20px);opacity:0;filter:blur(3px)}.subMenuBtn.active[data-v-f14909a4]{background-color:#ffffff20}.peerCard[data-v-f14909a4]{transition:box-shadow .1s cubic-bezier(.82,.58,.17,.9)}.peerCard[data-v-f14909a4]:hover{box-shadow:var(--bs-box-shadow)!important}.toggleShowKey[data-v-2c571abb]{position:absolute;top:35px;right:12px}.list-move[data-v-6d5fc831],.list-enter-active[data-v-6d5fc831],.list-leave-active[data-v-6d5fc831]{transition:all .3s ease}.list-enter-from[data-v-6d5fc831],.list-leave-to[data-v-6d5fc831]{opacity:0;transform:translateY(10px)}.list-leave-active[data-v-6d5fc831]{position:absolute}.peerSettingContainer[data-v-3f34f584]{background-color:#00000060;z-index:9998}div[data-v-3f34f584]{transition:.2s ease-in-out}.inactiveField[data-v-3f34f584]{opacity:.4}.card[data-v-3f34f584]{max-height:100%}.btn.disabled[data-v-6a5aba2a]{opacity:1;background-color:#0d6efd17;border-color:transparent}[data-v-8f3f1b93]{font-size:.875rem}input[data-v-8f3f1b93]{padding:.1rem .4rem}input[data-v-8f3f1b93]:disabled{border-color:transparent;background-color:#0d6efd17;color:#0d6efd}.dp__main[data-v-8f3f1b93]{width:auto;flex-grow:1;--dp-input-padding: 2.5px 30px 2.5px 12px;--dp-border-radius: .5rem}.schedulePeerJobTransition-move[data-v-5bbdd42b],.schedulePeerJobTransition-enter-active[data-v-5bbdd42b],.schedulePeerJobTransition-leave-active[data-v-5bbdd42b]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.schedulePeerJobTransition-enter-from[data-v-5bbdd42b],.schedulePeerJobTransition-leave-to[data-v-5bbdd42b]{opacity:0;transform:scale(.9)}.schedulePeerJobTransition-leave-active[data-v-5bbdd42b]{position:absolute;width:100%}.peerNav .nav-link{&.active[data-v-17fe4658]{//background: linear-gradient(var(--degree),var(--brandColor1) var(--distance2),var(--brandColor2) 100%);//color: white;background-color:#efefef}}:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.ol-overviewmap .ol-viewport:hover{cursor:pointer}.ol-layer canvas{border-radius:var(--bs-border-radius-lg)!important}#map{height:300px}.pingPlaceholder[data-v-f5cd36ce]{width:100%;height:79.98px}.ping-move[data-v-f5cd36ce],.ping-enter-active[data-v-f5cd36ce],.ping-leave-active[data-v-f5cd36ce]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.ping-leave-active[data-v-f5cd36ce]{position:absolute;width:100%}.ping-enter-from[data-v-f5cd36ce],.ping-leave-to[data-v-f5cd36ce]{opacity:0;//transform: scale(1.1);filter:blur(3px)}.pingPlaceholder[data-v-6d6cffc9]{width:100%;height:40px}.ping-leave-active[data-v-6d6cffc9]{position:absolute}table th[data-v-6d6cffc9],table td[data-v-6d6cffc9]{padding:.5rem}.table[data-v-6d6cffc9]>:not(caption)>*>*{background-color:transparent!important}.ping-move[data-v-6d6cffc9],.ping-enter-active[data-v-6d6cffc9],.ping-leave-active[data-v-6d6cffc9]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.ping-leave-active[data-v-6d6cffc9]{position:absolute;width:100%}.ping-enter-from[data-v-6d6cffc9],.ping-leave-to[data-v-6d6cffc9]{opacity:0;//transform: scale(1.1);filter:blur(3px)}.animate__fadeInUp[data-v-1b44aacd]{animation-timing-function:cubic-bezier(.42,0,.22,1)}.app-enter-active[data-v-95a5c797],.app-leave-active[data-v-95a5c797]{transition:all .3s cubic-bezier(.82,.58,.17,.9)}.app-enter-from[data-v-95a5c797]{transform:translateY(20px);opacity:0}.app-leave-to[data-v-95a5c797]{transform:translateY(-20px);opacity:0}@media screen and (min-width: 768px){.navbar[data-v-95a5c797]{display:none}} + */:root{--animate-duration: 1s;--animate-delay: 1s;--animate-repeat: 1}.animate__animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-duration:var(--animate-duration);animation-duration:var(--animate-duration);-webkit-animation-fill-mode:both;animation-fill-mode:both}.animate__animated.animate__infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animate__animated.animate__repeat-1{-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-iteration-count:var(--animate-repeat);animation-iteration-count:var(--animate-repeat)}.animate__animated.animate__repeat-2{-webkit-animation-iteration-count:2;animation-iteration-count:2;-webkit-animation-iteration-count:calc(var(--animate-repeat) * 2);animation-iteration-count:calc(var(--animate-repeat) * 2)}.animate__animated.animate__repeat-3{-webkit-animation-iteration-count:3;animation-iteration-count:3;-webkit-animation-iteration-count:calc(var(--animate-repeat) * 3);animation-iteration-count:calc(var(--animate-repeat) * 3)}.animate__animated.animate__delay-1s{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-delay:var(--animate-delay);animation-delay:var(--animate-delay)}.animate__animated.animate__delay-2s{-webkit-animation-delay:2s;animation-delay:2s;-webkit-animation-delay:calc(var(--animate-delay) * 2);animation-delay:calc(var(--animate-delay) * 2)}.animate__animated.animate__delay-3s{-webkit-animation-delay:3s;animation-delay:3s;-webkit-animation-delay:calc(var(--animate-delay) * 3);animation-delay:calc(var(--animate-delay) * 3)}.animate__animated.animate__delay-4s{-webkit-animation-delay:4s;animation-delay:4s;-webkit-animation-delay:calc(var(--animate-delay) * 4);animation-delay:calc(var(--animate-delay) * 4)}.animate__animated.animate__delay-5s{-webkit-animation-delay:5s;animation-delay:5s;-webkit-animation-delay:calc(var(--animate-delay) * 5);animation-delay:calc(var(--animate-delay) * 5)}.animate__animated.animate__faster{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-duration:calc(var(--animate-duration) / 2);animation-duration:calc(var(--animate-duration) / 2)}.animate__animated.animate__fast{-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-duration:calc(var(--animate-duration) * .8);animation-duration:calc(var(--animate-duration) * .8)}.animate__animated.animate__slow{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-duration:calc(var(--animate-duration) * 2);animation-duration:calc(var(--animate-duration) * 2)}.animate__animated.animate__slower{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-duration:calc(var(--animate-duration) * 3);animation-duration:calc(var(--animate-duration) * 3)}@media print,(prefers-reduced-motion: reduce){.animate__animated{-webkit-animation-duration:1ms!important;animation-duration:1ms!important;-webkit-transition-duration:1ms!important;transition-duration:1ms!important;-webkit-animation-iteration-count:1!important;animation-iteration-count:1!important}.animate__animated[class*=Out]{opacity:0}}@-webkit-keyframes bounce{0%,20%,53%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0) scaleY(1.1);transform:translate3d(0,-30px,0) scaleY(1.1)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0) scaleY(1.05);transform:translate3d(0,-15px,0) scaleY(1.05)}80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0) scaleY(.95);transform:translateZ(0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-4px,0) scaleY(1.02);transform:translate3d(0,-4px,0) scaleY(1.02)}}@keyframes bounce{0%,20%,53%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0) scaleY(1.1);transform:translate3d(0,-30px,0) scaleY(1.1)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0) scaleY(1.05);transform:translate3d(0,-15px,0) scaleY(1.05)}80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0) scaleY(.95);transform:translateZ(0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-4px,0) scaleY(1.02);transform:translate3d(0,-4px,0) scaleY(1.02)}}.animate__bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}.animate__flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__pulse{-webkit-animation-name:pulse;animation-name:pulse;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}@-webkit-keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shakeX{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shakeX{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.animate__shakeX{-webkit-animation-name:shakeX;animation-name:shakeX}@-webkit-keyframes shakeY{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}20%,40%,60%,80%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}}@keyframes shakeY{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}20%,40%,60%,80%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}}.animate__shakeY{-webkit-animation-name:shakeY;animation-name:shakeY}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translate(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translate(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translate(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translate(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translate(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translate(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translate(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translate(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translate(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translate(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translate(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translate(0)}}.animate__headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0)}}.animate__swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes tada{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{0%,11.1%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skew(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skew(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skew(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skew(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skew(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skew(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skew(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{0%,11.1%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skew(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skew(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skew(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skew(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skew(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skew(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skew(-.1953125deg) skewY(-.1953125deg)}}.animate__jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}.animate__heartBeat{-webkit-animation-name:heartBeat;animation-name:heartBeat;-webkit-animation-duration:1.3s;animation-duration:1.3s;-webkit-animation-duration:calc(var(--animate-duration) * 1.3);animation-duration:calc(var(--animate-duration) * 1.3);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}@-webkit-keyframes backInDown{0%{-webkit-transform:translateY(-1200px) scale(.7);transform:translateY(-1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInDown{0%{-webkit-transform:translateY(-1200px) scale(.7);transform:translateY(-1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInDown{-webkit-animation-name:backInDown;animation-name:backInDown}@-webkit-keyframes backInLeft{0%{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInLeft{0%{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInLeft{-webkit-animation-name:backInLeft;animation-name:backInLeft}@-webkit-keyframes backInRight{0%{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInRight{0%{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInRight{-webkit-animation-name:backInRight;animation-name:backInRight}@-webkit-keyframes backInUp{0%{-webkit-transform:translateY(1200px) scale(.7);transform:translateY(1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInUp{0%{-webkit-transform:translateY(1200px) scale(.7);transform:translateY(1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInUp{-webkit-animation-name:backInUp;animation-name:backInUp}@-webkit-keyframes backOutDown{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(700px) scale(.7);transform:translateY(700px) scale(.7);opacity:.7}}@keyframes backOutDown{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(700px) scale(.7);transform:translateY(700px) scale(.7);opacity:.7}}.animate__backOutDown{-webkit-animation-name:backOutDown;animation-name:backOutDown}@-webkit-keyframes backOutLeft{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}}@keyframes backOutLeft{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}}.animate__backOutLeft{-webkit-animation-name:backOutLeft;animation-name:backOutLeft}@-webkit-keyframes backOutRight{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}}@keyframes backOutRight{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}}.animate__backOutRight{-webkit-animation-name:backOutRight;animation-name:backOutRight}@-webkit-keyframes backOutUp{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(-700px) scale(.7);transform:translateY(-700px) scale(.7);opacity:.7}}@keyframes backOutUp{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(-700px) scale(.7);transform:translateY(-700px) scale(.7);opacity:.7}}.animate__backOutUp{-webkit-animation-name:backOutUp;animation-name:backOutUp}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__bounceIn{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0) scaleY(3);transform:translate3d(0,-3000px,0) scaleY(3)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0) scaleY(.9);transform:translate3d(0,25px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,-10px,0) scaleY(.95);transform:translate3d(0,-10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,5px,0) scaleY(.985);transform:translate3d(0,5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0) scaleY(3);transform:translate3d(0,-3000px,0) scaleY(3)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0) scaleY(.9);transform:translate3d(0,25px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,-10px,0) scaleY(.95);transform:translate3d(0,-10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,5px,0) scaleY(.985);transform:translate3d(0,5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0) scaleX(3);transform:translate3d(-3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0) scaleX(1);transform:translate3d(25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(-10px,0,0) scaleX(.98);transform:translate3d(-10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(5px,0,0) scaleX(.995);transform:translate3d(5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0) scaleX(3);transform:translate3d(-3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0) scaleX(1);transform:translate3d(25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(-10px,0,0) scaleX(.98);transform:translate3d(-10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(5px,0,0) scaleX(.995);transform:translate3d(5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0) scaleX(3);transform:translate3d(3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0) scaleX(1);transform:translate3d(-25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(10px,0,0) scaleX(.98);transform:translate3d(10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(-5px,0,0) scaleX(.995);transform:translate3d(-5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0) scaleX(3);transform:translate3d(3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0) scaleX(1);transform:translate3d(-25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(10px,0,0) scaleX(.98);transform:translate3d(10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(-5px,0,0) scaleX(.995);transform:translate3d(-5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0) scaleY(5);transform:translate3d(0,3000px,0) scaleY(5)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,10px,0) scaleY(.95);transform:translate3d(0,10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-5px,0) scaleY(.985);transform:translate3d(0,-5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0) scaleY(5);transform:translate3d(0,3000px,0) scaleY(5)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,10px,0) scaleY(.95);transform:translate3d(0,10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-5px,0) scaleY(.985);transform:translate3d(0,-5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.animate__bounceOut{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0) scaleY(.985);transform:translate3d(0,10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0) scaleY(3);transform:translate3d(0,2000px,0) scaleY(3)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0) scaleY(.985);transform:translate3d(0,10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0) scaleY(3);transform:translate3d(0,2000px,0) scaleY(3)}}.animate__bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0) scaleX(.9);transform:translate3d(20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0) scaleX(2);transform:translate3d(-2000px,0,0) scaleX(2)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0) scaleX(.9);transform:translate3d(20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0) scaleX(2);transform:translate3d(-2000px,0,0) scaleX(2)}}.animate__bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0) scaleX(.9);transform:translate3d(-20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0) scaleX(2);transform:translate3d(2000px,0,0) scaleX(2)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0) scaleX(.9);transform:translate3d(-20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0) scaleX(2);transform:translate3d(2000px,0,0) scaleX(2)}}.animate__bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0) scaleY(.985);transform:translate3d(0,-10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0) scaleY(.9);transform:translate3d(0,20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0) scaleY(3);transform:translate3d(0,-2000px,0) scaleY(3)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0) scaleY(.985);transform:translate3d(0,-10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0) scaleY(.9);transform:translate3d(0,20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0) scaleY(3);transform:translate3d(0,-2000px,0) scaleY(3)}}.animate__bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate__fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeInTopLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInTopLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInTopLeft{-webkit-animation-name:fadeInTopLeft;animation-name:fadeInTopLeft}@-webkit-keyframes fadeInTopRight{0%{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInTopRight{0%{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInTopRight{-webkit-animation-name:fadeInTopRight;animation-name:fadeInTopRight}@-webkit-keyframes fadeInBottomLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInBottomLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInBottomLeft{-webkit-animation-name:fadeInBottomLeft;animation-name:fadeInBottomLeft}@-webkit-keyframes fadeInBottomRight{0%{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInBottomRight{0%{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInBottomRight{-webkit-animation-name:fadeInBottomRight;animation-name:fadeInBottomRight}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.animate__fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.animate__fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.animate__fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.animate__fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.animate__fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.animate__fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.animate__fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.animate__fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.animate__fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes fadeOutTopLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}}@keyframes fadeOutTopLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}}.animate__fadeOutTopLeft{-webkit-animation-name:fadeOutTopLeft;animation-name:fadeOutTopLeft}@-webkit-keyframes fadeOutTopRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}}@keyframes fadeOutTopRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}}.animate__fadeOutTopRight{-webkit-animation-name:fadeOutTopRight;animation-name:fadeOutTopRight}@-webkit-keyframes fadeOutBottomRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}}@keyframes fadeOutBottomRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}}.animate__fadeOutBottomRight{-webkit-animation-name:fadeOutBottomRight;animation-name:fadeOutBottomRight}@-webkit-keyframes fadeOutBottomLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}}@keyframes fadeOutBottomLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}}.animate__fadeOutBottomLeft{-webkit-animation-name:fadeOutBottomLeft;animation-name:fadeOutBottomLeft}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,-360deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{0%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,-360deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animate__animated.animate__flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.animate__flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.animate__flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}.animate__flipOutX{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}.animate__flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedInRight{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skew(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skew(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skew(-5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes lightSpeedInRight{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skew(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skew(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skew(-5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__lightSpeedInRight{-webkit-animation-name:lightSpeedInRight;animation-name:lightSpeedInRight;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedInLeft{0%{-webkit-transform:translate3d(-100%,0,0) skewX(30deg);transform:translate3d(-100%,0,0) skew(30deg);opacity:0}60%{-webkit-transform:skewX(-20deg);transform:skew(-20deg);opacity:1}80%{-webkit-transform:skewX(5deg);transform:skew(5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes lightSpeedInLeft{0%{-webkit-transform:translate3d(-100%,0,0) skewX(30deg);transform:translate3d(-100%,0,0) skew(30deg);opacity:0}60%{-webkit-transform:skewX(-20deg);transform:skew(-20deg);opacity:1}80%{-webkit-transform:skewX(5deg);transform:skew(5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__lightSpeedInLeft{-webkit-animation-name:lightSpeedInLeft;animation-name:lightSpeedInLeft;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skew(30deg);opacity:0}}@keyframes lightSpeedOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skew(30deg);opacity:0}}.animate__lightSpeedOutRight{-webkit-animation-name:lightSpeedOutRight;animation-name:lightSpeedOutRight;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes lightSpeedOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0) skewX(-30deg);transform:translate3d(-100%,0,0) skew(-30deg);opacity:0}}@keyframes lightSpeedOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0) skewX(-30deg);transform:translate3d(-100%,0,0) skew(-30deg);opacity:0}}.animate__lightSpeedOutLeft{-webkit-animation-name:lightSpeedOutLeft;animation-name:lightSpeedOutLeft;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateIn{0%{-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownLeft{0%{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownRight{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpLeft{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpRight{0%{-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateOut{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.animate__rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes rotateOutDownLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.animate__rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateOutDownRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.animate__rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateOutUpLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.animate__rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateOutUpRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.animate__rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.animate__hinge{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-duration:calc(var(--animate-duration) * 2);animation-duration:calc(var(--animate-duration) * 2);-webkit-animation-name:hinge;animation-name:hinge;-webkit-transform-origin:top left;transform-origin:top left}@-webkit-keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.animate__jackInTheBox{-webkit-animation-name:jackInTheBox;animation-name:jackInTheBox}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.animate__rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.animate__zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.animate__zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0)}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0)}}.animate__zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft;-webkit-transform-origin:left center;transform-origin:left center}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0)}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0)}}.animate__zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight;-webkit-transform-origin:right center;transform-origin:right center}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.animate__slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.animate__slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.animate__slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.animate__slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}.dropdown-menu[data-v-34ee3204]{right:1rem;min-width:200px}.dropdown-item.disabled[data-v-34ee3204],.dropdown-item[data-v-34ee3204]:disabled{opacity:.7}.slide-fade-leave-active[data-v-f14909a4],.slide-fade-enter-active[data-v-f14909a4]{transition:all .2s cubic-bezier(.82,.58,.17,.9)}.slide-fade-enter-from[data-v-f14909a4],.slide-fade-leave-to[data-v-f14909a4]{transform:translateY(20px);opacity:0;filter:blur(3px)}.subMenuBtn.active[data-v-f14909a4]{background-color:#ffffff20}.peerCard[data-v-f14909a4]{transition:box-shadow .1s cubic-bezier(.82,.58,.17,.9)}.peerCard[data-v-f14909a4]:hover{box-shadow:var(--bs-box-shadow)!important}.toggleShowKey[data-v-2c571abb]{position:absolute;top:35px;right:12px}.list-move[data-v-6d5fc831],.list-enter-active[data-v-6d5fc831],.list-leave-active[data-v-6d5fc831]{transition:all .3s ease}.list-enter-from[data-v-6d5fc831],.list-leave-to[data-v-6d5fc831]{opacity:0;transform:translateY(10px)}.list-leave-active[data-v-6d5fc831]{position:absolute}.peerSettingContainer[data-v-3f34f584]{background-color:#00000060;z-index:9998}div[data-v-3f34f584]{transition:.2s ease-in-out}.inactiveField[data-v-3f34f584]{opacity:.4}.card[data-v-3f34f584]{max-height:100%}.btn.disabled[data-v-6a5aba2a]{opacity:1;background-color:#0d6efd17;border-color:transparent}[data-v-8f3f1b93]{font-size:.875rem}input[data-v-8f3f1b93]{padding:.1rem .4rem}input[data-v-8f3f1b93]:disabled{border-color:transparent;background-color:#0d6efd17;color:#0d6efd}.dp__main[data-v-8f3f1b93]{width:auto;flex-grow:1;--dp-input-padding: 2.5px 30px 2.5px 12px;--dp-border-radius: .5rem}.schedulePeerJobTransition-move[data-v-5bbdd42b],.schedulePeerJobTransition-enter-active[data-v-5bbdd42b],.schedulePeerJobTransition-leave-active[data-v-5bbdd42b]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.schedulePeerJobTransition-enter-from[data-v-5bbdd42b],.schedulePeerJobTransition-leave-to[data-v-5bbdd42b]{opacity:0;transform:scale(.9)}.schedulePeerJobTransition-leave-active[data-v-5bbdd42b]{position:absolute;width:100%}.peerNav .nav-link{&.active[data-v-a57c6624]{//background: linear-gradient(var(--degree),var(--brandColor1) var(--distance2),var(--brandColor2) 100%);//color: white;background-color:#efefef}}:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.ol-overviewmap .ol-viewport:hover{cursor:pointer}.ol-layer canvas{border-radius:var(--bs-border-radius-lg)!important}#map{height:300px}.pingPlaceholder[data-v-f5cd36ce]{width:100%;height:79.98px}.ping-move[data-v-f5cd36ce],.ping-enter-active[data-v-f5cd36ce],.ping-leave-active[data-v-f5cd36ce]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.ping-leave-active[data-v-f5cd36ce]{position:absolute;width:100%}.ping-enter-from[data-v-f5cd36ce],.ping-leave-to[data-v-f5cd36ce]{opacity:0;//transform: scale(1.1);filter:blur(3px)}.pingPlaceholder[data-v-6d6cffc9]{width:100%;height:40px}.ping-leave-active[data-v-6d6cffc9]{position:absolute}table th[data-v-6d6cffc9],table td[data-v-6d6cffc9]{padding:.5rem}.table[data-v-6d6cffc9]>:not(caption)>*>*{background-color:transparent!important}.ping-move[data-v-6d6cffc9],.ping-enter-active[data-v-6d6cffc9],.ping-leave-active[data-v-6d6cffc9]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.ping-leave-active[data-v-6d6cffc9]{position:absolute;width:100%}.ping-enter-from[data-v-6d6cffc9],.ping-leave-to[data-v-6d6cffc9]{opacity:0;//transform: scale(1.1);filter:blur(3px)}.animate__fadeInUp[data-v-1b44aacd]{animation-timing-function:cubic-bezier(.42,0,.22,1)}.app-enter-active[data-v-95a5c797],.app-leave-active[data-v-95a5c797]{transition:all .3s cubic-bezier(.82,.58,.17,.9)}.app-enter-from[data-v-95a5c797]{transform:translateY(20px);opacity:0}.app-leave-to[data-v-95a5c797]{transform:translateY(-20px);opacity:0}@media screen and (min-width: 768px){.navbar[data-v-95a5c797]{display:none}} diff --git a/src/static/app/dist/assets/index.js b/src/static/app/dist/assets/index.js index 5b73349..5def0bf 100644 --- a/src/static/app/dist/assets/index.js +++ b/src/static/app/dist/assets/index.js @@ -6,11 +6,11 @@ * @vue/shared v3.5.11 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function Xm(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const kt={},sl=[],Ls=()=>{},b2=()=>!1,Qh=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),qm=t=>t.startsWith("onUpdate:"),_n=Object.assign,Zm=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},w2=Object.prototype.hasOwnProperty,bt=(t,e)=>w2.call(t,e),Ye=Array.isArray,rl=t=>Ou(t)==="[object Map]",Kl=t=>Ou(t)==="[object Set]",zv=t=>Ou(t)==="[object Date]",qe=t=>typeof t=="function",Ht=t=>typeof t=="string",Fs=t=>typeof t=="symbol",Mt=t=>t!==null&&typeof t=="object",bx=t=>(Mt(t)||qe(t))&&qe(t.then)&&qe(t.catch),wx=Object.prototype.toString,Ou=t=>wx.call(t),x2=t=>Ou(t).slice(8,-1),xx=t=>Ou(t)==="[object Object]",Jm=t=>Ht(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Oc=Xm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ef=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},E2=/-(\w)/g,ji=ef(t=>t.replace(E2,(e,n)=>n?n.toUpperCase():"")),C2=/\B([A-Z])/g,go=ef(t=>t.replace(C2,"-$1").toLowerCase()),tf=ef(t=>t.charAt(0).toUpperCase()+t.slice(1)),gg=ef(t=>t?`on${tf(t)}`:""),so=(t,e)=>!Object.is(t,e),eh=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},hh=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Cx=t=>{const e=Ht(t)?Number(t):NaN;return isNaN(e)?t:e};let Wv;const Sx=()=>Wv||(Wv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pn(t){if(Ye(t)){const e={};for(let n=0;n{if(n){const i=n.split(T2);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function Pe(t){let e="";if(Ht(t))e=t;else if(Ye(t))for(let n=0;naa(n,e))}const Ax=t=>!!(t&&t.__v_isRef===!0),xe=t=>Ht(t)?t:t==null?"":Ye(t)||Mt(t)&&(t.toString===wx||!qe(t.toString))?Ax(t)?xe(t.value):JSON.stringify(t,kx,2):String(t),kx=(t,e)=>Ax(e)?kx(t,e.value):rl(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,s],r)=>(n[pg(i,r)+" =>"]=s,n),{})}:Kl(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>pg(n))}:Fs(e)?pg(e):Mt(e)&&!Ye(e)&&!xx(e)?String(e):e,pg=(t,e="")=>{var n;return Fs(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/** +**//*! #__NO_SIDE_EFFECTS__ */function Xm(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const kt={},sl=[],Ls=()=>{},b2=()=>!1,Qh=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),qm=t=>t.startsWith("onUpdate:"),_n=Object.assign,Zm=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},w2=Object.prototype.hasOwnProperty,bt=(t,e)=>w2.call(t,e),Ye=Array.isArray,rl=t=>Ou(t)==="[object Map]",Kl=t=>Ou(t)==="[object Set]",zv=t=>Ou(t)==="[object Date]",qe=t=>typeof t=="function",Ht=t=>typeof t=="string",Fs=t=>typeof t=="symbol",Mt=t=>t!==null&&typeof t=="object",bx=t=>(Mt(t)||qe(t))&&qe(t.then)&&qe(t.catch),wx=Object.prototype.toString,Ou=t=>wx.call(t),x2=t=>Ou(t).slice(8,-1),xx=t=>Ou(t)==="[object Object]",Jm=t=>Ht(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Oc=Xm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ef=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},E2=/-(\w)/g,ji=ef(t=>t.replace(E2,(e,n)=>n?n.toUpperCase():"")),C2=/\B([A-Z])/g,go=ef(t=>t.replace(C2,"-$1").toLowerCase()),tf=ef(t=>t.charAt(0).toUpperCase()+t.slice(1)),gg=ef(t=>t?`on${tf(t)}`:""),so=(t,e)=>!Object.is(t,e),eh=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},hh=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Cx=t=>{const e=Ht(t)?Number(t):NaN;return isNaN(e)?t:e};let Wv;const Sx=()=>Wv||(Wv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pn(t){if(Ye(t)){const e={};for(let n=0;n{if(n){const i=n.split(T2);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function Pe(t){let e="";if(Ht(t))e=t;else if(Ye(t))for(let n=0;naa(n,e))}const Ax=t=>!!(t&&t.__v_isRef===!0),we=t=>Ht(t)?t:t==null?"":Ye(t)||Mt(t)&&(t.toString===wx||!qe(t.toString))?Ax(t)?we(t.value):JSON.stringify(t,kx,2):String(t),kx=(t,e)=>Ax(e)?kx(t,e.value):rl(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,s],r)=>(n[pg(i,r)+" =>"]=s,n),{})}:Kl(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>pg(n))}:Fs(e)?pg(e):Mt(e)&&!Ye(e)&&!xx(e)?String(e):e,pg=(t,e="")=>{var n;return Fs(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/** * @vue/reactivity v3.5.11 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Qn;class Mx{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Qn,!e&&Qn&&(this.index=(Qn.scopes||(Qn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e0)return;if(Nc){let e=Nc;for(Nc=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;$c;){let e=$c;for($c=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function Lx(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Ox(t){let e,n=t.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),i_(i),D2(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}t.deps=e,t.depsTail=n}function Dp(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&($x(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function $x(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Qc))return;t.globalVersion=Qc;const e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!Dp(t)){t.flags&=-3;return}const n=It,i=cs;It=t,cs=!0;try{Lx(t);const s=t.fn(t._value);(e.version===0||so(s,t._value))&&(t._value=s,e.version++)}catch(s){throw e.version++,s}finally{It=n,cs=i,Ox(t),t.flags&=-3}}function i_(t,e=!1){const{dep:n,prevSub:i,nextSub:s}=t;if(i&&(i.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i),!n.subs&&n.computed){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)i_(r,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function D2(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let cs=!0;const Nx=[];function po(){Nx.push(cs),cs=!1}function mo(){const t=Nx.pop();cs=t===void 0?!0:t}function Yv(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=It;It=void 0;try{e()}finally{It=n}}}let Qc=0;class R2{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class s_{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!It||!cs||It===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==It)n=this.activeLink=new R2(It,this),It.deps?(n.prevDep=It.depsTail,It.depsTail.nextDep=n,It.depsTail=n):It.deps=It.depsTail=n,Fx(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=It.depsTail,n.nextDep=void 0,It.depsTail.nextDep=n,It.depsTail=n,It.deps===n&&(It.deps=i)}return n}trigger(e){this.version++,Qc++,this.notify(e)}notify(e){t_();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{n_()}}}function Fx(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)Fx(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const fh=new WeakMap,Qo=Symbol(""),Rp=Symbol(""),eu=Symbol("");function Gn(t,e,n){if(cs&&It){let i=fh.get(t);i||fh.set(t,i=new Map);let s=i.get(n);s||(i.set(n,s=new s_),s.map=i,s.key=n),s.track()}}function dr(t,e,n,i,s,r){const o=fh.get(t);if(!o){Qc++;return}const a=l=>{l&&l.trigger()};if(t_(),e==="clear")o.forEach(a);else{const l=Ye(t),c=l&&Jm(n);if(l&&n==="length"){const u=Number(i);o.forEach((d,h)=>{(h==="length"||h===eu||!Fs(h)&&h>=u)&&a(d)})}else switch(n!==void 0&&a(o.get(n)),c&&a(o.get(eu)),e){case"add":l?c&&a(o.get("length")):(a(o.get(Qo)),rl(t)&&a(o.get(Rp)));break;case"delete":l||(a(o.get(Qo)),rl(t)&&a(o.get(Rp)));break;case"set":rl(t)&&a(o.get(Qo));break}}n_()}function L2(t,e){const n=fh.get(t);return n&&n.get(e)}function Ia(t){const e=lt(t);return e===t?e:(Gn(e,"iterate",eu),Yi(t)?e:e.map(Hn))}function sf(t){return Gn(t=lt(t),"iterate",eu),t}const O2={__proto__:null,[Symbol.iterator](){return _g(this,Symbol.iterator,Hn)},concat(...t){return Ia(this).concat(...t.map(e=>Ye(e)?Ia(e):e))},entries(){return _g(this,"entries",t=>(t[1]=Hn(t[1]),t))},every(t,e){return js(this,"every",t,e,void 0,arguments)},filter(t,e){return js(this,"filter",t,e,n=>n.map(Hn),arguments)},find(t,e){return js(this,"find",t,e,Hn,arguments)},findIndex(t,e){return js(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return js(this,"findLast",t,e,Hn,arguments)},findLastIndex(t,e){return js(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return js(this,"forEach",t,e,void 0,arguments)},includes(...t){return yg(this,"includes",t)},indexOf(...t){return yg(this,"indexOf",t)},join(t){return Ia(this).join(t)},lastIndexOf(...t){return yg(this,"lastIndexOf",t)},map(t,e){return js(this,"map",t,e,void 0,arguments)},pop(){return rc(this,"pop")},push(...t){return rc(this,"push",t)},reduce(t,...e){return Hv(this,"reduce",t,e)},reduceRight(t,...e){return Hv(this,"reduceRight",t,e)},shift(){return rc(this,"shift")},some(t,e){return js(this,"some",t,e,void 0,arguments)},splice(...t){return rc(this,"splice",t)},toReversed(){return Ia(this).toReversed()},toSorted(t){return Ia(this).toSorted(t)},toSpliced(...t){return Ia(this).toSpliced(...t)},unshift(...t){return rc(this,"unshift",t)},values(){return _g(this,"values",Hn)}};function _g(t,e,n){const i=sf(t),s=i[e]();return i!==t&&!Yi(t)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.value&&(r.value=n(r.value)),r}),s}const $2=Array.prototype;function js(t,e,n,i,s,r){const o=sf(t),a=o!==t&&!Yi(t),l=o[e];if(l!==$2[e]){const d=l.apply(t,r);return a?Hn(d):d}let c=n;o!==t&&(a?c=function(d,h){return n.call(this,Hn(d),h,t)}:n.length>2&&(c=function(d,h){return n.call(this,d,h,t)}));const u=l.call(o,c,i);return a&&s?s(u):u}function Hv(t,e,n,i){const s=sf(t);let r=n;return s!==t&&(Yi(t)?n.length>3&&(r=function(o,a,l){return n.call(this,o,a,l,t)}):r=function(o,a,l){return n.call(this,o,Hn(a),l,t)}),s[e](r,...i)}function yg(t,e,n){const i=lt(t);Gn(i,"iterate",eu);const s=i[e](...n);return(s===-1||s===!1)&&$u(n[0])?(n[0]=lt(n[0]),i[e](...n)):s}function rc(t,e,n=[]){po(),t_();const i=lt(t)[e].apply(t,n);return n_(),mo(),i}const N2=Xm("__proto__,__v_isRef,__isVue"),Bx=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Fs));function F2(t){Fs(t)||(t=String(t));const e=lt(this);return Gn(e,"has",t),e.hasOwnProperty(t)}class Vx{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,i){const s=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return r;if(n==="__v_raw")return i===(s?r?Z2:Hx:r?Yx:Wx).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=Ye(e);if(!s){let l;if(o&&(l=O2[n]))return l;if(n==="hasOwnProperty")return F2}const a=Reflect.get(e,n,Wt(e)?e:i);return(Fs(n)?Bx.has(n):N2(n))||(s||Gn(e,"get",n),r)?a:Wt(a)?o&&Jm(n)?a:a.value:Mt(a)?s?Kx(a):Ki(a):a}}class zx extends Vx{constructor(e=!1){super(!1,e)}set(e,n,i,s){let r=e[n];if(!this._isShallow){const l=la(r);if(!Yi(i)&&!la(i)&&(r=lt(r),i=lt(i)),!Ye(e)&&Wt(r)&&!Wt(i))return l?!1:(r.value=i,!0)}const o=Ye(e)&&Jm(n)?Number(n)t,rf=t=>Reflect.getPrototypeOf(t);function gd(t,e,n=!1,i=!1){t=t.__v_raw;const s=lt(t),r=lt(e);n||(so(e,r)&&Gn(s,"get",e),Gn(s,"get",r));const{has:o}=rf(s),a=i?r_:n?l_:Hn;if(o.call(s,e))return a(t.get(e));if(o.call(s,r))return a(t.get(r));t!==s&&t.get(e)}function pd(t,e=!1){const n=this.__v_raw,i=lt(n),s=lt(t);return e||(so(t,s)&&Gn(i,"has",t),Gn(i,"has",s)),t===s?n.has(t):n.has(t)||n.has(s)}function md(t,e=!1){return t=t.__v_raw,!e&&Gn(lt(t),"iterate",Qo),Reflect.get(t,"size",t)}function jv(t,e=!1){!e&&!Yi(t)&&!la(t)&&(t=lt(t));const n=lt(this);return rf(n).has.call(n,t)||(n.add(t),dr(n,"add",t,t)),this}function Kv(t,e,n=!1){!n&&!Yi(e)&&!la(e)&&(e=lt(e));const i=lt(this),{has:s,get:r}=rf(i);let o=s.call(i,t);o||(t=lt(t),o=s.call(i,t));const a=r.call(i,t);return i.set(t,e),o?so(e,a)&&dr(i,"set",t,e):dr(i,"add",t,e),this}function Uv(t){const e=lt(this),{has:n,get:i}=rf(e);let s=n.call(e,t);s||(t=lt(t),s=n.call(e,t)),i&&i.call(e,t);const r=e.delete(t);return s&&dr(e,"delete",t,void 0),r}function Gv(){const t=lt(this),e=t.size!==0,n=t.clear();return e&&dr(t,"clear",void 0,void 0),n}function _d(t,e){return function(i,s){const r=this,o=r.__v_raw,a=lt(o),l=e?r_:t?l_:Hn;return!t&&Gn(a,"iterate",Qo),o.forEach((c,u)=>i.call(s,l(c),l(u),r))}}function yd(t,e,n){return function(...i){const s=this.__v_raw,r=lt(s),o=rl(r),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=s[t](...i),u=n?r_:e?l_:Hn;return!e&&Gn(r,"iterate",l?Rp:Qo),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:a?[u(d[0]),u(d[1])]:u(d),done:h}},[Symbol.iterator](){return this}}}}function Tr(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Y2(){const t={get(r){return gd(this,r)},get size(){return md(this)},has:pd,add:jv,set:Kv,delete:Uv,clear:Gv,forEach:_d(!1,!1)},e={get(r){return gd(this,r,!1,!0)},get size(){return md(this)},has:pd,add(r){return jv.call(this,r,!0)},set(r,o){return Kv.call(this,r,o,!0)},delete:Uv,clear:Gv,forEach:_d(!1,!0)},n={get(r){return gd(this,r,!0)},get size(){return md(this,!0)},has(r){return pd.call(this,r,!0)},add:Tr("add"),set:Tr("set"),delete:Tr("delete"),clear:Tr("clear"),forEach:_d(!0,!1)},i={get(r){return gd(this,r,!0,!0)},get size(){return md(this,!0)},has(r){return pd.call(this,r,!0)},add:Tr("add"),set:Tr("set"),delete:Tr("delete"),clear:Tr("clear"),forEach:_d(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{t[r]=yd(r,!1,!1),n[r]=yd(r,!0,!1),e[r]=yd(r,!1,!0),i[r]=yd(r,!0,!0)}),[t,n,e,i]}const[H2,j2,K2,U2]=Y2();function o_(t,e){const n=e?t?U2:K2:t?j2:H2;return(i,s,r)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?i:Reflect.get(bt(n,s)&&s in i?n:i,s,r)}const G2={get:o_(!1,!1)},X2={get:o_(!1,!0)},q2={get:o_(!0,!1)};const Wx=new WeakMap,Yx=new WeakMap,Hx=new WeakMap,Z2=new WeakMap;function J2(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Q2(t){return t.__v_skip||!Object.isExtensible(t)?0:J2(x2(t))}function Ki(t){return la(t)?t:a_(t,!1,V2,G2,Wx)}function jx(t){return a_(t,!1,W2,X2,Yx)}function Kx(t){return a_(t,!0,z2,q2,Hx)}function a_(t,e,n,i,s){if(!Mt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const r=s.get(t);if(r)return r;const o=Q2(t);if(o===0)return t;const a=new Proxy(t,o===2?i:n);return s.set(t,a),a}function Qr(t){return la(t)?Qr(t.__v_raw):!!(t&&t.__v_isReactive)}function la(t){return!!(t&&t.__v_isReadonly)}function Yi(t){return!!(t&&t.__v_isShallow)}function $u(t){return t?!!t.__v_raw:!1}function lt(t){const e=t&&t.__v_raw;return e?lt(e):t}function of(t){return!bt(t,"__v_skip")&&Object.isExtensible(t)&&Ex(t,"__v_skip",!0),t}const Hn=t=>Mt(t)?Ki(t):t,l_=t=>Mt(t)?Kx(t):t;function Wt(t){return t?t.__v_isRef===!0:!1}function we(t){return Ux(t,!1)}function af(t){return Ux(t,!0)}function Ux(t,e){return Wt(t)?t:new eD(t,e)}class eD{constructor(e,n){this.dep=new s_,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:lt(e),this._value=n?e:Hn(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,i=this.__v_isShallow||Yi(e)||la(e);e=i?e:lt(e),so(e,n)&&(this._rawValue=e,this._value=i?e:Hn(e),this.dep.trigger())}}function J(t){return Wt(t)?t.value:t}const tD={get:(t,e,n)=>e==="__v_raw"?t:J(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const s=t[e];return Wt(s)&&!Wt(n)?(s.value=n,!0):Reflect.set(t,e,n,i)}};function Gx(t){return Qr(t)?t:new Proxy(t,tD)}function nD(t){const e=Ye(t)?new Array(t.length):{};for(const n in t)e[n]=Xx(t,n);return e}class iD{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return L2(lt(this._object),this._key)}}class sD{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function tu(t,e,n){return Wt(t)?t:qe(t)?new sD(t):Mt(t)&&arguments.length>1?Xx(t,e,n):we(t)}function Xx(t,e,n){const i=t[e];return Wt(i)?i:new iD(t,e,n)}class rD{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new s_(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qc-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&It!==this)return Rx(this,!0),!0}get value(){const e=this.dep.track();return $x(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function oD(t,e,n=!1){let i,s;return qe(t)?i=t:(i=t.get,s=t.set),new rD(i,s,n)}const vd={},gh=new WeakMap;let Vo;function aD(t,e=!1,n=Vo){if(n){let i=gh.get(n);i||gh.set(n,i=[]),i.push(t)}}function lD(t,e,n=kt){const{immediate:i,deep:s,once:r,scheduler:o,augmentJob:a,call:l}=n,c=E=>s?E:Yi(E)||s===!1||s===0?rr(E,1):rr(E);let u,d,h,f,p=!1,m=!1;if(Wt(t)?(d=()=>t.value,p=Yi(t)):Qr(t)?(d=()=>c(t),p=!0):Ye(t)?(m=!0,p=t.some(E=>Qr(E)||Yi(E)),d=()=>t.map(E=>{if(Wt(E))return E.value;if(Qr(E))return c(E);if(qe(E))return l?l(E,2):E()})):qe(t)?e?d=l?()=>l(t,2):t:d=()=>{if(h){po();try{h()}finally{mo()}}const E=Vo;Vo=u;try{return l?l(t,3,[f]):t(f)}finally{Vo=E}}:d=Ls,e&&s){const E=d,w=s===!0?1/0:s;d=()=>rr(E(),w)}const y=nf(),v=()=>{u.stop(),y&&Zm(y.effects,u)};if(r&&e){const E=e;e=(...w)=>{E(...w),v()}}let b=m?new Array(t.length).fill(vd):vd;const x=E=>{if(!(!(u.flags&1)||!u.dirty&&!E))if(e){const w=u.run();if(s||p||(m?w.some((S,T)=>so(S,b[T])):so(w,b))){h&&h();const S=Vo;Vo=u;try{const T=[w,b===vd?void 0:m&&b[0]===vd?[]:b,f];l?l(e,3,T):e(...T),b=w}finally{Vo=S}}}else u.run()};return a&&a(x),u=new Ix(d),u.scheduler=o?()=>o(x,!1):x,f=E=>aD(E,!1,u),h=u.onStop=()=>{const E=gh.get(u);if(E){if(l)l(E,4);else for(const w of E)w();gh.delete(u)}},e?i?x(!0):b=u.run():o?o(x.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),v.stop=v,v}function rr(t,e=1/0,n){if(e<=0||!Mt(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,Wt(t))rr(t.value,e,n);else if(Ye(t))for(let i=0;i{rr(i,e,n)});else if(xx(t)){for(const i in t)rr(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&rr(t[i],e,n)}return t}/** +**/let Qn;class Mx{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Qn,!e&&Qn&&(this.index=(Qn.scopes||(Qn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e0)return;if(Nc){let e=Nc;for(Nc=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;$c;){let e=$c;for($c=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function Lx(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Ox(t){let e,n=t.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),i_(i),D2(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}t.deps=e,t.depsTail=n}function Dp(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&($x(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function $x(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Qc))return;t.globalVersion=Qc;const e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!Dp(t)){t.flags&=-3;return}const n=It,i=cs;It=t,cs=!0;try{Lx(t);const s=t.fn(t._value);(e.version===0||so(s,t._value))&&(t._value=s,e.version++)}catch(s){throw e.version++,s}finally{It=n,cs=i,Ox(t),t.flags&=-3}}function i_(t,e=!1){const{dep:n,prevSub:i,nextSub:s}=t;if(i&&(i.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i),!n.subs&&n.computed){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)i_(r,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function D2(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let cs=!0;const Nx=[];function po(){Nx.push(cs),cs=!1}function mo(){const t=Nx.pop();cs=t===void 0?!0:t}function Yv(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=It;It=void 0;try{e()}finally{It=n}}}let Qc=0;class R2{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class s_{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!It||!cs||It===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==It)n=this.activeLink=new R2(It,this),It.deps?(n.prevDep=It.depsTail,It.depsTail.nextDep=n,It.depsTail=n):It.deps=It.depsTail=n,Fx(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=It.depsTail,n.nextDep=void 0,It.depsTail.nextDep=n,It.depsTail=n,It.deps===n&&(It.deps=i)}return n}trigger(e){this.version++,Qc++,this.notify(e)}notify(e){t_();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{n_()}}}function Fx(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)Fx(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const fh=new WeakMap,Qo=Symbol(""),Rp=Symbol(""),eu=Symbol("");function Gn(t,e,n){if(cs&&It){let i=fh.get(t);i||fh.set(t,i=new Map);let s=i.get(n);s||(i.set(n,s=new s_),s.map=i,s.key=n),s.track()}}function dr(t,e,n,i,s,r){const o=fh.get(t);if(!o){Qc++;return}const a=l=>{l&&l.trigger()};if(t_(),e==="clear")o.forEach(a);else{const l=Ye(t),c=l&&Jm(n);if(l&&n==="length"){const u=Number(i);o.forEach((d,h)=>{(h==="length"||h===eu||!Fs(h)&&h>=u)&&a(d)})}else switch(n!==void 0&&a(o.get(n)),c&&a(o.get(eu)),e){case"add":l?c&&a(o.get("length")):(a(o.get(Qo)),rl(t)&&a(o.get(Rp)));break;case"delete":l||(a(o.get(Qo)),rl(t)&&a(o.get(Rp)));break;case"set":rl(t)&&a(o.get(Qo));break}}n_()}function L2(t,e){const n=fh.get(t);return n&&n.get(e)}function Ia(t){const e=lt(t);return e===t?e:(Gn(e,"iterate",eu),Yi(t)?e:e.map(Hn))}function sf(t){return Gn(t=lt(t),"iterate",eu),t}const O2={__proto__:null,[Symbol.iterator](){return _g(this,Symbol.iterator,Hn)},concat(...t){return Ia(this).concat(...t.map(e=>Ye(e)?Ia(e):e))},entries(){return _g(this,"entries",t=>(t[1]=Hn(t[1]),t))},every(t,e){return js(this,"every",t,e,void 0,arguments)},filter(t,e){return js(this,"filter",t,e,n=>n.map(Hn),arguments)},find(t,e){return js(this,"find",t,e,Hn,arguments)},findIndex(t,e){return js(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return js(this,"findLast",t,e,Hn,arguments)},findLastIndex(t,e){return js(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return js(this,"forEach",t,e,void 0,arguments)},includes(...t){return yg(this,"includes",t)},indexOf(...t){return yg(this,"indexOf",t)},join(t){return Ia(this).join(t)},lastIndexOf(...t){return yg(this,"lastIndexOf",t)},map(t,e){return js(this,"map",t,e,void 0,arguments)},pop(){return rc(this,"pop")},push(...t){return rc(this,"push",t)},reduce(t,...e){return Hv(this,"reduce",t,e)},reduceRight(t,...e){return Hv(this,"reduceRight",t,e)},shift(){return rc(this,"shift")},some(t,e){return js(this,"some",t,e,void 0,arguments)},splice(...t){return rc(this,"splice",t)},toReversed(){return Ia(this).toReversed()},toSorted(t){return Ia(this).toSorted(t)},toSpliced(...t){return Ia(this).toSpliced(...t)},unshift(...t){return rc(this,"unshift",t)},values(){return _g(this,"values",Hn)}};function _g(t,e,n){const i=sf(t),s=i[e]();return i!==t&&!Yi(t)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.value&&(r.value=n(r.value)),r}),s}const $2=Array.prototype;function js(t,e,n,i,s,r){const o=sf(t),a=o!==t&&!Yi(t),l=o[e];if(l!==$2[e]){const d=l.apply(t,r);return a?Hn(d):d}let c=n;o!==t&&(a?c=function(d,h){return n.call(this,Hn(d),h,t)}:n.length>2&&(c=function(d,h){return n.call(this,d,h,t)}));const u=l.call(o,c,i);return a&&s?s(u):u}function Hv(t,e,n,i){const s=sf(t);let r=n;return s!==t&&(Yi(t)?n.length>3&&(r=function(o,a,l){return n.call(this,o,a,l,t)}):r=function(o,a,l){return n.call(this,o,Hn(a),l,t)}),s[e](r,...i)}function yg(t,e,n){const i=lt(t);Gn(i,"iterate",eu);const s=i[e](...n);return(s===-1||s===!1)&&$u(n[0])?(n[0]=lt(n[0]),i[e](...n)):s}function rc(t,e,n=[]){po(),t_();const i=lt(t)[e].apply(t,n);return n_(),mo(),i}const N2=Xm("__proto__,__v_isRef,__isVue"),Bx=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Fs));function F2(t){Fs(t)||(t=String(t));const e=lt(this);return Gn(e,"has",t),e.hasOwnProperty(t)}class Vx{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,i){const s=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return r;if(n==="__v_raw")return i===(s?r?Z2:Hx:r?Yx:Wx).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=Ye(e);if(!s){let l;if(o&&(l=O2[n]))return l;if(n==="hasOwnProperty")return F2}const a=Reflect.get(e,n,Wt(e)?e:i);return(Fs(n)?Bx.has(n):N2(n))||(s||Gn(e,"get",n),r)?a:Wt(a)?o&&Jm(n)?a:a.value:Mt(a)?s?Kx(a):Ki(a):a}}class zx extends Vx{constructor(e=!1){super(!1,e)}set(e,n,i,s){let r=e[n];if(!this._isShallow){const l=la(r);if(!Yi(i)&&!la(i)&&(r=lt(r),i=lt(i)),!Ye(e)&&Wt(r)&&!Wt(i))return l?!1:(r.value=i,!0)}const o=Ye(e)&&Jm(n)?Number(n)t,rf=t=>Reflect.getPrototypeOf(t);function gd(t,e,n=!1,i=!1){t=t.__v_raw;const s=lt(t),r=lt(e);n||(so(e,r)&&Gn(s,"get",e),Gn(s,"get",r));const{has:o}=rf(s),a=i?r_:n?l_:Hn;if(o.call(s,e))return a(t.get(e));if(o.call(s,r))return a(t.get(r));t!==s&&t.get(e)}function pd(t,e=!1){const n=this.__v_raw,i=lt(n),s=lt(t);return e||(so(t,s)&&Gn(i,"has",t),Gn(i,"has",s)),t===s?n.has(t):n.has(t)||n.has(s)}function md(t,e=!1){return t=t.__v_raw,!e&&Gn(lt(t),"iterate",Qo),Reflect.get(t,"size",t)}function jv(t,e=!1){!e&&!Yi(t)&&!la(t)&&(t=lt(t));const n=lt(this);return rf(n).has.call(n,t)||(n.add(t),dr(n,"add",t,t)),this}function Kv(t,e,n=!1){!n&&!Yi(e)&&!la(e)&&(e=lt(e));const i=lt(this),{has:s,get:r}=rf(i);let o=s.call(i,t);o||(t=lt(t),o=s.call(i,t));const a=r.call(i,t);return i.set(t,e),o?so(e,a)&&dr(i,"set",t,e):dr(i,"add",t,e),this}function Uv(t){const e=lt(this),{has:n,get:i}=rf(e);let s=n.call(e,t);s||(t=lt(t),s=n.call(e,t)),i&&i.call(e,t);const r=e.delete(t);return s&&dr(e,"delete",t,void 0),r}function Gv(){const t=lt(this),e=t.size!==0,n=t.clear();return e&&dr(t,"clear",void 0,void 0),n}function _d(t,e){return function(i,s){const r=this,o=r.__v_raw,a=lt(o),l=e?r_:t?l_:Hn;return!t&&Gn(a,"iterate",Qo),o.forEach((c,u)=>i.call(s,l(c),l(u),r))}}function yd(t,e,n){return function(...i){const s=this.__v_raw,r=lt(s),o=rl(r),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=s[t](...i),u=n?r_:e?l_:Hn;return!e&&Gn(r,"iterate",l?Rp:Qo),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:a?[u(d[0]),u(d[1])]:u(d),done:h}},[Symbol.iterator](){return this}}}}function Tr(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Y2(){const t={get(r){return gd(this,r)},get size(){return md(this)},has:pd,add:jv,set:Kv,delete:Uv,clear:Gv,forEach:_d(!1,!1)},e={get(r){return gd(this,r,!1,!0)},get size(){return md(this)},has:pd,add(r){return jv.call(this,r,!0)},set(r,o){return Kv.call(this,r,o,!0)},delete:Uv,clear:Gv,forEach:_d(!1,!0)},n={get(r){return gd(this,r,!0)},get size(){return md(this,!0)},has(r){return pd.call(this,r,!0)},add:Tr("add"),set:Tr("set"),delete:Tr("delete"),clear:Tr("clear"),forEach:_d(!0,!1)},i={get(r){return gd(this,r,!0,!0)},get size(){return md(this,!0)},has(r){return pd.call(this,r,!0)},add:Tr("add"),set:Tr("set"),delete:Tr("delete"),clear:Tr("clear"),forEach:_d(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{t[r]=yd(r,!1,!1),n[r]=yd(r,!0,!1),e[r]=yd(r,!1,!0),i[r]=yd(r,!0,!0)}),[t,n,e,i]}const[H2,j2,K2,U2]=Y2();function o_(t,e){const n=e?t?U2:K2:t?j2:H2;return(i,s,r)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?i:Reflect.get(bt(n,s)&&s in i?n:i,s,r)}const G2={get:o_(!1,!1)},X2={get:o_(!1,!0)},q2={get:o_(!0,!1)};const Wx=new WeakMap,Yx=new WeakMap,Hx=new WeakMap,Z2=new WeakMap;function J2(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Q2(t){return t.__v_skip||!Object.isExtensible(t)?0:J2(x2(t))}function Ki(t){return la(t)?t:a_(t,!1,V2,G2,Wx)}function jx(t){return a_(t,!1,W2,X2,Yx)}function Kx(t){return a_(t,!0,z2,q2,Hx)}function a_(t,e,n,i,s){if(!Mt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const r=s.get(t);if(r)return r;const o=Q2(t);if(o===0)return t;const a=new Proxy(t,o===2?i:n);return s.set(t,a),a}function Qr(t){return la(t)?Qr(t.__v_raw):!!(t&&t.__v_isReactive)}function la(t){return!!(t&&t.__v_isReadonly)}function Yi(t){return!!(t&&t.__v_isShallow)}function $u(t){return t?!!t.__v_raw:!1}function lt(t){const e=t&&t.__v_raw;return e?lt(e):t}function of(t){return!bt(t,"__v_skip")&&Object.isExtensible(t)&&Ex(t,"__v_skip",!0),t}const Hn=t=>Mt(t)?Ki(t):t,l_=t=>Mt(t)?Kx(t):t;function Wt(t){return t?t.__v_isRef===!0:!1}function xe(t){return Ux(t,!1)}function af(t){return Ux(t,!0)}function Ux(t,e){return Wt(t)?t:new eD(t,e)}class eD{constructor(e,n){this.dep=new s_,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:lt(e),this._value=n?e:Hn(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,i=this.__v_isShallow||Yi(e)||la(e);e=i?e:lt(e),so(e,n)&&(this._rawValue=e,this._value=i?e:Hn(e),this.dep.trigger())}}function J(t){return Wt(t)?t.value:t}const tD={get:(t,e,n)=>e==="__v_raw"?t:J(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const s=t[e];return Wt(s)&&!Wt(n)?(s.value=n,!0):Reflect.set(t,e,n,i)}};function Gx(t){return Qr(t)?t:new Proxy(t,tD)}function nD(t){const e=Ye(t)?new Array(t.length):{};for(const n in t)e[n]=Xx(t,n);return e}class iD{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return L2(lt(this._object),this._key)}}class sD{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function tu(t,e,n){return Wt(t)?t:qe(t)?new sD(t):Mt(t)&&arguments.length>1?Xx(t,e,n):xe(t)}function Xx(t,e,n){const i=t[e];return Wt(i)?i:new iD(t,e,n)}class rD{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new s_(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qc-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&It!==this)return Rx(this,!0),!0}get value(){const e=this.dep.track();return $x(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function oD(t,e,n=!1){let i,s;return qe(t)?i=t:(i=t.get,s=t.set),new rD(i,s,n)}const vd={},gh=new WeakMap;let Vo;function aD(t,e=!1,n=Vo){if(n){let i=gh.get(n);i||gh.set(n,i=[]),i.push(t)}}function lD(t,e,n=kt){const{immediate:i,deep:s,once:r,scheduler:o,augmentJob:a,call:l}=n,c=E=>s?E:Yi(E)||s===!1||s===0?rr(E,1):rr(E);let u,d,h,f,p=!1,m=!1;if(Wt(t)?(d=()=>t.value,p=Yi(t)):Qr(t)?(d=()=>c(t),p=!0):Ye(t)?(m=!0,p=t.some(E=>Qr(E)||Yi(E)),d=()=>t.map(E=>{if(Wt(E))return E.value;if(Qr(E))return c(E);if(qe(E))return l?l(E,2):E()})):qe(t)?e?d=l?()=>l(t,2):t:d=()=>{if(h){po();try{h()}finally{mo()}}const E=Vo;Vo=u;try{return l?l(t,3,[f]):t(f)}finally{Vo=E}}:d=Ls,e&&s){const E=d,w=s===!0?1/0:s;d=()=>rr(E(),w)}const y=nf(),v=()=>{u.stop(),y&&Zm(y.effects,u)};if(r&&e){const E=e;e=(...w)=>{E(...w),v()}}let b=m?new Array(t.length).fill(vd):vd;const x=E=>{if(!(!(u.flags&1)||!u.dirty&&!E))if(e){const w=u.run();if(s||p||(m?w.some((S,T)=>so(S,b[T])):so(w,b))){h&&h();const S=Vo;Vo=u;try{const T=[w,b===vd?void 0:m&&b[0]===vd?[]:b,f];l?l(e,3,T):e(...T),b=w}finally{Vo=S}}}else u.run()};return a&&a(x),u=new Ix(d),u.scheduler=o?()=>o(x,!1):x,f=E=>aD(E,!1,u),h=u.onStop=()=>{const E=gh.get(u);if(E){if(l)l(E,4);else for(const w of E)w();gh.delete(u)}},e?i?x(!0):b=u.run():o?o(x.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),v.stop=v,v}function rr(t,e=1/0,n){if(e<=0||!Mt(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,Wt(t))rr(t.value,e,n);else if(Ye(t))for(let i=0;i{rr(i,e,n)});else if(xx(t)){for(const i in t)rr(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&rr(t[i],e,n)}return t}/** * @vue/runtime-core v3.5.11 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT @@ -22,11 +22,11 @@ * pinia v2.2.4 * (c) 2024 Eduardo San Martin Morote * @license MIT - */let nC;const pf=t=>nC=t,iC=Symbol();function jp(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var zc;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(zc||(zc={}));function eL(){const t=Px(!0),e=t.run(()=>we({}));let n=[],i=[];const s=of({install(r){pf(s),s._a=r,r.provide(iC,s),r.config.globalProperties.$pinia=s,i.forEach(o=>n.push(o)),i=[]},use(r){return!this._a&&!QR?i.push(r):n.push(r),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return s}const sC=()=>{};function D0(t,e,n,i=sC){t.push(e);const s=()=>{const r=t.indexOf(e);r>-1&&(t.splice(r,1),i())};return!n&&nf()&&e_(s),s}function Da(t,...e){t.slice().forEach(n=>{n(...e)})}const tL=t=>t(),R0=Symbol(),Ag=Symbol();function Kp(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,i)=>t.set(i,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],s=t[n];jp(s)&&jp(i)&&t.hasOwnProperty(n)&&!Wt(i)&&!Qr(i)?t[n]=Kp(s,i):t[n]=i}return t}const nL=Symbol();function iL(t){return!jp(t)||!t.hasOwnProperty(nL)}const{assign:Nr}=Object;function sL(t){return!!(Wt(t)&&t.effect)}function rL(t,e,n,i){const{state:s,actions:r,getters:o}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=s?s():{});const u=nD(n.state.value[t]);return Nr(u,r,Object.keys(o||{}).reduce((d,h)=>(d[h]=of(be(()=>{pf(n);const f=n._s.get(t);return o[h].call(f,f)})),d),{}))}return l=rC(t,c,e,n,i,!0),l}function rC(t,e,n={},i,s,r){let o;const a=Nr({actions:{}},n),l={deep:!0};let c,u,d=[],h=[],f;const p=i.state.value[t];!r&&!p&&(i.state.value[t]={}),we({});let m;function y(A){let k;c=u=!1,typeof A=="function"?(A(i.state.value[t]),k={type:zc.patchFunction,storeId:t,events:f}):(Kp(i.state.value[t],A),k={type:zc.patchObject,payload:A,storeId:t,events:f});const P=m=Symbol();Rn().then(()=>{m===P&&(c=!0)}),u=!0,Da(d,k,i.state.value[t])}const v=r?function(){const{state:k}=n,P=k?k():{};this.$patch(B=>{Nr(B,P)})}:sC;function b(){o.stop(),d=[],h=[],i._s.delete(t)}const x=(A,k="")=>{if(R0 in A)return A[Ag]=k,A;const P=function(){pf(i);const B=Array.from(arguments),Y=[],ne=[];function $(z){Y.push(z)}function F(z){ne.push(z)}Da(h,{args:B,name:P[Ag],store:w,after:$,onError:F});let D;try{D=A.apply(this&&this.$id===t?this:w,B)}catch(z){throw Da(ne,z),z}return D instanceof Promise?D.then(z=>(Da(Y,z),z)).catch(z=>(Da(ne,z),Promise.reject(z))):(Da(Y,D),D)};return P[R0]=!0,P[Ag]=k,P},E={_p:i,$id:t,$onAction:D0.bind(null,h),$patch:y,$reset:v,$subscribe(A,k={}){const P=D0(d,A,k.detached,()=>B()),B=o.run(()=>un(()=>i.state.value[t],Y=>{(k.flush==="sync"?u:c)&&A({storeId:t,type:zc.direct,events:f},Y)},Nr({},l,k)));return P},$dispose:b},w=Ki(E);i._s.set(t,w);const T=(i._a&&i._a.runWithContext||tL)(()=>i._e.run(()=>(o=Px()).run(()=>e({action:x}))));for(const A in T){const k=T[A];if(Wt(k)&&!sL(k)||Qr(k))r||(p&&iL(k)&&(Wt(k)?k.value=p[A]:Kp(k,p[A])),i.state.value[t][A]=k);else if(typeof k=="function"){const P=x(k,A);T[A]=P,a.actions[A]=k}}return Nr(w,T),Nr(lt(w),T),Object.defineProperty(w,"$state",{get:()=>i.state.value[t],set:A=>{y(k=>{Nr(k,A)})}}),i._p.forEach(A=>{Nr(w,o.run(()=>A({store:w,app:i._a,pinia:i,options:a})))}),p&&r&&n.hydrate&&n.hydrate(w.$state,p),c=!0,u=!0,w}function oC(t,e,n){let i,s;const r=typeof e=="function";typeof t=="string"?(i=t,s=r?n:e):(s=t,i=t.id);function o(a,l){const c=OD();return a=a||(c?us(iC,null):null),a&&pf(a),a=nC,a._s.has(i)||(r?rC(i,e,s,a):rL(i,s,a)),a._s.get(i)}return o.$id=i,o}/*! + */let nC;const pf=t=>nC=t,iC=Symbol();function jp(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var zc;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(zc||(zc={}));function eL(){const t=Px(!0),e=t.run(()=>xe({}));let n=[],i=[];const s=of({install(r){pf(s),s._a=r,r.provide(iC,s),r.config.globalProperties.$pinia=s,i.forEach(o=>n.push(o)),i=[]},use(r){return!this._a&&!QR?i.push(r):n.push(r),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return s}const sC=()=>{};function D0(t,e,n,i=sC){t.push(e);const s=()=>{const r=t.indexOf(e);r>-1&&(t.splice(r,1),i())};return!n&&nf()&&e_(s),s}function Da(t,...e){t.slice().forEach(n=>{n(...e)})}const tL=t=>t(),R0=Symbol(),Ag=Symbol();function Kp(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,i)=>t.set(i,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],s=t[n];jp(s)&&jp(i)&&t.hasOwnProperty(n)&&!Wt(i)&&!Qr(i)?t[n]=Kp(s,i):t[n]=i}return t}const nL=Symbol();function iL(t){return!jp(t)||!t.hasOwnProperty(nL)}const{assign:Nr}=Object;function sL(t){return!!(Wt(t)&&t.effect)}function rL(t,e,n,i){const{state:s,actions:r,getters:o}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=s?s():{});const u=nD(n.state.value[t]);return Nr(u,r,Object.keys(o||{}).reduce((d,h)=>(d[h]=of(be(()=>{pf(n);const f=n._s.get(t);return o[h].call(f,f)})),d),{}))}return l=rC(t,c,e,n,i,!0),l}function rC(t,e,n={},i,s,r){let o;const a=Nr({actions:{}},n),l={deep:!0};let c,u,d=[],h=[],f;const p=i.state.value[t];!r&&!p&&(i.state.value[t]={}),xe({});let m;function y(A){let k;c=u=!1,typeof A=="function"?(A(i.state.value[t]),k={type:zc.patchFunction,storeId:t,events:f}):(Kp(i.state.value[t],A),k={type:zc.patchObject,payload:A,storeId:t,events:f});const P=m=Symbol();Rn().then(()=>{m===P&&(c=!0)}),u=!0,Da(d,k,i.state.value[t])}const v=r?function(){const{state:k}=n,P=k?k():{};this.$patch(B=>{Nr(B,P)})}:sC;function b(){o.stop(),d=[],h=[],i._s.delete(t)}const x=(A,k="")=>{if(R0 in A)return A[Ag]=k,A;const P=function(){pf(i);const B=Array.from(arguments),Y=[],ne=[];function $(z){Y.push(z)}function F(z){ne.push(z)}Da(h,{args:B,name:P[Ag],store:w,after:$,onError:F});let D;try{D=A.apply(this&&this.$id===t?this:w,B)}catch(z){throw Da(ne,z),z}return D instanceof Promise?D.then(z=>(Da(Y,z),z)).catch(z=>(Da(ne,z),Promise.reject(z))):(Da(Y,D),D)};return P[R0]=!0,P[Ag]=k,P},E={_p:i,$id:t,$onAction:D0.bind(null,h),$patch:y,$reset:v,$subscribe(A,k={}){const P=D0(d,A,k.detached,()=>B()),B=o.run(()=>un(()=>i.state.value[t],Y=>{(k.flush==="sync"?u:c)&&A({storeId:t,type:zc.direct,events:f},Y)},Nr({},l,k)));return P},$dispose:b},w=Ki(E);i._s.set(t,w);const T=(i._a&&i._a.runWithContext||tL)(()=>i._e.run(()=>(o=Px()).run(()=>e({action:x}))));for(const A in T){const k=T[A];if(Wt(k)&&!sL(k)||Qr(k))r||(p&&iL(k)&&(Wt(k)?k.value=p[A]:Kp(k,p[A])),i.state.value[t][A]=k);else if(typeof k=="function"){const P=x(k,A);T[A]=P,a.actions[A]=k}}return Nr(w,T),Nr(lt(w),T),Object.defineProperty(w,"$state",{get:()=>i.state.value[t],set:A=>{y(k=>{Nr(k,A)})}}),i._p.forEach(A=>{Nr(w,o.run(()=>A({store:w,app:i._a,pinia:i,options:a})))}),p&&r&&n.hydrate&&n.hydrate(w.$state,p),c=!0,u=!0,w}function oC(t,e,n){let i,s;const r=typeof e=="function";typeof t=="string"?(i=t,s=r?n:e):(s=t,i=t.id);function o(a,l){const c=OD();return a=a||(c?us(iC,null):null),a&&pf(a),a=nC,a._s.has(i)||(r?rC(i,e,s,a):rL(i,s,a)),a._s.get(i)}return o.$id=i,o}/*! * vue-router v4.4.5 * (c) 2024 Eduardo San Martin Morote * @license MIT - */const Ga=typeof document<"u";function aC(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function oL(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&aC(t.default)}const St=Object.assign;function kg(t,e){const n={};for(const i in e){const s=e[i];n[i]=gs(s)?s.map(t):t(s)}return n}const Wc=()=>{},gs=Array.isArray,lC=/#/g,aL=/&/g,lL=/\//g,cL=/=/g,uL=/\?/g,cC=/\+/g,dL=/%5B/g,hL=/%5D/g,uC=/%5E/g,fL=/%60/g,dC=/%7B/g,gL=/%7C/g,hC=/%7D/g,pL=/%20/g;function __(t){return encodeURI(""+t).replace(gL,"|").replace(dL,"[").replace(hL,"]")}function mL(t){return __(t).replace(dC,"{").replace(hC,"}").replace(uC,"^")}function Up(t){return __(t).replace(cC,"%2B").replace(pL,"+").replace(lC,"%23").replace(aL,"%26").replace(fL,"`").replace(dC,"{").replace(hC,"}").replace(uC,"^")}function _L(t){return Up(t).replace(cL,"%3D")}function yL(t){return __(t).replace(lC,"%23").replace(uL,"%3F")}function vL(t){return t==null?"":yL(t).replace(lL,"%2F")}function ou(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const bL=/\/$/,wL=t=>t.replace(bL,"");function Mg(t,e,n="/"){let i,s={},r="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(i=e.slice(0,l),r=e.slice(l+1,a>-1?a:e.length),s=t(r)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=SL(i??e,n),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:ou(o)}}function xL(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function L0(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function EL(t,e,n){const i=e.matched.length-1,s=n.matched.length-1;return i>-1&&i===s&&xl(e.matched[i],n.matched[s])&&fC(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function xl(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function fC(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!CL(t[n],e[n]))return!1;return!0}function CL(t,e){return gs(t)?O0(t,e):gs(e)?O0(e,t):t===e}function O0(t,e){return gs(e)?t.length===e.length&&t.every((n,i)=>n===e[i]):t.length===1&&t[0]===e}function SL(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),i=t.split("/"),s=i[i.length-1];(s===".."||s===".")&&i.push("");let r=n.length-1,o,a;for(o=0;o1&&r--;else break;return n.slice(0,r).join("/")+"/"+i.slice(o).join("/")}const kr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var au;(function(t){t.pop="pop",t.push="push"})(au||(au={}));var Yc;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Yc||(Yc={}));function TL(t){if(!t)if(Ga){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),wL(t)}const AL=/^[^#]+#/;function kL(t,e){return t.replace(AL,"#")+e}function ML(t,e){const n=document.documentElement.getBoundingClientRect(),i=t.getBoundingClientRect();return{behavior:e.behavior,left:i.left-n.left-(e.left||0),top:i.top-n.top-(e.top||0)}}const mf=()=>({left:window.scrollX,top:window.scrollY});function PL(t){let e;if("el"in t){const n=t.el,i=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?i?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;e=ML(s,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function $0(t,e){return(history.state?history.state.position-e:-1)+t}const Gp=new Map;function IL(t,e){Gp.set(t,e)}function DL(t){const e=Gp.get(t);return Gp.delete(t),e}let RL=()=>location.protocol+"//"+location.host;function gC(t,e){const{pathname:n,search:i,hash:s}=e,r=t.indexOf("#");if(r>-1){let a=s.includes(t.slice(r))?t.slice(r).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),L0(l,"")}return L0(n,t)+i+s}function LL(t,e,n,i){let s=[],r=[],o=null;const a=({state:h})=>{const f=gC(t,location),p=n.value,m=e.value;let y=0;if(h){if(n.value=f,e.value=h,o&&o===p){o=null;return}y=m?h.position-m.position:0}else i(f);s.forEach(v=>{v(n.value,p,{delta:y,type:au.pop,direction:y?y>0?Yc.forward:Yc.back:Yc.unknown})})};function l(){o=n.value}function c(h){s.push(h);const f=()=>{const p=s.indexOf(h);p>-1&&s.splice(p,1)};return r.push(f),f}function u(){const{history:h}=window;h.state&&h.replaceState(St({},h.state,{scroll:mf()}),"")}function d(){for(const h of r)h();r=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function N0(t,e,n,i=!1,s=!1){return{back:t,current:e,forward:n,replaced:i,position:window.history.length,scroll:s?mf():null}}function OL(t){const{history:e,location:n}=window,i={value:gC(t,n)},s={value:e.state};s.value||r(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function r(l,c,u){const d=t.indexOf("#"),h=d>-1?(n.host&&document.querySelector("base")?t:t.slice(d))+l:RL()+t+l;try{e[u?"replaceState":"pushState"](c,"",h),s.value=c}catch(f){console.error(f),n[u?"replace":"assign"](h)}}function o(l,c){const u=St({},e.state,N0(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});r(l,u,!0),i.value=l}function a(l,c){const u=St({},s.value,e.state,{forward:l,scroll:mf()});r(u.current,u,!0);const d=St({},N0(i.value,l,null),{position:u.position+1},c);r(l,d,!1),i.value=l}return{location:i,state:s,push:a,replace:o}}function $L(t){t=TL(t);const e=OL(t),n=LL(t,e.state,e.location,e.replace);function i(r,o=!0){o||n.pauseListeners(),history.go(r)}const s=St({location:"",base:t,go:i,createHref:kL.bind(null,t)},e,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function NL(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),$L(t)}function FL(t){return typeof t=="string"||t&&typeof t=="object"}function pC(t){return typeof t=="string"||typeof t=="symbol"}const mC=Symbol("");var F0;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(F0||(F0={}));function El(t,e){return St(new Error,{type:t,[mC]:!0},e)}function Ks(t,e){return t instanceof Error&&mC in t&&(e==null||!!(t.type&e))}const B0="[^/]+?",BL={sensitive:!1,strict:!1,start:!0,end:!0},VL=/[.+*?^${}()[\]/\\]/g;function zL(t,e){const n=St({},BL,e),i=[];let s=n.start?"^":"";const r=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(s+="/");for(let d=0;de.length?e.length===1&&e[0]===80?1:-1:0}function _C(t,e){let n=0;const i=t.score,s=e.score;for(;n0&&e[e.length-1]<0}const YL={type:0,value:""},HL=/[a-zA-Z0-9_]/;function jL(t){if(!t)return[[]];if(t==="/")return[[YL]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(f){throw new Error(`ERR (${n})/"${c}": ${f}`)}let n=0,i=n;const s=[];let r;function o(){r&&s.push(r),r=[]}let a=0,l,c="",u="";function d(){c&&(n===0?r.push({type:0,value:c}):n===1||n===2||n===3?(r.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;a{o(x)}:Wc}function o(d){if(pC(d)){const h=i.get(d);h&&(i.delete(d),n.splice(n.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=n.indexOf(d);h>-1&&(n.splice(h,1),d.record.name&&i.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return n}function l(d){const h=qL(d,n);n.splice(h,0,d),d.record.name&&!Y0(d)&&i.set(d.record.name,d)}function c(d,h){let f,p={},m,y;if("name"in d&&d.name){if(f=i.get(d.name),!f)throw El(1,{location:d});y=f.record.name,p=St(z0(h.params,f.keys.filter(x=>!x.optional).concat(f.parent?f.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),d.params&&z0(d.params,f.keys.map(x=>x.name))),m=f.stringify(p)}else if(d.path!=null)m=d.path,f=n.find(x=>x.re.test(m)),f&&(p=f.parse(m),y=f.record.name);else{if(f=h.name?i.get(h.name):n.find(x=>x.re.test(h.path)),!f)throw El(1,{location:d,currentLocation:h});y=f.record.name,p=St({},h.params,d.params),m=f.stringify(p)}const v=[];let b=f;for(;b;)v.unshift(b.record),b=b.parent;return{name:y,path:m,params:p,matched:v,meta:XL(v)}}t.forEach(d=>r(d));function u(){n.length=0,i.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function z0(t,e){const n={};for(const i of e)i in t&&(n[i]=t[i]);return n}function W0(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:GL(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function GL(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const i in t.components)e[i]=typeof n=="object"?n[i]:n;return e}function Y0(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function XL(t){return t.reduce((e,n)=>St(e,n.meta),{})}function H0(t,e){const n={};for(const i in t)n[i]=i in e?e[i]:t[i];return n}function qL(t,e){let n=0,i=e.length;for(;n!==i;){const r=n+i>>1;_C(t,e[r])<0?i=r:n=r+1}const s=ZL(t);return s&&(i=e.lastIndexOf(s,i-1)),i}function ZL(t){let e=t;for(;e=e.parent;)if(yC(e)&&_C(t,e)===0)return e}function yC({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function JL(t){const e={};if(t===""||t==="?")return e;const i=(t[0]==="?"?t.slice(1):t).split("&");for(let s=0;sr&&Up(r)):[i&&Up(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+n,r!=null&&(e+="="+r))})}return e}function QL(t){const e={};for(const n in t){const i=t[n];i!==void 0&&(e[n]=gs(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const eO=Symbol(""),K0=Symbol(""),y_=Symbol(""),v_=Symbol(""),Xp=Symbol("");function lc(){let t=[];function e(i){return t.push(i),()=>{const s=t.indexOf(i);s>-1&&t.splice(s,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function Yr(t,e,n,i,s,r=o=>o()){const o=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(El(4,{from:n,to:e})):h instanceof Error?l(h):FL(h)?l(El(2,{from:e,to:h})):(o&&i.enterCallbacks[s]===o&&typeof h=="function"&&o.push(h),a())},u=r(()=>t.call(i&&i.instances[s],e,n,c));let d=Promise.resolve(u);t.length<3&&(d=d.then(c)),d.catch(h=>l(h))})}function Pg(t,e,n,i,s=r=>r()){const r=[];for(const o of t)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(aC(l)){const u=(l.__vccOpts||l)[e];u&&r.push(Yr(u,n,i,o,a,s))}else{let c=l();r.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=oL(u)?u.default:u;o.mods[a]=u,o.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&Yr(f,n,i,o,a,s)()}))}}return r}function U0(t){const e=us(y_),n=us(v_),i=be(()=>{const l=J(t.to);return e.resolve(l)}),s=be(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const h=d.findIndex(xl.bind(null,u));if(h>-1)return h;const f=G0(l[c-2]);return c>1&&G0(u)===f&&d[d.length-1].path!==f?d.findIndex(xl.bind(null,l[c-2])):h}),r=be(()=>s.value>-1&&sO(n.params,i.value.params)),o=be(()=>s.value>-1&&s.value===n.matched.length-1&&fC(n.params,i.value.params));function a(l={}){return iO(l)?e[J(t.replace)?"replace":"push"](J(t.to)).catch(Wc):Promise.resolve()}return{route:i,href:be(()=>i.value.href),isActive:r,isExactActive:o,navigate:a}}const tO=hn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:U0,setup(t,{slots:e}){const n=Ki(U0(t)),{options:i}=us(y_),s=be(()=>({[X0(t.activeClass,i.linkActiveClass,"router-link-active")]:n.isActive,[X0(t.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=e.default&&e.default(n);return t.custom?r:ua("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},r)}}}),nO=tO;function iO(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function sO(t,e){for(const n in e){const i=e[n],s=t[n];if(typeof i=="string"){if(i!==s)return!1}else if(!gs(s)||s.length!==i.length||i.some((r,o)=>r!==s[o]))return!1}return!0}function G0(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const X0=(t,e,n)=>t??e??n,rO=hn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const i=us(Xp),s=be(()=>t.route||i.value),r=us(K0,0),o=be(()=>{let c=J(r);const{matched:u}=s.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=be(()=>s.value.matched[o.value]);nh(K0,be(()=>o.value+1)),nh(eO,a),nh(Xp,s);const l=we();return un(()=>[l.value,a.value,t.name],([c,u,d],[h,f,p])=>{u&&(u.instances[d]=c,f&&f!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),c&&u&&(!f||!xl(u,f)||!h)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=s.value,u=t.name,d=a.value,h=d&&d.components[u];if(!h)return q0(n.default,{Component:h,route:c});const f=d.props[u],p=f?f===!0?c.params:typeof f=="function"?f(c):f:null,y=ua(h,St({},p,e,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return q0(n.default,{Component:y,route:c})||y}}});function q0(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const vC=rO;function oO(t){const e=UL(t.routes,t),n=t.parseQuery||JL,i=t.stringifyQuery||j0,s=t.history,r=lc(),o=lc(),a=lc(),l=af(kr);let c=kr;Ga&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=kg.bind(null,L=>""+L),d=kg.bind(null,vL),h=kg.bind(null,ou);function f(L,ae){let de,ve;return pC(L)?(de=e.getRecordMatcher(L),ve=ae):ve=L,e.addRoute(ve,de)}function p(L){const ae=e.getRecordMatcher(L);ae&&e.removeRoute(ae)}function m(){return e.getRoutes().map(L=>L.record)}function y(L){return!!e.getRecordMatcher(L)}function v(L,ae){if(ae=St({},ae||l.value),typeof L=="string"){const O=Mg(n,L,ae.path),K=e.resolve({path:O.path},ae),U=s.createHref(O.fullPath);return St(O,K,{params:h(K.params),hash:ou(O.hash),redirectedFrom:void 0,href:U})}let de;if(L.path!=null)de=St({},L,{path:Mg(n,L.path,ae.path).path});else{const O=St({},L.params);for(const K in O)O[K]==null&&delete O[K];de=St({},L,{params:d(O)}),ae.params=d(ae.params)}const ve=e.resolve(de,ae),W=L.hash||"";ve.params=u(h(ve.params));const fe=xL(i,St({},L,{hash:mL(W),path:ve.path})),C=s.createHref(fe);return St({fullPath:fe,hash:W,query:i===j0?QL(L.query):L.query||{}},ve,{redirectedFrom:void 0,href:C})}function b(L){return typeof L=="string"?Mg(n,L,l.value.path):St({},L)}function x(L,ae){if(c!==L)return El(8,{from:ae,to:L})}function E(L){return T(L)}function w(L){return E(St(b(L),{replace:!0}))}function S(L){const ae=L.matched[L.matched.length-1];if(ae&&ae.redirect){const{redirect:de}=ae;let ve=typeof de=="function"?de(L):de;return typeof ve=="string"&&(ve=ve.includes("?")||ve.includes("#")?ve=b(ve):{path:ve},ve.params={}),St({query:L.query,hash:L.hash,params:ve.path!=null?{}:L.params},ve)}}function T(L,ae){const de=c=v(L),ve=l.value,W=L.state,fe=L.force,C=L.replace===!0,O=S(de);if(O)return T(St(b(O),{state:typeof O=="object"?St({},W,O.state):W,force:fe,replace:C}),ae||de);const K=de;K.redirectedFrom=ae;let U;return!fe&&EL(i,ve,de)&&(U=El(16,{to:K,from:ve}),le(ve,ve,!0,!1)),(U?Promise.resolve(U):P(K,ve)).catch(re=>Ks(re)?Ks(re,2)?re:H(re):X(re,K,ve)).then(re=>{if(re){if(Ks(re,2))return T(St({replace:C},b(re.to),{state:typeof re.to=="object"?St({},W,re.to.state):W,force:fe}),ae||K)}else re=Y(K,ve,!0,C,W);return B(K,ve,re),re})}function A(L,ae){const de=x(L,ae);return de?Promise.reject(de):Promise.resolve()}function k(L){const ae=I.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext(L):L()}function P(L,ae){let de;const[ve,W,fe]=aO(L,ae);de=Pg(ve.reverse(),"beforeRouteLeave",L,ae);for(const O of ve)O.leaveGuards.forEach(K=>{de.push(Yr(K,L,ae))});const C=A.bind(null,L,ae);return de.push(C),ue(de).then(()=>{de=[];for(const O of r.list())de.push(Yr(O,L,ae));return de.push(C),ue(de)}).then(()=>{de=Pg(W,"beforeRouteUpdate",L,ae);for(const O of W)O.updateGuards.forEach(K=>{de.push(Yr(K,L,ae))});return de.push(C),ue(de)}).then(()=>{de=[];for(const O of fe)if(O.beforeEnter)if(gs(O.beforeEnter))for(const K of O.beforeEnter)de.push(Yr(K,L,ae));else de.push(Yr(O.beforeEnter,L,ae));return de.push(C),ue(de)}).then(()=>(L.matched.forEach(O=>O.enterCallbacks={}),de=Pg(fe,"beforeRouteEnter",L,ae,k),de.push(C),ue(de))).then(()=>{de=[];for(const O of o.list())de.push(Yr(O,L,ae));return de.push(C),ue(de)}).catch(O=>Ks(O,8)?O:Promise.reject(O))}function B(L,ae,de){a.list().forEach(ve=>k(()=>ve(L,ae,de)))}function Y(L,ae,de,ve,W){const fe=x(L,ae);if(fe)return fe;const C=ae===kr,O=Ga?history.state:{};de&&(ve||C?s.replace(L.fullPath,St({scroll:C&&O&&O.scroll},W)):s.push(L.fullPath,W)),l.value=L,le(L,ae,de,C),H()}let ne;function $(){ne||(ne=s.listen((L,ae,de)=>{if(!ee.listening)return;const ve=v(L),W=S(ve);if(W){T(St(W,{replace:!0}),ve).catch(Wc);return}c=ve;const fe=l.value;Ga&&IL($0(fe.fullPath,de.delta),mf()),P(ve,fe).catch(C=>Ks(C,12)?C:Ks(C,2)?(T(C.to,ve).then(O=>{Ks(O,20)&&!de.delta&&de.type===au.pop&&s.go(-1,!1)}).catch(Wc),Promise.reject()):(de.delta&&s.go(-de.delta,!1),X(C,ve,fe))).then(C=>{C=C||Y(ve,fe,!1),C&&(de.delta&&!Ks(C,8)?s.go(-de.delta,!1):de.type===au.pop&&Ks(C,20)&&s.go(-1,!1)),B(ve,fe,C)}).catch(Wc)}))}let F=lc(),D=lc(),z;function X(L,ae,de){H(L);const ve=D.list();return ve.length?ve.forEach(W=>W(L,ae,de)):console.error(L),Promise.reject(L)}function Z(){return z&&l.value!==kr?Promise.resolve():new Promise((L,ae)=>{F.add([L,ae])})}function H(L){return z||(z=!L,$(),F.list().forEach(([ae,de])=>L?de(L):ae()),F.reset()),L}function le(L,ae,de,ve){const{scrollBehavior:W}=t;if(!Ga||!W)return Promise.resolve();const fe=!de&&DL($0(L.fullPath,0))||(ve||!de)&&history.state&&history.state.scroll||null;return Rn().then(()=>W(L,ae,fe)).then(C=>C&&PL(C)).catch(C=>X(C,L,ae))}const ie=L=>s.go(L);let te;const I=new Set,ee={currentRoute:l,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:y,getRoutes:m,resolve:v,options:t,push:E,replace:w,go:ie,back:()=>ie(-1),forward:()=>ie(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:D.add,isReady:Z,install(L){const ae=this;L.component("RouterLink",nO),L.component("RouterView",vC),L.config.globalProperties.$router=ae,Object.defineProperty(L.config.globalProperties,"$route",{enumerable:!0,get:()=>J(l)}),Ga&&!te&&l.value===kr&&(te=!0,E(s.location).catch(W=>{}));const de={};for(const W in kr)Object.defineProperty(de,W,{get:()=>l.value[W],enumerable:!0});L.provide(y_,ae),L.provide(v_,jx(de)),L.provide(Xp,l);const ve=L.unmount;I.add(L),L.unmount=function(){I.delete(L),I.size<1&&(c=kr,ne&&ne(),ne=null,l.value=kr,te=!1,z=!1),ve()}}};function ue(L){return L.reduce((ae,de)=>ae.then(()=>k(de)),Promise.resolve())}return ee}function aO(t,e){const n=[],i=[],s=[],r=Math.max(e.matched.length,t.matched.length);for(let o=0;oxl(c,a))?i.push(a):n.push(a));const l=t.matched[o];l&&(e.matched.find(c=>xl(c,l))||s.push(l))}return[n,i,s]}function lO(t){return us(v_)}const cO={getCookie(t){const n=`; ${document.cookie}`.split(`; ${t}=`);if(n.length===2)return n.pop().split(";").shift()}},Z0="[a-fA-F\\d:]",jr=t=>t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${Z0})|(?<=${Z0})(?=\\s|$))`:"",ts="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",mn="[a-fA-F\\d]{1,4}",_f=` + */const Ga=typeof document<"u";function aC(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function oL(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&aC(t.default)}const St=Object.assign;function kg(t,e){const n={};for(const i in e){const s=e[i];n[i]=gs(s)?s.map(t):t(s)}return n}const Wc=()=>{},gs=Array.isArray,lC=/#/g,aL=/&/g,lL=/\//g,cL=/=/g,uL=/\?/g,cC=/\+/g,dL=/%5B/g,hL=/%5D/g,uC=/%5E/g,fL=/%60/g,dC=/%7B/g,gL=/%7C/g,hC=/%7D/g,pL=/%20/g;function __(t){return encodeURI(""+t).replace(gL,"|").replace(dL,"[").replace(hL,"]")}function mL(t){return __(t).replace(dC,"{").replace(hC,"}").replace(uC,"^")}function Up(t){return __(t).replace(cC,"%2B").replace(pL,"+").replace(lC,"%23").replace(aL,"%26").replace(fL,"`").replace(dC,"{").replace(hC,"}").replace(uC,"^")}function _L(t){return Up(t).replace(cL,"%3D")}function yL(t){return __(t).replace(lC,"%23").replace(uL,"%3F")}function vL(t){return t==null?"":yL(t).replace(lL,"%2F")}function ou(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const bL=/\/$/,wL=t=>t.replace(bL,"");function Mg(t,e,n="/"){let i,s={},r="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(i=e.slice(0,l),r=e.slice(l+1,a>-1?a:e.length),s=t(r)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=SL(i??e,n),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:ou(o)}}function xL(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function L0(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function EL(t,e,n){const i=e.matched.length-1,s=n.matched.length-1;return i>-1&&i===s&&xl(e.matched[i],n.matched[s])&&fC(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function xl(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function fC(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!CL(t[n],e[n]))return!1;return!0}function CL(t,e){return gs(t)?O0(t,e):gs(e)?O0(e,t):t===e}function O0(t,e){return gs(e)?t.length===e.length&&t.every((n,i)=>n===e[i]):t.length===1&&t[0]===e}function SL(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),i=t.split("/"),s=i[i.length-1];(s===".."||s===".")&&i.push("");let r=n.length-1,o,a;for(o=0;o1&&r--;else break;return n.slice(0,r).join("/")+"/"+i.slice(o).join("/")}const kr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var au;(function(t){t.pop="pop",t.push="push"})(au||(au={}));var Yc;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Yc||(Yc={}));function TL(t){if(!t)if(Ga){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),wL(t)}const AL=/^[^#]+#/;function kL(t,e){return t.replace(AL,"#")+e}function ML(t,e){const n=document.documentElement.getBoundingClientRect(),i=t.getBoundingClientRect();return{behavior:e.behavior,left:i.left-n.left-(e.left||0),top:i.top-n.top-(e.top||0)}}const mf=()=>({left:window.scrollX,top:window.scrollY});function PL(t){let e;if("el"in t){const n=t.el,i=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?i?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;e=ML(s,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function $0(t,e){return(history.state?history.state.position-e:-1)+t}const Gp=new Map;function IL(t,e){Gp.set(t,e)}function DL(t){const e=Gp.get(t);return Gp.delete(t),e}let RL=()=>location.protocol+"//"+location.host;function gC(t,e){const{pathname:n,search:i,hash:s}=e,r=t.indexOf("#");if(r>-1){let a=s.includes(t.slice(r))?t.slice(r).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),L0(l,"")}return L0(n,t)+i+s}function LL(t,e,n,i){let s=[],r=[],o=null;const a=({state:h})=>{const f=gC(t,location),p=n.value,m=e.value;let y=0;if(h){if(n.value=f,e.value=h,o&&o===p){o=null;return}y=m?h.position-m.position:0}else i(f);s.forEach(v=>{v(n.value,p,{delta:y,type:au.pop,direction:y?y>0?Yc.forward:Yc.back:Yc.unknown})})};function l(){o=n.value}function c(h){s.push(h);const f=()=>{const p=s.indexOf(h);p>-1&&s.splice(p,1)};return r.push(f),f}function u(){const{history:h}=window;h.state&&h.replaceState(St({},h.state,{scroll:mf()}),"")}function d(){for(const h of r)h();r=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function N0(t,e,n,i=!1,s=!1){return{back:t,current:e,forward:n,replaced:i,position:window.history.length,scroll:s?mf():null}}function OL(t){const{history:e,location:n}=window,i={value:gC(t,n)},s={value:e.state};s.value||r(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function r(l,c,u){const d=t.indexOf("#"),h=d>-1?(n.host&&document.querySelector("base")?t:t.slice(d))+l:RL()+t+l;try{e[u?"replaceState":"pushState"](c,"",h),s.value=c}catch(f){console.error(f),n[u?"replace":"assign"](h)}}function o(l,c){const u=St({},e.state,N0(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});r(l,u,!0),i.value=l}function a(l,c){const u=St({},s.value,e.state,{forward:l,scroll:mf()});r(u.current,u,!0);const d=St({},N0(i.value,l,null),{position:u.position+1},c);r(l,d,!1),i.value=l}return{location:i,state:s,push:a,replace:o}}function $L(t){t=TL(t);const e=OL(t),n=LL(t,e.state,e.location,e.replace);function i(r,o=!0){o||n.pauseListeners(),history.go(r)}const s=St({location:"",base:t,go:i,createHref:kL.bind(null,t)},e,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function NL(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),$L(t)}function FL(t){return typeof t=="string"||t&&typeof t=="object"}function pC(t){return typeof t=="string"||typeof t=="symbol"}const mC=Symbol("");var F0;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(F0||(F0={}));function El(t,e){return St(new Error,{type:t,[mC]:!0},e)}function Ks(t,e){return t instanceof Error&&mC in t&&(e==null||!!(t.type&e))}const B0="[^/]+?",BL={sensitive:!1,strict:!1,start:!0,end:!0},VL=/[.+*?^${}()[\]/\\]/g;function zL(t,e){const n=St({},BL,e),i=[];let s=n.start?"^":"";const r=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(s+="/");for(let d=0;de.length?e.length===1&&e[0]===80?1:-1:0}function _C(t,e){let n=0;const i=t.score,s=e.score;for(;n0&&e[e.length-1]<0}const YL={type:0,value:""},HL=/[a-zA-Z0-9_]/;function jL(t){if(!t)return[[]];if(t==="/")return[[YL]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(f){throw new Error(`ERR (${n})/"${c}": ${f}`)}let n=0,i=n;const s=[];let r;function o(){r&&s.push(r),r=[]}let a=0,l,c="",u="";function d(){c&&(n===0?r.push({type:0,value:c}):n===1||n===2||n===3?(r.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;a{o(x)}:Wc}function o(d){if(pC(d)){const h=i.get(d);h&&(i.delete(d),n.splice(n.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=n.indexOf(d);h>-1&&(n.splice(h,1),d.record.name&&i.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return n}function l(d){const h=qL(d,n);n.splice(h,0,d),d.record.name&&!Y0(d)&&i.set(d.record.name,d)}function c(d,h){let f,p={},m,y;if("name"in d&&d.name){if(f=i.get(d.name),!f)throw El(1,{location:d});y=f.record.name,p=St(z0(h.params,f.keys.filter(x=>!x.optional).concat(f.parent?f.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),d.params&&z0(d.params,f.keys.map(x=>x.name))),m=f.stringify(p)}else if(d.path!=null)m=d.path,f=n.find(x=>x.re.test(m)),f&&(p=f.parse(m),y=f.record.name);else{if(f=h.name?i.get(h.name):n.find(x=>x.re.test(h.path)),!f)throw El(1,{location:d,currentLocation:h});y=f.record.name,p=St({},h.params,d.params),m=f.stringify(p)}const v=[];let b=f;for(;b;)v.unshift(b.record),b=b.parent;return{name:y,path:m,params:p,matched:v,meta:XL(v)}}t.forEach(d=>r(d));function u(){n.length=0,i.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function z0(t,e){const n={};for(const i of e)i in t&&(n[i]=t[i]);return n}function W0(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:GL(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function GL(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const i in t.components)e[i]=typeof n=="object"?n[i]:n;return e}function Y0(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function XL(t){return t.reduce((e,n)=>St(e,n.meta),{})}function H0(t,e){const n={};for(const i in t)n[i]=i in e?e[i]:t[i];return n}function qL(t,e){let n=0,i=e.length;for(;n!==i;){const r=n+i>>1;_C(t,e[r])<0?i=r:n=r+1}const s=ZL(t);return s&&(i=e.lastIndexOf(s,i-1)),i}function ZL(t){let e=t;for(;e=e.parent;)if(yC(e)&&_C(t,e)===0)return e}function yC({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function JL(t){const e={};if(t===""||t==="?")return e;const i=(t[0]==="?"?t.slice(1):t).split("&");for(let s=0;sr&&Up(r)):[i&&Up(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+n,r!=null&&(e+="="+r))})}return e}function QL(t){const e={};for(const n in t){const i=t[n];i!==void 0&&(e[n]=gs(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const eO=Symbol(""),K0=Symbol(""),y_=Symbol(""),v_=Symbol(""),Xp=Symbol("");function lc(){let t=[];function e(i){return t.push(i),()=>{const s=t.indexOf(i);s>-1&&t.splice(s,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function Yr(t,e,n,i,s,r=o=>o()){const o=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(El(4,{from:n,to:e})):h instanceof Error?l(h):FL(h)?l(El(2,{from:e,to:h})):(o&&i.enterCallbacks[s]===o&&typeof h=="function"&&o.push(h),a())},u=r(()=>t.call(i&&i.instances[s],e,n,c));let d=Promise.resolve(u);t.length<3&&(d=d.then(c)),d.catch(h=>l(h))})}function Pg(t,e,n,i,s=r=>r()){const r=[];for(const o of t)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(aC(l)){const u=(l.__vccOpts||l)[e];u&&r.push(Yr(u,n,i,o,a,s))}else{let c=l();r.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=oL(u)?u.default:u;o.mods[a]=u,o.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&Yr(f,n,i,o,a,s)()}))}}return r}function U0(t){const e=us(y_),n=us(v_),i=be(()=>{const l=J(t.to);return e.resolve(l)}),s=be(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const h=d.findIndex(xl.bind(null,u));if(h>-1)return h;const f=G0(l[c-2]);return c>1&&G0(u)===f&&d[d.length-1].path!==f?d.findIndex(xl.bind(null,l[c-2])):h}),r=be(()=>s.value>-1&&sO(n.params,i.value.params)),o=be(()=>s.value>-1&&s.value===n.matched.length-1&&fC(n.params,i.value.params));function a(l={}){return iO(l)?e[J(t.replace)?"replace":"push"](J(t.to)).catch(Wc):Promise.resolve()}return{route:i,href:be(()=>i.value.href),isActive:r,isExactActive:o,navigate:a}}const tO=hn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:U0,setup(t,{slots:e}){const n=Ki(U0(t)),{options:i}=us(y_),s=be(()=>({[X0(t.activeClass,i.linkActiveClass,"router-link-active")]:n.isActive,[X0(t.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=e.default&&e.default(n);return t.custom?r:ua("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},r)}}}),nO=tO;function iO(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function sO(t,e){for(const n in e){const i=e[n],s=t[n];if(typeof i=="string"){if(i!==s)return!1}else if(!gs(s)||s.length!==i.length||i.some((r,o)=>r!==s[o]))return!1}return!0}function G0(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const X0=(t,e,n)=>t??e??n,rO=hn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const i=us(Xp),s=be(()=>t.route||i.value),r=us(K0,0),o=be(()=>{let c=J(r);const{matched:u}=s.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=be(()=>s.value.matched[o.value]);nh(K0,be(()=>o.value+1)),nh(eO,a),nh(Xp,s);const l=xe();return un(()=>[l.value,a.value,t.name],([c,u,d],[h,f,p])=>{u&&(u.instances[d]=c,f&&f!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),c&&u&&(!f||!xl(u,f)||!h)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=s.value,u=t.name,d=a.value,h=d&&d.components[u];if(!h)return q0(n.default,{Component:h,route:c});const f=d.props[u],p=f?f===!0?c.params:typeof f=="function"?f(c):f:null,y=ua(h,St({},p,e,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return q0(n.default,{Component:y,route:c})||y}}});function q0(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const vC=rO;function oO(t){const e=UL(t.routes,t),n=t.parseQuery||JL,i=t.stringifyQuery||j0,s=t.history,r=lc(),o=lc(),a=lc(),l=af(kr);let c=kr;Ga&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=kg.bind(null,L=>""+L),d=kg.bind(null,vL),h=kg.bind(null,ou);function f(L,ae){let de,ve;return pC(L)?(de=e.getRecordMatcher(L),ve=ae):ve=L,e.addRoute(ve,de)}function p(L){const ae=e.getRecordMatcher(L);ae&&e.removeRoute(ae)}function m(){return e.getRoutes().map(L=>L.record)}function y(L){return!!e.getRecordMatcher(L)}function v(L,ae){if(ae=St({},ae||l.value),typeof L=="string"){const O=Mg(n,L,ae.path),K=e.resolve({path:O.path},ae),U=s.createHref(O.fullPath);return St(O,K,{params:h(K.params),hash:ou(O.hash),redirectedFrom:void 0,href:U})}let de;if(L.path!=null)de=St({},L,{path:Mg(n,L.path,ae.path).path});else{const O=St({},L.params);for(const K in O)O[K]==null&&delete O[K];de=St({},L,{params:d(O)}),ae.params=d(ae.params)}const ve=e.resolve(de,ae),W=L.hash||"";ve.params=u(h(ve.params));const fe=xL(i,St({},L,{hash:mL(W),path:ve.path})),C=s.createHref(fe);return St({fullPath:fe,hash:W,query:i===j0?QL(L.query):L.query||{}},ve,{redirectedFrom:void 0,href:C})}function b(L){return typeof L=="string"?Mg(n,L,l.value.path):St({},L)}function x(L,ae){if(c!==L)return El(8,{from:ae,to:L})}function E(L){return T(L)}function w(L){return E(St(b(L),{replace:!0}))}function S(L){const ae=L.matched[L.matched.length-1];if(ae&&ae.redirect){const{redirect:de}=ae;let ve=typeof de=="function"?de(L):de;return typeof ve=="string"&&(ve=ve.includes("?")||ve.includes("#")?ve=b(ve):{path:ve},ve.params={}),St({query:L.query,hash:L.hash,params:ve.path!=null?{}:L.params},ve)}}function T(L,ae){const de=c=v(L),ve=l.value,W=L.state,fe=L.force,C=L.replace===!0,O=S(de);if(O)return T(St(b(O),{state:typeof O=="object"?St({},W,O.state):W,force:fe,replace:C}),ae||de);const K=de;K.redirectedFrom=ae;let U;return!fe&&EL(i,ve,de)&&(U=El(16,{to:K,from:ve}),le(ve,ve,!0,!1)),(U?Promise.resolve(U):P(K,ve)).catch(re=>Ks(re)?Ks(re,2)?re:H(re):X(re,K,ve)).then(re=>{if(re){if(Ks(re,2))return T(St({replace:C},b(re.to),{state:typeof re.to=="object"?St({},W,re.to.state):W,force:fe}),ae||K)}else re=Y(K,ve,!0,C,W);return B(K,ve,re),re})}function A(L,ae){const de=x(L,ae);return de?Promise.reject(de):Promise.resolve()}function k(L){const ae=I.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext(L):L()}function P(L,ae){let de;const[ve,W,fe]=aO(L,ae);de=Pg(ve.reverse(),"beforeRouteLeave",L,ae);for(const O of ve)O.leaveGuards.forEach(K=>{de.push(Yr(K,L,ae))});const C=A.bind(null,L,ae);return de.push(C),ue(de).then(()=>{de=[];for(const O of r.list())de.push(Yr(O,L,ae));return de.push(C),ue(de)}).then(()=>{de=Pg(W,"beforeRouteUpdate",L,ae);for(const O of W)O.updateGuards.forEach(K=>{de.push(Yr(K,L,ae))});return de.push(C),ue(de)}).then(()=>{de=[];for(const O of fe)if(O.beforeEnter)if(gs(O.beforeEnter))for(const K of O.beforeEnter)de.push(Yr(K,L,ae));else de.push(Yr(O.beforeEnter,L,ae));return de.push(C),ue(de)}).then(()=>(L.matched.forEach(O=>O.enterCallbacks={}),de=Pg(fe,"beforeRouteEnter",L,ae,k),de.push(C),ue(de))).then(()=>{de=[];for(const O of o.list())de.push(Yr(O,L,ae));return de.push(C),ue(de)}).catch(O=>Ks(O,8)?O:Promise.reject(O))}function B(L,ae,de){a.list().forEach(ve=>k(()=>ve(L,ae,de)))}function Y(L,ae,de,ve,W){const fe=x(L,ae);if(fe)return fe;const C=ae===kr,O=Ga?history.state:{};de&&(ve||C?s.replace(L.fullPath,St({scroll:C&&O&&O.scroll},W)):s.push(L.fullPath,W)),l.value=L,le(L,ae,de,C),H()}let ne;function $(){ne||(ne=s.listen((L,ae,de)=>{if(!ee.listening)return;const ve=v(L),W=S(ve);if(W){T(St(W,{replace:!0}),ve).catch(Wc);return}c=ve;const fe=l.value;Ga&&IL($0(fe.fullPath,de.delta),mf()),P(ve,fe).catch(C=>Ks(C,12)?C:Ks(C,2)?(T(C.to,ve).then(O=>{Ks(O,20)&&!de.delta&&de.type===au.pop&&s.go(-1,!1)}).catch(Wc),Promise.reject()):(de.delta&&s.go(-de.delta,!1),X(C,ve,fe))).then(C=>{C=C||Y(ve,fe,!1),C&&(de.delta&&!Ks(C,8)?s.go(-de.delta,!1):de.type===au.pop&&Ks(C,20)&&s.go(-1,!1)),B(ve,fe,C)}).catch(Wc)}))}let F=lc(),D=lc(),z;function X(L,ae,de){H(L);const ve=D.list();return ve.length?ve.forEach(W=>W(L,ae,de)):console.error(L),Promise.reject(L)}function Z(){return z&&l.value!==kr?Promise.resolve():new Promise((L,ae)=>{F.add([L,ae])})}function H(L){return z||(z=!L,$(),F.list().forEach(([ae,de])=>L?de(L):ae()),F.reset()),L}function le(L,ae,de,ve){const{scrollBehavior:W}=t;if(!Ga||!W)return Promise.resolve();const fe=!de&&DL($0(L.fullPath,0))||(ve||!de)&&history.state&&history.state.scroll||null;return Rn().then(()=>W(L,ae,fe)).then(C=>C&&PL(C)).catch(C=>X(C,L,ae))}const ie=L=>s.go(L);let te;const I=new Set,ee={currentRoute:l,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:y,getRoutes:m,resolve:v,options:t,push:E,replace:w,go:ie,back:()=>ie(-1),forward:()=>ie(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:D.add,isReady:Z,install(L){const ae=this;L.component("RouterLink",nO),L.component("RouterView",vC),L.config.globalProperties.$router=ae,Object.defineProperty(L.config.globalProperties,"$route",{enumerable:!0,get:()=>J(l)}),Ga&&!te&&l.value===kr&&(te=!0,E(s.location).catch(W=>{}));const de={};for(const W in kr)Object.defineProperty(de,W,{get:()=>l.value[W],enumerable:!0});L.provide(y_,ae),L.provide(v_,jx(de)),L.provide(Xp,l);const ve=L.unmount;I.add(L),L.unmount=function(){I.delete(L),I.size<1&&(c=kr,ne&&ne(),ne=null,l.value=kr,te=!1,z=!1),ve()}}};function ue(L){return L.reduce((ae,de)=>ae.then(()=>k(de)),Promise.resolve())}return ee}function aO(t,e){const n=[],i=[],s=[],r=Math.max(e.matched.length,t.matched.length);for(let o=0;oxl(c,a))?i.push(a):n.push(a));const l=t.matched[o];l&&(e.matched.find(c=>xl(c,l))||s.push(l))}return[n,i,s]}function lO(t){return us(v_)}const cO={getCookie(t){const n=`; ${document.cookie}`.split(`; ${t}=`);if(n.length===2)return n.pop().split(";").shift()}},Z0="[a-fA-F\\d:]",jr=t=>t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${Z0})|(?<=${Z0})(?=\\s|$))`:"",ts="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",mn="[a-fA-F\\d]{1,4}",_f=` (?: (?:${mn}:){7}(?:${mn}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 (?:${mn}:){6}(?:${ts}|:${mn}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 @@ -37,10 +37,10 @@ (?:${mn}:){1}(?:(?::${mn}){0,4}:${ts}|(?::${mn}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 (?::(?:(?::${mn}){0,5}:${ts}|(?::${mn}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1 -`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),uO=new RegExp(`(?:^${ts}$)|(?:^${_f}$)`),dO=new RegExp(`^${ts}$`),hO=new RegExp(`^${_f}$`),yf=t=>t&&t.exact?uO:new RegExp(`(?:${jr(t)}${ts}${jr(t)})|(?:${jr(t)}${_f}${jr(t)})`,"g");yf.v4=t=>t&&t.exact?dO:new RegExp(`${jr(t)}${ts}${jr(t)}`,"g");yf.v6=t=>t&&t.exact?hO:new RegExp(`${jr(t)}${_f}${jr(t)}`,"g");const bC={exact:!1},wC=`${yf.v4().source}\\/(3[0-2]|[12]?[0-9])`,xC=`${yf.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,fO=new RegExp(`^${wC}$`),gO=new RegExp(`^${xC}$`),pO=({exact:t}=bC)=>t?fO:new RegExp(wC,"g"),mO=({exact:t}=bC)=>t?gO:new RegExp(xC,"g"),EC=pO({exact:!0}),CC=mO({exact:!0}),b_=t=>EC.test(t)?4:CC.test(t)?6:0;b_.v4=t=>EC.test(t);b_.v6=t=>CC.test(t);const At=t=>{const e=tt();if(e.Locale===null)return t;const i=Object.keys(e.Locale).filter(s=>t.match(new RegExp("^"+s+"$","gi"))!==null);return i.length===0||i.length>1?t:t.replace(new RegExp(i[0],"gi"),e.Locale[i[0]])},qn=oC("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",ConfigurationListInterval:void 0,PeerScheduleJobs:{dropdowns:{Field:[{display:At("Total Received"),value:"total_receive",unit:"GB",type:"number"},{display:At("Total Sent"),value:"total_sent",unit:"GB",type:"number"},{display:At("Total Usage"),value:"total_data",unit:"GB",type:"number"},{display:At("Date"),value:"date",type:"date"}],Operator:[{display:At("larger than"),value:"lgt"}],Action:[{display:At("Restrict Peer"),value:"restrict"},{display:At("Delete Peer"),value:"delete"}]}}}),actions:{async getConfigurations(){await Yt("/api/getWireguardConfigurations",{},t=>{t.status&&(this.Configurations=t.data)})},regexCheckIP(t){return/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/.test(t)},checkCIDR(t){return b_(t)!==0},checkWGKeyLength(t){return console.log(t),/^[A-Za-z0-9+/]{43}=?=?$/.test(t)}}}),je=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},_O={name:"localeText",props:{t:""},computed:{getLocaleText(){return At(this.t)}}};function yO(t,e,n,i,s,r){return xe(this.getLocaleText)}const He=je(_O,[["render",yO]]),vO={name:"navbar",components:{LocaleText:He},setup(){const t=qn(),e=tt();return{wireguardConfigurationsStore:t,dashboardConfigurationStore:e}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:""}},mounted(){Yt("/api/getDashboardUpdate",{},t=>{t.status?(t.data&&(this.updateAvailable=!0,this.updateUrl=t.data),this.updateMessage=t.message):(this.updateMessage=At("Failed to check available update"),console.log(`Failed to get update: ${t.message}`))})}},bO=["data-bs-theme"],wO={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},xO={class:"sidebar-sticky"},EO={class:"nav flex-column px-2"},CO={class:"nav-item"},SO={class:"nav-item"},TO={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},AO={class:"nav flex-column px-2"},kO={class:"nav-item"},MO={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},PO={class:"nav flex-column px-2"},IO={class:"nav-item"},DO={class:"nav-item"},RO={class:"nav flex-column px-2"},LO={class:"nav-item"},OO={class:"nav-item",style:{"font-size":"0.8rem"}},$O=["href"],NO={class:"nav-link text-muted rounded-3"},FO={key:1,class:"nav-link text-muted rounded-3"};function BO(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),V("div",{class:Pe(["col-md-3 col-lg-2 d-md-block p-3 navbar-container",{active:this.dashboardConfigurationStore.ShowNavBar}]),"data-bs-theme":i.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[g("nav",wO,[g("div",xO,[e[7]||(e[7]=g("h5",{class:"text-white text-center m-0 py-3 mb-3 btn-brand fw-light"},"WGDashboard",-1)),g("ul",EO,[g("li",CO,[N(a,{class:"nav-link rounded-3",to:"/","exact-active-class":"active"},{default:De(()=>[e[1]||(e[1]=g("i",{class:"bi bi-house me-2"},null,-1)),N(o,{t:"Home"})]),_:1})]),g("li",SO,[N(a,{class:"nav-link rounded-3",to:"/settings","exact-active-class":"active"},{default:De(()=>[e[2]||(e[2]=g("i",{class:"bi bi-gear me-2"},null,-1)),N(o,{t:"Settings"})]),_:1})])]),e[8]||(e[8]=g("hr",{class:"text-body"},null,-1)),g("h6",TO,[e[3]||(e[3]=g("i",{class:"bi bi-body-text me-2"},null,-1)),N(o,{t:"WireGuard Configurations"})]),g("ul",AO,[g("li",kO,[(R(!0),V(Oe,null,Ze(this.wireguardConfigurationsStore.Configurations,l=>(R(),Se(a,{to:"/configuration/"+l.Name+"/peers",class:"nav-link nav-conf-link rounded-3","active-class":"active"},{default:De(()=>[g("span",{class:Pe(["dot me-2",{active:l.Status}])},null,2),Ue(" "+xe(l.Name),1)]),_:2},1032,["to"]))),256))])]),e[9]||(e[9]=g("hr",{class:"text-body"},null,-1)),g("h6",MO,[e[4]||(e[4]=g("i",{class:"bi bi-tools me-2"},null,-1)),N(o,{t:"Tools"})]),g("ul",PO,[g("li",IO,[N(a,{to:"/ping",class:"nav-link rounded-3","active-class":"active"},{default:De(()=>[N(o,{t:"Ping"})]),_:1})]),g("li",DO,[N(a,{to:"/traceroute",class:"nav-link rounded-3","active-class":"active"},{default:De(()=>[N(o,{t:"Traceroute"})]),_:1})])]),e[10]||(e[10]=g("hr",{class:"text-body"},null,-1)),g("ul",RO,[g("li",LO,[g("a",{class:"nav-link text-danger rounded-3",onClick:e[0]||(e[0]=l=>this.dashboardConfigurationStore.signOut()),role:"button",style:{"font-weight":"bold"}},[e[5]||(e[5]=g("i",{class:"bi bi-box-arrow-left me-2"},null,-1)),N(o,{t:"Sign Out"})])]),g("li",OO,[this.updateAvailable?(R(),V("a",{key:0,href:this.updateUrl,class:"text-decoration-none rounded-3",target:"_blank"},[g("small",NO,[N(o,{t:this.updateMessage},null,8,["t"]),e[6]||(e[6]=Ue(" (")),N(o,{t:"Current Version:"}),Ue(" "+xe(i.dashboardConfigurationStore.Configuration.Server.version)+") ",1)])],8,$O)):(R(),V("small",FO,[N(o,{t:this.updateMessage},null,8,["t"]),Ue(" ("+xe(i.dashboardConfigurationStore.Configuration.Server.version)+") ",1)]))])])])])],10,bO)}const VO=je(vO,[["render",BO],["__scopeId","data-v-f9d83f99"]]),zO={name:"message",components:{LocaleText:He},props:{message:Object},mounted(){setTimeout(()=>{this.message.show=!1},5e3)}},WO=["id"],YO={class:"card-body"},HO={class:"fw-bold d-block",style:{"text-transform":"uppercase"}};function jO(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe(["card shadow rounded-3 position-relative mb-2 message ms-auto",{"text-bg-danger":this.message.type==="danger","text-bg-success":this.message.type==="success","text-bg-warning":this.message.type==="warning"}]),id:this.message.id},[g("div",YO,[g("small",HO,[N(o,{t:"FROM "}),Ue(" "+xe(this.message.from),1)]),Ue(" "+xe(this.message.content),1)])],10,WO)}const SC=je(zO,[["render",jO],["__scopeId","data-v-e30054c0"]]),KO={name:"index",components:{Message:SC,Navbar:VO},async setup(){return{dashboardConfigurationStore:tt()}},computed:{getMessages(){return this.dashboardConfigurationStore.Messages.filter(t=>t.show)}}},UO=["data-bs-theme"],GO={class:"row h-100"},XO={class:"col-md-9 ml-sm-auto col-lg-10 px-md-4 overflow-y-scroll mb-0"},qO={class:"messageCentre text-body position-fixed d-flex"};function ZO(t,e,n,i,s,r){const o=Ee("Navbar"),a=Ee("RouterView"),l=Ee("Message");return R(),V("div",{class:"container-fluid flex-grow-1 main","data-bs-theme":this.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[g("div",GO,[N(o),g("main",XO,[(R(),Se(p_,null,{default:De(()=>[N(a,null,{default:De(({Component:c})=>[N($t,{name:"fade2",mode:"out-in"},{default:De(()=>[(R(),Se(ma(c)))]),_:2},1024)]),_:1})]),_:1})),g("div",qO,[N(Ul,{name:"message",tag:"div",class:"position-relative flex-grow-1 d-flex align-items-end"},{default:De(()=>[(R(!0),V(Oe,null,Ze(r.getMessages.slice().reverse(),c=>(R(),Se(l,{message:c,key:c.id},null,8,["message"]))),128))]),_:1})])])])],8,UO)}const JO=je(KO,[["render",ZO],["__scopeId","data-v-a66d22c4"]]);var TC={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Xw,function(){var n=1e3,i=6e4,s=36e5,r="millisecond",o="second",a="minute",l="hour",c="day",u="week",d="month",h="quarter",f="year",p="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var F=["th","st","nd","rd"],D=$%100;return"["+$+(F[(D-20)%10]||F[D]||F[0])+"]"}},x=function($,F,D){var z=String($);return!z||z.length>=F?$:""+Array(F+1-z.length).join(D)+$},E={s:x,z:function($){var F=-$.utcOffset(),D=Math.abs(F),z=Math.floor(D/60),X=D%60;return(F<=0?"+":"-")+x(z,2,"0")+":"+x(X,2,"0")},m:function $(F,D){if(F.date()1)return $(H[0])}else{var le=F.name;S[le]=F,X=le}return!z&&X&&(w=X),X||!z&&w},P=function($,F){if(A($))return $.clone();var D=typeof F=="object"?F:{};return D.date=$,D.args=arguments,new Y(D)},B=E;B.l=k,B.i=A,B.w=function($,F){return P($,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var Y=function(){function $(D){this.$L=k(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[T]=!0}var F=$.prototype;return F.parse=function(D){this.$d=function(z){var X=z.date,Z=z.utc;if(X===null)return new Date(NaN);if(B.u(X))return new Date;if(X instanceof Date)return new Date(X);if(typeof X=="string"&&!/Z$/i.test(X)){var H=X.match(y);if(H){var le=H[2]-1||0,ie=(H[7]||"0").substring(0,3);return Z?new Date(Date.UTC(H[1],le,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ie)):new Date(H[1],le,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ie)}}return new Date(X)}(D),this.init()},F.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},F.$utils=function(){return B},F.isValid=function(){return this.$d.toString()!==m},F.isSame=function(D,z){var X=P(D);return this.startOf(z)<=X&&X<=this.endOf(z)},F.isAfter=function(D,z){return P(D){if(t.status===200)return t.json();throw new Error(t.statusText)}).then(()=>{this.endTime=bi(),this.active=!0}).catch(t=>{this.active=!1,this.errorMsg=t}),this.refreshing=!1)},async connect(){await fetch(`${this.server.host}/api/authenticate`,{headers:{"content-type":"application/json","wg-dashboard-apikey":this.server.apiKey},body:JSON.stringify({host:window.location.hostname}),method:"POST",signal:AbortSignal.timeout(5e3)}).then(t=>t.json()).then(t=>{this.$emit("setActiveServer"),this.$router.push("/")})}},mounted(){this.handshake()},computed:{getHandshakeTime(){return this.startTime&&this.endTime?`${bi().subtract(this.startTime).millisecond()}ms`:this.refreshing?At("Pinging..."):this.errorMsg?this.errorMsg:"N/A"}}},t$={class:"card rounded-3"},n$={class:"card-body"},i$={class:"d-flex gap-3 w-100 remoteServerContainer"},s$={class:"d-flex gap-3 align-items-center flex-grow-1"},r$={class:"d-flex gap-3 align-items-center flex-grow-1"},o$={class:"d-flex gap-2 button-group"},a$={class:"card-footer gap-2 d-flex align-items-center"},l$={key:0,class:"spin ms-auto text-primary-emphasis"};function c$(t,e,n,i,s,r){return R(),V("div",t$,[g("div",n$,[g("div",i$,[g("div",s$,[e[7]||(e[7]=g("i",{class:"bi bi-server"},null,-1)),$e(g("input",{class:"form-control form-control-sm",onBlur:e[0]||(e[0]=o=>this.handshake()),"onUpdate:modelValue":e[1]||(e[1]=o=>this.server.host=o),type:"url"},null,544),[[We,this.server.host]])]),g("div",r$,[e[8]||(e[8]=g("i",{class:"bi bi-key-fill"},null,-1)),$e(g("input",{class:"form-control form-control-sm",onBlur:e[2]||(e[2]=o=>this.handshake()),"onUpdate:modelValue":e[3]||(e[3]=o=>this.server.apiKey=o),type:"text"},null,544),[[We,this.server.apiKey]])]),g("div",o$,[g("button",{onClick:e[4]||(e[4]=o=>this.$emit("delete")),class:"ms-auto btn btn-sm bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle"},e[9]||(e[9]=[g("i",{class:"bi bi-trash"},null,-1)])),g("button",{onClick:e[5]||(e[5]=o=>this.connect()),class:Pe([{disabled:!this.active},"ms-auto btn btn-sm bg-success-subtle text-success-emphasis border-1 border-success-subtle"])},e[10]||(e[10]=[g("i",{class:"bi bi-arrow-right-circle"},null,-1)]),2)])])]),g("div",a$,[g("span",{class:Pe(["dot ms-0 me-2",[this.active?"active":"inactive"]])},null,2),g("small",null,xe(this.getHandshakeTime),1),this.refreshing?(R(),V("div",l$,e[11]||(e[11]=[g("i",{class:"bi bi-arrow-clockwise"},null,-1)]))):(R(),V("a",{key:1,role:"button",onClick:e[6]||(e[6]=o=>this.handshake()),class:"text-primary-emphasis text-decoration-none ms-auto disabled"},e[12]||(e[12]=[g("i",{class:"bi bi-arrow-clockwise me"},null,-1)])))])])}const u$=je(e$,[["render",c$],["__scopeId","data-v-ed7817c7"]]),d$={name:"RemoteServerList",setup(){return{store:tt()}},components:{LocaleText:He,RemoteServer:u$}},h$={class:"w-100 mt-3"},f$={class:"d-flex align-items-center mb-3"},g$={class:"mb-0"},p$={class:"w-100 d-flex gap-3 flex-column p-3 border border-1 border-secondary-subtle rounded-3",style:{height:"400px","overflow-y":"scroll"}},m$={key:0,class:"text-muted m-auto"};function _$(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RemoteServer");return R(),V("div",h$,[g("div",f$,[g("h5",g$,[N(o,{t:"Server List"})]),g("button",{onClick:e[0]||(e[0]=l=>this.store.addCrossServerConfiguration()),class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle shadow-sm ms-auto"},[e[1]||(e[1]=g("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),N(o,{t:"Server"})])]),g("div",p$,[(R(!0),V(Oe,null,Ze(this.store.CrossServerConfiguration.ServerList,(l,c)=>(R(),Se(a,{onSetActiveServer:u=>this.store.setActiveCrossServer(c),onDelete:u=>this.store.deleteCrossServerConfiguration(c),key:c,server:l},null,8,["onSetActiveServer","onDelete","server"]))),128)),Object.keys(this.store.CrossServerConfiguration.ServerList).length===0?(R(),V("h6",m$,[N(o,{t:"Click"}),e[2]||(e[2]=g("i",{class:"bi bi-plus-circle-fill mx-1"},null,-1)),N(o,{t:"to add your server"})])):ce("",!0)])])}const y$=je(d$,[["render",_$]]),v$={name:"signInInput",methods:{GetLocale:At},props:{id:"",data:"",type:"",placeholder:""},computed:{getLocaleText(){return At(this.placeholder)}}},b$=["type","id","name","placeholder"];function w$(t,e,n,i,s,r){return $e((R(),V("input",{type:n.type,"onUpdate:modelValue":e[0]||(e[0]=o=>this.data[this.id]=o),class:"form-control",id:this.id,name:this.id,autocomplete:"on",placeholder:this.getLocaleText,required:""},null,8,b$)),[[QE,this.data[this.id]]])}const x$=je(v$,[["render",w$]]),E$={name:"signInTOTP",methods:{GetLocale:At},props:{data:""},computed:{getLocaleText(){return At("OTP from your authenticator")}}},C$=["placeholder"];function S$(t,e,n,i,s,r){return $e((R(),V("input",{class:"form-control totp",required:"",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code",placeholder:this.getLocaleText,"onUpdate:modelValue":e[0]||(e[0]=o=>this.data.totp=o)},null,8,C$)),[[We,this.data.totp]])}const T$=je(E$,[["render",S$]]),A$={name:"signin",components:{SignInTOTP:T$,SignInInput:x$,LocaleText:He,RemoteServerList:y$,Message:SC},async setup(){const t=tt();let e="dark",n=!1,i;return t.IsElectronApp||await Promise.all([Yt("/api/getDashboardTheme",{},s=>{e=s.data}),Yt("/api/isTotpEnabled",{},s=>{n=s.data}),Yt("/api/getDashboardVersion",{},s=>{i=s.data})]),t.removeActiveCrossServer(),{store:t,theme:e,totpEnabled:n,version:i}},data(){return{data:{username:"",password:"",totp:""},loginError:!1,loginErrorMessage:"",loading:!1}},computed:{getMessages(){return this.store.Messages.filter(t=>t.show)},applyLocale(t){return At(t)}},methods:{GetLocale:At,async auth(){this.data.username&&this.data.password&&(this.totpEnabled&&this.data.totp||!this.totpEnabled)?(this.loading=!0,await xt("/api/authenticate",this.data,t=>{t.status?(this.loginError=!1,this.$refs.signInBtn.classList.add("signedIn"),t.message?this.$router.push("/welcome"):this.store.Redirect!==void 0?this.$router.push(this.store.Redirect):this.$router.push("/")):(this.loginError=!0,this.loginErrorMessage=t.message,document.querySelectorAll("input[required]").forEach(e=>{e.classList.remove("is-valid"),e.classList.add("is-invalid")}),this.loading=!1)})):document.querySelectorAll("input[required]").forEach(t=>{t.value.length===0?(t.classList.remove("is-valid"),t.classList.add("is-invalid")):(t.classList.remove("is-invalid"),t.classList.add("is-valid"))})}}},k$=["data-bs-theme"],M$={class:"login-box m-auto"},P$={class:"m-auto",style:{width:"700px"}},I$={class:"mb-0 text-body"},D$={key:0,class:"alert alert-danger mt-2 mb-0",role:"alert"},R$={class:"form-group text-body"},L$={class:"form-group text-body"},O$={key:0,class:"form-group text-body"},$$={class:"btn btn-lg btn-dark ms-auto mt-4 w-100 d-flex btn-brand signInBtn",ref:"signInBtn"},N$={key:0,class:"d-flex w-100"},F$={key:1,class:"d-flex w-100 align-items-center"},B$={key:3,class:"d-flex mt-3"},V$={class:"form-check form-switch ms-auto"},z$={class:"form-check-label",for:"flexSwitchCheckChecked"},W$={class:"text-muted pb-3 d-block w-100 text-center mt-3"},Y$={class:"messageCentre text-body position-absolute end-0 m-3"};function H$(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("SignInInput"),l=Ee("SignInTOTP"),c=Ee("RemoteServerList"),u=Ee("Message");return R(),V("div",{class:"container-fluid login-container-fluid d-flex main flex-column py-4 text-body",style:{"overflow-y":"scroll"},"data-bs-theme":this.theme},[g("div",M$,[g("div",P$,[g("h4",I$,[N(o,{t:"Welcome to"})]),e[7]||(e[7]=g("span",{class:"dashboardLogo display-3"},[g("strong",null,"WGDashboard")],-1)),s.loginError?(R(),V("div",D$,[N(o,{t:this.loginErrorMessage},null,8,["t"])])):ce("",!0),this.store.CrossServerConfiguration.Enable?(R(),Se(c,{key:2})):(R(),V("form",{key:1,onSubmit:e[0]||(e[0]=d=>{d.preventDefault(),this.auth()})},[g("div",R$,[e[2]||(e[2]=g("label",{for:"username",class:"text-left",style:{"font-size":"1rem"}},[g("i",{class:"bi bi-person-circle"})],-1)),N(a,{id:"username",data:this.data,type:"text",placeholder:"Username"},null,8,["data"])]),g("div",L$,[e[3]||(e[3]=g("label",{for:"password",class:"text-left",style:{"font-size":"1rem"}},[g("i",{class:"bi bi-key-fill"})],-1)),N(a,{id:"password",data:this.data,type:"password",placeholder:"Password"},null,8,["data"])]),i.totpEnabled?(R(),V("div",O$,[e[4]||(e[4]=g("label",{for:"totp",class:"text-left",style:{"font-size":"1rem"}},[g("i",{class:"bi bi-lock-fill"})],-1)),N(l,{data:this.data},null,8,["data"])])):ce("",!0),g("button",$$,[this.loading?(R(),V("span",F$,[N(o,{t:"Signing In..."}),e[6]||(e[6]=g("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},null,-1))])):(R(),V("span",N$,[N(o,{t:"Sign In"}),e[5]||(e[5]=g("i",{class:"ms-auto bi bi-chevron-right"},null,-1))]))],512)],32)),this.store.IsElectronApp?ce("",!0):(R(),V("div",B$,[g("div",V$,[$e(g("input",{"onUpdate:modelValue":e[1]||(e[1]=d=>this.store.CrossServerConfiguration.Enable=d),class:"form-check-input",type:"checkbox",role:"switch",id:"flexSwitchCheckChecked"},null,512),[[Kn,this.store.CrossServerConfiguration.Enable]]),g("label",z$,[N(o,{t:"Access Remote Server"})])])]))])]),g("small",W$,[Ue(" WGDashboard "+xe(this.version)+" | Developed with ❤️ by ",1),e[8]||(e[8]=g("a",{href:"https://github.com/donaldzou",target:"_blank"},[g("strong",null,"Donald Zou")],-1))]),g("div",Y$,[N(Ul,{name:"message",tag:"div",class:"position-relative"},{default:De(()=>[(R(!0),V(Oe,null,Ze(r.getMessages.slice().reverse(),d=>(R(),Se(u,{message:d,key:d.id},null,8,["message"]))),128))]),_:1})])],8,k$)}const j$=je(A$,[["render",H$],["__scopeId","data-v-2fa13e60"]]),K$={name:"configurationCard",components:{LocaleText:He},props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String}},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:tt()}},methods:{toggle(){this.configurationToggling=!0,Yt("/api/toggleWireguardConfiguration/",{configurationName:this.c.Name},t=>{t.status?this.dashboardConfigurationStore.newMessage("Server",`${this.c.Name} ${t.data?"is on":"is off"}`):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.c.Status=t.data,this.configurationToggling=!1})}}},U$={class:"card conf_card rounded-3 shadow text-decoration-none"},G$={class:"mb-0"},X$={class:"card-title mb-0"},q$={class:"card-footer d-flex gap-2 flex-column"},Z$={class:"row"},J$={class:"col-6 col-md-3"},Q$={class:"text-primary-emphasis col-6 col-md-3"},eN={class:"text-success-emphasis col-6 col-md-3"},tN={class:"text-md-end col-6 col-md-3"},nN={class:"d-flex align-items-center gap-2"},iN={class:"text-muted"},sN={style:{"word-break":"keep-all"}},rN={class:"mb-0 d-block d-lg-inline-block"},oN={style:{"line-break":"anywhere"}},aN={class:"form-check form-switch ms-auto"},lN=["for"],cN={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},uN=["disabled","id"];function dN(t,e,n,i,s,r){const o=Ee("RouterLink"),a=Ee("LocaleText");return R(),V("div",U$,[N(o,{to:"/configuration/"+n.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:De(()=>[g("h6",G$,[g("span",{class:Pe(["dot",{active:n.c.Status}])},null,2)]),g("h6",X$,[g("samp",null,xe(n.c.Name),1)]),e[2]||(e[2]=g("h6",{class:"mb-0 ms-auto"},[g("i",{class:"bi bi-chevron-right"})],-1))]),_:1},8,["to"]),g("div",q$,[g("div",Z$,[g("small",J$,[e[3]||(e[3]=g("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),Ue(xe(n.c.DataUsage.Total>0?n.c.DataUsage.Total.toFixed(4):0)+" GB ",1)]),g("small",Q$,[e[4]||(e[4]=g("i",{class:"bi bi-arrow-down me-2"},null,-1)),Ue(xe(n.c.DataUsage.Receive>0?n.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)]),g("small",eN,[e[5]||(e[5]=g("i",{class:"bi bi-arrow-up me-2"},null,-1)),Ue(xe(n.c.DataUsage.Sent>0?n.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)]),g("small",tN,[g("span",{class:Pe(["dot me-2",{active:n.c.ConnectedPeers>0}])},null,2),Ue(xe(n.c.ConnectedPeers)+" ",1),N(a,{t:"Peers"})])]),g("div",nN,[g("small",iN,[g("strong",sN,[N(a,{t:"Public Key"})])]),g("small",rN,[g("samp",oN,xe(n.c.PublicKey),1)]),g("div",aN,[g("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+n.c.PrivateKey},[!n.c.Status&&this.configurationToggling?(R(),Se(a,{key:0,t:"Turning Off..."})):n.c.Status&&this.configurationToggling?(R(),Se(a,{key:1,t:"Turning On..."})):n.c.Status&&!this.configurationToggling?(R(),Se(a,{key:2,t:"On"})):!n.c.Status&&!this.configurationToggling?(R(),Se(a,{key:3,t:"Off"})):ce("",!0),this.configurationToggling?(R(),V("span",cN)):ce("",!0)],8,lN),$e(g("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+n.c.PrivateKey,onChange:e[0]||(e[0]=l=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=l=>n.c.Status=l)},null,40,uN),[[Kn,n.c.Status]])])])])])}const hN=je(K$,[["render",dN]]),fN={name:"configurationList",components:{LocaleText:He,ConfigurationCard:hN},async setup(){return{wireguardConfigurationsStore:qn()}},data(){return{configurationLoaded:!1}},async mounted(){await this.wireguardConfigurationsStore.getConfigurations(),this.configurationLoaded=!0,this.wireguardConfigurationsStore.ConfigurationListInterval=setInterval(()=>{this.wireguardConfigurationsStore.getConfigurations()},1e4)},beforeUnmount(){clearInterval(this.wireguardConfigurationsStore.ConfigurationListInterval)}},gN={class:"mt-md-5 mt-3"},pN={class:"container-md"},mN={class:"d-flex mb-4 configurationListTitle"},_N={class:"text-body d-flex"},yN={key:0},vN={key:0,class:"text-muted"},bN={key:1,class:"d-flex gap-3 flex-column mb-3"};function wN(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink"),l=Ee("ConfigurationCard");return R(),V("div",gN,[g("div",pN,[g("div",mN,[g("h3",_N,[e[0]||(e[0]=g("i",{class:"bi bi-body-text me-2"},null,-1)),g("span",null,[N(o,{t:"WireGuard Configurations"})])]),N(a,{to:"/new_configuration",class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto rounded-3"},{default:De(()=>[e[1]||(e[1]=g("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),N(o,{t:"Configuration"})]),_:1})]),N($t,{name:"fade",mode:"out-in"},{default:De(()=>[this.configurationLoaded?(R(),V("div",yN,[this.wireguardConfigurationsStore.Configurations.length===0?(R(),V("p",vN,[N(o,{t:"You don't have any WireGuard configurations yet. Please check the configuration folder or change it in Settings. By default the folder is /etc/wireguard."})])):(R(),V("div",bN,[(R(!0),V(Oe,null,Ze(this.wireguardConfigurationsStore.Configurations,c=>(R(),Se(l,{key:c.Name,c},null,8,["c"]))),128))]))])):ce("",!0)]),_:1})])])}const xN=je(fN,[["render",wN],["__scopeId","data-v-106e7dee"]]);let Ed;const EN=new Uint8Array(16);function CN(){if(!Ed&&(Ed=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ed))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ed(EN)}const Ln=[];for(let t=0;t<256;++t)Ln.push((t+256).toString(16).slice(1));function SN(t,e=0){return Ln[t[e+0]]+Ln[t[e+1]]+Ln[t[e+2]]+Ln[t[e+3]]+"-"+Ln[t[e+4]]+Ln[t[e+5]]+"-"+Ln[t[e+6]]+Ln[t[e+7]]+"-"+Ln[t[e+8]]+Ln[t[e+9]]+"-"+Ln[t[e+10]]+Ln[t[e+11]]+Ln[t[e+12]]+Ln[t[e+13]]+Ln[t[e+14]]+Ln[t[e+15]]}const TN=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),J0={randomUUID:TN};function Bs(t,e,n){if(J0.randomUUID&&!e&&!t)return J0.randomUUID();t=t||{};const i=t.random||(t.rng||CN)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,SN(i)}const AN={components:{LocaleText:He},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=tt(),e=`input_${Bs()}`;return{store:t,uuid:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Peers[this.targetData]},methods:{async useValidation(){this.changed&&await xt("/api/updateDashboardConfigurationItem",{section:"Peers",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Peers[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message),this.changed=!1,this.updating=!1})}}},kN={class:"form-group mb-2"},MN=["for"],PN=["id","disabled"],IN={class:"invalid-feedback"},DN={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1"};function RN(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",kN,[g("label",{for:this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:this.title},null,8,["t"])])])],8,MN),$e(g("input",{type:"text",class:Pe(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>r.useValidation()),disabled:this.updating},null,42,PN),[[We,this.value]]),g("div",IN,xe(this.invalidFeedback),1),n.warning?(R(),V("div",DN,[g("small",null,[e[3]||(e[3]=g("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),N(o,{t:n.warningText},null,8,["t"])])])):ce("",!0)])}const LN=je(AN,[["render",RN]]),ON=t=>{},$N={name:"accountSettingsInputUsername",components:{LocaleText:He},props:{targetData:String,title:String},setup(){const t=tt(),e=`input_${Bs()}`;return{store:t,uuid:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Account[this.targetData]},methods:{async useValidation(t){this.changed&&(this.updating=!0,await xt("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},e=>{e.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=e.message),this.changed=!1,this.updating=!1}))}}},NN={class:"form-group mb-2"},FN=["for"],BN=["id","disabled"],VN={class:"invalid-feedback"};function zN(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",NN,[g("label",{for:this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:this.title},null,8,["t"])])])],8,FN),$e(g("input",{type:"text",class:Pe(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>r.useValidation()),disabled:this.updating},null,42,BN),[[We,this.value]]),g("div",VN,xe(this.invalidFeedback),1)])}const WN=je($N,[["render",zN]]),YN={name:"accountSettingsInputPassword",components:{LocaleText:He},props:{targetData:String,warning:!1,warningText:""},setup(){const t=tt(),e=`input_${Bs()}`;return{store:t,uuid:e}},data(){return{value:{currentPassword:"",newPassword:"",repeatNewPassword:""},invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0}},methods:{async useValidation(){Object.values(this.value).find(t=>t.length===0)===void 0?this.value.newPassword===this.value.repeatNewPassword?await xt("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.isValid=!1,this.value={currentPassword:"",newPassword:"",repeatNewPassword:""}},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message)}):(this.showInvalidFeedback=!0,this.invalidFeedback="New passwords does not match"):(this.showInvalidFeedback=!0,this.invalidFeedback="Please fill in all required fields.")}},computed:{passwordValid(){return Object.values(this.value).find(t=>t.length===0)===void 0&&this.value.newPassword===this.value.repeatNewPassword}}},HN={class:"d-flex flex-column"},jN={class:"row"},KN={class:"col-sm"},UN={class:"form-group mb-2"},GN=["for"],XN=["id"],qN={key:0,class:"invalid-feedback d-block"},ZN={class:"col-sm"},JN={class:"form-group mb-2"},QN=["for"],e3=["id"],t3={class:"col-sm"},n3={class:"form-group mb-2"},i3=["for"],s3=["id"],r3=["disabled"];function o3(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",HN,[g("div",jN,[g("div",KN,[g("div",UN,[g("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:"Current Password"})])])],8,GN),$e(g("input",{type:"password",class:Pe(["form-control mb-2",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),"onUpdate:modelValue":e[0]||(e[0]=a=>this.value.currentPassword=a),id:"currentPassword_"+this.uuid},null,10,XN),[[We,this.value.currentPassword]]),s.showInvalidFeedback?(R(),V("div",qN,xe(this.invalidFeedback),1)):ce("",!0)])]),g("div",ZN,[g("div",JN,[g("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:"New Password"})])])],8,QN),$e(g("input",{type:"password",class:Pe(["form-control mb-2",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),"onUpdate:modelValue":e[1]||(e[1]=a=>this.value.newPassword=a),id:"newPassword_"+this.uuid},null,10,e3),[[We,this.value.newPassword]])])]),g("div",t3,[g("div",n3,[g("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:"Repeat New Password"})])])],8,i3),$e(g("input",{type:"password",class:Pe(["form-control mb-2",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),"onUpdate:modelValue":e[2]||(e[2]=a=>this.value.repeatNewPassword=a),id:"repeatNewPassword_"+this.uuid},null,10,s3),[[We,this.value.repeatNewPassword]])])])]),g("button",{disabled:!this.passwordValid,class:"ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",onClick:e[3]||(e[3]=a=>this.useValidation())},[e[4]||(e[4]=g("i",{class:"bi bi-save2-fill me-2"},null,-1)),N(o,{t:"Update Password"})],8,r3)])}const a3=je(YN,[["render",o3]]),l3={name:"dashboardSettingsInputWireguardConfigurationPath",components:{LocaleText:He},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=tt(),e=qn(),n=`input_${Bs()}`;return{store:t,uuid:n,WireguardConfigurationStore:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Server[this.targetData]},methods:{async useValidation(){this.changed&&(this.updating=!0,await xt("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3),this.WireguardConfigurationStore.getConfigurations(),this.store.newMessage("Server","WireGuard configuration path saved","success")):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message),this.changed=!1,this.updating=!1}))}}},c3={class:"form-group"},u3=["for"],d3={class:"d-flex gap-2 align-items-start"},h3={class:"flex-grow-1"},f3=["id","disabled"],g3={class:"invalid-feedback fw-bold"},p3=["disabled"],m3={key:0,class:"bi bi-save2-fill"},_3={key:1,class:"spinner-border spinner-border-sm"},y3={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1 mb-2"};function v3(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",c3,[g("label",{for:this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:this.title},null,8,["t"])])])],8,u3),g("div",d3,[g("div",h3,[$e(g("input",{type:"text",class:Pe(["form-control rounded-3",{"is-invalid":this.showInvalidFeedback,"is-valid":this.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),disabled:this.updating},null,42,f3),[[We,this.value]]),g("div",g3,xe(this.invalidFeedback),1)]),g("button",{onClick:e[2]||(e[2]=a=>this.useValidation()),disabled:!this.changed,class:"ms-auto btn rounded-3 border-success-subtle bg-success-subtle text-success-emphasis"},[this.updating?(R(),V("span",_3)):(R(),V("i",m3))],8,p3)]),n.warning?(R(),V("div",y3,[g("small",null,[e[3]||(e[3]=g("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),N(o,{t:n.warningText},null,8,["t"])])])):ce("",!0)])}const b3=je(l3,[["render",v3]]),w3={name:"dashboardTheme",components:{LocaleText:He},setup(){return{dashboardConfigurationStore:tt()}},methods:{async switchTheme(t){await xt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:t},e=>{e.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=t)})}}},x3={class:"card mb-4 shadow rounded-3"},E3={class:"card-header"},C3={class:"card-body d-flex gap-2"};function S3(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",x3,[g("p",E3,[N(o,{t:"Dashboard Theme"})]),g("div",C3,[g("button",{class:Pe(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="light"}]),onClick:e[0]||(e[0]=a=>this.switchTheme("light"))},[e[2]||(e[2]=g("i",{class:"bi bi-sun-fill me-2"},null,-1)),N(o,{t:"Light"})],2),g("button",{class:Pe(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="dark"}]),onClick:e[1]||(e[1]=a=>this.switchTheme("dark"))},[e[3]||(e[3]=g("i",{class:"bi bi-moon-fill me-2"},null,-1)),N(o,{t:"Dark"})],2)])])}const T3=je(w3,[["render",S3]]),A3={name:"dashboardSettingsInputIPAddressAndPort",props:{},setup(){const t=tt(),e=`input_${Bs()}`;return{store:t,uuid:e}},data(){return{app_ip:"",app_port:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.app_ip=this.store.Configuration.Server.app_ip,this.app_port=this.store.Configuration.Server.app_port},methods:{async useValidation(){this.changed&&await xt("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message)})}}},k3={class:"invalid-feedback d-block mt-0"},M3={class:"row"},P3={class:"form-group mb-2 col-sm"},I3=["for"],D3=["id"],R3={class:"form-group col-sm"},L3=["for"],O3=["id"];function $3(t,e,n,i,s,r){return R(),V("div",null,[g("div",k3,xe(this.invalidFeedback),1),g("div",M3,[g("div",P3,[g("label",{for:"app_ip_"+this.uuid,class:"text-muted mb-1"},e[2]||(e[2]=[g("strong",null,[g("small",null,"Dashboard IP Address")],-1)]),8,I3),$e(g("input",{type:"text",class:"form-control mb-2",id:"app_ip_"+this.uuid,"onUpdate:modelValue":e[0]||(e[0]=o=>this.app_ip=o)},null,8,D3),[[We,this.app_ip]]),e[3]||(e[3]=g("div",{class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block"},[g("small",null,[g("i",{class:"bi bi-exclamation-triangle-fill me-2"}),g("code",null,"0.0.0.0"),Ue(" means it can be access by anyone with your server IP Address.")])],-1))]),g("div",R3,[g("label",{for:"app_port_"+this.uuid,class:"text-muted mb-1"},e[4]||(e[4]=[g("strong",null,[g("small",null,"Dashboard Port")],-1)]),8,L3),$e(g("input",{type:"text",class:"form-control mb-2",id:"app_port_"+this.uuid,"onUpdate:modelValue":e[1]||(e[1]=o=>this.app_port=o)},null,8,O3),[[We,this.app_port]])])]),e[5]||(e[5]=g("button",{class:"btn btn-success btn-sm fw-bold rounded-3"},[g("i",{class:"bi bi-floppy-fill me-2"}),Ue("Update Dashboard Settings & Restart ")],-1))])}const N3=je(A3,[["render",$3]]);function Ve(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function _t(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function ss(t,e){const n=Ve(t);return isNaN(e)?_t(t,NaN):(e&&n.setDate(n.getDate()+e),n)}function ds(t,e){const n=Ve(t);if(isNaN(e))return _t(t,NaN);if(!e)return n;const i=n.getDate(),s=_t(t,n.getTime());s.setMonth(n.getMonth()+e+1,0);const r=s.getDate();return i>=r?s:(n.setFullYear(s.getFullYear(),s.getMonth(),i),n)}function AC(t,e){const{years:n=0,months:i=0,weeks:s=0,days:r=0,hours:o=0,minutes:a=0,seconds:l=0}=e,c=Ve(t),u=i||n?ds(c,i+n*12):c,d=r||s?ss(u,r+s*7):u,h=a+o*60,p=(l+h*60)*1e3;return _t(t,d.getTime()+p)}function F3(t,e){const n=+Ve(t);return _t(t,n+e)}const kC=6048e5,B3=864e5,V3=6e4,MC=36e5,z3=1e3;function W3(t,e){return F3(t,e*MC)}let Y3={};function ya(){return Y3}function ps(t,e){const n=ya(),i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=Ve(t),r=s.getDay(),o=(r=s.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function Q0(t){const e=Ve(t);return e.setHours(0,0,0,0),e}function wh(t){const e=Ve(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function IC(t,e){const n=Q0(t),i=Q0(e),s=+n-wh(n),r=+i-wh(i);return Math.round((s-r)/B3)}function H3(t){const e=PC(t),n=_t(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),Cl(n)}function j3(t,e){const n=e*3;return ds(t,n)}function w_(t,e){return ds(t,e*12)}function eb(t,e){const n=Ve(t),i=Ve(e),s=n.getTime()-i.getTime();return s<0?-1:s>0?1:s}function DC(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Hc(t){if(!DC(t)&&typeof t!="number")return!1;const e=Ve(t);return!isNaN(Number(e))}function tb(t){const e=Ve(t);return Math.trunc(e.getMonth()/3)+1}function K3(t,e){const n=Ve(t),i=Ve(e);return n.getFullYear()-i.getFullYear()}function U3(t,e){const n=Ve(t),i=Ve(e),s=eb(n,i),r=Math.abs(K3(n,i));n.setFullYear(1584),i.setFullYear(1584);const o=eb(n,i)===-s,a=s*(r-+o);return a===0?0:a}function RC(t,e){const n=Ve(t.start),i=Ve(t.end);let s=+n>+i;const r=s?+n:+i,o=s?i:n;o.setHours(0,0,0,0);let a=1;const l=[];for(;+o<=r;)l.push(Ve(o)),o.setDate(o.getDate()+a),o.setHours(0,0,0,0);return s?l.reverse():l}function Uo(t){const e=Ve(t),n=e.getMonth(),i=n-n%3;return e.setMonth(i,1),e.setHours(0,0,0,0),e}function G3(t,e){const n=Ve(t.start),i=Ve(t.end);let s=+n>+i;const r=s?+Uo(n):+Uo(i);let o=Uo(s?i:n),a=1;const l=[];for(;+o<=r;)l.push(Ve(o)),o=j3(o,a);return s?l.reverse():l}function X3(t){const e=Ve(t);return e.setDate(1),e.setHours(0,0,0,0),e}function LC(t){const e=Ve(t),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}function lu(t){const e=Ve(t),n=_t(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function OC(t,e){const n=ya(),i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=Ve(t),r=s.getDay(),o=(r{let i;const s=q3[t];return typeof s=="string"?i=s:e===1?i=s.one:i=s.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function Ig(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const J3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Q3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},eF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tF={date:Ig({formats:J3,defaultWidth:"full"}),time:Ig({formats:Q3,defaultWidth:"full"}),dateTime:Ig({formats:eF,defaultWidth:"full"})},nF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},iF=(t,e,n,i)=>nF[t];function cc(t){return(e,n)=>{const i=n?.context?String(n.context):"standalone";let s;if(i==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,a=n?.width?String(n.width):o;s=t.formattingValues[a]||t.formattingValues[o]}else{const o=t.defaultWidth,a=n?.width?String(n.width):t.defaultWidth;s=t.values[a]||t.values[o]}const r=t.argumentCallback?t.argumentCallback(e):e;return s[r]}}const sF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},rF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},oF={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},aF={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},lF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},cF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},uF=(t,e)=>{const n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},dF={ordinalNumber:uF,era:cc({values:sF,defaultWidth:"wide"}),quarter:cc({values:rF,defaultWidth:"wide",argumentCallback:t=>t-1}),month:cc({values:oF,defaultWidth:"wide"}),day:cc({values:aF,defaultWidth:"wide"}),dayPeriod:cc({values:lF,defaultWidth:"wide",formattingValues:cF,defaultFormattingWidth:"wide"})};function uc(t){return(e,n={})=>{const i=n.width,s=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],r=e.match(s);if(!r)return null;const o=r[0],a=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?fF(a,d=>d.test(o)):hF(a,d=>d.test(o));let c;c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=e.slice(o.length);return{value:c,rest:u}}}function hF(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function fF(t,e){for(let n=0;n{const i=e.match(t.matchPattern);if(!i)return null;const s=i[0],r=e.match(t.parsePattern);if(!r)return null;let o=t.valueCallback?t.valueCallback(r[0]):r[0];o=n.valueCallback?n.valueCallback(o):o;const a=e.slice(s.length);return{value:o,rest:a}}}const pF=/^(\d+)(th|st|nd|rd)?/i,mF=/\d+/i,_F={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},yF={any:[/^b/i,/^(a|c)/i]},vF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bF={any:[/1/i,/2/i,/3/i,/4/i]},wF={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},xF={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},EF={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},CF={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},SF={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},TF={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},AF={ordinalNumber:gF({matchPattern:pF,parsePattern:mF,valueCallback:t=>parseInt(t,10)}),era:uc({matchPatterns:_F,defaultMatchWidth:"wide",parsePatterns:yF,defaultParseWidth:"any"}),quarter:uc({matchPatterns:vF,defaultMatchWidth:"wide",parsePatterns:bF,defaultParseWidth:"any",valueCallback:t=>t+1}),month:uc({matchPatterns:wF,defaultMatchWidth:"wide",parsePatterns:xF,defaultParseWidth:"any"}),day:uc({matchPatterns:EF,defaultMatchWidth:"wide",parsePatterns:CF,defaultParseWidth:"any"}),dayPeriod:uc({matchPatterns:SF,defaultMatchWidth:"any",parsePatterns:TF,defaultParseWidth:"any"})},$C={code:"en-US",formatDistance:Z3,formatLong:tF,formatRelative:iF,localize:dF,match:AF,options:{weekStartsOn:0,firstWeekContainsDate:1}};function kF(t){const e=Ve(t);return IC(e,lu(e))+1}function x_(t){const e=Ve(t),n=+Cl(e)-+H3(e);return Math.round(n/kC)+1}function E_(t,e){const n=Ve(t),i=n.getFullYear(),s=ya(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,o=_t(t,0);o.setFullYear(i+1,0,r),o.setHours(0,0,0,0);const a=ps(o,e),l=_t(t,0);l.setFullYear(i,0,r),l.setHours(0,0,0,0);const c=ps(l,e);return n.getTime()>=a.getTime()?i+1:n.getTime()>=c.getTime()?i:i-1}function MF(t,e){const n=ya(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=E_(t,e),r=_t(t,0);return r.setFullYear(s,0,i),r.setHours(0,0,0,0),ps(r,e)}function C_(t,e){const n=Ve(t),i=+ps(n,e)-+MF(n,e);return Math.round(i/kC)+1}function Ct(t,e){const n=t<0?"-":"",i=Math.abs(t).toString().padStart(e,"0");return n+i}const Mr={y(t,e){const n=t.getFullYear(),i=n>0?n:1-n;return Ct(e==="yy"?i%100:i,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):Ct(n+1,2)},d(t,e){return Ct(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return Ct(t.getHours()%12||12,e.length)},H(t,e){return Ct(t.getHours(),e.length)},m(t,e){return Ct(t.getMinutes(),e.length)},s(t,e){return Ct(t.getSeconds(),e.length)},S(t,e){const n=e.length,i=t.getMilliseconds(),s=Math.trunc(i*Math.pow(10,n-3));return Ct(s,e.length)}},Ra={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ib={G:function(t,e,n){const i=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const i=t.getFullYear(),s=i>0?i:1-i;return n.ordinalNumber(s,{unit:"year"})}return Mr.y(t,e)},Y:function(t,e,n,i){const s=E_(t,i),r=s>0?s:1-s;if(e==="YY"){const o=r%100;return Ct(o,2)}return e==="Yo"?n.ordinalNumber(r,{unit:"year"}):Ct(r,e.length)},R:function(t,e){const n=PC(t);return Ct(n,e.length)},u:function(t,e){const n=t.getFullYear();return Ct(n,e.length)},Q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return Ct(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return Ct(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n){const i=t.getMonth();switch(e){case"M":case"MM":return Mr.M(t,e);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){const i=t.getMonth();switch(e){case"L":return String(i+1);case"LL":return Ct(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){const s=C_(t,i);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):Ct(s,e.length)},I:function(t,e,n){const i=x_(t);return e==="Io"?n.ordinalNumber(i,{unit:"week"}):Ct(i,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Mr.d(t,e)},D:function(t,e,n){const i=kF(t);return e==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Ct(i,e.length)},E:function(t,e,n){const i=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){const s=t.getDay(),r=(s-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return Ct(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){const s=t.getDay(),r=(s-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return Ct(r,e.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const i=t.getDay(),s=i===0?7:i;switch(e){case"i":return String(s);case"ii":return Ct(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const i=t.getHours();let s;switch(i===12?s=Ra.noon:i===0?s=Ra.midnight:s=i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const i=t.getHours();let s;switch(i>=17?s=Ra.evening:i>=12?s=Ra.afternoon:i>=4?s=Ra.morning:s=Ra.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let i=t.getHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Mr.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Mr.H(t,e)},K:function(t,e,n){const i=t.getHours()%12;return e==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Ct(i,e.length)},k:function(t,e,n){let i=t.getHours();return i===0&&(i=24),e==="ko"?n.ordinalNumber(i,{unit:"hour"}):Ct(i,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Mr.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Mr.s(t,e)},S:function(t,e){return Mr.S(t,e)},X:function(t,e,n){const i=t.getTimezoneOffset();if(i===0)return"Z";switch(e){case"X":return rb(i);case"XXXX":case"XX":return zo(i);case"XXXXX":case"XXX":default:return zo(i,":")}},x:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"x":return rb(i);case"xxxx":case"xx":return zo(i);case"xxxxx":case"xxx":default:return zo(i,":")}},O:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+sb(i,":");case"OOOO":default:return"GMT"+zo(i,":")}},z:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+sb(i,":");case"zzzz":default:return"GMT"+zo(i,":")}},t:function(t,e,n){const i=Math.trunc(t.getTime()/1e3);return Ct(i,e.length)},T:function(t,e,n){const i=t.getTime();return Ct(i,e.length)}};function sb(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),s=Math.trunc(i/60),r=i%60;return r===0?n+String(s):n+String(s)+e+Ct(r,2)}function rb(t,e){return t%60===0?(t>0?"-":"+")+Ct(Math.abs(t)/60,2):zo(t,e)}function zo(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),s=Ct(Math.trunc(i/60),2),r=Ct(i%60,2);return n+s+e+r}const ob=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},NC=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},PF=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],i=n[1],s=n[2];if(!s)return ob(t,e);let r;switch(i){case"P":r=e.dateTime({width:"short"});break;case"PP":r=e.dateTime({width:"medium"});break;case"PPP":r=e.dateTime({width:"long"});break;case"PPPP":default:r=e.dateTime({width:"full"});break}return r.replace("{{date}}",ob(i,e)).replace("{{time}}",NC(s,e))},qp={p:NC,P:PF},IF=/^D+$/,DF=/^Y+$/,RF=["D","DD","YY","YYYY"];function FC(t){return IF.test(t)}function BC(t){return DF.test(t)}function Zp(t,e,n){const i=LF(t,e,n);if(console.warn(i),RF.includes(t))throw new RangeError(i)}function LF(t,e,n){const i=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${i} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const OF=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$F=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,NF=/^'([^]*?)'?$/,FF=/''/g,BF=/[a-zA-Z]/;function Os(t,e,n){const i=ya(),s=n?.locale??i.locale??$C,r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=Ve(t);if(!Hc(a))throw new RangeError("Invalid time value");let l=e.match($F).map(u=>{const d=u[0];if(d==="p"||d==="P"){const h=qp[d];return h(u,s.formatLong)}return u}).join("").match(OF).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:VF(u)};if(ib[d])return{isToken:!0,value:u};if(d.match(BF))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});s.localize.preprocessor&&(l=s.localize.preprocessor(a,l));const c={firstWeekContainsDate:r,weekStartsOn:o,locale:s};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!n?.useAdditionalWeekYearTokens&&BC(d)||!n?.useAdditionalDayOfYearTokens&&FC(d))&&Zp(d,e,String(t));const h=ib[d[0]];return h(a,d,s.localize,c)}).join("")}function VF(t){const e=t.match(NF);return e?e[1].replace(FF,"'"):t}function zF(t){return Ve(t).getDay()}function WF(t){const e=Ve(t),n=e.getFullYear(),i=e.getMonth(),s=_t(t,0);return s.setFullYear(n,i+1,0),s.setHours(0,0,0,0),s.getDate()}function YF(){return Object.assign({},ya())}function yr(t){return Ve(t).getHours()}function HF(t){let n=Ve(t).getDay();return n===0&&(n=7),n}function ao(t){return Ve(t).getMinutes()}function at(t){return Ve(t).getMonth()}function Sl(t){return Ve(t).getSeconds()}function Xe(t){return Ve(t).getFullYear()}function Tl(t,e){const n=Ve(t),i=Ve(e);return n.getTime()>i.getTime()}function cu(t,e){const n=Ve(t),i=Ve(e);return+n<+i}function el(t,e){const n=Ve(t),i=Ve(e);return+n==+i}function jF(t,e){const n=e instanceof Date?_t(e,0):new e(0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}const KF=10;class VC{subPriority=0;validate(e,n){return!0}}class UF extends VC{constructor(e,n,i,s,r){super(),this.value=e,this.validateValue=n,this.setValue=i,this.priority=s,r&&(this.subPriority=r)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,i){return this.setValue(e,n,this.value,i)}}class GF extends VC{priority=KF;subPriority=-1;set(e,n){return n.timestampIsSet?e:_t(e,jF(e,Date))}}class vt{run(e,n,i,s){const r=this.parse(e,n,i,s);return r?{setter:new UF(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(e,n,i){return!0}}class XF extends vt{priority=140;parse(e,n,i){switch(n){case"G":case"GG":case"GGG":return i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"});case"GGGGG":return i.era(e,{width:"narrow"});case"GGGG":default:return i.era(e,{width:"wide"})||i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"})}}set(e,n,i){return n.era=i,e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const an={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Cs={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ln(t,e){return t&&{value:e(t.value),rest:t.rest}}function Xt(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function Ss(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const i=n[1]==="+"?1:-1,s=n[2]?parseInt(n[2],10):0,r=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:i*(s*MC+r*V3+o*z3),rest:e.slice(n[0].length)}}function zC(t){return Xt(an.anyDigitsSigned,t)}function sn(t,e){switch(t){case 1:return Xt(an.singleDigit,e);case 2:return Xt(an.twoDigits,e);case 3:return Xt(an.threeDigits,e);case 4:return Xt(an.fourDigits,e);default:return Xt(new RegExp("^\\d{1,"+t+"}"),e)}}function xh(t,e){switch(t){case 1:return Xt(an.singleDigitSigned,e);case 2:return Xt(an.twoDigitsSigned,e);case 3:return Xt(an.threeDigitsSigned,e);case 4:return Xt(an.fourDigitsSigned,e);default:return Xt(new RegExp("^-?\\d{1,"+t+"}"),e)}}function S_(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function WC(t,e){const n=e>0,i=n?e:1-e;let s;if(i<=50)s=t||100;else{const r=i+50,o=Math.trunc(r/100)*100,a=t>=r%100;s=t+o-(a?100:0)}return n?s:1-s}function YC(t){return t%400===0||t%4===0&&t%100!==0}class qF extends vt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,n,i){const s=r=>({year:r,isTwoDigitYear:n==="yy"});switch(n){case"y":return ln(sn(4,e),s);case"yo":return ln(i.ordinalNumber(e,{unit:"year"}),s);default:return ln(sn(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,i){const s=e.getFullYear();if(i.isTwoDigitYear){const o=WC(i.year,s);return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}const r=!("era"in n)||n.era===1?i.year:1-i.year;return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}class ZF extends vt{priority=130;parse(e,n,i){const s=r=>({year:r,isTwoDigitYear:n==="YY"});switch(n){case"Y":return ln(sn(4,e),s);case"Yo":return ln(i.ordinalNumber(e,{unit:"year"}),s);default:return ln(sn(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,i,s){const r=E_(e,s);if(i.isTwoDigitYear){const a=WC(i.year,r);return e.setFullYear(a,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),ps(e,s)}const o=!("era"in n)||n.era===1?i.year:1-i.year;return e.setFullYear(o,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),ps(e,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class JF extends vt{priority=130;parse(e,n){return xh(n==="R"?4:n.length,e)}set(e,n,i){const s=_t(e,0);return s.setFullYear(i,0,4),s.setHours(0,0,0,0),Cl(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class QF extends vt{priority=130;parse(e,n){return xh(n==="u"?4:n.length,e)}set(e,n,i){return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class e5 extends vt{priority=120;parse(e,n,i){switch(n){case"Q":case"QQ":return sn(n.length,e);case"Qo":return i.ordinalNumber(e,{unit:"quarter"});case"QQQ":return i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(e,{width:"wide",context:"formatting"})||i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,i){return e.setMonth((i-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class t5 extends vt{priority=120;parse(e,n,i){switch(n){case"q":case"qq":return sn(n.length,e);case"qo":return i.ordinalNumber(e,{unit:"quarter"});case"qqq":return i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(e,{width:"wide",context:"standalone"})||i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,i){return e.setMonth((i-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class n5 extends vt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,n,i){const s=r=>r-1;switch(n){case"M":return ln(Xt(an.month,e),s);case"MM":return ln(sn(2,e),s);case"Mo":return ln(i.ordinalNumber(e,{unit:"month"}),s);case"MMM":return i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(e,{width:"wide",context:"formatting"})||i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.setMonth(i,1),e.setHours(0,0,0,0),e}}class i5 extends vt{priority=110;parse(e,n,i){const s=r=>r-1;switch(n){case"L":return ln(Xt(an.month,e),s);case"LL":return ln(sn(2,e),s);case"Lo":return ln(i.ordinalNumber(e,{unit:"month"}),s);case"LLL":return i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(e,{width:"wide",context:"standalone"})||i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.setMonth(i,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function s5(t,e,n){const i=Ve(t),s=C_(i,n)-e;return i.setDate(i.getDate()-s*7),i}class r5 extends vt{priority=100;parse(e,n,i){switch(n){case"w":return Xt(an.week,e);case"wo":return i.ordinalNumber(e,{unit:"week"});default:return sn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i,s){return ps(s5(e,i,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function o5(t,e){const n=Ve(t),i=x_(n)-e;return n.setDate(n.getDate()-i*7),n}class a5 extends vt{priority=100;parse(e,n,i){switch(n){case"I":return Xt(an.week,e);case"Io":return i.ordinalNumber(e,{unit:"week"});default:return sn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i){return Cl(o5(e,i))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const l5=[31,28,31,30,31,30,31,31,30,31,30,31],c5=[31,29,31,30,31,30,31,31,30,31,30,31];class u5 extends vt{priority=90;subPriority=1;parse(e,n,i){switch(n){case"d":return Xt(an.date,e);case"do":return i.ordinalNumber(e,{unit:"date"});default:return sn(n.length,e)}}validate(e,n){const i=e.getFullYear(),s=YC(i),r=e.getMonth();return s?n>=1&&n<=c5[r]:n>=1&&n<=l5[r]}set(e,n,i){return e.setDate(i),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class d5 extends vt{priority=90;subpriority=1;parse(e,n,i){switch(n){case"D":case"DD":return Xt(an.dayOfYear,e);case"Do":return i.ordinalNumber(e,{unit:"date"});default:return sn(n.length,e)}}validate(e,n){const i=e.getFullYear();return YC(i)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,i){return e.setMonth(0,i),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function T_(t,e,n){const i=ya(),s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=Ve(t),o=r.getDay(),l=(e%7+7)%7,c=7-s,u=e<0||e>6?e-(o+c)%7:(l+c)%7-(o+c)%7;return ss(r,u)}class h5 extends vt{priority=90;parse(e,n,i){switch(n){case"E":case"EE":case"EEE":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,s){return e=T_(e,i,s),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class f5 extends vt{priority=90;parse(e,n,i,s){const r=o=>{const a=Math.floor((o-1)/7)*7;return(o+s.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return ln(sn(n.length,e),r);case"eo":return ln(i.ordinalNumber(e,{unit:"day"}),r);case"eee":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeeee":return i.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,s){return e=T_(e,i,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class g5 extends vt{priority=90;parse(e,n,i,s){const r=o=>{const a=Math.floor((o-1)/7)*7;return(o+s.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return ln(sn(n.length,e),r);case"co":return ln(i.ordinalNumber(e,{unit:"day"}),r);case"ccc":return i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"ccccc":return i.day(e,{width:"narrow",context:"standalone"});case"cccccc":return i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(e,{width:"wide",context:"standalone"})||i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,s){return e=T_(e,i,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function p5(t,e){const n=Ve(t),i=HF(n),s=e-i;return ss(n,s)}class m5 extends vt{priority=90;parse(e,n,i){const s=r=>r===0?7:r;switch(n){case"i":case"ii":return sn(n.length,e);case"io":return i.ordinalNumber(e,{unit:"day"});case"iii":return ln(i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),s);case"iiiii":return ln(i.day(e,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ln(i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),s);case"iiii":default:return ln(i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),s)}}validate(e,n){return n>=1&&n<=7}set(e,n,i){return e=p5(e,i),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class _5 extends vt{priority=80;parse(e,n,i){switch(n){case"a":case"aa":case"aaa":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(S_(i),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class y5 extends vt{priority=80;parse(e,n,i){switch(n){case"b":case"bb":case"bbb":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(S_(i),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class v5 extends vt{priority=80;parse(e,n,i){switch(n){case"B":case"BB":case"BBB":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(S_(i),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class b5 extends vt{priority=70;parse(e,n,i){switch(n){case"h":return Xt(an.hour12h,e);case"ho":return i.ordinalNumber(e,{unit:"hour"});default:return sn(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,i){const s=e.getHours()>=12;return s&&i<12?e.setHours(i+12,0,0,0):!s&&i===12?e.setHours(0,0,0,0):e.setHours(i,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class w5 extends vt{priority=70;parse(e,n,i){switch(n){case"H":return Xt(an.hour23h,e);case"Ho":return i.ordinalNumber(e,{unit:"hour"});default:return sn(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,i){return e.setHours(i,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class x5 extends vt{priority=70;parse(e,n,i){switch(n){case"K":return Xt(an.hour11h,e);case"Ko":return i.ordinalNumber(e,{unit:"hour"});default:return sn(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.getHours()>=12&&i<12?e.setHours(i+12,0,0,0):e.setHours(i,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class E5 extends vt{priority=70;parse(e,n,i){switch(n){case"k":return Xt(an.hour24h,e);case"ko":return i.ordinalNumber(e,{unit:"hour"});default:return sn(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,i){const s=i<=24?i%24:i;return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class C5 extends vt{priority=60;parse(e,n,i){switch(n){case"m":return Xt(an.minute,e);case"mo":return i.ordinalNumber(e,{unit:"minute"});default:return sn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,i){return e.setMinutes(i,0,0),e}incompatibleTokens=["t","T"]}class S5 extends vt{priority=50;parse(e,n,i){switch(n){case"s":return Xt(an.second,e);case"so":return i.ordinalNumber(e,{unit:"second"});default:return sn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,i){return e.setSeconds(i,0),e}incompatibleTokens=["t","T"]}class T5 extends vt{priority=30;parse(e,n){const i=s=>Math.trunc(s*Math.pow(10,-n.length+3));return ln(sn(n.length,e),i)}set(e,n,i){return e.setMilliseconds(i),e}incompatibleTokens=["t","T"]}class A5 extends vt{priority=10;parse(e,n){switch(n){case"X":return Ss(Cs.basicOptionalMinutes,e);case"XX":return Ss(Cs.basic,e);case"XXXX":return Ss(Cs.basicOptionalSeconds,e);case"XXXXX":return Ss(Cs.extendedOptionalSeconds,e);case"XXX":default:return Ss(Cs.extended,e)}}set(e,n,i){return n.timestampIsSet?e:_t(e,e.getTime()-wh(e)-i)}incompatibleTokens=["t","T","x"]}class k5 extends vt{priority=10;parse(e,n){switch(n){case"x":return Ss(Cs.basicOptionalMinutes,e);case"xx":return Ss(Cs.basic,e);case"xxxx":return Ss(Cs.basicOptionalSeconds,e);case"xxxxx":return Ss(Cs.extendedOptionalSeconds,e);case"xxx":default:return Ss(Cs.extended,e)}}set(e,n,i){return n.timestampIsSet?e:_t(e,e.getTime()-wh(e)-i)}incompatibleTokens=["t","T","X"]}class M5 extends vt{priority=40;parse(e){return zC(e)}set(e,n,i){return[_t(e,i*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class P5 extends vt{priority=20;parse(e){return zC(e)}set(e,n,i){return[_t(e,i),{timestampIsSet:!0}]}incompatibleTokens="*"}const I5={G:new XF,y:new qF,Y:new ZF,R:new JF,u:new QF,Q:new e5,q:new t5,M:new n5,L:new i5,w:new r5,I:new a5,d:new u5,D:new d5,E:new h5,e:new f5,c:new g5,i:new m5,a:new _5,b:new y5,B:new v5,h:new b5,H:new w5,K:new x5,k:new E5,m:new C5,s:new S5,S:new T5,X:new A5,x:new k5,t:new M5,T:new P5},D5=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,R5=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,L5=/^'([^]*?)'?$/,O5=/''/g,$5=/\S/,N5=/[a-zA-Z]/;function Jp(t,e,n,i){const s=YF(),r=i?.locale??s.locale??$C,o=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0;if(e==="")return t===""?Ve(n):_t(n,NaN);const l={firstWeekContainsDate:o,weekStartsOn:a,locale:r},c=[new GF],u=e.match(R5).map(m=>{const y=m[0];if(y in qp){const v=qp[y];return v(m,r.formatLong)}return m}).join("").match(D5),d=[];for(let m of u){!i?.useAdditionalWeekYearTokens&&BC(m)&&Zp(m,e,t),!i?.useAdditionalDayOfYearTokens&&FC(m)&&Zp(m,e,t);const y=m[0],v=I5[y];if(v){const{incompatibleTokens:b}=v;if(Array.isArray(b)){const E=d.find(w=>b.includes(w.token)||w.token===y);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${m}\` at the same time`)}else if(v.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);d.push({token:y,fullToken:m});const x=v.run(t,m,r.match,l);if(!x)return _t(n,NaN);c.push(x.setter),t=x.rest}else{if(y.match(N5))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(m==="''"?m="'":y==="'"&&(m=F5(m)),t.indexOf(m)===0)t=t.slice(m.length);else return _t(n,NaN)}}if(t.length>0&&$5.test(t))return _t(n,NaN);const h=c.map(m=>m.priority).sort((m,y)=>y-m).filter((m,y,v)=>v.indexOf(m)===y).map(m=>c.filter(y=>y.priority===m).sort((y,v)=>v.subPriority-y.subPriority)).map(m=>m[0]);let f=Ve(n);if(isNaN(f.getTime()))return _t(n,NaN);const p={};for(const m of h){if(!m.validate(f,l))return _t(n,NaN);const y=m.set(f,p,l);Array.isArray(y)?(f=y[0],Object.assign(p,y[1])):f=y}return _t(n,f)}function F5(t){return t.match(L5)[1].replace(O5,"'")}function ab(t,e){const n=Uo(t),i=Uo(e);return+n==+i}function B5(t,e){return ss(t,-e)}function HC(t,e){const n=Ve(t),i=n.getFullYear(),s=n.getDate(),r=_t(t,0);r.setFullYear(i,e,15),r.setHours(0,0,0,0);const o=WF(r);return n.setMonth(e,Math.min(s,o)),n}function Pt(t,e){let n=Ve(t);return isNaN(+n)?_t(t,NaN):(e.year!=null&&n.setFullYear(e.year),e.month!=null&&(n=HC(n,e.month)),e.date!=null&&n.setDate(e.date),e.hours!=null&&n.setHours(e.hours),e.minutes!=null&&n.setMinutes(e.minutes),e.seconds!=null&&n.setSeconds(e.seconds),e.milliseconds!=null&&n.setMilliseconds(e.milliseconds),n)}function V5(t,e){const n=Ve(t);return n.setHours(e),n}function jC(t,e){const n=Ve(t);return n.setMilliseconds(e),n}function z5(t,e){const n=Ve(t);return n.setMinutes(e),n}function KC(t,e){const n=Ve(t);return n.setSeconds(e),n}function ks(t,e){const n=Ve(t);return isNaN(+n)?_t(t,NaN):(n.setFullYear(e),n)}function Al(t,e){return ds(t,-e)}function W5(t,e){const{years:n=0,months:i=0,weeks:s=0,days:r=0,hours:o=0,minutes:a=0,seconds:l=0}=e,c=Al(t,i+n*12),u=B5(c,r+s*7),d=a+o*60,f=(l+d*60)*1e3;return _t(t,u.getTime()-f)}function UC(t,e){return w_(t,-e)}function Gl(){const t=AD();return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img",...t},[g("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),g("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),g("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),g("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}Gl.compatConfig={MODE:3};function GC(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),g("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}GC.compatConfig={MODE:3};function A_(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}A_.compatConfig={MODE:3};function k_(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}k_.compatConfig={MODE:3};function M_(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),g("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}M_.compatConfig={MODE:3};function P_(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}P_.compatConfig={MODE:3};function I_(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}I_.compatConfig={MODE:3};const xi=(t,e)=>e?new Date(t.toLocaleString("en-US",{timeZone:e})):new Date(t),D_=(t,e,n)=>Qp(t,e,n)||Ce(),Y5=(t,e,n)=>{const i=e.dateInTz?xi(new Date(t),e.dateInTz):Ce(t);return n?oi(i,!0):i},Qp=(t,e,n)=>{if(!t)return null;const i=n?oi(Ce(t),!0):Ce(t);return e?e.exactMatch?Y5(t,e,n):xi(i,e.timezone):i},H5=t=>{if(!t)return 0;const e=new Date,n=new Date(e.toLocaleString("en-US",{timeZone:"UTC"})),i=new Date(e.toLocaleString("en-US",{timeZone:t})),s=i.getTimezoneOffset()/60;return(+n-+i)/(1e3*60*60)-s};var es=(t=>(t.month="month",t.year="year",t))(es||{}),Wo=(t=>(t.top="top",t.bottom="bottom",t))(Wo||{}),ta=(t=>(t.header="header",t.calendar="calendar",t.timePicker="timePicker",t))(ta||{}),Yn=(t=>(t.month="month",t.year="year",t.calendar="calendar",t.time="time",t.minutes="minutes",t.hours="hours",t.seconds="seconds",t))(Yn||{});const j5=["timestamp","date","iso"];var Jn=(t=>(t.up="up",t.down="down",t.left="left",t.right="right",t))(Jn||{}),Ot=(t=>(t.arrowUp="ArrowUp",t.arrowDown="ArrowDown",t.arrowLeft="ArrowLeft",t.arrowRight="ArrowRight",t.enter="Enter",t.space=" ",t.esc="Escape",t.tab="Tab",t.home="Home",t.end="End",t.pageUp="PageUp",t.pageDown="PageDown",t))(Ot||{});function lb(t){return e=>new Intl.DateTimeFormat(t,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${e}T00:00:00+00:00`)).slice(0,2)}function K5(t){return e=>Os(xi(new Date(`2017-01-0${e}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:t})}const U5=(t,e,n)=>{const i=[1,2,3,4,5,6,7];let s;if(t!==null)try{s=i.map(K5(t))}catch{s=i.map(lb(e))}else s=i.map(lb(e));const r=s.slice(0,n),o=s.slice(n+1,s.length);return[s[n]].concat(...o).concat(...r)},R_=(t,e,n)=>{const i=[];for(let s=+t[0];s<=+t[1];s++)i.push({value:+s,text:JC(s,e)});return n?i.reverse():i},XC=(t,e,n)=>{const i=[1,2,3,4,5,6,7,8,9,10,11,12].map(r=>{const o=r<10?`0${r}`:r;return new Date(`2017-${o}-01T00:00:00+00:00`)});if(t!==null)try{const r=n==="long"?"LLLL":"LLL";return i.map((o,a)=>{const l=Os(xi(o,"UTC"),r,{locale:t});return{text:l.charAt(0).toUpperCase()+l.substring(1),value:a}})}catch{}const s=new Intl.DateTimeFormat(e,{month:n,timeZone:"UTC"});return i.map((r,o)=>{const a=s.format(r);return{text:a.charAt(0).toUpperCase()+a.substring(1),value:o}})},G5=t=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][t],vn=t=>{const e=J(t);return e!=null&&e.$el?e?.$el:e},X5=t=>({type:"dot",...t??{}}),qC=t=>Array.isArray(t)?!!t[0]&&!!t[1]:!1,L_={prop:t=>`"${t}" prop must be enabled!`,dateArr:t=>`You need to use array as "model-value" binding in order to support "${t}"`},An=t=>t,cb=t=>t===0?t:!t||isNaN(+t)?null:+t,ub=t=>t===null,ZC=t=>{if(t)return[...t.querySelectorAll("input, button, select, textarea, a[href]")][0]},q5=t=>{const e=[],n=i=>i.filter(s=>s);for(let i=0;i{const i=n!=null,s=e!=null;if(!i&&!s)return!1;const r=+n,o=+e;return i&&s?+t>r||+tr:s?+tq5(t).map(n=>n.map(i=>{const{active:s,disabled:r,isBetween:o,highlighted:a}=e(i);return{...i,active:s,disabled:r,className:{dp__overlay_cell_active:s,dp__overlay_cell:!s,dp__overlay_cell_disabled:r,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:r&&s,dp__cell_in_between:o,"dp--highlighted":a}}})),eo=(t,e,n=!1)=>{t&&e.allowStopPropagation&&(n&&t.stopImmediatePropagation(),t.stopPropagation())},Z5=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function J5(t,e){let n=[...document.querySelectorAll(Z5())];n=n.filter(s=>!t.contains(s)||s.hasAttribute("data-datepicker-instance"));const i=n.indexOf(t);if(i>=0&&(e?i-1>=0:i+1<=n.length))return n[i+(e?-1:1)]}const em=(t,e)=>t?.querySelector(`[data-dp-element="${e}"]`),JC=(t,e)=>new Intl.NumberFormat(e,{useGrouping:!1,style:"decimal"}).format(t),O_=t=>Os(t,"dd-MM-yyyy"),Dg=t=>Array.isArray(t),Eh=(t,e)=>e.get(O_(t)),Q5=(t,e)=>t?e?e instanceof Map?!!Eh(t,e):e(Ce(t)):!1:!0,ii=(t,e,n=!1,i)=>{if(t.key===Ot.enter||t.key===Ot.space)return n&&t.preventDefault(),e();if(i)return i(t)},db=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].some(t=>navigator.userAgent.includes(t))||navigator.userAgent.includes("Mac")&&"ontouchend"in document,hb=(t,e,n,i,s,r)=>{const o=Jp(t,e.slice(0,t.length),new Date,{locale:r});return Hc(o)&&DC(o)?i||s?o:Pt(o,{hours:+n.hours,minutes:+n?.minutes,seconds:+n?.seconds,milliseconds:0}):null},e4=(t,e,n,i,s,r)=>{const o=Array.isArray(n)?n[0]:n;if(typeof e=="string")return hb(t,e,o,i,s,r);if(Array.isArray(e)){let a=null;for(const l of e)if(a=hb(t,l,o,i,s,r),a)break;return a}return typeof e=="function"?e(t):null},Ce=t=>t?new Date(t):new Date,t4=(t,e,n)=>{if(e){const s=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0"),o=t.getHours().toString().padStart(2,"0"),a=t.getMinutes().toString().padStart(2,"0"),l=n?t.getSeconds().toString().padStart(2,"0"):"00";return`${t.getFullYear()}-${s}-${r}T${o}:${a}:${l}.000Z`}const i=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds());return new Date(i).toISOString()},oi=(t,e)=>{const n=Ce(JSON.parse(JSON.stringify(t))),i=Pt(n,{hours:0,minutes:0,seconds:0,milliseconds:0});return e?X3(i):i},to=(t,e,n,i)=>{let s=t?Ce(t):Ce();return(e||e===0)&&(s=V5(s,+e)),(n||n===0)&&(s=z5(s,+n)),(i||i===0)&&(s=KC(s,+i)),jC(s,0)},Qt=(t,e)=>!t||!e?!1:cu(oi(t),oi(e)),ct=(t,e)=>!t||!e?!1:el(oi(t),oi(e)),on=(t,e)=>!t||!e?!1:Tl(oi(t),oi(e)),vf=(t,e,n)=>t!=null&&t[0]&&t!=null&&t[1]?on(n,t[0])&&Qt(n,t[1]):t!=null&&t[0]&&e?on(n,t[0])&&Qt(n,e)||Qt(n,t[0])&&on(n,e):!1,rs=t=>{const e=Pt(new Date(t),{date:1});return oi(e)},Rg=(t,e,n)=>e&&(n||n===0)?Object.fromEntries(["hours","minutes","seconds"].map(i=>i===e?[i,n]:[i,isNaN(+t[i])?void 0:+t[i]])):{hours:isNaN(+t.hours)?void 0:+t.hours,minutes:isNaN(+t.minutes)?void 0:+t.minutes,seconds:isNaN(+t.seconds)?void 0:+t.seconds},na=t=>({hours:yr(t),minutes:ao(t),seconds:Sl(t)}),QC=(t,e)=>{if(e){const n=Xe(Ce(e));if(n>t)return 12;if(n===t)return at(Ce(e))}},eS=(t,e)=>{if(e){const n=Xe(Ce(e));return n{if(t)return Xe(Ce(t))},tS=(t,e)=>{const n=on(t,e)?e:t,i=on(e,t)?e:t;return RC({start:n,end:i})},n4=t=>{const e=ds(t,1);return{month:at(e),year:Xe(e)}},nr=(t,e)=>{const n=ps(t,{weekStartsOn:+e}),i=OC(t,{weekStartsOn:+e});return[n,i]},nS=(t,e)=>{const n={hours:yr(Ce()),minutes:ao(Ce()),seconds:e?Sl(Ce()):0};return Object.assign(n,t)},Kr=(t,e,n)=>[Pt(Ce(t),{date:1}),Pt(Ce(),{month:e,year:n,date:1})],ar=(t,e,n)=>{let i=t?Ce(t):Ce();return(e||e===0)&&(i=HC(i,e)),n&&(i=ks(i,n)),i},iS=(t,e,n,i,s)=>{if(!i||s&&!e||!s&&!n)return!1;const r=s?ds(t,1):Al(t,1),o=[at(r),Xe(r)];return s?!s4(...o,e):!i4(...o,n)},i4=(t,e,n)=>Qt(...Kr(n,t,e))||ct(...Kr(n,t,e)),s4=(t,e,n)=>on(...Kr(n,t,e))||ct(...Kr(n,t,e)),sS=(t,e,n,i,s,r,o)=>{if(typeof e=="function"&&!o)return e(t);const a=n?{locale:n}:void 0;return Array.isArray(t)?`${Os(t[0],r,a)}${s&&!t[1]?"":i}${t[1]?Os(t[1],r,a):""}`:Os(t,r,a)},La=t=>{if(t)return null;throw new Error(L_.prop("partial-range"))},Cd=(t,e)=>{if(e)return t();throw new Error(L_.prop("range"))},tm=t=>Array.isArray(t)?Hc(t[0])&&(t[1]?Hc(t[1]):!0):t?Hc(t):!1,r4=(t,e)=>Pt(e??Ce(),{hours:+t.hours||0,minutes:+t.minutes||0,seconds:+t.seconds||0}),Lg=(t,e,n,i)=>{if(!t)return!0;if(i){const s=n==="max"?cu(t,e):Tl(t,e),r={seconds:0,milliseconds:0};return s||el(Pt(t,r),Pt(e,r))}return n==="max"?t.getTime()<=e.getTime():t.getTime()>=e.getTime()},Og=(t,e,n)=>t?r4(t,e):Ce(n??e),fb=(t,e,n,i,s)=>{if(Array.isArray(i)){const o=Og(t,i[0],e),a=Og(t,i[1],e);return Lg(i[0],o,n,!!e)&&Lg(i[1],a,n,!!e)&&s}const r=Og(t,i,e);return Lg(i,r,n,!!e)&&s},$g=t=>Pt(Ce(),na(t)),o4=(t,e)=>t instanceof Map?Array.from(t.values()).filter(n=>Xe(Ce(n))===e).map(n=>at(n)):[],rS=(t,e,n)=>typeof t=="function"?t({month:e,year:n}):!!t.months.find(i=>i.month===e&&i.year===n),$_=(t,e)=>typeof t=="function"?t(e):t.years.includes(e),oS=t=>Os(t,"yyyy-MM-dd"),dc=Ki({menuFocused:!1,shiftKeyInMenu:!1}),aS=()=>{const t=n=>{dc.menuFocused=n},e=n=>{dc.shiftKeyInMenu!==n&&(dc.shiftKeyInMenu=n)};return{control:be(()=>({shiftKeyInMenu:dc.shiftKeyInMenu,menuFocused:dc.menuFocused})),setMenuFocused:t,setShiftKey:e}},Lt=Ki({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),Ng=we(null),Sd=we(!1),Fg=we(!1),Bg=we(!1),Vg=we(!1),Bn=we(0),rn=we(0),_o=()=>{const t=be(()=>Sd.value?[...Lt.selectionGrid,Lt.actionRow].filter(d=>d.length):Fg.value?[...Lt.timePicker[0],...Lt.timePicker[1],Vg.value?[]:[Ng.value],Lt.actionRow].filter(d=>d.length):Bg.value?[...Lt.monthPicker,Lt.actionRow]:[Lt.monthYear,...Lt.calendar,Lt.time,Lt.actionRow].filter(d=>d.length)),e=d=>{Bn.value=d?Bn.value+1:Bn.value-1;let h=null;t.value[rn.value]&&(h=t.value[rn.value][Bn.value]),!h&&t.value[rn.value+(d?1:-1)]?(rn.value=rn.value+(d?1:-1),Bn.value=d?0:t.value[rn.value].length-1):h||(Bn.value=d?Bn.value-1:Bn.value+1)},n=d=>{rn.value===0&&!d||rn.value===t.value.length&&d||(rn.value=d?rn.value+1:rn.value-1,t.value[rn.value]?t.value[rn.value]&&!t.value[rn.value][Bn.value]&&Bn.value!==0&&(Bn.value=t.value[rn.value].length-1):rn.value=d?rn.value-1:rn.value+1)},i=d=>{let h=null;t.value[rn.value]&&(h=t.value[rn.value][Bn.value]),h?h.focus({preventScroll:!Sd.value}):Bn.value=d?Bn.value-1:Bn.value+1},s=()=>{e(!0),i(!0)},r=()=>{e(!1),i(!1)},o=()=>{n(!1),i(!0)},a=()=>{n(!0),i(!0)},l=(d,h)=>{Lt[h]=d},c=(d,h)=>{Lt[h]=d},u=()=>{Bn.value=0,rn.value=0};return{buildMatrix:l,buildMultiLevelMatrix:c,setTimePickerBackRef:d=>{Ng.value=d},setSelectionGrid:d=>{Sd.value=d,u(),d||(Lt.selectionGrid=[])},setTimePicker:(d,h=!1)=>{Fg.value=d,Vg.value=h,u(),d||(Lt.timePicker[0]=[],Lt.timePicker[1]=[])},setTimePickerElements:(d,h=0)=>{Lt.timePicker[h]=d},arrowRight:s,arrowLeft:r,arrowUp:o,arrowDown:a,clearArrowNav:()=>{Lt.monthYear=[],Lt.calendar=[],Lt.time=[],Lt.actionRow=[],Lt.selectionGrid=[],Lt.timePicker[0]=[],Lt.timePicker[1]=[],Sd.value=!1,Fg.value=!1,Vg.value=!1,Bg.value=!1,u(),Ng.value=null},setMonthPicker:d=>{Bg.value=d,u()},refSets:Lt}},gb=t=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...t??{}}),a4=t=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:e=>`Increment ${e}`,decrementValue:e=>`Decrement ${e}`,openTpOverlay:e=>`Open ${e} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,clearInput:"Clear value",calendarIcon:"Calendar icon",timePicker:"Time picker",monthPicker:e=>`Month picker${e?" overlay":""}`,yearPicker:e=>`Year picker${e?" overlay":""}`,timeOverlay:e=>`${e} overlay`,...t??{}}),pb=t=>t?typeof t=="boolean"?t?2:0:+t>=2?+t:2:0,l4=t=>{const e=typeof t=="object"&&t,n={static:!0,solo:!1};if(!t)return{...n,count:pb(!1)};const i=e?t:{},s=e?i.count??!0:t,r=pb(s);return Object.assign(n,i,{count:r})},c4=(t,e,n)=>t||(typeof n=="string"?n:e),u4=t=>typeof t=="boolean"?t?gb({}):!1:gb(t),d4=t=>{const e={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - "};return typeof t=="object"?{...e,...t??{},enabled:!0}:{...e,enabled:t}},h4=t=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...t??{}}),f4=t=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...t??{}}),g4=t=>{const e={input:!1};return typeof t=="object"?{...e,...t??{},enabled:!0}:{enabled:t,...e}},p4=t=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,shadowDom:!1,...t??{}}),m4=t=>{const e={dates:Array.isArray(t)?t.map(n=>Ce(n)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof t=="function"?t:{...e,...t??{}}},_4=t=>typeof t=="object"?{type:t?.type??"local",hideOnOffsetDates:t?.hideOnOffsetDates??!1}:{type:t,hideOnOffsetDates:!1},y4=t=>{const e={noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1};return typeof t=="object"?{enabled:!0,...e,...t}:{enabled:t,...e}},v4=t=>t?typeof t=="string"?{timezone:t,exactMatch:!1,dateInTz:void 0,emitTimezone:void 0,convertModel:!0}:{timezone:t.timezone,exactMatch:t.exactMatch??!1,dateInTz:t.dateInTz??void 0,emitTimezone:t.emitTimezone??void 0,convertModel:t.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:void 0},zg=(t,e,n)=>new Map(t.map(i=>{const s=D_(i,e,n);return[O_(s),s]})),b4=(t,e)=>t.length?new Map(t.map(n=>{const i=D_(n.date,e);return[O_(i),n]})):null,w4=t=>{var e;return{minDate:Qp(t.minDate,t.timezone,t.isSpecific),maxDate:Qp(t.maxDate,t.timezone,t.isSpecific),disabledDates:Dg(t.disabledDates)?zg(t.disabledDates,t.timezone,t.isSpecific):t.disabledDates,allowedDates:Dg(t.allowedDates)?zg(t.allowedDates,t.timezone,t.isSpecific):null,highlight:typeof t.highlight=="object"&&Dg((e=t.highlight)==null?void 0:e.dates)?zg(t.highlight.dates,t.timezone):t.highlight,markers:b4(t.markers,t.timezone)}},x4=t=>typeof t=="boolean"?{enabled:t,dragSelect:!0,limit:null}:{enabled:!!t,limit:t.limit?+t.limit:null,dragSelect:t.dragSelect??!0},E4=t=>({...Object.fromEntries(Object.keys(t).map(e=>{const n=e,i=t[n],s=typeof t[n]=="string"?{[i]:!0}:Object.fromEntries(i.map(r=>[r,!0]));return[e,s]}))}),jt=t=>{const e=()=>{const S=t.enableSeconds?":ss":"",T=t.enableMinutes?":mm":"";return t.is24?`HH${T}${S}`:`hh${T}${S} aa`},n=()=>{var S;return t.format?t.format:t.monthPicker?"MM/yyyy":t.timePicker?e():t.weekPicker?`${((S=y.value)==null?void 0:S.type)==="iso"?"RR":"ww"}-yyyy`:t.yearPicker?"yyyy":t.quarterPicker?"QQQ/yyyy":t.enableTimePicker?`MM/dd/yyyy, ${e()}`:"MM/dd/yyyy"},i=S=>nS(S,t.enableSeconds),s=()=>E.value.enabled?t.startTime&&Array.isArray(t.startTime)?[i(t.startTime[0]),i(t.startTime[1])]:null:t.startTime&&!Array.isArray(t.startTime)?i(t.startTime):null,r=be(()=>l4(t.multiCalendars)),o=be(()=>s()),a=be(()=>a4(t.ariaLabels)),l=be(()=>h4(t.filters)),c=be(()=>u4(t.transitions)),u=be(()=>f4(t.actionRow)),d=be(()=>c4(t.previewFormat,t.format,n())),h=be(()=>d4(t.textInput)),f=be(()=>g4(t.inline)),p=be(()=>p4(t.config)),m=be(()=>m4(t.highlight)),y=be(()=>_4(t.weekNumbers)),v=be(()=>v4(t.timezone)),b=be(()=>x4(t.multiDates)),x=be(()=>w4({minDate:t.minDate,maxDate:t.maxDate,disabledDates:t.disabledDates,allowedDates:t.allowedDates,highlight:m.value,markers:t.markers,timezone:v.value,isSpecific:t.monthPicker||t.yearPicker||t.quarterPicker})),E=be(()=>y4(t.range)),w=be(()=>E4(t.ui));return{defaultedTransitions:c,defaultedMultiCalendars:r,defaultedStartTime:o,defaultedAriaLabels:a,defaultedFilters:l,defaultedActionRow:u,defaultedPreviewFormat:d,defaultedTextInput:h,defaultedInline:f,defaultedConfig:p,defaultedHighlight:m,defaultedWeekNumbers:y,defaultedRange:E,propDates:x,defaultedTz:v,defaultedMultiDates:b,defaultedUI:w,getDefaultPattern:n,getDefaultStartTime:s}},C4=(t,e,n)=>{const i=we(),{defaultedTextInput:s,defaultedRange:r,defaultedTz:o,defaultedMultiDates:a,getDefaultPattern:l}=jt(e),c=we(""),u=tu(e,"format"),d=tu(e,"formatLocale");un(i,()=>{typeof e.onInternalModelChange=="function"&&t("internal-model-change",i.value,ue(!0))},{deep:!0}),un(r,(L,ae)=>{L.enabled!==ae.enabled&&(i.value=null)}),un(u,()=>{X()});const h=L=>o.value.timezone&&o.value.convertModel?xi(L,o.value.timezone):L,f=L=>{if(o.value.timezone&&o.value.convertModel){const ae=H5(o.value.timezone);return W3(L,ae)}return L},p=(L,ae,de=!1)=>sS(L,e.format,e.formatLocale,s.value.rangeSeparator,e.modelAuto,ae??l(),de),m=L=>L?e.modelType?H(L):{hours:yr(L),minutes:ao(L),seconds:e.enableSeconds?Sl(L):0}:null,y=L=>e.modelType?H(L):{month:at(L),year:Xe(L)},v=L=>Array.isArray(L)?a.value.enabled?L.map(ae=>b(ae,ks(Ce(),ae))):Cd(()=>[ks(Ce(),L[0]),L[1]?ks(Ce(),L[1]):La(r.value.partialRange)],r.value.enabled):ks(Ce(),+L),b=(L,ae)=>(typeof L=="string"||typeof L=="number")&&e.modelType?Z(L):ae,x=L=>Array.isArray(L)?[b(L[0],to(null,+L[0].hours,+L[0].minutes,L[0].seconds)),b(L[1],to(null,+L[1].hours,+L[1].minutes,L[1].seconds))]:b(L,to(null,L.hours,L.minutes,L.seconds)),E=L=>{const ae=Pt(Ce(),{date:1});return Array.isArray(L)?a.value.enabled?L.map(de=>b(de,ar(ae,+de.month,+de.year))):Cd(()=>[b(L[0],ar(ae,+L[0].month,+L[0].year)),b(L[1],L[1]?ar(ae,+L[1].month,+L[1].year):La(r.value.partialRange))],r.value.enabled):b(L,ar(ae,+L.month,+L.year))},w=L=>{if(Array.isArray(L))return L.map(ae=>Z(ae));throw new Error(L_.dateArr("multi-dates"))},S=L=>{if(Array.isArray(L)&&r.value.enabled){const ae=L[0],de=L[1];return[Ce(Array.isArray(ae)?ae[0]:null),Array.isArray(de)&&de.length?Ce(de[0]):null]}return Ce(L[0])},T=L=>e.modelAuto?Array.isArray(L)?[Z(L[0]),Z(L[1])]:e.autoApply?[Z(L)]:[Z(L),null]:Array.isArray(L)?Cd(()=>L[1]?[Z(L[0]),L[1]?Z(L[1]):La(r.value.partialRange)]:[Z(L[0])],r.value.enabled):Z(L),A=()=>{Array.isArray(i.value)&&r.value.enabled&&i.value.length===1&&i.value.push(La(r.value.partialRange))},k=()=>{const L=i.value;return[H(L[0]),L[1]?H(L[1]):La(r.value.partialRange)]},P=()=>i.value[1]?k():H(An(i.value[0])),B=()=>(i.value||[]).map(L=>H(L)),Y=(L=!1)=>(L||A(),e.modelAuto?P():a.value.enabled?B():Array.isArray(i.value)?Cd(()=>k(),r.value.enabled):H(An(i.value))),ne=L=>!L||Array.isArray(L)&&!L.length?null:e.timePicker?x(An(L)):e.monthPicker?E(An(L)):e.yearPicker?v(An(L)):a.value.enabled?w(An(L)):e.weekPicker?S(An(L)):T(An(L)),$=L=>{const ae=ne(L);tm(An(ae))?(i.value=An(ae),X()):(i.value=null,c.value="")},F=()=>{const L=ae=>Os(ae,s.value.format);return`${L(i.value[0])} ${s.value.rangeSeparator} ${i.value[1]?L(i.value[1]):""}`},D=()=>n.value&&i.value?Array.isArray(i.value)?F():Os(i.value,s.value.format):p(i.value),z=()=>i.value?a.value.enabled?i.value.map(L=>p(L)).join("; "):s.value.enabled&&typeof s.value.format=="string"?D():p(i.value):"",X=()=>{!e.format||typeof e.format=="string"||s.value.enabled&&typeof s.value.format=="string"?c.value=z():c.value=e.format(i.value)},Z=L=>{if(e.utc){const ae=new Date(L);return e.utc==="preserve"?new Date(ae.getTime()+ae.getTimezoneOffset()*6e4):ae}return e.modelType?j5.includes(e.modelType)?h(new Date(L)):e.modelType==="format"&&(typeof e.format=="string"||!e.format)?h(Jp(L,l(),new Date,{locale:d.value})):h(Jp(L,e.modelType,new Date,{locale:d.value})):h(new Date(L))},H=L=>L?e.utc?t4(L,e.utc==="preserve",e.enableSeconds):e.modelType?e.modelType==="timestamp"?+f(L):e.modelType==="iso"?f(L).toISOString():e.modelType==="format"&&(typeof e.format=="string"||!e.format)?p(f(L)):p(f(L),e.modelType,!0):f(L):"",le=(L,ae=!1,de=!1)=>{if(de)return L;if(t("update:model-value",L),o.value.emitTimezone&&ae){const ve=Array.isArray(L)?L.map(W=>xi(An(W),o.value.emitTimezone)):xi(An(L),o.value.emitTimezone);t("update:model-timezone-value",ve)}},ie=L=>Array.isArray(i.value)?a.value.enabled?i.value.map(ae=>L(ae)):[L(i.value[0]),i.value[1]?L(i.value[1]):La(r.value.partialRange)]:L(An(i.value)),te=()=>{if(Array.isArray(i.value)){const L=nr(i.value[0],e.weekStart),ae=i.value[1]?nr(i.value[1],e.weekStart):[];return[L.map(de=>Ce(de)),ae.map(de=>Ce(de))]}return nr(i.value,e.weekStart).map(L=>Ce(L))},I=(L,ae)=>le(An(ie(L)),!1,ae),ee=L=>{const ae=te();return L?ae:t("update:model-value",te())},ue=(L=!1)=>(L||X(),e.monthPicker?I(y,L):e.timePicker?I(m,L):e.yearPicker?I(Xe,L):e.weekPicker?ee(L):le(Y(L),!0,L));return{inputValue:c,internalModelValue:i,checkBeforeEmit:()=>i.value?r.value.enabled?r.value.partialRange?i.value.length>=1:i.value.length===2:!!i.value:!1,parseExternalModelValue:$,formatInputValue:X,emitModelValue:ue}},S4=(t,e)=>{const{defaultedFilters:n,propDates:i}=jt(t),{validateMonthYearInRange:s}=yo(t),r=(u,d)=>{let h=u;return n.value.months.includes(at(h))?(h=d?ds(u,1):Al(u,1),r(h,d)):h},o=(u,d)=>{let h=u;return n.value.years.includes(Xe(h))?(h=d?w_(u,1):UC(u,1),o(h,d)):h},a=(u,d=!1)=>{const h=Pt(Ce(),{month:t.month,year:t.year});let f=u?ds(h,1):Al(h,1);t.disableYearSelect&&(f=ks(f,t.year));let p=at(f),m=Xe(f);n.value.months.includes(p)&&(f=r(f,u),p=at(f),m=Xe(f)),n.value.years.includes(m)&&(f=o(f,u),m=Xe(f)),s(p,m,u,t.preventMinMaxNavigation)&&l(p,m,d)},l=(u,d,h)=>{e("update-month-year",{month:u,year:d,fromNav:h})},c=be(()=>u=>iS(Pt(Ce(),{month:t.month,year:t.year}),i.value.maxDate,i.value.minDate,t.preventMinMaxNavigation,u));return{handleMonthYearChange:a,isDisabled:c,updateMonthYear:l}},bf={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0},ui:{type:Object,default:()=>({})}},_s={...bf,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},T4=["title"],A4=["disabled"],k4=hn({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},..._s},emits:["close-picker","select-date","select-now","invalid-select"],setup(t,{emit:e}){const n=e,i=t,{defaultedActionRow:s,defaultedPreviewFormat:r,defaultedMultiCalendars:o,defaultedTextInput:a,defaultedInline:l,defaultedRange:c,defaultedMultiDates:u}=jt(i),{isTimeValid:d,isMonthValid:h}=yo(i),{buildMatrix:f}=_o(),p=we(null),m=we(null),y=we(!1),v=we({}),b=we(null),x=we(null);En(()=>{i.arrowNavigation&&f([vn(p),vn(m)],"actionRow"),E(),window.addEventListener("resize",E)}),pa(()=>{window.removeEventListener("resize",E)});const E=()=>{y.value=!1,setTimeout(()=>{var $,F;const D=($=b.value)==null?void 0:$.getBoundingClientRect(),z=(F=x.value)==null?void 0:F.getBoundingClientRect();D&&z&&(v.value.maxWidth=`${z.width-D.width-20}px`),y.value=!0},0)},w=be(()=>c.value.enabled&&!c.value.partialRange&&i.internalModelValue?i.internalModelValue.length===2:!0),S=be(()=>!d.value(i.internalModelValue)||!h.value(i.internalModelValue)||!w.value),T=()=>{const $=r.value;return i.timePicker||i.monthPicker,$(An(i.internalModelValue))},A=()=>{const $=i.internalModelValue;return o.value.count>0?`${k($[0])} - ${k($[1])}`:[k($[0]),k($[1])]},k=$=>sS($,r.value,i.formatLocale,a.value.rangeSeparator,i.modelAuto,r.value),P=be(()=>!i.internalModelValue||!i.menuMount?"":typeof r.value=="string"?Array.isArray(i.internalModelValue)?i.internalModelValue.length===2&&i.internalModelValue[1]?A():u.value.enabled?i.internalModelValue.map($=>`${k($)}`):i.modelAuto?`${k(i.internalModelValue[0])}`:`${k(i.internalModelValue[0])} -`:k(i.internalModelValue):T()),B=()=>u.value.enabled?"; ":" - ",Y=be(()=>Array.isArray(P.value)?P.value.join(B()):P.value),ne=()=>{d.value(i.internalModelValue)&&h.value(i.internalModelValue)&&w.value?n("select-date"):n("invalid-select")};return($,F)=>(R(),V("div",{ref_key:"actionRowRef",ref:x,class:"dp__action_row"},[$.$slots["action-row"]?Ne($.$slots,"action-row",In(wn({key:0},{internalModelValue:$.internalModelValue,disabled:S.value,selectDate:()=>$.$emit("select-date"),closePicker:()=>$.$emit("close-picker")}))):(R(),V(Oe,{key:1},[J(s).showPreview?(R(),V("div",{key:0,class:"dp__selection_preview",title:Y.value,style:Pn(v.value)},[$.$slots["action-preview"]&&y.value?Ne($.$slots,"action-preview",{key:0,value:$.internalModelValue}):ce("",!0),!$.$slots["action-preview"]&&y.value?(R(),V(Oe,{key:1},[Ue(xe(Y.value),1)],64)):ce("",!0)],12,T4)):ce("",!0),g("div",{ref_key:"actionBtnContainer",ref:b,class:"dp__action_buttons","data-dp-element":"action-row"},[$.$slots["action-buttons"]?Ne($.$slots,"action-buttons",{key:0,value:$.internalModelValue}):ce("",!0),$.$slots["action-buttons"]?ce("",!0):(R(),V(Oe,{key:1},[!J(l).enabled&&J(s).showCancel?(R(),V("button",{key:0,ref_key:"cancelButtonRef",ref:p,type:"button",class:"dp__action_button dp__action_cancel",onClick:F[0]||(F[0]=D=>$.$emit("close-picker")),onKeydown:F[1]||(F[1]=D=>J(ii)(D,()=>$.$emit("close-picker")))},xe($.cancelText),545)):ce("",!0),J(s).showNow?(R(),V("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:F[2]||(F[2]=D=>$.$emit("select-now")),onKeydown:F[3]||(F[3]=D=>J(ii)(D,()=>$.$emit("select-now")))},xe($.nowButtonLabel),33)):ce("",!0),J(s).showSelect?(R(),V("button",{key:2,ref_key:"selectButtonRef",ref:m,type:"button",class:"dp__action_button dp__action_select",disabled:S.value,"data-test":"select-button",onKeydown:F[4]||(F[4]=D=>J(ii)(D,()=>ne())),onClick:ne},xe($.selectText),41,A4)):ce("",!0)],64))],512)],64))],512))}}),M4=["role","aria-label","tabindex"],P4={class:"dp__selection_grid_header"},I4=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],D4=["aria-label"],Vu=hn({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{},overlayLabel:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(t,{expose:e,emit:n}){const{setSelectionGrid:i,buildMultiLevelMatrix:s,setMonthPicker:r}=_o(),o=n,a=t,{defaultedAriaLabels:l,defaultedTextInput:c,defaultedConfig:u}=jt(a),{hideNavigationButtons:d}=Ef(),h=we(!1),f=we(null),p=we(null),m=we([]),y=we(),v=we(null),b=we(0),x=we(null);dE(()=>{f.value=null}),En(()=>{Rn().then(()=>B()),a.noOverlayFocus||w(),E(!0)}),pa(()=>E(!1));const E=ie=>{var te;a.arrowNavigation&&((te=a.headerRefs)!=null&&te.length?r(ie):i(ie))},w=()=>{var ie;const te=vn(p);te&&(c.value.enabled||(f.value?(ie=f.value)==null||ie.focus({preventScroll:!0}):te.focus({preventScroll:!0})),h.value=te.clientHeight({dp__overlay:!0,"dp--overlay-absolute":!a.useRelative,"dp--overlay-relative":a.useRelative})),T=be(()=>a.useRelative?{height:`${a.height}px`,width:"var(--dp-menu-min-width)"}:void 0),A=be(()=>({dp__overlay_col:!0})),k=be(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:h.value,dp__button_bottom:a.isLast})),P=be(()=>{var ie,te;return{dp__overlay_container:!0,dp__container_flex:((ie=a.items)==null?void 0:ie.length)<=6,dp__container_block:((te=a.items)==null?void 0:te.length)>6}});un(()=>a.items,()=>B(!1),{deep:!0});const B=(ie=!0)=>{Rn().then(()=>{const te=vn(f),I=vn(p),ee=vn(v),ue=vn(x),L=ee?ee.getBoundingClientRect().height:0;I&&(I.getBoundingClientRect().height?b.value=I.getBoundingClientRect().height-L:b.value=u.value.modeHeight-L),te&&ue&&ie&&(ue.scrollTop=te.offsetTop-ue.offsetTop-(b.value/2-te.getBoundingClientRect().height)-L)})},Y=ie=>{ie.disabled||o("selected",ie.value)},ne=()=>{o("toggle"),o("reset-flow")},$=()=>{a.escClose&&ne()},F=(ie,te,I,ee)=>{ie&&((te.active||te.value===a.focusValue)&&(f.value=ie),a.arrowNavigation&&(Array.isArray(m.value[I])?m.value[I][ee]=ie:m.value[I]=[ie],D()))},D=()=>{var ie,te;const I=(ie=a.headerRefs)!=null&&ie.length?[a.headerRefs].concat(m.value):m.value.concat([a.skipButtonRef?[]:[v.value]]);s(An(I),(te=a.headerRefs)!=null&&te.length?"monthPicker":"selectionGrid")},z=ie=>{a.arrowNavigation||eo(ie,u.value,!0)},X=ie=>{y.value=ie,o("hover-value",ie)},Z=()=>{if(ne(),!a.isLast){const ie=em(a.menuWrapRef??null,"action-row");if(ie){const te=ZC(ie);te?.focus()}}},H=ie=>{switch(ie.key){case Ot.esc:return $();case Ot.arrowLeft:return z(ie);case Ot.arrowRight:return z(ie);case Ot.arrowUp:return z(ie);case Ot.arrowDown:return z(ie);default:return}},le=ie=>{if(ie.key===Ot.enter)return ne();if(ie.key===Ot.tab)return Z()};return e({focusGrid:w}),(ie,te)=>{var I;return R(),V("div",{ref_key:"gridWrapRef",ref:p,class:Pe(S.value),style:Pn(T.value),role:ie.useRelative?void 0:"dialog","aria-label":ie.overlayLabel,tabindex:ie.useRelative?void 0:"0",onKeydown:H,onClick:te[0]||(te[0]=ru(()=>{},["prevent"]))},[g("div",{ref_key:"containerRef",ref:x,class:Pe(P.value),style:Pn({"--dp-overlay-height":`${b.value}px`}),role:"grid"},[g("div",P4,[Ne(ie.$slots,"header")]),ie.$slots.overlay?Ne(ie.$slots,"overlay",{key:0}):(R(!0),V(Oe,{key:1},Ze(ie.items,(ee,ue)=>(R(),V("div",{key:ue,class:Pe(["dp__overlay_row",{dp__flex_row:ie.items.length>=3}]),role:"row"},[(R(!0),V(Oe,null,Ze(ee,(L,ae)=>(R(),V("div",{key:L.value,ref_for:!0,ref:de=>F(de,L,ue,ae),role:"gridcell",class:Pe(A.value),"aria-selected":L.active||void 0,"aria-disabled":L.disabled||void 0,tabindex:"0","data-test":L.text,onClick:ru(de=>Y(L),["prevent"]),onKeydown:de=>J(ii)(de,()=>Y(L),!0),onMouseover:de=>X(L.value)},[g("div",{class:Pe(L.className)},[ie.$slots.item?Ne(ie.$slots,"item",{key:0,item:L}):ce("",!0),ie.$slots.item?ce("",!0):(R(),V(Oe,{key:1},[Ue(xe(L.text),1)],64))],2)],42,I4))),128))],2))),128))],6),ie.$slots["button-icon"]?$e((R(),V("button",{key:0,ref_key:"toggleButton",ref:v,type:"button","aria-label":(I=J(l))==null?void 0:I.toggleOverlay,class:Pe(k.value),tabindex:"0",onClick:ne,onKeydown:le},[Ne(ie.$slots,"button-icon")],42,D4)),[[sh,!J(d)(ie.hideNavigation,ie.type)]]):ce("",!0)],46,M4)}}}),wf=hn({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(t){const e=t,n=be(()=>e.multiCalendars>0?[...Array(e.multiCalendars).keys()]:[0]),i=be(()=>({dp__instance_calendar:e.multiCalendars>0}));return(s,r)=>(R(),V("div",{class:Pe({dp__menu_inner:!s.stretch,"dp--menu--inner-stretched":s.stretch,dp__flex_display:s.multiCalendars>0,"dp--flex-display-collapsed":s.collapse})},[(R(!0),V(Oe,null,Ze(n.value,(o,a)=>(R(),V("div",{key:o,class:Pe(i.value)},[Ne(s.$slots,"default",{instance:o,index:a})],2))),128))],2))}}),R4=["data-dp-element","aria-label","aria-disabled"],jc=hn({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(t,{emit:e}){const n=e,i=we(null);return En(()=>n("set-ref",i)),(s,r)=>(R(),V("button",{ref_key:"elRef",ref:i,type:"button","data-dp-element":s.elName,class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":s.ariaLabel,"aria-disabled":s.disabled||void 0,onClick:r[0]||(r[0]=o=>s.$emit("activate")),onKeydown:r[1]||(r[1]=o=>J(ii)(o,()=>s.$emit("activate"),!0))},[g("span",{class:Pe(["dp__inner_nav",{dp__inner_nav_disabled:s.disabled}])},[Ne(s.$slots,"default")],2)],40,R4))}}),L4=["aria-label","data-test"],lS=hn({__name:"YearModePicker",props:{..._s,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(t,{emit:e}){const n=e,i=t,{showRightIcon:s,showLeftIcon:r}=Ef(),{defaultedConfig:o,defaultedMultiCalendars:a,defaultedAriaLabels:l,defaultedTransitions:c,defaultedUI:u}=jt(i),{showTransition:d,transitionName:h}=zu(c),f=we(!1),p=(v=!1,b)=>{f.value=!f.value,n("toggle-year-picker",{flow:v,show:b})},m=v=>{f.value=!1,n("year-select",v)},y=(v=!1)=>{n("handle-year",v)};return(v,b)=>{var x,E,w,S,T;return R(),V(Oe,null,[g("div",{class:Pe(["dp--year-mode-picker",{"dp--hidden-el":f.value}])},[J(r)(J(a),t.instance)?(R(),Se(jc,{key:0,ref:"mpPrevIconRef","aria-label":(x=J(l))==null?void 0:x.prevYear,disabled:t.isDisabled(!1),class:Pe((E=J(u))==null?void 0:E.navBtnPrev),onActivate:b[0]||(b[0]=A=>y(!1))},{default:De(()=>[v.$slots["arrow-left"]?Ne(v.$slots,"arrow-left",{key:0}):ce("",!0),v.$slots["arrow-left"]?ce("",!0):(R(),Se(J(A_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0),g("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${t.year}-${(w=J(l))==null?void 0:w.openYearsOverlay}`,"data-test":`year-mode-btn-${t.instance}`,onClick:b[1]||(b[1]=()=>p(!1)),onKeydown:b[2]||(b[2]=eC(()=>p(!1),["enter"]))},[v.$slots.year?Ne(v.$slots,"year",{key:0,year:t.year}):ce("",!0),v.$slots.year?ce("",!0):(R(),V(Oe,{key:1},[Ue(xe(t.year),1)],64))],40,L4),J(s)(J(a),t.instance)?(R(),Se(jc,{key:1,ref:"mpNextIconRef","aria-label":(S=J(l))==null?void 0:S.nextYear,disabled:t.isDisabled(!0),class:Pe((T=J(u))==null?void 0:T.navBtnNext),onActivate:b[3]||(b[3]=A=>y(!0))},{default:De(()=>[v.$slots["arrow-right"]?Ne(v.$slots,"arrow-right",{key:0}):ce("",!0),v.$slots["arrow-right"]?ce("",!0):(R(),Se(J(k_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0)],2),N($t,{name:J(h)(t.showYearPicker),css:J(d)},{default:De(()=>{var A,k;return[t.showYearPicker?(R(),Se(Vu,{key:0,items:t.items,"text-input":v.textInput,"esc-close":v.escClose,config:v.config,"is-last":v.autoApply&&!J(o).keepActionRow,"hide-navigation":v.hideNavigation,"aria-labels":v.ariaLabels,"overlay-label":(k=(A=J(l))==null?void 0:A.yearPicker)==null?void 0:k.call(A,!0),type:"year",onToggle:p,onSelected:b[4]||(b[4]=P=>m(P))},Un({"button-icon":De(()=>[v.$slots["calendar-icon"]?Ne(v.$slots,"calendar-icon",{key:0}):ce("",!0),v.$slots["calendar-icon"]?ce("",!0):(R(),Se(J(Gl),{key:1}))]),_:2},[v.$slots["year-overlay-value"]?{name:"item",fn:De(({item:P})=>[Ne(v.$slots,"year-overlay-value",{text:P.text,value:P.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels","overlay-label"])):ce("",!0)]}),_:3},8,["name","css"])],64)}}}),N_=(t,e,n)=>{if(e.value&&Array.isArray(e.value))if(e.value.some(i=>ct(t,i))){const i=e.value.filter(s=>!ct(s,t));e.value=i.length?i:null}else(n&&+n>e.value.length||!n)&&e.value.push(t);else e.value=[t]},F_=(t,e,n)=>{let i=t.value?t.value.slice():[];return i.length===2&&i[1]!==null&&(i=[]),i.length?Qt(e,i[0])?(i.unshift(e),n("range-start",i[0]),n("range-start",i[1])):(i[1]=e,n("range-end",e)):(i=[e],n("range-start",e)),i},xf=(t,e,n,i)=>{t&&(t[0]&&t[1]&&n&&e("auto-apply"),t[0]&&!t[1]&&i&&n&&e("auto-apply"))},cS=t=>{Array.isArray(t.value)&&t.value.length<=2&&t.range?t.modelValue.value=t.value.map(e=>xi(Ce(e),t.timezone)):Array.isArray(t.value)||(t.modelValue.value=xi(Ce(t.value),t.timezone))},uS=(t,e,n,i)=>Array.isArray(e.value)&&(e.value.length===2||e.value.length===1&&i.value.partialRange)?i.value.fixedStart&&(on(t,e.value[0])||ct(t,e.value[0]))?[e.value[0],t]:i.value.fixedEnd&&(Qt(t,e.value[1])||ct(t,e.value[1]))?[t,e.value[1]]:(n("invalid-fixed-range",t),e.value):[],dS=({multiCalendars:t,range:e,highlight:n,propDates:i,calendars:s,modelValue:r,props:o,filters:a,year:l,month:c,emit:u})=>{const d=be(()=>R_(o.yearRange,o.locale,o.reverseYears)),h=we([!1]),f=be(()=>(P,B)=>{const Y=Pt(rs(new Date),{month:c.value(P),year:l.value(P)}),ne=B?LC(Y):lu(Y);return iS(ne,i.value.maxDate,i.value.minDate,o.preventMinMaxNavigation,B)}),p=()=>Array.isArray(r.value)&&t.value.solo&&r.value[1],m=()=>{for(let P=0;P{if(!P)return m();const B=Pt(Ce(),s.value[P]);return s.value[0].year=Xe(UC(B,t.value.count-1)),m()},v=(P,B)=>{const Y=U3(B,P);return e.value.showLastInRange&&Y>1?B:P},b=P=>o.focusStartDate||t.value.solo?P[0]:P[1]?v(P[0],P[1]):P[0],x=()=>{if(r.value){const P=Array.isArray(r.value)?b(r.value):r.value;s.value[0]={month:at(P),year:Xe(P)}}},E=()=>{x(),t.value.count&&m()};un(r,(P,B)=>{o.isTextInputDate&&JSON.stringify(P??{})!==JSON.stringify(B??{})&&E()}),En(()=>{E()});const w=(P,B)=>{s.value[B].year=P,u("update-month-year",{instance:B,year:P,month:s.value[B].month}),t.value.count&&!t.value.solo&&y(B)},S=be(()=>P=>kl(d.value,B=>{var Y;const ne=l.value(P)===B.value,$=uu(B.value,Ml(i.value.minDate),Ml(i.value.maxDate))||((Y=a.value.years)==null?void 0:Y.includes(l.value(P))),F=$_(n.value,B.value);return{active:ne,disabled:$,highlighted:F}})),T=(P,B)=>{w(P,B),k(B)},A=(P,B=!1)=>{if(!f.value(P,B)){const Y=B?l.value(P)+1:l.value(P)-1;w(Y,P)}},k=(P,B=!1,Y)=>{B||u("reset-flow"),Y!==void 0?h.value[P]=Y:h.value[P]=!h.value[P],h.value[P]?u("overlay-toggle",{open:!0,overlay:Yn.year}):(u("overlay-closed"),u("overlay-toggle",{open:!1,overlay:Yn.year}))};return{isDisabled:f,groupedYears:S,showYearPicker:h,selectYear:w,toggleYearPicker:k,handleYearSelect:T,handleYear:A}},O4=(t,e)=>{const{defaultedMultiCalendars:n,defaultedAriaLabels:i,defaultedTransitions:s,defaultedConfig:r,defaultedRange:o,defaultedHighlight:a,propDates:l,defaultedTz:c,defaultedFilters:u,defaultedMultiDates:d}=jt(t),h=()=>{t.isTextInputDate&&E(Xe(Ce(t.startDate)),0)},{modelValue:f,year:p,month:m,calendars:y}=Wu(t,e,h),v=be(()=>XC(t.formatLocale,t.locale,t.monthNameFormat)),b=we(null),{checkMinMaxRange:x}=yo(t),{selectYear:E,groupedYears:w,showYearPicker:S,toggleYearPicker:T,handleYearSelect:A,handleYear:k,isDisabled:P}=dS({modelValue:f,multiCalendars:n,range:o,highlight:a,calendars:y,year:p,propDates:l,month:m,filters:u,props:t,emit:e});En(()=>{t.startDate&&(f.value&&t.focusStartDate||!f.value)&&E(Xe(Ce(t.startDate)),0)});const B=I=>I?{month:at(I),year:Xe(I)}:{month:null,year:null},Y=()=>f.value?Array.isArray(f.value)?f.value.map(I=>B(I)):B(f.value):B(),ne=(I,ee)=>{const ue=y.value[I],L=Y();return Array.isArray(L)?L.some(ae=>ae.year===ue?.year&&ae.month===ee):ue?.year===L.year&&ee===L.month},$=(I,ee,ue)=>{var L,ae;const de=Y();return Array.isArray(de)?p.value(ee)===((L=de[ue])==null?void 0:L.year)&&I===((ae=de[ue])==null?void 0:ae.month):!1},F=(I,ee)=>{if(o.value.enabled){const ue=Y();if(Array.isArray(f.value)&&Array.isArray(ue)){const L=$(I,ee,0)||$(I,ee,1),ae=ar(rs(Ce()),I,p.value(ee));return vf(f.value,b.value,ae)&&!L}return!1}return!1},D=be(()=>I=>kl(v.value,ee=>{var ue;const L=ne(I,ee.value),ae=uu(ee.value,QC(p.value(I),l.value.minDate),eS(p.value(I),l.value.maxDate))||o4(l.value.disabledDates,p.value(I)).includes(ee.value)||((ue=u.value.months)==null?void 0:ue.includes(ee.value)),de=F(ee.value,I),ve=rS(a.value,ee.value,p.value(I));return{active:L,disabled:ae,isBetween:de,highlighted:ve}})),z=(I,ee)=>ar(rs(Ce()),I,p.value(ee)),X=(I,ee)=>{const ue=f.value?f.value:rs(new Date);f.value=ar(ue,I,p.value(ee)),e("auto-apply"),e("update-flow-step")},Z=(I,ee)=>{const ue=z(I,ee);o.value.fixedEnd||o.value.fixedStart?f.value=uS(ue,f,e,o):f.value?x(ue,f.value)&&(f.value=F_(f,z(I,ee),e)):f.value=[z(I,ee)],Rn().then(()=>{xf(f.value,e,t.autoApply,t.modelAuto)})},H=(I,ee)=>{N_(z(I,ee),f,d.value.limit),e("auto-apply",!0)},le=(I,ee)=>(y.value[ee].month=I,te(ee,y.value[ee].year,I),d.value.enabled?H(I,ee):o.value.enabled?Z(I,ee):X(I,ee)),ie=(I,ee)=>{E(I,ee),te(ee,I,null)},te=(I,ee,ue)=>{let L=ue;if(!L&&L!==0){const ae=Y();L=Array.isArray(ae)?ae[I].month:ae.month}e("update-month-year",{instance:I,year:ee,month:L})};return{groupedMonths:D,groupedYears:w,year:p,isDisabled:P,defaultedMultiCalendars:n,defaultedAriaLabels:i,defaultedTransitions:s,defaultedConfig:r,showYearPicker:S,modelValue:f,presetDate:(I,ee)=>{cS({value:I,modelValue:f,range:o.value.enabled,timezone:ee?void 0:c.value.timezone}),e("auto-apply")},setHoverDate:(I,ee)=>{b.value=z(I,ee)},selectMonth:le,selectYear:ie,toggleYearPicker:T,handleYearSelect:A,handleYear:k,getModelMonthYear:Y}},$4=hn({compatConfig:{MODE:3},__name:"MonthPicker",props:{..._s},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=_a(),r=ki(s,"yearMode"),o=t;En(()=>{o.shadow||i("mount",null)});const{groupedMonths:a,groupedYears:l,year:c,isDisabled:u,defaultedMultiCalendars:d,defaultedConfig:h,showYearPicker:f,modelValue:p,presetDate:m,setHoverDate:y,selectMonth:v,selectYear:b,toggleYearPicker:x,handleYearSelect:E,handleYear:w,getModelMonthYear:S}=O4(o,i);return e({getSidebarProps:()=>({modelValue:p,year:c,getModelMonthYear:S,selectMonth:v,selectYear:b,handleYear:w}),presetDate:m,toggleYearPicker:T=>x(0,T)}),(T,A)=>(R(),Se(wf,{"multi-calendars":J(d).count,collapse:T.collapse,stretch:""},{default:De(({instance:k})=>[T.$slots["top-extra"]?Ne(T.$slots,"top-extra",{key:0,value:T.internalModelValue}):ce("",!0),T.$slots["month-year"]?Ne(T.$slots,"month-year",In(wn({key:1},{year:J(c),months:J(a)(k),years:J(l)(k),selectMonth:J(v),selectYear:J(b),instance:k}))):(R(),Se(Vu,{key:2,items:J(a)(k),"arrow-navigation":T.arrowNavigation,"is-last":T.autoApply&&!J(h).keepActionRow,"esc-close":T.escClose,height:J(h).modeHeight,config:T.config,"no-overlay-focus":!!(T.noOverlayFocus||T.textInput),"use-relative":"",type:"month",onSelected:P=>J(v)(P,k),onHoverValue:P=>J(y)(P,k)},Un({header:De(()=>[N(lS,wn(T.$props,{items:J(l)(k),instance:k,"show-year-picker":J(f)[k],year:J(c)(k),"is-disabled":P=>J(u)(k,P),onHandleYear:P=>J(w)(k,P),onYearSelect:P=>J(E)(P,k),onToggleYearPicker:P=>J(x)(k,P?.flow,P?.show)}),Un({_:2},[Ze(J(r),(P,B)=>({name:P,fn:De(Y=>[Ne(T.$slots,P,In(ni(Y)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[T.$slots["month-overlay-value"]?{name:"item",fn:De(({item:P})=>[Ne(T.$slots,"month-overlay-value",{text:P.text,value:P.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse"]))}}),N4=(t,e)=>{const n=()=>{t.isTextInputDate&&(u.value=Xe(Ce(t.startDate)))},{modelValue:i}=Wu(t,e,n),s=we(null),{defaultedHighlight:r,defaultedMultiDates:o,defaultedFilters:a,defaultedRange:l,propDates:c}=jt(t),u=we();En(()=>{t.startDate&&(i.value&&t.focusStartDate||!i.value)&&(u.value=Xe(Ce(t.startDate)))});const d=m=>Array.isArray(i.value)?i.value.some(y=>Xe(y)===m):i.value?Xe(i.value)===m:!1,h=m=>l.value.enabled&&Array.isArray(i.value)?vf(i.value,s.value,p(m)):!1,f=be(()=>kl(R_(t.yearRange,t.locale,t.reverseYears),m=>{const y=d(m.value),v=uu(m.value,Ml(c.value.minDate),Ml(c.value.maxDate))||a.value.years.includes(m.value),b=h(m.value)&&!y,x=$_(r.value,m.value);return{active:y,disabled:v,isBetween:b,highlighted:x}})),p=m=>ks(rs(lu(new Date)),m);return{groupedYears:f,modelValue:i,focusYear:u,setHoverValue:m=>{s.value=ks(rs(new Date),m)},selectYear:m=>{var y;if(e("update-month-year",{instance:0,year:m}),o.value.enabled)return i.value?Array.isArray(i.value)&&(((y=i.value)==null?void 0:y.map(v=>Xe(v))).includes(m)?i.value=i.value.filter(v=>Xe(v)!==m):i.value.push(ks(oi(Ce()),m))):i.value=[ks(oi(lu(Ce())),m)],e("auto-apply",!0);l.value.enabled?(i.value=F_(i,p(m),e),Rn().then(()=>{xf(i.value,e,t.autoApply,t.modelAuto)})):(i.value=p(m),e("auto-apply"))}}},F4=hn({compatConfig:{MODE:3},__name:"YearPicker",props:{..._s},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(t,{expose:e,emit:n}){const i=n,s=t,{groupedYears:r,modelValue:o,focusYear:a,selectYear:l,setHoverValue:c}=N4(s,i),{defaultedConfig:u}=jt(s);return e({getSidebarProps:()=>({modelValue:o,selectYear:l})}),(d,h)=>(R(),V("div",null,[d.$slots["top-extra"]?Ne(d.$slots,"top-extra",{key:0,value:d.internalModelValue}):ce("",!0),d.$slots["month-year"]?Ne(d.$slots,"month-year",In(wn({key:1},{years:J(r),selectYear:J(l)}))):(R(),Se(Vu,{key:2,items:J(r),"is-last":d.autoApply&&!J(u).keepActionRow,height:J(u).modeHeight,config:d.config,"no-overlay-focus":!!(d.noOverlayFocus||d.textInput),"focus-value":J(a),type:"year","use-relative":"",onSelected:J(l),onHoverValue:J(c)},Un({_:2},[d.$slots["year-overlay-value"]?{name:"item",fn:De(({item:f})=>[Ne(d.$slots,"year-overlay-value",{text:f.text,value:f.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),B4={key:0,class:"dp__time_input"},V4=["data-test","aria-label","onKeydown","onClick","onMousedown"],z4=["aria-label","disabled","data-test","onKeydown","onClick"],W4=["data-test","aria-label","onKeydown","onClick","onMousedown"],Y4={key:0},H4=["aria-label"],j4=hn({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},..._s},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(t,{expose:e,emit:n}){const i=n,s=t,{setTimePickerElements:r,setTimePickerBackRef:o}=_o(),{defaultedAriaLabels:a,defaultedTransitions:l,defaultedFilters:c,defaultedConfig:u,defaultedRange:d}=jt(s),{transitionName:h,showTransition:f}=zu(l),p=Ki({hours:!1,minutes:!1,seconds:!1}),m=we("AM"),y=we(null),v=we([]),b=we(),x=we(!1);En(()=>{i("mounted")});const E=C=>Pt(new Date,{hours:C.hours,minutes:C.minutes,seconds:s.enableSeconds?C.seconds:0,milliseconds:0}),w=be(()=>C=>z(C,s[C])||T(C,s[C])),S=be(()=>({hours:s.hours,minutes:s.minutes,seconds:s.seconds})),T=(C,O)=>d.value.enabled&&!d.value.disableTimeRangeValidation?!s.validateTime(C,O):!1,A=(C,O)=>{if(d.value.enabled&&!d.value.disableTimeRangeValidation){const K=O?+s[`${C}Increment`]:-+s[`${C}Increment`],U=s[C]+K;return!s.validateTime(C,U)}return!1},k=be(()=>C=>!ie(+s[C]+ +s[`${C}Increment`],C)||A(C,!0)),P=be(()=>C=>!ie(+s[C]-+s[`${C}Increment`],C)||A(C,!1)),B=(C,O)=>AC(Pt(Ce(),C),O),Y=(C,O)=>W5(Pt(Ce(),C),O),ne=be(()=>({dp__time_col:!0,dp__time_col_block:!s.timePickerInline,dp__time_col_reg_block:!s.enableSeconds&&s.is24&&!s.timePickerInline,dp__time_col_reg_inline:!s.enableSeconds&&s.is24&&s.timePickerInline,dp__time_col_reg_with_button:!s.enableSeconds&&!s.is24,dp__time_col_sec:s.enableSeconds&&s.is24,dp__time_col_sec_with_button:s.enableSeconds&&!s.is24})),$=be(()=>{const C=[{type:"hours"}];return s.enableMinutes&&C.push({type:"",separator:!0},{type:"minutes"}),s.enableSeconds&&C.push({type:"",separator:!0},{type:"seconds"}),C}),F=be(()=>$.value.filter(C=>!C.separator)),D=be(()=>C=>{if(C==="hours"){const O=ae(+s.hours);return{text:O<10?`0${O}`:`${O}`,value:O}}return{text:s[C]<10?`0${s[C]}`:`${s[C]}`,value:s[C]}}),z=(C,O)=>{var K;if(!s.disabledTimesConfig)return!1;const U=s.disabledTimesConfig(s.order,C==="hours"?O:void 0);return U[C]?!!((K=U[C])!=null&&K.includes(O)):!0},X=(C,O)=>O!=="hours"||m.value==="AM"?C:C+12,Z=C=>{const O=s.is24?24:12,K=C==="hours"?O:60,U=+s[`${C}GridIncrement`],re=C==="hours"&&!s.is24?U:0,j=[];for(let se=re;se({active:!1,disabled:c.value.times[C].includes(se.value)||!ie(se.value,C)||z(C,se.value)||T(C,se.value)}))},H=C=>C>=0?C:59,le=C=>C>=0?C:23,ie=(C,O)=>{const K=s.minTime?E(Rg(s.minTime)):null,U=s.maxTime?E(Rg(s.maxTime)):null,re=E(Rg(S.value,O,O==="minutes"||O==="seconds"?H(C):le(C)));return K&&U?(cu(re,U)||el(re,U))&&(Tl(re,K)||el(re,K)):K?Tl(re,K)||el(re,K):U?cu(re,U)||el(re,U):!0},te=C=>s[`no${C[0].toUpperCase()+C.slice(1)}Overlay`],I=C=>{te(C)||(p[C]=!p[C],p[C]?(x.value=!0,i("overlay-opened",C)):(x.value=!1,i("overlay-closed",C)))},ee=C=>C==="hours"?yr:C==="minutes"?ao:Sl,ue=()=>{b.value&&clearTimeout(b.value)},L=(C,O=!0,K)=>{const U=O?B:Y,re=O?+s[`${C}Increment`]:-+s[`${C}Increment`];ie(+s[C]+re,C)&&i(`update:${C}`,ee(C)(U({[C]:+s[C]},{[C]:+s[`${C}Increment`]}))),!(K!=null&&K.keyboard)&&u.value.timeArrowHoldThreshold&&(b.value=setTimeout(()=>{L(C,O)},u.value.timeArrowHoldThreshold))},ae=C=>s.is24?C:(C>=12?m.value="PM":m.value="AM",G5(C)),de=()=>{m.value==="PM"?(m.value="AM",i("update:hours",s.hours-12)):(m.value="PM",i("update:hours",s.hours+12)),i("am-pm-change",m.value)},ve=C=>{p[C]=!0},W=(C,O,K)=>{if(C&&s.arrowNavigation){Array.isArray(v.value[O])?v.value[O][K]=C:v.value[O]=[C];const U=v.value.reduce((re,j)=>j.map((se,Q)=>[...re[Q]||[],j[Q]]),[]);o(s.closeTimePickerBtn),y.value&&(U[1]=U[1].concat(y.value)),r(U,s.order)}},fe=(C,O)=>(I(C),i(`update:${C}`,O));return e({openChildCmp:ve}),(C,O)=>{var K;return C.disabled?ce("",!0):(R(),V("div",B4,[(R(!0),V(Oe,null,Ze($.value,(U,re)=>{var j,se,Q;return R(),V("div",{key:re,class:Pe(ne.value)},[U.separator?(R(),V(Oe,{key:0},[x.value?ce("",!0):(R(),V(Oe,{key:0},[Ue(":")],64))],64)):(R(),V(Oe,{key:1},[g("button",{ref_for:!0,ref:ge=>W(ge,re,0),type:"button",class:Pe({dp__btn:!0,dp__inc_dec_button:!C.timePickerInline,dp__inc_dec_button_inline:C.timePickerInline,dp__tp_inline_btn_top:C.timePickerInline,dp__inc_dec_button_disabled:k.value(U.type),"dp--hidden-el":x.value}),"data-test":`${U.type}-time-inc-btn-${s.order}`,"aria-label":(j=J(a))==null?void 0:j.incrementValue(U.type),tabindex:"0",onKeydown:ge=>J(ii)(ge,()=>L(U.type,!0,{keyboard:!0}),!0),onClick:ge=>J(u).timeArrowHoldThreshold?void 0:L(U.type,!0),onMousedown:ge=>J(u).timeArrowHoldThreshold?L(U.type,!0):void 0,onMouseup:ue},[s.timePickerInline?(R(),V(Oe,{key:1},[C.$slots["tp-inline-arrow-up"]?Ne(C.$slots,"tp-inline-arrow-up",{key:0}):(R(),V(Oe,{key:1},[O[2]||(O[2]=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),O[3]||(O[3]=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(R(),V(Oe,{key:0},[C.$slots["arrow-up"]?Ne(C.$slots,"arrow-up",{key:0}):ce("",!0),C.$slots["arrow-up"]?ce("",!0):(R(),Se(J(P_),{key:1}))],64))],42,V4),g("button",{ref_for:!0,ref:ge=>W(ge,re,1),type:"button","aria-label":`${D.value(U.type).text}-${(se=J(a))==null?void 0:se.openTpOverlay(U.type)}`,class:Pe({dp__time_display:!0,dp__time_display_block:!C.timePickerInline,dp__time_display_inline:C.timePickerInline,"dp--time-invalid":w.value(U.type),"dp--time-overlay-btn":!w.value(U.type),"dp--hidden-el":x.value}),disabled:te(U.type),tabindex:"0","data-test":`${U.type}-toggle-overlay-btn-${s.order}`,onKeydown:ge=>J(ii)(ge,()=>I(U.type),!0),onClick:ge=>I(U.type)},[C.$slots[U.type]?Ne(C.$slots,U.type,{key:0,text:D.value(U.type).text,value:D.value(U.type).value}):ce("",!0),C.$slots[U.type]?ce("",!0):(R(),V(Oe,{key:1},[Ue(xe(D.value(U.type).text),1)],64))],42,z4),g("button",{ref_for:!0,ref:ge=>W(ge,re,2),type:"button",class:Pe({dp__btn:!0,dp__inc_dec_button:!C.timePickerInline,dp__inc_dec_button_inline:C.timePickerInline,dp__tp_inline_btn_bottom:C.timePickerInline,dp__inc_dec_button_disabled:P.value(U.type),"dp--hidden-el":x.value}),"data-test":`${U.type}-time-dec-btn-${s.order}`,"aria-label":(Q=J(a))==null?void 0:Q.decrementValue(U.type),tabindex:"0",onKeydown:ge=>J(ii)(ge,()=>L(U.type,!1,{keyboard:!0}),!0),onClick:ge=>J(u).timeArrowHoldThreshold?void 0:L(U.type,!1),onMousedown:ge=>J(u).timeArrowHoldThreshold?L(U.type,!1):void 0,onMouseup:ue},[s.timePickerInline?(R(),V(Oe,{key:1},[C.$slots["tp-inline-arrow-down"]?Ne(C.$slots,"tp-inline-arrow-down",{key:0}):(R(),V(Oe,{key:1},[O[4]||(O[4]=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),O[5]||(O[5]=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(R(),V(Oe,{key:0},[C.$slots["arrow-down"]?Ne(C.$slots,"arrow-down",{key:0}):ce("",!0),C.$slots["arrow-down"]?ce("",!0):(R(),Se(J(I_),{key:1}))],64))],42,W4)],64))],2)}),128)),C.is24?ce("",!0):(R(),V("div",Y4,[C.$slots["am-pm-button"]?Ne(C.$slots,"am-pm-button",{key:0,toggle:de,value:m.value}):ce("",!0),C.$slots["am-pm-button"]?ce("",!0):(R(),V("button",{key:1,ref_key:"amPmButton",ref:y,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(K=J(a))==null?void 0:K.amPmButton,tabindex:"0",onClick:de,onKeydown:O[0]||(O[0]=U=>J(ii)(U,()=>de(),!0))},xe(m.value),41,H4))])),(R(!0),V(Oe,null,Ze(F.value,(U,re)=>(R(),Se($t,{key:re,name:J(h)(p[U.type]),css:J(f)},{default:De(()=>{var j,se;return[p[U.type]?(R(),Se(Vu,{key:0,items:Z(U.type),"is-last":C.autoApply&&!J(u).keepActionRow,"esc-close":C.escClose,type:U.type,"text-input":C.textInput,config:C.config,"arrow-navigation":C.arrowNavigation,"aria-labels":C.ariaLabels,"overlay-label":(se=(j=J(a)).timeOverlay)==null?void 0:se.call(j,U.type),onSelected:Q=>fe(U.type,Q),onToggle:Q=>I(U.type),onResetFlow:O[1]||(O[1]=Q=>C.$emit("reset-flow"))},Un({"button-icon":De(()=>[C.$slots["clock-icon"]?Ne(C.$slots,"clock-icon",{key:0}):ce("",!0),C.$slots["clock-icon"]?ce("",!0):(R(),Se(ma(C.timePickerInline?J(Gl):J(M_)),{key:1}))]),_:2},[C.$slots[`${U.type}-overlay-value`]?{name:"item",fn:De(({item:Q})=>[Ne(C.$slots,`${U.type}-overlay-value`,{text:Q.text,value:Q.value})]),key:"0"}:void 0,C.$slots[`${U.type}-overlay-header`]?{name:"header",fn:De(()=>[Ne(C.$slots,`${U.type}-overlay-header`,{toggle:()=>I(U.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","overlay-label","onSelected","onToggle"])):ce("",!0)]}),_:2},1032,["name","css"]))),128))]))}}}),K4={class:"dp--tp-wrap"},U4=["aria-label","tabindex"],G4=["role","aria-label","tabindex"],X4=["aria-label"],hS=hn({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},..._s},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(t,{expose:e,emit:n}){const i=n,s=t,{buildMatrix:r,setTimePicker:o}=_o(),a=_a(),{defaultedTransitions:l,defaultedAriaLabels:c,defaultedTextInput:u,defaultedConfig:d,defaultedRange:h}=jt(s),{transitionName:f,showTransition:p}=zu(l),{hideNavigationButtons:m}=Ef(),y=we(null),v=we(null),b=we([]),x=we(null),E=we(!1);En(()=>{i("mount"),!s.timePicker&&s.arrowNavigation?r([vn(y.value)],"time"):o(!0,s.timePicker)});const w=be(()=>h.value.enabled&&s.modelAuto?qC(s.internalModelValue):!0),S=we(!1),T=Z=>({hours:Array.isArray(s.hours)?s.hours[Z]:s.hours,minutes:Array.isArray(s.minutes)?s.minutes[Z]:s.minutes,seconds:Array.isArray(s.seconds)?s.seconds[Z]:s.seconds}),A=be(()=>{const Z=[];if(h.value.enabled)for(let H=0;H<2;H++)Z.push(T(H));else Z.push(T(0));return Z}),k=(Z,H=!1,le="")=>{H||i("reset-flow"),S.value=Z,i(Z?"overlay-opened":"overlay-closed",Yn.time),s.arrowNavigation&&o(Z),Rn(()=>{le!==""&&b.value[0]&&b.value[0].openChildCmp(le)})},P=be(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:s.autoApply&&!d.value.keepActionRow})),B=ki(a,"timePicker"),Y=(Z,H,le)=>h.value.enabled?H===0?[Z,A.value[1][le]]:[A.value[0][le],Z]:Z,ne=Z=>{i("update:hours",Z)},$=Z=>{i("update:minutes",Z)},F=Z=>{i("update:seconds",Z)},D=()=>{if(x.value&&!u.value.enabled&&!s.noOverlayFocus){const Z=ZC(x.value);Z&&Z.focus({preventScroll:!0})}},z=Z=>{E.value=!1,i("overlay-closed",Z)},X=Z=>{E.value=!0,i("overlay-opened",Z)};return e({toggleTimePicker:k}),(Z,H)=>{var le;return R(),V("div",K4,[!Z.timePicker&&!Z.timePickerInline?$e((R(),V("button",{key:0,ref_key:"openTimePickerBtn",ref:y,type:"button",class:Pe({...P.value,"dp--hidden-el":S.value}),"aria-label":(le=J(c))==null?void 0:le.openTimePicker,tabindex:Z.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:H[0]||(H[0]=ie=>J(ii)(ie,()=>k(!0))),onClick:H[1]||(H[1]=ie=>k(!0))},[Z.$slots["clock-icon"]?Ne(Z.$slots,"clock-icon",{key:0}):ce("",!0),Z.$slots["clock-icon"]?ce("",!0):(R(),Se(J(M_),{key:1}))],42,U4)),[[sh,!J(m)(Z.hideNavigation,"time")]]):ce("",!0),N($t,{name:J(f)(S.value),css:J(p)&&!Z.timePickerInline},{default:De(()=>{var ie,te;return[S.value||Z.timePicker||Z.timePickerInline?(R(),V("div",{key:0,ref_key:"overlayRef",ref:x,role:Z.timePickerInline?void 0:"dialog",class:Pe({dp__overlay:!Z.timePickerInline,"dp--overlay-absolute":!s.timePicker&&!Z.timePickerInline,"dp--overlay-relative":s.timePicker}),style:Pn(Z.timePicker?{height:`${J(d).modeHeight}px`}:void 0),"aria-label":(ie=J(c))==null?void 0:ie.timePicker,tabindex:Z.timePickerInline?void 0:0},[g("div",{class:Pe(Z.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[Z.$slots["time-picker-overlay"]?Ne(Z.$slots,"time-picker-overlay",{key:0,hours:t.hours,minutes:t.minutes,seconds:t.seconds,setHours:ne,setMinutes:$,setSeconds:F}):ce("",!0),Z.$slots["time-picker-overlay"]?ce("",!0):(R(),V("div",{key:1,class:Pe(Z.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(R(!0),V(Oe,null,Ze(A.value,(I,ee)=>$e((R(),Se(j4,wn({key:ee,ref_for:!0},{...Z.$props,order:ee,hours:I.hours,minutes:I.minutes,seconds:I.seconds,closeTimePickerBtn:v.value,disabledTimesConfig:t.disabledTimesConfig,disabled:ee===0?J(h).fixedStart:J(h).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:b,"validate-time":(ue,L)=>t.validateTime(ue,Y(L,ee,ue)),"onUpdate:hours":ue=>ne(Y(ue,ee,"hours")),"onUpdate:minutes":ue=>$(Y(ue,ee,"minutes")),"onUpdate:seconds":ue=>F(Y(ue,ee,"seconds")),onMounted:D,onOverlayClosed:z,onOverlayOpened:X,onAmPmChange:H[2]||(H[2]=ue=>Z.$emit("am-pm-change",ue))}),Un({_:2},[Ze(J(B),(ue,L)=>({name:ue,fn:De(ae=>[Ne(Z.$slots,ue,wn({ref_for:!0},ae))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[sh,ee===0?!0:w.value]])),128))],2)),!Z.timePicker&&!Z.timePickerInline?$e((R(),V("button",{key:2,ref_key:"closeTimePickerBtn",ref:v,type:"button",class:Pe({...P.value,"dp--hidden-el":E.value}),"aria-label":(te=J(c))==null?void 0:te.closeTimePicker,tabindex:"0",onKeydown:H[3]||(H[3]=I=>J(ii)(I,()=>k(!1))),onClick:H[4]||(H[4]=I=>k(!1))},[Z.$slots["calendar-icon"]?Ne(Z.$slots,"calendar-icon",{key:0}):ce("",!0),Z.$slots["calendar-icon"]?ce("",!0):(R(),Se(J(Gl),{key:1}))],42,X4)),[[sh,!J(m)(Z.hideNavigation,"time")]]):ce("",!0)],2)],14,G4)):ce("",!0)]}),_:3},8,["name","css"])])}}}),fS=(t,e,n,i)=>{const{defaultedRange:s}=jt(t),r=(x,E)=>Array.isArray(e[x])?e[x][E]:e[x],o=x=>t.enableSeconds?Array.isArray(e.seconds)?e.seconds[x]:e.seconds:0,a=(x,E)=>x?E!==void 0?to(x,r("hours",E),r("minutes",E),o(E)):to(x,e.hours,e.minutes,o()):KC(Ce(),o(E)),l=(x,E)=>{e[x]=E},c=be(()=>t.modelAuto&&s.value.enabled?Array.isArray(n.value)?n.value.length>1:!1:s.value.enabled),u=(x,E)=>{const w=Object.fromEntries(Object.keys(e).map(S=>S===x?[S,E]:[S,e[S]].slice()));if(c.value&&!s.value.disableTimeRangeValidation){const S=A=>n.value?to(n.value[A],w.hours[A],w.minutes[A],w.seconds[A]):null,T=A=>jC(n.value[A],0);return!(ct(S(0),S(1))&&(Tl(S(0),T(1))||cu(S(1),T(0))))}return!0},d=(x,E)=>{u(x,E)&&(l(x,E),i&&i())},h=x=>{d("hours",x)},f=x=>{d("minutes",x)},p=x=>{d("seconds",x)},m=(x,E,w,S)=>{E&&h(x),!E&&!w&&f(x),w&&p(x),n.value&&S(n.value)},y=x=>{if(x){const E=Array.isArray(x),w=E?[+x[0].hours,+x[1].hours]:+x.hours,S=E?[+x[0].minutes,+x[1].minutes]:+x.minutes,T=E?[+x[0].seconds,+x[1].seconds]:+x.seconds;l("hours",w),l("minutes",S),t.enableSeconds&&l("seconds",T)}},v=(x,E)=>{const w={hours:Array.isArray(e.hours)?e.hours[x]:e.hours,disabledArr:[]};return(E||E===0)&&(w.hours=E),Array.isArray(t.disabledTimes)&&(w.disabledArr=s.value.enabled&&Array.isArray(t.disabledTimes[x])?t.disabledTimes[x]:t.disabledTimes),w},b=be(()=>(x,E)=>{var w;if(Array.isArray(t.disabledTimes)){const{disabledArr:S,hours:T}=v(x,E),A=S.filter(k=>+k.hours===T);return((w=A[0])==null?void 0:w.minutes)==="*"?{hours:[T],minutes:void 0,seconds:void 0}:{hours:[],minutes:A?.map(k=>+k.minutes)??[],seconds:A?.map(k=>k.seconds?+k.seconds:void 0)??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:l,updateHours:h,updateMinutes:f,updateSeconds:p,getSetDateTime:a,updateTimeValues:m,getSecondsValue:o,assignStartTime:y,validateTime:u,disabledTimesConfig:b}},q4=(t,e)=>{const n=()=>{t.isTextInputDate&&E()},{modelValue:i,time:s}=Wu(t,e,n),{defaultedStartTime:r,defaultedRange:o,defaultedTz:a}=jt(t),{updateTimeValues:l,getSetDateTime:c,setTime:u,assignStartTime:d,disabledTimesConfig:h,validateTime:f}=fS(t,s,i,p);function p(){e("update-flow-step")}const m=S=>{const{hours:T,minutes:A,seconds:k}=S;return{hours:+T,minutes:+A,seconds:k?+k:0}},y=()=>{if(t.startTime){if(Array.isArray(t.startTime)){const T=m(t.startTime[0]),A=m(t.startTime[1]);return[Pt(Ce(),T),Pt(Ce(),A)]}const S=m(t.startTime);return Pt(Ce(),S)}return o.value.enabled?[null,null]:null},v=()=>{if(o.value.enabled){const[S,T]=y();i.value=[xi(c(S,0),a.value.timezone),xi(c(T,1),a.value.timezone)]}else i.value=xi(c(y()),a.value.timezone)},b=S=>Array.isArray(S)?[na(Ce(S[0])),na(Ce(S[1]))]:[na(S??Ce())],x=(S,T,A)=>{u("hours",S),u("minutes",T),u("seconds",t.enableSeconds?A:0)},E=()=>{const[S,T]=b(i.value);return o.value.enabled?x([S.hours,T.hours],[S.minutes,T.minutes],[S.seconds,T.seconds]):x(S.hours,S.minutes,S.seconds)};En(()=>{if(!t.shadow)return d(r.value),i.value?E():v()});const w=()=>{Array.isArray(i.value)?i.value=i.value.map((S,T)=>S&&c(S,T)):i.value=c(i.value),e("time-update")};return{modelValue:i,time:s,disabledTimesConfig:h,updateTime:(S,T=!0,A=!1)=>{l(S,T,A,w)},validateTime:f}},Z4=hn({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{..._s},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=_a(),o=ki(r,"timePicker"),a=we(null),{time:l,modelValue:c,disabledTimesConfig:u,updateTime:d,validateTime:h}=q4(s,i);return En(()=>{s.shadow||i("mount",null)}),e({getSidebarProps:()=>({modelValue:c,time:l,updateTime:d}),toggleTimePicker:(f,p=!1,m="")=>{var y;(y=a.value)==null||y.toggleTimePicker(f,p,m)}}),(f,p)=>(R(),Se(wf,{"multi-calendars":0,stretch:""},{default:De(()=>[N(hS,wn({ref_key:"tpRef",ref:a},f.$props,{hours:J(l).hours,minutes:J(l).minutes,seconds:J(l).seconds,"internal-model-value":f.internalModelValue,"disabled-times-config":J(u),"validate-time":J(h),"onUpdate:hours":p[0]||(p[0]=m=>J(d)(m)),"onUpdate:minutes":p[1]||(p[1]=m=>J(d)(m,!1)),"onUpdate:seconds":p[2]||(p[2]=m=>J(d)(m,!1,!0)),onAmPmChange:p[3]||(p[3]=m=>f.$emit("am-pm-change",m)),onResetFlow:p[4]||(p[4]=m=>f.$emit("reset-flow")),onOverlayClosed:p[5]||(p[5]=m=>f.$emit("overlay-toggle",{open:!1,overlay:m})),onOverlayOpened:p[6]||(p[6]=m=>f.$emit("overlay-toggle",{open:!0,overlay:m}))}),Un({_:2},[Ze(J(o),(m,y)=>({name:m,fn:De(v=>[Ne(f.$slots,m,In(ni(v)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),J4={class:"dp--header-wrap"},Q4={key:0,class:"dp__month_year_wrap"},eB={key:0},tB={class:"dp__month_year_wrap"},nB=["data-dp-element","aria-label","data-test","onClick","onKeydown"],iB=hn({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},..._s},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(t,{expose:e,emit:n}){const i=n,s=t,{defaultedTransitions:r,defaultedAriaLabels:o,defaultedMultiCalendars:a,defaultedFilters:l,defaultedConfig:c,defaultedHighlight:u,propDates:d,defaultedUI:h}=jt(s),{transitionName:f,showTransition:p}=zu(r),{buildMatrix:m}=_o(),{handleMonthYearChange:y,isDisabled:v,updateMonthYear:b}=S4(s,i),{showLeftIcon:x,showRightIcon:E}=Ef(),w=we(!1),S=we(!1),T=we(!1),A=we([null,null,null,null]);En(()=>{i("mount")});const k=te=>({get:()=>s[te],set:I=>{const ee=te===es.month?es.year:es.month;i("update-month-year",{[te]:I,[ee]:s[ee]}),te===es.month?z(!0):X(!0)}}),P=be(k(es.month)),B=be(k(es.year)),Y=be(()=>te=>({month:s.month,year:s.year,items:te===es.month?s.months:s.years,instance:s.instance,updateMonthYear:b,toggle:te===es.month?z:X})),ne=be(()=>s.months.find(I=>I.value===s.month)||{text:"",value:0}),$=be(()=>kl(s.months,te=>{const I=s.month===te.value,ee=uu(te.value,QC(s.year,d.value.minDate),eS(s.year,d.value.maxDate))||l.value.months.includes(te.value),ue=rS(u.value,te.value,s.year);return{active:I,disabled:ee,highlighted:ue}})),F=be(()=>kl(s.years,te=>{const I=s.year===te.value,ee=uu(te.value,Ml(d.value.minDate),Ml(d.value.maxDate))||l.value.years.includes(te.value),ue=$_(u.value,te.value);return{active:I,disabled:ee,highlighted:ue}})),D=(te,I,ee)=>{ee!==void 0?te.value=ee:te.value=!te.value,te.value?(T.value=!0,i("overlay-opened",I)):(T.value=!1,i("overlay-closed",I))},z=(te=!1,I)=>{Z(te),D(w,Yn.month,I)},X=(te=!1,I)=>{Z(te),D(S,Yn.year,I)},Z=te=>{te||i("reset-flow")},H=(te,I)=>{s.arrowNavigation&&(A.value[I]=vn(te),m(A.value,"monthYear"))},le=be(()=>{var te,I,ee,ue,L,ae;return[{type:es.month,index:1,toggle:z,modelValue:P.value,updateModelValue:de=>P.value=de,text:ne.value.text,showSelectionGrid:w.value,items:$.value,ariaLabel:(te=o.value)==null?void 0:te.openMonthsOverlay,overlayLabel:((ee=(I=o.value).monthPicker)==null?void 0:ee.call(I,!0))??void 0},{type:es.year,index:2,toggle:X,modelValue:B.value,updateModelValue:de=>B.value=de,text:JC(s.year,s.locale),showSelectionGrid:S.value,items:F.value,ariaLabel:(ue=o.value)==null?void 0:ue.openYearsOverlay,overlayLabel:((ae=(L=o.value).yearPicker)==null?void 0:ae.call(L,!0))??void 0}]}),ie=be(()=>s.disableYearSelect?[le.value[0]]:s.yearFirst?[...le.value].reverse():le.value);return e({toggleMonthPicker:z,toggleYearPicker:X,handleMonthYearChange:y}),(te,I)=>{var ee,ue,L,ae,de,ve;return R(),V("div",J4,[te.$slots["month-year"]?(R(),V("div",Q4,[Ne(te.$slots,"month-year",In(ni({month:t.month,year:t.year,months:t.months,years:t.years,updateMonthYear:J(b),handleMonthYearChange:J(y),instance:t.instance})))])):(R(),V(Oe,{key:1},[te.$slots["top-extra"]?(R(),V("div",eB,[Ne(te.$slots,"top-extra",{value:te.internalModelValue})])):ce("",!0),g("div",tB,[J(x)(J(a),t.instance)&&!te.vertical?(R(),Se(jc,{key:0,"aria-label":(ee=J(o))==null?void 0:ee.prevMonth,disabled:J(v)(!1),class:Pe((ue=J(h))==null?void 0:ue.navBtnPrev),"el-name":"action-prev",onActivate:I[0]||(I[0]=W=>J(y)(!1,!0)),onSetRef:I[1]||(I[1]=W=>H(W,0))},{default:De(()=>[te.$slots["arrow-left"]?Ne(te.$slots,"arrow-left",{key:0}):ce("",!0),te.$slots["arrow-left"]?ce("",!0):(R(),Se(J(A_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0),g("div",{class:Pe(["dp__month_year_wrap",{dp__year_disable_select:te.disableYearSelect}])},[(R(!0),V(Oe,null,Ze(ie.value,(W,fe)=>(R(),V(Oe,{key:W.type},[g("button",{ref_for:!0,ref:C=>H(C,fe+1),type:"button","data-dp-element":`overlay-${W.type}`,class:Pe(["dp__btn dp__month_year_select",{"dp--hidden-el":T.value}]),"aria-label":`${W.text}-${W.ariaLabel}`,"data-test":`${W.type}-toggle-overlay-${t.instance}`,onClick:W.toggle,onKeydown:C=>J(ii)(C,()=>W.toggle(),!0)},[te.$slots[W.type]?Ne(te.$slots,W.type,{key:0,text:W.text,value:s[W.type]}):ce("",!0),te.$slots[W.type]?ce("",!0):(R(),V(Oe,{key:1},[Ue(xe(W.text),1)],64))],42,nB),N($t,{name:J(f)(W.showSelectionGrid),css:J(p)},{default:De(()=>[W.showSelectionGrid?(R(),Se(Vu,{key:0,items:W.items,"arrow-navigation":te.arrowNavigation,"hide-navigation":te.hideNavigation,"is-last":te.autoApply&&!J(c).keepActionRow,"skip-button-ref":!1,config:te.config,type:W.type,"header-refs":[],"esc-close":te.escClose,"menu-wrap-ref":te.menuWrapRef,"text-input":te.textInput,"aria-labels":te.ariaLabels,"overlay-label":W.overlayLabel,onSelected:W.updateModelValue,onToggle:W.toggle},Un({"button-icon":De(()=>[te.$slots["calendar-icon"]?Ne(te.$slots,"calendar-icon",{key:0}):ce("",!0),te.$slots["calendar-icon"]?ce("",!0):(R(),Se(J(Gl),{key:1}))]),_:2},[te.$slots[`${W.type}-overlay-value`]?{name:"item",fn:De(({item:C})=>[Ne(te.$slots,`${W.type}-overlay-value`,{text:C.text,value:C.value})]),key:"0"}:void 0,te.$slots[`${W.type}-overlay`]?{name:"overlay",fn:De(()=>[Ne(te.$slots,`${W.type}-overlay`,wn({ref_for:!0},Y.value(W.type)))]),key:"1"}:void 0,te.$slots[`${W.type}-overlay-header`]?{name:"header",fn:De(()=>[Ne(te.$slots,`${W.type}-overlay-header`,{toggle:W.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","overlay-label","onSelected","onToggle"])):ce("",!0)]),_:2},1032,["name","css"])],64))),128))],2),J(x)(J(a),t.instance)&&te.vertical?(R(),Se(jc,{key:1,"aria-label":(L=J(o))==null?void 0:L.prevMonth,"el-name":"action-prev",disabled:J(v)(!1),class:Pe((ae=J(h))==null?void 0:ae.navBtnPrev),onActivate:I[2]||(I[2]=W=>J(y)(!1,!0))},{default:De(()=>[te.$slots["arrow-up"]?Ne(te.$slots,"arrow-up",{key:0}):ce("",!0),te.$slots["arrow-up"]?ce("",!0):(R(),Se(J(P_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0),J(E)(J(a),t.instance)?(R(),Se(jc,{key:2,ref:"rightIcon","el-name":"action-next",disabled:J(v)(!0),"aria-label":(de=J(o))==null?void 0:de.nextMonth,class:Pe((ve=J(h))==null?void 0:ve.navBtnNext),onActivate:I[3]||(I[3]=W=>J(y)(!0,!0)),onSetRef:I[4]||(I[4]=W=>H(W,te.disableYearSelect?2:3))},{default:De(()=>[te.$slots[te.vertical?"arrow-down":"arrow-right"]?Ne(te.$slots,te.vertical?"arrow-down":"arrow-right",{key:0}):ce("",!0),te.$slots[te.vertical?"arrow-down":"arrow-right"]?ce("",!0):(R(),Se(ma(te.vertical?J(I_):J(k_)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):ce("",!0)])],64))])}}}),sB={class:"dp__calendar_header",role:"row"},rB={key:0,class:"dp__calendar_header_item",role:"gridcell"},oB=["aria-label"],aB={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},lB={class:"dp__cell_inner"},cB=["id","aria-pressed","aria-disabled","aria-label","tabindex","data-test","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],uB=hn({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},..._s},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(t,{expose:e,emit:n}){const i=n,s=t,{buildMultiLevelMatrix:r}=_o(),{defaultedTransitions:o,defaultedConfig:a,defaultedAriaLabels:l,defaultedMultiCalendars:c,defaultedWeekNumbers:u,defaultedMultiDates:d,defaultedUI:h}=jt(s),f=we(null),p=we({bottom:"",left:"",transform:""}),m=we([]),y=we(null),v=we(!0),b=we(""),x=we({startX:0,endX:0,startY:0,endY:0}),E=we([]),w=we({left:"50%"}),S=we(!1),T=be(()=>s.calendar?s.calendar(s.mappedDates):s.mappedDates),A=be(()=>s.dayNames?Array.isArray(s.dayNames)?s.dayNames:s.dayNames(s.locale,+s.weekStart):U5(s.formatLocale,s.locale,+s.weekStart));En(()=>{i("mount",{cmp:"calendar",refs:m}),a.value.noSwipe||y.value&&(y.value.addEventListener("touchstart",H,{passive:!1}),y.value.addEventListener("touchend",le,{passive:!1}),y.value.addEventListener("touchmove",ie,{passive:!1})),s.monthChangeOnScroll&&y.value&&y.value.addEventListener("wheel",ee,{passive:!1})});const k=W=>W?s.vertical?"vNext":"next":s.vertical?"vPrevious":"previous",P=(W,fe)=>{if(s.transitions){const C=oi(ar(Ce(),s.month,s.year));b.value=on(oi(ar(Ce(),W,fe)),C)?o.value[k(!0)]:o.value[k(!1)],v.value=!1,Rn(()=>{v.value=!0})}},B=be(()=>({...h.value.calendar??{}})),Y=be(()=>W=>{const fe=X5(W);return{dp__marker_dot:fe.type==="dot",dp__marker_line:fe.type==="line"}}),ne=be(()=>W=>ct(W,f.value)),$=be(()=>({dp__calendar:!0,dp__calendar_next:c.value.count>0&&s.instance!==0})),F=be(()=>W=>s.hideOffsetDates?W.current:!0),D=async(W,fe)=>{const{width:C,height:O}=W.getBoundingClientRect();f.value=fe.value;let K={left:`${C/2}px`},U=-50;if(await Rn(),E.value[0]){const{left:re,width:j}=E.value[0].getBoundingClientRect();re<0&&(K={left:"0"},U=0,w.value.left=`${C/2}px`),window.innerWidth{var O,K,U;const re=vn(m.value[fe][C]);re&&((O=W.marker)!=null&&O.customPosition&&(U=(K=W.marker)==null?void 0:K.tooltip)!=null&&U.length?p.value=W.marker.customPosition(re):await D(re,W),i("tooltip-open",W.marker))},X=async(W,fe,C)=>{var O,K;if(S.value&&d.value.enabled&&d.value.dragSelect)return i("select-date",W);i("set-hover-date",W),(K=(O=W.marker)==null?void 0:O.tooltip)!=null&&K.length&&await z(W,fe,C)},Z=W=>{f.value&&(f.value=null,p.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),i("tooltip-close",W.marker))},H=W=>{x.value.startX=W.changedTouches[0].screenX,x.value.startY=W.changedTouches[0].screenY},le=W=>{x.value.endX=W.changedTouches[0].screenX,x.value.endY=W.changedTouches[0].screenY,te()},ie=W=>{s.vertical&&!s.inline&&W.preventDefault()},te=()=>{const W=s.vertical?"Y":"X";Math.abs(x.value[`start${W}`]-x.value[`end${W}`])>10&&i("handle-swipe",x.value[`start${W}`]>x.value[`end${W}`]?"right":"left")},I=(W,fe,C)=>{W&&(Array.isArray(m.value[fe])?m.value[fe][C]=W:m.value[fe]=[W]),s.arrowNavigation&&r(m.value,"calendar")},ee=W=>{s.monthChangeOnScroll&&(W.preventDefault(),i("handle-scroll",W))},ue=W=>u.value.type==="local"?C_(W.value,{weekStartsOn:+s.weekStart}):u.value.type==="iso"?x_(W.value):typeof u.value.type=="function"?u.value.type(W.value):"",L=W=>{const fe=W[0];return u.value.hideOnOffsetDates?W.some(C=>C.current)?ue(fe):"":ue(fe)},ae=(W,fe,C=!0)=>{C&&db()||!C&&!db()||d.value.enabled||(eo(W,a.value),i("select-date",fe))},de=W=>{eo(W,a.value)},ve=W=>{d.value.enabled&&d.value.dragSelect?(S.value=!0,i("select-date",W)):d.value.enabled&&i("select-date",W)};return e({triggerTransition:P}),(W,fe)=>(R(),V("div",{class:Pe($.value)},[g("div",{ref_key:"calendarWrapRef",ref:y,class:Pe(B.value),role:"grid"},[g("div",sB,[W.weekNumbers?(R(),V("div",rB,xe(W.weekNumName),1)):ce("",!0),(R(!0),V(Oe,null,Ze(A.value,(C,O)=>{var K,U;return R(),V("div",{key:O,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(U=(K=J(l))==null?void 0:K.weekDay)==null?void 0:U.call(K,O)},[W.$slots["calendar-header"]?Ne(W.$slots,"calendar-header",{key:0,day:C,index:O}):ce("",!0),W.$slots["calendar-header"]?ce("",!0):(R(),V(Oe,{key:1},[Ue(xe(C),1)],64))],8,oB)}),128))]),fe[2]||(fe[2]=g("div",{class:"dp__calendar_header_separator"},null,-1)),N($t,{name:b.value,css:!!W.transitions},{default:De(()=>[v.value?(R(),V("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:fe[1]||(fe[1]=C=>S.value=!1)},[(R(!0),V(Oe,null,Ze(T.value,(C,O)=>(R(),V("div",{key:O,class:"dp__calendar_row",role:"row"},[W.weekNumbers?(R(),V("div",aB,[g("div",lB,xe(L(C.days)),1)])):ce("",!0),(R(!0),V(Oe,null,Ze(C.days,(K,U)=>{var re,j,se;return R(),V("div",{id:J(oS)(K.value),ref_for:!0,ref:Q=>I(Q,O,U),key:U+O,role:"gridcell",class:"dp__calendar_item","aria-pressed":(K.classData.dp__active_date||K.classData.dp__range_start||K.classData.dp__range_start)??void 0,"aria-disabled":K.classData.dp__cell_disabled||void 0,"aria-label":(j=(re=J(l))==null?void 0:re.day)==null?void 0:j.call(re,K),tabindex:!K.current&&W.hideOffsetDates?void 0:0,"data-test":K.value,onClick:ru(Q=>ae(Q,K),["prevent"]),onTouchend:Q=>ae(Q,K,!1),onKeydown:Q=>J(ii)(Q,()=>W.$emit("select-date",K)),onMouseenter:Q=>X(K,O,U),onMouseleave:Q=>Z(K),onMousedown:Q=>ve(K),onMouseup:fe[0]||(fe[0]=Q=>S.value=!1)},[g("div",{class:Pe(["dp__cell_inner",K.classData])},[W.$slots.day&&F.value(K)?Ne(W.$slots,"day",{key:0,day:+K.text,date:K.value}):ce("",!0),W.$slots.day?ce("",!0):(R(),V(Oe,{key:1},[Ue(xe(K.text),1)],64)),K.marker&&F.value(K)?(R(),V(Oe,{key:2},[W.$slots.marker?Ne(W.$slots,"marker",{key:0,marker:K.marker,day:+K.text,date:K.value}):(R(),V("div",{key:1,class:Pe(Y.value(K.marker)),style:Pn(K.marker.color?{backgroundColor:K.marker.color}:{})},null,6))],64)):ce("",!0),ne.value(K.value)?(R(),V("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:E,class:"dp__marker_tooltip",style:Pn(p.value)},[(se=K.marker)!=null&&se.tooltip?(R(),V("div",{key:0,class:"dp__tooltip_content",onClick:de},[(R(!0),V(Oe,null,Ze(K.marker.tooltip,(Q,ge)=>(R(),V("div",{key:ge,class:"dp__tooltip_text"},[W.$slots["marker-tooltip"]?Ne(W.$slots,"marker-tooltip",{key:0,tooltip:Q,day:K.value}):ce("",!0),W.$slots["marker-tooltip"]?ce("",!0):(R(),V(Oe,{key:1},[g("div",{class:"dp__tooltip_mark",style:Pn(Q.color?{backgroundColor:Q.color}:{})},null,4),g("div",null,xe(Q.text),1)],64))]))),128)),g("div",{class:"dp__arrow_bottom_tp",style:Pn(w.value)},null,4)])):ce("",!0)],4)):ce("",!0)],2)],40,cB)}),128))]))),128))],32)):ce("",!0)]),_:3},8,["name","css"])],2)],2))}}),mb=t=>Array.isArray(t),dB=(t,e,n,i)=>{const s=we([]),r=we(new Date),o=we(),a=()=>H(t.isTextInputDate),{modelValue:l,calendars:c,time:u,today:d}=Wu(t,e,a),{defaultedMultiCalendars:h,defaultedStartTime:f,defaultedRange:p,defaultedConfig:m,defaultedTz:y,propDates:v,defaultedMultiDates:b}=jt(t),{validateMonthYearInRange:x,isDisabled:E,isDateRangeAllowed:w,checkMinMaxRange:S}=yo(t),{updateTimeValues:T,getSetDateTime:A,setTime:k,assignStartTime:P,validateTime:B,disabledTimesConfig:Y}=fS(t,u,l,i),ne=be(()=>oe=>c.value[oe]?c.value[oe].month:0),$=be(()=>oe=>c.value[oe]?c.value[oe].year:0),F=oe=>!m.value.keepViewOnOffsetClick||oe?!0:!o.value,D=(oe,Te,he,Ae=!1)=>{var Le,Ut;F(Ae)&&(c.value[oe]||(c.value[oe]={month:0,year:0}),c.value[oe].month=ub(Te)?(Le=c.value[oe])==null?void 0:Le.month:Te,c.value[oe].year=ub(he)?(Ut=c.value[oe])==null?void 0:Ut.year:he)},z=()=>{t.autoApply&&e("select-date")};En(()=>{t.shadow||(l.value||(W(),f.value&&P(f.value)),H(!0),t.focusStartDate&&t.startDate&&W())});const X=be(()=>{var oe;return(oe=t.flow)!=null&&oe.length&&!t.partialFlow?t.flowStep===t.flow.length:!0}),Z=()=>{t.autoApply&&X.value&&e("auto-apply",t.partialFlow?t.flowStep!==t.flow.length:!1)},H=(oe=!1)=>{if(l.value)return Array.isArray(l.value)?(s.value=l.value,L(oe)):te(l.value,oe);if(h.value.count&&oe&&!t.startDate)return ie(Ce(),oe)},le=()=>Array.isArray(l.value)&&p.value.enabled?at(l.value[0])===at(l.value[1]??l.value[0]):!1,ie=(oe=new Date,Te=!1)=>{if((!h.value.count||!h.value.static||Te)&&D(0,at(oe),Xe(oe)),h.value.count&&(!h.value.solo||!l.value||le()))for(let he=1;he{ie(oe),k("hours",yr(oe)),k("minutes",ao(oe)),k("seconds",Sl(oe)),h.value.count&&Te&&ve()},I=oe=>{if(h.value.count){if(h.value.solo)return 0;const Te=at(oe[0]),he=at(oe[1]);return Math.abs(he-Te){oe[1]&&p.value.showLastInRange?ie(oe[I(oe)],Te):ie(oe[0],Te);const he=(Ae,Le)=>[Ae(oe[0]),oe[1]?Ae(oe[1]):u[Le][1]];k("hours",he(yr,"hours")),k("minutes",he(ao,"minutes")),k("seconds",he(Sl,"seconds"))},ue=(oe,Te)=>{if((p.value.enabled||t.weekPicker)&&!b.value.enabled)return ee(oe,Te);if(b.value.enabled&&Te){const he=oe[oe.length-1];return te(he,Te)}},L=oe=>{const Te=l.value;ue(Te,oe),h.value.count&&h.value.solo&&ve()},ae=(oe,Te)=>{const he=Pt(Ce(),{month:ne.value(Te),year:$.value(Te)}),Ae=oe<0?ds(he,1):Al(he,1);x(at(Ae),Xe(Ae),oe<0,t.preventMinMaxNavigation)&&(D(Te,at(Ae),Xe(Ae)),e("update-month-year",{instance:Te,month:at(Ae),year:Xe(Ae)}),h.value.count&&!h.value.solo&&de(Te),n())},de=oe=>{for(let Te=oe-1;Te>=0;Te--){const he=Al(Pt(Ce(),{month:ne.value(Te+1),year:$.value(Te+1)}),1);D(Te,at(he),Xe(he))}for(let Te=oe+1;Te<=h.value.count-1;Te++){const he=ds(Pt(Ce(),{month:ne.value(Te-1),year:$.value(Te-1)}),1);D(Te,at(he),Xe(he))}},ve=()=>{if(Array.isArray(l.value)&&l.value.length===2){const oe=Ce(Ce(l.value[1]?l.value[1]:ds(l.value[0],1))),[Te,he]=[at(l.value[0]),Xe(l.value[0])],[Ae,Le]=[at(l.value[1]),Xe(l.value[1])];(Te!==Ae||Te===Ae&&he!==Le)&&h.value.solo&&D(1,at(oe),Xe(oe))}else l.value&&!Array.isArray(l.value)&&(D(0,at(l.value),Xe(l.value)),ie(Ce()))},W=()=>{t.startDate&&(D(0,at(Ce(t.startDate)),Xe(Ce(t.startDate))),h.value.count&&de(0))},fe=(oe,Te)=>{if(t.monthChangeOnScroll){const he=new Date().getTime()-r.value.getTime(),Ae=Math.abs(oe.deltaY);let Le=500;Ae>1&&(Le=100),Ae>100&&(Le=0),he>Le&&(r.value=new Date,ae(t.monthChangeOnScroll!=="inverse"?-oe.deltaY:oe.deltaY,Te))}},C=(oe,Te,he=!1)=>{t.monthChangeOnArrows&&t.vertical===he&&O(oe,Te)},O=(oe,Te)=>{ae(oe==="right"?-1:1,Te)},K=oe=>{if(v.value.markers)return Eh(oe.value,v.value.markers)},U=(oe,Te)=>{switch(t.sixWeeks===!0?"append":t.sixWeeks){case"prepend":return[!0,!1];case"center":return[oe==0,!0];case"fair":return[oe==0||Te>oe,!0];case"append":return[!1,!1];default:return[!1,!1]}},re=(oe,Te,he,Ae)=>{if(t.sixWeeks&&oe.length<6){const Le=6-oe.length,Ut=(Te.getDay()+7-Ae)%7,gn=6-(he.getDay()+7-Ae)%7,[Ri,Ws]=U(Ut,gn);for(let pn=1;pn<=Le;pn++)if(Ws?!!(pn%2)==Ri:Ri){const Cn=oe[0].days[0],Sn=j(ss(Cn.value,-7),at(Te));oe.unshift({days:Sn})}else{const Cn=oe[oe.length-1],Sn=Cn.days[Cn.days.length-1],ai=j(ss(Sn.value,1),at(Te));oe.push({days:ai})}}return oe},j=(oe,Te)=>{const he=Ce(oe),Ae=[];for(let Le=0;Le<7;Le++){const Ut=ss(he,Le),gn=at(Ut)!==Te;Ae.push({text:t.hideOffsetDates&&gn?"":Ut.getDate(),value:Ut,current:!gn,classData:{}})}return Ae},se=(oe,Te)=>{const he=[],Ae=new Date(Te,oe),Le=new Date(Te,oe+1,0),Ut=t.weekStart,gn=ps(Ae,{weekStartsOn:Ut}),Ri=Ws=>{const pn=j(Ws,oe);if(he.push({days:pn}),!he[he.length-1].days.some(Cn=>ct(oi(Cn.value),oi(Le)))){const Cn=ss(Ws,7);Ri(Cn)}};return Ri(gn),re(he,Ae,Le,Ut)},Q=oe=>{const Te=to(Ce(oe.value),u.hours,u.minutes,ze());e("date-update",Te),b.value.enabled?N_(Te,l,b.value.limit):l.value=Te,i(),Rn().then(()=>{Z()})},ge=oe=>p.value.noDisabledRange?tS(s.value[0],oe).some(Te=>E(Te)):!1,_e=()=>{s.value=l.value?l.value.slice():[],s.value.length===2&&!(p.value.fixedStart||p.value.fixedEnd)&&(s.value=[])},ye=(oe,Te)=>{const he=[Ce(oe.value),ss(Ce(oe.value),+p.value.autoRange)];w(he)?(Te&&ke(oe.value),s.value=he):e("invalid-date",oe.value)},ke=oe=>{const Te=at(Ce(oe)),he=Xe(Ce(oe));if(D(0,Te,he),h.value.count>0)for(let Ae=1;Ae{if(ge(oe.value)||!S(oe.value,l.value,p.value.fixedStart?0:1))return e("invalid-date",oe.value);s.value=uS(Ce(oe.value),l,e,p)},Be=(oe,Te)=>{if(_e(),p.value.autoRange)return ye(oe,Te);if(p.value.fixedStart||p.value.fixedEnd)return Me(oe);s.value[0]?S(Ce(oe.value),l.value)&&!ge(oe.value)?Qt(Ce(oe.value),Ce(s.value[0]))?(s.value.unshift(Ce(oe.value)),e("range-end",s.value[0])):(s.value[1]=Ce(oe.value),e("range-end",s.value[1])):(t.autoApply&&e("auto-apply-invalid",oe.value),e("invalid-date",oe.value)):(s.value[0]=Ce(oe.value),e("range-start",s.value[0]))},ze=(oe=!0)=>t.enableSeconds?Array.isArray(u.seconds)?oe?u.seconds[0]:u.seconds[1]:u.seconds:0,nt=oe=>{s.value[oe]=to(s.value[oe],u.hours[oe],u.minutes[oe],ze(oe!==1))},Qe=()=>{var oe,Te;s.value[0]&&s.value[1]&&+((oe=s.value)==null?void 0:oe[0])>+((Te=s.value)==null?void 0:Te[1])&&(s.value.reverse(),e("range-start",s.value[0]),e("range-end",s.value[1]))},qt=()=>{s.value.length&&(s.value[0]&&!s.value[1]?nt(0):(nt(0),nt(1),i()),Qe(),l.value=s.value.slice(),xf(s.value,e,t.autoApply,t.modelAuto))},Bt=(oe,Te=!1)=>{if(E(oe.value)||!oe.current&&t.hideOffsetDates)return e("invalid-date",oe.value);if(o.value=JSON.parse(JSON.stringify(oe)),!p.value.enabled)return Q(oe);mb(u.hours)&&mb(u.minutes)&&!b.value.enabled&&(Be(oe,Te),qt())},fn=(oe,Te)=>{var he;D(oe,Te.month,Te.year,!0),h.value.count&&!h.value.solo&&de(oe),e("update-month-year",{instance:oe,month:Te.month,year:Te.year}),n(h.value.solo?oe:void 0);const Ae=(he=t.flow)!=null&&he.length?t.flow[t.flowStep]:void 0;!Te.fromNav&&(Ae===Yn.month||Ae===Yn.year)&&i()},Kt=(oe,Te)=>{cS({value:oe,modelValue:l,range:p.value.enabled,timezone:Te?void 0:y.value.timezone}),z(),t.multiCalendars&&Rn().then(()=>H(!0))},Ei=()=>{const oe=D_(Ce(),y.value);p.value.enabled?l.value&&Array.isArray(l.value)&&l.value[0]?l.value=Qt(oe,l.value[0])?[oe,l.value[0]]:[l.value[0],oe]:l.value=[oe]:l.value=oe,z()},Xi=()=>{if(Array.isArray(l.value))if(b.value.enabled){const oe=Zt();l.value[l.value.length-1]=A(oe)}else l.value=l.value.map((oe,Te)=>oe&&A(oe,Te));else l.value=A(l.value);e("time-update")},Zt=()=>Array.isArray(l.value)&&l.value.length?l.value[l.value.length-1]:null;return{calendars:c,modelValue:l,month:ne,year:$,time:u,disabledTimesConfig:Y,today:d,validateTime:B,getCalendarDays:se,getMarker:K,handleScroll:fe,handleSwipe:O,handleArrow:C,selectDate:Bt,updateMonthYear:fn,presetDate:Kt,selectCurrentDate:Ei,updateTime:(oe,Te=!0,he=!1)=>{T(oe,Te,he,Xi)},assignMonthAndYear:ie}},hB={key:0},fB=hn({__name:"DatePicker",props:{..._s},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=t,{calendars:r,month:o,year:a,modelValue:l,time:c,disabledTimesConfig:u,today:d,validateTime:h,getCalendarDays:f,getMarker:p,handleArrow:m,handleScroll:y,handleSwipe:v,selectDate:b,updateMonthYear:x,presetDate:E,selectCurrentDate:w,updateTime:S,assignMonthAndYear:T}=dB(s,i,le,ie),A=_a(),{setHoverDate:k,getDayClassData:P,clearHoverDate:B}=kB(l,s),{defaultedMultiCalendars:Y}=jt(s),ne=we([]),$=we([]),F=we(null),D=ki(A,"calendar"),z=ki(A,"monthYear"),X=ki(A,"timePicker"),Z=fe=>{s.shadow||i("mount",fe)};un(r,()=>{s.shadow||setTimeout(()=>{i("recalculate-position")},0)},{deep:!0}),un(Y,(fe,C)=>{fe.count-C.count>0&&T()},{deep:!0});const H=be(()=>fe=>f(o.value(fe),a.value(fe)).map(C=>({...C,days:C.days.map(O=>(O.marker=p(O),O.classData=P(O),O))})));function le(fe){var C;fe||fe===0?(C=$.value[fe])==null||C.triggerTransition(o.value(fe),a.value(fe)):$.value.forEach((O,K)=>O.triggerTransition(o.value(K),a.value(K)))}function ie(){i("update-flow-step")}const te=(fe,C=!1)=>{b(fe,C),s.spaceConfirm&&i("select-date")},I=(fe,C,O=0)=>{var K;(K=ne.value[O])==null||K.toggleMonthPicker(fe,C)},ee=(fe,C,O=0)=>{var K;(K=ne.value[O])==null||K.toggleYearPicker(fe,C)},ue=(fe,C,O)=>{var K;(K=F.value)==null||K.toggleTimePicker(fe,C,O)},L=(fe,C)=>{var O;if(!s.range){const K=l.value?l.value:d,U=C?new Date(C):K,re=fe?ps(U,{weekStartsOn:1}):OC(U,{weekStartsOn:1});b({value:re,current:at(U)===o.value(0),text:"",classData:{}}),(O=document.getElementById(oS(re)))==null||O.focus()}},ae=fe=>{var C;(C=ne.value[0])==null||C.handleMonthYearChange(fe,!0)},de=fe=>{x(0,{month:o.value(0),year:a.value(0)+(fe?1:-1),fromNav:!0})},ve=(fe,C)=>{fe===Yn.time&&i(`time-picker-${C?"open":"close"}`),i("overlay-toggle",{open:C,overlay:fe})},W=fe=>{i("overlay-toggle",{open:!1,overlay:fe}),i("focus-menu")};return e({clearHoverDate:B,presetDate:E,selectCurrentDate:w,toggleMonthPicker:I,toggleYearPicker:ee,toggleTimePicker:ue,handleArrow:m,updateMonthYear:x,getSidebarProps:()=>({modelValue:l,month:o,year:a,time:c,updateTime:S,updateMonthYear:x,selectDate:b,presetDate:E}),changeMonth:ae,changeYear:de,selectWeekDate:L}),(fe,C)=>(R(),V(Oe,null,[N(wf,{"multi-calendars":J(Y).count,collapse:fe.collapse},{default:De(({instance:O,index:K})=>[fe.disableMonthYearSelect?ce("",!0):(R(),Se(iB,wn({key:0,ref:U=>{U&&(ne.value[K]=U)},months:J(XC)(fe.formatLocale,fe.locale,fe.monthNameFormat),years:J(R_)(fe.yearRange,fe.locale,fe.reverseYears),month:J(o)(O),year:J(a)(O),instance:O},fe.$props,{onMount:C[0]||(C[0]=U=>Z(J(ta).header)),onResetFlow:C[1]||(C[1]=U=>fe.$emit("reset-flow")),onUpdateMonthYear:U=>J(x)(O,U),onOverlayClosed:W,onOverlayOpened:C[2]||(C[2]=U=>fe.$emit("overlay-toggle",{open:!0,overlay:U}))}),Un({_:2},[Ze(J(z),(U,re)=>({name:U,fn:De(j=>[Ne(fe.$slots,U,In(ni(j)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),N(uB,wn({ref:U=>{U&&($.value[K]=U)},"mapped-dates":H.value(O),month:J(o)(O),year:J(a)(O),instance:O},fe.$props,{onSelectDate:U=>J(b)(U,O!==1),onHandleSpace:U=>te(U,O!==1),onSetHoverDate:C[3]||(C[3]=U=>J(k)(U)),onHandleScroll:U=>J(y)(U,O),onHandleSwipe:U=>J(v)(U,O),onMount:C[4]||(C[4]=U=>Z(J(ta).calendar)),onResetFlow:C[5]||(C[5]=U=>fe.$emit("reset-flow")),onTooltipOpen:C[6]||(C[6]=U=>fe.$emit("tooltip-open",U)),onTooltipClose:C[7]||(C[7]=U=>fe.$emit("tooltip-close",U))}),Un({_:2},[Ze(J(D),(U,re)=>({name:U,fn:De(j=>[Ne(fe.$slots,U,In(ni({...j})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),fe.enableTimePicker?(R(),V("div",hB,[fe.$slots["time-picker"]?Ne(fe.$slots,"time-picker",In(wn({key:0},{time:J(c),updateTime:J(S)}))):(R(),Se(hS,wn({key:1,ref_key:"timePickerRef",ref:F},fe.$props,{hours:J(c).hours,minutes:J(c).minutes,seconds:J(c).seconds,"internal-model-value":fe.internalModelValue,"disabled-times-config":J(u),"validate-time":J(h),onMount:C[8]||(C[8]=O=>Z(J(ta).timePicker)),"onUpdate:hours":C[9]||(C[9]=O=>J(S)(O)),"onUpdate:minutes":C[10]||(C[10]=O=>J(S)(O,!1)),"onUpdate:seconds":C[11]||(C[11]=O=>J(S)(O,!1,!0)),onResetFlow:C[12]||(C[12]=O=>fe.$emit("reset-flow")),onOverlayClosed:C[13]||(C[13]=O=>ve(O,!1)),onOverlayOpened:C[14]||(C[14]=O=>ve(O,!0)),onAmPmChange:C[15]||(C[15]=O=>fe.$emit("am-pm-change",O))}),Un({_:2},[Ze(J(X),(O,K)=>({name:O,fn:De(U=>[Ne(fe.$slots,O,In(ni(U)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):ce("",!0)],64))}}),gB=(t,e)=>{const n=we(),{defaultedMultiCalendars:i,defaultedConfig:s,defaultedHighlight:r,defaultedRange:o,propDates:a,defaultedFilters:l,defaultedMultiDates:c}=jt(t),{modelValue:u,year:d,month:h,calendars:f}=Wu(t,e),{isDisabled:p}=yo(t),{selectYear:m,groupedYears:y,showYearPicker:v,isDisabled:b,toggleYearPicker:x,handleYearSelect:E,handleYear:w}=dS({modelValue:u,multiCalendars:i,range:o,highlight:r,calendars:f,propDates:a,month:h,year:d,filters:l,props:t,emit:e}),S=(F,D)=>[F,D].map(z=>Os(z,"MMMM",{locale:t.formatLocale})).join("-"),T=be(()=>F=>u.value?Array.isArray(u.value)?u.value.some(D=>ab(F,D)):ab(u.value,F):!1),A=F=>{if(o.value.enabled){if(Array.isArray(u.value)){const D=ct(F,u.value[0])||ct(F,u.value[1]);return vf(u.value,n.value,F)&&!D}return!1}return!1},k=(F,D)=>F.quarter===tb(D)&&F.year===Xe(D),P=F=>typeof r.value=="function"?r.value({quarter:tb(F),year:Xe(F)}):!!r.value.quarters.find(D=>k(D,F)),B=be(()=>F=>{const D=Pt(new Date,{year:d.value(F)});return G3({start:lu(D),end:LC(D)}).map(z=>{const X=Uo(z),Z=nb(z),H=p(z),le=A(X),ie=P(X);return{text:S(X,Z),value:X,active:T.value(X),highlighted:ie,disabled:H,isBetween:le}})}),Y=F=>{N_(F,u,c.value.limit),e("auto-apply",!0)},ne=F=>{u.value=F_(u,F,e),xf(u.value,e,t.autoApply,t.modelAuto)},$=F=>{u.value=F,e("auto-apply")};return{defaultedConfig:s,defaultedMultiCalendars:i,groupedYears:y,year:d,isDisabled:b,quarters:B,showYearPicker:v,modelValue:u,setHoverDate:F=>{n.value=F},selectYear:m,selectQuarter:(F,D,z)=>{if(!z)return f.value[D].month=at(nb(F)),c.value.enabled?Y(F):o.value.enabled?ne(F):$(F)},toggleYearPicker:x,handleYearSelect:E,handleYear:w}},pB={class:"dp--quarter-items"},mB=["data-test","disabled","onClick","onMouseover"],_B=hn({compatConfig:{MODE:3},__name:"QuarterPicker",props:{..._s},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=_a(),o=ki(r,"yearMode"),{defaultedMultiCalendars:a,defaultedConfig:l,groupedYears:c,year:u,isDisabled:d,quarters:h,modelValue:f,showYearPicker:p,setHoverDate:m,selectQuarter:y,toggleYearPicker:v,handleYearSelect:b,handleYear:x}=gB(s,i);return e({getSidebarProps:()=>({modelValue:f,year:u,selectQuarter:y,handleYearSelect:b,handleYear:x})}),(E,w)=>(R(),Se(wf,{"multi-calendars":J(a).count,collapse:E.collapse,stretch:""},{default:De(({instance:S})=>[g("div",{class:"dp-quarter-picker-wrap",style:Pn({minHeight:`${J(l).modeHeight}px`})},[E.$slots["top-extra"]?Ne(E.$slots,"top-extra",{key:0,value:E.internalModelValue}):ce("",!0),g("div",null,[N(lS,wn(E.$props,{items:J(c)(S),instance:S,"show-year-picker":J(p)[S],year:J(u)(S),"is-disabled":T=>J(d)(S,T),onHandleYear:T=>J(x)(S,T),onYearSelect:T=>J(b)(T,S),onToggleYearPicker:T=>J(v)(S,T?.flow,T?.show)}),Un({_:2},[Ze(J(o),(T,A)=>({name:T,fn:De(k=>[Ne(E.$slots,T,In(ni(k)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),g("div",pB,[(R(!0),V(Oe,null,Ze(J(h)(S),(T,A)=>(R(),V("div",{key:A},[g("button",{type:"button",class:Pe(["dp--qr-btn",{"dp--qr-btn-active":T.active,"dp--qr-btn-between":T.isBetween,"dp--qr-btn-disabled":T.disabled,"dp--highlighted":T.highlighted}]),"data-test":T.value,disabled:T.disabled,onClick:k=>J(y)(T.value,S,T.disabled),onMouseover:k=>J(m)(T.value)},[E.$slots.quarter?Ne(E.$slots,"quarter",{key:0,value:T.value,text:T.text}):(R(),V(Oe,{key:1},[Ue(xe(T.text),1)],64))],42,mB)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),yB=["id","tabindex","role","aria-label"],vB={key:0,class:"dp--menu-load-container"},bB={key:1,class:"dp--menu-header"},wB={key:0,class:"dp__sidebar_left"},xB=["data-test","onClick","onKeydown"],EB={key:2,class:"dp__sidebar_right"},CB={key:3,class:"dp__action_extra"},_b=hn({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...bf,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=we(null),o=be(()=>{const{openOnTop:j,...se}=s;return{...se,flowStep:k.value,collapse:s.collapse,noOverlayFocus:s.noOverlayFocus,menuWrapRef:r.value}}),{setMenuFocused:a,setShiftKey:l,control:c}=aS(),u=_a(),{defaultedTextInput:d,defaultedInline:h,defaultedConfig:f,defaultedUI:p}=jt(s),m=we(null),y=we(0),v=we(null),b=we(!1),x=we(null);En(()=>{if(!s.shadow){b.value=!0,E(),window.addEventListener("resize",E);const j=vn(r);if(j&&!d.value.enabled&&!h.value.enabled&&(a(!0),D()),j){const se=Q=>{f.value.allowPreventDefault&&Q.preventDefault(),eo(Q,f.value,!0)};j.addEventListener("pointerdown",se),j.addEventListener("mousedown",se)}}}),pa(()=>{window.removeEventListener("resize",E)});const E=()=>{const j=vn(v);j&&(y.value=j.getBoundingClientRect().width)},{arrowRight:w,arrowLeft:S,arrowDown:T,arrowUp:A}=_o(),{flowStep:k,updateFlowStep:P,childMount:B,resetFlow:Y,handleFlow:ne}=MB(s,i,x),$=be(()=>s.monthPicker?$4:s.yearPicker?F4:s.timePicker?Z4:s.quarterPicker?_B:fB),F=be(()=>{var j;if(f.value.arrowLeft)return f.value.arrowLeft;const se=(j=r.value)==null?void 0:j.getBoundingClientRect(),Q=s.getInputRect();return Q?.width=(se?.right??0)&&Q?.width{const j=vn(r);j&&j.focus({preventScroll:!0})},z=be(()=>{var j;return((j=x.value)==null?void 0:j.getSidebarProps())||{}}),X=()=>{s.openOnTop&&i("recalculate-position")},Z=ki(u,"action"),H=be(()=>s.monthPicker||s.yearPicker?ki(u,"monthYear"):s.timePicker?ki(u,"timePicker"):ki(u,"shared")),le=be(()=>s.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),ie=be(()=>({dp__menu_disabled:s.disabled,dp__menu_readonly:s.readonly,"dp-menu-loading":s.loading})),te=be(()=>({dp__menu:!0,dp__menu_index:!h.value.enabled,dp__relative:h.value.enabled,...p.value.menu??{}})),I=j=>{eo(j,f.value,!0)},ee=()=>{s.escClose&&i("close-picker")},ue=j=>{if(s.arrowNavigation){if(j===Jn.up)return A();if(j===Jn.down)return T();if(j===Jn.left)return S();if(j===Jn.right)return w()}else j===Jn.left||j===Jn.up?W("handleArrow",Jn.left,0,j===Jn.up):W("handleArrow",Jn.right,0,j===Jn.down)},L=j=>{l(j.shiftKey),!s.disableMonthYearSelect&&j.code===Ot.tab&&j.target.classList.contains("dp__menu")&&c.value.shiftKeyInMenu&&(j.preventDefault(),eo(j,f.value,!0),i("close-picker"))},ae=()=>{D(),i("time-picker-close")},de=j=>{var se,Q,ge;(se=x.value)==null||se.toggleTimePicker(!1,!1),(Q=x.value)==null||Q.toggleMonthPicker(!1,!1,j),(ge=x.value)==null||ge.toggleYearPicker(!1,!1,j)},ve=(j,se=0)=>{var Q,ge,_e;return j==="month"?(Q=x.value)==null?void 0:Q.toggleMonthPicker(!1,!0,se):j==="year"?(ge=x.value)==null?void 0:ge.toggleYearPicker(!1,!0,se):j==="time"?(_e=x.value)==null?void 0:_e.toggleTimePicker(!0,!1):de(se)},W=(j,...se)=>{var Q,ge;(Q=x.value)!=null&&Q[j]&&((ge=x.value)==null||ge[j](...se))},fe=()=>{W("selectCurrentDate")},C=(j,se)=>{W("presetDate",j,se)},O=()=>{W("clearHoverDate")},K=(j,se)=>{W("updateMonthYear",j,se)},U=(j,se)=>{j.preventDefault(),ue(se)},re=j=>{var se,Q,ge;if(L(j),j.key===Ot.home||j.key===Ot.end)return W("selectWeekDate",j.key===Ot.home,j.target.getAttribute("id"));switch((j.key===Ot.pageUp||j.key===Ot.pageDown)&&(j.shiftKey?(W("changeYear",j.key===Ot.pageUp),(se=em(r.value,"overlay-year"))==null||se.focus()):(W("changeMonth",j.key===Ot.pageUp),(Q=em(r.value,j.key===Ot.pageUp?"action-prev":"action-next"))==null||Q.focus()),j.target.getAttribute("id")&&((ge=r.value)==null||ge.focus({preventScroll:!0}))),j.key){case Ot.esc:return ee();case Ot.arrowLeft:return U(j,Jn.left);case Ot.arrowRight:return U(j,Jn.right);case Ot.arrowUp:return U(j,Jn.up);case Ot.arrowDown:return U(j,Jn.down);default:return}};return e({updateMonthYear:K,switchView:ve,handleFlow:ne}),(j,se)=>{var Q,ge,_e;return R(),V("div",{id:j.uid?`dp-menu-${j.uid}`:void 0,ref_key:"dpMenuRef",ref:r,tabindex:J(h).enabled?void 0:"0",role:J(h).enabled?void 0:"dialog","aria-label":(Q=j.ariaLabels)==null?void 0:Q.menu,class:Pe(te.value),style:Pn({"--dp-arrow-left":F.value}),onMouseleave:O,onClick:I,onKeydown:re},[(j.disabled||j.readonly)&&J(h).enabled||j.loading?(R(),V("div",{key:0,class:Pe(ie.value)},[j.loading?(R(),V("div",vB,se[19]||(se[19]=[g("span",{class:"dp--menu-loader"},null,-1)]))):ce("",!0)],2)):ce("",!0),j.$slots["menu-header"]?(R(),V("div",bB,[Ne(j.$slots,"menu-header")])):ce("",!0),!J(h).enabled&&!j.teleportCenter?(R(),V("div",{key:2,class:Pe(le.value)},null,2)):ce("",!0),g("div",{ref_key:"innerMenuRef",ref:v,class:Pe({dp__menu_content_wrapper:((ge=j.presetDates)==null?void 0:ge.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":t.collapse&&(((_e=j.presetDates)==null?void 0:_e.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"])}),style:Pn({"--dp-menu-width":`${y.value}px`})},[j.$slots["left-sidebar"]?(R(),V("div",wB,[Ne(j.$slots,"left-sidebar",In(ni(z.value)))])):ce("",!0),j.presetDates.length?(R(),V("div",{key:1,class:Pe({"dp--preset-dates-collapsed":t.collapse,"dp--preset-dates":!0})},[(R(!0),V(Oe,null,Ze(j.presetDates,(ye,ke)=>(R(),V(Oe,{key:ke},[ye.slot?Ne(j.$slots,ye.slot,{key:0,presetDate:C,label:ye.label,value:ye.value}):(R(),V("button",{key:1,type:"button",style:Pn(ye.style||{}),class:Pe(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":t.collapse}]),"data-test":ye.testId??void 0,onClick:ru(Me=>C(ye.value,ye.noTz),["prevent"]),onKeydown:Me=>J(ii)(Me,()=>C(ye.value,ye.noTz),!0)},xe(ye.label),47,xB))],64))),128))],2)):ce("",!0),g("div",{ref_key:"calendarWrapperRef",ref:m,class:"dp__instance_calendar",role:"document"},[(R(),Se(ma($.value),wn({ref_key:"dynCmpRef",ref:x},o.value,{"flow-step":J(k),onMount:J(B),onUpdateFlowStep:J(P),onResetFlow:J(Y),onFocusMenu:D,onSelectDate:se[0]||(se[0]=ye=>j.$emit("select-date")),onDateUpdate:se[1]||(se[1]=ye=>j.$emit("date-update",ye)),onTooltipOpen:se[2]||(se[2]=ye=>j.$emit("tooltip-open",ye)),onTooltipClose:se[3]||(se[3]=ye=>j.$emit("tooltip-close",ye)),onAutoApply:se[4]||(se[4]=ye=>j.$emit("auto-apply",ye)),onRangeStart:se[5]||(se[5]=ye=>j.$emit("range-start",ye)),onRangeEnd:se[6]||(se[6]=ye=>j.$emit("range-end",ye)),onInvalidFixedRange:se[7]||(se[7]=ye=>j.$emit("invalid-fixed-range",ye)),onTimeUpdate:se[8]||(se[8]=ye=>j.$emit("time-update")),onAmPmChange:se[9]||(se[9]=ye=>j.$emit("am-pm-change",ye)),onTimePickerOpen:se[10]||(se[10]=ye=>j.$emit("time-picker-open",ye)),onTimePickerClose:ae,onRecalculatePosition:X,onUpdateMonthYear:se[11]||(se[11]=ye=>j.$emit("update-month-year",ye)),onAutoApplyInvalid:se[12]||(se[12]=ye=>j.$emit("auto-apply-invalid",ye)),onInvalidDate:se[13]||(se[13]=ye=>j.$emit("invalid-date",ye)),onOverlayToggle:se[14]||(se[14]=ye=>j.$emit("overlay-toggle",ye)),"onUpdate:internalModelValue":se[15]||(se[15]=ye=>j.$emit("update:internal-model-value",ye))}),Un({_:2},[Ze(H.value,(ye,ke)=>({name:ye,fn:De(Me=>[Ne(j.$slots,ye,In(ni({...Me})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),j.$slots["right-sidebar"]?(R(),V("div",EB,[Ne(j.$slots,"right-sidebar",In(ni(z.value)))])):ce("",!0),j.$slots["action-extra"]?(R(),V("div",CB,[j.$slots["action-extra"]?Ne(j.$slots,"action-extra",{key:0,selectCurrentDate:fe}):ce("",!0)])):ce("",!0)],6),!j.autoApply||J(f).keepActionRow?(R(),Se(k4,wn({key:3,"menu-mount":b.value},o.value,{"calendar-width":y.value,onClosePicker:se[16]||(se[16]=ye=>j.$emit("close-picker")),onSelectDate:se[17]||(se[17]=ye=>j.$emit("select-date")),onInvalidSelect:se[18]||(se[18]=ye=>j.$emit("invalid-select")),onSelectNow:fe}),Un({_:2},[Ze(J(Z),(ye,ke)=>({name:ye,fn:De(Me=>[Ne(j.$slots,ye,In(ni({...Me})))])}))]),1040,["menu-mount","calendar-width"])):ce("",!0)],46,yB)}}});var Xa=(t=>(t.center="center",t.left="left",t.right="right",t))(Xa||{});const SB=({menuRef:t,menuRefInner:e,inputRef:n,pickerWrapperRef:i,inline:s,emit:r,props:o,slots:a})=>{const{defaultedConfig:l}=jt(o),c=we({}),u=we(!1),d=we({top:"0",left:"0"}),h=we(!1),f=tu(o,"teleportCenter");un(f,()=>{d.value=JSON.parse(JSON.stringify({})),w()});const p=D=>{if(o.teleport){const z=D.getBoundingClientRect();return{left:z.left+window.scrollX,top:z.top+window.scrollY}}return{top:0,left:0}},m=(D,z)=>{d.value.left=`${D+z-c.value.width}px`},y=D=>{d.value.left=`${D}px`},v=(D,z)=>{o.position===Xa.left&&y(D),o.position===Xa.right&&m(D,z),o.position===Xa.center&&(d.value.left=`${D+z/2-c.value.width/2}px`)},b=D=>{const{width:z,height:X}=D.getBoundingClientRect(),{top:Z,left:H}=o.altPosition?o.altPosition(D):p(D);return{top:+Z,left:+H,width:z,height:X}},x=()=>{d.value.left="50%",d.value.top="50%",d.value.transform="translate(-50%, -50%)",d.value.position="fixed",delete d.value.opacity},E=()=>{const D=vn(n),{top:z,left:X,transform:Z}=o.altPosition(D);d.value={top:`${z}px`,left:`${X}px`,transform:Z??""}},w=(D=!0)=>{var z;if(!s.value.enabled){if(f.value)return x();if(o.altPosition!==null)return E();if(D){const X=o.teleport?(z=e.value)==null?void 0:z.$el:t.value;X&&(c.value=X.getBoundingClientRect()),r("recalculate-position")}return Y()}},S=({inputEl:D,left:z,width:X})=>{window.screen.width>768&&!u.value&&v(z,X),k(D)},T=D=>{const{top:z,left:X,height:Z,width:H}=b(D);d.value.top=`${Z+z+ +o.offset}px`,h.value=!1,u.value||(d.value.left=`${X+H/2-c.value.width/2}px`),S({inputEl:D,left:X,width:H})},A=D=>{const{top:z,left:X,width:Z}=b(D);d.value.top=`${z-+o.offset-c.value.height}px`,h.value=!0,S({inputEl:D,left:X,width:Z})},k=D=>{if(o.autoPosition){const{left:z,width:X}=b(D),{left:Z,right:H}=c.value;if(!u.value){if(Math.abs(Z)!==Math.abs(H)){if(Z<=0)return u.value=!0,y(z);if(H>=document.documentElement.clientWidth)return u.value=!0,m(z,X)}return v(z,X)}}},P=()=>{const D=vn(n);if(D){const{height:z}=c.value,{top:X,height:Z}=D.getBoundingClientRect(),H=window.innerHeight-X-Z,le=X;return z<=H?Wo.bottom:z>H&&z<=le?Wo.top:H>=le?Wo.bottom:Wo.top}return Wo.bottom},B=D=>P()===Wo.bottom?T(D):A(D),Y=()=>{const D=vn(n);if(D)return o.autoPosition?B(D):T(D)},ne=function(D){if(D){const z=D.scrollHeight>D.clientHeight,X=window.getComputedStyle(D).overflowY.indexOf("hidden")!==-1;return z&&!X}return!0},$=function(D){return!D||D===document.body||D.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:ne(D)?D:$(D.assignedSlot&&l.value.shadowDom?D.assignedSlot.parentNode:D.parentNode)},F=D=>{if(D)switch(o.position){case Xa.left:return{left:0,transform:"translateX(0)"};case Xa.right:return{left:`${D.width}px`,transform:"translateX(-100%)"};default:return{left:`${D.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:h,menuStyle:d,xCorrect:u,setMenuPosition:w,getScrollableParent:$,shadowRender:(D,z)=>{var X,Z,H;const le=document.createElement("div"),ie=(X=vn(n))==null?void 0:X.getBoundingClientRect();le.setAttribute("id","dp--temp-container");const te=(Z=i.value)!=null&&Z.clientWidth?i.value:document.body;te.append(le);const I=F(ie),ee=l.value.shadowDom?Object.keys(a).filter(L=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(L)):Object.keys(a),ue=ua(D,{...z,shadow:!0,style:{opacity:0,position:"absolute",...I}},Object.fromEntries(ee.map(L=>[L,a[L]])));I0(ue,le),c.value=(H=ue.el)==null?void 0:H.getBoundingClientRect(),I0(null,le),te.removeChild(le)}}},Pr=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]},{name:"tp-inline-arrow-up",use:["shared","time"]},{name:"tp-inline-arrow-down",use:["shared","time"]},{name:"menu-header",use:["menu"]}],TB=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],AB={all:()=>Pr,monthYear:()=>Pr.filter(t=>t.use.includes("month-year")),input:()=>TB,timePicker:()=>Pr.filter(t=>t.use.includes("time")),action:()=>Pr.filter(t=>t.use.includes("action")),calendar:()=>Pr.filter(t=>t.use.includes("calendar")),menu:()=>Pr.filter(t=>t.use.includes("menu")),shared:()=>Pr.filter(t=>t.use.includes("shared")),yearMode:()=>Pr.filter(t=>t.use.includes("year-mode"))},ki=(t,e,n)=>{const i=[];return AB[e]().forEach(s=>{t[s.name]&&i.push(s.name)}),n!=null&&n.length&&n.forEach(s=>{s.slot&&i.push(s.slot)}),i},zu=t=>{const e=be(()=>i=>t.value?i?t.value.open:t.value.close:""),n=be(()=>i=>t.value?i?t.value.menuAppearTop:t.value.menuAppearBottom:"");return{transitionName:e,showTransition:!!t.value,menuTransition:n}},Wu=(t,e,n)=>{const{defaultedRange:i,defaultedTz:s}=jt(t),r=Ce(xi(Ce(),s.value.timezone)),o=we([{month:at(r),year:Xe(r)}]),a=h=>{const f={hours:yr(r),minutes:ao(r),seconds:0};return i.value.enabled?[f[h],f[h]]:f[h]},l=Ki({hours:a("hours"),minutes:a("minutes"),seconds:a("seconds")});un(i,(h,f)=>{h.enabled!==f.enabled&&(l.hours=a("hours"),l.minutes=a("minutes"),l.seconds=a("seconds"))},{deep:!0});const c=be({get:()=>t.internalModelValue,set:h=>{!t.readonly&&!t.disabled&&e("update:internal-model-value",h)}}),u=be(()=>h=>o.value[h]?o.value[h].month:0),d=be(()=>h=>o.value[h]?o.value[h].year:0);return un(c,(h,f)=>{n&&JSON.stringify(h??{})!==JSON.stringify(f??{})&&n()},{deep:!0}),{calendars:o,time:l,modelValue:c,month:u,year:d,today:r}},kB=(t,e)=>{const{defaultedMultiCalendars:n,defaultedMultiDates:i,defaultedUI:s,defaultedHighlight:r,defaultedTz:o,propDates:a,defaultedRange:l}=jt(e),{isDisabled:c}=yo(e),u=we(null),d=we(xi(new Date,o.value.timezone)),h=I=>{!I.current&&e.hideOffsetDates||(u.value=I.value)},f=()=>{u.value=null},p=I=>Array.isArray(t.value)&&l.value.enabled&&t.value[0]&&u.value?I?on(u.value,t.value[0]):Qt(u.value,t.value[0]):!0,m=(I,ee)=>{const ue=()=>t.value?ee?t.value[0]||null:t.value[1]:null,L=t.value&&Array.isArray(t.value)?ue():null;return ct(Ce(I.value),L)},y=I=>{const ee=Array.isArray(t.value)?t.value[0]:null;return I?!Qt(u.value??null,ee):!0},v=(I,ee=!0)=>(l.value.enabled||e.weekPicker)&&Array.isArray(t.value)&&t.value.length===2?e.hideOffsetDates&&!I.current?!1:ct(Ce(I.value),t.value[ee?0:1]):l.value.enabled?m(I,ee)&&y(ee)||ct(I.value,Array.isArray(t.value)?t.value[0]:null)&&p(ee):!1,b=(I,ee)=>{if(Array.isArray(t.value)&&t.value[0]&&t.value.length===1){const ue=ct(I.value,u.value);return ee?on(t.value[0],I.value)&&ue:Qt(t.value[0],I.value)&&ue}return!1},x=I=>!t.value||e.hideOffsetDates&&!I.current?!1:l.value.enabled?e.modelAuto&&Array.isArray(t.value)?ct(I.value,t.value[0]?t.value[0]:d.value):!1:i.value.enabled&&Array.isArray(t.value)?t.value.some(ee=>ct(ee,I.value)):ct(I.value,t.value?t.value:d.value),E=I=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!I.current)return!1;const ee=ss(u.value,+l.value.autoRange),ue=nr(Ce(u.value),e.weekStart);return e.weekPicker?ct(ue[1],Ce(I.value)):ct(ee,Ce(I.value))}return!1}return!1},w=I=>{if(l.value.autoRange||e.weekPicker){if(u.value){const ee=ss(u.value,+l.value.autoRange);if(e.hideOffsetDates&&!I.current)return!1;const ue=nr(Ce(u.value),e.weekStart);return e.weekPicker?on(I.value,ue[0])&&Qt(I.value,ue[1]):on(I.value,u.value)&&Qt(I.value,ee)}return!1}return!1},S=I=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!I.current)return!1;const ee=nr(Ce(u.value),e.weekStart);return e.weekPicker?ct(ee[0],I.value):ct(u.value,I.value)}return!1}return!1},T=I=>vf(t.value,u.value,I.value),A=()=>e.modelAuto&&Array.isArray(e.internalModelValue)?!!e.internalModelValue[0]:!1,k=()=>e.modelAuto?qC(e.internalModelValue):!0,P=I=>{if(e.weekPicker)return!1;const ee=l.value.enabled?!v(I)&&!v(I,!1):!0;return!c(I.value)&&!x(I)&&!(!I.current&&e.hideOffsetDates)&&ee},B=I=>l.value.enabled?e.modelAuto?A()&&x(I):!1:x(I),Y=I=>r.value?Q5(I.value,a.value.highlight):!1,ne=I=>{const ee=c(I.value);return ee&&(typeof r.value=="function"?!r.value(I.value,ee):!r.value.options.highlightDisabled)},$=I=>{var ee;return typeof r.value=="function"?r.value(I.value):(ee=r.value.weekdays)==null?void 0:ee.includes(I.value.getDay())},F=I=>(l.value.enabled||e.weekPicker)&&(!(n.value.count>0)||I.current)&&k()&&!(!I.current&&e.hideOffsetDates)&&!x(I)?T(I):!1,D=I=>{const{isRangeStart:ee,isRangeEnd:ue}=H(I),L=l.value.enabled?ee||ue:!1;return{dp__cell_offset:!I.current,dp__pointer:!e.disabled&&!(!I.current&&e.hideOffsetDates)&&!c(I.value),dp__cell_disabled:c(I.value),dp__cell_highlight:!ne(I)&&(Y(I)||$(I))&&!B(I)&&!L&&!S(I)&&!(F(I)&&e.weekPicker)&&!ue,dp__cell_highlight_active:!ne(I)&&(Y(I)||$(I))&&B(I),dp__today:!e.noToday&&ct(I.value,d.value)&&I.current,"dp--past":Qt(I.value,d.value),"dp--future":on(I.value,d.value)}},z=I=>({dp__active_date:B(I),dp__date_hover:P(I)}),X=I=>{if(t.value&&!Array.isArray(t.value)){const ee=nr(t.value,e.weekStart);return{...ie(I),dp__range_start:ct(ee[0],I.value),dp__range_end:ct(ee[1],I.value),dp__range_between_week:on(I.value,ee[0])&&Qt(I.value,ee[1])}}return{...ie(I)}},Z=I=>{if(t.value&&Array.isArray(t.value)){const ee=nr(t.value[0],e.weekStart),ue=t.value[1]?nr(t.value[1],e.weekStart):[];return{...ie(I),dp__range_start:ct(ee[0],I.value)||ct(ue[0],I.value),dp__range_end:ct(ee[1],I.value)||ct(ue[1],I.value),dp__range_between_week:on(I.value,ee[0])&&Qt(I.value,ee[1])||on(I.value,ue[0])&&Qt(I.value,ue[1]),dp__range_between:on(I.value,ee[1])&&Qt(I.value,ue[0])}}return{...ie(I)}},H=I=>{const ee=n.value.count>0?I.current&&v(I)&&k():v(I)&&k(),ue=n.value.count>0?I.current&&v(I,!1)&&k():v(I,!1)&&k();return{isRangeStart:ee,isRangeEnd:ue}},le=I=>{const{isRangeStart:ee,isRangeEnd:ue}=H(I);return{dp__range_start:ee,dp__range_end:ue,dp__range_between:F(I),dp__date_hover:ct(I.value,u.value)&&!ee&&!ue&&!e.weekPicker,dp__date_hover_start:b(I,!0),dp__date_hover_end:b(I,!1)}},ie=I=>({...le(I),dp__cell_auto_range:w(I),dp__cell_auto_range_start:S(I),dp__cell_auto_range_end:E(I)}),te=I=>l.value.enabled?l.value.autoRange?ie(I):e.modelAuto?{...z(I),...le(I)}:e.weekPicker?Z(I):le(I):e.weekPicker?X(I):z(I);return{setHoverDate:h,clearHoverDate:f,getDayClassData:I=>e.hideOffsetDates&&!I.current?{}:{...D(I),...te(I),[e.dayClass?e.dayClass(I.value,e.internalModelValue):""]:!0,...s.value.calendarCell??{}}}},yo=t=>{const{defaultedFilters:e,defaultedRange:n,propDates:i,defaultedMultiDates:s}=jt(t),r=$=>i.value.disabledDates?typeof i.value.disabledDates=="function"?i.value.disabledDates(Ce($)):!!Eh($,i.value.disabledDates):!1,o=$=>i.value.maxDate?t.yearPicker?Xe($)>Xe(i.value.maxDate):on($,i.value.maxDate):!1,a=$=>i.value.minDate?t.yearPicker?Xe($){const F=o($),D=a($),z=r($),X=e.value.months.map(te=>+te).includes(at($)),Z=t.disabledWeekDays.length?t.disabledWeekDays.some(te=>+te===zF($)):!1,H=f($),le=Xe($),ie=le<+t.yearRange[0]||le>+t.yearRange[1];return!(F||D||z||X||ie||Z||H)},c=($,F)=>Qt(...Kr(i.value.minDate,$,F))||ct(...Kr(i.value.minDate,$,F)),u=($,F)=>on(...Kr(i.value.maxDate,$,F))||ct(...Kr(i.value.maxDate,$,F)),d=($,F,D)=>{let z=!1;return i.value.maxDate&&D&&u($,F)&&(z=!0),i.value.minDate&&!D&&c($,F)&&(z=!0),z},h=($,F,D,z)=>{let X=!1;return z&&(i.value.minDate||i.value.maxDate)?i.value.minDate&&i.value.maxDate?X=d($,F,D):(i.value.minDate&&c($,F)||i.value.maxDate&&u($,F))&&(X=!0):X=!0,X},f=$=>Array.isArray(i.value.allowedDates)&&!i.value.allowedDates.length?!0:i.value.allowedDates?!Eh($,i.value.allowedDates):!1,p=$=>!l($),m=$=>n.value.noDisabledRange?!RC({start:$[0],end:$[1]}).some(F=>p(F)):!0,y=$=>{if($){const F=Xe($);return F>=+t.yearRange[0]&&F<=t.yearRange[1]}return!0},v=($,F)=>!!(Array.isArray($)&&$[F]&&(n.value.maxRange||n.value.minRange)&&y($[F])),b=($,F,D=0)=>{if(v(F,D)&&y($)){const z=IC($,F[D]),X=tS(F[D],$),Z=X.length===1?0:X.filter(le=>p(le)).length,H=Math.abs(z)-(n.value.minMaxRawRange?0:Z);if(n.value.minRange&&n.value.maxRange)return H>=+n.value.minRange&&H<=+n.value.maxRange;if(n.value.minRange)return H>=+n.value.minRange;if(n.value.maxRange)return H<=+n.value.maxRange}return!0},x=()=>!t.enableTimePicker||t.monthPicker||t.yearPicker||t.ignoreTimeValidation,E=$=>Array.isArray($)?[$[0]?$g($[0]):null,$[1]?$g($[1]):null]:$g($),w=($,F,D)=>$.find(z=>+z.hours===yr(F)&&z.minutes==="*"?!0:+z.minutes===ao(F)&&+z.hours===yr(F))&&D,S=($,F,D)=>{const[z,X]=$,[Z,H]=F;return!w(z,Z,D)&&!w(X,H,D)&&D},T=($,F)=>{const D=Array.isArray(F)?F:[F];return Array.isArray(t.disabledTimes)?Array.isArray(t.disabledTimes[0])?S(t.disabledTimes,D,$):!D.some(z=>w(t.disabledTimes,z,$)):$},A=($,F)=>{const D=Array.isArray(F)?[na(F[0]),F[1]?na(F[1]):void 0]:na(F),z=!t.disabledTimes(D);return $&&z},k=($,F)=>t.disabledTimes?Array.isArray(t.disabledTimes)?T(F,$):A(F,$):F,P=$=>{let F=!0;if(!$||x())return!0;const D=!i.value.minDate&&!i.value.maxDate?E($):$;return(t.maxTime||i.value.maxDate)&&(F=fb(t.maxTime,i.value.maxDate,"max",An(D),F)),(t.minTime||i.value.minDate)&&(F=fb(t.minTime,i.value.minDate,"min",An(D),F)),k($,F)},B=$=>{if(!t.monthPicker)return!0;let F=!0;const D=Ce(rs($));if(i.value.minDate&&i.value.maxDate){const z=Ce(rs(i.value.minDate)),X=Ce(rs(i.value.maxDate));return on(D,z)&&Qt(D,X)||ct(D,z)||ct(D,X)}if(i.value.minDate){const z=Ce(rs(i.value.minDate));F=on(D,z)||ct(D,z)}if(i.value.maxDate){const z=Ce(rs(i.value.maxDate));F=Qt(D,z)||ct(D,z)}return F},Y=be(()=>$=>!t.enableTimePicker||t.ignoreTimeValidation?!0:P($)),ne=be(()=>$=>t.monthPicker?Array.isArray($)&&(n.value.enabled||s.value.enabled)?!$.filter(F=>!B(F)).length:B($):!0);return{isDisabled:p,validateDate:l,validateMonthYearInRange:h,isDateRangeAllowed:m,checkMinMaxRange:b,isValidTime:P,isTimeValid:Y,isMonthValid:ne}},Ef=()=>{const t=be(()=>(i,s)=>i?.includes(s)),e=be(()=>(i,s)=>i.count?i.solo?!0:s===0:!0),n=be(()=>(i,s)=>i.count?i.solo?!0:s===i.count-1:!0);return{hideNavigationButtons:t,showLeftIcon:e,showRightIcon:n}},MB=(t,e,n)=>{const i=we(0),s=Ki({[ta.timePicker]:!t.enableTimePicker||t.timePicker||t.monthPicker,[ta.calendar]:!1,[ta.header]:!1}),r=be(()=>t.monthPicker||t.timePicker),o=d=>{var h;if((h=t.flow)!=null&&h.length){if(!d&&r.value)return u();s[d]=!0,Object.keys(s).filter(f=>!s[f]).length||u()}},a=()=>{var d,h;(d=t.flow)!=null&&d.length&&i.value!==-1&&(i.value+=1,e("flow-step",i.value),u()),((h=t.flow)==null?void 0:h.length)===i.value&&Rn().then(()=>l())},l=()=>{i.value=-1},c=(d,h,...f)=>{var p,m;t.flow[i.value]===d&&n.value&&((m=(p=n.value)[h])==null||m.call(p,...f))},u=(d=0)=>{d&&(i.value+=d),c(Yn.month,"toggleMonthPicker",!0),c(Yn.year,"toggleYearPicker",!0),c(Yn.calendar,"toggleTimePicker",!1,!0),c(Yn.time,"toggleTimePicker",!0,!0);const h=t.flow[i.value];(h===Yn.hours||h===Yn.minutes||h===Yn.seconds)&&c(h,"toggleTimePicker",!0,!0,h)};return{childMount:o,updateFlowStep:a,resetFlow:l,handleFlow:u,flowStep:i}},PB={key:1,class:"dp__input_wrap"},IB=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],DB={key:2,class:"dp--clear-btn"},RB=["aria-label"],LB=hn({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...bf},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur","text-input"],setup(t,{expose:e,emit:n}){const i=n,s=t,{defaultedTextInput:r,defaultedAriaLabels:o,defaultedInline:a,defaultedConfig:l,defaultedRange:c,defaultedMultiDates:u,defaultedUI:d,getDefaultPattern:h,getDefaultStartTime:f}=jt(s),{checkMinMaxRange:p}=yo(s),m=we(),y=we(null),v=we(!1),b=we(!1),x=be(()=>({dp__pointer:!s.disabled&&!s.readonly&&!r.value.enabled,dp__disabled:s.disabled,dp__input_readonly:!r.value.enabled,dp__input:!0,dp__input_icon_pad:!s.hideInputIcon,dp__input_valid:typeof s.state=="boolean"?s.state:!1,dp__input_invalid:typeof s.state=="boolean"?!s.state:!1,dp__input_focus:v.value||s.isMenuOpen,dp__input_reg:!r.value.enabled,...d.value.input??{}})),E=()=>{i("set-input-date",null),s.clearable&&s.autoApply&&(i("set-empty-date"),m.value=null)},w=H=>{const le=f();return e4(H,r.value.format??h(),le??nS({},s.enableSeconds),s.inputValue,b.value,s.formatLocale)},S=H=>{const{rangeSeparator:le}=r.value,[ie,te]=H.split(`${le}`);if(ie){const I=w(ie.trim()),ee=te?w(te.trim()):null;if(Tl(I,ee))return;const ue=I&&ee?[I,ee]:[I];p(ee,ue,0)&&(m.value=I?ue:null)}},T=()=>{b.value=!0},A=H=>{if(c.value.enabled)S(H);else if(u.value.enabled){const le=H.split(";");m.value=le.map(ie=>w(ie.trim())).filter(ie=>ie)}else m.value=w(H)},k=H=>{var le;const ie=typeof H=="string"?H:(le=H.target)==null?void 0:le.value;ie!==""?(r.value.openMenu&&!s.isMenuOpen&&i("open"),A(ie),i("set-input-date",m.value)):E(),b.value=!1,i("update:input-value",ie),i("text-input",H,m.value)},P=H=>{r.value.enabled?(A(H.target.value),r.value.enterSubmit&&tm(m.value)&&s.inputValue!==""?(i("set-input-date",m.value,!0),m.value=null):r.value.enterSubmit&&s.inputValue===""&&(m.value=null,i("clear"))):ne(H)},B=(H,le)=>{r.value.enabled&&r.value.tabSubmit&&!le&&A(H.target.value),r.value.tabSubmit&&tm(m.value)&&s.inputValue!==""?(i("set-input-date",m.value,!0,!0),m.value=null):r.value.tabSubmit&&s.inputValue===""&&(m.value=null,i("clear",!0))},Y=()=>{v.value=!0,i("focus"),Rn().then(()=>{var H;r.value.enabled&&r.value.selectOnFocus&&((H=y.value)==null||H.select())})},ne=H=>{if(eo(H,l.value,!0),r.value.enabled&&r.value.openMenu&&!a.value.input){if(r.value.openMenu==="open"&&!s.isMenuOpen)return i("open");if(r.value.openMenu==="toggle")return i("toggle")}else r.value.enabled||i("toggle")},$=()=>{i("real-blur"),v.value=!1,(!s.isMenuOpen||a.value.enabled&&a.value.input)&&i("blur"),s.autoApply&&r.value.enabled&&m.value&&!s.isMenuOpen&&(i("set-input-date",m.value),i("select-date"),m.value=null)},F=H=>{eo(H,l.value,!0),i("clear")},D=H=>{if(H.key==="Tab"&&B(H),H.key==="Enter"&&P(H),!r.value.enabled){if(H.code==="Tab")return;H.preventDefault()}},z=()=>{var H;(H=y.value)==null||H.focus({preventScroll:!0})},X=H=>{m.value=H},Z=H=>{H.key===Ot.tab&&B(H,!0)};return e({focusInput:z,setParsedDate:X}),(H,le)=>{var ie,te,I;return R(),V("div",{onClick:ne},[H.$slots.trigger&&!H.$slots["dp-input"]&&!J(a).enabled?Ne(H.$slots,"trigger",{key:0}):ce("",!0),!H.$slots.trigger&&(!J(a).enabled||J(a).input)?(R(),V("div",PB,[H.$slots["dp-input"]&&!H.$slots.trigger&&(!J(a).enabled||J(a).enabled&&J(a).input)?Ne(H.$slots,"dp-input",{key:0,value:t.inputValue,isMenuOpen:t.isMenuOpen,onInput:k,onEnter:P,onTab:B,onClear:F,onBlur:$,onKeypress:D,onPaste:T,onFocus:Y,openMenu:()=>H.$emit("open"),closeMenu:()=>H.$emit("close"),toggleMenu:()=>H.$emit("toggle")}):ce("",!0),H.$slots["dp-input"]?ce("",!0):(R(),V("input",{key:1,id:H.uid?`dp-input-${H.uid}`:void 0,ref_key:"inputRef",ref:y,"data-test":"dp-input",name:H.name,class:Pe(x.value),inputmode:J(r).enabled?"text":"none",placeholder:H.placeholder,disabled:H.disabled,readonly:H.readonly,required:H.required,value:t.inputValue,autocomplete:H.autocomplete,"aria-label":(ie=J(o))==null?void 0:ie.input,"aria-disabled":H.disabled||void 0,"aria-invalid":H.state===!1?!0:void 0,onInput:k,onBlur:$,onFocus:Y,onKeypress:D,onKeydown:le[0]||(le[0]=ee=>D(ee)),onPaste:T},null,42,IB)),g("div",{onClick:le[3]||(le[3]=ee=>i("toggle"))},[H.$slots["input-icon"]&&!H.hideInputIcon?(R(),V("span",{key:0,class:"dp__input_icon",onClick:le[1]||(le[1]=ee=>i("toggle"))},[Ne(H.$slots,"input-icon")])):ce("",!0),!H.$slots["input-icon"]&&!H.hideInputIcon&&!H.$slots["dp-input"]?(R(),Se(J(Gl),{key:1,"aria-label":(te=J(o))==null?void 0:te.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:le[2]||(le[2]=ee=>i("toggle"))},null,8,["aria-label"])):ce("",!0)]),H.$slots["clear-icon"]&&t.inputValue&&H.clearable&&!H.disabled&&!H.readonly?(R(),V("span",DB,[Ne(H.$slots,"clear-icon",{clear:F})])):ce("",!0),H.clearable&&!H.$slots["clear-icon"]&&t.inputValue&&!H.disabled&&!H.readonly?(R(),V("button",{key:3,"aria-label":(I=J(o))==null?void 0:I.clearInput,class:"dp--clear-btn",type:"button",onKeydown:le[4]||(le[4]=ee=>J(ii)(ee,()=>F(ee),!0,Z)),onClick:le[5]||(le[5]=ru(ee=>F(ee),["prevent"]))},[N(J(GC),{class:"dp__input_icons","data-test":"clear-icon"})],40,RB)):ce("",!0)])):ce("",!0)])}}}),OB=typeof window<"u"?window:void 0,Wg=()=>{},$B=t=>nf()?(e_(t),!0):!1,NB=(t,e,n,i)=>{if(!t)return Wg;let s=Wg;const r=un(()=>J(t),a=>{s(),a&&(a.addEventListener(e,n,i),s=()=>{a.removeEventListener(e,n,i),s=Wg})},{immediate:!0,flush:"post"}),o=()=>{r(),s()};return $B(o),o},FB=(t,e,n,i={})=>{const{window:s=OB,event:r="pointerdown"}=i;return s?NB(s,r,o=>{const a=vn(t),l=vn(e);!a||!l||a===o.target||o.composedPath().includes(a)||o.composedPath().includes(l)||n(o)},{passive:!0}):void 0},BB=hn({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...bf},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle","text-input"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=_a(),o=we(!1),a=tu(s,"modelValue"),l=tu(s,"timezone"),c=we(null),u=we(null),d=we(null),h=we(!1),f=we(null),p=we(!1),m=we(!1),y=we(!1),v=we(!1),{setMenuFocused:b,setShiftKey:x}=aS(),{clearArrowNav:E}=_o(),{validateDate:w,isValidTime:S}=yo(s),{defaultedTransitions:T,defaultedTextInput:A,defaultedInline:k,defaultedConfig:P,defaultedRange:B,defaultedMultiDates:Y}=jt(s),{menuTransition:ne,showTransition:$}=zu(T);En(()=>{ee(s.modelValue),Rn().then(()=>{if(!k.value.enabled){const he=le(f.value);he?.addEventListener("scroll",K),window?.addEventListener("resize",U)}}),k.value.enabled&&(o.value=!0),window?.addEventListener("keyup",re),window?.addEventListener("keydown",j)}),pa(()=>{if(!k.value.enabled){const he=le(f.value);he?.removeEventListener("scroll",K),window?.removeEventListener("resize",U)}window?.removeEventListener("keyup",re),window?.removeEventListener("keydown",j)});const F=ki(r,"all",s.presetDates),D=ki(r,"input");un([a,l],()=>{ee(a.value)},{deep:!0});const{openOnTop:z,menuStyle:X,xCorrect:Z,setMenuPosition:H,getScrollableParent:le,shadowRender:ie}=SB({menuRef:c,menuRefInner:u,inputRef:d,pickerWrapperRef:f,inline:k,emit:i,props:s,slots:r}),{inputValue:te,internalModelValue:I,parseExternalModelValue:ee,emitModelValue:ue,formatInputValue:L,checkBeforeEmit:ae}=C4(i,s,h),de=be(()=>({dp__main:!0,dp__theme_dark:s.dark,dp__theme_light:!s.dark,dp__flex_display:k.value.enabled,"dp--flex-display-collapsed":y.value,dp__flex_display_with_input:k.value.input})),ve=be(()=>s.dark?"dp__theme_dark":"dp__theme_light"),W=be(()=>s.teleport?{to:typeof s.teleport=="boolean"?"body":s.teleport,disabled:!s.teleport||k.value.enabled}:{}),fe=be(()=>({class:"dp__outer_menu_wrap"})),C=be(()=>k.value.enabled&&(s.timePicker||s.monthPicker||s.yearPicker||s.quarterPicker)),O=()=>{var he,Ae;return(Ae=(he=d.value)==null?void 0:he.$el)==null?void 0:Ae.getBoundingClientRect()},K=()=>{o.value&&(P.value.closeOnScroll?ze():H())},U=()=>{var he;o.value&&H();const Ae=(he=u.value)==null?void 0:he.$el.getBoundingClientRect().width;y.value=document.body.offsetWidth<=Ae},re=he=>{he.key==="Tab"&&!k.value.enabled&&!s.teleport&&P.value.tabOutClosesMenu&&(f.value.contains(document.activeElement)||ze()),m.value=he.shiftKey},j=he=>{m.value=he.shiftKey},se=()=>{!s.disabled&&!s.readonly&&(ie(_b,s),H(!1),o.value=!0,o.value&&i("open"),o.value||Be(),ee(s.modelValue))},Q=()=>{var he;te.value="",Be(),(he=d.value)==null||he.setParsedDate(null),i("update:model-value",null),i("update:model-timezone-value",null),i("cleared"),P.value.closeOnClearValue&&ze()},ge=()=>{const he=I.value;return!he||!Array.isArray(he)&&w(he)?!0:Array.isArray(he)?Y.value.enabled||he.length===2&&w(he[0])&&w(he[1])?!0:B.value.partialRange&&!s.timePicker?w(he[0]):!1:!1},_e=()=>{ae()&&ge()?(ue(),ze()):i("invalid-select",I.value)},ye=he=>{ke(),ue(),P.value.closeOnAutoApply&&!he&&ze()},ke=()=>{d.value&&A.value.enabled&&d.value.setParsedDate(I.value)},Me=(he=!1)=>{s.autoApply&&S(I.value)&&ge()&&(B.value.enabled&&Array.isArray(I.value)?(B.value.partialRange||I.value.length===2)&&ye(he):ye(he))},Be=()=>{A.value.enabled||(I.value=null)},ze=()=>{k.value.enabled||(o.value&&(o.value=!1,Z.value=!1,b(!1),x(!1),E(),i("closed"),te.value&&ee(a.value)),Be(),i("blur"))},nt=(he,Ae,Le=!1)=>{if(!he){I.value=null;return}const Ut=Array.isArray(he)?!he.some(Ri=>!w(Ri)):w(he),gn=S(he);Ut&&gn?(v.value=!0,I.value=he,Ae&&(p.value=Le,_e(),i("text-submit")),Rn().then(()=>{v.value=!1})):i("invalid-date",he)},Qe=()=>{s.autoApply&&S(I.value)&&ue(),ke()},qt=()=>o.value?ze():se(),Bt=he=>{I.value=he},fn=()=>{A.value.enabled&&(h.value=!0,L()),i("focus")},Kt=()=>{if(A.value.enabled&&(h.value=!1,ee(s.modelValue),p.value)){const he=J5(f.value,m.value);he?.focus()}i("blur")},Ei=he=>{u.value&&u.value.updateMonthYear(0,{month:cb(he.month),year:cb(he.year)})},Xi=he=>{ee(he??s.modelValue)},Zt=(he,Ae)=>{var Le;(Le=u.value)==null||Le.switchView(he,Ae)},oe=he=>P.value.onClickOutside?P.value.onClickOutside(he):ze(),Te=(he=0)=>{var Ae;(Ae=u.value)==null||Ae.handleFlow(he)};return FB(c,d,()=>oe(ge)),e({closeMenu:ze,selectDate:_e,clearValue:Q,openMenu:se,onScroll:K,formatInputValue:L,updateInternalModelValue:Bt,setMonthYear:Ei,parseModel:Xi,switchView:Zt,toggleMenu:qt,handleFlow:Te,dpWrapMenuRef:c}),(he,Ae)=>(R(),V("div",{ref_key:"pickerWrapperRef",ref:f,class:Pe(de.value),"data-datepicker-instance":""},[N(LB,wn({ref_key:"inputRef",ref:d,"input-value":J(te),"onUpdate:inputValue":Ae[0]||(Ae[0]=Le=>Wt(te)?te.value=Le:null),"is-menu-open":o.value},he.$props,{onClear:Q,onOpen:se,onSetInputDate:nt,onSetEmptyDate:J(ue),onSelectDate:_e,onToggle:qt,onClose:ze,onFocus:fn,onBlur:Kt,onRealBlur:Ae[1]||(Ae[1]=Le=>h.value=!1),onTextInput:Ae[2]||(Ae[2]=Le=>he.$emit("text-input",Le))}),Un({_:2},[Ze(J(D),(Le,Ut)=>({name:Le,fn:De(gn=>[Ne(he.$slots,Le,In(ni(gn)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(R(),Se(ma(he.teleport?gD:"div"),In(ni(W.value)),{default:De(()=>[N($t,{name:J(ne)(J(z)),css:J($)&&!J(k).enabled},{default:De(()=>[o.value?(R(),V("div",wn({key:0,ref_key:"dpWrapMenuRef",ref:c},fe.value,{class:{"dp--menu-wrapper":!J(k).enabled},style:J(k).enabled?void 0:J(X)}),[N(_b,wn({ref_key:"dpMenuRef",ref:u},he.$props,{"internal-model-value":J(I),"onUpdate:internalModelValue":Ae[3]||(Ae[3]=Le=>Wt(I)?I.value=Le:null),class:{[ve.value]:!0,"dp--menu-wrapper":he.teleport},"open-on-top":J(z),"no-overlay-focus":C.value,collapse:y.value,"get-input-rect":O,"is-text-input-date":v.value,onClosePicker:ze,onSelectDate:_e,onAutoApply:Me,onTimeUpdate:Qe,onFlowStep:Ae[4]||(Ae[4]=Le=>he.$emit("flow-step",Le)),onUpdateMonthYear:Ae[5]||(Ae[5]=Le=>he.$emit("update-month-year",Le)),onInvalidSelect:Ae[6]||(Ae[6]=Le=>he.$emit("invalid-select",J(I))),onAutoApplyInvalid:Ae[7]||(Ae[7]=Le=>he.$emit("invalid-select",Le)),onInvalidFixedRange:Ae[8]||(Ae[8]=Le=>he.$emit("invalid-fixed-range",Le)),onRecalculatePosition:J(H),onTooltipOpen:Ae[9]||(Ae[9]=Le=>he.$emit("tooltip-open",Le)),onTooltipClose:Ae[10]||(Ae[10]=Le=>he.$emit("tooltip-close",Le)),onTimePickerOpen:Ae[11]||(Ae[11]=Le=>he.$emit("time-picker-open",Le)),onTimePickerClose:Ae[12]||(Ae[12]=Le=>he.$emit("time-picker-close",Le)),onAmPmChange:Ae[13]||(Ae[13]=Le=>he.$emit("am-pm-change",Le)),onRangeStart:Ae[14]||(Ae[14]=Le=>he.$emit("range-start",Le)),onRangeEnd:Ae[15]||(Ae[15]=Le=>he.$emit("range-end",Le)),onDateUpdate:Ae[16]||(Ae[16]=Le=>he.$emit("date-update",Le)),onInvalidDate:Ae[17]||(Ae[17]=Le=>he.$emit("invalid-date",Le)),onOverlayToggle:Ae[18]||(Ae[18]=Le=>he.$emit("overlay-toggle",Le))}),Un({_:2},[Ze(J(F),(Le,Ut)=>({name:Le,fn:De(gn=>[Ne(he.$slots,Le,In(ni({...gn})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","is-text-input-date","onRecalculatePosition"])],16)):ce("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),Yu=(()=>{const t=BB;return t.install=e=>{e.component("Vue3DatePicker",t)},t})(),VB=Object.freeze(Object.defineProperty({__proto__:null,default:Yu},Symbol.toStringTag,{value:"Module"}));Object.entries(VB).forEach(([t,e])=>{t!=="default"&&(Yu[t]=e)});const zB={name:"newDashboardAPIKey",components:{LocaleText:He,VueDatePicker:Yu},data(){return{newKeyData:{ExpiredAt:bi().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),neverExpire:!1},submitting:!1}},setup(){return{store:tt()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,xt("/api/newDashboardAPIKey",this.newKeyData,t=>{t.status?(this.$emit("created",t.data),this.store.newMessage("Server","API Key created","success"),this.$emit("close")):this.store.newMessage("Server",t.message,"danger"),this.submitting=!1})},fixDate(t){return console.log(bi(t).format("YYYY-MM-DDTHH:mm:ss")),bi(t).format("YYYY-MM-DDTHH:mm:ss")},parseTime(t){t?this.newKeyData.ExpiredAt=bi(t).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},WB={class:"position-absolute w-100 h-100 top-0 start-0 rounded-bottom-3 p-3 d-flex",style:{"background-color":"#00000060","backdrop-filter":"blur(3px)"}},YB={class:"card m-auto rounded-3 mt-5"},HB={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},jB={class:"mb-0"},KB={class:"card-body d-flex gap-2 p-4 flex-column"},UB={class:"text-muted"},GB={class:"d-flex align-items-center gap-2"},XB={class:"form-check"},qB=["disabled"],ZB={class:"form-check-label",for:"neverExpire"},JB={key:0,class:"bi bi-check-lg me-2"};function QB(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("VueDatePicker");return R(),V("div",WB,[g("div",YB,[g("div",HB,[g("h6",jB,[N(o,{t:"Create API Key"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),g("div",KB,[g("small",UB,[N(o,{t:"When should this API Key expire?"})]),g("div",GB,[N(a,{is24:!0,"min-date":new Date,"model-value":this.newKeyData.ExpiredAt,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:this.newKeyData.neverExpire||this.submitting,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])]),g("div",XB,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=l=>this.newKeyData.neverExpire=l),id:"neverExpire",disabled:this.submitting},null,8,qB),[[Kn,this.newKeyData.neverExpire]]),g("label",ZB,[N(o,{t:"Never Expire"}),e[3]||(e[3]=Ue(" (")),e[4]||(e[4]=g("i",{class:"bi bi-emoji-grimace-fill me-2"},null,-1)),N(o,{t:"Don't think that's a good idea"}),e[5]||(e[5]=Ue(") "))])]),g("button",{class:Pe(["ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",{disabled:this.submitting}]),onClick:e[2]||(e[2]=l=>this.submitNewAPIKey())},[this.submitting?ce("",!0):(R(),V("i",JB)),this.submitting?(R(),Se(o,{key:1,t:"Creating..."})):(R(),Se(o,{key:2,t:"Create"}))],2)])])])}const eV=je(zB,[["render",QB]]),tV={name:"dashboardAPIKey",components:{LocaleText:He},props:{apiKey:Object},setup(){return{store:tt()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){xt("/api/deleteDashboardAPIKey",{Key:this.apiKey.Key},t=>{t.status?(this.$emit("deleted",t.data),this.store.newMessage("Server","API Key deleted","success")):this.store.newMessage("Server",t.message,"danger")})}}},nV={class:"card rounded-3 shadow-sm"},iV={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},sV={class:"d-flex align-items-center gap-2"},rV={class:"text-muted"},oV={style:{"word-break":"break-all"}},aV={class:"d-flex align-items-center gap-2 ms-auto"},lV={class:"text-muted"},cV={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"};function uV(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",nV,[this.confirmDelete?(R(),V(Oe,{key:1},[this.store.getActiveCrossServer()?ce("",!0):(R(),V("div",cV,[N(o,{t:"Are you sure to delete this API key?"}),g("a",{role:"button",class:"btn btn-sm bg-success-subtle text-success-emphasis rounded-3",onClick:e[1]||(e[1]=a=>this.deleteAPIKey())},e[4]||(e[4]=[g("i",{class:"bi bi-check-lg"},null,-1)])),g("a",{role:"button",class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:e[2]||(e[2]=a=>this.confirmDelete=!1)},e[5]||(e[5]=[g("i",{class:"bi bi-x-lg"},null,-1)]))]))],64)):(R(),V("div",iV,[g("div",sV,[g("small",rV,[N(o,{t:"Key"})]),g("span",oV,xe(this.apiKey.Key),1)]),g("div",aV,[g("small",lV,[N(o,{t:"Expire At"})]),this.apiKey.ExpiredAt?ce("",!0):(R(),Se(o,{key:0,t:"Never Expire"})),g("span",null,xe(this.apiKey.ExpiredAt),1)]),this.store.getActiveCrossServer()?ce("",!0):(R(),V("a",{key:0,role:"button",class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3",onClick:e[0]||(e[0]=a=>this.confirmDelete=!0)},e[3]||(e[3]=[g("i",{class:"bi bi-trash-fill"},null,-1)])))]))])}const dV=je(tV,[["render",uV],["__scopeId","data-v-a76253c8"]]),hV={name:"dashboardAPIKeys",components:{LocaleText:He,DashboardAPIKey:dV,NewDashboardAPIKey:eV},setup(){return{store:tt()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await xt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_api_key",value:this.value},t=>{t.status?(this.store.Configuration.Peers[this.targetData]=this.value,this.store.newMessage("Server",`API Keys function is successfully ${this.value?"enabled":"disabled"}`,"success")):(this.value=this.store.Configuration.Peers[this.targetData],this.store.newMessage("Server",`API Keys function is failed to ${this.value?"enabled":"disabled"}`,"danger"))})}},watch:{value:{immediate:!0,handler(t){t?Yt("/api/getDashboardAPIKeys",{},e=>{console.log(e),e.status?this.apiKeys=e.data:(this.apiKeys=[],this.store.newMessage("Server",e.message,"danger"))}):this.apiKeys=[]}}}},fV={class:"card mb-4 shadow rounded-3"},gV={class:"card-header d-flex"},pV={key:0,class:"form-check form-switch ms-auto"},mV={class:"form-check-label",for:"allowAPIKeysSwitch"},_V={key:0,class:"card-body position-relative d-flex flex-column gap-2"},yV={key:1,class:"card",style:{height:"300px"}},vV={class:"card-body d-flex text-muted"},bV={class:"m-auto"},wV={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function xV(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("DashboardAPIKey"),l=Ee("NewDashboardAPIKey");return R(),V("div",fV,[g("div",gV,[N(o,{t:"API Keys"}),this.store.getActiveCrossServer()?ce("",!0):(R(),V("div",pV,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=c=>this.value=c),onChange:e[1]||(e[1]=c=>this.toggleDashboardAPIKeys()),role:"switch",id:"allowAPIKeysSwitch"},null,544),[[Kn,this.value]]),g("label",mV,[this.value?(R(),Se(o,{key:0,t:"Enabled"})):(R(),Se(o,{key:1,t:"Disabled"}))])]))]),this.value?(R(),V("div",_V,[this.store.getActiveCrossServer()?ce("",!0):(R(),V("button",{key:0,class:"ms-auto btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm",onClick:e[2]||(e[2]=c=>this.newDashboardAPIKey=!0)},[e[6]||(e[6]=g("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),N(o,{t:"API Key"})])),this.apiKeys.length===0?(R(),V("div",yV,[g("div",vV,[g("span",bV,[N(o,{t:"No WGDashboard API Key"})])])])):(R(),V("div",wV,[N(Ul,{name:"apiKey"},{default:De(()=>[(R(!0),V(Oe,null,Ze(this.apiKeys,c=>(R(),Se(a,{apiKey:c,key:c.Key,onDeleted:e[3]||(e[3]=u=>this.apiKeys=u)},null,8,["apiKey"]))),128))]),_:1})])),N($t,{name:"zoomReversed"},{default:De(()=>[this.newDashboardAPIKey?(R(),Se(l,{key:0,onCreated:e[4]||(e[4]=c=>this.apiKeys=c),onClose:e[5]||(e[5]=c=>this.newDashboardAPIKey=!1)})):ce("",!0)]),_:1})])):ce("",!0)])}const EV=je(hV,[["render",xV],["__scopeId","data-v-167c06a6"]]),CV={name:"accountSettingsMFA",components:{LocaleText:He},setup(){const t=tt(),e=`input_${Bs()}`;return{store:t,uuid:e}},data(){return{status:!1}},mounted(){this.status=this.store.Configuration.Account.enable_totp},methods:{async resetMFA(){await xt("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async t=>{await xt("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},e=>{e.status&&this.$router.push("/2FASetup")})})}}},SV={class:"d-flex align-items-center"},TV={class:"form-check form-switch ms-3"};function AV(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("div",SV,[g("strong",null,[N(o,{t:"Multi-Factor Authentication (MFA)"})]),g("div",TV,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=a=>this.status=a),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[Kn,this.status]])]),this.status?(R(),V("button",{key:0,class:"btn bg-warning-subtle text-warning-emphasis border-1 border-warning-subtle ms-auto rounded-3 shadow-sm",onClick:e[1]||(e[1]=a=>this.resetMFA())},[e[2]||(e[2]=g("i",{class:"bi bi-shield-lock-fill me-2"},null,-1)),this.store.Configuration.Account.totp_verified?(R(),Se(o,{key:0,t:"Reset"})):(R(),Se(o,{key:1,t:"Setup"})),e[3]||(e[3]=Ue(" MFA "))])):ce("",!0)])])}const kV=je(CV,[["render",AV]]),MV={name:"dashboardLanguage",components:{LocaleText:He},setup(){return{store:tt()}},data(){return{languages:void 0}},mounted(){Yt("/api/locale/available",{},t=>{this.languages=t.data})},methods:{changeLanguage(t){xt("/api/locale/update",{lang_id:t},e=>{e.status?(this.store.Configuration.Server.dashboard_language=t,this.store.Locale=e.data):this.store.newMessage("Server","Dashboard language update failed","danger")})}},computed:{currentLanguage(){let t=this.store.Configuration.Server.dashboard_language;return this.languages.find(e=>e.lang_id===t)}}},PV={class:"card mb-4 shadow rounded-3"},IV={class:"card-header"},DV={class:"card-body d-flex gap-2"},RV={class:"dropdown w-100"},LV=["disabled"],OV={key:1},$V={class:"dropdown-menu rounded-3 shadow"},NV=["onClick"],FV={class:"me-auto mb-0"},BV={class:"d-block",style:{"font-size":"0.8rem"}},VV={key:0,class:"bi bi-check text-primary fs-5"};function zV(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",PV,[g("p",IV,[N(o,{t:"Dashboard Language"})]),g("div",DV,[g("div",RV,[g("button",{class:"btn bg-primary-subtle text-primary-emphasis dropdown-toggle w-100 rounded-3",disabled:!this.languages,type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[this.languages?(R(),V("span",OV,xe(r.currentLanguage?.lang_name_localized),1)):(R(),Se(o,{key:0,t:"Loading..."}))],8,LV),g("ul",$V,[(R(!0),V(Oe,null,Ze(this.languages,a=>(R(),V("li",null,[g("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:l=>this.changeLanguage(a.lang_id)},[g("p",FV,[Ue(xe(a.lang_name_localized)+" ",1),g("small",BV,xe(a.lang_name),1)]),r.currentLanguage?.lang_id===a.lang_id?(R(),V("i",VV)):ce("",!0)],8,NV)]))),256))])])])])}const WV=je(MV,[["render",zV],["__scopeId","data-v-a8b77ad0"]]),YV={name:"dashboardIPPortInput",components:{LocaleText:He},setup(){return{store:tt()}},data(){return{ipAddress:"",port:0,invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.ipAddress=this.store.Configuration.Server.app_ip,this.port=this.store.Configuration.Server.app_port},methods:{async useValidation(t,e,n){this.changed&&(this.updating=!0,await xt("/api/updateDashboardConfigurationItem",{section:"Server",key:e,value:n},i=>{i.status?(t.target.classList.add("is-valid"),this.showInvalidFeedback=!1,this.store.Configuration.Server[e]=n,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{t.target.classList.remove("is-valid")},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=i.message),this.changed=!1,this.updating=!1}))}}},HV={class:"card mb-4 shadow rounded-3"},jV={class:"card-header"},KV={class:"card-body"},UV={class:"row gx-3"},GV={class:"col-sm"},XV={class:"form-group mb-2"},qV={for:"input_dashboard_ip",class:"text-muted mb-1"},ZV=["disabled"],JV={class:"invalid-feedback"},QV={class:"col-sm"},e6={class:"form-group mb-2"},t6={for:"input_dashboard_ip",class:"text-muted mb-1"},n6=["disabled"],i6={class:"invalid-feedback"},s6={class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1 mb-2"};function r6(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",HV,[g("p",jV,[N(o,{t:"Dashboard IP Address & Listen Port"})]),g("div",KV,[g("div",UV,[g("div",GV,[g("div",XV,[g("label",qV,[g("strong",null,[g("small",null,[N(o,{t:"IP Address / Hostname"})])])]),$e(g("input",{type:"text",class:Pe(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[0]||(e[0]=a=>this.ipAddress=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>r.useValidation(a,"app_ip",this.ipAddress)),disabled:this.updating},null,42,ZV),[[We,this.ipAddress]]),g("div",JV,xe(this.invalidFeedback),1)])]),g("div",QV,[g("div",e6,[g("label",t6,[g("strong",null,[g("small",null,[N(o,{t:"Listen Port"})])])]),$e(g("input",{type:"number",class:Pe(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[3]||(e[3]=a=>this.port=a),onKeydown:e[4]||(e[4]=a=>this.changed=!0),onBlur:e[5]||(e[5]=a=>r.useValidation(a,"app_port",this.port)),disabled:this.updating},null,42,n6),[[We,this.port]]),g("div",i6,xe(this.invalidFeedback),1)])])]),g("div",s6,[g("small",null,[e[6]||(e[6]=g("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),N(o,{t:"Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port"})])])])])}const o6=je(YV,[["render",r6]]),a6={name:"settings",methods:{ipV46RegexCheck:ON},components:{DashboardIPPortInput:o6,DashboardLanguage:WV,LocaleText:He,AccountSettingsMFA:kV,DashboardAPIKeys:EV,DashboardSettingsInputIPAddressAndPort:N3,DashboardTheme:T3,DashboardSettingsInputWireguardConfigurationPath:b3,AccountSettingsInputPassword:a3,AccountSettingsInputUsername:WN,PeersDefaultSettingsInput:LN},setup(){return{dashboardConfigurationStore:tt()}}},l6={class:"mt-md-5 mt-3"},c6={class:"container-md"},u6={class:"mb-3 text-body"},d6={class:"card mb-4 shadow rounded-3"},h6={class:"card-header"},f6={class:"card-body"},g6={class:"card mb-4 shadow rounded-3"},p6={class:"card-header"},m6={class:"card-body"},_6={class:"row gx-4"},y6={class:"col-sm"},v6={class:"col-sm"},b6={class:"card mb-4 shadow rounded-3"},w6={class:"card-header"},x6={class:"card-body d-flex gap-4 flex-column"},E6={key:0,class:"m-0"};function C6(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("PeersDefaultSettingsInput"),l=Ee("DashboardSettingsInputWireguardConfigurationPath"),c=Ee("DashboardTheme"),u=Ee("DashboardLanguage"),d=Ee("DashboardIPPortInput"),h=Ee("AccountSettingsInputUsername"),f=Ee("AccountSettingsInputPassword"),p=Ee("AccountSettingsMFA"),m=Ee("DashboardAPIKeys");return R(),V("div",l6,[g("div",c6,[g("h3",u6,[N(o,{t:"Settings"})]),g("div",d6,[g("p",h6,[N(o,{t:"Peers Default Settings"})]),g("div",f6,[N(a,{targetData:"peer_global_dns",title:"DNS"}),N(a,{targetData:"peer_endpoint_allowed_ip",title:"Endpoint Allowed IPs"}),N(a,{targetData:"peer_mtu",title:"MTU"}),N(a,{targetData:"peer_keep_alive",title:"Persistent Keepalive"}),N(a,{targetData:"remote_endpoint",title:"Peer Remote Endpoint",warning:!0,warningText:"This will be changed globally, and will be apply to all peer's QR code and configuration file."})])]),g("div",g6,[g("p",p6,[N(o,{t:"WireGuard Configurations Settings"})]),g("div",m6,[N(l,{targetData:"wg_conf_path",title:"Configurations Directory",warning:!0,"warning-text":"Remember to remove / at the end of your path. e.g /etc/wireguard"})])]),e[1]||(e[1]=g("hr",{class:"mb-4"},null,-1)),g("div",_6,[g("div",y6,[N(c)]),g("div",v6,[N(u)])]),N(d),g("div",b6,[g("p",w6,[N(o,{t:"WGDashboard Account Settings"})]),g("div",x6,[N(h,{targetData:"username",title:"Username"}),e[0]||(e[0]=g("hr",{class:"m-0"},null,-1)),N(f,{targetData:"password"}),this.dashboardConfigurationStore.getActiveCrossServer()?ce("",!0):(R(),V("hr",E6)),this.dashboardConfigurationStore.getActiveCrossServer()?ce("",!0):(R(),Se(p,{key:1}))])]),N(m)])])}const S6=je(a6,[["render",C6]]),T6={name:"setup",components:{LocaleText:He},setup(){return{store:tt()}},data(){return{setup:{username:"",newPassword:"",repeatNewPassword:"",enable_totp:!0},loading:!1,errorMessage:"",done:!1}},computed:{goodToSubmit(){return this.setup.username&&this.setup.newPassword.length>=8&&this.setup.repeatNewPassword.length>=8&&this.setup.newPassword===this.setup.repeatNewPassword}},methods:{submit(){this.loading=!0,xt("/api/Welcome_Finish",this.setup,t=>{t.status?(this.done=!0,this.$router.push("/2FASetup")):(document.querySelectorAll("#createAccount input").forEach(e=>e.classList.add("is-invalid")),this.errorMessage=t.message,document.querySelector(".login-container-fluid").scrollTo({top:0,left:0,behavior:"smooth"})),this.loading=!1})}}},A6=["data-bs-theme"],k6={class:"m-auto text-body",style:{width:"500px"}},M6={class:"dashboardLogo display-4"},P6={class:"mb-5"},I6={key:0,class:"alert alert-danger"},D6={class:"d-flex flex-column gap-3"},R6={id:"createAccount",class:"d-flex flex-column gap-2"},L6={class:"form-group text-body"},O6={for:"username",class:"mb-1 text-muted"},$6={class:"form-group text-body"},N6={for:"password",class:"mb-1 text-muted"},F6={class:"form-group text-body"},B6={for:"confirmPassword",class:"mb-1 text-muted"},V6=["disabled"],z6={key:0,class:"d-flex align-items-center w-100"},W6={key:1,class:"d-flex align-items-center w-100"};function Y6(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[g("div",k6,[g("span",M6,[N(o,{t:"Nice to meet you!"})]),g("p",P6,[N(o,{t:"Please fill in the following fields to finish setup"}),e[4]||(e[4]=Ue(" 😊"))]),g("div",null,[g("h3",null,[N(o,{t:"Create an account"})]),this.errorMessage?(R(),V("div",I6,xe(this.errorMessage),1)):ce("",!0),g("div",D6,[g("form",R6,[g("div",L6,[g("label",O6,[g("small",null,[N(o,{t:"Enter an username you like"})])]),$e(g("input",{type:"text",autocomplete:"username","onUpdate:modelValue":e[0]||(e[0]=a=>this.setup.username=a),class:"form-control",id:"username",name:"username",required:""},null,512),[[We,this.setup.username]])]),g("div",$6,[g("label",N6,[g("small",null,[N(o,{t:"Enter a password"}),g("code",null,[N(o,{t:"(At least 8 characters and make sure is strong enough!)"})])])]),$e(g("input",{type:"password",autocomplete:"new-password","onUpdate:modelValue":e[1]||(e[1]=a=>this.setup.newPassword=a),class:"form-control",id:"password",name:"password",required:""},null,512),[[We,this.setup.newPassword]])]),g("div",F6,[g("label",B6,[g("small",null,[N(o,{t:"Confirm password"})])]),$e(g("input",{type:"password",autocomplete:"confirm-new-password","onUpdate:modelValue":e[2]||(e[2]=a=>this.setup.repeatNewPassword=a),class:"form-control",id:"confirmPassword",name:"confirmPassword",required:""},null,512),[[We,this.setup.repeatNewPassword]])])]),g("button",{class:"btn btn-dark btn-lg mb-5 d-flex btn-brand shadow align-items-center",ref:"signInBtn",disabled:!this.goodToSubmit||this.loading||this.done,onClick:e[3]||(e[3]=a=>this.submit())},[!this.loading&&!this.done?(R(),V("span",z6,[N(o,{t:"Next"}),e[5]||(e[5]=g("i",{class:"bi bi-chevron-right ms-auto"},null,-1))])):(R(),V("span",W6,[N(o,{t:"Saving..."}),e[6]||(e[6]=g("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},[g("span",{class:"visually-hidden"},"Loading...")],-1))]))],8,V6)])])])],8,A6)}const H6=je(T6,[["render",Y6]]);function B_(t){return t.includes(":")?6:t.includes(".")?4:0}function j6(t){const e=B_(t);if(!e)throw new Error(`Invalid IP address: ${t}`);let n=0n,i=0n;const s=Object.create(null);if(e===4)for(const r of t.split(".").map(BigInt).reverse())n+=r*2n**i,i+=8n;else{if(t.includes(".")&&(s.ipv4mapped=!0,t=t.split(":").map(a=>{if(a.includes(".")){const[l,c,u,d]=a.split(".").map(h=>Number(h).toString(16).padStart(2,"0"));return`${l}${c}:${u}${d}`}else return a}).join(":")),t.includes("%")){let a;[,t,a]=/(.+)%(.+)/.exec(t)||[],s.scopeid=a}const r=t.split(":"),o=r.indexOf("");if(o!==-1)for(;r.length<8;)r.splice(o,0,"");for(const a of r.map(l=>BigInt(parseInt(l||"0",16))).reverse())n+=a*2n**i,i+=16n}return s.number=n,s.version=e,s}const Yg={4:32,6:128},K6=t=>t.includes("/")?B_(t):0;function U6(t){const e=K6(t),n=Object.create(null);if(e)n.cidr=t,n.version=e;else{const d=B_(t);if(d)n.cidr=`${t}/${Yg[d]}`,n.version=d;else throw new Error(`Network is not a CIDR or IP: ${t}`)}const[i,s]=n.cidr.split("/");if(!/^[0-9]+$/.test(s))throw new Error(`Network is not a CIDR or IP: ${t}`);n.prefix=s,n.single=s===String(Yg[n.version]);const{number:r,version:o}=j6(i),a=Yg[o],l=r.toString(2).padStart(a,"0"),c=Number(a-s),u=l.substring(0,a-c);return n.start=BigInt(`0b${u}${"0".repeat(c)}`),n.end=BigInt(`0b${u}${"1".repeat(c)}`),n}/*! SPDX-License-Identifier: GPL-2.0 +`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),uO=new RegExp(`(?:^${ts}$)|(?:^${_f}$)`),dO=new RegExp(`^${ts}$`),hO=new RegExp(`^${_f}$`),yf=t=>t&&t.exact?uO:new RegExp(`(?:${jr(t)}${ts}${jr(t)})|(?:${jr(t)}${_f}${jr(t)})`,"g");yf.v4=t=>t&&t.exact?dO:new RegExp(`${jr(t)}${ts}${jr(t)}`,"g");yf.v6=t=>t&&t.exact?hO:new RegExp(`${jr(t)}${_f}${jr(t)}`,"g");const bC={exact:!1},wC=`${yf.v4().source}\\/(3[0-2]|[12]?[0-9])`,xC=`${yf.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,fO=new RegExp(`^${wC}$`),gO=new RegExp(`^${xC}$`),pO=({exact:t}=bC)=>t?fO:new RegExp(wC,"g"),mO=({exact:t}=bC)=>t?gO:new RegExp(xC,"g"),EC=pO({exact:!0}),CC=mO({exact:!0}),b_=t=>EC.test(t)?4:CC.test(t)?6:0;b_.v4=t=>EC.test(t);b_.v6=t=>CC.test(t);const At=t=>{const e=tt();if(e.Locale===null)return t;const i=Object.keys(e.Locale).filter(s=>t.match(new RegExp("^"+s+"$","gi"))!==null);return i.length===0||i.length>1?t:t.replace(new RegExp(i[0],"gi"),e.Locale[i[0]])},qn=oC("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",ConfigurationListInterval:void 0,PeerScheduleJobs:{dropdowns:{Field:[{display:At("Total Received"),value:"total_receive",unit:"GB",type:"number"},{display:At("Total Sent"),value:"total_sent",unit:"GB",type:"number"},{display:At("Total Usage"),value:"total_data",unit:"GB",type:"number"},{display:At("Date"),value:"date",type:"date"}],Operator:[{display:At("larger than"),value:"lgt"}],Action:[{display:At("Restrict Peer"),value:"restrict"},{display:At("Delete Peer"),value:"delete"}]}}}),actions:{async getConfigurations(){await Yt("/api/getWireguardConfigurations",{},t=>{t.status&&(this.Configurations=t.data)})},regexCheckIP(t){return/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/.test(t)},checkCIDR(t){return b_(t)!==0},checkWGKeyLength(t){return console.log(t),/^[A-Za-z0-9+/]{43}=?=?$/.test(t)}}}),je=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},_O={name:"localeText",props:{t:""},computed:{getLocaleText(){return At(this.t)}}};function yO(t,e,n,i,s,r){return we(this.getLocaleText)}const He=je(_O,[["render",yO]]),vO={name:"navbar",components:{LocaleText:He},setup(){const t=qn(),e=tt();return{wireguardConfigurationsStore:t,dashboardConfigurationStore:e}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:""}},mounted(){Yt("/api/getDashboardUpdate",{},t=>{t.status?(t.data&&(this.updateAvailable=!0,this.updateUrl=t.data),this.updateMessage=t.message):(this.updateMessage=At("Failed to check available update"),console.log(`Failed to get update: ${t.message}`))})}},bO=["data-bs-theme"],wO={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},xO={class:"sidebar-sticky"},EO={class:"nav flex-column px-2"},CO={class:"nav-item"},SO={class:"nav-item"},TO={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},AO={class:"nav flex-column px-2"},kO={class:"nav-item"},MO={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},PO={class:"nav flex-column px-2"},IO={class:"nav-item"},DO={class:"nav-item"},RO={class:"nav flex-column px-2"},LO={class:"nav-item"},OO={class:"nav-item",style:{"font-size":"0.8rem"}},$O=["href"],NO={class:"nav-link text-muted rounded-3"},FO={key:1,class:"nav-link text-muted rounded-3"};function BO(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),V("div",{class:Pe(["col-md-3 col-lg-2 d-md-block p-3 navbar-container",{active:this.dashboardConfigurationStore.ShowNavBar}]),"data-bs-theme":i.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[g("nav",wO,[g("div",xO,[e[7]||(e[7]=g("h5",{class:"text-white text-center m-0 py-3 mb-3 btn-brand fw-light"},"WGDashboard",-1)),g("ul",EO,[g("li",CO,[N(a,{class:"nav-link rounded-3",to:"/","exact-active-class":"active"},{default:De(()=>[e[1]||(e[1]=g("i",{class:"bi bi-house me-2"},null,-1)),N(o,{t:"Home"})]),_:1})]),g("li",SO,[N(a,{class:"nav-link rounded-3",to:"/settings","exact-active-class":"active"},{default:De(()=>[e[2]||(e[2]=g("i",{class:"bi bi-gear me-2"},null,-1)),N(o,{t:"Settings"})]),_:1})])]),e[8]||(e[8]=g("hr",{class:"text-body"},null,-1)),g("h6",TO,[e[3]||(e[3]=g("i",{class:"bi bi-body-text me-2"},null,-1)),N(o,{t:"WireGuard Configurations"})]),g("ul",AO,[g("li",kO,[(R(!0),V(Oe,null,Ze(this.wireguardConfigurationsStore.Configurations,l=>(R(),Se(a,{to:"/configuration/"+l.Name+"/peers",class:"nav-link nav-conf-link rounded-3","active-class":"active"},{default:De(()=>[g("span",{class:Pe(["dot me-2",{active:l.Status}])},null,2),Ue(" "+we(l.Name),1)]),_:2},1032,["to"]))),256))])]),e[9]||(e[9]=g("hr",{class:"text-body"},null,-1)),g("h6",MO,[e[4]||(e[4]=g("i",{class:"bi bi-tools me-2"},null,-1)),N(o,{t:"Tools"})]),g("ul",PO,[g("li",IO,[N(a,{to:"/ping",class:"nav-link rounded-3","active-class":"active"},{default:De(()=>[N(o,{t:"Ping"})]),_:1})]),g("li",DO,[N(a,{to:"/traceroute",class:"nav-link rounded-3","active-class":"active"},{default:De(()=>[N(o,{t:"Traceroute"})]),_:1})])]),e[10]||(e[10]=g("hr",{class:"text-body"},null,-1)),g("ul",RO,[g("li",LO,[g("a",{class:"nav-link text-danger rounded-3",onClick:e[0]||(e[0]=l=>this.dashboardConfigurationStore.signOut()),role:"button",style:{"font-weight":"bold"}},[e[5]||(e[5]=g("i",{class:"bi bi-box-arrow-left me-2"},null,-1)),N(o,{t:"Sign Out"})])]),g("li",OO,[this.updateAvailable?(R(),V("a",{key:0,href:this.updateUrl,class:"text-decoration-none rounded-3",target:"_blank"},[g("small",NO,[N(o,{t:this.updateMessage},null,8,["t"]),e[6]||(e[6]=Ue(" (")),N(o,{t:"Current Version:"}),Ue(" "+we(i.dashboardConfigurationStore.Configuration.Server.version)+") ",1)])],8,$O)):(R(),V("small",FO,[N(o,{t:this.updateMessage},null,8,["t"]),Ue(" ("+we(i.dashboardConfigurationStore.Configuration.Server.version)+") ",1)]))])])])])],10,bO)}const VO=je(vO,[["render",BO],["__scopeId","data-v-f9d83f99"]]),zO={name:"message",components:{LocaleText:He},props:{message:Object},mounted(){setTimeout(()=>{this.message.show=!1},5e3)}},WO=["id"],YO={class:"card-body"},HO={class:"fw-bold d-block",style:{"text-transform":"uppercase"}};function jO(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe(["card shadow rounded-3 position-relative mb-2 message ms-auto",{"text-bg-danger":this.message.type==="danger","text-bg-success":this.message.type==="success","text-bg-warning":this.message.type==="warning"}]),id:this.message.id},[g("div",YO,[g("small",HO,[N(o,{t:"FROM "}),Ue(" "+we(this.message.from),1)]),Ue(" "+we(this.message.content),1)])],10,WO)}const SC=je(zO,[["render",jO],["__scopeId","data-v-e30054c0"]]),KO={name:"index",components:{Message:SC,Navbar:VO},async setup(){return{dashboardConfigurationStore:tt()}},computed:{getMessages(){return this.dashboardConfigurationStore.Messages.filter(t=>t.show)}}},UO=["data-bs-theme"],GO={class:"row h-100"},XO={class:"col-md-9 ml-sm-auto col-lg-10 px-md-4 overflow-y-scroll mb-0"},qO={class:"messageCentre text-body position-fixed d-flex"};function ZO(t,e,n,i,s,r){const o=Ee("Navbar"),a=Ee("RouterView"),l=Ee("Message");return R(),V("div",{class:"container-fluid flex-grow-1 main","data-bs-theme":this.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[g("div",GO,[N(o),g("main",XO,[(R(),Se(p_,null,{default:De(()=>[N(a,null,{default:De(({Component:c})=>[N($t,{name:"fade2",mode:"out-in"},{default:De(()=>[(R(),Se(ma(c)))]),_:2},1024)]),_:1})]),_:1})),g("div",qO,[N(Ul,{name:"message",tag:"div",class:"position-relative flex-grow-1 d-flex align-items-end"},{default:De(()=>[(R(!0),V(Oe,null,Ze(r.getMessages.slice().reverse(),c=>(R(),Se(l,{message:c,key:c.id},null,8,["message"]))),128))]),_:1})])])])],8,UO)}const JO=je(KO,[["render",ZO],["__scopeId","data-v-a66d22c4"]]);var TC={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Xw,function(){var n=1e3,i=6e4,s=36e5,r="millisecond",o="second",a="minute",l="hour",c="day",u="week",d="month",h="quarter",f="year",p="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var F=["th","st","nd","rd"],D=$%100;return"["+$+(F[(D-20)%10]||F[D]||F[0])+"]"}},x=function($,F,D){var z=String($);return!z||z.length>=F?$:""+Array(F+1-z.length).join(D)+$},E={s:x,z:function($){var F=-$.utcOffset(),D=Math.abs(F),z=Math.floor(D/60),X=D%60;return(F<=0?"+":"-")+x(z,2,"0")+":"+x(X,2,"0")},m:function $(F,D){if(F.date()1)return $(H[0])}else{var le=F.name;S[le]=F,X=le}return!z&&X&&(w=X),X||!z&&w},P=function($,F){if(A($))return $.clone();var D=typeof F=="object"?F:{};return D.date=$,D.args=arguments,new Y(D)},B=E;B.l=k,B.i=A,B.w=function($,F){return P($,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var Y=function(){function $(D){this.$L=k(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[T]=!0}var F=$.prototype;return F.parse=function(D){this.$d=function(z){var X=z.date,Z=z.utc;if(X===null)return new Date(NaN);if(B.u(X))return new Date;if(X instanceof Date)return new Date(X);if(typeof X=="string"&&!/Z$/i.test(X)){var H=X.match(y);if(H){var le=H[2]-1||0,ie=(H[7]||"0").substring(0,3);return Z?new Date(Date.UTC(H[1],le,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ie)):new Date(H[1],le,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ie)}}return new Date(X)}(D),this.init()},F.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},F.$utils=function(){return B},F.isValid=function(){return this.$d.toString()!==m},F.isSame=function(D,z){var X=P(D);return this.startOf(z)<=X&&X<=this.endOf(z)},F.isAfter=function(D,z){return P(D){if(t.status===200)return t.json();throw new Error(t.statusText)}).then(()=>{this.endTime=bi(),this.active=!0}).catch(t=>{this.active=!1,this.errorMsg=t}),this.refreshing=!1)},async connect(){await fetch(`${this.server.host}/api/authenticate`,{headers:{"content-type":"application/json","wg-dashboard-apikey":this.server.apiKey},body:JSON.stringify({host:window.location.hostname}),method:"POST",signal:AbortSignal.timeout(5e3)}).then(t=>t.json()).then(t=>{this.$emit("setActiveServer"),this.$router.push("/")})}},mounted(){this.handshake()},computed:{getHandshakeTime(){return this.startTime&&this.endTime?`${bi().subtract(this.startTime).millisecond()}ms`:this.refreshing?At("Pinging..."):this.errorMsg?this.errorMsg:"N/A"}}},t$={class:"card rounded-3"},n$={class:"card-body"},i$={class:"d-flex gap-3 w-100 remoteServerContainer"},s$={class:"d-flex gap-3 align-items-center flex-grow-1"},r$={class:"d-flex gap-3 align-items-center flex-grow-1"},o$={class:"d-flex gap-2 button-group"},a$={class:"card-footer gap-2 d-flex align-items-center"},l$={key:0,class:"spin ms-auto text-primary-emphasis"};function c$(t,e,n,i,s,r){return R(),V("div",t$,[g("div",n$,[g("div",i$,[g("div",s$,[e[7]||(e[7]=g("i",{class:"bi bi-server"},null,-1)),$e(g("input",{class:"form-control form-control-sm",onBlur:e[0]||(e[0]=o=>this.handshake()),"onUpdate:modelValue":e[1]||(e[1]=o=>this.server.host=o),type:"url"},null,544),[[We,this.server.host]])]),g("div",r$,[e[8]||(e[8]=g("i",{class:"bi bi-key-fill"},null,-1)),$e(g("input",{class:"form-control form-control-sm",onBlur:e[2]||(e[2]=o=>this.handshake()),"onUpdate:modelValue":e[3]||(e[3]=o=>this.server.apiKey=o),type:"text"},null,544),[[We,this.server.apiKey]])]),g("div",o$,[g("button",{onClick:e[4]||(e[4]=o=>this.$emit("delete")),class:"ms-auto btn btn-sm bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle"},e[9]||(e[9]=[g("i",{class:"bi bi-trash"},null,-1)])),g("button",{onClick:e[5]||(e[5]=o=>this.connect()),class:Pe([{disabled:!this.active},"ms-auto btn btn-sm bg-success-subtle text-success-emphasis border-1 border-success-subtle"])},e[10]||(e[10]=[g("i",{class:"bi bi-arrow-right-circle"},null,-1)]),2)])])]),g("div",a$,[g("span",{class:Pe(["dot ms-0 me-2",[this.active?"active":"inactive"]])},null,2),g("small",null,we(this.getHandshakeTime),1),this.refreshing?(R(),V("div",l$,e[11]||(e[11]=[g("i",{class:"bi bi-arrow-clockwise"},null,-1)]))):(R(),V("a",{key:1,role:"button",onClick:e[6]||(e[6]=o=>this.handshake()),class:"text-primary-emphasis text-decoration-none ms-auto disabled"},e[12]||(e[12]=[g("i",{class:"bi bi-arrow-clockwise me"},null,-1)])))])])}const u$=je(e$,[["render",c$],["__scopeId","data-v-ed7817c7"]]),d$={name:"RemoteServerList",setup(){return{store:tt()}},components:{LocaleText:He,RemoteServer:u$}},h$={class:"w-100 mt-3"},f$={class:"d-flex align-items-center mb-3"},g$={class:"mb-0"},p$={class:"w-100 d-flex gap-3 flex-column p-3 border border-1 border-secondary-subtle rounded-3",style:{height:"400px","overflow-y":"scroll"}},m$={key:0,class:"text-muted m-auto"};function _$(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RemoteServer");return R(),V("div",h$,[g("div",f$,[g("h5",g$,[N(o,{t:"Server List"})]),g("button",{onClick:e[0]||(e[0]=l=>this.store.addCrossServerConfiguration()),class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle shadow-sm ms-auto"},[e[1]||(e[1]=g("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),N(o,{t:"Server"})])]),g("div",p$,[(R(!0),V(Oe,null,Ze(this.store.CrossServerConfiguration.ServerList,(l,c)=>(R(),Se(a,{onSetActiveServer:u=>this.store.setActiveCrossServer(c),onDelete:u=>this.store.deleteCrossServerConfiguration(c),key:c,server:l},null,8,["onSetActiveServer","onDelete","server"]))),128)),Object.keys(this.store.CrossServerConfiguration.ServerList).length===0?(R(),V("h6",m$,[N(o,{t:"Click"}),e[2]||(e[2]=g("i",{class:"bi bi-plus-circle-fill mx-1"},null,-1)),N(o,{t:"to add your server"})])):ce("",!0)])])}const y$=je(d$,[["render",_$]]),v$={name:"signInInput",methods:{GetLocale:At},props:{id:"",data:"",type:"",placeholder:""},computed:{getLocaleText(){return At(this.placeholder)}}},b$=["type","id","name","placeholder"];function w$(t,e,n,i,s,r){return $e((R(),V("input",{type:n.type,"onUpdate:modelValue":e[0]||(e[0]=o=>this.data[this.id]=o),class:"form-control",id:this.id,name:this.id,autocomplete:"on",placeholder:this.getLocaleText,required:""},null,8,b$)),[[QE,this.data[this.id]]])}const x$=je(v$,[["render",w$]]),E$={name:"signInTOTP",methods:{GetLocale:At},props:{data:""},computed:{getLocaleText(){return At("OTP from your authenticator")}}},C$=["placeholder"];function S$(t,e,n,i,s,r){return $e((R(),V("input",{class:"form-control totp",required:"",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code",placeholder:this.getLocaleText,"onUpdate:modelValue":e[0]||(e[0]=o=>this.data.totp=o)},null,8,C$)),[[We,this.data.totp]])}const T$=je(E$,[["render",S$]]),A$={name:"signin",components:{SignInTOTP:T$,SignInInput:x$,LocaleText:He,RemoteServerList:y$,Message:SC},async setup(){const t=tt();let e="dark",n=!1,i;return t.IsElectronApp||await Promise.all([Yt("/api/getDashboardTheme",{},s=>{e=s.data}),Yt("/api/isTotpEnabled",{},s=>{n=s.data}),Yt("/api/getDashboardVersion",{},s=>{i=s.data})]),t.removeActiveCrossServer(),{store:t,theme:e,totpEnabled:n,version:i}},data(){return{data:{username:"",password:"",totp:""},loginError:!1,loginErrorMessage:"",loading:!1}},computed:{getMessages(){return this.store.Messages.filter(t=>t.show)},applyLocale(t){return At(t)}},methods:{GetLocale:At,async auth(){this.data.username&&this.data.password&&(this.totpEnabled&&this.data.totp||!this.totpEnabled)?(this.loading=!0,await xt("/api/authenticate",this.data,t=>{t.status?(this.loginError=!1,this.$refs.signInBtn.classList.add("signedIn"),t.message?this.$router.push("/welcome"):this.store.Redirect!==void 0?this.$router.push(this.store.Redirect):this.$router.push("/")):(this.loginError=!0,this.loginErrorMessage=t.message,document.querySelectorAll("input[required]").forEach(e=>{e.classList.remove("is-valid"),e.classList.add("is-invalid")}),this.loading=!1)})):document.querySelectorAll("input[required]").forEach(t=>{t.value.length===0?(t.classList.remove("is-valid"),t.classList.add("is-invalid")):(t.classList.remove("is-invalid"),t.classList.add("is-valid"))})}}},k$=["data-bs-theme"],M$={class:"login-box m-auto"},P$={class:"m-auto",style:{width:"700px"}},I$={class:"mb-0 text-body"},D$={key:0,class:"alert alert-danger mt-2 mb-0",role:"alert"},R$={class:"form-group text-body"},L$={class:"form-group text-body"},O$={key:0,class:"form-group text-body"},$$={class:"btn btn-lg btn-dark ms-auto mt-4 w-100 d-flex btn-brand signInBtn",ref:"signInBtn"},N$={key:0,class:"d-flex w-100"},F$={key:1,class:"d-flex w-100 align-items-center"},B$={key:3,class:"d-flex mt-3"},V$={class:"form-check form-switch ms-auto"},z$={class:"form-check-label",for:"flexSwitchCheckChecked"},W$={class:"text-muted pb-3 d-block w-100 text-center mt-3"},Y$={class:"messageCentre text-body position-absolute end-0 m-3"};function H$(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("SignInInput"),l=Ee("SignInTOTP"),c=Ee("RemoteServerList"),u=Ee("Message");return R(),V("div",{class:"container-fluid login-container-fluid d-flex main flex-column py-4 text-body",style:{"overflow-y":"scroll"},"data-bs-theme":this.theme},[g("div",M$,[g("div",P$,[g("h4",I$,[N(o,{t:"Welcome to"})]),e[7]||(e[7]=g("span",{class:"dashboardLogo display-3"},[g("strong",null,"WGDashboard")],-1)),s.loginError?(R(),V("div",D$,[N(o,{t:this.loginErrorMessage},null,8,["t"])])):ce("",!0),this.store.CrossServerConfiguration.Enable?(R(),Se(c,{key:2})):(R(),V("form",{key:1,onSubmit:e[0]||(e[0]=d=>{d.preventDefault(),this.auth()})},[g("div",R$,[e[2]||(e[2]=g("label",{for:"username",class:"text-left",style:{"font-size":"1rem"}},[g("i",{class:"bi bi-person-circle"})],-1)),N(a,{id:"username",data:this.data,type:"text",placeholder:"Username"},null,8,["data"])]),g("div",L$,[e[3]||(e[3]=g("label",{for:"password",class:"text-left",style:{"font-size":"1rem"}},[g("i",{class:"bi bi-key-fill"})],-1)),N(a,{id:"password",data:this.data,type:"password",placeholder:"Password"},null,8,["data"])]),i.totpEnabled?(R(),V("div",O$,[e[4]||(e[4]=g("label",{for:"totp",class:"text-left",style:{"font-size":"1rem"}},[g("i",{class:"bi bi-lock-fill"})],-1)),N(l,{data:this.data},null,8,["data"])])):ce("",!0),g("button",$$,[this.loading?(R(),V("span",F$,[N(o,{t:"Signing In..."}),e[6]||(e[6]=g("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},null,-1))])):(R(),V("span",N$,[N(o,{t:"Sign In"}),e[5]||(e[5]=g("i",{class:"ms-auto bi bi-chevron-right"},null,-1))]))],512)],32)),this.store.IsElectronApp?ce("",!0):(R(),V("div",B$,[g("div",V$,[$e(g("input",{"onUpdate:modelValue":e[1]||(e[1]=d=>this.store.CrossServerConfiguration.Enable=d),class:"form-check-input",type:"checkbox",role:"switch",id:"flexSwitchCheckChecked"},null,512),[[Kn,this.store.CrossServerConfiguration.Enable]]),g("label",z$,[N(o,{t:"Access Remote Server"})])])]))])]),g("small",W$,[Ue(" WGDashboard "+we(this.version)+" | Developed with ❤️ by ",1),e[8]||(e[8]=g("a",{href:"https://github.com/donaldzou",target:"_blank"},[g("strong",null,"Donald Zou")],-1))]),g("div",Y$,[N(Ul,{name:"message",tag:"div",class:"position-relative"},{default:De(()=>[(R(!0),V(Oe,null,Ze(r.getMessages.slice().reverse(),d=>(R(),Se(u,{message:d,key:d.id},null,8,["message"]))),128))]),_:1})])],8,k$)}const j$=je(A$,[["render",H$],["__scopeId","data-v-2fa13e60"]]),K$={name:"configurationCard",components:{LocaleText:He},props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String}},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:tt()}},methods:{toggle(){this.configurationToggling=!0,Yt("/api/toggleWireguardConfiguration/",{configurationName:this.c.Name},t=>{t.status?this.dashboardConfigurationStore.newMessage("Server",`${this.c.Name} ${t.data?"is on":"is off"}`):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.c.Status=t.data,this.configurationToggling=!1})}}},U$={class:"card conf_card rounded-3 shadow text-decoration-none"},G$={class:"mb-0"},X$={class:"card-title mb-0"},q$={class:"card-footer d-flex gap-2 flex-column"},Z$={class:"row"},J$={class:"col-6 col-md-3"},Q$={class:"text-primary-emphasis col-6 col-md-3"},eN={class:"text-success-emphasis col-6 col-md-3"},tN={class:"text-md-end col-6 col-md-3"},nN={class:"d-flex align-items-center gap-2"},iN={class:"text-muted"},sN={style:{"word-break":"keep-all"}},rN={class:"mb-0 d-block d-lg-inline-block"},oN={style:{"line-break":"anywhere"}},aN={class:"form-check form-switch ms-auto"},lN=["for"],cN={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},uN=["disabled","id"];function dN(t,e,n,i,s,r){const o=Ee("RouterLink"),a=Ee("LocaleText");return R(),V("div",U$,[N(o,{to:"/configuration/"+n.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:De(()=>[g("h6",G$,[g("span",{class:Pe(["dot",{active:n.c.Status}])},null,2)]),g("h6",X$,[g("samp",null,we(n.c.Name),1)]),e[2]||(e[2]=g("h6",{class:"mb-0 ms-auto"},[g("i",{class:"bi bi-chevron-right"})],-1))]),_:1},8,["to"]),g("div",q$,[g("div",Z$,[g("small",J$,[e[3]||(e[3]=g("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),Ue(we(n.c.DataUsage.Total>0?n.c.DataUsage.Total.toFixed(4):0)+" GB ",1)]),g("small",Q$,[e[4]||(e[4]=g("i",{class:"bi bi-arrow-down me-2"},null,-1)),Ue(we(n.c.DataUsage.Receive>0?n.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)]),g("small",eN,[e[5]||(e[5]=g("i",{class:"bi bi-arrow-up me-2"},null,-1)),Ue(we(n.c.DataUsage.Sent>0?n.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)]),g("small",tN,[g("span",{class:Pe(["dot me-2",{active:n.c.ConnectedPeers>0}])},null,2),Ue(" "+we(n.c.ConnectedPeers)+" / "+we(n.c.TotalPeers)+" ",1),N(a,{t:"Peers"})])]),g("div",nN,[g("small",iN,[g("strong",sN,[N(a,{t:"Public Key"})])]),g("small",rN,[g("samp",oN,we(n.c.PublicKey),1)]),g("div",aN,[g("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+n.c.PrivateKey},[!n.c.Status&&this.configurationToggling?(R(),Se(a,{key:0,t:"Turning Off..."})):n.c.Status&&this.configurationToggling?(R(),Se(a,{key:1,t:"Turning On..."})):n.c.Status&&!this.configurationToggling?(R(),Se(a,{key:2,t:"On"})):!n.c.Status&&!this.configurationToggling?(R(),Se(a,{key:3,t:"Off"})):ce("",!0),this.configurationToggling?(R(),V("span",cN)):ce("",!0)],8,lN),$e(g("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+n.c.PrivateKey,onChange:e[0]||(e[0]=l=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=l=>n.c.Status=l)},null,40,uN),[[Kn,n.c.Status]])])])])])}const hN=je(K$,[["render",dN]]),fN={name:"configurationList",components:{LocaleText:He,ConfigurationCard:hN},async setup(){return{wireguardConfigurationsStore:qn()}},data(){return{configurationLoaded:!1}},async mounted(){await this.wireguardConfigurationsStore.getConfigurations(),this.configurationLoaded=!0,this.wireguardConfigurationsStore.ConfigurationListInterval=setInterval(()=>{this.wireguardConfigurationsStore.getConfigurations()},1e4)},beforeUnmount(){clearInterval(this.wireguardConfigurationsStore.ConfigurationListInterval)}},gN={class:"mt-md-5 mt-3"},pN={class:"container-md"},mN={class:"d-flex mb-4 configurationListTitle"},_N={class:"text-body d-flex"},yN={key:0},vN={key:0,class:"text-muted"},bN={key:1,class:"d-flex gap-3 flex-column mb-3"};function wN(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink"),l=Ee("ConfigurationCard");return R(),V("div",gN,[g("div",pN,[g("div",mN,[g("h3",_N,[e[0]||(e[0]=g("i",{class:"bi bi-body-text me-2"},null,-1)),g("span",null,[N(o,{t:"WireGuard Configurations"})])]),N(a,{to:"/new_configuration",class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto rounded-3"},{default:De(()=>[e[1]||(e[1]=g("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),N(o,{t:"Configuration"})]),_:1})]),N($t,{name:"fade",mode:"out-in"},{default:De(()=>[this.configurationLoaded?(R(),V("div",yN,[this.wireguardConfigurationsStore.Configurations.length===0?(R(),V("p",vN,[N(o,{t:"You don't have any WireGuard configurations yet. Please check the configuration folder or change it in Settings. By default the folder is /etc/wireguard."})])):(R(),V("div",bN,[(R(!0),V(Oe,null,Ze(this.wireguardConfigurationsStore.Configurations,c=>(R(),Se(l,{key:c.Name,c},null,8,["c"]))),128))]))])):ce("",!0)]),_:1})])])}const xN=je(fN,[["render",wN],["__scopeId","data-v-106e7dee"]]);let Ed;const EN=new Uint8Array(16);function CN(){if(!Ed&&(Ed=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ed))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ed(EN)}const Ln=[];for(let t=0;t<256;++t)Ln.push((t+256).toString(16).slice(1));function SN(t,e=0){return Ln[t[e+0]]+Ln[t[e+1]]+Ln[t[e+2]]+Ln[t[e+3]]+"-"+Ln[t[e+4]]+Ln[t[e+5]]+"-"+Ln[t[e+6]]+Ln[t[e+7]]+"-"+Ln[t[e+8]]+Ln[t[e+9]]+"-"+Ln[t[e+10]]+Ln[t[e+11]]+Ln[t[e+12]]+Ln[t[e+13]]+Ln[t[e+14]]+Ln[t[e+15]]}const TN=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),J0={randomUUID:TN};function Bs(t,e,n){if(J0.randomUUID&&!e&&!t)return J0.randomUUID();t=t||{};const i=t.random||(t.rng||CN)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,SN(i)}const AN={components:{LocaleText:He},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=tt(),e=`input_${Bs()}`;return{store:t,uuid:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Peers[this.targetData]},methods:{async useValidation(){this.changed&&await xt("/api/updateDashboardConfigurationItem",{section:"Peers",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Peers[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message),this.changed=!1,this.updating=!1})}}},kN={class:"form-group mb-2"},MN=["for"],PN=["id","disabled"],IN={class:"invalid-feedback"},DN={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1"};function RN(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",kN,[g("label",{for:this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:this.title},null,8,["t"])])])],8,MN),$e(g("input",{type:"text",class:Pe(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>r.useValidation()),disabled:this.updating},null,42,PN),[[We,this.value]]),g("div",IN,we(this.invalidFeedback),1),n.warning?(R(),V("div",DN,[g("small",null,[e[3]||(e[3]=g("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),N(o,{t:n.warningText},null,8,["t"])])])):ce("",!0)])}const LN=je(AN,[["render",RN]]),ON=t=>{},$N={name:"accountSettingsInputUsername",components:{LocaleText:He},props:{targetData:String,title:String},setup(){const t=tt(),e=`input_${Bs()}`;return{store:t,uuid:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Account[this.targetData]},methods:{async useValidation(t){this.changed&&(this.updating=!0,await xt("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},e=>{e.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=e.message),this.changed=!1,this.updating=!1}))}}},NN={class:"form-group mb-2"},FN=["for"],BN=["id","disabled"],VN={class:"invalid-feedback"};function zN(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",NN,[g("label",{for:this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:this.title},null,8,["t"])])])],8,FN),$e(g("input",{type:"text",class:Pe(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>r.useValidation()),disabled:this.updating},null,42,BN),[[We,this.value]]),g("div",VN,we(this.invalidFeedback),1)])}const WN=je($N,[["render",zN]]),YN={name:"accountSettingsInputPassword",components:{LocaleText:He},props:{targetData:String,warning:!1,warningText:""},setup(){const t=tt(),e=`input_${Bs()}`;return{store:t,uuid:e}},data(){return{value:{currentPassword:"",newPassword:"",repeatNewPassword:""},invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0}},methods:{async useValidation(){Object.values(this.value).find(t=>t.length===0)===void 0?this.value.newPassword===this.value.repeatNewPassword?await xt("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.isValid=!1,this.value={currentPassword:"",newPassword:"",repeatNewPassword:""}},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message)}):(this.showInvalidFeedback=!0,this.invalidFeedback="New passwords does not match"):(this.showInvalidFeedback=!0,this.invalidFeedback="Please fill in all required fields.")}},computed:{passwordValid(){return Object.values(this.value).find(t=>t.length===0)===void 0&&this.value.newPassword===this.value.repeatNewPassword}}},HN={class:"d-flex flex-column"},jN={class:"row"},KN={class:"col-sm"},UN={class:"form-group mb-2"},GN=["for"],XN=["id"],qN={key:0,class:"invalid-feedback d-block"},ZN={class:"col-sm"},JN={class:"form-group mb-2"},QN=["for"],e3=["id"],t3={class:"col-sm"},n3={class:"form-group mb-2"},i3=["for"],s3=["id"],r3=["disabled"];function o3(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",HN,[g("div",jN,[g("div",KN,[g("div",UN,[g("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:"Current Password"})])])],8,GN),$e(g("input",{type:"password",class:Pe(["form-control mb-2",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),"onUpdate:modelValue":e[0]||(e[0]=a=>this.value.currentPassword=a),id:"currentPassword_"+this.uuid},null,10,XN),[[We,this.value.currentPassword]]),s.showInvalidFeedback?(R(),V("div",qN,we(this.invalidFeedback),1)):ce("",!0)])]),g("div",ZN,[g("div",JN,[g("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:"New Password"})])])],8,QN),$e(g("input",{type:"password",class:Pe(["form-control mb-2",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),"onUpdate:modelValue":e[1]||(e[1]=a=>this.value.newPassword=a),id:"newPassword_"+this.uuid},null,10,e3),[[We,this.value.newPassword]])])]),g("div",t3,[g("div",n3,[g("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:"Repeat New Password"})])])],8,i3),$e(g("input",{type:"password",class:Pe(["form-control mb-2",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),"onUpdate:modelValue":e[2]||(e[2]=a=>this.value.repeatNewPassword=a),id:"repeatNewPassword_"+this.uuid},null,10,s3),[[We,this.value.repeatNewPassword]])])])]),g("button",{disabled:!this.passwordValid,class:"ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",onClick:e[3]||(e[3]=a=>this.useValidation())},[e[4]||(e[4]=g("i",{class:"bi bi-save2-fill me-2"},null,-1)),N(o,{t:"Update Password"})],8,r3)])}const a3=je(YN,[["render",o3]]),l3={name:"dashboardSettingsInputWireguardConfigurationPath",components:{LocaleText:He},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=tt(),e=qn(),n=`input_${Bs()}`;return{store:t,uuid:n,WireguardConfigurationStore:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Server[this.targetData]},methods:{async useValidation(){this.changed&&(this.updating=!0,await xt("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3),this.WireguardConfigurationStore.getConfigurations(),this.store.newMessage("Server","WireGuard configuration path saved","success")):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message),this.changed=!1,this.updating=!1}))}}},c3={class:"form-group"},u3=["for"],d3={class:"d-flex gap-2 align-items-start"},h3={class:"flex-grow-1"},f3=["id","disabled"],g3={class:"invalid-feedback fw-bold"},p3=["disabled"],m3={key:0,class:"bi bi-save2-fill"},_3={key:1,class:"spinner-border spinner-border-sm"},y3={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1 mb-2"};function v3(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",c3,[g("label",{for:this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:this.title},null,8,["t"])])])],8,u3),g("div",d3,[g("div",h3,[$e(g("input",{type:"text",class:Pe(["form-control rounded-3",{"is-invalid":this.showInvalidFeedback,"is-valid":this.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),disabled:this.updating},null,42,f3),[[We,this.value]]),g("div",g3,we(this.invalidFeedback),1)]),g("button",{onClick:e[2]||(e[2]=a=>this.useValidation()),disabled:!this.changed,class:"ms-auto btn rounded-3 border-success-subtle bg-success-subtle text-success-emphasis"},[this.updating?(R(),V("span",_3)):(R(),V("i",m3))],8,p3)]),n.warning?(R(),V("div",y3,[g("small",null,[e[3]||(e[3]=g("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),N(o,{t:n.warningText},null,8,["t"])])])):ce("",!0)])}const b3=je(l3,[["render",v3]]),w3={name:"dashboardTheme",components:{LocaleText:He},setup(){return{dashboardConfigurationStore:tt()}},methods:{async switchTheme(t){await xt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:t},e=>{e.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=t)})}}},x3={class:"card mb-4 shadow rounded-3"},E3={class:"card-header"},C3={class:"card-body d-flex gap-2"};function S3(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",x3,[g("p",E3,[N(o,{t:"Dashboard Theme"})]),g("div",C3,[g("button",{class:Pe(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="light"}]),onClick:e[0]||(e[0]=a=>this.switchTheme("light"))},[e[2]||(e[2]=g("i",{class:"bi bi-sun-fill me-2"},null,-1)),N(o,{t:"Light"})],2),g("button",{class:Pe(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="dark"}]),onClick:e[1]||(e[1]=a=>this.switchTheme("dark"))},[e[3]||(e[3]=g("i",{class:"bi bi-moon-fill me-2"},null,-1)),N(o,{t:"Dark"})],2)])])}const T3=je(w3,[["render",S3]]),A3={name:"dashboardSettingsInputIPAddressAndPort",props:{},setup(){const t=tt(),e=`input_${Bs()}`;return{store:t,uuid:e}},data(){return{app_ip:"",app_port:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.app_ip=this.store.Configuration.Server.app_ip,this.app_port=this.store.Configuration.Server.app_port},methods:{async useValidation(){this.changed&&await xt("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message)})}}},k3={class:"invalid-feedback d-block mt-0"},M3={class:"row"},P3={class:"form-group mb-2 col-sm"},I3=["for"],D3=["id"],R3={class:"form-group col-sm"},L3=["for"],O3=["id"];function $3(t,e,n,i,s,r){return R(),V("div",null,[g("div",k3,we(this.invalidFeedback),1),g("div",M3,[g("div",P3,[g("label",{for:"app_ip_"+this.uuid,class:"text-muted mb-1"},e[2]||(e[2]=[g("strong",null,[g("small",null,"Dashboard IP Address")],-1)]),8,I3),$e(g("input",{type:"text",class:"form-control mb-2",id:"app_ip_"+this.uuid,"onUpdate:modelValue":e[0]||(e[0]=o=>this.app_ip=o)},null,8,D3),[[We,this.app_ip]]),e[3]||(e[3]=g("div",{class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block"},[g("small",null,[g("i",{class:"bi bi-exclamation-triangle-fill me-2"}),g("code",null,"0.0.0.0"),Ue(" means it can be access by anyone with your server IP Address.")])],-1))]),g("div",R3,[g("label",{for:"app_port_"+this.uuid,class:"text-muted mb-1"},e[4]||(e[4]=[g("strong",null,[g("small",null,"Dashboard Port")],-1)]),8,L3),$e(g("input",{type:"text",class:"form-control mb-2",id:"app_port_"+this.uuid,"onUpdate:modelValue":e[1]||(e[1]=o=>this.app_port=o)},null,8,O3),[[We,this.app_port]])])]),e[5]||(e[5]=g("button",{class:"btn btn-success btn-sm fw-bold rounded-3"},[g("i",{class:"bi bi-floppy-fill me-2"}),Ue("Update Dashboard Settings & Restart ")],-1))])}const N3=je(A3,[["render",$3]]);function Ve(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function _t(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function ss(t,e){const n=Ve(t);return isNaN(e)?_t(t,NaN):(e&&n.setDate(n.getDate()+e),n)}function ds(t,e){const n=Ve(t);if(isNaN(e))return _t(t,NaN);if(!e)return n;const i=n.getDate(),s=_t(t,n.getTime());s.setMonth(n.getMonth()+e+1,0);const r=s.getDate();return i>=r?s:(n.setFullYear(s.getFullYear(),s.getMonth(),i),n)}function AC(t,e){const{years:n=0,months:i=0,weeks:s=0,days:r=0,hours:o=0,minutes:a=0,seconds:l=0}=e,c=Ve(t),u=i||n?ds(c,i+n*12):c,d=r||s?ss(u,r+s*7):u,h=a+o*60,p=(l+h*60)*1e3;return _t(t,d.getTime()+p)}function F3(t,e){const n=+Ve(t);return _t(t,n+e)}const kC=6048e5,B3=864e5,V3=6e4,MC=36e5,z3=1e3;function W3(t,e){return F3(t,e*MC)}let Y3={};function ya(){return Y3}function ps(t,e){const n=ya(),i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=Ve(t),r=s.getDay(),o=(r=s.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function Q0(t){const e=Ve(t);return e.setHours(0,0,0,0),e}function wh(t){const e=Ve(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function IC(t,e){const n=Q0(t),i=Q0(e),s=+n-wh(n),r=+i-wh(i);return Math.round((s-r)/B3)}function H3(t){const e=PC(t),n=_t(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),Cl(n)}function j3(t,e){const n=e*3;return ds(t,n)}function w_(t,e){return ds(t,e*12)}function eb(t,e){const n=Ve(t),i=Ve(e),s=n.getTime()-i.getTime();return s<0?-1:s>0?1:s}function DC(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Hc(t){if(!DC(t)&&typeof t!="number")return!1;const e=Ve(t);return!isNaN(Number(e))}function tb(t){const e=Ve(t);return Math.trunc(e.getMonth()/3)+1}function K3(t,e){const n=Ve(t),i=Ve(e);return n.getFullYear()-i.getFullYear()}function U3(t,e){const n=Ve(t),i=Ve(e),s=eb(n,i),r=Math.abs(K3(n,i));n.setFullYear(1584),i.setFullYear(1584);const o=eb(n,i)===-s,a=s*(r-+o);return a===0?0:a}function RC(t,e){const n=Ve(t.start),i=Ve(t.end);let s=+n>+i;const r=s?+n:+i,o=s?i:n;o.setHours(0,0,0,0);let a=1;const l=[];for(;+o<=r;)l.push(Ve(o)),o.setDate(o.getDate()+a),o.setHours(0,0,0,0);return s?l.reverse():l}function Uo(t){const e=Ve(t),n=e.getMonth(),i=n-n%3;return e.setMonth(i,1),e.setHours(0,0,0,0),e}function G3(t,e){const n=Ve(t.start),i=Ve(t.end);let s=+n>+i;const r=s?+Uo(n):+Uo(i);let o=Uo(s?i:n),a=1;const l=[];for(;+o<=r;)l.push(Ve(o)),o=j3(o,a);return s?l.reverse():l}function X3(t){const e=Ve(t);return e.setDate(1),e.setHours(0,0,0,0),e}function LC(t){const e=Ve(t),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}function lu(t){const e=Ve(t),n=_t(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function OC(t,e){const n=ya(),i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=Ve(t),r=s.getDay(),o=(r{let i;const s=q3[t];return typeof s=="string"?i=s:e===1?i=s.one:i=s.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function Ig(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const J3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Q3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},eF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tF={date:Ig({formats:J3,defaultWidth:"full"}),time:Ig({formats:Q3,defaultWidth:"full"}),dateTime:Ig({formats:eF,defaultWidth:"full"})},nF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},iF=(t,e,n,i)=>nF[t];function cc(t){return(e,n)=>{const i=n?.context?String(n.context):"standalone";let s;if(i==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,a=n?.width?String(n.width):o;s=t.formattingValues[a]||t.formattingValues[o]}else{const o=t.defaultWidth,a=n?.width?String(n.width):t.defaultWidth;s=t.values[a]||t.values[o]}const r=t.argumentCallback?t.argumentCallback(e):e;return s[r]}}const sF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},rF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},oF={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},aF={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},lF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},cF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},uF=(t,e)=>{const n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},dF={ordinalNumber:uF,era:cc({values:sF,defaultWidth:"wide"}),quarter:cc({values:rF,defaultWidth:"wide",argumentCallback:t=>t-1}),month:cc({values:oF,defaultWidth:"wide"}),day:cc({values:aF,defaultWidth:"wide"}),dayPeriod:cc({values:lF,defaultWidth:"wide",formattingValues:cF,defaultFormattingWidth:"wide"})};function uc(t){return(e,n={})=>{const i=n.width,s=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],r=e.match(s);if(!r)return null;const o=r[0],a=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?fF(a,d=>d.test(o)):hF(a,d=>d.test(o));let c;c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=e.slice(o.length);return{value:c,rest:u}}}function hF(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function fF(t,e){for(let n=0;n{const i=e.match(t.matchPattern);if(!i)return null;const s=i[0],r=e.match(t.parsePattern);if(!r)return null;let o=t.valueCallback?t.valueCallback(r[0]):r[0];o=n.valueCallback?n.valueCallback(o):o;const a=e.slice(s.length);return{value:o,rest:a}}}const pF=/^(\d+)(th|st|nd|rd)?/i,mF=/\d+/i,_F={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},yF={any:[/^b/i,/^(a|c)/i]},vF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bF={any:[/1/i,/2/i,/3/i,/4/i]},wF={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},xF={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},EF={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},CF={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},SF={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},TF={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},AF={ordinalNumber:gF({matchPattern:pF,parsePattern:mF,valueCallback:t=>parseInt(t,10)}),era:uc({matchPatterns:_F,defaultMatchWidth:"wide",parsePatterns:yF,defaultParseWidth:"any"}),quarter:uc({matchPatterns:vF,defaultMatchWidth:"wide",parsePatterns:bF,defaultParseWidth:"any",valueCallback:t=>t+1}),month:uc({matchPatterns:wF,defaultMatchWidth:"wide",parsePatterns:xF,defaultParseWidth:"any"}),day:uc({matchPatterns:EF,defaultMatchWidth:"wide",parsePatterns:CF,defaultParseWidth:"any"}),dayPeriod:uc({matchPatterns:SF,defaultMatchWidth:"any",parsePatterns:TF,defaultParseWidth:"any"})},$C={code:"en-US",formatDistance:Z3,formatLong:tF,formatRelative:iF,localize:dF,match:AF,options:{weekStartsOn:0,firstWeekContainsDate:1}};function kF(t){const e=Ve(t);return IC(e,lu(e))+1}function x_(t){const e=Ve(t),n=+Cl(e)-+H3(e);return Math.round(n/kC)+1}function E_(t,e){const n=Ve(t),i=n.getFullYear(),s=ya(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,o=_t(t,0);o.setFullYear(i+1,0,r),o.setHours(0,0,0,0);const a=ps(o,e),l=_t(t,0);l.setFullYear(i,0,r),l.setHours(0,0,0,0);const c=ps(l,e);return n.getTime()>=a.getTime()?i+1:n.getTime()>=c.getTime()?i:i-1}function MF(t,e){const n=ya(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=E_(t,e),r=_t(t,0);return r.setFullYear(s,0,i),r.setHours(0,0,0,0),ps(r,e)}function C_(t,e){const n=Ve(t),i=+ps(n,e)-+MF(n,e);return Math.round(i/kC)+1}function Ct(t,e){const n=t<0?"-":"",i=Math.abs(t).toString().padStart(e,"0");return n+i}const Mr={y(t,e){const n=t.getFullYear(),i=n>0?n:1-n;return Ct(e==="yy"?i%100:i,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):Ct(n+1,2)},d(t,e){return Ct(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return Ct(t.getHours()%12||12,e.length)},H(t,e){return Ct(t.getHours(),e.length)},m(t,e){return Ct(t.getMinutes(),e.length)},s(t,e){return Ct(t.getSeconds(),e.length)},S(t,e){const n=e.length,i=t.getMilliseconds(),s=Math.trunc(i*Math.pow(10,n-3));return Ct(s,e.length)}},Ra={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ib={G:function(t,e,n){const i=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const i=t.getFullYear(),s=i>0?i:1-i;return n.ordinalNumber(s,{unit:"year"})}return Mr.y(t,e)},Y:function(t,e,n,i){const s=E_(t,i),r=s>0?s:1-s;if(e==="YY"){const o=r%100;return Ct(o,2)}return e==="Yo"?n.ordinalNumber(r,{unit:"year"}):Ct(r,e.length)},R:function(t,e){const n=PC(t);return Ct(n,e.length)},u:function(t,e){const n=t.getFullYear();return Ct(n,e.length)},Q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return Ct(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return Ct(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n){const i=t.getMonth();switch(e){case"M":case"MM":return Mr.M(t,e);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){const i=t.getMonth();switch(e){case"L":return String(i+1);case"LL":return Ct(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){const s=C_(t,i);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):Ct(s,e.length)},I:function(t,e,n){const i=x_(t);return e==="Io"?n.ordinalNumber(i,{unit:"week"}):Ct(i,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Mr.d(t,e)},D:function(t,e,n){const i=kF(t);return e==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Ct(i,e.length)},E:function(t,e,n){const i=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){const s=t.getDay(),r=(s-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return Ct(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){const s=t.getDay(),r=(s-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return Ct(r,e.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const i=t.getDay(),s=i===0?7:i;switch(e){case"i":return String(s);case"ii":return Ct(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const i=t.getHours();let s;switch(i===12?s=Ra.noon:i===0?s=Ra.midnight:s=i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const i=t.getHours();let s;switch(i>=17?s=Ra.evening:i>=12?s=Ra.afternoon:i>=4?s=Ra.morning:s=Ra.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let i=t.getHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Mr.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Mr.H(t,e)},K:function(t,e,n){const i=t.getHours()%12;return e==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Ct(i,e.length)},k:function(t,e,n){let i=t.getHours();return i===0&&(i=24),e==="ko"?n.ordinalNumber(i,{unit:"hour"}):Ct(i,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Mr.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Mr.s(t,e)},S:function(t,e){return Mr.S(t,e)},X:function(t,e,n){const i=t.getTimezoneOffset();if(i===0)return"Z";switch(e){case"X":return rb(i);case"XXXX":case"XX":return zo(i);case"XXXXX":case"XXX":default:return zo(i,":")}},x:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"x":return rb(i);case"xxxx":case"xx":return zo(i);case"xxxxx":case"xxx":default:return zo(i,":")}},O:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+sb(i,":");case"OOOO":default:return"GMT"+zo(i,":")}},z:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+sb(i,":");case"zzzz":default:return"GMT"+zo(i,":")}},t:function(t,e,n){const i=Math.trunc(t.getTime()/1e3);return Ct(i,e.length)},T:function(t,e,n){const i=t.getTime();return Ct(i,e.length)}};function sb(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),s=Math.trunc(i/60),r=i%60;return r===0?n+String(s):n+String(s)+e+Ct(r,2)}function rb(t,e){return t%60===0?(t>0?"-":"+")+Ct(Math.abs(t)/60,2):zo(t,e)}function zo(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),s=Ct(Math.trunc(i/60),2),r=Ct(i%60,2);return n+s+e+r}const ob=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},NC=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},PF=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],i=n[1],s=n[2];if(!s)return ob(t,e);let r;switch(i){case"P":r=e.dateTime({width:"short"});break;case"PP":r=e.dateTime({width:"medium"});break;case"PPP":r=e.dateTime({width:"long"});break;case"PPPP":default:r=e.dateTime({width:"full"});break}return r.replace("{{date}}",ob(i,e)).replace("{{time}}",NC(s,e))},qp={p:NC,P:PF},IF=/^D+$/,DF=/^Y+$/,RF=["D","DD","YY","YYYY"];function FC(t){return IF.test(t)}function BC(t){return DF.test(t)}function Zp(t,e,n){const i=LF(t,e,n);if(console.warn(i),RF.includes(t))throw new RangeError(i)}function LF(t,e,n){const i=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${i} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const OF=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$F=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,NF=/^'([^]*?)'?$/,FF=/''/g,BF=/[a-zA-Z]/;function Os(t,e,n){const i=ya(),s=n?.locale??i.locale??$C,r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=Ve(t);if(!Hc(a))throw new RangeError("Invalid time value");let l=e.match($F).map(u=>{const d=u[0];if(d==="p"||d==="P"){const h=qp[d];return h(u,s.formatLong)}return u}).join("").match(OF).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:VF(u)};if(ib[d])return{isToken:!0,value:u};if(d.match(BF))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});s.localize.preprocessor&&(l=s.localize.preprocessor(a,l));const c={firstWeekContainsDate:r,weekStartsOn:o,locale:s};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!n?.useAdditionalWeekYearTokens&&BC(d)||!n?.useAdditionalDayOfYearTokens&&FC(d))&&Zp(d,e,String(t));const h=ib[d[0]];return h(a,d,s.localize,c)}).join("")}function VF(t){const e=t.match(NF);return e?e[1].replace(FF,"'"):t}function zF(t){return Ve(t).getDay()}function WF(t){const e=Ve(t),n=e.getFullYear(),i=e.getMonth(),s=_t(t,0);return s.setFullYear(n,i+1,0),s.setHours(0,0,0,0),s.getDate()}function YF(){return Object.assign({},ya())}function yr(t){return Ve(t).getHours()}function HF(t){let n=Ve(t).getDay();return n===0&&(n=7),n}function ao(t){return Ve(t).getMinutes()}function at(t){return Ve(t).getMonth()}function Sl(t){return Ve(t).getSeconds()}function Xe(t){return Ve(t).getFullYear()}function Tl(t,e){const n=Ve(t),i=Ve(e);return n.getTime()>i.getTime()}function cu(t,e){const n=Ve(t),i=Ve(e);return+n<+i}function el(t,e){const n=Ve(t),i=Ve(e);return+n==+i}function jF(t,e){const n=e instanceof Date?_t(e,0):new e(0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}const KF=10;class VC{subPriority=0;validate(e,n){return!0}}class UF extends VC{constructor(e,n,i,s,r){super(),this.value=e,this.validateValue=n,this.setValue=i,this.priority=s,r&&(this.subPriority=r)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,i){return this.setValue(e,n,this.value,i)}}class GF extends VC{priority=KF;subPriority=-1;set(e,n){return n.timestampIsSet?e:_t(e,jF(e,Date))}}class vt{run(e,n,i,s){const r=this.parse(e,n,i,s);return r?{setter:new UF(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(e,n,i){return!0}}class XF extends vt{priority=140;parse(e,n,i){switch(n){case"G":case"GG":case"GGG":return i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"});case"GGGGG":return i.era(e,{width:"narrow"});case"GGGG":default:return i.era(e,{width:"wide"})||i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"})}}set(e,n,i){return n.era=i,e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const an={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Cs={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ln(t,e){return t&&{value:e(t.value),rest:t.rest}}function Xt(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function Ss(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const i=n[1]==="+"?1:-1,s=n[2]?parseInt(n[2],10):0,r=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:i*(s*MC+r*V3+o*z3),rest:e.slice(n[0].length)}}function zC(t){return Xt(an.anyDigitsSigned,t)}function sn(t,e){switch(t){case 1:return Xt(an.singleDigit,e);case 2:return Xt(an.twoDigits,e);case 3:return Xt(an.threeDigits,e);case 4:return Xt(an.fourDigits,e);default:return Xt(new RegExp("^\\d{1,"+t+"}"),e)}}function xh(t,e){switch(t){case 1:return Xt(an.singleDigitSigned,e);case 2:return Xt(an.twoDigitsSigned,e);case 3:return Xt(an.threeDigitsSigned,e);case 4:return Xt(an.fourDigitsSigned,e);default:return Xt(new RegExp("^-?\\d{1,"+t+"}"),e)}}function S_(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function WC(t,e){const n=e>0,i=n?e:1-e;let s;if(i<=50)s=t||100;else{const r=i+50,o=Math.trunc(r/100)*100,a=t>=r%100;s=t+o-(a?100:0)}return n?s:1-s}function YC(t){return t%400===0||t%4===0&&t%100!==0}class qF extends vt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,n,i){const s=r=>({year:r,isTwoDigitYear:n==="yy"});switch(n){case"y":return ln(sn(4,e),s);case"yo":return ln(i.ordinalNumber(e,{unit:"year"}),s);default:return ln(sn(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,i){const s=e.getFullYear();if(i.isTwoDigitYear){const o=WC(i.year,s);return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}const r=!("era"in n)||n.era===1?i.year:1-i.year;return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}class ZF extends vt{priority=130;parse(e,n,i){const s=r=>({year:r,isTwoDigitYear:n==="YY"});switch(n){case"Y":return ln(sn(4,e),s);case"Yo":return ln(i.ordinalNumber(e,{unit:"year"}),s);default:return ln(sn(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,i,s){const r=E_(e,s);if(i.isTwoDigitYear){const a=WC(i.year,r);return e.setFullYear(a,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),ps(e,s)}const o=!("era"in n)||n.era===1?i.year:1-i.year;return e.setFullYear(o,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),ps(e,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class JF extends vt{priority=130;parse(e,n){return xh(n==="R"?4:n.length,e)}set(e,n,i){const s=_t(e,0);return s.setFullYear(i,0,4),s.setHours(0,0,0,0),Cl(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class QF extends vt{priority=130;parse(e,n){return xh(n==="u"?4:n.length,e)}set(e,n,i){return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class e5 extends vt{priority=120;parse(e,n,i){switch(n){case"Q":case"QQ":return sn(n.length,e);case"Qo":return i.ordinalNumber(e,{unit:"quarter"});case"QQQ":return i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(e,{width:"wide",context:"formatting"})||i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,i){return e.setMonth((i-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class t5 extends vt{priority=120;parse(e,n,i){switch(n){case"q":case"qq":return sn(n.length,e);case"qo":return i.ordinalNumber(e,{unit:"quarter"});case"qqq":return i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(e,{width:"wide",context:"standalone"})||i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,i){return e.setMonth((i-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class n5 extends vt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,n,i){const s=r=>r-1;switch(n){case"M":return ln(Xt(an.month,e),s);case"MM":return ln(sn(2,e),s);case"Mo":return ln(i.ordinalNumber(e,{unit:"month"}),s);case"MMM":return i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(e,{width:"wide",context:"formatting"})||i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.setMonth(i,1),e.setHours(0,0,0,0),e}}class i5 extends vt{priority=110;parse(e,n,i){const s=r=>r-1;switch(n){case"L":return ln(Xt(an.month,e),s);case"LL":return ln(sn(2,e),s);case"Lo":return ln(i.ordinalNumber(e,{unit:"month"}),s);case"LLL":return i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(e,{width:"wide",context:"standalone"})||i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.setMonth(i,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function s5(t,e,n){const i=Ve(t),s=C_(i,n)-e;return i.setDate(i.getDate()-s*7),i}class r5 extends vt{priority=100;parse(e,n,i){switch(n){case"w":return Xt(an.week,e);case"wo":return i.ordinalNumber(e,{unit:"week"});default:return sn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i,s){return ps(s5(e,i,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function o5(t,e){const n=Ve(t),i=x_(n)-e;return n.setDate(n.getDate()-i*7),n}class a5 extends vt{priority=100;parse(e,n,i){switch(n){case"I":return Xt(an.week,e);case"Io":return i.ordinalNumber(e,{unit:"week"});default:return sn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i){return Cl(o5(e,i))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const l5=[31,28,31,30,31,30,31,31,30,31,30,31],c5=[31,29,31,30,31,30,31,31,30,31,30,31];class u5 extends vt{priority=90;subPriority=1;parse(e,n,i){switch(n){case"d":return Xt(an.date,e);case"do":return i.ordinalNumber(e,{unit:"date"});default:return sn(n.length,e)}}validate(e,n){const i=e.getFullYear(),s=YC(i),r=e.getMonth();return s?n>=1&&n<=c5[r]:n>=1&&n<=l5[r]}set(e,n,i){return e.setDate(i),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class d5 extends vt{priority=90;subpriority=1;parse(e,n,i){switch(n){case"D":case"DD":return Xt(an.dayOfYear,e);case"Do":return i.ordinalNumber(e,{unit:"date"});default:return sn(n.length,e)}}validate(e,n){const i=e.getFullYear();return YC(i)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,i){return e.setMonth(0,i),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function T_(t,e,n){const i=ya(),s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=Ve(t),o=r.getDay(),l=(e%7+7)%7,c=7-s,u=e<0||e>6?e-(o+c)%7:(l+c)%7-(o+c)%7;return ss(r,u)}class h5 extends vt{priority=90;parse(e,n,i){switch(n){case"E":case"EE":case"EEE":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,s){return e=T_(e,i,s),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class f5 extends vt{priority=90;parse(e,n,i,s){const r=o=>{const a=Math.floor((o-1)/7)*7;return(o+s.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return ln(sn(n.length,e),r);case"eo":return ln(i.ordinalNumber(e,{unit:"day"}),r);case"eee":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeeee":return i.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,s){return e=T_(e,i,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class g5 extends vt{priority=90;parse(e,n,i,s){const r=o=>{const a=Math.floor((o-1)/7)*7;return(o+s.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return ln(sn(n.length,e),r);case"co":return ln(i.ordinalNumber(e,{unit:"day"}),r);case"ccc":return i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"ccccc":return i.day(e,{width:"narrow",context:"standalone"});case"cccccc":return i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(e,{width:"wide",context:"standalone"})||i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,s){return e=T_(e,i,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function p5(t,e){const n=Ve(t),i=HF(n),s=e-i;return ss(n,s)}class m5 extends vt{priority=90;parse(e,n,i){const s=r=>r===0?7:r;switch(n){case"i":case"ii":return sn(n.length,e);case"io":return i.ordinalNumber(e,{unit:"day"});case"iii":return ln(i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),s);case"iiiii":return ln(i.day(e,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ln(i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),s);case"iiii":default:return ln(i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),s)}}validate(e,n){return n>=1&&n<=7}set(e,n,i){return e=p5(e,i),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class _5 extends vt{priority=80;parse(e,n,i){switch(n){case"a":case"aa":case"aaa":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(S_(i),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class y5 extends vt{priority=80;parse(e,n,i){switch(n){case"b":case"bb":case"bbb":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(S_(i),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class v5 extends vt{priority=80;parse(e,n,i){switch(n){case"B":case"BB":case"BBB":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(S_(i),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class b5 extends vt{priority=70;parse(e,n,i){switch(n){case"h":return Xt(an.hour12h,e);case"ho":return i.ordinalNumber(e,{unit:"hour"});default:return sn(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,i){const s=e.getHours()>=12;return s&&i<12?e.setHours(i+12,0,0,0):!s&&i===12?e.setHours(0,0,0,0):e.setHours(i,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class w5 extends vt{priority=70;parse(e,n,i){switch(n){case"H":return Xt(an.hour23h,e);case"Ho":return i.ordinalNumber(e,{unit:"hour"});default:return sn(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,i){return e.setHours(i,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class x5 extends vt{priority=70;parse(e,n,i){switch(n){case"K":return Xt(an.hour11h,e);case"Ko":return i.ordinalNumber(e,{unit:"hour"});default:return sn(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.getHours()>=12&&i<12?e.setHours(i+12,0,0,0):e.setHours(i,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class E5 extends vt{priority=70;parse(e,n,i){switch(n){case"k":return Xt(an.hour24h,e);case"ko":return i.ordinalNumber(e,{unit:"hour"});default:return sn(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,i){const s=i<=24?i%24:i;return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class C5 extends vt{priority=60;parse(e,n,i){switch(n){case"m":return Xt(an.minute,e);case"mo":return i.ordinalNumber(e,{unit:"minute"});default:return sn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,i){return e.setMinutes(i,0,0),e}incompatibleTokens=["t","T"]}class S5 extends vt{priority=50;parse(e,n,i){switch(n){case"s":return Xt(an.second,e);case"so":return i.ordinalNumber(e,{unit:"second"});default:return sn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,i){return e.setSeconds(i,0),e}incompatibleTokens=["t","T"]}class T5 extends vt{priority=30;parse(e,n){const i=s=>Math.trunc(s*Math.pow(10,-n.length+3));return ln(sn(n.length,e),i)}set(e,n,i){return e.setMilliseconds(i),e}incompatibleTokens=["t","T"]}class A5 extends vt{priority=10;parse(e,n){switch(n){case"X":return Ss(Cs.basicOptionalMinutes,e);case"XX":return Ss(Cs.basic,e);case"XXXX":return Ss(Cs.basicOptionalSeconds,e);case"XXXXX":return Ss(Cs.extendedOptionalSeconds,e);case"XXX":default:return Ss(Cs.extended,e)}}set(e,n,i){return n.timestampIsSet?e:_t(e,e.getTime()-wh(e)-i)}incompatibleTokens=["t","T","x"]}class k5 extends vt{priority=10;parse(e,n){switch(n){case"x":return Ss(Cs.basicOptionalMinutes,e);case"xx":return Ss(Cs.basic,e);case"xxxx":return Ss(Cs.basicOptionalSeconds,e);case"xxxxx":return Ss(Cs.extendedOptionalSeconds,e);case"xxx":default:return Ss(Cs.extended,e)}}set(e,n,i){return n.timestampIsSet?e:_t(e,e.getTime()-wh(e)-i)}incompatibleTokens=["t","T","X"]}class M5 extends vt{priority=40;parse(e){return zC(e)}set(e,n,i){return[_t(e,i*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class P5 extends vt{priority=20;parse(e){return zC(e)}set(e,n,i){return[_t(e,i),{timestampIsSet:!0}]}incompatibleTokens="*"}const I5={G:new XF,y:new qF,Y:new ZF,R:new JF,u:new QF,Q:new e5,q:new t5,M:new n5,L:new i5,w:new r5,I:new a5,d:new u5,D:new d5,E:new h5,e:new f5,c:new g5,i:new m5,a:new _5,b:new y5,B:new v5,h:new b5,H:new w5,K:new x5,k:new E5,m:new C5,s:new S5,S:new T5,X:new A5,x:new k5,t:new M5,T:new P5},D5=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,R5=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,L5=/^'([^]*?)'?$/,O5=/''/g,$5=/\S/,N5=/[a-zA-Z]/;function Jp(t,e,n,i){const s=YF(),r=i?.locale??s.locale??$C,o=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0;if(e==="")return t===""?Ve(n):_t(n,NaN);const l={firstWeekContainsDate:o,weekStartsOn:a,locale:r},c=[new GF],u=e.match(R5).map(m=>{const y=m[0];if(y in qp){const v=qp[y];return v(m,r.formatLong)}return m}).join("").match(D5),d=[];for(let m of u){!i?.useAdditionalWeekYearTokens&&BC(m)&&Zp(m,e,t),!i?.useAdditionalDayOfYearTokens&&FC(m)&&Zp(m,e,t);const y=m[0],v=I5[y];if(v){const{incompatibleTokens:b}=v;if(Array.isArray(b)){const E=d.find(w=>b.includes(w.token)||w.token===y);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${m}\` at the same time`)}else if(v.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);d.push({token:y,fullToken:m});const x=v.run(t,m,r.match,l);if(!x)return _t(n,NaN);c.push(x.setter),t=x.rest}else{if(y.match(N5))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(m==="''"?m="'":y==="'"&&(m=F5(m)),t.indexOf(m)===0)t=t.slice(m.length);else return _t(n,NaN)}}if(t.length>0&&$5.test(t))return _t(n,NaN);const h=c.map(m=>m.priority).sort((m,y)=>y-m).filter((m,y,v)=>v.indexOf(m)===y).map(m=>c.filter(y=>y.priority===m).sort((y,v)=>v.subPriority-y.subPriority)).map(m=>m[0]);let f=Ve(n);if(isNaN(f.getTime()))return _t(n,NaN);const p={};for(const m of h){if(!m.validate(f,l))return _t(n,NaN);const y=m.set(f,p,l);Array.isArray(y)?(f=y[0],Object.assign(p,y[1])):f=y}return _t(n,f)}function F5(t){return t.match(L5)[1].replace(O5,"'")}function ab(t,e){const n=Uo(t),i=Uo(e);return+n==+i}function B5(t,e){return ss(t,-e)}function HC(t,e){const n=Ve(t),i=n.getFullYear(),s=n.getDate(),r=_t(t,0);r.setFullYear(i,e,15),r.setHours(0,0,0,0);const o=WF(r);return n.setMonth(e,Math.min(s,o)),n}function Pt(t,e){let n=Ve(t);return isNaN(+n)?_t(t,NaN):(e.year!=null&&n.setFullYear(e.year),e.month!=null&&(n=HC(n,e.month)),e.date!=null&&n.setDate(e.date),e.hours!=null&&n.setHours(e.hours),e.minutes!=null&&n.setMinutes(e.minutes),e.seconds!=null&&n.setSeconds(e.seconds),e.milliseconds!=null&&n.setMilliseconds(e.milliseconds),n)}function V5(t,e){const n=Ve(t);return n.setHours(e),n}function jC(t,e){const n=Ve(t);return n.setMilliseconds(e),n}function z5(t,e){const n=Ve(t);return n.setMinutes(e),n}function KC(t,e){const n=Ve(t);return n.setSeconds(e),n}function ks(t,e){const n=Ve(t);return isNaN(+n)?_t(t,NaN):(n.setFullYear(e),n)}function Al(t,e){return ds(t,-e)}function W5(t,e){const{years:n=0,months:i=0,weeks:s=0,days:r=0,hours:o=0,minutes:a=0,seconds:l=0}=e,c=Al(t,i+n*12),u=B5(c,r+s*7),d=a+o*60,f=(l+d*60)*1e3;return _t(t,u.getTime()-f)}function UC(t,e){return w_(t,-e)}function Gl(){const t=AD();return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img",...t},[g("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),g("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),g("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),g("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}Gl.compatConfig={MODE:3};function GC(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),g("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}GC.compatConfig={MODE:3};function A_(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}A_.compatConfig={MODE:3};function k_(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}k_.compatConfig={MODE:3};function M_(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),g("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}M_.compatConfig={MODE:3};function P_(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}P_.compatConfig={MODE:3};function I_(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}I_.compatConfig={MODE:3};const xi=(t,e)=>e?new Date(t.toLocaleString("en-US",{timeZone:e})):new Date(t),D_=(t,e,n)=>Qp(t,e,n)||Ce(),Y5=(t,e,n)=>{const i=e.dateInTz?xi(new Date(t),e.dateInTz):Ce(t);return n?oi(i,!0):i},Qp=(t,e,n)=>{if(!t)return null;const i=n?oi(Ce(t),!0):Ce(t);return e?e.exactMatch?Y5(t,e,n):xi(i,e.timezone):i},H5=t=>{if(!t)return 0;const e=new Date,n=new Date(e.toLocaleString("en-US",{timeZone:"UTC"})),i=new Date(e.toLocaleString("en-US",{timeZone:t})),s=i.getTimezoneOffset()/60;return(+n-+i)/(1e3*60*60)-s};var es=(t=>(t.month="month",t.year="year",t))(es||{}),Wo=(t=>(t.top="top",t.bottom="bottom",t))(Wo||{}),ta=(t=>(t.header="header",t.calendar="calendar",t.timePicker="timePicker",t))(ta||{}),Yn=(t=>(t.month="month",t.year="year",t.calendar="calendar",t.time="time",t.minutes="minutes",t.hours="hours",t.seconds="seconds",t))(Yn||{});const j5=["timestamp","date","iso"];var Jn=(t=>(t.up="up",t.down="down",t.left="left",t.right="right",t))(Jn||{}),Ot=(t=>(t.arrowUp="ArrowUp",t.arrowDown="ArrowDown",t.arrowLeft="ArrowLeft",t.arrowRight="ArrowRight",t.enter="Enter",t.space=" ",t.esc="Escape",t.tab="Tab",t.home="Home",t.end="End",t.pageUp="PageUp",t.pageDown="PageDown",t))(Ot||{});function lb(t){return e=>new Intl.DateTimeFormat(t,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${e}T00:00:00+00:00`)).slice(0,2)}function K5(t){return e=>Os(xi(new Date(`2017-01-0${e}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:t})}const U5=(t,e,n)=>{const i=[1,2,3,4,5,6,7];let s;if(t!==null)try{s=i.map(K5(t))}catch{s=i.map(lb(e))}else s=i.map(lb(e));const r=s.slice(0,n),o=s.slice(n+1,s.length);return[s[n]].concat(...o).concat(...r)},R_=(t,e,n)=>{const i=[];for(let s=+t[0];s<=+t[1];s++)i.push({value:+s,text:JC(s,e)});return n?i.reverse():i},XC=(t,e,n)=>{const i=[1,2,3,4,5,6,7,8,9,10,11,12].map(r=>{const o=r<10?`0${r}`:r;return new Date(`2017-${o}-01T00:00:00+00:00`)});if(t!==null)try{const r=n==="long"?"LLLL":"LLL";return i.map((o,a)=>{const l=Os(xi(o,"UTC"),r,{locale:t});return{text:l.charAt(0).toUpperCase()+l.substring(1),value:a}})}catch{}const s=new Intl.DateTimeFormat(e,{month:n,timeZone:"UTC"});return i.map((r,o)=>{const a=s.format(r);return{text:a.charAt(0).toUpperCase()+a.substring(1),value:o}})},G5=t=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][t],vn=t=>{const e=J(t);return e!=null&&e.$el?e?.$el:e},X5=t=>({type:"dot",...t??{}}),qC=t=>Array.isArray(t)?!!t[0]&&!!t[1]:!1,L_={prop:t=>`"${t}" prop must be enabled!`,dateArr:t=>`You need to use array as "model-value" binding in order to support "${t}"`},An=t=>t,cb=t=>t===0?t:!t||isNaN(+t)?null:+t,ub=t=>t===null,ZC=t=>{if(t)return[...t.querySelectorAll("input, button, select, textarea, a[href]")][0]},q5=t=>{const e=[],n=i=>i.filter(s=>s);for(let i=0;i{const i=n!=null,s=e!=null;if(!i&&!s)return!1;const r=+n,o=+e;return i&&s?+t>r||+tr:s?+tq5(t).map(n=>n.map(i=>{const{active:s,disabled:r,isBetween:o,highlighted:a}=e(i);return{...i,active:s,disabled:r,className:{dp__overlay_cell_active:s,dp__overlay_cell:!s,dp__overlay_cell_disabled:r,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:r&&s,dp__cell_in_between:o,"dp--highlighted":a}}})),eo=(t,e,n=!1)=>{t&&e.allowStopPropagation&&(n&&t.stopImmediatePropagation(),t.stopPropagation())},Z5=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function J5(t,e){let n=[...document.querySelectorAll(Z5())];n=n.filter(s=>!t.contains(s)||s.hasAttribute("data-datepicker-instance"));const i=n.indexOf(t);if(i>=0&&(e?i-1>=0:i+1<=n.length))return n[i+(e?-1:1)]}const em=(t,e)=>t?.querySelector(`[data-dp-element="${e}"]`),JC=(t,e)=>new Intl.NumberFormat(e,{useGrouping:!1,style:"decimal"}).format(t),O_=t=>Os(t,"dd-MM-yyyy"),Dg=t=>Array.isArray(t),Eh=(t,e)=>e.get(O_(t)),Q5=(t,e)=>t?e?e instanceof Map?!!Eh(t,e):e(Ce(t)):!1:!0,ii=(t,e,n=!1,i)=>{if(t.key===Ot.enter||t.key===Ot.space)return n&&t.preventDefault(),e();if(i)return i(t)},db=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].some(t=>navigator.userAgent.includes(t))||navigator.userAgent.includes("Mac")&&"ontouchend"in document,hb=(t,e,n,i,s,r)=>{const o=Jp(t,e.slice(0,t.length),new Date,{locale:r});return Hc(o)&&DC(o)?i||s?o:Pt(o,{hours:+n.hours,minutes:+n?.minutes,seconds:+n?.seconds,milliseconds:0}):null},e4=(t,e,n,i,s,r)=>{const o=Array.isArray(n)?n[0]:n;if(typeof e=="string")return hb(t,e,o,i,s,r);if(Array.isArray(e)){let a=null;for(const l of e)if(a=hb(t,l,o,i,s,r),a)break;return a}return typeof e=="function"?e(t):null},Ce=t=>t?new Date(t):new Date,t4=(t,e,n)=>{if(e){const s=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0"),o=t.getHours().toString().padStart(2,"0"),a=t.getMinutes().toString().padStart(2,"0"),l=n?t.getSeconds().toString().padStart(2,"0"):"00";return`${t.getFullYear()}-${s}-${r}T${o}:${a}:${l}.000Z`}const i=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds());return new Date(i).toISOString()},oi=(t,e)=>{const n=Ce(JSON.parse(JSON.stringify(t))),i=Pt(n,{hours:0,minutes:0,seconds:0,milliseconds:0});return e?X3(i):i},to=(t,e,n,i)=>{let s=t?Ce(t):Ce();return(e||e===0)&&(s=V5(s,+e)),(n||n===0)&&(s=z5(s,+n)),(i||i===0)&&(s=KC(s,+i)),jC(s,0)},Qt=(t,e)=>!t||!e?!1:cu(oi(t),oi(e)),ct=(t,e)=>!t||!e?!1:el(oi(t),oi(e)),on=(t,e)=>!t||!e?!1:Tl(oi(t),oi(e)),vf=(t,e,n)=>t!=null&&t[0]&&t!=null&&t[1]?on(n,t[0])&&Qt(n,t[1]):t!=null&&t[0]&&e?on(n,t[0])&&Qt(n,e)||Qt(n,t[0])&&on(n,e):!1,rs=t=>{const e=Pt(new Date(t),{date:1});return oi(e)},Rg=(t,e,n)=>e&&(n||n===0)?Object.fromEntries(["hours","minutes","seconds"].map(i=>i===e?[i,n]:[i,isNaN(+t[i])?void 0:+t[i]])):{hours:isNaN(+t.hours)?void 0:+t.hours,minutes:isNaN(+t.minutes)?void 0:+t.minutes,seconds:isNaN(+t.seconds)?void 0:+t.seconds},na=t=>({hours:yr(t),minutes:ao(t),seconds:Sl(t)}),QC=(t,e)=>{if(e){const n=Xe(Ce(e));if(n>t)return 12;if(n===t)return at(Ce(e))}},eS=(t,e)=>{if(e){const n=Xe(Ce(e));return n{if(t)return Xe(Ce(t))},tS=(t,e)=>{const n=on(t,e)?e:t,i=on(e,t)?e:t;return RC({start:n,end:i})},n4=t=>{const e=ds(t,1);return{month:at(e),year:Xe(e)}},nr=(t,e)=>{const n=ps(t,{weekStartsOn:+e}),i=OC(t,{weekStartsOn:+e});return[n,i]},nS=(t,e)=>{const n={hours:yr(Ce()),minutes:ao(Ce()),seconds:e?Sl(Ce()):0};return Object.assign(n,t)},Kr=(t,e,n)=>[Pt(Ce(t),{date:1}),Pt(Ce(),{month:e,year:n,date:1})],ar=(t,e,n)=>{let i=t?Ce(t):Ce();return(e||e===0)&&(i=HC(i,e)),n&&(i=ks(i,n)),i},iS=(t,e,n,i,s)=>{if(!i||s&&!e||!s&&!n)return!1;const r=s?ds(t,1):Al(t,1),o=[at(r),Xe(r)];return s?!s4(...o,e):!i4(...o,n)},i4=(t,e,n)=>Qt(...Kr(n,t,e))||ct(...Kr(n,t,e)),s4=(t,e,n)=>on(...Kr(n,t,e))||ct(...Kr(n,t,e)),sS=(t,e,n,i,s,r,o)=>{if(typeof e=="function"&&!o)return e(t);const a=n?{locale:n}:void 0;return Array.isArray(t)?`${Os(t[0],r,a)}${s&&!t[1]?"":i}${t[1]?Os(t[1],r,a):""}`:Os(t,r,a)},La=t=>{if(t)return null;throw new Error(L_.prop("partial-range"))},Cd=(t,e)=>{if(e)return t();throw new Error(L_.prop("range"))},tm=t=>Array.isArray(t)?Hc(t[0])&&(t[1]?Hc(t[1]):!0):t?Hc(t):!1,r4=(t,e)=>Pt(e??Ce(),{hours:+t.hours||0,minutes:+t.minutes||0,seconds:+t.seconds||0}),Lg=(t,e,n,i)=>{if(!t)return!0;if(i){const s=n==="max"?cu(t,e):Tl(t,e),r={seconds:0,milliseconds:0};return s||el(Pt(t,r),Pt(e,r))}return n==="max"?t.getTime()<=e.getTime():t.getTime()>=e.getTime()},Og=(t,e,n)=>t?r4(t,e):Ce(n??e),fb=(t,e,n,i,s)=>{if(Array.isArray(i)){const o=Og(t,i[0],e),a=Og(t,i[1],e);return Lg(i[0],o,n,!!e)&&Lg(i[1],a,n,!!e)&&s}const r=Og(t,i,e);return Lg(i,r,n,!!e)&&s},$g=t=>Pt(Ce(),na(t)),o4=(t,e)=>t instanceof Map?Array.from(t.values()).filter(n=>Xe(Ce(n))===e).map(n=>at(n)):[],rS=(t,e,n)=>typeof t=="function"?t({month:e,year:n}):!!t.months.find(i=>i.month===e&&i.year===n),$_=(t,e)=>typeof t=="function"?t(e):t.years.includes(e),oS=t=>Os(t,"yyyy-MM-dd"),dc=Ki({menuFocused:!1,shiftKeyInMenu:!1}),aS=()=>{const t=n=>{dc.menuFocused=n},e=n=>{dc.shiftKeyInMenu!==n&&(dc.shiftKeyInMenu=n)};return{control:be(()=>({shiftKeyInMenu:dc.shiftKeyInMenu,menuFocused:dc.menuFocused})),setMenuFocused:t,setShiftKey:e}},Lt=Ki({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),Ng=xe(null),Sd=xe(!1),Fg=xe(!1),Bg=xe(!1),Vg=xe(!1),Bn=xe(0),rn=xe(0),_o=()=>{const t=be(()=>Sd.value?[...Lt.selectionGrid,Lt.actionRow].filter(d=>d.length):Fg.value?[...Lt.timePicker[0],...Lt.timePicker[1],Vg.value?[]:[Ng.value],Lt.actionRow].filter(d=>d.length):Bg.value?[...Lt.monthPicker,Lt.actionRow]:[Lt.monthYear,...Lt.calendar,Lt.time,Lt.actionRow].filter(d=>d.length)),e=d=>{Bn.value=d?Bn.value+1:Bn.value-1;let h=null;t.value[rn.value]&&(h=t.value[rn.value][Bn.value]),!h&&t.value[rn.value+(d?1:-1)]?(rn.value=rn.value+(d?1:-1),Bn.value=d?0:t.value[rn.value].length-1):h||(Bn.value=d?Bn.value-1:Bn.value+1)},n=d=>{rn.value===0&&!d||rn.value===t.value.length&&d||(rn.value=d?rn.value+1:rn.value-1,t.value[rn.value]?t.value[rn.value]&&!t.value[rn.value][Bn.value]&&Bn.value!==0&&(Bn.value=t.value[rn.value].length-1):rn.value=d?rn.value-1:rn.value+1)},i=d=>{let h=null;t.value[rn.value]&&(h=t.value[rn.value][Bn.value]),h?h.focus({preventScroll:!Sd.value}):Bn.value=d?Bn.value-1:Bn.value+1},s=()=>{e(!0),i(!0)},r=()=>{e(!1),i(!1)},o=()=>{n(!1),i(!0)},a=()=>{n(!0),i(!0)},l=(d,h)=>{Lt[h]=d},c=(d,h)=>{Lt[h]=d},u=()=>{Bn.value=0,rn.value=0};return{buildMatrix:l,buildMultiLevelMatrix:c,setTimePickerBackRef:d=>{Ng.value=d},setSelectionGrid:d=>{Sd.value=d,u(),d||(Lt.selectionGrid=[])},setTimePicker:(d,h=!1)=>{Fg.value=d,Vg.value=h,u(),d||(Lt.timePicker[0]=[],Lt.timePicker[1]=[])},setTimePickerElements:(d,h=0)=>{Lt.timePicker[h]=d},arrowRight:s,arrowLeft:r,arrowUp:o,arrowDown:a,clearArrowNav:()=>{Lt.monthYear=[],Lt.calendar=[],Lt.time=[],Lt.actionRow=[],Lt.selectionGrid=[],Lt.timePicker[0]=[],Lt.timePicker[1]=[],Sd.value=!1,Fg.value=!1,Vg.value=!1,Bg.value=!1,u(),Ng.value=null},setMonthPicker:d=>{Bg.value=d,u()},refSets:Lt}},gb=t=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...t??{}}),a4=t=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:e=>`Increment ${e}`,decrementValue:e=>`Decrement ${e}`,openTpOverlay:e=>`Open ${e} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,clearInput:"Clear value",calendarIcon:"Calendar icon",timePicker:"Time picker",monthPicker:e=>`Month picker${e?" overlay":""}`,yearPicker:e=>`Year picker${e?" overlay":""}`,timeOverlay:e=>`${e} overlay`,...t??{}}),pb=t=>t?typeof t=="boolean"?t?2:0:+t>=2?+t:2:0,l4=t=>{const e=typeof t=="object"&&t,n={static:!0,solo:!1};if(!t)return{...n,count:pb(!1)};const i=e?t:{},s=e?i.count??!0:t,r=pb(s);return Object.assign(n,i,{count:r})},c4=(t,e,n)=>t||(typeof n=="string"?n:e),u4=t=>typeof t=="boolean"?t?gb({}):!1:gb(t),d4=t=>{const e={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - "};return typeof t=="object"?{...e,...t??{},enabled:!0}:{...e,enabled:t}},h4=t=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...t??{}}),f4=t=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...t??{}}),g4=t=>{const e={input:!1};return typeof t=="object"?{...e,...t??{},enabled:!0}:{enabled:t,...e}},p4=t=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,shadowDom:!1,...t??{}}),m4=t=>{const e={dates:Array.isArray(t)?t.map(n=>Ce(n)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof t=="function"?t:{...e,...t??{}}},_4=t=>typeof t=="object"?{type:t?.type??"local",hideOnOffsetDates:t?.hideOnOffsetDates??!1}:{type:t,hideOnOffsetDates:!1},y4=t=>{const e={noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1};return typeof t=="object"?{enabled:!0,...e,...t}:{enabled:t,...e}},v4=t=>t?typeof t=="string"?{timezone:t,exactMatch:!1,dateInTz:void 0,emitTimezone:void 0,convertModel:!0}:{timezone:t.timezone,exactMatch:t.exactMatch??!1,dateInTz:t.dateInTz??void 0,emitTimezone:t.emitTimezone??void 0,convertModel:t.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:void 0},zg=(t,e,n)=>new Map(t.map(i=>{const s=D_(i,e,n);return[O_(s),s]})),b4=(t,e)=>t.length?new Map(t.map(n=>{const i=D_(n.date,e);return[O_(i),n]})):null,w4=t=>{var e;return{minDate:Qp(t.minDate,t.timezone,t.isSpecific),maxDate:Qp(t.maxDate,t.timezone,t.isSpecific),disabledDates:Dg(t.disabledDates)?zg(t.disabledDates,t.timezone,t.isSpecific):t.disabledDates,allowedDates:Dg(t.allowedDates)?zg(t.allowedDates,t.timezone,t.isSpecific):null,highlight:typeof t.highlight=="object"&&Dg((e=t.highlight)==null?void 0:e.dates)?zg(t.highlight.dates,t.timezone):t.highlight,markers:b4(t.markers,t.timezone)}},x4=t=>typeof t=="boolean"?{enabled:t,dragSelect:!0,limit:null}:{enabled:!!t,limit:t.limit?+t.limit:null,dragSelect:t.dragSelect??!0},E4=t=>({...Object.fromEntries(Object.keys(t).map(e=>{const n=e,i=t[n],s=typeof t[n]=="string"?{[i]:!0}:Object.fromEntries(i.map(r=>[r,!0]));return[e,s]}))}),jt=t=>{const e=()=>{const S=t.enableSeconds?":ss":"",T=t.enableMinutes?":mm":"";return t.is24?`HH${T}${S}`:`hh${T}${S} aa`},n=()=>{var S;return t.format?t.format:t.monthPicker?"MM/yyyy":t.timePicker?e():t.weekPicker?`${((S=y.value)==null?void 0:S.type)==="iso"?"RR":"ww"}-yyyy`:t.yearPicker?"yyyy":t.quarterPicker?"QQQ/yyyy":t.enableTimePicker?`MM/dd/yyyy, ${e()}`:"MM/dd/yyyy"},i=S=>nS(S,t.enableSeconds),s=()=>E.value.enabled?t.startTime&&Array.isArray(t.startTime)?[i(t.startTime[0]),i(t.startTime[1])]:null:t.startTime&&!Array.isArray(t.startTime)?i(t.startTime):null,r=be(()=>l4(t.multiCalendars)),o=be(()=>s()),a=be(()=>a4(t.ariaLabels)),l=be(()=>h4(t.filters)),c=be(()=>u4(t.transitions)),u=be(()=>f4(t.actionRow)),d=be(()=>c4(t.previewFormat,t.format,n())),h=be(()=>d4(t.textInput)),f=be(()=>g4(t.inline)),p=be(()=>p4(t.config)),m=be(()=>m4(t.highlight)),y=be(()=>_4(t.weekNumbers)),v=be(()=>v4(t.timezone)),b=be(()=>x4(t.multiDates)),x=be(()=>w4({minDate:t.minDate,maxDate:t.maxDate,disabledDates:t.disabledDates,allowedDates:t.allowedDates,highlight:m.value,markers:t.markers,timezone:v.value,isSpecific:t.monthPicker||t.yearPicker||t.quarterPicker})),E=be(()=>y4(t.range)),w=be(()=>E4(t.ui));return{defaultedTransitions:c,defaultedMultiCalendars:r,defaultedStartTime:o,defaultedAriaLabels:a,defaultedFilters:l,defaultedActionRow:u,defaultedPreviewFormat:d,defaultedTextInput:h,defaultedInline:f,defaultedConfig:p,defaultedHighlight:m,defaultedWeekNumbers:y,defaultedRange:E,propDates:x,defaultedTz:v,defaultedMultiDates:b,defaultedUI:w,getDefaultPattern:n,getDefaultStartTime:s}},C4=(t,e,n)=>{const i=xe(),{defaultedTextInput:s,defaultedRange:r,defaultedTz:o,defaultedMultiDates:a,getDefaultPattern:l}=jt(e),c=xe(""),u=tu(e,"format"),d=tu(e,"formatLocale");un(i,()=>{typeof e.onInternalModelChange=="function"&&t("internal-model-change",i.value,ue(!0))},{deep:!0}),un(r,(L,ae)=>{L.enabled!==ae.enabled&&(i.value=null)}),un(u,()=>{X()});const h=L=>o.value.timezone&&o.value.convertModel?xi(L,o.value.timezone):L,f=L=>{if(o.value.timezone&&o.value.convertModel){const ae=H5(o.value.timezone);return W3(L,ae)}return L},p=(L,ae,de=!1)=>sS(L,e.format,e.formatLocale,s.value.rangeSeparator,e.modelAuto,ae??l(),de),m=L=>L?e.modelType?H(L):{hours:yr(L),minutes:ao(L),seconds:e.enableSeconds?Sl(L):0}:null,y=L=>e.modelType?H(L):{month:at(L),year:Xe(L)},v=L=>Array.isArray(L)?a.value.enabled?L.map(ae=>b(ae,ks(Ce(),ae))):Cd(()=>[ks(Ce(),L[0]),L[1]?ks(Ce(),L[1]):La(r.value.partialRange)],r.value.enabled):ks(Ce(),+L),b=(L,ae)=>(typeof L=="string"||typeof L=="number")&&e.modelType?Z(L):ae,x=L=>Array.isArray(L)?[b(L[0],to(null,+L[0].hours,+L[0].minutes,L[0].seconds)),b(L[1],to(null,+L[1].hours,+L[1].minutes,L[1].seconds))]:b(L,to(null,L.hours,L.minutes,L.seconds)),E=L=>{const ae=Pt(Ce(),{date:1});return Array.isArray(L)?a.value.enabled?L.map(de=>b(de,ar(ae,+de.month,+de.year))):Cd(()=>[b(L[0],ar(ae,+L[0].month,+L[0].year)),b(L[1],L[1]?ar(ae,+L[1].month,+L[1].year):La(r.value.partialRange))],r.value.enabled):b(L,ar(ae,+L.month,+L.year))},w=L=>{if(Array.isArray(L))return L.map(ae=>Z(ae));throw new Error(L_.dateArr("multi-dates"))},S=L=>{if(Array.isArray(L)&&r.value.enabled){const ae=L[0],de=L[1];return[Ce(Array.isArray(ae)?ae[0]:null),Array.isArray(de)&&de.length?Ce(de[0]):null]}return Ce(L[0])},T=L=>e.modelAuto?Array.isArray(L)?[Z(L[0]),Z(L[1])]:e.autoApply?[Z(L)]:[Z(L),null]:Array.isArray(L)?Cd(()=>L[1]?[Z(L[0]),L[1]?Z(L[1]):La(r.value.partialRange)]:[Z(L[0])],r.value.enabled):Z(L),A=()=>{Array.isArray(i.value)&&r.value.enabled&&i.value.length===1&&i.value.push(La(r.value.partialRange))},k=()=>{const L=i.value;return[H(L[0]),L[1]?H(L[1]):La(r.value.partialRange)]},P=()=>i.value[1]?k():H(An(i.value[0])),B=()=>(i.value||[]).map(L=>H(L)),Y=(L=!1)=>(L||A(),e.modelAuto?P():a.value.enabled?B():Array.isArray(i.value)?Cd(()=>k(),r.value.enabled):H(An(i.value))),ne=L=>!L||Array.isArray(L)&&!L.length?null:e.timePicker?x(An(L)):e.monthPicker?E(An(L)):e.yearPicker?v(An(L)):a.value.enabled?w(An(L)):e.weekPicker?S(An(L)):T(An(L)),$=L=>{const ae=ne(L);tm(An(ae))?(i.value=An(ae),X()):(i.value=null,c.value="")},F=()=>{const L=ae=>Os(ae,s.value.format);return`${L(i.value[0])} ${s.value.rangeSeparator} ${i.value[1]?L(i.value[1]):""}`},D=()=>n.value&&i.value?Array.isArray(i.value)?F():Os(i.value,s.value.format):p(i.value),z=()=>i.value?a.value.enabled?i.value.map(L=>p(L)).join("; "):s.value.enabled&&typeof s.value.format=="string"?D():p(i.value):"",X=()=>{!e.format||typeof e.format=="string"||s.value.enabled&&typeof s.value.format=="string"?c.value=z():c.value=e.format(i.value)},Z=L=>{if(e.utc){const ae=new Date(L);return e.utc==="preserve"?new Date(ae.getTime()+ae.getTimezoneOffset()*6e4):ae}return e.modelType?j5.includes(e.modelType)?h(new Date(L)):e.modelType==="format"&&(typeof e.format=="string"||!e.format)?h(Jp(L,l(),new Date,{locale:d.value})):h(Jp(L,e.modelType,new Date,{locale:d.value})):h(new Date(L))},H=L=>L?e.utc?t4(L,e.utc==="preserve",e.enableSeconds):e.modelType?e.modelType==="timestamp"?+f(L):e.modelType==="iso"?f(L).toISOString():e.modelType==="format"&&(typeof e.format=="string"||!e.format)?p(f(L)):p(f(L),e.modelType,!0):f(L):"",le=(L,ae=!1,de=!1)=>{if(de)return L;if(t("update:model-value",L),o.value.emitTimezone&&ae){const ve=Array.isArray(L)?L.map(W=>xi(An(W),o.value.emitTimezone)):xi(An(L),o.value.emitTimezone);t("update:model-timezone-value",ve)}},ie=L=>Array.isArray(i.value)?a.value.enabled?i.value.map(ae=>L(ae)):[L(i.value[0]),i.value[1]?L(i.value[1]):La(r.value.partialRange)]:L(An(i.value)),te=()=>{if(Array.isArray(i.value)){const L=nr(i.value[0],e.weekStart),ae=i.value[1]?nr(i.value[1],e.weekStart):[];return[L.map(de=>Ce(de)),ae.map(de=>Ce(de))]}return nr(i.value,e.weekStart).map(L=>Ce(L))},I=(L,ae)=>le(An(ie(L)),!1,ae),ee=L=>{const ae=te();return L?ae:t("update:model-value",te())},ue=(L=!1)=>(L||X(),e.monthPicker?I(y,L):e.timePicker?I(m,L):e.yearPicker?I(Xe,L):e.weekPicker?ee(L):le(Y(L),!0,L));return{inputValue:c,internalModelValue:i,checkBeforeEmit:()=>i.value?r.value.enabled?r.value.partialRange?i.value.length>=1:i.value.length===2:!!i.value:!1,parseExternalModelValue:$,formatInputValue:X,emitModelValue:ue}},S4=(t,e)=>{const{defaultedFilters:n,propDates:i}=jt(t),{validateMonthYearInRange:s}=yo(t),r=(u,d)=>{let h=u;return n.value.months.includes(at(h))?(h=d?ds(u,1):Al(u,1),r(h,d)):h},o=(u,d)=>{let h=u;return n.value.years.includes(Xe(h))?(h=d?w_(u,1):UC(u,1),o(h,d)):h},a=(u,d=!1)=>{const h=Pt(Ce(),{month:t.month,year:t.year});let f=u?ds(h,1):Al(h,1);t.disableYearSelect&&(f=ks(f,t.year));let p=at(f),m=Xe(f);n.value.months.includes(p)&&(f=r(f,u),p=at(f),m=Xe(f)),n.value.years.includes(m)&&(f=o(f,u),m=Xe(f)),s(p,m,u,t.preventMinMaxNavigation)&&l(p,m,d)},l=(u,d,h)=>{e("update-month-year",{month:u,year:d,fromNav:h})},c=be(()=>u=>iS(Pt(Ce(),{month:t.month,year:t.year}),i.value.maxDate,i.value.minDate,t.preventMinMaxNavigation,u));return{handleMonthYearChange:a,isDisabled:c,updateMonthYear:l}},bf={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0},ui:{type:Object,default:()=>({})}},_s={...bf,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},T4=["title"],A4=["disabled"],k4=hn({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},..._s},emits:["close-picker","select-date","select-now","invalid-select"],setup(t,{emit:e}){const n=e,i=t,{defaultedActionRow:s,defaultedPreviewFormat:r,defaultedMultiCalendars:o,defaultedTextInput:a,defaultedInline:l,defaultedRange:c,defaultedMultiDates:u}=jt(i),{isTimeValid:d,isMonthValid:h}=yo(i),{buildMatrix:f}=_o(),p=xe(null),m=xe(null),y=xe(!1),v=xe({}),b=xe(null),x=xe(null);En(()=>{i.arrowNavigation&&f([vn(p),vn(m)],"actionRow"),E(),window.addEventListener("resize",E)}),pa(()=>{window.removeEventListener("resize",E)});const E=()=>{y.value=!1,setTimeout(()=>{var $,F;const D=($=b.value)==null?void 0:$.getBoundingClientRect(),z=(F=x.value)==null?void 0:F.getBoundingClientRect();D&&z&&(v.value.maxWidth=`${z.width-D.width-20}px`),y.value=!0},0)},w=be(()=>c.value.enabled&&!c.value.partialRange&&i.internalModelValue?i.internalModelValue.length===2:!0),S=be(()=>!d.value(i.internalModelValue)||!h.value(i.internalModelValue)||!w.value),T=()=>{const $=r.value;return i.timePicker||i.monthPicker,$(An(i.internalModelValue))},A=()=>{const $=i.internalModelValue;return o.value.count>0?`${k($[0])} - ${k($[1])}`:[k($[0]),k($[1])]},k=$=>sS($,r.value,i.formatLocale,a.value.rangeSeparator,i.modelAuto,r.value),P=be(()=>!i.internalModelValue||!i.menuMount?"":typeof r.value=="string"?Array.isArray(i.internalModelValue)?i.internalModelValue.length===2&&i.internalModelValue[1]?A():u.value.enabled?i.internalModelValue.map($=>`${k($)}`):i.modelAuto?`${k(i.internalModelValue[0])}`:`${k(i.internalModelValue[0])} -`:k(i.internalModelValue):T()),B=()=>u.value.enabled?"; ":" - ",Y=be(()=>Array.isArray(P.value)?P.value.join(B()):P.value),ne=()=>{d.value(i.internalModelValue)&&h.value(i.internalModelValue)&&w.value?n("select-date"):n("invalid-select")};return($,F)=>(R(),V("div",{ref_key:"actionRowRef",ref:x,class:"dp__action_row"},[$.$slots["action-row"]?Ne($.$slots,"action-row",In(wn({key:0},{internalModelValue:$.internalModelValue,disabled:S.value,selectDate:()=>$.$emit("select-date"),closePicker:()=>$.$emit("close-picker")}))):(R(),V(Oe,{key:1},[J(s).showPreview?(R(),V("div",{key:0,class:"dp__selection_preview",title:Y.value,style:Pn(v.value)},[$.$slots["action-preview"]&&y.value?Ne($.$slots,"action-preview",{key:0,value:$.internalModelValue}):ce("",!0),!$.$slots["action-preview"]&&y.value?(R(),V(Oe,{key:1},[Ue(we(Y.value),1)],64)):ce("",!0)],12,T4)):ce("",!0),g("div",{ref_key:"actionBtnContainer",ref:b,class:"dp__action_buttons","data-dp-element":"action-row"},[$.$slots["action-buttons"]?Ne($.$slots,"action-buttons",{key:0,value:$.internalModelValue}):ce("",!0),$.$slots["action-buttons"]?ce("",!0):(R(),V(Oe,{key:1},[!J(l).enabled&&J(s).showCancel?(R(),V("button",{key:0,ref_key:"cancelButtonRef",ref:p,type:"button",class:"dp__action_button dp__action_cancel",onClick:F[0]||(F[0]=D=>$.$emit("close-picker")),onKeydown:F[1]||(F[1]=D=>J(ii)(D,()=>$.$emit("close-picker")))},we($.cancelText),545)):ce("",!0),J(s).showNow?(R(),V("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:F[2]||(F[2]=D=>$.$emit("select-now")),onKeydown:F[3]||(F[3]=D=>J(ii)(D,()=>$.$emit("select-now")))},we($.nowButtonLabel),33)):ce("",!0),J(s).showSelect?(R(),V("button",{key:2,ref_key:"selectButtonRef",ref:m,type:"button",class:"dp__action_button dp__action_select",disabled:S.value,"data-test":"select-button",onKeydown:F[4]||(F[4]=D=>J(ii)(D,()=>ne())),onClick:ne},we($.selectText),41,A4)):ce("",!0)],64))],512)],64))],512))}}),M4=["role","aria-label","tabindex"],P4={class:"dp__selection_grid_header"},I4=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],D4=["aria-label"],Vu=hn({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{},overlayLabel:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(t,{expose:e,emit:n}){const{setSelectionGrid:i,buildMultiLevelMatrix:s,setMonthPicker:r}=_o(),o=n,a=t,{defaultedAriaLabels:l,defaultedTextInput:c,defaultedConfig:u}=jt(a),{hideNavigationButtons:d}=Ef(),h=xe(!1),f=xe(null),p=xe(null),m=xe([]),y=xe(),v=xe(null),b=xe(0),x=xe(null);dE(()=>{f.value=null}),En(()=>{Rn().then(()=>B()),a.noOverlayFocus||w(),E(!0)}),pa(()=>E(!1));const E=ie=>{var te;a.arrowNavigation&&((te=a.headerRefs)!=null&&te.length?r(ie):i(ie))},w=()=>{var ie;const te=vn(p);te&&(c.value.enabled||(f.value?(ie=f.value)==null||ie.focus({preventScroll:!0}):te.focus({preventScroll:!0})),h.value=te.clientHeight({dp__overlay:!0,"dp--overlay-absolute":!a.useRelative,"dp--overlay-relative":a.useRelative})),T=be(()=>a.useRelative?{height:`${a.height}px`,width:"var(--dp-menu-min-width)"}:void 0),A=be(()=>({dp__overlay_col:!0})),k=be(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:h.value,dp__button_bottom:a.isLast})),P=be(()=>{var ie,te;return{dp__overlay_container:!0,dp__container_flex:((ie=a.items)==null?void 0:ie.length)<=6,dp__container_block:((te=a.items)==null?void 0:te.length)>6}});un(()=>a.items,()=>B(!1),{deep:!0});const B=(ie=!0)=>{Rn().then(()=>{const te=vn(f),I=vn(p),ee=vn(v),ue=vn(x),L=ee?ee.getBoundingClientRect().height:0;I&&(I.getBoundingClientRect().height?b.value=I.getBoundingClientRect().height-L:b.value=u.value.modeHeight-L),te&&ue&&ie&&(ue.scrollTop=te.offsetTop-ue.offsetTop-(b.value/2-te.getBoundingClientRect().height)-L)})},Y=ie=>{ie.disabled||o("selected",ie.value)},ne=()=>{o("toggle"),o("reset-flow")},$=()=>{a.escClose&&ne()},F=(ie,te,I,ee)=>{ie&&((te.active||te.value===a.focusValue)&&(f.value=ie),a.arrowNavigation&&(Array.isArray(m.value[I])?m.value[I][ee]=ie:m.value[I]=[ie],D()))},D=()=>{var ie,te;const I=(ie=a.headerRefs)!=null&&ie.length?[a.headerRefs].concat(m.value):m.value.concat([a.skipButtonRef?[]:[v.value]]);s(An(I),(te=a.headerRefs)!=null&&te.length?"monthPicker":"selectionGrid")},z=ie=>{a.arrowNavigation||eo(ie,u.value,!0)},X=ie=>{y.value=ie,o("hover-value",ie)},Z=()=>{if(ne(),!a.isLast){const ie=em(a.menuWrapRef??null,"action-row");if(ie){const te=ZC(ie);te?.focus()}}},H=ie=>{switch(ie.key){case Ot.esc:return $();case Ot.arrowLeft:return z(ie);case Ot.arrowRight:return z(ie);case Ot.arrowUp:return z(ie);case Ot.arrowDown:return z(ie);default:return}},le=ie=>{if(ie.key===Ot.enter)return ne();if(ie.key===Ot.tab)return Z()};return e({focusGrid:w}),(ie,te)=>{var I;return R(),V("div",{ref_key:"gridWrapRef",ref:p,class:Pe(S.value),style:Pn(T.value),role:ie.useRelative?void 0:"dialog","aria-label":ie.overlayLabel,tabindex:ie.useRelative?void 0:"0",onKeydown:H,onClick:te[0]||(te[0]=ru(()=>{},["prevent"]))},[g("div",{ref_key:"containerRef",ref:x,class:Pe(P.value),style:Pn({"--dp-overlay-height":`${b.value}px`}),role:"grid"},[g("div",P4,[Ne(ie.$slots,"header")]),ie.$slots.overlay?Ne(ie.$slots,"overlay",{key:0}):(R(!0),V(Oe,{key:1},Ze(ie.items,(ee,ue)=>(R(),V("div",{key:ue,class:Pe(["dp__overlay_row",{dp__flex_row:ie.items.length>=3}]),role:"row"},[(R(!0),V(Oe,null,Ze(ee,(L,ae)=>(R(),V("div",{key:L.value,ref_for:!0,ref:de=>F(de,L,ue,ae),role:"gridcell",class:Pe(A.value),"aria-selected":L.active||void 0,"aria-disabled":L.disabled||void 0,tabindex:"0","data-test":L.text,onClick:ru(de=>Y(L),["prevent"]),onKeydown:de=>J(ii)(de,()=>Y(L),!0),onMouseover:de=>X(L.value)},[g("div",{class:Pe(L.className)},[ie.$slots.item?Ne(ie.$slots,"item",{key:0,item:L}):ce("",!0),ie.$slots.item?ce("",!0):(R(),V(Oe,{key:1},[Ue(we(L.text),1)],64))],2)],42,I4))),128))],2))),128))],6),ie.$slots["button-icon"]?$e((R(),V("button",{key:0,ref_key:"toggleButton",ref:v,type:"button","aria-label":(I=J(l))==null?void 0:I.toggleOverlay,class:Pe(k.value),tabindex:"0",onClick:ne,onKeydown:le},[Ne(ie.$slots,"button-icon")],42,D4)),[[sh,!J(d)(ie.hideNavigation,ie.type)]]):ce("",!0)],46,M4)}}}),wf=hn({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(t){const e=t,n=be(()=>e.multiCalendars>0?[...Array(e.multiCalendars).keys()]:[0]),i=be(()=>({dp__instance_calendar:e.multiCalendars>0}));return(s,r)=>(R(),V("div",{class:Pe({dp__menu_inner:!s.stretch,"dp--menu--inner-stretched":s.stretch,dp__flex_display:s.multiCalendars>0,"dp--flex-display-collapsed":s.collapse})},[(R(!0),V(Oe,null,Ze(n.value,(o,a)=>(R(),V("div",{key:o,class:Pe(i.value)},[Ne(s.$slots,"default",{instance:o,index:a})],2))),128))],2))}}),R4=["data-dp-element","aria-label","aria-disabled"],jc=hn({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(t,{emit:e}){const n=e,i=xe(null);return En(()=>n("set-ref",i)),(s,r)=>(R(),V("button",{ref_key:"elRef",ref:i,type:"button","data-dp-element":s.elName,class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":s.ariaLabel,"aria-disabled":s.disabled||void 0,onClick:r[0]||(r[0]=o=>s.$emit("activate")),onKeydown:r[1]||(r[1]=o=>J(ii)(o,()=>s.$emit("activate"),!0))},[g("span",{class:Pe(["dp__inner_nav",{dp__inner_nav_disabled:s.disabled}])},[Ne(s.$slots,"default")],2)],40,R4))}}),L4=["aria-label","data-test"],lS=hn({__name:"YearModePicker",props:{..._s,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(t,{emit:e}){const n=e,i=t,{showRightIcon:s,showLeftIcon:r}=Ef(),{defaultedConfig:o,defaultedMultiCalendars:a,defaultedAriaLabels:l,defaultedTransitions:c,defaultedUI:u}=jt(i),{showTransition:d,transitionName:h}=zu(c),f=xe(!1),p=(v=!1,b)=>{f.value=!f.value,n("toggle-year-picker",{flow:v,show:b})},m=v=>{f.value=!1,n("year-select",v)},y=(v=!1)=>{n("handle-year",v)};return(v,b)=>{var x,E,w,S,T;return R(),V(Oe,null,[g("div",{class:Pe(["dp--year-mode-picker",{"dp--hidden-el":f.value}])},[J(r)(J(a),t.instance)?(R(),Se(jc,{key:0,ref:"mpPrevIconRef","aria-label":(x=J(l))==null?void 0:x.prevYear,disabled:t.isDisabled(!1),class:Pe((E=J(u))==null?void 0:E.navBtnPrev),onActivate:b[0]||(b[0]=A=>y(!1))},{default:De(()=>[v.$slots["arrow-left"]?Ne(v.$slots,"arrow-left",{key:0}):ce("",!0),v.$slots["arrow-left"]?ce("",!0):(R(),Se(J(A_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0),g("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${t.year}-${(w=J(l))==null?void 0:w.openYearsOverlay}`,"data-test":`year-mode-btn-${t.instance}`,onClick:b[1]||(b[1]=()=>p(!1)),onKeydown:b[2]||(b[2]=eC(()=>p(!1),["enter"]))},[v.$slots.year?Ne(v.$slots,"year",{key:0,year:t.year}):ce("",!0),v.$slots.year?ce("",!0):(R(),V(Oe,{key:1},[Ue(we(t.year),1)],64))],40,L4),J(s)(J(a),t.instance)?(R(),Se(jc,{key:1,ref:"mpNextIconRef","aria-label":(S=J(l))==null?void 0:S.nextYear,disabled:t.isDisabled(!0),class:Pe((T=J(u))==null?void 0:T.navBtnNext),onActivate:b[3]||(b[3]=A=>y(!0))},{default:De(()=>[v.$slots["arrow-right"]?Ne(v.$slots,"arrow-right",{key:0}):ce("",!0),v.$slots["arrow-right"]?ce("",!0):(R(),Se(J(k_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0)],2),N($t,{name:J(h)(t.showYearPicker),css:J(d)},{default:De(()=>{var A,k;return[t.showYearPicker?(R(),Se(Vu,{key:0,items:t.items,"text-input":v.textInput,"esc-close":v.escClose,config:v.config,"is-last":v.autoApply&&!J(o).keepActionRow,"hide-navigation":v.hideNavigation,"aria-labels":v.ariaLabels,"overlay-label":(k=(A=J(l))==null?void 0:A.yearPicker)==null?void 0:k.call(A,!0),type:"year",onToggle:p,onSelected:b[4]||(b[4]=P=>m(P))},Un({"button-icon":De(()=>[v.$slots["calendar-icon"]?Ne(v.$slots,"calendar-icon",{key:0}):ce("",!0),v.$slots["calendar-icon"]?ce("",!0):(R(),Se(J(Gl),{key:1}))]),_:2},[v.$slots["year-overlay-value"]?{name:"item",fn:De(({item:P})=>[Ne(v.$slots,"year-overlay-value",{text:P.text,value:P.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels","overlay-label"])):ce("",!0)]}),_:3},8,["name","css"])],64)}}}),N_=(t,e,n)=>{if(e.value&&Array.isArray(e.value))if(e.value.some(i=>ct(t,i))){const i=e.value.filter(s=>!ct(s,t));e.value=i.length?i:null}else(n&&+n>e.value.length||!n)&&e.value.push(t);else e.value=[t]},F_=(t,e,n)=>{let i=t.value?t.value.slice():[];return i.length===2&&i[1]!==null&&(i=[]),i.length?Qt(e,i[0])?(i.unshift(e),n("range-start",i[0]),n("range-start",i[1])):(i[1]=e,n("range-end",e)):(i=[e],n("range-start",e)),i},xf=(t,e,n,i)=>{t&&(t[0]&&t[1]&&n&&e("auto-apply"),t[0]&&!t[1]&&i&&n&&e("auto-apply"))},cS=t=>{Array.isArray(t.value)&&t.value.length<=2&&t.range?t.modelValue.value=t.value.map(e=>xi(Ce(e),t.timezone)):Array.isArray(t.value)||(t.modelValue.value=xi(Ce(t.value),t.timezone))},uS=(t,e,n,i)=>Array.isArray(e.value)&&(e.value.length===2||e.value.length===1&&i.value.partialRange)?i.value.fixedStart&&(on(t,e.value[0])||ct(t,e.value[0]))?[e.value[0],t]:i.value.fixedEnd&&(Qt(t,e.value[1])||ct(t,e.value[1]))?[t,e.value[1]]:(n("invalid-fixed-range",t),e.value):[],dS=({multiCalendars:t,range:e,highlight:n,propDates:i,calendars:s,modelValue:r,props:o,filters:a,year:l,month:c,emit:u})=>{const d=be(()=>R_(o.yearRange,o.locale,o.reverseYears)),h=xe([!1]),f=be(()=>(P,B)=>{const Y=Pt(rs(new Date),{month:c.value(P),year:l.value(P)}),ne=B?LC(Y):lu(Y);return iS(ne,i.value.maxDate,i.value.minDate,o.preventMinMaxNavigation,B)}),p=()=>Array.isArray(r.value)&&t.value.solo&&r.value[1],m=()=>{for(let P=0;P{if(!P)return m();const B=Pt(Ce(),s.value[P]);return s.value[0].year=Xe(UC(B,t.value.count-1)),m()},v=(P,B)=>{const Y=U3(B,P);return e.value.showLastInRange&&Y>1?B:P},b=P=>o.focusStartDate||t.value.solo?P[0]:P[1]?v(P[0],P[1]):P[0],x=()=>{if(r.value){const P=Array.isArray(r.value)?b(r.value):r.value;s.value[0]={month:at(P),year:Xe(P)}}},E=()=>{x(),t.value.count&&m()};un(r,(P,B)=>{o.isTextInputDate&&JSON.stringify(P??{})!==JSON.stringify(B??{})&&E()}),En(()=>{E()});const w=(P,B)=>{s.value[B].year=P,u("update-month-year",{instance:B,year:P,month:s.value[B].month}),t.value.count&&!t.value.solo&&y(B)},S=be(()=>P=>kl(d.value,B=>{var Y;const ne=l.value(P)===B.value,$=uu(B.value,Ml(i.value.minDate),Ml(i.value.maxDate))||((Y=a.value.years)==null?void 0:Y.includes(l.value(P))),F=$_(n.value,B.value);return{active:ne,disabled:$,highlighted:F}})),T=(P,B)=>{w(P,B),k(B)},A=(P,B=!1)=>{if(!f.value(P,B)){const Y=B?l.value(P)+1:l.value(P)-1;w(Y,P)}},k=(P,B=!1,Y)=>{B||u("reset-flow"),Y!==void 0?h.value[P]=Y:h.value[P]=!h.value[P],h.value[P]?u("overlay-toggle",{open:!0,overlay:Yn.year}):(u("overlay-closed"),u("overlay-toggle",{open:!1,overlay:Yn.year}))};return{isDisabled:f,groupedYears:S,showYearPicker:h,selectYear:w,toggleYearPicker:k,handleYearSelect:T,handleYear:A}},O4=(t,e)=>{const{defaultedMultiCalendars:n,defaultedAriaLabels:i,defaultedTransitions:s,defaultedConfig:r,defaultedRange:o,defaultedHighlight:a,propDates:l,defaultedTz:c,defaultedFilters:u,defaultedMultiDates:d}=jt(t),h=()=>{t.isTextInputDate&&E(Xe(Ce(t.startDate)),0)},{modelValue:f,year:p,month:m,calendars:y}=Wu(t,e,h),v=be(()=>XC(t.formatLocale,t.locale,t.monthNameFormat)),b=xe(null),{checkMinMaxRange:x}=yo(t),{selectYear:E,groupedYears:w,showYearPicker:S,toggleYearPicker:T,handleYearSelect:A,handleYear:k,isDisabled:P}=dS({modelValue:f,multiCalendars:n,range:o,highlight:a,calendars:y,year:p,propDates:l,month:m,filters:u,props:t,emit:e});En(()=>{t.startDate&&(f.value&&t.focusStartDate||!f.value)&&E(Xe(Ce(t.startDate)),0)});const B=I=>I?{month:at(I),year:Xe(I)}:{month:null,year:null},Y=()=>f.value?Array.isArray(f.value)?f.value.map(I=>B(I)):B(f.value):B(),ne=(I,ee)=>{const ue=y.value[I],L=Y();return Array.isArray(L)?L.some(ae=>ae.year===ue?.year&&ae.month===ee):ue?.year===L.year&&ee===L.month},$=(I,ee,ue)=>{var L,ae;const de=Y();return Array.isArray(de)?p.value(ee)===((L=de[ue])==null?void 0:L.year)&&I===((ae=de[ue])==null?void 0:ae.month):!1},F=(I,ee)=>{if(o.value.enabled){const ue=Y();if(Array.isArray(f.value)&&Array.isArray(ue)){const L=$(I,ee,0)||$(I,ee,1),ae=ar(rs(Ce()),I,p.value(ee));return vf(f.value,b.value,ae)&&!L}return!1}return!1},D=be(()=>I=>kl(v.value,ee=>{var ue;const L=ne(I,ee.value),ae=uu(ee.value,QC(p.value(I),l.value.minDate),eS(p.value(I),l.value.maxDate))||o4(l.value.disabledDates,p.value(I)).includes(ee.value)||((ue=u.value.months)==null?void 0:ue.includes(ee.value)),de=F(ee.value,I),ve=rS(a.value,ee.value,p.value(I));return{active:L,disabled:ae,isBetween:de,highlighted:ve}})),z=(I,ee)=>ar(rs(Ce()),I,p.value(ee)),X=(I,ee)=>{const ue=f.value?f.value:rs(new Date);f.value=ar(ue,I,p.value(ee)),e("auto-apply"),e("update-flow-step")},Z=(I,ee)=>{const ue=z(I,ee);o.value.fixedEnd||o.value.fixedStart?f.value=uS(ue,f,e,o):f.value?x(ue,f.value)&&(f.value=F_(f,z(I,ee),e)):f.value=[z(I,ee)],Rn().then(()=>{xf(f.value,e,t.autoApply,t.modelAuto)})},H=(I,ee)=>{N_(z(I,ee),f,d.value.limit),e("auto-apply",!0)},le=(I,ee)=>(y.value[ee].month=I,te(ee,y.value[ee].year,I),d.value.enabled?H(I,ee):o.value.enabled?Z(I,ee):X(I,ee)),ie=(I,ee)=>{E(I,ee),te(ee,I,null)},te=(I,ee,ue)=>{let L=ue;if(!L&&L!==0){const ae=Y();L=Array.isArray(ae)?ae[I].month:ae.month}e("update-month-year",{instance:I,year:ee,month:L})};return{groupedMonths:D,groupedYears:w,year:p,isDisabled:P,defaultedMultiCalendars:n,defaultedAriaLabels:i,defaultedTransitions:s,defaultedConfig:r,showYearPicker:S,modelValue:f,presetDate:(I,ee)=>{cS({value:I,modelValue:f,range:o.value.enabled,timezone:ee?void 0:c.value.timezone}),e("auto-apply")},setHoverDate:(I,ee)=>{b.value=z(I,ee)},selectMonth:le,selectYear:ie,toggleYearPicker:T,handleYearSelect:A,handleYear:k,getModelMonthYear:Y}},$4=hn({compatConfig:{MODE:3},__name:"MonthPicker",props:{..._s},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=_a(),r=ki(s,"yearMode"),o=t;En(()=>{o.shadow||i("mount",null)});const{groupedMonths:a,groupedYears:l,year:c,isDisabled:u,defaultedMultiCalendars:d,defaultedConfig:h,showYearPicker:f,modelValue:p,presetDate:m,setHoverDate:y,selectMonth:v,selectYear:b,toggleYearPicker:x,handleYearSelect:E,handleYear:w,getModelMonthYear:S}=O4(o,i);return e({getSidebarProps:()=>({modelValue:p,year:c,getModelMonthYear:S,selectMonth:v,selectYear:b,handleYear:w}),presetDate:m,toggleYearPicker:T=>x(0,T)}),(T,A)=>(R(),Se(wf,{"multi-calendars":J(d).count,collapse:T.collapse,stretch:""},{default:De(({instance:k})=>[T.$slots["top-extra"]?Ne(T.$slots,"top-extra",{key:0,value:T.internalModelValue}):ce("",!0),T.$slots["month-year"]?Ne(T.$slots,"month-year",In(wn({key:1},{year:J(c),months:J(a)(k),years:J(l)(k),selectMonth:J(v),selectYear:J(b),instance:k}))):(R(),Se(Vu,{key:2,items:J(a)(k),"arrow-navigation":T.arrowNavigation,"is-last":T.autoApply&&!J(h).keepActionRow,"esc-close":T.escClose,height:J(h).modeHeight,config:T.config,"no-overlay-focus":!!(T.noOverlayFocus||T.textInput),"use-relative":"",type:"month",onSelected:P=>J(v)(P,k),onHoverValue:P=>J(y)(P,k)},Un({header:De(()=>[N(lS,wn(T.$props,{items:J(l)(k),instance:k,"show-year-picker":J(f)[k],year:J(c)(k),"is-disabled":P=>J(u)(k,P),onHandleYear:P=>J(w)(k,P),onYearSelect:P=>J(E)(P,k),onToggleYearPicker:P=>J(x)(k,P?.flow,P?.show)}),Un({_:2},[Ze(J(r),(P,B)=>({name:P,fn:De(Y=>[Ne(T.$slots,P,In(ni(Y)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[T.$slots["month-overlay-value"]?{name:"item",fn:De(({item:P})=>[Ne(T.$slots,"month-overlay-value",{text:P.text,value:P.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse"]))}}),N4=(t,e)=>{const n=()=>{t.isTextInputDate&&(u.value=Xe(Ce(t.startDate)))},{modelValue:i}=Wu(t,e,n),s=xe(null),{defaultedHighlight:r,defaultedMultiDates:o,defaultedFilters:a,defaultedRange:l,propDates:c}=jt(t),u=xe();En(()=>{t.startDate&&(i.value&&t.focusStartDate||!i.value)&&(u.value=Xe(Ce(t.startDate)))});const d=m=>Array.isArray(i.value)?i.value.some(y=>Xe(y)===m):i.value?Xe(i.value)===m:!1,h=m=>l.value.enabled&&Array.isArray(i.value)?vf(i.value,s.value,p(m)):!1,f=be(()=>kl(R_(t.yearRange,t.locale,t.reverseYears),m=>{const y=d(m.value),v=uu(m.value,Ml(c.value.minDate),Ml(c.value.maxDate))||a.value.years.includes(m.value),b=h(m.value)&&!y,x=$_(r.value,m.value);return{active:y,disabled:v,isBetween:b,highlighted:x}})),p=m=>ks(rs(lu(new Date)),m);return{groupedYears:f,modelValue:i,focusYear:u,setHoverValue:m=>{s.value=ks(rs(new Date),m)},selectYear:m=>{var y;if(e("update-month-year",{instance:0,year:m}),o.value.enabled)return i.value?Array.isArray(i.value)&&(((y=i.value)==null?void 0:y.map(v=>Xe(v))).includes(m)?i.value=i.value.filter(v=>Xe(v)!==m):i.value.push(ks(oi(Ce()),m))):i.value=[ks(oi(lu(Ce())),m)],e("auto-apply",!0);l.value.enabled?(i.value=F_(i,p(m),e),Rn().then(()=>{xf(i.value,e,t.autoApply,t.modelAuto)})):(i.value=p(m),e("auto-apply"))}}},F4=hn({compatConfig:{MODE:3},__name:"YearPicker",props:{..._s},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(t,{expose:e,emit:n}){const i=n,s=t,{groupedYears:r,modelValue:o,focusYear:a,selectYear:l,setHoverValue:c}=N4(s,i),{defaultedConfig:u}=jt(s);return e({getSidebarProps:()=>({modelValue:o,selectYear:l})}),(d,h)=>(R(),V("div",null,[d.$slots["top-extra"]?Ne(d.$slots,"top-extra",{key:0,value:d.internalModelValue}):ce("",!0),d.$slots["month-year"]?Ne(d.$slots,"month-year",In(wn({key:1},{years:J(r),selectYear:J(l)}))):(R(),Se(Vu,{key:2,items:J(r),"is-last":d.autoApply&&!J(u).keepActionRow,height:J(u).modeHeight,config:d.config,"no-overlay-focus":!!(d.noOverlayFocus||d.textInput),"focus-value":J(a),type:"year","use-relative":"",onSelected:J(l),onHoverValue:J(c)},Un({_:2},[d.$slots["year-overlay-value"]?{name:"item",fn:De(({item:f})=>[Ne(d.$slots,"year-overlay-value",{text:f.text,value:f.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),B4={key:0,class:"dp__time_input"},V4=["data-test","aria-label","onKeydown","onClick","onMousedown"],z4=["aria-label","disabled","data-test","onKeydown","onClick"],W4=["data-test","aria-label","onKeydown","onClick","onMousedown"],Y4={key:0},H4=["aria-label"],j4=hn({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},..._s},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(t,{expose:e,emit:n}){const i=n,s=t,{setTimePickerElements:r,setTimePickerBackRef:o}=_o(),{defaultedAriaLabels:a,defaultedTransitions:l,defaultedFilters:c,defaultedConfig:u,defaultedRange:d}=jt(s),{transitionName:h,showTransition:f}=zu(l),p=Ki({hours:!1,minutes:!1,seconds:!1}),m=xe("AM"),y=xe(null),v=xe([]),b=xe(),x=xe(!1);En(()=>{i("mounted")});const E=C=>Pt(new Date,{hours:C.hours,minutes:C.minutes,seconds:s.enableSeconds?C.seconds:0,milliseconds:0}),w=be(()=>C=>z(C,s[C])||T(C,s[C])),S=be(()=>({hours:s.hours,minutes:s.minutes,seconds:s.seconds})),T=(C,O)=>d.value.enabled&&!d.value.disableTimeRangeValidation?!s.validateTime(C,O):!1,A=(C,O)=>{if(d.value.enabled&&!d.value.disableTimeRangeValidation){const K=O?+s[`${C}Increment`]:-+s[`${C}Increment`],U=s[C]+K;return!s.validateTime(C,U)}return!1},k=be(()=>C=>!ie(+s[C]+ +s[`${C}Increment`],C)||A(C,!0)),P=be(()=>C=>!ie(+s[C]-+s[`${C}Increment`],C)||A(C,!1)),B=(C,O)=>AC(Pt(Ce(),C),O),Y=(C,O)=>W5(Pt(Ce(),C),O),ne=be(()=>({dp__time_col:!0,dp__time_col_block:!s.timePickerInline,dp__time_col_reg_block:!s.enableSeconds&&s.is24&&!s.timePickerInline,dp__time_col_reg_inline:!s.enableSeconds&&s.is24&&s.timePickerInline,dp__time_col_reg_with_button:!s.enableSeconds&&!s.is24,dp__time_col_sec:s.enableSeconds&&s.is24,dp__time_col_sec_with_button:s.enableSeconds&&!s.is24})),$=be(()=>{const C=[{type:"hours"}];return s.enableMinutes&&C.push({type:"",separator:!0},{type:"minutes"}),s.enableSeconds&&C.push({type:"",separator:!0},{type:"seconds"}),C}),F=be(()=>$.value.filter(C=>!C.separator)),D=be(()=>C=>{if(C==="hours"){const O=ae(+s.hours);return{text:O<10?`0${O}`:`${O}`,value:O}}return{text:s[C]<10?`0${s[C]}`:`${s[C]}`,value:s[C]}}),z=(C,O)=>{var K;if(!s.disabledTimesConfig)return!1;const U=s.disabledTimesConfig(s.order,C==="hours"?O:void 0);return U[C]?!!((K=U[C])!=null&&K.includes(O)):!0},X=(C,O)=>O!=="hours"||m.value==="AM"?C:C+12,Z=C=>{const O=s.is24?24:12,K=C==="hours"?O:60,U=+s[`${C}GridIncrement`],re=C==="hours"&&!s.is24?U:0,j=[];for(let se=re;se({active:!1,disabled:c.value.times[C].includes(se.value)||!ie(se.value,C)||z(C,se.value)||T(C,se.value)}))},H=C=>C>=0?C:59,le=C=>C>=0?C:23,ie=(C,O)=>{const K=s.minTime?E(Rg(s.minTime)):null,U=s.maxTime?E(Rg(s.maxTime)):null,re=E(Rg(S.value,O,O==="minutes"||O==="seconds"?H(C):le(C)));return K&&U?(cu(re,U)||el(re,U))&&(Tl(re,K)||el(re,K)):K?Tl(re,K)||el(re,K):U?cu(re,U)||el(re,U):!0},te=C=>s[`no${C[0].toUpperCase()+C.slice(1)}Overlay`],I=C=>{te(C)||(p[C]=!p[C],p[C]?(x.value=!0,i("overlay-opened",C)):(x.value=!1,i("overlay-closed",C)))},ee=C=>C==="hours"?yr:C==="minutes"?ao:Sl,ue=()=>{b.value&&clearTimeout(b.value)},L=(C,O=!0,K)=>{const U=O?B:Y,re=O?+s[`${C}Increment`]:-+s[`${C}Increment`];ie(+s[C]+re,C)&&i(`update:${C}`,ee(C)(U({[C]:+s[C]},{[C]:+s[`${C}Increment`]}))),!(K!=null&&K.keyboard)&&u.value.timeArrowHoldThreshold&&(b.value=setTimeout(()=>{L(C,O)},u.value.timeArrowHoldThreshold))},ae=C=>s.is24?C:(C>=12?m.value="PM":m.value="AM",G5(C)),de=()=>{m.value==="PM"?(m.value="AM",i("update:hours",s.hours-12)):(m.value="PM",i("update:hours",s.hours+12)),i("am-pm-change",m.value)},ve=C=>{p[C]=!0},W=(C,O,K)=>{if(C&&s.arrowNavigation){Array.isArray(v.value[O])?v.value[O][K]=C:v.value[O]=[C];const U=v.value.reduce((re,j)=>j.map((se,Q)=>[...re[Q]||[],j[Q]]),[]);o(s.closeTimePickerBtn),y.value&&(U[1]=U[1].concat(y.value)),r(U,s.order)}},fe=(C,O)=>(I(C),i(`update:${C}`,O));return e({openChildCmp:ve}),(C,O)=>{var K;return C.disabled?ce("",!0):(R(),V("div",B4,[(R(!0),V(Oe,null,Ze($.value,(U,re)=>{var j,se,Q;return R(),V("div",{key:re,class:Pe(ne.value)},[U.separator?(R(),V(Oe,{key:0},[x.value?ce("",!0):(R(),V(Oe,{key:0},[Ue(":")],64))],64)):(R(),V(Oe,{key:1},[g("button",{ref_for:!0,ref:ge=>W(ge,re,0),type:"button",class:Pe({dp__btn:!0,dp__inc_dec_button:!C.timePickerInline,dp__inc_dec_button_inline:C.timePickerInline,dp__tp_inline_btn_top:C.timePickerInline,dp__inc_dec_button_disabled:k.value(U.type),"dp--hidden-el":x.value}),"data-test":`${U.type}-time-inc-btn-${s.order}`,"aria-label":(j=J(a))==null?void 0:j.incrementValue(U.type),tabindex:"0",onKeydown:ge=>J(ii)(ge,()=>L(U.type,!0,{keyboard:!0}),!0),onClick:ge=>J(u).timeArrowHoldThreshold?void 0:L(U.type,!0),onMousedown:ge=>J(u).timeArrowHoldThreshold?L(U.type,!0):void 0,onMouseup:ue},[s.timePickerInline?(R(),V(Oe,{key:1},[C.$slots["tp-inline-arrow-up"]?Ne(C.$slots,"tp-inline-arrow-up",{key:0}):(R(),V(Oe,{key:1},[O[2]||(O[2]=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),O[3]||(O[3]=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(R(),V(Oe,{key:0},[C.$slots["arrow-up"]?Ne(C.$slots,"arrow-up",{key:0}):ce("",!0),C.$slots["arrow-up"]?ce("",!0):(R(),Se(J(P_),{key:1}))],64))],42,V4),g("button",{ref_for:!0,ref:ge=>W(ge,re,1),type:"button","aria-label":`${D.value(U.type).text}-${(se=J(a))==null?void 0:se.openTpOverlay(U.type)}`,class:Pe({dp__time_display:!0,dp__time_display_block:!C.timePickerInline,dp__time_display_inline:C.timePickerInline,"dp--time-invalid":w.value(U.type),"dp--time-overlay-btn":!w.value(U.type),"dp--hidden-el":x.value}),disabled:te(U.type),tabindex:"0","data-test":`${U.type}-toggle-overlay-btn-${s.order}`,onKeydown:ge=>J(ii)(ge,()=>I(U.type),!0),onClick:ge=>I(U.type)},[C.$slots[U.type]?Ne(C.$slots,U.type,{key:0,text:D.value(U.type).text,value:D.value(U.type).value}):ce("",!0),C.$slots[U.type]?ce("",!0):(R(),V(Oe,{key:1},[Ue(we(D.value(U.type).text),1)],64))],42,z4),g("button",{ref_for:!0,ref:ge=>W(ge,re,2),type:"button",class:Pe({dp__btn:!0,dp__inc_dec_button:!C.timePickerInline,dp__inc_dec_button_inline:C.timePickerInline,dp__tp_inline_btn_bottom:C.timePickerInline,dp__inc_dec_button_disabled:P.value(U.type),"dp--hidden-el":x.value}),"data-test":`${U.type}-time-dec-btn-${s.order}`,"aria-label":(Q=J(a))==null?void 0:Q.decrementValue(U.type),tabindex:"0",onKeydown:ge=>J(ii)(ge,()=>L(U.type,!1,{keyboard:!0}),!0),onClick:ge=>J(u).timeArrowHoldThreshold?void 0:L(U.type,!1),onMousedown:ge=>J(u).timeArrowHoldThreshold?L(U.type,!1):void 0,onMouseup:ue},[s.timePickerInline?(R(),V(Oe,{key:1},[C.$slots["tp-inline-arrow-down"]?Ne(C.$slots,"tp-inline-arrow-down",{key:0}):(R(),V(Oe,{key:1},[O[4]||(O[4]=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),O[5]||(O[5]=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(R(),V(Oe,{key:0},[C.$slots["arrow-down"]?Ne(C.$slots,"arrow-down",{key:0}):ce("",!0),C.$slots["arrow-down"]?ce("",!0):(R(),Se(J(I_),{key:1}))],64))],42,W4)],64))],2)}),128)),C.is24?ce("",!0):(R(),V("div",Y4,[C.$slots["am-pm-button"]?Ne(C.$slots,"am-pm-button",{key:0,toggle:de,value:m.value}):ce("",!0),C.$slots["am-pm-button"]?ce("",!0):(R(),V("button",{key:1,ref_key:"amPmButton",ref:y,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(K=J(a))==null?void 0:K.amPmButton,tabindex:"0",onClick:de,onKeydown:O[0]||(O[0]=U=>J(ii)(U,()=>de(),!0))},we(m.value),41,H4))])),(R(!0),V(Oe,null,Ze(F.value,(U,re)=>(R(),Se($t,{key:re,name:J(h)(p[U.type]),css:J(f)},{default:De(()=>{var j,se;return[p[U.type]?(R(),Se(Vu,{key:0,items:Z(U.type),"is-last":C.autoApply&&!J(u).keepActionRow,"esc-close":C.escClose,type:U.type,"text-input":C.textInput,config:C.config,"arrow-navigation":C.arrowNavigation,"aria-labels":C.ariaLabels,"overlay-label":(se=(j=J(a)).timeOverlay)==null?void 0:se.call(j,U.type),onSelected:Q=>fe(U.type,Q),onToggle:Q=>I(U.type),onResetFlow:O[1]||(O[1]=Q=>C.$emit("reset-flow"))},Un({"button-icon":De(()=>[C.$slots["clock-icon"]?Ne(C.$slots,"clock-icon",{key:0}):ce("",!0),C.$slots["clock-icon"]?ce("",!0):(R(),Se(ma(C.timePickerInline?J(Gl):J(M_)),{key:1}))]),_:2},[C.$slots[`${U.type}-overlay-value`]?{name:"item",fn:De(({item:Q})=>[Ne(C.$slots,`${U.type}-overlay-value`,{text:Q.text,value:Q.value})]),key:"0"}:void 0,C.$slots[`${U.type}-overlay-header`]?{name:"header",fn:De(()=>[Ne(C.$slots,`${U.type}-overlay-header`,{toggle:()=>I(U.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","overlay-label","onSelected","onToggle"])):ce("",!0)]}),_:2},1032,["name","css"]))),128))]))}}}),K4={class:"dp--tp-wrap"},U4=["aria-label","tabindex"],G4=["role","aria-label","tabindex"],X4=["aria-label"],hS=hn({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},..._s},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(t,{expose:e,emit:n}){const i=n,s=t,{buildMatrix:r,setTimePicker:o}=_o(),a=_a(),{defaultedTransitions:l,defaultedAriaLabels:c,defaultedTextInput:u,defaultedConfig:d,defaultedRange:h}=jt(s),{transitionName:f,showTransition:p}=zu(l),{hideNavigationButtons:m}=Ef(),y=xe(null),v=xe(null),b=xe([]),x=xe(null),E=xe(!1);En(()=>{i("mount"),!s.timePicker&&s.arrowNavigation?r([vn(y.value)],"time"):o(!0,s.timePicker)});const w=be(()=>h.value.enabled&&s.modelAuto?qC(s.internalModelValue):!0),S=xe(!1),T=Z=>({hours:Array.isArray(s.hours)?s.hours[Z]:s.hours,minutes:Array.isArray(s.minutes)?s.minutes[Z]:s.minutes,seconds:Array.isArray(s.seconds)?s.seconds[Z]:s.seconds}),A=be(()=>{const Z=[];if(h.value.enabled)for(let H=0;H<2;H++)Z.push(T(H));else Z.push(T(0));return Z}),k=(Z,H=!1,le="")=>{H||i("reset-flow"),S.value=Z,i(Z?"overlay-opened":"overlay-closed",Yn.time),s.arrowNavigation&&o(Z),Rn(()=>{le!==""&&b.value[0]&&b.value[0].openChildCmp(le)})},P=be(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:s.autoApply&&!d.value.keepActionRow})),B=ki(a,"timePicker"),Y=(Z,H,le)=>h.value.enabled?H===0?[Z,A.value[1][le]]:[A.value[0][le],Z]:Z,ne=Z=>{i("update:hours",Z)},$=Z=>{i("update:minutes",Z)},F=Z=>{i("update:seconds",Z)},D=()=>{if(x.value&&!u.value.enabled&&!s.noOverlayFocus){const Z=ZC(x.value);Z&&Z.focus({preventScroll:!0})}},z=Z=>{E.value=!1,i("overlay-closed",Z)},X=Z=>{E.value=!0,i("overlay-opened",Z)};return e({toggleTimePicker:k}),(Z,H)=>{var le;return R(),V("div",K4,[!Z.timePicker&&!Z.timePickerInline?$e((R(),V("button",{key:0,ref_key:"openTimePickerBtn",ref:y,type:"button",class:Pe({...P.value,"dp--hidden-el":S.value}),"aria-label":(le=J(c))==null?void 0:le.openTimePicker,tabindex:Z.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:H[0]||(H[0]=ie=>J(ii)(ie,()=>k(!0))),onClick:H[1]||(H[1]=ie=>k(!0))},[Z.$slots["clock-icon"]?Ne(Z.$slots,"clock-icon",{key:0}):ce("",!0),Z.$slots["clock-icon"]?ce("",!0):(R(),Se(J(M_),{key:1}))],42,U4)),[[sh,!J(m)(Z.hideNavigation,"time")]]):ce("",!0),N($t,{name:J(f)(S.value),css:J(p)&&!Z.timePickerInline},{default:De(()=>{var ie,te;return[S.value||Z.timePicker||Z.timePickerInline?(R(),V("div",{key:0,ref_key:"overlayRef",ref:x,role:Z.timePickerInline?void 0:"dialog",class:Pe({dp__overlay:!Z.timePickerInline,"dp--overlay-absolute":!s.timePicker&&!Z.timePickerInline,"dp--overlay-relative":s.timePicker}),style:Pn(Z.timePicker?{height:`${J(d).modeHeight}px`}:void 0),"aria-label":(ie=J(c))==null?void 0:ie.timePicker,tabindex:Z.timePickerInline?void 0:0},[g("div",{class:Pe(Z.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[Z.$slots["time-picker-overlay"]?Ne(Z.$slots,"time-picker-overlay",{key:0,hours:t.hours,minutes:t.minutes,seconds:t.seconds,setHours:ne,setMinutes:$,setSeconds:F}):ce("",!0),Z.$slots["time-picker-overlay"]?ce("",!0):(R(),V("div",{key:1,class:Pe(Z.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(R(!0),V(Oe,null,Ze(A.value,(I,ee)=>$e((R(),Se(j4,wn({key:ee,ref_for:!0},{...Z.$props,order:ee,hours:I.hours,minutes:I.minutes,seconds:I.seconds,closeTimePickerBtn:v.value,disabledTimesConfig:t.disabledTimesConfig,disabled:ee===0?J(h).fixedStart:J(h).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:b,"validate-time":(ue,L)=>t.validateTime(ue,Y(L,ee,ue)),"onUpdate:hours":ue=>ne(Y(ue,ee,"hours")),"onUpdate:minutes":ue=>$(Y(ue,ee,"minutes")),"onUpdate:seconds":ue=>F(Y(ue,ee,"seconds")),onMounted:D,onOverlayClosed:z,onOverlayOpened:X,onAmPmChange:H[2]||(H[2]=ue=>Z.$emit("am-pm-change",ue))}),Un({_:2},[Ze(J(B),(ue,L)=>({name:ue,fn:De(ae=>[Ne(Z.$slots,ue,wn({ref_for:!0},ae))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[sh,ee===0?!0:w.value]])),128))],2)),!Z.timePicker&&!Z.timePickerInline?$e((R(),V("button",{key:2,ref_key:"closeTimePickerBtn",ref:v,type:"button",class:Pe({...P.value,"dp--hidden-el":E.value}),"aria-label":(te=J(c))==null?void 0:te.closeTimePicker,tabindex:"0",onKeydown:H[3]||(H[3]=I=>J(ii)(I,()=>k(!1))),onClick:H[4]||(H[4]=I=>k(!1))},[Z.$slots["calendar-icon"]?Ne(Z.$slots,"calendar-icon",{key:0}):ce("",!0),Z.$slots["calendar-icon"]?ce("",!0):(R(),Se(J(Gl),{key:1}))],42,X4)),[[sh,!J(m)(Z.hideNavigation,"time")]]):ce("",!0)],2)],14,G4)):ce("",!0)]}),_:3},8,["name","css"])])}}}),fS=(t,e,n,i)=>{const{defaultedRange:s}=jt(t),r=(x,E)=>Array.isArray(e[x])?e[x][E]:e[x],o=x=>t.enableSeconds?Array.isArray(e.seconds)?e.seconds[x]:e.seconds:0,a=(x,E)=>x?E!==void 0?to(x,r("hours",E),r("minutes",E),o(E)):to(x,e.hours,e.minutes,o()):KC(Ce(),o(E)),l=(x,E)=>{e[x]=E},c=be(()=>t.modelAuto&&s.value.enabled?Array.isArray(n.value)?n.value.length>1:!1:s.value.enabled),u=(x,E)=>{const w=Object.fromEntries(Object.keys(e).map(S=>S===x?[S,E]:[S,e[S]].slice()));if(c.value&&!s.value.disableTimeRangeValidation){const S=A=>n.value?to(n.value[A],w.hours[A],w.minutes[A],w.seconds[A]):null,T=A=>jC(n.value[A],0);return!(ct(S(0),S(1))&&(Tl(S(0),T(1))||cu(S(1),T(0))))}return!0},d=(x,E)=>{u(x,E)&&(l(x,E),i&&i())},h=x=>{d("hours",x)},f=x=>{d("minutes",x)},p=x=>{d("seconds",x)},m=(x,E,w,S)=>{E&&h(x),!E&&!w&&f(x),w&&p(x),n.value&&S(n.value)},y=x=>{if(x){const E=Array.isArray(x),w=E?[+x[0].hours,+x[1].hours]:+x.hours,S=E?[+x[0].minutes,+x[1].minutes]:+x.minutes,T=E?[+x[0].seconds,+x[1].seconds]:+x.seconds;l("hours",w),l("minutes",S),t.enableSeconds&&l("seconds",T)}},v=(x,E)=>{const w={hours:Array.isArray(e.hours)?e.hours[x]:e.hours,disabledArr:[]};return(E||E===0)&&(w.hours=E),Array.isArray(t.disabledTimes)&&(w.disabledArr=s.value.enabled&&Array.isArray(t.disabledTimes[x])?t.disabledTimes[x]:t.disabledTimes),w},b=be(()=>(x,E)=>{var w;if(Array.isArray(t.disabledTimes)){const{disabledArr:S,hours:T}=v(x,E),A=S.filter(k=>+k.hours===T);return((w=A[0])==null?void 0:w.minutes)==="*"?{hours:[T],minutes:void 0,seconds:void 0}:{hours:[],minutes:A?.map(k=>+k.minutes)??[],seconds:A?.map(k=>k.seconds?+k.seconds:void 0)??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:l,updateHours:h,updateMinutes:f,updateSeconds:p,getSetDateTime:a,updateTimeValues:m,getSecondsValue:o,assignStartTime:y,validateTime:u,disabledTimesConfig:b}},q4=(t,e)=>{const n=()=>{t.isTextInputDate&&E()},{modelValue:i,time:s}=Wu(t,e,n),{defaultedStartTime:r,defaultedRange:o,defaultedTz:a}=jt(t),{updateTimeValues:l,getSetDateTime:c,setTime:u,assignStartTime:d,disabledTimesConfig:h,validateTime:f}=fS(t,s,i,p);function p(){e("update-flow-step")}const m=S=>{const{hours:T,minutes:A,seconds:k}=S;return{hours:+T,minutes:+A,seconds:k?+k:0}},y=()=>{if(t.startTime){if(Array.isArray(t.startTime)){const T=m(t.startTime[0]),A=m(t.startTime[1]);return[Pt(Ce(),T),Pt(Ce(),A)]}const S=m(t.startTime);return Pt(Ce(),S)}return o.value.enabled?[null,null]:null},v=()=>{if(o.value.enabled){const[S,T]=y();i.value=[xi(c(S,0),a.value.timezone),xi(c(T,1),a.value.timezone)]}else i.value=xi(c(y()),a.value.timezone)},b=S=>Array.isArray(S)?[na(Ce(S[0])),na(Ce(S[1]))]:[na(S??Ce())],x=(S,T,A)=>{u("hours",S),u("minutes",T),u("seconds",t.enableSeconds?A:0)},E=()=>{const[S,T]=b(i.value);return o.value.enabled?x([S.hours,T.hours],[S.minutes,T.minutes],[S.seconds,T.seconds]):x(S.hours,S.minutes,S.seconds)};En(()=>{if(!t.shadow)return d(r.value),i.value?E():v()});const w=()=>{Array.isArray(i.value)?i.value=i.value.map((S,T)=>S&&c(S,T)):i.value=c(i.value),e("time-update")};return{modelValue:i,time:s,disabledTimesConfig:h,updateTime:(S,T=!0,A=!1)=>{l(S,T,A,w)},validateTime:f}},Z4=hn({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{..._s},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=_a(),o=ki(r,"timePicker"),a=xe(null),{time:l,modelValue:c,disabledTimesConfig:u,updateTime:d,validateTime:h}=q4(s,i);return En(()=>{s.shadow||i("mount",null)}),e({getSidebarProps:()=>({modelValue:c,time:l,updateTime:d}),toggleTimePicker:(f,p=!1,m="")=>{var y;(y=a.value)==null||y.toggleTimePicker(f,p,m)}}),(f,p)=>(R(),Se(wf,{"multi-calendars":0,stretch:""},{default:De(()=>[N(hS,wn({ref_key:"tpRef",ref:a},f.$props,{hours:J(l).hours,minutes:J(l).minutes,seconds:J(l).seconds,"internal-model-value":f.internalModelValue,"disabled-times-config":J(u),"validate-time":J(h),"onUpdate:hours":p[0]||(p[0]=m=>J(d)(m)),"onUpdate:minutes":p[1]||(p[1]=m=>J(d)(m,!1)),"onUpdate:seconds":p[2]||(p[2]=m=>J(d)(m,!1,!0)),onAmPmChange:p[3]||(p[3]=m=>f.$emit("am-pm-change",m)),onResetFlow:p[4]||(p[4]=m=>f.$emit("reset-flow")),onOverlayClosed:p[5]||(p[5]=m=>f.$emit("overlay-toggle",{open:!1,overlay:m})),onOverlayOpened:p[6]||(p[6]=m=>f.$emit("overlay-toggle",{open:!0,overlay:m}))}),Un({_:2},[Ze(J(o),(m,y)=>({name:m,fn:De(v=>[Ne(f.$slots,m,In(ni(v)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),J4={class:"dp--header-wrap"},Q4={key:0,class:"dp__month_year_wrap"},eB={key:0},tB={class:"dp__month_year_wrap"},nB=["data-dp-element","aria-label","data-test","onClick","onKeydown"],iB=hn({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},..._s},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(t,{expose:e,emit:n}){const i=n,s=t,{defaultedTransitions:r,defaultedAriaLabels:o,defaultedMultiCalendars:a,defaultedFilters:l,defaultedConfig:c,defaultedHighlight:u,propDates:d,defaultedUI:h}=jt(s),{transitionName:f,showTransition:p}=zu(r),{buildMatrix:m}=_o(),{handleMonthYearChange:y,isDisabled:v,updateMonthYear:b}=S4(s,i),{showLeftIcon:x,showRightIcon:E}=Ef(),w=xe(!1),S=xe(!1),T=xe(!1),A=xe([null,null,null,null]);En(()=>{i("mount")});const k=te=>({get:()=>s[te],set:I=>{const ee=te===es.month?es.year:es.month;i("update-month-year",{[te]:I,[ee]:s[ee]}),te===es.month?z(!0):X(!0)}}),P=be(k(es.month)),B=be(k(es.year)),Y=be(()=>te=>({month:s.month,year:s.year,items:te===es.month?s.months:s.years,instance:s.instance,updateMonthYear:b,toggle:te===es.month?z:X})),ne=be(()=>s.months.find(I=>I.value===s.month)||{text:"",value:0}),$=be(()=>kl(s.months,te=>{const I=s.month===te.value,ee=uu(te.value,QC(s.year,d.value.minDate),eS(s.year,d.value.maxDate))||l.value.months.includes(te.value),ue=rS(u.value,te.value,s.year);return{active:I,disabled:ee,highlighted:ue}})),F=be(()=>kl(s.years,te=>{const I=s.year===te.value,ee=uu(te.value,Ml(d.value.minDate),Ml(d.value.maxDate))||l.value.years.includes(te.value),ue=$_(u.value,te.value);return{active:I,disabled:ee,highlighted:ue}})),D=(te,I,ee)=>{ee!==void 0?te.value=ee:te.value=!te.value,te.value?(T.value=!0,i("overlay-opened",I)):(T.value=!1,i("overlay-closed",I))},z=(te=!1,I)=>{Z(te),D(w,Yn.month,I)},X=(te=!1,I)=>{Z(te),D(S,Yn.year,I)},Z=te=>{te||i("reset-flow")},H=(te,I)=>{s.arrowNavigation&&(A.value[I]=vn(te),m(A.value,"monthYear"))},le=be(()=>{var te,I,ee,ue,L,ae;return[{type:es.month,index:1,toggle:z,modelValue:P.value,updateModelValue:de=>P.value=de,text:ne.value.text,showSelectionGrid:w.value,items:$.value,ariaLabel:(te=o.value)==null?void 0:te.openMonthsOverlay,overlayLabel:((ee=(I=o.value).monthPicker)==null?void 0:ee.call(I,!0))??void 0},{type:es.year,index:2,toggle:X,modelValue:B.value,updateModelValue:de=>B.value=de,text:JC(s.year,s.locale),showSelectionGrid:S.value,items:F.value,ariaLabel:(ue=o.value)==null?void 0:ue.openYearsOverlay,overlayLabel:((ae=(L=o.value).yearPicker)==null?void 0:ae.call(L,!0))??void 0}]}),ie=be(()=>s.disableYearSelect?[le.value[0]]:s.yearFirst?[...le.value].reverse():le.value);return e({toggleMonthPicker:z,toggleYearPicker:X,handleMonthYearChange:y}),(te,I)=>{var ee,ue,L,ae,de,ve;return R(),V("div",J4,[te.$slots["month-year"]?(R(),V("div",Q4,[Ne(te.$slots,"month-year",In(ni({month:t.month,year:t.year,months:t.months,years:t.years,updateMonthYear:J(b),handleMonthYearChange:J(y),instance:t.instance})))])):(R(),V(Oe,{key:1},[te.$slots["top-extra"]?(R(),V("div",eB,[Ne(te.$slots,"top-extra",{value:te.internalModelValue})])):ce("",!0),g("div",tB,[J(x)(J(a),t.instance)&&!te.vertical?(R(),Se(jc,{key:0,"aria-label":(ee=J(o))==null?void 0:ee.prevMonth,disabled:J(v)(!1),class:Pe((ue=J(h))==null?void 0:ue.navBtnPrev),"el-name":"action-prev",onActivate:I[0]||(I[0]=W=>J(y)(!1,!0)),onSetRef:I[1]||(I[1]=W=>H(W,0))},{default:De(()=>[te.$slots["arrow-left"]?Ne(te.$slots,"arrow-left",{key:0}):ce("",!0),te.$slots["arrow-left"]?ce("",!0):(R(),Se(J(A_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0),g("div",{class:Pe(["dp__month_year_wrap",{dp__year_disable_select:te.disableYearSelect}])},[(R(!0),V(Oe,null,Ze(ie.value,(W,fe)=>(R(),V(Oe,{key:W.type},[g("button",{ref_for:!0,ref:C=>H(C,fe+1),type:"button","data-dp-element":`overlay-${W.type}`,class:Pe(["dp__btn dp__month_year_select",{"dp--hidden-el":T.value}]),"aria-label":`${W.text}-${W.ariaLabel}`,"data-test":`${W.type}-toggle-overlay-${t.instance}`,onClick:W.toggle,onKeydown:C=>J(ii)(C,()=>W.toggle(),!0)},[te.$slots[W.type]?Ne(te.$slots,W.type,{key:0,text:W.text,value:s[W.type]}):ce("",!0),te.$slots[W.type]?ce("",!0):(R(),V(Oe,{key:1},[Ue(we(W.text),1)],64))],42,nB),N($t,{name:J(f)(W.showSelectionGrid),css:J(p)},{default:De(()=>[W.showSelectionGrid?(R(),Se(Vu,{key:0,items:W.items,"arrow-navigation":te.arrowNavigation,"hide-navigation":te.hideNavigation,"is-last":te.autoApply&&!J(c).keepActionRow,"skip-button-ref":!1,config:te.config,type:W.type,"header-refs":[],"esc-close":te.escClose,"menu-wrap-ref":te.menuWrapRef,"text-input":te.textInput,"aria-labels":te.ariaLabels,"overlay-label":W.overlayLabel,onSelected:W.updateModelValue,onToggle:W.toggle},Un({"button-icon":De(()=>[te.$slots["calendar-icon"]?Ne(te.$slots,"calendar-icon",{key:0}):ce("",!0),te.$slots["calendar-icon"]?ce("",!0):(R(),Se(J(Gl),{key:1}))]),_:2},[te.$slots[`${W.type}-overlay-value`]?{name:"item",fn:De(({item:C})=>[Ne(te.$slots,`${W.type}-overlay-value`,{text:C.text,value:C.value})]),key:"0"}:void 0,te.$slots[`${W.type}-overlay`]?{name:"overlay",fn:De(()=>[Ne(te.$slots,`${W.type}-overlay`,wn({ref_for:!0},Y.value(W.type)))]),key:"1"}:void 0,te.$slots[`${W.type}-overlay-header`]?{name:"header",fn:De(()=>[Ne(te.$slots,`${W.type}-overlay-header`,{toggle:W.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","overlay-label","onSelected","onToggle"])):ce("",!0)]),_:2},1032,["name","css"])],64))),128))],2),J(x)(J(a),t.instance)&&te.vertical?(R(),Se(jc,{key:1,"aria-label":(L=J(o))==null?void 0:L.prevMonth,"el-name":"action-prev",disabled:J(v)(!1),class:Pe((ae=J(h))==null?void 0:ae.navBtnPrev),onActivate:I[2]||(I[2]=W=>J(y)(!1,!0))},{default:De(()=>[te.$slots["arrow-up"]?Ne(te.$slots,"arrow-up",{key:0}):ce("",!0),te.$slots["arrow-up"]?ce("",!0):(R(),Se(J(P_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0),J(E)(J(a),t.instance)?(R(),Se(jc,{key:2,ref:"rightIcon","el-name":"action-next",disabled:J(v)(!0),"aria-label":(de=J(o))==null?void 0:de.nextMonth,class:Pe((ve=J(h))==null?void 0:ve.navBtnNext),onActivate:I[3]||(I[3]=W=>J(y)(!0,!0)),onSetRef:I[4]||(I[4]=W=>H(W,te.disableYearSelect?2:3))},{default:De(()=>[te.$slots[te.vertical?"arrow-down":"arrow-right"]?Ne(te.$slots,te.vertical?"arrow-down":"arrow-right",{key:0}):ce("",!0),te.$slots[te.vertical?"arrow-down":"arrow-right"]?ce("",!0):(R(),Se(ma(te.vertical?J(I_):J(k_)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):ce("",!0)])],64))])}}}),sB={class:"dp__calendar_header",role:"row"},rB={key:0,class:"dp__calendar_header_item",role:"gridcell"},oB=["aria-label"],aB={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},lB={class:"dp__cell_inner"},cB=["id","aria-pressed","aria-disabled","aria-label","tabindex","data-test","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],uB=hn({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},..._s},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(t,{expose:e,emit:n}){const i=n,s=t,{buildMultiLevelMatrix:r}=_o(),{defaultedTransitions:o,defaultedConfig:a,defaultedAriaLabels:l,defaultedMultiCalendars:c,defaultedWeekNumbers:u,defaultedMultiDates:d,defaultedUI:h}=jt(s),f=xe(null),p=xe({bottom:"",left:"",transform:""}),m=xe([]),y=xe(null),v=xe(!0),b=xe(""),x=xe({startX:0,endX:0,startY:0,endY:0}),E=xe([]),w=xe({left:"50%"}),S=xe(!1),T=be(()=>s.calendar?s.calendar(s.mappedDates):s.mappedDates),A=be(()=>s.dayNames?Array.isArray(s.dayNames)?s.dayNames:s.dayNames(s.locale,+s.weekStart):U5(s.formatLocale,s.locale,+s.weekStart));En(()=>{i("mount",{cmp:"calendar",refs:m}),a.value.noSwipe||y.value&&(y.value.addEventListener("touchstart",H,{passive:!1}),y.value.addEventListener("touchend",le,{passive:!1}),y.value.addEventListener("touchmove",ie,{passive:!1})),s.monthChangeOnScroll&&y.value&&y.value.addEventListener("wheel",ee,{passive:!1})});const k=W=>W?s.vertical?"vNext":"next":s.vertical?"vPrevious":"previous",P=(W,fe)=>{if(s.transitions){const C=oi(ar(Ce(),s.month,s.year));b.value=on(oi(ar(Ce(),W,fe)),C)?o.value[k(!0)]:o.value[k(!1)],v.value=!1,Rn(()=>{v.value=!0})}},B=be(()=>({...h.value.calendar??{}})),Y=be(()=>W=>{const fe=X5(W);return{dp__marker_dot:fe.type==="dot",dp__marker_line:fe.type==="line"}}),ne=be(()=>W=>ct(W,f.value)),$=be(()=>({dp__calendar:!0,dp__calendar_next:c.value.count>0&&s.instance!==0})),F=be(()=>W=>s.hideOffsetDates?W.current:!0),D=async(W,fe)=>{const{width:C,height:O}=W.getBoundingClientRect();f.value=fe.value;let K={left:`${C/2}px`},U=-50;if(await Rn(),E.value[0]){const{left:re,width:j}=E.value[0].getBoundingClientRect();re<0&&(K={left:"0"},U=0,w.value.left=`${C/2}px`),window.innerWidth{var O,K,U;const re=vn(m.value[fe][C]);re&&((O=W.marker)!=null&&O.customPosition&&(U=(K=W.marker)==null?void 0:K.tooltip)!=null&&U.length?p.value=W.marker.customPosition(re):await D(re,W),i("tooltip-open",W.marker))},X=async(W,fe,C)=>{var O,K;if(S.value&&d.value.enabled&&d.value.dragSelect)return i("select-date",W);i("set-hover-date",W),(K=(O=W.marker)==null?void 0:O.tooltip)!=null&&K.length&&await z(W,fe,C)},Z=W=>{f.value&&(f.value=null,p.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),i("tooltip-close",W.marker))},H=W=>{x.value.startX=W.changedTouches[0].screenX,x.value.startY=W.changedTouches[0].screenY},le=W=>{x.value.endX=W.changedTouches[0].screenX,x.value.endY=W.changedTouches[0].screenY,te()},ie=W=>{s.vertical&&!s.inline&&W.preventDefault()},te=()=>{const W=s.vertical?"Y":"X";Math.abs(x.value[`start${W}`]-x.value[`end${W}`])>10&&i("handle-swipe",x.value[`start${W}`]>x.value[`end${W}`]?"right":"left")},I=(W,fe,C)=>{W&&(Array.isArray(m.value[fe])?m.value[fe][C]=W:m.value[fe]=[W]),s.arrowNavigation&&r(m.value,"calendar")},ee=W=>{s.monthChangeOnScroll&&(W.preventDefault(),i("handle-scroll",W))},ue=W=>u.value.type==="local"?C_(W.value,{weekStartsOn:+s.weekStart}):u.value.type==="iso"?x_(W.value):typeof u.value.type=="function"?u.value.type(W.value):"",L=W=>{const fe=W[0];return u.value.hideOnOffsetDates?W.some(C=>C.current)?ue(fe):"":ue(fe)},ae=(W,fe,C=!0)=>{C&&db()||!C&&!db()||d.value.enabled||(eo(W,a.value),i("select-date",fe))},de=W=>{eo(W,a.value)},ve=W=>{d.value.enabled&&d.value.dragSelect?(S.value=!0,i("select-date",W)):d.value.enabled&&i("select-date",W)};return e({triggerTransition:P}),(W,fe)=>(R(),V("div",{class:Pe($.value)},[g("div",{ref_key:"calendarWrapRef",ref:y,class:Pe(B.value),role:"grid"},[g("div",sB,[W.weekNumbers?(R(),V("div",rB,we(W.weekNumName),1)):ce("",!0),(R(!0),V(Oe,null,Ze(A.value,(C,O)=>{var K,U;return R(),V("div",{key:O,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(U=(K=J(l))==null?void 0:K.weekDay)==null?void 0:U.call(K,O)},[W.$slots["calendar-header"]?Ne(W.$slots,"calendar-header",{key:0,day:C,index:O}):ce("",!0),W.$slots["calendar-header"]?ce("",!0):(R(),V(Oe,{key:1},[Ue(we(C),1)],64))],8,oB)}),128))]),fe[2]||(fe[2]=g("div",{class:"dp__calendar_header_separator"},null,-1)),N($t,{name:b.value,css:!!W.transitions},{default:De(()=>[v.value?(R(),V("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:fe[1]||(fe[1]=C=>S.value=!1)},[(R(!0),V(Oe,null,Ze(T.value,(C,O)=>(R(),V("div",{key:O,class:"dp__calendar_row",role:"row"},[W.weekNumbers?(R(),V("div",aB,[g("div",lB,we(L(C.days)),1)])):ce("",!0),(R(!0),V(Oe,null,Ze(C.days,(K,U)=>{var re,j,se;return R(),V("div",{id:J(oS)(K.value),ref_for:!0,ref:Q=>I(Q,O,U),key:U+O,role:"gridcell",class:"dp__calendar_item","aria-pressed":(K.classData.dp__active_date||K.classData.dp__range_start||K.classData.dp__range_start)??void 0,"aria-disabled":K.classData.dp__cell_disabled||void 0,"aria-label":(j=(re=J(l))==null?void 0:re.day)==null?void 0:j.call(re,K),tabindex:!K.current&&W.hideOffsetDates?void 0:0,"data-test":K.value,onClick:ru(Q=>ae(Q,K),["prevent"]),onTouchend:Q=>ae(Q,K,!1),onKeydown:Q=>J(ii)(Q,()=>W.$emit("select-date",K)),onMouseenter:Q=>X(K,O,U),onMouseleave:Q=>Z(K),onMousedown:Q=>ve(K),onMouseup:fe[0]||(fe[0]=Q=>S.value=!1)},[g("div",{class:Pe(["dp__cell_inner",K.classData])},[W.$slots.day&&F.value(K)?Ne(W.$slots,"day",{key:0,day:+K.text,date:K.value}):ce("",!0),W.$slots.day?ce("",!0):(R(),V(Oe,{key:1},[Ue(we(K.text),1)],64)),K.marker&&F.value(K)?(R(),V(Oe,{key:2},[W.$slots.marker?Ne(W.$slots,"marker",{key:0,marker:K.marker,day:+K.text,date:K.value}):(R(),V("div",{key:1,class:Pe(Y.value(K.marker)),style:Pn(K.marker.color?{backgroundColor:K.marker.color}:{})},null,6))],64)):ce("",!0),ne.value(K.value)?(R(),V("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:E,class:"dp__marker_tooltip",style:Pn(p.value)},[(se=K.marker)!=null&&se.tooltip?(R(),V("div",{key:0,class:"dp__tooltip_content",onClick:de},[(R(!0),V(Oe,null,Ze(K.marker.tooltip,(Q,ge)=>(R(),V("div",{key:ge,class:"dp__tooltip_text"},[W.$slots["marker-tooltip"]?Ne(W.$slots,"marker-tooltip",{key:0,tooltip:Q,day:K.value}):ce("",!0),W.$slots["marker-tooltip"]?ce("",!0):(R(),V(Oe,{key:1},[g("div",{class:"dp__tooltip_mark",style:Pn(Q.color?{backgroundColor:Q.color}:{})},null,4),g("div",null,we(Q.text),1)],64))]))),128)),g("div",{class:"dp__arrow_bottom_tp",style:Pn(w.value)},null,4)])):ce("",!0)],4)):ce("",!0)],2)],40,cB)}),128))]))),128))],32)):ce("",!0)]),_:3},8,["name","css"])],2)],2))}}),mb=t=>Array.isArray(t),dB=(t,e,n,i)=>{const s=xe([]),r=xe(new Date),o=xe(),a=()=>H(t.isTextInputDate),{modelValue:l,calendars:c,time:u,today:d}=Wu(t,e,a),{defaultedMultiCalendars:h,defaultedStartTime:f,defaultedRange:p,defaultedConfig:m,defaultedTz:y,propDates:v,defaultedMultiDates:b}=jt(t),{validateMonthYearInRange:x,isDisabled:E,isDateRangeAllowed:w,checkMinMaxRange:S}=yo(t),{updateTimeValues:T,getSetDateTime:A,setTime:k,assignStartTime:P,validateTime:B,disabledTimesConfig:Y}=fS(t,u,l,i),ne=be(()=>oe=>c.value[oe]?c.value[oe].month:0),$=be(()=>oe=>c.value[oe]?c.value[oe].year:0),F=oe=>!m.value.keepViewOnOffsetClick||oe?!0:!o.value,D=(oe,Te,he,Ae=!1)=>{var Le,Ut;F(Ae)&&(c.value[oe]||(c.value[oe]={month:0,year:0}),c.value[oe].month=ub(Te)?(Le=c.value[oe])==null?void 0:Le.month:Te,c.value[oe].year=ub(he)?(Ut=c.value[oe])==null?void 0:Ut.year:he)},z=()=>{t.autoApply&&e("select-date")};En(()=>{t.shadow||(l.value||(W(),f.value&&P(f.value)),H(!0),t.focusStartDate&&t.startDate&&W())});const X=be(()=>{var oe;return(oe=t.flow)!=null&&oe.length&&!t.partialFlow?t.flowStep===t.flow.length:!0}),Z=()=>{t.autoApply&&X.value&&e("auto-apply",t.partialFlow?t.flowStep!==t.flow.length:!1)},H=(oe=!1)=>{if(l.value)return Array.isArray(l.value)?(s.value=l.value,L(oe)):te(l.value,oe);if(h.value.count&&oe&&!t.startDate)return ie(Ce(),oe)},le=()=>Array.isArray(l.value)&&p.value.enabled?at(l.value[0])===at(l.value[1]??l.value[0]):!1,ie=(oe=new Date,Te=!1)=>{if((!h.value.count||!h.value.static||Te)&&D(0,at(oe),Xe(oe)),h.value.count&&(!h.value.solo||!l.value||le()))for(let he=1;he{ie(oe),k("hours",yr(oe)),k("minutes",ao(oe)),k("seconds",Sl(oe)),h.value.count&&Te&&ve()},I=oe=>{if(h.value.count){if(h.value.solo)return 0;const Te=at(oe[0]),he=at(oe[1]);return Math.abs(he-Te){oe[1]&&p.value.showLastInRange?ie(oe[I(oe)],Te):ie(oe[0],Te);const he=(Ae,Le)=>[Ae(oe[0]),oe[1]?Ae(oe[1]):u[Le][1]];k("hours",he(yr,"hours")),k("minutes",he(ao,"minutes")),k("seconds",he(Sl,"seconds"))},ue=(oe,Te)=>{if((p.value.enabled||t.weekPicker)&&!b.value.enabled)return ee(oe,Te);if(b.value.enabled&&Te){const he=oe[oe.length-1];return te(he,Te)}},L=oe=>{const Te=l.value;ue(Te,oe),h.value.count&&h.value.solo&&ve()},ae=(oe,Te)=>{const he=Pt(Ce(),{month:ne.value(Te),year:$.value(Te)}),Ae=oe<0?ds(he,1):Al(he,1);x(at(Ae),Xe(Ae),oe<0,t.preventMinMaxNavigation)&&(D(Te,at(Ae),Xe(Ae)),e("update-month-year",{instance:Te,month:at(Ae),year:Xe(Ae)}),h.value.count&&!h.value.solo&&de(Te),n())},de=oe=>{for(let Te=oe-1;Te>=0;Te--){const he=Al(Pt(Ce(),{month:ne.value(Te+1),year:$.value(Te+1)}),1);D(Te,at(he),Xe(he))}for(let Te=oe+1;Te<=h.value.count-1;Te++){const he=ds(Pt(Ce(),{month:ne.value(Te-1),year:$.value(Te-1)}),1);D(Te,at(he),Xe(he))}},ve=()=>{if(Array.isArray(l.value)&&l.value.length===2){const oe=Ce(Ce(l.value[1]?l.value[1]:ds(l.value[0],1))),[Te,he]=[at(l.value[0]),Xe(l.value[0])],[Ae,Le]=[at(l.value[1]),Xe(l.value[1])];(Te!==Ae||Te===Ae&&he!==Le)&&h.value.solo&&D(1,at(oe),Xe(oe))}else l.value&&!Array.isArray(l.value)&&(D(0,at(l.value),Xe(l.value)),ie(Ce()))},W=()=>{t.startDate&&(D(0,at(Ce(t.startDate)),Xe(Ce(t.startDate))),h.value.count&&de(0))},fe=(oe,Te)=>{if(t.monthChangeOnScroll){const he=new Date().getTime()-r.value.getTime(),Ae=Math.abs(oe.deltaY);let Le=500;Ae>1&&(Le=100),Ae>100&&(Le=0),he>Le&&(r.value=new Date,ae(t.monthChangeOnScroll!=="inverse"?-oe.deltaY:oe.deltaY,Te))}},C=(oe,Te,he=!1)=>{t.monthChangeOnArrows&&t.vertical===he&&O(oe,Te)},O=(oe,Te)=>{ae(oe==="right"?-1:1,Te)},K=oe=>{if(v.value.markers)return Eh(oe.value,v.value.markers)},U=(oe,Te)=>{switch(t.sixWeeks===!0?"append":t.sixWeeks){case"prepend":return[!0,!1];case"center":return[oe==0,!0];case"fair":return[oe==0||Te>oe,!0];case"append":return[!1,!1];default:return[!1,!1]}},re=(oe,Te,he,Ae)=>{if(t.sixWeeks&&oe.length<6){const Le=6-oe.length,Ut=(Te.getDay()+7-Ae)%7,gn=6-(he.getDay()+7-Ae)%7,[Ri,Ws]=U(Ut,gn);for(let pn=1;pn<=Le;pn++)if(Ws?!!(pn%2)==Ri:Ri){const Cn=oe[0].days[0],Sn=j(ss(Cn.value,-7),at(Te));oe.unshift({days:Sn})}else{const Cn=oe[oe.length-1],Sn=Cn.days[Cn.days.length-1],ai=j(ss(Sn.value,1),at(Te));oe.push({days:ai})}}return oe},j=(oe,Te)=>{const he=Ce(oe),Ae=[];for(let Le=0;Le<7;Le++){const Ut=ss(he,Le),gn=at(Ut)!==Te;Ae.push({text:t.hideOffsetDates&&gn?"":Ut.getDate(),value:Ut,current:!gn,classData:{}})}return Ae},se=(oe,Te)=>{const he=[],Ae=new Date(Te,oe),Le=new Date(Te,oe+1,0),Ut=t.weekStart,gn=ps(Ae,{weekStartsOn:Ut}),Ri=Ws=>{const pn=j(Ws,oe);if(he.push({days:pn}),!he[he.length-1].days.some(Cn=>ct(oi(Cn.value),oi(Le)))){const Cn=ss(Ws,7);Ri(Cn)}};return Ri(gn),re(he,Ae,Le,Ut)},Q=oe=>{const Te=to(Ce(oe.value),u.hours,u.minutes,ze());e("date-update",Te),b.value.enabled?N_(Te,l,b.value.limit):l.value=Te,i(),Rn().then(()=>{Z()})},ge=oe=>p.value.noDisabledRange?tS(s.value[0],oe).some(Te=>E(Te)):!1,_e=()=>{s.value=l.value?l.value.slice():[],s.value.length===2&&!(p.value.fixedStart||p.value.fixedEnd)&&(s.value=[])},ye=(oe,Te)=>{const he=[Ce(oe.value),ss(Ce(oe.value),+p.value.autoRange)];w(he)?(Te&&ke(oe.value),s.value=he):e("invalid-date",oe.value)},ke=oe=>{const Te=at(Ce(oe)),he=Xe(Ce(oe));if(D(0,Te,he),h.value.count>0)for(let Ae=1;Ae{if(ge(oe.value)||!S(oe.value,l.value,p.value.fixedStart?0:1))return e("invalid-date",oe.value);s.value=uS(Ce(oe.value),l,e,p)},Be=(oe,Te)=>{if(_e(),p.value.autoRange)return ye(oe,Te);if(p.value.fixedStart||p.value.fixedEnd)return Me(oe);s.value[0]?S(Ce(oe.value),l.value)&&!ge(oe.value)?Qt(Ce(oe.value),Ce(s.value[0]))?(s.value.unshift(Ce(oe.value)),e("range-end",s.value[0])):(s.value[1]=Ce(oe.value),e("range-end",s.value[1])):(t.autoApply&&e("auto-apply-invalid",oe.value),e("invalid-date",oe.value)):(s.value[0]=Ce(oe.value),e("range-start",s.value[0]))},ze=(oe=!0)=>t.enableSeconds?Array.isArray(u.seconds)?oe?u.seconds[0]:u.seconds[1]:u.seconds:0,nt=oe=>{s.value[oe]=to(s.value[oe],u.hours[oe],u.minutes[oe],ze(oe!==1))},Qe=()=>{var oe,Te;s.value[0]&&s.value[1]&&+((oe=s.value)==null?void 0:oe[0])>+((Te=s.value)==null?void 0:Te[1])&&(s.value.reverse(),e("range-start",s.value[0]),e("range-end",s.value[1]))},qt=()=>{s.value.length&&(s.value[0]&&!s.value[1]?nt(0):(nt(0),nt(1),i()),Qe(),l.value=s.value.slice(),xf(s.value,e,t.autoApply,t.modelAuto))},Bt=(oe,Te=!1)=>{if(E(oe.value)||!oe.current&&t.hideOffsetDates)return e("invalid-date",oe.value);if(o.value=JSON.parse(JSON.stringify(oe)),!p.value.enabled)return Q(oe);mb(u.hours)&&mb(u.minutes)&&!b.value.enabled&&(Be(oe,Te),qt())},fn=(oe,Te)=>{var he;D(oe,Te.month,Te.year,!0),h.value.count&&!h.value.solo&&de(oe),e("update-month-year",{instance:oe,month:Te.month,year:Te.year}),n(h.value.solo?oe:void 0);const Ae=(he=t.flow)!=null&&he.length?t.flow[t.flowStep]:void 0;!Te.fromNav&&(Ae===Yn.month||Ae===Yn.year)&&i()},Kt=(oe,Te)=>{cS({value:oe,modelValue:l,range:p.value.enabled,timezone:Te?void 0:y.value.timezone}),z(),t.multiCalendars&&Rn().then(()=>H(!0))},Ei=()=>{const oe=D_(Ce(),y.value);p.value.enabled?l.value&&Array.isArray(l.value)&&l.value[0]?l.value=Qt(oe,l.value[0])?[oe,l.value[0]]:[l.value[0],oe]:l.value=[oe]:l.value=oe,z()},Xi=()=>{if(Array.isArray(l.value))if(b.value.enabled){const oe=Zt();l.value[l.value.length-1]=A(oe)}else l.value=l.value.map((oe,Te)=>oe&&A(oe,Te));else l.value=A(l.value);e("time-update")},Zt=()=>Array.isArray(l.value)&&l.value.length?l.value[l.value.length-1]:null;return{calendars:c,modelValue:l,month:ne,year:$,time:u,disabledTimesConfig:Y,today:d,validateTime:B,getCalendarDays:se,getMarker:K,handleScroll:fe,handleSwipe:O,handleArrow:C,selectDate:Bt,updateMonthYear:fn,presetDate:Kt,selectCurrentDate:Ei,updateTime:(oe,Te=!0,he=!1)=>{T(oe,Te,he,Xi)},assignMonthAndYear:ie}},hB={key:0},fB=hn({__name:"DatePicker",props:{..._s},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=t,{calendars:r,month:o,year:a,modelValue:l,time:c,disabledTimesConfig:u,today:d,validateTime:h,getCalendarDays:f,getMarker:p,handleArrow:m,handleScroll:y,handleSwipe:v,selectDate:b,updateMonthYear:x,presetDate:E,selectCurrentDate:w,updateTime:S,assignMonthAndYear:T}=dB(s,i,le,ie),A=_a(),{setHoverDate:k,getDayClassData:P,clearHoverDate:B}=kB(l,s),{defaultedMultiCalendars:Y}=jt(s),ne=xe([]),$=xe([]),F=xe(null),D=ki(A,"calendar"),z=ki(A,"monthYear"),X=ki(A,"timePicker"),Z=fe=>{s.shadow||i("mount",fe)};un(r,()=>{s.shadow||setTimeout(()=>{i("recalculate-position")},0)},{deep:!0}),un(Y,(fe,C)=>{fe.count-C.count>0&&T()},{deep:!0});const H=be(()=>fe=>f(o.value(fe),a.value(fe)).map(C=>({...C,days:C.days.map(O=>(O.marker=p(O),O.classData=P(O),O))})));function le(fe){var C;fe||fe===0?(C=$.value[fe])==null||C.triggerTransition(o.value(fe),a.value(fe)):$.value.forEach((O,K)=>O.triggerTransition(o.value(K),a.value(K)))}function ie(){i("update-flow-step")}const te=(fe,C=!1)=>{b(fe,C),s.spaceConfirm&&i("select-date")},I=(fe,C,O=0)=>{var K;(K=ne.value[O])==null||K.toggleMonthPicker(fe,C)},ee=(fe,C,O=0)=>{var K;(K=ne.value[O])==null||K.toggleYearPicker(fe,C)},ue=(fe,C,O)=>{var K;(K=F.value)==null||K.toggleTimePicker(fe,C,O)},L=(fe,C)=>{var O;if(!s.range){const K=l.value?l.value:d,U=C?new Date(C):K,re=fe?ps(U,{weekStartsOn:1}):OC(U,{weekStartsOn:1});b({value:re,current:at(U)===o.value(0),text:"",classData:{}}),(O=document.getElementById(oS(re)))==null||O.focus()}},ae=fe=>{var C;(C=ne.value[0])==null||C.handleMonthYearChange(fe,!0)},de=fe=>{x(0,{month:o.value(0),year:a.value(0)+(fe?1:-1),fromNav:!0})},ve=(fe,C)=>{fe===Yn.time&&i(`time-picker-${C?"open":"close"}`),i("overlay-toggle",{open:C,overlay:fe})},W=fe=>{i("overlay-toggle",{open:!1,overlay:fe}),i("focus-menu")};return e({clearHoverDate:B,presetDate:E,selectCurrentDate:w,toggleMonthPicker:I,toggleYearPicker:ee,toggleTimePicker:ue,handleArrow:m,updateMonthYear:x,getSidebarProps:()=>({modelValue:l,month:o,year:a,time:c,updateTime:S,updateMonthYear:x,selectDate:b,presetDate:E}),changeMonth:ae,changeYear:de,selectWeekDate:L}),(fe,C)=>(R(),V(Oe,null,[N(wf,{"multi-calendars":J(Y).count,collapse:fe.collapse},{default:De(({instance:O,index:K})=>[fe.disableMonthYearSelect?ce("",!0):(R(),Se(iB,wn({key:0,ref:U=>{U&&(ne.value[K]=U)},months:J(XC)(fe.formatLocale,fe.locale,fe.monthNameFormat),years:J(R_)(fe.yearRange,fe.locale,fe.reverseYears),month:J(o)(O),year:J(a)(O),instance:O},fe.$props,{onMount:C[0]||(C[0]=U=>Z(J(ta).header)),onResetFlow:C[1]||(C[1]=U=>fe.$emit("reset-flow")),onUpdateMonthYear:U=>J(x)(O,U),onOverlayClosed:W,onOverlayOpened:C[2]||(C[2]=U=>fe.$emit("overlay-toggle",{open:!0,overlay:U}))}),Un({_:2},[Ze(J(z),(U,re)=>({name:U,fn:De(j=>[Ne(fe.$slots,U,In(ni(j)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),N(uB,wn({ref:U=>{U&&($.value[K]=U)},"mapped-dates":H.value(O),month:J(o)(O),year:J(a)(O),instance:O},fe.$props,{onSelectDate:U=>J(b)(U,O!==1),onHandleSpace:U=>te(U,O!==1),onSetHoverDate:C[3]||(C[3]=U=>J(k)(U)),onHandleScroll:U=>J(y)(U,O),onHandleSwipe:U=>J(v)(U,O),onMount:C[4]||(C[4]=U=>Z(J(ta).calendar)),onResetFlow:C[5]||(C[5]=U=>fe.$emit("reset-flow")),onTooltipOpen:C[6]||(C[6]=U=>fe.$emit("tooltip-open",U)),onTooltipClose:C[7]||(C[7]=U=>fe.$emit("tooltip-close",U))}),Un({_:2},[Ze(J(D),(U,re)=>({name:U,fn:De(j=>[Ne(fe.$slots,U,In(ni({...j})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),fe.enableTimePicker?(R(),V("div",hB,[fe.$slots["time-picker"]?Ne(fe.$slots,"time-picker",In(wn({key:0},{time:J(c),updateTime:J(S)}))):(R(),Se(hS,wn({key:1,ref_key:"timePickerRef",ref:F},fe.$props,{hours:J(c).hours,minutes:J(c).minutes,seconds:J(c).seconds,"internal-model-value":fe.internalModelValue,"disabled-times-config":J(u),"validate-time":J(h),onMount:C[8]||(C[8]=O=>Z(J(ta).timePicker)),"onUpdate:hours":C[9]||(C[9]=O=>J(S)(O)),"onUpdate:minutes":C[10]||(C[10]=O=>J(S)(O,!1)),"onUpdate:seconds":C[11]||(C[11]=O=>J(S)(O,!1,!0)),onResetFlow:C[12]||(C[12]=O=>fe.$emit("reset-flow")),onOverlayClosed:C[13]||(C[13]=O=>ve(O,!1)),onOverlayOpened:C[14]||(C[14]=O=>ve(O,!0)),onAmPmChange:C[15]||(C[15]=O=>fe.$emit("am-pm-change",O))}),Un({_:2},[Ze(J(X),(O,K)=>({name:O,fn:De(U=>[Ne(fe.$slots,O,In(ni(U)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):ce("",!0)],64))}}),gB=(t,e)=>{const n=xe(),{defaultedMultiCalendars:i,defaultedConfig:s,defaultedHighlight:r,defaultedRange:o,propDates:a,defaultedFilters:l,defaultedMultiDates:c}=jt(t),{modelValue:u,year:d,month:h,calendars:f}=Wu(t,e),{isDisabled:p}=yo(t),{selectYear:m,groupedYears:y,showYearPicker:v,isDisabled:b,toggleYearPicker:x,handleYearSelect:E,handleYear:w}=dS({modelValue:u,multiCalendars:i,range:o,highlight:r,calendars:f,propDates:a,month:h,year:d,filters:l,props:t,emit:e}),S=(F,D)=>[F,D].map(z=>Os(z,"MMMM",{locale:t.formatLocale})).join("-"),T=be(()=>F=>u.value?Array.isArray(u.value)?u.value.some(D=>ab(F,D)):ab(u.value,F):!1),A=F=>{if(o.value.enabled){if(Array.isArray(u.value)){const D=ct(F,u.value[0])||ct(F,u.value[1]);return vf(u.value,n.value,F)&&!D}return!1}return!1},k=(F,D)=>F.quarter===tb(D)&&F.year===Xe(D),P=F=>typeof r.value=="function"?r.value({quarter:tb(F),year:Xe(F)}):!!r.value.quarters.find(D=>k(D,F)),B=be(()=>F=>{const D=Pt(new Date,{year:d.value(F)});return G3({start:lu(D),end:LC(D)}).map(z=>{const X=Uo(z),Z=nb(z),H=p(z),le=A(X),ie=P(X);return{text:S(X,Z),value:X,active:T.value(X),highlighted:ie,disabled:H,isBetween:le}})}),Y=F=>{N_(F,u,c.value.limit),e("auto-apply",!0)},ne=F=>{u.value=F_(u,F,e),xf(u.value,e,t.autoApply,t.modelAuto)},$=F=>{u.value=F,e("auto-apply")};return{defaultedConfig:s,defaultedMultiCalendars:i,groupedYears:y,year:d,isDisabled:b,quarters:B,showYearPicker:v,modelValue:u,setHoverDate:F=>{n.value=F},selectYear:m,selectQuarter:(F,D,z)=>{if(!z)return f.value[D].month=at(nb(F)),c.value.enabled?Y(F):o.value.enabled?ne(F):$(F)},toggleYearPicker:x,handleYearSelect:E,handleYear:w}},pB={class:"dp--quarter-items"},mB=["data-test","disabled","onClick","onMouseover"],_B=hn({compatConfig:{MODE:3},__name:"QuarterPicker",props:{..._s},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=_a(),o=ki(r,"yearMode"),{defaultedMultiCalendars:a,defaultedConfig:l,groupedYears:c,year:u,isDisabled:d,quarters:h,modelValue:f,showYearPicker:p,setHoverDate:m,selectQuarter:y,toggleYearPicker:v,handleYearSelect:b,handleYear:x}=gB(s,i);return e({getSidebarProps:()=>({modelValue:f,year:u,selectQuarter:y,handleYearSelect:b,handleYear:x})}),(E,w)=>(R(),Se(wf,{"multi-calendars":J(a).count,collapse:E.collapse,stretch:""},{default:De(({instance:S})=>[g("div",{class:"dp-quarter-picker-wrap",style:Pn({minHeight:`${J(l).modeHeight}px`})},[E.$slots["top-extra"]?Ne(E.$slots,"top-extra",{key:0,value:E.internalModelValue}):ce("",!0),g("div",null,[N(lS,wn(E.$props,{items:J(c)(S),instance:S,"show-year-picker":J(p)[S],year:J(u)(S),"is-disabled":T=>J(d)(S,T),onHandleYear:T=>J(x)(S,T),onYearSelect:T=>J(b)(T,S),onToggleYearPicker:T=>J(v)(S,T?.flow,T?.show)}),Un({_:2},[Ze(J(o),(T,A)=>({name:T,fn:De(k=>[Ne(E.$slots,T,In(ni(k)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),g("div",pB,[(R(!0),V(Oe,null,Ze(J(h)(S),(T,A)=>(R(),V("div",{key:A},[g("button",{type:"button",class:Pe(["dp--qr-btn",{"dp--qr-btn-active":T.active,"dp--qr-btn-between":T.isBetween,"dp--qr-btn-disabled":T.disabled,"dp--highlighted":T.highlighted}]),"data-test":T.value,disabled:T.disabled,onClick:k=>J(y)(T.value,S,T.disabled),onMouseover:k=>J(m)(T.value)},[E.$slots.quarter?Ne(E.$slots,"quarter",{key:0,value:T.value,text:T.text}):(R(),V(Oe,{key:1},[Ue(we(T.text),1)],64))],42,mB)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),yB=["id","tabindex","role","aria-label"],vB={key:0,class:"dp--menu-load-container"},bB={key:1,class:"dp--menu-header"},wB={key:0,class:"dp__sidebar_left"},xB=["data-test","onClick","onKeydown"],EB={key:2,class:"dp__sidebar_right"},CB={key:3,class:"dp__action_extra"},_b=hn({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...bf,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=xe(null),o=be(()=>{const{openOnTop:j,...se}=s;return{...se,flowStep:k.value,collapse:s.collapse,noOverlayFocus:s.noOverlayFocus,menuWrapRef:r.value}}),{setMenuFocused:a,setShiftKey:l,control:c}=aS(),u=_a(),{defaultedTextInput:d,defaultedInline:h,defaultedConfig:f,defaultedUI:p}=jt(s),m=xe(null),y=xe(0),v=xe(null),b=xe(!1),x=xe(null);En(()=>{if(!s.shadow){b.value=!0,E(),window.addEventListener("resize",E);const j=vn(r);if(j&&!d.value.enabled&&!h.value.enabled&&(a(!0),D()),j){const se=Q=>{f.value.allowPreventDefault&&Q.preventDefault(),eo(Q,f.value,!0)};j.addEventListener("pointerdown",se),j.addEventListener("mousedown",se)}}}),pa(()=>{window.removeEventListener("resize",E)});const E=()=>{const j=vn(v);j&&(y.value=j.getBoundingClientRect().width)},{arrowRight:w,arrowLeft:S,arrowDown:T,arrowUp:A}=_o(),{flowStep:k,updateFlowStep:P,childMount:B,resetFlow:Y,handleFlow:ne}=MB(s,i,x),$=be(()=>s.monthPicker?$4:s.yearPicker?F4:s.timePicker?Z4:s.quarterPicker?_B:fB),F=be(()=>{var j;if(f.value.arrowLeft)return f.value.arrowLeft;const se=(j=r.value)==null?void 0:j.getBoundingClientRect(),Q=s.getInputRect();return Q?.width=(se?.right??0)&&Q?.width{const j=vn(r);j&&j.focus({preventScroll:!0})},z=be(()=>{var j;return((j=x.value)==null?void 0:j.getSidebarProps())||{}}),X=()=>{s.openOnTop&&i("recalculate-position")},Z=ki(u,"action"),H=be(()=>s.monthPicker||s.yearPicker?ki(u,"monthYear"):s.timePicker?ki(u,"timePicker"):ki(u,"shared")),le=be(()=>s.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),ie=be(()=>({dp__menu_disabled:s.disabled,dp__menu_readonly:s.readonly,"dp-menu-loading":s.loading})),te=be(()=>({dp__menu:!0,dp__menu_index:!h.value.enabled,dp__relative:h.value.enabled,...p.value.menu??{}})),I=j=>{eo(j,f.value,!0)},ee=()=>{s.escClose&&i("close-picker")},ue=j=>{if(s.arrowNavigation){if(j===Jn.up)return A();if(j===Jn.down)return T();if(j===Jn.left)return S();if(j===Jn.right)return w()}else j===Jn.left||j===Jn.up?W("handleArrow",Jn.left,0,j===Jn.up):W("handleArrow",Jn.right,0,j===Jn.down)},L=j=>{l(j.shiftKey),!s.disableMonthYearSelect&&j.code===Ot.tab&&j.target.classList.contains("dp__menu")&&c.value.shiftKeyInMenu&&(j.preventDefault(),eo(j,f.value,!0),i("close-picker"))},ae=()=>{D(),i("time-picker-close")},de=j=>{var se,Q,ge;(se=x.value)==null||se.toggleTimePicker(!1,!1),(Q=x.value)==null||Q.toggleMonthPicker(!1,!1,j),(ge=x.value)==null||ge.toggleYearPicker(!1,!1,j)},ve=(j,se=0)=>{var Q,ge,_e;return j==="month"?(Q=x.value)==null?void 0:Q.toggleMonthPicker(!1,!0,se):j==="year"?(ge=x.value)==null?void 0:ge.toggleYearPicker(!1,!0,se):j==="time"?(_e=x.value)==null?void 0:_e.toggleTimePicker(!0,!1):de(se)},W=(j,...se)=>{var Q,ge;(Q=x.value)!=null&&Q[j]&&((ge=x.value)==null||ge[j](...se))},fe=()=>{W("selectCurrentDate")},C=(j,se)=>{W("presetDate",j,se)},O=()=>{W("clearHoverDate")},K=(j,se)=>{W("updateMonthYear",j,se)},U=(j,se)=>{j.preventDefault(),ue(se)},re=j=>{var se,Q,ge;if(L(j),j.key===Ot.home||j.key===Ot.end)return W("selectWeekDate",j.key===Ot.home,j.target.getAttribute("id"));switch((j.key===Ot.pageUp||j.key===Ot.pageDown)&&(j.shiftKey?(W("changeYear",j.key===Ot.pageUp),(se=em(r.value,"overlay-year"))==null||se.focus()):(W("changeMonth",j.key===Ot.pageUp),(Q=em(r.value,j.key===Ot.pageUp?"action-prev":"action-next"))==null||Q.focus()),j.target.getAttribute("id")&&((ge=r.value)==null||ge.focus({preventScroll:!0}))),j.key){case Ot.esc:return ee();case Ot.arrowLeft:return U(j,Jn.left);case Ot.arrowRight:return U(j,Jn.right);case Ot.arrowUp:return U(j,Jn.up);case Ot.arrowDown:return U(j,Jn.down);default:return}};return e({updateMonthYear:K,switchView:ve,handleFlow:ne}),(j,se)=>{var Q,ge,_e;return R(),V("div",{id:j.uid?`dp-menu-${j.uid}`:void 0,ref_key:"dpMenuRef",ref:r,tabindex:J(h).enabled?void 0:"0",role:J(h).enabled?void 0:"dialog","aria-label":(Q=j.ariaLabels)==null?void 0:Q.menu,class:Pe(te.value),style:Pn({"--dp-arrow-left":F.value}),onMouseleave:O,onClick:I,onKeydown:re},[(j.disabled||j.readonly)&&J(h).enabled||j.loading?(R(),V("div",{key:0,class:Pe(ie.value)},[j.loading?(R(),V("div",vB,se[19]||(se[19]=[g("span",{class:"dp--menu-loader"},null,-1)]))):ce("",!0)],2)):ce("",!0),j.$slots["menu-header"]?(R(),V("div",bB,[Ne(j.$slots,"menu-header")])):ce("",!0),!J(h).enabled&&!j.teleportCenter?(R(),V("div",{key:2,class:Pe(le.value)},null,2)):ce("",!0),g("div",{ref_key:"innerMenuRef",ref:v,class:Pe({dp__menu_content_wrapper:((ge=j.presetDates)==null?void 0:ge.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":t.collapse&&(((_e=j.presetDates)==null?void 0:_e.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"])}),style:Pn({"--dp-menu-width":`${y.value}px`})},[j.$slots["left-sidebar"]?(R(),V("div",wB,[Ne(j.$slots,"left-sidebar",In(ni(z.value)))])):ce("",!0),j.presetDates.length?(R(),V("div",{key:1,class:Pe({"dp--preset-dates-collapsed":t.collapse,"dp--preset-dates":!0})},[(R(!0),V(Oe,null,Ze(j.presetDates,(ye,ke)=>(R(),V(Oe,{key:ke},[ye.slot?Ne(j.$slots,ye.slot,{key:0,presetDate:C,label:ye.label,value:ye.value}):(R(),V("button",{key:1,type:"button",style:Pn(ye.style||{}),class:Pe(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":t.collapse}]),"data-test":ye.testId??void 0,onClick:ru(Me=>C(ye.value,ye.noTz),["prevent"]),onKeydown:Me=>J(ii)(Me,()=>C(ye.value,ye.noTz),!0)},we(ye.label),47,xB))],64))),128))],2)):ce("",!0),g("div",{ref_key:"calendarWrapperRef",ref:m,class:"dp__instance_calendar",role:"document"},[(R(),Se(ma($.value),wn({ref_key:"dynCmpRef",ref:x},o.value,{"flow-step":J(k),onMount:J(B),onUpdateFlowStep:J(P),onResetFlow:J(Y),onFocusMenu:D,onSelectDate:se[0]||(se[0]=ye=>j.$emit("select-date")),onDateUpdate:se[1]||(se[1]=ye=>j.$emit("date-update",ye)),onTooltipOpen:se[2]||(se[2]=ye=>j.$emit("tooltip-open",ye)),onTooltipClose:se[3]||(se[3]=ye=>j.$emit("tooltip-close",ye)),onAutoApply:se[4]||(se[4]=ye=>j.$emit("auto-apply",ye)),onRangeStart:se[5]||(se[5]=ye=>j.$emit("range-start",ye)),onRangeEnd:se[6]||(se[6]=ye=>j.$emit("range-end",ye)),onInvalidFixedRange:se[7]||(se[7]=ye=>j.$emit("invalid-fixed-range",ye)),onTimeUpdate:se[8]||(se[8]=ye=>j.$emit("time-update")),onAmPmChange:se[9]||(se[9]=ye=>j.$emit("am-pm-change",ye)),onTimePickerOpen:se[10]||(se[10]=ye=>j.$emit("time-picker-open",ye)),onTimePickerClose:ae,onRecalculatePosition:X,onUpdateMonthYear:se[11]||(se[11]=ye=>j.$emit("update-month-year",ye)),onAutoApplyInvalid:se[12]||(se[12]=ye=>j.$emit("auto-apply-invalid",ye)),onInvalidDate:se[13]||(se[13]=ye=>j.$emit("invalid-date",ye)),onOverlayToggle:se[14]||(se[14]=ye=>j.$emit("overlay-toggle",ye)),"onUpdate:internalModelValue":se[15]||(se[15]=ye=>j.$emit("update:internal-model-value",ye))}),Un({_:2},[Ze(H.value,(ye,ke)=>({name:ye,fn:De(Me=>[Ne(j.$slots,ye,In(ni({...Me})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),j.$slots["right-sidebar"]?(R(),V("div",EB,[Ne(j.$slots,"right-sidebar",In(ni(z.value)))])):ce("",!0),j.$slots["action-extra"]?(R(),V("div",CB,[j.$slots["action-extra"]?Ne(j.$slots,"action-extra",{key:0,selectCurrentDate:fe}):ce("",!0)])):ce("",!0)],6),!j.autoApply||J(f).keepActionRow?(R(),Se(k4,wn({key:3,"menu-mount":b.value},o.value,{"calendar-width":y.value,onClosePicker:se[16]||(se[16]=ye=>j.$emit("close-picker")),onSelectDate:se[17]||(se[17]=ye=>j.$emit("select-date")),onInvalidSelect:se[18]||(se[18]=ye=>j.$emit("invalid-select")),onSelectNow:fe}),Un({_:2},[Ze(J(Z),(ye,ke)=>({name:ye,fn:De(Me=>[Ne(j.$slots,ye,In(ni({...Me})))])}))]),1040,["menu-mount","calendar-width"])):ce("",!0)],46,yB)}}});var Xa=(t=>(t.center="center",t.left="left",t.right="right",t))(Xa||{});const SB=({menuRef:t,menuRefInner:e,inputRef:n,pickerWrapperRef:i,inline:s,emit:r,props:o,slots:a})=>{const{defaultedConfig:l}=jt(o),c=xe({}),u=xe(!1),d=xe({top:"0",left:"0"}),h=xe(!1),f=tu(o,"teleportCenter");un(f,()=>{d.value=JSON.parse(JSON.stringify({})),w()});const p=D=>{if(o.teleport){const z=D.getBoundingClientRect();return{left:z.left+window.scrollX,top:z.top+window.scrollY}}return{top:0,left:0}},m=(D,z)=>{d.value.left=`${D+z-c.value.width}px`},y=D=>{d.value.left=`${D}px`},v=(D,z)=>{o.position===Xa.left&&y(D),o.position===Xa.right&&m(D,z),o.position===Xa.center&&(d.value.left=`${D+z/2-c.value.width/2}px`)},b=D=>{const{width:z,height:X}=D.getBoundingClientRect(),{top:Z,left:H}=o.altPosition?o.altPosition(D):p(D);return{top:+Z,left:+H,width:z,height:X}},x=()=>{d.value.left="50%",d.value.top="50%",d.value.transform="translate(-50%, -50%)",d.value.position="fixed",delete d.value.opacity},E=()=>{const D=vn(n),{top:z,left:X,transform:Z}=o.altPosition(D);d.value={top:`${z}px`,left:`${X}px`,transform:Z??""}},w=(D=!0)=>{var z;if(!s.value.enabled){if(f.value)return x();if(o.altPosition!==null)return E();if(D){const X=o.teleport?(z=e.value)==null?void 0:z.$el:t.value;X&&(c.value=X.getBoundingClientRect()),r("recalculate-position")}return Y()}},S=({inputEl:D,left:z,width:X})=>{window.screen.width>768&&!u.value&&v(z,X),k(D)},T=D=>{const{top:z,left:X,height:Z,width:H}=b(D);d.value.top=`${Z+z+ +o.offset}px`,h.value=!1,u.value||(d.value.left=`${X+H/2-c.value.width/2}px`),S({inputEl:D,left:X,width:H})},A=D=>{const{top:z,left:X,width:Z}=b(D);d.value.top=`${z-+o.offset-c.value.height}px`,h.value=!0,S({inputEl:D,left:X,width:Z})},k=D=>{if(o.autoPosition){const{left:z,width:X}=b(D),{left:Z,right:H}=c.value;if(!u.value){if(Math.abs(Z)!==Math.abs(H)){if(Z<=0)return u.value=!0,y(z);if(H>=document.documentElement.clientWidth)return u.value=!0,m(z,X)}return v(z,X)}}},P=()=>{const D=vn(n);if(D){const{height:z}=c.value,{top:X,height:Z}=D.getBoundingClientRect(),H=window.innerHeight-X-Z,le=X;return z<=H?Wo.bottom:z>H&&z<=le?Wo.top:H>=le?Wo.bottom:Wo.top}return Wo.bottom},B=D=>P()===Wo.bottom?T(D):A(D),Y=()=>{const D=vn(n);if(D)return o.autoPosition?B(D):T(D)},ne=function(D){if(D){const z=D.scrollHeight>D.clientHeight,X=window.getComputedStyle(D).overflowY.indexOf("hidden")!==-1;return z&&!X}return!0},$=function(D){return!D||D===document.body||D.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:ne(D)?D:$(D.assignedSlot&&l.value.shadowDom?D.assignedSlot.parentNode:D.parentNode)},F=D=>{if(D)switch(o.position){case Xa.left:return{left:0,transform:"translateX(0)"};case Xa.right:return{left:`${D.width}px`,transform:"translateX(-100%)"};default:return{left:`${D.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:h,menuStyle:d,xCorrect:u,setMenuPosition:w,getScrollableParent:$,shadowRender:(D,z)=>{var X,Z,H;const le=document.createElement("div"),ie=(X=vn(n))==null?void 0:X.getBoundingClientRect();le.setAttribute("id","dp--temp-container");const te=(Z=i.value)!=null&&Z.clientWidth?i.value:document.body;te.append(le);const I=F(ie),ee=l.value.shadowDom?Object.keys(a).filter(L=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(L)):Object.keys(a),ue=ua(D,{...z,shadow:!0,style:{opacity:0,position:"absolute",...I}},Object.fromEntries(ee.map(L=>[L,a[L]])));I0(ue,le),c.value=(H=ue.el)==null?void 0:H.getBoundingClientRect(),I0(null,le),te.removeChild(le)}}},Pr=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]},{name:"tp-inline-arrow-up",use:["shared","time"]},{name:"tp-inline-arrow-down",use:["shared","time"]},{name:"menu-header",use:["menu"]}],TB=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],AB={all:()=>Pr,monthYear:()=>Pr.filter(t=>t.use.includes("month-year")),input:()=>TB,timePicker:()=>Pr.filter(t=>t.use.includes("time")),action:()=>Pr.filter(t=>t.use.includes("action")),calendar:()=>Pr.filter(t=>t.use.includes("calendar")),menu:()=>Pr.filter(t=>t.use.includes("menu")),shared:()=>Pr.filter(t=>t.use.includes("shared")),yearMode:()=>Pr.filter(t=>t.use.includes("year-mode"))},ki=(t,e,n)=>{const i=[];return AB[e]().forEach(s=>{t[s.name]&&i.push(s.name)}),n!=null&&n.length&&n.forEach(s=>{s.slot&&i.push(s.slot)}),i},zu=t=>{const e=be(()=>i=>t.value?i?t.value.open:t.value.close:""),n=be(()=>i=>t.value?i?t.value.menuAppearTop:t.value.menuAppearBottom:"");return{transitionName:e,showTransition:!!t.value,menuTransition:n}},Wu=(t,e,n)=>{const{defaultedRange:i,defaultedTz:s}=jt(t),r=Ce(xi(Ce(),s.value.timezone)),o=xe([{month:at(r),year:Xe(r)}]),a=h=>{const f={hours:yr(r),minutes:ao(r),seconds:0};return i.value.enabled?[f[h],f[h]]:f[h]},l=Ki({hours:a("hours"),minutes:a("minutes"),seconds:a("seconds")});un(i,(h,f)=>{h.enabled!==f.enabled&&(l.hours=a("hours"),l.minutes=a("minutes"),l.seconds=a("seconds"))},{deep:!0});const c=be({get:()=>t.internalModelValue,set:h=>{!t.readonly&&!t.disabled&&e("update:internal-model-value",h)}}),u=be(()=>h=>o.value[h]?o.value[h].month:0),d=be(()=>h=>o.value[h]?o.value[h].year:0);return un(c,(h,f)=>{n&&JSON.stringify(h??{})!==JSON.stringify(f??{})&&n()},{deep:!0}),{calendars:o,time:l,modelValue:c,month:u,year:d,today:r}},kB=(t,e)=>{const{defaultedMultiCalendars:n,defaultedMultiDates:i,defaultedUI:s,defaultedHighlight:r,defaultedTz:o,propDates:a,defaultedRange:l}=jt(e),{isDisabled:c}=yo(e),u=xe(null),d=xe(xi(new Date,o.value.timezone)),h=I=>{!I.current&&e.hideOffsetDates||(u.value=I.value)},f=()=>{u.value=null},p=I=>Array.isArray(t.value)&&l.value.enabled&&t.value[0]&&u.value?I?on(u.value,t.value[0]):Qt(u.value,t.value[0]):!0,m=(I,ee)=>{const ue=()=>t.value?ee?t.value[0]||null:t.value[1]:null,L=t.value&&Array.isArray(t.value)?ue():null;return ct(Ce(I.value),L)},y=I=>{const ee=Array.isArray(t.value)?t.value[0]:null;return I?!Qt(u.value??null,ee):!0},v=(I,ee=!0)=>(l.value.enabled||e.weekPicker)&&Array.isArray(t.value)&&t.value.length===2?e.hideOffsetDates&&!I.current?!1:ct(Ce(I.value),t.value[ee?0:1]):l.value.enabled?m(I,ee)&&y(ee)||ct(I.value,Array.isArray(t.value)?t.value[0]:null)&&p(ee):!1,b=(I,ee)=>{if(Array.isArray(t.value)&&t.value[0]&&t.value.length===1){const ue=ct(I.value,u.value);return ee?on(t.value[0],I.value)&&ue:Qt(t.value[0],I.value)&&ue}return!1},x=I=>!t.value||e.hideOffsetDates&&!I.current?!1:l.value.enabled?e.modelAuto&&Array.isArray(t.value)?ct(I.value,t.value[0]?t.value[0]:d.value):!1:i.value.enabled&&Array.isArray(t.value)?t.value.some(ee=>ct(ee,I.value)):ct(I.value,t.value?t.value:d.value),E=I=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!I.current)return!1;const ee=ss(u.value,+l.value.autoRange),ue=nr(Ce(u.value),e.weekStart);return e.weekPicker?ct(ue[1],Ce(I.value)):ct(ee,Ce(I.value))}return!1}return!1},w=I=>{if(l.value.autoRange||e.weekPicker){if(u.value){const ee=ss(u.value,+l.value.autoRange);if(e.hideOffsetDates&&!I.current)return!1;const ue=nr(Ce(u.value),e.weekStart);return e.weekPicker?on(I.value,ue[0])&&Qt(I.value,ue[1]):on(I.value,u.value)&&Qt(I.value,ee)}return!1}return!1},S=I=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!I.current)return!1;const ee=nr(Ce(u.value),e.weekStart);return e.weekPicker?ct(ee[0],I.value):ct(u.value,I.value)}return!1}return!1},T=I=>vf(t.value,u.value,I.value),A=()=>e.modelAuto&&Array.isArray(e.internalModelValue)?!!e.internalModelValue[0]:!1,k=()=>e.modelAuto?qC(e.internalModelValue):!0,P=I=>{if(e.weekPicker)return!1;const ee=l.value.enabled?!v(I)&&!v(I,!1):!0;return!c(I.value)&&!x(I)&&!(!I.current&&e.hideOffsetDates)&&ee},B=I=>l.value.enabled?e.modelAuto?A()&&x(I):!1:x(I),Y=I=>r.value?Q5(I.value,a.value.highlight):!1,ne=I=>{const ee=c(I.value);return ee&&(typeof r.value=="function"?!r.value(I.value,ee):!r.value.options.highlightDisabled)},$=I=>{var ee;return typeof r.value=="function"?r.value(I.value):(ee=r.value.weekdays)==null?void 0:ee.includes(I.value.getDay())},F=I=>(l.value.enabled||e.weekPicker)&&(!(n.value.count>0)||I.current)&&k()&&!(!I.current&&e.hideOffsetDates)&&!x(I)?T(I):!1,D=I=>{const{isRangeStart:ee,isRangeEnd:ue}=H(I),L=l.value.enabled?ee||ue:!1;return{dp__cell_offset:!I.current,dp__pointer:!e.disabled&&!(!I.current&&e.hideOffsetDates)&&!c(I.value),dp__cell_disabled:c(I.value),dp__cell_highlight:!ne(I)&&(Y(I)||$(I))&&!B(I)&&!L&&!S(I)&&!(F(I)&&e.weekPicker)&&!ue,dp__cell_highlight_active:!ne(I)&&(Y(I)||$(I))&&B(I),dp__today:!e.noToday&&ct(I.value,d.value)&&I.current,"dp--past":Qt(I.value,d.value),"dp--future":on(I.value,d.value)}},z=I=>({dp__active_date:B(I),dp__date_hover:P(I)}),X=I=>{if(t.value&&!Array.isArray(t.value)){const ee=nr(t.value,e.weekStart);return{...ie(I),dp__range_start:ct(ee[0],I.value),dp__range_end:ct(ee[1],I.value),dp__range_between_week:on(I.value,ee[0])&&Qt(I.value,ee[1])}}return{...ie(I)}},Z=I=>{if(t.value&&Array.isArray(t.value)){const ee=nr(t.value[0],e.weekStart),ue=t.value[1]?nr(t.value[1],e.weekStart):[];return{...ie(I),dp__range_start:ct(ee[0],I.value)||ct(ue[0],I.value),dp__range_end:ct(ee[1],I.value)||ct(ue[1],I.value),dp__range_between_week:on(I.value,ee[0])&&Qt(I.value,ee[1])||on(I.value,ue[0])&&Qt(I.value,ue[1]),dp__range_between:on(I.value,ee[1])&&Qt(I.value,ue[0])}}return{...ie(I)}},H=I=>{const ee=n.value.count>0?I.current&&v(I)&&k():v(I)&&k(),ue=n.value.count>0?I.current&&v(I,!1)&&k():v(I,!1)&&k();return{isRangeStart:ee,isRangeEnd:ue}},le=I=>{const{isRangeStart:ee,isRangeEnd:ue}=H(I);return{dp__range_start:ee,dp__range_end:ue,dp__range_between:F(I),dp__date_hover:ct(I.value,u.value)&&!ee&&!ue&&!e.weekPicker,dp__date_hover_start:b(I,!0),dp__date_hover_end:b(I,!1)}},ie=I=>({...le(I),dp__cell_auto_range:w(I),dp__cell_auto_range_start:S(I),dp__cell_auto_range_end:E(I)}),te=I=>l.value.enabled?l.value.autoRange?ie(I):e.modelAuto?{...z(I),...le(I)}:e.weekPicker?Z(I):le(I):e.weekPicker?X(I):z(I);return{setHoverDate:h,clearHoverDate:f,getDayClassData:I=>e.hideOffsetDates&&!I.current?{}:{...D(I),...te(I),[e.dayClass?e.dayClass(I.value,e.internalModelValue):""]:!0,...s.value.calendarCell??{}}}},yo=t=>{const{defaultedFilters:e,defaultedRange:n,propDates:i,defaultedMultiDates:s}=jt(t),r=$=>i.value.disabledDates?typeof i.value.disabledDates=="function"?i.value.disabledDates(Ce($)):!!Eh($,i.value.disabledDates):!1,o=$=>i.value.maxDate?t.yearPicker?Xe($)>Xe(i.value.maxDate):on($,i.value.maxDate):!1,a=$=>i.value.minDate?t.yearPicker?Xe($){const F=o($),D=a($),z=r($),X=e.value.months.map(te=>+te).includes(at($)),Z=t.disabledWeekDays.length?t.disabledWeekDays.some(te=>+te===zF($)):!1,H=f($),le=Xe($),ie=le<+t.yearRange[0]||le>+t.yearRange[1];return!(F||D||z||X||ie||Z||H)},c=($,F)=>Qt(...Kr(i.value.minDate,$,F))||ct(...Kr(i.value.minDate,$,F)),u=($,F)=>on(...Kr(i.value.maxDate,$,F))||ct(...Kr(i.value.maxDate,$,F)),d=($,F,D)=>{let z=!1;return i.value.maxDate&&D&&u($,F)&&(z=!0),i.value.minDate&&!D&&c($,F)&&(z=!0),z},h=($,F,D,z)=>{let X=!1;return z&&(i.value.minDate||i.value.maxDate)?i.value.minDate&&i.value.maxDate?X=d($,F,D):(i.value.minDate&&c($,F)||i.value.maxDate&&u($,F))&&(X=!0):X=!0,X},f=$=>Array.isArray(i.value.allowedDates)&&!i.value.allowedDates.length?!0:i.value.allowedDates?!Eh($,i.value.allowedDates):!1,p=$=>!l($),m=$=>n.value.noDisabledRange?!RC({start:$[0],end:$[1]}).some(F=>p(F)):!0,y=$=>{if($){const F=Xe($);return F>=+t.yearRange[0]&&F<=t.yearRange[1]}return!0},v=($,F)=>!!(Array.isArray($)&&$[F]&&(n.value.maxRange||n.value.minRange)&&y($[F])),b=($,F,D=0)=>{if(v(F,D)&&y($)){const z=IC($,F[D]),X=tS(F[D],$),Z=X.length===1?0:X.filter(le=>p(le)).length,H=Math.abs(z)-(n.value.minMaxRawRange?0:Z);if(n.value.minRange&&n.value.maxRange)return H>=+n.value.minRange&&H<=+n.value.maxRange;if(n.value.minRange)return H>=+n.value.minRange;if(n.value.maxRange)return H<=+n.value.maxRange}return!0},x=()=>!t.enableTimePicker||t.monthPicker||t.yearPicker||t.ignoreTimeValidation,E=$=>Array.isArray($)?[$[0]?$g($[0]):null,$[1]?$g($[1]):null]:$g($),w=($,F,D)=>$.find(z=>+z.hours===yr(F)&&z.minutes==="*"?!0:+z.minutes===ao(F)&&+z.hours===yr(F))&&D,S=($,F,D)=>{const[z,X]=$,[Z,H]=F;return!w(z,Z,D)&&!w(X,H,D)&&D},T=($,F)=>{const D=Array.isArray(F)?F:[F];return Array.isArray(t.disabledTimes)?Array.isArray(t.disabledTimes[0])?S(t.disabledTimes,D,$):!D.some(z=>w(t.disabledTimes,z,$)):$},A=($,F)=>{const D=Array.isArray(F)?[na(F[0]),F[1]?na(F[1]):void 0]:na(F),z=!t.disabledTimes(D);return $&&z},k=($,F)=>t.disabledTimes?Array.isArray(t.disabledTimes)?T(F,$):A(F,$):F,P=$=>{let F=!0;if(!$||x())return!0;const D=!i.value.minDate&&!i.value.maxDate?E($):$;return(t.maxTime||i.value.maxDate)&&(F=fb(t.maxTime,i.value.maxDate,"max",An(D),F)),(t.minTime||i.value.minDate)&&(F=fb(t.minTime,i.value.minDate,"min",An(D),F)),k($,F)},B=$=>{if(!t.monthPicker)return!0;let F=!0;const D=Ce(rs($));if(i.value.minDate&&i.value.maxDate){const z=Ce(rs(i.value.minDate)),X=Ce(rs(i.value.maxDate));return on(D,z)&&Qt(D,X)||ct(D,z)||ct(D,X)}if(i.value.minDate){const z=Ce(rs(i.value.minDate));F=on(D,z)||ct(D,z)}if(i.value.maxDate){const z=Ce(rs(i.value.maxDate));F=Qt(D,z)||ct(D,z)}return F},Y=be(()=>$=>!t.enableTimePicker||t.ignoreTimeValidation?!0:P($)),ne=be(()=>$=>t.monthPicker?Array.isArray($)&&(n.value.enabled||s.value.enabled)?!$.filter(F=>!B(F)).length:B($):!0);return{isDisabled:p,validateDate:l,validateMonthYearInRange:h,isDateRangeAllowed:m,checkMinMaxRange:b,isValidTime:P,isTimeValid:Y,isMonthValid:ne}},Ef=()=>{const t=be(()=>(i,s)=>i?.includes(s)),e=be(()=>(i,s)=>i.count?i.solo?!0:s===0:!0),n=be(()=>(i,s)=>i.count?i.solo?!0:s===i.count-1:!0);return{hideNavigationButtons:t,showLeftIcon:e,showRightIcon:n}},MB=(t,e,n)=>{const i=xe(0),s=Ki({[ta.timePicker]:!t.enableTimePicker||t.timePicker||t.monthPicker,[ta.calendar]:!1,[ta.header]:!1}),r=be(()=>t.monthPicker||t.timePicker),o=d=>{var h;if((h=t.flow)!=null&&h.length){if(!d&&r.value)return u();s[d]=!0,Object.keys(s).filter(f=>!s[f]).length||u()}},a=()=>{var d,h;(d=t.flow)!=null&&d.length&&i.value!==-1&&(i.value+=1,e("flow-step",i.value),u()),((h=t.flow)==null?void 0:h.length)===i.value&&Rn().then(()=>l())},l=()=>{i.value=-1},c=(d,h,...f)=>{var p,m;t.flow[i.value]===d&&n.value&&((m=(p=n.value)[h])==null||m.call(p,...f))},u=(d=0)=>{d&&(i.value+=d),c(Yn.month,"toggleMonthPicker",!0),c(Yn.year,"toggleYearPicker",!0),c(Yn.calendar,"toggleTimePicker",!1,!0),c(Yn.time,"toggleTimePicker",!0,!0);const h=t.flow[i.value];(h===Yn.hours||h===Yn.minutes||h===Yn.seconds)&&c(h,"toggleTimePicker",!0,!0,h)};return{childMount:o,updateFlowStep:a,resetFlow:l,handleFlow:u,flowStep:i}},PB={key:1,class:"dp__input_wrap"},IB=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],DB={key:2,class:"dp--clear-btn"},RB=["aria-label"],LB=hn({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...bf},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur","text-input"],setup(t,{expose:e,emit:n}){const i=n,s=t,{defaultedTextInput:r,defaultedAriaLabels:o,defaultedInline:a,defaultedConfig:l,defaultedRange:c,defaultedMultiDates:u,defaultedUI:d,getDefaultPattern:h,getDefaultStartTime:f}=jt(s),{checkMinMaxRange:p}=yo(s),m=xe(),y=xe(null),v=xe(!1),b=xe(!1),x=be(()=>({dp__pointer:!s.disabled&&!s.readonly&&!r.value.enabled,dp__disabled:s.disabled,dp__input_readonly:!r.value.enabled,dp__input:!0,dp__input_icon_pad:!s.hideInputIcon,dp__input_valid:typeof s.state=="boolean"?s.state:!1,dp__input_invalid:typeof s.state=="boolean"?!s.state:!1,dp__input_focus:v.value||s.isMenuOpen,dp__input_reg:!r.value.enabled,...d.value.input??{}})),E=()=>{i("set-input-date",null),s.clearable&&s.autoApply&&(i("set-empty-date"),m.value=null)},w=H=>{const le=f();return e4(H,r.value.format??h(),le??nS({},s.enableSeconds),s.inputValue,b.value,s.formatLocale)},S=H=>{const{rangeSeparator:le}=r.value,[ie,te]=H.split(`${le}`);if(ie){const I=w(ie.trim()),ee=te?w(te.trim()):null;if(Tl(I,ee))return;const ue=I&&ee?[I,ee]:[I];p(ee,ue,0)&&(m.value=I?ue:null)}},T=()=>{b.value=!0},A=H=>{if(c.value.enabled)S(H);else if(u.value.enabled){const le=H.split(";");m.value=le.map(ie=>w(ie.trim())).filter(ie=>ie)}else m.value=w(H)},k=H=>{var le;const ie=typeof H=="string"?H:(le=H.target)==null?void 0:le.value;ie!==""?(r.value.openMenu&&!s.isMenuOpen&&i("open"),A(ie),i("set-input-date",m.value)):E(),b.value=!1,i("update:input-value",ie),i("text-input",H,m.value)},P=H=>{r.value.enabled?(A(H.target.value),r.value.enterSubmit&&tm(m.value)&&s.inputValue!==""?(i("set-input-date",m.value,!0),m.value=null):r.value.enterSubmit&&s.inputValue===""&&(m.value=null,i("clear"))):ne(H)},B=(H,le)=>{r.value.enabled&&r.value.tabSubmit&&!le&&A(H.target.value),r.value.tabSubmit&&tm(m.value)&&s.inputValue!==""?(i("set-input-date",m.value,!0,!0),m.value=null):r.value.tabSubmit&&s.inputValue===""&&(m.value=null,i("clear",!0))},Y=()=>{v.value=!0,i("focus"),Rn().then(()=>{var H;r.value.enabled&&r.value.selectOnFocus&&((H=y.value)==null||H.select())})},ne=H=>{if(eo(H,l.value,!0),r.value.enabled&&r.value.openMenu&&!a.value.input){if(r.value.openMenu==="open"&&!s.isMenuOpen)return i("open");if(r.value.openMenu==="toggle")return i("toggle")}else r.value.enabled||i("toggle")},$=()=>{i("real-blur"),v.value=!1,(!s.isMenuOpen||a.value.enabled&&a.value.input)&&i("blur"),s.autoApply&&r.value.enabled&&m.value&&!s.isMenuOpen&&(i("set-input-date",m.value),i("select-date"),m.value=null)},F=H=>{eo(H,l.value,!0),i("clear")},D=H=>{if(H.key==="Tab"&&B(H),H.key==="Enter"&&P(H),!r.value.enabled){if(H.code==="Tab")return;H.preventDefault()}},z=()=>{var H;(H=y.value)==null||H.focus({preventScroll:!0})},X=H=>{m.value=H},Z=H=>{H.key===Ot.tab&&B(H,!0)};return e({focusInput:z,setParsedDate:X}),(H,le)=>{var ie,te,I;return R(),V("div",{onClick:ne},[H.$slots.trigger&&!H.$slots["dp-input"]&&!J(a).enabled?Ne(H.$slots,"trigger",{key:0}):ce("",!0),!H.$slots.trigger&&(!J(a).enabled||J(a).input)?(R(),V("div",PB,[H.$slots["dp-input"]&&!H.$slots.trigger&&(!J(a).enabled||J(a).enabled&&J(a).input)?Ne(H.$slots,"dp-input",{key:0,value:t.inputValue,isMenuOpen:t.isMenuOpen,onInput:k,onEnter:P,onTab:B,onClear:F,onBlur:$,onKeypress:D,onPaste:T,onFocus:Y,openMenu:()=>H.$emit("open"),closeMenu:()=>H.$emit("close"),toggleMenu:()=>H.$emit("toggle")}):ce("",!0),H.$slots["dp-input"]?ce("",!0):(R(),V("input",{key:1,id:H.uid?`dp-input-${H.uid}`:void 0,ref_key:"inputRef",ref:y,"data-test":"dp-input",name:H.name,class:Pe(x.value),inputmode:J(r).enabled?"text":"none",placeholder:H.placeholder,disabled:H.disabled,readonly:H.readonly,required:H.required,value:t.inputValue,autocomplete:H.autocomplete,"aria-label":(ie=J(o))==null?void 0:ie.input,"aria-disabled":H.disabled||void 0,"aria-invalid":H.state===!1?!0:void 0,onInput:k,onBlur:$,onFocus:Y,onKeypress:D,onKeydown:le[0]||(le[0]=ee=>D(ee)),onPaste:T},null,42,IB)),g("div",{onClick:le[3]||(le[3]=ee=>i("toggle"))},[H.$slots["input-icon"]&&!H.hideInputIcon?(R(),V("span",{key:0,class:"dp__input_icon",onClick:le[1]||(le[1]=ee=>i("toggle"))},[Ne(H.$slots,"input-icon")])):ce("",!0),!H.$slots["input-icon"]&&!H.hideInputIcon&&!H.$slots["dp-input"]?(R(),Se(J(Gl),{key:1,"aria-label":(te=J(o))==null?void 0:te.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:le[2]||(le[2]=ee=>i("toggle"))},null,8,["aria-label"])):ce("",!0)]),H.$slots["clear-icon"]&&t.inputValue&&H.clearable&&!H.disabled&&!H.readonly?(R(),V("span",DB,[Ne(H.$slots,"clear-icon",{clear:F})])):ce("",!0),H.clearable&&!H.$slots["clear-icon"]&&t.inputValue&&!H.disabled&&!H.readonly?(R(),V("button",{key:3,"aria-label":(I=J(o))==null?void 0:I.clearInput,class:"dp--clear-btn",type:"button",onKeydown:le[4]||(le[4]=ee=>J(ii)(ee,()=>F(ee),!0,Z)),onClick:le[5]||(le[5]=ru(ee=>F(ee),["prevent"]))},[N(J(GC),{class:"dp__input_icons","data-test":"clear-icon"})],40,RB)):ce("",!0)])):ce("",!0)])}}}),OB=typeof window<"u"?window:void 0,Wg=()=>{},$B=t=>nf()?(e_(t),!0):!1,NB=(t,e,n,i)=>{if(!t)return Wg;let s=Wg;const r=un(()=>J(t),a=>{s(),a&&(a.addEventListener(e,n,i),s=()=>{a.removeEventListener(e,n,i),s=Wg})},{immediate:!0,flush:"post"}),o=()=>{r(),s()};return $B(o),o},FB=(t,e,n,i={})=>{const{window:s=OB,event:r="pointerdown"}=i;return s?NB(s,r,o=>{const a=vn(t),l=vn(e);!a||!l||a===o.target||o.composedPath().includes(a)||o.composedPath().includes(l)||n(o)},{passive:!0}):void 0},BB=hn({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...bf},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle","text-input"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=_a(),o=xe(!1),a=tu(s,"modelValue"),l=tu(s,"timezone"),c=xe(null),u=xe(null),d=xe(null),h=xe(!1),f=xe(null),p=xe(!1),m=xe(!1),y=xe(!1),v=xe(!1),{setMenuFocused:b,setShiftKey:x}=aS(),{clearArrowNav:E}=_o(),{validateDate:w,isValidTime:S}=yo(s),{defaultedTransitions:T,defaultedTextInput:A,defaultedInline:k,defaultedConfig:P,defaultedRange:B,defaultedMultiDates:Y}=jt(s),{menuTransition:ne,showTransition:$}=zu(T);En(()=>{ee(s.modelValue),Rn().then(()=>{if(!k.value.enabled){const he=le(f.value);he?.addEventListener("scroll",K),window?.addEventListener("resize",U)}}),k.value.enabled&&(o.value=!0),window?.addEventListener("keyup",re),window?.addEventListener("keydown",j)}),pa(()=>{if(!k.value.enabled){const he=le(f.value);he?.removeEventListener("scroll",K),window?.removeEventListener("resize",U)}window?.removeEventListener("keyup",re),window?.removeEventListener("keydown",j)});const F=ki(r,"all",s.presetDates),D=ki(r,"input");un([a,l],()=>{ee(a.value)},{deep:!0});const{openOnTop:z,menuStyle:X,xCorrect:Z,setMenuPosition:H,getScrollableParent:le,shadowRender:ie}=SB({menuRef:c,menuRefInner:u,inputRef:d,pickerWrapperRef:f,inline:k,emit:i,props:s,slots:r}),{inputValue:te,internalModelValue:I,parseExternalModelValue:ee,emitModelValue:ue,formatInputValue:L,checkBeforeEmit:ae}=C4(i,s,h),de=be(()=>({dp__main:!0,dp__theme_dark:s.dark,dp__theme_light:!s.dark,dp__flex_display:k.value.enabled,"dp--flex-display-collapsed":y.value,dp__flex_display_with_input:k.value.input})),ve=be(()=>s.dark?"dp__theme_dark":"dp__theme_light"),W=be(()=>s.teleport?{to:typeof s.teleport=="boolean"?"body":s.teleport,disabled:!s.teleport||k.value.enabled}:{}),fe=be(()=>({class:"dp__outer_menu_wrap"})),C=be(()=>k.value.enabled&&(s.timePicker||s.monthPicker||s.yearPicker||s.quarterPicker)),O=()=>{var he,Ae;return(Ae=(he=d.value)==null?void 0:he.$el)==null?void 0:Ae.getBoundingClientRect()},K=()=>{o.value&&(P.value.closeOnScroll?ze():H())},U=()=>{var he;o.value&&H();const Ae=(he=u.value)==null?void 0:he.$el.getBoundingClientRect().width;y.value=document.body.offsetWidth<=Ae},re=he=>{he.key==="Tab"&&!k.value.enabled&&!s.teleport&&P.value.tabOutClosesMenu&&(f.value.contains(document.activeElement)||ze()),m.value=he.shiftKey},j=he=>{m.value=he.shiftKey},se=()=>{!s.disabled&&!s.readonly&&(ie(_b,s),H(!1),o.value=!0,o.value&&i("open"),o.value||Be(),ee(s.modelValue))},Q=()=>{var he;te.value="",Be(),(he=d.value)==null||he.setParsedDate(null),i("update:model-value",null),i("update:model-timezone-value",null),i("cleared"),P.value.closeOnClearValue&&ze()},ge=()=>{const he=I.value;return!he||!Array.isArray(he)&&w(he)?!0:Array.isArray(he)?Y.value.enabled||he.length===2&&w(he[0])&&w(he[1])?!0:B.value.partialRange&&!s.timePicker?w(he[0]):!1:!1},_e=()=>{ae()&&ge()?(ue(),ze()):i("invalid-select",I.value)},ye=he=>{ke(),ue(),P.value.closeOnAutoApply&&!he&&ze()},ke=()=>{d.value&&A.value.enabled&&d.value.setParsedDate(I.value)},Me=(he=!1)=>{s.autoApply&&S(I.value)&&ge()&&(B.value.enabled&&Array.isArray(I.value)?(B.value.partialRange||I.value.length===2)&&ye(he):ye(he))},Be=()=>{A.value.enabled||(I.value=null)},ze=()=>{k.value.enabled||(o.value&&(o.value=!1,Z.value=!1,b(!1),x(!1),E(),i("closed"),te.value&&ee(a.value)),Be(),i("blur"))},nt=(he,Ae,Le=!1)=>{if(!he){I.value=null;return}const Ut=Array.isArray(he)?!he.some(Ri=>!w(Ri)):w(he),gn=S(he);Ut&&gn?(v.value=!0,I.value=he,Ae&&(p.value=Le,_e(),i("text-submit")),Rn().then(()=>{v.value=!1})):i("invalid-date",he)},Qe=()=>{s.autoApply&&S(I.value)&&ue(),ke()},qt=()=>o.value?ze():se(),Bt=he=>{I.value=he},fn=()=>{A.value.enabled&&(h.value=!0,L()),i("focus")},Kt=()=>{if(A.value.enabled&&(h.value=!1,ee(s.modelValue),p.value)){const he=J5(f.value,m.value);he?.focus()}i("blur")},Ei=he=>{u.value&&u.value.updateMonthYear(0,{month:cb(he.month),year:cb(he.year)})},Xi=he=>{ee(he??s.modelValue)},Zt=(he,Ae)=>{var Le;(Le=u.value)==null||Le.switchView(he,Ae)},oe=he=>P.value.onClickOutside?P.value.onClickOutside(he):ze(),Te=(he=0)=>{var Ae;(Ae=u.value)==null||Ae.handleFlow(he)};return FB(c,d,()=>oe(ge)),e({closeMenu:ze,selectDate:_e,clearValue:Q,openMenu:se,onScroll:K,formatInputValue:L,updateInternalModelValue:Bt,setMonthYear:Ei,parseModel:Xi,switchView:Zt,toggleMenu:qt,handleFlow:Te,dpWrapMenuRef:c}),(he,Ae)=>(R(),V("div",{ref_key:"pickerWrapperRef",ref:f,class:Pe(de.value),"data-datepicker-instance":""},[N(LB,wn({ref_key:"inputRef",ref:d,"input-value":J(te),"onUpdate:inputValue":Ae[0]||(Ae[0]=Le=>Wt(te)?te.value=Le:null),"is-menu-open":o.value},he.$props,{onClear:Q,onOpen:se,onSetInputDate:nt,onSetEmptyDate:J(ue),onSelectDate:_e,onToggle:qt,onClose:ze,onFocus:fn,onBlur:Kt,onRealBlur:Ae[1]||(Ae[1]=Le=>h.value=!1),onTextInput:Ae[2]||(Ae[2]=Le=>he.$emit("text-input",Le))}),Un({_:2},[Ze(J(D),(Le,Ut)=>({name:Le,fn:De(gn=>[Ne(he.$slots,Le,In(ni(gn)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(R(),Se(ma(he.teleport?gD:"div"),In(ni(W.value)),{default:De(()=>[N($t,{name:J(ne)(J(z)),css:J($)&&!J(k).enabled},{default:De(()=>[o.value?(R(),V("div",wn({key:0,ref_key:"dpWrapMenuRef",ref:c},fe.value,{class:{"dp--menu-wrapper":!J(k).enabled},style:J(k).enabled?void 0:J(X)}),[N(_b,wn({ref_key:"dpMenuRef",ref:u},he.$props,{"internal-model-value":J(I),"onUpdate:internalModelValue":Ae[3]||(Ae[3]=Le=>Wt(I)?I.value=Le:null),class:{[ve.value]:!0,"dp--menu-wrapper":he.teleport},"open-on-top":J(z),"no-overlay-focus":C.value,collapse:y.value,"get-input-rect":O,"is-text-input-date":v.value,onClosePicker:ze,onSelectDate:_e,onAutoApply:Me,onTimeUpdate:Qe,onFlowStep:Ae[4]||(Ae[4]=Le=>he.$emit("flow-step",Le)),onUpdateMonthYear:Ae[5]||(Ae[5]=Le=>he.$emit("update-month-year",Le)),onInvalidSelect:Ae[6]||(Ae[6]=Le=>he.$emit("invalid-select",J(I))),onAutoApplyInvalid:Ae[7]||(Ae[7]=Le=>he.$emit("invalid-select",Le)),onInvalidFixedRange:Ae[8]||(Ae[8]=Le=>he.$emit("invalid-fixed-range",Le)),onRecalculatePosition:J(H),onTooltipOpen:Ae[9]||(Ae[9]=Le=>he.$emit("tooltip-open",Le)),onTooltipClose:Ae[10]||(Ae[10]=Le=>he.$emit("tooltip-close",Le)),onTimePickerOpen:Ae[11]||(Ae[11]=Le=>he.$emit("time-picker-open",Le)),onTimePickerClose:Ae[12]||(Ae[12]=Le=>he.$emit("time-picker-close",Le)),onAmPmChange:Ae[13]||(Ae[13]=Le=>he.$emit("am-pm-change",Le)),onRangeStart:Ae[14]||(Ae[14]=Le=>he.$emit("range-start",Le)),onRangeEnd:Ae[15]||(Ae[15]=Le=>he.$emit("range-end",Le)),onDateUpdate:Ae[16]||(Ae[16]=Le=>he.$emit("date-update",Le)),onInvalidDate:Ae[17]||(Ae[17]=Le=>he.$emit("invalid-date",Le)),onOverlayToggle:Ae[18]||(Ae[18]=Le=>he.$emit("overlay-toggle",Le))}),Un({_:2},[Ze(J(F),(Le,Ut)=>({name:Le,fn:De(gn=>[Ne(he.$slots,Le,In(ni({...gn})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","is-text-input-date","onRecalculatePosition"])],16)):ce("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),Yu=(()=>{const t=BB;return t.install=e=>{e.component("Vue3DatePicker",t)},t})(),VB=Object.freeze(Object.defineProperty({__proto__:null,default:Yu},Symbol.toStringTag,{value:"Module"}));Object.entries(VB).forEach(([t,e])=>{t!=="default"&&(Yu[t]=e)});const zB={name:"newDashboardAPIKey",components:{LocaleText:He,VueDatePicker:Yu},data(){return{newKeyData:{ExpiredAt:bi().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),neverExpire:!1},submitting:!1}},setup(){return{store:tt()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,xt("/api/newDashboardAPIKey",this.newKeyData,t=>{t.status?(this.$emit("created",t.data),this.store.newMessage("Server","API Key created","success"),this.$emit("close")):this.store.newMessage("Server",t.message,"danger"),this.submitting=!1})},fixDate(t){return console.log(bi(t).format("YYYY-MM-DDTHH:mm:ss")),bi(t).format("YYYY-MM-DDTHH:mm:ss")},parseTime(t){t?this.newKeyData.ExpiredAt=bi(t).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},WB={class:"position-absolute w-100 h-100 top-0 start-0 rounded-bottom-3 p-3 d-flex",style:{"background-color":"#00000060","backdrop-filter":"blur(3px)"}},YB={class:"card m-auto rounded-3 mt-5"},HB={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},jB={class:"mb-0"},KB={class:"card-body d-flex gap-2 p-4 flex-column"},UB={class:"text-muted"},GB={class:"d-flex align-items-center gap-2"},XB={class:"form-check"},qB=["disabled"],ZB={class:"form-check-label",for:"neverExpire"},JB={key:0,class:"bi bi-check-lg me-2"};function QB(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("VueDatePicker");return R(),V("div",WB,[g("div",YB,[g("div",HB,[g("h6",jB,[N(o,{t:"Create API Key"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),g("div",KB,[g("small",UB,[N(o,{t:"When should this API Key expire?"})]),g("div",GB,[N(a,{is24:!0,"min-date":new Date,"model-value":this.newKeyData.ExpiredAt,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:this.newKeyData.neverExpire||this.submitting,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])]),g("div",XB,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=l=>this.newKeyData.neverExpire=l),id:"neverExpire",disabled:this.submitting},null,8,qB),[[Kn,this.newKeyData.neverExpire]]),g("label",ZB,[N(o,{t:"Never Expire"}),e[3]||(e[3]=Ue(" (")),e[4]||(e[4]=g("i",{class:"bi bi-emoji-grimace-fill me-2"},null,-1)),N(o,{t:"Don't think that's a good idea"}),e[5]||(e[5]=Ue(") "))])]),g("button",{class:Pe(["ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",{disabled:this.submitting}]),onClick:e[2]||(e[2]=l=>this.submitNewAPIKey())},[this.submitting?ce("",!0):(R(),V("i",JB)),this.submitting?(R(),Se(o,{key:1,t:"Creating..."})):(R(),Se(o,{key:2,t:"Create"}))],2)])])])}const eV=je(zB,[["render",QB]]),tV={name:"dashboardAPIKey",components:{LocaleText:He},props:{apiKey:Object},setup(){return{store:tt()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){xt("/api/deleteDashboardAPIKey",{Key:this.apiKey.Key},t=>{t.status?(this.$emit("deleted",t.data),this.store.newMessage("Server","API Key deleted","success")):this.store.newMessage("Server",t.message,"danger")})}}},nV={class:"card rounded-3 shadow-sm"},iV={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},sV={class:"d-flex align-items-center gap-2"},rV={class:"text-muted"},oV={style:{"word-break":"break-all"}},aV={class:"d-flex align-items-center gap-2 ms-auto"},lV={class:"text-muted"},cV={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"};function uV(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",nV,[this.confirmDelete?(R(),V(Oe,{key:1},[this.store.getActiveCrossServer()?ce("",!0):(R(),V("div",cV,[N(o,{t:"Are you sure to delete this API key?"}),g("a",{role:"button",class:"btn btn-sm bg-success-subtle text-success-emphasis rounded-3",onClick:e[1]||(e[1]=a=>this.deleteAPIKey())},e[4]||(e[4]=[g("i",{class:"bi bi-check-lg"},null,-1)])),g("a",{role:"button",class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:e[2]||(e[2]=a=>this.confirmDelete=!1)},e[5]||(e[5]=[g("i",{class:"bi bi-x-lg"},null,-1)]))]))],64)):(R(),V("div",iV,[g("div",sV,[g("small",rV,[N(o,{t:"Key"})]),g("span",oV,we(this.apiKey.Key),1)]),g("div",aV,[g("small",lV,[N(o,{t:"Expire At"})]),this.apiKey.ExpiredAt?ce("",!0):(R(),Se(o,{key:0,t:"Never Expire"})),g("span",null,we(this.apiKey.ExpiredAt),1)]),this.store.getActiveCrossServer()?ce("",!0):(R(),V("a",{key:0,role:"button",class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3",onClick:e[0]||(e[0]=a=>this.confirmDelete=!0)},e[3]||(e[3]=[g("i",{class:"bi bi-trash-fill"},null,-1)])))]))])}const dV=je(tV,[["render",uV],["__scopeId","data-v-a76253c8"]]),hV={name:"dashboardAPIKeys",components:{LocaleText:He,DashboardAPIKey:dV,NewDashboardAPIKey:eV},setup(){return{store:tt()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await xt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_api_key",value:this.value},t=>{t.status?(this.store.Configuration.Peers[this.targetData]=this.value,this.store.newMessage("Server",`API Keys function is successfully ${this.value?"enabled":"disabled"}`,"success")):(this.value=this.store.Configuration.Peers[this.targetData],this.store.newMessage("Server",`API Keys function is failed to ${this.value?"enabled":"disabled"}`,"danger"))})}},watch:{value:{immediate:!0,handler(t){t?Yt("/api/getDashboardAPIKeys",{},e=>{console.log(e),e.status?this.apiKeys=e.data:(this.apiKeys=[],this.store.newMessage("Server",e.message,"danger"))}):this.apiKeys=[]}}}},fV={class:"card mb-4 shadow rounded-3"},gV={class:"card-header d-flex"},pV={key:0,class:"form-check form-switch ms-auto"},mV={class:"form-check-label",for:"allowAPIKeysSwitch"},_V={key:0,class:"card-body position-relative d-flex flex-column gap-2"},yV={key:1,class:"card",style:{height:"300px"}},vV={class:"card-body d-flex text-muted"},bV={class:"m-auto"},wV={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function xV(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("DashboardAPIKey"),l=Ee("NewDashboardAPIKey");return R(),V("div",fV,[g("div",gV,[N(o,{t:"API Keys"}),this.store.getActiveCrossServer()?ce("",!0):(R(),V("div",pV,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=c=>this.value=c),onChange:e[1]||(e[1]=c=>this.toggleDashboardAPIKeys()),role:"switch",id:"allowAPIKeysSwitch"},null,544),[[Kn,this.value]]),g("label",mV,[this.value?(R(),Se(o,{key:0,t:"Enabled"})):(R(),Se(o,{key:1,t:"Disabled"}))])]))]),this.value?(R(),V("div",_V,[this.store.getActiveCrossServer()?ce("",!0):(R(),V("button",{key:0,class:"ms-auto btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm",onClick:e[2]||(e[2]=c=>this.newDashboardAPIKey=!0)},[e[6]||(e[6]=g("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),N(o,{t:"API Key"})])),this.apiKeys.length===0?(R(),V("div",yV,[g("div",vV,[g("span",bV,[N(o,{t:"No WGDashboard API Key"})])])])):(R(),V("div",wV,[N(Ul,{name:"apiKey"},{default:De(()=>[(R(!0),V(Oe,null,Ze(this.apiKeys,c=>(R(),Se(a,{apiKey:c,key:c.Key,onDeleted:e[3]||(e[3]=u=>this.apiKeys=u)},null,8,["apiKey"]))),128))]),_:1})])),N($t,{name:"zoomReversed"},{default:De(()=>[this.newDashboardAPIKey?(R(),Se(l,{key:0,onCreated:e[4]||(e[4]=c=>this.apiKeys=c),onClose:e[5]||(e[5]=c=>this.newDashboardAPIKey=!1)})):ce("",!0)]),_:1})])):ce("",!0)])}const EV=je(hV,[["render",xV],["__scopeId","data-v-167c06a6"]]),CV={name:"accountSettingsMFA",components:{LocaleText:He},setup(){const t=tt(),e=`input_${Bs()}`;return{store:t,uuid:e}},data(){return{status:!1}},mounted(){this.status=this.store.Configuration.Account.enable_totp},methods:{async resetMFA(){await xt("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async t=>{await xt("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},e=>{e.status&&this.$router.push("/2FASetup")})})}}},SV={class:"d-flex align-items-center"},TV={class:"form-check form-switch ms-3"};function AV(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("div",SV,[g("strong",null,[N(o,{t:"Multi-Factor Authentication (MFA)"})]),g("div",TV,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=a=>this.status=a),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[Kn,this.status]])]),this.status?(R(),V("button",{key:0,class:"btn bg-warning-subtle text-warning-emphasis border-1 border-warning-subtle ms-auto rounded-3 shadow-sm",onClick:e[1]||(e[1]=a=>this.resetMFA())},[e[2]||(e[2]=g("i",{class:"bi bi-shield-lock-fill me-2"},null,-1)),this.store.Configuration.Account.totp_verified?(R(),Se(o,{key:0,t:"Reset"})):(R(),Se(o,{key:1,t:"Setup"})),e[3]||(e[3]=Ue(" MFA "))])):ce("",!0)])])}const kV=je(CV,[["render",AV]]),MV={name:"dashboardLanguage",components:{LocaleText:He},setup(){return{store:tt()}},data(){return{languages:void 0}},mounted(){Yt("/api/locale/available",{},t=>{this.languages=t.data})},methods:{changeLanguage(t){xt("/api/locale/update",{lang_id:t},e=>{e.status?(this.store.Configuration.Server.dashboard_language=t,this.store.Locale=e.data):this.store.newMessage("Server","Dashboard language update failed","danger")})}},computed:{currentLanguage(){let t=this.store.Configuration.Server.dashboard_language;return this.languages.find(e=>e.lang_id===t)}}},PV={class:"card mb-4 shadow rounded-3"},IV={class:"card-header"},DV={class:"card-body d-flex gap-2"},RV={class:"dropdown w-100"},LV=["disabled"],OV={key:1},$V={class:"dropdown-menu rounded-3 shadow"},NV=["onClick"],FV={class:"me-auto mb-0"},BV={class:"d-block",style:{"font-size":"0.8rem"}},VV={key:0,class:"bi bi-check text-primary fs-5"};function zV(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",PV,[g("p",IV,[N(o,{t:"Dashboard Language"})]),g("div",DV,[g("div",RV,[g("button",{class:"btn bg-primary-subtle text-primary-emphasis dropdown-toggle w-100 rounded-3",disabled:!this.languages,type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[this.languages?(R(),V("span",OV,we(r.currentLanguage?.lang_name_localized),1)):(R(),Se(o,{key:0,t:"Loading..."}))],8,LV),g("ul",$V,[(R(!0),V(Oe,null,Ze(this.languages,a=>(R(),V("li",null,[g("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:l=>this.changeLanguage(a.lang_id)},[g("p",FV,[Ue(we(a.lang_name_localized)+" ",1),g("small",BV,we(a.lang_name),1)]),r.currentLanguage?.lang_id===a.lang_id?(R(),V("i",VV)):ce("",!0)],8,NV)]))),256))])])])])}const WV=je(MV,[["render",zV],["__scopeId","data-v-a8b77ad0"]]),YV={name:"dashboardIPPortInput",components:{LocaleText:He},setup(){return{store:tt()}},data(){return{ipAddress:"",port:0,invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.ipAddress=this.store.Configuration.Server.app_ip,this.port=this.store.Configuration.Server.app_port},methods:{async useValidation(t,e,n){this.changed&&(this.updating=!0,await xt("/api/updateDashboardConfigurationItem",{section:"Server",key:e,value:n},i=>{i.status?(t.target.classList.add("is-valid"),this.showInvalidFeedback=!1,this.store.Configuration.Server[e]=n,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{t.target.classList.remove("is-valid")},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=i.message),this.changed=!1,this.updating=!1}))}}},HV={class:"card mb-4 shadow rounded-3"},jV={class:"card-header"},KV={class:"card-body"},UV={class:"row gx-3"},GV={class:"col-sm"},XV={class:"form-group mb-2"},qV={for:"input_dashboard_ip",class:"text-muted mb-1"},ZV=["disabled"],JV={class:"invalid-feedback"},QV={class:"col-sm"},e6={class:"form-group mb-2"},t6={for:"input_dashboard_ip",class:"text-muted mb-1"},n6=["disabled"],i6={class:"invalid-feedback"},s6={class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1 mb-2"};function r6(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",HV,[g("p",jV,[N(o,{t:"Dashboard IP Address & Listen Port"})]),g("div",KV,[g("div",UV,[g("div",GV,[g("div",XV,[g("label",qV,[g("strong",null,[g("small",null,[N(o,{t:"IP Address / Hostname"})])])]),$e(g("input",{type:"text",class:Pe(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[0]||(e[0]=a=>this.ipAddress=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>r.useValidation(a,"app_ip",this.ipAddress)),disabled:this.updating},null,42,ZV),[[We,this.ipAddress]]),g("div",JV,we(this.invalidFeedback),1)])]),g("div",QV,[g("div",e6,[g("label",t6,[g("strong",null,[g("small",null,[N(o,{t:"Listen Port"})])])]),$e(g("input",{type:"number",class:Pe(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[3]||(e[3]=a=>this.port=a),onKeydown:e[4]||(e[4]=a=>this.changed=!0),onBlur:e[5]||(e[5]=a=>r.useValidation(a,"app_port",this.port)),disabled:this.updating},null,42,n6),[[We,this.port]]),g("div",i6,we(this.invalidFeedback),1)])])]),g("div",s6,[g("small",null,[e[6]||(e[6]=g("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),N(o,{t:"Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port"})])])])])}const o6=je(YV,[["render",r6]]),a6={name:"settings",methods:{ipV46RegexCheck:ON},components:{DashboardIPPortInput:o6,DashboardLanguage:WV,LocaleText:He,AccountSettingsMFA:kV,DashboardAPIKeys:EV,DashboardSettingsInputIPAddressAndPort:N3,DashboardTheme:T3,DashboardSettingsInputWireguardConfigurationPath:b3,AccountSettingsInputPassword:a3,AccountSettingsInputUsername:WN,PeersDefaultSettingsInput:LN},setup(){return{dashboardConfigurationStore:tt()}}},l6={class:"mt-md-5 mt-3"},c6={class:"container-md"},u6={class:"mb-3 text-body"},d6={class:"card mb-4 shadow rounded-3"},h6={class:"card-header"},f6={class:"card-body"},g6={class:"card mb-4 shadow rounded-3"},p6={class:"card-header"},m6={class:"card-body"},_6={class:"row gx-4"},y6={class:"col-sm"},v6={class:"col-sm"},b6={class:"card mb-4 shadow rounded-3"},w6={class:"card-header"},x6={class:"card-body d-flex gap-4 flex-column"},E6={key:0,class:"m-0"};function C6(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("PeersDefaultSettingsInput"),l=Ee("DashboardSettingsInputWireguardConfigurationPath"),c=Ee("DashboardTheme"),u=Ee("DashboardLanguage"),d=Ee("DashboardIPPortInput"),h=Ee("AccountSettingsInputUsername"),f=Ee("AccountSettingsInputPassword"),p=Ee("AccountSettingsMFA"),m=Ee("DashboardAPIKeys");return R(),V("div",l6,[g("div",c6,[g("h3",u6,[N(o,{t:"Settings"})]),g("div",d6,[g("p",h6,[N(o,{t:"Peers Default Settings"})]),g("div",f6,[N(a,{targetData:"peer_global_dns",title:"DNS"}),N(a,{targetData:"peer_endpoint_allowed_ip",title:"Endpoint Allowed IPs"}),N(a,{targetData:"peer_mtu",title:"MTU"}),N(a,{targetData:"peer_keep_alive",title:"Persistent Keepalive"}),N(a,{targetData:"remote_endpoint",title:"Peer Remote Endpoint",warning:!0,warningText:"This will be changed globally, and will be apply to all peer's QR code and configuration file."})])]),g("div",g6,[g("p",p6,[N(o,{t:"WireGuard Configurations Settings"})]),g("div",m6,[N(l,{targetData:"wg_conf_path",title:"Configurations Directory",warning:!0,"warning-text":"Remember to remove / at the end of your path. e.g /etc/wireguard"})])]),e[1]||(e[1]=g("hr",{class:"mb-4"},null,-1)),g("div",_6,[g("div",y6,[N(c)]),g("div",v6,[N(u)])]),N(d),g("div",b6,[g("p",w6,[N(o,{t:"WGDashboard Account Settings"})]),g("div",x6,[N(h,{targetData:"username",title:"Username"}),e[0]||(e[0]=g("hr",{class:"m-0"},null,-1)),N(f,{targetData:"password"}),this.dashboardConfigurationStore.getActiveCrossServer()?ce("",!0):(R(),V("hr",E6)),this.dashboardConfigurationStore.getActiveCrossServer()?ce("",!0):(R(),Se(p,{key:1}))])]),N(m)])])}const S6=je(a6,[["render",C6]]),T6={name:"setup",components:{LocaleText:He},setup(){return{store:tt()}},data(){return{setup:{username:"",newPassword:"",repeatNewPassword:"",enable_totp:!0},loading:!1,errorMessage:"",done:!1}},computed:{goodToSubmit(){return this.setup.username&&this.setup.newPassword.length>=8&&this.setup.repeatNewPassword.length>=8&&this.setup.newPassword===this.setup.repeatNewPassword}},methods:{submit(){this.loading=!0,xt("/api/Welcome_Finish",this.setup,t=>{t.status?(this.done=!0,this.$router.push("/2FASetup")):(document.querySelectorAll("#createAccount input").forEach(e=>e.classList.add("is-invalid")),this.errorMessage=t.message,document.querySelector(".login-container-fluid").scrollTo({top:0,left:0,behavior:"smooth"})),this.loading=!1})}}},A6=["data-bs-theme"],k6={class:"m-auto text-body",style:{width:"500px"}},M6={class:"dashboardLogo display-4"},P6={class:"mb-5"},I6={key:0,class:"alert alert-danger"},D6={class:"d-flex flex-column gap-3"},R6={id:"createAccount",class:"d-flex flex-column gap-2"},L6={class:"form-group text-body"},O6={for:"username",class:"mb-1 text-muted"},$6={class:"form-group text-body"},N6={for:"password",class:"mb-1 text-muted"},F6={class:"form-group text-body"},B6={for:"confirmPassword",class:"mb-1 text-muted"},V6=["disabled"],z6={key:0,class:"d-flex align-items-center w-100"},W6={key:1,class:"d-flex align-items-center w-100"};function Y6(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[g("div",k6,[g("span",M6,[N(o,{t:"Nice to meet you!"})]),g("p",P6,[N(o,{t:"Please fill in the following fields to finish setup"}),e[4]||(e[4]=Ue(" 😊"))]),g("div",null,[g("h3",null,[N(o,{t:"Create an account"})]),this.errorMessage?(R(),V("div",I6,we(this.errorMessage),1)):ce("",!0),g("div",D6,[g("form",R6,[g("div",L6,[g("label",O6,[g("small",null,[N(o,{t:"Enter an username you like"})])]),$e(g("input",{type:"text",autocomplete:"username","onUpdate:modelValue":e[0]||(e[0]=a=>this.setup.username=a),class:"form-control",id:"username",name:"username",required:""},null,512),[[We,this.setup.username]])]),g("div",$6,[g("label",N6,[g("small",null,[N(o,{t:"Enter a password"}),g("code",null,[N(o,{t:"(At least 8 characters and make sure is strong enough!)"})])])]),$e(g("input",{type:"password",autocomplete:"new-password","onUpdate:modelValue":e[1]||(e[1]=a=>this.setup.newPassword=a),class:"form-control",id:"password",name:"password",required:""},null,512),[[We,this.setup.newPassword]])]),g("div",F6,[g("label",B6,[g("small",null,[N(o,{t:"Confirm password"})])]),$e(g("input",{type:"password",autocomplete:"confirm-new-password","onUpdate:modelValue":e[2]||(e[2]=a=>this.setup.repeatNewPassword=a),class:"form-control",id:"confirmPassword",name:"confirmPassword",required:""},null,512),[[We,this.setup.repeatNewPassword]])])]),g("button",{class:"btn btn-dark btn-lg mb-5 d-flex btn-brand shadow align-items-center",ref:"signInBtn",disabled:!this.goodToSubmit||this.loading||this.done,onClick:e[3]||(e[3]=a=>this.submit())},[!this.loading&&!this.done?(R(),V("span",z6,[N(o,{t:"Next"}),e[5]||(e[5]=g("i",{class:"bi bi-chevron-right ms-auto"},null,-1))])):(R(),V("span",W6,[N(o,{t:"Saving..."}),e[6]||(e[6]=g("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},[g("span",{class:"visually-hidden"},"Loading...")],-1))]))],8,V6)])])])],8,A6)}const H6=je(T6,[["render",Y6]]);function B_(t){return t.includes(":")?6:t.includes(".")?4:0}function j6(t){const e=B_(t);if(!e)throw new Error(`Invalid IP address: ${t}`);let n=0n,i=0n;const s=Object.create(null);if(e===4)for(const r of t.split(".").map(BigInt).reverse())n+=r*2n**i,i+=8n;else{if(t.includes(".")&&(s.ipv4mapped=!0,t=t.split(":").map(a=>{if(a.includes(".")){const[l,c,u,d]=a.split(".").map(h=>Number(h).toString(16).padStart(2,"0"));return`${l}${c}:${u}${d}`}else return a}).join(":")),t.includes("%")){let a;[,t,a]=/(.+)%(.+)/.exec(t)||[],s.scopeid=a}const r=t.split(":"),o=r.indexOf("");if(o!==-1)for(;r.length<8;)r.splice(o,0,"");for(const a of r.map(l=>BigInt(parseInt(l||"0",16))).reverse())n+=a*2n**i,i+=16n}return s.number=n,s.version=e,s}const Yg={4:32,6:128},K6=t=>t.includes("/")?B_(t):0;function U6(t){const e=K6(t),n=Object.create(null);if(e)n.cidr=t,n.version=e;else{const d=B_(t);if(d)n.cidr=`${t}/${Yg[d]}`,n.version=d;else throw new Error(`Network is not a CIDR or IP: ${t}`)}const[i,s]=n.cidr.split("/");if(!/^[0-9]+$/.test(s))throw new Error(`Network is not a CIDR or IP: ${t}`);n.prefix=s,n.single=s===String(Yg[n.version]);const{number:r,version:o}=j6(i),a=Yg[o],l=r.toString(2).padStart(a,"0"),c=Number(a-s),u=l.substring(0,a-c);return n.start=BigInt(`0b${u}${"0".repeat(c)}`),n.end=BigInt(`0b${u}${"1".repeat(c)}`),n}/*! SPDX-License-Identifier: GPL-2.0 * * Copyright (C) 2015-2020 Jason A. Donenfeld . All Rights Reserved. - */(function(){function t(w){var S=new Float64Array(16);if(w)for(var T=0;T>16&1),A[P-1]&=65535;A[15]=k[15]-32767-(A[14]>>16&1),T=A[15]>>16&1,A[14]&=65535,i(k,A,1-T)}for(var P=0;P<16;++P)w[2*P]=k[P]&255,w[2*P+1]=k[P]>>8}function n(w){for(var S=0;S<16;++S)w[(S+1)%16]+=(S<15?1:38)*Math.floor(w[S]/65536),w[S]&=65535}function i(w,S,T){for(var A,k=~(T-1),P=0;P<16;++P)A=k&(w[P]^S[P]),w[P]^=A,S[P]^=A}function s(w,S,T){for(var A=0;A<16;++A)w[A]=S[A]+T[A]|0}function r(w,S,T){for(var A=0;A<16;++A)w[A]=S[A]-T[A]|0}function o(w,S,T){for(var A=new Float64Array(31),k=0;k<16;++k)for(var P=0;P<16;++P)A[k+P]+=S[k]*T[P];for(var k=0;k<15;++k)A[k]+=38*A[k+16];for(var k=0;k<16;++k)w[k]=A[k];n(w),n(w)}function a(w,S){for(var T=t(),A=0;A<16;++A)T[A]=S[A];for(var A=253;A>=0;--A)o(T,T,T),A!==2&&A!==4&&o(T,T,S);for(var A=0;A<16;++A)w[A]=T[A]}function l(w){w[31]=w[31]&127|64,w[0]&=248}function c(w){for(var S,T=new Uint8Array(32),A=t([1]),k=t([9]),P=t(),B=t([1]),Y=t(),ne=t(),$=t([56129,1]),F=t([9]),D=0;D<32;++D)T[D]=w[D];l(T);for(var D=254;D>=0;--D)S=T[D>>>3]>>>(D&7)&1,i(A,k,S),i(P,B,S),s(Y,A,P),r(A,A,P),s(P,k,B),r(k,k,B),o(B,Y,Y),o(ne,A,A),o(A,P,A),o(P,k,Y),s(Y,A,P),r(A,A,P),o(k,A,A),r(P,B,ne),o(A,P,$),s(A,A,B),o(P,P,A),o(A,B,ne),o(B,k,F),o(k,Y,Y),i(A,k,S),i(P,B,S);return a(P,P),o(A,A,P),e(T,A),T}function u(){var w=new Uint8Array(32);return window.crypto.getRandomValues(w),w}function d(){var w=u();return l(w),w}function h(w,S){for(var T=Uint8Array.from([S[0]>>2&63,(S[0]<<4|S[1]>>4)&63,(S[1]<<2|S[2]>>6)&63,S[2]&63]),A=0;A<4;++A)w[A]=T[A]+65+(25-T[A]>>8&6)-(51-T[A]>>8&75)-(61-T[A]>>8&15)+(62-T[A]>>8&3)}function f(w){var S,T=new Uint8Array(44);for(S=0;S<32/3;++S)h(T.subarray(S*4),w.subarray(S*3));return h(T.subarray(S*4),Uint8Array.from([w[S*3+0],w[S*3+1],0])),T[43]=61,String.fromCharCode.apply(null,T)}function p(w){let S=window.atob(w),T=S.length,A=new Uint8Array(T);for(let P=0;P>>8&255,S>>>16&255,S>>>24&255)}function y(w,S){w.push(S&255,S>>>8&255)}function v(w,S){for(var T=0;T>>1:S>>>1;x.table[T]=S}}for(var k=-1,P=0;P>>8^x.table[(k^w[P])&255];return(k^-1)>>>0}function E(w){for(var S=[],T=[],A=0,k=0;k{t.status?(this.success=!0,await this.store.getConfigurations(),this.$router.push(`/configuration/${this.newConfiguration.ConfigurationName}/peers`)):(this.error=!0,this.errorMessage=t.message,document.querySelector(`#${t.data}`).classList.remove("is-valid"),document.querySelector(`#${t.data}`).classList.add("is-invalid"),this.loading=!1)}))}},computed:{goodToSubmit(){let t=["ConfigurationName","Address","ListenPort","PrivateKey"],e=[...document.querySelectorAll("input[required]")];return t.find(n=>this.newConfiguration[n].length===0)===void 0&&e.find(n=>n.classList.contains("is-invalid"))===void 0}},watch:{"newConfiguration.Address"(t){let e=document.querySelector("#Address");e.classList.remove("is-invalid","is-valid");try{if(t.trim().split("/").filter(s=>s.length>0).length!==2)throw Error();let n=U6(t),i=n.end-n.start;this.numberOfAvailableIPs=i.toLocaleString(),e.classList.add("is-valid")}catch{this.numberOfAvailableIPs="0",e.classList.add("is-invalid")}},"newConfiguration.ListenPort"(t){let e=document.querySelector("#ListenPort");e.classList.remove("is-invalid","is-valid"),t<0||t>65353||!Number.isInteger(t)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.ConfigurationName"(t){let e=document.querySelector("#ConfigurationName");e.classList.remove("is-invalid","is-valid"),!/^[a-zA-Z0-9_=+.-]{1,15}$/.test(t)||t.length===0||this.store.Configurations.find(n=>n.Name===t)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.PrivateKey"(t){let e=document.querySelector("#PrivateKey");e.classList.remove("is-invalid","is-valid");try{wireguard.generatePublicKey(t),e.classList.add("is-valid")}catch{e.classList.add("is-invalid")}}}},X6={class:"mt-5"},q6={class:"container mb-4"},Z6={class:"mb-4 d-flex align-items-center gap-4"},J6={class:"mb-0 text-body"},Q6={class:"card rounded-3 shadow"},ez={class:"card-header"},tz={class:"card-body"},nz=["disabled"],iz={class:"invalid-feedback"},sz={key:0},rz={key:1},oz={class:"mb-0"},az={class:"card rounded-3 shadow"},lz={class:"card-header"},cz={class:"card-body",style:{"font-family":"var(--bs-font-monospace)"}},uz={class:"mb-2"},dz={class:"text-muted fw-bold mb-1"},hz={class:"input-group"},fz=["disabled"],gz={class:"text-muted fw-bold mb-1"},pz={class:"card rounded-3 shadow"},mz={class:"card-header"},_z={class:"card-body"},yz=["disabled"],vz={class:"invalid-feedback"},bz={key:0},wz={key:1},xz={class:"card rounded-3 shadow"},Ez={class:"card-header d-flex align-items-center"},Cz={class:"badge rounded-pill text-bg-success ms-auto"},Sz={class:"card-body"},Tz=["disabled"],Az={class:"invalid-feedback"},kz={key:0},Mz={key:1},Pz={class:"accordion",id:"newConfigurationOptionalAccordion"},Iz={class:"accordion-item"},Dz={class:"accordion-header"},Rz={class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},Lz={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},Oz={class:"accordion-body d-flex flex-column gap-3"},$z={class:"card rounded-3"},Nz={class:"card-body"},Fz={class:"card rounded-3"},Bz={class:"card-body"},Vz={class:"card rounded-3"},zz={class:"card-body"},Wz={class:"card rounded-3"},Yz={class:"card-body"},Hz=["disabled"],jz={key:0,class:"d-flex w-100"},Kz={key:1,class:"d-flex w-100"},Uz={key:2,class:"d-flex w-100 align-items-center"};function Gz(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),V("div",X6,[g("div",q6,[g("div",Z6,[N(a,{to:"/",class:"text-decoration-none"},{default:De(()=>[g("h3",J6,[e[11]||(e[11]=g("i",{class:"bi bi-chevron-left me-4"},null,-1)),N(o,{t:"New Configuration"})])]),_:1})]),g("form",{class:"text-body d-flex flex-column gap-3",onSubmit:e[10]||(e[10]=l=>{l.preventDefault(),this.saveNewConfiguration()})},[g("div",Q6,[g("div",ez,[N(o,{t:"Configuration Name"})]),g("div",tz,[$e(g("input",{type:"text",class:"form-control",placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":e[0]||(e[0]=l=>this.newConfiguration.ConfigurationName=l),disabled:this.loading,required:""},null,8,nz),[[We,this.newConfiguration.ConfigurationName]]),g("div",iz,[this.error?(R(),V("div",sz,xe(this.errorMessage),1)):(R(),V("div",rz,[N(o,{t:"Configuration name is invalid. Possible reasons:"}),g("ul",oz,[g("li",null,[N(o,{t:"Configuration name already exist."})]),g("li",null,[N(o,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])])]),g("div",az,[g("div",lz,[N(o,{t:"Private Key"}),e[12]||(e[12]=Ue(" & ")),N(o,{t:"Public Key"})]),g("div",cz,[g("div",uz,[g("label",dz,[g("small",null,[N(o,{t:"Private Key"})])]),g("div",hz,[$e(g("input",{type:"text",class:"form-control",id:"PrivateKey",required:"",disabled:this.loading,"onUpdate:modelValue":e[1]||(e[1]=l=>this.newConfiguration.PrivateKey=l)},null,8,fz),[[We,this.newConfiguration.PrivateKey]]),g("button",{class:"btn btn-outline-primary",type:"button",title:"Regenerate Private Key",onClick:e[2]||(e[2]=l=>r.wireguardGenerateKeypair())},e[13]||(e[13]=[g("i",{class:"bi bi-arrow-repeat"},null,-1)]))])]),g("div",null,[g("label",gz,[g("small",null,[N(o,{t:"Public Key"})])]),$e(g("input",{type:"text",class:"form-control",id:"PublicKey","onUpdate:modelValue":e[3]||(e[3]=l=>this.newConfiguration.PublicKey=l),disabled:""},null,512),[[We,this.newConfiguration.PublicKey]])])])]),g("div",pz,[g("div",mz,[N(o,{t:"Listen Port"})]),g("div",_z,[$e(g("input",{type:"number",class:"form-control",placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":e[4]||(e[4]=l=>this.newConfiguration.ListenPort=l),disabled:this.loading,required:""},null,8,yz),[[We,this.newConfiguration.ListenPort]]),g("div",vz,[this.error?(R(),V("div",bz,xe(this.errorMessage),1)):(R(),V("div",wz,[N(o,{t:"Invalid port"})]))])])]),g("div",xz,[g("div",Ez,[N(o,{t:"IP Address/CIDR"}),g("span",Cz,xe(s.numberOfAvailableIPs)+" Available IPs",1)]),g("div",Sz,[$e(g("input",{type:"text",class:"form-control",placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":e[5]||(e[5]=l=>this.newConfiguration.Address=l),disabled:this.loading,required:""},null,8,Tz),[[We,this.newConfiguration.Address]]),g("div",Az,[this.error?(R(),V("div",kz,xe(this.errorMessage),1)):(R(),V("div",Mz," IP Address/CIDR is invalid "))])])]),e[22]||(e[22]=g("hr",null,null,-1)),g("div",Pz,[g("div",Iz,[g("h2",Dz,[g("button",Rz,[N(o,{t:"Optional Settings"})])]),g("div",Lz,[g("div",Oz,[g("div",$z,[e[14]||(e[14]=g("div",{class:"card-header"},"PreUp",-1)),g("div",Nz,[$e(g("input",{type:"text",class:"form-control",id:"preUp","onUpdate:modelValue":e[6]||(e[6]=l=>this.newConfiguration.PreUp=l)},null,512),[[We,this.newConfiguration.PreUp]])])]),g("div",Fz,[e[15]||(e[15]=g("div",{class:"card-header"},"PreDown",-1)),g("div",Bz,[$e(g("input",{type:"text",class:"form-control",id:"preDown","onUpdate:modelValue":e[7]||(e[7]=l=>this.newConfiguration.PreDown=l)},null,512),[[We,this.newConfiguration.PreDown]])])]),g("div",Vz,[e[16]||(e[16]=g("div",{class:"card-header"},"PostUp",-1)),g("div",zz,[$e(g("input",{type:"text",class:"form-control",id:"postUp","onUpdate:modelValue":e[8]||(e[8]=l=>this.newConfiguration.PostUp=l)},null,512),[[We,this.newConfiguration.PostUp]])])]),g("div",Wz,[e[17]||(e[17]=g("div",{class:"card-header"},"PostDown",-1)),g("div",Yz,[$e(g("input",{type:"text",class:"form-control",id:"postDown","onUpdate:modelValue":e[9]||(e[9]=l=>this.newConfiguration.PostDown=l)},null,512),[[We,this.newConfiguration.PostDown]])])])])])])]),g("button",{class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto",disabled:!this.goodToSubmit||this.loading||this.success},[this.success?(R(),V("span",jz,[N(o,{t:"Success"}),e[18]||(e[18]=Ue("! ")),e[19]||(e[19]=g("i",{class:"bi bi-check-circle-fill ms-2"},null,-1))])):this.loading?(R(),V("span",Uz,[N(o,{t:"Saving..."}),e[21]||(e[21]=g("span",{class:"ms-2 spinner-border spinner-border-sm",role:"status"},null,-1))])):(R(),V("span",Kz,[N(o,{t:"Save Configuration"}),e[20]||(e[20]=g("i",{class:"bi bi-save-fill ms-2"},null,-1))]))],8,Hz)],32)])])}const Xz=je(G6,[["render",Gz]]),qz={name:"configuration"},Zz={class:"mt-md-5 mt-3 text-body"};function Jz(t,e,n,i,s,r){const o=Ee("RouterView");return R(),V("div",Zz,[N(o,null,{default:De(({Component:a,route:l})=>[N($t,{name:"fade2",mode:"out-in"},{default:De(()=>[(R(),Se(p_,null,{default:De(()=>[(R(),Se(ma(a),{key:l.path}))]),_:2},1024))]),_:2},1024)]),_:1})])}const Qz=je(qz,[["render",Jz]]),eW={name:"peerSearch",components:{LocaleText:He},setup(){const t=tt(),e=qn();return{store:t,wireguardConfigurationStore:e}},props:{configuration:Object},data(){return{sort:{status:At("Status"),name:At("Name"),allowed_ip:At("Allowed IPs"),restricted:At("Restricted")},interval:{5e3:At("5 Seconds"),1e4:At("10 Seconds"),3e4:At("30 Seconds"),6e4:At("1 Minutes")},searchString:"",searchStringTimeout:void 0,showDisplaySettings:!1,showMoreSettings:!1}},methods:{debounce(){this.searchStringTimeout?(clearTimeout(this.searchStringTimeout),this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)):this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)},updateSort(t){xt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_sort",value:t},e=>{e.status&&this.store.getConfiguration()})},updateRefreshInterval(t){xt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_refresh_interval",value:t},e=>{e.status&&this.store.getConfiguration()})},downloadAllPeer(){Yt(`/api/downloadAllPeers/${this.configuration.Name}`,{},t=>{console.log(t),window.wireguard.generateZipFiles(t,this.configuration.Name)})}},computed:{searchBarPlaceholder(){return At("Search Peers...")}}},tW={class:"mb-3"},nW={class:"d-flex gap-2 z-3 peerSearchContainer"},iW={class:"mt-3 mt-md-0 flex-grow-1"},sW=["placeholder"],rW={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},oW={class:"container-md d-flex h-100 w-100"},aW={class:"m-auto modal-dialog-centered dashboardModal"},lW={class:"card rounded-3 shadow w-100"},cW={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},uW={class:"mb-0 fw-normal"},dW={class:"card-body px-4 pb-4 d-flex gap-3 flex-column"},hW={class:"text-muted fw-bold mb-2"},fW={class:"list-group"},gW=["onClick"],pW={class:"me-auto"},mW={key:0,class:"bi bi-check text-primary"},_W={class:"text-muted fw-bold mb-2"},yW={class:"list-group"},vW=["onClick"],bW={class:"me-auto"},wW={key:0,class:"bi bi-check text-primary"},xW={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},EW={class:"container-md d-flex h-100 w-100"},CW={class:"m-auto modal-dialog-centered dashboardModal"},SW={class:"card rounded-3 shadow w-100"},TW={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},AW={class:"card-body px-4 pb-4 d-flex gap-3 flex-column pt-0"},kW={class:"text-muted fw-bold mb-2"},MW={class:"list-group"};function PW(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),V("div",tW,[g("div",nW,[N(a,{to:"create",class:"text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm"},{default:De(()=>[e[10]||(e[10]=g("i",{class:"bi bi-plus-lg me-2"},null,-1)),N(o,{t:"Peer"})]),_:1}),g("button",{class:"btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm",onClick:e[0]||(e[0]=l=>this.downloadAllPeer())},[e[11]||(e[11]=g("i",{class:"bi bi-download me-2"},null,-1)),N(o,{t:"Download All"})]),g("div",iW,[$e(g("input",{class:"form-control rounded-3 bg-secondary-subtle border-1 border-secondary-subtle shadow-sm w-100",placeholder:r.searchBarPlaceholder,id:"searchPeers",onKeyup:e[1]||(e[1]=l=>this.debounce()),"onUpdate:modelValue":e[2]||(e[2]=l=>this.searchString=l)},null,40,sW),[[We,this.searchString]])]),g("button",{onClick:e[3]||(e[3]=l=>this.showDisplaySettings=!0),class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",type:"button","aria-expanded":"false"},[e[12]||(e[12]=g("i",{class:"bi bi-filter-circle me-2"},null,-1)),N(o,{t:"Display"})]),g("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",onClick:e[4]||(e[4]=l=>this.$emit("editConfiguration")),type:"button","aria-expanded":"false"},e[13]||(e[13]=[g("i",{class:"bi bi-gear-fill"},null,-1)])),g("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",onClick:e[5]||(e[5]=l=>this.showMoreSettings=!0),type:"button","aria-expanded":"false"},e[14]||(e[14]=[g("i",{class:"bi bi-three-dots"},null,-1)])),N($t,{name:"zoom"},{default:De(()=>[this.showDisplaySettings?(R(),V("div",rW,[g("div",oW,[g("div",aW,[g("div",lW,[g("div",cW,[g("h4",uW,[N(o,{t:"Display"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[6]||(e[6]=l=>this.showDisplaySettings=!1)})]),g("div",dW,[g("div",null,[g("p",hW,[g("small",null,[N(o,{t:"Sort by"})])]),g("div",fW,[(R(!0),V(Oe,null,Ze(this.sort,(l,c)=>(R(),V("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:u=>this.updateSort(c)},[g("span",pW,xe(l),1),i.store.Configuration.Server.dashboard_sort===c?(R(),V("i",mW)):ce("",!0)],8,gW))),256))])]),g("div",null,[g("p",_W,[g("small",null,[N(o,{t:"Refresh Interval"})])]),g("div",yW,[(R(!0),V(Oe,null,Ze(this.interval,(l,c)=>(R(),V("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:u=>this.updateRefreshInterval(c)},[g("span",bW,xe(l),1),i.store.Configuration.Server.dashboard_refresh_interval===c?(R(),V("i",wW)):ce("",!0)],8,vW))),256))])])])])])])])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.showMoreSettings?(R(),V("div",xW,[g("div",EW,[g("div",CW,[g("div",SW,[g("div",TW,[g("button",{type:"button",class:"btn-close ms-auto",onClick:e[7]||(e[7]=l=>this.showMoreSettings=!1)})]),g("div",AW,[g("div",null,[g("p",kW,[g("small",null,[N(o,{t:"Peer Jobs"})])]),g("div",MW,[g("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[8]||(e[8]=l=>this.$emit("jobsAll"))},[N(o,{t:"Active Jobs"})]),g("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[9]||(e[9]=l=>this.$emit("jobLogs"))},[N(o,{t:"Logs"})])])])])])])])])):ce("",!0)]),_:1})])])}const IW=je(eW,[["render",PW],["__scopeId","data-v-eeead157"]]);function DW(t){return nf()?(e_(t),!0):!1}function gS(t){return typeof t=="function"?t():J(t)}const pS=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const RW=Object.prototype.toString,LW=t=>RW.call(t)==="[object Object]",ah=()=>{},OW=$W();function $W(){var t,e;return pS&&((t=window?.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window?.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function xc(t){var e;const n=gS(t);return(e=n?.$el)!=null?e:n}const mS=pS?window:void 0;function Hg(...t){let e,n,i,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,s]=t,e=mS):[e,n,i,s]=t,!e)return ah;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const r=[],o=()=>{r.forEach(u=>u()),r.length=0},a=(u,d,h,f)=>(u.addEventListener(d,h,f),()=>u.removeEventListener(d,h,f)),l=un(()=>[xc(e),gS(s)],([u,d])=>{if(o(),!u)return;const h=LW(d)?{...d}:d;r.push(...n.flatMap(f=>i.map(p=>a(u,f,p,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),o()};return DW(c),c}let yb=!1;function NW(t,e,n={}){const{window:i=mS,ignore:s=[],capture:r=!0,detectIframe:o=!1}=n;if(!i)return ah;OW&&!yb&&(yb=!0,Array.from(i.document.body.children).forEach(h=>h.addEventListener("click",ah)),i.document.documentElement.addEventListener("click",ah));let a=!0;const l=h=>s.some(f=>{if(typeof f=="string")return Array.from(i.document.querySelectorAll(f)).some(p=>p===h.target||h.composedPath().includes(p));{const p=xc(f);return p&&(h.target===p||h.composedPath().includes(p))}}),u=[Hg(i,"click",h=>{const f=xc(t);if(!(!f||f===h.target||h.composedPath().includes(f))){if(h.detail===0&&(a=!l(h)),!a){a=!0;return}e(h)}},{passive:!0,capture:r}),Hg(i,"pointerdown",h=>{const f=xc(t);a=!l(h)&&!!(f&&!h.composedPath().includes(f))},{passive:!0}),o&&Hg(i,"blur",h=>{setTimeout(()=>{var f;const p=xc(t);((f=i.document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!p?.contains(i.document.activeElement)&&e(h)},0)})].filter(Boolean);return()=>u.forEach(h=>h())}const FW={name:"peerSettingsDropdown",components:{LocaleText:He},setup(){return{dashboardStore:tt()}},props:{Peer:Object},data(){return{deleteBtnDisabled:!1,restrictBtnDisabled:!1,allowAccessBtnDisabled:!1}},methods:{downloadPeer(){Yt("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{if(t.status){const e=new Blob([t.data.file],{type:"text/plain"}),n=URL.createObjectURL(e),i=`${t.data.fileName}.conf`,s=document.createElement("a");s.href=n,s.download=i,s.click(),this.dashboardStore.newMessage("WGDashboard","Peer download started","success")}else this.dashboardStore.newMessage("Server",t.message,"danger")})},downloadQRCode(){Yt("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{t.status?this.$emit("qrcode",t.data.file):this.dashboardStore.newMessage("Server",t.message,"danger")})},deletePeer(){this.deleteBtnDisabled=!0,xt(`/api/deletePeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.deleteBtnDisabled=!1})},restrictPeer(){this.restrictBtnDisabled=!0,xt(`/api/restrictPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.restrictBtnDisabled=!1})},allowAccessPeer(){this.allowAccessBtnDisabled=!0,xt(`/api/allowAccessPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.allowAccessBtnDisabled=!1})}}},BW={class:"dropdown-menu mt-2 shadow-lg d-block rounded-3",style:{"max-width":"200px"}},VW={style:{"font-size":"0.8rem","padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},zW={class:"text-body d-flex"},WW={class:"ms-auto"},YW={key:1},HW={class:"w-100 dropdown-item text-muted",style:{"white-space":"break-spaces","font-size":"0.7rem"}},jW={key:2,class:"d-flex",style:{"padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},KW={key:1};function UW(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("ul",BW,[this.Peer.restricted?(R(),V("li",KW,[g("a",{class:Pe(["dropdown-item d-flex text-warning",{disabled:this.allowAccessBtnDisabled}]),onClick:e[7]||(e[7]=a=>this.allowAccessPeer()),role:"button"},[e[21]||(e[21]=g("i",{class:"me-auto bi bi-unlock"},null,-1)),this.allowAccessBtnDisabled?(R(),Se(o,{key:1,t:"Allowing Access..."})):(R(),Se(o,{key:0,t:"Allow Access"}))],2)])):(R(),V(Oe,{key:0},[this.Peer.status==="running"?(R(),V(Oe,{key:0},[g("li",VW,[g("span",zW,[e[8]||(e[8]=g("i",{class:"bi bi-box-arrow-in-right"},null,-1)),g("span",WW,xe(this.Peer.endpoint),1)])]),e[9]||(e[9]=g("li",null,[g("hr",{class:"dropdown-divider"})],-1))],64)):ce("",!0),this.Peer.private_key?(R(),V("li",jW,[g("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[0]||(e[0]=a=>this.downloadPeer())},e[10]||(e[10]=[g("i",{class:"me-auto bi bi-download"},null,-1)])),g("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[1]||(e[1]=a=>this.downloadQRCode())},e[11]||(e[11]=[g("i",{class:"me-auto bi bi-qr-code"},null,-1)])),g("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[2]||(e[2]=a=>this.$emit("share"))},e[12]||(e[12]=[g("i",{class:"me-auto bi bi-share"},null,-1)]))])):(R(),V("li",YW,[g("small",HW,[N(o,{t:"Download & QR Code is not available due to no private key set for this peer"})])])),e[19]||(e[19]=g("li",null,[g("hr",{class:"dropdown-divider"})],-1)),g("li",null,[g("a",{class:"dropdown-item d-flex",role:"button",onClick:e[3]||(e[3]=a=>this.$emit("setting"))},[e[13]||(e[13]=g("i",{class:"me-auto bi bi-pen"},null,-1)),e[14]||(e[14]=Ue()),N(o,{t:"Peer Settings"})])]),g("li",null,[g("a",{class:"dropdown-item d-flex",role:"button",onClick:e[4]||(e[4]=a=>this.$emit("jobs"))},[e[15]||(e[15]=g("i",{class:"me-auto bi bi-app-indicator"},null,-1)),e[16]||(e[16]=Ue()),N(o,{t:"Schedule Jobs"})])]),e[20]||(e[20]=g("li",null,[g("hr",{class:"dropdown-divider"})],-1)),g("li",null,[g("a",{class:Pe(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:e[5]||(e[5]=a=>this.restrictPeer()),role:"button"},[e[17]||(e[17]=g("i",{class:"me-auto bi bi-lock"},null,-1)),this.restrictBtnDisabled?(R(),Se(o,{key:1,t:"Restricting..."})):(R(),Se(o,{key:0,t:"Restrict Access"}))],2)]),g("li",null,[g("a",{class:Pe(["dropdown-item d-flex fw-bold text-danger",{disabled:this.deleteBtnDisabled}]),onClick:e[6]||(e[6]=a=>this.deletePeer()),role:"button"},[e[18]||(e[18]=g("i",{class:"me-auto bi bi-trash"},null,-1)),this.deleteBtnDisabled?(R(),Se(o,{key:1,t:"Deleting..."})):(R(),Se(o,{key:0,t:"Delete"}))],2)])],64))])}const GW=je(FW,[["render",UW],["__scopeId","data-v-34ee3204"]]),XW={name:"peer",components:{LocaleText:He,PeerSettingsDropdown:GW},props:{Peer:Object},data(){return{}},setup(){const t=we(null),e=we(!1);return NW(t,n=>{e.value=!1}),{target:t,subMenuOpened:e}},computed:{getLatestHandshake(){return this.Peer.latest_handshake.includes(",")?this.Peer.latest_handshake.split(",")[0]:this.Peer.latest_handshake}}},qW={key:0,class:"card-header bg-transparent d-flex align-items-center gap-2 border-0"},ZW={style:{"font-size":"0.8rem"},class:"ms-auto d-flex gap-2"},JW={class:"text-primary"},QW={class:"text-success"},eY={key:0,class:"text-secondary"},tY={key:1,class:"border-0 card-header bg-transparent text-warning fw-bold",style:{"font-size":"0.8rem"}},nY={class:"card-body pt-1",style:{"font-size":"0.9rem"}},iY={class:"mb-1"},sY={class:"d-block"},rY={class:"text-muted"},oY={class:"d-block"},aY={class:"d-flex align-items-end"};function lY(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("PeerSettingsDropdown");return R(),V("div",{class:Pe(["card shadow-sm rounded-3 peerCard bg-transparent",{"border-warning":n.Peer.restricted}])},[g("div",null,[n.Peer.restricted?(R(),V("div",tY,[e[11]||(e[11]=g("i",{class:"bi-lock-fill me-2"},null,-1)),N(o,{t:"Access Restricted"})])):(R(),V("div",qW,[g("div",{class:Pe(["dot ms-0",{active:n.Peer.status==="running"}])},null,2),g("div",ZW,[g("span",JW,[e[6]||(e[6]=g("i",{class:"bi bi-arrow-down"},null,-1)),g("strong",null,xe((n.Peer.cumu_receive+n.Peer.total_receive).toFixed(4)),1),e[7]||(e[7]=Ue(" GB "))]),g("span",QW,[e[8]||(e[8]=g("i",{class:"bi bi-arrow-up"},null,-1)),g("strong",null,xe((n.Peer.cumu_sent+n.Peer.total_sent).toFixed(4)),1),e[9]||(e[9]=Ue(" GB "))]),n.Peer.latest_handshake!=="No Handshake"?(R(),V("span",eY,[e[10]||(e[10]=g("i",{class:"bi bi-arrows-angle-contract"},null,-1)),Ue(" "+xe(r.getLatestHandshake)+" ago ",1)])):ce("",!0)])]))]),g("div",nY,[g("h6",null,xe(n.Peer.name?n.Peer.name:"Untitled Peer"),1),g("div",iY,[e[12]||(e[12]=g("small",{class:"text-muted"}," Public Key ",-1)),g("small",sY,[g("samp",null,xe(n.Peer.id),1)])]),g("div",null,[g("small",rY,[N(o,{t:"Allowed IPs"})]),g("small",oY,[g("samp",null,xe(n.Peer.allowed_ip),1)])]),g("div",aY,[g("div",{class:Pe(["ms-auto px-2 rounded-3 subMenuBtn",{active:this.subMenuOpened}])},[g("a",{role:"button",class:"text-body",onClick:e[0]||(e[0]=l=>this.subMenuOpened=!0)},e[13]||(e[13]=[g("h5",{class:"mb-0"},[g("i",{class:"bi bi-three-dots"})],-1)])),N($t,{name:"slide-fade"},{default:De(()=>[this.subMenuOpened?(R(),Se(a,{key:0,onQrcode:e[1]||(e[1]=l=>this.$emit("qrcode",l)),onSetting:e[2]||(e[2]=l=>this.$emit("setting")),onJobs:e[3]||(e[3]=l=>this.$emit("jobs")),onRefresh:e[4]||(e[4]=l=>this.$emit("refresh")),onShare:e[5]||(e[5]=l=>this.$emit("share")),Peer:n.Peer,ref:"target"},null,8,["Peer"])):ce("",!0)]),_:1})],2)])])],2)}const cY=je(XW,[["render",lY],["__scopeId","data-v-f14909a4"]]);/*! + */(function(){function t(w){var S=new Float64Array(16);if(w)for(var T=0;T>16&1),A[P-1]&=65535;A[15]=k[15]-32767-(A[14]>>16&1),T=A[15]>>16&1,A[14]&=65535,i(k,A,1-T)}for(var P=0;P<16;++P)w[2*P]=k[P]&255,w[2*P+1]=k[P]>>8}function n(w){for(var S=0;S<16;++S)w[(S+1)%16]+=(S<15?1:38)*Math.floor(w[S]/65536),w[S]&=65535}function i(w,S,T){for(var A,k=~(T-1),P=0;P<16;++P)A=k&(w[P]^S[P]),w[P]^=A,S[P]^=A}function s(w,S,T){for(var A=0;A<16;++A)w[A]=S[A]+T[A]|0}function r(w,S,T){for(var A=0;A<16;++A)w[A]=S[A]-T[A]|0}function o(w,S,T){for(var A=new Float64Array(31),k=0;k<16;++k)for(var P=0;P<16;++P)A[k+P]+=S[k]*T[P];for(var k=0;k<15;++k)A[k]+=38*A[k+16];for(var k=0;k<16;++k)w[k]=A[k];n(w),n(w)}function a(w,S){for(var T=t(),A=0;A<16;++A)T[A]=S[A];for(var A=253;A>=0;--A)o(T,T,T),A!==2&&A!==4&&o(T,T,S);for(var A=0;A<16;++A)w[A]=T[A]}function l(w){w[31]=w[31]&127|64,w[0]&=248}function c(w){for(var S,T=new Uint8Array(32),A=t([1]),k=t([9]),P=t(),B=t([1]),Y=t(),ne=t(),$=t([56129,1]),F=t([9]),D=0;D<32;++D)T[D]=w[D];l(T);for(var D=254;D>=0;--D)S=T[D>>>3]>>>(D&7)&1,i(A,k,S),i(P,B,S),s(Y,A,P),r(A,A,P),s(P,k,B),r(k,k,B),o(B,Y,Y),o(ne,A,A),o(A,P,A),o(P,k,Y),s(Y,A,P),r(A,A,P),o(k,A,A),r(P,B,ne),o(A,P,$),s(A,A,B),o(P,P,A),o(A,B,ne),o(B,k,F),o(k,Y,Y),i(A,k,S),i(P,B,S);return a(P,P),o(A,A,P),e(T,A),T}function u(){var w=new Uint8Array(32);return window.crypto.getRandomValues(w),w}function d(){var w=u();return l(w),w}function h(w,S){for(var T=Uint8Array.from([S[0]>>2&63,(S[0]<<4|S[1]>>4)&63,(S[1]<<2|S[2]>>6)&63,S[2]&63]),A=0;A<4;++A)w[A]=T[A]+65+(25-T[A]>>8&6)-(51-T[A]>>8&75)-(61-T[A]>>8&15)+(62-T[A]>>8&3)}function f(w){var S,T=new Uint8Array(44);for(S=0;S<32/3;++S)h(T.subarray(S*4),w.subarray(S*3));return h(T.subarray(S*4),Uint8Array.from([w[S*3+0],w[S*3+1],0])),T[43]=61,String.fromCharCode.apply(null,T)}function p(w){let S=window.atob(w),T=S.length,A=new Uint8Array(T);for(let P=0;P>>8&255,S>>>16&255,S>>>24&255)}function y(w,S){w.push(S&255,S>>>8&255)}function v(w,S){for(var T=0;T>>1:S>>>1;x.table[T]=S}}for(var k=-1,P=0;P>>8^x.table[(k^w[P])&255];return(k^-1)>>>0}function E(w){for(var S=[],T=[],A=0,k=0;k{t.status?(this.success=!0,await this.store.getConfigurations(),this.$router.push(`/configuration/${this.newConfiguration.ConfigurationName}/peers`)):(this.error=!0,this.errorMessage=t.message,document.querySelector(`#${t.data}`).classList.remove("is-valid"),document.querySelector(`#${t.data}`).classList.add("is-invalid"),this.loading=!1)}))}},computed:{goodToSubmit(){let t=["ConfigurationName","Address","ListenPort","PrivateKey"],e=[...document.querySelectorAll("input[required]")];return t.find(n=>this.newConfiguration[n].length===0)===void 0&&e.find(n=>n.classList.contains("is-invalid"))===void 0}},watch:{"newConfiguration.Address"(t){let e=document.querySelector("#Address");e.classList.remove("is-invalid","is-valid");try{if(t.trim().split("/").filter(s=>s.length>0).length!==2)throw Error();let n=U6(t),i=n.end-n.start;this.numberOfAvailableIPs=i.toLocaleString(),e.classList.add("is-valid")}catch{this.numberOfAvailableIPs="0",e.classList.add("is-invalid")}},"newConfiguration.ListenPort"(t){let e=document.querySelector("#ListenPort");e.classList.remove("is-invalid","is-valid"),t<0||t>65353||!Number.isInteger(t)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.ConfigurationName"(t){let e=document.querySelector("#ConfigurationName");e.classList.remove("is-invalid","is-valid"),!/^[a-zA-Z0-9_=+.-]{1,15}$/.test(t)||t.length===0||this.store.Configurations.find(n=>n.Name===t)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.PrivateKey"(t){let e=document.querySelector("#PrivateKey");e.classList.remove("is-invalid","is-valid");try{wireguard.generatePublicKey(t),e.classList.add("is-valid")}catch{e.classList.add("is-invalid")}}}},X6={class:"mt-5"},q6={class:"container mb-4"},Z6={class:"mb-4 d-flex align-items-center gap-4"},J6={class:"mb-0 text-body"},Q6={class:"card rounded-3 shadow"},ez={class:"card-header"},tz={class:"card-body"},nz=["disabled"],iz={class:"invalid-feedback"},sz={key:0},rz={key:1},oz={class:"mb-0"},az={class:"card rounded-3 shadow"},lz={class:"card-header"},cz={class:"card-body",style:{"font-family":"var(--bs-font-monospace)"}},uz={class:"mb-2"},dz={class:"text-muted fw-bold mb-1"},hz={class:"input-group"},fz=["disabled"],gz={class:"text-muted fw-bold mb-1"},pz={class:"card rounded-3 shadow"},mz={class:"card-header"},_z={class:"card-body"},yz=["disabled"],vz={class:"invalid-feedback"},bz={key:0},wz={key:1},xz={class:"card rounded-3 shadow"},Ez={class:"card-header d-flex align-items-center"},Cz={class:"badge rounded-pill text-bg-success ms-auto"},Sz={class:"card-body"},Tz=["disabled"],Az={class:"invalid-feedback"},kz={key:0},Mz={key:1},Pz={class:"accordion",id:"newConfigurationOptionalAccordion"},Iz={class:"accordion-item"},Dz={class:"accordion-header"},Rz={class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},Lz={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},Oz={class:"accordion-body d-flex flex-column gap-3"},$z={class:"card rounded-3"},Nz={class:"card-body"},Fz={class:"card rounded-3"},Bz={class:"card-body"},Vz={class:"card rounded-3"},zz={class:"card-body"},Wz={class:"card rounded-3"},Yz={class:"card-body"},Hz=["disabled"],jz={key:0,class:"d-flex w-100"},Kz={key:1,class:"d-flex w-100"},Uz={key:2,class:"d-flex w-100 align-items-center"};function Gz(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),V("div",X6,[g("div",q6,[g("div",Z6,[N(a,{to:"/",class:"text-decoration-none"},{default:De(()=>[g("h3",J6,[e[11]||(e[11]=g("i",{class:"bi bi-chevron-left me-4"},null,-1)),N(o,{t:"New Configuration"})])]),_:1})]),g("form",{class:"text-body d-flex flex-column gap-3",onSubmit:e[10]||(e[10]=l=>{l.preventDefault(),this.saveNewConfiguration()})},[g("div",Q6,[g("div",ez,[N(o,{t:"Configuration Name"})]),g("div",tz,[$e(g("input",{type:"text",class:"form-control",placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":e[0]||(e[0]=l=>this.newConfiguration.ConfigurationName=l),disabled:this.loading,required:""},null,8,nz),[[We,this.newConfiguration.ConfigurationName]]),g("div",iz,[this.error?(R(),V("div",sz,we(this.errorMessage),1)):(R(),V("div",rz,[N(o,{t:"Configuration name is invalid. Possible reasons:"}),g("ul",oz,[g("li",null,[N(o,{t:"Configuration name already exist."})]),g("li",null,[N(o,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])])]),g("div",az,[g("div",lz,[N(o,{t:"Private Key"}),e[12]||(e[12]=Ue(" & ")),N(o,{t:"Public Key"})]),g("div",cz,[g("div",uz,[g("label",dz,[g("small",null,[N(o,{t:"Private Key"})])]),g("div",hz,[$e(g("input",{type:"text",class:"form-control",id:"PrivateKey",required:"",disabled:this.loading,"onUpdate:modelValue":e[1]||(e[1]=l=>this.newConfiguration.PrivateKey=l)},null,8,fz),[[We,this.newConfiguration.PrivateKey]]),g("button",{class:"btn btn-outline-primary",type:"button",title:"Regenerate Private Key",onClick:e[2]||(e[2]=l=>r.wireguardGenerateKeypair())},e[13]||(e[13]=[g("i",{class:"bi bi-arrow-repeat"},null,-1)]))])]),g("div",null,[g("label",gz,[g("small",null,[N(o,{t:"Public Key"})])]),$e(g("input",{type:"text",class:"form-control",id:"PublicKey","onUpdate:modelValue":e[3]||(e[3]=l=>this.newConfiguration.PublicKey=l),disabled:""},null,512),[[We,this.newConfiguration.PublicKey]])])])]),g("div",pz,[g("div",mz,[N(o,{t:"Listen Port"})]),g("div",_z,[$e(g("input",{type:"number",class:"form-control",placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":e[4]||(e[4]=l=>this.newConfiguration.ListenPort=l),disabled:this.loading,required:""},null,8,yz),[[We,this.newConfiguration.ListenPort]]),g("div",vz,[this.error?(R(),V("div",bz,we(this.errorMessage),1)):(R(),V("div",wz,[N(o,{t:"Invalid port"})]))])])]),g("div",xz,[g("div",Ez,[N(o,{t:"IP Address/CIDR"}),g("span",Cz,we(s.numberOfAvailableIPs)+" Available IPs",1)]),g("div",Sz,[$e(g("input",{type:"text",class:"form-control",placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":e[5]||(e[5]=l=>this.newConfiguration.Address=l),disabled:this.loading,required:""},null,8,Tz),[[We,this.newConfiguration.Address]]),g("div",Az,[this.error?(R(),V("div",kz,we(this.errorMessage),1)):(R(),V("div",Mz," IP Address/CIDR is invalid "))])])]),e[22]||(e[22]=g("hr",null,null,-1)),g("div",Pz,[g("div",Iz,[g("h2",Dz,[g("button",Rz,[N(o,{t:"Optional Settings"})])]),g("div",Lz,[g("div",Oz,[g("div",$z,[e[14]||(e[14]=g("div",{class:"card-header"},"PreUp",-1)),g("div",Nz,[$e(g("input",{type:"text",class:"form-control",id:"preUp","onUpdate:modelValue":e[6]||(e[6]=l=>this.newConfiguration.PreUp=l)},null,512),[[We,this.newConfiguration.PreUp]])])]),g("div",Fz,[e[15]||(e[15]=g("div",{class:"card-header"},"PreDown",-1)),g("div",Bz,[$e(g("input",{type:"text",class:"form-control",id:"preDown","onUpdate:modelValue":e[7]||(e[7]=l=>this.newConfiguration.PreDown=l)},null,512),[[We,this.newConfiguration.PreDown]])])]),g("div",Vz,[e[16]||(e[16]=g("div",{class:"card-header"},"PostUp",-1)),g("div",zz,[$e(g("input",{type:"text",class:"form-control",id:"postUp","onUpdate:modelValue":e[8]||(e[8]=l=>this.newConfiguration.PostUp=l)},null,512),[[We,this.newConfiguration.PostUp]])])]),g("div",Wz,[e[17]||(e[17]=g("div",{class:"card-header"},"PostDown",-1)),g("div",Yz,[$e(g("input",{type:"text",class:"form-control",id:"postDown","onUpdate:modelValue":e[9]||(e[9]=l=>this.newConfiguration.PostDown=l)},null,512),[[We,this.newConfiguration.PostDown]])])])])])])]),g("button",{class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto",disabled:!this.goodToSubmit||this.loading||this.success},[this.success?(R(),V("span",jz,[N(o,{t:"Success"}),e[18]||(e[18]=Ue("! ")),e[19]||(e[19]=g("i",{class:"bi bi-check-circle-fill ms-2"},null,-1))])):this.loading?(R(),V("span",Uz,[N(o,{t:"Saving..."}),e[21]||(e[21]=g("span",{class:"ms-2 spinner-border spinner-border-sm",role:"status"},null,-1))])):(R(),V("span",Kz,[N(o,{t:"Save Configuration"}),e[20]||(e[20]=g("i",{class:"bi bi-save-fill ms-2"},null,-1))]))],8,Hz)],32)])])}const Xz=je(G6,[["render",Gz]]),qz={name:"configuration"},Zz={class:"mt-md-5 mt-3 text-body"};function Jz(t,e,n,i,s,r){const o=Ee("RouterView");return R(),V("div",Zz,[N(o,null,{default:De(({Component:a,route:l})=>[N($t,{name:"fade2",mode:"out-in"},{default:De(()=>[(R(),Se(p_,null,{default:De(()=>[(R(),Se(ma(a),{key:l.path}))]),_:2},1024))]),_:2},1024)]),_:1})])}const Qz=je(qz,[["render",Jz]]),eW={name:"peerSearch",components:{LocaleText:He},setup(){const t=tt(),e=qn();return{store:t,wireguardConfigurationStore:e}},props:{configuration:Object},data(){return{sort:{status:At("Status"),name:At("Name"),allowed_ip:At("Allowed IPs"),restricted:At("Restricted")},interval:{5e3:At("5 Seconds"),1e4:At("10 Seconds"),3e4:At("30 Seconds"),6e4:At("1 Minutes")},searchString:"",searchStringTimeout:void 0,showDisplaySettings:!1,showMoreSettings:!1}},methods:{debounce(){this.searchStringTimeout?(clearTimeout(this.searchStringTimeout),this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)):this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)},updateSort(t){xt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_sort",value:t},e=>{e.status&&this.store.getConfiguration()})},updateRefreshInterval(t){xt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_refresh_interval",value:t},e=>{e.status&&this.store.getConfiguration()})},downloadAllPeer(){Yt(`/api/downloadAllPeers/${this.configuration.Name}`,{},t=>{console.log(t),window.wireguard.generateZipFiles(t,this.configuration.Name)})}},computed:{searchBarPlaceholder(){return At("Search Peers...")}}},tW={class:"mb-3"},nW={class:"d-flex gap-2 z-3 peerSearchContainer"},iW={class:"mt-3 mt-md-0 flex-grow-1"},sW=["placeholder"],rW={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},oW={class:"container-md d-flex h-100 w-100"},aW={class:"m-auto modal-dialog-centered dashboardModal"},lW={class:"card rounded-3 shadow w-100"},cW={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},uW={class:"mb-0 fw-normal"},dW={class:"card-body px-4 pb-4 d-flex gap-3 flex-column"},hW={class:"text-muted fw-bold mb-2"},fW={class:"list-group"},gW=["onClick"],pW={class:"me-auto"},mW={key:0,class:"bi bi-check text-primary"},_W={class:"text-muted fw-bold mb-2"},yW={class:"list-group"},vW=["onClick"],bW={class:"me-auto"},wW={key:0,class:"bi bi-check text-primary"},xW={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},EW={class:"container-md d-flex h-100 w-100"},CW={class:"m-auto modal-dialog-centered dashboardModal"},SW={class:"card rounded-3 shadow w-100"},TW={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},AW={class:"card-body px-4 pb-4 d-flex gap-3 flex-column pt-0"},kW={class:"text-muted fw-bold mb-2"},MW={class:"list-group"};function PW(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),V("div",tW,[g("div",nW,[N(a,{to:"create",class:"text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm"},{default:De(()=>[e[10]||(e[10]=g("i",{class:"bi bi-plus-lg me-2"},null,-1)),N(o,{t:"Peer"})]),_:1}),g("button",{class:"btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm",onClick:e[0]||(e[0]=l=>this.downloadAllPeer())},[e[11]||(e[11]=g("i",{class:"bi bi-download me-2"},null,-1)),N(o,{t:"Download All"})]),g("div",iW,[$e(g("input",{class:"form-control rounded-3 bg-secondary-subtle border-1 border-secondary-subtle shadow-sm w-100",placeholder:r.searchBarPlaceholder,id:"searchPeers",onKeyup:e[1]||(e[1]=l=>this.debounce()),"onUpdate:modelValue":e[2]||(e[2]=l=>this.searchString=l)},null,40,sW),[[We,this.searchString]])]),g("button",{onClick:e[3]||(e[3]=l=>this.showDisplaySettings=!0),class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",type:"button","aria-expanded":"false"},[e[12]||(e[12]=g("i",{class:"bi bi-filter-circle me-2"},null,-1)),N(o,{t:"Display"})]),g("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",onClick:e[4]||(e[4]=l=>this.$emit("editConfiguration")),type:"button","aria-expanded":"false"},e[13]||(e[13]=[g("i",{class:"bi bi-gear-fill"},null,-1)])),g("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",onClick:e[5]||(e[5]=l=>this.showMoreSettings=!0),type:"button","aria-expanded":"false"},e[14]||(e[14]=[g("i",{class:"bi bi-three-dots"},null,-1)])),N($t,{name:"zoom"},{default:De(()=>[this.showDisplaySettings?(R(),V("div",rW,[g("div",oW,[g("div",aW,[g("div",lW,[g("div",cW,[g("h4",uW,[N(o,{t:"Display"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[6]||(e[6]=l=>this.showDisplaySettings=!1)})]),g("div",dW,[g("div",null,[g("p",hW,[g("small",null,[N(o,{t:"Sort by"})])]),g("div",fW,[(R(!0),V(Oe,null,Ze(this.sort,(l,c)=>(R(),V("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:u=>this.updateSort(c)},[g("span",pW,we(l),1),i.store.Configuration.Server.dashboard_sort===c?(R(),V("i",mW)):ce("",!0)],8,gW))),256))])]),g("div",null,[g("p",_W,[g("small",null,[N(o,{t:"Refresh Interval"})])]),g("div",yW,[(R(!0),V(Oe,null,Ze(this.interval,(l,c)=>(R(),V("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:u=>this.updateRefreshInterval(c)},[g("span",bW,we(l),1),i.store.Configuration.Server.dashboard_refresh_interval===c?(R(),V("i",wW)):ce("",!0)],8,vW))),256))])])])])])])])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.showMoreSettings?(R(),V("div",xW,[g("div",EW,[g("div",CW,[g("div",SW,[g("div",TW,[g("button",{type:"button",class:"btn-close ms-auto",onClick:e[7]||(e[7]=l=>this.showMoreSettings=!1)})]),g("div",AW,[g("div",null,[g("p",kW,[g("small",null,[N(o,{t:"Peer Jobs"})])]),g("div",MW,[g("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[8]||(e[8]=l=>this.$emit("jobsAll"))},[N(o,{t:"Active Jobs"})]),g("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[9]||(e[9]=l=>this.$emit("jobLogs"))},[N(o,{t:"Logs"})])])])])])])])])):ce("",!0)]),_:1})])])}const IW=je(eW,[["render",PW],["__scopeId","data-v-eeead157"]]);function DW(t){return nf()?(e_(t),!0):!1}function gS(t){return typeof t=="function"?t():J(t)}const pS=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const RW=Object.prototype.toString,LW=t=>RW.call(t)==="[object Object]",ah=()=>{},OW=$W();function $W(){var t,e;return pS&&((t=window?.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window?.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function xc(t){var e;const n=gS(t);return(e=n?.$el)!=null?e:n}const mS=pS?window:void 0;function Hg(...t){let e,n,i,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,s]=t,e=mS):[e,n,i,s]=t,!e)return ah;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const r=[],o=()=>{r.forEach(u=>u()),r.length=0},a=(u,d,h,f)=>(u.addEventListener(d,h,f),()=>u.removeEventListener(d,h,f)),l=un(()=>[xc(e),gS(s)],([u,d])=>{if(o(),!u)return;const h=LW(d)?{...d}:d;r.push(...n.flatMap(f=>i.map(p=>a(u,f,p,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),o()};return DW(c),c}let yb=!1;function NW(t,e,n={}){const{window:i=mS,ignore:s=[],capture:r=!0,detectIframe:o=!1}=n;if(!i)return ah;OW&&!yb&&(yb=!0,Array.from(i.document.body.children).forEach(h=>h.addEventListener("click",ah)),i.document.documentElement.addEventListener("click",ah));let a=!0;const l=h=>s.some(f=>{if(typeof f=="string")return Array.from(i.document.querySelectorAll(f)).some(p=>p===h.target||h.composedPath().includes(p));{const p=xc(f);return p&&(h.target===p||h.composedPath().includes(p))}}),u=[Hg(i,"click",h=>{const f=xc(t);if(!(!f||f===h.target||h.composedPath().includes(f))){if(h.detail===0&&(a=!l(h)),!a){a=!0;return}e(h)}},{passive:!0,capture:r}),Hg(i,"pointerdown",h=>{const f=xc(t);a=!l(h)&&!!(f&&!h.composedPath().includes(f))},{passive:!0}),o&&Hg(i,"blur",h=>{setTimeout(()=>{var f;const p=xc(t);((f=i.document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!p?.contains(i.document.activeElement)&&e(h)},0)})].filter(Boolean);return()=>u.forEach(h=>h())}const FW={name:"peerSettingsDropdown",components:{LocaleText:He},setup(){return{dashboardStore:tt()}},props:{Peer:Object},data(){return{deleteBtnDisabled:!1,restrictBtnDisabled:!1,allowAccessBtnDisabled:!1}},methods:{downloadPeer(){Yt("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{if(t.status){const e=new Blob([t.data.file],{type:"text/plain"}),n=URL.createObjectURL(e),i=`${t.data.fileName}.conf`,s=document.createElement("a");s.href=n,s.download=i,s.click(),this.dashboardStore.newMessage("WGDashboard","Peer download started","success")}else this.dashboardStore.newMessage("Server",t.message,"danger")})},downloadQRCode(){Yt("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{t.status?this.$emit("qrcode",t.data.file):this.dashboardStore.newMessage("Server",t.message,"danger")})},deletePeer(){this.deleteBtnDisabled=!0,xt(`/api/deletePeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.deleteBtnDisabled=!1})},restrictPeer(){this.restrictBtnDisabled=!0,xt(`/api/restrictPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.restrictBtnDisabled=!1})},allowAccessPeer(){this.allowAccessBtnDisabled=!0,xt(`/api/allowAccessPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.allowAccessBtnDisabled=!1})}}},BW={class:"dropdown-menu mt-2 shadow-lg d-block rounded-3",style:{"max-width":"200px"}},VW={style:{"font-size":"0.8rem","padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},zW={class:"text-body d-flex"},WW={class:"ms-auto"},YW={key:1},HW={class:"w-100 dropdown-item text-muted",style:{"white-space":"break-spaces","font-size":"0.7rem"}},jW={key:2,class:"d-flex",style:{"padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},KW={key:1};function UW(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("ul",BW,[this.Peer.restricted?(R(),V("li",KW,[g("a",{class:Pe(["dropdown-item d-flex text-warning",{disabled:this.allowAccessBtnDisabled}]),onClick:e[7]||(e[7]=a=>this.allowAccessPeer()),role:"button"},[e[21]||(e[21]=g("i",{class:"me-auto bi bi-unlock"},null,-1)),this.allowAccessBtnDisabled?(R(),Se(o,{key:1,t:"Allowing Access..."})):(R(),Se(o,{key:0,t:"Allow Access"}))],2)])):(R(),V(Oe,{key:0},[this.Peer.status==="running"?(R(),V(Oe,{key:0},[g("li",VW,[g("span",zW,[e[8]||(e[8]=g("i",{class:"bi bi-box-arrow-in-right"},null,-1)),g("span",WW,we(this.Peer.endpoint),1)])]),e[9]||(e[9]=g("li",null,[g("hr",{class:"dropdown-divider"})],-1))],64)):ce("",!0),this.Peer.private_key?(R(),V("li",jW,[g("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[0]||(e[0]=a=>this.downloadPeer())},e[10]||(e[10]=[g("i",{class:"me-auto bi bi-download"},null,-1)])),g("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[1]||(e[1]=a=>this.downloadQRCode())},e[11]||(e[11]=[g("i",{class:"me-auto bi bi-qr-code"},null,-1)])),g("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[2]||(e[2]=a=>this.$emit("share"))},e[12]||(e[12]=[g("i",{class:"me-auto bi bi-share"},null,-1)]))])):(R(),V("li",YW,[g("small",HW,[N(o,{t:"Download & QR Code is not available due to no private key set for this peer"})])])),e[19]||(e[19]=g("li",null,[g("hr",{class:"dropdown-divider"})],-1)),g("li",null,[g("a",{class:"dropdown-item d-flex",role:"button",onClick:e[3]||(e[3]=a=>this.$emit("setting"))},[e[13]||(e[13]=g("i",{class:"me-auto bi bi-pen"},null,-1)),e[14]||(e[14]=Ue()),N(o,{t:"Peer Settings"})])]),g("li",null,[g("a",{class:"dropdown-item d-flex",role:"button",onClick:e[4]||(e[4]=a=>this.$emit("jobs"))},[e[15]||(e[15]=g("i",{class:"me-auto bi bi-app-indicator"},null,-1)),e[16]||(e[16]=Ue()),N(o,{t:"Schedule Jobs"})])]),e[20]||(e[20]=g("li",null,[g("hr",{class:"dropdown-divider"})],-1)),g("li",null,[g("a",{class:Pe(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:e[5]||(e[5]=a=>this.restrictPeer()),role:"button"},[e[17]||(e[17]=g("i",{class:"me-auto bi bi-lock"},null,-1)),this.restrictBtnDisabled?(R(),Se(o,{key:1,t:"Restricting..."})):(R(),Se(o,{key:0,t:"Restrict Access"}))],2)]),g("li",null,[g("a",{class:Pe(["dropdown-item d-flex fw-bold text-danger",{disabled:this.deleteBtnDisabled}]),onClick:e[6]||(e[6]=a=>this.deletePeer()),role:"button"},[e[18]||(e[18]=g("i",{class:"me-auto bi bi-trash"},null,-1)),this.deleteBtnDisabled?(R(),Se(o,{key:1,t:"Deleting..."})):(R(),Se(o,{key:0,t:"Delete"}))],2)])],64))])}const GW=je(FW,[["render",UW],["__scopeId","data-v-34ee3204"]]),XW={name:"peer",components:{LocaleText:He,PeerSettingsDropdown:GW},props:{Peer:Object},data(){return{}},setup(){const t=xe(null),e=xe(!1);return NW(t,n=>{e.value=!1}),{target:t,subMenuOpened:e}},computed:{getLatestHandshake(){return this.Peer.latest_handshake.includes(",")?this.Peer.latest_handshake.split(",")[0]:this.Peer.latest_handshake}}},qW={key:0,class:"card-header bg-transparent d-flex align-items-center gap-2 border-0"},ZW={style:{"font-size":"0.8rem"},class:"ms-auto d-flex gap-2"},JW={class:"text-primary"},QW={class:"text-success"},eY={key:0,class:"text-secondary"},tY={key:1,class:"border-0 card-header bg-transparent text-warning fw-bold",style:{"font-size":"0.8rem"}},nY={class:"card-body pt-1",style:{"font-size":"0.9rem"}},iY={class:"mb-1"},sY={class:"d-block"},rY={class:"text-muted"},oY={class:"d-block"},aY={class:"d-flex align-items-end"};function lY(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("PeerSettingsDropdown");return R(),V("div",{class:Pe(["card shadow-sm rounded-3 peerCard bg-transparent",{"border-warning":n.Peer.restricted}])},[g("div",null,[n.Peer.restricted?(R(),V("div",tY,[e[11]||(e[11]=g("i",{class:"bi-lock-fill me-2"},null,-1)),N(o,{t:"Access Restricted"})])):(R(),V("div",qW,[g("div",{class:Pe(["dot ms-0",{active:n.Peer.status==="running"}])},null,2),g("div",ZW,[g("span",JW,[e[6]||(e[6]=g("i",{class:"bi bi-arrow-down"},null,-1)),g("strong",null,we((n.Peer.cumu_receive+n.Peer.total_receive).toFixed(4)),1),e[7]||(e[7]=Ue(" GB "))]),g("span",QW,[e[8]||(e[8]=g("i",{class:"bi bi-arrow-up"},null,-1)),g("strong",null,we((n.Peer.cumu_sent+n.Peer.total_sent).toFixed(4)),1),e[9]||(e[9]=Ue(" GB "))]),n.Peer.latest_handshake!=="No Handshake"?(R(),V("span",eY,[e[10]||(e[10]=g("i",{class:"bi bi-arrows-angle-contract"},null,-1)),Ue(" "+we(r.getLatestHandshake)+" ago ",1)])):ce("",!0)])]))]),g("div",nY,[g("h6",null,we(n.Peer.name?n.Peer.name:"Untitled Peer"),1),g("div",iY,[e[12]||(e[12]=g("small",{class:"text-muted"}," Public Key ",-1)),g("small",sY,[g("samp",null,we(n.Peer.id),1)])]),g("div",null,[g("small",rY,[N(o,{t:"Allowed IPs"})]),g("small",oY,[g("samp",null,we(n.Peer.allowed_ip),1)])]),g("div",aY,[g("div",{class:Pe(["ms-auto px-2 rounded-3 subMenuBtn",{active:this.subMenuOpened}])},[g("a",{role:"button",class:"text-body",onClick:e[0]||(e[0]=l=>this.subMenuOpened=!0)},e[13]||(e[13]=[g("h5",{class:"mb-0"},[g("i",{class:"bi bi-three-dots"})],-1)])),N($t,{name:"slide-fade"},{default:De(()=>[this.subMenuOpened?(R(),Se(a,{key:0,onQrcode:e[1]||(e[1]=l=>this.$emit("qrcode",l)),onSetting:e[2]||(e[2]=l=>this.$emit("setting")),onJobs:e[3]||(e[3]=l=>this.$emit("jobs")),onRefresh:e[4]||(e[4]=l=>this.$emit("refresh")),onShare:e[5]||(e[5]=l=>this.$emit("share")),Peer:n.Peer,ref:"target"},null,8,["Peer"])):ce("",!0)]),_:1})],2)])])],2)}const cY=je(XW,[["render",lY],["__scopeId","data-v-f14909a4"]]);/*! * @kurkle/color v0.3.2 * https://github.com/kurkle/color#readme * (c) 2023 Jukka Kurkela @@ -57,14 +57,14 @@ * Released under the MIT License */class X8{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,i,s){const r=n.listeners[s],o=n.duration;r.forEach(a=>a({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=TS.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const r=i.items;let o=r.length-1,a=!1,l;for(;o>=0;--o)l=r[o],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(e),a=!0):(r[o]=r[r.length-1],r.pop());a&&(s.draw(),this._notify(s,i,e,"progress")),r.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),n+=r.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let i=n.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,i)),i}listen(e,n,i){this._getAnims(e).listeners[n].push(i)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const i=n.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Zs=new X8;const zb="transparent",q8={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=Ib(t||zb),s=i.valid&&Ib(e||zb);return s&&s.valid?s.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class Z8{constructor(e,n,i,s){const r=n[i];s=Cc([e.to,s,r,e.from]);const o=Cc([e.from,r,s]);this._active=!0,this._fn=e.fn||q8[e.type||typeof o],this._easing=Gc[e.easing]||Gc.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,n,i){if(this._active){this._notify(!1);const s=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=r,this._loop=!!e.loop,this._to=Cc([e.to,n,s,e.from]),this._from=Cc([e.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,i=this._duration,s=this._prop,r=this._from,o=this._loop,a=this._to;let l;if(this._active=r!==a&&(o||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(r,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,i)=>{e.push({res:n,rej:i})})}_notify(e){const n=e?"res":"rej",i=this._promises||[];for(let s=0;s{const r=e[s];if(!ut(r))return;const o={};for(const a of n)o[a]=r[a];(zt(r.properties)&&r.properties||[s]).forEach(a=>{(a===s||!i.has(a))&&i.set(a,o)})})}_animateOptions(e,n){const i=n.options,s=Q8(e,i);if(!s)return[];const r=this._createAnimations(s,i);return i.$shared&&J8(e.options.$animations,i).then(()=>{e.options=i},()=>{}),r}_createAnimations(e,n){const i=this._properties,s=[],r=e.$animations||(e.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(e,n));continue}const u=n[c];let d=r[c];const h=i.get(c);if(d)if(h&&d.active()){d.update(h,u,a);continue}else d.cancel();if(!h||!h.duration){e[c]=u;continue}r[c]=d=new Z8(h,e,c,u),s.push(d)}return s}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const i=this._createAnimations(e,n);if(i.length)return Zs.add(this._chart,i),!0}}function J8(t,e){const n=[],i=Object.keys(e);for(let s=0;s0||!n&&r<0)return s.index}return null}function Kb(t,e){const{chart:n,_cachedMeta:i}=t,s=n._stacks||(n._stacks={}),{iScale:r,vScale:o,index:a}=i,l=r.axis,c=o.axis,u=iH(r,o,i),d=e.length;let h;for(let f=0;fn[i].axis===e).shift()}function oH(t,e){return vo(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function aH(t,e,n){return vo(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function hc(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const s of e){const r=s._stacks;if(!r||r[i]===void 0||r[i][n]===void 0)return;delete r[i][n],r[i]._visualValues!==void 0&&r[i]._visualValues[n]!==void 0&&delete r[i]._visualValues[n]}}}const Xg=t=>t==="reset"||t==="none",Ub=(t,e)=>e?t:Object.assign({},t),lH=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:jS(n,!0),values:null};class bo{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Hb(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&hc(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(d,h,f,p)=>d==="x"?h:d==="r"?p:f,r=n.xAxisID=it(i.xAxisID,Gg(e,"x")),o=n.yAxisID=it(i.yAxisID,Gg(e,"y")),a=n.rAxisID=it(i.rAxisID,Gg(e,"r")),l=n.indexAxis,c=n.iAxisID=s(l,r,o,a),u=n.vAxisID=s(l,o,r,a);n.xScale=this.getScaleForId(r),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&kb(this._data,this),e._stacked&&hc(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),i=this._data;if(ut(n)){const s=this._cachedMeta;this._data=nH(n,s)}else if(i!==n){if(i){kb(i,this);const s=this._cachedMeta;hc(s),s._parsed=[]}n&&Object.isExtensible(n)&&UY(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const r=n._stacked;n._stacked=Hb(n.vScale,n),n.stack!==i.stack&&(s=!0,hc(n),n.stack=i.stack),this._resyncElements(e),(s||r!==n._stacked)&&Kb(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:i,_data:s}=this,{iScale:r,_stacked:o}=i,a=r.axis;let l=e===0&&n===s.length?!0:i._sorted,c=e>0&&i._parsed[e-1],u,d,h;if(this._parsing===!1)i._parsed=s,i._sorted=!0,h=s;else{zt(s[e])?h=this.parseArrayData(i,s,e,n):ut(s[e])?h=this.parseObjectData(i,s,e,n):h=this.parsePrimitiveData(i,s,e,n);const f=()=>d[a]===null||c&&d[a]m||d=0;--h)if(!p()){this.updateRangeFromParsed(c,e,f,l);break}}return c}getAllParsedValues(e){const n=this._cachedMeta._parsed,i=[];let s,r,o;for(s=0,r=n.length;s=0&&ethis.getContext(i,s,n),m=c.resolveNamedOptions(h,f,p,d);return m.$shared&&(m.$shared=l,r[o]=Object.freeze(Ub(m,l))),m}_resolveAnimations(e,n,i){const s=this.chart,r=this._cachedDataOpts,o=`animation-${n}`,a=r[o];if(a)return a;let l;if(s.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(e,i,n))}const c=new HS(s,l&&l.animations);return l&&l._cacheable&&(r[o]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||Xg(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const i=this.resolveDataElementOptions(e,n),s=this._sharedOptions,r=this.getSharedOptions(i),o=this.includeOptions(n,r)||r!==s;return this.updateSharedOptions(r,n,i),{sharedOptions:r,includeOptions:o}}updateElement(e,n,i,s){Xg(s)?Object.assign(e,i):this._resolveAnimations(n,s).update(e,i)}updateSharedOptions(e,n,i){e&&!Xg(n)&&this._resolveAnimations(void 0,n).update(e,i)}_setStyle(e,n,i,s){e.active=s;const r=this.getStyle(n,s);this._resolveAnimations(n,i,s).update(e,{options:!s&&this.getSharedOptions(r)||r})}removeHoverStyle(e,n,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,n,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,i=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=i.length,r=n.length,o=Math.min(r,s);o&&this.parse(0,o),r>s?this._insertElements(s,r-s,e):r{for(c.length+=n,a=c.length-1;a>=o;a--)c[a]=c[a-n]};for(l(r),a=e;as-r))}return t._cache.$bar}function uH(t){const e=t.iScale,n=cH(e,t.type);let i=e._length,s,r,o,a;const l=()=>{o===32767||o===-32768||(fu(a)&&(i=Math.min(i,Math.abs(o-a)||i)),a=o)};for(s=0,r=n.length;s0?s[t-1]:null,a=tMath.abs(a)&&(l=a,c=o),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:r,min:o,max:a}}function KS(t,e,n,i){return zt(t)?fH(t,e,n,i):e[n.axis]=n.parse(t,i),e}function Gb(t,e,n,i){const s=t.iScale,r=t.vScale,o=s.getLabels(),a=s===r,l=[];let c,u,d,h;for(c=n,u=n+i;c=n?1:-1)}function pH(t){let e,n,i,s,r;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.baseu.controller.options.grouped),r=i.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[i.axis],c=u=>{const d=u._parsed.find(f=>f[i.axis]===l),h=d&&d[u.vScale.axis];if(ft(h)||isNaN(h))return!0};for(const u of s)if(!(n!==void 0&&c(u))&&((r===!1||o.indexOf(u.stack)===-1||r===void 0&&u.stack===void 0)&&o.push(u.stack),u.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,i){const s=this._getStacks(e,i),r=n!==void 0?s.indexOf(n):-1;return r===-1?s.length-1:r}_getRuler(){const e=this.options,n=this._cachedMeta,i=n.iScale,s=[];let r,o;for(r=0,o=n.data.length;r=0;--i)n=Math.max(n,e[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:r}=n,o=this.getParsed(e),a=s.getLabelForValue(o.x),l=r.getLabelForValue(o.y),c=o._custom;return{label:i[e]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,i,s){const r=s==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,s),u=o.axis,d=a.axis;for(let h=n;hgu(x,a,l,!0)?1:Math.max(E,E*n,w,w*n),p=(x,E,w)=>gu(x,a,l,!0)?-1:Math.min(E,E*n,w,w*n),m=f(0,c,d),y=f(cn,u,h),v=p(Ft,c,d),b=p(Ft+cn,u,h);i=(m-v)/2,s=(y-b)/2,r=-(m+v)/2,o=-(y+b)/2}return{ratioX:i,ratioY:s,offsetX:r,offsetY:o}}class GS extends bo{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=e.legend.options;return n.labels.map((r,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}};constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let r=l=>+i[l];if(ut(i[e])){const{key:l="value"}=this._parsing;r=c=>+lo(i[c],l)}let o,a;for(o=e,a=e+n;o0&&!isNaN(e)?Nt*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=ju(n._parsed[e],i.options.locale);return{label:s[e]||"",value:r}}getMaxBorderWidth(e){let n=0;const i=this.chart;let s,r,o,a,l;if(!e){for(s=0,r=i.data.datasets.length;s0&&this.getParsed(n-1);for(let w=0;w=b){T.skip=!0;continue}const A=this.getParsed(w),k=ft(A[f]),P=T[h]=o.getPixelForValue(A[h],w),B=T[f]=r||k?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,A,l):A[f],w);T.skip=isNaN(P)||isNaN(B)||k,T.stop=w>0&&Math.abs(A[h]-E[h])>y,m&&(T.parsed=A,T.raw=c.data[w]),d&&(T.options=u||this.resolveDataElementOptions(w,S.active?"active":s)),v||this.updateElement(S,w,T,s),E=A}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,i=n.options&&n.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const r=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,r,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}class wH extends bo{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=e.legend.options;return n.labels.map((r,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=ju(n._parsed[e].r,i.options.locale);return{label:s[e]||"",value:r}}parseObjectData(e,n,i,s){return NS.bind(this)(e,n,i,s)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,s)=>{const r=this.getParsed(s).r;!isNaN(r)&&this.chart.getDataVisibility(s)&&(rn.max&&(n.max=r))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,i=e.options,s=Math.min(n.right-n.left,n.bottom-n.top),r=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0),a=(r-o)/e.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,n,i,s){const r=s==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,h=c.getIndexAngle(0)-.5*Ft;let f=h,p;const m=360/this.countVisibleElements();for(p=0;p{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(e,n,i){return this.chart.getDataVisibility(e)?as(this.resolveDataElementOptions(e,n).angle||i):0}}class xH extends GS{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class EH extends bo{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(e){const n=this._cachedMeta.vScale,i=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(e,n,i,s){return NS.bind(this)(e,n,i,s)}update(e){const n=this._cachedMeta,i=n.dataset,s=n.data||[],r=n.iScale.getLabels();if(i.points=s,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:r.length===s.length,options:o};this.updateElement(i,void 0,a,e)}this.updateElements(s,0,s.length,e)}updateElements(e,n,i,s){const r=this._cachedMeta.rScale,o=s==="reset";for(let a=n;a0&&this.getParsed(n-1);for(let E=n;E0&&Math.abs(S[f]-x[f])>v,y&&(T.parsed=S,T.raw=c.data[E]),h&&(T.options=d||this.resolveDataElementOptions(E,w.active?"active":s)),b||this.updateElement(w,E,T,s),x=S}this.updateSharedOptions(d,s,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!n.length)return s;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,r,o)/2}}function $o(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ey{static override(e){Object.assign(ey.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return $o()}parse(){return $o()}format(){return $o()}add(){return $o()}diff(){return $o()}startOf(){return $o()}endOf(){return $o()}}var SH={_date:ey};function TH(t,e,n,i){const{controller:s,data:r,_sorted:o}=t,a=s._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&o&&r.length){const l=a._reversePixels?jY:cr;if(i){if(s._sharedOptions){const c=r[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const d=l(r,e,n-u),h=l(r,e,n+u);return{lo:d.lo,hi:h.hi}}}}else return l(r,e,n)}return{lo:0,hi:r.length-1}}function Ku(t,e,n,i,s){const r=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,l=r.length;a{l[o]&&l[o](e[n],s)&&(r.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(e.x,e.y,s))}),i&&!a?[]:r}var PH={evaluateInteractionItems:Ku,modes:{index(t,e,n,i){const s=Yo(e,t),r=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Zg(t,s,r,i,o):Jg(t,s,r,!1,i,o),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(t,e,n,i){const s=Yo(e,t),r=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Zg(t,s,r,i,o):Jg(t,s,r,!1,i,o);if(a.length>0){const l=a[0].datasetIndex,c=t.getDatasetMeta(l).data;a=[];for(let u=0;un.pos===e)}function Jb(t,e){return t.filter(n=>qS.indexOf(n.pos)===-1&&n.box.axis===e)}function gc(t,e){return t.sort((n,i)=>{const s=e?i:n,r=e?n:i;return s.weight===r.weight?s.index-r.index:s.weight-r.weight})}function IH(t){const e=[];let n,i,s,r,o,a;for(n=0,i=(t||[]).length;nc.box.fullSize),!0),i=gc(fc(e,"left"),!0),s=gc(fc(e,"right")),r=gc(fc(e,"top"),!0),o=gc(fc(e,"bottom")),a=Jb(e,"x"),l=Jb(e,"y");return{fullSize:n,leftAndTop:i.concat(r),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:fc(e,"chartArea"),vertical:i.concat(s).concat(l),horizontal:r.concat(o).concat(a)}}function Qb(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function ZS(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function OH(t,e,n,i){const{pos:s,box:r}=n,o=t.maxPadding;if(!ut(s)){n.size&&(t[s]-=n.size);const d=i[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?r.height:r.width),n.size=d.size/d.count,t[s]+=n.size}r.getPadding&&ZS(o,r.getPadding());const a=Math.max(0,e.outerWidth-Qb(o,t,"left","right")),l=Math.max(0,e.outerHeight-Qb(o,t,"top","bottom")),c=a!==t.w,u=l!==t.h;return t.w=a,t.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function $H(t){const e=t.maxPadding;function n(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function NH(t,e){const n=e.maxPadding;function i(s){const r={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{r[o]=Math.max(e[o],n[o])}),r}return i(t?["left","right"]:["top","bottom"])}function Sc(t,e,n,i){const s=[];let r,o,a,l,c,u;for(r=0,o=t.length,c=0;r{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=l.reduce((m,y)=>y.box.options&&y.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:n,padding:s,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/u,hBoxMaxHeight:o/2}),h=Object.assign({},s);ZS(h,Xn(i));const f=Object.assign({maxPadding:h,w:r,h:o,x:s.left,y:s.top},s),p=RH(l.concat(c),d);Sc(a.fullSize,f,d,p),Sc(l,f,d,p),Sc(c,f,d,p)&&Sc(l,f,d,p),$H(f),e1(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,e1(a.rightAndBottom,f,d,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},Tt(a.chartArea,m=>{const y=m.box;Object.assign(y,t.chartArea),y.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class JS{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,i){}removeEventListener(e,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,i,s){return n=Math.max(0,n||e.width),i=i||e.height,{width:n,height:Math.max(0,s?Math.floor(n/s):i)}}isAttached(e){return!0}updateConfig(e){}}class FH extends JS{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const lh="$chartjs",BH={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},t1=t=>t===null||t==="";function VH(t,e){const n=t.style,i=t.getAttribute("height"),s=t.getAttribute("width");if(t[lh]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",t1(s)){const r=Nb(t,"width");r!==void 0&&(t.width=r)}if(t1(i))if(t.style.height==="")t.height=t.width/(e||2);else{const r=Nb(t,"height");r!==void 0&&(t.height=r)}return t}const QS=F8?{passive:!0}:!1;function zH(t,e,n){t&&t.addEventListener(e,n,QS)}function WH(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,QS)}function YH(t,e){const n=BH[t.type]||t.type,{x:i,y:s}=Yo(t,e);return{type:n,chart:e,native:t,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Mh(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function HH(t,e,n){const i=t.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Mh(a.addedNodes,i),o=o&&!Mh(a.removedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function jH(t,e,n){const i=t.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Mh(a.removedNodes,i),o=o&&!Mh(a.addedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const mu=new Map;let n1=0;function eT(){const t=window.devicePixelRatio;t!==n1&&(n1=t,mu.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function KH(t,e){mu.size||window.addEventListener("resize",eT),mu.set(t,e)}function UH(t){mu.delete(t),mu.size||window.removeEventListener("resize",eT)}function GH(t,e,n){const i=t.canvas,s=i&&Q_(i);if(!s)return;const r=AS((a,l)=>{const c=s.clientWidth;n(a,l),c{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||r(c,u)});return o.observe(s),KH(t,r),o}function Qg(t,e,n){n&&n.disconnect(),e==="resize"&&UH(t)}function XH(t,e,n){const i=t.canvas,s=AS(r=>{t.ctx!==null&&n(YH(r,t))},t);return zH(i,e,s),s}class qH extends JS{acquireContext(e,n){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(VH(e,n),i):null}releaseContext(e){const n=e.canvas;if(!n[lh])return!1;const i=n[lh].initial;["height","width"].forEach(r=>{const o=i[r];ft(o)?n.removeAttribute(r):n.setAttribute(r,o)});const s=i.style||{};return Object.keys(s).forEach(r=>{n.style[r]=s[r]}),n.width=n.width,delete n[lh],!0}addEventListener(e,n,i){this.removeEventListener(e,n);const s=e.$proxies||(e.$proxies={}),o={attach:HH,detach:jH,resize:GH}[n]||XH;s[n]=o(e,n,i)}removeEventListener(e,n){const i=e.$proxies||(e.$proxies={}),s=i[n];if(!s)return;({attach:Qg,detach:Qg,resize:Qg}[n]||WH)(e,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,i,s){return N8(e,n,i,s)}isAttached(e){const n=e&&Q_(e);return!!(n&&n.isConnected)}}function ZH(t){return!J_()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?FH:qH}let xr=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:n,y:i}=this.getProps(["x","y"],e);return{x:n,y:i}}hasValue(){return Pl(this.x)&&Pl(this.y)}getProps(e,n){const i=this.$animations;if(!n||!i)return this;const s={};return e.forEach(r=>{s[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),s}};function JH(t,e){const n=t.options.ticks,i=QH(t),s=Math.min(n.maxTicksLimit||i,i),r=n.major.enabled?tj(e):[],o=r.length,a=r[0],l=r[o-1],c=[];if(o>s)return nj(e,c,r,o/s),c;const u=ej(r,e,s);if(o>0){let d,h;const f=o>1?Math.round((l-a)/(o-1)):null;for(Rd(e,c,u,ft(f)?0:a-f,a),d=0,h=o-1;ds)return l}return Math.max(s,1)}function tj(t){const e=[];let n,i;for(n=0,i=t.length;nt==="left"?"right":t==="right"?"left":t,i1=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,s1=(t,e)=>Math.min(e||t,t);function r1(t,e){const n=[],i=t.length/e,s=t.length;let r=0;for(;ro+a)))return l}function oj(t,e){Tt(t,n=>{const i=n.gc,s=i.length/2;let r;if(s>e){for(r=0;ri?i:n,i=s&&n>i?n:i,{min:Ci(n,Ci(i,n)),max:Ci(i,Ci(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Dt(this.options.beforeUpdate,[this])}update(e,n,i){const{beginAtZero:s,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=p8(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=r||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,f=Dn(this.chart.width-d,0,this.maxWidth);a=e.offset?this.maxWidth/i:f/(i-1),d+6>a&&(a=f/(i-(e.offset?.5:1)),l=this.maxHeight-pc(e.grid)-n.padding-o1(e.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),o=H_(Math.min(Math.asin(Dn((u.highest.height+6)/a,-1,1)),Math.asin(Dn(l/c,-1,1))-Math.asin(Dn(h/c,-1,1)))),o=Math.max(s,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){Dt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Dt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:i,title:s,grid:r}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=o1(s,n.options.font);if(a?(e.width=this.maxWidth,e.height=pc(r)+l):(e.height=this.maxHeight,e.width=pc(r)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),f=i.padding*2,p=as(this.labelRotation),m=Math.cos(p),y=Math.sin(p);if(a){const v=i.mirror?0:y*d.width+m*h.height;e.height=Math.min(this.maxHeight,e.height+v+f)}else{const v=i.mirror?0:m*d.width+y*h.height;e.width=Math.min(this.maxWidth,e.width+v+f)}this._calculatePadding(c,u,y,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,i,s){const{ticks:{align:r,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,f=0;l?c?(h=s*e.width,f=i*n.height):(h=i*e.height,f=s*n.width):r==="start"?f=n.width:r==="end"?h=e.width:r!=="inner"&&(h=e.width/2,f=n.width/2),this.paddingLeft=Math.max((h-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-d+o)*this.width/(this.width-d),0)}else{let u=n.height/2,d=e.height/2;r==="start"?(u=0,d=e.height):r==="end"&&(u=n.height,d=0),this.paddingTop=u+o,this.paddingBottom=d+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Dt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,i;for(n=0,i=e.length;n({width:o[k]||0,height:a[k]||0});return{first:A(0),last:A(n-1),widest:A(S),highest:A(T),widths:o,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return HY(this._alignToPixels?Oo(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&ea*s?a/i:l/s:l*s0}_computeGridLineItems(e){const n=this.axis,i=this.chart,s=this.options,{grid:r,position:o,border:a}=s,l=r.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=pc(r),f=[],p=a.setContext(this.getContext()),m=p.display?p.width:0,y=m/2,v=function(D){return Oo(i,D,m)};let b,x,E,w,S,T,A,k,P,B,Y,ne;if(o==="top")b=v(this.bottom),T=this.bottom-h,k=b-y,B=v(e.top)+y,ne=e.bottom;else if(o==="bottom")b=v(this.top),B=e.top,ne=v(e.bottom)-y,T=b+y,k=this.top+h;else if(o==="left")b=v(this.right),S=this.right-h,A=b-y,P=v(e.left)+y,Y=e.right;else if(o==="right")b=v(this.left),P=e.left,Y=v(e.right)-y,S=b+y,A=this.left+h;else if(n==="x"){if(o==="center")b=v((e.top+e.bottom)/2+.5);else if(ut(o)){const D=Object.keys(o)[0],z=o[D];b=v(this.chart.scales[D].getPixelForValue(z))}B=e.top,ne=e.bottom,T=b+y,k=T+h}else if(n==="y"){if(o==="center")b=v((e.left+e.right)/2);else if(ut(o)){const D=Object.keys(o)[0],z=o[D];b=v(this.chart.scales[D].getPixelForValue(z))}S=b-y,A=S-h,P=e.left,Y=e.right}const $=it(s.ticks.maxTicksLimit,d),F=Math.max(1,Math.ceil(d/$));for(x=0;x0&&(ue-=I/2);break}le={left:ue,top:ee,width:I+ie.width,height:te+ie.height,color:F.backdropColor}}y.push({label:E,font:k,textOffset:Y,options:{rotation:m,color:z,strokeColor:X,strokeWidth:Z,textAlign:H,textBaseline:ne,translation:[w,S],backdrop:le}})}return y}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-as(this.labelRotation))return e==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:i,mirror:s,padding:r}}=this.options,o=this._getLabelSizes(),a=e+r,l=o.widest.width;let c,u;return n==="left"?s?(u=this.right+r,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?s?(u=this.left+r,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:i,top:s,width:r,height:o}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(i,s,r,o),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(r=>r.value===e);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const n=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let r,o;const a=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(n.display)for(r=0,o=s.length;r{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let r,o;for(r=0,o=n.length;r{const i=n.split("."),s=i.pop(),r=[t].concat(i).join("."),o=e[n].split("."),a=o.pop(),l=o.join(".");tn.route(r,s,l,a)})}function fj(t){return"id"in t&&"defaults"in t}class gj{constructor(){this.controllers=new Ld(bo,"datasets",!0),this.elements=new Ld(xr,"elements"),this.plugins=new Ld(Object,"plugins"),this.scales=new Ld(va,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,i){[...n].forEach(s=>{const r=i||this._getRegistryForType(s);i||r.isForType(s)||r===this.plugins&&s.id?this._exec(e,r,s):Tt(s,o=>{const a=i||this._getRegistryForType(o);this._exec(e,a,o)})})}_exec(e,n,i){const s=Y_(e);Dt(i["before"+s],[],i),n[e](i),Dt(i["after"+s],[],i)}_getRegistryForType(e){for(let n=0;nr.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(s(n,i),e,"stop"),this._notify(s(i,n),e,"start")}}function mj(t){const e={},n=[],i=Object.keys(xs.plugins.items);for(let r=0;r1&&a1(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function l1(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function Ej(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(i=>i.xAxisID===t||i.yAxisID===t);if(n.length)return l1(t,"x",n[0])||l1(t,"y",n[0])}return{}}function Cj(t,e){const n=da[t.type]||{scales:{}},i=e.scales||{},s=om(t.type,e),r=Object.create(null);return Object.keys(i).forEach(o=>{const a=i[o];if(!ut(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=am(o,a,Ej(o,t),tn.scales[a.type]),c=wj(l,s),u=n.scales||{};r[o]=Kc(Object.create(null),[{axis:l},a,u[l],u[c]])}),t.data.datasets.forEach(o=>{const a=o.type||t.type,l=o.indexAxis||om(a,e),u=(da[a]||{}).scales||{};Object.keys(u).forEach(d=>{const h=bj(d,l),f=o[h+"AxisID"]||h;r[f]=r[f]||Object.create(null),Kc(r[f],[{axis:h},i[f],u[d]])})}),Object.keys(r).forEach(o=>{const a=r[o];Kc(a,[tn.scales[a.type],tn.scale])}),r}function tT(t){const e=t.options||(t.options={});e.plugins=it(e.plugins,{}),e.scales=Cj(t,e)}function nT(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function Sj(t){return t=t||{},t.data=nT(t.data),tT(t),t}const c1=new Map,iT=new Set;function Od(t,e){let n=c1.get(t);return n||(n=e(),c1.set(t,n),iT.add(n)),n}const mc=(t,e,n)=>{const i=lo(e,n);i!==void 0&&t.add(i)};let Tj=class{constructor(e){this._config=Sj(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=nT(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),tT(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Od(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Od(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Od(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,i=this.type;return Od(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const i=this._scopeCache;let s=i.get(e);return(!s||n)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,n,i){const{options:s,type:r}=this,o=this._cachedScopes(e,i),a=o.get(n);if(a)return a;const l=new Set;n.forEach(u=>{e&&(l.add(e),u.forEach(d=>mc(l,e,d))),u.forEach(d=>mc(l,s,d)),u.forEach(d=>mc(l,da[r]||{},d)),u.forEach(d=>mc(l,tn,d)),u.forEach(d=>mc(l,sm,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),iT.has(n)&&o.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,da[n]||{},tn.datasets[n]||{},{type:n},tn,sm]}resolveNamedOptions(e,n,i,s=[""]){const r={$shared:!0},{resolver:o,subPrefixes:a}=u1(this._resolverCache,e,s);let l=o;if(kj(o,n)){r.$shared=!1,i=co(i)?i():i;const c=this.createResolver(e,i,a);l=Il(o,i,c)}for(const c of n)r[c]=l[c];return r}createResolver(e,n,i=[""],s){const{resolver:r}=u1(this._resolverCache,e,i);return ut(n)?Il(r,n,void 0,s):r}};function u1(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const s=n.join();let r=i.get(s);return r||(r={resolver:X_(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(s,r)),r}const Aj=t=>ut(t)&&Object.getOwnPropertyNames(t).some(e=>co(t[e]));function kj(t,e){const{isScriptable:n,isIndexable:i}=RS(t);for(const s of e){const r=n(s),o=i(s),a=(o||r)&&t[s];if(r&&(co(a)||Aj(a))||o&&zt(a))return!0}return!1}var Mj="4.4.4";const Pj=["top","bottom","left","right","chartArea"];function d1(t,e){return t==="top"||t==="bottom"||Pj.indexOf(t)===-1&&e==="x"}function h1(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function f1(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Dt(n&&n.onComplete,[t],e)}function Ij(t){const e=t.chart,n=e.options.animation;Dt(n&&n.onProgress,[t],e)}function sT(t){return J_()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const ch={},g1=t=>{const e=sT(t);return Object.values(ch).filter(n=>n.canvas===e).pop()};function Dj(t,e,n){const i=Object.keys(t);for(const s of i){const r=+s;if(r>=e){const o=t[s];delete t[s],(n>0||r>e)&&(t[r+n]=o)}}}function Rj(t,e,n,i){return!n||t.type==="mouseout"?null:i?e:t}function $d(t,e,n){return t.options.clip?t[n]:e[n]}function Lj(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:$d(n,e,"left"),right:$d(n,e,"right"),top:$d(i,e,"top"),bottom:$d(i,e,"bottom")}:e}let kf=class{static defaults=tn;static instances=ch;static overrides=da;static registry=xs;static version=Mj;static getChart=g1;static register(...e){xs.add(...e),p1()}static unregister(...e){xs.remove(...e),p1()}constructor(e,n){const i=this.config=new Tj(n),s=sT(e),r=g1(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||ZH(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=DY(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new pj,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=GY(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],ch[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Zs.listen(this,"complete",f1),Zs.listen(this,"progress",Ij),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:i,height:s,_aspectRatio:r}=this;return ft(e)?n&&r?r:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return xs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():$b(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Rb(this.canvas,this.ctx),this}stop(){return Zs.stop(this),this}resize(e,n){Zs.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const i=this.options,s=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,e,n,r),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,$b(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Dt(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Tt(n,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,n=e.scales,i=this.scales,s=Object.keys(i).reduce((o,a)=>(o[a]=!1,o),{});let r=[];n&&(r=r.concat(Object.keys(n).map(o=>{const a=n[o],l=am(o,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Tt(r,o=>{const a=o.options,l=a.id,c=am(l,a),u=it(a.type,o.dtype);(a.position===void 0||d1(a.position,c)!==d1(o.dposition))&&(a.position=o.dposition),s[l]=!0;let d=null;if(l in i&&i[l].type===u)d=i[l];else{const h=xs.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(a,e)}),Tt(s,(o,a)=>{o||delete i[a]}),Tt(i,o=>{Vi.configure(this,o,o.options),Vi.addBox(this,o)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,i=e.length;if(e.sort((s,r)=>s.index-r.index),i>n){for(let s=n;sn.length&&delete this._stacks,e.forEach((i,s)=>{n.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=n.length;i{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(h1("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Tt(this.scales,e=>{Vi.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!Cb(n,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:r}of n){const o=i==="_removeElements"?-r:r;Dj(e,s,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=r=>new Set(e.filter(o=>o[0]===r).map((o,a)=>a+","+o.splice(1).join(","))),s=i(0);for(let r=1;rr.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Vi.update(this,this.width,this.height,e);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],Tt(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,r)=>{s._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,i=e._clip,s=!i.disabled,r=Lj(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Sf(n,{left:i.left===!1?0:r.left-i.left,right:i.right===!1?this.width:r.right+i.right,top:i.top===!1?0:r.top-i.top,bottom:i.bottom===!1?this.height:r.bottom+i.bottom}),e.controller.draw(),s&&Tf(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return ur(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,i,s){const r=PH.modes[n];return typeof r=="function"?r(this,e,i,s):[]}getDatasetMeta(e){const n=this.data.datasets[e],i=this._metasets;let s=i.filter(r=>r&&r._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=vo(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(e,n){const i=this.getDatasetMeta(e);i.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,i){const s=i?"show":"hide",r=this.getDatasetMeta(e),o=r.controller._resolveAnimations(void 0,s);fu(n)?(r.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(r,{visible:i}),this.update(a=>a.datasetIndex===e?s:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Zs.remove(this),e=0,n=this.data.datasets.length;e{n.addEventListener(this,r,o),e[r]=o},s=(r,o,a)=>{r.offsetX=o,r.offsetY=a,this._eventHandler(r)};Tt(this.options.events,r=>i(r,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,i=(l,c)=>{n.addEventListener(this,l,c),e[l]=c},s=(l,c)=>{e[l]&&(n.removeEventListener(this,l,c),delete e[l])},r=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,s("resize",r),this._stop(),this._resize(0,0),i("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Tt(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Tt(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,i){const s=i?"set":"remove";let r,o,a,l;for(n==="dataset"&&(r=this.getDatasetMeta(e[0].datasetIndex),r.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=e.length;a{const a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[o],index:o}});!Ch(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(e,n,i){return this._plugins.notify(this,e,n,i)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,i){const s=this.options.hover,r=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),o=r(n,e),a=i?e:r(e,n);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(e,n){const i={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const r=this._handleEvent(e,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(r||i.changed)&&this.render(),this}_handleEvent(e,n,i){const{_active:s=[],options:r}=this,o=n,a=this._getActiveElements(e,s,i,o),l=FY(e),c=Rj(e,this._lastEvent,i,l);i&&(this._lastEvent=null,Dt(r.onHover,[e,a,this],this),l&&Dt(r.onClick,[e,a,this],this));const u=!Ch(a,s);return(u||n)&&(this._active=a,this._updateHoverStyles(a,s,n)),this._lastEvent=c,u}_getActiveElements(e,n,i,s){if(e.type==="mouseout")return[];if(!i)return n;const r=this.options.hover;return this.getElementsAtEventForMode(e,r.mode,r,s)}};function p1(){return Tt(kf.instances,t=>t._plugins.invalidate())}function Oj(t,e,n){const{startAngle:i,pixelMargin:s,x:r,y:o,outerRadius:a,innerRadius:l}=e;let c=s/a;t.beginPath(),t.arc(r,o,a,i-c,n+c),l>s?(c=s/l,t.arc(r,o,l,n+c,i-c,!0)):t.arc(r,o,s,n+cn,i-cn),t.closePath(),t.clip()}function $j(t){return G_(t,["outerStart","outerEnd","innerStart","innerEnd"])}function Nj(t,e,n,i){const s=$j(t.options.borderRadius),r=(n-e)/2,o=Math.min(r,i*e/2),a=l=>{const c=(n-Math.min(r,l))*i/2;return Dn(l,0,Math.min(r,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:Dn(s.innerStart,0,o),innerEnd:Dn(s.innerEnd,0,o)}}function $a(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function Ph(t,e,n,i,s,r){const{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=e,d=Math.max(e.outerRadius+i+n-c,0),h=u>0?u+i+n+c:0;let f=0;const p=s-l;if(i){const F=u>0?u-i:0,D=d>0?d-i:0,z=(F+D)/2,X=z!==0?p*z/(z+i):p;f=(p-X)/2}const m=Math.max(.001,p*d-n/Ft)/d,y=(p-m)/2,v=l+y+f,b=s-y-f,{outerStart:x,outerEnd:E,innerStart:w,innerEnd:S}=Nj(e,h,d,b-v),T=d-x,A=d-E,k=v+x/T,P=b-E/A,B=h+w,Y=h+S,ne=v+w/B,$=b-S/Y;if(t.beginPath(),r){const F=(k+P)/2;if(t.arc(o,a,d,k,F),t.arc(o,a,d,F,P),E>0){const Z=$a(A,P,o,a);t.arc(Z.x,Z.y,E,P,b+cn)}const D=$a(Y,b,o,a);if(t.lineTo(D.x,D.y),S>0){const Z=$a(Y,$,o,a);t.arc(Z.x,Z.y,S,b+cn,$+Math.PI)}const z=(b-S/h+(v+w/h))/2;if(t.arc(o,a,h,b-S/h,z,!0),t.arc(o,a,h,z,v+w/h,!0),w>0){const Z=$a(B,ne,o,a);t.arc(Z.x,Z.y,w,ne+Math.PI,v-cn)}const X=$a(T,v,o,a);if(t.lineTo(X.x,X.y),x>0){const Z=$a(T,k,o,a);t.arc(Z.x,Z.y,x,v-cn,k)}}else{t.moveTo(o,a);const F=Math.cos(k)*d+o,D=Math.sin(k)*d+a;t.lineTo(F,D);const z=Math.cos(P)*d+o,X=Math.sin(P)*d+a;t.lineTo(z,X)}t.closePath()}function Fj(t,e,n,i,s){const{fullCircles:r,startAngle:o,circumference:a}=e;let l=e.endAngle;if(r){Ph(t,e,n,i,l,s);for(let c=0;ce!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,i){const s=this.getProps(["x","y"],i),{angle:r,distance:o}=ES(s,{x:e,y:n}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),h=(this.options.spacing+this.options.borderWidth)/2,f=it(d,l-a),p=gu(r,a,l)&&a!==l,m=f>=Nt||p,y=lr(o,c+h,u+h);return m&&y}getCenterPoint(e){const{x:n,y:i,startAngle:s,endAngle:r,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:l,spacing:c}=this.options,u=(s+r)/2,d=(o+a+c+l)/2;return{x:n+Math.cos(u)*d,y:i+Math.sin(u)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:i}=this,s=(n.offset||0)/4,r=(n.spacing||0)/2,o=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=i>Nt?Math.floor(i/Nt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*s,Math.sin(a)*s);const l=1-Math.sin(Math.min(Ft,i||0)),c=s*l;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,Fj(e,this,c,r,o),Bj(e,this,c,r,o),e.restore()}}function rT(t,e,n=e){t.lineCap=it(n.borderCapStyle,e.borderCapStyle),t.setLineDash(it(n.borderDash,e.borderDash)),t.lineDashOffset=it(n.borderDashOffset,e.borderDashOffset),t.lineJoin=it(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=it(n.borderWidth,e.borderWidth),t.strokeStyle=it(n.borderColor,e.borderColor)}function zj(t,e,n){t.lineTo(n.x,n.y)}function Wj(t){return t.stepped?o8:t.tension||t.cubicInterpolationMode==="monotone"?a8:zj}function oT(t,e,n={}){const i=t.length,{start:s=0,end:r=i-1}=n,{start:o,end:a}=e,l=Math.max(s,o),c=Math.min(r,a),u=sa&&r>a;return{count:i,start:l,loop:e.loop,ilen:c(o+(c?a-E:E))%r,x=()=>{m!==y&&(t.lineTo(u,y),t.lineTo(u,m),t.lineTo(u,v))};for(l&&(f=s[b(0)],t.moveTo(f.x,f.y)),h=0;h<=a;++h){if(f=s[b(h)],f.skip)continue;const E=f.x,w=f.y,S=E|0;S===p?(wy&&(y=w),u=(d*u+E)/++d):(x(),t.lineTo(E,w),p=S,d=0,m=y=w),v=w}x()}function lm(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Hj:Yj}function jj(t){return t.stepped?B8:t.tension||t.cubicInterpolationMode==="monotone"?V8:Ho}function Kj(t,e,n,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,n,i)&&s.closePath()),rT(t,e.options),t.stroke(s)}function Uj(t,e,n,i){const{segments:s,options:r}=e,o=lm(e);for(const a of s)rT(t,r,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}const Gj=typeof Path2D=="function";function Xj(t,e,n,i){Gj&&!e.options.segment?Kj(t,e,n,i):Uj(t,e,n,i)}class Mf extends xr{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;I8(this._points,i,e,s,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=K8(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,i=e.length;return i&&n[e[i-1].end]}interpolate(e,n){const i=this.options,s=e[n],r=this.points,o=YS(this,{property:n,start:s,end:s});if(!o.length)return;const a=[],l=jj(i);let c,u;for(c=0,u=o.length;c=n)return t.slice(e,e+n);const o=[],a=(n-2)/(r-2);let l=0;const c=e+n-1;let u=e,d,h,f,p,m;for(o[l++]=t[u],d=0;df&&(f=p,h=t[b],m=b);o[l++]=h,u=m}return o[l++]=t[c],o}function sK(t,e,n,i){let s=0,r=0,o,a,l,c,u,d,h,f,p,m;const y=[],v=e+n-1,b=t[e].x,E=t[v].x-b;for(o=e;om&&(m=c,h=o),s=(r*s+a.x)/++r;else{const S=o-1;if(!ft(d)&&!ft(h)){const T=Math.min(d,h),A=Math.max(d,h);T!==f&&T!==S&&y.push({...t[T],x:s}),A!==f&&A!==S&&y.push({...t[A],x:s})}o>0&&S!==f&&y.push(t[S]),y.push(a),u=w,r=0,p=m=c,d=h=f=o}}return y}function lT(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function _1(t){t.data.datasets.forEach(e=>{lT(e)})}function rK(t,e){const n=e.length;let i=0,s;const{iScale:r}=t,{min:o,max:a,minDefined:l,maxDefined:c}=r.getUserBounds();return l&&(i=Dn(cr(e,r.axis,o).lo,0,n-1)),c?s=Dn(cr(e,r.axis,a).hi+1,i,n)-i:s=n-i,{start:i,count:s}}var oK={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){_1(t);return}const i=t.width;t.data.datasets.forEach((s,r)=>{const{_data:o,indexAxis:a}=s,l=t.getDatasetMeta(r),c=o||s.data;if(Cc([a,t.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=t.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:d,count:h}=rK(l,c);const f=n.threshold||4*i;if(h<=f){lT(s);return}ft(o)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}}));let p;switch(n.algorithm){case"lttb":p=iK(c,d,h,i,n);break;case"min-max":p=sK(c,d,h,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}s._decimated=p})},destroy(t){_1(t)}};function aK(t,e,n){const i=t.segments,s=t.points,r=e.points,o=[];for(const a of i){let{start:l,end:c}=a;c=ty(l,c,s);const u=cm(n,s[l],s[c],a.loop);if(!e.segments){o.push({source:a,target:u,start:s[l],end:s[c]});continue}const d=YS(e,u);for(const h of d){const f=cm(n,r[h.start],r[h.end],h.loop),p=WS(a,s,f);for(const m of p)o.push({source:m,target:h,start:{[n]:y1(u,f,"start",Math.max)},end:{[n]:y1(u,f,"end",Math.min)}})}}return o}function cm(t,e,n,i){if(i)return;let s=e[t],r=n[t];return t==="angle"&&(s=Si(s),r=Si(r)),{property:t,start:s,end:r}}function lK(t,e){const{x:n=null,y:i=null}=t||{},s=e.points,r=[];return e.segments.forEach(({start:o,end:a})=>{a=ty(o,a,s);const l=s[o],c=s[a];i!==null?(r.push({x:l.x,y:i}),r.push({x:c.x,y:i})):n!==null&&(r.push({x:n,y:l.y}),r.push({x:n,y:c.y}))}),r}function ty(t,e,n){for(;e>t;e--){const i=n[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function y1(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function cT(t,e){let n=[],i=!1;return zt(t)?(i=!0,n=t):n=lK(t,e),n.length?new Mf({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function v1(t){return t&&t.fill!==!1}function cK(t,e,n){let s=t[e].fill;const r=[e];let o;if(!n)return s;for(;s!==!1&&r.indexOf(s)===-1;){if(!en(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;r.push(s),s=o.fill}return!1}function uK(t,e,n){const i=gK(t);if(ut(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return en(s)&&Math.floor(s)===s?dK(i[0],e,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function dK(t,e,n,i){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=i?!1:n}function hK(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:ut(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function fK(t,e,n){let i;return t==="start"?i=n:t==="end"?i=e.options.reverse?e.min:e.max:ut(t)?i=t.value:i=e.getBaseValue(),i}function gK(t){const e=t.options,n=e.fill;let i=it(n&&n.target,n);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function pK(t){const{scale:e,index:n,line:i}=t,s=[],r=i.segments,o=i.points,a=mK(e,n);a.push(cT({x:null,y:e.bottom},i));for(let l=0;l=0;--o){const a=s[o].$filler;a&&(a.line.updateControlPoints(r,a.axis),i&&a.fill&&np(t.ctx,a,r))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const i=t.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const r=i[s].$filler;v1(r)&&np(t.ctx,r,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;!v1(i)||n.drawTime!=="beforeDatasetDraw"||np(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const E1=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}},AK=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class C1 extends xr{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,i){this.maxWidth=e,this.maxHeight=n,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=Dt(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(i=>e.filter(i,this.chart.data))),e.sort&&(n=n.sort((i,s)=>e.sort(i,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const i=e.labels,s=xn(i.font),r=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=E1(i,r);let c,u;n.font=s.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,r,a,l)+10):(u=this.maxHeight,c=this._fitCols(o,s,a,l)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,i,s){const{ctx:r,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=s+a;let d=e;r.textAlign="left",r.textBaseline="middle";let h=-1,f=-u;return this.legendItems.forEach((p,m)=>{const y=i+n/2+r.measureText(p.text).width;(m===0||c[c.length-1]+y+2*a>o)&&(d+=u,c[c.length-(m>0?0:1)]=0,f+=u,h++),l[m]={left:0,top:f,row:h,width:y,height:s},c[c.length-1]+=y+a}),d}_fitCols(e,n,i,s){const{ctx:r,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-e;let d=a,h=0,f=0,p=0,m=0;return this.legendItems.forEach((y,v)=>{const{itemWidth:b,itemHeight:x}=kK(i,n,r,y,s);v>0&&f+x+2*a>u&&(d+=h+a,c.push({width:h,height:f}),p+=h+a,m++,h=f=0),l[v]={left:p,top:f,col:m,width:b,height:x},h=Math.max(h,b),f+=x+a}),d+=h,c.push({width:h,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:s},rtl:r}}=this,o=cl(r,this.left,this.width);if(this.isHorizontal()){let a=0,l=zn(i,this.left+s,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=zn(i,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+e+s,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+s}else{let a=0,l=zn(i,this.top+e+s,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=zn(i,this.top+e+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Sf(e,this),this._draw(),Tf(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:i,ctx:s}=this,{align:r,labels:o}=e,a=tn.color,l=cl(e.rtl,this.left,this.width),c=xn(o.font),{padding:u}=o,d=c.size,h=d/2;let f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:p,boxHeight:m,itemHeight:y}=E1(o,d),v=function(S,T,A){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;s.save();const k=it(A.lineWidth,1);if(s.fillStyle=it(A.fillStyle,a),s.lineCap=it(A.lineCap,"butt"),s.lineDashOffset=it(A.lineDashOffset,0),s.lineJoin=it(A.lineJoin,"miter"),s.lineWidth=k,s.strokeStyle=it(A.strokeStyle,a),s.setLineDash(it(A.lineDash,[])),o.usePointStyle){const P={radius:m*Math.SQRT2/2,pointStyle:A.pointStyle,rotation:A.rotation,borderWidth:k},B=l.xPlus(S,p/2),Y=T+h;IS(s,P,B,Y,o.pointStyleWidth&&p)}else{const P=T+Math.max((d-m)/2,0),B=l.leftForLtr(S,p),Y=ia(A.borderRadius);s.beginPath(),Object.values(Y).some(ne=>ne!==0)?pu(s,{x:B,y:P,w:p,h:m,radius:Y}):s.rect(B,P,p,m),s.fill(),k!==0&&s.stroke()}s.restore()},b=function(S,T,A){ha(s,A.text,S,T+y/2,c,{strikethrough:A.hidden,textAlign:l.textAlign(A.textAlign)})},x=this.isHorizontal(),E=this._computeTitleHeight();x?f={x:zn(r,this.left+u,this.right-i[0]),y:this.top+u+E,line:0}:f={x:this.left+u,y:zn(r,this.top+E+u,this.bottom-n[0].height),line:0},BS(this.ctx,e.textDirection);const w=y+u;this.legendItems.forEach((S,T)=>{s.strokeStyle=S.fontColor,s.fillStyle=S.fontColor;const A=s.measureText(S.text).width,k=l.textAlign(S.textAlign||(S.textAlign=o.textAlign)),P=p+h+A;let B=f.x,Y=f.y;l.setWidth(this.width),x?T>0&&B+P+u>this.right&&(Y=f.y+=w,f.line++,B=f.x=zn(r,this.left+u,this.right-i[f.line])):T>0&&Y+w>this.bottom&&(B=f.x=B+n[f.line].width+u,f.line++,Y=f.y=zn(r,this.top+E+u,this.bottom-n[f.line].height));const ne=l.x(B);if(v(ne,Y,S),B=XY(k,B+p+h,x?B+P:this.right,e.rtl),b(l.x(B),Y,S),x)f.x+=P+u;else if(typeof S.text!="string"){const $=c.lineHeight;f.y+=dT(S,$)+u}else f.y+=w}),VS(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,i=xn(n.font),s=Xn(n.padding);if(!n.display)return;const r=cl(e.rtl,this.left,this.width),o=this.ctx,a=n.position,l=i.size/2,c=s.top+l;let u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,d=zn(e.align,d,this.right-h);else{const p=this.columnSizes.reduce((m,y)=>Math.max(m,y.height),0);u=c+zn(e.align,this.top,this.bottom-p-e.labels.padding-this._computeTitleHeight())}const f=zn(a,d,d+h);o.textAlign=r.textAlign(K_(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=i.string,ha(o,n.text,f,u,i)}_computeTitleHeight(){const e=this.options.title,n=xn(e.font),i=Xn(e.padding);return e.display?n.lineHeight+i.height:0}_getLegendItemAt(e,n){let i,s,r;if(lr(e,this.left,this.right)&&lr(n,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;ir.length>o.length?r:o)),e+n.size/2+i.measureText(s).width}function PK(t,e,n){let i=t;return typeof e.text!="string"&&(i=dT(e,n)),i}function dT(t,e){const n=t.text?t.text.length:0;return e*n}function IK(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var DK={id:"legend",_element:C1,start(t,e,n){const i=t.legend=new C1({ctx:t.ctx,options:n,chart:t});Vi.configure(t,i,n),Vi.addBox(t,i)},stop(t){Vi.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;Vi.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),e.hidden=!0):(s.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:s,color:r,useBorderRadius:o,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Xn(c.borderWidth);return{text:e[l.index].label,fillStyle:c.backgroundColor,fontColor:r,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:o&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class hT extends xr{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const s=zt(i.text)?i.text.length:1;this._padding=Xn(i.padding);const r=s*xn(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:i,bottom:s,right:r,options:o}=this,a=o.align;let l=0,c,u,d;return this.isHorizontal()?(u=zn(a,i,r),d=n+e,c=r-i):(o.position==="left"?(u=i+e,d=zn(a,s,n),l=Ft*-.5):(u=r-e,d=zn(a,n,s),l=Ft*.5),c=s-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const i=xn(n.font),r=i.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(r);ha(e,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:c,textAlign:K_(n.align),textBaseline:"middle",translation:[o,a]})}}function RK(t,e){const n=new hT({ctx:t.ctx,options:e,chart:t});Vi.configure(t,n,e),Vi.addBox(t,n),t.titleBlock=n}var LK={id:"title",_element:hT,start(t,e,n){RK(t,n)},stop(t){const e=t.titleBlock;Vi.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;Vi.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Tc={average(t){if(!t.length)return!1;let e,n,i=new Set,s=0,r=0;for(e=0,n=t.length;ea+l)/i.size,y:s/r}},nearest(t,e){if(!t.length)return!1;let n=e.x,i=e.y,s=Number.POSITIVE_INFINITY,r,o,a;for(r=0,o=t.length;r-1?t.split(` -`):t}function OK(t,e){const{element:n,datasetIndex:i,index:s}=e,r=t.getDatasetMeta(i).controller,{label:o,value:a}=r.getLabelAndValue(s);return{chart:t,label:o,parsed:r.getParsed(s),raw:t.data.datasets[i].data[s],formattedValue:a,dataset:r.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function S1(t,e){const n=t.chart.ctx,{body:i,footer:s,title:r}=t,{boxWidth:o,boxHeight:a}=e,l=xn(e.bodyFont),c=xn(e.titleFont),u=xn(e.footerFont),d=r.length,h=s.length,f=i.length,p=Xn(e.padding);let m=p.height,y=0,v=i.reduce((E,w)=>E+w.before.length+w.lines.length+w.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),v){const E=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=f*E+(v-f)*l.lineHeight+(v-1)*e.bodySpacing}h&&(m+=e.footerMarginTop+h*u.lineHeight+(h-1)*e.footerSpacing);let b=0;const x=function(E){y=Math.max(y,n.measureText(E).width+b)};return n.save(),n.font=c.string,Tt(t.title,x),n.font=l.string,Tt(t.beforeBody.concat(t.afterBody),x),b=e.displayColors?o+2+e.boxPadding:0,Tt(i,E=>{Tt(E.before,x),Tt(E.lines,x),Tt(E.after,x)}),b=0,n.font=u.string,Tt(t.footer,x),n.restore(),y+=p.width,{width:y,height:m}}function $K(t,e){const{y:n,height:i}=e;return nt.height-i/2?"bottom":"center"}function NK(t,e,n,i){const{x:s,width:r}=i,o=n.caretSize+n.caretPadding;if(t==="left"&&s+r+o>e.width||t==="right"&&s-r-o<0)return!0}function FK(t,e,n,i){const{x:s,width:r}=n,{width:o,chartArea:{left:a,right:l}}=t;let c="center";return i==="center"?c=s<=(a+l)/2?"left":"right":s<=r/2?c="left":s>=o-r/2&&(c="right"),NK(c,t,e,n)&&(c="center"),c}function T1(t,e,n){const i=n.yAlign||e.yAlign||$K(t,n);return{xAlign:n.xAlign||e.xAlign||FK(t,e,n,i),yAlign:i}}function BK(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function VK(t,e,n){let{y:i,height:s}=t;return e==="top"?i+=n:e==="bottom"?i-=s+n:i-=s/2,i}function A1(t,e,n,i){const{caretSize:s,caretPadding:r,cornerRadius:o}=t,{xAlign:a,yAlign:l}=n,c=s+r,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=ia(o);let p=BK(e,a);const m=VK(e,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(u,h)+s:a==="right"&&(p+=Math.max(d,f)+s),{x:Dn(p,0,i.width-e.width),y:Dn(m,0,i.height-e.height)}}function Nd(t,e,n){const i=Xn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function k1(t){return bs([],Js(t))}function zK(t,e,n){return vo(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function M1(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const fT={beforeTitle:Us,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex"u"?fT[e].call(n,i):s}class P1 extends xr{static positioners=Tc;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,r=new HS(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=zK(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,s=di(i,"beforeTitle",this,e),r=di(i,"title",this,e),o=di(i,"afterTitle",this,e);let a=[];return a=bs(a,Js(s)),a=bs(a,Js(r)),a=bs(a,Js(o)),a}getBeforeBody(e,n){return k1(di(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:i}=n,s=[];return Tt(e,r=>{const o={before:[],lines:[],after:[]},a=M1(i,r);bs(o.before,Js(di(a,"beforeLabel",this,r))),bs(o.lines,di(a,"label",this,r)),bs(o.after,Js(di(a,"afterLabel",this,r))),s.push(o)}),s}getAfterBody(e,n){return k1(di(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:i}=n,s=di(i,"beforeFooter",this,e),r=di(i,"footer",this,e),o=di(i,"afterFooter",this,e);let a=[];return a=bs(a,Js(s)),a=bs(a,Js(r)),a=bs(a,Js(o)),a}_createItems(e){const n=this._active,i=this.chart.data,s=[],r=[],o=[];let a=[],l,c;for(l=0,c=n.length;le.filter(u,d,h,i))),e.itemSort&&(a=a.sort((u,d)=>e.itemSort(u,d,i))),Tt(a,u=>{const d=M1(e.callbacks,u);s.push(di(d,"labelColor",this,u)),r.push(di(d,"labelPointStyle",this,u)),o.push(di(d,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=a,a}update(e,n){const i=this.options.setContext(this.getContext()),s=this._active;let r,o=[];if(!s.length)this.opacity!==0&&(r={opacity:0});else{const a=Tc[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const l=this._size=S1(this,i),c=Object.assign({},a,l),u=T1(this.chart,i,c),d=A1(i,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,i,s){const r=this.getCaretPosition(e,i,s);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(e,n,i){const{xAlign:s,yAlign:r}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=ia(a),{x:h,y:f}=e,{width:p,height:m}=n;let y,v,b,x,E,w;return r==="center"?(E=f+m/2,s==="left"?(y=h,v=y-o,x=E+o,w=E-o):(y=h+p,v=y+o,x=E-o,w=E+o),b=y):(s==="left"?v=h+Math.max(l,u)+o:s==="right"?v=h+p-Math.max(c,d)-o:v=this.caretX,r==="top"?(x=f,E=x-o,y=v-o,b=v+o):(x=f+m,E=x+o,y=v+o,b=v-o),w=x),{x1:y,x2:v,x3:b,y1:x,y2:E,y3:w}}drawTitle(e,n,i){const s=this.title,r=s.length;let o,a,l;if(r){const c=cl(i.rtl,this.x,this.width);for(e.x=Nd(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",o=xn(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,l=0;lb!==0)?(e.beginPath(),e.fillStyle=r.multiKeyBackground,pu(e,{x:m,y:p,w:c,h:l,radius:v}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),pu(e,{x:y,y:p+1,w:c-2,h:l-2,radius:v}),e.fill()):(e.fillStyle=r.multiKeyBackground,e.fillRect(m,p,c,l),e.strokeRect(m,p,c,l),e.fillStyle=o.backgroundColor,e.fillRect(y,p+1,c-2,l-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,n,i){const{body:s}=this,{bodySpacing:r,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=i,d=xn(i.bodyFont);let h=d.lineHeight,f=0;const p=cl(i.rtl,this.x,this.width),m=function(A){n.fillText(A,p.x(e.x+f),e.y+h/2),e.y+=h+r},y=p.textAlign(o);let v,b,x,E,w,S,T;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,e.x=Nd(this,y,i),n.fillStyle=i.bodyColor,Tt(this.beforeBody,m),f=a&&y!=="right"?o==="center"?c/2+u:c+2+u:0,E=0,S=s.length;E0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,s=i&&i.x,r=i&&i.y;if(s||r){const o=Tc[e.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=S1(this,e),l=Object.assign({},o,this._size),c=T1(n,e,l),u=A1(e,l,c,n);(s._to!==u.x||r._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Xn(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=i,this.drawBackground(r,e,s,n),BS(e,n.textDirection),r.y+=o.top,this.drawTitle(r,e,n),this.drawBody(r,e,n),this.drawFooter(r,e,n),VS(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const i=this._active,s=e.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),r=!Ch(i,s),o=this._positionChanged(s,n);(r||o)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,r=this._active||[],o=this._getActiveElements(e,r,n,i),a=this._positionChanged(o,e),l=n||!Ch(o,r)||a;return l&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,i,s){const r=this.options;if(e.type==="mouseout")return[];if(!s)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,r.mode,r,i);return r.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:i,caretY:s,options:r}=this,o=Tc[r.position].call(this,e,n);return o!==!1&&(i!==o.x||s!==o.y)}}var WK={id:"tooltip",_element:P1,positioners:Tc,afterInit(t,e,n){n&&(t.tooltip=new P1({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:fT},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const YK=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function HK(t,e,n,i){const s=t.indexOf(e);if(s===-1)return YK(t,e,n,i);const r=t.lastIndexOf(e);return s!==r?n:s}const jK=(t,e)=>t===null?null:Dn(Math.round(t),0,e);function I1(t){const e=this.getLabels();return t>=0&&tn.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function UK(t,e){const n=[],{bounds:s,step:r,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=t,f=r||1,p=u-1,{min:m,max:y}=e,v=!ft(o),b=!ft(a),x=!ft(c),E=(y-m)/(d+1);let w=Tb((y-m)/p/f)*f,S,T,A,k;if(w<1e-14&&!v&&!b)return[{value:m},{value:y}];k=Math.ceil(y/w)-Math.floor(m/w),k>p&&(w=Tb(k*w/p/f)*f),ft(l)||(S=Math.pow(10,l),w=Math.ceil(w*S)/S),s==="ticks"?(T=Math.floor(m/w)*w,A=Math.ceil(y/w)*w):(T=m,A=y),v&&b&&r&&WY((a-o)/r,w/1e3)?(k=Math.round(Math.min((a-o)/w,u)),w=(a-o)/k,T=o,A=a):x?(T=v?o:T,A=b?a:A,k=c-1,w=(A-T)/k):(k=(A-T)/w,Uc(k,Math.round(k),w/1e3)?k=Math.round(k):k=Math.ceil(k));const P=Math.max(Ab(w),Ab(T));S=Math.pow(10,ft(l)?P:l),T=Math.round(T*S)/S,A=Math.round(A*S)/S;let B=0;for(v&&(h&&T!==o?(n.push({value:o}),Ta)break;n.push({value:Y})}return b&&h&&A!==a?n.length&&Uc(n[n.length-1].value,a,D1(a,E,t))?n[n.length-1].value=a:n.push({value:a}):(!b||A===a)&&n.push({value:A}),n}function D1(t,e,{horizontal:n,minRotation:i}){const s=as(i),r=(n?Math.sin(s):Math.cos(s))||.001,o=.75*e*(""+t).length;return Math.min(e/r,o)}class Ih extends va{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return ft(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:s,max:r}=this;const o=l=>s=n?s:l,a=l=>r=i?r:l;if(e){const l=$s(s),c=$s(r);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(s===r){let l=r===0?1:Math.abs(r*.05);a(r+l),e||o(s-l)}this.min=s,this.max=r}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},r=this._range||this,o=UK(s,r);return e.bounds==="ticks"&&xS(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-n)/Math.max(e.length-1,1)/2;n-=s,i+=s}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(e){return ju(e,this.chart.options.locale,this.options.ticks.format)}}class GK extends Ih{static id="linear";static defaults={ticks:{callback:Cf.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=en(e)?e:0,this.max=en(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=as(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,r.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const _u=t=>Math.floor(Gr(t)),No=(t,e)=>Math.pow(10,_u(t)+e);function R1(t){return t/Math.pow(10,_u(t))===1}function L1(t,e,n){const i=Math.pow(10,n),s=Math.floor(t/i);return Math.ceil(e/i)-s}function XK(t,e){const n=e-t;let i=_u(n);for(;L1(t,e,i)>10;)i++;for(;L1(t,e,i)<10;)i--;return Math.min(i,_u(t))}function qK(t,{min:e,max:n}){e=Ci(t.min,e);const i=[],s=_u(e);let r=XK(e,n),o=r<0?Math.pow(10,Math.abs(r)):1;const a=Math.pow(10,r),l=s>r?Math.pow(10,s):0,c=Math.round((e-l)*o)/o,u=Math.floor((e-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,r)),h=Ci(t.min,Math.round((l+u+d*Math.pow(10,r))*o)/o);for(;h=10?d=d<15?15:20:d++,d>=20&&(r++,d=2,o=r>=0?1:o),h=Math.round((l+u+d*Math.pow(10,r))*o)/o;const f=Ci(t.max,h);return i.push({value:f,major:R1(f),significand:d}),i}class ZK extends va{static id="logarithmic";static defaults={ticks:{callback:Cf.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const i=Ih.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return en(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=en(e)?Math.max(0,e):null,this.max=en(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!en(this._userMin)&&(this.min=e===No(this.min,0)?No(this.min,-1):No(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let i=this.min,s=this.max;const r=a=>i=e?i:a,o=a=>s=n?s:a;i===s&&(i<=0?(r(1),o(10)):(r(No(i,-1)),o(No(s,1)))),i<=0&&r(No(s,-1)),s<=0&&o(No(i,1)),this.min=i,this.max=s}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=qK(n,this);return e.bounds==="ticks"&&xS(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":ju(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Gr(e),this._valueRange=Gr(this.max)-Gr(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Gr(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}function um(t){const e=t.ticks;if(e.display&&t.display){const n=Xn(e.backdropPadding);return it(e.font&&e.font.size,tn.font.size)+n.height}return 0}function JK(t,e,n){return n=zt(n)?n:[n],{w:r8(t,e.string,n),h:n.length*e.lineHeight}}function O1(t,e,n,i,s){return t===i||t===s?{start:e-n/2,end:e+n/2}:ts?{start:e-n,end:e}:{start:e,end:e+n}}function QK(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],s=[],r=t._pointLabels.length,o=t.options.pointLabels,a=o.centerPointLabels?Ft/r:0;for(let l=0;le.r&&(a=(i.end-e.r)/r,t.r=Math.max(t.r,e.r+a)),s.starte.b&&(l=(s.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function tU(t,e,n){const i=t.drawingArea,{extra:s,additionalAngle:r,padding:o,size:a}=n,l=t.getPointPosition(e,i+s+o,r),c=Math.round(H_(Si(l.angle+cn))),u=oU(l.y,a.h,c),d=sU(c),h=rU(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+a.w,bottom:u+a.h}}function nU(t,e){if(!e)return!0;const{left:n,top:i,right:s,bottom:r}=t;return!(ur({x:n,y:i},e)||ur({x:n,y:r},e)||ur({x:s,y:i},e)||ur({x:s,y:r},e))}function iU(t,e,n){const i=[],s=t._pointLabels.length,r=t.options,{centerPointLabels:o,display:a}=r.pointLabels,l={extra:um(r)/2,additionalAngle:o?Ft/s:0};let c;for(let u=0;u270||n<90)&&(t-=e),t}function aU(t,e,n){const{left:i,top:s,right:r,bottom:o}=n,{backdropColor:a}=e;if(!ft(a)){const l=ia(e.borderRadius),c=Xn(e.backdropPadding);t.fillStyle=a;const u=i-c.left,d=s-c.top,h=r-i+c.width,f=o-s+c.height;Object.values(l).some(p=>p!==0)?(t.beginPath(),pu(t,{x:u,y:d,w:h,h:f,radius:l}),t.fill()):t.fillRect(u,d,h,f)}}function lU(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let s=e-1;s>=0;s--){const r=t._pointLabelItems[s];if(!r.visible)continue;const o=i.setContext(t.getPointLabelContext(s));aU(n,o,r);const a=xn(o.font),{x:l,y:c,textAlign:u}=r;ha(n,t._pointLabels[s],l,c+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function gT(t,e,n,i){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,Nt);else{let r=t.getPointPosition(0,e);s.moveTo(r.x,r.y);for(let o=1;o{const s=Dt(this.options.pointLabels.callback,[n,i],this);return s||s===0?s:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?QK(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,i,s){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,i,s))}getIndexAngle(e){const n=Nt/(this._pointLabels.length||1),i=this.options.startAngle||0;return Si(e*n+as(i))}getDistanceFromCenterForValue(e){if(ft(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(ft(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),f=s.setContext(h),p=r.setContext(h);cU(this,f,l,o,p)}}),i.display){for(e.save(),a=o-1;a>=0;a--){const u=i.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:h}=u;!h||!d||(e.lineWidth=h,e.strokeStyle=d,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),c=this.getPointPosition(a,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let r,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const c=i.setContext(this.getContext(l)),u=xn(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){e.font=u.string,o=e.measureText(a.label).width,e.fillStyle=c.backdropColor;const d=Xn(c.backdropPadding);e.fillRect(-o/2-d.left,-r-u.size/2-d.top,o+d.width,u.size+d.height)}ha(e,a.label,0,-r,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}const Pf={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},mi=Object.keys(Pf);function $1(t,e){return t-e}function N1(t,e){if(ft(e))return null;const n=t._adapter,{parser:i,round:s,isoWeekday:r}=t._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),en(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(Pl(r)||r===!0)?n.startOf(o,"isoWeek",r):n.startOf(o,s)),+o)}function F1(t,e,n,i){const s=mi.length;for(let r=mi.indexOf(t);r=mi.indexOf(n);r--){const o=mi[r];if(Pf[o].common&&t._adapter.diff(s,i,o)>=e-1)return o}return mi[n?mi.indexOf(n):0]}function fU(t){for(let e=mi.indexOf(t)+1,n=mi.length;e=e?n[i]:n[s];t[r]=!0}}function gU(t,e,n,i){const s=t._adapter,r=+s.startOf(e[0].value,i),o=e[e.length-1].value;let a,l;for(a=r;a<=o;a=+s.add(a,1,i))l=n[a],l>=0&&(e[l].major=!0);return e}function V1(t,e,n){const i=[],s={},r=e.length;let o,a;for(o=0;o+e.value))}initOffsets(e=[]){let n=0,i=0,s,r;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?n=1-s:n=(this.getDecimalForValue(e[1])-s)/2,r=this.getDecimalForValue(e[e.length-1]),e.length===1?i=r:i=(r-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=Dn(n,0,o),i=Dn(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const e=this._adapter,n=this.min,i=this.max,s=this.options,r=s.time,o=r.unit||F1(r.minUnit,n,i,this._getLabelCapacity(n)),a=it(s.ticks.stepSize,1),l=o==="week"?r.isoWeekday:!1,c=Pl(l)||l===!0,u={};let d=n,h,f;if(c&&(d=+e.startOf(d,"isoWeek",l)),d=+e.startOf(d,c?"day":o),e.diff(i,n,o)>1e5*a)throw new Error(n+" and "+i+" are too far apart with stepSize of "+a+" "+o);const p=s.ticks.source==="data"&&this.getDataTimestamps();for(h=d,f=0;h+m)}getLabelForValue(e){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(e,i.tooltipFormat):n.format(e,i.displayFormats.datetime)}format(e,n){const s=this.options.time.displayFormats,r=this._unit,o=n||s[r];return this._adapter.format(e,o)}_tickFormatFunction(e,n,i,s){const r=this.options,o=r.ticks.callback;if(o)return Dt(o,[e,n,i],this);const a=r.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],h=i[n],f=c&&d&&h&&h.major;return this._adapter.format(e,s||(f?d:u))}generateTickLabels(e){let n,i,s;for(n=0,i=e.length;n0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n=t[i].pos&&e<=t[s].pos&&({lo:i,hi:s}=cr(t,"pos",e)),{pos:r,time:a}=t[i],{pos:o,time:l}=t[s]):(e>=t[i].time&&e<=t[s].time&&({lo:i,hi:s}=cr(t,"time",e)),{time:r,pos:a}=t[i],{time:o,pos:l}=t[s]);const c=o-r;return c?a+(l-a)*(e-r)/c:a}class pU extends dm{static id="timeseries";static defaults=dm.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Fd(n,this.min),this._tableRange=Fd(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:i}=this,s=[],r=[];let o,a,l,c,u;for(o=0,a=e.length;o=n&&c<=i&&s.push(c);if(s.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,a=s.length;os-r)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?e=this.normalize(n.concat(i)):e=n.length?n:i,e=this._cache.all=e,e}getDecimalForValue(e){return(Fd(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return Fd(this._table,i*this._tableRange+this._minPos,!0)}}const pT={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},mU={ariaLabel:{type:String},ariaDescribedby:{type:String}},_U={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...pT,...mU},yU=WE[0]==="2"?(t,e)=>Object.assign(t,{attrs:e}):(t,e)=>Object.assign(t,e);function Na(t){return $u(t)?lt(t):t}function vU(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return $u(e)?new Proxy(t,{}):t}function bU(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function mT(t,e){t.labels=e}function _T(t,e,n){const i=[];t.datasets=e.map(s=>{const r=t.datasets.find(o=>o[n]===s[n]);return!r||!s.data||i.includes(r)?{...s}:(i.push(r),Object.assign(r,s),r)})}function wU(t,e){const n={labels:[],datasets:[]};return mT(n,t.labels),_T(n,t.datasets,e),n}const xU=hn({props:_U,setup(t,e){let{expose:n,slots:i}=e;const s=we(null),r=af(null);n({chart:r});const o=()=>{if(!s.value)return;const{type:c,data:u,options:d,plugins:h,datasetIdKey:f}=t,p=wU(u,f),m=vU(p,u);r.value=new kf(s.value,{type:c,data:m,options:{...d},plugins:h})},a=()=>{const c=lt(r.value);c&&(t.destroyDelay>0?setTimeout(()=>{c.destroy(),r.value=null},t.destroyDelay):(c.destroy(),r.value=null))},l=c=>{c.update(t.updateMode)};return En(o),pa(a),un([()=>t.options,()=>t.data],(c,u)=>{let[d,h]=c,[f,p]=u;const m=lt(r.value);if(!m)return;let y=!1;if(d){const v=Na(d),b=Na(f);v&&v!==b&&(bU(m,v),y=!0)}if(h){const v=Na(h.labels),b=Na(p.labels),x=Na(h.datasets),E=Na(p.datasets);v!==b&&(mT(m.config.data,v),y=!0),x&&x!==E&&(_T(m.config.data,x,t.datasetIdKey),y=!0)}y&&Rn(()=>{l(m)})},{deep:!0}),()=>ua("canvas",{role:"img",ariaLabel:t.ariaLabel,ariaDescribedby:t.ariaDescribedby,ref:s},[ua("p",{},[i.default?i.default():""])])}});function yT(t,e){return kf.register(e),hn({props:pT,setup(n,i){let{expose:s}=i;const r=af(null),o=a=>{r.value=a?.chart};return s({chart:r}),()=>ua(xU,yU({ref:o},{type:t,...n}))}})}const EU=yT("bar",US),CU=yT("line",XS);function vr(t){return Array.isArray?Array.isArray(t):wT(t)==="[object Array]"}const SU=1/0;function TU(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-SU?"-0":e}function AU(t){return t==null?"":TU(t)}function Ms(t){return typeof t=="string"}function vT(t){return typeof t=="number"}function kU(t){return t===!0||t===!1||MU(t)&&wT(t)=="[object Boolean]"}function bT(t){return typeof t=="object"}function MU(t){return bT(t)&&t!==null}function Ti(t){return t!=null}function ip(t){return!t.trim().length}function wT(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const PU="Incorrect 'index' type",IU=t=>`Invalid value for key ${t}`,DU=t=>`Pattern length exceeds max of ${t}.`,RU=t=>`Missing ${t} property in key`,LU=t=>`Property 'weight' in key '${t}' must be a positive integer`,z1=Object.prototype.hasOwnProperty;class OU{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(i=>{let s=xT(i);this._keys.push(s),this._keyMap[s.id]=s,n+=s.weight}),this._keys.forEach(i=>{i.weight/=n})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function xT(t){let e=null,n=null,i=null,s=1,r=null;if(Ms(t)||vr(t))i=t,e=W1(t),n=hm(t);else{if(!z1.call(t,"name"))throw new Error(RU("name"));const o=t.name;if(i=o,z1.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(LU(o));e=W1(o),n=hm(o),r=t.getFn}return{path:e,id:n,weight:s,src:i,getFn:r}}function W1(t){return vr(t)?t:t.split(".")}function hm(t){return vr(t)?t.join("."):t}function $U(t,e){let n=[],i=!1;const s=(r,o,a)=>{if(Ti(r))if(!o[a])n.push(r);else{let l=o[a];const c=r[l];if(!Ti(c))return;if(a===o.length-1&&(Ms(c)||vT(c)||kU(c)))n.push(AU(c));else if(vr(c)){i=!0;for(let u=0,d=c.length;ut.score===e.score?t.idx{this._keysMap[n.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Ms(this.docs[0])?this.docs.forEach((e,n)=>{this._addString(e,n)}):this.docs.forEach((e,n)=>{this._addObject(e,n)}),this.norm.clear())}add(e){const n=this.size();Ms(e)?this._addString(e,n):this._addObject(e,n)}removeAt(e){this.records.splice(e,1);for(let n=e,i=this.size();n{let o=s.getFn?s.getFn(e):this.getFn(e,s.path);if(Ti(o)){if(vr(o)){let a=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:c,value:u}=l.pop();if(Ti(u))if(Ms(u)&&!ip(u)){let d={v:u,i:c,n:this.norm.get(u)};a.push(d)}else vr(u)&&u.forEach((d,h)=>{l.push({nestedArrIndex:h,value:d})})}i.$[r]=a}else if(Ms(o)&&!ip(o)){let a={v:o,n:this.norm.get(o)};i.$[r]=a}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function ET(t,e,{getFn:n=Je.getFn,fieldNormWeight:i=Je.fieldNormWeight}={}){const s=new ny({getFn:n,fieldNormWeight:i});return s.setKeys(t.map(xT)),s.setSources(e),s.create(),s}function YU(t,{getFn:e=Je.getFn,fieldNormWeight:n=Je.fieldNormWeight}={}){const{keys:i,records:s}=t,r=new ny({getFn:e,fieldNormWeight:n});return r.setKeys(i),r.setIndexRecords(s),r}function Bd(t,{errors:e=0,currentLocation:n=0,expectedLocation:i=0,distance:s=Je.distance,ignoreLocation:r=Je.ignoreLocation}={}){const o=e/t.length;if(r)return o;const a=Math.abs(i-n);return s?o+a/s:a?1:o}function HU(t=[],e=Je.minMatchCharLength){let n=[],i=-1,s=-1,r=0;for(let o=t.length;r=e&&n.push([i,s]),i=-1)}return t[r-1]&&r-i>=e&&n.push([i,r-1]),n}const Ko=32;function jU(t,e,n,{location:i=Je.location,distance:s=Je.distance,threshold:r=Je.threshold,findAllMatches:o=Je.findAllMatches,minMatchCharLength:a=Je.minMatchCharLength,includeMatches:l=Je.includeMatches,ignoreLocation:c=Je.ignoreLocation}={}){if(e.length>Ko)throw new Error(DU(Ko));const u=e.length,d=t.length,h=Math.max(0,Math.min(i,d));let f=r,p=h;const m=a>1||l,y=m?Array(d):[];let v;for(;(v=t.indexOf(e,p))>-1;){let T=Bd(e,{currentLocation:v,expectedLocation:h,distance:s,ignoreLocation:c});if(f=Math.min(T,f),p=v+u,m){let A=0;for(;A=P;$-=1){let F=$-1,D=n[t.charAt(F)];if(m&&(y[F]=+!!D),Y[$]=(Y[$+1]<<1|1)&D,T&&(Y[$]|=(b[$+1]|b[$])<<1|1|b[$+1]),Y[$]&w&&(x=Bd(e,{errors:T,currentLocation:F,expectedLocation:h,distance:s,ignoreLocation:c}),x<=f)){if(f=x,p=F,p<=h)break;P=Math.max(1,2*h-p)}}if(Bd(e,{errors:T+1,currentLocation:h,expectedLocation:h,distance:s,ignoreLocation:c})>f)break;b=Y}const S={isMatch:p>=0,score:Math.max(.001,x)};if(m){const T=HU(y,a);T.length?l&&(S.indices=T):S.isMatch=!1}return S}function KU(t){let e={};for(let n=0,i=t.length;n{this.chunks.push({pattern:h,alphabet:KU(h),startIndex:f})},d=this.pattern.length;if(d>Ko){let h=0;const f=d%Ko,p=d-f;for(;h{const{isMatch:v,score:b,indices:x}=jU(e,p,m,{location:s+y,distance:r,threshold:o,findAllMatches:a,minMatchCharLength:l,includeMatches:i,ignoreLocation:c});v&&(h=!0),d+=b,v&&x&&(u=[...u,...x])});let f={isMatch:h,score:h?d/this.chunks.length:1};return h&&i&&(f.indices=u),f}}class wo{constructor(e){this.pattern=e}static isMultiMatch(e){return Y1(e,this.multiRegex)}static isSingleMatch(e){return Y1(e,this.singleRegex)}search(){}}function Y1(t,e){const n=t.match(e);return n?n[1]:null}class UU extends wo{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const n=e===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class GU extends wo{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const i=e.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}}class XU extends wo{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const n=e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class qU extends wo{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const n=!e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class ZU extends wo{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const n=e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class JU extends wo{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const n=!e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class ST extends wo{constructor(e,{location:n=Je.location,threshold:i=Je.threshold,distance:s=Je.distance,includeMatches:r=Je.includeMatches,findAllMatches:o=Je.findAllMatches,minMatchCharLength:a=Je.minMatchCharLength,isCaseSensitive:l=Je.isCaseSensitive,ignoreLocation:c=Je.ignoreLocation}={}){super(e),this._bitapSearch=new CT(e,{location:n,threshold:i,distance:s,includeMatches:r,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class TT extends wo{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,i;const s=[],r=this.pattern.length;for(;(i=e.indexOf(this.pattern,n))>-1;)n=i+r,s.push([i,n-1]);const o=!!s.length;return{isMatch:o,score:o?0:1,indices:s}}}const fm=[UU,TT,XU,qU,JU,ZU,GU,ST],H1=fm.length,QU=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,eG="|";function tG(t,e={}){return t.split(eG).map(n=>{let i=n.trim().split(QU).filter(r=>r&&!!r.trim()),s=[];for(let r=0,o=i.length;r!!(t[Dh.AND]||t[Dh.OR]),rG=t=>!!t[mm.PATH],oG=t=>!vr(t)&&bT(t)&&!_m(t),j1=t=>({[Dh.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function AT(t,e,{auto:n=!0}={}){const i=s=>{let r=Object.keys(s);const o=rG(s);if(!o&&r.length>1&&!_m(s))return i(j1(s));if(oG(s)){const l=o?s[mm.PATH]:r[0],c=o?s[mm.PATTERN]:s[l];if(!Ms(c))throw new Error(IU(l));const u={keyId:hm(l),pattern:c};return n&&(u.searcher=pm(c,e)),u}let a={children:[],operator:r[0]};return r.forEach(l=>{const c=s[l];vr(c)&&c.forEach(u=>{a.children.push(i(u))})}),a};return _m(t)||(t=j1(t)),i(t)}function aG(t,{ignoreFieldNorm:e=Je.ignoreFieldNorm}){t.forEach(n=>{let i=1;n.matches.forEach(({key:s,norm:r,score:o})=>{const a=s?s.weight:null;i*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(e?1:r))}),n.score=i})}function lG(t,e){const n=t.matches;e.matches=[],Ti(n)&&n.forEach(i=>{if(!Ti(i.indices)||!i.indices.length)return;const{indices:s,value:r}=i;let o={indices:s,value:r};i.key&&(o.key=i.key.src),i.idx>-1&&(o.refIndex=i.idx),e.matches.push(o)})}function cG(t,e){e.score=t.score}function uG(t,e,{includeMatches:n=Je.includeMatches,includeScore:i=Je.includeScore}={}){const s=[];return n&&s.push(lG),i&&s.push(cG),t.map(r=>{const{idx:o}=r,a={item:e[o],refIndex:o};return s.length&&s.forEach(l=>{l(r,a)}),a})}class Xl{constructor(e,n={},i){this.options={...Je,...n},this.options.useExtendedSearch,this._keyStore=new OU(this.options.keys),this.setCollection(e,i)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof ny))throw new Error(PU);this._myIndex=n||ET(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Ti(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const n=[];for(let i=0,s=this._docs.length;i-1&&(l=l.slice(0,n)),uG(l,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(e){const n=pm(e,this.options),{records:i}=this._myIndex,s=[];return i.forEach(({v:r,i:o,n:a})=>{if(!Ti(r))return;const{isMatch:l,score:c,indices:u}=n.searchIn(r);l&&s.push({item:r,idx:o,matches:[{score:c,value:r,norm:a,indices:u}]})}),s}_searchLogical(e){const n=AT(e,this.options),i=(a,l,c)=>{if(!a.children){const{keyId:d,searcher:h}=a,f=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(l,d),searcher:h});return f&&f.length?[{idx:c,item:l,matches:f}]:[]}const u=[];for(let d=0,h=a.children.length;d{if(Ti(a)){let c=i(n,a,l);c.length&&(r[l]||(r[l]={idx:l,item:a,matches:[]},o.push(r[l])),c.forEach(({matches:u})=>{r[l].matches.push(...u)}))}}),o}_searchObjectList(e){const n=pm(e,this.options),{keys:i,records:s}=this._myIndex,r=[];return s.forEach(({$:o,i:a})=>{if(!Ti(o))return;let l=[];i.forEach((c,u)=>{l.push(...this._findMatches({key:c,value:o[u],searcher:n}))}),l.length&&r.push({idx:a,item:o,matches:l})}),r}_findMatches({key:e,value:n,searcher:i}){if(!Ti(n))return[];let s=[];if(vr(n))n.forEach(({v:r,i:o,n:a})=>{if(!Ti(r))return;const{isMatch:l,score:c,indices:u}=i.searchIn(r);l&&s.push({score:c,key:e,value:r,idx:o,norm:a,indices:u})});else{const{v:r,n:o}=n,{isMatch:a,score:l,indices:c}=i.searchIn(r);a&&s.push({score:l,key:e,value:r,norm:o,indices:c})}return s}}Xl.version="7.0.0";Xl.createIndex=ET;Xl.parseIndex=YU;Xl.config=Je;Xl.parseQuery=AT;sG(iG);const dG={name:"peerSettings",components:{LocaleText:He},props:{selectedPeer:Object},data(){return{data:void 0,dataChanged:!1,showKey:!1,saving:!1}},setup(){return{dashboardConfigurationStore:tt()}},methods:{reset(){this.selectedPeer&&(this.data=JSON.parse(JSON.stringify(this.selectedPeer)),this.dataChanged=!1)},savePeer(){this.saving=!0,xt(`/api/updatePeerSettings/${this.$route.params.id}`,this.data,t=>{this.saving=!1,t.status?this.dashboardConfigurationStore.newMessage("Server","Peer saved","success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.$emit("refresh")})},resetPeerData(t){this.saving=!0,xt(`/api/resetPeerData/${this.$route.params.id}`,{id:this.data.id,type:t},e=>{this.saving=!1,e.status?this.dashboardConfigurationStore.newMessage("Server","Peer data usage reset successfully","success"):this.dashboardConfigurationStore.newMessage("Server",e.message,"danger"),this.$emit("refresh")})}},beforeMount(){this.reset()},mounted(){this.$el.querySelectorAll("input").forEach(t=>{t.addEventListener("keyup",()=>{this.dataChanged=!0})})}},hG={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},fG={class:"container d-flex h-100 w-100"},gG={class:"m-auto modal-dialog-centered dashboardModal"},pG={class:"card rounded-3 shadow flex-grow-1"},mG={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},_G={class:"mb-0"},yG={key:0,class:"card-body px-4 pb-4"},vG={class:"d-flex flex-column gap-2 mb-4"},bG={class:"d-flex align-items-center"},wG={class:"text-muted"},xG={class:"ms-auto"},EG={for:"peer_name_textbox",class:"form-label"},CG={class:"text-muted"},SG=["disabled"],TG={class:"d-flex position-relative"},AG={for:"peer_private_key_textbox",class:"form-label"},kG={class:"text-muted"},MG=["type","disabled"],PG={for:"peer_allowed_ip_textbox",class:"form-label"},IG={class:"text-muted"},DG=["disabled"],RG={for:"peer_endpoint_allowed_ips",class:"form-label"},LG={class:"text-muted"},OG=["disabled"],$G={for:"peer_DNS_textbox",class:"form-label"},NG={class:"text-muted"},FG=["disabled"],BG={class:"accordion mt-3",id:"peerSettingsAccordion"},VG={class:"accordion-item"},zG={class:"accordion-header"},WG={class:"accordion-button rounded-3 collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#peerSettingsAccordionOptional"},YG={id:"peerSettingsAccordionOptional",class:"accordion-collapse collapse","data-bs-parent":"#peerSettingsAccordion"},HG={class:"accordion-body d-flex flex-column gap-2 mb-2"},jG={for:"peer_preshared_key_textbox",class:"form-label"},KG={class:"text-muted"},UG=["disabled"],GG={for:"peer_mtu",class:"form-label"},XG={class:"text-muted"},qG=["disabled"],ZG={for:"peer_keep_alive",class:"form-label"},JG={class:"text-muted"},QG=["disabled"],e7={class:"d-flex gap-2 align-items-center"},t7={class:"d-flex gap-2 ms-auto"},n7={class:"d-flex align-items-center gap-2"},i7=["disabled"],s7=["disabled"];function r7(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",hG,[g("div",fG,[g("div",gG,[g("div",pG,[g("div",mG,[g("h4",_G,[N(o,{t:"Peer Settings"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),this.data?(R(),V("div",yG,[g("div",vG,[g("div",bG,[g("small",wG,[N(o,{t:"Public Key"})]),g("small",xG,[g("samp",null,xe(this.data.id),1)])]),g("div",null,[g("label",EG,[g("small",CG,[N(o,{t:"Name"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[1]||(e[1]=a=>this.data.name=a),id:"peer_name_textbox",placeholder:""},null,8,SG),[[We,this.data.name]])]),g("div",null,[g("div",TG,[g("label",AG,[g("small",kG,[N(o,{t:"Private Key"}),g("code",null,[N(o,{t:"(Required for QR Code and Download)"})])])]),g("a",{role:"button",class:"ms-auto text-decoration-none toggleShowKey",onClick:e[2]||(e[2]=a=>this.showKey=!this.showKey)},[g("i",{class:Pe(["bi",[this.showKey?"bi-eye-slash-fill":"bi-eye-fill"]])},null,2)])]),$e(g("input",{type:[this.showKey?"text":"password"],class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[3]||(e[3]=a=>this.data.private_key=a),id:"peer_private_key_textbox",style:{"padding-right":"40px"}},null,8,MG),[[QE,this.data.private_key]])]),g("div",null,[g("label",PG,[g("small",IG,[N(o,{t:"Allowed IPs"}),g("code",null,[N(o,{t:"(Required)"})])])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[4]||(e[4]=a=>this.data.allowed_ip=a),id:"peer_allowed_ip_textbox"},null,8,DG),[[We,this.data.allowed_ip]])]),g("div",null,[g("label",RG,[g("small",LG,[N(o,{t:"Endpoint Allowed IPs"}),g("code",null,[N(o,{t:"(Required)"})])])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[5]||(e[5]=a=>this.data.endpoint_allowed_ip=a),id:"peer_endpoint_allowed_ips"},null,8,OG),[[We,this.data.endpoint_allowed_ip]])]),g("div",null,[g("label",$G,[g("small",NG,[N(o,{t:"DNS"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[6]||(e[6]=a=>this.data.DNS=a),id:"peer_DNS_textbox"},null,8,FG),[[We,this.data.DNS]])]),g("div",BG,[g("div",VG,[g("h2",zG,[g("button",WG,[N(o,{t:"Optional Settings"})])]),g("div",YG,[g("div",HG,[g("div",null,[g("label",jG,[g("small",KG,[N(o,{t:"Pre-Shared Key"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[7]||(e[7]=a=>this.data.preshared_key=a),id:"peer_preshared_key_textbox"},null,8,UG),[[We,this.data.preshared_key]])]),g("div",null,[g("label",GG,[g("small",XG,[N(o,{t:"MTU"})])]),$e(g("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[8]||(e[8]=a=>this.data.mtu=a),id:"peer_mtu"},null,8,qG),[[We,this.data.mtu]])]),g("div",null,[g("label",ZG,[g("small",JG,[N(o,{t:"Persistent Keepalive"})])]),$e(g("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[9]||(e[9]=a=>this.data.keepalive=a),id:"peer_keep_alive"},null,8,QG),[[We,this.data.keepalive]])])])])])]),e[18]||(e[18]=g("hr",null,null,-1)),g("div",e7,[g("strong",null,[N(o,{t:"Reset Data Usage"})]),g("div",t7,[g("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[10]||(e[10]=a=>this.resetPeerData("total"))},[e[15]||(e[15]=g("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),N(o,{t:"Total"})]),g("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[11]||(e[11]=a=>this.resetPeerData("receive"))},[e[16]||(e[16]=g("i",{class:"bi bi-arrow-down me-2"},null,-1)),N(o,{t:"Received"})]),g("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[12]||(e[12]=a=>this.resetPeerData("sent"))},[e[17]||(e[17]=g("i",{class:"bi bi-arrow-up me-2"},null,-1)),N(o,{t:"Sent"})])])])]),g("div",n7,[g("button",{class:"btn btn-secondary rounded-3 shadow",onClick:e[13]||(e[13]=a=>this.reset()),disabled:!this.dataChanged||this.saving},[N(o,{t:"Revert"}),e[19]||(e[19]=g("i",{class:"bi bi-arrow-clockwise ms-2"},null,-1))],8,i7),g("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!this.dataChanged||this.saving,onClick:e[14]||(e[14]=a=>this.savePeer())},[N(o,{t:"Save Peer"}),e[20]||(e[20]=g("i",{class:"bi bi-save-fill ms-2"},null,-1))],8,s7)])])):ce("",!0)])])])])}const o7=je(dG,[["render",r7],["__scopeId","data-v-2c571abb"]]);var ba={},a7=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},kT={},Di={};let iy;const l7=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Di.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};Di.getSymbolTotalCodewords=function(e){return l7[e]};Di.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};Di.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');iy=e};Di.isKanjiModeEnabled=function(){return typeof iy<"u"};Di.toSJIS=function(e){return iy(e)};var If={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},t.from=function(i,s){if(t.isValid(i))return i;try{return e(i)}catch{return s}}})(If);function MT(){this.buffer=[],this.length=0}MT.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var c7=MT;function Uu(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}Uu.prototype.set=function(t,e,n,i){const s=t*this.size+e;this.data[s]=n,i&&(this.reservedBit[s]=!0)};Uu.prototype.get=function(t,e){return this.data[t*this.size+e]};Uu.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};Uu.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var u7=Uu,PT={};(function(t){const e=Di.getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];const s=Math.floor(i/7)+2,r=e(i),o=r===145?26:Math.ceil((r-13)/(2*s-2))*2,a=[r-7];for(let l=1;l=0&&s<=7},t.from=function(s){return t.isValid(s)?parseInt(s,10):void 0},t.getPenaltyN1=function(s){const r=s.size;let o=0,a=0,l=0,c=null,u=null;for(let d=0;d=5&&(o+=e.N1+(a-5)),c=f,a=1),f=s.get(h,d),f===u?l++:(l>=5&&(o+=e.N1+(l-5)),u=f,l=1)}a>=5&&(o+=e.N1+(a-5)),l>=5&&(o+=e.N1+(l-5))}return o},t.getPenaltyN2=function(s){const r=s.size;let o=0;for(let a=0;a=10&&(a===1488||a===93)&&o++,l=l<<1&2047|s.get(u,c),u>=10&&(l===1488||l===93)&&o++}return o*e.N3},t.getPenaltyN4=function(s){let r=0;const o=s.data.length;for(let l=0;l=0;){const o=r[0];for(let l=0;l0){const r=new Uint8Array(this.degree);return r.set(i,s),r}return i};var h7=sy,OT={},xo={},ry={};ry.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Vs={};const $T="[0-9]+",f7="[A-Z $%*+\\-./:]+";let yu="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";yu=yu.replace(/u/g,"\\u");const g7="(?:(?![A-Z0-9 $%*+\\-./:]|"+yu+`)(?:.|[\r +`):t}function OK(t,e){const{element:n,datasetIndex:i,index:s}=e,r=t.getDatasetMeta(i).controller,{label:o,value:a}=r.getLabelAndValue(s);return{chart:t,label:o,parsed:r.getParsed(s),raw:t.data.datasets[i].data[s],formattedValue:a,dataset:r.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function S1(t,e){const n=t.chart.ctx,{body:i,footer:s,title:r}=t,{boxWidth:o,boxHeight:a}=e,l=xn(e.bodyFont),c=xn(e.titleFont),u=xn(e.footerFont),d=r.length,h=s.length,f=i.length,p=Xn(e.padding);let m=p.height,y=0,v=i.reduce((E,w)=>E+w.before.length+w.lines.length+w.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),v){const E=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=f*E+(v-f)*l.lineHeight+(v-1)*e.bodySpacing}h&&(m+=e.footerMarginTop+h*u.lineHeight+(h-1)*e.footerSpacing);let b=0;const x=function(E){y=Math.max(y,n.measureText(E).width+b)};return n.save(),n.font=c.string,Tt(t.title,x),n.font=l.string,Tt(t.beforeBody.concat(t.afterBody),x),b=e.displayColors?o+2+e.boxPadding:0,Tt(i,E=>{Tt(E.before,x),Tt(E.lines,x),Tt(E.after,x)}),b=0,n.font=u.string,Tt(t.footer,x),n.restore(),y+=p.width,{width:y,height:m}}function $K(t,e){const{y:n,height:i}=e;return nt.height-i/2?"bottom":"center"}function NK(t,e,n,i){const{x:s,width:r}=i,o=n.caretSize+n.caretPadding;if(t==="left"&&s+r+o>e.width||t==="right"&&s-r-o<0)return!0}function FK(t,e,n,i){const{x:s,width:r}=n,{width:o,chartArea:{left:a,right:l}}=t;let c="center";return i==="center"?c=s<=(a+l)/2?"left":"right":s<=r/2?c="left":s>=o-r/2&&(c="right"),NK(c,t,e,n)&&(c="center"),c}function T1(t,e,n){const i=n.yAlign||e.yAlign||$K(t,n);return{xAlign:n.xAlign||e.xAlign||FK(t,e,n,i),yAlign:i}}function BK(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function VK(t,e,n){let{y:i,height:s}=t;return e==="top"?i+=n:e==="bottom"?i-=s+n:i-=s/2,i}function A1(t,e,n,i){const{caretSize:s,caretPadding:r,cornerRadius:o}=t,{xAlign:a,yAlign:l}=n,c=s+r,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=ia(o);let p=BK(e,a);const m=VK(e,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(u,h)+s:a==="right"&&(p+=Math.max(d,f)+s),{x:Dn(p,0,i.width-e.width),y:Dn(m,0,i.height-e.height)}}function Nd(t,e,n){const i=Xn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function k1(t){return bs([],Js(t))}function zK(t,e,n){return vo(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function M1(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const fT={beforeTitle:Us,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex"u"?fT[e].call(n,i):s}class P1 extends xr{static positioners=Tc;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,r=new HS(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=zK(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,s=di(i,"beforeTitle",this,e),r=di(i,"title",this,e),o=di(i,"afterTitle",this,e);let a=[];return a=bs(a,Js(s)),a=bs(a,Js(r)),a=bs(a,Js(o)),a}getBeforeBody(e,n){return k1(di(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:i}=n,s=[];return Tt(e,r=>{const o={before:[],lines:[],after:[]},a=M1(i,r);bs(o.before,Js(di(a,"beforeLabel",this,r))),bs(o.lines,di(a,"label",this,r)),bs(o.after,Js(di(a,"afterLabel",this,r))),s.push(o)}),s}getAfterBody(e,n){return k1(di(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:i}=n,s=di(i,"beforeFooter",this,e),r=di(i,"footer",this,e),o=di(i,"afterFooter",this,e);let a=[];return a=bs(a,Js(s)),a=bs(a,Js(r)),a=bs(a,Js(o)),a}_createItems(e){const n=this._active,i=this.chart.data,s=[],r=[],o=[];let a=[],l,c;for(l=0,c=n.length;le.filter(u,d,h,i))),e.itemSort&&(a=a.sort((u,d)=>e.itemSort(u,d,i))),Tt(a,u=>{const d=M1(e.callbacks,u);s.push(di(d,"labelColor",this,u)),r.push(di(d,"labelPointStyle",this,u)),o.push(di(d,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=a,a}update(e,n){const i=this.options.setContext(this.getContext()),s=this._active;let r,o=[];if(!s.length)this.opacity!==0&&(r={opacity:0});else{const a=Tc[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const l=this._size=S1(this,i),c=Object.assign({},a,l),u=T1(this.chart,i,c),d=A1(i,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,i,s){const r=this.getCaretPosition(e,i,s);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(e,n,i){const{xAlign:s,yAlign:r}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=ia(a),{x:h,y:f}=e,{width:p,height:m}=n;let y,v,b,x,E,w;return r==="center"?(E=f+m/2,s==="left"?(y=h,v=y-o,x=E+o,w=E-o):(y=h+p,v=y+o,x=E-o,w=E+o),b=y):(s==="left"?v=h+Math.max(l,u)+o:s==="right"?v=h+p-Math.max(c,d)-o:v=this.caretX,r==="top"?(x=f,E=x-o,y=v-o,b=v+o):(x=f+m,E=x+o,y=v+o,b=v-o),w=x),{x1:y,x2:v,x3:b,y1:x,y2:E,y3:w}}drawTitle(e,n,i){const s=this.title,r=s.length;let o,a,l;if(r){const c=cl(i.rtl,this.x,this.width);for(e.x=Nd(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",o=xn(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,l=0;lb!==0)?(e.beginPath(),e.fillStyle=r.multiKeyBackground,pu(e,{x:m,y:p,w:c,h:l,radius:v}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),pu(e,{x:y,y:p+1,w:c-2,h:l-2,radius:v}),e.fill()):(e.fillStyle=r.multiKeyBackground,e.fillRect(m,p,c,l),e.strokeRect(m,p,c,l),e.fillStyle=o.backgroundColor,e.fillRect(y,p+1,c-2,l-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,n,i){const{body:s}=this,{bodySpacing:r,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=i,d=xn(i.bodyFont);let h=d.lineHeight,f=0;const p=cl(i.rtl,this.x,this.width),m=function(A){n.fillText(A,p.x(e.x+f),e.y+h/2),e.y+=h+r},y=p.textAlign(o);let v,b,x,E,w,S,T;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,e.x=Nd(this,y,i),n.fillStyle=i.bodyColor,Tt(this.beforeBody,m),f=a&&y!=="right"?o==="center"?c/2+u:c+2+u:0,E=0,S=s.length;E0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,s=i&&i.x,r=i&&i.y;if(s||r){const o=Tc[e.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=S1(this,e),l=Object.assign({},o,this._size),c=T1(n,e,l),u=A1(e,l,c,n);(s._to!==u.x||r._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Xn(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=i,this.drawBackground(r,e,s,n),BS(e,n.textDirection),r.y+=o.top,this.drawTitle(r,e,n),this.drawBody(r,e,n),this.drawFooter(r,e,n),VS(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const i=this._active,s=e.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),r=!Ch(i,s),o=this._positionChanged(s,n);(r||o)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,r=this._active||[],o=this._getActiveElements(e,r,n,i),a=this._positionChanged(o,e),l=n||!Ch(o,r)||a;return l&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,i,s){const r=this.options;if(e.type==="mouseout")return[];if(!s)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,r.mode,r,i);return r.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:i,caretY:s,options:r}=this,o=Tc[r.position].call(this,e,n);return o!==!1&&(i!==o.x||s!==o.y)}}var WK={id:"tooltip",_element:P1,positioners:Tc,afterInit(t,e,n){n&&(t.tooltip=new P1({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:fT},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const YK=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function HK(t,e,n,i){const s=t.indexOf(e);if(s===-1)return YK(t,e,n,i);const r=t.lastIndexOf(e);return s!==r?n:s}const jK=(t,e)=>t===null?null:Dn(Math.round(t),0,e);function I1(t){const e=this.getLabels();return t>=0&&tn.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function UK(t,e){const n=[],{bounds:s,step:r,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=t,f=r||1,p=u-1,{min:m,max:y}=e,v=!ft(o),b=!ft(a),x=!ft(c),E=(y-m)/(d+1);let w=Tb((y-m)/p/f)*f,S,T,A,k;if(w<1e-14&&!v&&!b)return[{value:m},{value:y}];k=Math.ceil(y/w)-Math.floor(m/w),k>p&&(w=Tb(k*w/p/f)*f),ft(l)||(S=Math.pow(10,l),w=Math.ceil(w*S)/S),s==="ticks"?(T=Math.floor(m/w)*w,A=Math.ceil(y/w)*w):(T=m,A=y),v&&b&&r&&WY((a-o)/r,w/1e3)?(k=Math.round(Math.min((a-o)/w,u)),w=(a-o)/k,T=o,A=a):x?(T=v?o:T,A=b?a:A,k=c-1,w=(A-T)/k):(k=(A-T)/w,Uc(k,Math.round(k),w/1e3)?k=Math.round(k):k=Math.ceil(k));const P=Math.max(Ab(w),Ab(T));S=Math.pow(10,ft(l)?P:l),T=Math.round(T*S)/S,A=Math.round(A*S)/S;let B=0;for(v&&(h&&T!==o?(n.push({value:o}),Ta)break;n.push({value:Y})}return b&&h&&A!==a?n.length&&Uc(n[n.length-1].value,a,D1(a,E,t))?n[n.length-1].value=a:n.push({value:a}):(!b||A===a)&&n.push({value:A}),n}function D1(t,e,{horizontal:n,minRotation:i}){const s=as(i),r=(n?Math.sin(s):Math.cos(s))||.001,o=.75*e*(""+t).length;return Math.min(e/r,o)}class Ih extends va{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return ft(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:s,max:r}=this;const o=l=>s=n?s:l,a=l=>r=i?r:l;if(e){const l=$s(s),c=$s(r);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(s===r){let l=r===0?1:Math.abs(r*.05);a(r+l),e||o(s-l)}this.min=s,this.max=r}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},r=this._range||this,o=UK(s,r);return e.bounds==="ticks"&&xS(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-n)/Math.max(e.length-1,1)/2;n-=s,i+=s}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(e){return ju(e,this.chart.options.locale,this.options.ticks.format)}}class GK extends Ih{static id="linear";static defaults={ticks:{callback:Cf.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=en(e)?e:0,this.max=en(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=as(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,r.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const _u=t=>Math.floor(Gr(t)),No=(t,e)=>Math.pow(10,_u(t)+e);function R1(t){return t/Math.pow(10,_u(t))===1}function L1(t,e,n){const i=Math.pow(10,n),s=Math.floor(t/i);return Math.ceil(e/i)-s}function XK(t,e){const n=e-t;let i=_u(n);for(;L1(t,e,i)>10;)i++;for(;L1(t,e,i)<10;)i--;return Math.min(i,_u(t))}function qK(t,{min:e,max:n}){e=Ci(t.min,e);const i=[],s=_u(e);let r=XK(e,n),o=r<0?Math.pow(10,Math.abs(r)):1;const a=Math.pow(10,r),l=s>r?Math.pow(10,s):0,c=Math.round((e-l)*o)/o,u=Math.floor((e-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,r)),h=Ci(t.min,Math.round((l+u+d*Math.pow(10,r))*o)/o);for(;h=10?d=d<15?15:20:d++,d>=20&&(r++,d=2,o=r>=0?1:o),h=Math.round((l+u+d*Math.pow(10,r))*o)/o;const f=Ci(t.max,h);return i.push({value:f,major:R1(f),significand:d}),i}class ZK extends va{static id="logarithmic";static defaults={ticks:{callback:Cf.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const i=Ih.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return en(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=en(e)?Math.max(0,e):null,this.max=en(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!en(this._userMin)&&(this.min=e===No(this.min,0)?No(this.min,-1):No(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let i=this.min,s=this.max;const r=a=>i=e?i:a,o=a=>s=n?s:a;i===s&&(i<=0?(r(1),o(10)):(r(No(i,-1)),o(No(s,1)))),i<=0&&r(No(s,-1)),s<=0&&o(No(i,1)),this.min=i,this.max=s}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=qK(n,this);return e.bounds==="ticks"&&xS(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":ju(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Gr(e),this._valueRange=Gr(this.max)-Gr(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Gr(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}function um(t){const e=t.ticks;if(e.display&&t.display){const n=Xn(e.backdropPadding);return it(e.font&&e.font.size,tn.font.size)+n.height}return 0}function JK(t,e,n){return n=zt(n)?n:[n],{w:r8(t,e.string,n),h:n.length*e.lineHeight}}function O1(t,e,n,i,s){return t===i||t===s?{start:e-n/2,end:e+n/2}:ts?{start:e-n,end:e}:{start:e,end:e+n}}function QK(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],s=[],r=t._pointLabels.length,o=t.options.pointLabels,a=o.centerPointLabels?Ft/r:0;for(let l=0;le.r&&(a=(i.end-e.r)/r,t.r=Math.max(t.r,e.r+a)),s.starte.b&&(l=(s.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function tU(t,e,n){const i=t.drawingArea,{extra:s,additionalAngle:r,padding:o,size:a}=n,l=t.getPointPosition(e,i+s+o,r),c=Math.round(H_(Si(l.angle+cn))),u=oU(l.y,a.h,c),d=sU(c),h=rU(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+a.w,bottom:u+a.h}}function nU(t,e){if(!e)return!0;const{left:n,top:i,right:s,bottom:r}=t;return!(ur({x:n,y:i},e)||ur({x:n,y:r},e)||ur({x:s,y:i},e)||ur({x:s,y:r},e))}function iU(t,e,n){const i=[],s=t._pointLabels.length,r=t.options,{centerPointLabels:o,display:a}=r.pointLabels,l={extra:um(r)/2,additionalAngle:o?Ft/s:0};let c;for(let u=0;u270||n<90)&&(t-=e),t}function aU(t,e,n){const{left:i,top:s,right:r,bottom:o}=n,{backdropColor:a}=e;if(!ft(a)){const l=ia(e.borderRadius),c=Xn(e.backdropPadding);t.fillStyle=a;const u=i-c.left,d=s-c.top,h=r-i+c.width,f=o-s+c.height;Object.values(l).some(p=>p!==0)?(t.beginPath(),pu(t,{x:u,y:d,w:h,h:f,radius:l}),t.fill()):t.fillRect(u,d,h,f)}}function lU(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let s=e-1;s>=0;s--){const r=t._pointLabelItems[s];if(!r.visible)continue;const o=i.setContext(t.getPointLabelContext(s));aU(n,o,r);const a=xn(o.font),{x:l,y:c,textAlign:u}=r;ha(n,t._pointLabels[s],l,c+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function gT(t,e,n,i){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,Nt);else{let r=t.getPointPosition(0,e);s.moveTo(r.x,r.y);for(let o=1;o{const s=Dt(this.options.pointLabels.callback,[n,i],this);return s||s===0?s:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?QK(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,i,s){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,i,s))}getIndexAngle(e){const n=Nt/(this._pointLabels.length||1),i=this.options.startAngle||0;return Si(e*n+as(i))}getDistanceFromCenterForValue(e){if(ft(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(ft(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),f=s.setContext(h),p=r.setContext(h);cU(this,f,l,o,p)}}),i.display){for(e.save(),a=o-1;a>=0;a--){const u=i.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:h}=u;!h||!d||(e.lineWidth=h,e.strokeStyle=d,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),c=this.getPointPosition(a,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let r,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const c=i.setContext(this.getContext(l)),u=xn(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){e.font=u.string,o=e.measureText(a.label).width,e.fillStyle=c.backdropColor;const d=Xn(c.backdropPadding);e.fillRect(-o/2-d.left,-r-u.size/2-d.top,o+d.width,u.size+d.height)}ha(e,a.label,0,-r,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}const Pf={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},mi=Object.keys(Pf);function $1(t,e){return t-e}function N1(t,e){if(ft(e))return null;const n=t._adapter,{parser:i,round:s,isoWeekday:r}=t._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),en(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(Pl(r)||r===!0)?n.startOf(o,"isoWeek",r):n.startOf(o,s)),+o)}function F1(t,e,n,i){const s=mi.length;for(let r=mi.indexOf(t);r=mi.indexOf(n);r--){const o=mi[r];if(Pf[o].common&&t._adapter.diff(s,i,o)>=e-1)return o}return mi[n?mi.indexOf(n):0]}function fU(t){for(let e=mi.indexOf(t)+1,n=mi.length;e=e?n[i]:n[s];t[r]=!0}}function gU(t,e,n,i){const s=t._adapter,r=+s.startOf(e[0].value,i),o=e[e.length-1].value;let a,l;for(a=r;a<=o;a=+s.add(a,1,i))l=n[a],l>=0&&(e[l].major=!0);return e}function V1(t,e,n){const i=[],s={},r=e.length;let o,a;for(o=0;o+e.value))}initOffsets(e=[]){let n=0,i=0,s,r;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?n=1-s:n=(this.getDecimalForValue(e[1])-s)/2,r=this.getDecimalForValue(e[e.length-1]),e.length===1?i=r:i=(r-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=Dn(n,0,o),i=Dn(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const e=this._adapter,n=this.min,i=this.max,s=this.options,r=s.time,o=r.unit||F1(r.minUnit,n,i,this._getLabelCapacity(n)),a=it(s.ticks.stepSize,1),l=o==="week"?r.isoWeekday:!1,c=Pl(l)||l===!0,u={};let d=n,h,f;if(c&&(d=+e.startOf(d,"isoWeek",l)),d=+e.startOf(d,c?"day":o),e.diff(i,n,o)>1e5*a)throw new Error(n+" and "+i+" are too far apart with stepSize of "+a+" "+o);const p=s.ticks.source==="data"&&this.getDataTimestamps();for(h=d,f=0;h+m)}getLabelForValue(e){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(e,i.tooltipFormat):n.format(e,i.displayFormats.datetime)}format(e,n){const s=this.options.time.displayFormats,r=this._unit,o=n||s[r];return this._adapter.format(e,o)}_tickFormatFunction(e,n,i,s){const r=this.options,o=r.ticks.callback;if(o)return Dt(o,[e,n,i],this);const a=r.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],h=i[n],f=c&&d&&h&&h.major;return this._adapter.format(e,s||(f?d:u))}generateTickLabels(e){let n,i,s;for(n=0,i=e.length;n0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n=t[i].pos&&e<=t[s].pos&&({lo:i,hi:s}=cr(t,"pos",e)),{pos:r,time:a}=t[i],{pos:o,time:l}=t[s]):(e>=t[i].time&&e<=t[s].time&&({lo:i,hi:s}=cr(t,"time",e)),{time:r,pos:a}=t[i],{time:o,pos:l}=t[s]);const c=o-r;return c?a+(l-a)*(e-r)/c:a}class pU extends dm{static id="timeseries";static defaults=dm.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Fd(n,this.min),this._tableRange=Fd(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:i}=this,s=[],r=[];let o,a,l,c,u;for(o=0,a=e.length;o=n&&c<=i&&s.push(c);if(s.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,a=s.length;os-r)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?e=this.normalize(n.concat(i)):e=n.length?n:i,e=this._cache.all=e,e}getDecimalForValue(e){return(Fd(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return Fd(this._table,i*this._tableRange+this._minPos,!0)}}const pT={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},mU={ariaLabel:{type:String},ariaDescribedby:{type:String}},_U={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...pT,...mU},yU=WE[0]==="2"?(t,e)=>Object.assign(t,{attrs:e}):(t,e)=>Object.assign(t,e);function Na(t){return $u(t)?lt(t):t}function vU(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return $u(e)?new Proxy(t,{}):t}function bU(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function mT(t,e){t.labels=e}function _T(t,e,n){const i=[];t.datasets=e.map(s=>{const r=t.datasets.find(o=>o[n]===s[n]);return!r||!s.data||i.includes(r)?{...s}:(i.push(r),Object.assign(r,s),r)})}function wU(t,e){const n={labels:[],datasets:[]};return mT(n,t.labels),_T(n,t.datasets,e),n}const xU=hn({props:_U,setup(t,e){let{expose:n,slots:i}=e;const s=xe(null),r=af(null);n({chart:r});const o=()=>{if(!s.value)return;const{type:c,data:u,options:d,plugins:h,datasetIdKey:f}=t,p=wU(u,f),m=vU(p,u);r.value=new kf(s.value,{type:c,data:m,options:{...d},plugins:h})},a=()=>{const c=lt(r.value);c&&(t.destroyDelay>0?setTimeout(()=>{c.destroy(),r.value=null},t.destroyDelay):(c.destroy(),r.value=null))},l=c=>{c.update(t.updateMode)};return En(o),pa(a),un([()=>t.options,()=>t.data],(c,u)=>{let[d,h]=c,[f,p]=u;const m=lt(r.value);if(!m)return;let y=!1;if(d){const v=Na(d),b=Na(f);v&&v!==b&&(bU(m,v),y=!0)}if(h){const v=Na(h.labels),b=Na(p.labels),x=Na(h.datasets),E=Na(p.datasets);v!==b&&(mT(m.config.data,v),y=!0),x&&x!==E&&(_T(m.config.data,x,t.datasetIdKey),y=!0)}y&&Rn(()=>{l(m)})},{deep:!0}),()=>ua("canvas",{role:"img",ariaLabel:t.ariaLabel,ariaDescribedby:t.ariaDescribedby,ref:s},[ua("p",{},[i.default?i.default():""])])}});function yT(t,e){return kf.register(e),hn({props:pT,setup(n,i){let{expose:s}=i;const r=af(null),o=a=>{r.value=a?.chart};return s({chart:r}),()=>ua(xU,yU({ref:o},{type:t,...n}))}})}const EU=yT("bar",US),CU=yT("line",XS);function vr(t){return Array.isArray?Array.isArray(t):wT(t)==="[object Array]"}const SU=1/0;function TU(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-SU?"-0":e}function AU(t){return t==null?"":TU(t)}function Ms(t){return typeof t=="string"}function vT(t){return typeof t=="number"}function kU(t){return t===!0||t===!1||MU(t)&&wT(t)=="[object Boolean]"}function bT(t){return typeof t=="object"}function MU(t){return bT(t)&&t!==null}function Ti(t){return t!=null}function ip(t){return!t.trim().length}function wT(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const PU="Incorrect 'index' type",IU=t=>`Invalid value for key ${t}`,DU=t=>`Pattern length exceeds max of ${t}.`,RU=t=>`Missing ${t} property in key`,LU=t=>`Property 'weight' in key '${t}' must be a positive integer`,z1=Object.prototype.hasOwnProperty;class OU{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(i=>{let s=xT(i);this._keys.push(s),this._keyMap[s.id]=s,n+=s.weight}),this._keys.forEach(i=>{i.weight/=n})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function xT(t){let e=null,n=null,i=null,s=1,r=null;if(Ms(t)||vr(t))i=t,e=W1(t),n=hm(t);else{if(!z1.call(t,"name"))throw new Error(RU("name"));const o=t.name;if(i=o,z1.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(LU(o));e=W1(o),n=hm(o),r=t.getFn}return{path:e,id:n,weight:s,src:i,getFn:r}}function W1(t){return vr(t)?t:t.split(".")}function hm(t){return vr(t)?t.join("."):t}function $U(t,e){let n=[],i=!1;const s=(r,o,a)=>{if(Ti(r))if(!o[a])n.push(r);else{let l=o[a];const c=r[l];if(!Ti(c))return;if(a===o.length-1&&(Ms(c)||vT(c)||kU(c)))n.push(AU(c));else if(vr(c)){i=!0;for(let u=0,d=c.length;ut.score===e.score?t.idx{this._keysMap[n.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Ms(this.docs[0])?this.docs.forEach((e,n)=>{this._addString(e,n)}):this.docs.forEach((e,n)=>{this._addObject(e,n)}),this.norm.clear())}add(e){const n=this.size();Ms(e)?this._addString(e,n):this._addObject(e,n)}removeAt(e){this.records.splice(e,1);for(let n=e,i=this.size();n{let o=s.getFn?s.getFn(e):this.getFn(e,s.path);if(Ti(o)){if(vr(o)){let a=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:c,value:u}=l.pop();if(Ti(u))if(Ms(u)&&!ip(u)){let d={v:u,i:c,n:this.norm.get(u)};a.push(d)}else vr(u)&&u.forEach((d,h)=>{l.push({nestedArrIndex:h,value:d})})}i.$[r]=a}else if(Ms(o)&&!ip(o)){let a={v:o,n:this.norm.get(o)};i.$[r]=a}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function ET(t,e,{getFn:n=Je.getFn,fieldNormWeight:i=Je.fieldNormWeight}={}){const s=new ny({getFn:n,fieldNormWeight:i});return s.setKeys(t.map(xT)),s.setSources(e),s.create(),s}function YU(t,{getFn:e=Je.getFn,fieldNormWeight:n=Je.fieldNormWeight}={}){const{keys:i,records:s}=t,r=new ny({getFn:e,fieldNormWeight:n});return r.setKeys(i),r.setIndexRecords(s),r}function Bd(t,{errors:e=0,currentLocation:n=0,expectedLocation:i=0,distance:s=Je.distance,ignoreLocation:r=Je.ignoreLocation}={}){const o=e/t.length;if(r)return o;const a=Math.abs(i-n);return s?o+a/s:a?1:o}function HU(t=[],e=Je.minMatchCharLength){let n=[],i=-1,s=-1,r=0;for(let o=t.length;r=e&&n.push([i,s]),i=-1)}return t[r-1]&&r-i>=e&&n.push([i,r-1]),n}const Ko=32;function jU(t,e,n,{location:i=Je.location,distance:s=Je.distance,threshold:r=Je.threshold,findAllMatches:o=Je.findAllMatches,minMatchCharLength:a=Je.minMatchCharLength,includeMatches:l=Je.includeMatches,ignoreLocation:c=Je.ignoreLocation}={}){if(e.length>Ko)throw new Error(DU(Ko));const u=e.length,d=t.length,h=Math.max(0,Math.min(i,d));let f=r,p=h;const m=a>1||l,y=m?Array(d):[];let v;for(;(v=t.indexOf(e,p))>-1;){let T=Bd(e,{currentLocation:v,expectedLocation:h,distance:s,ignoreLocation:c});if(f=Math.min(T,f),p=v+u,m){let A=0;for(;A=P;$-=1){let F=$-1,D=n[t.charAt(F)];if(m&&(y[F]=+!!D),Y[$]=(Y[$+1]<<1|1)&D,T&&(Y[$]|=(b[$+1]|b[$])<<1|1|b[$+1]),Y[$]&w&&(x=Bd(e,{errors:T,currentLocation:F,expectedLocation:h,distance:s,ignoreLocation:c}),x<=f)){if(f=x,p=F,p<=h)break;P=Math.max(1,2*h-p)}}if(Bd(e,{errors:T+1,currentLocation:h,expectedLocation:h,distance:s,ignoreLocation:c})>f)break;b=Y}const S={isMatch:p>=0,score:Math.max(.001,x)};if(m){const T=HU(y,a);T.length?l&&(S.indices=T):S.isMatch=!1}return S}function KU(t){let e={};for(let n=0,i=t.length;n{this.chunks.push({pattern:h,alphabet:KU(h),startIndex:f})},d=this.pattern.length;if(d>Ko){let h=0;const f=d%Ko,p=d-f;for(;h{const{isMatch:v,score:b,indices:x}=jU(e,p,m,{location:s+y,distance:r,threshold:o,findAllMatches:a,minMatchCharLength:l,includeMatches:i,ignoreLocation:c});v&&(h=!0),d+=b,v&&x&&(u=[...u,...x])});let f={isMatch:h,score:h?d/this.chunks.length:1};return h&&i&&(f.indices=u),f}}class wo{constructor(e){this.pattern=e}static isMultiMatch(e){return Y1(e,this.multiRegex)}static isSingleMatch(e){return Y1(e,this.singleRegex)}search(){}}function Y1(t,e){const n=t.match(e);return n?n[1]:null}class UU extends wo{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const n=e===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class GU extends wo{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const i=e.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}}class XU extends wo{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const n=e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class qU extends wo{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const n=!e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class ZU extends wo{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const n=e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class JU extends wo{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const n=!e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class ST extends wo{constructor(e,{location:n=Je.location,threshold:i=Je.threshold,distance:s=Je.distance,includeMatches:r=Je.includeMatches,findAllMatches:o=Je.findAllMatches,minMatchCharLength:a=Je.minMatchCharLength,isCaseSensitive:l=Je.isCaseSensitive,ignoreLocation:c=Je.ignoreLocation}={}){super(e),this._bitapSearch=new CT(e,{location:n,threshold:i,distance:s,includeMatches:r,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class TT extends wo{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,i;const s=[],r=this.pattern.length;for(;(i=e.indexOf(this.pattern,n))>-1;)n=i+r,s.push([i,n-1]);const o=!!s.length;return{isMatch:o,score:o?0:1,indices:s}}}const fm=[UU,TT,XU,qU,JU,ZU,GU,ST],H1=fm.length,QU=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,eG="|";function tG(t,e={}){return t.split(eG).map(n=>{let i=n.trim().split(QU).filter(r=>r&&!!r.trim()),s=[];for(let r=0,o=i.length;r!!(t[Dh.AND]||t[Dh.OR]),rG=t=>!!t[mm.PATH],oG=t=>!vr(t)&&bT(t)&&!_m(t),j1=t=>({[Dh.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function AT(t,e,{auto:n=!0}={}){const i=s=>{let r=Object.keys(s);const o=rG(s);if(!o&&r.length>1&&!_m(s))return i(j1(s));if(oG(s)){const l=o?s[mm.PATH]:r[0],c=o?s[mm.PATTERN]:s[l];if(!Ms(c))throw new Error(IU(l));const u={keyId:hm(l),pattern:c};return n&&(u.searcher=pm(c,e)),u}let a={children:[],operator:r[0]};return r.forEach(l=>{const c=s[l];vr(c)&&c.forEach(u=>{a.children.push(i(u))})}),a};return _m(t)||(t=j1(t)),i(t)}function aG(t,{ignoreFieldNorm:e=Je.ignoreFieldNorm}){t.forEach(n=>{let i=1;n.matches.forEach(({key:s,norm:r,score:o})=>{const a=s?s.weight:null;i*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(e?1:r))}),n.score=i})}function lG(t,e){const n=t.matches;e.matches=[],Ti(n)&&n.forEach(i=>{if(!Ti(i.indices)||!i.indices.length)return;const{indices:s,value:r}=i;let o={indices:s,value:r};i.key&&(o.key=i.key.src),i.idx>-1&&(o.refIndex=i.idx),e.matches.push(o)})}function cG(t,e){e.score=t.score}function uG(t,e,{includeMatches:n=Je.includeMatches,includeScore:i=Je.includeScore}={}){const s=[];return n&&s.push(lG),i&&s.push(cG),t.map(r=>{const{idx:o}=r,a={item:e[o],refIndex:o};return s.length&&s.forEach(l=>{l(r,a)}),a})}class Xl{constructor(e,n={},i){this.options={...Je,...n},this.options.useExtendedSearch,this._keyStore=new OU(this.options.keys),this.setCollection(e,i)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof ny))throw new Error(PU);this._myIndex=n||ET(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Ti(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const n=[];for(let i=0,s=this._docs.length;i-1&&(l=l.slice(0,n)),uG(l,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(e){const n=pm(e,this.options),{records:i}=this._myIndex,s=[];return i.forEach(({v:r,i:o,n:a})=>{if(!Ti(r))return;const{isMatch:l,score:c,indices:u}=n.searchIn(r);l&&s.push({item:r,idx:o,matches:[{score:c,value:r,norm:a,indices:u}]})}),s}_searchLogical(e){const n=AT(e,this.options),i=(a,l,c)=>{if(!a.children){const{keyId:d,searcher:h}=a,f=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(l,d),searcher:h});return f&&f.length?[{idx:c,item:l,matches:f}]:[]}const u=[];for(let d=0,h=a.children.length;d{if(Ti(a)){let c=i(n,a,l);c.length&&(r[l]||(r[l]={idx:l,item:a,matches:[]},o.push(r[l])),c.forEach(({matches:u})=>{r[l].matches.push(...u)}))}}),o}_searchObjectList(e){const n=pm(e,this.options),{keys:i,records:s}=this._myIndex,r=[];return s.forEach(({$:o,i:a})=>{if(!Ti(o))return;let l=[];i.forEach((c,u)=>{l.push(...this._findMatches({key:c,value:o[u],searcher:n}))}),l.length&&r.push({idx:a,item:o,matches:l})}),r}_findMatches({key:e,value:n,searcher:i}){if(!Ti(n))return[];let s=[];if(vr(n))n.forEach(({v:r,i:o,n:a})=>{if(!Ti(r))return;const{isMatch:l,score:c,indices:u}=i.searchIn(r);l&&s.push({score:c,key:e,value:r,idx:o,norm:a,indices:u})});else{const{v:r,n:o}=n,{isMatch:a,score:l,indices:c}=i.searchIn(r);a&&s.push({score:l,key:e,value:r,norm:o,indices:c})}return s}}Xl.version="7.0.0";Xl.createIndex=ET;Xl.parseIndex=YU;Xl.config=Je;Xl.parseQuery=AT;sG(iG);const dG={name:"peerSettings",components:{LocaleText:He},props:{selectedPeer:Object},data(){return{data:void 0,dataChanged:!1,showKey:!1,saving:!1}},setup(){return{dashboardConfigurationStore:tt()}},methods:{reset(){this.selectedPeer&&(this.data=JSON.parse(JSON.stringify(this.selectedPeer)),this.dataChanged=!1)},savePeer(){this.saving=!0,xt(`/api/updatePeerSettings/${this.$route.params.id}`,this.data,t=>{this.saving=!1,t.status?this.dashboardConfigurationStore.newMessage("Server","Peer saved","success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.$emit("refresh")})},resetPeerData(t){this.saving=!0,xt(`/api/resetPeerData/${this.$route.params.id}`,{id:this.data.id,type:t},e=>{this.saving=!1,e.status?this.dashboardConfigurationStore.newMessage("Server","Peer data usage reset successfully","success"):this.dashboardConfigurationStore.newMessage("Server",e.message,"danger"),this.$emit("refresh")})}},beforeMount(){this.reset()},mounted(){this.$el.querySelectorAll("input").forEach(t=>{t.addEventListener("keyup",()=>{this.dataChanged=!0})})}},hG={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},fG={class:"container d-flex h-100 w-100"},gG={class:"m-auto modal-dialog-centered dashboardModal"},pG={class:"card rounded-3 shadow flex-grow-1"},mG={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},_G={class:"mb-0"},yG={key:0,class:"card-body px-4 pb-4"},vG={class:"d-flex flex-column gap-2 mb-4"},bG={class:"d-flex align-items-center"},wG={class:"text-muted"},xG={class:"ms-auto"},EG={for:"peer_name_textbox",class:"form-label"},CG={class:"text-muted"},SG=["disabled"],TG={class:"d-flex position-relative"},AG={for:"peer_private_key_textbox",class:"form-label"},kG={class:"text-muted"},MG=["type","disabled"],PG={for:"peer_allowed_ip_textbox",class:"form-label"},IG={class:"text-muted"},DG=["disabled"],RG={for:"peer_endpoint_allowed_ips",class:"form-label"},LG={class:"text-muted"},OG=["disabled"],$G={for:"peer_DNS_textbox",class:"form-label"},NG={class:"text-muted"},FG=["disabled"],BG={class:"accordion mt-3",id:"peerSettingsAccordion"},VG={class:"accordion-item"},zG={class:"accordion-header"},WG={class:"accordion-button rounded-3 collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#peerSettingsAccordionOptional"},YG={id:"peerSettingsAccordionOptional",class:"accordion-collapse collapse","data-bs-parent":"#peerSettingsAccordion"},HG={class:"accordion-body d-flex flex-column gap-2 mb-2"},jG={for:"peer_preshared_key_textbox",class:"form-label"},KG={class:"text-muted"},UG=["disabled"],GG={for:"peer_mtu",class:"form-label"},XG={class:"text-muted"},qG=["disabled"],ZG={for:"peer_keep_alive",class:"form-label"},JG={class:"text-muted"},QG=["disabled"],e7={class:"d-flex gap-2 align-items-center"},t7={class:"d-flex gap-2 ms-auto"},n7={class:"d-flex align-items-center gap-2"},i7=["disabled"],s7=["disabled"];function r7(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",hG,[g("div",fG,[g("div",gG,[g("div",pG,[g("div",mG,[g("h4",_G,[N(o,{t:"Peer Settings"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),this.data?(R(),V("div",yG,[g("div",vG,[g("div",bG,[g("small",wG,[N(o,{t:"Public Key"})]),g("small",xG,[g("samp",null,we(this.data.id),1)])]),g("div",null,[g("label",EG,[g("small",CG,[N(o,{t:"Name"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[1]||(e[1]=a=>this.data.name=a),id:"peer_name_textbox",placeholder:""},null,8,SG),[[We,this.data.name]])]),g("div",null,[g("div",TG,[g("label",AG,[g("small",kG,[N(o,{t:"Private Key"}),g("code",null,[N(o,{t:"(Required for QR Code and Download)"})])])]),g("a",{role:"button",class:"ms-auto text-decoration-none toggleShowKey",onClick:e[2]||(e[2]=a=>this.showKey=!this.showKey)},[g("i",{class:Pe(["bi",[this.showKey?"bi-eye-slash-fill":"bi-eye-fill"]])},null,2)])]),$e(g("input",{type:[this.showKey?"text":"password"],class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[3]||(e[3]=a=>this.data.private_key=a),id:"peer_private_key_textbox",style:{"padding-right":"40px"}},null,8,MG),[[QE,this.data.private_key]])]),g("div",null,[g("label",PG,[g("small",IG,[N(o,{t:"Allowed IPs"}),g("code",null,[N(o,{t:"(Required)"})])])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[4]||(e[4]=a=>this.data.allowed_ip=a),id:"peer_allowed_ip_textbox"},null,8,DG),[[We,this.data.allowed_ip]])]),g("div",null,[g("label",RG,[g("small",LG,[N(o,{t:"Endpoint Allowed IPs"}),g("code",null,[N(o,{t:"(Required)"})])])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[5]||(e[5]=a=>this.data.endpoint_allowed_ip=a),id:"peer_endpoint_allowed_ips"},null,8,OG),[[We,this.data.endpoint_allowed_ip]])]),g("div",null,[g("label",$G,[g("small",NG,[N(o,{t:"DNS"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[6]||(e[6]=a=>this.data.DNS=a),id:"peer_DNS_textbox"},null,8,FG),[[We,this.data.DNS]])]),g("div",BG,[g("div",VG,[g("h2",zG,[g("button",WG,[N(o,{t:"Optional Settings"})])]),g("div",YG,[g("div",HG,[g("div",null,[g("label",jG,[g("small",KG,[N(o,{t:"Pre-Shared Key"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[7]||(e[7]=a=>this.data.preshared_key=a),id:"peer_preshared_key_textbox"},null,8,UG),[[We,this.data.preshared_key]])]),g("div",null,[g("label",GG,[g("small",XG,[N(o,{t:"MTU"})])]),$e(g("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[8]||(e[8]=a=>this.data.mtu=a),id:"peer_mtu"},null,8,qG),[[We,this.data.mtu]])]),g("div",null,[g("label",ZG,[g("small",JG,[N(o,{t:"Persistent Keepalive"})])]),$e(g("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[9]||(e[9]=a=>this.data.keepalive=a),id:"peer_keep_alive"},null,8,QG),[[We,this.data.keepalive]])])])])])]),e[18]||(e[18]=g("hr",null,null,-1)),g("div",e7,[g("strong",null,[N(o,{t:"Reset Data Usage"})]),g("div",t7,[g("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[10]||(e[10]=a=>this.resetPeerData("total"))},[e[15]||(e[15]=g("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),N(o,{t:"Total"})]),g("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[11]||(e[11]=a=>this.resetPeerData("receive"))},[e[16]||(e[16]=g("i",{class:"bi bi-arrow-down me-2"},null,-1)),N(o,{t:"Received"})]),g("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[12]||(e[12]=a=>this.resetPeerData("sent"))},[e[17]||(e[17]=g("i",{class:"bi bi-arrow-up me-2"},null,-1)),N(o,{t:"Sent"})])])])]),g("div",n7,[g("button",{class:"btn btn-secondary rounded-3 shadow",onClick:e[13]||(e[13]=a=>this.reset()),disabled:!this.dataChanged||this.saving},[N(o,{t:"Revert"}),e[19]||(e[19]=g("i",{class:"bi bi-arrow-clockwise ms-2"},null,-1))],8,i7),g("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!this.dataChanged||this.saving,onClick:e[14]||(e[14]=a=>this.savePeer())},[N(o,{t:"Save Peer"}),e[20]||(e[20]=g("i",{class:"bi bi-save-fill ms-2"},null,-1))],8,s7)])])):ce("",!0)])])])])}const o7=je(dG,[["render",r7],["__scopeId","data-v-2c571abb"]]);var ba={},a7=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},kT={},Di={};let iy;const l7=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Di.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};Di.getSymbolTotalCodewords=function(e){return l7[e]};Di.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};Di.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');iy=e};Di.isKanjiModeEnabled=function(){return typeof iy<"u"};Di.toSJIS=function(e){return iy(e)};var If={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},t.from=function(i,s){if(t.isValid(i))return i;try{return e(i)}catch{return s}}})(If);function MT(){this.buffer=[],this.length=0}MT.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var c7=MT;function Uu(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}Uu.prototype.set=function(t,e,n,i){const s=t*this.size+e;this.data[s]=n,i&&(this.reservedBit[s]=!0)};Uu.prototype.get=function(t,e){return this.data[t*this.size+e]};Uu.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};Uu.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var u7=Uu,PT={};(function(t){const e=Di.getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];const s=Math.floor(i/7)+2,r=e(i),o=r===145?26:Math.ceil((r-13)/(2*s-2))*2,a=[r-7];for(let l=1;l=0&&s<=7},t.from=function(s){return t.isValid(s)?parseInt(s,10):void 0},t.getPenaltyN1=function(s){const r=s.size;let o=0,a=0,l=0,c=null,u=null;for(let d=0;d=5&&(o+=e.N1+(a-5)),c=f,a=1),f=s.get(h,d),f===u?l++:(l>=5&&(o+=e.N1+(l-5)),u=f,l=1)}a>=5&&(o+=e.N1+(a-5)),l>=5&&(o+=e.N1+(l-5))}return o},t.getPenaltyN2=function(s){const r=s.size;let o=0;for(let a=0;a=10&&(a===1488||a===93)&&o++,l=l<<1&2047|s.get(u,c),u>=10&&(l===1488||l===93)&&o++}return o*e.N3},t.getPenaltyN4=function(s){let r=0;const o=s.data.length;for(let l=0;l=0;){const o=r[0];for(let l=0;l0){const r=new Uint8Array(this.degree);return r.set(i,s),r}return i};var h7=sy,OT={},xo={},ry={};ry.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Vs={};const $T="[0-9]+",f7="[A-Z $%*+\\-./:]+";let yu="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";yu=yu.replace(/u/g,"\\u");const g7="(?:(?![A-Z0-9 $%*+\\-./:]|"+yu+`)(?:.|[\r ]))+`;Vs.KANJI=new RegExp(yu,"g");Vs.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Vs.BYTE=new RegExp(g7,"g");Vs.NUMERIC=new RegExp($T,"g");Vs.ALPHANUMERIC=new RegExp(f7,"g");const p7=new RegExp("^"+yu+"$"),m7=new RegExp("^"+$T+"$"),_7=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Vs.testKanji=function(e){return p7.test(e)};Vs.testNumeric=function(e){return m7.test(e)};Vs.testAlphanumeric=function(e){return _7.test(e)};(function(t){const e=ry,n=Vs;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(r,o){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?r.ccBits[0]:o<27?r.ccBits[1]:r.ccBits[2]},t.getBestModeForData=function(r){return n.testNumeric(r)?t.NUMERIC:n.testAlphanumeric(r)?t.ALPHANUMERIC:n.testKanji(r)?t.KANJI:t.BYTE},t.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},t.isValid=function(r){return r&&r.bit&&r.ccBits};function i(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+s)}}t.from=function(r,o){if(t.isValid(r))return r;try{return i(r)}catch{return o}}})(xo);(function(t){const e=Di,n=Df,i=If,s=xo,r=ry,o=7973,a=e.getBCHDigit(o);function l(h,f,p){for(let m=1;m<=40;m++)if(f<=t.getCapacity(m,p,h))return m}function c(h,f){return s.getCharCountIndicator(h,f)+4}function u(h,f){let p=0;return h.forEach(function(m){const y=c(m.mode,f);p+=y+m.getBitsLength()}),p}function d(h,f){for(let p=1;p<=40;p++)if(u(h,p)<=t.getCapacity(p,f,s.MIXED))return p}t.from=function(f,p){return r.isValid(f)?parseInt(f,10):p},t.getCapacity=function(f,p,m){if(!r.isValid(f))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=s.BYTE);const y=e.getSymbolTotalCodewords(f),v=n.getTotalCodewordsCount(f,p),b=(y-v)*8;if(m===s.MIXED)return b;const x=b-c(m,f);switch(m){case s.NUMERIC:return Math.floor(x/10*3);case s.ALPHANUMERIC:return Math.floor(x/11*2);case s.KANJI:return Math.floor(x/13);case s.BYTE:default:return Math.floor(x/8)}},t.getBestVersionForData=function(f,p){let m;const y=i.from(p,i.M);if(Array.isArray(f)){if(f.length>1)return d(f,y);if(f.length===0)return 1;m=f[0]}else m=f;return l(m.mode,m.getLength(),y)},t.getEncodedBits=function(f){if(!r.isValid(f)||f<7)throw new Error("Invalid QR Code version");let p=f<<12;for(;e.getBCHDigit(p)-a>=0;)p^=o<=0;)s^=FT<0&&(i=this.data.substr(n),s=parseInt(i,10),e.put(s,r*3+1))};var b7=Rl;const w7=xo,sp=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Ll(t){this.mode=w7.ALPHANUMERIC,this.data=t}Ll.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Ll.prototype.getLength=function(){return this.data.length};Ll.prototype.getBitsLength=function(){return Ll.getBitsLength(this.data.length)};Ll.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let i=sp.indexOf(this.data[n])*45;i+=sp.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(sp.indexOf(this.data[n]),6)};var x7=Ll;const E7=xo;function Ol(t){this.mode=E7.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}Ol.getBitsLength=function(e){return e*8};Ol.prototype.getLength=function(){return this.data.length};Ol.prototype.getBitsLength=function(){return Ol.getBitsLength(this.data.length)};Ol.prototype.write=function(t){for(let e=0,n=this.data.length;e=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var A7=$l,VT={exports:{}};(function(t){var e={single_source_shortest_paths:function(n,i,s){var r={},o={};o[i]=0;var a=e.PriorityQueue.make();a.push(i,0);for(var l,c,u,d,h,f,p,m,y;!a.empty();){l=a.pop(),c=l.value,d=l.cost,h=n[c]||{};for(u in h)h.hasOwnProperty(u)&&(f=h[u],p=d+f,m=o[u],y=typeof o[u]>"u",(y||m>p)&&(o[u]=p,a.push(u,p),r[u]=c))}if(typeof s<"u"&&typeof o[s]>"u"){var v=["Could not find a path from ",i," to ",s,"."].join("");throw new Error(v)}return r},extract_shortest_path_from_predecessor_list:function(n,i){for(var s=[],r=i;r;)s.push(r),n[r],r=n[r];return s.reverse(),s},find_path:function(n,i,s){var r=e.single_source_shortest_paths(n,i,s);return e.extract_shortest_path_from_predecessor_list(r,s)},PriorityQueue:{make:function(n){var i=e.PriorityQueue,s={},r;n=n||{};for(r in i)i.hasOwnProperty(r)&&(s[r]=i[r]);return s.queue=[],s.sorter=n.sorter||i.default_sorter,s},default_sorter:function(n,i){return n.cost-i.cost},push:function(n,i){var s={value:n,cost:i};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(VT);var k7=VT.exports;(function(t){const e=xo,n=b7,i=x7,s=C7,r=A7,o=Vs,a=Di,l=k7;function c(v){return unescape(encodeURIComponent(v)).length}function u(v,b,x){const E=[];let w;for(;(w=v.exec(x))!==null;)E.push({data:w[0],index:w.index,mode:b,length:w[0].length});return E}function d(v){const b=u(o.NUMERIC,e.NUMERIC,v),x=u(o.ALPHANUMERIC,e.ALPHANUMERIC,v);let E,w;return a.isKanjiModeEnabled()?(E=u(o.BYTE,e.BYTE,v),w=u(o.KANJI,e.KANJI,v)):(E=u(o.BYTE_KANJI,e.BYTE,v),w=[]),b.concat(x,E,w).sort(function(T,A){return T.index-A.index}).map(function(T){return{data:T.data,mode:T.mode,length:T.length}})}function h(v,b){switch(b){case e.NUMERIC:return n.getBitsLength(v);case e.ALPHANUMERIC:return i.getBitsLength(v);case e.KANJI:return r.getBitsLength(v);case e.BYTE:return s.getBitsLength(v)}}function f(v){return v.reduce(function(b,x){const E=b.length-1>=0?b[b.length-1]:null;return E&&E.mode===x.mode?(b[b.length-1].data+=x.data,b):(b.push(x),b)},[])}function p(v){const b=[];for(let x=0;x=0&&a<=6&&(l===0||l===6)||l>=0&&l<=6&&(a===0||a===6)||a>=2&&a<=4&&l>=2&&l<=4?t.set(r+a,o+l,!0,!0):t.set(r+a,o+l,!1,!0))}}function N7(t){const e=t.size;for(let n=8;n>a&1)===1,t.set(s,r,o,!0),t.set(r,s,o,!0)}function ap(t,e,n){const i=t.size,s=L7.getEncodedBits(e,n);let r,o;for(r=0;r<15;r++)o=(s>>r&1)===1,r<6?t.set(r,8,o,!0):r<8?t.set(r+1,8,o,!0):t.set(i-15+r,8,o,!0),r<8?t.set(8,i-r-1,o,!0):r<9?t.set(8,15-r-1+1,o,!0):t.set(8,15-r-1,o,!0);t.set(i-8,8,1,!0)}function V7(t,e){const n=t.size;let i=-1,s=n-1,r=7,o=0;for(let a=n-1;a>0;a-=2)for(a===6&&a--;;){for(let l=0;l<2;l++)if(!t.isReserved(s,a-l)){let c=!1;o>>r&1)===1),t.set(s,a-l,c),r--,r===-1&&(o++,r=7)}if(s+=i,s<0||n<=s){s-=i,i=-i;break}}}function z7(t,e,n){const i=new M7;n.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),O7.getCharCountIndicator(l.mode,t)),l.write(i)});const s=Lf.getSymbolTotalCodewords(t),r=bm.getTotalCodewordsCount(t,e),o=(s-r)*8;for(i.getLengthInBits()+4<=o&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const a=(o-i.getLengthInBits())/8;for(let l=0;l=7&&B7(l,e),V7(l,o),isNaN(i)&&(i=vm.getBestMask(l,ap.bind(null,l,n))),vm.applyMask(i,l),ap(l,n,i),{modules:l,version:e,errorCorrectionLevel:n,maskPattern:i,segments:s}}kT.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let i=rp.M,s,r;return typeof n<"u"&&(i=rp.from(n.errorCorrectionLevel,rp.M),s=Lh.from(n.version),r=vm.from(n.maskPattern),n.toSJISFunc&&Lf.setToSJISFunction(n.toSJISFunc)),Y7(e,s,i,r)};var zT={},oy={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let i=n.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+n);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(r){return[r,r]}))),i.length===6&&i.push("F","F");const s=parseInt(i.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+i.slice(0,6).join("")}}t.getOptions=function(i){i||(i={}),i.color||(i.color={});const s=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,r=i.width&&i.width>=21?i.width:void 0,o=i.scale||4;return{width:r,scale:r?4:o,margin:s,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},t.getScale=function(i,s){return s.width&&s.width>=i+s.margin*2?s.width/(i+s.margin*2):s.scale},t.getImageWidth=function(i,s){const r=t.getScale(i,s);return Math.floor((i+s.margin*2)*r)},t.qrToImageData=function(i,s,r){const o=s.modules.size,a=s.modules.data,l=t.getScale(o,r),c=Math.floor((o+r.margin*2)*l),u=r.margin*l,d=[r.color.light,r.color.dark];for(let h=0;h=u&&f>=u&&h"u"&&(!o||!o.getContext)&&(l=o,o=void 0),o||(c=i()),l=e.getOptions(l);const u=e.getImageWidth(r.modules.size,l),d=c.getContext("2d"),h=d.createImageData(u,u);return e.qrToImageData(h.data,r,l),n(d,c,u),d.putImageData(h,0,0),c},t.renderToDataURL=function(r,o,a){let l=a;typeof l>"u"&&(!o||!o.getContext)&&(l=o,o=void 0),l||(l={});const c=t.render(r,o,l),u=l.type||"image/png",d=l.rendererOpts||{};return c.toDataURL(u,d.quality)}})(zT);var WT={};const H7=oy;function G1(t,e){const n=t.a/255,i=e+'="'+t.hex+'"';return n<1?i+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function lp(t,e,n){let i=t+e;return typeof n<"u"&&(i+=" "+n),i}function j7(t,e,n){let i="",s=0,r=!1,o=0;for(let a=0;a0&&l>0&&t[a-1]||(i+=r?lp("M",l+n,.5+c+n):lp("m",s,0),s=0,r=!1),l+1':"",c="',u='viewBox="0 0 '+a+" "+a+'"',h=''+l+c+` -`;return typeof i=="function"&&i(null,h),h};const K7=a7,wm=kT,YT=zT,U7=WT;function ay(t,e,n,i,s){const r=[].slice.call(arguments,1),o=r.length,a=typeof r[o-1]=="function";if(!a&&!K7())throw new Error("Callback required as last argument");if(a){if(o<2)throw new Error("Too few arguments provided");o===2?(s=n,n=e,e=i=void 0):o===3&&(e.getContext&&typeof s>"u"?(s=i,i=void 0):(s=i,i=n,n=e,e=void 0))}else{if(o<1)throw new Error("Too few arguments provided");return o===1?(n=e,e=i=void 0):o===2&&!e.getContext&&(i=n,n=e,e=void 0),new Promise(function(l,c){try{const u=wm.create(n,i);l(t(u,e,i))}catch(u){c(u)}})}try{const l=wm.create(n,i);s(null,t(l,e,i))}catch(l){s(l)}}ba.create=wm.create;ba.toCanvas=ay.bind(null,YT.render);ba.toDataURL=ay.bind(null,YT.renderToDataURL);ba.toString=ay.bind(null,function(t,e,n){return U7.render(t,n)});const G7={name:"peerQRCode",components:{LocaleText:He},props:{peerConfigData:String},mounted(){ba.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,t=>{t&&console.error(t)})}},X7={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},q7={class:"container d-flex h-100 w-100"},Z7={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},J7={class:"card rounded-3 shadow"},Q7={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},eX={class:"mb-0"},tX={class:"card-body"},nX={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function iX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",X7,[g("div",q7,[g("div",Z7,[g("div",J7,[g("div",Q7,[g("h4",eX,[N(o,{t:"QR Code"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),g("div",tX,[g("canvas",nX,null,512)])])])])])}const sX=je(G7,[["render",iX]]),rX={name:"nameInput",components:{LocaleText:He},props:{bulk:Boolean,data:Object,saving:Boolean}},oX={for:"peer_name_textbox",class:"form-label"},aX={class:"text-muted"},lX=["disabled"];function cX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe({inactiveField:this.bulk})},[g("label",oX,[g("small",aX,[N(o,{t:"Name"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||this.bulk,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.name=a),id:"peer_name_textbox",placeholder:""},null,8,lX),[[We,this.data.name]])],2)}const uX=je(rX,[["render",cX]]),dX={name:"privatePublicKeyInput",components:{LocaleText:He},props:{data:Object,saving:Boolean,bulk:Boolean},setup(){const t=tt(),e=qn();return{dashboardStore:t,wgStore:e}},data(){return{keypair:{publicKey:"",privateKey:"",presharedKey:""},editKey:!1,error:!1}},methods:{genKeyPair(){this.editKey=!1,this.keypair=window.wireguard.generateKeypair(),this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey},testKey(t){return/^[A-Za-z0-9+/]{43}=?=?$/.test(t)},checkMatching(){try{this.keypair.privateKey&&this.wgStore.checkWGKeyLength(this.keypair.privateKey)&&(this.keypair.publicKey=window.wireguard.generatePublicKey(this.keypair.privateKey),window.wireguard.generatePublicKey(this.keypair.privateKey)!==this.keypair.publicKey?(this.error=!0,this.dashboardStore.newMessage("WGDashboard","Private key does not match with the public key","danger")):(this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey))}catch{this.error=!0,this.data.private_key="",this.data.public_key=""}}},mounted(){this.genKeyPair()},watch:{keypair:{deep:!0,handler(){this.error=!1,this.checkMatching()}}}},hX={for:"peer_private_key_textbox",class:"form-label"},fX={class:"text-muted"},gX={class:"input-group"},pX=["disabled"],mX=["disabled"],_X={class:"d-flex"},yX={for:"public_key",class:"form-label"},vX={class:"text-muted"},bX={class:"form-check form-switch ms-auto"},wX=["disabled"],xX={class:"form-check-label",for:"enablePublicKeyEdit"},EX=["disabled"];function CX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[g("div",null,[g("label",hX,[g("small",fX,[N(o,{t:"Private Key"}),g("code",null,[N(o,{t:"(Required for QR Code and Download)"})])])]),g("div",gX,[$e(g("input",{type:"text",class:Pe(["form-control form-control-sm rounded-start-3",{"is-invalid":this.error}]),"onUpdate:modelValue":e[0]||(e[0]=a=>this.keypair.privateKey=a),disabled:!this.editKey||this.bulk,onBlur:e[1]||(e[1]=a=>this.checkMatching()),id:"peer_private_key_textbox"},null,42,pX),[[We,this.keypair.privateKey]]),g("button",{class:"btn btn-outline-info btn-sm rounded-end-3",onClick:e[2]||(e[2]=a=>this.genKeyPair()),disabled:this.bulk,type:"button",id:"button-addon2"},e[6]||(e[6]=[g("i",{class:"bi bi-arrow-repeat"},null,-1)]),8,mX)])]),g("div",null,[g("div",_X,[g("label",yX,[g("small",vX,[N(o,{t:"Public Key"}),g("code",null,[N(o,{t:"(Required)"})])])]),g("div",bX,[$e(g("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:this.bulk,id:"enablePublicKeyEdit","onUpdate:modelValue":e[3]||(e[3]=a=>this.editKey=a)},null,8,wX),[[Kn,this.editKey]]),g("label",xX,[g("small",null,[N(o,{t:"Use your own Private and Public Key"})])])])]),$e(g("input",{class:Pe(["form-control-sm form-control rounded-3",{"is-invalid":this.error}]),"onUpdate:modelValue":e[4]||(e[4]=a=>this.keypair.publicKey=a),onBlur:e[5]||(e[5]=a=>this.checkMatching()),disabled:!this.editKey||this.bulk,type:"text",id:"public_key"},null,42,EX),[[We,this.keypair.publicKey]])])],2)}const SX=je(dX,[["render",CX]]),TX={name:"allowedIPsInput",components:{LocaleText:He},props:{data:Object,saving:Boolean,bulk:Boolean,availableIp:void 0},data(){return{allowedIp:[],availableIpSearchString:"",customAvailableIp:"",allowedIpFormatError:!1}},setup(){const t=qn(),e=tt();return{store:t,dashboardStore:e}},computed:{searchAvailableIps(){return this.availableIpSearchString?this.availableIp.filter(t=>t.includes(this.availableIpSearchString)&&!this.data.allowed_ips.includes(t)):this.availableIp.filter(t=>!this.data.allowed_ips.includes(t))},inputGetLocale(){return At("Enter IP Address/CIDR")}},methods:{addAllowedIp(t){return this.store.checkCIDR(t)?(this.data.allowed_ips.push(t),this.customAvailableIp="",!0):(this.allowedIpFormatError=!0,this.dashboardStore.newMessage("WGDashboard","Allowed IPs is invalid","danger"),!1)}},watch:{customAvailableIp(){this.allowedIpFormatError=!1},availableIp(){this.availableIp!==void 0&&this.availableIp.length>0&&this.addAllowedIp(this.availableIp[0])}},mounted(){}},AX={for:"peer_allowed_ip_textbox",class:"form-label"},kX={class:"text-muted"},MX=["onClick"],PX={class:"d-flex gap-2 align-items-center"},IX={class:"input-group"},DX=["placeholder","disabled"],RX=["disabled"],LX={class:"text-muted"},OX={class:"dropdown flex-grow-1"},$X=["disabled"],NX={key:0,class:"dropdown-menu mt-2 shadow w-100 dropdown-menu-end rounded-3",style:{"overflow-y":"scroll","max-height":"270px",width:"300px !important"}},FX={class:"px-3 pb-2 pt-1 d-flex gap-3 align-items-center"},BX=["onClick"],VX={class:"me-auto"},zX={key:0},WX={class:"px-3 text-muted"};function YX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe({inactiveField:this.bulk})},[g("label",AX,[g("small",kX,[N(o,{t:"Allowed IPs"}),g("code",null,[N(o,{t:"(Required)"})])])]),g("div",{class:Pe(["d-flex gap-2 flex-wrap",{"mb-2":this.data.allowed_ips.length>0}])},[N(Ul,{name:"list"},{default:De(()=>[(R(!0),V(Oe,null,Ze(this.data.allowed_ips,(a,l)=>(R(),V("span",{class:"badge rounded-pill text-bg-success",key:a},[Ue(xe(a)+" ",1),g("a",{role:"button",onClick:c=>this.data.allowed_ips.splice(l,1)},e[3]||(e[3]=[g("i",{class:"bi bi-x-circle-fill ms-1"},null,-1)]),8,MX)]))),128))]),_:1})],2),g("div",PX,[g("div",IX,[$e(g("input",{type:"text",class:Pe(["form-control form-control-sm rounded-start-3",{"is-invalid":this.allowedIpFormatError}]),placeholder:this.inputGetLocale,"onUpdate:modelValue":e[0]||(e[0]=a=>s.customAvailableIp=a),disabled:n.bulk},null,10,DX),[[We,s.customAvailableIp]]),g("button",{class:"btn btn-outline-success btn-sm rounded-end-3",disabled:n.bulk||!this.customAvailableIp,onClick:e[1]||(e[1]=a=>this.addAllowedIp(this.customAvailableIp)),type:"button",id:"button-addon2"},e[4]||(e[4]=[g("i",{class:"bi bi-plus-lg"},null,-1)]),8,RX)]),g("small",LX,[N(o,{t:"or"})]),g("div",OX,[g("button",{class:"btn btn-outline-secondary btn-sm dropdown-toggle rounded-3 w-100",disabled:!n.availableIp||n.bulk,"data-bs-auto-close":"outside",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[e[5]||(e[5]=g("i",{class:"bi bi-filter-circle me-2"},null,-1)),N(o,{t:"Pick Available IP"})],8,$X),this.availableIp?(R(),V("ul",NX,[g("li",null,[g("div",FX,[e[6]||(e[6]=g("label",{for:"availableIpSearchString",class:"text-muted"},[g("i",{class:"bi bi-search"})],-1)),$e(g("input",{id:"availableIpSearchString",class:"form-control form-control-sm rounded-3","onUpdate:modelValue":e[2]||(e[2]=a=>this.availableIpSearchString=a)},null,512),[[We,this.availableIpSearchString]])])]),(R(!0),V(Oe,null,Ze(this.searchAvailableIps,a=>(R(),V("li",null,[g("a",{class:"dropdown-item d-flex",role:"button",onClick:l=>this.addAllowedIp(a)},[g("span",VX,[g("small",null,xe(a),1)])],8,BX)]))),256)),this.searchAvailableIps.length===0?(R(),V("li",zX,[g("small",WX,[N(o,{t:"No available IP containing"}),Ue(' "'+xe(this.availableIpSearchString)+'"',1)])])):ce("",!0)])):ce("",!0)])])],2)}const HX=je(TX,[["render",YX],["__scopeId","data-v-6d5fc831"]]),jX={name:"dnsInput",components:{LocaleText:He},props:{data:Object,saving:Boolean},data(){return{error:!1,dns:JSON.parse(JSON.stringify(this.data.DNS))}},setup(){const t=qn(),e=tt();return{store:t,dashboardStore:e}},methods:{checkDNS(){if(this.dns){let t=this.dns.split(",").map(e=>e.replaceAll(" ",""));for(let e in t)if(!this.store.regexCheckIP(t[e])){this.error||this.dashboardStore.newMessage("WGDashboard","DNS format is incorrect","danger"),this.error=!0,this.data.DNS="";return}this.error=!1,this.data.DNS=this.dns}}},watch:{dns(){this.checkDNS()}}},KX={for:"peer_DNS_textbox",class:"form-label"},UX={class:"text-muted"},GX=["disabled"];function XX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("label",KX,[g("small",UX,[N(o,{t:"DNS"})])]),$e(g("input",{type:"text",class:Pe(["form-control form-control-sm rounded-3",{"is-invalid":this.error}]),disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.dns=a),id:"peer_DNS_textbox"},null,10,GX),[[We,this.dns]])])}const qX=je(jX,[["render",XX]]),ZX={name:"endpointAllowedIps",components:{LocaleText:He},props:{data:Object,saving:Boolean},setup(){const t=qn(),e=tt();return{store:t,dashboardStore:e}},data(){return{endpointAllowedIps:JSON.parse(JSON.stringify(this.data.endpoint_allowed_ip)),error:!1}},methods:{checkAllowedIP(){let t=this.endpointAllowedIps.split(",").map(e=>e.replaceAll(" ",""));for(let e in t)if(!this.store.checkCIDR(t[e])){this.error||this.dashboardStore.newMessage("WGDashboard","Endpoint Allowed IPs format is incorrect","danger"),this.data.endpoint_allowed_ip="",this.error=!0;return}this.error=!1,this.data.endpoint_allowed_ip=this.endpointAllowedIps}},watch:{endpointAllowedIps(){this.checkAllowedIP()}}},JX={for:"peer_endpoint_allowed_ips",class:"form-label"},QX={class:"text-muted"},e9=["disabled"];function t9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("label",JX,[g("small",QX,[N(o,{t:"Endpoint Allowed IPs"}),g("code",null,[N(o,{t:"(Required)"})])])]),$e(g("input",{type:"text",class:Pe(["form-control form-control-sm rounded-3",{"is-invalid":s.error}]),disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.endpointAllowedIps=a),onBlur:e[1]||(e[1]=a=>this.checkAllowedIP()),id:"peer_endpoint_allowed_ips"},null,42,e9),[[We,this.endpointAllowedIps]])])}const n9=je(ZX,[["render",t9]]),i9={name:"presharedKeyInput",components:{LocaleText:He},props:{data:Object,saving:Boolean},data(){return{enable:!1}},watch:{enable(){this.enable?this.data.preshared_key=window.wireguard.generateKeypair().presharedKey:this.data.preshared_key=""}}},s9={class:"d-flex align-items-start"},r9={for:"peer_preshared_key_textbox",class:"form-label"},o9={class:"text-muted"},a9={class:"form-check form-switch ms-auto"},l9=["disabled"];function c9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("div",s9,[g("label",r9,[g("small",o9,[N(o,{t:"Pre-Shared Key"})])]),g("div",a9,[$e(g("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":e[0]||(e[0]=a=>this.enable=a),id:"peer_preshared_key_switch"},null,512),[[Kn,this.enable]])])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||!this.enable,"onUpdate:modelValue":e[1]||(e[1]=a=>this.data.preshared_key=a),id:"peer_preshared_key_textbox"},null,8,l9),[[We,this.data.preshared_key]])])}const u9=je(i9,[["render",c9]]),d9={name:"mtuInput",components:{LocaleText:He},props:{data:Object,saving:Boolean}},h9={for:"peer_mtu",class:"form-label"},f9={class:"text-muted"},g9=["disabled"];function p9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("label",h9,[g("small",f9,[N(o,{t:"MTU"})])]),$e(g("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.mtu=a),min:"0",id:"peer_mtu"},null,8,g9),[[We,this.data.mtu]])])}const m9=je(d9,[["render",p9]]),_9={name:"persistentKeepAliveInput",components:{LocaleText:He},props:{data:Object,saving:Boolean}},y9={for:"peer_keep_alive",class:"form-label"},v9={class:"text-muted"},b9=["disabled"];function w9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("label",y9,[g("small",v9,[N(o,{t:"Persistent Keepalive"})])]),$e(g("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.keepalive=a),id:"peer_keep_alive"},null,8,b9),[[We,this.data.keepalive]])])}const x9=je(_9,[["render",w9]]),E9={name:"bulkAdd",components:{LocaleText:He},props:{saving:Boolean,data:Object,availableIp:void 0},computed:{bulkAddGetLocale(){return At("How many peers you want to add?")}}},C9={class:"form-check form-switch"},S9=["disabled"],T9={class:"form-check-label me-2",for:"bulk_add"},A9={class:"text-muted d-block"},k9={key:0,class:"form-group"},M9=["max","placeholder"],P9={class:"text-muted"};function I9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("div",C9,[$e(g("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:!this.availableIp,id:"bulk_add","onUpdate:modelValue":e[0]||(e[0]=a=>this.data.bulkAdd=a)},null,8,S9),[[Kn,this.data.bulkAdd]]),g("label",T9,[g("small",null,[g("strong",null,[N(o,{t:"Bulk Add"})])])])]),g("p",{class:Pe({"mb-0":!this.data.bulkAdd})},[g("small",A9,[N(o,{t:"By adding peers by bulk, each peer's name will be auto generated, and Allowed IP will be assign to the next available IP."})])],2),this.data.bulkAdd?(R(),V("div",k9,[$e(g("input",{class:"form-control form-control-sm rounded-3 mb-1",type:"number",min:"1",max:this.availableIp.length,"onUpdate:modelValue":e[1]||(e[1]=a=>this.data.bulkAddAmount=a),placeholder:this.bulkAddGetLocale},null,8,M9),[[We,this.data.bulkAddAmount]]),g("small",P9,[N(o,{t:"You can add up to "+this.availableIp.length+" peers"},null,8,["t"])])])):ce("",!0)])}const D9=je(E9,[["render",I9]]),R9={name:"peerCreate",components:{LocaleText:He,BulkAdd:D9,PersistentKeepAliveInput:x9,MtuInput:m9,PresharedKeyInput:u9,EndpointAllowedIps:n9,DnsInput:qX,AllowedIPsInput:HX,PrivatePublicKeyInput:SX,NameInput:uX},data(){return{data:{bulkAdd:!1,bulkAddAmount:0,name:"",allowed_ips:[],private_key:"",public_key:"",DNS:this.dashboardStore.Configuration.Peers.peer_global_dns,endpoint_allowed_ip:this.dashboardStore.Configuration.Peers.peer_endpoint_allowed_ip,keepalive:parseInt(this.dashboardStore.Configuration.Peers.peer_keep_alive),mtu:parseInt(this.dashboardStore.Configuration.Peers.peer_mtu),preshared_key:"",preshared_key_bulkAdd:!1},availableIp:void 0,availableIpSearchString:"",saving:!1,allowedIpDropdown:void 0}},mounted(){Yt("/api/getAvailableIPs/"+this.$route.params.id,{},t=>{t.status&&(this.availableIp=t.data)})},setup(){const t=qn(),e=tt();return{store:t,dashboardStore:e}},methods:{peerCreate(){this.saving=!0,xt("/api/addPeers/"+this.$route.params.id,this.data,t=>{t.status?(this.$router.push(`/configuration/${this.$route.params.id}/peers`),this.dashboardStore.newMessage("Server","Peer created successfully","success")):this.dashboardStore.newMessage("Server",t.message,"danger"),this.saving=!1})}},computed:{allRequireFieldsFilled(){let t=!0;return this.data.bulkAdd?(this.data.bulkAddAmount.length===0||this.data.bulkAddAmount>this.availableIp.length)&&(t=!1):["allowed_ips","private_key","public_key","endpoint_allowed_ip","keepalive","mtu"].forEach(n=>{this.data[n].length===0&&(t=!1)}),t}},watch:{bulkAdd(t){t||(this.data.bulkAddAmount="")},"data.bulkAddAmount"(){this.data.bulkAddAmount>this.availableIp.length&&(this.data.bulkAddAmount=this.availableIp.length)}}},L9={class:"container"},O9={class:"mb-4"},$9={class:"text-body mb-0"},N9={class:"d-flex flex-column gap-2"},F9={class:"row gy-3"},B9={key:0,class:"col-sm"},V9={class:"col-sm"},z9={class:"col-sm"},W9={key:1,class:"col-12"},Y9={class:"form-check form-switch"},H9={class:"form-check-label",for:"bullAdd_PresharedKey_Switch"},j9={class:"fw-bold"},K9={class:"d-flex mt-2"},U9=["disabled"],G9={key:0,class:"bi bi-plus-circle-fill me-2"};function X9(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink"),l=Ee("BulkAdd"),c=Ee("NameInput"),u=Ee("PrivatePublicKeyInput"),d=Ee("AllowedIPsInput"),h=Ee("EndpointAllowedIps"),f=Ee("DnsInput"),p=Ee("PresharedKeyInput"),m=Ee("MtuInput"),y=Ee("PersistentKeepAliveInput");return R(),V("div",L9,[g("div",O9,[N(a,{to:"peers",is:"div",class:"d-flex align-items-center gap-4 text-decoration-none"},{default:De(()=>[e[2]||(e[2]=g("h3",{class:"mb-0 text-body"},[g("i",{class:"bi bi-chevron-left"})],-1)),g("h3",$9,[N(o,{t:"Add Peers"})])]),_:1})]),g("div",N9,[N(l,{saving:s.saving,data:this.data,availableIp:this.availableIp},null,8,["saving","data","availableIp"]),e[3]||(e[3]=g("hr",{class:"mb-0 mt-2"},null,-1)),this.data.bulkAdd?ce("",!0):(R(),Se(c,{key:0,saving:s.saving,data:this.data},null,8,["saving","data"])),this.data.bulkAdd?ce("",!0):(R(),Se(u,{key:1,saving:s.saving,data:s.data},null,8,["saving","data"])),this.data.bulkAdd?ce("",!0):(R(),Se(d,{key:2,availableIp:this.availableIp,saving:s.saving,data:s.data},null,8,["availableIp","saving","data"])),N(h,{saving:s.saving,data:s.data},null,8,["saving","data"]),N(f,{saving:s.saving,data:s.data},null,8,["saving","data"]),e[4]||(e[4]=g("hr",{class:"mb-0 mt-2"},null,-1)),g("div",F9,[this.data.bulkAdd?ce("",!0):(R(),V("div",B9,[N(p,{saving:s.saving,data:s.data,bulk:this.data.bulkAdd},null,8,["saving","data","bulk"])])),g("div",V9,[N(m,{saving:s.saving,data:s.data},null,8,["saving","data"])]),g("div",z9,[N(y,{saving:s.saving,data:s.data},null,8,["saving","data"])]),this.data.bulkAdd?(R(),V("div",W9,[g("div",Y9,[$e(g("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":e[0]||(e[0]=v=>this.data.preshared_key_bulkAdd=v),id:"bullAdd_PresharedKey_Switch",checked:""},null,512),[[Kn,this.data.preshared_key_bulkAdd]]),g("label",H9,[g("small",j9,[N(o,{t:"Pre-Shared Key"}),this.data.preshared_key_bulkAdd?(R(),Se(o,{key:0,t:"Enabled"})):(R(),Se(o,{key:1,t:"Disabled"}))])])])])):ce("",!0)]),g("div",K9,[g("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!this.allRequireFieldsFilled||this.saving,onClick:e[1]||(e[1]=v=>this.peerCreate())},[this.saving?ce("",!0):(R(),V("i",G9)),this.saving?(R(),Se(o,{key:1,t:"Adding..."})):(R(),Se(o,{key:2,t:"Add"}))],8,U9)])])])}const HT=je(R9,[["render",X9],["__scopeId","data-v-3f34f584"]]),q9={name:"scheduleDropdown",props:{options:Array,data:String,edit:!1},setup(t){t.data===void 0&&this.$emit("update",this.options[0].value)},computed:{currentSelection(){return this.options.find(t=>t.value===this.data)}}},Z9={class:"dropdown scheduleDropdown"},J9={class:"dropdown-menu rounded-3 shadow",style:{"font-size":"0.875rem",width:"200px"}},Q9=["onClick"],eq={key:0,class:"bi bi-check ms-auto"};function tq(t,e,n,i,s,r){return R(),V("div",Z9,[g("button",{class:Pe(["btn btn-sm btn-outline-primary rounded-3",{"disabled border-transparent":!n.edit}]),type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[g("samp",null,xe(this.currentSelection.display),1)],2),g("ul",J9,[n.edit?(R(!0),V(Oe,{key:0},Ze(this.options,o=>(R(),V("li",null,[g("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:a=>t.$emit("update",o.value)},[g("samp",null,xe(o.display),1),o.value===this.currentSelection.value?(R(),V("i",eq)):ce("",!0)],8,Q9)]))),256)):ce("",!0)])])}const jT=je(q9,[["render",tq],["__scopeId","data-v-6a5aba2a"]]),nq={name:"schedulePeerJob",components:{LocaleText:He,VueDatePicker:Yu,ScheduleDropdown:jT},props:{dropdowns:Array[Object],pjob:Object,viewOnly:!1},setup(t){const e=we({}),n=we(!1),i=we(!1);e.value=JSON.parse(JSON.stringify(t.pjob)),e.value.CreationDate||(n.value=!0,i.value=!0);const s=tt();return{job:e,edit:n,newJob:i,store:s}},data(){return{inputType:void 0}},watch:{pjob:{deep:!0,immediate:!0,handler(t){this.edit||(this.job=JSON.parse(JSON.stringify(t)))}}},methods:{save(){this.job.Field&&this.job.Operator&&this.job.Action&&this.job.Value?xt("/api/savePeerScheduleJob/",{Job:this.job},t=>{t.status?(this.edit=!1,this.store.newMessage("Server","Peer job saved","success"),console.log(t.data),this.$emit("refresh",t.data[0]),this.newJob=!1):this.store.newMessage("Server",t.message,"danger")}):this.alert()},alert(){let t="animate__flash",e=this.$el.querySelectorAll(".scheduleDropdown"),n=this.$el.querySelectorAll("input");e.forEach(i=>i.classList.add("animate__animated",t)),n.forEach(i=>i.classList.add("animate__animated",t)),setTimeout(()=>{e.forEach(i=>i.classList.remove("animate__animated",t)),n.forEach(i=>i.classList.remove("animate__animated",t))},2e3)},reset(){this.job.CreationDate?(this.job=JSON.parse(JSON.stringify(this.pjob)),this.edit=!1):this.$emit("delete")},delete(){this.job.CreationDate&&xt("/api/deletePeerScheduleJob/",{Job:this.job},t=>{t.status?this.store.newMessage("Server","Peer job deleted","success"):(this.store.newMessage("Server",t.message,"danger"),this.$emit("delete"))}),this.$emit("delete")},parseTime(t){t&&(this.job.Value=bi(t).format("YYYY-MM-DD HH:mm:ss"))}}},iq={class:"card-header bg-transparent text-muted border-0"},sq={key:0,class:"d-flex"},rq={class:"me-auto"},oq={key:1},aq={class:"badge text-bg-warning"},lq={class:"card-body pt-1",style:{"font-family":"var(--bs-font-monospace)"}},cq={class:"d-flex gap-2 align-items-center mb-2"},uq=["disabled"],dq={class:"px-5 d-flex gap-2 align-items-center"},hq={class:"d-flex gap-3"},fq={key:0,class:"ms-auto d-flex gap-3"},gq={key:1,class:"ms-auto d-flex gap-3"};function pq(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("ScheduleDropdown"),l=Ee("VueDatePicker");return R(),V("div",{class:Pe(["card shadow-sm rounded-3 mb-2",{"border-warning-subtle":this.newJob}])},[g("div",iq,[this.newJob?(R(),V("small",oq,[g("span",aq,[N(o,{t:"Unsaved Job"})])])):(R(),V("small",sq,[g("strong",rq,[N(o,{t:"Job ID"})]),g("samp",null,xe(this.job.JobID),1)]))]),g("div",lq,[g("div",cq,[g("samp",null,[N(o,{t:"if"})]),N(a,{edit:i.edit,options:this.dropdowns.Field,data:this.job.Field,onUpdate:e[0]||(e[0]=c=>{this.job.Field=c})},null,8,["edit","options","data"]),g("samp",null,[N(o,{t:"is"})]),N(a,{edit:i.edit,options:this.dropdowns.Operator,data:this.job.Operator,onUpdate:e[1]||(e[1]=c=>this.job.Operator=c)},null,8,["edit","options","data"]),this.job.Field==="date"?(R(),Se(l,{key:0,is24:!0,"min-date":new Date,"model-value":this.job.Value,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:!i.edit,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])):$e((R(),V("input",{key:1,class:"form-control form-control-sm form-control-dark rounded-3 flex-grow-1",disabled:!i.edit,"onUpdate:modelValue":e[2]||(e[2]=c=>this.job.Value=c),style:{width:"auto"}},null,8,uq)),[[We,this.job.Value]]),g("samp",null,xe(this.dropdowns.Field.find(c=>c.value===this.job.Field)?.unit)+" { ",1)]),g("div",dq,[g("samp",null,[N(o,{t:"then"})]),N(a,{edit:i.edit,options:this.dropdowns.Action,data:this.job.Action,onUpdate:e[3]||(e[3]=c=>this.job.Action=c)},null,8,["edit","options","data"])]),g("div",hq,[e[12]||(e[12]=g("samp",null,"}",-1)),this.edit?(R(),V("div",gq,[g("a",{role:"button",class:"text-secondary text-decoration-none",onClick:e[6]||(e[6]=c=>this.reset())},[e[10]||(e[10]=Ue("[C] ")),N(o,{t:"Cancel"})]),g("a",{role:"button",class:"text-primary ms-auto text-decoration-none",onClick:e[7]||(e[7]=c=>this.save())},[e[11]||(e[11]=Ue("[S] ")),N(o,{t:"Save"})])])):(R(),V("div",fq,[g("a",{role:"button",class:"ms-auto text-decoration-none",onClick:e[4]||(e[4]=c=>this.edit=!0)},[e[8]||(e[8]=Ue("[E] ")),N(o,{t:"Edit"})]),g("a",{role:"button",onClick:e[5]||(e[5]=c=>this.delete()),class:"text-danger text-decoration-none"},[e[9]||(e[9]=Ue("[D] ")),N(o,{t:"Delete"})])]))])])],2)}const KT=je(nq,[["render",pq],["__scopeId","data-v-8f3f1b93"]]),mq={name:"peerJobs",setup(){return{store:qn()}},props:{selectedPeer:Object},components:{LocaleText:He,SchedulePeerJob:KT,ScheduleDropdown:jT},data(){return{}},methods:{deleteJob(t){this.selectedPeer.jobs=this.selectedPeer.jobs.filter(e=>e.JobID!==t.JobID)},addJob(){this.selectedPeer.jobs.unshift(JSON.parse(JSON.stringify({JobID:Bs().toString(),Configuration:this.selectedPeer.configuration.Name,Peer:this.selectedPeer.id,Field:this.store.PeerScheduleJobs.dropdowns.Field[0].value,Operator:this.store.PeerScheduleJobs.dropdowns.Operator[0].value,Value:"",CreationDate:"",ExpireDate:"",Action:this.store.PeerScheduleJobs.dropdowns.Action[0].value})))}}},_q={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},yq={class:"container d-flex h-100 w-100"},vq={class:"m-auto modal-dialog-centered dashboardModal"},bq={class:"card rounded-3 shadow",style:{width:"700px"}},wq={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},xq={class:"mb-0 fw-normal"},Eq={class:"card-body px-4 pb-4 pt-2 position-relative"},Cq={class:"d-flex align-items-center mb-3"},Sq={class:"card shadow-sm",key:"none",style:{height:"153px"}},Tq={class:"card-body text-muted text-center d-flex"},Aq={class:"m-auto"};function kq(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("SchedulePeerJob");return R(),V("div",_q,[g("div",yq,[g("div",vq,[g("div",bq,[g("div",wq,[g("h4",xq,[N(o,{t:"Schedule Jobs"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),g("div",Eq,[g("div",Cq,[g("button",{class:"btn bg-primary-subtle border-1 border-primary-subtle text-primary-emphasis rounded-3 shadow",onClick:e[1]||(e[1]=l=>this.addJob())},[e[3]||(e[3]=g("i",{class:"bi bi-plus-lg me-2"},null,-1)),N(o,{t:"Job"})])]),N(Ul,{name:"schedulePeerJobTransition",tag:"div",class:"position-relative"},{default:De(()=>[(R(!0),V(Oe,null,Ze(this.selectedPeer.jobs,(l,c)=>(R(),Se(a,{onRefresh:e[2]||(e[2]=u=>this.$emit("refresh")),onDelete:u=>this.deleteJob(l),dropdowns:this.store.PeerScheduleJobs.dropdowns,key:l.JobID,pjob:l},null,8,["onDelete","dropdowns","pjob"]))),128)),this.selectedPeer.jobs.length===0?(R(),V("div",Sq,[g("div",Tq,[g("h6",Aq,[N(o,{t:"This peer does not have any job yet."})])])])):ce("",!0)]),_:1})])])])])])}const Mq=je(mq,[["render",kq],["__scopeId","data-v-5bbdd42b"]]),Pq={name:"peerJobsAllModal",setup(){return{store:qn()}},components:{LocaleText:He,SchedulePeerJob:KT},props:{configurationPeers:Array[Object]},methods:{getuuid(){return Bs()}},computed:{getAllJobs(){return this.configurationPeers.filter(t=>t.jobs.length>0)}}},Iq={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},Dq={class:"container d-flex h-100 w-100"},Rq={class:"m-auto modal-dialog-centered dashboardModal"},Lq={class:"card rounded-3 shadow",style:{width:"700px"}},Oq={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},$q={class:"mb-0 fw-normal"},Nq={class:"card-body px-4 pb-4 pt-2"},Fq={key:0,class:"accordion",id:"peerJobsLogsModalAccordion"},Bq={class:"accordion-header"},Vq=["data-bs-target"],zq={key:0},Wq={class:"text-muted"},Yq=["id"],Hq={class:"accordion-body"},jq={key:1,class:"card shadow-sm",style:{height:"153px"}},Kq={class:"card-body text-muted text-center d-flex"},Uq={class:"m-auto"};function Gq(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("SchedulePeerJob");return R(),V("div",Iq,[g("div",Dq,[g("div",Rq,[g("div",Lq,[g("div",Oq,[g("h4",$q,[N(o,{t:"All Active Jobs"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),g("div",Nq,[this.getAllJobs.length>0?(R(),V("div",Fq,[(R(!0),V(Oe,null,Ze(this.getAllJobs,(l,c)=>(R(),V("div",{class:"accordion-item",key:l.id},[g("h2",Bq,[g("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapse_"+c},[g("small",null,[g("strong",null,[l.name?(R(),V("span",zq,xe(l.name)+" • ",1)):ce("",!0),g("samp",Wq,xe(l.id),1)])])],8,Vq)]),g("div",{id:"collapse_"+c,class:"accordion-collapse collapse","data-bs-parent":"#peerJobsLogsModalAccordion"},[g("div",Hq,[(R(!0),V(Oe,null,Ze(l.jobs,u=>(R(),Se(a,{onDelete:e[1]||(e[1]=d=>this.$emit("refresh")),onRefresh:e[2]||(e[2]=d=>this.$emit("refresh")),dropdowns:this.store.PeerScheduleJobs.dropdowns,viewOnly:!0,key:u.JobID,pjob:u},null,8,["dropdowns","pjob"]))),128))])],8,Yq)]))),128))])):(R(),V("div",jq,[g("div",Kq,[g("span",Uq,[N(o,{t:"No active job at the moment."})])])]))])])])])])}const Xq=je(Pq,[["render",Gq]]),qq={name:"peerJobsLogsModal",components:{LocaleText:He},props:{configurationInfo:Object},data(){return{dataLoading:!0,data:[],logFetchTime:void 0,showLogID:!1,showJobID:!0,showSuccessJob:!0,showFailedJob:!0,showLogAmount:10}},async mounted(){await this.fetchLog()},methods:{async fetchLog(){this.dataLoading=!0,await Yt(`/api/getPeerScheduleJobLogs/${this.configurationInfo.Name}`,{},t=>{this.data=t.data,this.logFetchTime=bi().format("YYYY-MM-DD HH:mm:ss"),this.dataLoading=!1})}},computed:{getLogs(){return this.data.filter(t=>this.showSuccessJob&&t.Status==="1"||this.showFailedJob&&t.Status==="0")},showLogs(){return this.getLogs.slice(0,this.showLogAmount)}}},Zq={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},Jq={class:"container-fluid d-flex h-100 w-100"},Qq={class:"m-auto mt-0 modal-dialog-centered dashboardModal",style:{width:"100%"}},eZ={class:"card rounded-3 shadow w-100"},tZ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},nZ={class:"mb-0"},iZ={class:"card-body px-4 pb-4 pt-2"},sZ={key:0},rZ={class:"mb-2 d-flex gap-3"},oZ={class:"d-flex gap-3 align-items-center"},aZ={class:"text-muted"},lZ={class:"form-check"},cZ={class:"form-check-label",for:"jobLogsShowSuccessCheck"},uZ={class:"badge text-success-emphasis bg-success-subtle"},dZ={class:"form-check"},hZ={class:"form-check-label",for:"jobLogsShowFailedCheck"},fZ={class:"badge text-danger-emphasis bg-danger-subtle"},gZ={class:"d-flex gap-3 align-items-center ms-auto"},pZ={class:"text-muted"},mZ={class:"form-check"},_Z={class:"form-check-label",for:"jobLogsShowJobIDCheck"},yZ={class:"form-check"},vZ={class:"form-check-label",for:"jobLogsShowLogIDCheck"},bZ={class:"table"},wZ={scope:"col"},xZ={key:0,scope:"col"},EZ={key:1,scope:"col"},CZ={scope:"col"},SZ={scope:"col"},TZ={style:{"font-size":"0.875rem"}},AZ={scope:"row"},kZ={key:0},MZ={class:"text-muted"},PZ={key:1},IZ={class:"text-muted"},DZ={class:"d-flex gap-2"},RZ={key:1,class:"d-flex align-items-center flex-column"};function LZ(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",Zq,[g("div",Jq,[g("div",Qq,[g("div",eZ,[g("div",tZ,[g("h4",nZ,[N(o,{t:"Jobs Logs"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),g("div",iZ,[this.dataLoading?(R(),V("div",RZ,e[11]||(e[11]=[g("div",{class:"spinner-border text-body",role:"status"},[g("span",{class:"visually-hidden"},"Loading...")],-1)]))):(R(),V("div",sZ,[g("p",null,[N(o,{t:"Updated at"}),Ue(" : "+xe(this.logFetchTime),1)]),g("div",rZ,[g("button",{onClick:e[1]||(e[1]=a=>this.fetchLog()),class:"btn btn-sm rounded-3 shadow-sm text-info-emphasis bg-info-subtle border-1 border-info-subtle me-1"},[e[8]||(e[8]=g("i",{class:"bi bi-arrow-clockwise me-2"},null,-1)),N(o,{t:"Refresh"})]),g("div",oZ,[g("span",aZ,[N(o,{t:"Filter"})]),g("div",lZ,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[2]||(e[2]=a=>this.showSuccessJob=a),id:"jobLogsShowSuccessCheck"},null,512),[[Kn,this.showSuccessJob]]),g("label",cZ,[g("span",uZ,[N(o,{t:"Success"})])])]),g("div",dZ,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[3]||(e[3]=a=>this.showFailedJob=a),id:"jobLogsShowFailedCheck"},null,512),[[Kn,this.showFailedJob]]),g("label",hZ,[g("span",fZ,[N(o,{t:"Failed"})])])])]),g("div",gZ,[g("span",pZ,[N(o,{t:"Display"})]),g("div",mZ,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[4]||(e[4]=a=>s.showJobID=a),id:"jobLogsShowJobIDCheck"},null,512),[[Kn,s.showJobID]]),g("label",_Z,[N(o,{t:"Job ID"})])]),g("div",yZ,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=a=>s.showLogID=a),id:"jobLogsShowLogIDCheck"},null,512),[[Kn,s.showLogID]]),g("label",vZ,[N(o,{t:"Log ID"})])])])]),g("table",bZ,[g("thead",null,[g("tr",null,[g("th",wZ,[N(o,{t:"Date"})]),s.showLogID?(R(),V("th",xZ,[N(o,{t:"Log ID"})])):ce("",!0),s.showJobID?(R(),V("th",EZ,[N(o,{t:"Job ID"})])):ce("",!0),g("th",CZ,[N(o,{t:"Status"})]),g("th",SZ,[N(o,{t:"Message"})])])]),g("tbody",null,[(R(!0),V(Oe,null,Ze(this.showLogs,a=>(R(),V("tr",TZ,[g("th",AZ,xe(a.LogDate),1),s.showLogID?(R(),V("td",kZ,[g("samp",MZ,xe(a.LogID),1)])):ce("",!0),s.showJobID?(R(),V("td",PZ,[g("samp",IZ,xe(a.JobID),1)])):ce("",!0),g("td",null,[g("span",{class:Pe(["badge",[a.Status==="1"?"text-success-emphasis bg-success-subtle":"text-danger-emphasis bg-danger-subtle"]])},xe(a.Status==="1"?"Success":"Failed"),3)]),g("td",null,xe(a.Message),1)]))),256))])]),g("div",DZ,[this.getLogs.length>this.showLogAmount?(R(),V("button",{key:0,onClick:e[6]||(e[6]=a=>this.showLogAmount+=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},e[9]||(e[9]=[g("i",{class:"bi bi-chevron-down me-2"},null,-1),Ue(" Show More ")]))):ce("",!0),this.showLogAmount>20?(R(),V("button",{key:1,onClick:e[7]||(e[7]=a=>this.showLogAmount=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},e[10]||(e[10]=[g("i",{class:"bi bi-chevron-up me-2"},null,-1),Ue(" Collapse ")]))):ce("",!0)])]))])])])])])}const OZ=je(qq,[["render",LZ]]),$Z={name:"peerShareLinkModal",props:{peer:Object},components:{LocaleText:He,VueDatePicker:Yu},data(){return{dataCopy:void 0,loading:!1}},setup(){return{store:tt()}},mounted(){this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0)},watch:{"peer.ShareLink":{deep:!0,handler(t,e){e.length!==t.length&&(this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0))}}},methods:{startSharing(){this.loading=!0,xt("/api/sharePeer/create",{Configuration:this.peer.configuration.Name,Peer:this.peer.id,ExpireDate:bi().add(7,"d").format("YYYY-MM-DD HH:mm:ss")},t=>{t.status?(this.peer.ShareLink=t.data,this.dataCopy=t.data.at(0)):this.store.newMessage("Server","Share link failed to create. Reason: "+t.message,"danger"),this.loading=!1})},updateLinkExpireDate(){xt("/api/sharePeer/update",this.dataCopy,t=>{t.status?(this.dataCopy=t.data.at(0),this.peer.ShareLink=t.data,this.store.newMessage("Server","Link expire date updated","success")):this.store.newMessage("Server","Link expire date failed to update. Reason: "+t.message,"danger"),this.loading=!1})},stopSharing(){this.loading=!0,this.dataCopy.ExpireDate=bi().format("YYYY-MM-DD HH:mm:ss"),this.updateLinkExpireDate()},parseTime(t){t?this.dataCopy.ExpireDate=bi(t).format("YYYY-MM-DD HH:mm:ss"):this.dataCopy.ExpireDate=void 0,this.updateLinkExpireDate()}},computed:{getUrl(){const t=this.store.getActiveCrossServer();return t?`${t.host}/${this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}`:window.location.origin+window.location.pathname+this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}}},NZ={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},FZ={class:"container d-flex h-100 w-100"},BZ={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"500px"}},VZ={class:"card rounded-3 shadow flex-grow-1"},zZ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},WZ={class:"mb-0"},YZ={key:0,class:"card-body px-4 pb-4"},HZ={key:0},jZ={class:"mb-3 text-muted"},KZ=["disabled"],UZ={key:1},GZ={class:"d-flex gap-2 mb-4"},XZ=["href"],qZ={class:"d-flex flex-column gap-2 mb-3"},ZZ=["disabled"];function JZ(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("VueDatePicker");return R(),V("div",NZ,[g("div",FZ,[g("div",BZ,[g("div",VZ,[g("div",zZ,[g("h4",WZ,[N(o,{t:"Share Peer"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),this.peer.ShareLink?(R(),V("div",YZ,[this.dataCopy?(R(),V("div",UZ,[g("div",GZ,[e[4]||(e[4]=g("i",{class:"bi bi-link-45deg"},null,-1)),g("a",{href:this.getUrl,class:"text-decoration-none",target:"_blank"},xe(r.getUrl),9,XZ)]),g("div",qZ,[g("small",null,[e[5]||(e[5]=g("i",{class:"bi bi-calendar me-2"},null,-1)),N(o,{t:"Expire At"})]),N(a,{is24:!0,"min-date":new Date,"model-value":this.dataCopy.ExpireDate,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","dark"])]),g("button",{onClick:e[2]||(e[2]=l=>this.stopSharing()),disabled:this.loading,class:"w-100 btn bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle rounded-3 shadow-sm"},[g("span",{class:Pe({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},e[6]||(e[6]=[g("i",{class:"bi bi-send-slash-fill me-2"},null,-1)]),2),this.loading?(R(),Se(o,{key:0,t:"Stop Sharing..."})):(R(),Se(o,{key:1,t:"Stop Sharing"}))],8,ZZ)])):(R(),V("div",HZ,[g("h6",jZ,[N(o,{t:"Currently the peer is not sharing"})]),g("button",{onClick:e[1]||(e[1]=l=>this.startSharing()),disabled:this.loading,class:"w-100 btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm"},[g("span",{class:Pe({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},e[3]||(e[3]=[g("i",{class:"bi bi-send-fill me-2"},null,-1)]),2),this.loading?(R(),Se(o,{key:0,t:"Sharing..."})):(R(),Se(o,{key:1,t:"Start Sharing"}))],8,KZ)]))])):ce("",!0)])])])])}const QZ=je($Z,[["render",JZ]]),eJ={class:"container d-flex h-100 w-100"},tJ={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"700px"}},nJ={class:"card rounded-3 shadow flex-grow-1"},iJ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},sJ={class:"mb-0"},rJ={class:"card-body px-4 pb-4"},oJ={class:"d-flex gap-2 flex-column"},aJ={class:"d-flex align-items-center"},lJ={class:"text-muted"},cJ={class:"ms-auto"},uJ={class:"d-flex align-items-center"},dJ={class:"text-muted"},hJ={class:"ms-auto"},fJ={for:"configuration_private_key",class:"form-label d-flex"},gJ={class:"text-muted d-block"},pJ={class:"form-check form-switch ms-auto"},mJ=["disabled"],_J={for:"configuration_ipaddress_cidr",class:"form-label"},yJ={class:"text-muted"},vJ=["disabled"],bJ={for:"configuration_listen_port",class:"form-label"},wJ={class:"text-muted"},xJ=["disabled"],EJ={for:"configuration_preup",class:"form-label"},CJ={class:"text-muted"},SJ=["disabled"],TJ={for:"configuration_predown",class:"form-label"},AJ={class:"text-muted"},kJ=["disabled"],MJ={for:"configuration_postup",class:"form-label"},PJ={class:"text-muted"},IJ=["disabled"],DJ={for:"configuration_postdown",class:"form-label"},RJ={class:"text-muted"},LJ=["disabled"],OJ={class:"d-flex align-items-center gap-2 mt-4"},$J=["disabled"],NJ=["disabled"],FJ={__name:"editConfiguration",props:{configurationInfo:Object},emits:["changed"],setup(t,{emit:e}){const n=t,i=qn(),s=tt(),r=we(!1),o=Ki(JSON.parse(JSON.stringify(n.configurationInfo))),a=we(!1),l=we(!1);we(!1);const c=Ki({PrivateKey:!0,IPAddress:!0,ListenPort:!0}),u=_D("editConfigurationContainer"),d=()=>{i.checkWGKeyLength(o.PrivateKey)?(c.PrivateKey=!0,o.PublicKey=window.wireguard.generatePublicKey(o.PrivateKey)):c.PrivateKey=!1},h=()=>{l.value=!1,Object.assign(o,JSON.parse(JSON.stringify(n.configurationInfo)))},f=e,p=()=>{r.value=!0,xt("/api/updateWireguardConfiguration",o,m=>{r.value=!1,m.status?(s.newMessage("Server","Configuration saved","success"),l.value=!1,f("dataChanged",m.data)):s.newMessage("Server",m.message,"danger")})};return un(o,()=>{l.value=JSON.stringify(o)!==JSON.stringify(n.configurationInfo)},{deep:!0}),(m,y)=>(R(),V("div",{class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll",ref_key:"editConfigurationContainer",ref:u},[g("div",eJ,[g("div",tJ,[g("div",nJ,[g("div",iJ,[g("h4",sJ,[N(He,{t:"Configuration Settings"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:y[0]||(y[0]=v=>m.$emit("close"))})]),g("div",rJ,[g("div",oJ,[g("div",aJ,[g("small",lJ,[N(He,{t:"Name"})]),g("small",cJ,[g("samp",null,xe(o.Name),1)])]),g("div",uJ,[g("small",dJ,[N(He,{t:"Public Key"})]),g("small",hJ,[g("samp",null,xe(o.PublicKey),1)])]),y[15]||(y[15]=g("hr",null,null,-1)),g("div",null,[g("label",fJ,[g("small",gJ,[N(He,{t:"Private Key"})]),g("div",pJ,[$e(g("input",{class:"form-check-input",type:"checkbox",role:"switch",id:"editPrivateKeySwitch","onUpdate:modelValue":y[1]||(y[1]=v=>a.value=v)},null,512),[[Kn,a.value]]),y[12]||(y[12]=g("label",{class:"form-check-label",for:"editPrivateKeySwitch"},[g("small",null,"Edit")],-1))])]),$e(g("input",{type:"text",class:Pe(["form-control form-control-sm rounded-3",{"is-invalid":!c.PrivateKey}]),disabled:r.value||!a.value,onKeyup:y[2]||(y[2]=v=>d()),"onUpdate:modelValue":y[3]||(y[3]=v=>o.PrivateKey=v),id:"configuration_private_key"},null,42,mJ),[[We,o.PrivateKey]])]),g("div",null,[g("label",_J,[g("small",yJ,[N(He,{t:"IP Address/CIDR"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[4]||(y[4]=v=>o.Address=v),id:"configuration_ipaddress_cidr"},null,8,vJ),[[We,o.Address]])]),g("div",null,[g("label",bJ,[g("small",wJ,[N(He,{t:"Listen Port"})])]),$e(g("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[5]||(y[5]=v=>o.ListenPort=v),id:"configuration_listen_port"},null,8,xJ),[[We,o.ListenPort]])]),g("div",null,[g("label",EJ,[g("small",CJ,[N(He,{t:"PreUp"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[6]||(y[6]=v=>o.PreUp=v),id:"configuration_preup"},null,8,SJ),[[We,o.PreUp]])]),g("div",null,[g("label",TJ,[g("small",AJ,[N(He,{t:"PreDown"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[7]||(y[7]=v=>o.PreDown=v),id:"configuration_predown"},null,8,kJ),[[We,o.PreDown]])]),g("div",null,[g("label",MJ,[g("small",PJ,[N(He,{t:"PostUp"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[8]||(y[8]=v=>o.PostUp=v),id:"configuration_postup"},null,8,IJ),[[We,o.PostUp]])]),g("div",null,[g("label",DJ,[g("small",RJ,[N(He,{t:"PostDown"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[9]||(y[9]=v=>o.PostDown=v),id:"configuration_postdown"},null,8,LJ),[[We,o.PostDown]])]),g("div",OJ,[g("button",{class:"btn bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3 shadow ms-auto px-3 py-2",onClick:y[10]||(y[10]=v=>h()),disabled:!l.value||r.value},y[13]||(y[13]=[g("i",{class:"bi bi-arrow-clockwise"},null,-1)]),8,$J),g("button",{class:"btn bg-primary-subtle border-primary-subtle text-primary-emphasis rounded-3 px-3 py-2 shadow",disabled:!l.value||r.value,onClick:y[11]||(y[11]=v=>p())},y[14]||(y[14]=[g("i",{class:"bi bi-save-fill"},null,-1)]),8,NJ)])])])])])])],512))}};kf.register(Vj,Mf,nK,qj,US,vH,GS,XS,xH,wH,EH,CH,KK,GK,ZK,dU,dm,pU,oK,TK,DK,LK,WK);const BJ={name:"peerList",components:{EditConfiguration:FJ,LocaleText:He,PeerShareLinkModal:QZ,PeerJobsLogsModal:OZ,PeerJobsAllModal:Xq,PeerJobs:Mq,PeerCreate:HT,PeerQRCode:sX,PeerSettings:o7,PeerSearch:IW,Peer:cY,Line:CU,Bar:EU},setup(){const t=tt(),e=qn(),n=we(void 0);return{dashboardConfigurationStore:t,wireguardConfigurationStore:e,interval:n}},data(){return{configurationToggling:!1,loading:!1,error:null,configurationInfo:[],configurationPeers:[],historyDataSentDifference:[],historyDataReceivedDifference:[],historySentData:{labels:[],datasets:[{label:"Data Sent",data:[],fill:!1,borderColor:"#198754",tension:0}]},historyReceiveData:{labels:[],datasets:[{label:"Data Received",data:[],fill:!1,borderColor:"#0d6efd",tension:0}]},peerSetting:{modalOpen:!1,selectedPeer:void 0},peerScheduleJobs:{modalOpen:!1,selectedPeer:void 0},peerQRCode:{modalOpen:!1,peerConfigData:void 0},peerCreate:{modalOpen:!1},peerScheduleJobsAll:{modalOpen:!1},peerScheduleJobsLogs:{modalOpen:!1},peerShare:{modalOpen:!1,selectedPeer:void 0},editConfiguration:{modalOpen:!1}}},mounted(){},watch:{$route:{immediate:!0,handler(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.loading=!0;let t=this.$route.params.id;this.configurationInfo=[],this.configurationPeers=[],t&&(this.getPeers(t),this.setPeerInterval())}},"dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval"(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.setPeerInterval()}},beforeRouteLeave(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval)},methods:{toggle(){this.configurationToggling=!0,Yt("/api/toggleWireguardConfiguration/",{configurationName:this.configurationInfo.Name},t=>{t.status?this.dashboardConfigurationStore.newMessage("Server",`${this.configurationInfo.Name} ${t.data?"is on":"is off"}`,"success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.configurationInfo.Status=t.data,this.configurationToggling=!1})},getPeers(t=this.$route.params.id){Yt("/api/getWireguardConfigurationInfo",{configurationName:t},e=>{if(this.configurationInfo=e.data.configurationInfo,this.configurationPeers=e.data.configurationPeers,this.configurationPeers.forEach(n=>{n.restricted=!1}),e.data.configurationRestrictedPeers.forEach(n=>{n.restricted=!0,this.configurationPeers.push(n)}),this.loading=!1,this.configurationPeers.length>0){const n=this.configurationPeers.map(s=>s.total_sent+s.cumu_sent).reduce((s,r)=>s+r).toFixed(4),i=this.configurationPeers.map(s=>s.total_receive+s.cumu_receive).reduce((s,r)=>s+r).toFixed(4);this.historyDataSentDifference[this.historyDataSentDifference.length-1]!==n&&(this.historyDataSentDifference.length>0&&(this.historySentData={labels:[...this.historySentData.labels,bi().format("HH:mm:ss A")],datasets:[{label:"Data Sent",data:[...this.historySentData.datasets[0].data,((n-this.historyDataSentDifference[this.historyDataSentDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#198754",tension:0}]}),this.historyDataSentDifference.push(n)),this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1]!==i&&(this.historyDataReceivedDifference.length>0&&(this.historyReceiveData={labels:[...this.historyReceiveData.labels,bi().format("HH:mm:ss A")],datasets:[{label:"Data Received",data:[...this.historyReceiveData.datasets[0].data,((i-this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#0d6efd",tension:0}]}),this.historyDataReceivedDifference.push(i))}})},setPeerInterval(){this.dashboardConfigurationStore.Peers.RefreshInterval=setInterval(()=>{this.getPeers()},parseInt(this.dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval))}},computed:{configurationSummary(){return{connectedPeers:this.configurationPeers.filter(e=>e.status==="running").length,totalUsage:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_data+e.cumu_data).reduce((e,n)=>e+n,0).toFixed(4):0,totalReceive:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_receive+e.cumu_receive).reduce((e,n)=>e+n,0).toFixed(4):0,totalSent:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_sent+e.cumu_sent).reduce((e,n)=>e+n,0).toFixed(4):0}},receiveData(){return this.historyReceiveData},sentData(){return this.historySentData},individualDataUsage(){return{labels:this.configurationPeers.map(t=>t.name?t.name:`Untitled Peer - ${t.id}`),datasets:[{label:"Total Data Usage",data:this.configurationPeers.map(t=>t.cumu_data+t.total_data),backgroundColor:this.configurationPeers.map(t=>"#0dcaf0"),tooltip:{callbacks:{label:t=>`${t.formattedValue} GB`}}}]}},individualDataUsageChartOption(){return{responsive:!0,plugins:{legend:{display:!1}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(t,e)=>`${t} GB`},grid:{display:!1}}}}},chartOptions(){return{responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:t=>`${t.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(t,e)=>`${t} MB/s`},grid:{display:!1}}}}},searchPeers(){new Xl(this.configurationPeers,{keys:["name","id","allowed_ip"]});const t=this.wireguardConfigurationStore.searchString?this.configurationPeers.filter(e=>e.name.includes(this.wireguardConfigurationStore.searchString)||e.id.includes(this.wireguardConfigurationStore.searchString)||e.allowed_ip.includes(this.wireguardConfigurationStore.searchString)):this.configurationPeers;return this.dashboardConfigurationStore.Configuration.Server.dashboard_sort==="restricted"?t.slice().sort((e,n)=>e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:0):t.slice().sort((e,n)=>e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:0)}}},VJ={key:0,class:"container-md"},zJ={class:"d-flex align-items-center"},WJ={CLASS:"text-muted"},YJ={class:"d-flex align-items-center gap-3"},HJ={class:"mb-0"},jJ={class:"card rounded-3 bg-transparent shadow-sm ms-auto"},KJ={class:"card-body py-2 d-flex align-items-center"},UJ={class:"mb-0 text-muted"},GJ={class:"form-check form-switch ms-auto"},XJ=["for"],qJ={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},ZJ=["disabled","id"],JJ={class:"row mt-3 gy-2 gx-2 mb-2"},QJ={class:"col-6 col-lg-3"},eQ={class:"card rounded-3 bg-transparent shadow-sm"},tQ={class:"card-body py-2"},nQ={class:"mb-0 text-muted"},iQ={class:"col-6 col-lg-3"},sQ={class:"card rounded-3 bg-transparent shadow-sm"},rQ={class:"card-body py-2"},oQ={class:"mb-0 text-muted"},aQ={style:{"word-break":"break-all"},class:"col-12 col-lg-6"},lQ={class:"card rounded-3 bg-transparent shadow-sm"},cQ={class:"card-body py-2"},uQ={class:"mb-0 text-muted"},dQ={class:"row gx-2 gy-2 mb-2"},hQ={class:"col-6 col-lg-3"},fQ={class:"card rounded-3 bg-transparent shadow-sm"},gQ={class:"card-body d-flex"},pQ={class:"mb-0 text-muted"},mQ={class:"h4"},_Q={class:"col-6 col-lg-3"},yQ={class:"card rounded-3 bg-transparent shadow-sm"},vQ={class:"card-body d-flex"},bQ={class:"mb-0 text-muted"},wQ={class:"h4"},xQ={class:"col-6 col-lg-3"},EQ={class:"card rounded-3 bg-transparent shadow-sm"},CQ={class:"card-body d-flex"},SQ={class:"mb-0 text-muted"},TQ={class:"h4 text-primary"},AQ={class:"col-6 col-lg-3"},kQ={class:"card rounded-3 bg-transparent shadow-sm"},MQ={class:"card-body d-flex"},PQ={class:"mb-0 text-muted"},IQ={class:"h4 text-success"},DQ={class:"row gx-2 gy-2 mb-3"},RQ={class:"col-12 col-lg-6"},LQ={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},OQ={class:"card-header bg-transparent border-0"},$Q={class:"text-muted"},NQ={class:"card-body pt-1"},FQ={class:"col-sm col-lg-3"},BQ={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},VQ={class:"card-header bg-transparent border-0"},zQ={class:"text-muted"},WQ={class:"card-body pt-1"},YQ={class:"col-sm col-lg-3"},HQ={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},jQ={class:"card-header bg-transparent border-0"},KQ={class:"text-muted"},UQ={class:"card-body pt-1"},GQ={class:"mb-3"};function XQ(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("Bar"),l=Ee("Line"),c=Ee("PeerSearch"),u=Ee("Peer"),d=Ee("PeerSettings"),h=Ee("PeerQRCode"),f=Ee("PeerJobs"),p=Ee("PeerJobsAllModal"),m=Ee("PeerJobsLogsModal"),y=Ee("PeerShareLinkModal"),v=Ee("EditConfiguration");return this.loading?ce("",!0):(R(),V("div",VJ,[g("div",zJ,[g("div",null,[g("small",WJ,[N(o,{t:"CONFIGURATION"})]),g("div",YJ,[g("h1",HJ,[g("samp",null,xe(this.configurationInfo.Name),1)])])]),g("div",jJ,[g("div",KJ,[g("div",null,[g("p",UJ,[g("small",null,[N(o,{t:"Status"})])]),g("div",GJ,[g("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+this.configurationInfo.id},[!this.configurationInfo.Status&&this.configurationToggling?(R(),Se(o,{key:0,t:"Turning Off..."})):this.configurationInfo.Status&&this.configurationToggling?(R(),Se(o,{key:1,t:"Turning On..."})):this.configurationInfo.Status&&!this.configurationToggling?(R(),Se(o,{key:2,t:"On"})):!this.configurationInfo.Status&&!this.configurationToggling?(R(),Se(o,{key:3,t:"Off"})):ce("",!0),this.configurationToggling?(R(),V("span",qJ)):ce("",!0)],8,XJ),$e(g("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+this.configurationInfo.id,onChange:e[0]||(e[0]=b=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=b=>this.configurationInfo.Status=b)},null,40,ZJ),[[Kn,this.configurationInfo.Status]])])]),g("div",{class:Pe(["dot ms-5",{active:this.configurationInfo.Status}])},null,2)])])]),g("div",JJ,[g("div",QJ,[g("div",eQ,[g("div",tQ,[g("p",nQ,[g("small",null,[N(o,{t:"Address"})])]),Ue(" "+xe(this.configurationInfo.Address),1)])])]),g("div",iQ,[g("div",sQ,[g("div",rQ,[g("p",oQ,[g("small",null,[N(o,{t:"Listen Port"})])]),Ue(" "+xe(this.configurationInfo.ListenPort),1)])])]),g("div",aQ,[g("div",lQ,[g("div",cQ,[g("p",uQ,[g("small",null,[N(o,{t:"Public Key"})])]),g("samp",null,xe(this.configurationInfo.PublicKey),1)])])])]),g("div",dQ,[g("div",hQ,[g("div",fQ,[g("div",gQ,[g("div",null,[g("p",pQ,[g("small",null,[N(o,{t:"Connected Peers"})])]),g("strong",mQ,xe(r.configurationSummary.connectedPeers),1)]),e[18]||(e[18]=g("i",{class:"bi bi-ethernet ms-auto h2 text-muted"},null,-1))])])]),g("div",_Q,[g("div",yQ,[g("div",vQ,[g("div",null,[g("p",bQ,[g("small",null,[N(o,{t:"Total Usage"})])]),g("strong",wQ,xe(r.configurationSummary.totalUsage)+" GB",1)]),e[19]||(e[19]=g("i",{class:"bi bi-arrow-down-up ms-auto h2 text-muted"},null,-1))])])]),g("div",xQ,[g("div",EQ,[g("div",CQ,[g("div",null,[g("p",SQ,[g("small",null,[N(o,{t:"Total Received"})])]),g("strong",TQ,xe(r.configurationSummary.totalReceive)+" GB",1)]),e[20]||(e[20]=g("i",{class:"bi bi-arrow-down ms-auto h2 text-muted"},null,-1))])])]),g("div",AQ,[g("div",kQ,[g("div",MQ,[g("div",null,[g("p",PQ,[g("small",null,[N(o,{t:"Total Sent"})])]),g("strong",IQ,xe(r.configurationSummary.totalSent)+" GB",1)]),e[21]||(e[21]=g("i",{class:"bi bi-arrow-up ms-auto h2 text-muted"},null,-1))])])])]),g("div",DQ,[g("div",RQ,[g("div",LQ,[g("div",OQ,[g("small",$Q,[N(o,{t:"Peers Data Usage"})])]),g("div",NQ,[N(a,{data:r.individualDataUsage,options:r.individualDataUsageChartOption,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["data","options"])])])]),g("div",FQ,[g("div",BQ,[g("div",VQ,[g("small",zQ,[N(o,{t:"Real Time Received Data Usage"})])]),g("div",WQ,[N(l,{options:r.chartOptions,data:r.receiveData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])]),g("div",YQ,[g("div",HQ,[g("div",jQ,[g("small",KQ,[N(o,{t:"Real Time Sent Data Usage"})])]),g("div",UQ,[N(l,{options:r.chartOptions,data:r.sentData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])])]),g("div",GQ,[N(c,{onJobsAll:e[2]||(e[2]=b=>this.peerScheduleJobsAll.modalOpen=!0),onJobLogs:e[3]||(e[3]=b=>this.peerScheduleJobsLogs.modalOpen=!0),onEditConfiguration:e[4]||(e[4]=b=>this.editConfiguration.modalOpen=!0),configuration:this.configurationInfo},null,8,["configuration"]),N(Ul,{name:"list",tag:"div",class:"row gx-2 gy-2 z-0"},{default:De(()=>[(R(!0),V(Oe,null,Ze(this.searchPeers,b=>(R(),V("div",{class:"col-12 col-lg-6 col-xl-4",key:b.id},[N(u,{Peer:b,onShare:x=>{this.peerShare.selectedPeer=b.id,this.peerShare.modalOpen=!0},onRefresh:e[5]||(e[5]=x=>this.getPeers()),onJobs:x=>{s.peerScheduleJobs.modalOpen=!0,s.peerScheduleJobs.selectedPeer=this.configurationPeers.find(E=>E.id===b.id)},onSetting:x=>{s.peerSetting.modalOpen=!0,s.peerSetting.selectedPeer=this.configurationPeers.find(E=>E.id===b.id)},onQrcode:e[6]||(e[6]=x=>{this.peerQRCode.peerConfigData=x,this.peerQRCode.modalOpen=!0})},null,8,["Peer","onShare","onJobs","onSetting"])]))),128))]),_:1})]),N($t,{name:"zoom"},{default:De(()=>[this.peerSetting.modalOpen?(R(),Se(d,{key:"settings",selectedPeer:this.peerSetting.selectedPeer,onRefresh:e[7]||(e[7]=b=>this.getPeers()),onClose:e[8]||(e[8]=b=>this.peerSetting.modalOpen=!1)},null,8,["selectedPeer"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[s.peerQRCode.modalOpen?(R(),Se(h,{peerConfigData:this.peerQRCode.peerConfigData,key:"qrcode",onClose:e[9]||(e[9]=b=>this.peerQRCode.modalOpen=!1)},null,8,["peerConfigData"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerScheduleJobs.modalOpen?(R(),Se(f,{key:0,onRefresh:e[10]||(e[10]=b=>this.getPeers()),selectedPeer:this.peerScheduleJobs.selectedPeer,onClose:e[11]||(e[11]=b=>this.peerScheduleJobs.modalOpen=!1)},null,8,["selectedPeer"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerScheduleJobsAll.modalOpen?(R(),Se(p,{key:0,onRefresh:e[12]||(e[12]=b=>this.getPeers()),onClose:e[13]||(e[13]=b=>this.peerScheduleJobsAll.modalOpen=!1),configurationPeers:this.configurationPeers},null,8,["configurationPeers"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerScheduleJobsLogs.modalOpen?(R(),Se(m,{key:0,onClose:e[14]||(e[14]=b=>this.peerScheduleJobsLogs.modalOpen=!1),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerShare.modalOpen?(R(),Se(y,{key:0,onClose:e[15]||(e[15]=b=>{this.peerShare.modalOpen=!1,this.peerShare.selectedPeer=void 0}),peer:this.configurationPeers.find(b=>b.id===this.peerShare.selectedPeer)},null,8,["peer"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.editConfiguration.modalOpen?(R(),Se(v,{key:0,onClose:e[16]||(e[16]=b=>this.editConfiguration.modalOpen=!1),onDataChanged:e[17]||(e[17]=b=>this.configurationInfo=b),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):ce("",!0)]),_:1})]))}const qQ=je(BJ,[["render",XQ],["__scopeId","data-v-17fe4658"]]);class Er{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Nl={PROPERTYCHANGE:"propertychange"};class Of{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function ZQ(t,e,n){let i,s;n=n||hr;let r=0,o=t.length,a=!1;for(;r>1),s=+n(t[i],e),s<0?r=i+1:(o=i,a=!s);return a?r:~r}function hr(t,e){return t>e?1:t0?s-1:s}return i-1}if(n>0){for(let s=1;s0||o===0)})}function vu(){return!0}function Nf(){return!1}function Fl(){}function UT(t){let e,n,i;return function(){const s=Array.prototype.slice.call(arguments);return(!n||this!==i||!Eo(s,n))&&(i=this,n=s,e=t.apply(this,arguments)),e}}function eee(t){function e(){let n;try{n=t()}catch(i){return Promise.reject(i)}return n instanceof Promise?n:Promise.resolve(n)}return e()}function Gu(t){for(const e in t)delete t[e]}function Bl(t){let e;for(e in t)return!1;return!e}class Ff extends Of{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,n){if(!e||!n)return;const i=this.listeners_||(this.listeners_={}),s=i[e]||(i[e]=[]);s.includes(n)||s.push(n)}dispatchEvent(e){const n=typeof e=="string",i=n?e:e.type,s=this.listeners_&&this.listeners_[i];if(!s)return;const r=n?new Er(e):e;r.target||(r.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});i in o||(o[i]=0,a[i]=0),++o[i];let l;for(let c=0,u=s.length;c0:!1}removeEventListener(e,n){if(!this.listeners_)return;const i=this.listeners_[e];if(!i)return;const s=i.indexOf(n);s!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(i[s]=Fl,++this.pendingRemovals_[e]):(i.splice(s,1),i.length===0&&delete this.listeners_[e]))}}const et={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function ht(t,e,n,i,s){if(s){const o=n;n=function(){t.removeEventListener(e,n),o.apply(i??this,arguments)}}else i&&i!==t&&(n=n.bind(i));const r={target:t,type:e,listener:n};return t.addEventListener(e,n),r}function Oh(t,e,n,i){return ht(t,e,n,i,!0)}function Rt(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),Gu(t))}class Xu extends Ff{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(et.CHANGE)}getRevision(){return this.revision_}onInternal(e,n){if(Array.isArray(e)){const i=e.length,s=new Array(i);for(let r=0;r0;)this.pop()}extend(e){for(let n=0,i=e.length;nthis.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(n),this.array_.splice(e,0,n),this.updateLength_(),this.dispatchEvent(new Wd(fi.ADD,n,e))}pop(){return this.removeAt(this.getLength()-1)}push(e){this.unique_&&this.assertUnique_(e);const n=this.getLength();return this.insertAt(n,e),this.getLength()}remove(e){const n=this.array_;for(let i=0,s=n.length;i=this.getLength())return;const n=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new Wd(fi.REMOVE,n,e)),n}setAt(e,n){const i=this.getLength();if(e>=i){this.insertAt(e,n);return}if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(n,e);const s=this.array_[e];this.array_[e]=n,this.dispatchEvent(new Wd(fi.REMOVE,s,e)),this.dispatchEvent(new Wd(fi.ADD,n,e))}updateLength_(){this.set(q1.LENGTH,this.array_.length)}assertUnique_(e,n){for(let i=0,s=this.array_.length;i1?(n=s,i=r):l>0&&(n+=o*l,i+=a*l)}return ul(t,e,n,i)}function ul(t,e,n,i){const s=n-t,r=i-e;return s*s+r*r}function see(t){const e=t.length;for(let i=0;ir&&(r=l,s=a)}if(r===0)return null;const o=t[s];t[s]=t[i],t[i]=o;for(let a=i+1;a=0;i--){n[i]=t[i][e]/t[i][i];for(let s=i-1;s>=0;s--)t[s][e]-=t[s][i]*n[i]}return n}function uh(t){return t*Math.PI/180}function dl(t,e){const n=t%e;return n*e<0?n+e:n}function Ai(t,e,n){return t+n*(e-t)}function cy(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}function Yd(t,e){return Math.floor(cy(t,e))}function Hd(t,e){return Math.ceil(cy(t,e))}class GT extends zs{constructor(e){super(),this.on,this.once,this.un,this.background_=e.background;const n=Object.assign({},e);typeof e.properties=="object"&&(delete n.properties,Object.assign(n,e.properties)),n[Et.OPACITY]=e.opacity!==void 0?e.opacity:1,pt(typeof n[Et.OPACITY]=="number","Layer opacity must be a number"),n[Et.VISIBLE]=e.visible!==void 0?e.visible:!0,n[Et.Z_INDEX]=e.zIndex,n[Et.MAX_RESOLUTION]=e.maxResolution!==void 0?e.maxResolution:1/0,n[Et.MIN_RESOLUTION]=e.minResolution!==void 0?e.minResolution:0,n[Et.MIN_ZOOM]=e.minZoom!==void 0?e.minZoom:-1/0,n[Et.MAX_ZOOM]=e.maxZoom!==void 0?e.maxZoom:1/0,this.className_=n.className!==void 0?n.className:"ol-layer",delete n.className,this.setProperties(n),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(e){const n=this.state_||{layer:this,managed:e===void 0?!0:e},i=this.getZIndex();return n.opacity=nn(Math.round(this.getOpacity()*100)/100,0,1),n.visible=this.getVisible(),n.extent=this.getExtent(),n.zIndex=i===void 0&&!n.managed?1/0:i,n.maxResolution=this.getMaxResolution(),n.minResolution=Math.max(this.getMinResolution(),0),n.minZoom=this.getMinZoom(),n.maxZoom=this.getMaxZoom(),this.state_=n,n}getLayersArray(e){return gt()}getLayerStatesArray(e){return gt()}getExtent(){return this.get(Et.EXTENT)}getMaxResolution(){return this.get(Et.MAX_RESOLUTION)}getMinResolution(){return this.get(Et.MIN_RESOLUTION)}getMinZoom(){return this.get(Et.MIN_ZOOM)}getMaxZoom(){return this.get(Et.MAX_ZOOM)}getOpacity(){return this.get(Et.OPACITY)}getSourceState(){return gt()}getVisible(){return this.get(Et.VISIBLE)}getZIndex(){return this.get(Et.Z_INDEX)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(Et.EXTENT,e)}setMaxResolution(e){this.set(Et.MAX_RESOLUTION,e)}setMinResolution(e){this.set(Et.MIN_RESOLUTION,e)}setMaxZoom(e){this.set(Et.MAX_ZOOM,e)}setMinZoom(e){this.set(Et.MIN_ZOOM,e)}setOpacity(e){pt(typeof e=="number","Layer opacity must be a number"),this.set(Et.OPACITY,e)}setVisible(e){this.set(Et.VISIBLE,e)}setZIndex(e){this.set(Et.Z_INDEX,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const zi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},Wn={ANIMATING:0,INTERACTING:1},Qi={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},ree=42,uy=256,dy={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class XT{constructor(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||dy[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(e){this.defaultTileGrid_=e}setExtent(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)}setWorldExtent(e){this.worldExtent_=e}setGetPointResolution(e){this.getPointResolutionFunc_=e}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const qu=6378137,tl=Math.PI*qu,oee=[-tl,-tl,tl,tl],aee=[-180,-85,180,85],jd=qu*Math.log(Math.tan(Math.PI/2));class Fa extends XT{constructor(e){super({code:e,units:"m",extent:oee,global:!0,worldExtent:aee,getPointResolution:function(n,i){return n/Math.cosh(i[1]/qu)}})}}const Z1=[new Fa("EPSG:3857"),new Fa("EPSG:102100"),new Fa("EPSG:102113"),new Fa("EPSG:900913"),new Fa("http://www.opengis.net/def/crs/EPSG/0/3857"),new Fa("http://www.opengis.net/gml/srs/epsg.xml#3857")];function lee(t,e,n,i){const s=t.length;n=n>1?n:2,i=i??n,e===void 0&&(n>2?e=t.slice():e=new Array(s));for(let r=0;rjd?o=jd:o<-jd&&(o=-jd),e[r+1]=o}return e}function cee(t,e,n,i){const s=t.length;n=n>1?n:2,i=i??n,e===void 0&&(n>2?e=t.slice():e=new Array(s));for(let r=0;rs&&(l=l|kn.RIGHT),ar&&(l=l|kn.ABOVE),l===kn.UNKNOWN&&(l=kn.INTERSECTING),l}function Ui(){return[1/0,1/0,-1/0,-1/0]}function uo(t,e,n,i,s){return s?(s[0]=t,s[1]=e,s[2]=n,s[3]=i,s):[t,e,n,i]}function Bf(t){return uo(1/0,1/0,-1/0,-1/0,t)}function JT(t,e){const n=t[0],i=t[1];return uo(n,i,n,i,e)}function gy(t,e,n,i,s){const r=Bf(s);return QT(r,t,e,n,i)}function bu(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function pee(t,e){return e[0]t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function Zc(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function QT(t,e,n,i,s){for(;ne[0]?i[0]=t[0]:i[0]=e[0],t[1]>e[1]?i[1]=t[1]:i[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Yf(t){return t[2]=o&&m<=l),!i&&r&kn.RIGHT&&!(s&kn.RIGHT)&&(y=f-(h-l)*p,i=y>=a&&y<=c),!i&&r&kn.BELOW&&!(s&kn.BELOW)&&(m=h-(f-a)/p,i=m>=o&&m<=l),!i&&r&kn.LEFT&&!(s&kn.LEFT)&&(y=f-(h-o)*p,i=y>=a&&y<=c)}return i}function tA(t,e){const n=e.getExtent(),i=fa(t);if(e.canWrapX()&&(i[0]=n[2])){const s=yt(n),o=Math.floor((i[0]-n[0])/s)*s;t[0]-=o,t[2]-=o}return t}function py(t,e,n){if(e.canWrapX()){const i=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[i[0],t[1],i[2],t[3]]];tA(t,e);const s=yt(i);if(yt(t)>s&&!n)return[[i[0],t[1],i[2],t[3]]];if(t[0]i[2])return[[t[0],t[1],i[2],t[3]],[i[0],t[1],t[2]-s,t[3]]]}return[t]}function wee(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function Nh(t,e){let n=!0;for(let i=t.length-1;i>=0;--i)if(t[i]!=e[i]){n=!1;break}return n}function my(t,e){const n=Math.cos(e),i=Math.sin(e),s=t[0]*n-t[1]*i,r=t[1]*n+t[0]*i;return t[0]=s,t[1]=r,t}function xee(t,e){return t[0]*=e,t[1]*=e,t}function nA(t,e){if(e.canWrapX()){const n=yt(e.getExtent()),i=Eee(t,e,n);i&&(t[0]-=i*n)}return t}function Eee(t,e,n){const i=e.getExtent();let s=0;return e.canWrapX()&&(t[0]i[2])&&(n=n||yt(i),s=Math.floor((t[0]-i[0])/n)),s}const Cee=63710088e-1;function tw(t,e,n){n=n||Cee;const i=uh(t[1]),s=uh(e[1]),r=(s-i)/2,o=uh(e[0]-t[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(o)*Math.sin(o)*Math.cos(i)*Math.cos(s);return 2*n*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function iA(...t){console.warn(...t)}let Sm=!0;function sA(t){Sm=!1}function _y(t,e){if(e!==void 0){for(let n=0,i=t.length;n=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(Sm=!1,iA("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function aA(t,e){return t}function Zr(t,e){return t}function kee(){iw(Z1),iw(Q1),Aee(Q1,Z1,lee,cee)}kee();function sw(t,e,n){return function(i,s,r,o,a){if(!i)return;if(!s&&!e)return i;const l=e?0:r[0]*s,c=e?0:r[1]*s,u=a?a[0]:0,d=a?a[1]:0;let h=t[0]+l/2+u,f=t[2]-l/2+u,p=t[1]+c/2+d,m=t[3]-c/2+d;h>f&&(h=(f+h)/2,f=h),p>m&&(p=(m+p)/2,m=p);let y=nn(i[0],h,f),v=nn(i[1],p,m);if(o&&n&&s){const b=30*s;y+=-b*Math.log(1+Math.max(0,h-i[0])/b)+b*Math.log(1+Math.max(0,i[0]-f)/b),v+=-b*Math.log(1+Math.max(0,p-i[1])/b)+b*Math.log(1+Math.max(0,i[1]-m)/b)}return[y,v]}}function Mee(t){return t}function by(t,e,n,i){const s=yt(e)/n[0],r=jn(e)/n[1];return i?Math.min(t,Math.max(s,r)):Math.min(t,Math.min(s,r))}function wy(t,e,n){let i=Math.min(t,e);const s=50;return i*=Math.log(1+s*Math.max(0,t/e-1))/s+1,n&&(i=Math.max(i,n),i/=Math.log(1+s*Math.max(0,n/t-1))/s+1),nn(i,n/2,e*2)}function Pee(t,e,n,i){return e=e!==void 0?e:!0,function(s,r,o,a){if(s!==void 0){const l=t[0],c=t[t.length-1],u=n?by(l,n,o,i):l;if(a)return e?wy(s,u,c):nn(s,c,u);const d=Math.min(u,s),h=Math.floor(ly(t,d,r));return t[h]>u&&hMath.round(n*aw[i])/aw[i]).join(", ")+")"}function io(t,e,n,i,s,r,o){r=r||[],o=o||2;let a=0;for(let l=e;l{if(!i)return this.getSimplifiedGeometry(n);const s=this.clone();return s.applyTransform(i),s.getSimplifiedGeometry(n)})}simplifyTransformed(e,n){return this.simplifyTransformedInternal(this.getRevision(),e,n)}clone(){return gt()}closestPointXY(e,n,i,s){return gt()}containsXY(e,n){const i=this.getClosestPoint([e,n]);return i[0]===e&&i[1]===n}getClosestPoint(e,n){return n=n||[NaN,NaN],this.closestPointXY(e[0],e[1],n,1/0),n}intersectsCoordinate(e){return this.containsXY(e[0],e[1])}computeExtent(e){return gt()}getExtent(e){if(this.extentRevision_!=this.getRevision()){const n=this.computeExtent(this.extent_);(isNaN(n[0])||isNaN(n[1]))&&Bf(n),this.extentRevision_=this.getRevision()}return vee(this.extent_,e)}rotate(e,n){gt()}scale(e,n,i){gt()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return gt()}getType(){return gt()}applyTransform(e){gt()}intersectsExtent(e){return gt()}translate(e,n){gt()}transform(e,n){const i=Gi(e),s=i.getUnits()=="tile-pixels"?function(r,o,a){const l=i.getExtent(),c=i.getWorldExtent(),u=jn(c)/jn(l);return br(lw,c[0],c[3],u,-u,0,0,0),io(r,0,r.length,a,lw,o),Fh(i,n)(r,o,a)}:Fh(i,n);return this.applyTransform(s),this}}class Hf extends zee{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(e){return gy(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return gt()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const n=this.getSimplifiedGeometryInternal(e);return n.getFlatCoordinates().length1)d=n;else if(h>0){for(let f=0;fs&&(s=c),r=a,o=l}return s}function Hee(t,e,n,i,s){for(let r=0,o=n.length;r0;){const d=c.pop(),h=c.pop();let f=0;const p=t[h],m=t[h+1],y=t[d],v=t[d+1];for(let b=h+i;bf&&(u=b,f=w)}f>s&&(l[(u-e)/i]=1,h+i0&&m>f)&&(p<0&&y0&&y>p)){c=d,u=h;continue}r[o++]=c,r[o++]=u,a=c,l=u,c=d,u=h}return r[o++]=c,r[o++]=u,o}function dA(t,e,n,i,s,r,o,a){for(let l=0,c=n.length;lr&&(c-a)*(r-l)-(s-a)*(u-l)>0&&o++:u<=r&&(c-a)*(r-l)-(s-a)*(u-l)<0&&o--,a=c,l=u}return o!==0}function fA(t,e,n,i,s,r){if(n.length===0||!Xo(t,e,n[0],i,s,r))return!1;for(let o=1,a=n.length;ov&&(c=(u+d)/2,fA(t,e,n,i,c,p)&&(y=c,v=b)),u=d}return isNaN(y)&&(y=s[r]),o?(o.push(y,p,v),o):[y,p,v]}function Jee(t,e,n,i,s){let r=[];for(let o=0,a=n.length;o=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]?!0:gA(t,e,n,i,function(o,a){return bee(s,o,a)}):!1}function pA(t,e,n,i,s){return!!(Ay(t,e,n,i,s)||Xo(t,e,n,i,s[0],s[1])||Xo(t,e,n,i,s[0],s[3])||Xo(t,e,n,i,s[2],s[1])||Xo(t,e,n,i,s[2],s[3]))}function Qee(t,e,n,i,s){if(!pA(t,e,n[0],i,s))return!1;if(n.length===1)return!0;for(let r=1,o=n.length;r0}function tte(t,e,n,i,s){s=s!==void 0?s:!1;for(let r=0,o=n.length;r1&&typeof arguments[n-1]=="function"&&(i=arguments[n-1],--n);let s=0;for(;s0}getInteracting(){return this.hints_[Wn.INTERACTING]>0}cancelAnimations(){this.setHint(Wn.ANIMATING,-this.hints_[Wn.ANIMATING]);let e;for(let n=0,i=this.animations_.length;n=0;--i){const s=this.animations_[i];let r=!0;for(let o=0,a=s.length;o0?c/l.duration:1;u>=1?(l.complete=!0,u=1):r=!1;const d=l.easing(u);if(l.sourceCenter){const h=l.sourceCenter[0],f=l.sourceCenter[1],p=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const y=h+d*(p-h),v=f+d*(m-f);this.targetCenter_=[y,v]}if(l.sourceResolution&&l.targetResolution){const h=d===1?l.targetResolution:l.sourceResolution+d*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),p=this.constraints_.resolution(h,0,f,!0);this.targetCenter_=this.calculateCenterZoom(p,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=h,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const h=d===1?dl(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+d*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(h,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=h}if(this.applyTargetState_(!0),n=!0,!l.complete)break}if(r){this.animations_[i]=null,this.setHint(Wn.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=s[0].callback;o&&Kd(o,!0)}}this.animations_=this.animations_.filter(Boolean),n&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(e,n){let i;const s=this.getCenterInternal();return s!==void 0&&(i=[s[0]-n[0],s[1]-n[1]],my(i,e-this.getRotation()),wee(i,n)),i}calculateCenterZoom(e,n){let i;const s=this.getCenterInternal(),r=this.getResolution();if(s!==void 0&&r!==void 0){const o=n[0]-e*(n[0]-s[0])/r,a=n[1]-e*(n[1]-s[1])/r;i=[o,a]}return i}getViewportSize_(e){const n=this.viewportSize_;if(e){const i=n[0],s=n[1];return[Math.abs(i*Math.cos(e))+Math.abs(s*Math.sin(e)),Math.abs(i*Math.sin(e))+Math.abs(s*Math.cos(e))]}return n}setViewportSize(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const e=this.getCenterInternal();return e&&Tm(e,this.getProjection())}getCenterInternal(){return this.get(Qi.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(e){return e!==void 0?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()}calculateExtent(e){const n=this.calculateExtentInternal(e);return aA(n,this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();const n=this.getCenterInternal();pt(n,"The view center is not defined");const i=this.getResolution();pt(i!==void 0,"The view resolution is not defined");const s=this.getRotation();return pt(s!==void 0,"The view rotation is not defined"),Cm(n,i,s,e)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))}setConstrainResolution(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))}getProjection(){return this.projection_}getResolution(){return this.get(Qi.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(e,n){return this.getResolutionForExtentInternal(Zr(e,this.getProjection()),n)}getResolutionForExtentInternal(e,n){n=n||this.getViewportSizeMinusPadding_();const i=yt(e)/n[0],s=jn(e)/n[1];return Math.max(i,s)}getResolutionForValueFunction(e){e=e||2;const n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,s=Math.log(n/i)/Math.log(e);return function(r){return n/Math.pow(e,r*s)}}getRotation(){return this.get(Qi.ROTATION)}getValueForResolutionFunction(e){const n=Math.log(e||2),i=this.getConstrainedResolution(this.maxResolution_),s=this.minResolution_,r=Math.log(i/s)/n;return function(o){return Math.log(i/o)/n/r}}getViewportSizeMinusPadding_(e){let n=this.getViewportSize_(e);const i=this.padding_;return i&&(n=[n[0]-i[1]-i[3],n[1]-i[0]-i[2]]),n}getState(){const e=this.getProjection(),n=this.getResolution(),i=this.getRotation();let s=this.getCenterInternal();const r=this.padding_;if(r){const o=this.getViewportSizeMinusPadding_();s=hp(s,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],n,i)}return{center:s.slice(0),projection:e!==void 0?e:null,resolution:n,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let e;const n=this.getResolution();return n!==void 0&&(e=this.getZoomForResolution(n)),e}getZoomForResolution(e){let n=this.minZoom_||0,i,s;if(this.resolutions_){const r=ly(this.resolutions_,e,1);n=r,i=this.resolutions_[r],r==this.resolutions_.length-1?s=2:s=i/this.resolutions_[r+1]}else i=this.maxResolution_,s=this.zoomFactor_;return n+Math.log(i/e)/Math.log(s)}getResolutionForZoom(e){if(this.resolutions_?.length){if(this.resolutions_.length===1)return this.resolutions_[0];const n=nn(Math.floor(e),0,this.resolutions_.length-2),i=this.resolutions_[n]/this.resolutions_[n+1];return this.resolutions_[n]/Math.pow(i,nn(e-n,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}fit(e,n){let i;if(pt(Array.isArray(e)||typeof e.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(e)){pt(!Yf(e),"Cannot fit empty extent provided as `geometry`");const s=Zr(e,this.getProjection());i=fw(s)}else if(e.getType()==="Circle"){const s=Zr(e.getExtent(),this.getProjection());i=fw(s),i.rotate(this.getRotation(),fa(s))}else i=e;this.fitInternal(i,n)}rotatedExtentForGeometry(e){const n=this.getRotation(),i=Math.cos(n),s=Math.sin(-n),r=e.getFlatCoordinates(),o=e.getStride();let a=1/0,l=1/0,c=-1/0,u=-1/0;for(let d=0,h=r.length;d{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(e){return this.renderer_?this.renderer_.getFeatures(e):Promise.resolve([])}getData(e){return!this.renderer_||!this.rendered?null:this.renderer_.getData(e)}isVisible(e){let n;const i=this.getMapInternal();!e&&i&&(e=i.getView()),e instanceof Ts?n={viewState:e.getState(),extent:e.calculateExtent()}:n=e,!n.layerStatesArray&&i&&(n.layerStatesArray=i.getLayerGroup().getLayerStatesArray());let s;n.layerStatesArray?s=n.layerStatesArray.find(o=>o.layer===this):s=this.getLayerState();const r=this.getExtent();return My(s,n.viewState)&&(!r||_i(r,n.extent))}getAttributions(e){if(!this.isVisible(e))return[];const n=this.getSource()?.getAttributions();if(!n)return[];const i=e instanceof Ts?e.getViewStateAndExtent():e;let s=n(i);return Array.isArray(s)||(s=[s]),s}render(e,n){const i=this.getRenderer();return i.prepareFrame(e)?(this.rendered=!0,i.renderFrame(e,n)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(e,n){}renderDeferred(e){const n=this.getRenderer();n&&n.renderDeferred(e)}setMapInternal(e){e||this.unrender(),this.set(Et.MAP,e)}getMapInternal(){return this.get(Et.MAP)}setMap(e){this.mapPrecomposeKey_&&(Rt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(Rt(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=ht(e,zi.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=ht(this,et.CHANGE,e.render,e),this.changed())}handlePrecompose_(e){const n=e.frameState.layerStatesArray,i=this.getLayerState(!1);pt(!n.some(s=>s.layer===i.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),n.push(i)}setSource(e){this.set(Et.SOURCE,e)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function My(t,e){if(!t.visible)return!1;const n=e.resolution;if(n=t.maxResolution)return!1;const i=e.zoom;return i>t.minZoom&&i<=t.maxZoom}function mA(t,e,n=0,i=t.length-1,s=ate){for(;i>n;){if(i-n>600){const l=i-n+1,c=e-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),f=Math.max(n,Math.floor(e-c*d/l+h)),p=Math.min(i,Math.floor(e+(l-c)*d/l+h));mA(t,e,f,p,s)}const r=t[e];let o=n,a=i;for(_c(t,n,e),s(t[i],r)>0&&_c(t,n,i);o0;)a--}s(t[n],r)===0?_c(t,n,a):(a++,_c(t,a,i)),a<=e&&(n=a+1),e<=a&&(i=a-1)}}function _c(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function ate(t,e){return te?1:0}let _A=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let n=this.data;const i=[];if(!Gd(e,n))return i;const s=this.toBBox,r=[];for(;n;){for(let o=0;o=0&&r[n].children.length>this._maxEntries;)this._split(r,n),n--;this._adjustParentBBoxes(s,r,n)}_split(e,n){const i=e[n],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const o=this._chooseSplitIndex(i,r,s),a=qa(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,Ba(i,this.toBBox),Ba(a,this.toBBox),n?e[n-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,n){this.data=qa([e,n]),this.data.height=e.height+1,this.data.leaf=!1,Ba(this.data,this.toBBox)}_chooseSplitIndex(e,n,i){let s,r=1/0,o=1/0;for(let a=n;a<=i-n;a++){const l=Ac(e,0,a,this.toBBox),c=Ac(e,a,i,this.toBBox),u=hte(l,c),d=fp(l)+fp(c);u=n;c--){const u=e.children[c];kc(a,e.leaf?r(u):u),l+=Ud(a)}return l}_adjustParentBBoxes(e,n,i){for(let s=i;s>=0;s--)kc(n[s],e)}_condense(e){for(let n=e.length-1,i;n>=0;n--)e[n].children.length===0?n>0?(i=e[n-1].children,i.splice(i.indexOf(e[n]),1)):this.clear():Ba(e[n],this.toBBox)}};function lte(t,e,n){if(!n)return e.indexOf(t);for(let i=0;i=t.minX&&e.maxY>=t.minY}function qa(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function gw(t,e,n,i,s){const r=[e,n];for(;r.length;){if(n=r.pop(),e=r.pop(),n-e<=i)continue;const o=e+Math.ceil((n-e)/i/2)*i;mA(t,o,e,n,s),r.push(e,o,o,n)}}const ot={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function pw(t){return t[0]>0&&t[1]>0}function fte(t,e,n){return n===void 0&&(n=[0,0]),n[0]=t[0]*e+.5|0,n[1]=t[1]*e+.5|0,n}function wi(t,e){return Array.isArray(t)?t:(e===void 0?e=[t,t]:(e[0]=t,e[1]=t),e)}class Uf{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=wi(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new Uf({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return gt()}getImage(e){return gt()}getHitDetectionImage(){return gt()}getPixelRatio(e){return 1}getImageState(){return gt()}getImageSize(){return gt()}getOrigin(){return gt()}getSize(){return gt()}setDisplacement(e){this.displacement_=e}setOpacity(e){this.opacity_=e}setRotateWithView(e){this.rotateWithView_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=wi(e)}listenImageChange(e){gt()}load(){gt()}unlistenImageChange(e){gt()}ready(){return Promise.resolve()}}const Su={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var Nn={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"]};Nn.whitepoint={2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}};Nn.max=Nn.whitepoint[2].D65;Nn.rgb=function(t,e){e=e||Nn.whitepoint[2].E;var n=t[0]/e[0],i=t[1]/e[1],s=t[2]/e[2],r,o,a;return r=n*3.240969941904521+i*-1.537383177570093+s*-.498610760293,o=n*-.96924363628087+i*1.87596750150772+s*.041555057407175,a=n*.055630079696993+i*-.20397695888897+s*1.056971514242878,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r=r*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o=o*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,r=Math.min(Math.max(0,r),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[r*255,o*255,a*255]};Su.xyz=function(t,e){var n=t[0]/255,i=t[1]/255,s=t[2]/255;n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var r=n*.41239079926595+i*.35758433938387+s*.18048078840183,o=n*.21263900587151+i*.71516867876775+s*.072192315360733,a=n*.019330818715591+i*.11919477979462+s*.95053215224966;return e=e||Nn.whitepoint[2].E,[r*e[0],o*e[1],a*e[2]]};const Py={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(t,e,n){var i,s,r,o,a,l,c,u,d,h,f,p,m;if(r=t[0],o=t[1],a=t[2],r===0)return[0,0,0];var y=.0011070564598794539;return e=e||"D65",n=n||2,d=Nn.whitepoint[n][e][0],h=Nn.whitepoint[n][e][1],f=Nn.whitepoint[n][e][2],p=4*d/(d+15*h+3*f),m=9*h/(d+15*h+3*f),i=o/(13*r)+p||0,s=a/(13*r)+m||0,c=r>8?h*Math.pow((r+16)/116,3):h*r*y,l=c*9*i/(4*s)||0,u=c*(12-3*i-20*s)/(4*s)||0,[l,c,u]}};Nn.luv=function(t,e,n){var i,s,r,o,a,l,c,u,d,h,f,p,m,y=.008856451679035631,v=903.2962962962961;e=e||"D65",n=n||2,d=Nn.whitepoint[n][e][0],h=Nn.whitepoint[n][e][1],f=Nn.whitepoint[n][e][2],p=4*d/(d+15*h+3*f),m=9*h/(d+15*h+3*f),l=t[0],c=t[1],u=t[2],i=4*l/(l+15*c+3*u)||0,s=9*c/(l+15*c+3*u)||0;var b=c/h;return r=b<=y?v*b:116*Math.pow(b,1/3)-16,o=13*r*(i-p),a=13*r*(s-m),[r,o,a]};var yA={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(t){var e=t[0],n=t[1],i=t[2],s,r,o;return o=i/360*2*Math.PI,s=n*Math.cos(o),r=n*Math.sin(o),[e,s,r]},xyz:function(t){return Py.xyz(yA.luv(t))}};Py.lchuv=function(t){var e=t[0],n=t[1],i=t[2],s=Math.sqrt(n*n+i*i),r=Math.atan2(i,n),o=r*360/2/Math.PI;return o<0&&(o+=360),[e,s,o]};Nn.lchuv=function(t){return Py.lchuv(Nn.luv(t))};const mw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var _w={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function gte(t){var e,n=[],i=1,s;if(typeof t=="number")return{space:"rgb",values:[t>>>16,(t&65280)>>>8,t&255],alpha:1};if(typeof t=="number")return{space:"rgb",values:[t>>>16,(t&65280)>>>8,t&255],alpha:1};if(t=String(t).toLowerCase(),mw[t])n=mw[t].slice(),s="rgb";else if(t==="transparent")i=0,s="rgb",n=[0,0,0];else if(t[0]==="#"){var r=t.slice(1),o=r.length,a=o<=4;i=1,a?(n=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],o===4&&(i=parseInt(r[3]+r[3],16)/255)):(n=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],o===8&&(i=parseInt(r[6]+r[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),s="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(t)){var l=e[1];s=l.replace(/a$/,"");var c=s==="cmyk"?4:s==="gray"?1:3;n=e[2].trim().split(/\s*[,\/]\s*|\s+/),s==="color"&&(s=n.shift()),n=n.map(function(u,d){if(u[u.length-1]==="%")return u=parseFloat(u)/100,d===3?u:s==="rgb"?u*255:s[0]==="h"||s[0]==="l"&&!d?u*100:s==="lab"?u*125:s==="lch"?d<2?u*150:u*360:s[0]==="o"&&!d?u:s==="oklab"?u*.4:s==="oklch"?d<2?u*.4:u*360:u;if(s[d]==="h"||d===2&&s[s.length-1]==="h"){if(_w[u]!==void 0)return _w[u];if(u.endsWith("deg"))return parseFloat(u);if(u.endsWith("turn"))return parseFloat(u)*360;if(u.endsWith("grad"))return parseFloat(u)*360/400;if(u.endsWith("rad"))return parseFloat(u)*180/Math.PI}return u==="none"?0:parseFloat(u)}),i=n.length>c?n.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(u){return parseFloat(u)}),s=t.match(/([a-z])/ig)?.join("")?.toLowerCase()||"rgb");return{space:s,values:n,alpha:i}}const pp={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100,s,r,o,a,l,c=0;if(n===0)return l=i*255,[l,l,l];for(r=i<.5?i*(1+n):i+n-i*n,s=2*i-r,a=[0,0,0];c<3;)o=e+1/3*-(c-1),o<0?o++:o>1&&o--,l=6*o<1?s+(r-s)*6*o:2*o<1?r:3*o<2?s+(r-s)*(2/3-o)*6:s,a[c++]=l*255;return a}};Su.hsl=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255,s=Math.min(e,n,i),r=Math.max(e,n,i),o=r-s,a,l,c;return r===s?a=0:e===r?a=(n-i)/o:n===r?a=2+(i-e)/o:i===r&&(a=4+(e-n)/o),a=Math.min(a*60,360),a<0&&(a+=360),c=(s+r)/2,r===s?l=0:c<=.5?l=o/(r+s):l=o/(2-r-s),[a,l*100,c*100]};function pte(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments)),t instanceof Number&&(t=+t);var e,n=gte(t);if(!n.space)return[];const i=n.space[0]==="h"?pp.min:Su.min,s=n.space[0]==="h"?pp.max:Su.max;return e=Array(3),e[0]=Math.min(Math.max(n.values[0],i[0]),s[0]),e[1]=Math.min(Math.max(n.values[1],i[1]),s[1]),e[2]=Math.min(Math.max(n.values[2],i[2]),s[2]),n.space[0]==="h"&&(e=pp.rgb(e)),e.push(Math.min(Math.max(n.alpha,0),1)),e}const Iy=[NaN,NaN,NaN,0];function mte(t){return typeof t=="string"?t:Ry(t)}const _te=1024,yc={};let mp=0;function yte(t){if(t.length===4)return t;const e=t.slice();return e[3]=1,e}function yw(t){const e=Nn.lchuv(Su.xyz(t));return e[3]=t[3],e}function vte(t){const e=Nn.rgb(yA.xyz(t));return e[3]=t[3],e}function Dy(t){if(t==="none")return Iy;if(yc.hasOwnProperty(t))return yc[t];if(mp>=_te){let n=0;for(const i in yc)n++&3||(delete yc[i],--mp)}const e=pte(t);if(e.length!==4)throw new Error('failed to parse "'+t+'" as color');for(const n of e)if(isNaN(n))throw new Error('failed to parse "'+t+'" as color');return vA(e),yc[t]=e,++mp,e}function Tu(t){return Array.isArray(t)?t:Dy(t)}function vA(t){return t[0]=nn(t[0]+.5|0,0,255),t[1]=nn(t[1]+.5|0,0,255),t[2]=nn(t[2]+.5|0,0,255),t[3]=nn(t[3],0,1),t}function Ry(t){let e=t[0];e!=(e|0)&&(e=e+.5|0);let n=t[1];n!=(n|0)&&(n=n+.5|0);let i=t[2];i!=(i|0)&&(i=i+.5|0);const s=t[3]===void 0?1:Math.round(t[3]*1e3)/1e3;return"rgba("+e+","+n+","+i+","+s+")"}const ho=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",bte=ho.includes("firefox"),wte=ho.includes("safari")&&!ho.includes("chrom");wte&&(ho.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(ho));const xte=ho.includes("webkit")&&!ho.includes("edge"),bA=ho.includes("macintosh"),wA=typeof devicePixelRatio<"u"?devicePixelRatio:1,xA=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,EA=typeof Image<"u"&&Image.prototype.decode,CA=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return t}();function dn(t,e,n,i){let s;return n&&n.length?s=n.shift():xA?s=new OffscreenCanvas(t||300,e||300):s=document.createElement("canvas"),t&&(s.width=t),e&&(s.height=e),s.getContext("2d",i)}let _p;function Vh(){return _p||(_p=dn(1,1)),_p}function zl(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function vw(t,e){const n=e.parentNode;n&&n.replaceChild(t,e)}function Ete(t){for(;t.lastChild;)t.lastChild.remove()}function Cte(t,e){const n=t.childNodes;for(let i=0;;++i){const s=n[i],r=e[i];if(!s&&!r)break;if(s!==r){if(!s){t.appendChild(r);continue}if(!r){t.removeChild(s),--i;continue}t.insertBefore(r,s)}}}function Ste(t,e,n){const i=t;let s=!0,r=!1,o=!1;const a=[Oh(i,et.LOAD,function(){o=!0,r||e()})];return i.src&&EA?(r=!0,i.decode().then(function(){s&&e()}).catch(function(l){s&&(o?e():n())})):a.push(Oh(i,et.ERROR,n)),function(){s=!1,a.forEach(Rt)}}function Tte(t,e){return new Promise((n,i)=>{function s(){o(),n(t)}function r(){o(),i(new Error("Image load error"))}function o(){t.removeEventListener("load",s),t.removeEventListener("error",r)}t.addEventListener("load",s),t.addEventListener("error",r)})}function Ate(t,e){return e&&(t.src=e),t.src&&EA?new Promise((n,i)=>t.decode().then(()=>n(t)).catch(s=>t.complete&&t.width?n(t):i(s))):Tte(t)}class kte{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let e=0;for(const n in this.cache_){const i=this.cache_[n];!(e++&3)&&!i.hasListener()&&(delete this.cache_[n],delete this.patternCache_[n],--this.cacheSize_)}}}get(e,n,i){const s=yp(e,n,i);return s in this.cache_?this.cache_[s]:null}getPattern(e,n,i){const s=yp(e,n,i);return s in this.patternCache_?this.patternCache_[s]:null}set(e,n,i,s,r){const o=yp(e,n,i),a=o in this.cache_;this.cache_[o]=s,r&&(s.getImageState()===ot.IDLE&&s.load(),s.getImageState()===ot.LOADING?s.ready().then(()=>{this.patternCache_[o]=Vh().createPattern(s.getImage(1),"repeat")}):this.patternCache_[o]=Vh().createPattern(s.getImage(1),"repeat")),a||++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}}function yp(t,e,n){const i=n?Tu(n):"null";return e+":"+t+":"+i}const Is=new kte;let vc=null;class Mte extends Ff{constructor(e,n,i,s,r){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=i,this.canvas_={},this.color_=r,this.imageState_=s===void 0?ot.IDLE:s,this.size_=e&&e.width&&e.height?[e.width,e.height]:null,this.src_=n,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===ot.LOADED){vc||(vc=dn(1,1,void 0,{willReadFrequently:!0})),vc.drawImage(this.image_,0,0);try{vc.getImageData(0,0,1,1),this.tainted_=!1}catch{vc=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(et.CHANGE)}handleImageError_(){this.imageState_=ot.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=ot.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}getPixelRatio(e){return this.replaceColor_(e),this.canvas_[e]?e:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const e=this.size_[0],n=this.size_[1],i=dn(e,n);i.fillRect(0,0,e,n),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===ot.IDLE){this.image_||this.initializeImage_(),this.imageState_=ot.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&Ate(this.image_,this.src_).then(e=>{this.image_=e,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||this.imageState_!==ot.LOADED)return;const n=this.image_,i=dn(Math.ceil(n.width*e),Math.ceil(n.height*e)),s=i.canvas;i.scale(e,e),i.drawImage(n,0,0),i.globalCompositeOperation="multiply",i.fillStyle=mte(this.color_),i.fillRect(0,0,s.width/e,s.height/e),i.globalCompositeOperation="destination-in",i.drawImage(n,0,0),this.canvas_[e]=s}ready(){return this.ready_||(this.ready_=new Promise(e=>{if(this.imageState_===ot.LOADED||this.imageState_===ot.ERROR)e();else{const n=()=>{(this.imageState_===ot.LOADED||this.imageState_===ot.ERROR)&&(this.removeEventListener(et.CHANGE,n),e())};this.addEventListener(et.CHANGE,n)}})),this.ready_}}function Ly(t,e,n,i,s,r){let o=e===void 0?void 0:Is.get(e,n,s);return o||(o=new Mte(t,t&&"src"in t?t.src||void 0:e,n,i,s),Is.set(e,n,s,o,r)),r&&o&&!Is.getPattern(e,n,s)&&Is.set(e,n,s,o,r),o}function Ds(t){return t?Array.isArray(t)?Ry(t):typeof t=="object"&&"src"in t?Pte(t):t:null}function Pte(t){if(!t.offset||!t.size)return Is.getPattern(t.src,"anonymous",t.color);const e=t.src+":"+t.offset,n=Is.getPattern(e,void 0,t.color);if(n)return n;const i=Is.get(t.src,"anonymous",null);if(i.getImageState()!==ot.LOADED)return null;const s=dn(t.size[0],t.size[1]);return s.drawImage(i.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),Ly(s.canvas,e,void 0,ot.LOADED,t.color,!0),Is.getPattern(e,void 0,t.color)}const Xd="ol-hidden",Gf="ol-unselectable",Oy="ol-control",bw="ol-collapsed",Ite=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),ww=["style","variant","weight","size","lineHeight","family"],SA=function(t){const e=t.match(Ite);if(!e)return null;const n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let i=0,s=ww.length;i"u"?(s=i,i=void 0):(s=i,i=n,n=e,e=void 0))}else{if(o<1)throw new Error("Too few arguments provided");return o===1?(n=e,e=i=void 0):o===2&&!e.getContext&&(i=n,n=e,e=void 0),new Promise(function(l,c){try{const u=wm.create(n,i);l(t(u,e,i))}catch(u){c(u)}})}try{const l=wm.create(n,i);s(null,t(l,e,i))}catch(l){s(l)}}ba.create=wm.create;ba.toCanvas=ay.bind(null,YT.render);ba.toDataURL=ay.bind(null,YT.renderToDataURL);ba.toString=ay.bind(null,function(t,e,n){return U7.render(t,n)});const G7={name:"peerQRCode",components:{LocaleText:He},props:{peerConfigData:String},mounted(){ba.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,t=>{t&&console.error(t)})}},X7={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},q7={class:"container d-flex h-100 w-100"},Z7={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},J7={class:"card rounded-3 shadow"},Q7={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},eX={class:"mb-0"},tX={class:"card-body"},nX={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function iX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",X7,[g("div",q7,[g("div",Z7,[g("div",J7,[g("div",Q7,[g("h4",eX,[N(o,{t:"QR Code"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),g("div",tX,[g("canvas",nX,null,512)])])])])])}const sX=je(G7,[["render",iX]]),rX={name:"nameInput",components:{LocaleText:He},props:{bulk:Boolean,data:Object,saving:Boolean}},oX={for:"peer_name_textbox",class:"form-label"},aX={class:"text-muted"},lX=["disabled"];function cX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe({inactiveField:this.bulk})},[g("label",oX,[g("small",aX,[N(o,{t:"Name"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||this.bulk,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.name=a),id:"peer_name_textbox",placeholder:""},null,8,lX),[[We,this.data.name]])],2)}const uX=je(rX,[["render",cX]]),dX={name:"privatePublicKeyInput",components:{LocaleText:He},props:{data:Object,saving:Boolean,bulk:Boolean},setup(){const t=tt(),e=qn();return{dashboardStore:t,wgStore:e}},data(){return{keypair:{publicKey:"",privateKey:"",presharedKey:""},editKey:!1,error:!1}},methods:{genKeyPair(){this.editKey=!1,this.keypair=window.wireguard.generateKeypair(),this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey},testKey(t){return/^[A-Za-z0-9+/]{43}=?=?$/.test(t)},checkMatching(){try{this.keypair.privateKey&&this.wgStore.checkWGKeyLength(this.keypair.privateKey)&&(this.keypair.publicKey=window.wireguard.generatePublicKey(this.keypair.privateKey),window.wireguard.generatePublicKey(this.keypair.privateKey)!==this.keypair.publicKey?(this.error=!0,this.dashboardStore.newMessage("WGDashboard","Private key does not match with the public key","danger")):(this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey))}catch{this.error=!0,this.data.private_key="",this.data.public_key=""}}},mounted(){this.genKeyPair()},watch:{keypair:{deep:!0,handler(){this.error=!1,this.checkMatching()}}}},hX={for:"peer_private_key_textbox",class:"form-label"},fX={class:"text-muted"},gX={class:"input-group"},pX=["disabled"],mX=["disabled"],_X={class:"d-flex"},yX={for:"public_key",class:"form-label"},vX={class:"text-muted"},bX={class:"form-check form-switch ms-auto"},wX=["disabled"],xX={class:"form-check-label",for:"enablePublicKeyEdit"},EX=["disabled"];function CX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[g("div",null,[g("label",hX,[g("small",fX,[N(o,{t:"Private Key"}),g("code",null,[N(o,{t:"(Required for QR Code and Download)"})])])]),g("div",gX,[$e(g("input",{type:"text",class:Pe(["form-control form-control-sm rounded-start-3",{"is-invalid":this.error}]),"onUpdate:modelValue":e[0]||(e[0]=a=>this.keypair.privateKey=a),disabled:!this.editKey||this.bulk,onBlur:e[1]||(e[1]=a=>this.checkMatching()),id:"peer_private_key_textbox"},null,42,pX),[[We,this.keypair.privateKey]]),g("button",{class:"btn btn-outline-info btn-sm rounded-end-3",onClick:e[2]||(e[2]=a=>this.genKeyPair()),disabled:this.bulk,type:"button",id:"button-addon2"},e[6]||(e[6]=[g("i",{class:"bi bi-arrow-repeat"},null,-1)]),8,mX)])]),g("div",null,[g("div",_X,[g("label",yX,[g("small",vX,[N(o,{t:"Public Key"}),g("code",null,[N(o,{t:"(Required)"})])])]),g("div",bX,[$e(g("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:this.bulk,id:"enablePublicKeyEdit","onUpdate:modelValue":e[3]||(e[3]=a=>this.editKey=a)},null,8,wX),[[Kn,this.editKey]]),g("label",xX,[g("small",null,[N(o,{t:"Use your own Private and Public Key"})])])])]),$e(g("input",{class:Pe(["form-control-sm form-control rounded-3",{"is-invalid":this.error}]),"onUpdate:modelValue":e[4]||(e[4]=a=>this.keypair.publicKey=a),onBlur:e[5]||(e[5]=a=>this.checkMatching()),disabled:!this.editKey||this.bulk,type:"text",id:"public_key"},null,42,EX),[[We,this.keypair.publicKey]])])],2)}const SX=je(dX,[["render",CX]]),TX={name:"allowedIPsInput",components:{LocaleText:He},props:{data:Object,saving:Boolean,bulk:Boolean,availableIp:void 0},data(){return{allowedIp:[],availableIpSearchString:"",customAvailableIp:"",allowedIpFormatError:!1}},setup(){const t=qn(),e=tt();return{store:t,dashboardStore:e}},computed:{searchAvailableIps(){return this.availableIpSearchString?this.availableIp.filter(t=>t.includes(this.availableIpSearchString)&&!this.data.allowed_ips.includes(t)):this.availableIp.filter(t=>!this.data.allowed_ips.includes(t))},inputGetLocale(){return At("Enter IP Address/CIDR")}},methods:{addAllowedIp(t){return this.store.checkCIDR(t)?(this.data.allowed_ips.push(t),this.customAvailableIp="",!0):(this.allowedIpFormatError=!0,this.dashboardStore.newMessage("WGDashboard","Allowed IPs is invalid","danger"),!1)}},watch:{customAvailableIp(){this.allowedIpFormatError=!1},availableIp(){this.availableIp!==void 0&&this.availableIp.length>0&&this.addAllowedIp(this.availableIp[0])}},mounted(){}},AX={for:"peer_allowed_ip_textbox",class:"form-label"},kX={class:"text-muted"},MX=["onClick"],PX={class:"d-flex gap-2 align-items-center"},IX={class:"input-group"},DX=["placeholder","disabled"],RX=["disabled"],LX={class:"text-muted"},OX={class:"dropdown flex-grow-1"},$X=["disabled"],NX={key:0,class:"dropdown-menu mt-2 shadow w-100 dropdown-menu-end rounded-3",style:{"overflow-y":"scroll","max-height":"270px",width:"300px !important"}},FX={class:"px-3 pb-2 pt-1 d-flex gap-3 align-items-center"},BX=["onClick"],VX={class:"me-auto"},zX={key:0},WX={class:"px-3 text-muted"};function YX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe({inactiveField:this.bulk})},[g("label",AX,[g("small",kX,[N(o,{t:"Allowed IPs"}),g("code",null,[N(o,{t:"(Required)"})])])]),g("div",{class:Pe(["d-flex gap-2 flex-wrap",{"mb-2":this.data.allowed_ips.length>0}])},[N(Ul,{name:"list"},{default:De(()=>[(R(!0),V(Oe,null,Ze(this.data.allowed_ips,(a,l)=>(R(),V("span",{class:"badge rounded-pill text-bg-success",key:a},[Ue(we(a)+" ",1),g("a",{role:"button",onClick:c=>this.data.allowed_ips.splice(l,1)},e[3]||(e[3]=[g("i",{class:"bi bi-x-circle-fill ms-1"},null,-1)]),8,MX)]))),128))]),_:1})],2),g("div",PX,[g("div",IX,[$e(g("input",{type:"text",class:Pe(["form-control form-control-sm rounded-start-3",{"is-invalid":this.allowedIpFormatError}]),placeholder:this.inputGetLocale,"onUpdate:modelValue":e[0]||(e[0]=a=>s.customAvailableIp=a),disabled:n.bulk},null,10,DX),[[We,s.customAvailableIp]]),g("button",{class:"btn btn-outline-success btn-sm rounded-end-3",disabled:n.bulk||!this.customAvailableIp,onClick:e[1]||(e[1]=a=>this.addAllowedIp(this.customAvailableIp)),type:"button",id:"button-addon2"},e[4]||(e[4]=[g("i",{class:"bi bi-plus-lg"},null,-1)]),8,RX)]),g("small",LX,[N(o,{t:"or"})]),g("div",OX,[g("button",{class:"btn btn-outline-secondary btn-sm dropdown-toggle rounded-3 w-100",disabled:!n.availableIp||n.bulk,"data-bs-auto-close":"outside",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[e[5]||(e[5]=g("i",{class:"bi bi-filter-circle me-2"},null,-1)),N(o,{t:"Pick Available IP"})],8,$X),this.availableIp?(R(),V("ul",NX,[g("li",null,[g("div",FX,[e[6]||(e[6]=g("label",{for:"availableIpSearchString",class:"text-muted"},[g("i",{class:"bi bi-search"})],-1)),$e(g("input",{id:"availableIpSearchString",class:"form-control form-control-sm rounded-3","onUpdate:modelValue":e[2]||(e[2]=a=>this.availableIpSearchString=a)},null,512),[[We,this.availableIpSearchString]])])]),(R(!0),V(Oe,null,Ze(this.searchAvailableIps,a=>(R(),V("li",null,[g("a",{class:"dropdown-item d-flex",role:"button",onClick:l=>this.addAllowedIp(a)},[g("span",VX,[g("small",null,we(a),1)])],8,BX)]))),256)),this.searchAvailableIps.length===0?(R(),V("li",zX,[g("small",WX,[N(o,{t:"No available IP containing"}),Ue(' "'+we(this.availableIpSearchString)+'"',1)])])):ce("",!0)])):ce("",!0)])])],2)}const HX=je(TX,[["render",YX],["__scopeId","data-v-6d5fc831"]]),jX={name:"dnsInput",components:{LocaleText:He},props:{data:Object,saving:Boolean},data(){return{error:!1,dns:JSON.parse(JSON.stringify(this.data.DNS))}},setup(){const t=qn(),e=tt();return{store:t,dashboardStore:e}},methods:{checkDNS(){if(this.dns){let t=this.dns.split(",").map(e=>e.replaceAll(" ",""));for(let e in t)if(!this.store.regexCheckIP(t[e])){this.error||this.dashboardStore.newMessage("WGDashboard","DNS format is incorrect","danger"),this.error=!0,this.data.DNS="";return}this.error=!1,this.data.DNS=this.dns}}},watch:{dns(){this.checkDNS()}}},KX={for:"peer_DNS_textbox",class:"form-label"},UX={class:"text-muted"},GX=["disabled"];function XX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("label",KX,[g("small",UX,[N(o,{t:"DNS"})])]),$e(g("input",{type:"text",class:Pe(["form-control form-control-sm rounded-3",{"is-invalid":this.error}]),disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.dns=a),id:"peer_DNS_textbox"},null,10,GX),[[We,this.dns]])])}const qX=je(jX,[["render",XX]]),ZX={name:"endpointAllowedIps",components:{LocaleText:He},props:{data:Object,saving:Boolean},setup(){const t=qn(),e=tt();return{store:t,dashboardStore:e}},data(){return{endpointAllowedIps:JSON.parse(JSON.stringify(this.data.endpoint_allowed_ip)),error:!1}},methods:{checkAllowedIP(){let t=this.endpointAllowedIps.split(",").map(e=>e.replaceAll(" ",""));for(let e in t)if(!this.store.checkCIDR(t[e])){this.error||this.dashboardStore.newMessage("WGDashboard","Endpoint Allowed IPs format is incorrect","danger"),this.data.endpoint_allowed_ip="",this.error=!0;return}this.error=!1,this.data.endpoint_allowed_ip=this.endpointAllowedIps}},watch:{endpointAllowedIps(){this.checkAllowedIP()}}},JX={for:"peer_endpoint_allowed_ips",class:"form-label"},QX={class:"text-muted"},e9=["disabled"];function t9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("label",JX,[g("small",QX,[N(o,{t:"Endpoint Allowed IPs"}),g("code",null,[N(o,{t:"(Required)"})])])]),$e(g("input",{type:"text",class:Pe(["form-control form-control-sm rounded-3",{"is-invalid":s.error}]),disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.endpointAllowedIps=a),onBlur:e[1]||(e[1]=a=>this.checkAllowedIP()),id:"peer_endpoint_allowed_ips"},null,42,e9),[[We,this.endpointAllowedIps]])])}const n9=je(ZX,[["render",t9]]),i9={name:"presharedKeyInput",components:{LocaleText:He},props:{data:Object,saving:Boolean},data(){return{enable:!1}},watch:{enable(){this.enable?this.data.preshared_key=window.wireguard.generateKeypair().presharedKey:this.data.preshared_key=""}}},s9={class:"d-flex align-items-start"},r9={for:"peer_preshared_key_textbox",class:"form-label"},o9={class:"text-muted"},a9={class:"form-check form-switch ms-auto"},l9=["disabled"];function c9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("div",s9,[g("label",r9,[g("small",o9,[N(o,{t:"Pre-Shared Key"})])]),g("div",a9,[$e(g("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":e[0]||(e[0]=a=>this.enable=a),id:"peer_preshared_key_switch"},null,512),[[Kn,this.enable]])])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||!this.enable,"onUpdate:modelValue":e[1]||(e[1]=a=>this.data.preshared_key=a),id:"peer_preshared_key_textbox"},null,8,l9),[[We,this.data.preshared_key]])])}const u9=je(i9,[["render",c9]]),d9={name:"mtuInput",components:{LocaleText:He},props:{data:Object,saving:Boolean}},h9={for:"peer_mtu",class:"form-label"},f9={class:"text-muted"},g9=["disabled"];function p9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("label",h9,[g("small",f9,[N(o,{t:"MTU"})])]),$e(g("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.mtu=a),min:"0",id:"peer_mtu"},null,8,g9),[[We,this.data.mtu]])])}const m9=je(d9,[["render",p9]]),_9={name:"persistentKeepAliveInput",components:{LocaleText:He},props:{data:Object,saving:Boolean}},y9={for:"peer_keep_alive",class:"form-label"},v9={class:"text-muted"},b9=["disabled"];function w9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("label",y9,[g("small",v9,[N(o,{t:"Persistent Keepalive"})])]),$e(g("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.keepalive=a),id:"peer_keep_alive"},null,8,b9),[[We,this.data.keepalive]])])}const x9=je(_9,[["render",w9]]),E9={name:"bulkAdd",components:{LocaleText:He},props:{saving:Boolean,data:Object,availableIp:void 0},computed:{bulkAddGetLocale(){return At("How many peers you want to add?")}}},C9={class:"form-check form-switch"},S9=["disabled"],T9={class:"form-check-label me-2",for:"bulk_add"},A9={class:"text-muted d-block"},k9={key:0,class:"form-group"},M9=["max","placeholder"],P9={class:"text-muted"};function I9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("div",C9,[$e(g("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:!this.availableIp,id:"bulk_add","onUpdate:modelValue":e[0]||(e[0]=a=>this.data.bulkAdd=a)},null,8,S9),[[Kn,this.data.bulkAdd]]),g("label",T9,[g("small",null,[g("strong",null,[N(o,{t:"Bulk Add"})])])])]),g("p",{class:Pe({"mb-0":!this.data.bulkAdd})},[g("small",A9,[N(o,{t:"By adding peers by bulk, each peer's name will be auto generated, and Allowed IP will be assign to the next available IP."})])],2),this.data.bulkAdd?(R(),V("div",k9,[$e(g("input",{class:"form-control form-control-sm rounded-3 mb-1",type:"number",min:"1",max:this.availableIp.length,"onUpdate:modelValue":e[1]||(e[1]=a=>this.data.bulkAddAmount=a),placeholder:this.bulkAddGetLocale},null,8,M9),[[We,this.data.bulkAddAmount]]),g("small",P9,[N(o,{t:"You can add up to "+this.availableIp.length+" peers"},null,8,["t"])])])):ce("",!0)])}const D9=je(E9,[["render",I9]]),R9={name:"peerCreate",components:{LocaleText:He,BulkAdd:D9,PersistentKeepAliveInput:x9,MtuInput:m9,PresharedKeyInput:u9,EndpointAllowedIps:n9,DnsInput:qX,AllowedIPsInput:HX,PrivatePublicKeyInput:SX,NameInput:uX},data(){return{data:{bulkAdd:!1,bulkAddAmount:0,name:"",allowed_ips:[],private_key:"",public_key:"",DNS:this.dashboardStore.Configuration.Peers.peer_global_dns,endpoint_allowed_ip:this.dashboardStore.Configuration.Peers.peer_endpoint_allowed_ip,keepalive:parseInt(this.dashboardStore.Configuration.Peers.peer_keep_alive),mtu:parseInt(this.dashboardStore.Configuration.Peers.peer_mtu),preshared_key:"",preshared_key_bulkAdd:!1},availableIp:void 0,availableIpSearchString:"",saving:!1,allowedIpDropdown:void 0}},mounted(){Yt("/api/getAvailableIPs/"+this.$route.params.id,{},t=>{t.status&&(this.availableIp=t.data)})},setup(){const t=qn(),e=tt();return{store:t,dashboardStore:e}},methods:{peerCreate(){this.saving=!0,xt("/api/addPeers/"+this.$route.params.id,this.data,t=>{t.status?(this.$router.push(`/configuration/${this.$route.params.id}/peers`),this.dashboardStore.newMessage("Server","Peer created successfully","success")):this.dashboardStore.newMessage("Server",t.message,"danger"),this.saving=!1})}},computed:{allRequireFieldsFilled(){let t=!0;return this.data.bulkAdd?(this.data.bulkAddAmount.length===0||this.data.bulkAddAmount>this.availableIp.length)&&(t=!1):["allowed_ips","private_key","public_key","endpoint_allowed_ip","keepalive","mtu"].forEach(n=>{this.data[n].length===0&&(t=!1)}),t}},watch:{bulkAdd(t){t||(this.data.bulkAddAmount="")},"data.bulkAddAmount"(){this.data.bulkAddAmount>this.availableIp.length&&(this.data.bulkAddAmount=this.availableIp.length)}}},L9={class:"container"},O9={class:"mb-4"},$9={class:"text-body mb-0"},N9={class:"d-flex flex-column gap-2"},F9={class:"row gy-3"},B9={key:0,class:"col-sm"},V9={class:"col-sm"},z9={class:"col-sm"},W9={key:1,class:"col-12"},Y9={class:"form-check form-switch"},H9={class:"form-check-label",for:"bullAdd_PresharedKey_Switch"},j9={class:"fw-bold"},K9={class:"d-flex mt-2"},U9=["disabled"],G9={key:0,class:"bi bi-plus-circle-fill me-2"};function X9(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink"),l=Ee("BulkAdd"),c=Ee("NameInput"),u=Ee("PrivatePublicKeyInput"),d=Ee("AllowedIPsInput"),h=Ee("EndpointAllowedIps"),f=Ee("DnsInput"),p=Ee("PresharedKeyInput"),m=Ee("MtuInput"),y=Ee("PersistentKeepAliveInput");return R(),V("div",L9,[g("div",O9,[N(a,{to:"peers",is:"div",class:"d-flex align-items-center gap-4 text-decoration-none"},{default:De(()=>[e[2]||(e[2]=g("h3",{class:"mb-0 text-body"},[g("i",{class:"bi bi-chevron-left"})],-1)),g("h3",$9,[N(o,{t:"Add Peers"})])]),_:1})]),g("div",N9,[N(l,{saving:s.saving,data:this.data,availableIp:this.availableIp},null,8,["saving","data","availableIp"]),e[3]||(e[3]=g("hr",{class:"mb-0 mt-2"},null,-1)),this.data.bulkAdd?ce("",!0):(R(),Se(c,{key:0,saving:s.saving,data:this.data},null,8,["saving","data"])),this.data.bulkAdd?ce("",!0):(R(),Se(u,{key:1,saving:s.saving,data:s.data},null,8,["saving","data"])),this.data.bulkAdd?ce("",!0):(R(),Se(d,{key:2,availableIp:this.availableIp,saving:s.saving,data:s.data},null,8,["availableIp","saving","data"])),N(h,{saving:s.saving,data:s.data},null,8,["saving","data"]),N(f,{saving:s.saving,data:s.data},null,8,["saving","data"]),e[4]||(e[4]=g("hr",{class:"mb-0 mt-2"},null,-1)),g("div",F9,[this.data.bulkAdd?ce("",!0):(R(),V("div",B9,[N(p,{saving:s.saving,data:s.data,bulk:this.data.bulkAdd},null,8,["saving","data","bulk"])])),g("div",V9,[N(m,{saving:s.saving,data:s.data},null,8,["saving","data"])]),g("div",z9,[N(y,{saving:s.saving,data:s.data},null,8,["saving","data"])]),this.data.bulkAdd?(R(),V("div",W9,[g("div",Y9,[$e(g("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":e[0]||(e[0]=v=>this.data.preshared_key_bulkAdd=v),id:"bullAdd_PresharedKey_Switch",checked:""},null,512),[[Kn,this.data.preshared_key_bulkAdd]]),g("label",H9,[g("small",j9,[N(o,{t:"Pre-Shared Key"}),this.data.preshared_key_bulkAdd?(R(),Se(o,{key:0,t:"Enabled"})):(R(),Se(o,{key:1,t:"Disabled"}))])])])])):ce("",!0)]),g("div",K9,[g("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!this.allRequireFieldsFilled||this.saving,onClick:e[1]||(e[1]=v=>this.peerCreate())},[this.saving?ce("",!0):(R(),V("i",G9)),this.saving?(R(),Se(o,{key:1,t:"Adding..."})):(R(),Se(o,{key:2,t:"Add"}))],8,U9)])])])}const HT=je(R9,[["render",X9],["__scopeId","data-v-3f34f584"]]),q9={name:"scheduleDropdown",props:{options:Array,data:String,edit:!1},setup(t){t.data===void 0&&this.$emit("update",this.options[0].value)},computed:{currentSelection(){return this.options.find(t=>t.value===this.data)}}},Z9={class:"dropdown scheduleDropdown"},J9={class:"dropdown-menu rounded-3 shadow",style:{"font-size":"0.875rem",width:"200px"}},Q9=["onClick"],eq={key:0,class:"bi bi-check ms-auto"};function tq(t,e,n,i,s,r){return R(),V("div",Z9,[g("button",{class:Pe(["btn btn-sm btn-outline-primary rounded-3",{"disabled border-transparent":!n.edit}]),type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[g("samp",null,we(this.currentSelection.display),1)],2),g("ul",J9,[n.edit?(R(!0),V(Oe,{key:0},Ze(this.options,o=>(R(),V("li",null,[g("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:a=>t.$emit("update",o.value)},[g("samp",null,we(o.display),1),o.value===this.currentSelection.value?(R(),V("i",eq)):ce("",!0)],8,Q9)]))),256)):ce("",!0)])])}const jT=je(q9,[["render",tq],["__scopeId","data-v-6a5aba2a"]]),nq={name:"schedulePeerJob",components:{LocaleText:He,VueDatePicker:Yu,ScheduleDropdown:jT},props:{dropdowns:Array[Object],pjob:Object,viewOnly:!1},setup(t){const e=xe({}),n=xe(!1),i=xe(!1);e.value=JSON.parse(JSON.stringify(t.pjob)),e.value.CreationDate||(n.value=!0,i.value=!0);const s=tt();return{job:e,edit:n,newJob:i,store:s}},data(){return{inputType:void 0}},watch:{pjob:{deep:!0,immediate:!0,handler(t){this.edit||(this.job=JSON.parse(JSON.stringify(t)))}}},methods:{save(){this.job.Field&&this.job.Operator&&this.job.Action&&this.job.Value?xt("/api/savePeerScheduleJob/",{Job:this.job},t=>{t.status?(this.edit=!1,this.store.newMessage("Server","Peer job saved","success"),console.log(t.data),this.$emit("refresh",t.data[0]),this.newJob=!1):this.store.newMessage("Server",t.message,"danger")}):this.alert()},alert(){let t="animate__flash",e=this.$el.querySelectorAll(".scheduleDropdown"),n=this.$el.querySelectorAll("input");e.forEach(i=>i.classList.add("animate__animated",t)),n.forEach(i=>i.classList.add("animate__animated",t)),setTimeout(()=>{e.forEach(i=>i.classList.remove("animate__animated",t)),n.forEach(i=>i.classList.remove("animate__animated",t))},2e3)},reset(){this.job.CreationDate?(this.job=JSON.parse(JSON.stringify(this.pjob)),this.edit=!1):this.$emit("delete")},delete(){this.job.CreationDate&&xt("/api/deletePeerScheduleJob/",{Job:this.job},t=>{t.status?this.store.newMessage("Server","Peer job deleted","success"):(this.store.newMessage("Server",t.message,"danger"),this.$emit("delete"))}),this.$emit("delete")},parseTime(t){t&&(this.job.Value=bi(t).format("YYYY-MM-DD HH:mm:ss"))}}},iq={class:"card-header bg-transparent text-muted border-0"},sq={key:0,class:"d-flex"},rq={class:"me-auto"},oq={key:1},aq={class:"badge text-bg-warning"},lq={class:"card-body pt-1",style:{"font-family":"var(--bs-font-monospace)"}},cq={class:"d-flex gap-2 align-items-center mb-2"},uq=["disabled"],dq={class:"px-5 d-flex gap-2 align-items-center"},hq={class:"d-flex gap-3"},fq={key:0,class:"ms-auto d-flex gap-3"},gq={key:1,class:"ms-auto d-flex gap-3"};function pq(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("ScheduleDropdown"),l=Ee("VueDatePicker");return R(),V("div",{class:Pe(["card shadow-sm rounded-3 mb-2",{"border-warning-subtle":this.newJob}])},[g("div",iq,[this.newJob?(R(),V("small",oq,[g("span",aq,[N(o,{t:"Unsaved Job"})])])):(R(),V("small",sq,[g("strong",rq,[N(o,{t:"Job ID"})]),g("samp",null,we(this.job.JobID),1)]))]),g("div",lq,[g("div",cq,[g("samp",null,[N(o,{t:"if"})]),N(a,{edit:i.edit,options:this.dropdowns.Field,data:this.job.Field,onUpdate:e[0]||(e[0]=c=>{this.job.Field=c})},null,8,["edit","options","data"]),g("samp",null,[N(o,{t:"is"})]),N(a,{edit:i.edit,options:this.dropdowns.Operator,data:this.job.Operator,onUpdate:e[1]||(e[1]=c=>this.job.Operator=c)},null,8,["edit","options","data"]),this.job.Field==="date"?(R(),Se(l,{key:0,is24:!0,"min-date":new Date,"model-value":this.job.Value,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:!i.edit,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])):$e((R(),V("input",{key:1,class:"form-control form-control-sm form-control-dark rounded-3 flex-grow-1",disabled:!i.edit,"onUpdate:modelValue":e[2]||(e[2]=c=>this.job.Value=c),style:{width:"auto"}},null,8,uq)),[[We,this.job.Value]]),g("samp",null,we(this.dropdowns.Field.find(c=>c.value===this.job.Field)?.unit)+" { ",1)]),g("div",dq,[g("samp",null,[N(o,{t:"then"})]),N(a,{edit:i.edit,options:this.dropdowns.Action,data:this.job.Action,onUpdate:e[3]||(e[3]=c=>this.job.Action=c)},null,8,["edit","options","data"])]),g("div",hq,[e[12]||(e[12]=g("samp",null,"}",-1)),this.edit?(R(),V("div",gq,[g("a",{role:"button",class:"text-secondary text-decoration-none",onClick:e[6]||(e[6]=c=>this.reset())},[e[10]||(e[10]=Ue("[C] ")),N(o,{t:"Cancel"})]),g("a",{role:"button",class:"text-primary ms-auto text-decoration-none",onClick:e[7]||(e[7]=c=>this.save())},[e[11]||(e[11]=Ue("[S] ")),N(o,{t:"Save"})])])):(R(),V("div",fq,[g("a",{role:"button",class:"ms-auto text-decoration-none",onClick:e[4]||(e[4]=c=>this.edit=!0)},[e[8]||(e[8]=Ue("[E] ")),N(o,{t:"Edit"})]),g("a",{role:"button",onClick:e[5]||(e[5]=c=>this.delete()),class:"text-danger text-decoration-none"},[e[9]||(e[9]=Ue("[D] ")),N(o,{t:"Delete"})])]))])])],2)}const KT=je(nq,[["render",pq],["__scopeId","data-v-8f3f1b93"]]),mq={name:"peerJobs",setup(){return{store:qn()}},props:{selectedPeer:Object},components:{LocaleText:He,SchedulePeerJob:KT,ScheduleDropdown:jT},data(){return{}},methods:{deleteJob(t){this.selectedPeer.jobs=this.selectedPeer.jobs.filter(e=>e.JobID!==t.JobID)},addJob(){this.selectedPeer.jobs.unshift(JSON.parse(JSON.stringify({JobID:Bs().toString(),Configuration:this.selectedPeer.configuration.Name,Peer:this.selectedPeer.id,Field:this.store.PeerScheduleJobs.dropdowns.Field[0].value,Operator:this.store.PeerScheduleJobs.dropdowns.Operator[0].value,Value:"",CreationDate:"",ExpireDate:"",Action:this.store.PeerScheduleJobs.dropdowns.Action[0].value})))}}},_q={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},yq={class:"container d-flex h-100 w-100"},vq={class:"m-auto modal-dialog-centered dashboardModal"},bq={class:"card rounded-3 shadow",style:{width:"700px"}},wq={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},xq={class:"mb-0 fw-normal"},Eq={class:"card-body px-4 pb-4 pt-2 position-relative"},Cq={class:"d-flex align-items-center mb-3"},Sq={class:"card shadow-sm",key:"none",style:{height:"153px"}},Tq={class:"card-body text-muted text-center d-flex"},Aq={class:"m-auto"};function kq(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("SchedulePeerJob");return R(),V("div",_q,[g("div",yq,[g("div",vq,[g("div",bq,[g("div",wq,[g("h4",xq,[N(o,{t:"Schedule Jobs"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),g("div",Eq,[g("div",Cq,[g("button",{class:"btn bg-primary-subtle border-1 border-primary-subtle text-primary-emphasis rounded-3 shadow",onClick:e[1]||(e[1]=l=>this.addJob())},[e[3]||(e[3]=g("i",{class:"bi bi-plus-lg me-2"},null,-1)),N(o,{t:"Job"})])]),N(Ul,{name:"schedulePeerJobTransition",tag:"div",class:"position-relative"},{default:De(()=>[(R(!0),V(Oe,null,Ze(this.selectedPeer.jobs,(l,c)=>(R(),Se(a,{onRefresh:e[2]||(e[2]=u=>this.$emit("refresh")),onDelete:u=>this.deleteJob(l),dropdowns:this.store.PeerScheduleJobs.dropdowns,key:l.JobID,pjob:l},null,8,["onDelete","dropdowns","pjob"]))),128)),this.selectedPeer.jobs.length===0?(R(),V("div",Sq,[g("div",Tq,[g("h6",Aq,[N(o,{t:"This peer does not have any job yet."})])])])):ce("",!0)]),_:1})])])])])])}const Mq=je(mq,[["render",kq],["__scopeId","data-v-5bbdd42b"]]),Pq={name:"peerJobsAllModal",setup(){return{store:qn()}},components:{LocaleText:He,SchedulePeerJob:KT},props:{configurationPeers:Array[Object]},methods:{getuuid(){return Bs()}},computed:{getAllJobs(){return this.configurationPeers.filter(t=>t.jobs.length>0)}}},Iq={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},Dq={class:"container d-flex h-100 w-100"},Rq={class:"m-auto modal-dialog-centered dashboardModal"},Lq={class:"card rounded-3 shadow",style:{width:"700px"}},Oq={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},$q={class:"mb-0 fw-normal"},Nq={class:"card-body px-4 pb-4 pt-2"},Fq={key:0,class:"accordion",id:"peerJobsLogsModalAccordion"},Bq={class:"accordion-header"},Vq=["data-bs-target"],zq={key:0},Wq={class:"text-muted"},Yq=["id"],Hq={class:"accordion-body"},jq={key:1,class:"card shadow-sm",style:{height:"153px"}},Kq={class:"card-body text-muted text-center d-flex"},Uq={class:"m-auto"};function Gq(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("SchedulePeerJob");return R(),V("div",Iq,[g("div",Dq,[g("div",Rq,[g("div",Lq,[g("div",Oq,[g("h4",$q,[N(o,{t:"All Active Jobs"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),g("div",Nq,[this.getAllJobs.length>0?(R(),V("div",Fq,[(R(!0),V(Oe,null,Ze(this.getAllJobs,(l,c)=>(R(),V("div",{class:"accordion-item",key:l.id},[g("h2",Bq,[g("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapse_"+c},[g("small",null,[g("strong",null,[l.name?(R(),V("span",zq,we(l.name)+" • ",1)):ce("",!0),g("samp",Wq,we(l.id),1)])])],8,Vq)]),g("div",{id:"collapse_"+c,class:"accordion-collapse collapse","data-bs-parent":"#peerJobsLogsModalAccordion"},[g("div",Hq,[(R(!0),V(Oe,null,Ze(l.jobs,u=>(R(),Se(a,{onDelete:e[1]||(e[1]=d=>this.$emit("refresh")),onRefresh:e[2]||(e[2]=d=>this.$emit("refresh")),dropdowns:this.store.PeerScheduleJobs.dropdowns,viewOnly:!0,key:u.JobID,pjob:u},null,8,["dropdowns","pjob"]))),128))])],8,Yq)]))),128))])):(R(),V("div",jq,[g("div",Kq,[g("span",Uq,[N(o,{t:"No active job at the moment."})])])]))])])])])])}const Xq=je(Pq,[["render",Gq]]),qq={name:"peerJobsLogsModal",components:{LocaleText:He},props:{configurationInfo:Object},data(){return{dataLoading:!0,data:[],logFetchTime:void 0,showLogID:!1,showJobID:!0,showSuccessJob:!0,showFailedJob:!0,showLogAmount:10}},async mounted(){await this.fetchLog()},methods:{async fetchLog(){this.dataLoading=!0,await Yt(`/api/getPeerScheduleJobLogs/${this.configurationInfo.Name}`,{},t=>{this.data=t.data,this.logFetchTime=bi().format("YYYY-MM-DD HH:mm:ss"),this.dataLoading=!1})}},computed:{getLogs(){return this.data.filter(t=>this.showSuccessJob&&t.Status==="1"||this.showFailedJob&&t.Status==="0")},showLogs(){return this.getLogs.slice(0,this.showLogAmount)}}},Zq={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},Jq={class:"container-fluid d-flex h-100 w-100"},Qq={class:"m-auto mt-0 modal-dialog-centered dashboardModal",style:{width:"100%"}},eZ={class:"card rounded-3 shadow w-100"},tZ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},nZ={class:"mb-0"},iZ={class:"card-body px-4 pb-4 pt-2"},sZ={key:0},rZ={class:"mb-2 d-flex gap-3"},oZ={class:"d-flex gap-3 align-items-center"},aZ={class:"text-muted"},lZ={class:"form-check"},cZ={class:"form-check-label",for:"jobLogsShowSuccessCheck"},uZ={class:"badge text-success-emphasis bg-success-subtle"},dZ={class:"form-check"},hZ={class:"form-check-label",for:"jobLogsShowFailedCheck"},fZ={class:"badge text-danger-emphasis bg-danger-subtle"},gZ={class:"d-flex gap-3 align-items-center ms-auto"},pZ={class:"text-muted"},mZ={class:"form-check"},_Z={class:"form-check-label",for:"jobLogsShowJobIDCheck"},yZ={class:"form-check"},vZ={class:"form-check-label",for:"jobLogsShowLogIDCheck"},bZ={class:"table"},wZ={scope:"col"},xZ={key:0,scope:"col"},EZ={key:1,scope:"col"},CZ={scope:"col"},SZ={scope:"col"},TZ={style:{"font-size":"0.875rem"}},AZ={scope:"row"},kZ={key:0},MZ={class:"text-muted"},PZ={key:1},IZ={class:"text-muted"},DZ={class:"d-flex gap-2"},RZ={key:1,class:"d-flex align-items-center flex-column"};function LZ(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",Zq,[g("div",Jq,[g("div",Qq,[g("div",eZ,[g("div",tZ,[g("h4",nZ,[N(o,{t:"Jobs Logs"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),g("div",iZ,[this.dataLoading?(R(),V("div",RZ,e[11]||(e[11]=[g("div",{class:"spinner-border text-body",role:"status"},[g("span",{class:"visually-hidden"},"Loading...")],-1)]))):(R(),V("div",sZ,[g("p",null,[N(o,{t:"Updated at"}),Ue(" : "+we(this.logFetchTime),1)]),g("div",rZ,[g("button",{onClick:e[1]||(e[1]=a=>this.fetchLog()),class:"btn btn-sm rounded-3 shadow-sm text-info-emphasis bg-info-subtle border-1 border-info-subtle me-1"},[e[8]||(e[8]=g("i",{class:"bi bi-arrow-clockwise me-2"},null,-1)),N(o,{t:"Refresh"})]),g("div",oZ,[g("span",aZ,[N(o,{t:"Filter"})]),g("div",lZ,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[2]||(e[2]=a=>this.showSuccessJob=a),id:"jobLogsShowSuccessCheck"},null,512),[[Kn,this.showSuccessJob]]),g("label",cZ,[g("span",uZ,[N(o,{t:"Success"})])])]),g("div",dZ,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[3]||(e[3]=a=>this.showFailedJob=a),id:"jobLogsShowFailedCheck"},null,512),[[Kn,this.showFailedJob]]),g("label",hZ,[g("span",fZ,[N(o,{t:"Failed"})])])])]),g("div",gZ,[g("span",pZ,[N(o,{t:"Display"})]),g("div",mZ,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[4]||(e[4]=a=>s.showJobID=a),id:"jobLogsShowJobIDCheck"},null,512),[[Kn,s.showJobID]]),g("label",_Z,[N(o,{t:"Job ID"})])]),g("div",yZ,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=a=>s.showLogID=a),id:"jobLogsShowLogIDCheck"},null,512),[[Kn,s.showLogID]]),g("label",vZ,[N(o,{t:"Log ID"})])])])]),g("table",bZ,[g("thead",null,[g("tr",null,[g("th",wZ,[N(o,{t:"Date"})]),s.showLogID?(R(),V("th",xZ,[N(o,{t:"Log ID"})])):ce("",!0),s.showJobID?(R(),V("th",EZ,[N(o,{t:"Job ID"})])):ce("",!0),g("th",CZ,[N(o,{t:"Status"})]),g("th",SZ,[N(o,{t:"Message"})])])]),g("tbody",null,[(R(!0),V(Oe,null,Ze(this.showLogs,a=>(R(),V("tr",TZ,[g("th",AZ,we(a.LogDate),1),s.showLogID?(R(),V("td",kZ,[g("samp",MZ,we(a.LogID),1)])):ce("",!0),s.showJobID?(R(),V("td",PZ,[g("samp",IZ,we(a.JobID),1)])):ce("",!0),g("td",null,[g("span",{class:Pe(["badge",[a.Status==="1"?"text-success-emphasis bg-success-subtle":"text-danger-emphasis bg-danger-subtle"]])},we(a.Status==="1"?"Success":"Failed"),3)]),g("td",null,we(a.Message),1)]))),256))])]),g("div",DZ,[this.getLogs.length>this.showLogAmount?(R(),V("button",{key:0,onClick:e[6]||(e[6]=a=>this.showLogAmount+=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},e[9]||(e[9]=[g("i",{class:"bi bi-chevron-down me-2"},null,-1),Ue(" Show More ")]))):ce("",!0),this.showLogAmount>20?(R(),V("button",{key:1,onClick:e[7]||(e[7]=a=>this.showLogAmount=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},e[10]||(e[10]=[g("i",{class:"bi bi-chevron-up me-2"},null,-1),Ue(" Collapse ")]))):ce("",!0)])]))])])])])])}const OZ=je(qq,[["render",LZ]]),$Z={name:"peerShareLinkModal",props:{peer:Object},components:{LocaleText:He,VueDatePicker:Yu},data(){return{dataCopy:void 0,loading:!1}},setup(){return{store:tt()}},mounted(){this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0)},watch:{"peer.ShareLink":{deep:!0,handler(t,e){e.length!==t.length&&(this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0))}}},methods:{startSharing(){this.loading=!0,xt("/api/sharePeer/create",{Configuration:this.peer.configuration.Name,Peer:this.peer.id,ExpireDate:bi().add(7,"d").format("YYYY-MM-DD HH:mm:ss")},t=>{t.status?(this.peer.ShareLink=t.data,this.dataCopy=t.data.at(0)):this.store.newMessage("Server","Share link failed to create. Reason: "+t.message,"danger"),this.loading=!1})},updateLinkExpireDate(){xt("/api/sharePeer/update",this.dataCopy,t=>{t.status?(this.dataCopy=t.data.at(0),this.peer.ShareLink=t.data,this.store.newMessage("Server","Link expire date updated","success")):this.store.newMessage("Server","Link expire date failed to update. Reason: "+t.message,"danger"),this.loading=!1})},stopSharing(){this.loading=!0,this.dataCopy.ExpireDate=bi().format("YYYY-MM-DD HH:mm:ss"),this.updateLinkExpireDate()},parseTime(t){t?this.dataCopy.ExpireDate=bi(t).format("YYYY-MM-DD HH:mm:ss"):this.dataCopy.ExpireDate=void 0,this.updateLinkExpireDate()}},computed:{getUrl(){const t=this.store.getActiveCrossServer();return t?`${t.host}/${this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}`:window.location.origin+window.location.pathname+this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}}},NZ={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},FZ={class:"container d-flex h-100 w-100"},BZ={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"500px"}},VZ={class:"card rounded-3 shadow flex-grow-1"},zZ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},WZ={class:"mb-0"},YZ={key:0,class:"card-body px-4 pb-4"},HZ={key:0},jZ={class:"mb-3 text-muted"},KZ=["disabled"],UZ={key:1},GZ={class:"d-flex gap-2 mb-4"},XZ=["href"],qZ={class:"d-flex flex-column gap-2 mb-3"},ZZ=["disabled"];function JZ(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("VueDatePicker");return R(),V("div",NZ,[g("div",FZ,[g("div",BZ,[g("div",VZ,[g("div",zZ,[g("h4",WZ,[N(o,{t:"Share Peer"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),this.peer.ShareLink?(R(),V("div",YZ,[this.dataCopy?(R(),V("div",UZ,[g("div",GZ,[e[4]||(e[4]=g("i",{class:"bi bi-link-45deg"},null,-1)),g("a",{href:this.getUrl,class:"text-decoration-none",target:"_blank"},we(r.getUrl),9,XZ)]),g("div",qZ,[g("small",null,[e[5]||(e[5]=g("i",{class:"bi bi-calendar me-2"},null,-1)),N(o,{t:"Expire At"})]),N(a,{is24:!0,"min-date":new Date,"model-value":this.dataCopy.ExpireDate,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","dark"])]),g("button",{onClick:e[2]||(e[2]=l=>this.stopSharing()),disabled:this.loading,class:"w-100 btn bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle rounded-3 shadow-sm"},[g("span",{class:Pe({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},e[6]||(e[6]=[g("i",{class:"bi bi-send-slash-fill me-2"},null,-1)]),2),this.loading?(R(),Se(o,{key:0,t:"Stop Sharing..."})):(R(),Se(o,{key:1,t:"Stop Sharing"}))],8,ZZ)])):(R(),V("div",HZ,[g("h6",jZ,[N(o,{t:"Currently the peer is not sharing"})]),g("button",{onClick:e[1]||(e[1]=l=>this.startSharing()),disabled:this.loading,class:"w-100 btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm"},[g("span",{class:Pe({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},e[3]||(e[3]=[g("i",{class:"bi bi-send-fill me-2"},null,-1)]),2),this.loading?(R(),Se(o,{key:0,t:"Sharing..."})):(R(),Se(o,{key:1,t:"Start Sharing"}))],8,KZ)]))])):ce("",!0)])])])])}const QZ=je($Z,[["render",JZ]]),eJ={class:"container d-flex h-100 w-100"},tJ={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"700px"}},nJ={class:"card rounded-3 shadow flex-grow-1"},iJ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},sJ={class:"mb-0"},rJ={class:"card-body px-4 pb-4"},oJ={class:"d-flex gap-2 flex-column"},aJ={class:"d-flex align-items-center"},lJ={class:"text-muted"},cJ={class:"ms-auto"},uJ={class:"d-flex align-items-center"},dJ={class:"text-muted"},hJ={class:"ms-auto"},fJ={for:"configuration_private_key",class:"form-label d-flex"},gJ={class:"text-muted d-block"},pJ={class:"form-check form-switch ms-auto"},mJ=["disabled"],_J={for:"configuration_ipaddress_cidr",class:"form-label"},yJ={class:"text-muted"},vJ=["disabled"],bJ={for:"configuration_listen_port",class:"form-label"},wJ={class:"text-muted"},xJ=["disabled"],EJ={for:"configuration_preup",class:"form-label"},CJ={class:"text-muted"},SJ=["disabled"],TJ={for:"configuration_predown",class:"form-label"},AJ={class:"text-muted"},kJ=["disabled"],MJ={for:"configuration_postup",class:"form-label"},PJ={class:"text-muted"},IJ=["disabled"],DJ={for:"configuration_postdown",class:"form-label"},RJ={class:"text-muted"},LJ=["disabled"],OJ={class:"d-flex align-items-center gap-2 mt-4"},$J=["disabled"],NJ=["disabled"],FJ={__name:"editConfiguration",props:{configurationInfo:Object},emits:["changed"],setup(t,{emit:e}){const n=t,i=qn(),s=tt(),r=xe(!1),o=Ki(JSON.parse(JSON.stringify(n.configurationInfo))),a=xe(!1),l=xe(!1);xe(!1);const c=Ki({PrivateKey:!0,IPAddress:!0,ListenPort:!0}),u=_D("editConfigurationContainer"),d=()=>{i.checkWGKeyLength(o.PrivateKey)?(c.PrivateKey=!0,o.PublicKey=window.wireguard.generatePublicKey(o.PrivateKey)):c.PrivateKey=!1},h=()=>{l.value=!1,Object.assign(o,JSON.parse(JSON.stringify(n.configurationInfo)))},f=e,p=()=>{r.value=!0,xt("/api/updateWireguardConfiguration",o,m=>{r.value=!1,m.status?(s.newMessage("Server","Configuration saved","success"),l.value=!1,f("dataChanged",m.data)):s.newMessage("Server",m.message,"danger")})};return un(o,()=>{l.value=JSON.stringify(o)!==JSON.stringify(n.configurationInfo)},{deep:!0}),(m,y)=>(R(),V("div",{class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll",ref_key:"editConfigurationContainer",ref:u},[g("div",eJ,[g("div",tJ,[g("div",nJ,[g("div",iJ,[g("h4",sJ,[N(He,{t:"Configuration Settings"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:y[0]||(y[0]=v=>m.$emit("close"))})]),g("div",rJ,[g("div",oJ,[g("div",aJ,[g("small",lJ,[N(He,{t:"Name"})]),g("small",cJ,[g("samp",null,we(o.Name),1)])]),g("div",uJ,[g("small",dJ,[N(He,{t:"Public Key"})]),g("small",hJ,[g("samp",null,we(o.PublicKey),1)])]),y[15]||(y[15]=g("hr",null,null,-1)),g("div",null,[g("label",fJ,[g("small",gJ,[N(He,{t:"Private Key"})]),g("div",pJ,[$e(g("input",{class:"form-check-input",type:"checkbox",role:"switch",id:"editPrivateKeySwitch","onUpdate:modelValue":y[1]||(y[1]=v=>a.value=v)},null,512),[[Kn,a.value]]),y[12]||(y[12]=g("label",{class:"form-check-label",for:"editPrivateKeySwitch"},[g("small",null,"Edit")],-1))])]),$e(g("input",{type:"text",class:Pe(["form-control form-control-sm rounded-3",{"is-invalid":!c.PrivateKey}]),disabled:r.value||!a.value,onKeyup:y[2]||(y[2]=v=>d()),"onUpdate:modelValue":y[3]||(y[3]=v=>o.PrivateKey=v),id:"configuration_private_key"},null,42,mJ),[[We,o.PrivateKey]])]),g("div",null,[g("label",_J,[g("small",yJ,[N(He,{t:"IP Address/CIDR"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[4]||(y[4]=v=>o.Address=v),id:"configuration_ipaddress_cidr"},null,8,vJ),[[We,o.Address]])]),g("div",null,[g("label",bJ,[g("small",wJ,[N(He,{t:"Listen Port"})])]),$e(g("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[5]||(y[5]=v=>o.ListenPort=v),id:"configuration_listen_port"},null,8,xJ),[[We,o.ListenPort]])]),g("div",null,[g("label",EJ,[g("small",CJ,[N(He,{t:"PreUp"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[6]||(y[6]=v=>o.PreUp=v),id:"configuration_preup"},null,8,SJ),[[We,o.PreUp]])]),g("div",null,[g("label",TJ,[g("small",AJ,[N(He,{t:"PreDown"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[7]||(y[7]=v=>o.PreDown=v),id:"configuration_predown"},null,8,kJ),[[We,o.PreDown]])]),g("div",null,[g("label",MJ,[g("small",PJ,[N(He,{t:"PostUp"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[8]||(y[8]=v=>o.PostUp=v),id:"configuration_postup"},null,8,IJ),[[We,o.PostUp]])]),g("div",null,[g("label",DJ,[g("small",RJ,[N(He,{t:"PostDown"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[9]||(y[9]=v=>o.PostDown=v),id:"configuration_postdown"},null,8,LJ),[[We,o.PostDown]])]),g("div",OJ,[g("button",{class:"btn bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3 shadow ms-auto px-3 py-2",onClick:y[10]||(y[10]=v=>h()),disabled:!l.value||r.value},y[13]||(y[13]=[g("i",{class:"bi bi-arrow-clockwise"},null,-1)]),8,$J),g("button",{class:"btn bg-primary-subtle border-primary-subtle text-primary-emphasis rounded-3 px-3 py-2 shadow",disabled:!l.value||r.value,onClick:y[11]||(y[11]=v=>p())},y[14]||(y[14]=[g("i",{class:"bi bi-save-fill"},null,-1)]),8,NJ)])])])])])])],512))}};kf.register(Vj,Mf,nK,qj,US,vH,GS,XS,xH,wH,EH,CH,KK,GK,ZK,dU,dm,pU,oK,TK,DK,LK,WK);const BJ={name:"peerList",components:{EditConfiguration:FJ,LocaleText:He,PeerShareLinkModal:QZ,PeerJobsLogsModal:OZ,PeerJobsAllModal:Xq,PeerJobs:Mq,PeerCreate:HT,PeerQRCode:sX,PeerSettings:o7,PeerSearch:IW,Peer:cY,Line:CU,Bar:EU},setup(){const t=tt(),e=qn(),n=xe(void 0);return{dashboardConfigurationStore:t,wireguardConfigurationStore:e,interval:n}},data(){return{configurationToggling:!1,loading:!1,error:null,configurationInfo:[],configurationPeers:[],historyDataSentDifference:[],historyDataReceivedDifference:[],historySentData:{labels:[],datasets:[{label:"Data Sent",data:[],fill:!1,borderColor:"#198754",tension:0}]},historyReceiveData:{labels:[],datasets:[{label:"Data Received",data:[],fill:!1,borderColor:"#0d6efd",tension:0}]},peerSetting:{modalOpen:!1,selectedPeer:void 0},peerScheduleJobs:{modalOpen:!1,selectedPeer:void 0},peerQRCode:{modalOpen:!1,peerConfigData:void 0},peerCreate:{modalOpen:!1},peerScheduleJobsAll:{modalOpen:!1},peerScheduleJobsLogs:{modalOpen:!1},peerShare:{modalOpen:!1,selectedPeer:void 0},editConfiguration:{modalOpen:!1}}},mounted(){},watch:{$route:{immediate:!0,handler(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.loading=!0;let t=this.$route.params.id;this.configurationInfo=[],this.configurationPeers=[],t&&(this.getPeers(t),this.setPeerInterval())}},"dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval"(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.setPeerInterval()}},beforeRouteLeave(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval)},methods:{toggle(){this.configurationToggling=!0,Yt("/api/toggleWireguardConfiguration/",{configurationName:this.configurationInfo.Name},t=>{t.status?this.dashboardConfigurationStore.newMessage("Server",`${this.configurationInfo.Name} ${t.data?"is on":"is off"}`,"success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.configurationInfo.Status=t.data,this.configurationToggling=!1})},getPeers(t=this.$route.params.id){Yt("/api/getWireguardConfigurationInfo",{configurationName:t},e=>{if(this.configurationInfo=e.data.configurationInfo,this.configurationPeers=e.data.configurationPeers,this.configurationPeers.forEach(n=>{n.restricted=!1}),e.data.configurationRestrictedPeers.forEach(n=>{n.restricted=!0,this.configurationPeers.push(n)}),this.loading=!1,this.configurationPeers.length>0){const n=this.configurationPeers.map(s=>s.total_sent+s.cumu_sent).reduce((s,r)=>s+r).toFixed(4),i=this.configurationPeers.map(s=>s.total_receive+s.cumu_receive).reduce((s,r)=>s+r).toFixed(4);this.historyDataSentDifference[this.historyDataSentDifference.length-1]!==n&&(this.historyDataSentDifference.length>0&&(this.historySentData={labels:[...this.historySentData.labels,bi().format("HH:mm:ss A")],datasets:[{label:"Data Sent",data:[...this.historySentData.datasets[0].data,((n-this.historyDataSentDifference[this.historyDataSentDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#198754",tension:0}]}),this.historyDataSentDifference.push(n)),this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1]!==i&&(this.historyDataReceivedDifference.length>0&&(this.historyReceiveData={labels:[...this.historyReceiveData.labels,bi().format("HH:mm:ss A")],datasets:[{label:"Data Received",data:[...this.historyReceiveData.datasets[0].data,((i-this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#0d6efd",tension:0}]}),this.historyDataReceivedDifference.push(i))}})},setPeerInterval(){this.dashboardConfigurationStore.Peers.RefreshInterval=setInterval(()=>{this.getPeers()},parseInt(this.dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval))}},computed:{configurationSummary(){return{connectedPeers:this.configurationPeers.filter(e=>e.status==="running").length,totalUsage:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_data+e.cumu_data).reduce((e,n)=>e+n,0).toFixed(4):0,totalReceive:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_receive+e.cumu_receive).reduce((e,n)=>e+n,0).toFixed(4):0,totalSent:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_sent+e.cumu_sent).reduce((e,n)=>e+n,0).toFixed(4):0}},receiveData(){return this.historyReceiveData},sentData(){return this.historySentData},individualDataUsage(){return{labels:this.configurationPeers.map(t=>t.name?t.name:`Untitled Peer - ${t.id}`),datasets:[{label:"Total Data Usage",data:this.configurationPeers.map(t=>t.cumu_data+t.total_data),backgroundColor:this.configurationPeers.map(t=>"#0dcaf0"),tooltip:{callbacks:{label:t=>`${t.formattedValue} GB`}}}]}},individualDataUsageChartOption(){return{responsive:!0,plugins:{legend:{display:!1}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(t,e)=>`${t} GB`},grid:{display:!1}}}}},chartOptions(){return{responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:t=>`${t.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(t,e)=>`${t} MB/s`},grid:{display:!1}}}}},searchPeers(){new Xl(this.configurationPeers,{keys:["name","id","allowed_ip"]});const t=this.wireguardConfigurationStore.searchString?this.configurationPeers.filter(e=>e.name.includes(this.wireguardConfigurationStore.searchString)||e.id.includes(this.wireguardConfigurationStore.searchString)||e.allowed_ip.includes(this.wireguardConfigurationStore.searchString)):this.configurationPeers;return this.dashboardConfigurationStore.Configuration.Server.dashboard_sort==="restricted"?t.slice().sort((e,n)=>e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:0):t.slice().sort((e,n)=>e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:0)}}},VJ={key:0,class:"container-md"},zJ={class:"d-flex align-items-center"},WJ={CLASS:"text-muted"},YJ={class:"d-flex align-items-center gap-3"},HJ={class:"mb-0"},jJ={class:"card rounded-3 bg-transparent shadow-sm ms-auto"},KJ={class:"card-body py-2 d-flex align-items-center"},UJ={class:"mb-0 text-muted"},GJ={class:"form-check form-switch ms-auto"},XJ=["for"],qJ={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},ZJ=["disabled","id"],JJ={class:"row mt-3 gy-2 gx-2 mb-2"},QJ={class:"col-6 col-lg-3"},eQ={class:"card rounded-3 bg-transparent shadow-sm"},tQ={class:"card-body py-2"},nQ={class:"mb-0 text-muted"},iQ={class:"col-6 col-lg-3"},sQ={class:"card rounded-3 bg-transparent shadow-sm"},rQ={class:"card-body py-2"},oQ={class:"mb-0 text-muted"},aQ={style:{"word-break":"break-all"},class:"col-12 col-lg-6"},lQ={class:"card rounded-3 bg-transparent shadow-sm"},cQ={class:"card-body py-2"},uQ={class:"mb-0 text-muted"},dQ={class:"row gx-2 gy-2 mb-2"},hQ={class:"col-6 col-lg-3"},fQ={class:"card rounded-3 bg-transparent shadow-sm"},gQ={class:"card-body d-flex"},pQ={class:"mb-0 text-muted"},mQ={class:"h4"},_Q={class:"col-6 col-lg-3"},yQ={class:"card rounded-3 bg-transparent shadow-sm"},vQ={class:"card-body d-flex"},bQ={class:"mb-0 text-muted"},wQ={class:"h4"},xQ={class:"col-6 col-lg-3"},EQ={class:"card rounded-3 bg-transparent shadow-sm"},CQ={class:"card-body d-flex"},SQ={class:"mb-0 text-muted"},TQ={class:"h4 text-primary"},AQ={class:"col-6 col-lg-3"},kQ={class:"card rounded-3 bg-transparent shadow-sm"},MQ={class:"card-body d-flex"},PQ={class:"mb-0 text-muted"},IQ={class:"h4 text-success"},DQ={class:"row gx-2 gy-2 mb-3"},RQ={class:"col-12 col-lg-6"},LQ={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},OQ={class:"card-header bg-transparent border-0"},$Q={class:"text-muted"},NQ={class:"card-body pt-1"},FQ={class:"col-sm col-lg-3"},BQ={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},VQ={class:"card-header bg-transparent border-0"},zQ={class:"text-muted"},WQ={class:"card-body pt-1"},YQ={class:"col-sm col-lg-3"},HQ={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},jQ={class:"card-header bg-transparent border-0"},KQ={class:"text-muted"},UQ={class:"card-body pt-1"},GQ={class:"mb-3"};function XQ(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("Bar"),l=Ee("Line"),c=Ee("PeerSearch"),u=Ee("Peer"),d=Ee("PeerSettings"),h=Ee("PeerQRCode"),f=Ee("PeerJobs"),p=Ee("PeerJobsAllModal"),m=Ee("PeerJobsLogsModal"),y=Ee("PeerShareLinkModal"),v=Ee("EditConfiguration");return this.loading?ce("",!0):(R(),V("div",VJ,[g("div",zJ,[g("div",null,[g("small",WJ,[N(o,{t:"CONFIGURATION"})]),g("div",YJ,[g("h1",HJ,[g("samp",null,we(this.configurationInfo.Name),1)])])]),g("div",jJ,[g("div",KJ,[g("div",null,[g("p",UJ,[g("small",null,[N(o,{t:"Status"})])]),g("div",GJ,[g("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+this.configurationInfo.id},[!this.configurationInfo.Status&&this.configurationToggling?(R(),Se(o,{key:0,t:"Turning Off..."})):this.configurationInfo.Status&&this.configurationToggling?(R(),Se(o,{key:1,t:"Turning On..."})):this.configurationInfo.Status&&!this.configurationToggling?(R(),Se(o,{key:2,t:"On"})):!this.configurationInfo.Status&&!this.configurationToggling?(R(),Se(o,{key:3,t:"Off"})):ce("",!0),this.configurationToggling?(R(),V("span",qJ)):ce("",!0)],8,XJ),$e(g("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+this.configurationInfo.id,onChange:e[0]||(e[0]=b=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=b=>this.configurationInfo.Status=b)},null,40,ZJ),[[Kn,this.configurationInfo.Status]])])]),g("div",{class:Pe(["dot ms-5",{active:this.configurationInfo.Status}])},null,2)])])]),g("div",JJ,[g("div",QJ,[g("div",eQ,[g("div",tQ,[g("p",nQ,[g("small",null,[N(o,{t:"Address"})])]),Ue(" "+we(this.configurationInfo.Address),1)])])]),g("div",iQ,[g("div",sQ,[g("div",rQ,[g("p",oQ,[g("small",null,[N(o,{t:"Listen Port"})])]),Ue(" "+we(this.configurationInfo.ListenPort),1)])])]),g("div",aQ,[g("div",lQ,[g("div",cQ,[g("p",uQ,[g("small",null,[N(o,{t:"Public Key"})])]),g("samp",null,we(this.configurationInfo.PublicKey),1)])])])]),g("div",dQ,[g("div",hQ,[g("div",fQ,[g("div",gQ,[g("div",null,[g("p",pQ,[g("small",null,[N(o,{t:"Connected Peers"})])]),g("strong",mQ,we(r.configurationSummary.connectedPeers)+" / "+we(s.configurationPeers.length),1)]),e[18]||(e[18]=g("i",{class:"bi bi-ethernet ms-auto h2 text-muted"},null,-1))])])]),g("div",_Q,[g("div",yQ,[g("div",vQ,[g("div",null,[g("p",bQ,[g("small",null,[N(o,{t:"Total Usage"})])]),g("strong",wQ,we(r.configurationSummary.totalUsage)+" GB",1)]),e[19]||(e[19]=g("i",{class:"bi bi-arrow-down-up ms-auto h2 text-muted"},null,-1))])])]),g("div",xQ,[g("div",EQ,[g("div",CQ,[g("div",null,[g("p",SQ,[g("small",null,[N(o,{t:"Total Received"})])]),g("strong",TQ,we(r.configurationSummary.totalReceive)+" GB",1)]),e[20]||(e[20]=g("i",{class:"bi bi-arrow-down ms-auto h2 text-muted"},null,-1))])])]),g("div",AQ,[g("div",kQ,[g("div",MQ,[g("div",null,[g("p",PQ,[g("small",null,[N(o,{t:"Total Sent"})])]),g("strong",IQ,we(r.configurationSummary.totalSent)+" GB",1)]),e[21]||(e[21]=g("i",{class:"bi bi-arrow-up ms-auto h2 text-muted"},null,-1))])])])]),g("div",DQ,[g("div",RQ,[g("div",LQ,[g("div",OQ,[g("small",$Q,[N(o,{t:"Peers Data Usage"})])]),g("div",NQ,[N(a,{data:r.individualDataUsage,options:r.individualDataUsageChartOption,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["data","options"])])])]),g("div",FQ,[g("div",BQ,[g("div",VQ,[g("small",zQ,[N(o,{t:"Real Time Received Data Usage"})])]),g("div",WQ,[N(l,{options:r.chartOptions,data:r.receiveData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])]),g("div",YQ,[g("div",HQ,[g("div",jQ,[g("small",KQ,[N(o,{t:"Real Time Sent Data Usage"})])]),g("div",UQ,[N(l,{options:r.chartOptions,data:r.sentData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])])]),g("div",GQ,[N(c,{onJobsAll:e[2]||(e[2]=b=>this.peerScheduleJobsAll.modalOpen=!0),onJobLogs:e[3]||(e[3]=b=>this.peerScheduleJobsLogs.modalOpen=!0),onEditConfiguration:e[4]||(e[4]=b=>this.editConfiguration.modalOpen=!0),configuration:this.configurationInfo},null,8,["configuration"]),N(Ul,{name:"list",tag:"div",class:"row gx-2 gy-2 z-0"},{default:De(()=>[(R(!0),V(Oe,null,Ze(this.searchPeers,b=>(R(),V("div",{class:"col-12 col-lg-6 col-xl-4",key:b.id},[N(u,{Peer:b,onShare:x=>{this.peerShare.selectedPeer=b.id,this.peerShare.modalOpen=!0},onRefresh:e[5]||(e[5]=x=>this.getPeers()),onJobs:x=>{s.peerScheduleJobs.modalOpen=!0,s.peerScheduleJobs.selectedPeer=this.configurationPeers.find(E=>E.id===b.id)},onSetting:x=>{s.peerSetting.modalOpen=!0,s.peerSetting.selectedPeer=this.configurationPeers.find(E=>E.id===b.id)},onQrcode:e[6]||(e[6]=x=>{this.peerQRCode.peerConfigData=x,this.peerQRCode.modalOpen=!0})},null,8,["Peer","onShare","onJobs","onSetting"])]))),128))]),_:1})]),N($t,{name:"zoom"},{default:De(()=>[this.peerSetting.modalOpen?(R(),Se(d,{key:"settings",selectedPeer:this.peerSetting.selectedPeer,onRefresh:e[7]||(e[7]=b=>this.getPeers()),onClose:e[8]||(e[8]=b=>this.peerSetting.modalOpen=!1)},null,8,["selectedPeer"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[s.peerQRCode.modalOpen?(R(),Se(h,{peerConfigData:this.peerQRCode.peerConfigData,key:"qrcode",onClose:e[9]||(e[9]=b=>this.peerQRCode.modalOpen=!1)},null,8,["peerConfigData"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerScheduleJobs.modalOpen?(R(),Se(f,{key:0,onRefresh:e[10]||(e[10]=b=>this.getPeers()),selectedPeer:this.peerScheduleJobs.selectedPeer,onClose:e[11]||(e[11]=b=>this.peerScheduleJobs.modalOpen=!1)},null,8,["selectedPeer"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerScheduleJobsAll.modalOpen?(R(),Se(p,{key:0,onRefresh:e[12]||(e[12]=b=>this.getPeers()),onClose:e[13]||(e[13]=b=>this.peerScheduleJobsAll.modalOpen=!1),configurationPeers:this.configurationPeers},null,8,["configurationPeers"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerScheduleJobsLogs.modalOpen?(R(),Se(m,{key:0,onClose:e[14]||(e[14]=b=>this.peerScheduleJobsLogs.modalOpen=!1),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerShare.modalOpen?(R(),Se(y,{key:0,onClose:e[15]||(e[15]=b=>{this.peerShare.modalOpen=!1,this.peerShare.selectedPeer=void 0}),peer:this.configurationPeers.find(b=>b.id===this.peerShare.selectedPeer)},null,8,["peer"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.editConfiguration.modalOpen?(R(),Se(v,{key:0,onClose:e[16]||(e[16]=b=>this.editConfiguration.modalOpen=!1),onDataChanged:e[17]||(e[17]=b=>this.configurationInfo=b),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):ce("",!0)]),_:1})]))}const qQ=je(BJ,[["render",XQ],["__scopeId","data-v-a57c6624"]]);class Er{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Nl={PROPERTYCHANGE:"propertychange"};class Of{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function ZQ(t,e,n){let i,s;n=n||hr;let r=0,o=t.length,a=!1;for(;r>1),s=+n(t[i],e),s<0?r=i+1:(o=i,a=!s);return a?r:~r}function hr(t,e){return t>e?1:t0?s-1:s}return i-1}if(n>0){for(let s=1;s0||o===0)})}function vu(){return!0}function Nf(){return!1}function Fl(){}function UT(t){let e,n,i;return function(){const s=Array.prototype.slice.call(arguments);return(!n||this!==i||!Eo(s,n))&&(i=this,n=s,e=t.apply(this,arguments)),e}}function eee(t){function e(){let n;try{n=t()}catch(i){return Promise.reject(i)}return n instanceof Promise?n:Promise.resolve(n)}return e()}function Gu(t){for(const e in t)delete t[e]}function Bl(t){let e;for(e in t)return!1;return!e}class Ff extends Of{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,n){if(!e||!n)return;const i=this.listeners_||(this.listeners_={}),s=i[e]||(i[e]=[]);s.includes(n)||s.push(n)}dispatchEvent(e){const n=typeof e=="string",i=n?e:e.type,s=this.listeners_&&this.listeners_[i];if(!s)return;const r=n?new Er(e):e;r.target||(r.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});i in o||(o[i]=0,a[i]=0),++o[i];let l;for(let c=0,u=s.length;c0:!1}removeEventListener(e,n){if(!this.listeners_)return;const i=this.listeners_[e];if(!i)return;const s=i.indexOf(n);s!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(i[s]=Fl,++this.pendingRemovals_[e]):(i.splice(s,1),i.length===0&&delete this.listeners_[e]))}}const et={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function ht(t,e,n,i,s){if(s){const o=n;n=function(){t.removeEventListener(e,n),o.apply(i??this,arguments)}}else i&&i!==t&&(n=n.bind(i));const r={target:t,type:e,listener:n};return t.addEventListener(e,n),r}function Oh(t,e,n,i){return ht(t,e,n,i,!0)}function Rt(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),Gu(t))}class Xu extends Ff{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(et.CHANGE)}getRevision(){return this.revision_}onInternal(e,n){if(Array.isArray(e)){const i=e.length,s=new Array(i);for(let r=0;r0;)this.pop()}extend(e){for(let n=0,i=e.length;nthis.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(n),this.array_.splice(e,0,n),this.updateLength_(),this.dispatchEvent(new Wd(fi.ADD,n,e))}pop(){return this.removeAt(this.getLength()-1)}push(e){this.unique_&&this.assertUnique_(e);const n=this.getLength();return this.insertAt(n,e),this.getLength()}remove(e){const n=this.array_;for(let i=0,s=n.length;i=this.getLength())return;const n=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new Wd(fi.REMOVE,n,e)),n}setAt(e,n){const i=this.getLength();if(e>=i){this.insertAt(e,n);return}if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(n,e);const s=this.array_[e];this.array_[e]=n,this.dispatchEvent(new Wd(fi.REMOVE,s,e)),this.dispatchEvent(new Wd(fi.ADD,n,e))}updateLength_(){this.set(q1.LENGTH,this.array_.length)}assertUnique_(e,n){for(let i=0,s=this.array_.length;i1?(n=s,i=r):l>0&&(n+=o*l,i+=a*l)}return ul(t,e,n,i)}function ul(t,e,n,i){const s=n-t,r=i-e;return s*s+r*r}function see(t){const e=t.length;for(let i=0;ir&&(r=l,s=a)}if(r===0)return null;const o=t[s];t[s]=t[i],t[i]=o;for(let a=i+1;a=0;i--){n[i]=t[i][e]/t[i][i];for(let s=i-1;s>=0;s--)t[s][e]-=t[s][i]*n[i]}return n}function uh(t){return t*Math.PI/180}function dl(t,e){const n=t%e;return n*e<0?n+e:n}function Ai(t,e,n){return t+n*(e-t)}function cy(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}function Yd(t,e){return Math.floor(cy(t,e))}function Hd(t,e){return Math.ceil(cy(t,e))}class GT extends zs{constructor(e){super(),this.on,this.once,this.un,this.background_=e.background;const n=Object.assign({},e);typeof e.properties=="object"&&(delete n.properties,Object.assign(n,e.properties)),n[Et.OPACITY]=e.opacity!==void 0?e.opacity:1,pt(typeof n[Et.OPACITY]=="number","Layer opacity must be a number"),n[Et.VISIBLE]=e.visible!==void 0?e.visible:!0,n[Et.Z_INDEX]=e.zIndex,n[Et.MAX_RESOLUTION]=e.maxResolution!==void 0?e.maxResolution:1/0,n[Et.MIN_RESOLUTION]=e.minResolution!==void 0?e.minResolution:0,n[Et.MIN_ZOOM]=e.minZoom!==void 0?e.minZoom:-1/0,n[Et.MAX_ZOOM]=e.maxZoom!==void 0?e.maxZoom:1/0,this.className_=n.className!==void 0?n.className:"ol-layer",delete n.className,this.setProperties(n),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(e){const n=this.state_||{layer:this,managed:e===void 0?!0:e},i=this.getZIndex();return n.opacity=nn(Math.round(this.getOpacity()*100)/100,0,1),n.visible=this.getVisible(),n.extent=this.getExtent(),n.zIndex=i===void 0&&!n.managed?1/0:i,n.maxResolution=this.getMaxResolution(),n.minResolution=Math.max(this.getMinResolution(),0),n.minZoom=this.getMinZoom(),n.maxZoom=this.getMaxZoom(),this.state_=n,n}getLayersArray(e){return gt()}getLayerStatesArray(e){return gt()}getExtent(){return this.get(Et.EXTENT)}getMaxResolution(){return this.get(Et.MAX_RESOLUTION)}getMinResolution(){return this.get(Et.MIN_RESOLUTION)}getMinZoom(){return this.get(Et.MIN_ZOOM)}getMaxZoom(){return this.get(Et.MAX_ZOOM)}getOpacity(){return this.get(Et.OPACITY)}getSourceState(){return gt()}getVisible(){return this.get(Et.VISIBLE)}getZIndex(){return this.get(Et.Z_INDEX)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(Et.EXTENT,e)}setMaxResolution(e){this.set(Et.MAX_RESOLUTION,e)}setMinResolution(e){this.set(Et.MIN_RESOLUTION,e)}setMaxZoom(e){this.set(Et.MAX_ZOOM,e)}setMinZoom(e){this.set(Et.MIN_ZOOM,e)}setOpacity(e){pt(typeof e=="number","Layer opacity must be a number"),this.set(Et.OPACITY,e)}setVisible(e){this.set(Et.VISIBLE,e)}setZIndex(e){this.set(Et.Z_INDEX,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const zi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},Wn={ANIMATING:0,INTERACTING:1},Qi={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},ree=42,uy=256,dy={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class XT{constructor(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||dy[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(e){this.defaultTileGrid_=e}setExtent(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)}setWorldExtent(e){this.worldExtent_=e}setGetPointResolution(e){this.getPointResolutionFunc_=e}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const qu=6378137,tl=Math.PI*qu,oee=[-tl,-tl,tl,tl],aee=[-180,-85,180,85],jd=qu*Math.log(Math.tan(Math.PI/2));class Fa extends XT{constructor(e){super({code:e,units:"m",extent:oee,global:!0,worldExtent:aee,getPointResolution:function(n,i){return n/Math.cosh(i[1]/qu)}})}}const Z1=[new Fa("EPSG:3857"),new Fa("EPSG:102100"),new Fa("EPSG:102113"),new Fa("EPSG:900913"),new Fa("http://www.opengis.net/def/crs/EPSG/0/3857"),new Fa("http://www.opengis.net/gml/srs/epsg.xml#3857")];function lee(t,e,n,i){const s=t.length;n=n>1?n:2,i=i??n,e===void 0&&(n>2?e=t.slice():e=new Array(s));for(let r=0;rjd?o=jd:o<-jd&&(o=-jd),e[r+1]=o}return e}function cee(t,e,n,i){const s=t.length;n=n>1?n:2,i=i??n,e===void 0&&(n>2?e=t.slice():e=new Array(s));for(let r=0;rs&&(l=l|kn.RIGHT),ar&&(l=l|kn.ABOVE),l===kn.UNKNOWN&&(l=kn.INTERSECTING),l}function Ui(){return[1/0,1/0,-1/0,-1/0]}function uo(t,e,n,i,s){return s?(s[0]=t,s[1]=e,s[2]=n,s[3]=i,s):[t,e,n,i]}function Bf(t){return uo(1/0,1/0,-1/0,-1/0,t)}function JT(t,e){const n=t[0],i=t[1];return uo(n,i,n,i,e)}function gy(t,e,n,i,s){const r=Bf(s);return QT(r,t,e,n,i)}function bu(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function pee(t,e){return e[0]t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function Zc(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function QT(t,e,n,i,s){for(;ne[0]?i[0]=t[0]:i[0]=e[0],t[1]>e[1]?i[1]=t[1]:i[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Yf(t){return t[2]=o&&m<=l),!i&&r&kn.RIGHT&&!(s&kn.RIGHT)&&(y=f-(h-l)*p,i=y>=a&&y<=c),!i&&r&kn.BELOW&&!(s&kn.BELOW)&&(m=h-(f-a)/p,i=m>=o&&m<=l),!i&&r&kn.LEFT&&!(s&kn.LEFT)&&(y=f-(h-o)*p,i=y>=a&&y<=c)}return i}function tA(t,e){const n=e.getExtent(),i=fa(t);if(e.canWrapX()&&(i[0]=n[2])){const s=yt(n),o=Math.floor((i[0]-n[0])/s)*s;t[0]-=o,t[2]-=o}return t}function py(t,e,n){if(e.canWrapX()){const i=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[i[0],t[1],i[2],t[3]]];tA(t,e);const s=yt(i);if(yt(t)>s&&!n)return[[i[0],t[1],i[2],t[3]]];if(t[0]i[2])return[[t[0],t[1],i[2],t[3]],[i[0],t[1],t[2]-s,t[3]]]}return[t]}function wee(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function Nh(t,e){let n=!0;for(let i=t.length-1;i>=0;--i)if(t[i]!=e[i]){n=!1;break}return n}function my(t,e){const n=Math.cos(e),i=Math.sin(e),s=t[0]*n-t[1]*i,r=t[1]*n+t[0]*i;return t[0]=s,t[1]=r,t}function xee(t,e){return t[0]*=e,t[1]*=e,t}function nA(t,e){if(e.canWrapX()){const n=yt(e.getExtent()),i=Eee(t,e,n);i&&(t[0]-=i*n)}return t}function Eee(t,e,n){const i=e.getExtent();let s=0;return e.canWrapX()&&(t[0]i[2])&&(n=n||yt(i),s=Math.floor((t[0]-i[0])/n)),s}const Cee=63710088e-1;function tw(t,e,n){n=n||Cee;const i=uh(t[1]),s=uh(e[1]),r=(s-i)/2,o=uh(e[0]-t[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(o)*Math.sin(o)*Math.cos(i)*Math.cos(s);return 2*n*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function iA(...t){console.warn(...t)}let Sm=!0;function sA(t){Sm=!1}function _y(t,e){if(e!==void 0){for(let n=0,i=t.length;n=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(Sm=!1,iA("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function aA(t,e){return t}function Zr(t,e){return t}function kee(){iw(Z1),iw(Q1),Aee(Q1,Z1,lee,cee)}kee();function sw(t,e,n){return function(i,s,r,o,a){if(!i)return;if(!s&&!e)return i;const l=e?0:r[0]*s,c=e?0:r[1]*s,u=a?a[0]:0,d=a?a[1]:0;let h=t[0]+l/2+u,f=t[2]-l/2+u,p=t[1]+c/2+d,m=t[3]-c/2+d;h>f&&(h=(f+h)/2,f=h),p>m&&(p=(m+p)/2,m=p);let y=nn(i[0],h,f),v=nn(i[1],p,m);if(o&&n&&s){const b=30*s;y+=-b*Math.log(1+Math.max(0,h-i[0])/b)+b*Math.log(1+Math.max(0,i[0]-f)/b),v+=-b*Math.log(1+Math.max(0,p-i[1])/b)+b*Math.log(1+Math.max(0,i[1]-m)/b)}return[y,v]}}function Mee(t){return t}function by(t,e,n,i){const s=yt(e)/n[0],r=jn(e)/n[1];return i?Math.min(t,Math.max(s,r)):Math.min(t,Math.min(s,r))}function wy(t,e,n){let i=Math.min(t,e);const s=50;return i*=Math.log(1+s*Math.max(0,t/e-1))/s+1,n&&(i=Math.max(i,n),i/=Math.log(1+s*Math.max(0,n/t-1))/s+1),nn(i,n/2,e*2)}function Pee(t,e,n,i){return e=e!==void 0?e:!0,function(s,r,o,a){if(s!==void 0){const l=t[0],c=t[t.length-1],u=n?by(l,n,o,i):l;if(a)return e?wy(s,u,c):nn(s,c,u);const d=Math.min(u,s),h=Math.floor(ly(t,d,r));return t[h]>u&&hMath.round(n*aw[i])/aw[i]).join(", ")+")"}function io(t,e,n,i,s,r,o){r=r||[],o=o||2;let a=0;for(let l=e;l{if(!i)return this.getSimplifiedGeometry(n);const s=this.clone();return s.applyTransform(i),s.getSimplifiedGeometry(n)})}simplifyTransformed(e,n){return this.simplifyTransformedInternal(this.getRevision(),e,n)}clone(){return gt()}closestPointXY(e,n,i,s){return gt()}containsXY(e,n){const i=this.getClosestPoint([e,n]);return i[0]===e&&i[1]===n}getClosestPoint(e,n){return n=n||[NaN,NaN],this.closestPointXY(e[0],e[1],n,1/0),n}intersectsCoordinate(e){return this.containsXY(e[0],e[1])}computeExtent(e){return gt()}getExtent(e){if(this.extentRevision_!=this.getRevision()){const n=this.computeExtent(this.extent_);(isNaN(n[0])||isNaN(n[1]))&&Bf(n),this.extentRevision_=this.getRevision()}return vee(this.extent_,e)}rotate(e,n){gt()}scale(e,n,i){gt()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return gt()}getType(){return gt()}applyTransform(e){gt()}intersectsExtent(e){return gt()}translate(e,n){gt()}transform(e,n){const i=Gi(e),s=i.getUnits()=="tile-pixels"?function(r,o,a){const l=i.getExtent(),c=i.getWorldExtent(),u=jn(c)/jn(l);return br(lw,c[0],c[3],u,-u,0,0,0),io(r,0,r.length,a,lw,o),Fh(i,n)(r,o,a)}:Fh(i,n);return this.applyTransform(s),this}}class Hf extends zee{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(e){return gy(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return gt()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const n=this.getSimplifiedGeometryInternal(e);return n.getFlatCoordinates().length1)d=n;else if(h>0){for(let f=0;fs&&(s=c),r=a,o=l}return s}function Hee(t,e,n,i,s){for(let r=0,o=n.length;r0;){const d=c.pop(),h=c.pop();let f=0;const p=t[h],m=t[h+1],y=t[d],v=t[d+1];for(let b=h+i;bf&&(u=b,f=w)}f>s&&(l[(u-e)/i]=1,h+i0&&m>f)&&(p<0&&y0&&y>p)){c=d,u=h;continue}r[o++]=c,r[o++]=u,a=c,l=u,c=d,u=h}return r[o++]=c,r[o++]=u,o}function dA(t,e,n,i,s,r,o,a){for(let l=0,c=n.length;lr&&(c-a)*(r-l)-(s-a)*(u-l)>0&&o++:u<=r&&(c-a)*(r-l)-(s-a)*(u-l)<0&&o--,a=c,l=u}return o!==0}function fA(t,e,n,i,s,r){if(n.length===0||!Xo(t,e,n[0],i,s,r))return!1;for(let o=1,a=n.length;ov&&(c=(u+d)/2,fA(t,e,n,i,c,p)&&(y=c,v=b)),u=d}return isNaN(y)&&(y=s[r]),o?(o.push(y,p,v),o):[y,p,v]}function Jee(t,e,n,i,s){let r=[];for(let o=0,a=n.length;o=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]?!0:gA(t,e,n,i,function(o,a){return bee(s,o,a)}):!1}function pA(t,e,n,i,s){return!!(Ay(t,e,n,i,s)||Xo(t,e,n,i,s[0],s[1])||Xo(t,e,n,i,s[0],s[3])||Xo(t,e,n,i,s[2],s[1])||Xo(t,e,n,i,s[2],s[3]))}function Qee(t,e,n,i,s){if(!pA(t,e,n[0],i,s))return!1;if(n.length===1)return!0;for(let r=1,o=n.length;r0}function tte(t,e,n,i,s){s=s!==void 0?s:!1;for(let r=0,o=n.length;r1&&typeof arguments[n-1]=="function"&&(i=arguments[n-1],--n);let s=0;for(;s0}getInteracting(){return this.hints_[Wn.INTERACTING]>0}cancelAnimations(){this.setHint(Wn.ANIMATING,-this.hints_[Wn.ANIMATING]);let e;for(let n=0,i=this.animations_.length;n=0;--i){const s=this.animations_[i];let r=!0;for(let o=0,a=s.length;o0?c/l.duration:1;u>=1?(l.complete=!0,u=1):r=!1;const d=l.easing(u);if(l.sourceCenter){const h=l.sourceCenter[0],f=l.sourceCenter[1],p=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const y=h+d*(p-h),v=f+d*(m-f);this.targetCenter_=[y,v]}if(l.sourceResolution&&l.targetResolution){const h=d===1?l.targetResolution:l.sourceResolution+d*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),p=this.constraints_.resolution(h,0,f,!0);this.targetCenter_=this.calculateCenterZoom(p,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=h,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const h=d===1?dl(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+d*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(h,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=h}if(this.applyTargetState_(!0),n=!0,!l.complete)break}if(r){this.animations_[i]=null,this.setHint(Wn.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=s[0].callback;o&&Kd(o,!0)}}this.animations_=this.animations_.filter(Boolean),n&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(e,n){let i;const s=this.getCenterInternal();return s!==void 0&&(i=[s[0]-n[0],s[1]-n[1]],my(i,e-this.getRotation()),wee(i,n)),i}calculateCenterZoom(e,n){let i;const s=this.getCenterInternal(),r=this.getResolution();if(s!==void 0&&r!==void 0){const o=n[0]-e*(n[0]-s[0])/r,a=n[1]-e*(n[1]-s[1])/r;i=[o,a]}return i}getViewportSize_(e){const n=this.viewportSize_;if(e){const i=n[0],s=n[1];return[Math.abs(i*Math.cos(e))+Math.abs(s*Math.sin(e)),Math.abs(i*Math.sin(e))+Math.abs(s*Math.cos(e))]}return n}setViewportSize(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const e=this.getCenterInternal();return e&&Tm(e,this.getProjection())}getCenterInternal(){return this.get(Qi.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(e){return e!==void 0?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()}calculateExtent(e){const n=this.calculateExtentInternal(e);return aA(n,this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();const n=this.getCenterInternal();pt(n,"The view center is not defined");const i=this.getResolution();pt(i!==void 0,"The view resolution is not defined");const s=this.getRotation();return pt(s!==void 0,"The view rotation is not defined"),Cm(n,i,s,e)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))}setConstrainResolution(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))}getProjection(){return this.projection_}getResolution(){return this.get(Qi.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(e,n){return this.getResolutionForExtentInternal(Zr(e,this.getProjection()),n)}getResolutionForExtentInternal(e,n){n=n||this.getViewportSizeMinusPadding_();const i=yt(e)/n[0],s=jn(e)/n[1];return Math.max(i,s)}getResolutionForValueFunction(e){e=e||2;const n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,s=Math.log(n/i)/Math.log(e);return function(r){return n/Math.pow(e,r*s)}}getRotation(){return this.get(Qi.ROTATION)}getValueForResolutionFunction(e){const n=Math.log(e||2),i=this.getConstrainedResolution(this.maxResolution_),s=this.minResolution_,r=Math.log(i/s)/n;return function(o){return Math.log(i/o)/n/r}}getViewportSizeMinusPadding_(e){let n=this.getViewportSize_(e);const i=this.padding_;return i&&(n=[n[0]-i[1]-i[3],n[1]-i[0]-i[2]]),n}getState(){const e=this.getProjection(),n=this.getResolution(),i=this.getRotation();let s=this.getCenterInternal();const r=this.padding_;if(r){const o=this.getViewportSizeMinusPadding_();s=hp(s,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],n,i)}return{center:s.slice(0),projection:e!==void 0?e:null,resolution:n,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let e;const n=this.getResolution();return n!==void 0&&(e=this.getZoomForResolution(n)),e}getZoomForResolution(e){let n=this.minZoom_||0,i,s;if(this.resolutions_){const r=ly(this.resolutions_,e,1);n=r,i=this.resolutions_[r],r==this.resolutions_.length-1?s=2:s=i/this.resolutions_[r+1]}else i=this.maxResolution_,s=this.zoomFactor_;return n+Math.log(i/e)/Math.log(s)}getResolutionForZoom(e){if(this.resolutions_?.length){if(this.resolutions_.length===1)return this.resolutions_[0];const n=nn(Math.floor(e),0,this.resolutions_.length-2),i=this.resolutions_[n]/this.resolutions_[n+1];return this.resolutions_[n]/Math.pow(i,nn(e-n,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}fit(e,n){let i;if(pt(Array.isArray(e)||typeof e.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(e)){pt(!Yf(e),"Cannot fit empty extent provided as `geometry`");const s=Zr(e,this.getProjection());i=fw(s)}else if(e.getType()==="Circle"){const s=Zr(e.getExtent(),this.getProjection());i=fw(s),i.rotate(this.getRotation(),fa(s))}else i=e;this.fitInternal(i,n)}rotatedExtentForGeometry(e){const n=this.getRotation(),i=Math.cos(n),s=Math.sin(-n),r=e.getFlatCoordinates(),o=e.getStride();let a=1/0,l=1/0,c=-1/0,u=-1/0;for(let d=0,h=r.length;d{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(e){return this.renderer_?this.renderer_.getFeatures(e):Promise.resolve([])}getData(e){return!this.renderer_||!this.rendered?null:this.renderer_.getData(e)}isVisible(e){let n;const i=this.getMapInternal();!e&&i&&(e=i.getView()),e instanceof Ts?n={viewState:e.getState(),extent:e.calculateExtent()}:n=e,!n.layerStatesArray&&i&&(n.layerStatesArray=i.getLayerGroup().getLayerStatesArray());let s;n.layerStatesArray?s=n.layerStatesArray.find(o=>o.layer===this):s=this.getLayerState();const r=this.getExtent();return My(s,n.viewState)&&(!r||_i(r,n.extent))}getAttributions(e){if(!this.isVisible(e))return[];const n=this.getSource()?.getAttributions();if(!n)return[];const i=e instanceof Ts?e.getViewStateAndExtent():e;let s=n(i);return Array.isArray(s)||(s=[s]),s}render(e,n){const i=this.getRenderer();return i.prepareFrame(e)?(this.rendered=!0,i.renderFrame(e,n)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(e,n){}renderDeferred(e){const n=this.getRenderer();n&&n.renderDeferred(e)}setMapInternal(e){e||this.unrender(),this.set(Et.MAP,e)}getMapInternal(){return this.get(Et.MAP)}setMap(e){this.mapPrecomposeKey_&&(Rt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(Rt(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=ht(e,zi.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=ht(this,et.CHANGE,e.render,e),this.changed())}handlePrecompose_(e){const n=e.frameState.layerStatesArray,i=this.getLayerState(!1);pt(!n.some(s=>s.layer===i.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),n.push(i)}setSource(e){this.set(Et.SOURCE,e)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function My(t,e){if(!t.visible)return!1;const n=e.resolution;if(n=t.maxResolution)return!1;const i=e.zoom;return i>t.minZoom&&i<=t.maxZoom}function mA(t,e,n=0,i=t.length-1,s=ate){for(;i>n;){if(i-n>600){const l=i-n+1,c=e-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),f=Math.max(n,Math.floor(e-c*d/l+h)),p=Math.min(i,Math.floor(e+(l-c)*d/l+h));mA(t,e,f,p,s)}const r=t[e];let o=n,a=i;for(_c(t,n,e),s(t[i],r)>0&&_c(t,n,i);o0;)a--}s(t[n],r)===0?_c(t,n,a):(a++,_c(t,a,i)),a<=e&&(n=a+1),e<=a&&(i=a-1)}}function _c(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function ate(t,e){return te?1:0}let _A=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let n=this.data;const i=[];if(!Gd(e,n))return i;const s=this.toBBox,r=[];for(;n;){for(let o=0;o=0&&r[n].children.length>this._maxEntries;)this._split(r,n),n--;this._adjustParentBBoxes(s,r,n)}_split(e,n){const i=e[n],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const o=this._chooseSplitIndex(i,r,s),a=qa(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,Ba(i,this.toBBox),Ba(a,this.toBBox),n?e[n-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,n){this.data=qa([e,n]),this.data.height=e.height+1,this.data.leaf=!1,Ba(this.data,this.toBBox)}_chooseSplitIndex(e,n,i){let s,r=1/0,o=1/0;for(let a=n;a<=i-n;a++){const l=Ac(e,0,a,this.toBBox),c=Ac(e,a,i,this.toBBox),u=hte(l,c),d=fp(l)+fp(c);u=n;c--){const u=e.children[c];kc(a,e.leaf?r(u):u),l+=Ud(a)}return l}_adjustParentBBoxes(e,n,i){for(let s=i;s>=0;s--)kc(n[s],e)}_condense(e){for(let n=e.length-1,i;n>=0;n--)e[n].children.length===0?n>0?(i=e[n-1].children,i.splice(i.indexOf(e[n]),1)):this.clear():Ba(e[n],this.toBBox)}};function lte(t,e,n){if(!n)return e.indexOf(t);for(let i=0;i=t.minX&&e.maxY>=t.minY}function qa(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function gw(t,e,n,i,s){const r=[e,n];for(;r.length;){if(n=r.pop(),e=r.pop(),n-e<=i)continue;const o=e+Math.ceil((n-e)/i/2)*i;mA(t,o,e,n,s),r.push(e,o,o,n)}}const ot={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function pw(t){return t[0]>0&&t[1]>0}function fte(t,e,n){return n===void 0&&(n=[0,0]),n[0]=t[0]*e+.5|0,n[1]=t[1]*e+.5|0,n}function wi(t,e){return Array.isArray(t)?t:(e===void 0?e=[t,t]:(e[0]=t,e[1]=t),e)}class Uf{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=wi(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new Uf({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return gt()}getImage(e){return gt()}getHitDetectionImage(){return gt()}getPixelRatio(e){return 1}getImageState(){return gt()}getImageSize(){return gt()}getOrigin(){return gt()}getSize(){return gt()}setDisplacement(e){this.displacement_=e}setOpacity(e){this.opacity_=e}setRotateWithView(e){this.rotateWithView_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=wi(e)}listenImageChange(e){gt()}load(){gt()}unlistenImageChange(e){gt()}ready(){return Promise.resolve()}}const Su={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var Nn={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"]};Nn.whitepoint={2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}};Nn.max=Nn.whitepoint[2].D65;Nn.rgb=function(t,e){e=e||Nn.whitepoint[2].E;var n=t[0]/e[0],i=t[1]/e[1],s=t[2]/e[2],r,o,a;return r=n*3.240969941904521+i*-1.537383177570093+s*-.498610760293,o=n*-.96924363628087+i*1.87596750150772+s*.041555057407175,a=n*.055630079696993+i*-.20397695888897+s*1.056971514242878,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r=r*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o=o*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,r=Math.min(Math.max(0,r),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[r*255,o*255,a*255]};Su.xyz=function(t,e){var n=t[0]/255,i=t[1]/255,s=t[2]/255;n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var r=n*.41239079926595+i*.35758433938387+s*.18048078840183,o=n*.21263900587151+i*.71516867876775+s*.072192315360733,a=n*.019330818715591+i*.11919477979462+s*.95053215224966;return e=e||Nn.whitepoint[2].E,[r*e[0],o*e[1],a*e[2]]};const Py={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(t,e,n){var i,s,r,o,a,l,c,u,d,h,f,p,m;if(r=t[0],o=t[1],a=t[2],r===0)return[0,0,0];var y=.0011070564598794539;return e=e||"D65",n=n||2,d=Nn.whitepoint[n][e][0],h=Nn.whitepoint[n][e][1],f=Nn.whitepoint[n][e][2],p=4*d/(d+15*h+3*f),m=9*h/(d+15*h+3*f),i=o/(13*r)+p||0,s=a/(13*r)+m||0,c=r>8?h*Math.pow((r+16)/116,3):h*r*y,l=c*9*i/(4*s)||0,u=c*(12-3*i-20*s)/(4*s)||0,[l,c,u]}};Nn.luv=function(t,e,n){var i,s,r,o,a,l,c,u,d,h,f,p,m,y=.008856451679035631,v=903.2962962962961;e=e||"D65",n=n||2,d=Nn.whitepoint[n][e][0],h=Nn.whitepoint[n][e][1],f=Nn.whitepoint[n][e][2],p=4*d/(d+15*h+3*f),m=9*h/(d+15*h+3*f),l=t[0],c=t[1],u=t[2],i=4*l/(l+15*c+3*u)||0,s=9*c/(l+15*c+3*u)||0;var b=c/h;return r=b<=y?v*b:116*Math.pow(b,1/3)-16,o=13*r*(i-p),a=13*r*(s-m),[r,o,a]};var yA={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(t){var e=t[0],n=t[1],i=t[2],s,r,o;return o=i/360*2*Math.PI,s=n*Math.cos(o),r=n*Math.sin(o),[e,s,r]},xyz:function(t){return Py.xyz(yA.luv(t))}};Py.lchuv=function(t){var e=t[0],n=t[1],i=t[2],s=Math.sqrt(n*n+i*i),r=Math.atan2(i,n),o=r*360/2/Math.PI;return o<0&&(o+=360),[e,s,o]};Nn.lchuv=function(t){return Py.lchuv(Nn.luv(t))};const mw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var _w={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function gte(t){var e,n=[],i=1,s;if(typeof t=="number")return{space:"rgb",values:[t>>>16,(t&65280)>>>8,t&255],alpha:1};if(typeof t=="number")return{space:"rgb",values:[t>>>16,(t&65280)>>>8,t&255],alpha:1};if(t=String(t).toLowerCase(),mw[t])n=mw[t].slice(),s="rgb";else if(t==="transparent")i=0,s="rgb",n=[0,0,0];else if(t[0]==="#"){var r=t.slice(1),o=r.length,a=o<=4;i=1,a?(n=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],o===4&&(i=parseInt(r[3]+r[3],16)/255)):(n=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],o===8&&(i=parseInt(r[6]+r[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),s="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(t)){var l=e[1];s=l.replace(/a$/,"");var c=s==="cmyk"?4:s==="gray"?1:3;n=e[2].trim().split(/\s*[,\/]\s*|\s+/),s==="color"&&(s=n.shift()),n=n.map(function(u,d){if(u[u.length-1]==="%")return u=parseFloat(u)/100,d===3?u:s==="rgb"?u*255:s[0]==="h"||s[0]==="l"&&!d?u*100:s==="lab"?u*125:s==="lch"?d<2?u*150:u*360:s[0]==="o"&&!d?u:s==="oklab"?u*.4:s==="oklch"?d<2?u*.4:u*360:u;if(s[d]==="h"||d===2&&s[s.length-1]==="h"){if(_w[u]!==void 0)return _w[u];if(u.endsWith("deg"))return parseFloat(u);if(u.endsWith("turn"))return parseFloat(u)*360;if(u.endsWith("grad"))return parseFloat(u)*360/400;if(u.endsWith("rad"))return parseFloat(u)*180/Math.PI}return u==="none"?0:parseFloat(u)}),i=n.length>c?n.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(u){return parseFloat(u)}),s=t.match(/([a-z])/ig)?.join("")?.toLowerCase()||"rgb");return{space:s,values:n,alpha:i}}const pp={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100,s,r,o,a,l,c=0;if(n===0)return l=i*255,[l,l,l];for(r=i<.5?i*(1+n):i+n-i*n,s=2*i-r,a=[0,0,0];c<3;)o=e+1/3*-(c-1),o<0?o++:o>1&&o--,l=6*o<1?s+(r-s)*6*o:2*o<1?r:3*o<2?s+(r-s)*(2/3-o)*6:s,a[c++]=l*255;return a}};Su.hsl=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255,s=Math.min(e,n,i),r=Math.max(e,n,i),o=r-s,a,l,c;return r===s?a=0:e===r?a=(n-i)/o:n===r?a=2+(i-e)/o:i===r&&(a=4+(e-n)/o),a=Math.min(a*60,360),a<0&&(a+=360),c=(s+r)/2,r===s?l=0:c<=.5?l=o/(r+s):l=o/(2-r-s),[a,l*100,c*100]};function pte(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments)),t instanceof Number&&(t=+t);var e,n=gte(t);if(!n.space)return[];const i=n.space[0]==="h"?pp.min:Su.min,s=n.space[0]==="h"?pp.max:Su.max;return e=Array(3),e[0]=Math.min(Math.max(n.values[0],i[0]),s[0]),e[1]=Math.min(Math.max(n.values[1],i[1]),s[1]),e[2]=Math.min(Math.max(n.values[2],i[2]),s[2]),n.space[0]==="h"&&(e=pp.rgb(e)),e.push(Math.min(Math.max(n.alpha,0),1)),e}const Iy=[NaN,NaN,NaN,0];function mte(t){return typeof t=="string"?t:Ry(t)}const _te=1024,yc={};let mp=0;function yte(t){if(t.length===4)return t;const e=t.slice();return e[3]=1,e}function yw(t){const e=Nn.lchuv(Su.xyz(t));return e[3]=t[3],e}function vte(t){const e=Nn.rgb(yA.xyz(t));return e[3]=t[3],e}function Dy(t){if(t==="none")return Iy;if(yc.hasOwnProperty(t))return yc[t];if(mp>=_te){let n=0;for(const i in yc)n++&3||(delete yc[i],--mp)}const e=pte(t);if(e.length!==4)throw new Error('failed to parse "'+t+'" as color');for(const n of e)if(isNaN(n))throw new Error('failed to parse "'+t+'" as color');return vA(e),yc[t]=e,++mp,e}function Tu(t){return Array.isArray(t)?t:Dy(t)}function vA(t){return t[0]=nn(t[0]+.5|0,0,255),t[1]=nn(t[1]+.5|0,0,255),t[2]=nn(t[2]+.5|0,0,255),t[3]=nn(t[3],0,1),t}function Ry(t){let e=t[0];e!=(e|0)&&(e=e+.5|0);let n=t[1];n!=(n|0)&&(n=n+.5|0);let i=t[2];i!=(i|0)&&(i=i+.5|0);const s=t[3]===void 0?1:Math.round(t[3]*1e3)/1e3;return"rgba("+e+","+n+","+i+","+s+")"}const ho=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",bte=ho.includes("firefox"),wte=ho.includes("safari")&&!ho.includes("chrom");wte&&(ho.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(ho));const xte=ho.includes("webkit")&&!ho.includes("edge"),bA=ho.includes("macintosh"),wA=typeof devicePixelRatio<"u"?devicePixelRatio:1,xA=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,EA=typeof Image<"u"&&Image.prototype.decode,CA=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return t}();function dn(t,e,n,i){let s;return n&&n.length?s=n.shift():xA?s=new OffscreenCanvas(t||300,e||300):s=document.createElement("canvas"),t&&(s.width=t),e&&(s.height=e),s.getContext("2d",i)}let _p;function Vh(){return _p||(_p=dn(1,1)),_p}function zl(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function vw(t,e){const n=e.parentNode;n&&n.replaceChild(t,e)}function Ete(t){for(;t.lastChild;)t.lastChild.remove()}function Cte(t,e){const n=t.childNodes;for(let i=0;;++i){const s=n[i],r=e[i];if(!s&&!r)break;if(s!==r){if(!s){t.appendChild(r);continue}if(!r){t.removeChild(s),--i;continue}t.insertBefore(r,s)}}}function Ste(t,e,n){const i=t;let s=!0,r=!1,o=!1;const a=[Oh(i,et.LOAD,function(){o=!0,r||e()})];return i.src&&EA?(r=!0,i.decode().then(function(){s&&e()}).catch(function(l){s&&(o?e():n())})):a.push(Oh(i,et.ERROR,n)),function(){s=!1,a.forEach(Rt)}}function Tte(t,e){return new Promise((n,i)=>{function s(){o(),n(t)}function r(){o(),i(new Error("Image load error"))}function o(){t.removeEventListener("load",s),t.removeEventListener("error",r)}t.addEventListener("load",s),t.addEventListener("error",r)})}function Ate(t,e){return e&&(t.src=e),t.src&&EA?new Promise((n,i)=>t.decode().then(()=>n(t)).catch(s=>t.complete&&t.width?n(t):i(s))):Tte(t)}class kte{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let e=0;for(const n in this.cache_){const i=this.cache_[n];!(e++&3)&&!i.hasListener()&&(delete this.cache_[n],delete this.patternCache_[n],--this.cacheSize_)}}}get(e,n,i){const s=yp(e,n,i);return s in this.cache_?this.cache_[s]:null}getPattern(e,n,i){const s=yp(e,n,i);return s in this.patternCache_?this.patternCache_[s]:null}set(e,n,i,s,r){const o=yp(e,n,i),a=o in this.cache_;this.cache_[o]=s,r&&(s.getImageState()===ot.IDLE&&s.load(),s.getImageState()===ot.LOADING?s.ready().then(()=>{this.patternCache_[o]=Vh().createPattern(s.getImage(1),"repeat")}):this.patternCache_[o]=Vh().createPattern(s.getImage(1),"repeat")),a||++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}}function yp(t,e,n){const i=n?Tu(n):"null";return e+":"+t+":"+i}const Is=new kte;let vc=null;class Mte extends Ff{constructor(e,n,i,s,r){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=i,this.canvas_={},this.color_=r,this.imageState_=s===void 0?ot.IDLE:s,this.size_=e&&e.width&&e.height?[e.width,e.height]:null,this.src_=n,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===ot.LOADED){vc||(vc=dn(1,1,void 0,{willReadFrequently:!0})),vc.drawImage(this.image_,0,0);try{vc.getImageData(0,0,1,1),this.tainted_=!1}catch{vc=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(et.CHANGE)}handleImageError_(){this.imageState_=ot.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=ot.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}getPixelRatio(e){return this.replaceColor_(e),this.canvas_[e]?e:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const e=this.size_[0],n=this.size_[1],i=dn(e,n);i.fillRect(0,0,e,n),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===ot.IDLE){this.image_||this.initializeImage_(),this.imageState_=ot.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&Ate(this.image_,this.src_).then(e=>{this.image_=e,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||this.imageState_!==ot.LOADED)return;const n=this.image_,i=dn(Math.ceil(n.width*e),Math.ceil(n.height*e)),s=i.canvas;i.scale(e,e),i.drawImage(n,0,0),i.globalCompositeOperation="multiply",i.fillStyle=mte(this.color_),i.fillRect(0,0,s.width/e,s.height/e),i.globalCompositeOperation="destination-in",i.drawImage(n,0,0),this.canvas_[e]=s}ready(){return this.ready_||(this.ready_=new Promise(e=>{if(this.imageState_===ot.LOADED||this.imageState_===ot.ERROR)e();else{const n=()=>{(this.imageState_===ot.LOADED||this.imageState_===ot.ERROR)&&(this.removeEventListener(et.CHANGE,n),e())};this.addEventListener(et.CHANGE,n)}})),this.ready_}}function Ly(t,e,n,i,s,r){let o=e===void 0?void 0:Is.get(e,n,s);return o||(o=new Mte(t,t&&"src"in t?t.src||void 0:e,n,i,s),Is.set(e,n,s,o,r)),r&&o&&!Is.getPattern(e,n,s)&&Is.set(e,n,s,o,r),o}function Ds(t){return t?Array.isArray(t)?Ry(t):typeof t=="object"&&"src"in t?Pte(t):t:null}function Pte(t){if(!t.offset||!t.size)return Is.getPattern(t.src,"anonymous",t.color);const e=t.src+":"+t.offset,n=Is.getPattern(e,void 0,t.color);if(n)return n;const i=Is.get(t.src,"anonymous",null);if(i.getImageState()!==ot.LOADED)return null;const s=dn(t.size[0],t.size[1]);return s.drawImage(i.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),Ly(s.canvas,e,void 0,ot.LOADED,t.color,!0),Is.getPattern(e,void 0,t.color)}const Xd="ol-hidden",Gf="ol-unselectable",Oy="ol-control",bw="ol-collapsed",Ite=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),ww=["style","variant","weight","size","lineHeight","family"],SA=function(t){const e=t.match(Ite);if(!e)return null;const n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let i=0,s=ww.length;ithis.getTileInternal(f,p,m,y,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return h.key=l,h}getTileInternal(e,n,i,s,r){const o=this.getKey();return this.createTile_(e,n,i,s,r,o)}setRenderReprojectionEdges(e){this.renderReprojectionEdges_!=e&&(this.renderReprojectionEdges_=e,this.changed())}setTileGridForProjection(e,n){const i=Gi(e);if(i){const s=wt(i);s in this.tileGridForProjection||(this.tileGridForProjection[s]=n)}}}function Tie(t,e){t.getImage().src=e}class Aie extends Sie{constructor(e){e=e||{};const n=e.projection!==void 0?e.projection:"EPSG:3857",i=e.tileGrid!==void 0?e.tileGrid:hie({extent:Hy(n),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize});super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:n,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX!==void 0?e.wrapX:!0,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.gutter_=e.gutter!==void 0?e.gutter:0}getGutter(){return this.gutter_}}const kie='© OpenStreetMap contributors.';class Mie extends Aie{constructor(e){e=e||{};let n;e.attributions!==void 0?n=e.attributions:n=[kie];const i=e.crossOrigin!==void 0?e.crossOrigin:"anonymous",s=e.url!==void 0?e.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:n,attributionsCollapsible:!1,cacheSize:e.cacheSize,crossOrigin:i,interpolate:e.interpolate,maxZoom:e.maxZoom!==void 0?e.maxZoom:19,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:s,wrapX:e.wrapX,zDirection:e.zDirection})}}const Zd={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class Pie extends Kf{constructor(e){e=e||{};const n=Object.assign({},e),i=e.cacheSize;delete e.cacheSize,delete n.preload,delete n.useInterimTilesOnError,super(n),this.on,this.once,this.un,this.cacheSize_=i,this.setPreload(e.preload!==void 0?e.preload:0),this.setUseInterimTilesOnError(e.useInterimTilesOnError!==void 0?e.useInterimTilesOnError:!0)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(Zd.PRELOAD)}setPreload(e){this.set(Zd.PRELOAD,e)}getUseInterimTilesOnError(){return this.get(Zd.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(e){this.set(Zd.USE_INTERIM_TILES_ON_ERROR,e)}getData(e){return super.getData(e)}}const Iie=5;class Die extends Xu{constructor(e){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.staleKeys_=new Array,this.maxStaleKeys=Iie}getStaleKeys(){return this.staleKeys_}prependStaleKey(e){this.staleKeys_.unshift(e),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(e){return gt()}getData(e){return null}prepareFrame(e){return gt()}renderFrame(e,n){return gt()}forEachFeatureAtCoordinate(e,n,i,s,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(e){const n=e.target;(n.getState()===ot.LOADED||n.getState()===ot.ERROR)&&this.renderIfReadyAndVisible()}loadImage(e){let n=e.getState();return n!=ot.LOADED&&n!=ot.ERROR&&e.addEventListener(et.CHANGE,this.boundHandleImageChange_),n==ot.IDLE&&(e.load(),n=e.getState()),n==ot.LOADED}renderIfReadyAndVisible(){const e=this.getLayer();e&&e.getVisible()&&e.getSourceState()==="ready"&&e.changed()}renderDeferred(e){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class QA{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(Vh(),{get:(e,n)=>{if(typeof Vh()[n]=="function")return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(n),this.pushMethodArgs_},set:(e,n,i)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(n,i),!0)})}pushMethodArgs_=(...e)=>(this.instructions_[this.zIndex+this.offset_].push(e),this);pushFunction(e){this.instructions_[this.zIndex+this.offset_].push(e)}getContext(){return this.context_}draw(e){this.instructions_.forEach(n=>{for(let i=0,s=n.length;i0&&this.getCount()>this.highWaterMark}expireCache(e){for(;this.canExpireCache();){const n=this.pop();n instanceof Of&&n.dispose()}}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(e){return this.entries_.hasOwnProperty(e)}forEach(e){let n=this.oldest_;for(;n;)e(n.value_,n.key_,this),n=n.newer}get(e,n){const i=this.entries_[e];return pt(i!==void 0,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(e){const n=this.entries_[e];return pt(n!==void 0,"Tried to get a value for a key that does not exist in the cache"),n===this.newest_?(this.newest_=n.older,this.newest_&&(this.newest_.newer=null)):n===this.oldest_?(this.oldest_=n.newer,this.oldest_&&(this.oldest_.older=null)):(n.newer.older=n.older,n.older.newer=n.newer),delete this.entries_[e],--this.count_,n.value_}getCount(){return this.count_}getKeys(){const e=new Array(this.count_);let n=0,i;for(i=this.newest_;i;i=i.older)e[n++]=i.key_;return e}getValues(){const e=new Array(this.count_);let n=0,i;for(i=this.newest_;i;i=i.older)e[n++]=i.value_;return e}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(e){return this.entries_[e]?.value_}pop(){const e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_}replace(e,n){this.get(e),this.entries_[e].value_=n}set(e,n){pt(!(e in this.entries_),"Tried to set a value for a key that is used already");const i={key_:e,newer:null,older:this.newest_,value_:n};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[e]=i,++this.count_}setSize(e){this.highWaterMark=e}}class Bie extends Lm{constructor(e){super({tileCoord:e.tileCoord,loader:()=>Promise.resolve(new Uint8ClampedArray(4)),interpolate:e.interpolate,transition:e.transition}),this.pixelRatio_=e.pixelRatio,this.gutter_=e.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=e.sourceTileGrid,this.targetTileGrid_=e.targetTileGrid,this.wrappedTileCoord_=e.wrappedTileCoord||e.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const n=e.sourceProj,i=n.getExtent(),s=e.sourceTileGrid.getExtent();this.clipExtent_=n.canWrapX()?s?ls(i,s):i:s;const r=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),o=this.targetTileGrid_.getExtent();let a=this.sourceTileGrid_.getExtent();const l=o?ls(r,o):r;if(wu(l)===0){this.state=Fe.EMPTY;return}i&&(a?a=ls(a,i):a=i);const c=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),u=e.targetProj,d=UA(n,u,l,c);if(!isFinite(d)||d<=0){this.state=Fe.EMPTY;return}const h=e.errorThreshold!==void 0?e.errorThreshold:jA;if(this.triangulation_=new KA(n,u,l,a,d*h,c),this.triangulation_.getTriangles().length===0){this.state=Fe.EMPTY;return}this.sourceZ_=this.sourceTileGrid_.getZForResolution(d);let f=this.triangulation_.calculateSourceExtent();if(a&&(n.canWrapX()?(f[1]=nn(f[1],a[1],a[3]),f[3]=nn(f[3],a[1],a[3])):f=ls(f,a)),!wu(f))this.state=Fe.EMPTY;else{let p=0,m=0;n.canWrapX()&&(p=yt(i),m=Math.floor((f[0]-i[0])/p)),py(f.slice(),n,!0).forEach(v=>{const b=this.sourceTileGrid_.getTileRangeForExtentAndZ(v,this.sourceZ_),x=e.getTileFunction;for(let E=b.minX;E<=b.maxX;E++)for(let w=b.minY;w<=b.maxY;w++){const S=x(this.sourceZ_,E,w,this.pixelRatio_);if(S){const T=m*p;this.sourceTiles_.push({tile:S,offset:T})}}++m}),this.sourceTiles_.length===0&&(this.state=Fe.EMPTY)}}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const e=[];let n=!1;if(this.sourceTiles_.forEach(p=>{const m=p.tile;if(!m||m.getState()!==Fe.LOADED)return;const y=m.getSize(),v=this.gutter_;let b;const x=Lie(m.getData());x?b=x:(n=!0,b=$ie(Uh(m.getData())));const E=[y[0]+2*v,y[1]+2*v],w=b instanceof Float32Array,S=E[0]*E[1],T=w?Float32Array:Uint8ClampedArray,A=new T(b.buffer),k=T.BYTES_PER_ELEMENT,P=k*A.length/S,B=A.byteLength/E[1],Y=Math.floor(B/k/E[0]),ne=S*Y;let $=A;if(A.length!==ne){$=new T(ne);let z=0,X=0;const Z=E[0]*Y;for(let H=0;H=0;--p){const m=[];for(let w=0,S=e.length;w{const i=n.getState();if(i!==Fe.IDLE&&i!==Fe.LOADING)return;e++;const s=ht(n,et.CHANGE,()=>{const r=n.getState();(r==Fe.LOADED||r==Fe.ERROR||r==Fe.EMPTY)&&(Rt(s),e--,e===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(s)}),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:n}){n.getState()==Fe.IDLE&&n.load()})}unlistenSources_(){this.sourcesListenerKeys_.forEach(Rt),this.sourcesListenerKeys_=null}}function Sp(t,e,n,i){return`${t},${oie(e,n,i)}`}function Tp(t,e,n){if(!(n in t))return t[n]=new Set([e]),!0;const i=t[n],s=i.has(e);return s||i.add(e),!s}function Vie(t,e,n){const i=t[n];return i?i.delete(e):!1}function Bw(t,e){const n=t.layerStatesArray[t.layerIndex];n.extent&&(e=ls(e,Zr(n.extent,t.viewState.projection)));const i=n.layer.getRenderSource();if(!i.getWrapX()){const s=i.getTileGridForProjection(t.viewState.projection).getExtent();s&&(e=ls(e,s))}return e}class zie extends ek{constructor(e,n){super(e),n=n||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=Ui(),this.tempTileRange_=new Yy(0,0,0,0),this.tempTileCoord_=Kh(0,0,0);const i=n.cacheSize!==void 0?n.cacheSize:512;this.tileCache_=new Fie(i),this.renderedProjection_=void 0,this.maxStaleKeys=i*.5}getTileCache(){return this.tileCache_}getOrCreateTile(e,n,i,s){const r=this.tileCache_,a=this.getLayer().getSource(),l=Sp(a.getKey(),e,n,i);let c;if(r.containsKey(l))c=r.get(l);else{if(c=a.getTile(e,n,i,s.pixelRatio,s.viewState.projection),!c)return null;r.set(l,c)}return c}getTile(e,n,i,s){const r=this.getOrCreateTile(e,n,i,s);return r||null}getData(e){const n=this.frameState;if(!n)return null;const i=this.getLayer(),s=On(n.pixelToCoordinateTransform,e.slice()),r=i.getExtent();if(r&&!Vl(r,s))return null;const o=n.viewState,a=i.getRenderSource(),l=a.getTileGridForProjection(o.projection),c=a.getTilePixelRatio(n.pixelRatio);for(let u=l.getZForResolution(o.resolution);u>=l.getMinZoom();--u){const d=l.getTileCoordForCoordAndZ(s,u),h=this.getTile(u,d[1],d[2],n);if(!h||h.getState()!==Fe.LOADED)continue;const f=l.getOrigin(u),p=wi(l.getTileSize(u)),m=l.getResolution(u);let y;if(h instanceof HA||h instanceof Rm)y=h.getImage();else if(h instanceof Lm){if(y=Uh(h.getData()),!y)continue}else continue;const v=Math.floor(c*((s[0]-f[0])/m-d[1]*p[0])),b=Math.floor(c*((f[1]-s[1])/m-d[2]*p[1])),x=Math.round(c*a.getGutterForProjection(o.projection));return this.getImageData(y,v+x,b+x)}return null}prepareFrame(e){this.renderedProjection_?e.viewState.projection!==this.renderedProjection_&&(this.tileCache_.clear(),this.renderedProjection_=e.viewState.projection):this.renderedProjection_=e.viewState.projection;const n=this.getLayer().getSource();if(!n)return!1;const i=n.getRevision();return this.renderedRevision_?this.renderedRevision_!==i&&(this.renderedRevision_=i,this.renderedSourceKey_===n.getKey()&&this.tileCache_.clear()):this.renderedRevision_=i,!0}enqueueTiles(e,n,i,s,r){const o=e.viewState,a=this.getLayer(),l=a.getRenderSource(),c=l.getTileGridForProjection(o.projection),u=wt(l);u in e.wantedTiles||(e.wantedTiles[u]={});const d=e.wantedTiles[u],h=a.getMapInternal(),f=Math.max(i-r,c.getMinZoom(),c.getZForResolution(Math.min(a.getMaxResolution(),h?h.getView().getResolutionForZoom(Math.max(a.getMinZoom(),0)):c.getResolution(0)),l.zDirection));for(let p=i;p>=f;--p){const m=c.getTileRangeForExtentAndZ(n,p,this.tempTileRange_),y=c.getResolution(p);for(let v=m.minX;v<=m.maxX;++v)for(let b=m.minY;b<=m.maxY;++b){const x=this.getTile(p,v,b,e);if(!x||!Tp(s,x,p))continue;const w=x.getKey();if(d[w]=!0,x.getState()===Fe.IDLE&&!e.tileQueue.isKeyQueued(w)){const S=Kh(p,v,b,this.tempTileCoord_);e.tileQueue.enqueue([x,u,c.getTileCoordCenter(S),y])}}}}findStaleTile_(e,n){const i=this.tileCache_,s=e[0],r=e[1],o=e[2],a=this.getStaleKeys();for(let l=0;l0&&setTimeout(()=>{this.enqueueTiles(e,P,f-1,A,k-1)},0),!(f in A))return this.container;const B=wt(this),Y=e.time;for(const H of A[f]){const le=H.getState();if((H instanceof Rm||H instanceof Bie)&&le===Fe.EMPTY)continue;const ie=H.tileCoord;if(le===Fe.LOADED&&H.getAlpha(B,Y)===1){H.endTransition(B);continue}if(this.renderComplete=!1,this.findStaleTile_(ie,A)){Vie(A,H,f),e.animate=!0;continue}if(this.findAltTiles_(h,ie,f+1,A))continue;const ee=h.getMinZoom();for(let ue=f-1;ue>=ee&&!this.findAltTiles_(h,ie,ue,A);--ue);}const ne=p/o*l/v,$=this.getRenderContext(e);br(this.tempTransform,b/2,x/2,ne,ne,0,-b/2,-x/2),i.extent&&this.clipUnrotated($,e,E),u.getInterpolate()||($.imageSmoothingEnabled=!1),this.preRender($,e);const F=Object.keys(A).map(Number);F.sort(hr);let D;const z=[],X=[];for(let H=F.length-1;H>=0;--H){const le=F[H],ie=u.getTilePixelSize(le,l,r),I=h.getResolution(le)/p,ee=ie[0]*I*ne,ue=ie[1]*I*ne,L=h.getTileCoordForCoordAndZ(wa(T),le),ae=h.getTileCoordExtent(L),de=On(this.tempTransform,[v*(ae[0]-T[0])/p,v*(T[3]-ae[3])/p]),ve=v*u.getGutterForProjection(r);for(const W of A[le]){if(W.getState()!==Fe.LOADED)continue;const fe=W.tileCoord,C=L[1]-fe[1],O=Math.round(de[0]-(C-1)*ee),K=L[2]-fe[2],U=Math.round(de[1]-(K-1)*ue),re=Math.round(de[0]-C*ee),j=Math.round(de[1]-K*ue),se=O-re,Q=U-j,ge=F.length===1;let _e=!1;D=[re,j,re+se,j,re+se,j+Q,re,j+Q];for(let ye=0,ke=z.length;ye{const ie=wt(u),te=le.wantedTiles[ie],I=te?Object.keys(te).length:0;this.updateCacheSize(I),this.tileCache_.expireCache()};return e.postRenderFunctions.push(Z),this.container}updateCacheSize(e){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,e*2)}drawTile(e,n,i,s,r,o,a,l){let c;if(e instanceof Lm){if(c=Uh(e.getData()),!c)throw new Error("Rendering array data is not yet supported")}else c=this.getTileImage(e);if(!c)return;const u=this.getRenderContext(n),d=wt(this),h=n.layerStatesArray[n.layerIndex],f=h.opacity*(l?e.getAlpha(d,n.time):1),p=f!==u.globalAlpha;p&&(u.save(),u.globalAlpha=f),u.drawImage(c,a,a,c.width-2*a,c.height-2*a,i,s,r,o),p&&u.restore(),f!==h.opacity?n.animate=!0:l&&e.endTransition(d)}getImage(){const e=this.context;return e?e.canvas:null}getTileImage(e){return e.getImage()}updateUsedTiles(e,n,i){const s=wt(n);s in e||(e[s]={}),e[s][i.getKey()]=!0}}class Wie extends Pie{constructor(e){super(e)}createRenderer(){return new zie(this,{cacheSize:this.getCacheSize()})}}class Jc extends zs{constructor(e){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),e)if(typeof e.getSimplifiedGeometry=="function"){const n=e;this.setGeometry(n)}else{const n=e;this.setProperties(n)}}clone(){const e=new Jc(this.hasProperties()?this.getProperties():null);e.setGeometryName(this.getGeometryName());const n=this.getGeometry();n&&e.setGeometry(n.clone());const i=this.getStyle();return i&&e.setStyle(i),e}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(Rt(this.geometryChangeKey_),this.geometryChangeKey_=null);const e=this.getGeometry();e&&(this.geometryChangeKey_=ht(e,et.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(e){this.set(this.geometryName_,e)}setStyle(e){this.style_=e,this.styleFunction_=e?Yie(e):void 0,this.changed()}setId(e){this.id_=e,this.changed()}setGeometryName(e){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=e,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function Yie(t){if(typeof t=="function")return t;let e;return Array.isArray(t)?e=t:(pt(typeof t.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[t]),function(){return e}}function Om(t,e,n,i,s,r,o){let a,l;const c=(n-e)/i;if(c===1)a=e;else if(c===2)a=e,l=s;else if(c!==0){let u=t[e],d=t[e+1],h=0;const f=[0];for(let y=e+i;y1?o:2,r=r||new Array(o);for(let u=0;u>1;sl&&(this.instructions.push([Ke.CUSTOM,l,u,e,i,Go,r]),this.hitDetectionInstructions.push([Ke.CUSTOM,l,u,e,s||i,Go,r]));break;case"Point":c=e.getFlatCoordinates(),this.coordinates.push(c[0],c[1]),u=this.coordinates.length,this.instructions.push([Ke.CUSTOM,l,u,e,i,void 0,r]),this.hitDetectionInstructions.push([Ke.CUSTOM,l,u,e,s||i,void 0,r]);break}this.endGeometry(n)}beginGeometry(e,n,i){this.beginGeometryInstruction1_=[Ke.BEGIN_GEOMETRY,n,0,e,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Ke.BEGIN_GEOMETRY,n,0,e,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const e=this.hitDetectionInstructions;e.reverse();let n;const i=e.length;let s,r,o=-1;for(n=0;nthis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(e){const n=e.fillStyle,i=[Ke.SET_FILL_STYLE,n];return typeof n!="string"&&i.push(e.fillPatternScale),i}applyStroke(e){this.instructions.push(this.createStroke(e))}createStroke(e){return[Ke.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio]}updateFillStyle(e,n){const i=e.fillStyle;(typeof i!="string"||e.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(n.call(this,e)),e.currentFillStyle=i)}updateStrokeStyle(e,n){const i=e.strokeStyle,s=e.lineCap,r=e.lineDash,o=e.lineDashOffset,a=e.lineJoin,l=e.lineWidth,c=e.miterLimit;(e.currentStrokeStyle!=i||e.currentLineCap!=s||r!=e.currentLineDash&&!Eo(e.currentLineDash,r)||e.currentLineDashOffset!=o||e.currentLineJoin!=a||e.currentLineWidth!=l||e.currentMiterLimit!=c)&&(i!==void 0&&n.call(this,e),e.currentStrokeStyle=i,e.currentLineCap=s,e.currentLineDash=r,e.currentLineDashOffset=o,e.currentLineJoin=a,e.currentLineWidth=l,e.currentMiterLimit=c)}endGeometry(e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const n=[Ke.END_GEOMETRY,e];this.instructions.push(n),this.hitDetectionInstructions.push(n)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=qT(this.maxExtent),this.maxLineWidth>0)){const e=this.resolution*(this.maxLineWidth+1)/2;hy(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class jie extends td{constructor(e,n,i,s){super(e,n,i,s),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(e,n,i){if(!this.image_||this.maxExtent&&!Vl(this.maxExtent,e.getFlatCoordinates()))return;this.beginGeometry(e,n,i);const s=e.getFlatCoordinates(),r=e.getStride(),o=this.coordinates.length,a=this.appendFlatPointCoordinates(s,r);this.instructions.push([Ke.DRAW_IMAGE,o,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Ke.DRAW_IMAGE,o,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(n)}drawMultiPoint(e,n,i){if(!this.image_)return;this.beginGeometry(e,n,i);const s=e.getFlatCoordinates(),r=[];for(let l=0,c=s.length;l=t){const p=(t-a+f)/f,m=Ai(c,d,p),y=Ai(u,h,p);l.push(m,y),r.push(l),l=[m,y],a==t&&(o+=s),a=0}else if(a0&&r.push(l),r}function Gie(t,e,n,i,s){let r=n,o=n,a=0,l=0,c=n,u,d,h,f,p,m,y,v,b,x;for(d=n;dt&&(l>a&&(a=l,r=c,o=d),l=0,c=d-s)),h=f,y=b,v=x),p=E,m=w}return l+=f,l>a?[c,d]:[r,o]}const Xh={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class Xie extends td{constructor(e,n,i,s){super(e,n,i,s),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[gi]={fillStyle:gi},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const e=super.finish();return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e}drawText(e,n,i){const s=this.textFillState_,r=this.textStrokeState_,o=this.textState_;if(this.text_===""||!o||!s&&!r)return;const a=this.coordinates;let l=a.length;const c=e.getType();let u=null,d=e.getStride();if(o.placement==="line"&&(c=="LineString"||c=="MultiLineString"||c=="Polygon"||c=="MultiPolygon")){if(!_i(this.maxExtent,e.getExtent()))return;let h;if(u=e.getFlatCoordinates(),c=="LineString")h=[u.length];else if(c=="MultiLineString")h=e.getEnds();else if(c=="Polygon")h=e.getEnds().slice(0,1);else if(c=="MultiPolygon"){const y=e.getEndss();h=[];for(let v=0,b=y.length;v{const w=a[(b+E)*2]===u[E*d]&&a[(b+E)*2+1]===u[E*d+1];return w||--b,w})}this.saveTextStates_(),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&this.updateFillStyle(this.state,this.createFill),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(e,n,i);let p=o.padding;if(p!=qo&&(o.scale[0]<0||o.scale[1]<0)){let b=o.padding[0],x=o.padding[1],E=o.padding[2],w=o.padding[3];o.scale[0]<0&&(x=-x,w=-w),o.scale[1]<0&&(b=-b,E=-E),p=[b,x,E,w]}const m=this.pixelRatio;this.instructions.push([Ke.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,p==qo?qo:p.map(function(b){return b*m}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]);const y=1/m,v=this.state.fillStyle;o.backgroundFill&&(this.state.fillStyle=gi,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([Ke.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[y,y],NaN,this.declutterMode_,this.declutterImageWithText_,p,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?gi:this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]),o.backgroundFill&&(this.state.fillStyle=v,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(n)}}saveTextStates_(){const e=this.textStrokeState_,n=this.textState_,i=this.textFillState_,s=this.strokeKey_;e&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:n.font,textAlign:n.textAlign||Mu,justify:n.justify,textBaseline:n.textBaseline||zh,scale:n.scale});const o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))}drawChars_(e,n){const i=this.textStrokeState_,s=this.textState_,r=this.strokeKey_,o=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,c=Xh[s.textBaseline],u=this.textOffsetY_*l,d=this.text_,h=i?i.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([Ke.DRAW_CHARS,e,n,c,s.overflow,a,s.maxAngle,l,u,r,h*l,d,o,1,this.declutterMode_]),this.hitDetectionInstructions.push([Ke.DRAW_CHARS,e,n,c,s.overflow,a&&gi,s.maxAngle,l,u,r,h*l,d,o,1/l,this.declutterMode_])}setTextStyle(e,n){let i,s,r;if(!e)this.text_="";else{const o=e.getFill();o?(s=this.textFillState_,s||(s={},this.textFillState_=s),s.fillStyle=Ds(o.getColor()||gi)):(s=null,this.textFillState_=s);const a=e.getStroke();if(!a)r=null,this.textStrokeState_=r;else{r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const p=a.getLineDash(),m=a.getLineDashOffset(),y=a.getWidth(),v=a.getMiterLimit();r.lineCap=a.getLineCap()||Wl,r.lineDash=p?p.slice():fr,r.lineDashOffset=m===void 0?gr:m,r.lineJoin=a.getLineJoin()||Yl,r.lineWidth=y===void 0?Pu:y,r.miterLimit=v===void 0?Au:v,r.strokeStyle=Ds(a.getColor()||ku)}i=this.textState_;const l=e.getFont()||TA;Dte(l);const c=e.getScaleArray();i.overflow=e.getOverflow(),i.font=l,i.maxAngle=e.getMaxAngle(),i.placement=e.getPlacement(),i.textAlign=e.getTextAlign(),i.repeat=e.getRepeat(),i.justify=e.getJustify(),i.textBaseline=e.getTextBaseline()||zh,i.backgroundFill=e.getBackgroundFill(),i.backgroundStroke=e.getBackgroundStroke(),i.padding=e.getPadding()||qo,i.scale=c===void 0?[1,1]:c;const u=e.getOffsetX(),d=e.getOffsetY(),h=e.getRotateWithView(),f=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=u===void 0?0:u,this.textOffsetY_=d===void 0?0:d,this.textRotateWithView_=h===void 0?!1:h,this.textRotation_=f===void 0?0:f,this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:wt(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=s&&s.fillStyle?typeof s.fillStyle=="string"?s.fillStyle:"|"+wt(s.fillStyle):""}this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=n}}const qie={Circle:zw,Default:td,Image:jie,LineString:Kie,Polygon:zw,Text:Xie};class Zie{constructor(e,n,i,s){this.tolerance_=e,this.maxExtent_=n,this.pixelRatio_=s,this.resolution_=i,this.buildersByZIndex_={}}finish(){const e={};for(const n in this.buildersByZIndex_){e[n]=e[n]||{};const i=this.buildersByZIndex_[n];for(const s in i){const r=i[s].finish();e[n][s]=r}}return e}getBuilder(e,n){const i=e!==void 0?e.toString():"0";let s=this.buildersByZIndex_[i];s===void 0&&(s={},this.buildersByZIndex_[i]=s);let r=s[n];if(r===void 0){const o=qie[n];r=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[n]=r}return r}}function Jie(t,e,n,i,s,r,o,a,l,c,u,d){let h=t[e],f=t[e+1],p=0,m=0,y=0,v=0;function b(){p=h,m=f,e+=i,h=t[e],f=t[e+1],v+=y,y=Math.sqrt((h-p)*(h-p)+(f-m)*(f-m))}do b();while(eD[2]}else B=E>k;const Y=Math.PI,ne=[],$=S+i===e;e=S,y=0,v=T,h=t[e],f=t[e+1];let F;if($){b(),F=Math.atan2(f-m,h-p),B&&(F+=F>0?-Y:Y);const D=(k+E)/2,z=(P+w)/2;return ne[0]=[D,z,(A-r)/2,F,s],ne}s=s.replace(/\n/g," ");for(let D=0,z=s.length;D0?-Y:Y),F!==void 0){let I=X-F;if(I+=I>Y?-2*Y:I<-Y?2*Y:0,Math.abs(I)>o)return null}F=X;const Z=D;let H=0;for(;D0&&t.push(` `,""),t.push(e,""),t}class ese{constructor(e,n,i,s,r){this.overlaps=i,this.pixelRatio=n,this.resolution=e,this.alignAndScaleFill_,this.instructions=s.instructions,this.coordinates=s.coordinates,this.coordinateCache_={},this.renderedTransform_=hs(),this.hitDetectionInstructions=s.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=s.fillStates||{},this.strokeStates=s.strokeStates||{},this.textStates=s.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new QA:null}getZIndexContext(){return this.zIndexContext_}createLabel(e,n,i,s){const r=e+n+i+s;if(this.labels_[r])return this.labels_[r];const o=s?this.strokeStates[s]:null,a=i?this.fillStates[i]:null,l=this.textStates[n],c=this.pixelRatio,u=[l.scale[0]*c,l.scale[1]*c],d=l.justify?Xh[l.justify]:Ap(Array.isArray(e)?e[0]:e,l.textAlign||Mu),h=s&&o.lineWidth?o.lineWidth:0,f=Array.isArray(e)?e:String(e).split(` `).reduce(Qie,[]),{width:p,height:m,widths:y,heights:v,lineWidths:b}=Lte(l,f),x=p+h,E=[],w=(x+2)*u[0],S=(m+h)*u[1],T={width:w<0?Math.floor(w):Math.ceil(w),height:S<0?Math.floor(S):Math.ceil(S),contextInstructions:E};(u[0]!=1||u[1]!=1)&&E.push("scale",u),s&&(E.push("strokeStyle",o.strokeStyle),E.push("lineWidth",h),E.push("lineCap",o.lineCap),E.push("lineJoin",o.lineJoin),E.push("miterLimit",o.miterLimit),E.push("setLineDash",[o.lineDash]),E.push("lineDashOffset",o.lineDashOffset)),i&&E.push("fillStyle",a.fillStyle),E.push("textBaseline","middle"),E.push("textAlign","center");const A=.5-d;let k=d*x+A*h;const P=[],B=[];let Y=0,ne=0,$=0,F=0,D;for(let z=0,X=f.length;ze?e-c:r,E=o+u>n?n-u:o,w=p[3]+x*h[0]+p[1],S=p[0]+E*h[1]+p[2],T=v-p[3],A=b-p[0];(m||d!==0)&&(Rr[0]=T,Lr[0]=T,Rr[1]=A,Gs[1]=A,Gs[0]=T+w,Xs[0]=Gs[0],Xs[1]=A+S,Lr[1]=Xs[1]);let k;return d!==0?(k=br(hs(),i,s,1,1,d,-i,-s),On(k,Rr),On(k,Gs),On(k,Xs),On(k,Lr),uo(Math.min(Rr[0],Gs[0],Xs[0],Lr[0]),Math.min(Rr[1],Gs[1],Xs[1],Lr[1]),Math.max(Rr[0],Gs[0],Xs[0],Lr[0]),Math.max(Rr[1],Gs[1],Xs[1],Lr[1]),ja)):uo(Math.min(T,T+w),Math.min(A,A+S),Math.max(T,T+w),Math.max(A,A+S),ja),f&&(v=Math.round(v),b=Math.round(b)),{drawImageX:v,drawImageY:b,drawImageW:x,drawImageH:E,originX:c,originY:u,declutterBox:{minX:ja[0],minY:ja[1],maxX:ja[2],maxY:ja[3],value:y},canvasTransform:k,scale:h}}replayImageOrLabel_(e,n,i,s,r,o,a){const l=!!(o||a),c=s.declutterBox,u=a?a[2]*s.scale[0]/2:0;return c.minX-u<=n[0]&&c.maxX+u>=0&&c.minY-u<=n[1]&&c.maxY+u>=0&&(l&&this.replayTextBackground_(e,Rr,Gs,Xs,Lr,o,a),Ote(e,s.canvasTransform,r,i,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(e){const n=this.alignAndScaleFill_;if(n){const i=On(this.renderedTransform_,[0,0]),s=512*this.pixelRatio;e.save(),e.translate(i[0]%s,i[1]%s),n!==1&&e.scale(n,n),e.rotate(this.viewRotation_)}e.fill(),n&&e.restore()}setStrokeStyle_(e,n){e.strokeStyle=n[1],e.lineWidth=n[2],e.lineCap=n[3],e.lineJoin=n[4],e.miterLimit=n[5],e.lineDashOffset=n[7],e.setLineDash(n[6])}drawLabelWithPointPlacement_(e,n,i,s){const r=this.textStates[n],o=this.createLabel(e,n,s,i),a=this.strokeStates[i],l=this.pixelRatio,c=Ap(Array.isArray(e)?e[0]:e,r.textAlign||Mu),u=Xh[r.textBaseline||zh],d=a&&a.lineWidth?a.lineWidth:0,h=o.width/l-2*r.scale[0],f=c*h+2*(.5-c)*d,p=u*o.height/l+2*(.5-u)*d;return{label:o,anchorX:f,anchorY:p}}execute_(e,n,i,s,r,o,a,l){const c=this.zIndexContext_;let u;this.pixelCoordinates_&&Eo(i,this.renderedTransform_)?u=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),u=io(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),$ee(this.renderedTransform_,i));let d=0;const h=s.length;let f=0,p,m,y,v,b,x,E,w,S,T,A,k,P,B=0,Y=0,ne=null,$=null;const F=this.coordinateCache_,D=this.viewRotation_,z=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,X={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:D},Z=this.instructions!=s||this.overlaps?0:200;let H,le,ie,te;for(;dZ&&(this.fill_(e),B=0),Y>Z&&(e.stroke(),Y=0),!B&&!Y&&(e.beginPath(),b=NaN,x=NaN),++d;break;case Ke.CIRCLE:f=I[1];const ue=u[f],L=u[f+1],ae=u[f+2],de=u[f+3],ve=ae-ue,W=de-L,fe=Math.sqrt(ve*ve+W*W);e.moveTo(ue+fe,L),e.arc(ue,L,fe,0,2*Math.PI,!0),++d;break;case Ke.CLOSE_PATH:e.closePath(),++d;break;case Ke.CUSTOM:f=I[1],p=I[2];const C=I[3],O=I[4],K=I[5];X.geometry=C,X.feature=H,d in F||(F[d]=[]);const U=F[d];K?K(u,f,p,2,U):(U[0]=u[f],U[1]=u[f+1],U.length=2),c&&(c.zIndex=I[6]),O(U,X),++d;break;case Ke.DRAW_IMAGE:f=I[1],p=I[2],S=I[3],m=I[4],y=I[5];let re=I[6];const j=I[7],se=I[8],Q=I[9],ge=I[10];let _e=I[11];const ye=I[12];let ke=I[13];v=I[14]||"declutter";const Me=I[15];if(!S&&I.length>=20){T=I[19],A=I[20],k=I[21],P=I[22];const pn=this.drawLabelWithPointPlacement_(T,A,k,P);S=pn.label,I[3]=S;const Cn=I[23];m=(pn.anchorX-Cn)*this.pixelRatio,I[4]=m;const Sn=I[24];y=(pn.anchorY-Sn)*this.pixelRatio,I[5]=y,re=S.height,I[6]=re,ke=S.width,I[13]=ke}let Be;I.length>25&&(Be=I[25]);let ze,nt,Qe;I.length>17?(ze=I[16],nt=I[17],Qe=I[18]):(ze=qo,nt=!1,Qe=!1),ge&&z?_e+=D:!ge&&!z&&(_e-=D);let qt=0;for(;f!ik.includes(t));class nse{constructor(e,n,i,s,r,o,a){this.maxExtent_=e,this.overlaps_=s,this.pixelRatio_=i,this.resolution_=n,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=hs(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(r,a)}clip(e,n){const i=this.getClipCoords(n);e.beginPath(),e.moveTo(i[0],i[1]),e.lineTo(i[2],i[3]),e.lineTo(i[4],i[5]),e.lineTo(i[6],i[7]),e.clip()}createExecutors_(e,n){for(const i in e){let s=this.executorsByZIndex_[i];s===void 0&&(s={},this.executorsByZIndex_[i]=s);const r=e[i];for(const o in r){const a=r[o];s[o]=new ese(this.resolution_,this.pixelRatio_,this.overlaps_,a,n)}}}hasExecutors(e){for(const n in this.executorsByZIndex_){const i=this.executorsByZIndex_[n];for(let s=0,r=e.length;s0){if(!o||T==="none"||f!=="Image"&&f!=="Text"||o.includes(w)){const B=(h[k]-3)/4,Y=s-B%a,ne=s-(B/a|0),$=r(w,S,Y*Y+ne*ne);if($)return $}u.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(hr);let y,v,b,x,E;for(y=m.length-1;y>=0;--y){const w=m[y].toString();for(b=this.executorsByZIndex_[w],v=il.length-1;v>=0;--v)if(f=il[v],x=b[f],x!==void 0&&(E=x.executeHitDetection(u,l,i,p,d),E))return E}}getClipCoords(e){const n=this.maxExtent_;if(!n)return null;const i=n[0],s=n[1],r=n[2],o=n[3],a=[i,s,i,o,r,o,r,s];return io(a,0,8,2,e,a),a}isEmpty(){return Bl(this.executorsByZIndex_)}execute(e,n,i,s,r,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(hr),o=o||il;const c=il.length;let u,d,h,f,p;for(a&&l.reverse(),u=0,d=l.length;uv.execute(w,n,i,s,r,a)),E&&x.restore(),b){b.offset();const w=l[u]*c+h;this.deferredZIndexContexts_[w]||(this.deferredZIndexContexts_[w]=[]),this.deferredZIndexContexts_[w].push(b)}}}}this.renderedContext_=e}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const e=this.deferredZIndexContexts_,n=Object.keys(e).map(Number).sort(hr);for(let i=0,s=n.length;i{r.draw(this.renderedContext_),r.clear()}),e[n[i]].length=0}}const kp={};function ise(t){if(kp[t]!==void 0)return kp[t];const e=t*2+1,n=t*t,i=new Array(n+1);for(let r=0;r<=t;++r)for(let o=0;o<=t;++o){const a=r*r+o*o;if(a>n)break;let l=i[a];l||(l=[],i[a]=l),l.push(((t+r)*e+(t+o))*4+3),r>0&&l.push(((t-r)*e+(t+o))*4+3),o>0&&(l.push(((t+r)*e+(t-o))*4+3),r>0&&l.push(((t-r)*e+(t-o))*4+3))}const s=[];for(let r=0,o=i.length;rd*this.pixelRatio_),lineDashOffset:(o||gr)*this.pixelRatio_,lineJoin:a!==void 0?a:Yl,lineWidth:(l!==void 0?l:Pu)*this.pixelRatio_,miterLimit:c!==void 0?c:Au,strokeStyle:Ds(i||ku)}}}setImageStyle(e){let n;if(!e||!(n=e.getSize())){this.image_=null;return}const i=e.getPixelRatio(this.pixelRatio_),s=e.getAnchor(),r=e.getOrigin();this.image_=e.getImage(this.pixelRatio_),this.imageAnchorX_=s[0]*i,this.imageAnchorY_=s[1]*i,this.imageHeight_=n[1]*i,this.imageOpacity_=e.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=e.getRotateWithView(),this.imageRotation_=e.getRotation();const o=e.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/i,o[1]*this.pixelRatio_/i],this.imageWidth_=n[0]*i}setTextStyle(e){if(!e)this.text_="";else{const n=e.getFill();if(!n)this.textFillState_=null;else{const f=n.getColor();this.textFillState_={fillStyle:Ds(f||gi)}}const i=e.getStroke();if(!i)this.textStrokeState_=null;else{const f=i.getColor(),p=i.getLineCap(),m=i.getLineDash(),y=i.getLineDashOffset(),v=i.getLineJoin(),b=i.getWidth(),x=i.getMiterLimit();this.textStrokeState_={lineCap:p!==void 0?p:Wl,lineDash:m||fr,lineDashOffset:y||gr,lineJoin:v!==void 0?v:Yl,lineWidth:b!==void 0?b:Pu,miterLimit:x!==void 0?x:Au,strokeStyle:Ds(f||ku)}}const s=e.getFont(),r=e.getOffsetX(),o=e.getOffsetY(),a=e.getRotateWithView(),l=e.getRotation(),c=e.getScaleArray(),u=e.getText(),d=e.getTextAlign(),h=e.getTextBaseline();this.textState_={font:s!==void 0?s:TA,textAlign:d!==void 0?d:Mu,textBaseline:h!==void 0?h:zh},this.text_=u!==void 0?Array.isArray(u)?u.reduce((f,p,m)=>f+=m%2?" ":p,""):u:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r:0,this.textOffsetY_=o!==void 0?this.pixelRatio_*o:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*c[0],this.pixelRatio_*c[1]]}}}const As=.5;function rse(t,e,n,i,s,r,o,a,l){const c=s,u=t[0]*As,d=t[1]*As,h=dn(u,d);h.imageSmoothingEnabled=!1;const f=h.canvas,p=new sse(h,As,s,null,o,a,null),m=n.length,y=Math.floor((256*256*256-1)/m),v={};for(let x=1;x<=m;++x){const E=n[x-1],w=E.getStyleFunction()||i;if(!w)continue;let S=w(E,r);if(!S)continue;Array.isArray(S)||(S=[S]);const A=(x*y).toString(16).padStart(7,"#00000");for(let k=0,P=S.length;k0;return d&&Promise.all(l).then(()=>s(null)),use(t,e,n,i,r,o,a),d}function use(t,e,n,i,s,r,o){const a=n.getGeometryFunction()(e);if(!a)return;const l=a.simplifyTransformed(i,s);if(n.getRenderer())ok(t,l,n,e,o);else{const u=sk[l.getType()];u(t,l,n,e,o,r)}}function ok(t,e,n,i,s){if(e.getType()=="GeometryCollection"){const o=e.getGeometries();for(let a=0,l=o.length;a{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const i=this.frameState.size.slice(),s=this.renderedCenter_,r=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,c=this.getLayer(),u=[],d=i[0]*As,h=i[1]*As;u.push(this.getRenderTransform(s,r,o,As,d,h,0).slice());const f=c.getSource(),p=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!nl(p,l)){let m=l[0];const y=yt(p);let v=0,b;for(;mp[2];)++v,b=y*v,u.push(this.getRenderTransform(s,r,o,As,d,h,b).slice()),m-=y}this.hitDetectionImageData_=rse(i,u,this.renderedFeatures_,c.getStyleFunction(),l,r,o,Hw(r,this.renderedPixelRatio_))}n(ose(e,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(e,n,i,s,r){if(!this.replayGroup_)return;const o=n.viewState.resolution,a=n.viewState.rotation,l=this.getLayer(),c={},u=function(p,m,y){const v=wt(p),b=c[v];if(b){if(b!==!0&&yd=p.forEachFeatureAtCoordinate(e,o,a,i,u,f&&n.declutter[f]?n.declutter[f].all().map(m=>m.value):null)),d}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}prepareFrame(e){const n=this.getLayer(),i=n.getSource();if(!i)return!1;const s=e.viewHints[Wn.ANIMATING],r=e.viewHints[Wn.INTERACTING],o=n.getUpdateWhileAnimating(),a=n.getUpdateWhileInteracting();if(this.ready&&!o&&s||!a&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=e.extent,c=e.viewState,u=c.projection,d=c.resolution,h=e.pixelRatio,f=n.getRevision(),p=n.getRenderBuffer();let m=n.getRenderOrder();m===void 0&&(m=lse);const y=c.center.slice(),v=hy(l,p*d),b=v.slice(),x=[v.slice()],E=u.getExtent();if(i.getWrapX()&&u.canWrapX()&&!nl(E,e.extent)){const $=yt(E),F=Math.max(yt(v)/2,$);v[0]=E[0]-F,v[2]=E[2]+F,nA(y,u);const D=tA(x[0],u);D[0]E[0]&&D[2]>E[2]&&x.push([D[0]-$,D[1],D[2]-$,D[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedRevision_==f&&this.renderedRenderOrder_==m&&this.renderedFrameDeclutter_===!!e.declutter&&nl(this.wrappedRenderedExtent_,v))return Eo(this.renderedExtent_,b)||(this.hitDetectionImageData_=null,this.renderedExtent_=b),this.renderedCenter_=y,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const w=new Zie(rk(d,h),v,d,h);let S;for(let $=0,F=x.length;${let D;const z=$.getStyleFunction()||n.getStyleFunction();if(z&&(D=z($,d)),D){const X=this.renderFeature($,T,D,w,S,this.getLayer().getDeclutter(),F);A=A&&!X}},P=aA(v),B=i.getFeaturesInExtent(P);m&&B.sort(m);for(let $=0,F=B.length;${if(e===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),n&&this.simplifiedGeometry_.applyTransform(n);const i=this.simplifiedGeometry_.getFlatCoordinates();let s;switch(this.type_){case"LineString":i.length=jf(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,e,i,0),s=[i.length];break;case"MultiLineString":s=[],i.length=Gee(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,e,i,0,s);break;case"Polygon":s=[],i.length=dA(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(e),i,0,s);break}return s&&(this.simplifiedGeometry_=new is(this.type_,i,s,2,this.properties_,this.id_)),this.squaredTolerance_=e,this.simplifiedGeometry_}),this}}is.prototype.getFlatCoordinates=is.prototype.getOrientedFlatCoordinates;const Bi={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function wse(t,e){return[[-1/0,-1/0,1/0,1/0]]}let xse=!1;function Ese(t,e,n,i,s,r,o){const a=new XMLHttpRequest;a.open("GET",typeof t=="function"?t(n,i,s):t,!0),e.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=xse,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const c=e.getType();try{let u;c=="text"||c=="json"?u=a.responseText:c=="xml"?u=a.responseXML||a.responseText:c=="arraybuffer"&&(u=a.response),u?r(e.readFeatures(u,{extent:n,featureProjection:s}),e.readProjection(u)):o()}catch{o()}}else o()},a.onerror=o,a.send()}function Gw(t,e){return function(n,i,s,r,o){const a=this;Ese(t,e,n,i,s,function(l,c){a.addFeatures(l),r!==void 0&&r(l)},o||Fl)}}class Or extends Er{constructor(e,n,i){super(e),this.feature=n,this.features=i}}class Cse extends XA{constructor(e){e=e||{},super({attributions:e.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:e.wrapX!==void 0?e.wrapX:!0}),this.on,this.once,this.un,this.loader_=Fl,this.format_=e.format||null,this.overlaps_=e.overlaps===void 0?!0:e.overlaps,this.url_=e.url,e.loader!==void 0?this.loader_=e.loader:this.url_!==void 0&&(pt(this.format_,"`format` must be set when `url` is set"),this.loader_=Gw(this.url_,this.format_)),this.strategy_=e.strategy!==void 0?e.strategy:wse;const n=e.useSpatialIndex!==void 0?e.useSpatialIndex:!0;this.featuresRtree_=n?new Kw:null,this.loadedExtentsRtree_=new Kw,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let i,s;Array.isArray(e.features)?s=e.features:e.features&&(i=e.features,s=i.getArray()),!n&&i===void 0&&(i=new Ps(s)),s!==void 0&&this.addFeaturesInternal(s),i!==void 0&&this.bindFeaturesCollection_(i)}addFeature(e){this.addFeatureInternal(e),this.changed()}addFeatureInternal(e){const n=wt(e);if(!this.addToIndex_(n,e)){this.featuresCollection_&&this.featuresCollection_.remove(e);return}this.setupChangeEvents_(n,e);const i=e.getGeometry();if(i){const s=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(s,e)}else this.nullGeometryFeatures_[n]=e;this.dispatchEvent(new Or(Bi.ADDFEATURE,e))}setupChangeEvents_(e,n){n instanceof is||(this.featureChangeKeys_[e]=[ht(n,et.CHANGE,this.handleFeatureChange_,this),ht(n,Nl.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(e,n){let i=!0;if(n.getId()!==void 0){const s=String(n.getId());if(!(s in this.idIndex_))this.idIndex_[s]=n;else if(n instanceof is){const r=this.idIndex_[s];r instanceof is?Array.isArray(r)?r.push(n):this.idIndex_[s]=[r,n]:i=!1}else i=!1}return i&&(pt(!(e in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[e]=n),i}addFeatures(e){this.addFeaturesInternal(e),this.changed()}addFeaturesInternal(e){const n=[],i=[],s=[];for(let r=0,o=e.length;r{n||(n=!0,this.addFeature(i.element),n=!1)}),e.addEventListener(fi.REMOVE,i=>{n||(n=!0,this.removeFeature(i.element),n=!1)}),this.featuresCollection_=e}clear(e){if(e){for(const i in this.featureChangeKeys_)this.featureChangeKeys_[i].forEach(Rt);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const i=s=>{this.removeFeatureInternal(s)};this.featuresRtree_.forEach(i);for(const s in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[s])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const n=new Or(Bi.CLEAR);this.dispatchEvent(n),this.changed()}forEachFeature(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureAtCoordinateDirect(e,n){const i=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(i,function(s){const r=s.getGeometry();if(r instanceof is||r.intersectsCoordinate(e))return n(s)})}forEachFeatureInExtent(e,n){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,n);this.featuresCollection_&&this.featuresCollection_.forEach(n)}forEachFeatureIntersectingExtent(e,n){return this.forEachFeatureInExtent(e,function(i){const s=i.getGeometry();if(s instanceof is||s.intersectsExtent(e)){const r=n(i);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let e;return this.featuresCollection_?e=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(e=this.featuresRtree_.getAll(),Bl(this.nullGeometryFeatures_)||$f(e,Object.values(this.nullGeometryFeatures_))),e}getFeaturesAtCoordinate(e){const n=[];return this.forEachFeatureAtCoordinateDirect(e,function(i){n.push(i)}),n}getFeaturesInExtent(e,n){if(this.featuresRtree_){if(!(n&&n.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(e);const s=py(e,n);return[].concat(...s.map(r=>this.featuresRtree_.getInExtent(r)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(e,n){const i=e[0],s=e[1];let r=null;const o=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return n=n||vu,this.featuresRtree_.forEachInExtent(l,function(c){if(n(c)){const u=c.getGeometry(),d=a;if(a=u instanceof is?0:u.closestPointXY(i,s,o,a),a{--this.loadingExtentsCount_,this.dispatchEvent(new Or(Bi.FEATURESLOADEND,void 0,u))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Or(Bi.FEATURESLOADERROR))}),s.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(e){const n=this.loadedExtentsRtree_;let i;n.forEachInExtent(e,function(s){if(bu(s.extent,e))return i=s,!0}),i&&n.remove(i)}removeFeatures(e){let n=!1;for(let i=0,s=e.length;ie.geo&&e.geo.lat&&e.geo.lon);return t?[t.geo.lon,t.geo.lat]:[0,0]}return[this.d.geo.lon,this.d.geo.lat]}},async mounted(){await fetch("https://tile.openstreetmap.org/",{signal:AbortSignal.timeout(1500)}).then(t=>{const e=new tie({target:"map",layers:[new Wie({source:new Mie})],view:new Ts({center:cp(this.getLastLonLat()),zoom:this.type==="traceroute"?3:10})}),n=[],i=new Cse;if(this.type==="traceroute")console.log(this.getLastLonLat()),this.d.forEach(a=>{if(a.geo&&a.geo.lat&&a.geo.lon){const l=cp([a.geo.lon,a.geo.lat]);n.push(l);const c=this.getLastLonLat();console.log(a.geo.lon,a.geo.lat),console.log(a.geo.lon===c[0]&&a.geo.lat===c[1]);const u=new Jc({geometry:new Eu(l),last:a.geo.lon===c[0]&&a.geo.lat===c[1]});i.addFeature(u)}});else{const a=cp([this.d.geo.lon,this.d.geo.lat]);n.push(a);const l=new Jc({geometry:new Eu(a)});i.addFeature(l)}const s=new Gh(n),r=new Jc({geometry:s});i.addFeature(r);const o=new vse({source:i,style:function(a){if(a.getGeometry().getType()==="Point")return new pr({image:new Zu({radius:10,fill:new Zl({color:a.get("last")?"#dc3545":"#0d6efd"}),stroke:new Hl({color:"white",width:5})})});if(a.getGeometry().getType()==="LineString")return new pr({stroke:new Hl({color:"#0d6efd",width:2})})}});e.addLayer(o),this.store.Configuration.Server.dashboard_theme==="dark"&&e.on("postcompose",function(a){document.querySelector("#map").style.filter="grayscale(80%) invert(100%) "})}).catch(t=>{this.osmAvailable=!1})}},Tse={key:0,id:"map",class:"w-100 rounded-3"};function Ase(t,e,n,i,s,r){return this.osmAvailable?(R(),V("div",Tse)):ce("",!0)}const ak=je(Sse,[["render",Ase]]),kse={name:"ping",components:{OSMap:ak,LocaleText:He},data(){return{loading:!1,cips:{},selectedConfiguration:void 0,selectedPeer:void 0,selectedIp:void 0,count:4,pingResult:void 0,pinging:!1}},setup(){return{store:tt()}},mounted(){Yt("/api/ping/getAllPeersIpAddress",{},t=>{t.status&&(this.loading=!0,this.cips=t.data,console.log(this.cips))})},methods:{execute(){this.selectedIp&&(this.pinging=!0,this.pingResult=void 0,Yt("/api/ping/execute",{ipAddress:this.selectedIp,count:this.count},t=>{t.status?this.pingResult=t.data:this.store.newMessage("Server",t.message,"danger"),this.pinging=!1}))}},watch:{selectedConfiguration(){this.selectedPeer=void 0,this.selectedIp=void 0},selectedPeer(){this.selectedIp=void 0}}},Mse={class:"mt-md-5 mt-3 text-body"},Pse={class:"container"},Ise={class:"row"},Dse={class:"col-sm-4 d-flex gap-2 flex-column"},Rse={class:"mb-1 text-muted",for:"configuration"},Lse=["disabled"],Ose=["value"],$se={class:"mb-1 text-muted",for:"peer"},Nse=["disabled"],Fse=["value"],Bse={class:"mb-1 text-muted",for:"ip"},Vse=["disabled"],zse={class:"d-flex align-items-center gap-2"},Wse={class:"text-muted"},Yse={class:"mb-1 text-muted",for:"ipAddress"},Hse=["disabled"],jse={class:"mb-1 text-muted",for:"count"},Kse={class:"d-flex gap-3 align-items-center"},Use=["disabled"],Gse=["disabled"],Xse={key:0,class:"d-block"},qse={key:1,class:"d-block"},Zse={class:"col-sm-8 position-relative"},Jse={key:"pingPlaceholder"},Qse={key:"pingResult",class:"d-flex flex-column gap-2 w-100"},ere={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.15s"}},tre={class:"card-body row"},nre={class:"col-sm"},ire={class:"mb-0 text-muted"},sre={key:0,class:"col-sm"},rre={class:"mb-0 text-muted"},ore={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.3s"}},are={class:"card-body"},lre={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.45s"}},cre={class:"card-body"},ure={class:"mb-0 text-muted"},dre={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.6s"}},hre={class:"card-body"},fre={class:"mb-0 text-muted"};function gre(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("OSMap");return R(),V("div",Mse,[g("div",Pse,[e[19]||(e[19]=g("h3",{class:"mb-3 text-body"},"Ping",-1)),g("div",Ise,[g("div",Dse,[g("div",null,[g("label",Rse,[g("small",null,[N(o,{t:"Configuration"})])]),$e(g("select",{class:"form-select","onUpdate:modelValue":e[0]||(e[0]=l=>this.selectedConfiguration=l),disabled:this.pinging},[e[7]||(e[7]=g("option",{disabled:"",selected:"",value:void 0},null,-1)),(R(!0),V(Oe,null,Ze(this.cips,(l,c)=>(R(),V("option",{value:c},xe(c),9,Ose))),256))],8,Lse),[[oh,this.selectedConfiguration]])]),g("div",null,[g("label",$se,[g("small",null,[N(o,{t:"Peer"})])]),$e(g("select",{id:"peer",class:"form-select","onUpdate:modelValue":e[1]||(e[1]=l=>this.selectedPeer=l),disabled:this.selectedConfiguration===void 0||this.pinging},[e[8]||(e[8]=g("option",{disabled:"",selected:"",value:void 0},null,-1)),this.selectedConfiguration!==void 0?(R(!0),V(Oe,{key:0},Ze(this.cips[this.selectedConfiguration],(l,c)=>(R(),V("option",{value:c},xe(c),9,Fse))),256)):ce("",!0)],8,Nse),[[oh,this.selectedPeer]])]),g("div",null,[g("label",Bse,[g("small",null,[N(o,{t:"IP Address"})])]),$e(g("select",{id:"ip",class:"form-select","onUpdate:modelValue":e[2]||(e[2]=l=>this.selectedIp=l),disabled:this.selectedPeer===void 0||this.pinging},[e[9]||(e[9]=g("option",{disabled:"",selected:"",value:void 0},null,-1)),this.selectedPeer!==void 0?(R(!0),V(Oe,{key:0},Ze(this.cips[this.selectedConfiguration][this.selectedPeer].allowed_ips,l=>(R(),V("option",null,xe(l),1))),256)):ce("",!0)],8,Vse),[[oh,this.selectedIp]])]),g("div",zse,[e[10]||(e[10]=g("div",{class:"flex-grow-1 border-top"},null,-1)),g("small",Wse,[N(o,{t:"OR"})]),e[11]||(e[11]=g("div",{class:"flex-grow-1 border-top"},null,-1))]),g("div",null,[g("label",Yse,[g("small",null,[N(o,{t:"Enter IP Address / Hostname"})])]),$e(g("input",{class:"form-control",type:"text",id:"ipAddress",disabled:this.pinging,"onUpdate:modelValue":e[3]||(e[3]=l=>this.selectedIp=l)},null,8,Hse),[[We,this.selectedIp]])]),e[16]||(e[16]=g("div",{class:"w-100 border-top my-2"},null,-1)),g("div",null,[g("label",jse,[g("small",null,[N(o,{t:"Count"})])]),g("div",Kse,[g("button",{onClick:e[4]||(e[4]=l=>this.count--),disabled:this.count===1,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis"},e[12]||(e[12]=[g("i",{class:"bi bi-dash-lg"},null,-1)]),8,Use),g("strong",null,xe(this.count),1),g("button",{role:"button",onClick:e[5]||(e[5]=l=>this.count++),class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis"},e[13]||(e[13]=[g("i",{class:"bi bi-plus-lg"},null,-1)]))])]),g("button",{class:"btn btn-primary rounded-3 mt-3 position-relative",disabled:!this.selectedIp||this.pinging,onClick:e[6]||(e[6]=l=>this.execute())},[N($t,{name:"slide"},{default:De(()=>[this.pinging?(R(),V("span",qse,e[15]||(e[15]=[g("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1),g("span",{class:"visually-hidden",role:"status"},"Loading...",-1)]))):(R(),V("span",Xse,e[14]||(e[14]=[g("i",{class:"bi bi-person-walking me-2"},null,-1),Ue("Ping! ")])))]),_:1})],8,Gse)]),g("div",Zse,[N($t,{name:"ping"},{default:De(()=>[this.pingResult?(R(),V("div",Qse,[this.pingResult.geo&&this.pingResult.geo.status==="success"?(R(),Se(a,{key:0,d:this.pingResult},null,8,["d"])):ce("",!0),g("div",ere,[g("div",tre,[g("div",nre,[g("p",ire,[g("small",null,[N(o,{t:"IP Address"})])]),Ue(" "+xe(this.pingResult.address),1)]),this.pingResult.geo&&this.pingResult.geo.status==="success"?(R(),V("div",sre,[g("p",rre,[g("small",null,[N(o,{t:"Geolocation"})])]),Ue(" "+xe(this.pingResult.geo.city)+", "+xe(this.pingResult.geo.country),1)])):ce("",!0)])]),g("div",ore,[g("div",are,[e[18]||(e[18]=g("p",{class:"mb-0 text-muted"},[g("small",null,"Is Alive")],-1)),g("span",{class:Pe([this.pingResult.is_alive?"text-success":"text-danger"])},[g("i",{class:Pe(["bi me-1",[this.pingResult.is_alive?"bi-check-circle-fill":"bi-x-circle-fill"]])},null,2),Ue(" "+xe(this.pingResult.is_alive?"Yes":"No"),1)],2)])]),g("div",lre,[g("div",cre,[g("p",ure,[g("small",null,[N(o,{t:"Average / Min / Max Round Trip Time"})])]),g("samp",null,xe(this.pingResult.avg_rtt)+"ms / "+xe(this.pingResult.min_rtt)+"ms / "+xe(this.pingResult.max_rtt)+"ms ",1)])]),g("div",dre,[g("div",hre,[g("p",fre,[g("small",null,[N(o,{t:"Sent / Received / Lost Package"})])]),g("samp",null,xe(this.pingResult.package_sent)+" / "+xe(this.pingResult.package_received)+" / "+xe(this.pingResult.package_loss),1)])])])):(R(),V("div",Jse,[e[17]||(e[17]=g("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px"}},null,-1)),(R(),V(Oe,null,Ze(4,l=>g("div",{class:Pe(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.pinging}]),style:Pn({"animation-delay":`${l*.15}s`})},null,6)),64))]))]),_:1})])])])])}const pre=je(kse,[["render",gre],["__scopeId","data-v-f5cd36ce"]]),mre={name:"traceroute",components:{LocaleText:He,OSMap:ak},data(){return{tracing:!1,ipAddress:void 0,tracerouteResult:void 0}},setup(){return{store:qn()}},methods:{execute(){this.ipAddress&&(this.tracing=!0,this.tracerouteResult=void 0,Yt("/api/traceroute/execute",{ipAddress:this.ipAddress},t=>{t.status?this.tracerouteResult=t.data:this.store.newMessage("Server",t.message,"danger"),this.tracing=!1}))}}},_re={class:"mt-md-5 mt-3 text-body"},yre={class:"container-md"},vre={class:"mb-3 text-body"},bre={class:"d-flex gap-2 flex-column mb-5"},wre={class:"mb-1 text-muted",for:"ipAddress"},xre=["disabled"],Ere=["disabled"],Cre={key:0,class:"d-block"},Sre={key:1,class:"d-block"},Tre={class:"position-relative"},Are={key:"pingPlaceholder"},kre={key:1},Mre={key:"table",class:"w-100 mt-2"},Pre={class:"table table-sm rounded-3 w-100"},Ire={scope:"col"},Dre={scope:"col"},Rre={scope:"col"},Lre={scope:"col"},Ore={scope:"col"},$re={scope:"col"},Nre={key:0};function Fre(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("OSMap");return R(),V("div",_re,[g("div",yre,[g("h3",vre,[N(o,{t:"Traceroute"})]),g("div",bre,[g("div",null,[g("label",wre,[g("small",null,[N(o,{t:"Enter IP Address / Hostname"})])]),$e(g("input",{disabled:this.tracing,id:"ipAddress",class:"form-control","onUpdate:modelValue":e[0]||(e[0]=l=>this.ipAddress=l),onKeyup:e[1]||(e[1]=eC(l=>this.execute(),["enter"])),type:"text"},null,40,xre),[[We,this.ipAddress]])]),g("button",{class:"btn btn-primary rounded-3 mt-3 position-relative",disabled:this.tracing||!this.ipAddress,onClick:e[2]||(e[2]=l=>this.execute())},[N($t,{name:"slide"},{default:De(()=>[this.tracing?(R(),V("span",Sre,e[4]||(e[4]=[g("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1),g("span",{class:"visually-hidden",role:"status"},"Loading...",-1)]))):(R(),V("span",Cre,e[3]||(e[3]=[g("i",{class:"bi bi-person-walking me-2"},null,-1),Ue("Trace! ")])))]),_:1})],8,Ere)]),g("div",Tre,[N($t,{name:"ping"},{default:De(()=>[this.tracerouteResult?(R(),V("div",kre,[N(a,{d:this.tracerouteResult,type:"traceroute"},null,8,["d"]),g("div",Mre,[g("table",Pre,[g("thead",null,[g("tr",null,[g("th",Ire,[N(o,{t:"Hop"})]),g("th",Dre,[N(o,{t:"IP Address"})]),g("th",Rre,[N(o,{t:"Average RTT (ms)"})]),g("th",Lre,[N(o,{t:"Min RTT (ms)"})]),g("th",Ore,[N(o,{t:"Max RTT (ms)"})]),g("th",$re,[N(o,{t:"Geolocation"})])])]),g("tbody",null,[(R(!0),V(Oe,null,Ze(this.tracerouteResult,(l,c)=>(R(),V("tr",null,[g("td",null,[g("small",null,xe(l.hop),1)]),g("td",null,[g("small",null,xe(l.ip),1)]),g("td",null,[g("small",null,xe(l.avg_rtt),1)]),g("td",null,[g("small",null,xe(l.min_rtt),1)]),g("td",null,[g("small",null,xe(l.max_rtt),1)]),g("td",null,[l.geo.city&&l.geo.country?(R(),V("span",Nre,[g("small",null,xe(l.geo.city)+", "+xe(l.geo.country),1)])):ce("",!0)])]))),256))])])])])):(R(),V("div",Are,[e[5]||(e[5]=g("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px !important"}},null,-1)),(R(),V(Oe,null,Ze(5,l=>g("div",{class:Pe(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.tracing}]),style:Pn({"animation-delay":`${l*.05}s`})},null,6)),64))]))]),_:1})])])])}const Bre=je(mre,[["render",Fre],["__scopeId","data-v-6d6cffc9"]]),Vre={name:"totp",components:{LocaleText:He},async setup(){const t=tt();let e="";return await Yt("/api/Welcome_GetTotpLink",{},n=>{n.status&&(e=n.data)}),{l:e,store:t}},mounted(){this.l&&ba.toCanvas(document.getElementById("qrcode"),this.l,function(t){})},data(){return{totp:"",totpInvalidMessage:"",verified:!1}},methods:{validateTotp(){}},watch:{totp(t){const e=document.querySelector("#totp");e.classList.remove("is-invalid","is-valid"),t.length===6&&(console.log(t),/[0-9]{6}/.test(t)?xt("/api/Welcome_VerifyTotpLink",{totp:t},n=>{n.status?(this.verified=!0,e.classList.add("is-valid"),this.$emit("verified")):(e.classList.add("is-invalid"),this.totpInvalidMessage="TOTP does not match.")}):(e.classList.add("is-invalid"),this.totpInvalidMessage="TOTP can only contain numbers"))}}},zre=["data-bs-theme"],Wre={class:"m-auto text-body",style:{width:"500px"}},Yre={class:"d-flex flex-column"},Hre={class:"dashboardLogo display-4"},jre={class:"mb-2"},Kre={class:"text-muted"},Ure={class:"p-3 bg-body-secondary rounded-3 border mb-3"},Gre={class:"text-muted mb-0"},Xre=["href"],qre={style:{"line-break":"anywhere"}},Zre={for:"totp",class:"mb-2"},Jre={class:"text-muted"},Qre={class:"form-group mb-2"},eoe=["disabled"],toe={class:"invalid-feedback"},noe={class:"valid-feedback"},ioe={class:"d-flex gap-3 mt-5 flex-column"};function soe(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),V("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[g("div",Wre,[g("div",Yre,[g("div",null,[g("h1",Hre,[N(o,{t:"Multi-Factor Authentication (MFA)"})]),g("p",jre,[g("small",Kre,[N(o,{t:"1. Please scan the following QR Code to generate TOTP with your choice of authenticator"})])]),e[1]||(e[1]=g("canvas",{id:"qrcode",class:"rounded-3 mb-2"},null,-1)),g("div",Ure,[g("p",Gre,[g("small",null,[N(o,{t:"Or you can click the link below:"})])]),g("a",{href:this.l},[g("code",qre,xe(this.l),1)],8,Xre)]),g("label",Zre,[g("small",Jre,[N(o,{t:"2. Enter the TOTP generated by your authenticator to verify"})])]),g("div",Qre,[$e(g("input",{class:"form-control text-center totp",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code","onUpdate:modelValue":e[0]||(e[0]=l=>this.totp=l),disabled:this.verified},null,8,eoe),[[We,this.totp]]),g("div",toe,[N(o,{t:this.totpInvalidMessage},null,8,["t"])]),g("div",noe,[N(o,{t:"TOTP verified!"})])])]),e[4]||(e[4]=g("hr",null,null,-1)),g("div",ioe,[this.verified?(R(),Se(a,{key:1,to:"/",class:"btn btn-dark btn-lg d-flex btn-brand shadow align-items-center flex-grow-1 rounded-3"},{default:De(()=>[N(o,{t:"Complete"}),e[3]||(e[3]=g("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1})):(R(),Se(a,{key:0,to:"/",class:"btn bg-secondary-subtle text-secondary-emphasis rounded-3 flex-grow-1 btn-lg border-1 border-secondary-subtle shadow d-flex"},{default:De(()=>[N(o,{t:"I don't need MFA"}),e[2]||(e[2]=g("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1}))])])])],8,zre)}const roe=je(Vre,[["render",soe]]),ooe={name:"share",components:{LocaleText:He},async setup(){const t=lO(),e=we(!1),n=tt(),i=we(""),s=we(void 0),r=we(new Blob);await Yt("/api/getDashboardTheme",{},a=>{i.value=a.data});const o=t.query.ShareID;return o===void 0||o.length===0?(s.value=void 0,e.value=!0):await Yt("/api/sharePeer/get",{ShareID:o},a=>{a.status?(s.value=a.data,r.value=new Blob([s.value.file],{type:"text/plain"})):s.value=void 0,e.value=!0}),{store:n,theme:i,peerConfiguration:s,blob:r}},mounted(){this.peerConfiguration&&ba.toCanvas(document.querySelector("#qrcode"),this.peerConfiguration.file,t=>{t&&console.error(t)})},methods:{download(){const t=new Blob([this.peerConfiguration.file],{type:"text/plain"}),e=URL.createObjectURL(t),n=`${this.peerConfiguration.fileName}.conf`,i=document.createElement("a");i.href=e,i.download=n,i.click()}},computed:{getBlob(){return URL.createObjectURL(this.blob)}}},aoe=["data-bs-theme"],loe={class:"m-auto text-body",style:{width:"500px"}},coe={key:0,class:"text-center position-relative",style:{}},uoe={class:"position-absolute w-100 h-100 top-0 start-0 d-flex animate__animated animate__fadeInUp",style:{"animation-delay":"0.1s"}},doe={class:"m-auto"},hoe={key:1,class:"d-flex align-items-center flex-column gap-3"},foe={class:"h1 dashboardLogo text-center animate__animated animate__fadeInUp"},goe={id:"qrcode",class:"rounded-3 shadow animate__animated animate__fadeInUp mb-3",ref:"qrcode"},poe={class:"text-muted animate__animated animate__fadeInUp mb-1",style:{"animation-delay":"0.2s"}},moe=["download","href"];function _oe(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.theme},[g("div",loe,[this.peerConfiguration?(R(),V("div",hoe,[g("div",foe,[e[1]||(e[1]=g("h6",null,"WGDashboard",-1)),N(o,{t:"Scan QR Code with the WireGuard App to add peer"})]),g("canvas",goe,null,512),g("p",poe,[N(o,{t:"or click the button below to download the "}),e[2]||(e[2]=g("samp",null,".conf",-1)),N(o,{t:" file"})]),g("a",{download:this.peerConfiguration.fileName+".conf",href:r.getBlob,class:"btn btn-lg bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle animate__animated animate__fadeInUp shadow-sm",style:{"animation-delay":"0.25s"}},e[3]||(e[3]=[g("i",{class:"bi bi-download"},null,-1)]),8,moe)])):(R(),V("div",coe,[e[0]||(e[0]=g("div",{class:"animate__animated animate__fadeInUp"},[g("h1",{style:{"font-size":"20rem",filter:"blur(1rem)","animation-duration":"7s"},class:"animate__animated animate__flash animate__infinite"},[g("i",{class:"bi bi-file-binary"})])],-1)),g("div",uoe,[g("h3",doe,[N(o,{t:"Oh no... This link is either expired or invalid."})])])]))])],8,aoe)}const yoe=je(ooe,[["render",_oe],["__scopeId","data-v-1b44aacd"]]),voe=async()=>{let t=!1;return await Yt("/api/validateAuthentication",{},e=>{t=e.status}),t},Ql=oO({history:NL(),scrollBehavior(){document.querySelector("main")!==null&&document.querySelector("main").scrollTo({top:0})},routes:[{name:"Index",path:"/",component:JO,meta:{requiresAuth:!0},children:[{name:"Configuration List",path:"",component:xN,meta:{title:"WireGuard Configurations"}},{name:"Settings",path:"/settings",component:S6,meta:{title:"Settings"}},{path:"/ping",name:"Ping",component:pre},{path:"/traceroute",name:"Traceroute",component:Bre},{name:"New Configuration",path:"/new_configuration",component:Xz,meta:{title:"New Configuration"}},{name:"Configuration",path:"/configuration/:id",component:Qz,meta:{title:"Configuration"},children:[{name:"Peers List",path:"peers",component:qQ},{name:"Peers Create",path:"create",component:HT}]}]},{path:"/signin",component:j$,meta:{title:"Sign In"}},{path:"/welcome",component:H6,meta:{requiresAuth:!0,title:"Welcome to WGDashboard"}},{path:"/2FASetup",component:roe,meta:{requiresAuth:!0,title:"Multi-Factor Authentication Setup"}},{path:"/share",component:yoe,meta:{title:"Share"}}]});Ql.beforeEach(async(t,e,n)=>{const i=qn(),s=tt();t.meta.title?t.params.id?document.title=t.params.id+" | WGDashboard":document.title=t.meta.title+" | WGDashboard":document.title="WGDashboard",s.ShowNavBar=!1,document.querySelector(".loadingBar").classList.remove("loadingDone"),document.querySelector(".loadingBar").classList.add("loading"),t.meta.requiresAuth?s.getActiveCrossServer()?(await s.getConfiguration(),!i.Configurations&&t.name!=="Configuration List"&&await i.getConfigurations(),n()):cO.getCookie("authToken")&&await voe()?(await s.getConfiguration(),!i.Configurations&&t.name!=="Configuration List"&&await i.getConfigurations(),s.Redirect=void 0,n()):(s.Redirect=t,n("/signin"),s.newMessage("WGDashboard","Sign in session ended, please sign in again","warning")):n()});Ql.afterEach(()=>{document.querySelector(".loadingBar").classList.remove("loading"),document.querySelector(".loadingBar").classList.add("loadingDone")});const lk=()=>{let t={"content-type":"application/json"};const n=tt().getActiveCrossServer();return n&&(t["wg-dashboard-apikey"]=n.apiKey),t},ck=t=>{const n=tt().getActiveCrossServer();return n?`${n.host}${t}`:`${window.location.protocol}//${(window.location.host+window.location.pathname+t).replace(/\/\//g,"/")}`},Yt=async(t,e=void 0,n=void 0)=>{const i=new URLSearchParams(e);await fetch(`${ck(t)}?${i.toString()}`,{headers:lk()}).then(s=>{const r=tt();if(s.ok)return s.json();if(s.status!==200)throw s.status===401&&r.newMessage("WGDashboard","Sign in session ended, please sign in again","warning"),new Error(s.statusText)}).then(s=>n?n(s):void 0).catch(s=>{console.log(s),Ql.push({path:"/signin"})})},xt=async(t,e,n)=>{await fetch(`${ck(t)}`,{headers:lk(),method:"POST",body:JSON.stringify(e)}).then(i=>{const s=tt();if(i.ok)return i.json();if(i.status!==200)throw i.status===401&&s.newMessage("WGDashboard","Sign in session ended, please sign in again","warning"),new Error(i.statusText)}).then(i=>n?n(i):void 0).catch(i=>{console.log(i),Ql.push({path:"/signin"})})},tt=oC("DashboardConfigurationStore",{state:()=>({Redirect:void 0,Configuration:void 0,Messages:[],Peers:{Selecting:!1,RefreshInterval:void 0},CrossServerConfiguration:{Enable:!1,ServerList:{}},ActiveServerConfiguration:void 0,IsElectronApp:!1,ShowNavBar:!1,Locale:void 0}),actions:{initCrossServerConfiguration(){const t=localStorage.getItem("CrossServerConfiguration");localStorage.getItem("ActiveCrossServerConfiguration")!==null&&(this.ActiveServerConfiguration=localStorage.getItem("ActiveCrossServerConfiguration")),t===null?window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration)):this.CrossServerConfiguration=JSON.parse(t)},syncCrossServerConfiguration(){window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration))},addCrossServerConfiguration(){this.CrossServerConfiguration.ServerList[Bs().toString()]={host:"",apiKey:"",active:!1}},deleteCrossServerConfiguration(t){delete this.CrossServerConfiguration.ServerList[t]},getActiveCrossServer(){const t=localStorage.getItem("ActiveCrossServerConfiguration");if(t!==null)return this.CrossServerConfiguration.ServerList[t]},setActiveCrossServer(t){this.ActiveServerConfiguration=t,localStorage.setItem("ActiveCrossServerConfiguration",t)},removeActiveCrossServer(){this.ActiveServerConfiguration=void 0,localStorage.removeItem("ActiveCrossServerConfiguration")},async getConfiguration(){await Yt("/api/getDashboardConfiguration",{},t=>{t.status&&(this.Configuration=t.data)})},async signOut(){await Yt("/api/signout",{},t=>{this.removeActiveCrossServer(),this.$router.go("/signin")})},newMessage(t,e,n){this.Messages.push({id:Bs(),from:At(t),content:At(e),type:n,show:!0})},applyLocale(t){if(this.Locale===null)return t;const n=Object.keys(this.Locale).filter(i=>t.match(new RegExp("^"+i+"$","g"))!==null);return console.log(n),n.length===0||n.length>1?t:this.Locale[n[0]]}}}),boe={class:"navbar bg-dark sticky-top","data-bs-theme":"dark"},woe={class:"container-fluid d-flex text-body align-items-center"},xoe={key:0,class:"ms-auto text-muted"},Eoe={__name:"App",setup(t){const e=tt();e.initCrossServerConfiguration(),window.IS_WGDASHBOARD_DESKTOP&&(e.IsElectronApp=!0,e.CrossServerConfiguration.Enable=!0),un(e.CrossServerConfiguration,()=>{e.syncCrossServerConfiguration()},{deep:!0});const n=be(()=>{if(e.ActiveServerConfiguration)return e.CrossServerConfiguration.ServerList[e.ActiveServerConfiguration]});return(i,s)=>(R(),V(Oe,null,[s[4]||(s[4]=g("div",{style:{"z-index":"9999",height:"5px"},class:"position-absolute loadingBar top-0 start-0"},null,-1)),g("nav",boe,[g("div",woe,[s[3]||(s[3]=g("span",{class:"navbar-brand mb-0 h1"},"WGDashboard",-1)),n.value!==void 0?(R(),V("small",xoe,[s[1]||(s[1]=g("i",{class:"bi bi-server me-2"},null,-1)),Ue(xe(n.value.host),1)])):ce("",!0),g("a",{role:"button",class:"navbarBtn text-body",onClick:s[0]||(s[0]=r=>J(e).ShowNavBar=!J(e).ShowNavBar),style:{"line-height":"0","font-size":"2rem"}},s[2]||(s[2]=[g("i",{class:"bi bi-list"},null,-1)]))])]),(R(),Se(p_,null,{default:De(()=>[N(J(vC),null,{default:De(({Component:r})=>[N($t,{name:"app",mode:"out-in",type:"transition"},{default:De(()=>[(R(),Se(ma(r)))]),_:2},1024)]),_:1})]),_:1}))],64))}},Coe=je(Eoe,[["__scopeId","data-v-95a5c797"]]);let $m;await fetch("/api/locale").then(t=>t.json()).then(t=>$m=t.data).catch(()=>{$m=null});const Ky=qR(Coe);Ky.use(Ql);const uk=eL();uk.use(({store:t})=>{t.$router=of(Ql)});Ky.use(uk);const Soe=tt();Soe.Locale=$m;Ky.mount("#app"); +`){ne+=Y,Y=0,k=d*x+A*h,++F;continue}const H=f[z+1]||l.font;H!==D&&(s&&P.push("font",H),i&&B.push("font",H),D=H),Y=Math.max(Y,v[$]);const le=[Z,k+A*y[$]+d*(y[$]-b[F]),.5*(h+Y)+ne];k+=y[$],s&&P.push("strokeText",le),i&&B.push("fillText",le),++$}return Array.prototype.push.apply(E,P),Array.prototype.push.apply(E,B),this.labels_[r]=T,T}replayTextBackground_(e,n,i,s,r,o,a){e.beginPath(),e.moveTo.apply(e,n),e.lineTo.apply(e,i),e.lineTo.apply(e,s),e.lineTo.apply(e,r),e.lineTo.apply(e,n),o&&(this.alignAndScaleFill_=o[2],this.fill_(e)),a&&(this.setStrokeStyle_(e,a),e.stroke())}calculateImageOrLabelDimensions_(e,n,i,s,r,o,a,l,c,u,d,h,f,p,m,y){a*=h[0],l*=h[1];let v=i-a,b=s-l;const x=r+c>e?e-c:r,E=o+u>n?n-u:o,w=p[3]+x*h[0]+p[1],S=p[0]+E*h[1]+p[2],T=v-p[3],A=b-p[0];(m||d!==0)&&(Rr[0]=T,Lr[0]=T,Rr[1]=A,Gs[1]=A,Gs[0]=T+w,Xs[0]=Gs[0],Xs[1]=A+S,Lr[1]=Xs[1]);let k;return d!==0?(k=br(hs(),i,s,1,1,d,-i,-s),On(k,Rr),On(k,Gs),On(k,Xs),On(k,Lr),uo(Math.min(Rr[0],Gs[0],Xs[0],Lr[0]),Math.min(Rr[1],Gs[1],Xs[1],Lr[1]),Math.max(Rr[0],Gs[0],Xs[0],Lr[0]),Math.max(Rr[1],Gs[1],Xs[1],Lr[1]),ja)):uo(Math.min(T,T+w),Math.min(A,A+S),Math.max(T,T+w),Math.max(A,A+S),ja),f&&(v=Math.round(v),b=Math.round(b)),{drawImageX:v,drawImageY:b,drawImageW:x,drawImageH:E,originX:c,originY:u,declutterBox:{minX:ja[0],minY:ja[1],maxX:ja[2],maxY:ja[3],value:y},canvasTransform:k,scale:h}}replayImageOrLabel_(e,n,i,s,r,o,a){const l=!!(o||a),c=s.declutterBox,u=a?a[2]*s.scale[0]/2:0;return c.minX-u<=n[0]&&c.maxX+u>=0&&c.minY-u<=n[1]&&c.maxY+u>=0&&(l&&this.replayTextBackground_(e,Rr,Gs,Xs,Lr,o,a),Ote(e,s.canvasTransform,r,i,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(e){const n=this.alignAndScaleFill_;if(n){const i=On(this.renderedTransform_,[0,0]),s=512*this.pixelRatio;e.save(),e.translate(i[0]%s,i[1]%s),n!==1&&e.scale(n,n),e.rotate(this.viewRotation_)}e.fill(),n&&e.restore()}setStrokeStyle_(e,n){e.strokeStyle=n[1],e.lineWidth=n[2],e.lineCap=n[3],e.lineJoin=n[4],e.miterLimit=n[5],e.lineDashOffset=n[7],e.setLineDash(n[6])}drawLabelWithPointPlacement_(e,n,i,s){const r=this.textStates[n],o=this.createLabel(e,n,s,i),a=this.strokeStates[i],l=this.pixelRatio,c=Ap(Array.isArray(e)?e[0]:e,r.textAlign||Mu),u=Xh[r.textBaseline||zh],d=a&&a.lineWidth?a.lineWidth:0,h=o.width/l-2*r.scale[0],f=c*h+2*(.5-c)*d,p=u*o.height/l+2*(.5-u)*d;return{label:o,anchorX:f,anchorY:p}}execute_(e,n,i,s,r,o,a,l){const c=this.zIndexContext_;let u;this.pixelCoordinates_&&Eo(i,this.renderedTransform_)?u=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),u=io(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),$ee(this.renderedTransform_,i));let d=0;const h=s.length;let f=0,p,m,y,v,b,x,E,w,S,T,A,k,P,B=0,Y=0,ne=null,$=null;const F=this.coordinateCache_,D=this.viewRotation_,z=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,X={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:D},Z=this.instructions!=s||this.overlaps?0:200;let H,le,ie,te;for(;dZ&&(this.fill_(e),B=0),Y>Z&&(e.stroke(),Y=0),!B&&!Y&&(e.beginPath(),b=NaN,x=NaN),++d;break;case Ke.CIRCLE:f=I[1];const ue=u[f],L=u[f+1],ae=u[f+2],de=u[f+3],ve=ae-ue,W=de-L,fe=Math.sqrt(ve*ve+W*W);e.moveTo(ue+fe,L),e.arc(ue,L,fe,0,2*Math.PI,!0),++d;break;case Ke.CLOSE_PATH:e.closePath(),++d;break;case Ke.CUSTOM:f=I[1],p=I[2];const C=I[3],O=I[4],K=I[5];X.geometry=C,X.feature=H,d in F||(F[d]=[]);const U=F[d];K?K(u,f,p,2,U):(U[0]=u[f],U[1]=u[f+1],U.length=2),c&&(c.zIndex=I[6]),O(U,X),++d;break;case Ke.DRAW_IMAGE:f=I[1],p=I[2],S=I[3],m=I[4],y=I[5];let re=I[6];const j=I[7],se=I[8],Q=I[9],ge=I[10];let _e=I[11];const ye=I[12];let ke=I[13];v=I[14]||"declutter";const Me=I[15];if(!S&&I.length>=20){T=I[19],A=I[20],k=I[21],P=I[22];const pn=this.drawLabelWithPointPlacement_(T,A,k,P);S=pn.label,I[3]=S;const Cn=I[23];m=(pn.anchorX-Cn)*this.pixelRatio,I[4]=m;const Sn=I[24];y=(pn.anchorY-Sn)*this.pixelRatio,I[5]=y,re=S.height,I[6]=re,ke=S.width,I[13]=ke}let Be;I.length>25&&(Be=I[25]);let ze,nt,Qe;I.length>17?(ze=I[16],nt=I[17],Qe=I[18]):(ze=qo,nt=!1,Qe=!1),ge&&z?_e+=D:!ge&&!z&&(_e-=D);let qt=0;for(;f!ik.includes(t));class nse{constructor(e,n,i,s,r,o,a){this.maxExtent_=e,this.overlaps_=s,this.pixelRatio_=i,this.resolution_=n,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=hs(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(r,a)}clip(e,n){const i=this.getClipCoords(n);e.beginPath(),e.moveTo(i[0],i[1]),e.lineTo(i[2],i[3]),e.lineTo(i[4],i[5]),e.lineTo(i[6],i[7]),e.clip()}createExecutors_(e,n){for(const i in e){let s=this.executorsByZIndex_[i];s===void 0&&(s={},this.executorsByZIndex_[i]=s);const r=e[i];for(const o in r){const a=r[o];s[o]=new ese(this.resolution_,this.pixelRatio_,this.overlaps_,a,n)}}}hasExecutors(e){for(const n in this.executorsByZIndex_){const i=this.executorsByZIndex_[n];for(let s=0,r=e.length;s0){if(!o||T==="none"||f!=="Image"&&f!=="Text"||o.includes(w)){const B=(h[k]-3)/4,Y=s-B%a,ne=s-(B/a|0),$=r(w,S,Y*Y+ne*ne);if($)return $}u.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(hr);let y,v,b,x,E;for(y=m.length-1;y>=0;--y){const w=m[y].toString();for(b=this.executorsByZIndex_[w],v=il.length-1;v>=0;--v)if(f=il[v],x=b[f],x!==void 0&&(E=x.executeHitDetection(u,l,i,p,d),E))return E}}getClipCoords(e){const n=this.maxExtent_;if(!n)return null;const i=n[0],s=n[1],r=n[2],o=n[3],a=[i,s,i,o,r,o,r,s];return io(a,0,8,2,e,a),a}isEmpty(){return Bl(this.executorsByZIndex_)}execute(e,n,i,s,r,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(hr),o=o||il;const c=il.length;let u,d,h,f,p;for(a&&l.reverse(),u=0,d=l.length;uv.execute(w,n,i,s,r,a)),E&&x.restore(),b){b.offset();const w=l[u]*c+h;this.deferredZIndexContexts_[w]||(this.deferredZIndexContexts_[w]=[]),this.deferredZIndexContexts_[w].push(b)}}}}this.renderedContext_=e}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const e=this.deferredZIndexContexts_,n=Object.keys(e).map(Number).sort(hr);for(let i=0,s=n.length;i{r.draw(this.renderedContext_),r.clear()}),e[n[i]].length=0}}const kp={};function ise(t){if(kp[t]!==void 0)return kp[t];const e=t*2+1,n=t*t,i=new Array(n+1);for(let r=0;r<=t;++r)for(let o=0;o<=t;++o){const a=r*r+o*o;if(a>n)break;let l=i[a];l||(l=[],i[a]=l),l.push(((t+r)*e+(t+o))*4+3),r>0&&l.push(((t-r)*e+(t+o))*4+3),o>0&&(l.push(((t+r)*e+(t-o))*4+3),r>0&&l.push(((t-r)*e+(t-o))*4+3))}const s=[];for(let r=0,o=i.length;rd*this.pixelRatio_),lineDashOffset:(o||gr)*this.pixelRatio_,lineJoin:a!==void 0?a:Yl,lineWidth:(l!==void 0?l:Pu)*this.pixelRatio_,miterLimit:c!==void 0?c:Au,strokeStyle:Ds(i||ku)}}}setImageStyle(e){let n;if(!e||!(n=e.getSize())){this.image_=null;return}const i=e.getPixelRatio(this.pixelRatio_),s=e.getAnchor(),r=e.getOrigin();this.image_=e.getImage(this.pixelRatio_),this.imageAnchorX_=s[0]*i,this.imageAnchorY_=s[1]*i,this.imageHeight_=n[1]*i,this.imageOpacity_=e.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=e.getRotateWithView(),this.imageRotation_=e.getRotation();const o=e.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/i,o[1]*this.pixelRatio_/i],this.imageWidth_=n[0]*i}setTextStyle(e){if(!e)this.text_="";else{const n=e.getFill();if(!n)this.textFillState_=null;else{const f=n.getColor();this.textFillState_={fillStyle:Ds(f||gi)}}const i=e.getStroke();if(!i)this.textStrokeState_=null;else{const f=i.getColor(),p=i.getLineCap(),m=i.getLineDash(),y=i.getLineDashOffset(),v=i.getLineJoin(),b=i.getWidth(),x=i.getMiterLimit();this.textStrokeState_={lineCap:p!==void 0?p:Wl,lineDash:m||fr,lineDashOffset:y||gr,lineJoin:v!==void 0?v:Yl,lineWidth:b!==void 0?b:Pu,miterLimit:x!==void 0?x:Au,strokeStyle:Ds(f||ku)}}const s=e.getFont(),r=e.getOffsetX(),o=e.getOffsetY(),a=e.getRotateWithView(),l=e.getRotation(),c=e.getScaleArray(),u=e.getText(),d=e.getTextAlign(),h=e.getTextBaseline();this.textState_={font:s!==void 0?s:TA,textAlign:d!==void 0?d:Mu,textBaseline:h!==void 0?h:zh},this.text_=u!==void 0?Array.isArray(u)?u.reduce((f,p,m)=>f+=m%2?" ":p,""):u:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r:0,this.textOffsetY_=o!==void 0?this.pixelRatio_*o:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*c[0],this.pixelRatio_*c[1]]}}}const As=.5;function rse(t,e,n,i,s,r,o,a,l){const c=s,u=t[0]*As,d=t[1]*As,h=dn(u,d);h.imageSmoothingEnabled=!1;const f=h.canvas,p=new sse(h,As,s,null,o,a,null),m=n.length,y=Math.floor((256*256*256-1)/m),v={};for(let x=1;x<=m;++x){const E=n[x-1],w=E.getStyleFunction()||i;if(!w)continue;let S=w(E,r);if(!S)continue;Array.isArray(S)||(S=[S]);const A=(x*y).toString(16).padStart(7,"#00000");for(let k=0,P=S.length;k0;return d&&Promise.all(l).then(()=>s(null)),use(t,e,n,i,r,o,a),d}function use(t,e,n,i,s,r,o){const a=n.getGeometryFunction()(e);if(!a)return;const l=a.simplifyTransformed(i,s);if(n.getRenderer())ok(t,l,n,e,o);else{const u=sk[l.getType()];u(t,l,n,e,o,r)}}function ok(t,e,n,i,s){if(e.getType()=="GeometryCollection"){const o=e.getGeometries();for(let a=0,l=o.length;a{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const i=this.frameState.size.slice(),s=this.renderedCenter_,r=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,c=this.getLayer(),u=[],d=i[0]*As,h=i[1]*As;u.push(this.getRenderTransform(s,r,o,As,d,h,0).slice());const f=c.getSource(),p=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!nl(p,l)){let m=l[0];const y=yt(p);let v=0,b;for(;mp[2];)++v,b=y*v,u.push(this.getRenderTransform(s,r,o,As,d,h,b).slice()),m-=y}this.hitDetectionImageData_=rse(i,u,this.renderedFeatures_,c.getStyleFunction(),l,r,o,Hw(r,this.renderedPixelRatio_))}n(ose(e,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(e,n,i,s,r){if(!this.replayGroup_)return;const o=n.viewState.resolution,a=n.viewState.rotation,l=this.getLayer(),c={},u=function(p,m,y){const v=wt(p),b=c[v];if(b){if(b!==!0&&yd=p.forEachFeatureAtCoordinate(e,o,a,i,u,f&&n.declutter[f]?n.declutter[f].all().map(m=>m.value):null)),d}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}prepareFrame(e){const n=this.getLayer(),i=n.getSource();if(!i)return!1;const s=e.viewHints[Wn.ANIMATING],r=e.viewHints[Wn.INTERACTING],o=n.getUpdateWhileAnimating(),a=n.getUpdateWhileInteracting();if(this.ready&&!o&&s||!a&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=e.extent,c=e.viewState,u=c.projection,d=c.resolution,h=e.pixelRatio,f=n.getRevision(),p=n.getRenderBuffer();let m=n.getRenderOrder();m===void 0&&(m=lse);const y=c.center.slice(),v=hy(l,p*d),b=v.slice(),x=[v.slice()],E=u.getExtent();if(i.getWrapX()&&u.canWrapX()&&!nl(E,e.extent)){const $=yt(E),F=Math.max(yt(v)/2,$);v[0]=E[0]-F,v[2]=E[2]+F,nA(y,u);const D=tA(x[0],u);D[0]E[0]&&D[2]>E[2]&&x.push([D[0]-$,D[1],D[2]-$,D[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedRevision_==f&&this.renderedRenderOrder_==m&&this.renderedFrameDeclutter_===!!e.declutter&&nl(this.wrappedRenderedExtent_,v))return Eo(this.renderedExtent_,b)||(this.hitDetectionImageData_=null,this.renderedExtent_=b),this.renderedCenter_=y,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const w=new Zie(rk(d,h),v,d,h);let S;for(let $=0,F=x.length;${let D;const z=$.getStyleFunction()||n.getStyleFunction();if(z&&(D=z($,d)),D){const X=this.renderFeature($,T,D,w,S,this.getLayer().getDeclutter(),F);A=A&&!X}},P=aA(v),B=i.getFeaturesInExtent(P);m&&B.sort(m);for(let $=0,F=B.length;${if(e===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),n&&this.simplifiedGeometry_.applyTransform(n);const i=this.simplifiedGeometry_.getFlatCoordinates();let s;switch(this.type_){case"LineString":i.length=jf(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,e,i,0),s=[i.length];break;case"MultiLineString":s=[],i.length=Gee(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,e,i,0,s);break;case"Polygon":s=[],i.length=dA(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(e),i,0,s);break}return s&&(this.simplifiedGeometry_=new is(this.type_,i,s,2,this.properties_,this.id_)),this.squaredTolerance_=e,this.simplifiedGeometry_}),this}}is.prototype.getFlatCoordinates=is.prototype.getOrientedFlatCoordinates;const Bi={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function wse(t,e){return[[-1/0,-1/0,1/0,1/0]]}let xse=!1;function Ese(t,e,n,i,s,r,o){const a=new XMLHttpRequest;a.open("GET",typeof t=="function"?t(n,i,s):t,!0),e.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=xse,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const c=e.getType();try{let u;c=="text"||c=="json"?u=a.responseText:c=="xml"?u=a.responseXML||a.responseText:c=="arraybuffer"&&(u=a.response),u?r(e.readFeatures(u,{extent:n,featureProjection:s}),e.readProjection(u)):o()}catch{o()}}else o()},a.onerror=o,a.send()}function Gw(t,e){return function(n,i,s,r,o){const a=this;Ese(t,e,n,i,s,function(l,c){a.addFeatures(l),r!==void 0&&r(l)},o||Fl)}}class Or extends Er{constructor(e,n,i){super(e),this.feature=n,this.features=i}}class Cse extends XA{constructor(e){e=e||{},super({attributions:e.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:e.wrapX!==void 0?e.wrapX:!0}),this.on,this.once,this.un,this.loader_=Fl,this.format_=e.format||null,this.overlaps_=e.overlaps===void 0?!0:e.overlaps,this.url_=e.url,e.loader!==void 0?this.loader_=e.loader:this.url_!==void 0&&(pt(this.format_,"`format` must be set when `url` is set"),this.loader_=Gw(this.url_,this.format_)),this.strategy_=e.strategy!==void 0?e.strategy:wse;const n=e.useSpatialIndex!==void 0?e.useSpatialIndex:!0;this.featuresRtree_=n?new Kw:null,this.loadedExtentsRtree_=new Kw,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let i,s;Array.isArray(e.features)?s=e.features:e.features&&(i=e.features,s=i.getArray()),!n&&i===void 0&&(i=new Ps(s)),s!==void 0&&this.addFeaturesInternal(s),i!==void 0&&this.bindFeaturesCollection_(i)}addFeature(e){this.addFeatureInternal(e),this.changed()}addFeatureInternal(e){const n=wt(e);if(!this.addToIndex_(n,e)){this.featuresCollection_&&this.featuresCollection_.remove(e);return}this.setupChangeEvents_(n,e);const i=e.getGeometry();if(i){const s=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(s,e)}else this.nullGeometryFeatures_[n]=e;this.dispatchEvent(new Or(Bi.ADDFEATURE,e))}setupChangeEvents_(e,n){n instanceof is||(this.featureChangeKeys_[e]=[ht(n,et.CHANGE,this.handleFeatureChange_,this),ht(n,Nl.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(e,n){let i=!0;if(n.getId()!==void 0){const s=String(n.getId());if(!(s in this.idIndex_))this.idIndex_[s]=n;else if(n instanceof is){const r=this.idIndex_[s];r instanceof is?Array.isArray(r)?r.push(n):this.idIndex_[s]=[r,n]:i=!1}else i=!1}return i&&(pt(!(e in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[e]=n),i}addFeatures(e){this.addFeaturesInternal(e),this.changed()}addFeaturesInternal(e){const n=[],i=[],s=[];for(let r=0,o=e.length;r{n||(n=!0,this.addFeature(i.element),n=!1)}),e.addEventListener(fi.REMOVE,i=>{n||(n=!0,this.removeFeature(i.element),n=!1)}),this.featuresCollection_=e}clear(e){if(e){for(const i in this.featureChangeKeys_)this.featureChangeKeys_[i].forEach(Rt);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const i=s=>{this.removeFeatureInternal(s)};this.featuresRtree_.forEach(i);for(const s in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[s])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const n=new Or(Bi.CLEAR);this.dispatchEvent(n),this.changed()}forEachFeature(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureAtCoordinateDirect(e,n){const i=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(i,function(s){const r=s.getGeometry();if(r instanceof is||r.intersectsCoordinate(e))return n(s)})}forEachFeatureInExtent(e,n){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,n);this.featuresCollection_&&this.featuresCollection_.forEach(n)}forEachFeatureIntersectingExtent(e,n){return this.forEachFeatureInExtent(e,function(i){const s=i.getGeometry();if(s instanceof is||s.intersectsExtent(e)){const r=n(i);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let e;return this.featuresCollection_?e=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(e=this.featuresRtree_.getAll(),Bl(this.nullGeometryFeatures_)||$f(e,Object.values(this.nullGeometryFeatures_))),e}getFeaturesAtCoordinate(e){const n=[];return this.forEachFeatureAtCoordinateDirect(e,function(i){n.push(i)}),n}getFeaturesInExtent(e,n){if(this.featuresRtree_){if(!(n&&n.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(e);const s=py(e,n);return[].concat(...s.map(r=>this.featuresRtree_.getInExtent(r)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(e,n){const i=e[0],s=e[1];let r=null;const o=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return n=n||vu,this.featuresRtree_.forEachInExtent(l,function(c){if(n(c)){const u=c.getGeometry(),d=a;if(a=u instanceof is?0:u.closestPointXY(i,s,o,a),a{--this.loadingExtentsCount_,this.dispatchEvent(new Or(Bi.FEATURESLOADEND,void 0,u))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Or(Bi.FEATURESLOADERROR))}),s.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(e){const n=this.loadedExtentsRtree_;let i;n.forEachInExtent(e,function(s){if(bu(s.extent,e))return i=s,!0}),i&&n.remove(i)}removeFeatures(e){let n=!1;for(let i=0,s=e.length;ie.geo&&e.geo.lat&&e.geo.lon);return t?[t.geo.lon,t.geo.lat]:[0,0]}return[this.d.geo.lon,this.d.geo.lat]}},async mounted(){await fetch("https://tile.openstreetmap.org/",{signal:AbortSignal.timeout(1500)}).then(t=>{const e=new tie({target:"map",layers:[new Wie({source:new Mie})],view:new Ts({center:cp(this.getLastLonLat()),zoom:this.type==="traceroute"?3:10})}),n=[],i=new Cse;if(this.type==="traceroute")console.log(this.getLastLonLat()),this.d.forEach(a=>{if(a.geo&&a.geo.lat&&a.geo.lon){const l=cp([a.geo.lon,a.geo.lat]);n.push(l);const c=this.getLastLonLat();console.log(a.geo.lon,a.geo.lat),console.log(a.geo.lon===c[0]&&a.geo.lat===c[1]);const u=new Jc({geometry:new Eu(l),last:a.geo.lon===c[0]&&a.geo.lat===c[1]});i.addFeature(u)}});else{const a=cp([this.d.geo.lon,this.d.geo.lat]);n.push(a);const l=new Jc({geometry:new Eu(a)});i.addFeature(l)}const s=new Gh(n),r=new Jc({geometry:s});i.addFeature(r);const o=new vse({source:i,style:function(a){if(a.getGeometry().getType()==="Point")return new pr({image:new Zu({radius:10,fill:new Zl({color:a.get("last")?"#dc3545":"#0d6efd"}),stroke:new Hl({color:"white",width:5})})});if(a.getGeometry().getType()==="LineString")return new pr({stroke:new Hl({color:"#0d6efd",width:2})})}});e.addLayer(o),this.store.Configuration.Server.dashboard_theme==="dark"&&e.on("postcompose",function(a){document.querySelector("#map").style.filter="grayscale(80%) invert(100%) "})}).catch(t=>{this.osmAvailable=!1})}},Tse={key:0,id:"map",class:"w-100 rounded-3"};function Ase(t,e,n,i,s,r){return this.osmAvailable?(R(),V("div",Tse)):ce("",!0)}const ak=je(Sse,[["render",Ase]]),kse={name:"ping",components:{OSMap:ak,LocaleText:He},data(){return{loading:!1,cips:{},selectedConfiguration:void 0,selectedPeer:void 0,selectedIp:void 0,count:4,pingResult:void 0,pinging:!1}},setup(){return{store:tt()}},mounted(){Yt("/api/ping/getAllPeersIpAddress",{},t=>{t.status&&(this.loading=!0,this.cips=t.data,console.log(this.cips))})},methods:{execute(){this.selectedIp&&(this.pinging=!0,this.pingResult=void 0,Yt("/api/ping/execute",{ipAddress:this.selectedIp,count:this.count},t=>{t.status?this.pingResult=t.data:this.store.newMessage("Server",t.message,"danger"),this.pinging=!1}))}},watch:{selectedConfiguration(){this.selectedPeer=void 0,this.selectedIp=void 0},selectedPeer(){this.selectedIp=void 0}}},Mse={class:"mt-md-5 mt-3 text-body"},Pse={class:"container"},Ise={class:"row"},Dse={class:"col-sm-4 d-flex gap-2 flex-column"},Rse={class:"mb-1 text-muted",for:"configuration"},Lse=["disabled"],Ose=["value"],$se={class:"mb-1 text-muted",for:"peer"},Nse=["disabled"],Fse=["value"],Bse={class:"mb-1 text-muted",for:"ip"},Vse=["disabled"],zse={class:"d-flex align-items-center gap-2"},Wse={class:"text-muted"},Yse={class:"mb-1 text-muted",for:"ipAddress"},Hse=["disabled"],jse={class:"mb-1 text-muted",for:"count"},Kse={class:"d-flex gap-3 align-items-center"},Use=["disabled"],Gse=["disabled"],Xse={key:0,class:"d-block"},qse={key:1,class:"d-block"},Zse={class:"col-sm-8 position-relative"},Jse={key:"pingPlaceholder"},Qse={key:"pingResult",class:"d-flex flex-column gap-2 w-100"},ere={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.15s"}},tre={class:"card-body row"},nre={class:"col-sm"},ire={class:"mb-0 text-muted"},sre={key:0,class:"col-sm"},rre={class:"mb-0 text-muted"},ore={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.3s"}},are={class:"card-body"},lre={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.45s"}},cre={class:"card-body"},ure={class:"mb-0 text-muted"},dre={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.6s"}},hre={class:"card-body"},fre={class:"mb-0 text-muted"};function gre(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("OSMap");return R(),V("div",Mse,[g("div",Pse,[e[19]||(e[19]=g("h3",{class:"mb-3 text-body"},"Ping",-1)),g("div",Ise,[g("div",Dse,[g("div",null,[g("label",Rse,[g("small",null,[N(o,{t:"Configuration"})])]),$e(g("select",{class:"form-select","onUpdate:modelValue":e[0]||(e[0]=l=>this.selectedConfiguration=l),disabled:this.pinging},[e[7]||(e[7]=g("option",{disabled:"",selected:"",value:void 0},null,-1)),(R(!0),V(Oe,null,Ze(this.cips,(l,c)=>(R(),V("option",{value:c},we(c),9,Ose))),256))],8,Lse),[[oh,this.selectedConfiguration]])]),g("div",null,[g("label",$se,[g("small",null,[N(o,{t:"Peer"})])]),$e(g("select",{id:"peer",class:"form-select","onUpdate:modelValue":e[1]||(e[1]=l=>this.selectedPeer=l),disabled:this.selectedConfiguration===void 0||this.pinging},[e[8]||(e[8]=g("option",{disabled:"",selected:"",value:void 0},null,-1)),this.selectedConfiguration!==void 0?(R(!0),V(Oe,{key:0},Ze(this.cips[this.selectedConfiguration],(l,c)=>(R(),V("option",{value:c},we(c),9,Fse))),256)):ce("",!0)],8,Nse),[[oh,this.selectedPeer]])]),g("div",null,[g("label",Bse,[g("small",null,[N(o,{t:"IP Address"})])]),$e(g("select",{id:"ip",class:"form-select","onUpdate:modelValue":e[2]||(e[2]=l=>this.selectedIp=l),disabled:this.selectedPeer===void 0||this.pinging},[e[9]||(e[9]=g("option",{disabled:"",selected:"",value:void 0},null,-1)),this.selectedPeer!==void 0?(R(!0),V(Oe,{key:0},Ze(this.cips[this.selectedConfiguration][this.selectedPeer].allowed_ips,l=>(R(),V("option",null,we(l),1))),256)):ce("",!0)],8,Vse),[[oh,this.selectedIp]])]),g("div",zse,[e[10]||(e[10]=g("div",{class:"flex-grow-1 border-top"},null,-1)),g("small",Wse,[N(o,{t:"OR"})]),e[11]||(e[11]=g("div",{class:"flex-grow-1 border-top"},null,-1))]),g("div",null,[g("label",Yse,[g("small",null,[N(o,{t:"Enter IP Address / Hostname"})])]),$e(g("input",{class:"form-control",type:"text",id:"ipAddress",disabled:this.pinging,"onUpdate:modelValue":e[3]||(e[3]=l=>this.selectedIp=l)},null,8,Hse),[[We,this.selectedIp]])]),e[16]||(e[16]=g("div",{class:"w-100 border-top my-2"},null,-1)),g("div",null,[g("label",jse,[g("small",null,[N(o,{t:"Count"})])]),g("div",Kse,[g("button",{onClick:e[4]||(e[4]=l=>this.count--),disabled:this.count===1,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis"},e[12]||(e[12]=[g("i",{class:"bi bi-dash-lg"},null,-1)]),8,Use),g("strong",null,we(this.count),1),g("button",{role:"button",onClick:e[5]||(e[5]=l=>this.count++),class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis"},e[13]||(e[13]=[g("i",{class:"bi bi-plus-lg"},null,-1)]))])]),g("button",{class:"btn btn-primary rounded-3 mt-3 position-relative",disabled:!this.selectedIp||this.pinging,onClick:e[6]||(e[6]=l=>this.execute())},[N($t,{name:"slide"},{default:De(()=>[this.pinging?(R(),V("span",qse,e[15]||(e[15]=[g("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1),g("span",{class:"visually-hidden",role:"status"},"Loading...",-1)]))):(R(),V("span",Xse,e[14]||(e[14]=[g("i",{class:"bi bi-person-walking me-2"},null,-1),Ue("Ping! ")])))]),_:1})],8,Gse)]),g("div",Zse,[N($t,{name:"ping"},{default:De(()=>[this.pingResult?(R(),V("div",Qse,[this.pingResult.geo&&this.pingResult.geo.status==="success"?(R(),Se(a,{key:0,d:this.pingResult},null,8,["d"])):ce("",!0),g("div",ere,[g("div",tre,[g("div",nre,[g("p",ire,[g("small",null,[N(o,{t:"IP Address"})])]),Ue(" "+we(this.pingResult.address),1)]),this.pingResult.geo&&this.pingResult.geo.status==="success"?(R(),V("div",sre,[g("p",rre,[g("small",null,[N(o,{t:"Geolocation"})])]),Ue(" "+we(this.pingResult.geo.city)+", "+we(this.pingResult.geo.country),1)])):ce("",!0)])]),g("div",ore,[g("div",are,[e[18]||(e[18]=g("p",{class:"mb-0 text-muted"},[g("small",null,"Is Alive")],-1)),g("span",{class:Pe([this.pingResult.is_alive?"text-success":"text-danger"])},[g("i",{class:Pe(["bi me-1",[this.pingResult.is_alive?"bi-check-circle-fill":"bi-x-circle-fill"]])},null,2),Ue(" "+we(this.pingResult.is_alive?"Yes":"No"),1)],2)])]),g("div",lre,[g("div",cre,[g("p",ure,[g("small",null,[N(o,{t:"Average / Min / Max Round Trip Time"})])]),g("samp",null,we(this.pingResult.avg_rtt)+"ms / "+we(this.pingResult.min_rtt)+"ms / "+we(this.pingResult.max_rtt)+"ms ",1)])]),g("div",dre,[g("div",hre,[g("p",fre,[g("small",null,[N(o,{t:"Sent / Received / Lost Package"})])]),g("samp",null,we(this.pingResult.package_sent)+" / "+we(this.pingResult.package_received)+" / "+we(this.pingResult.package_loss),1)])])])):(R(),V("div",Jse,[e[17]||(e[17]=g("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px"}},null,-1)),(R(),V(Oe,null,Ze(4,l=>g("div",{class:Pe(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.pinging}]),style:Pn({"animation-delay":`${l*.15}s`})},null,6)),64))]))]),_:1})])])])])}const pre=je(kse,[["render",gre],["__scopeId","data-v-f5cd36ce"]]),mre={name:"traceroute",components:{LocaleText:He,OSMap:ak},data(){return{tracing:!1,ipAddress:void 0,tracerouteResult:void 0}},setup(){return{store:qn()}},methods:{execute(){this.ipAddress&&(this.tracing=!0,this.tracerouteResult=void 0,Yt("/api/traceroute/execute",{ipAddress:this.ipAddress},t=>{t.status?this.tracerouteResult=t.data:this.store.newMessage("Server",t.message,"danger"),this.tracing=!1}))}}},_re={class:"mt-md-5 mt-3 text-body"},yre={class:"container-md"},vre={class:"mb-3 text-body"},bre={class:"d-flex gap-2 flex-column mb-5"},wre={class:"mb-1 text-muted",for:"ipAddress"},xre=["disabled"],Ere=["disabled"],Cre={key:0,class:"d-block"},Sre={key:1,class:"d-block"},Tre={class:"position-relative"},Are={key:"pingPlaceholder"},kre={key:1},Mre={key:"table",class:"w-100 mt-2"},Pre={class:"table table-sm rounded-3 w-100"},Ire={scope:"col"},Dre={scope:"col"},Rre={scope:"col"},Lre={scope:"col"},Ore={scope:"col"},$re={scope:"col"},Nre={key:0};function Fre(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("OSMap");return R(),V("div",_re,[g("div",yre,[g("h3",vre,[N(o,{t:"Traceroute"})]),g("div",bre,[g("div",null,[g("label",wre,[g("small",null,[N(o,{t:"Enter IP Address / Hostname"})])]),$e(g("input",{disabled:this.tracing,id:"ipAddress",class:"form-control","onUpdate:modelValue":e[0]||(e[0]=l=>this.ipAddress=l),onKeyup:e[1]||(e[1]=eC(l=>this.execute(),["enter"])),type:"text"},null,40,xre),[[We,this.ipAddress]])]),g("button",{class:"btn btn-primary rounded-3 mt-3 position-relative",disabled:this.tracing||!this.ipAddress,onClick:e[2]||(e[2]=l=>this.execute())},[N($t,{name:"slide"},{default:De(()=>[this.tracing?(R(),V("span",Sre,e[4]||(e[4]=[g("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1),g("span",{class:"visually-hidden",role:"status"},"Loading...",-1)]))):(R(),V("span",Cre,e[3]||(e[3]=[g("i",{class:"bi bi-person-walking me-2"},null,-1),Ue("Trace! ")])))]),_:1})],8,Ere)]),g("div",Tre,[N($t,{name:"ping"},{default:De(()=>[this.tracerouteResult?(R(),V("div",kre,[N(a,{d:this.tracerouteResult,type:"traceroute"},null,8,["d"]),g("div",Mre,[g("table",Pre,[g("thead",null,[g("tr",null,[g("th",Ire,[N(o,{t:"Hop"})]),g("th",Dre,[N(o,{t:"IP Address"})]),g("th",Rre,[N(o,{t:"Average RTT (ms)"})]),g("th",Lre,[N(o,{t:"Min RTT (ms)"})]),g("th",Ore,[N(o,{t:"Max RTT (ms)"})]),g("th",$re,[N(o,{t:"Geolocation"})])])]),g("tbody",null,[(R(!0),V(Oe,null,Ze(this.tracerouteResult,(l,c)=>(R(),V("tr",null,[g("td",null,[g("small",null,we(l.hop),1)]),g("td",null,[g("small",null,we(l.ip),1)]),g("td",null,[g("small",null,we(l.avg_rtt),1)]),g("td",null,[g("small",null,we(l.min_rtt),1)]),g("td",null,[g("small",null,we(l.max_rtt),1)]),g("td",null,[l.geo.city&&l.geo.country?(R(),V("span",Nre,[g("small",null,we(l.geo.city)+", "+we(l.geo.country),1)])):ce("",!0)])]))),256))])])])])):(R(),V("div",Are,[e[5]||(e[5]=g("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px !important"}},null,-1)),(R(),V(Oe,null,Ze(5,l=>g("div",{class:Pe(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.tracing}]),style:Pn({"animation-delay":`${l*.05}s`})},null,6)),64))]))]),_:1})])])])}const Bre=je(mre,[["render",Fre],["__scopeId","data-v-6d6cffc9"]]),Vre={name:"totp",components:{LocaleText:He},async setup(){const t=tt();let e="";return await Yt("/api/Welcome_GetTotpLink",{},n=>{n.status&&(e=n.data)}),{l:e,store:t}},mounted(){this.l&&ba.toCanvas(document.getElementById("qrcode"),this.l,function(t){})},data(){return{totp:"",totpInvalidMessage:"",verified:!1}},methods:{validateTotp(){}},watch:{totp(t){const e=document.querySelector("#totp");e.classList.remove("is-invalid","is-valid"),t.length===6&&(console.log(t),/[0-9]{6}/.test(t)?xt("/api/Welcome_VerifyTotpLink",{totp:t},n=>{n.status?(this.verified=!0,e.classList.add("is-valid"),this.$emit("verified")):(e.classList.add("is-invalid"),this.totpInvalidMessage="TOTP does not match.")}):(e.classList.add("is-invalid"),this.totpInvalidMessage="TOTP can only contain numbers"))}}},zre=["data-bs-theme"],Wre={class:"m-auto text-body",style:{width:"500px"}},Yre={class:"d-flex flex-column"},Hre={class:"dashboardLogo display-4"},jre={class:"mb-2"},Kre={class:"text-muted"},Ure={class:"p-3 bg-body-secondary rounded-3 border mb-3"},Gre={class:"text-muted mb-0"},Xre=["href"],qre={style:{"line-break":"anywhere"}},Zre={for:"totp",class:"mb-2"},Jre={class:"text-muted"},Qre={class:"form-group mb-2"},eoe=["disabled"],toe={class:"invalid-feedback"},noe={class:"valid-feedback"},ioe={class:"d-flex gap-3 mt-5 flex-column"};function soe(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),V("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[g("div",Wre,[g("div",Yre,[g("div",null,[g("h1",Hre,[N(o,{t:"Multi-Factor Authentication (MFA)"})]),g("p",jre,[g("small",Kre,[N(o,{t:"1. Please scan the following QR Code to generate TOTP with your choice of authenticator"})])]),e[1]||(e[1]=g("canvas",{id:"qrcode",class:"rounded-3 mb-2"},null,-1)),g("div",Ure,[g("p",Gre,[g("small",null,[N(o,{t:"Or you can click the link below:"})])]),g("a",{href:this.l},[g("code",qre,we(this.l),1)],8,Xre)]),g("label",Zre,[g("small",Jre,[N(o,{t:"2. Enter the TOTP generated by your authenticator to verify"})])]),g("div",Qre,[$e(g("input",{class:"form-control text-center totp",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code","onUpdate:modelValue":e[0]||(e[0]=l=>this.totp=l),disabled:this.verified},null,8,eoe),[[We,this.totp]]),g("div",toe,[N(o,{t:this.totpInvalidMessage},null,8,["t"])]),g("div",noe,[N(o,{t:"TOTP verified!"})])])]),e[4]||(e[4]=g("hr",null,null,-1)),g("div",ioe,[this.verified?(R(),Se(a,{key:1,to:"/",class:"btn btn-dark btn-lg d-flex btn-brand shadow align-items-center flex-grow-1 rounded-3"},{default:De(()=>[N(o,{t:"Complete"}),e[3]||(e[3]=g("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1})):(R(),Se(a,{key:0,to:"/",class:"btn bg-secondary-subtle text-secondary-emphasis rounded-3 flex-grow-1 btn-lg border-1 border-secondary-subtle shadow d-flex"},{default:De(()=>[N(o,{t:"I don't need MFA"}),e[2]||(e[2]=g("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1}))])])])],8,zre)}const roe=je(Vre,[["render",soe]]),ooe={name:"share",components:{LocaleText:He},async setup(){const t=lO(),e=xe(!1),n=tt(),i=xe(""),s=xe(void 0),r=xe(new Blob);await Yt("/api/getDashboardTheme",{},a=>{i.value=a.data});const o=t.query.ShareID;return o===void 0||o.length===0?(s.value=void 0,e.value=!0):await Yt("/api/sharePeer/get",{ShareID:o},a=>{a.status?(s.value=a.data,r.value=new Blob([s.value.file],{type:"text/plain"})):s.value=void 0,e.value=!0}),{store:n,theme:i,peerConfiguration:s,blob:r}},mounted(){this.peerConfiguration&&ba.toCanvas(document.querySelector("#qrcode"),this.peerConfiguration.file,t=>{t&&console.error(t)})},methods:{download(){const t=new Blob([this.peerConfiguration.file],{type:"text/plain"}),e=URL.createObjectURL(t),n=`${this.peerConfiguration.fileName}.conf`,i=document.createElement("a");i.href=e,i.download=n,i.click()}},computed:{getBlob(){return URL.createObjectURL(this.blob)}}},aoe=["data-bs-theme"],loe={class:"m-auto text-body",style:{width:"500px"}},coe={key:0,class:"text-center position-relative",style:{}},uoe={class:"position-absolute w-100 h-100 top-0 start-0 d-flex animate__animated animate__fadeInUp",style:{"animation-delay":"0.1s"}},doe={class:"m-auto"},hoe={key:1,class:"d-flex align-items-center flex-column gap-3"},foe={class:"h1 dashboardLogo text-center animate__animated animate__fadeInUp"},goe={id:"qrcode",class:"rounded-3 shadow animate__animated animate__fadeInUp mb-3",ref:"qrcode"},poe={class:"text-muted animate__animated animate__fadeInUp mb-1",style:{"animation-delay":"0.2s"}},moe=["download","href"];function _oe(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.theme},[g("div",loe,[this.peerConfiguration?(R(),V("div",hoe,[g("div",foe,[e[1]||(e[1]=g("h6",null,"WGDashboard",-1)),N(o,{t:"Scan QR Code with the WireGuard App to add peer"})]),g("canvas",goe,null,512),g("p",poe,[N(o,{t:"or click the button below to download the "}),e[2]||(e[2]=g("samp",null,".conf",-1)),N(o,{t:" file"})]),g("a",{download:this.peerConfiguration.fileName+".conf",href:r.getBlob,class:"btn btn-lg bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle animate__animated animate__fadeInUp shadow-sm",style:{"animation-delay":"0.25s"}},e[3]||(e[3]=[g("i",{class:"bi bi-download"},null,-1)]),8,moe)])):(R(),V("div",coe,[e[0]||(e[0]=g("div",{class:"animate__animated animate__fadeInUp"},[g("h1",{style:{"font-size":"20rem",filter:"blur(1rem)","animation-duration":"7s"},class:"animate__animated animate__flash animate__infinite"},[g("i",{class:"bi bi-file-binary"})])],-1)),g("div",uoe,[g("h3",doe,[N(o,{t:"Oh no... This link is either expired or invalid."})])])]))])],8,aoe)}const yoe=je(ooe,[["render",_oe],["__scopeId","data-v-1b44aacd"]]),voe=async()=>{let t=!1;return await Yt("/api/validateAuthentication",{},e=>{t=e.status}),t},Ql=oO({history:NL(),scrollBehavior(){document.querySelector("main")!==null&&document.querySelector("main").scrollTo({top:0})},routes:[{name:"Index",path:"/",component:JO,meta:{requiresAuth:!0},children:[{name:"Configuration List",path:"",component:xN,meta:{title:"WireGuard Configurations"}},{name:"Settings",path:"/settings",component:S6,meta:{title:"Settings"}},{path:"/ping",name:"Ping",component:pre},{path:"/traceroute",name:"Traceroute",component:Bre},{name:"New Configuration",path:"/new_configuration",component:Xz,meta:{title:"New Configuration"}},{name:"Configuration",path:"/configuration/:id",component:Qz,meta:{title:"Configuration"},children:[{name:"Peers List",path:"peers",component:qQ},{name:"Peers Create",path:"create",component:HT}]}]},{path:"/signin",component:j$,meta:{title:"Sign In"}},{path:"/welcome",component:H6,meta:{requiresAuth:!0,title:"Welcome to WGDashboard"}},{path:"/2FASetup",component:roe,meta:{requiresAuth:!0,title:"Multi-Factor Authentication Setup"}},{path:"/share",component:yoe,meta:{title:"Share"}}]});Ql.beforeEach(async(t,e,n)=>{const i=qn(),s=tt();t.meta.title?t.params.id?document.title=t.params.id+" | WGDashboard":document.title=t.meta.title+" | WGDashboard":document.title="WGDashboard",s.ShowNavBar=!1,document.querySelector(".loadingBar").classList.remove("loadingDone"),document.querySelector(".loadingBar").classList.add("loading"),t.meta.requiresAuth?s.getActiveCrossServer()?(await s.getConfiguration(),!i.Configurations&&t.name!=="Configuration List"&&await i.getConfigurations(),n()):cO.getCookie("authToken")&&await voe()?(await s.getConfiguration(),!i.Configurations&&t.name!=="Configuration List"&&await i.getConfigurations(),s.Redirect=void 0,n()):(s.Redirect=t,n("/signin"),s.newMessage("WGDashboard","Sign in session ended, please sign in again","warning")):n()});Ql.afterEach(()=>{document.querySelector(".loadingBar").classList.remove("loading"),document.querySelector(".loadingBar").classList.add("loadingDone")});const lk=()=>{let t={"content-type":"application/json"};const n=tt().getActiveCrossServer();return n&&(t["wg-dashboard-apikey"]=n.apiKey),t},ck=t=>{const n=tt().getActiveCrossServer();return n?`${n.host}${t}`:`${window.location.protocol}//${(window.location.host+window.location.pathname+t).replace(/\/\//g,"/")}`},Yt=async(t,e=void 0,n=void 0)=>{const i=new URLSearchParams(e);await fetch(`${ck(t)}?${i.toString()}`,{headers:lk()}).then(s=>{const r=tt();if(s.ok)return s.json();if(s.status!==200)throw s.status===401&&r.newMessage("WGDashboard","Sign in session ended, please sign in again","warning"),new Error(s.statusText)}).then(s=>n?n(s):void 0).catch(s=>{console.log(s),Ql.push({path:"/signin"})})},xt=async(t,e,n)=>{await fetch(`${ck(t)}`,{headers:lk(),method:"POST",body:JSON.stringify(e)}).then(i=>{const s=tt();if(i.ok)return i.json();if(i.status!==200)throw i.status===401&&s.newMessage("WGDashboard","Sign in session ended, please sign in again","warning"),new Error(i.statusText)}).then(i=>n?n(i):void 0).catch(i=>{console.log(i),Ql.push({path:"/signin"})})},tt=oC("DashboardConfigurationStore",{state:()=>({Redirect:void 0,Configuration:void 0,Messages:[],Peers:{Selecting:!1,RefreshInterval:void 0},CrossServerConfiguration:{Enable:!1,ServerList:{}},ActiveServerConfiguration:void 0,IsElectronApp:!1,ShowNavBar:!1,Locale:void 0}),actions:{initCrossServerConfiguration(){const t=localStorage.getItem("CrossServerConfiguration");localStorage.getItem("ActiveCrossServerConfiguration")!==null&&(this.ActiveServerConfiguration=localStorage.getItem("ActiveCrossServerConfiguration")),t===null?window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration)):this.CrossServerConfiguration=JSON.parse(t)},syncCrossServerConfiguration(){window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration))},addCrossServerConfiguration(){this.CrossServerConfiguration.ServerList[Bs().toString()]={host:"",apiKey:"",active:!1}},deleteCrossServerConfiguration(t){delete this.CrossServerConfiguration.ServerList[t]},getActiveCrossServer(){const t=localStorage.getItem("ActiveCrossServerConfiguration");if(t!==null)return this.CrossServerConfiguration.ServerList[t]},setActiveCrossServer(t){this.ActiveServerConfiguration=t,localStorage.setItem("ActiveCrossServerConfiguration",t)},removeActiveCrossServer(){this.ActiveServerConfiguration=void 0,localStorage.removeItem("ActiveCrossServerConfiguration")},async getConfiguration(){await Yt("/api/getDashboardConfiguration",{},t=>{t.status&&(this.Configuration=t.data)})},async signOut(){await Yt("/api/signout",{},t=>{this.removeActiveCrossServer(),this.$router.go("/signin")})},newMessage(t,e,n){this.Messages.push({id:Bs(),from:At(t),content:At(e),type:n,show:!0})},applyLocale(t){if(this.Locale===null)return t;const n=Object.keys(this.Locale).filter(i=>t.match(new RegExp("^"+i+"$","g"))!==null);return console.log(n),n.length===0||n.length>1?t:this.Locale[n[0]]}}}),boe={class:"navbar bg-dark sticky-top","data-bs-theme":"dark"},woe={class:"container-fluid d-flex text-body align-items-center"},xoe={key:0,class:"ms-auto text-muted"},Eoe={__name:"App",setup(t){const e=tt();e.initCrossServerConfiguration(),window.IS_WGDASHBOARD_DESKTOP&&(e.IsElectronApp=!0,e.CrossServerConfiguration.Enable=!0),un(e.CrossServerConfiguration,()=>{e.syncCrossServerConfiguration()},{deep:!0});const n=be(()=>{if(e.ActiveServerConfiguration)return e.CrossServerConfiguration.ServerList[e.ActiveServerConfiguration]});return(i,s)=>(R(),V(Oe,null,[s[4]||(s[4]=g("div",{style:{"z-index":"9999",height:"5px"},class:"position-absolute loadingBar top-0 start-0"},null,-1)),g("nav",boe,[g("div",woe,[s[3]||(s[3]=g("span",{class:"navbar-brand mb-0 h1"},"WGDashboard",-1)),n.value!==void 0?(R(),V("small",xoe,[s[1]||(s[1]=g("i",{class:"bi bi-server me-2"},null,-1)),Ue(we(n.value.host),1)])):ce("",!0),g("a",{role:"button",class:"navbarBtn text-body",onClick:s[0]||(s[0]=r=>J(e).ShowNavBar=!J(e).ShowNavBar),style:{"line-height":"0","font-size":"2rem"}},s[2]||(s[2]=[g("i",{class:"bi bi-list"},null,-1)]))])]),(R(),Se(p_,null,{default:De(()=>[N(J(vC),null,{default:De(({Component:r})=>[N($t,{name:"app",mode:"out-in",type:"transition"},{default:De(()=>[(R(),Se(ma(r)))]),_:2},1024)]),_:1})]),_:1}))],64))}},Coe=je(Eoe,[["__scopeId","data-v-95a5c797"]]);let $m;await fetch("/api/locale").then(t=>t.json()).then(t=>$m=t.data).catch(()=>{$m=null});const Ky=qR(Coe);Ky.use(Ql);const uk=eL();uk.use(({store:t})=>{t.$router=of(Ql)});Ky.use(uk);const Soe=tt();Soe.Locale=$m;Ky.mount("#app"); diff --git a/src/static/app/package.json b/src/static/app/package.json index 984bed3..c1ae415 100644 --- a/src/static/app/package.json +++ b/src/static/app/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vite build", + "build": "vite build && git commit -a", "build electron": "vite build && vite build --mode electron && cd ../../../../WGDashboard-Desktop && electron-builder --mac --win", "preview": "vite preview" }, diff --git a/src/static/app/src/components/configurationComponents/peerList.vue b/src/static/app/src/components/configurationComponents/peerList.vue index a235358..3189e2f 100644 --- a/src/static/app/src/components/configurationComponents/peerList.vue +++ b/src/static/app/src/components/configurationComponents/peerList.vue @@ -495,7 +495,9 @@ export default {

- {{configurationSummary.connectedPeers}} + + {{configurationSummary.connectedPeers}} / {{configurationPeers.length}} + diff --git a/src/static/app/src/components/configurationListComponents/configurationCard.vue b/src/static/app/src/components/configurationListComponents/configurationCard.vue index d5163c1..1b67e45 100644 --- a/src/static/app/src/components/configurationListComponents/configurationCard.vue +++ b/src/static/app/src/components/configurationListComponents/configurationCard.vue @@ -65,7 +65,8 @@ export default { {{c.DataUsage.Sent > 0 ? c.DataUsage.Sent.toFixed(4) : 0}} GB - {{c.ConnectedPeers}} + + {{c.ConnectedPeers}} / {{c.TotalPeers}}